/* ApkiAwaz: editorial research lab meets Indian telephone interface. Light theme only.
   Palette: warm paper, soft ink, one muted sage accent.
   Shapes: 4px everywhere (panels, buttons, tags); rules instead of cards; no shadows. */

@font-face { font-family: "Geist"; src: url(fonts/geist.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(fonts/geist-mono.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Sans Devanagari"; src: url(fonts/noto-deva.woff2) format("woff2"); font-weight: 100 900;
  font-display: swap; unicode-range: U+0900-097F, U+200C-200D, U+25CC; }

[hidden] { display: none !important; } /* class display rules (.ai-badge inline-flex) were overriding it */

:root {
  --paper: #FBFAF6; --band: #F1F2EB; --card: #FFFEFB; --ink: #343831; --ink-2: #555A50; --muted: #6E7169; --line: #E1DED4;
  --signal: #6C7D63; --signal-tint: #EFF1EA; --signal-on-ink: #6C7D63;
  --pass: #6C7D63; --pass-tint: #EFF1EA; --action: #6C7D63; --action-hover: #596B52;
  --sans: "Geist", "Noto Sans Devanagari", system-ui, sans-serif;
  --mono: "Geist Mono", "Noto Sans Devanagari", ui-monospace, monospace;
  --deva: "Noto Sans Devanagari", var(--sans);
  --r: 4px; --ease: cubic-bezier(.16, 1, .3, 1); --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.025em; line-height: 1.06; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.4vw, 54px); max-width: 17ch; }
h3 { font-size: 18px; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
[lang="hi"] { line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 14px; background: var(--ink); color: var(--paper);
  border-radius: var(--r); text-decoration: none; font-size: 15px; }
.skip:focus { top: 12px; }

.body { margin-top: 20px; max-width: 60ch; color: var(--muted); font-size: 18px; }
.foot { margin-top: 28px; max-width: 72ch; color: var(--muted); font-size: 14px; }
.fig { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tag { display: inline-block; font: 400 13px/1.2 var(--sans); color: var(--muted); vertical-align: 1px; }
.ai-badge { display: inline-flex; align-items: center; font: 500 13px/1.2 var(--sans); color: var(--muted); background: transparent; padding: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px;
  border-radius: var(--r); border: 1px solid transparent; font: 500 16px/1 var(--sans); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s; }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 15px; }
.btn-ink { background: var(--action); color: #fff; }
.btn-ink:hover { background: var(--action-hover); }
.btn-ink:disabled { background: var(--muted); cursor: progress; }
.btn-line { border-color: var(--line); background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--band); color: var(--ink); }
.btn-line:disabled { border-color: var(--line); color: var(--muted); background: transparent; cursor: progress; }
.btn-wide { width: 100%; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 32px; height: 64px; padding: 0 32px;
  background: rgb(243 239 231 / .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent;
  transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; text-decoration: none; letter-spacing: -.02em; }
.mark { width: 28px; height: 28px; }
.mark rect { fill: var(--action); }
.mark path { fill: none; stroke: var(--paper); stroke-width: 2.2; stroke-linecap: round; }
.nav nav { display: flex; gap: 26px; margin-left: auto; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .2s; }
.nav nav a .mono { font-size: 12px; margin-right: 2px; }
.nav nav a:hover { color: var(--ink); }

/* Sections: a numbered margin column, then the content */
main > section { max-width: var(--wrap); margin: 0 auto; padding: 120px 32px; }
.sec { display: grid; grid-template-columns: 180px 1fr; gap: 0 40px; }
.sec-head { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 2px solid var(--ink); align-self: start; }
.sec-n { font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.sec-k { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sec-main { min-width: 0; padding-top: 2px; }
.sec-band { max-width: none !important; background: var(--band); border-block: 1px solid var(--line);
  padding-inline: max(32px, calc((100% - var(--wrap)) / 2 + 32px)) !important; }

/* Hero */
.hero { display: grid; grid-template-columns: .78fr 1.22fr; gap: 36px; align-items: center; min-height: calc(100svh - 64px);
  padding-top: 32px !important; padding-bottom: 32px !important; }
.hero-copy { position: static; }
.kicker { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero h1 { margin-top: 18px; font-size: clamp(40px, 4.6vw, 64px); letter-spacing: -.035em; max-width: 13ch; }
.hero h1 .soft { color: var(--muted); }
.lede { margin-top: 18px; max-width: 36ch; font-size: 18px; color: var(--ink-2); }
.ctas { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* Compact call simulation: source, parallel checks, result. */
.call { min-width: 0; margin: 0; background: transparent; border: 0; }
.call-panel { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--action); border-radius: 0 0 var(--r) var(--r); }
.call-bar { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.call-line { flex: 1; }
.sim-audio-status { font-size: 12px; color: var(--muted); }
.call-panel [hidden] { display: none !important; }
.replay { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--ink);
  font: 400 13px var(--sans); cursor: pointer; }
.replay:hover { background: var(--band); color: var(--ink); }
.sim-source { display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); align-items: center; gap: 12px; padding: 26px 22px 0; }
.call-panel.is-bank-speaking .sim-source { grid-template-columns: minmax(0, min(560px, 100%)); justify-content: center; padding-block: 20px; }
.call-panel.is-bank-speaking .sim-node { min-height: 118px; text-align: center; justify-items: center; }
.sim-node { min-width: 0; min-height: 140px; display: grid; align-content: center; gap: 8px; padding: 18px 18px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.sim-label { font-size: 12px; color: var(--muted); }
.sim-digits { font-size: 25px; letter-spacing: .04em; color: var(--ink); }
.sim-hindi { font-size: 13px; color: var(--muted); }
.sim-arrow { color: var(--muted); text-align: center; font-size: 20px; }
.sim-caller { gap: 4px; }
.sim-caption { font-size: 13px; color: var(--muted); }
.wave { display: block; width: 100%; height: 48px; }
.wave rect { fill: var(--signal); }
.sim-bus { height: 42px; position: relative; margin: 0 16.66%; }
.sim-bus::before { content: ""; position: absolute; top: 20px; left: 0; right: 0; border-top: 1px solid var(--line); }
.sim-bus::after { content: ""; position: absolute; top: 0; left: 50%; height: 21px; border-left: 1px solid var(--line); }
.sim-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0 18px; }
.sim-check { position: relative; min-width: 0; min-height: 90px; display: grid; align-content: center; gap: 7px; padding: 14px 14px;
  border: 1px solid var(--line); border-top: 2px solid var(--action); border-radius: var(--r); background: var(--card); }
.sim-check::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: 21px; border-left: 1px solid var(--line); }
.sim-check span { font-size: 13px; color: var(--muted); }
.sim-check strong { font-size: 16px; font-weight: 600; color: var(--ink); }
.sim-check[data-state="flag"] { border-top-color: var(--ink-2); }
.sim-result { position: relative; display: flex; align-items: baseline; justify-content: center; gap: 16px; margin: 22px 22px 22px; padding: 16px 16px;
  border-left: 2px solid var(--action); background: var(--band); }
.sim-result span { font-size: 12px; color: var(--muted); }
.sim-result strong { font-size: 15px; font-weight: 600; }
.call figcaption { margin: 10px 4px 0; padding: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }

/* 1. Finding */
.stats-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 40px; margin-top: 56px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--ink); }
.stats div { padding: 24px 24px 0 0; }
.stats div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: 15px; max-width: 22ch; min-height: 3.2em; }
.stats dd { margin: 12px 0 0; font: 600 56px/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stats dd.sub { margin-top: 10px; font: 400 13px var(--mono); letter-spacing: 0; color: var(--muted); }
.stats small { font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.conditions { margin: 0; padding: 18px 0 0 20px; border-left: 2px solid var(--signal); font-size: 14px; color: var(--ink-2); align-self: start; }
.conditions dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.conditions dd { margin: 0; padding: 6px 0; border-top: 1px solid var(--line); }

/* 2. The checks: one recording fans out to three lanes, then one decision */
.flow { margin: 56px 0 0; }
.flow-in { position: relative; display: inline-grid; gap: 2px; padding: 14px 18px; border: 1px solid var(--ink); border-radius: var(--r);
  background: var(--card); font-size: 14px; color: var(--muted); }
.flow-in b { color: var(--ink); font-size: 16px; }
.flow-in .fig { margin-bottom: 6px; }
.flow-in::after { content: ""; position: absolute; left: 32px; top: 100%; width: 1.5px; height: 28px; background: var(--ink); }
.lanes { position: relative; list-style: none; margin: 28px 0 0; padding: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lanes::before { content: ""; position: absolute; left: 32px; right: calc(100% / 3 - 48px); /* ends at the third lane's drop */ top: 0; height: 1.5px;
  background: var(--ink); transform-origin: left; transition: transform 1s var(--ease); }
.lanes li { position: relative; display: grid; gap: 8px; align-content: start; padding: 20px; background: var(--card);
  border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: 0 0 var(--r) var(--r); }
.lanes li::before { content: ""; position: absolute; left: 32px; bottom: 100%; width: 1.5px; height: 31px; background: var(--ink); }
.lanes li.lane-ours { border-top-color: var(--signal); }
.lane-n { font-size: 12px; color: var(--muted); }
.lanes p { font-size: 15px; color: var(--ink-2); }
.lanes .by { font-size: 12px; color: var(--muted); }
.stops { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.stops dt { font: 500 11px/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stops dd { margin: 0; color: var(--ink-2); }
.flow-out { margin-top: 24px; padding: 14px 18px; border-left: 3px solid var(--ink); background: var(--card); font-size: 15px; color: var(--ink-2); }
.flow-out b { color: var(--ink); }
.flow.pre .lanes::before { transform: scaleX(0); }

/* 3. Demo console */
.mock-note { margin-top: 18px; display: inline-block; font-size: 14px; color: var(--signal); background: var(--signal-tint); padding: 6px 12px; border-radius: var(--r); }
.console { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.pane { padding: 22px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: 0 0 var(--r) var(--r); }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.bank { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.bank-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 3px; background: var(--action); color: #fff; font-size: 13px; font-weight: 700; }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.picker { display: flex; gap: 4px; margin-top: 18px; padding: 4px; background: var(--paper); border-radius: var(--r); border: 1px solid var(--line); }
.picker button { flex: 1; min-height: 40px; padding: 4px 6px; border: 0; border-radius: 3px; background: transparent; font: 500 14px/1.2 var(--sans);
  color: var(--muted); cursor: pointer; transition: background-color .25s var(--ease), color .25s; }
.picker button:hover { color: var(--ink); }
.picker button[aria-checked="true"] { background: var(--action); color: #fff; }
.challenge { margin-top: 22px; }
.digits { display: flex; gap: 10px; font-size: 40px; font-weight: 500; }
.digits span { width: 1.1ch; text-align: center; color: #948B7B; transition: color .25s; } /* readable before the call (3:1 at 40px), ink once heard */
.digits span.heard { color: var(--ink); }
.digits span.miss { color: var(--signal); text-decoration: underline 3px; text-underline-offset: 6px; }
.digits-hi { margin-top: 2px; color: var(--muted); font-size: 16px; min-height: 1.6em; }
.clip { position: relative; margin: 20px 0; padding: 14px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); }
.clip .ai-badge { margin-bottom: 8px; }
#waveCanvas { display: block; width: 100%; height: 72px; }
.mic-hint { margin-top: 8px; font-size: 14px; color: var(--muted); }
.live-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.live-controls label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.live-controls select { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  font: 500 14px var(--sans); color: var(--ink); }
.channel-note { margin-top: 10px; font-size: 12px; color: var(--muted); }
.attack-meta { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--signal); }
.recovery { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); display: grid; gap: 12px; }
.rec-say { font-size: 16px; line-height: 1.45; min-height: 2.9em; }
.rec-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rec-keys .btn { height: 44px; padding: 0 8px; font-size: 13px; gap: 6px; }
.rec-keys .btn b { font-family: var(--mono); }
.rec-heard { font-size: 12px; color: var(--muted); min-height: 1.2em; }
.rec-note { font-size: 12px; color: var(--muted); }
.ops h3 { font-size: 15px; font-weight: 600; letter-spacing: 0; }

/* Ops checks (driven by app.js: data-state idle | busy | pass | flag) */
.checks { list-style: none; margin: 0; padding: 10px 0 0; }
.checks li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; font-size: 15px; }
.checks li + li { border-top: 1px solid var(--line); }
.checks b { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px; border-radius: 3px; color: var(--muted); background: var(--paper); }
.ico { width: 24px; height: 24px; }
.ico circle { fill: none; stroke: var(--line); stroke-width: 1.6; transition: fill .3s, stroke .3s; }
.ico .draw { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.checks li[data-state="pass"] .ico circle { fill: var(--pass-tint); stroke: var(--pass); }
.checks li[data-state="pass"] .draw { stroke: var(--pass); }
.checks li[data-state="pass"] b { color: var(--pass); background: var(--pass-tint); }
.checks li[data-state="flag"] .ico circle { fill: var(--band); stroke: var(--ink-2); }
.checks li[data-state="flag"] .draw { stroke: var(--ink-2); }
.checks li[data-state="flag"] b { color: var(--ink); background: var(--line); }
.checks li[data-state="busy"] .ico circle { stroke: var(--ink); stroke-dasharray: 16 47; animation: spin 1s linear infinite; transform-origin: center; }
.checks li[data-state="busy"] b { color: var(--ink); background: var(--band); }
.checks-ops li .draw { stroke-dashoffset: 1; }
.checks-ops li[data-state="pass"] .ok, .checks-ops li[data-state="flag"] .bad { stroke-dashoffset: 0; transition: stroke-dashoffset .45s var(--ease) .05s; }
.checks-ops li .detail { grid-column: 2 / -1; font-style: normal; font-size: 13px; color: var(--muted); min-height: 1.2em; margin-top: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.verdict { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 14px 16px; border-radius: var(--r);
  background: var(--paper); font-size: 15px; color: var(--muted); border: 1px solid var(--line); }
.chip { font: 700 14px/1 var(--mono); letter-spacing: .1em; padding: 8px 12px; border-radius: 3px; background: var(--line); color: var(--ink); }
.verdict[data-v="ALLOW"] { background: var(--pass-tint); border-color: transparent; color: var(--ink-2); }
.verdict[data-v="ALLOW"] .chip { background: var(--pass); color: #fff; }
.verdict[data-v="STEP-UP"] { background: var(--band); border-color: transparent; color: var(--ink-2); }
.verdict[data-v="STEP-UP"] .chip { background: var(--line); color: var(--ink); }
.verdict-ops { margin-top: 16px; min-height: 64px; }
.verdict-response { width: 100%; color: var(--muted); font-size: 14px; }
.audit { margin: 16px 0 0; padding: 14px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); font-size: 12px;
  line-height: 1.55; color: var(--muted); white-space: pre-wrap; min-height: 9.5em; }

/* 4. Results: Fig. 3 bars by phone line, then the attacker table */
.lines { margin: 56px 0 0; }
.fig-title { display: flex; align-items: baseline; gap: 12px; font-weight: 600; font-size: 17px; }
.lines-head, .lines-rows li { display: grid; grid-template-columns: 220px 1fr 120px; gap: 20px; align-items: center; }
.lines-head { margin-top: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lines-head span:last-child, .thru { text-align: right; }
.lines-rows { list-style: none; margin: 0; padding: 0; }
.lines-rows li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ln { font-weight: 500; }
.ln em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.bar { display: grid; grid-template-columns: 1fr 8.5rem; align-items: center; gap: 12px; min-width: 0; } /* track = 0–50% */
.bar i { display: block; width: calc(var(--v) * 2); height: 14px; background: var(--ink); border-radius: 0 2px 2px 0; transform-origin: left; flex: none; }
.bar b { font-weight: 500; font-size: 13px; white-space: nowrap; }
.thru { font-size: 14px; }
.lines-rows li.worst .bar i { background: var(--signal); }
.lines-rows li.worst .bar b, .lines-rows li.worst .ln { color: var(--signal); font-weight: 600; }
.lines figcaption { margin-top: 14px; max-width: 72ch; font-size: 14px; color: var(--muted); }

.table-wrap { margin-top: 56px; overflow-x: auto; }
.res { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.res caption { text-align: left; font-weight: 600; font-size: 17px; padding-bottom: 14px; }
.res caption .fig { margin-right: 12px; }
.res th, .res td { padding: 14px 16px 14px 0; text-align: left; border-bottom: 1px solid var(--line); }
.res thead th { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); }
.res tbody th { font-weight: 500; }
.res tr.ours th, .res tr.ours td { font-weight: 600; }

/* 5. Limits and threat model */
.limit-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.col-h { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.limit-cols ul { margin: 0; padding: 0; list-style: none; }
.limit-cols li { position: relative; padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); font-size: 15px; }
.limit-cols li::before { content: ""; position: absolute; left: 2px; top: 23px; width: 10px; height: 1.5px; background: var(--ink); }
.limit-cols ul.accent li::before { background: var(--signal); }
.threat { margin: 0; font-size: 15px; }
.threat dt { margin-top: 12px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.threat dd { margin: 4px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* Footer */
.credits { max-width: var(--wrap); margin: 0 auto; padding: 48px 32px 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  border-top: 2px solid var(--ink); font-size: 15px; color: var(--muted); }
.who-made b { color: var(--ink); font-weight: 600; margin-right: 8px; }
.who-made + .who-made { margin-top: 6px; }

/* Tablet and mobile */
@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: 24px; min-height: calc(100svh - 64px); padding: 24px 22px !important; }
  .hero h1 { max-width: 13ch; font-size: clamp(34px, 4vw, 48px); }
  .lede { font-size: 16px; }
  .ctas { gap: 8px; margin-top: 20px; }
  .ctas .btn { padding-inline: 14px; }
  .stats-wrap { grid-template-columns: 1fr; }
  .limit-cols { grid-template-columns: 1fr 1fr; }
  .limit-cols > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav { gap: 16px; justify-content: space-between; padding: 0 20px; }
  .hero { grid-template-columns: 1fr; gap: 28px; min-height: auto; padding: 48px 20px !important; }
  .hero h1 { max-width: 16ch; }
  main > section { padding: 84px 20px; }
  .sec-band { padding-inline: 20px !important; }
  .sec { grid-template-columns: 1fr; gap: 20px; }
  .sec-head { flex-direction: row; align-items: baseline; gap: 12px; }
  .sec-n { font-size: 28px; }
  .call-bar, .call figcaption { padding-inline: 16px; }
  .call-line { font-size: 13px; }
  .sim-source { padding-inline: 14px; }
  .sim-checks { padding-inline: 14px; gap: 8px; }
  .sim-check { padding-inline: 10px; }
  .sim-result { margin-inline: 14px; }
  .stats { grid-template-columns: 1fr; }
  .stats div, .stats div + div { padding: 20px 0 0; border-left: 0; }
  .stats div + div { border-top: 1px solid var(--line); margin-top: 20px; }
  .stats dt { min-height: 0; }
  .lanes { grid-template-columns: 1fr; gap: 16px; padding: 0 0 0 20px; margin-top: 0; border-left: 1.5px solid var(--ink); margin-left: 32px; }
  .lanes::before, .lanes li::before { display: none; }
  .flow-in::after { height: 16px; }
  .lanes { padding-top: 16px; }
  .console { grid-template-columns: 1fr; }
  .lines-head { display: none; }
  .lines-rows li { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .lines-rows .bar { grid-column: 1 / -1; grid-row: 2; }
  .lines-rows .thru::before { content: "clones "; color: var(--muted); }
  .limit-cols { grid-template-columns: 1fr; }
  .credits { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .digits { font-size: 32px; gap: 6px; }
  .nav .btn { display: none; }
  .rec-keys { grid-template-columns: repeat(2, 1fr); }
  .live-controls { grid-template-columns: 1fr; }
  .sim-source { grid-template-columns: 1fr; gap: 6px; }
  .sim-arrow { transform: rotate(90deg); line-height: 1; }
  .sim-node { min-height: 78px; padding: 10px 12px; }
  .sim-digits { font-size: 20px; }
  .sim-checks { gap: 5px; padding-inline: 10px; }
  .sim-check { padding: 8px 7px; }
  .sim-check span { font-size: 10px; }
  .sim-check strong { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* 4:5 video capture: open with ?video, console stacks and type grows */
.video .console { grid-template-columns: 1fr; }
.video .digits { font-size: 56px; }
.video .checks li { font-size: 22px; }
.video .chip { font-size: 22px; }
