/* RRM project page. Warm, light, single theme; no build step.
   Chart colours were checked with the dataviz palette validator (light mode, white surface). */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f5efe7;
  --surface-3: #ece4d9;
  --line: rgba(66, 44, 24, .10);
  --line-2: rgba(66, 44, 24, .16);
  --line-3: rgba(66, 44, 24, .28);
  --ink: #2b241e;
  --ink-2: #5b5149;
  --ink-3: #75695e;
  --accent: #e2622c;          /* marks: lines, fills (3.5:1 on white) */
  --accent-ink: #b5461a;      /* text and solid buttons (5.4:1 on white) */
  --accent-deep: #9a3a13;
  --accent-soft: rgba(226, 98, 44, .11);
  --accent-line: rgba(226, 98, 44, .5);
  --critical: #d03b3b;
  --good: #0ca30c;
  --gt: #3b332c;
  --ctx: #d3c8bb;
  --mark: #8f8274;
  --fam-o: #e34948;
  --fam-ap: #eda100;
  --fam-r: #008300;
  --fam-tv: #e87ba4;
  --fam-h: #6250d6;
  --view-v: #b5461a;
  --view-px: #f0996a;
  --shadow: 0 1px 2px rgba(66, 44, 24, .04), 0 10px 30px -18px rgba(66, 44, 24, .18);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 14px;
  --wrap: 1160px;
  --gut: clamp(16px, 4vw, 40px);
  --nav-h: 56px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}
img, video, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
p a, .fine a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
p a:hover { text-decoration-color: var(--accent-ink); }
button { font: inherit; color: inherit; }
sup { font-size: .68em; line-height: 0; }
::selection { background: rgba(226, 98, 44, .22); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled {
  background: rgba(250, 247, 242, .84);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-in {
  max-width: var(--wrap); margin: 0 auto; height: var(--nav-h);
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
  display: flex; align-items: center; gap: 20px;
}
.brand { flex: none; display: inline-flex; align-items: center; gap: 10px; font: 600 13px/1 var(--mono); letter-spacing: .14em; color: var(--ink); }
.brand-mark { width: 22px; height: 22px; background: url("../img/favicon.svg") center / contain no-repeat; }
.nav nav { margin-left: auto; display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav nav::-webkit-scrollbar { display: none; }
.nav nav a { flex: none; padding: 7px 11px; border-radius: 8px; font-size: 13px; color: var(--ink-3); transition: color .2s, background .2s; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.on { color: var(--ink); background: var(--surface-3); }
@media (max-width: 700px) {
  .nav nav {
    padding: 0 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
  }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; isolation: isolate; text-align: center;
  padding: calc(var(--nav-h) + clamp(44px, 9vw, 112px)) 0 clamp(24px, 4vw, 40px);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 780px; pointer-events: none;
  background:
    radial-gradient(46% 52% at 50% 0%, rgba(235, 104, 52, .16), transparent 72%),
    radial-gradient(30% 36% at 88% 8%, rgba(237, 161, 0, .10), transparent 70%),
    radial-gradient(28% 34% at 10% 14%, rgba(232, 123, 164, .08), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; z-index: -2; inset: 0 0 auto; height: 820px; pointer-events: none; opacity: .6;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(58% 52% at 50% 22%, #000 8%, transparent 74%);
  mask-image: radial-gradient(58% 52% at 50% 22%, #000 8%, transparent 74%);
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 8px 14px 8px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .78);
  font: 500 11.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2);
}
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(226, 98, 44, 0); } }
.hero h1 { margin: 26px auto 0; color: var(--ink); font: 650 clamp(2.15rem, 6vw, 4.4rem)/1.03 var(--sans); letter-spacing: -.042em; }
.hero h1 .dim {
  background: linear-gradient(90deg, var(--ink-2) 10%, var(--accent-ink) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle { margin: 16px 0 0; font: italic 400 clamp(1.35rem, 2.7vw, 2.05rem)/1.2 var(--serif); color: var(--ink-2); }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; max-width: 860px; margin: 34px auto 0; font-size: 15.5px; color: var(--ink); }
.authors sup { color: var(--ink-3); margin-left: 1px; }
.affil { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-3); }
.affil .eq { flex-basis: 100%; font-size: 12.5px; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 17px 0 15px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px rgba(66, 44, 24, .05);
  transition: background .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { border-color: var(--line-3); transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(66, 44, 24, .25); }
.btn.primary { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.ghost { background: transparent; box-shadow: none; padding: 0 17px; }

/* load-in for the hero (CSS only, no JS needed) */
.rise { animation: rise .9s var(--ease) both; }
.hero-in > :nth-child(2) { animation-delay: .06s; }
.hero-in > :nth-child(3) { animation-delay: .12s; }
.hero-in > :nth-child(4) { animation-delay: .18s; }
.hero-in > :nth-child(5) { animation-delay: .22s; }
.hero-in > :nth-child(6) { animation-delay: .26s; }
.trace.rise { animation-delay: .34s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* hero trace */
.trace { margin: clamp(36px, 6vw, 68px) 0 0; }
.trace-svg { display: block; width: 100%; height: clamp(190px, 25vw, 310px); overflow: visible; }
.trace figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 22px; margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }
.trace figcaption em { font-family: var(--serif); font-size: 1.12em; color: var(--ink-2); }
.trace figcaption a { color: var(--accent-ink); border-bottom: 1px solid var(--accent-line); }
.trace figcaption a:hover { border-color: var(--accent-ink); }

/* hero stage: video frame (wall, then one execution) beside or above the trace.
   Wide screens: the frame spans the stage, then closes to a 4:3 box at the left and uncovers the chart.
   Narrow screens: a 4:3 frame with the chart below. main.js sets the camera and the frame width. */
.stage-box { position: relative; --sh: clamp(260px, 27vw, 340px); }
.stage-frame {
  position: relative; z-index: 1; overflow: hidden; width: 100%; max-width: 560px; aspect-ratio: 4 / 3; margin: 0 auto;
  border: 1px solid var(--line); border-radius: var(--r); background: #1c1916; box-shadow: var(--shadow);
}
.stage-wall { position: absolute; left: 0; top: 0; width: 1920px; height: 540px; transform-origin: 0 0; will-change: transform; }
.stage-wall video { position: absolute; display: block; }
.stage-mosaic { left: 0; top: 0; width: 1920px; height: 540px; }
.stage-clip { left: 1200px; top: 180px; width: 240px; height: 180px; object-fit: cover; background: #1c1916; }
.stage-chart { position: relative; margin-top: 20px; }
.stage .trace-svg { height: clamp(180px, 48vw, 240px); }
.stage .wall-btn { z-index: 2; }
@media (min-width: 860px) {
  .stage-box { height: var(--sh); }
  .stage-frame { position: absolute; left: 0; top: 0; height: 100%; max-width: none; aspect-ratio: auto; margin: 0; }
  .stage-chart { position: absolute; top: 0; right: 0; bottom: 0; left: calc(var(--sh) * 4 / 3 + 32px); margin: 0; }
  .stage .trace-svg { height: 100%; }
}

/* shared chart vocabulary (hero, lab, findings) */
.key { display: inline-block; width: 16px; height: 2px; border-radius: 2px; margin-right: 8px; vertical-align: middle; background: var(--gt); }
.key-model { height: 3px; background: var(--accent); }
.key-other { background: var(--ctx); }
.key-rev { width: 12px; height: 12px; border-radius: 3px; background: rgba(208, 59, 59, .14); box-shadow: inset 0 0 0 1px rgba(208, 59, 59, .32); vertical-align: -2px; }
.tk { font: 400 10.5px var(--mono); fill: var(--ink-3); }
.ttl { font: 500 11px var(--sans); fill: var(--ink-3); }
.grid line { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.grid line.base-line { stroke: var(--line-3); }
.gt-area { fill: rgba(59, 51, 44, .06); }
.gt-line { fill: none; stroke: var(--gt); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.m-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.m-glow { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linejoin: round; opacity: .2; }
.ctx-line { fill: none; stroke: var(--ctx); stroke-width: 1.25; stroke-linejoin: round; }
.rev { fill: rgba(208, 59, 59, .11); }
.dot { stroke: var(--surface); stroke-width: 2; }
.dot-gt { fill: var(--gt); }
.dot-m { fill: var(--accent); }

.trace-svg .dot { stroke: var(--bg); }
.trace-svg .rev { opacity: 0; transition: opacity .5s; }
.trace-svg .rev.on { opacity: 1; }
.trace-svg .fall { opacity: 0; transition: opacity .5s; }
.trace-svg .fall.on { opacity: 1; }
.trace-svg .fall text { font: 500 11.5px var(--sans); fill: var(--ink-2); }
.trace-svg .fall .fall-ic { fill: var(--critical); }
.trace-svg .fall .fall-x { stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.trace-svg .ph line { stroke: var(--ink); stroke-width: 1; opacity: .3; }
.trace-svg .ph text { fill: var(--ink-2); }
.trace-svg .ph, .trace-svg .ends { transition: opacity .45s; }
.trace-svg .ph.off { opacity: 0; }
.trace-svg .ends { opacity: 0; }
.trace-svg .ends.on { opacity: 1; }
.trace-svg .ends .nm { font: 400 10.5px var(--mono); fill: var(--ink-3); }
.trace-svg .ends .vl { font: 600 15px var(--sans); fill: var(--ink); font-variant-numeric: tabular-nums; }
.trace-svg .ends .gap { stroke: var(--critical); stroke-width: 1.5; stroke-dasharray: 2 3; }
.trace-svg .plot, .trace-svg .fade-g { transition: opacity .6s; }
.trace-svg.fade .plot, .trace-svg.fade .fade-g { opacity: 0; }

/* ---------------------------------------------------------------- tl;dr tiles */
.tldr { padding: clamp(40px, 6vw, 72px) 0 0; }
.tldr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 24px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s, opacity .8s var(--ease);
}
.tile:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.tile-k { font: 500 11px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.tile b { font: 650 clamp(2.4rem, 4.6vw, 3.3rem)/1 var(--sans); letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-t { font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 760px) { .tldr-grid { grid-template-columns: 1fr; } .tile { padding: 18px 18px 20px; } }

/* ---------------------------------------------------------------- sections */
.sec { padding: clamp(72px, 10vw, 128px) 0 0; }
#cite { padding-bottom: clamp(64px, 9vw, 112px); }
.sec-head { max-width: 780px; margin-bottom: clamp(26px, 4vw, 42px); }
.idx { display: inline-flex; align-items: center; gap: 10px; font: 500 11.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
.idx::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--accent); }
h2 { margin: 14px 0 0; color: var(--ink); font: 650 clamp(2rem, 4.4vw, 3.3rem)/1.06 var(--sans); letter-spacing: -.035em; }
h2 em { font: italic 400 1.1em/1 var(--serif); letter-spacing: -.01em; color: var(--accent-ink); }
.lead { margin: 16px 0 0; max-width: 64ch; font-size: clamp(15.5px, 1.55vw, 17.5px); color: var(--ink-2); }
.sub-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: clamp(40px, 6vw, 60px) 0 16px; font: 600 1.1rem/1.3 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.sub-h span { font: 400 13.5px var(--sans); letter-spacing: 0; color: var(--ink-3); }
.fine { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }

/* scroll reveal (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- 01 taxonomy */
.families { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.fam {
  position: relative; display: flex; flex-direction: column; padding: 18px 14px 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.fam::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); }
.fam::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 130px; pointer-events: none; opacity: .09;
  background: radial-gradient(70% 100% at 50% 0%, var(--c), transparent 70%);
}
.glyph { display: block; width: 100%; max-width: 168px; height: auto; aspect-ratio: 132 / 64; margin: 4px 0 16px; overflow: visible; }
.fam h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; font: 600 15px/1.25 var(--sans); color: var(--ink); }
.fam h3 .n { font: 500 13px var(--mono); color: var(--ink-3); }
.fam .q { margin: 8px 0 12px; min-height: 2.5em; font: italic 400 1.24rem/1.2 var(--serif); color: var(--ink); }
.dots { display: flex; flex-wrap: wrap; margin: 0 -5px; }
.grp { display: inline-flex; flex-wrap: wrap; max-width: 100%; margin-right: 8px; }
.dot-b { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; cursor: pointer; }
.dot-b::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); transition: transform .18s var(--ease); }
.dot-b.gen::before { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.dot-b.proto::before { border-radius: 2px; }
.dot-b:hover::before, .dot-b:focus-visible::before, .dot-b.on::before { transform: scale(1.55); }
.dot-b:focus-visible { outline-offset: -2px; }
.fam .out { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--line); font: 400 11.5px/1.45 var(--mono); color: var(--ink-3); }
.fam .dots { margin-bottom: 14px; }
.fam-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3); }
.fam-key i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--mark); }
.fam-key i.gen { background: transparent; box-shadow: inset 0 0 0 2px var(--mark); }
.fam-key i.proto { border-radius: 2px; }
@media (max-width: 1100px) { .families { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .families { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .families { grid-template-columns: 1fr; } .fam .q { min-height: 0; } }

/* family glyphs: rest state is the final frame; .play runs the build-up */
.glyph .trk { fill: none; stroke: var(--surface-3); stroke-width: 4; }
.glyph rect.trk { fill: var(--surface-3); stroke: none; }
.glyph .lbl { font: 400 10px var(--mono); fill: var(--ink-3); }
.glyph .lbl.c { font: 600 13px var(--sans); fill: var(--ink-2); }
.glyph .val { font: 600 17px var(--sans); fill: var(--ink); }
.glyph .val.sm { font: 500 11px var(--mono); }
.g-outcome .arc { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: 9.7; }
.g-outcome .chk { fill: none; stroke: var(--c); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 0; }
.g-progress .fill, .g-hybrid .bar { fill: var(--c); transform-box: fill-box; transform-origin: left center; }
.g-progress .fill { transform: scaleX(.62); }
.g-relative .fr { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.5; }
.g-relative .fr.a { stroke: var(--c); stroke-width: 2; }
.g-relative .cmp { font: 400 24px var(--sans); fill: var(--ink); }
.g-value .trk { stroke-width: 2; }
.g-value .prog { stroke: var(--c); stroke-width: 2; stroke-dasharray: 112; stroke-dashoffset: 37; }
.g-value .pip { fill: var(--surface); stroke: var(--line-3); stroke-width: 2; }
.g-value .pip.on { fill: var(--c); stroke: var(--c); }
.g-hybrid .b1 { transform: scaleX(.72); }
.g-hybrid .b2 { transform: scaleX(.18); }
.g-hybrid .why { font: 500 10px var(--mono); fill: var(--ink-2); }

.play .g-outcome .arc { animation: g-arc 1.5s var(--ease) both; }
.play .g-outcome .chk { animation: g-draw .5s .95s var(--ease) both; }
@keyframes g-arc { from { stroke-dashoffset: 138.2; } }
@keyframes g-draw { from { stroke-dashoffset: 30; } }
.play .g-progress .fill { animation: g-grow 1.6s var(--ease) both; }
.play .g-hybrid .b1 { animation: g-grow 1.3s .1s var(--ease) both; }
.play .g-hybrid .b2 { animation: g-grow 1.3s .35s var(--ease) both; }
.play .g-hybrid .why { animation: g-fade .5s 1s both; }
@keyframes g-grow { from { transform: scaleX(0); } }
@keyframes g-fade { from { opacity: 0; } }
.play .g-relative .fr.a { animation: g-win 1.6s var(--ease) both; }
.play .g-relative .cmp, .play .g-relative .pref { animation: g-fade .5s .9s both; }
@keyframes g-win { 0%, 45% { stroke: var(--line-2); stroke-width: 1.5; } }
.play .g-value .prog { animation: g-line 1.6s var(--ease) both; }
.play .g-value .pip.p2 { animation: g-pip .3s .45s both; }
.play .g-value .pip.p3 { animation: g-pip .3s 1.05s both; }
.play .g-value .eta { animation: g-fade .5s 1.2s both; }
@keyframes g-line { from { stroke-dashoffset: 112; } }
@keyframes g-pip { from { fill: var(--surface); stroke: var(--line-3); } }

/* method list */
.all-methods { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.all-methods summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.all-methods summary::-webkit-details-marker { display: none; }
.all-methods summary::after { content: "+"; font: 400 18px/1 var(--mono); color: var(--ink-3); transition: transform .25s var(--ease); }
.all-methods[open] summary::after { transform: rotate(45deg); }
.all-methods summary:hover { color: var(--ink); }
.all-methods > .fine { margin: 0; padding: 0 18px 16px; }
.method-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 28px; padding: 6px 18px 18px; }
.ml-fam h4 { margin: 0 0 8px; padding-top: 10px; border-top: 3px solid var(--c); font: 600 14px var(--sans); color: var(--ink); display: flex; justify-content: space-between; }
.ml-fam h4 span { font: 500 12px var(--mono); color: var(--ink-3); }
.ml-fam dl { margin: 0; }
.ml-fam dt { margin-top: 10px; font: 500 11px/1.4 var(--mono); color: var(--ink-3); }
.ml-fam dd { margin: 3px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); }

/* ---------------------------------------------------------------- 02 benchmark */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--line); box-shadow: var(--shadow); }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px 16px; background: var(--surface); }
.kpi b { font: 650 clamp(1.55rem, 2.7vw, 2.15rem)/1.05 var(--sans); letter-spacing: -.025em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; line-height: 1.35; color: var(--ink-3); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi { padding: 14px; } }

.wall { position: relative; margin: 12px 0 0; }
.wall-frame { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: #1c1916; box-shadow: var(--shadow); }
.wall video { display: block; width: 100%; aspect-ratio: 32 / 9; object-fit: cover; }
.wall-btn {
  position: absolute; right: 10px; bottom: 10px; z-index: 1; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(28, 25, 22, .62); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.wall-btn svg { width: 12px; height: 12px; fill: currentColor; }
.wall figcaption { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 640px) { .wall video { aspect-ratio: 16 / 9; } }

.suites { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.suite {
  display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 18px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s, opacity .8s var(--ease);
}
.suite:hover, .suite:focus-visible { border-color: var(--accent-line); }
.suite:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(66, 44, 24, .04), 0 18px 36px -20px rgba(66, 44, 24, .28); }
.s-top { display: flex; align-items: center; justify-content: space-between; }
.s-letter { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); font: 600 13px var(--mono); color: var(--accent-ink); }
.s-n { font: 500 12px var(--mono); color: var(--ink-3); }
.s-n b { color: var(--ink); font-weight: 600; }
.s-glyph { display: block; width: 100%; height: auto; aspect-ratio: 160 / 70; margin: 10px 0 8px; overflow: visible; }
.s-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.s-slogan { font: italic 400 1.38rem/1.15 var(--serif); color: var(--ink); }
.s-desc { margin-bottom: 4px; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.s-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font: 500 10.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.s-foot i { font-style: normal; color: var(--accent-ink); transition: transform .2s var(--ease); }
.suite:hover .s-foot i { transform: translateX(2px); }
@media (max-width: 1000px) { .suites { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .suites { grid-template-columns: 1fr; } }

/* suite glyphs */
.s-glyph .base { stroke: var(--line-3); stroke-width: 1.5; }
.sg-a .stain-ring { fill: none; stroke: var(--line-3); stroke-width: 1.2; stroke-dasharray: 3 3; }
.sg-a .stain { fill: #9b7246; }
.sg-a .rag { fill: var(--surface-2); stroke: var(--ink-2); stroke-width: 1.5; }
.sg-a .tag-x, .sg-b .tag-x, .sg-c .tag-x { stroke: var(--critical); stroke-width: 2; stroke-linecap: round; }
.sg-b .bin { fill: none; stroke: var(--line-3); stroke-width: 1.5; }
.sg-b .bin.ok { stroke-dasharray: 3 3; }
.sg-b .bin.bad { stroke: var(--critical); }
.sg-b .arcpath { fill: none; stroke: var(--line-2); stroke-width: 1.2; stroke-dasharray: 2 3; }
.sg-b .obj { fill: var(--ink-2); }
.sg-b .bl { font: 400 9.5px var(--mono); fill: var(--ink-3); }
.sg-c .curve { fill: none; stroke: var(--gt); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 190; stroke-dashoffset: 0; }
.sg-c .peak { fill: var(--ink); }
.sg-c .drop { fill: var(--critical); }
.sg-d .view { fill: var(--surface-2); stroke: var(--line-3); stroke-width: 1.5; }
.sg-d .eye { fill: none; stroke: var(--ink-2); stroke-width: 1.6; }
.sg-d .pupil { fill: var(--ink-2); }
.sg-d .slash { stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; }
.sg-d .q { font: 600 15px var(--sans); fill: var(--ink); }
.sg-d .vl { font: 400 9.5px var(--mono); fill: var(--ink-3); }

.play .sg-a .rag { animation: s-wipe 2.2s ease-in-out both; }
.play .sg-a .tag-x { animation: g-fade .4s 2.1s both; }
@keyframes s-wipe { 0% { transform: translateX(-30px); } 25% { transform: translateX(24px); } 50% { transform: translateX(-22px); } 75% { transform: translateX(18px); } 100% { transform: none; } }
.play .sg-b .obj { animation: s-carry 1.8s var(--ease) both; }
.play .sg-b .bin.bad, .play .sg-b .tag-x { animation: s-bad .4s 1.7s both; }
@keyframes s-carry { 0% { transform: translate(-40px, 30px); } 30% { transform: translate(-40px, 0); } 70% { transform: translate(14px, -2px); } 100% { transform: none; } }
@keyframes s-bad { from { stroke: var(--line-3); opacity: .2; } }
.play .sg-c .curve { animation: s-line 2s var(--ease) both; }
.play .sg-c .peak { animation: g-fade .3s .9s both; }
.play .sg-c .drop, .play .sg-c .tag-x { animation: g-fade .3s 1.6s both; }
@keyframes s-line { from { stroke-dashoffset: 190; } }
.play .sg-d .q { animation: s-q 2s ease-in-out both; }
@keyframes s-q { 0%, 30% { opacity: 0; } 45% { opacity: 1; } 60% { opacity: .35; } 80%, 100% { opacity: 1; } }

/* ---------------------------------------------------------------- 03 lab */
.lab { padding: clamp(14px, 2.4vw, 26px); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px); background: var(--surface); box-shadow: var(--shadow); }
.lab-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px 2px; }
.lab-tabs::-webkit-scrollbar { display: none; }
.lab-tab {
  flex: none; display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 15px 0 7px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: 13.5px; font-weight: 500;
  transition: color .2s, background .2s, border-color .2s;
}
.lab-tab b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--mono); background: var(--surface-2); color: var(--ink-2); transition: background .2s, color .2s; }
.lab-tab:hover { color: var(--ink); border-color: var(--line-3); }
.lab-tab[aria-selected="true"] { color: var(--ink); background: var(--surface-2); border-color: var(--line-2); }
.lab-tab[aria-selected="true"] b { background: var(--accent-ink); color: #fff; }
.lab-slogan { margin: 14px 0 0; font-size: 14px; color: var(--ink-3); }
.lab-slogan b { margin-right: 8px; font: italic 400 1.25rem/1.2 var(--serif); color: var(--ink); }
.lab-cases { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.case-chip {
  display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; cursor: pointer; text-align: left;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  transition: border-color .2s, background .2s, color .2s;
}
.case-chip img { display: block; width: 52px; height: 39px; border-radius: 8px; object-fit: cover; background: #1c1916; }
.case-chip small { display: block; margin-top: 1px; font: 400 11px var(--mono); color: var(--ink-3); }
.case-chip:hover { border-color: var(--line-3); color: var(--ink); }
.case-chip[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }

.lab-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(18px, 2.6vw, 30px); align-items: start; }
@media (max-width: 920px) { .lab-main { grid-template-columns: 1fr; } }
.vid-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 12px; background: #1c1916; }
.vid-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.vid-badge, .vid-event {
  position: absolute; left: 10px; padding: 5px 9px; border-radius: 7px; pointer-events: none;
  background: rgba(28, 25, 22, .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 500 11px/1.3 var(--mono); color: #fff;
}
.vid-badge { top: 10px; letter-spacing: .04em; }
.vid-event { bottom: 10px; display: inline-flex; align-items: center; gap: 7px; font: 600 13px/1.3 var(--sans); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease); }
.vid-event.show { opacity: 1; transform: none; }
.ic { flex: none; width: 15px; height: 15px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--mark); }
.ic svg { width: 9px; height: 9px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.failure { background: var(--critical); }
.ic.neutral svg { stroke-width: 3.2; }
.ic.success { background: var(--good); }

.vid-controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.icon-btn { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; border: 0; background: var(--accent-ink); color: #fff; transition: background .2s, transform .2s var(--ease); }
.icon-btn:hover { background: var(--accent-deep); transform: scale(1.04); }
.icon-btn svg { width: 14px; height: 14px; fill: currentColor; }
.icon-btn .i-pause, .icon-btn.playing .i-play { display: none; }
.icon-btn.playing .i-pause { display: inline; }
.scrub { position: relative; flex: 1; height: 28px; cursor: pointer; touch-action: none; }
.scrub::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--surface-3); }
.scrub-fill { position: absolute; left: 0; top: 50%; width: 0; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--accent); }
.scrub-knob { position: absolute; left: 0; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent-ink); box-shadow: 0 1px 4px rgba(66, 44, 24, .25); }
.scrub .ev-tick { position: absolute; top: 50%; width: 2px; height: 10px; margin: -5px 0 0 -1px; border-radius: 1px; background: var(--mark); pointer-events: none; }
.scrub .ev-tick.failure { background: var(--critical); }
.scrub .ev-tick.success { background: var(--good); }
.time { min-width: 6ch; text-align: right; font: 500 12px var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.txt-btn { flex: none; height: 30px; min-width: 40px; padding: 0 10px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 500 12px var(--mono); }
.txt-btn:hover { color: var(--ink); border-color: var(--line-3); }
.cam-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.cam-toggle button { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; cursor: pointer; text-align: left; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); transition: border-color .2s, background .2s; }
.cam-toggle button b { font-size: 13.5px; font-weight: 600; }
.cam-toggle button span { font: 400 11px var(--mono); color: var(--ink-3); }
.cam-toggle button:hover { border-color: var(--line-3); }
.cam-toggle button[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }

.lab-inst { margin: 0; font: italic 400 1.22rem/1.35 var(--serif); color: var(--ink); }
.lab-desc { margin: 8px 0 0; font-size: 14px; color: var(--ink-3); }
.lab-readout { display: flex; flex-wrap: wrap; gap: 4px 18px; min-height: 19px; margin: 16px 0 6px; font: 500 12px var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lab-readout span { white-space: nowrap; }
.lab-readout .key { width: 12px; margin-right: 6px; }
.lab-chart { position: relative; height: clamp(240px, 28vw, 310px); border-radius: 8px; cursor: crosshair; touch-action: pan-y; }
.lab-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lab-chart .hv line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.lab-chart .ph line { stroke: var(--ink); stroke-width: 1; opacity: .45; }
.lab-chart .ev-line { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 3; }
.lab-chart .ev-mk { opacity: .45; transition: opacity .3s; }
.lab-chart .ev-mk.past { opacity: 1; }
.lab-chart .ev-mk circle { stroke: var(--surface); stroke-width: 2; }
.lab-chart .ev-mk.neutral circle { fill: var(--mark); }
.lab-chart .ev-mk.failure circle { fill: var(--critical); }
.lab-chart .ev-mk.success circle { fill: var(--good); }
.lab-chart .ev-mk path { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lab-chart .ev-mk.neutral path { stroke-width: 3.4; }
.lab-events { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.ev { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 6px; cursor: pointer; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: 12.5px; font-weight: 500; transition: color .25s, border-color .25s, background .25s; }
.ev time { font: 400 11px var(--mono); color: var(--ink-3); }
.ev .ic { opacity: .45; transition: opacity .25s; }
.ev.past { color: var(--ink); border-color: var(--line-2); background: var(--surface-2); }
.ev.past .ic { opacity: 1; }
.ev:hover { border-color: var(--line-3); }
.lab-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.lab-legend b { font-weight: 500; color: var(--ink-2); }
.toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.toggle input { margin: 0; accent-color: var(--accent-ink); }
.lab-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.mchip { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 11px; cursor: pointer; text-align: left; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); transition: border-color .2s, background .2s; }
.mchip:hover { border-color: var(--line-3); }
.mchip b { padding-right: 24px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.mchip .sub { font-size: 11.5px; color: var(--ink-3); }
.mchip .st { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font: 500 11px var(--mono); color: var(--ink-3); }
.mchip .st em { font-style: normal; color: var(--ink-2); }
.mchip::after { content: ""; position: absolute; top: 17px; right: 12px; width: 16px; height: 2px; border-radius: 2px; background: var(--ctx); }
.mchip[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); }
.mchip[aria-pressed="true"]::after { height: 3px; background: var(--accent); }
.lab-note { margin-top: 16px; }
@media (max-width: 920px) { .lab-models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .mchip .sub { display: none; } }

/* ---------------------------------------------------------------- 04 findings */
.finding { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(22px, 4vw, 56px); align-items: center; padding: clamp(30px, 4vw, 46px) 0; border-top: 1px solid var(--line); }
.sec-head + .finding { padding-top: 0; border-top: 0; }
.f-k { font: 500 11.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
.f-big { display: block; margin: 12px 0 10px; font: 650 clamp(2.4rem, 5vw, 3.5rem)/1 var(--sans); letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.finding h3 { margin: 0 0 8px; font: 600 1.14rem/1.3 var(--sans); color: var(--ink); }
.finding .f-text p { margin: 0; font-size: 15px; color: var(--ink-2); }
.f-viz { margin: 0; padding: clamp(14px, 2vw, 22px); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.mk { display: inline-block; width: 10px; height: 10px; margin-right: 7px; vertical-align: -1px; background: var(--mark); }
.mk-spec { border-radius: 50%; }
.mk-vlm { border-radius: 2px; }
.mk-dec { transform: rotate(45deg) scale(.86); border-radius: 1px; }
.mk-clock { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); vertical-align: -2px; }
.mk-v { border-radius: 50%; background: var(--view-v); }
.mk-px { border-radius: 50%; background: var(--view-px); }
.viz .pt { fill: var(--mark); stroke: var(--surface); stroke-width: 2; transition: fill .15s; }
.viz .pt.hl { fill: var(--ink); }
.viz .clock { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.viz .clock-h { stroke: #fff; stroke-width: 1.5; stroke-linecap: round; }
.viz .lab-t { font: 600 11.5px var(--sans); fill: var(--ink); }
.viz .lab-t.dim { font-weight: 500; fill: var(--ink-2); }
.viz .hit { fill: transparent; cursor: pointer; }
.viz .row-t { font: 400 11px var(--sans); fill: var(--ink-2); }
.viz .row-t.hl { fill: var(--ink); font-weight: 600; }
.viz .conn { stroke: var(--surface-3); stroke-width: 2.5; stroke-linecap: round; }
.viz .dv { fill: var(--view-v); stroke: var(--surface); stroke-width: 2; }
.viz .dpx { fill: var(--view-px); stroke: var(--surface); stroke-width: 2; }
.viz .row-bg { fill: transparent; }
.viz .row-bg.hl { fill: var(--surface-2); }
@media (max-width: 860px) { .finding { grid-template-columns: 1fr; } }

.meters { display: flex; flex-direction: column; gap: 26px; }
.m-title { margin: 0 0 4px; font-size: 13.5px; color: var(--ink-2); }
.m-top, .m-bot { position: relative; height: 18px; font: 500 11.5px/18px var(--mono); color: var(--ink-3); }
.m-top .band { position: absolute; right: calc(100% - var(--hi) * 1%); bottom: 2px; white-space: nowrap; color: var(--accent-ink); font-weight: 600; }
.m-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); }
.m-band { position: absolute; top: 0; bottom: 0; left: calc(var(--lo) * 1%); width: calc((var(--hi) - var(--lo)) * 1%); border-radius: 5px; background: var(--accent); transform-origin: left center; }
.m-base { position: absolute; top: -5px; bottom: -5px; left: calc(var(--base) * 1%); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); }
.m-bot { display: flex; justify-content: space-between; margin-top: 5px; }
.m-bot .base { position: absolute; left: calc(var(--base) * 1%); transform: translateX(-50%); white-space: nowrap; color: var(--ink-2); }
.js .meter .m-band { transform: scaleX(0); transition: transform 1.3s var(--ease) .35s; }
.js .meter .m-top .band { opacity: 0; transition: opacity .6s 1.2s; }
.js .in .meter .m-band { transform: none; }
.js .in .meter .m-top .band { opacity: 1; }

.directions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none; counter-reset: dir; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--line); box-shadow: var(--shadow); }
.directions li { counter-increment: dir; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 20px; background: var(--surface); }
.directions li::before { content: counter(dir, decimal-leading-zero); margin-bottom: 6px; font: 600 11px var(--mono); color: var(--accent-ink); }
.directions b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.directions span { font-size: 13.5px; color: var(--ink-3); }
@media (max-width: 860px) { .directions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .directions { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- 05 leaderboard */
.board-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.board-filters button { height: 32px; padding: 0 14px; cursor: pointer; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500; transition: color .2s, background .2s, border-color .2s; }
.board-filters button:hover { color: var(--ink); border-color: var(--line-3); }
.board-filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
#board-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13.5px; }
#board-table th, #board-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
#board-table thead th { background: var(--surface-2); font: 500 11.5px var(--mono); letter-spacing: .03em; color: var(--ink-3); }
#board-table th[data-sort] { cursor: pointer; user-select: none; transition: color .2s; }
#board-table th[data-sort]:hover { color: var(--ink); }
#board-table th[aria-sort] { color: var(--accent-ink); }
#board-table th[aria-sort="descending"]::after { content: " ↓"; }
#board-table th[aria-sort="ascending"]::after { content: " ↑"; }
#board-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
#board-table td.num { color: var(--ink-2); }
#board-table td.bar { background: linear-gradient(rgba(226, 98, 44, .16), rgba(226, 98, 44, .16)) no-repeat right 4px center / var(--w, 0%) 62%; }
#board-table td.best { color: var(--ink); font-weight: 700; }
#board-table .c-rank { width: 2.6em; color: var(--ink-3); font-family: var(--mono); }
#board-table td.c-name { font-weight: 500; color: var(--ink); }
#board-table td.c-name .meta { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
#board-table tbody tr { transition: background .15s; }
#board-table tbody tr:hover { background: var(--bg); }
#board-table tfoot td { border-bottom: 0; border-top: 1px solid var(--line-2); color: var(--ink-3); background: var(--bg); }
#board-table tfoot tr + tr td { border-top: 1px solid var(--line); }
.tag { margin-left: 6px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* ---------------------------------------------------------------- 06 hub */
.hub { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(18px, 3vw, 36px); align-items: start; }
@media (max-width: 920px) { .hub { grid-template-columns: 1fr; } }
.code-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: #fffdf9; box-shadow: 0 1px 2px rgba(66, 44, 24, .04), 0 30px 60px -36px rgba(181, 70, 26, .35); }
.code-tabs { display: flex; align-items: center; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.code-tabs button { height: 30px; padding: 0 12px; cursor: pointer; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); font: 500 12.5px var(--mono); transition: color .2s, background .2s; }
.code-tabs button:hover { color: var(--ink); }
.code-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(66, 44, 24, .08); }
.dots3 { display: flex; gap: 6px; margin-left: auto; padding-right: 4px; }
.dots3 i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.dots3 i:first-child { background: #f0996a; }
.dots3 i:nth-child(2) { background: #eda100; }
.code { display: none; margin: 0; min-height: 232px; padding: 18px 20px 22px; overflow-x: auto; font: 400 13px/1.75 var(--mono); color: var(--ink); tab-size: 2; }
.code.on { display: block; }
.code .k { color: var(--accent-ink); font-weight: 500; }
.code .s { color: #7a5a0c; }
.code .c, .code .p { color: var(--ink-3); }
.code .ln { display: block; width: fit-content; min-height: 1.75em; white-space: pre; }
.code.typing .ln { clip-path: inset(0 100% 0 0); animation-name: type; animation-fill-mode: forwards; }
@keyframes type { to { clip-path: inset(0 0 0 0); } }
.caret { display: inline-block; width: .55em; height: 1.15em; margin-left: 2px; vertical-align: -3px; background: var(--accent); animation: blink 1.1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hub-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.hub-stats div { padding: 16px; border-left: 1px solid var(--line); }
.hub-stats div:first-child { border-left: 0; }
.hub-stats b { display: block; font: 650 1.9rem/1 var(--sans); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.hub-stats span { font-size: 12.5px; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips li { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font: 500 12px var(--mono); color: var(--ink-2); }
.hub-points { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-3); }
.hub-points b { font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------------- cite + footer */
.bib { position: relative; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.bib pre { margin: 0; padding: 20px 22px; overflow-x: auto; font: 400 13px/1.7 var(--mono); color: var(--ink-2); }
.copy { position: absolute; top: 12px; right: 12px; height: 30px; padding: 0 12px; cursor: pointer; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 500 12px var(--mono); transition: color .2s, border-color .2s; }
.copy:hover { color: var(--ink); border-color: var(--line-3); }
.copy.done { color: var(--accent-ink); border-color: var(--accent-line); }
.foot { padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }

/* ---------------------------------------------------------------- tooltip */
.tip {
  position: fixed; left: 0; top: 0; z-index: 80; max-width: 270px; padding: 8px 11px; pointer-events: none;
  border: 1px solid var(--line-2); border-radius: 9px; background: rgba(255, 255, 255, .98);
  box-shadow: 0 12px 32px -8px rgba(66, 44, 24, .28); font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
}
.tip b { display: block; font-weight: 600; color: var(--ink); }
.tip .sm { display: block; font-size: 11.5px; color: var(--ink-3); }
.tip .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 11.5px; color: var(--ink); }
.tip .row span:first-child { display: inline-flex; align-items: center; font-family: var(--sans); font-size: 12px; color: var(--ink-2); }
.tip .row .key { width: 10px; margin-right: 6px; }
.tip .mk { width: 8px; height: 8px; margin-right: 6px; }
/* ---------------------------------------------------------------- motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .caret { display: none; }
}
