/*
 * Olab marketing — one stylesheet for every page (zero-build, W19 v2).
 * The app's OKLCH tokens, retuned editorially. The v2 grammar, in one line:
 * the VISUAL leads and the copy is short. Every section is built from a
 * handful of primitives defined here —
 *   .stage    a lit canvas an animated scene fills edge to edge
 *   .feature  a split where the stage takes ~62% and the copy ≤36ch
 *   .bento    a 12-column grid of cells, each carrying a live vignette
 *   .numbers  large tabular figures with their sources
 *   .statement one paragraph set as display type — the manifesto register
 * Dark is the site's face; light is honored; print is a leave-behind.
 * Motion: site.js adds .in to [data-reveal] and .play to [data-anim].
 */

:root {
  --bg: oklch(0.14 0.011 252);
  --bg2: oklch(0.165 0.012 252);
  --surface: oklch(0.185 0.012 252);
  --surface2: oklch(0.225 0.013 251);
  --surface3: oklch(0.27 0.014 251);
  --line: oklch(0.29 0.014 250);
  --line-hi: oklch(1 0 0 / 0.09);
  --ink: oklch(0.965 0.005 245);
  --ink2: oklch(0.8 0.01 245);
  --ink3: oklch(0.6 0.012 245);
  --accent: oklch(0.8 0.145 75);
  --accent-ink: oklch(0.2 0.03 75);
  --accent-soft: oklch(0.8 0.145 75 / 0.14);
  --cool: oklch(0.72 0.12 245);
  --cool-soft: oklch(0.72 0.12 245 / 0.14);
  --good: oklch(0.76 0.125 160);
  --warn: oklch(0.8 0.125 80);
  --crit: oklch(0.68 0.165 25);
  --good-soft: oklch(0.76 0.125 160 / 0.14);
  --warn-soft: oklch(0.8 0.125 80 / 0.14);
  --crit-soft: oklch(0.68 0.165 25 / 0.15);
  --glow-accent: oklch(0.8 0.145 75 / 0.2);
  --glow-cool: oklch(0.65 0.12 250 / 0.16);
  --edge: inset 0 1px 0 oklch(1 0 0 / 0.07);
  --shadow-stage: 0 40px 90px -40px oklch(0 0 0 / 0.75), 0 0 0 1px oklch(1 0 0 / 0.05);
  --shadow-menu: 0 8px 24px oklch(0 0 0 / 0.5);
  --grid-ink: oklch(1 0 0 / 0.035);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --t-2: 150ms; --t-3: 200ms; --t-4: 300ms;
  --font-sans: "Geist", "Geist Variable", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "Geist Mono Variable", ui-monospace, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: oklch(0.985 0.003 250);
    --bg2: oklch(0.965 0.004 250);
    --surface: oklch(1 0 0);
    --surface2: oklch(0.95 0.005 250);
    --surface3: oklch(0.91 0.007 250);
    --line: oklch(0.86 0.009 250);
    --line-hi: oklch(0.86 0.009 250);
    --ink: oklch(0.17 0.016 255);
    --ink2: oklch(0.36 0.016 252);
    --ink3: oklch(0.49 0.014 250);
    /* deep enough that near-white ink on a filled accent button clears 4.5:1
     * (the nav CTA); accent-as-text on every light surface clears it too */
    --accent: oklch(0.54 0.14 62);
    --accent-ink: oklch(0.99 0 0);
    --accent-soft: oklch(0.54 0.14 62 / 0.13);
    --cool: oklch(0.52 0.13 250);
    --cool-soft: oklch(0.52 0.13 250 / 0.12);
    --good: oklch(0.5 0.12 160);
    --warn: oklch(0.55 0.12 75);
    --crit: oklch(0.5 0.17 27);
    --good-soft: oklch(0.5 0.12 160 / 0.12);
    --warn-soft: oklch(0.55 0.12 75 / 0.13);
    --crit-soft: oklch(0.5 0.17 27 / 0.11);
    --glow-accent: oklch(0.7 0.14 70 / 0.16);
    --glow-cool: oklch(0.6 0.12 250 / 0.12);
    --edge: inset 0 1px 0 oklch(1 0 0 / 0.85);
    --shadow-stage: 0 30px 70px -36px oklch(0.2 0.02 250 / 0.35), 0 0 0 1px oklch(0.2 0.02 250 / 0.06);
    --shadow-menu: 0 0 0 1px oklch(0.2 0.02 250 / 0.08), 0 16px 24px -8px oklch(0 0 0 / 0.08);
    --grid-ink: oklch(0 0 0 / 0.045);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: oklch(from var(--accent) l c h / 0.28); }
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); border-radius: 6px; }

/* ---------- type scale (marketing register) ---------- */
h1, h2, h3 { margin: 0; text-wrap: balance; }
.display { font-size: clamp(3rem, 7.4vw, 6.6rem); font-weight: 600; line-height: 0.96; letter-spacing: -0.04em; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); font-weight: 600; line-height: 1.0; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); font-weight: 600; line-height: 1.06; letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
p { margin: 0.8rem 0; max-width: 58ch; }
.lede { font-size: clamp(1.1rem, 1.45vw, 1.32rem); color: var(--ink2); line-height: 1.5; max-width: 40ch; letter-spacing: -0.01em; }
.quiet { color: var(--ink2); }
.faint { color: var(--ink3); }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); opacity: 0.8; }
.eyebrow.center { justify-content: center; }
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
small, .small { font-size: 0.85rem; }
.accent { color: var(--accent); }
.statement {
  font-size: clamp(1.5rem, 2.7vw, 2.35rem); font-weight: 500; line-height: 1.25;
  letter-spacing: -0.025em; max-width: 30ch; color: var(--ink); text-wrap: pretty;
}
.statement strong { font-weight: 600; color: var(--accent); }
.kicker { font-size: clamp(1.25rem, 1.9vw, 1.6rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }

/* ---------- layout & rhythm ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }
.narrow { max-width: 780px; }
section { padding: clamp(3.5rem, 6.5vw, 5.5rem) 0; position: relative; }
.hero + section { padding-top: clamp(2rem, 4vw, 3.25rem); }
section.tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
section.band { background: var(--bg2); }
section.band::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--line-hi) 30%, oklch(from var(--accent) l c h / 0.35) 50%, var(--line-hi) 70%, transparent 95%);
}
section.glow-top::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 40% at 50% 0%, var(--glow-accent), transparent 70%);
  opacity: 0.55;
}
section > .wrap { position: relative; z-index: 1; }
.section-head { max-width: 46ch; margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }
.section-head .lede { margin-top: 1rem; }

/* the split: stage first in weight, copy second in width */
.feature { display: grid; gap: clamp(1.6rem, 4vw, 3.5rem); align-items: center; }
.feature-copy { max-width: 38ch; }
.feature-copy h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.feature-copy .lede { font-size: clamp(1.02rem, 1.25vw, 1.15rem); max-width: 38ch; }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  .feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
  .feature.flip .feature-copy { order: 2; }
  .feature.flip .feature-stage { order: 1; }
}
/* legacy alias kept for pages not yet on the v2 grammar */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 880px) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  .split.flip > :first-child { order: 2; }
  .split.flip > :last-child { order: 1; }
}
.grid2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- chrome: nav + footer (identical on every page) ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: oklch(from var(--bg) l c h / 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid oklch(from var(--line) l c h / 0.7);
}
.site-nav .wrap { display: flex; align-items: center; gap: 1.6rem; height: 62px; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 1.06rem; letter-spacing: -0.01em; text-decoration: none; }
.brand .tag { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); margin-left: 0.2rem; }
.nav-links { display: flex; gap: 1.35rem; margin-left: auto; }
.nav-links a { font-size: 0.92rem; color: var(--ink2); text-decoration: none; transition: color var(--t-2) ease; padding: 0.3rem 0; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--accent); }
.nav-cta { margin-left: 0.4rem; }
.site-nav .nav-menu-btn { display: none; }
/* nine links + the CTA need ~1180px; below that the sheet takes over */
@media (max-width: 1180px) {
  .nav-links, .site-nav .nav-cta { display: none; }
  .site-nav .nav-menu-btn { display: inline-flex; margin-left: auto; }
}
.nav-sheet { position: fixed; inset: 62px 0 auto 0; z-index: 49; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-menu); padding: 0.8rem 1.2rem 1.2rem; }
.nav-sheet a { display: block; padding: 0.7rem 0.4rem; font-size: 1rem; color: var(--ink2); text-decoration: none; border-bottom: 1px solid var(--line); }
.nav-sheet a:last-child { border-bottom: 0; }
.nav-sheet[hidden] { display: none; }

.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 3.5rem; margin-top: 2rem; background: var(--bg2); }
.site-footer .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-footer h3 { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); margin: 0 0 0.7rem; font-weight: 500; }
.site-footer a { display: block; color: var(--ink2); text-decoration: none; font-size: 0.92rem; padding: 0.22rem 0; }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { margin-top: 2.2rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink3); line-height: 1.8; }

/* ---------- components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface2); color: var(--ink);
  font: inherit; font-weight: 500; font-size: 0.95rem;
  padding: 0.7rem 1.25rem; cursor: pointer; text-decoration: none;
  box-shadow: var(--edge); user-select: none; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background var(--t-2) ease, border-color var(--t-2) ease, box-shadow var(--t-3) ease;
}
.btn:hover { background: oklch(from var(--surface2) calc(l + 0.03) c h); border-color: var(--ink3); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.22), 0 1px 2px oklch(0 0 0 / 0.25), 0 12px 32px -12px oklch(from var(--accent) l c h / 0.55);
}
.btn-primary:hover { background: oklch(from var(--accent) calc(l + 0.035) c h); border-color: transparent; box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.22), 0 1px 2px oklch(0 0 0 / 0.25), 0 16px 40px -12px oklch(from var(--accent) l c h / 0.7); }
.btn-lg { font-size: 1.05rem; padding: 0.9rem 1.5rem; border-radius: 12px; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink2); }
.btn-ghost:hover { background: var(--surface2); color: var(--ink); }
.ctas { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }

.card {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
}
.card::before {
  content: ""; position: absolute; inset: 0 10% auto 10%; height: 1px; border-radius: 1px;
  background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.12), transparent);
  pointer-events: none;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .card::before { content: none; } }
.card.pad { padding: 1.4rem 1.5rem; }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 999px;
  padding: 0.18rem 0.65rem; font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.05em; white-space: nowrap;
  background: var(--surface2); color: var(--ink2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.chip.good { background: var(--good-soft); color: var(--good); box-shadow: inset 0 0 0 1px oklch(from var(--good) l c h / 0.25); }
.chip.warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px oklch(from var(--warn) l c h / 0.25); }
.chip.crit { background: var(--crit-soft); color: var(--crit); box-shadow: inset 0 0 0 1px oklch(from var(--crit) l c h / 0.25); }
.chip.accent { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px oklch(from var(--accent) l c h / 0.25); }
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* The dot is absolutely placed, NOT a flex item: an <li> carrying inline
 * markup (<b>, <em>, a chip) would otherwise split into one flex column per
 * fragment, which is how this list breaks. */
.proof-list { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.proof-list li { position: relative; padding-left: 1.3rem; color: var(--ink2); font-size: 0.95rem; max-width: 40ch; line-height: 1.45; }
.proof-list li::before { content: ""; position: absolute; left: 0; top: 0.52rem; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px oklch(from var(--accent) l c h / 0.6); }
.proof-list li b, .proof-list li strong { color: var(--ink); font-weight: 600; }

/* ---------- beat link: a section's deep link into the /demo stage ----------
 * Quiet by default; the page's live probe (data-live-probe on <main>) lights
 * it when the local stage answers, exactly like the landing page's grid. */
.beatlinks { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
.beatlink {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.34rem 0.75rem; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink3); text-decoration: none;
  transition: color var(--t-2) ease, box-shadow var(--t-2) ease;
}
.beatlink::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); }
.beatlink:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink3); }
[data-live="1"] .beatlink { color: var(--accent); box-shadow: inset 0 0 0 1px oklch(from var(--accent) l c h / 0.4); }
[data-live="1"] .beatlink::before { background: var(--good); box-shadow: 0 0 8px var(--good); }
[data-live="0"] .beatlink { opacity: 0.55; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; font-weight: 500; color: var(--ink3); text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); background: oklch(from var(--surface2) l c h / 0.5); white-space: nowrap; }
td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }

/* ---------- THE STAGE: every animated scene fills one ----------
 * A lit canvas: warm glow top-right, cool glow bottom-left, a faint grid,
 * a gradient hairline, and a long soft drop. The SVG inside fills it edge
 * to edge — no inner margins, no letterboxing: the scene IS the stage.
 * `.scene` is the v1 name and resolves to the same thing. */
.stage, .scene {
  position: relative; border-radius: 22px; overflow: hidden; isolation: isolate;
  margin: 0; /* figures carry UA margins that would shrink the stage */
  background:
    radial-gradient(90% 70% at 88% -10%, var(--glow-accent), transparent 60%),
    radial-gradient(80% 60% at -5% 105%, var(--glow-cool), transparent 60%),
    linear-gradient(180deg, var(--surface2), var(--surface) 55%);
  box-shadow: var(--shadow-stage), var(--edge);
}
.stage::before, .scene::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-ink) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(75% 75% at 50% 45%, black 30%, transparent 100%);
}
.stage::after, .scene::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, oklch(1 0 0 / 0.16), oklch(1 0 0 / 0.04) 40%, oklch(from var(--accent) l c h / 0.22) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .stage::after, :root:not([data-theme="dark"]) .scene::after {
    background: linear-gradient(160deg, oklch(0 0 0 / 0.12), oklch(0 0 0 / 0.05) 40%, oklch(from var(--accent) l c h / 0.3) 100%);
  }
}
.stage > svg, .scene > svg { display: block; width: 100%; height: auto; position: relative; z-index: 1; }
.stage > img, .stage > video, .scene > img, .scene > video { display: block; width: 100%; height: auto; position: relative; z-index: 1; }
.stage.plain::before { content: none; }
.stage.plain { background: var(--surface); }

/* ---------- THE CALM STAGE (the hero rule sheet, Sep 2026) ----------
 * The dashboard register the site is moving to, proven on the landing hero
 * first: a flat tray, white cards with a soft drop and no stroke, one accent
 * per card, two type weights, a dot-and-word status pill top-right of every
 * card, equal column heights, 40-unit padding on all four sides of a
 * 1200×620 viewBox and 20-unit gutters, nothing in the padding, nothing that
 * loops. Scenes opt in with `.stage.calm`; the geometry lives in each SVG. */
.stage.calm { background: var(--bg2); box-shadow: none; border-radius: 24px; }
.stage.calm::before, .stage.calm::after { content: none; }
.stage.calm text { font-family: var(--font-sans); }
/* an SVG scene's caption is spoken (figcaption + aria-label), not drawn over the grid;
 * a film, audio or screenshot stage keeps its caption, as quiet text without the chip */
.stage.calm:has(> svg) .stage-cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; margin: -1px; }
.stage.calm:not(:has(> svg)) .stage-cap { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0; text-transform: none; color: var(--ink3); }
.stage.calm:not(:has(> svg)) .stage-cap::before { display: none; }
/* over a film or a screenshot the caption keeps its chip (plain text on a picture is
 * unreadable); only a stage with nothing pictorial behind it (the audio brief) goes bare */
.stage.calm:not(:has(> svg)):not(:has(> video)):not(:has(> img)) .stage-cap { background: transparent; box-shadow: none; backdrop-filter: none; }
.stage.calm [data-replay] { background: transparent; box-shadow: none; backdrop-filter: none; color: var(--ink3); font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0; text-transform: none; }
/* Mobile crop-zoom (opt-in per scene): a feature-stage SVG that declares
 * preserveAspectRatio="… slice" fills a square stage on narrow screens, so the
 * middle (or the left/right, with xMin/xMax) of the story renders at legible scale
 * instead of the whole scene shrinking to a thumbnail. */
@media (max-width: 720px) {
  .feature-stage:has(> svg[preserveAspectRatio*="slice"]) { aspect-ratio: 1 / 1; }
  .feature-stage > svg[preserveAspectRatio*="slice"] { height: 100%; width: 100%; }
  .stage-cap, .scene-cap { font-size: 0.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 28px); }
  .stage-cap::before, .scene-cap::before { display: none; }
  .stage-cap, .scene-cap { max-width: 62%; }
}
/* a stage that holds a video keeps its caption clear of the native controls */
.stage:has(> video) .stage-cap { top: 50px; right: 14px; left: auto; bottom: auto; pointer-events: none; }
.frame-chrome { min-width: 0; }
.frame-chrome .url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* the caption: an overlay chip, bottom-left; the replay: top-right, quiet
 * until the stage is hovered or the button focused (always shown on touch) */
.stage-cap, .scene-cap {
  position: absolute; left: 14px; bottom: 12px; z-index: 4;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.38rem 0.7rem; border-radius: 999px;
  background: oklch(from var(--bg) l c h / 0.72); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line-hi);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink2); max-width: calc(100% - 28px); border-top: 0;
}
.stage-cap::before, .scene-cap::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); flex: none; }
.stage [data-replay], .scene [data-replay] {
  position: absolute; right: 12px; top: 12px; z-index: 4;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.65rem; border-radius: 999px; border: 0;
  background: oklch(from var(--bg) l c h / 0.72); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line-hi);
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink2); cursor: pointer;
  opacity: 0; transition: opacity var(--t-3) ease, color var(--t-2) ease;
}
.stage:hover [data-replay], .scene:hover [data-replay], .stage [data-replay]:focus-visible, .scene [data-replay]:focus-visible { opacity: 1; }
@media (hover: none) { .stage [data-replay], .scene [data-replay] { opacity: 1; } }
.stage [data-replay]:hover, .scene [data-replay]:hover { color: var(--ink); }
/* the caption row of the v1 pattern is a flex row containing the button;
 * under v2 both children are absolutely placed, so the row is just a hook */
.scene-cap > span { display: contents; }
.scene-cap .btn { position: absolute; right: 12px; top: auto; bottom: 12px; }

/* scene text is REAL type at product size: nothing under 12px */
.stage text, .scene text { font-family: var(--font-sans); }
.stage .mono, .scene .mono, .stage text.mono, .scene text.mono { font-family: var(--font-mono); }

/* ---------- BENTO: a 12-column grid of cells with live vignettes ---------- */
.bento { display: grid; gap: 0.9rem; grid-template-columns: repeat(12, minmax(0, 1fr)); }
/* Sep 2026 calm register (docs/design/calm-stage.md §11): the cell IS the card —
 * white, radius 20, a soft drop, no stroke, no hairline; the vignette is a flat
 * window at its top and draws no card of its own. */
.cell {
  position: relative; grid-column: span 12; display: flex; flex-direction: column;
  background: var(--surface); border: 0; border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 2px oklch(0.2 0.02 250 / 0.05), 0 10px 24px -10px oklch(0.2 0.02 250 / 0.1);
  text-decoration: none; color: inherit;
  transition: transform 220ms var(--ease-out), box-shadow var(--t-3) ease;
}
a.cell:hover { transform: translateY(-2px); box-shadow: 0 1px 2px oklch(0.2 0.02 250 / 0.05), 0 18px 36px -14px oklch(0.2 0.02 250 / 0.18); }
@media (min-width: 640px) { .cell.c6, .cell.c4, .cell.c3, .cell.c8 { grid-column: span 6; } }
@media (min-width: 980px) {
  .cell.c3 { grid-column: span 3; } .cell.c4 { grid-column: span 4; }
  .cell.c6 { grid-column: span 6; } .cell.c8 { grid-column: span 8; }
}
.cell .vig { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg2); }
.cell .vig.tall { aspect-ratio: 4 / 3; }
.cell .vig > svg { display: block; width: 100%; height: 100%; }
.cell .body { padding: 1.05rem 1.2rem 1.25rem; display: grid; gap: 0.35rem; align-content: start; }
.cell .body .idx { font-size: 0.78rem; color: var(--ink3); }
.cell .body h3 { font-size: 1.05rem; }
.cell .body p { margin: 0; font-size: 0.92rem; color: var(--ink2); max-width: none; line-height: 1.45; }
.cell .body .more { margin-top: 0.4rem; font-size: 0.86rem; color: var(--accent); font-weight: 500; }
.cell.text-only .body { padding: 1.25rem 1.3rem 1.35rem; }

/* ---------- NUMBERS: figures big enough to be the visual ---------- */
.numbers { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.num { padding: 1.4rem clamp(1rem, 2.5vw, 2rem); position: relative; }
.num + .num::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: var(--line); }
@media (max-width: 700px) { .num + .num::before { left: 0; right: 0; top: 0; bottom: auto; height: 1px; width: auto; } }
.num .fig { font-size: clamp(2.8rem, 5vw, 4.4rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.num .fig small { font-size: 0.42em; font-weight: 500; letter-spacing: -0.01em; color: var(--ink2); margin-left: 0.15em; }
.num .cap { display: block; margin-top: 0.55rem; color: var(--ink2); font-size: 0.95rem; max-width: 26ch; line-height: 1.4; }
.num .src { display: block; margin-top: 0.55rem; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em; color: var(--ink3); text-transform: uppercase; }

/* ---------- misc primitives ---------- */
.frame-chrome { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.9rem; background: oklch(from var(--surface2) l c h / 0.8); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink3); letter-spacing: 0.06em; position: relative; z-index: 2; }
.frame-chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; }
.frame-chrome i:first-child { background: oklch(from var(--crit) l c h / 0.7); }
.frame-chrome i:nth-child(2) { background: oklch(from var(--warn) l c h / 0.7); }
.frame-chrome i:nth-child(3) { background: oklch(from var(--good) l c h / 0.7); }
.frame-chrome .url { margin-left: 0.5rem; padding: 0.2rem 0.6rem; border-radius: 6px; background: var(--bg); color: var(--ink2); }

/* ---------- motion ----------
 * Reveals: elements carry data-reveal (optionally data-reveal-delay="120");
 * site.js adds .in when ~18% visible. Scenes carry data-anim; site.js adds
 * .play once (and replays on click of [data-replay]). Durations honor the
 * frequency law: reveals are quick and quiet, scenes may take their time. */
[data-reveal] { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), filter 0.7s var(--ease-out); transition-delay: var(--rd, 0ms); }
[data-reveal].in { opacity: 1; transform: none; filter: none; }

/* Loop hygiene: any infinite animation inside a scene pauses while the scene
 * is offscreen (site.js toggles .offstage) — one-shot choreography keeps its
 * held final frame untouched because `both` fill + finished state persists. */
[data-anim].offstage * { animation-play-state: paused; }

/* shared ambient keyframes any scene may use */
@keyframes pulse-glow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes drift-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(0.7); } 70% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* ripple starts hidden for one percent so a delayed animation with `both` fill never leaks its ring */
@keyframes ripple { 0% { opacity: 0; transform: scale(0.35); } 1% { opacity: 0.9; } 100% { opacity: 0; transform: scale(2.2); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
  /* Scenes: animations are removed OUTRIGHT (a zeroed duration still honors
   * its delay, holding wrong from-frames for seconds); each page's .reduced
   * rules paint the finished frame instead — every scene author handles it. */
  [data-anim], [data-anim] * { animation: none !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── print: the leave-behind ──
 * The light palette is restated because print keeps the screen's scheme;
 * chrome, replay buttons and video go; reveals are forced visible and scene
 * animations removed — site.js stamps .reduced + .play onbeforeprint so each
 * scene prints its finished frame (a JS-less print shows pre-frames only). */
@media print {
  :root {
    --bg: oklch(1 0 0); --bg2: oklch(1 0 0);
    --surface: oklch(1 0 0);
    --surface2: oklch(0.955 0.004 250);
    --surface3: oklch(0.92 0.006 250);
    --line: oklch(0.85 0.009 250);
    --line-hi: oklch(0.85 0.009 250);
    --ink: oklch(0.17 0.016 255);
    --ink2: oklch(0.34 0.016 252);
    --ink3: oklch(0.47 0.014 250);
    --accent: oklch(0.54 0.14 62);
    --accent-ink: oklch(0.99 0 0);
    --accent-soft: oklch(0.54 0.14 62 / 0.13);
    --cool: oklch(0.5 0.13 250); --cool-soft: oklch(0.5 0.13 250 / 0.12);
    --good: oklch(0.5 0.12 160);
    --warn: oklch(0.55 0.12 75);
    --crit: oklch(0.5 0.17 27);
    --good-soft: oklch(0.5 0.12 160 / 0.12);
    --warn-soft: oklch(0.55 0.12 75 / 0.13);
    --crit-soft: oklch(0.5 0.17 27 / 0.11);
    --glow-accent: transparent; --glow-cool: transparent; --grid-ink: transparent;
    --edge: none; --shadow-stage: none;
    --shadow-menu: none;
    color-scheme: light;
  }
  .site-nav, .nav-sheet, [data-replay], video { display: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  [data-anim], [data-anim] * { animation: none !important; }
  .stage, .scene, .cell { box-shadow: none; border: 1px solid var(--line); }
  .card, .stage, .scene, .cell, figure, table { break-inside: avoid; }
}

/* W23 — the day brief: an audio stage. The player and its persona chips sit
 * in the body; the caption keeps its overlay slot beneath them. */
.audio-stage .audio-body { position: relative; z-index: 1; padding: 1.1rem 1.25rem 3.6rem; display: grid; gap: 0.95rem; }
.audio-stage audio { width: 100%; display: block; border-radius: 12px; }
.audio-pick { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.audio-pick .chip { border: 0; font: inherit; font-size: 0.82rem; cursor: pointer; padding: 0.42rem 0.75rem; }
.audio-pick .chip.is-on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px oklch(from var(--accent) l c h / 0.35); }
.audio-transcript { font-size: 0.92rem; line-height: 1.55; color: var(--ink2); max-width: 72ch; margin: 0.5rem 0 0; white-space: pre-line; }
.audio-stage details summary { cursor: pointer; font-size: 0.9rem; color: var(--ink2); }
.audio-note { font-size: 0.85rem; line-height: 1.5; color: var(--ink3); max-width: 72ch; margin: 0; }
