/* Origin. One dark theme, one accent, one corner radius. No external resource. */
:root {
  --bg: #0a0c10;
  --s1: #10131a;
  --s2: #171b24;
  --line: #272c38;
  --text: #f1eee6;
  --muted: #a0a7b4;
  --accent: #ff5a1f;
  --accent-hi: #ff7a47;
  --accent-ink: #160800;
  --r: 3px;
  --display: Bahnschrift, "DIN Alternate", "Roboto Condensed", sans-serif-condensed, "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Roboto Mono", "Droid Sans Mono", "Liberation Mono", monospace;
  --pad: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); overflow-x: hidden; }
/* grain: fixed, never repainted on scroll */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
button, input { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.token :focus-visible { outline-color: var(--accent-ink); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: var(--r); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.012em; line-height: 1; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); max-width: 18ch; }
.sub { margin-top: 16px; color: var(--muted); font-size: 1.0625rem; max-width: 56ch; }
.help, .fine { color: var(--muted); font-size: .875rem; }
.fine { margin-top: 20px; }

/* ───────── nav */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(10, 12, 16, .86); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .nav { background: rgba(10, 12, 16, .68); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); } }
.nav-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; letter-spacing: .14em; font-size: 1.0625rem; }
.brand img { border-radius: var(--r); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a, .nav-x, .foot-x { text-decoration: none; color: var(--muted); font-size: .9375rem; transition: color .2s; white-space: nowrap; }
.nav-links a:hover, .nav-x:hover, .foot-x:hover { color: var(--text); }
.nav-x { font-family: var(--mono); font-size: .875rem; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); color: var(--text); }
.nav-x:hover { border-color: var(--muted); }

/* ───────── buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: var(--r); border: 1px solid transparent; font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .2s, border-color .2s, transform .12s var(--ease); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-primary[disabled] { background: var(--s2); color: var(--muted); cursor: progress; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.textbtn { background: none; border: 0; padding: 6px 0; color: var(--muted); font-size: .875rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.textbtn:hover { color: var(--text); }
.copy { flex: none; height: 34px; padding: 0 12px; background: transparent; border: 1px solid var(--line); border-radius: var(--r); font-size: .8125rem; font-weight: 600; color: var(--text); cursor: pointer; transition: border-color .2s, transform .12s var(--ease); }
.copy:hover { border-color: var(--muted); }
.copy:active { transform: translateY(1px); }

/* ───────── hero */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 70% at 0% 100%, rgba(255, 90, 31, .16), transparent 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: min(calc(100dvh - 64px), 820px); padding-top: clamp(32px, 6vh, 72px); padding-bottom: clamp(32px, 6vh, 72px); }
.eyebrow { font-family: var(--mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
h1 { margin-top: 20px; font-size: clamp(2.9rem, 6.3vw, 5.1rem); max-width: 11ch; }
.lede { margin-top: 24px; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 44ch; }
.cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-viz { min-width: 0; }
#viz { width: 100%; aspect-ratio: 1 / .94; }
.hero-viz figcaption, .term figcaption { margin-top: 10px; font-family: var(--mono); font-size: .75rem; color: var(--muted); }

/* ───────── sections */
.demo, .checks, .install, .faq { padding: clamp(72px, 10vw, 128px) 0; }
.demo { border-top: 1px solid var(--line); }

.console { margin-top: 40px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 3vw, 36px); }
label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 8px; }
.field { display: flex; gap: 10px; }
.field input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); font-family: var(--mono); font-size: .9375rem; transition: border-color .2s; }
.field input::placeholder { color: var(--muted); }
.field input:hover { border-color: var(--muted); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--accent); }
.field .btn { height: 52px; min-width: 120px; }
.help { margin-top: 8px; }
.err { margin-top: 8px; font-size: .875rem; color: var(--accent-hi); }

.latest { margin-top: 28px; }
.latest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
h3 { font-size: .875rem; font-weight: 600; }
.chips { margin-top: 10px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-right: 48px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; display: inline-flex; align-items: baseline; gap: 10px; height: 40px; padding: 0 14px; line-height: 38px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); font-size: .875rem; cursor: pointer; transition: border-color .2s, transform .12s var(--ease); max-width: 280px; }
.chip:hover { border-color: var(--accent); }
.chip:active { transform: translateY(1px); }
.chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip i { font-style: normal; font-family: var(--mono); font-size: .75rem; color: var(--muted); white-space: nowrap; }
.chip.skel { width: 170px; cursor: default; border-color: transparent; }
.chips-note { color: var(--muted); font-size: .875rem; line-height: 40px; }

.skel { background: linear-gradient(90deg, var(--s2) 0%, #212633 50%, var(--s2) 100%); background-size: 200% 100%; border-radius: var(--r); }

.report { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 28px; min-height: 180px; }
.state { display: grid; gap: 10px; justify-items: start; color: var(--muted); max-width: 52ch; }
.state-title { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--text); line-height: 1.1; }
.state .btn { margin-top: 8px; }
.state code { color: var(--text); font-size: .8125rem; overflow-wrap: anywhere; }
.loading { display: grid; gap: 14px; }
.loading .bar { height: 16px; }
.loading .bar.t { height: 30px; width: min(340px, 70%); }
.loading .bar.w1 { width: 92%; } .loading .bar.w2 { width: 74%; } .loading .bar.w3 { width: 84%; } .loading .bar.w4 { width: 58%; }
.loading p { color: var(--muted); font-family: var(--mono); font-size: .8125rem; }

.rep-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.rep-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.05; overflow-wrap: anywhere; }
.rep-sub { margin-top: 6px; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.rep-actions { display: flex; gap: 8px; }
.rep-sec { margin-top: 30px; }
.rep-sec h4 { margin: 0 0 12px; font-family: var(--mono); font-size: .75rem; font-weight: 600; letter-spacing: .1em; color: var(--accent); }
.kv { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.kv dt { color: var(--muted); font-size: .875rem; }
.kv dd { margin: 0; font-family: var(--mono); font-size: .84375rem; overflow-wrap: anywhere; }
.rep-table { width: 100%; max-width: 620px; border-collapse: collapse; font-family: var(--mono); font-size: .8125rem; }
.rep-table th { text-align: right; font-weight: 400; color: var(--muted); padding: 0 0 8px 12px; vertical-align: bottom; }
.rep-table td { text-align: right; padding: 5px 0 5px 12px; white-space: nowrap; }
.rep-table th:first-child, .rep-table td:first-child, .rep-table th:nth-child(2), .rep-table td:nth-child(2) { text-align: left; padding-left: 0; }
.rep-table th:nth-child(2), .rep-table td:nth-child(2) { padding-left: 12px; }
.rep-table tr.total td { border-top: 1px solid var(--line); padding-top: 8px; color: var(--muted); }
.rep-line { font-family: var(--mono); font-size: .84375rem; overflow-wrap: anywhere; }
.rep-line + .rep-line { margin-top: 6px; }
.rep-line .when { color: var(--muted); margin-right: 12px; }
.rep-line strong { color: var(--accent); font-weight: 600; }
.rep-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rep-checks li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 2px 12px; align-items: baseline; font-size: .9375rem; }
.rep-checks .det { grid-column: 2; font-family: var(--mono); font-size: .8125rem; color: var(--muted); }
.rep-foot { margin-top: 28px; color: var(--muted); font-size: .8125rem; font-family: var(--mono); }
.rep-raw { margin: 24px 0 0; padding: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); font-size: .75rem; line-height: 1.55; overflow-x: auto; }

.badge { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 24px; border: 1px solid var(--line); border-radius: var(--r); font-family: var(--mono); font-size: .75rem; font-weight: 600; color: var(--muted); }
.badge.yes { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ───────── seven checks */
.checks { background: linear-gradient(180deg, transparent, rgba(16, 19, 26, .9) 30%, rgba(16, 19, 26, .9) 70%, transparent); }
.check-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 190px; padding: 22px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); }
.c1 { grid-column: span 7; } .c2 { grid-column: span 5; }
.c3 { grid-column: span 4; } .c4 { grid-column: span 3; } .c5 { grid-column: span 5; }
.c6 { grid-column: span 8; } .c7 { grid-column: span 4; }
.spec { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 12px; font-family: var(--mono); font-size: .875rem; }
.spec-name { font-weight: 600; }
.spec-det { grid-column: 2; color: var(--muted); }
.check-body { color: var(--muted); font-size: 1rem; max-width: 46ch; }
.c1 { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.c1 .badge.yes { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--accent); }
.c1 .spec-det, .c1 .check-body { color: #3a1300; }
.c1 .check-body { font-size: 1.125rem; font-weight: 500; }
.c3 { background: var(--s2); }
.c5 { background: radial-gradient(120% 140% at 0% 100%, rgba(255, 90, 31, .2), transparent 62%), var(--s1); }
.c6 { background: repeating-radial-gradient(circle at 0% 100%, transparent 0 38px, rgba(241, 238, 230, .075) 38px 39px), var(--s1); }

/* ───────── install */
.install-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.cmds { display: grid; gap: 10px; min-width: 0; }
.cmd { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 10px 8px 16px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.cmd code { flex: 1; min-width: 0; font-size: .875rem; overflow-wrap: anywhere; }
.cmd code::before { content: "$ "; color: var(--accent); }
.help code { color: var(--text); font-size: .8125rem; }
.term { margin-top: 36px; min-width: 0; }
.term pre { margin: 0; padding: clamp(16px, 2.4vw, 28px); background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); font-size: .78125rem; line-height: 1.6; overflow-x: auto; color: var(--text); }
.term .prompt { color: var(--accent); }
.term .cut { color: var(--muted); }

/* ───────── $ORIGIN (the one colour block of the page) */
.token { background: var(--accent); color: var(--accent-ink); padding: clamp(72px, 10vw, 120px) 0; position: relative; overflow: hidden; }
.token::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-radial-gradient(circle at 0% 100%, transparent 0 79px, rgba(22, 8, 0, .1) 79px 80px); }
.token-in { position: relative; display: grid; justify-items: center; text-align: center; }
.token h2 { margin-top: 24px; font-size: clamp(3.2rem, 11vw, 8rem); max-width: none; letter-spacing: -.02em; }
.token-lede, .token-plain { text-wrap: balance; }
.token-lede { margin-top: 20px; max-width: 46ch; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); font-weight: 500; }
.token-plain { margin-top: 12px; max-width: 46ch; font-weight: 700; }
.ca { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 14px 18px; background: var(--bg); color: var(--text); border-radius: var(--r); max-width: 100%; }
.ca-label { font-size: .8125rem; color: var(--muted); }
.ca-value { font-family: var(--mono); font-size: .875rem; overflow-wrap: anywhere; }
.ca-actions { display: inline-flex; gap: 8px; }

/* ───────── faq */
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.faq h2 { position: sticky; top: 100px; max-width: 12ch; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-weight: 600; font-size: 1.0625rem; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-family: var(--mono); font-size: 1.25rem; color: var(--accent); transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 0 22px; color: var(--muted); max-width: 62ch; }

/* ───────── footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0 44px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.foot p { color: var(--muted); font-size: .875rem; flex: 1; min-width: 240px; }
.foot-x { font-family: var(--mono); font-size: .875rem; }

/* ───────── motion (only when the visitor has not asked for less) */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .07s; }
  .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .hero-copy > :nth-child(4) { animation-delay: .21s; }
  .hero-viz { animation: fade 1.2s .2s ease both; }
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
  .js .reveal.in { opacity: 1; transform: none; }
  .skel { animation: shimmer 1.4s linear infinite; }
  .rep-head, .rep-sec, .rep-foot { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ───────── below 900px: one column */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 20px; padding-top: 36px; padding-bottom: 40px; }
  #viz { aspect-ratio: 1 / .86; }
  .install-top, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq h2 { position: static; max-width: 18ch; }
  .c1, .c2, .c3, .c4, .c5, .c6, .c7 { grid-column: 1 / -1; }
  .check { min-height: 0; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-x { margin-left: auto; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
}
@media (max-width: 520px) {
  .field { flex-direction: column; }
  .field input { flex: none; width: 100%; }
  .field .btn { width: 100%; }
  .cta .btn { flex: 1; }
  .kv dd, .rep-line { font-size: .78125rem; }
  .rep-table { font-size: .75rem; }
  .rep-table th, .rep-table td { padding-left: 8px; }
}
