/* ============================================================
   Smelteon — Stylesheet
   base -> layout -> type -> components -> visuals -> motion
   House rules: one flat background under every section; no rule,
   seam or tone step between sections; no gradients, shadows, glows,
   blur, grain or opacity. Depth is a hairline and one opaque tonal step.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, h5 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.012em; }
h2 { font-size: var(--fs-h2); line-height: 1.04; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.004em; font-weight: 700; }
h4 { font-size: var(--fs-h4); line-height: 1.25; }
p { margin: 0 0 var(--space-4); max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: var(--text-primary); text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
img, svg, canvas, video { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.15em; }
li { margin-bottom: var(--space-2); }
li::marker { color: var(--text-faint); }
strong { color: var(--text-primary); font-weight: 600; }
code, pre, .mono { font-family: var(--font-mono); font-size: .875rem; }
hr { display: none; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ring); outline-offset: 3px; border-radius: var(--radius-sm);
}
::selection { background: var(--accent-line); color: var(--text-primary); }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 999;
  background: var(--accent); color: var(--text-on-accent);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-md);
  font-weight: 600; transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--container-xl); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-2xl); }
.container--narrow { max-width: var(--container-md); }

.section { padding-block: var(--section-y); position: relative; }
.section + .section { padding-top: 0; }
.section--tight { padding-block: clamp(56px, 6vw, 96px); }
.section + .section--tight { padding-top: 0; }
.section, .hero, .finale { overflow-x: clip; }

.grid { display: grid; gap: var(--grid-gap); }
.grid > *, .split > * { min-width: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Three- and four-up grids sit on 6/12 tracks so an incomplete last row
   is redistributed across the full width instead of leaving an orphan. */
.cols-3 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cols-3 > * { grid-column: span 2; }
.cols-3 > :nth-child(3n+1):nth-last-child(2),
.cols-3 > :nth-child(3n+1):nth-last-child(2) + * { grid-column: span 3; }
.cols-3 > :nth-child(3n+1):last-child { grid-column: 1 / -1; }
.cols-4 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.cols-4 > * { grid-column: span 3; }
.cols-4 > :nth-child(4n+1):last-child { grid-column: 1 / -1; }
.cols-4 > :nth-child(4n+1):nth-last-child(2),
.cols-4 > :nth-child(4n+1):nth-last-child(2) + * { grid-column: span 6; }
.cols-4 > :nth-child(4n+1):nth-last-child(3),
.cols-4 > :nth-child(4n+1):nth-last-child(3) + *,
.cols-4 > :nth-child(4n+1):nth-last-child(3) + * + * { grid-column: span 4; }

@media (max-width: 960px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 > *, .cols-4 > *,
  .cols-3 > :nth-child(n), .cols-4 > :nth-child(n) { grid-column: auto; }
  .cols-3 > :nth-child(odd):last-child, .cols-4 > :nth-child(odd):last-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .cols-3 > :nth-child(n), .cols-4 > :nth-child(n) { grid-column: auto; }
}

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
         align-items: center; gap: clamp(40px, 6vw, 96px); }
.split--wide-left { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.split--sticky { align-items: start; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.split--sticky > :first-child { position: sticky; top: calc(var(--nav-h) + 32px); }
.split--sticky > :first-child .section-head { margin-bottom: 0; }
.split--top { align-items: start; }
@media (max-width: 900px) {
  .split, .split--wide-left, .split--sticky { grid-template-columns: minmax(0, 1fr); }
  .split--sticky > :first-child { position: static; }
}
.stack > * + * { margin-top: var(--stack); }

/* ---------- Utilities (replace former inline styles) ---------- */
.m-0 { margin: 0 !important; }
.mt-2 { margin-top: var(--space-2); } .mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); } .mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); } .mt-12 { margin-top: var(--space-12); }
.mb-2 { margin-bottom: var(--space-2); } .mb-3 { margin-bottom: var(--space-3); }
.mb-6 { margin-bottom: var(--space-6); } .mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); } .mb-head { margin-bottom: var(--head-gap); }
.gap-4 { gap: var(--space-4) !important; }
.justify-center { justify-content: center; }
.list-reset { list-style: none; padding: 0; }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-small); }
.center { text-align: center; }
.center .lead, .center p { margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
                   overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Type helpers ---------- */
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-secondary); max-width: 60ch; }
.display { font-size: var(--fs-display); line-height: .96; letter-spacing: -0.018em;
           font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-6); }
.gradient-text { color: var(--accent-hover); }
.section-head { max-width: 780px; margin-bottom: var(--head-gap); }
.section-head > h2 { margin-bottom: var(--space-5); }
.section-head.center { margin-inline: auto; max-width: 820px; }
.note { font-size: var(--fs-small); color: var(--text-muted); }
.aspirational { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-faint);
                letter-spacing: .01em; line-height: 1.6; }
.center.aspirational, .note.center { margin-inline: auto; }
.label { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .06em;
         text-transform: uppercase; color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans); font-weight: 600; font-size: .9375rem; line-height: 1;
  padding: 0 var(--space-5); min-height: 46px;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.btn-primary { background: var(--accent); color: var(--text-on-accent); }
.btn-primary::after { content: "→"; font-weight: 500; transition: transform var(--dur-base) var(--ease-out); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:hover::after { transform: translateX(3px); }
.btn-primary:active { background: var(--accent-press); }
.btn-ghost { background: var(--surface-1); color: var(--text-primary); border-color: var(--border-default); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-sm { padding: 0 var(--space-4); min-height: 38px; font-size: .875rem; }
.btn-sm.btn-primary::after { content: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.center .btn-row, .btn-row.center { justify-content: center; }
@media (max-width: 420px) { .btn-row > .btn { flex: 1 1 100%; } }
.arrow-link {
  display: inline-flex; align-items: center; gap: var(--space-2); position: relative;
  color: var(--accent-hover); font-weight: 600; font-size: var(--fs-small); text-decoration: none;
}
.arrow-link::after { content: "→"; transition: transform var(--dur-base) var(--ease-out); }
.arrow-link:hover::after { transform: translateX(4px); }
.arrow-link::before { content: ""; position: absolute; inset: -12px -4px; }

/* ---------- Cards ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface-1); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: clamp(24px, 2.4vw, 32px);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.card:hover { border-color: var(--border-default); }
.card h3 { font-size: var(--fs-h4); margin-bottom: var(--space-3); }
.card p:not([class]) { color: var(--text-secondary); font-size: var(--fs-small); line-height: 1.6; }
.card p.lead { font-size: var(--fs-body-lg); }
.card ul { font-size: var(--fs-small); }
.card--accent { border-color: var(--accent-line); }
.card--glass { background: var(--surface-1); }
.card > :last-child { margin-bottom: 0; }
.card__foot { margin-top: auto; padding-top: var(--space-5); }

.card__index {
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
  min-width: 34px; height: 26px; padding: 0 var(--space-2); margin-bottom: var(--space-6);
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .04em;
  color: var(--accent-2); background: var(--accent-2-soft);
  border: 1px solid #4a3510; border-radius: var(--radius-sm);
}
.card__index--no { color: var(--error); background: var(--error-soft); border-color: #4d1f28; }
.card__index svg { width: 12px; height: 12px; }
.card__tag {
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent-2); margin: calc(var(--space-1) * -1) 0 var(--space-4);
}

/* Joined cells: one outer hairline, 1px seams, no gaps — for dense sets. */
.cells { gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle);
         border-radius: var(--radius-xl); overflow: hidden; }
.cells > .card { border: 0; border-radius: 0; background: var(--bg-base); }
.cells > .card:hover { background: var(--surface-1); }

.badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 3px var(--space-3); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400; letter-spacing: .02em; line-height: 1.5;
  background: var(--accent-soft); color: var(--accent-hover); border: 1px solid var(--accent-line);
}
.badge--cool { background: var(--accent-3-soft); color: #7dd3fc; border-color: var(--accent-3-line); }
.badge--muted { background: var(--surface-1); color: var(--text-muted); border-color: var(--border-default); }
.pill-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pill-row.center, .center .pill-row { justify-content: center; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; background: var(--bg-base);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
.nav.is-stuck { border-bottom-color: var(--border-subtle); }
.nav__inner { display: flex; align-items: center; gap: var(--space-6); min-height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none;
         text-decoration: none; color: var(--text-primary);
         font-family: var(--font-display); font-weight: 700; font-size: 1.3125rem; letter-spacing: .01em; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__logo { display: block; height: 30px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 2px; margin: 0 0 0 auto;
              list-style: none; padding: 0; }
.nav__links > li { margin: 0; position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 0 var(--space-3); border-radius: var(--radius-md);
  font-size: .9063rem; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; background: none; border: 0; cursor: pointer;
  font-family: var(--font-sans); transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav__link:hover, .nav__link[aria-expanded="true"] { color: var(--text-primary); background: var(--surface-1); }
.nav__link[aria-current="page"] { color: var(--text-primary); }
.nav__link .caret { display: inline-block; width: 7px; height: 7px; font-size: 0;
  border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-fast) var(--ease-out); }
.nav__link[aria-expanded="true"] .caret { transform: translateY(1px) rotate(-135deg); }
.nav__cta { display: flex; align-items: center; gap: var(--space-2); margin-left: var(--space-2);
            padding-left: var(--space-4); border-left: 1px solid var(--border-subtle); }

.mega {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(-4px);
  width: 560px; padding: var(--space-3); z-index: 120;
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); visibility: hidden; pointer-events: none;
  transition: transform var(--dur-base) var(--ease-out), visibility var(--dur-base);
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.mega[data-open="true"] { visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mega__item { display: block; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
              text-decoration: none; transition: background var(--dur-fast) var(--ease-out); }
.mega__item:hover { background: var(--surface-2); }
.mega__item strong { display: block; color: var(--text-primary); font-size: .9375rem; font-weight: 600; margin-bottom: 2px; }
.mega__item span { display: block; font-size: .8125rem; line-height: 1.45; color: var(--text-muted); }
.mega__item[aria-current="page"] strong { color: var(--accent-hover); }

.nav__toggle { display: none; margin-left: auto; background: var(--surface-1); border: 1px solid var(--border-default);
               border-radius: var(--radius-md); width: 44px; height: 44px; cursor: pointer; padding: 0;
               color: var(--text-primary); place-items: center; }
.nav__toggle svg { width: 18px; height: 18px; }
.nav__toggle--close { display: grid; margin-left: 0; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 150; background: var(--bg-base);
  overflow-y: auto; overscroll-behavior: contain; display: none;
  padding-bottom: var(--space-12);
}
.mobile-menu[data-open="true"] { display: block; }
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); }
.mobile-menu__nav { margin-top: var(--space-4); display: grid; gap: var(--space-2); }
.mobile-menu__group { padding: var(--space-4) 0; border-bottom: 1px solid var(--border-subtle); }
.mobile-menu__group:last-child { border-bottom: 0; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li { margin: 0; }
.mobile-menu__head-link { display: flex; align-items: center; min-height: 44px;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--text-primary); text-decoration: none; }
.mobile-menu__sub { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-4); }
.mobile-menu__sub a { display: flex; align-items: center; min-height: 44px; font-size: 1rem; font-weight: 500;
  color: var(--text-muted); text-decoration: none; }
.mobile-menu a:hover, .mobile-menu a[aria-current="page"] { color: var(--text-primary); }
.mobile-menu__cta { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.mobile-menu__cta .btn { width: 100%; }

@media (max-width: 1120px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: grid; }
}

/* ---------- Scroll progress + chapter dots ---------- */
.progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; z-index: 130; pointer-events: none; }
.progress__bar { height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--accent); }
.chapters { position: fixed; right: clamp(8px, 1.4vw, 22px); top: 50%; transform: translateY(-50%);
            z-index: 90; display: grid; gap: 0; }
.chapters button { width: 28px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer;
                   display: grid; place-items: center; }
.chapters button::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-strong); transition: background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.chapters button:hover::before { background: var(--text-muted); }
.chapters button[aria-current="true"]::before { background: var(--accent); transform: scale(1.4); }
@media (max-width: 1360px) { .chapters { display: none; } }

/* ---------- Breadcrumbs ---------- */
.crumbs { padding-top: var(--space-6); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); list-style: none;
             padding: 0; margin: 0; font-family: var(--font-mono); font-size: var(--fs-micro);
             letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.crumbs li { margin: 0; display: flex; align-items: center; gap: var(--space-2); }
.crumbs li + li::before { content: "/"; color: var(--text-faint); }
.crumbs a { color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.crumbs a:hover { color: var(--text-primary); }

/* ============================================================
   SCENES — pinned / scrubbed storytelling
   ============================================================ */
.scene { position: relative; height: var(--track); }
.scene--short { height: var(--track-short); }
.scene--long  { height: var(--track-long); }
.scene__stage { position: sticky; top: 0; height: 100vh; overflow: clip;
                display: grid; place-items: center; padding-block: calc(var(--nav-h) + 24px) 40px; }
.scene__inner { width: 100%; }
.scene__head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
               gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.scene__head h2 { margin-bottom: 0; }
.scene__head .lead { font-size: var(--fs-body-lg); max-width: 52ch; }
@media (max-width: 900px) { .scene__head { grid-template-columns: minmax(0, 1fr); align-items: start; } }

/* Reveals switch visibility and slide, never fade: nothing is ever partly transparent. */
[data-reveal] { visibility: hidden; transform: translateY(18px);
  transition: visibility var(--dur-slow), transform var(--dur-slow) var(--ease-out); }
[data-reveal].in { visibility: visible; transform: none; }
[data-reveal="left"] { transform: translateX(-20px); }
[data-reveal="right"] { transform: translateX(20px); }
[data-reveal="scale"] { transform: scale(.98); }

.kinetic .line { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.kinetic .line > span { display: block; transform: translateY(108%);
  transition: transform var(--dur-slower) var(--ease-emph); }
.kinetic.in .line > span { transform: none; }
.kinetic.in .line:nth-child(2) > span { transition-delay: 80ms; }
.kinetic.in .line:nth-child(3) > span { transition-delay: 160ms; }
.kinetic.in .line:nth-child(4) > span { transition-delay: 240ms; }
@media (max-width: 620px) { .kinetic .line { display: inline; overflow: visible; }
  .kinetic .line > span { display: inline; transform: none; }
  .kinetic .line::after { content: " "; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(48px, 7vw, 104px) clamp(72px, 8vw, 120px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
              gap: clamp(40px, 5vw, 80px); align-items: center; }
.hero__grid > * { min-width: 0; }
.hero .display { max-width: 12ch; }
.hero .display .line:last-child > span { color: var(--accent-hover); }
.hero .lead { max-width: 50ch; }
.hero__note { margin-top: var(--space-6); font-size: var(--fs-xs); color: var(--text-muted); max-width: 52ch; }
.hero__note::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); margin-right: var(--space-2); transform: translateY(-2px); }
@media (max-width: 1000px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } .hero .display { max-width: 14ch; } }

.hero--center { text-align: center; padding-block: clamp(56px, 8vw, 120px) clamp(56px, 6vw, 96px); }
.hero--center .hero__grid { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.hero--center .display { max-width: 16ch; margin-inline: auto; }
.hero--center .lead { margin-inline: auto; max-width: 60ch; }
.hero--center .btn-row { justify-content: center; }
.hero--center .hero__stats { margin-inline: auto; max-width: 880px; }
.hero--center .hero__note { margin-inline: auto; }

.hero__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
               margin-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--border-subtle); }
.hero__stat { padding: var(--space-5) var(--space-6) 0 0; min-width: 0; text-align: left; }
.hero__stat + .hero__stat { padding-left: var(--space-6); border-left: 1px solid var(--border-subtle); }
.hero__stat strong { display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1; letter-spacing: -0.01em;
  color: var(--text-primary); font-variant-numeric: tabular-nums; margin-bottom: var(--space-2); }
.hero__stat span { display: block; font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.45; }
@media (max-width: 620px) {
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__stat, .hero__stat + .hero__stat { padding: var(--space-4) var(--space-4) var(--space-4) 0; border-left: 0; }
  .hero__stat:nth-child(even) { padding-left: var(--space-4); border-left: 1px solid var(--border-subtle); }
  .hero__stat:nth-child(n+3) { border-top: 1px solid var(--border-subtle); }
  .hero__stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ============================================================
   VISUALS — instrument panels drawn in solid SVG
   ============================================================ */
.viz { margin: 0; background: var(--surface-1); border: 1px solid var(--border-subtle);
       border-radius: var(--radius-2xl); overflow: hidden; width: 100%; max-width: 620px; margin-inline: auto; }
.viz__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
            padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--border-subtle); }
.viz__title { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-muted);
              white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz__live { display: inline-flex; align-items: center; gap: 6px; flex: none;
             font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--success); }
.viz__live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
                     animation: blink 2.4s var(--ease-in-out) infinite; }
@keyframes blink { 50% { background: var(--success-soft); } }
.viz__svg { width: 100%; height: auto; padding: var(--space-5) var(--space-5) var(--space-3); overflow: visible; }
.viz__read { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0;
             border-top: 1px solid var(--border-subtle); }
.viz__read > div { padding: var(--space-4) var(--space-5); min-width: 0; }
.viz__read > div + div { border-left: 1px solid var(--border-subtle); }
.viz__read dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
                color: var(--text-muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz__read dd { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.1;
                color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz__read dd.ok { color: var(--success); }
.viz__read dd.hot { color: var(--accent-hover); }
@media (max-width: 480px) { .viz__read > div { padding: var(--space-3); } .viz__read dd { font-size: 1.0625rem; }
  .viz__svg { padding: var(--space-3) var(--space-3) var(--space-2); } }

/* SVG paint classes: every fill is a solid token */
.viz text { font-family: var(--font-mono); font-size: 11px; fill: var(--text-muted); letter-spacing: .03em; }
.viz .t-hi { fill: var(--text-primary); }
.viz .t-sec { fill: var(--text-secondary); }
.viz .t-acc { fill: var(--accent-hover); }
.viz .t-amb { fill: var(--accent-2); }
.viz .t-cool { fill: var(--accent-3); }
.viz .t-ok { fill: var(--success); }
.viz .t-dark { fill: var(--text-on-accent); }
.viz .t-lg { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.viz .t-xl { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.viz .t-sm { font-size: 10px; }
.viz .t-md { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.viz .s-rim { stroke: var(--molten-rim); fill: none; }
.viz .s-grid { stroke: var(--border-subtle); fill: none; }
.viz .s-line { stroke: var(--border-default); fill: none; }
.viz .s-strong { stroke: var(--border-strong); fill: none; }
.viz .s-acc { stroke: var(--accent); fill: none; }
.viz .s-amb { stroke: var(--accent-2); fill: none; }
.viz .s-cool { stroke: var(--accent-3); fill: none; }
.viz .s-muted { stroke: var(--text-muted); fill: none; }
.viz .f-bg { fill: var(--bg-base); }
.viz .f-s1 { fill: var(--surface-1); }
.viz .f-s2 { fill: var(--surface-2); }
.viz .f-s3 { fill: var(--surface-3); }
.viz .f-acc { fill: var(--accent); }
.viz .f-acch { fill: var(--accent-hover); }
.viz .f-amb { fill: var(--accent-2); }
.viz .f-cool { fill: var(--accent-3); }
.viz .f-ok { fill: var(--success); }
.viz .f-accsoft { fill: var(--accent-soft); }
.viz .f-coolsoft { fill: var(--accent-3-soft); }
.viz .f-line { fill: var(--border-default); }
.viz .f-strong { fill: var(--border-strong); }
.viz .dash { stroke-dasharray: 4 5; }
.viz .dash-fine { stroke-dasharray: 2 4; }

.viz-spin { transform-origin: 240px 240px; animation: spin 14s linear infinite; }
.viz-spin--slow { animation-duration: 28s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.viz-core { transform-origin: 240px 240px; animation: core 4.8s var(--ease-in-out) infinite; }
@keyframes core { 50% { transform: scale(1.035); } }
.viz-ember { animation: ember 5s var(--ease-in-out) infinite; transform-box: fill-box; transform-origin: center; }
.viz-ember:nth-of-type(2n) { animation-duration: 7s; animation-delay: -2s; }
.viz-ember:nth-of-type(3n) { animation-duration: 6s; animation-delay: -3.5s; }
@keyframes ember { 50% { transform: translateY(-8px) scale(.6); } }
.viz-scan { animation: scan 6s var(--ease-in-out) infinite alternate; }
@keyframes scan { from { transform: translateX(0); } to { transform: translateX(300px); } }
.viz-travel { transform-origin: 240px 240px; animation: spin 18s linear infinite; }

/* ---------- Scrub sequence (SVG draw) ---------- */
.scrub__svg { width: 100%; height: auto; }
.scrub__path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.scrub__trace { stroke: var(--accent); stroke-width: 3;
  stroke-dasharray: var(--len, 1000); stroke-dashoffset: calc(var(--len, 1000) * (1 - var(--p, 0))); }
.scrub__node { transition: stroke var(--dur-base) var(--ease-out); }
.scrub__svg text { font-family: var(--font-mono); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.scrub__stations { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px;
                   margin-top: var(--space-8); background: var(--border-subtle);
                   border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); overflow: hidden; }
.station { display: grid; gap: 2px; padding: var(--space-5); background: var(--bg-base);
           transition: background var(--dur-base) var(--ease-out); }
.station > span:first-child { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-faint);
                              margin-bottom: var(--space-3); transition: color var(--dur-base) var(--ease-out); }
.station strong { color: var(--text-primary); font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; line-height: 1.1; }
.station > span:last-child { font-size: var(--fs-xs); color: var(--text-muted); }
.station[data-active="true"] { background: var(--surface-1); }
.station[data-active="true"] > span:first-child { color: var(--accent-2); }
@media (max-width: 900px) { .scrub__stations { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .scrub__svg { display: none; }
  .scrub__stations { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
  .station { padding: var(--space-4); }
}


/* ---------- Headlines inside columns reflow naturally ----------
   Forced line breaks only survive in full-width, centred heads; in a hero
   or a split column the words wrap and balance, and the reveal is a slide. */
.hero .kinetic .line, .hero .kinetic .line > span,
.split .kinetic .line, .split .kinetic .line > span,
.scene__head .kinetic .line, .scene__head .kinetic .line > span { display: inline; overflow: visible; transform: none; transition: none; }
.hero .kinetic .line::after, .split .kinetic .line::after, .scene__head .kinetic .line::after { content: " "; }
.hero .kinetic, .split .kinetic, .scene__head .kinetic { visibility: hidden; transform: translateY(14px);
  transition: visibility var(--dur-slower), transform var(--dur-slower) var(--ease-emph); }
.hero .kinetic.in, .split .kinetic.in, .scene__head .kinetic.in { visibility: visible; transform: none; }
html:not(.js) .kinetic, html[data-motion="reduced"] .kinetic { visibility: visible !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) { .kinetic { visibility: visible !important; transform: none !important; } }
.hero .display { max-width: 13ch; }
.hero--center .display { max-width: 18ch; }

/* ---------- Components adapt when they sit in a split column ---------- */
.split .dash__body { grid-template-columns: minmax(0, 1fr); }
.split .dash__side { display: none; }
.split .dash__main { padding: var(--space-5); }
.split:has(> :last-child .window) { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.split:has(> :first-child .window) { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
.split:has(.form) { align-items: start; }
.split .kv__row { grid-template-columns: 170px minmax(0, 1fr); gap: var(--space-6); }
@media (max-width: 900px) { .split:has(.window) { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 620px) { .split .kv__row { grid-template-columns: 1fr; gap: var(--space-2); } }
ul.stack { list-style: none; padding: 0; display: grid; gap: 0; margin-top: var(--space-6); border-top: 1px solid var(--border-subtle); }
ul.stack > * + * { margin-top: 0; }
ul.stack li { margin: 0; padding: var(--space-3) 0 var(--space-3) var(--space-8); position: relative;
              border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-small); color: var(--text-secondary); }
ul.stack li::before { content: ""; position: absolute; left: 4px; top: 1.05em; width: 10px; height: 6px;
  border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }

/* ---------- Pinned narrative ---------- */
.beats { display: grid; margin-top: var(--space-8); }
/* Beats swap instantly (visibility, never a crossfade) and the incoming one slides up. */
.beat { grid-area: 1 / 1; visibility: hidden; transform: translateY(14px);
        transition: transform var(--dur-slow) var(--ease-out);
        pointer-events: none; }
.beat[data-active="true"] { visibility: visible; transform: none; pointer-events: auto; }
.beat h3 { font-size: var(--fs-h3); display: flex; align-items: baseline; gap: var(--space-3); }
.beat__num { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400; color: var(--accent-2);
             letter-spacing: .04em; flex: none; transform: translateY(-3px); }
.beat p { font-size: var(--fs-body); }
.beat ul { list-style: none; padding: 0; margin-top: var(--space-5); display: grid; gap: 0;
           border-top: 1px solid var(--border-subtle); }
.beat li { margin: 0; padding: var(--space-3) 0 var(--space-3) var(--space-6); position: relative;
           font-size: var(--fs-small); border-bottom: 1px solid var(--border-subtle); }
.beat li::before { content: ""; position: absolute; left: 2px; top: 1.2em; width: 8px; height: 1.5px; background: var(--accent); }
.beat-rail { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-8) 0 0; list-style: none; padding: 0; }
.beat-rail__item { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0;
                   padding: 6px var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
                   font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
                   color: var(--text-muted); transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base); }
.beat-rail__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong);
                  transition: background var(--dur-base) var(--ease-out); }
.beat-rail__item[data-active="true"] { color: var(--text-primary); border-color: var(--border-default); background: var(--surface-1); }
.beat-rail__item[data-active="true"] .beat-rail__dot { background: var(--accent); }
.scene .split { align-items: center; }
@media (max-height: 820px) and (min-width: 901px) { .beat p { font-size: var(--fs-small); } .beat ul { display: none; } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border-subtle); }
.stats > div { padding: var(--space-6) var(--space-6) 0 0; min-width: 0; }
.stats > div + div { padding-left: var(--space-6); border-left: 1px solid var(--border-subtle); }
.stat__value { font-family: var(--font-display); font-size: clamp(2.5rem, 1.8rem + 2.6vw, 4.25rem); font-weight: 700;
               color: var(--text-primary); line-height: .95; letter-spacing: -0.015em;
               font-variant-numeric: tabular-nums; margin-bottom: var(--space-3); }
.stat__value .unit { color: var(--accent-hover); }
.stat__label { color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.5; max-width: 28ch; }
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div, .stats > div + div { padding: var(--space-5) var(--space-5) var(--space-5) 0; border-left: 0; }
  .stats > div:nth-child(even) { padding-left: var(--space-5); border-left: 1px solid var(--border-subtle); }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--border-subtle); }
}

/* ---------- Logos ---------- */
.logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle);
         border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); overflow: hidden; }
.logo-item { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 88px;
             padding: var(--space-4); background: var(--bg-base);
             font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; line-height: 1.15; letter-spacing: .02em;
             color: var(--text-muted); transition: color var(--dur-base) var(--ease-out); }
.logo-item:hover { color: var(--text-primary); }
@media (max-width: 960px) { .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logo-item { min-height: 72px; font-size: 1rem; } }
.logos-note { margin-bottom: var(--space-6); font-family: var(--font-mono); font-size: var(--fs-micro);
              letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); text-align: center; max-width: none; }

/* ---------- Testimonials ---------- */
.quote { display: flex; flex-direction: column; background: var(--surface-1); border: 1px solid var(--border-subtle);
         border-radius: var(--radius-xl); padding: clamp(24px, 2.4vw, 32px); margin: 0; position: relative; }
.quote::before { content: "\201C"; display: block; font-family: var(--font-display); font-weight: 700;
                 font-size: 3.5rem; line-height: .6; height: 26px; color: var(--accent); margin-bottom: var(--space-4); }
.quote p { font-size: var(--fs-body-lg); line-height: 1.55; color: var(--text-primary); }
.quote footer { margin-top: auto; padding-top: var(--space-6); display: flex; align-items: center; gap: var(--space-3); }
.avatar { width: 40px; height: 40px; border-radius: var(--radius-md); flex: none;
          background: var(--surface-3); border: 1px solid var(--border-default); display: grid; place-items: center;
          color: var(--accent-2); font-family: var(--font-mono); font-size: var(--fs-micro); }
.quote cite { font-style: normal; font-weight: 600; color: var(--text-primary); display: block; font-size: var(--fs-small); }
.quote cite span { display: block; font-weight: 400; color: var(--text-muted); font-size: var(--fs-xs); }
.quote--feature { background: transparent; border: 0; padding: 0; text-align: center; align-items: center; max-width: 920px; margin-inline: auto; }
.quote--feature::before { font-size: 5rem; height: 36px; }
.quote--feature p { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.5rem);
                    line-height: 1.18; letter-spacing: -0.005em; max-width: 30ch; text-wrap: balance; }
.quote--feature footer { justify-content: center; text-align: center; padding-top: var(--space-6); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--grid-gap); }
.bento > * { grid-column: span 2; min-width: 0; }
.bento .b-lg { grid-column: span 4; }
.bento .b-half { grid-column: span 3; }
.bento .b-full { grid-column: span 6; }
@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento > *, .bento .b-half { grid-column: span 1; } .bento .b-lg, .bento .b-full { grid-column: span 2; } }
@media (max-width: 620px) { .bento { grid-template-columns: minmax(0, 1fr); }
  .bento > *, .bento .b-lg, .bento .b-half, .bento .b-full { grid-column: span 1; } }

/* ---------- Product tiles (home) ---------- */
.product h3 { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); margin-bottom: var(--space-2); letter-spacing: .005em; }
.product .card__tag { margin: 0 0 var(--space-5); }

/* ---------- Workflow ---------- */
.flow { position: relative; display: grid; gap: 0; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.flow::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 1px;
  background: var(--border-default); }
.flow__step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-6); align-items: start;
              margin: 0; padding-bottom: var(--space-8); position: relative; }
.flow__step:last-child { padding-bottom: 0; }
.flow__marker { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--surface-1); border: 1px solid var(--border-default); position: relative; z-index: 1;
  color: var(--accent-2); font-family: var(--font-mono); font-size: var(--fs-micro); }
.flow__step h3 { font-size: var(--fs-h4); margin: 8px 0 var(--space-2); }
.flow__step p { font-size: var(--fs-small); color: var(--text-secondary); }
.flow__step:hover .flow__marker { border-color: var(--accent-line); color: var(--accent-hover); }

/* ---------- Code / terminal ---------- */
.window { background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); overflow: hidden; }
.window__bar { display: flex; align-items: center; gap: 6px; padding: var(--space-3) var(--space-4);
               border-bottom: 1px solid var(--border-subtle); }
.window__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-default); flex: none; }
.window__title { margin-left: var(--space-3); font-size: var(--fs-micro); color: var(--text-muted); font-family: var(--font-mono);
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.window__body { padding: var(--space-5) var(--space-6); overflow-x: auto; background: var(--bg-base); }
.window pre { margin: 0; font-size: .78rem; line-height: 1.75; color: var(--text-secondary); }
.tok-key { color: #7dd3fc; } .tok-str { color: var(--accent-2); }
.tok-com { color: var(--text-muted); } .tok-fn { color: var(--accent-hover); }
.copy-btn { margin-left: auto; flex: none; background: var(--surface-2); border: 1px solid var(--border-default);
            color: var(--text-secondary); border-radius: var(--radius-sm); font-size: var(--fs-micro);
            min-height: 28px; padding: 0 10px; cursor: pointer; font-family: var(--font-mono); }
.copy-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.term-line { display: block; font-family: var(--font-mono); font-size: .8125rem; line-height: 1.85; }
.term-line .p { color: var(--accent); }
.term-out { color: var(--text-muted); }

/* ---------- Dashboard preview ---------- */
.dash { background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-2xl); overflow: hidden; }
.dash__bar { display: flex; align-items: center; gap: 6px; padding: var(--space-3) var(--space-5);
             border-bottom: 1px solid var(--border-subtle); min-width: 0; }
.dash__body { display: grid; grid-template-columns: 188px minmax(0, 1fr); }
.dash__side { padding: var(--space-4) var(--space-3); display: grid; gap: 2px; align-content: start;
              border-right: 1px solid var(--border-subtle); }
.dash__side span { font-size: var(--fs-xs); color: var(--text-muted); padding: 7px var(--space-3); border-radius: var(--radius-sm); }
.dash__side span[data-active="true"] { background: var(--surface-2); color: var(--text-primary); font-weight: 600; }
.dash__main { padding: var(--space-6); display: grid; gap: var(--space-6); min-width: 0; background: var(--bg-base); }
.dash__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle);
               border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.tile { background: var(--surface-1); padding: var(--space-4) var(--space-5); min-width: 0; }
.tile b { display: block; font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + .9vw, 2rem); font-weight: 700;
          line-height: 1.05; color: var(--text-primary); font-variant-numeric: tabular-nums; margin-top: var(--space-2); }
.tile span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
             text-transform: uppercase; letter-spacing: .05em; line-height: 1.3; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 112px; padding-bottom: 1px;
        border-bottom: 1px solid var(--border-default); }
.bars i { flex: 1; border-radius: 3px 3px 0 0; background: var(--surface-3); }
.bars i:nth-last-child(-n+4) { background: var(--accent); }
.bars i:nth-child(1) { height: 38%; } .bars i:nth-child(2) { height: 55%; } .bars i:nth-child(3) { height: 47%; }
.bars i:nth-child(4) { height: 68%; } .bars i:nth-child(5) { height: 61%; } .bars i:nth-child(6) { height: 79%; }
.bars i:nth-child(7) { height: 72%; } .bars i:nth-child(8) { height: 88%; } .bars i:nth-child(9) { height: 81%; }
.bars i:nth-child(10) { height: 93%; } .bars i:nth-child(11) { height: 86%; } .bars i:nth-child(12) { height: 96%; }
.dash__rows { display: grid; }
.dash__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
             padding: var(--space-3) 0; font-size: var(--fs-xs); border-top: 1px solid var(--border-subtle); }
.dash__row:first-child { border-top: 0; }
.dash__row > span { font-family: var(--font-mono); color: var(--text-secondary); min-width: 0; }
.dash__state, .dash__row [data-state] { font-family: var(--font-mono); font-weight: 400; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; text-align: right; font-variant-numeric: tabular-nums; flex: none; max-width: 48%; }
.dash__state--live, .dash__state--ok { color: var(--success); }
.dash__state--warn { color: var(--warning); }
.dash__state--cool { color: #7dd3fc; }
@media (max-width: 760px) {
  .dash__body { grid-template-columns: minmax(0, 1fr); } .dash__side { display: none; }
  .dash__main { padding: var(--space-4); }
  .dash__tiles { grid-template-columns: minmax(0, 1fr); }
  .dash__row { flex-direction: column; gap: 2px; } .dash__state { text-align: left; max-width: none; }
}

/* ---------- Pricing ---------- */
.toggle-row { display: flex; align-items: center; justify-content: center; gap: var(--space-3);
              margin-bottom: var(--space-10); font-size: var(--fs-small); color: var(--text-muted); }
.switch { position: relative; width: 48px; height: 28px; border-radius: var(--radius-pill); flex: none;
          background: var(--surface-2); border: 1px solid var(--border-default); cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
                 border-radius: 50%; background: var(--text-secondary); transition: transform var(--dur-base) var(--ease-out), background var(--dur-base); }
.switch[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent-line); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--accent); }
.plan { display: flex; flex-direction: column; padding: clamp(28px, 2.6vw, 36px); }
.plan h3 { font-size: 1.75rem; margin-bottom: var(--space-1); }
.plan__badge { align-self: flex-start; margin: 0 0 var(--space-5); min-height: 26px; }
.plan__badge--empty { visibility: hidden; }
.plan__for { min-height: 3.2em; margin-top: var(--space-2); font-size: var(--fs-small); color: var(--text-muted); }
.price { font-family: var(--font-display); font-size: clamp(2.75rem, 2.2rem + 1.8vw, 3.75rem); font-weight: 700;
         color: var(--text-primary); line-height: 1; letter-spacing: -0.015em; font-variant-numeric: tabular-nums;
         margin: var(--space-6) 0 0; padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); }
.price small { display: block; margin-top: var(--space-3); font-family: var(--font-mono); font-size: var(--fs-micro);
               font-weight: 400; color: var(--text-muted); letter-spacing: .02em; }
.price--word { font-size: clamp(2.5rem, 2rem + 1.6vw, 3.375rem); }
.plan p[data-price-note] { margin-top: var(--space-1); font-size: var(--fs-micro); font-family: var(--font-mono); color: var(--text-faint); }
.plan ul { list-style: none; padding: 0; margin: var(--space-6) 0 var(--space-8); display: grid; gap: var(--space-3); }
.plan li { display: flex; gap: var(--space-3); font-size: var(--fs-small); line-height: 1.5; color: var(--text-secondary); margin: 0; }
.plan li::before { content: ""; flex: none; width: 10px; height: 6px; margin-top: .45em;
  border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; width: 100%; }
.plan.card--accent { background: var(--surface-2); border-color: var(--accent-line); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-xl); background: var(--surface-1); border: 1px solid var(--border-subtle);
              -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); min-width: 620px; }
th, td { text-align: left; padding: var(--space-4) var(--space-5); vertical-align: top; }
thead th { font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase;
           color: var(--text-muted); border-bottom: 1px solid var(--border-default); white-space: nowrap; }
tbody tr + tr > * { border-top: 1px solid var(--border-subtle); }
tbody th { color: var(--text-primary); font-weight: 600; }
tbody td { color: var(--text-secondary); }
tbody tr { transition: background var(--dur-fast) var(--ease-out); }
tbody tr:hover { background: var(--surface-2); }
td strong { color: var(--text-primary); }

/* ---------- FAQ ---------- */
.faq { display: grid; max-width: 880px; margin-inline: auto; border-top: 1px solid var(--border-default); }
.split .faq, .split--sticky .faq { max-width: none; }
.faq__item { border-bottom: 1px solid var(--border-subtle); }
.faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-6);
          background: none; border: 0; cursor: pointer; text-align: left; font-family: var(--font-sans);
          font-size: var(--fs-body-lg); font-weight: 600; line-height: 1.4; color: var(--text-primary);
          padding: var(--space-5) 0; min-height: 64px; }
.faq__q:hover { color: var(--accent-hover); }
.faq__q .sign { position: relative; width: 12px; height: 12px; flex: none; font-size: 0; color: var(--text-muted);
                transition: transform var(--dur-base) var(--ease-out); }
.faq__q .sign::before, .faq__q .sign::after { content: ""; position: absolute; background: currentColor; }
.faq__q .sign::before { left: 0; right: 0; top: 5.25px; height: 1.5px; }
.faq__q .sign::after { top: 0; bottom: 0; left: 5.25px; width: 1.5px; }
.faq__q[aria-expanded="true"] .sign { transform: rotate(45deg); color: var(--accent); }
.faq__a { max-height: 0; overflow: hidden; padding-right: var(--space-10);
          transition: max-height var(--dur-slow) var(--ease-out), padding var(--dur-slow) var(--ease-out); }
.faq__a[data-open="true"] { padding-bottom: var(--space-6); max-height: 640px; }
.faq__a p { font-size: var(--fs-body); color: var(--text-secondary); }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-bottom: var(--space-8); padding: 3px;
        background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); max-width: 100%; }
.tab { min-height: 38px; padding: 0 var(--space-4); border-radius: var(--radius-md);
       background: transparent; border: 1px solid transparent; cursor: pointer;
       color: var(--text-muted); font-family: var(--font-sans); font-size: var(--fs-small); font-weight: 500; }
.tab:hover { color: var(--text-primary); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--text-primary); border-color: var(--border-default); }
.tabpanel[hidden] { display: none; }

/* ---------- Timeline ---------- */
.timeline { display: grid; border-top: 1px solid var(--border-subtle); }
.timeline__item { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-8);
                  padding: var(--space-8) 0; border-bottom: 1px solid var(--border-subtle); }
.timeline__item h3 { font-size: var(--fs-h3); }
.timeline__item ul { columns: 2; column-gap: var(--space-8); font-size: var(--fs-small); margin: 0; }
.timeline__item li { break-inside: avoid; }
.timeline__when { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase;
                  color: var(--accent-2); padding-top: 8px; margin: 0; }
@media (max-width: 760px) { .timeline__item { grid-template-columns: 1fr; gap: var(--space-3); padding: var(--space-6) 0; }
  .timeline__item ul { columns: 1; } .timeline__when { padding-top: 0; } }

/* ---------- Lists / posts / jobs ---------- */
.list { display: grid; border-top: 1px solid var(--border-default); }
.list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: center;
             padding: var(--space-6) var(--space-2); border-bottom: 1px solid var(--border-subtle); text-decoration: none;
             transition: background var(--dur-fast) var(--ease-out); }
a.list-item:hover, .list-item:hover { background: var(--surface-1); }
.list-item h3 { font-size: var(--fs-h4); margin-bottom: var(--space-2); }
.list-item p { font-size: var(--fs-small); color: var(--text-muted); margin: 0; max-width: 72ch; }
.list-item p.small.muted:first-child, .list-item .meta { font-family: var(--font-mono); font-size: var(--fs-micro);
             letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2); margin-bottom: var(--space-2); }
.list-item > .badge, .list-item > .btn, .list-item > span:last-child { justify-self: end; }
@media (max-width: 620px) { .list-item { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding-inline: 0; }
  .list-item > .badge, .list-item > .btn, .list-item > span:last-child { justify-self: start; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-5); background: var(--surface-1); border: 1px solid var(--border-subtle);
        border-radius: var(--radius-2xl); padding: clamp(24px, 3vw, 40px); }
.field { display: grid; gap: var(--space-2); min-width: 0; }
.field label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-primary); letter-spacing: .01em; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: var(--fs-body); color: var(--text-primary); min-height: 48px;
  background: var(--bg-base); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); width: 100%;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.field select { appearance: none; -webkit-appearance: none; padding-right: var(--space-10);
  background-image: none; }
.field:has(select) { position: relative; }
.field:has(select)::after { content: ""; position: absolute; right: 18px; bottom: 21px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: rotate(45deg); pointer-events: none; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-strong); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.form .btn { justify-self: start; }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } .form .btn { justify-self: stretch; } }

/* ---------- Key / value ---------- */
.kv { display: grid; margin: 0; border-top: 1px solid var(--border-default); }
.kv__row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-8);
           padding: var(--space-5) 0; border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-small); }
.kv__row dt { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .05em; text-transform: uppercase;
              color: var(--accent-2); margin: 0; padding-top: 3px; }
.kv__row dd { color: var(--text-secondary); margin: 0; max-width: 64ch; }
@media (max-width: 620px) { .kv__row { grid-template-columns: 1fr; gap: var(--space-2); } }

/* ---------- Glossary / concept list (docs) ---------- */
.defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle);
        border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); overflow: hidden; }
.defs > div { background: var(--bg-base); padding: clamp(20px, 2.4vw, 32px); }
.defs > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.defs h3 { font-size: var(--fs-h4); margin-bottom: var(--space-2); }
.defs p { font-size: var(--fs-small); }
@media (max-width: 700px) { .defs { grid-template-columns: minmax(0, 1fr); } }

/* ---------- CTA finale ---------- */
.finale { position: relative; padding-block: var(--section-y) var(--section-y); }
.finale__panel { position: relative; overflow: hidden; text-align: center;
  background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-2xl);
  padding: clamp(56px, 8vw, 112px) clamp(20px, 5vw, 80px); }
.finale__panel .display { font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.75rem); margin-inline: auto; max-width: 16ch; }
.finale__panel .lead { margin-inline: auto; }
.finale__panel .btn-row { justify-content: center; }
.finale__panel .note { margin-inline: auto; margin-top: var(--space-8); font-size: var(--fs-xs); }
.finale__mark { position: absolute; right: -60px; bottom: -80px; width: 320px; height: 320px; pointer-events: none; }
.finale__mark path, .finale__mark circle { fill: none; stroke: var(--border-default); }
.finale__mark--l { left: -80px; right: auto; top: -90px; bottom: auto; width: 260px; height: 260px; }
@media (max-width: 620px) { .finale__mark { display: none; } }

/* ---------- Footer ---------- */
.footer { padding-block: clamp(56px, 6vw, 96px) var(--space-10); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: var(--space-10); }
.footer__blurb { margin-top: var(--space-5); max-width: 36ch; font-size: var(--fs-small); color: var(--text-muted); }
@media (max-width: 980px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer__grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer__grid { gap: var(--space-8) var(--space-6); } }
.footer h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em;
             color: var(--text-faint); margin-bottom: var(--space-4); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.footer li { margin: 0; }
.footer a { font-size: var(--fs-small); color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.footer a:hover { color: var(--text-primary); }
.footer .brand { color: var(--text-primary); font-size: 1.3125rem; min-height: 0; }
.footer__base { margin-top: var(--space-16); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center;
                justify-content: space-between; font-size: var(--fs-xs); color: var(--text-faint); }
.footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.motion-toggle { background: var(--surface-1); border: 1px solid var(--border-default); color: var(--text-muted);
                 border-radius: var(--radius-sm); min-height: 32px; padding: 0 var(--space-3);
                 font-family: var(--font-mono); font-size: 11px; cursor: pointer; }
.motion-toggle:hover { color: var(--text-primary); border-color: var(--border-strong); }

/* ---------- Misc ---------- */
.offscreen-heavy { content-visibility: auto; contain-intrinsic-size: 900px; }
.check-list { list-style: none; padding: 0; display: grid; gap: 0; margin-top: var(--space-6); border-top: 1px solid var(--border-subtle); }
.check-list li { margin: 0; padding: var(--space-3) 0 var(--space-3) var(--space-8); position: relative;
                 border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-small); color: var(--text-secondary); }
.check-list li::before { content: ""; position: absolute; left: 4px; top: 1.05em; width: 10px; height: 6px;
  border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }

/* ---------- 404 ---------- */
.code-404 { font-family: var(--font-mono); color: var(--accent-2); font-size: var(--fs-small); letter-spacing: .1em; }

/* ============================================================
   REDUCED MOTION — content is complete and readable with zero motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .scene, .scene--short, .scene--long { height: auto !important; }
  .scene__stage { position: static !important; height: auto !important;
                  padding-block: var(--section-y) !important; overflow: visible !important; }
  [data-reveal] { visibility: visible !important; transform: none !important; }
  .kinetic .line > span { transform: none !important; }
  .beat { grid-area: auto !important; visibility: visible !important; transform: none !important;
          pointer-events: auto !important; margin-bottom: var(--space-10); }
  .scrub__trace { stroke-dashoffset: 0 !important; }
  .viz-spin, .viz-core, .viz-ember, .viz-scan, .viz-travel, .viz__live::before { animation: none !important; }
}

/* Manual "Reduce motion" toggle mirrors the media query */
html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}
html[data-motion="reduced"] .scene { height: auto !important; }
html[data-motion="reduced"] .scene__stage { position: static !important; height: auto !important;
  padding-block: var(--section-y) !important; overflow: visible !important; }
html[data-motion="reduced"] [data-reveal] { visibility: visible !important; transform: none !important; }
html[data-motion="reduced"] .kinetic .line > span { transform: none !important; }
html[data-motion="reduced"] .beat { grid-area: auto !important; visibility: visible !important;
  transform: none !important; pointer-events: auto !important; margin-bottom: var(--space-10); }
html[data-motion="reduced"] .scrub__trace { stroke-dashoffset: 0 !important; }
html[data-motion="reduced"] .viz-spin, html[data-motion="reduced"] .viz-core, html[data-motion="reduced"] .viz-ember,
html[data-motion="reduced"] .viz-scan, html[data-motion="reduced"] .viz-travel { animation: none !important; }


/* With motion off every beat is shown; the visual rides beside them. */
@media (prefers-reduced-motion: reduce) {
  .scene .split { align-items: start; }
  .scene .split > :last-child { position: sticky; top: calc(var(--nav-h) + 32px); }
}
html[data-motion="reduced"] .scene .split, html:not(.js) .scene .split { align-items: start; }
html[data-motion="reduced"] .scene .split > :last-child,
html:not(.js) .scene .split > :last-child { position: sticky; top: calc(var(--nav-h) + 32px); }
@media (max-width: 900px) { .scene .split > :last-child { position: static !important; } }

@media print {
  .nav, .chapters, .progress, .mobile-menu { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ============================================================
   NO-JS FALLBACK — every scene renders in its final, readable state
   ============================================================ */
html:not(.js) .scene, html:not(.js) .scene--short, html:not(.js) .scene--long { height: auto !important; }
html:not(.js) .scene__stage { position: static !important; height: auto !important;
  padding-block: var(--section-y) !important; overflow: visible !important; }
html:not(.js) [data-reveal] { visibility: visible !important; transform: none !important; }
html:not(.js) .kinetic .line > span { transform: none !important; }
html:not(.js) .beat { grid-area: auto !important; visibility: visible !important; transform: none !important;
  pointer-events: auto !important; margin-bottom: var(--space-10); }
html:not(.js) .scrub__trace { stroke-dashoffset: 0 !important; }
html:not(.js) .chapters { display: none !important; }
html:not(.js) .faq__a { max-height: none !important; padding-bottom: var(--space-6); }
html:not(.js) .tabpanel[hidden] { display: block !important; }
