/* AutoSight: driver attention intelligence.
   Layout: graphite "night" bands for product and system visuals, warm paper bands for explanation,
   on a 1200px / 12-column measure. Fine technical lines, one restrained signal color. */
:root {
  /* Brand: navy night from the AutoSight mark, cyan-to-blue signal, cool paper for explanation bands. */
  --ink: #020C1F;
  --ink-2: #071630;
  --ink-3: #0D2040;
  --line: #1A2D4D;
  --paper: #F2F5F9;
  --paper-2: #E4EAF2;
  --slate: #4A5A72;
  --fog: #9DB0C8;
  --signal: #19C8FF;   /* brand cyan: CTAs, lines, focus on dark */
  --deep: #0148FD;     /* brand blue: accents on light */
  --ok: #2BD47D;       /* attentive */
  --warn: #FFC72C;     /* transitioning */
  --bad: #FF5A4E;      /* distracted */
  --unk: #8C9AB0;      /* low confidence */

  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-logo: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 14px;
  --measure: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 17px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
@media (min-width: 900px) { body { font-size: 18px; } }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); font-stretch: 78%; margin: 0; text-wrap: balance; letter-spacing: -0.015em; line-height: 1.02; }
h1 { font-size: clamp(2.9rem, 6.8vw, 5.6rem); font-weight: 700; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); font-weight: 700; max-width: 20ch; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }
.band { padding-block: var(--section); }
.dark { background: var(--ink); color: var(--paper); }
.dark-2 { background: var(--ink-2); color: var(--paper); }
.light { background: var(--paper); color: var(--ink); color-scheme: light; }
.light-2 { background: var(--paper-2); color: var(--ink); color-scheme: light; }
.muted { color: var(--fog); }
.light .muted, .light-2 .muted { color: var(--slate); }
.lede { font-size: 1.15em; max-width: 60ch; color: var(--fog); }
.light .lede, .light-2 .lede { color: var(--slate); }
.mono { font-family: var(--font-mono); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 6px; }
.light :focus-visible, .light-2 :focus-visible { outline-color: var(--ink); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--signal); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* labels */
.eyebrow { display: block; font: 500 0.82rem var(--font-mono); letter-spacing: 0.04em; color: var(--fog); margin-bottom: 18px; }
.eyebrow::before { content: none; }
.light .eyebrow, .light-2 .eyebrow { color: var(--slate); }

.head { display: grid; gap: 18px; margin-bottom: clamp(40px, 5vw, 64px); }
.head .eyebrow { margin-bottom: 0; }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 600 0.66rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.tag.now { color: var(--ok); }
.tag.next { color: var(--fog); }
.light .tag.now, .light-2 .tag.now { color: var(--ink); background: var(--ok); border-color: var(--ok); }
.light .tag.next, .light-2 .tag.next { color: var(--slate); }
sup a { font: 600 0.7em var(--font-mono); text-decoration: none; padding-inline: 1px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: transform 200ms ease-out, border-color 200ms ease-out; }
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 18px; height: 18px; }
.btn-signal { background: linear-gradient(135deg, #00DBFE, var(--signal) 45%, #2E8BFF); color: var(--ink); }
.btn-line { border-color: var(--line); color: var(--paper); background: transparent; }
.btn-line:hover { border-color: var(--fog); }
.btn-ink { background: var(--ink); color: var(--paper); }
.light .btn-line, .light-2 .btn-line { border-color: var(--slate); color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--ink) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color 200ms ease-out; }
.site-header.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: inline-flex; align-items: flex-end; gap: 1px; text-decoration: none; font: 800 1.42rem/1 var(--font-logo); letter-spacing: -0.02em; color: var(--paper); min-height: 44px; padding-block: 10px; }
.logo svg { width: 36px; height: 22px; flex: none; margin-bottom: 1px; }
.nav { display: none; gap: 2px; margin-left: auto; }
.nav a { padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--fog); font-weight: 700; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--signal); border-radius: 0; }
.bar .btn { min-height: 42px; padding: 10px 18px; font-size: 0.95rem; }
.menu-btn { margin-left: auto; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--paper); cursor: pointer; }
@media (min-width: 1040px) { .nav { display: flex; } .menu-btn { display: none; } }
@media (max-width: 1039px) { .bar > .btn { display: none; } }
.menu { position: fixed; inset: 0; z-index: 60; background: var(--ink); padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gutter) 32px; display: flex; flex-direction: column; overflow-y: auto; }
.menu-top { display: flex; align-items: center; justify-content: space-between; min-height: 54px; }
.menu nav { display: grid; margin-top: 20px; }
.menu nav a { padding-block: 18px; border-bottom: 1px solid var(--line); text-decoration: none; font: 700 1.8rem var(--font-head); font-stretch: 78%; }
.menu .btn { margin-top: 28px; width: 100%; }

/* hero */
.hero { padding-block: clamp(40px, 6vw, 96px) clamp(64px, 8vw, 112px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--ink-3) 1px, transparent 1px), linear-gradient(90deg, var(--ink-3) 1px, transparent 1px);
  background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 65%); mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 65%); }
.hero-grid { position: relative; display: grid; gap: 56px; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 0.95fr 1.05fr; gap: 48px; } }
.hero-copy { display: grid; gap: 26px; min-width: 0; }
.hero h1 span { display: block; color: var(--fog); }
.status-line { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 500 0.82rem var(--font-mono); color: var(--fog); }
.status-line i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: 1px; }

/* instrument card (hero + product) */
.instrument { min-width: 0; background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 100px -50px #000; }
.inst-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 500 0.68rem var(--font-mono); letter-spacing: 0.12em; color: var(--fog); }
.inst-bar button { font: inherit; letter-spacing: inherit; color: var(--paper); background: transparent; border: 1px solid var(--line); border-radius: 6px; min-height: 32px; padding: 4px 10px; cursor: pointer; }
.inst-body { display: grid; }
@media (min-width: 640px) { .inst-body { grid-template-columns: 1.25fr 1fr; } }
.cabin { position: relative; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .cabin { border-bottom: 0; border-right: 1px solid var(--line); } }
.cabin svg { display: block; width: 100%; height: auto; }
.cabin .d { fill: var(--paper); opacity: 0.8; }
.cabin .iris { fill: var(--paper); }
.zone circle { fill: none; stroke: #3A5275; stroke-width: 2.5; }
.zone text { font: 600 21px var(--font-mono); letter-spacing: 0.08em; fill: var(--fog); }
.zone.on circle { stroke: var(--ok); stroke-width: 3.5; }
.zone.on text { fill: var(--paper); }
.gaze { stroke: var(--ok); stroke-width: 2.4; stroke-dasharray: 7 8; }
.headaxis { stroke: var(--signal); stroke-width: 3.5; stroke-linecap: round; }
.fbox { fill: none; stroke: var(--fog); stroke-width: 1.4; opacity: 0.7; }
.readout { padding: 16px; display: grid; gap: 16px; align-content: start; }
.lab { font: 600 0.64rem var(--font-mono); letter-spacing: 0.12em; color: var(--fog); text-transform: uppercase; }
.state { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid currentColor; font: 600 0.78rem var(--font-mono); letter-spacing: 0.08em; justify-self: start; transition: color 250ms ease-out; }
.state i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
[data-s="attentive"] { color: var(--ok); }
[data-s="transitioning"] { color: var(--warn); }
[data-s="distracted"] { color: var(--bad); }
[data-s="low"] { color: var(--unk); }
.note { font-size: 0.86rem; color: var(--fog); min-height: 2.8em; }
.conf { display: grid; gap: 10px; }
.conf-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 0.86rem; }
.conf-row b { font: 600 0.8rem var(--font-mono); font-variant-numeric: tabular-nums; }
.meter { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: var(--ink-3); overflow: hidden; }
.meter span { display: block; height: 100%; width: 90%; background: var(--fog); border-radius: 5px; transition: width 300ms ease-out, background-color 300ms ease-out; }
.meter span.lowc { background: var(--unk); }
.strip { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.track { position: relative; height: 22px; border-radius: 6px; background: var(--ink-3); overflow: hidden; }
.track .seg { position: absolute; top: 0; bottom: 0; }
.track .seg.road { background: color-mix(in srgb, var(--ok) 55%, var(--ink-3)); }
.track .seg.mirror { background: color-mix(in srgb, var(--ok) 30%, var(--ink-3)); }
.track .seg.down { background: color-mix(in srgb, var(--warn) 70%, var(--ink-3)); }
.track .seg.down.bad { background: color-mix(in srgb, var(--bad) 75%, var(--ink-3)); }
.track .head { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--paper); }
.track-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 0.66rem var(--font-mono); letter-spacing: 0.08em; color: var(--fog); }
.track-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.inst-cap { padding: 10px 16px 12px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--fog); }
.alert { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, -6px); opacity: 0; padding: 7px 12px; border-radius: 10px; background: var(--ink); border: 1px solid var(--bad); color: var(--paper); font: 600 0.8rem var(--font-mono); letter-spacing: 0.06em; white-space: nowrap; transition: opacity 250ms ease-out, transform 250ms ease-out; display: inline-flex; gap: 8px; align-items: center; }
.alert.show { opacity: 1; transform: translate(-50%, 0); }
.alert .icon { width: 15px; height: 15px; color: var(--bad); }

/* generic grids */
.g2 { display: grid; gap: clamp(28px, 4vw, 48px); }
@media (min-width: 880px) { .g2 { grid-template-columns: 1fr 1fr; } .g2.split { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }
.g3 { display: grid; gap: 24px; }
@media (min-width: 880px) { .g3 { grid-template-columns: repeat(3, 1fr); } }
.g4 { display: grid; gap: 24px; }
@media (min-width: 640px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .g4 { grid-template-columns: repeat(4, 1fr); } }
.cell { display: grid; gap: 10px; align-content: start; padding-top: 22px; border-top: 1px solid var(--line); }
.light .cell, .light-2 .cell { border-top-color: color-mix(in srgb, var(--slate) 45%, transparent); }
.cell p { color: var(--fog); }
.light .cell p, .light-2 .cell p { color: var(--slate); }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 12px; align-content: start; }
.card p { color: var(--fog); }
.card .icon { color: var(--signal); width: 26px; height: 26px; }
.card h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* stats */
.stats { display: grid; gap: 24px; }
@media (min-width: 880px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { display: grid; gap: 10px; align-content: start; padding-top: 22px; border-top: 2px solid var(--ink); }
.stat-num { font: 600 clamp(2.4rem, 4.4vw, 3.4rem)/1 var(--font-mono); letter-spacing: -0.03em; }
.stat p { color: var(--slate); }

/* misread list (looking forward != paying attention) */
.misreads { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid color-mix(in srgb, var(--slate) 45%, transparent); }
.misreads li { display: grid; grid-template-columns: 2.2em 1fr; gap: 12px; padding-block: 16px; border-bottom: 1px solid color-mix(in srgb, var(--slate) 45%, transparent); }
.misreads span { font: 600 0.8rem var(--font-mono); color: var(--slate); padding-top: 3px; }

/* pipeline */
.pipe { display: grid; gap: 14px; }
@media (min-width: 960px) { .pipe { grid-template-columns: repeat(4, 1fr); gap: 0; } }
.stage { position: relative; padding: 24px; border: 1px solid var(--line); background: var(--ink-2); display: grid; gap: 14px; align-content: start; }
@media (min-width: 960px) { .stage { border-radius: 0; } .stage:first-child { border-radius: var(--radius) 0 0 var(--radius); } .stage:last-child { border-radius: 0 var(--radius) var(--radius) 0; } .stage + .stage { border-left: 0; } }
@media (max-width: 959px) { .stage { border-radius: var(--radius); } }
.stage .lab { color: var(--signal); }
.stage h3 { font-size: 1.15rem; }
.stage ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.95rem; color: var(--fog); }
.stage ul.states li { display: flex; align-items: center; gap: 10px; font: 600 0.78rem var(--font-mono); letter-spacing: 0.08em; }
.stage ul.states li i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.stage .arrow { position: absolute; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); border: 1px solid var(--line); color: var(--signal); }
@media (min-width: 960px) { .stage .arrow { right: -14px; top: 50%; transform: translateY(-50%); } }
@media (max-width: 959px) { .stage .arrow { left: 50%; bottom: -21px; transform: translateX(-50%) rotate(90deg); } }
.stage .arrow .icon { width: 14px; height: 14px; }

/* flow comparison */
.flows { display: grid; gap: 24px; }
@media (min-width: 880px) { .flows { grid-template-columns: 1fr 1fr; } }
.flow { border-radius: var(--radius); padding: 28px; display: grid; gap: 16px; align-content: start; }
.flow.naive { border: 1px dashed color-mix(in srgb, var(--slate) 60%, transparent); }
.flow.as { background: var(--ink); color: var(--paper); }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.flow li { padding: 11px 14px; border-radius: 10px; font: 600 0.8rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; text-align: center; }
.flow.naive li { background: var(--paper); }
.flow.as li { background: var(--ink-2); border: 1px solid var(--line); }
.flow li + li { margin-top: 26px; position: relative; }
.flow li + li::before { content: ""; position: absolute; left: 50%; top: -22px; height: 18px; border-left: 2px dashed currentColor; opacity: 0.5; }
.flow .verdict { font-size: 0.95rem; }
.flow.naive .verdict { color: var(--slate); }
.flow.as .verdict { color: var(--fog); }

/* confidence demo */
.seg-ctrl { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); }
.seg-ctrl button { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 0; background: transparent; color: var(--fog); font: 700 0.9rem var(--font-body); cursor: pointer; }
.seg-ctrl button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.confdemo { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 880px) { .confdemo { grid-template-columns: 1fr 1fr; } }
.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 16px; align-content: start; }
.panel .conf-row { font-size: 0.95rem; }
.weights { display: grid; gap: 10px; }
.weights .meter span { background: var(--signal); }
.verdict-line { font: 600 1.05rem var(--font-head); letter-spacing: -0.01em; }
.verdict-line.lowc { color: var(--unk); }

/* temporal */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 4.5em 7.5em 1fr; gap: 14px; align-items: baseline; padding-block: 14px; border-bottom: 1px solid color-mix(in srgb, var(--slate) 40%, transparent); }
.timeline .t { font: 600 0.9rem var(--font-mono); font-variant-numeric: tabular-nums; }
.timeline .z { font: 600 0.78rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; justify-self: start; }
.timeline .z.road { background: var(--ok); color: var(--ink); }
.timeline .z.mirror { background: var(--paper-2); color: var(--ink); border: 1px solid var(--slate); }
.timeline .z.down { background: var(--warn); color: var(--ink); }
.timeline .z.down.bad { background: var(--bad); color: var(--ink); }
.timeline .m { color: var(--slate); font-size: 0.95rem; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 4em 1fr; } .timeline .m { grid-column: 1 / -1; } }

/* layers */
.layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.layer { display: grid; gap: 10px 28px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); }
@media (min-width: 880px) { .layer { grid-template-columns: 220px 1fr auto; align-items: start; } }
.layer .n { font: 600 0.75rem var(--font-mono); letter-spacing: 0.1em; color: var(--signal); }
.layer h3 { margin-top: 6px; }
.layer p { color: var(--fog); }
.layer .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.layer .chips span { font: 500 0.72rem var(--font-mono); letter-spacing: 0.04em; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--fog); }

/* edge cases */
.edges { display: grid; gap: 20px; }
@media (min-width: 880px) { .edges { grid-template-columns: 1fr 1fr; } }
.edge { padding: 26px; border-radius: var(--radius); background: var(--paper); display: grid; gap: 12px; align-content: start; }
.edge p { color: var(--slate); }
.edge .q { font: 600 0.9rem var(--font-mono); }

/* compare table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.compare { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.98rem; }
.compare th, .compare td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font: 600 0.72rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fog); background: var(--ink-2); }
.compare tbody th { font-weight: 700; width: 22%; }
.compare td:last-child { color: var(--paper); }
.compare td { color: var(--fog); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

/* phones (product) */
.phones { display: grid; gap: 32px; }
@media (min-width: 760px) { .phones { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .phones { grid-template-columns: repeat(4, 1fr); } }
.phone-item { display: grid; gap: 14px; align-content: start; justify-items: start; }
.mini { width: 220px; max-width: 100%; aspect-ratio: 9 / 17; border-radius: 32px; background: var(--ink-3); border: 1px solid var(--line); padding: 8px; }
.scr { position: relative; height: 100%; border-radius: 25px; background: var(--ink); overflow: hidden; padding: 34px 14px 14px; display: flex; flex-direction: column; gap: 12px; color: var(--paper); }
.scr::before { content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 34%; height: 12px; border-radius: 10px; background: var(--ink-3); }
.scr .ex { position: absolute; top: 22px; right: 14px; font: 500 0.5rem var(--font-mono); letter-spacing: 0.08em; color: var(--fog); }
.scr .state { font-size: 0.62rem; padding: 4px 9px; align-self: center; }
.scr .face { width: 100%; height: auto; }
.scr .face .d { fill: var(--paper); opacity: 0.8; }
.scr .face .iris { fill: var(--paper); }
.ring { fill: none; stroke-width: 2; }
.sum { display: grid; gap: 12px; }
.sum .big { font: 600 2.6rem/1 var(--font-mono); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv b { display: block; font: 600 0.82rem var(--font-mono); }
.tl { position: relative; height: 10px; border-radius: 5px; background: var(--line); }
.tl i { position: absolute; top: -3px; width: 3px; height: 16px; border-radius: 2px; background: var(--bad); }
.fam-row { display: flex; justify-content: space-between; gap: 8px; padding-block: 8px; border-bottom: 1px solid var(--line); font-size: 0.72rem; }
.fam-row b { font-family: var(--font-mono); }
.confmini { display: grid; gap: 8px; font-size: 0.7rem; }

/* calculator */
.calc { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; }
.calc label { font: 600 0.78rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fog); }
.calc-out { font-size: 1.3rem; line-height: 1.35; }
.calc-out b { font-family: var(--font-mono); color: var(--signal); font-weight: 600; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: var(--line); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 8px; background: var(--line); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: var(--signal); border: 3px solid var(--ink); }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--signal); border: 3px solid var(--ink); }
.dist { height: 28px; border-radius: 8px; background: var(--ink-2); border: 1px solid var(--line); overflow: hidden; }
.dist-fill { height: 100%; width: 60%; background: repeating-linear-gradient(90deg, var(--signal) 0 18px, transparent 18px 30px) left center / 100% 4px no-repeat; transition: width 250ms ease-out; }
.dist-scale { display: flex; justify-content: space-between; font: 500 0.75rem var(--font-mono); color: var(--fog); }

/* ledger */
.ledger { border-radius: var(--radius); border: 1px solid var(--line); display: grid; }
@media (min-width: 820px) { .ledger { grid-template-columns: 1fr 1fr; } }
.ledger > div { padding: 26px; }
.ledger > div + div { border-top: 1px dashed var(--line); }
@media (min-width: 820px) { .ledger > div + div { border-top: 0; border-left: 1px dashed var(--line); } }
.ledger ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.ledger li { display: flex; gap: 12px; }
.ledger .yes .icon { color: var(--ok); }
.ledger .no .icon { color: var(--bad); }
.ledger .no li { color: var(--fog); }

/* forms */
.formbox { background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 4vw, 40px); }
form.js-form { display: grid; gap: 16px; }
.fields { display: grid; gap: 16px; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } .fields .full { grid-column: 1 / -1; } }
.field { display: grid; gap: 7px; min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: 0.93rem; }
.opt { font-weight: 400; color: var(--fog); }
input[type="text"], input[type="email"], select, textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; font: 400 1rem var(--font-body); background: var(--ink); color: var(--paper); border: 1px solid #59616D; }
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--fog); }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--signal); flex: none; }
.form-msg { display: flex; gap: 10px; font-weight: 700; }
.form-msg .icon { width: 20px; height: 20px; margin-top: 2px; }
.form-msg[data-tone="ok"] .icon { color: var(--ok); }
.form-msg[data-tone="err"] .icon { color: var(--bad); }
.form-note { font-size: 0.88rem; color: var(--fog); }
.form-note a { color: var(--paper); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* faq */
.faq { max-width: 880px; border-top: 1px solid color-mix(in srgb, var(--slate) 45%, transparent); }
.faq h3 { font: inherit; letter-spacing: 0; }
.faq button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; text-align: left; background: none; border: 0; padding: 20px 0; min-height: 64px; font: 700 1.08rem/1.35 var(--font-body); color: var(--ink); cursor: pointer; }
.faq button .icon { color: var(--slate); transition: transform 250ms ease-out; }
.faq button[aria-expanded="true"] .icon { transform: rotate(180deg); }
.faq .item { border-bottom: 1px solid color-mix(in srgb, var(--slate) 45%, transparent); }
.faq .ans { padding-bottom: 22px; max-width: 66ch; color: var(--slate); }

/* prose (privacy policy, about) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin: 44px 0 12px; max-width: none; }
.prose h3 { font-size: 1.1rem; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--slate); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; margin: 10px 0; }
.prose a { color: var(--deep); font-weight: 700; }
.dark .prose p, .dark .prose li { color: var(--fog); }

/* closing cta */
.closing { display: grid; gap: 22px; justify-items: start; }
.closing h2 { max-width: 18ch; }

/* footer */
.site-footer { background: var(--ink); border-top: 1px solid var(--line); padding-block: 56px calc(44px + env(safe-area-inset-bottom, 0px)); font-size: 0.95rem; color: var(--fog); }
.foot { display: grid; gap: 32px; }
@media (min-width: 900px) { .foot { grid-template-columns: 1.2fr 2fr; } }
.foot-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (min-width: 640px) { .foot-cols { grid-template-columns: repeat(3, 1fr); } }
.foot-cols h2 { font: 600 0.72rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper); margin-bottom: 10px; max-width: none; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-cols a { text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.foot-cols a:hover { color: var(--paper); text-decoration: underline; }
.sources { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.sources h2 { font: 600 0.72rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; max-width: none; }
.sources ol { margin: 0; padding-left: 1.5em; display: grid; gap: 8px; font-size: 0.86rem; }
.sources a { overflow-wrap: anywhere; }
.legal { margin-top: 28px; display: grid; gap: 8px; font-size: 0.86rem; max-width: 90ch; }

/* ---------- scroll story (home) ---------- */
.story { position: relative; height: 680vh; background: var(--ink); }
.story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; }
@media (min-width: 1000px) { .story-stage { grid-template-columns: minmax(380px, 0.8fr) 1.2fr; align-items: center; } }
@media (max-width: 999px) { .story-stage { grid-template-rows: 50% 50%; } .story-scene { padding: 64px 6px 0; } .story-scene svg { max-height: 44svh; } .story-copy { overflow: hidden; } .story-step { gap: 10px; } .story-step p { font-size: 0.98em; } .story-step .cta-row .btn { min-height: 44px; padding: 10px 16px; } .scroll-cue { display: none !important; } }
.story-scene { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; padding: 72px 12px 0; }
@media (min-width: 1000px) { .story-scene { order: 2; padding: 64px 32px 0 0; } }
.story-scene svg { width: 100%; height: 100%; max-height: 78vh; }
.story-copy { position: relative; padding: 0 var(--gutter) 28px; min-height: 230px; }
@media (min-width: 1000px) { .story-copy { order: 1; padding: 0 0 0 max(var(--gutter), calc((100vw - var(--measure)) / 2 + var(--gutter))); min-height: 360px; } }
.story-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.story-step { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(10px); transition: opacity 140ms ease-in, transform 140ms ease-in; pointer-events: none; display: grid; gap: 16px; }
.story-step.on { opacity: 1; transform: none; pointer-events: auto; transition: opacity 420ms ease-out 160ms, transform 420ms ease-out 160ms; }
.story-step .k { font: 500 0.82rem var(--font-mono); letter-spacing: 0.04em; color: var(--signal); }
.story-step h1, .story-step h2 { font-size: clamp(1.7rem, 3.6vw, 3.2rem); max-width: 15ch; }
.story-step:first-child h1 { font-size: clamp(2.1rem, 3.7vw, 3.5rem); max-width: 17ch; }
.story-step p { color: var(--fog); max-width: 46ch; font-size: 1.08em; }
.story-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink-3); }
.story-progress span { display: block; height: 100%; width: 0; background: var(--signal); }
.scroll-cue { font: 500 0.8rem var(--font-mono); letter-spacing: 0.02em; color: var(--fog); display: flex; gap: 10px; align-items: center; }
.scroll-cue i { width: 1px; height: 28px; background: linear-gradient(var(--signal), transparent); }

/* scene layers */
.sc .ln { fill: none; stroke: #3B5578; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc .body { fill: #0E2245; stroke: #46648F; stroke-width: 2; stroke-linejoin: round; }
.sc .skin { fill: #16305A; stroke: #5C7FB0; stroke-width: 2; }
.sc .road { stroke: #2A4166; stroke-width: 2; }
.sc .dash { stroke: var(--signal); stroke-width: 3; stroke-dasharray: 26 30; animation: drive 1.6s linear infinite; }
@keyframes drive { to { stroke-dashoffset: -56; } }
.sc .cam { fill: #0B1B36; stroke: var(--signal); stroke-width: 2; }
.sc .lens { fill: var(--signal); }
.sc text { font: 600 15px var(--font-mono); letter-spacing: 0.08em; fill: var(--paper); }
.sc .tlab { fill: var(--fog); font-size: 13px; }
.sc .L { opacity: 0; transition: opacity 500ms ease-out; }
.sc .fov { fill: color-mix(in srgb, var(--signal) 12%, transparent); stroke: var(--signal); stroke-width: 1.5; stroke-dasharray: 5 6; }
.sc .headray { stroke: var(--ok); stroke-width: 3; stroke-dasharray: 10 8; }
.sc .gazeray { stroke: var(--bad); stroke-width: 3; }
.sc .phone { fill: #0B1B36; stroke: #7FA3D6; stroke-width: 2; }
.sc .screen { fill: var(--signal); }
.sc .glow { fill: url(#screenglow); }
.sc .cue { fill: none; stroke: var(--warn); stroke-width: 2.5; }
.sc .shades { fill: #050B16; stroke: #7FA3D6; stroke-width: 2; }
.sc .eye { fill: var(--paper); }
.sc .tl-bg { fill: var(--ink-3); }
.sc .tl-fill { fill: var(--warn); }
.sc .tl-fill.bad { fill: var(--bad); }
.sc .chip { fill: var(--ink-2); stroke: currentColor; stroke-width: 2; }
.arm-lap { opacity: 0; transition: opacity 500ms ease-out; }
.arm-wheel { transition: opacity 500ms ease-out; }
[data-stage="1"] .s1, [data-stage="2"] .s1, [data-stage="2"] .s2,
[data-stage="3"] .s1, [data-stage="3"] .s2, [data-stage="3"] .s3,
[data-stage="4"] .s3, [data-stage="4"] .s5,
[data-stage="5"] .s3, [data-stage="5"] .s5, [data-stage="5"] .s6 { opacity: 1; }
[data-stage="3"] .arm-wheel, [data-stage="4"] .arm-wheel, [data-stage="5"] .arm-wheel { opacity: 0; }
[data-stage="3"] .arm-lap, [data-stage="4"] .arm-lap, [data-stage="5"] .arm-lap { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .story-step, .sc .L, .arm-lap, .arm-wheel { transition: none; } .sc .dash { animation: none; } }

/* comparison */
.vs-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.vs { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 0.95rem; }
.vs th, .vs td { padding: 14px 14px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.vs thead th { font: 600 0.72rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fog); background: var(--ink-2); line-height: 1.35; }
.vs tbody th { text-align: left; font-weight: 700; color: var(--paper); }
.vs .as { background: color-mix(in srgb, var(--signal) 9%, var(--ink)); }
.vs thead .as { color: var(--signal); }
.vs td { color: var(--fog); font: 600 0.8rem var(--font-mono); letter-spacing: 0.04em; }
.vs .y { color: var(--ok); }
.vs .p { color: var(--warn); }
.vs tr:last-child th, .vs tr:last-child td { border-bottom: 0; }
.vs-note { margin-top: 14px; font-size: 0.85rem; color: var(--fog); }

/* signals grid */
.signals { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 700px) { .signals { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .signals { grid-template-columns: repeat(4, 1fr); } }
.sig { background: var(--ink-2); padding: 24px; display: grid; gap: 10px; align-content: start; }
.sig .icon { color: var(--signal); }
.sig p { color: var(--fog); font-size: 0.95rem; }
.sig .src { font: 600 0.68rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal); }

@media (min-width: 960px) { .pipe5 { grid-template-columns: repeat(5, 1fr); } }
.sc #sc-chip text { fill: currentColor; }
.sc .num { font-size: 13px; fill: var(--ink); }
.sc .numdot { fill: var(--warn); }

.sources-inline { margin-top: 28px; font-size: 0.82rem; color: var(--slate); display: flex; flex-wrap: wrap; gap: 4px 18px; }
.sources-inline a { color: var(--slate); }
.plain-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plain-list li { display: grid; gap: 6px 32px; padding-block: 22px; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .plain-list li { grid-template-columns: 260px 1fr; align-items: baseline; } }
.plain-list h3 { font-size: 1.5rem; }
.plain-list p { color: var(--fog); }
.story .sc svg, .story-scene svg { overflow: hidden; }
