/* Irisdial site. One display face (Newsreader, optical size 60), one text face for words and numbers (Geist), one
   mono for readouts, addresses and code (Geist Mono). All OFL, self-hosted. Light ("paper") and dark ("graphite")
   are both first-class; the API band always wears the other theme. */
@font-face { font-family: "Ap Display"; src: url("../fonts/nr-roman.woff2") format("woff2"); font-weight: 300 560; font-style: normal; font-display: swap; }
@font-face { font-family: "Ap Display"; src: url("../fonts/nr-italic.woff2") format("woff2"); font-weight: 300 560; font-style: italic; font-display: swap; }
@font-face { font-family: "Ap Text"; src: url("../fonts/gs-text.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* The lockup face: the display face with its metrics pinned to the cap height (brand/web/lockup.json, cap_em 0.67),
   so the word's line box is exactly cap-top to baseline and align-items: center puts the caps on the mark's centre. */
@font-face { font-family: "Ap Lockup"; src: url("../fonts/nr-roman.woff2") format("woff2"); font-weight: 300 560; font-style: normal; font-display: swap; ascent-override: 67%; descent-override: 0%; line-gap-override: 0%; }
@font-face { font-family: "Ap Mono"; src: url("../fonts/gs-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --f-display: "Ap Display", "Iowan Old Style", Georgia, serif;
  --f-text: "Ap Text", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Ap Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --wrap: 84rem;
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --band: clamp(5rem, 9vw, 8rem);
  color-scheme: light;
  --bg: #f2efe7; --bg-2: #ebe7dd; --surface: #faf8f3; --ink: #17181a; --ink-2: #44464a; --ink-3: #626468;
  --rule: #c9c4b9; --grid: #dfdad0; --signal: #0a7550; --alert: #b9381d; --trace: #17181a;
  --action-bg: #17181a; --action-ink: #f7f5ef; --sel: rgba(10, 117, 80, 0.22); --shadow: rgba(23, 24, 26, 0.08);
}
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #131416; --bg-2: #17181b; --surface: #1c1d20; --ink: #ece9e1; --ink-2: #b6b3ab; --ink-3: #8f8c85;
  --rule: #36383d; --grid: #232528; --signal: #4fd69c; --alert: #ff8264; --trace: #ece9e1;
  --action-bg: #ece9e1; --action-ink: #131416; --sel: rgba(79, 214, 156, 0.25); --shadow: rgba(0, 0, 0, 0.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
    --bg: #131416; --bg-2: #17181b; --surface: #1c1d20; --ink: #ece9e1; --ink-2: #b6b3ab; --ink-3: #8f8c85;
    --rule: #36383d; --grid: #232528; --signal: #4fd69c; --alert: #ff8264; --trace: #ece9e1;
    --action-bg: #ece9e1; --action-ink: #131416; --sel: rgba(79, 214, 156, 0.25); --shadow: rgba(0, 0, 0, 0.4);
  }
}
/* the inverted band: always the other theme */
.inv { --bg: #131416; --bg-2: #17181b; --surface: #1c1d20; --ink: #ece9e1; --ink-2: #b6b3ab; --ink-3: #8f8c85;
  --rule: #36383d; --grid: #232528; --signal: #4fd69c; --alert: #ff8264; --action-bg: #ece9e1; --action-ink: #131416; color-scheme: dark; }
:root[data-theme="dark"] .inv { --bg: #f2efe7; --bg-2: #ebe7dd; --surface: #faf8f3; --ink: #17181a; --ink-2: #44464a; --ink-3: #626468;
  --rule: #c9c4b9; --grid: #dfdad0; --signal: #0a7550; --alert: #b9381d; --action-bg: #17181a; --action-ink: #f7f5ef; color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .inv { --bg: #f2efe7; --bg-2: #ebe7dd; --surface: #faf8f3; --ink: #17181a; --ink-2: #44464a; --ink-3: #626468;
    --rule: #c9c4b9; --grid: #dfdad0; --signal: #0a7550; --alert: #b9381d; --action-bg: #17181a; --action-ink: #f7f5ef; color-scheme: light; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; overscroll-behavior-y: none; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--f-text); font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; caret-color: var(--signal); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
::selection { background: var(--sel); color: var(--ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }
* { scrollbar-color: var(--rule) transparent; }
.num, .mono, code, kbd, pre { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--action-bg); color: var(--action-ink); padding: 0.6rem 1rem; border-radius: 3px; }
.skip:focus { top: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
.kick { font: 500 0.75rem/1.2 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 1.4rem; }
.kick b { color: var(--ink); font-weight: 500; }
.h1 { font: 400 clamp(3.1rem, 8.4vw, 8.4rem)/0.9 var(--f-display); letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.h1 em, .h2 em { font-style: italic; font-weight: 340; letter-spacing: -0.03em; }
.h2 { font: 400 clamp(2.3rem, 4.9vw, 4.6rem)/0.98 var(--f-display); letter-spacing: -0.02em; margin: 0 0 1.4rem; text-wrap: balance; }
.h3 { font: 560 1.1875rem/1.3 var(--f-text); letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.lede { font-size: clamp(1.0625rem, 1.35vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 36rem; margin: 0; }
.body { color: var(--ink-2); max-width: 38rem; margin: 0 0 1rem; }
.note { font-size: 0.8125rem; line-height: 1.5; color: var(--ink-3); max-width: 44rem; margin: 0; }
.note b { color: var(--ink-2); font-weight: 500; }

/* ---------- actions: one action colour (ink), secondary = arrow link ---------- */
.act { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.6rem; }
.btn { display: inline-flex; align-items: center; gap: 0.7rem; min-height: 3rem; padding: 0 1.35rem; border-radius: 3px; border: 0;
  background: var(--action-bg); color: var(--action-ink); font: 500 1rem/1 var(--f-text); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease; box-shadow: 0 1px 0 var(--shadow); }
.btn svg { width: 1rem; height: 1rem; }
.btn:active { transform: scale(0.97); }
.lnk { display: inline-flex; align-items: center; gap: 0.5rem; font: 500 1rem/1 var(--f-text); color: var(--ink); text-decoration: none; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.lnk::after { content: "\2192"; font-family: var(--f-mono); transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: 0 6px 18px -8px var(--shadow), 0 0 0 1px var(--signal); }
  .lnk:hover { border-bottom-color: var(--ink); }
  .lnk:hover::after { transform: translateX(3px); }
}

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid transparent; transition: border-color 300ms ease; }
.hdr.is-stuck { border-bottom-color: var(--rule); }
.hdr-in { display: flex; align-items: center; gap: 1.5rem; height: 4rem; }
/* Lockup per brand/web/lockup.json: mark = 1.75 x cap height, gap = 0.36 x mark, caps centred on the mark.
   --lk is the word size; 1.75rem gives a 32.8 px mark, above the full-colour minimum of 32 px. */
.brand { --lk: 1.75rem; --lk-mark: calc(var(--lk) * 0.67 * 1.75); display: inline-flex; align-items: center; gap: calc(var(--lk-mark) * 0.36); text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { display: block; width: var(--lk-mark); height: var(--lk-mark); flex: none; }
.brand span { font: 500 var(--lk)/1 "Ap Lockup", var(--f-display); letter-spacing: -0.01em; }
.nav { display: flex; gap: 1.6rem; }
.nav a { font-size: 0.9375rem; text-decoration: none; color: var(--ink-2); padding: 0.5rem 0; }
.nav a[aria-current] { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--ink); } }
.clock { display: inline-flex; align-items: center; gap: 0.6rem; font: 500 0.75rem/1 var(--f-mono); letter-spacing: 0.06em; color: var(--ink-2); padding: 0.55rem 0.75rem; border: 1px solid var(--rule); border-radius: 2px; white-space: nowrap; text-decoration: none; }
.clock i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--signal); }
.clock b { color: var(--ink); font-weight: 500; }
.theme { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--rule); border-radius: 2px; background: none; cursor: pointer; }
.theme svg { width: 1.1rem; height: 1.1rem; }
.theme:active { transform: scale(0.95); }
@media (max-width: 860px) { .nav { display: none; } .clock .lbl { display: none; } }
@media (max-width: 420px) { .hdr-in { gap: 0.6rem; } }

/* ---------- hero: the recorder ---------- */
.hero { position: relative; padding-top: clamp(1.8rem, 4.5vh, 3.4rem); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 20rem); grid-template-areas: "intro card" "lede card" "rec rec"; column-gap: 3rem; align-items: start; min-height: calc(100svh - 4rem - clamp(1.8rem, 4.5vh, 3.4rem)); grid-template-rows: auto auto 1fr; }
.h-intro { grid-area: intro; } .h-lede { grid-area: lede; } .hero .card { grid-area: card; align-self: start; } .rec { grid-area: rec; }
.hero .h1 { font-size: clamp(3.1rem, 7.4vw, 7.6rem); }
.hero .lede { margin: 1.3rem 0 1.5rem; }
.h-lede .act { gap: 0.9rem 1.6rem; }
.h-lede .status { flex-basis: 100%; margin: 0.2rem 0 0; }
.status { display: flex; align-items: center; gap: 0.55rem; font: 500 0.78rem/1.4 var(--f-mono); color: var(--ink-2); letter-spacing: 0.02em; }
.status i { flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 var(--signal); }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 3px; padding: 1.1rem 1.2rem 1rem; box-shadow: 0 18px 40px -30px var(--shadow); }
.card-h { display: flex; justify-content: space-between; gap: 1rem; font: 500 0.6875rem/1.2 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.8rem; }
.card-t { font: 400 1.5rem/1.15 var(--f-display); margin: 0 0 0.9rem; min-height: 2.3em; }
.rd { display: grid; grid-template-columns: 3.4rem 1fr 4.6rem; align-items: center; gap: 0.2rem 0.7rem; margin: 0; }
.rd-row { display: contents; }
.rd-k { font: 500 0.8125rem/2.2 var(--f-mono); color: var(--ink-3); }
.rd-v { margin: 0; font: 500 0.9375rem/2.2 var(--f-mono); text-align: right; font-variant-numeric: tabular-nums; }
.rd .bar { display: block; height: 2px; background: var(--grid); position: relative; overflow: clip; }
.rd .bar span { position: absolute; inset: 0; background: var(--ink-3); transform-origin: 0 50%; transform: scaleX(0); }
.pos { color: var(--signal); } .neg { color: var(--alert); } .wait { color: var(--ink-3); }
.card-f { margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--grid); font-size: 0.75rem; line-height: 1.45; color: var(--ink-3); }

.rec { position: relative; z-index: 1; margin-top: clamp(1rem, 2.6vh, 2rem); min-height: 17rem; height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.rec-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.5rem; font: 500 0.6875rem/1.3 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding-block: 0.7rem; border-top: 1px solid var(--rule); }
.rec-bar b { color: var(--ink); font-weight: 500; }
.rec-stage { position: relative; min-height: 13rem; cursor: crosshair; touch-action: pan-y; }
.rec-stage canvas, .rec-stage svg.rec-static { position: absolute; inset: 0; width: 100%; height: 100%; }
.js .rec-stage svg.rec-static { display: none; }
.rec-static path { fill: none; stroke: var(--trace); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rec-cap { padding: 0.7rem 0 1.4rem; border-top: 1px solid var(--rule); }
.scale-deco { position: absolute; right: var(--gut); top: 1rem; z-index: 0; font: 300 clamp(8rem, 20vw, 19rem)/0.8 var(--f-display); font-style: italic; color: var(--grid); letter-spacing: -0.05em; pointer-events: none; user-select: none; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "rec" "lede" "card"; grid-template-rows: none; min-height: 0; }
  .rec { height: auto; margin-top: 1.2rem; }
  .hero .card { max-width: 28rem; margin-bottom: 2.5rem; }
}
@media (max-width: 640px) {
  .hero { padding-top: 1.4rem; }
  .kick-more { display: none; }
  .hero .lede { margin: 1.2rem 0 1.4rem; }
  .card { padding: 0.9rem 1rem 0.8rem; }
  .card-t { font-size: 1.25rem; min-height: 0; }
  .rec { min-height: 0; }
  .rec-stage { min-height: 14rem; }
  .rec-cap { padding-bottom: 0.4rem; }
  .scale-deco { display: none; }
}

/* ---------- bands ---------- */
.band { position: relative; padding-block: var(--band); }
.band + .band { border-top: 1px solid var(--rule); }
.rule-draw { position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--ink); transform-origin: 0 50%; }

/* statement */
.stmt { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 4rem; align-items: end; }
.hz { display: flex; gap: clamp(1rem, 4vw, 4rem); margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.hz div { flex: 1; }
.hz strong { display: block; font: 300 clamp(3.6rem, 9vw, 8.5rem)/0.85 var(--f-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.hz strong small { font-size: 0.42em; letter-spacing: 0; margin-left: 0.08em; font-style: italic; }
.hz .hz-c { display: block; margin-top: 0.9rem; font-size: 0.9375rem; color: var(--ink-2); max-width: 17rem; }
@media (max-width: 860px) { .stmt { grid-template-columns: minmax(0, 1fr); } .hz { flex-direction: column; gap: 1.6rem; } .hz div { display: grid; grid-template-columns: 7.5rem 1fr; align-items: end; gap: 1rem; } .hz .hz-c { margin: 0; } }

/* showcase: pinned, scrubbed by the scroll */
.sc { position: relative; height: 460svh; border-top: 1px solid var(--rule); background: var(--bg-2); }
.sc-pin { position: sticky; top: 4rem; height: calc(100svh - 4rem); display: grid; grid-template-columns: minmax(16rem, 4fr) minmax(0, 8fr); gap: 2rem 4rem; align-items: center; overflow: clip; }
.sc-copy { align-self: center; }
.sc-steps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.8rem 0 1.6rem; padding: 0; list-style: none; }
.sc-steps button { min-height: 2.75rem; padding: 0 0.9rem; border: 1px solid var(--rule); border-radius: 2px; background: none; font: 500 0.8125rem/1 var(--f-mono); color: var(--ink-2); cursor: pointer; transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease; }
.sc-steps button[aria-current="step"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sc-steps button:active { transform: scale(0.97); }
.sc-say { min-height: 8.5rem; }
.sc-say p { margin: 0; }
.sc-say .h3 { font: 400 1.75rem/1.15 var(--f-display); margin-bottom: 0.6rem; }
.sc-fig { position: relative; height: min(68svh, 40rem); }
.sc-fig svg { width: 100%; height: 100%; overflow: visible; }
.sc-skip { font-size: 0.875rem; }
.f-grid line { stroke: var(--grid); stroke-width: 1; }
.f-axis text, .f-lab { font: 500 12px var(--f-mono); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.f-trace { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.f-quote { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 4 5; }
.f-fill { fill: var(--bg-2); stroke: var(--ink); stroke-width: 2; }
.f-br line { stroke-width: 2; }
.f-br .pos { stroke: var(--signal); } .f-br .neg { stroke: var(--alert); }
.f-big { font: 400 30px var(--f-display); font-variant-numeric: tabular-nums; }
.f-big.pos { fill: var(--signal); } .f-big.neg { fill: var(--alert); } .f-big.zero { fill: var(--ink); }
.f-hist rect { fill: var(--ink-3); }
.f-hist rect.me { fill: var(--alert); }
.f-hist rect.posb { fill: var(--signal); }
.f-med { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 4; }
.sc-note { position: absolute; left: 0; right: 0; bottom: 0; }
@media (max-width: 860px) {
  .sc { height: 520svh; }
  .sc-pin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: 0.8rem; padding-top: 1.2rem; padding-bottom: 1rem; }
  .sc-copy .h2 { font-size: 2.1rem; margin-bottom: 0.6rem; }
  .sc-copy .sc-intro, .sc-skip { display: none; }
  .sc-steps { margin: 0.4rem 0 0.6rem; }
  .sc-steps button { min-height: 2.75rem; padding: 0 0.7rem; }
  .sc-say { min-height: 6.4rem; font-size: 0.9375rem; }
  .sc-say .h3 { font-size: 1.35rem; }
  .sc-fig { height: auto; min-height: 15rem; }
  .sc-note { position: static; }
}
.sc.is-flat { height: auto; }
.sc.is-flat .sc-pin { position: relative; top: 0; height: auto; padding-block: var(--band); }

/* product window */
.pw-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1rem 4rem; align-items: end; margin-bottom: 2.6rem; }
.win { border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); box-shadow: 0 40px 80px -60px var(--shadow); overflow: clip; }
.win-bar { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--rule); font: 500 0.75rem/1 var(--f-mono); color: var(--ink-3); }
.win-bar .dots { display: flex; gap: 0.35rem; } .win-bar .dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; border: 1px solid var(--rule); }
.win-bar .tag { margin-left: auto; padding: 0.35rem 0.55rem; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink-2); }
.win-tools { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; align-items: center; padding: 0.9rem 1rem; border-bottom: 1px solid var(--grid); font-size: 0.875rem; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 2px; }
.seg button { min-height: 2.5rem; padding: 0 0.8rem; background: none; border: 0; font: 500 0.8125rem/1 var(--f-mono); color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.win-tools .lbl { font: 500 0.6875rem/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.tbl-wrap { overflow-x: auto; }
table.board { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; min-width: 40rem; }
.board th { text-align: left; font: 500 0.6875rem/1.2 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding: 0.8rem 1rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.board td { padding: 0.95rem 1rem; border-bottom: 1px solid var(--grid); color: var(--ink-3); font-family: var(--f-mono); font-size: 0.875rem; white-space: nowrap; }
.board td.rk { color: var(--ink); font: 400 1.5rem/1 var(--f-display); width: 4.5rem; }
.board tr.open td { color: var(--ink-2); }
.board th.hl, .board td.hl { background: color-mix(in srgb, var(--signal) 7%, transparent); }
.board .r { text-align: right; }
.slot { display: inline-block; width: 4.5rem; height: 0.55rem; border-radius: 1px; background: var(--grid); vertical-align: middle; }
.win-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.win-foot > div { padding: 1rem; }
.win-foot > div + div { border-left: 1px solid var(--rule); }
.win-foot pre { margin: 0.6rem 0 0; font-size: 0.75rem; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; word-break: break-all; }
@media (max-width: 860px) { .pw-head { grid-template-columns: minmax(0, 1fr); } .win-foot { grid-template-columns: minmax(0, 1fr); } .win-foot > div + div { border-left: 0; border-top: 1px solid var(--rule); } }

/* who reads it: an index, not cards */
.idx { list-style: none; margin: 2.8rem 0 0; padding: 0; }
.idx li { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(8rem, 2fr); gap: 1rem 3rem; padding: 2rem 0; border-top: 1px solid var(--rule); align-items: baseline; }
.idx li:last-child { border-bottom: 1px solid var(--rule); }
.idx h3 { font: 400 clamp(1.8rem, 3vw, 2.6rem)/1.05 var(--f-display); letter-spacing: -0.015em; margin: 0; }
.idx p { margin: 0; color: var(--ink-2); max-width: 36rem; }
.idx .st { font: 500 0.75rem/1.4 var(--f-mono); letter-spacing: 0.06em; color: var(--ink-3); text-align: right; }
.idx .st.live { color: var(--signal); }
@media (max-width: 860px) { .idx li { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; } .idx .st { text-align: left; } }

/* api band (inverted) */
.api { background: var(--bg); color: var(--ink); }
.api-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem 4rem; align-items: start; }
.code { border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); overflow: clip; }
.code-tabs { display: flex; border-bottom: 1px solid var(--rule); }
.code-tabs button { min-height: 2.9rem; padding: 0 1rem; background: none; border: 0; border-right: 1px solid var(--rule); font: 500 0.8125rem/1 var(--f-mono); color: var(--ink-3); cursor: pointer; }
.code-tabs button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }
.code pre { margin: 0; padding: 1.2rem 1.2rem 1.4rem; font-size: 0.8125rem; line-height: 1.7; color: var(--ink-2); overflow-x: auto; min-height: 19rem; }
.code pre .k { color: var(--ink); } .code pre .s { color: var(--signal); } .code pre .c { color: var(--ink-3); }
.code .cap { padding: 0.8rem 1.2rem; border-top: 1px solid var(--rule); }
.api ul.facts { list-style: none; padding: 0; margin: 1.8rem 0 0; }
.api ul.facts li { display: flex; gap: 1rem; padding: 0.75rem 0; border-top: 1px solid var(--rule); font-size: 0.9375rem; color: var(--ink-2); }
.api ul.facts li b { flex: none; width: 7.5rem; font: 500 0.75rem/1.9 var(--f-mono); letter-spacing: 0.06em; color: var(--ink-3); font-weight: 500; text-transform: uppercase; }
@media (max-width: 860px) { .api-in { grid-template-columns: minmax(0, 1fr); } }

/* method */
.meth { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 2.5rem 4rem; }
.formula { margin: 2.2rem 0 0; padding: 1.8rem 0; border-block: 1px solid var(--rule); font: 400 clamp(1.5rem, 2.6vw, 2.25rem)/1.35 var(--f-display); overflow-x: auto; }
.formula i { font-style: italic; }
.formula sub { font-size: 0.55em; }
.defs { margin: 0; display: grid; grid-template-columns: 9.5rem 1fr; }
.defs dt, .defs dd { padding: 0.9rem 0; border-top: 1px solid var(--rule); margin: 0; }
.defs dt { font: 500 0.75rem/1.9 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.defs dd { color: var(--ink-2); font-size: 0.9688rem; }
.not { margin-top: 2.4rem; }
.not ul { margin: 0.6rem 0 0; padding-left: 1.1rem; color: var(--ink-2); font-size: 0.9375rem; }
.not li + li { margin-top: 0.4rem; }
@media (max-width: 860px) { .meth { grid-template-columns: minmax(0, 1fr); } .defs { grid-template-columns: minmax(0, 1fr); } .defs dd { border-top: 0; padding-top: 0; } }

/* closing: the iris opens as you arrive */
.close { position: relative; overflow: clip; padding-block: clamp(5rem, 10vw, 9rem); border-top: 1px solid var(--rule); }
.close-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 4rem; align-items: center; }
.iris { width: 100%; max-width: 30rem; aspect-ratio: 1; margin-left: auto; }
.iris svg { width: 100%; height: 100%; }
.iris .ring { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.iris .tick { stroke: var(--ink-3); stroke-width: 1; }
.iris .blade { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.iris .hole { fill: var(--signal); opacity: 0.14; }
.count { display: flex; gap: clamp(1rem, 3vw, 2.4rem); margin: 2.2rem 0 2.4rem; }
.count div { display: flex; flex-direction: column; }
.count strong { font: 300 clamp(3rem, 7vw, 6rem)/0.9 var(--f-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.count span { margin-top: 0.5rem; font: 500 0.6875rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 860px) { .close-in { grid-template-columns: minmax(0, 1fr); } .iris { max-width: 18rem; margin: 0 auto; order: -1; } }

/* token slot: structure ready, switched off */
.slot-band[hidden] { display: none !important; }

/* footer */
.ftr { border-top: 1px solid var(--rule); padding-block: 2.6rem 3rem; font-size: 0.875rem; color: var(--ink-3); }
.ftr-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: start; }
.ftr nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.ftr nav a { color: var(--ink-2); text-decoration: none; padding: 0.5rem 0; }
@media (hover: hover) and (pointer: fine) { .ftr nav a:hover { color: var(--ink); } }
.ftr p { margin: 0.8rem 0 0; max-width: 34rem; }
@media (max-width: 640px) { .ftr-in { grid-template-columns: minmax(0, 1fr); } }

/* phone type tuning */
@media (max-width: 640px) {
  .h1 { font-size: clamp(2.9rem, 13.5vw, 4rem); line-height: 0.92; }
  .h2 { font-size: clamp(2.1rem, 9.5vw, 2.8rem); }
  .band { padding-block: 3.75rem; }
}

/* ---------- Irisdial motion (on top of the kit) ---------- */
@keyframes ap-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 0.5rem color-mix(in srgb, var(--signal) 0%, transparent); } }
@keyframes ap-wipe { from { clip-path: inset(0 6% 0 6% round 0.4rem); } to { clip-path: inset(0 0 0 0 round 0); } }
@media (prefers-reduced-motion: no-preference) {
  .status i, .clock i { animation: ap-pulse 2.6s ease-out infinite; }
  .rv { opacity: 0; transition: opacity 900ms var(--ease-out); }
  .rv.rv-in { opacity: 1; }
  .rv .rv-k { opacity: 0; transition: opacity 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms + 200ms); }
  .rv.rv-in .rv-k { opacity: 1; }
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .api { animation: ap-wipe linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .rv, .rv .rv-k { opacity: 1; }
}
html:not(.js) .sc { height: auto; }
html:not(.js) .sc-pin { position: relative; top: 0; height: auto; padding-block: var(--band); }
.js .sc-say [data-step]:not(.on) { display: none; }
.sc-fig:not(.is-drawn)::after { content: ""; position: absolute; inset: 10% 0; border-block: 1px solid var(--rule); }

/* split words in display type: room above for caps and italic overhang */
.h1 .w, .h2 .w { padding: 0.14em 0.1em 0.14em; margin: -0.14em -0.1em -0.14em; }
/* showcase proportions */
.sc-pin { grid-template-columns: minmax(18rem, 5fr) minmax(0, 7fr); }
.sc .h2 { font-size: clamp(2rem, 3.3vw, 3.4rem); }
.f-hist rect { fill: color-mix(in srgb, var(--alert) 62%, var(--bg-2)); }
.f-hist rect.posb { fill: color-mix(in srgb, var(--signal) 66%, var(--bg-2)); }
.f-hist rect.me { fill: var(--ink); }
@media (max-width: 860px) { .sc-pin { grid-template-columns: minmax(0, 1fr); } }
.sc-fig text { paint-order: stroke; stroke: var(--bg-2); stroke-width: 6px; stroke-linejoin: round; }
@media (max-width: 640px) { .rec-bar .rb-more { display: none; } }
.sc-fig.is-small .f-axis text, .sc-fig.is-small .f-lab { font-size: 11px; }
.sc-fig.is-small .f-big { font-size: 24px; }
@media (max-width: 860px) { .sc-fig { min-height: 0; aspect-ratio: 400 / 380; } }
.js .rec-stage.no-data svg.rec-static { display: block; }
@media (max-width: 860px) {
  .sc-copy .kick { display: none; }
  .sc-note { font-size: 0.75rem; }
  .sc-say { min-height: 7.4rem; }
  .sc-say .body { font-size: 0.9375rem; line-height: 1.5; margin: 0; }
  .sc-pin { gap: 0.4rem; }
}
.nav a, .ftr nav a { padding-inline: 0.3rem; margin-inline: -0.3rem; }
.rec-cap { max-width: 40rem; }
/* the card's big reading rolls to each new value as it lands */
.card-big { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 0 0 0.6rem; padding: 0.7rem 0 0.8rem; border-block: 1px solid var(--grid); }
.cb-k { font: 500 0.75rem/1.4 var(--f-mono); color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.cb-box { display: block; height: 1.08em; overflow: clip; font: 400 clamp(2.8rem, 4.2vw, 4.1rem)/1.08 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.cb-v, .cb-track { display: block; }
.cb-v { height: 1.08em; text-align: right; }
.cb-track.go { transform: translateY(-1.08em); transition: transform 680ms cubic-bezier(0.65, 0, 0.35, 1); }
@media (max-width: 640px) { .cb-box { font-size: 2.6rem; } }
.cb-k { text-transform: none; }
/* the lens: the hero's living subject. Its opening follows how far the recorded mid has moved from the fill price */
.hero-grid { grid-template-columns: minmax(0, 1fr) minmax(17rem, 19rem); }
.hero .card-t { font-size: 1.2rem; min-height: 0; margin-bottom: 0.4rem; }
.lens { position: relative; width: 100%; aspect-ratio: 1; margin: 0 0 0.5rem; }
.lens svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lens .glass { fill: #101113; }
.lens .blade { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.lens .ring { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.lens .tick { stroke: var(--ink-3); stroke-width: 1; }
.lens-read { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; margin: 0; pointer-events: none; }
.lens-read .cb-box { font-size: clamp(1.8rem, 2.3vw, 2.15rem); }
.lens-read .cb-v.pos { color: #4fd69c; } .lens-read .cb-v.neg { color: #ff8264; } .lens-read .cb-v.wait { color: #b6b3ab; } .lens-read .cb-v { color: #ece9e1; }
.lens-read .cb-k { margin-top: 0.25rem; font-size: 0.6875rem; color: #b6b3ab; }
.hero .rd-k, .hero .rd-v { line-height: 1.75; }
.hero .card-f { margin-top: 0.5rem; padding-top: 0.5rem; }
:root[data-theme="dark"] .lens .blade { fill: #2a2c30; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lens .blade { fill: #2a2c30; } }
@media (max-width: 980px) { .lens { max-width: 18rem; margin-inline: auto; } }
.hero .card { padding: 0.95rem 1.1rem 0.85rem; }
.hero .lens { max-width: 13.5rem; margin: 0.1rem auto 0.6rem; }
.hero .rd { grid-template-columns: 1fr 1fr; gap: 0.15rem 1.4rem; }
.hero .rd-row { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "k v" "b b"; align-items: baseline; }
.hero .rd-k { grid-area: k; } .hero .rd-v { grid-area: v; } .hero .rd .bar { grid-area: b; margin-bottom: 0.35rem; }
/* hero right column: the lens is the piece, no card box */
.hero .card { background: none; border: 0; box-shadow: none; padding: 0.2rem 0 0; }
.hero .lens { max-width: 19rem; margin: 0.2rem auto 0.7rem; }
.hero .card-f { border-top-color: var(--rule); }
@media (max-width: 980px) { .hero .lens { max-width: 18rem; } }
.lens-read { transition: opacity 120ms ease; } .lens-read.is-shut { opacity: 0; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .sc-pin { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .sc-note { margin-top: 0.9rem; } }
.lens-read .cb-v { background: #101113; padding: 0 0.12em; }
.lens-read .cb-k { background: #101113; padding: 0 0.3em; }
.rec-cap { max-width: 34rem; }
.rec-cap { max-width: 29rem; } @media (min-width: 981px) { .rec-cap { max-width: 29rem; } }

/* A 4K screen at 100%: the whole page scales up so type and column keep their size on the screen. */
@media (min-width: 3000px) { html { font-size: 135%; } }
