@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #0A0A0A;
  --ink: #F5F5ED;
  --accent: #84F800;
  --muted: #8A8A82;
  --line: #2A2A27;
  --red: #FF5C3D;
  --coral: #FF5C3D;
  --panel: #111110;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gut: 40px;
  --index-w: 196px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  overflow-x: clip;
  overflow-wrap: break-word;   /* a long URL or command in running text wraps instead of widening the page */
}
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, pre, kbd { font-family: var(--mono); }
code { font-size: .88em; }
p code, li code, dd code, td code { color: var(--ink); background: #1A1A18; padding: 1px 4px; border: 1px solid var(--line); }
b { font-weight: 600; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: #0A0A0A; padding: 8px 12px; z-index: 50; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.stub-banner { margin: 0; padding: 10px var(--gut); background: var(--red); color: #0A0A0A; font: 700 13px/1.4 var(--mono); letter-spacing: .02em; }
.stub-banner code { background: transparent; border: 0; color: #0A0A0A; }
.pending { display: inline-block; margin: 8px 0; padding: 6px 10px; border: 1px dashed var(--red); color: var(--red); font: 600 13px/1.4 var(--mono); }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 14px var(--gut);
  border-bottom: 1px solid var(--line);
  font: 500 13px/1 var(--mono);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: 15px; }
.brand img { width: 22px; height: 22px; }
.path { color: var(--muted); }
.path a { color: var(--muted); text-decoration: none; }
.path a:hover { color: var(--accent); }
.topbar-cta { margin-left: auto; text-decoration: none; color: #0A0A0A; background: var(--accent); padding: 8px 12px; font-weight: 700; letter-spacing: .02em; }
.topbar-cta:hover { color: #0A0A0A; background: var(--ink); }

/* ---------- frame ---------- */
.wrap {
  display: grid;
  grid-template-columns: var(--index-w) minmax(0, 1fr);
  gap: 0 56px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--gut);
}
main { min-width: 0; padding-bottom: 64px; }

.index { position: sticky; top: 0; z-index: 2; align-self: start; padding: 36px 0 24px; max-height: 100vh; overflow-y: auto; }
.index-title { margin: 0 0 14px; font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.index ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.index a {
  display: flex; gap: 12px; padding: 7px 0 7px 14px; margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.3;
}
.index a span { font: 500 12px/1.5 var(--mono); color: #5E5E58; min-width: 18px; }
.index a:hover { color: var(--ink); }
.index a.is-active { color: var(--ink); border-left-color: var(--accent); }
.index a.is-active span { color: var(--accent); }

/* ---------- sections ---------- */
.sec { padding: 48px 0 8px; scroll-margin-top: 12px; }
.sec + .sec { border-top: 1px solid var(--line); margin-top: 40px; }
h2 {
  display: flex; align-items: baseline; gap: 16px;
  margin: 0 0 22px; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; font-weight: 600; letter-spacing: -.015em;
}
.num { font: 500 14px/1 var(--mono); color: var(--accent); letter-spacing: .04em; }
h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
h4 { margin: 18px 0 6px; font-size: 15px; }
p { margin: 0 0 14px; }
.lede { color: #CFCFC6; max-width: 68ch; }
.muted, .note, .label { color: var(--muted); }
.note { font-size: 14px; max-width: 70ch; }
.label { margin: 14px 0 6px; font: 500 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.count { font: 500 13px/1.5 var(--mono); color: var(--muted); margin-bottom: 12px; }

/* ---------- 01 bulletin ---------- */
.bulletin { padding-top: 56px; }
.honesty { margin: 0; border-top: 2px solid var(--ink); }
.honesty > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.honesty dt { font: 600 12px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.honesty dd { margin: 0; max-width: 72ch; }
.cite { font: 500 12px/1 var(--mono); color: var(--muted); margin-left: 4px; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 22px 0 0; font: 600 14px/1.4 var(--mono); }
.status-k { padding: 4px 8px; border: 1px solid var(--accent); color: var(--accent); font-size: 12px; letter-spacing: .1em; }

/* ---------- 02 run ---------- */
.run { border-top: 2px solid var(--ink); }
.block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.block-side p:not(.label):not(.note) { color: #CFCFC6; font-size: 15px; }
.block-code { min-width: 0; }
.block-code > .label:first-child { margin-top: 0; }
.block:first-child pre { font-size: 15px; border-left: 3px solid var(--accent); }
.step { display: inline-block; margin-right: 10px; font: 600 12px/1 var(--mono); color: #0A0A0A; background: var(--ink); padding: 3px 6px; vertical-align: 2px; }
h3 em { font-style: normal; font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-left: 6px; }
.checksum { margin-top: 18px; font-size: 14px; color: var(--muted); max-width: 90ch; }

pre {
  margin: 0 0 12px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.6; color: var(--ink);
  overflow-x: auto; white-space: pre; tab-size: 2;
}
pre code { font-size: inherit; background: none; border: 0; padding: 0; }
.block:first-child pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.copywrap { position: relative; }
.copywrap pre { padding-right: 76px; }
pre.copyable { white-space: pre-wrap; overflow-wrap: anywhere; }
.copy {
  position: absolute; top: 8px; right: 8px;
  font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  padding: 7px 9px; cursor: pointer; min-height: 28px;
}
.copy:hover { border-color: var(--accent); color: var(--accent); }
.copy.done { background: var(--accent); color: #0A0A0A; border-color: var(--accent); }

/* ---------- 03 key share ---------- */
.ks { margin: 0; }
.ks-controls { display: none; margin: 0 0 20px; border: 1px solid var(--line); width: fit-content; }
.js .ks-controls { display: flex; }
.ks-tab { font: 600 13px/1 var(--mono); letter-spacing: .02em; color: var(--muted); background: transparent; border: 0; padding: 11px 16px; cursor: pointer; min-height: 40px; }
.ks-tab + .ks-tab { border-left: 1px solid var(--line); }
.ks-tab[aria-pressed="true"] { background: var(--ink); color: #0A0A0A; }
.ks-tab:hover:not([aria-pressed="true"]) { color: var(--ink); }
.ks-stage { display: none; grid-template-columns: minmax(0, 1fr); gap: 26px; max-width: 980px; }
.js .ks-stage { display: grid; }
.ks-col { min-width: 0; }
.ks-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 0 0 10px; font: 500 12px/1.3 var(--mono); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.ks-head b { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 14px; }
.ks-canvas { display: block; width: 100%; max-width: 100%; height: auto; cursor: crosshair; touch-action: manipulation; }
.ks-head .ks-total { margin-left: auto; font: 500 13px/1 var(--mono); color: var(--muted); text-transform: none; letter-spacing: 0; }
.ks-head .ks-total b { font-size: 30px; color: var(--ink); font-weight: 600; letter-spacing: -.02em; margin-right: 6px; font-family: var(--sans); }
.ks-col-hybrid .ks-total b { color: var(--accent); }
.ks-legend { display: none; list-style: none; margin: 22px 0 0; padding: 0; gap: 8px; flex-wrap: wrap; }
.js .ks-legend { display: flex; }
.ks-seg { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1.2 var(--mono); color: var(--ink); background: transparent; border: 1px solid var(--line); padding: 9px 12px; cursor: pointer; min-height: 40px; text-align: left; }
.ks-seg b { color: var(--muted); font-weight: 500; }
.ks-seg:hover, .ks-seg.is-on { border-color: var(--ink); }
.sw { width: 12px; height: 12px; flex: none; }
.sw-g { background: var(--accent); }
.sw-w { background: var(--ink); }
.ks-readout { display: none; min-height: 1.6em; margin: 14px 0 0; font: 500 14px/1.5 var(--mono); color: var(--ink); }
.js .ks-readout { display: block; }
.ks-fallback { max-width: 72ch; font-size: 17px; }
.js .ks-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ks figcaption { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 78ch; color: #CFCFC6; }
.src { display: block; margin-top: 6px; font: 500 12px/1.5 var(--mono); color: var(--muted); }

/* ---------- 04 tools ---------- */
.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; padding: 22px 0; border-top: 1px solid var(--line); }
.tool-side p { color: #CFCFC6; font-size: 15px; }
.tool-side .cmd { margin-bottom: 10px; }
.tool-side .cmd code { font-size: 14px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; overflow-wrap: anywhere; }
.tool-out { min-width: 0; }
.tool-out pre { margin: 0; font-size: 12.5px; }

/* ---------- 05 order ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; }
.prose p { max-width: 64ch; }
.warn { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; font-weight: 500; }
.waves { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.waves li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.waves .w { font: 600 26px/1 var(--mono); color: var(--accent); }
.waves li:first-child .w { color: var(--red); }
.waves b { display: block; margin-bottom: 2px; }
.waves div { color: #CFCFC6; font-size: 15px; }
.waves div b { color: var(--ink); }

/* ---------- tables ---------- */
.table-box { border: 1px solid var(--line); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { position: sticky; top: 0; background: var(--bg); font: 600 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid #3A3A36; z-index: 1; }
tbody tr:last-child > * { border-bottom: 0; }
.table-box:has(#rules-table) { max-height: 680px; }
.rules td.id { font: 600 12.5px/1.45 var(--mono); white-space: nowrap; }
.sev { display: inline-block; font: 700 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 6px; border: 1px solid var(--line); color: var(--muted); }
.sev-critical { color: var(--red); border-color: var(--red); }
.sev-high { color: var(--ink); border-color: var(--ink); }
.sev-medium { color: #CFCFC6; }
.exp { display: block; margin-top: 6px; font: 500 11.5px/1.3 var(--mono); color: var(--muted); white-space: nowrap; }
.rules tr[hidden] { display: none; }

.rules-all > summary { cursor: pointer; width: fit-content; margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--line); font: 600 12.5px/1 var(--mono); letter-spacing: .04em; color: var(--ink); min-height: 36px; }
.rules-all > summary:hover { border-color: var(--accent); }
.rules-all[open] > summary { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chips[hidden] { display: none; }
.chip { font: 500 12.5px/1 var(--mono); color: var(--muted); background: transparent; border: 1px solid var(--line); padding: 9px 11px; cursor: pointer; min-height: 36px; }
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip[aria-pressed="true"] { color: #0A0A0A; background: var(--ink); border-color: var(--ink); }
.chip i { font-style: normal; opacity: .6; margin-left: 6px; }

.standards { list-style: none; margin: 0 0 24px; padding: 0; border-top: 2px solid var(--ink); }
.standards li { display: grid; grid-template-columns: 110px 110px minmax(0, 1fr) auto; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.standards b { font-family: var(--mono); font-size: 14px; }
.std-name { font: 600 14px/1.3 var(--mono); color: var(--accent); }
.std-plain { color: #CFCFC6; }
.std-date { font: 500 12.5px/1.3 var(--mono); color: var(--muted); }

.support th[scope="row"] { font-weight: 600; min-width: 150px; }
.support td[data-h] { font-family: var(--mono); font-size: 13px; }
.support .notes { color: #CFCFC6; min-width: 200px; }
.support .src { white-space: nowrap; margin: 0; font-size: 13px; }
.checked { display: block; font: 500 11.5px/1.4 var(--mono); color: var(--muted); }
.tag-unv { display: inline-block; margin-left: 6px; font: 700 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--muted); padding: 3px 5px; vertical-align: 2px; }
.row-unv th, .row-unv td { color: #A9A9A1; }

/* ---------- 08 tested ---------- */
.fixture { font-size: 14px; border-left: 3px solid var(--accent); }
.mdsec { margin-top: 26px; max-width: 80ch; }
.mdsec h3 { font-size: 15px; font-family: var(--mono); font-weight: 600; letter-spacing: .02em; }
.mdsec ul, .misses { margin: 0 0 14px; padding-left: 20px; }
.mdsec li, .misses li { margin-bottom: 6px; }
.misses { max-width: 70ch; font-size: 17px; }
.misses li::marker { color: var(--muted); }
.bigline { font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -.01em; margin-top: 20px; }

/* ---------- 10 / 11 / 12 ---------- */
.snippet { white-space: pre-wrap; word-break: break-word; }
.files { max-width: 860px; border-top: 2px solid var(--ink); margin-bottom: 18px; }
.files th { font: 600 14px/1.4 var(--mono); white-space: nowrap; width: 1%; padding-right: 28px; }
.files td { color: #CFCFC6; }
.files tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
.sums { font-size: 12px; }
.meta { margin-top: 18px; font: 500 13px/1.6 var(--mono); color: var(--muted); }
.sources { margin: 0; padding: 0; list-style: none; counter-reset: src; border-top: 2px solid var(--ink); max-width: 960px; }
.sources li { counter-increment: src; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sources li::before { content: counter(src, decimal-leading-zero); font: 500 12px/1.7 var(--mono); color: var(--muted); grid-row: span 2; }
.s-l1, .s-l2 { grid-column: 2; min-width: 0; }
.s-title { font-weight: 600; }
.s-pub { color: var(--muted); font-size: 14px; margin-left: 6px; }
.s-l2 { font-size: 13.5px; color: #CFCFC6; }
.s-l2 > span + span::before { content: "\B7"; margin: 0 8px; color: var(--muted); }
.s-url, .s-chk { font: 500 12px/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; }

.foot { border-top: 1px solid var(--line); padding: 22px var(--gut) 40px; font: 500 13px/1.6 var(--mono); color: var(--muted); }
.foot p { margin: 0; max-width: 1360px; margin-inline: auto; }
.foot a { color: var(--muted); }

/* ---------- words that explain themselves ---------- */
.term { color: inherit; text-decoration: underline dotted; text-decoration-color: #A9A9A1; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: help; }
.term:hover, .term[aria-describedby] { color: var(--ink); text-decoration-style: solid; text-decoration-color: var(--accent); }
.hint { margin: -14px 0 28px; max-width: 62ch; font-size: 14px; color: var(--muted); }
.js .nojs-only { display: none; }
html:not(.js) .js-only { display: none; }
.tip {
  position: absolute; left: 0; top: 0; z-index: 60;
  width: max-content; max-width: min(360px, calc(100vw - 24px));
  padding: 12px 14px 13px; background: #171715; border: 1px solid var(--ink);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .7);
  color: var(--ink); font: 400 14px/1.5 var(--sans); letter-spacing: 0; text-transform: none;
}
.tip[hidden], .tip-more[hidden] { display: none; }
.tip-term { display: block; margin-bottom: 5px; font: 600 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tip-text { display: block; }
.tip-more { display: block; margin-top: 8px; font: 500 11.5px/1.4 var(--mono); color: var(--muted); }

/* ---------- 02 three things ---------- */
.three { list-style: none; margin: 0; padding: 0; counter-reset: three; border-top: 2px solid var(--ink); }
.three > li { counter-increment: three; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 24px; padding: 22px 0 10px; border-bottom: 1px solid var(--line); }
.three > li::before { content: counter(three); grid-row: 1 / span 8; font: 600 44px/1 var(--mono); color: var(--accent); }
.three > li > * { grid-column: 2; max-width: 78ch; }
.three h3 { margin-bottom: 8px; font-size: 20px; }
.three p:not(.note) { color: #CFCFC6; }
.after { margin-top: 22px; max-width: 78ch; border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; }

/* ---------- small lists, exit codes, folded notes ---------- */
.nw { white-space: nowrap; }
.use { margin-top: -4px; }
.tool-side .use { font-size: 14px; color: var(--muted); }
.use b { color: var(--ink); }
.aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; padding-top: 26px; border-top: 1px solid var(--line); }
.plain { margin: 0 0 14px; padding-left: 20px; max-width: 78ch; }
.plain li { margin-bottom: 8px; color: #CFCFC6; }
.plain li b { color: var(--ink); }
.plain li::marker { color: var(--muted); }
.guard-notes { margin-top: 16px; }
.codes { border-top: 2px solid var(--ink); }
.codes th { width: 1%; padding-right: 22px; white-space: nowrap; font: 600 15px/1.5 var(--mono); color: var(--accent); }
.codes td { color: #CFCFC6; }
.codes tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
.fold > summary { cursor: pointer; width: fit-content; margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--line); font: 600 12.5px/1 var(--mono); letter-spacing: .04em; color: var(--ink); min-height: 36px; }
.fold > summary:hover { border-color: var(--accent); }
.fold[open] > summary { color: var(--muted); }
.mdsec .table-box { margin-bottom: 14px; }
.mdsec td, .mdsec th { font-size: 13.5px; }
.mdsec td:first-child, .mdsec th:first-child { min-width: 11em; }

/* ---------- 13 glossary ---------- */
.gloss { columns: 2; column-gap: 56px; margin: 0; border-top: 2px solid var(--ink); }
.g { padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; break-inside: avoid; }
.g dt { margin-bottom: 4px; font: 600 14px/1.4 var(--mono); }
.g dd { margin: 0; color: #CFCFC6; font-size: 15px; }
.g-also { margin-left: 10px; font: 500 11.5px/1.4 var(--mono); color: var(--muted); }
.g:target { border-bottom-color: var(--accent); }
.g:target dt { color: var(--accent); }
.g:target dt::before { content: "\2192\00A0"; }


/* ---------- the descent: hero + six-step scroll story over the strata canvas ---------- */
.descent { position: relative; border-bottom: 1px solid var(--line); }
.descent-stage { display: block; position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 0; }
.strata-canvas { display: block; width: 100%; height: 100%; }
.stage-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,10,10,.92) 0%, rgba(10,10,10,.7) 28%, rgba(10,10,10,0) 44%); }
.beats { position: relative; z-index: 1; }
.beats { margin-top: -100vh; margin-top: -100svh; }
.beat { display: flex; align-items: center; padding: 48px var(--gut); max-width: 1360px; margin: 0 auto; }
.beat { min-height: 100vh; min-height: 100svh; }
.beat-card { width: 100%; max-width: 500px; }
.beat-hero .beat-card { max-width: 560px; }
.has-strata .beat:not(.beat-hero) .beat-card { opacity: .32; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.has-strata .beat.is-active .beat-card { opacity: 1; transform: none; }
.beat h1 {
  margin: 0 0 22px; max-width: 100%;
  font-size: clamp(40px, 4.2vw, 60px); line-height: .98; font-weight: 700; letter-spacing: -.04em; color: var(--ink);
}
.beat h2 { display: block; margin: 0 0 16px; font-size: clamp(30px, 3.1vw, 44px); line-height: 1.02; font-weight: 700; letter-spacing: -.03em; }
.beat p { color: #DADAD1; font-size: 17px; line-height: 1.55; }
.stamp { display: flex; flex-wrap: wrap; margin: 0 0 26px; font: 600 12px/1 var(--mono); letter-spacing: .08em; border: 1px solid rgba(245,245,237,.7); width: fit-content; max-width: 100%; }
.stamp > * { padding: 8px 11px; border-left: 1px solid rgba(245,245,237,.7); }
.stamp b { background: var(--accent); color: #0A0A0A; border-left: 0; font-weight: 700; }
.survey, .depth { display: flex; gap: 12px; align-items: baseline; margin: 0 0 14px; font: 600 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.survey span, .depth span { color: var(--coral); letter-spacing: .04em; text-transform: none; }
.depth { color: var(--accent); }
.depth::after { content: ""; flex: 1; max-width: 120px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); align-self: center; }
.pitch { font-size: 18px; line-height: 1.5; max-width: 50ch; color: #DADAD1; margin-bottom: 26px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; font: 700 15px/1 var(--sans); letter-spacing: -.005em; text-decoration: none; border: 1px solid var(--ink); }
.btn-go { background: var(--accent); border-color: var(--accent); color: #0A0A0A; }
.btn-go:hover { background: var(--ink); border-color: var(--ink); color: #0A0A0A; }
.btn-line { color: var(--ink); background: rgba(10,10,10,.6); }
.btn-line:hover { color: #0A0A0A; background: var(--ink); }
.scroll-cue { display: block; margin-top: 34px; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; color: var(--muted) !important; }
.scroll-cue span { color: var(--ink); border: 1px solid var(--line); padding: 3px 7px; margin-right: 8px; text-transform: uppercase; }
.beat-cmd { margin: 4px 0 14px; border: 1px solid rgba(132,248,0,.35); border-left: 3px solid var(--accent); background: rgba(10,10,10,.85); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; }
.beat .beat-more { font: 500 13px/1.5 var(--mono); color: var(--muted); }
.beat-more a { color: var(--ink); }

/* ---------- sections as strata bands ---------- */
.sec { position: relative; }
.sec::before {
  content: attr(data-survey); position: absolute; right: 0; top: 18px;
  font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #6E6E66;
}
.sec + .sec { border-top: 0; margin-top: 24px; }
.sec + .sec, .bulletin {
  background:
    linear-gradient(90deg, var(--accent) 0 64px, transparent 64px) top left / 100% 1px no-repeat,
    repeating-linear-gradient(180deg, #2A2A27 0 1px, transparent 1px 4px) top left / 100% 9px no-repeat;
}
.sec:nth-of-type(even) { box-shadow: 0 0 0 100vmax #0E0E0D; clip-path: inset(0 -100vmax); }
.num { font: 600 13px/1 var(--mono); color: var(--coral); letter-spacing: .04em; }
.num::before { content: "0x"; color: #6E6E66; }
h2 { font-weight: 700; letter-spacing: -.025em; font-size: clamp(26px, 2.8vw, 38px); }
.index a span { color: #6E6E66; }
.index a span::before { content: "0x"; }
.honesty, .run, .waves, .standards, .three, .sources, .gloss { border-top-color: transparent !important; border-image: linear-gradient(90deg, var(--ink), var(--ink) 40%, #3A3A36) 1; }
pre { background: #0F0F0E; }
pre.copyable { background: #0B0E09; border: 1px solid rgba(132,248,0,.34); box-shadow: 0 0 0 1px rgba(132,248,0,.04), 0 0 26px rgba(132,248,0,.08); }
pre.out { border-color: rgba(245,245,237,.12); }
.copy { background: #0A0A0A; color: var(--accent); border-color: rgba(132,248,0,.45); }

/* ---------- one descent: a depth gutter down the left of every section (wide screens) ---------- */
.side-strata { display: none; }
@media (min-width: 1180px) {
  .sec[data-depth] { padding-left: 92px; }
  .sec[data-depth], .sec[data-depth].bulletin {
    background:
      linear-gradient(90deg, var(--accent) 0 64px, transparent 64px) top left / 100% 1px no-repeat,
      repeating-linear-gradient(180deg, #2A2A27 0 1px, transparent 1px 4px) top left / 100% 9px no-repeat,
      repeating-linear-gradient(180deg, #4A4A44 0 2px, transparent 2px 7px) 28px 110px / 1px calc(100% - 140px) no-repeat;
  }
  .sec[data-depth]::after, .three > li::after {
    position: absolute; left: 0; width: 58px; text-align: center; white-space: pre;
    font: 600 11px/1.35 var(--mono); letter-spacing: .08em; color: var(--coral);
  }
  .sec[data-depth]::after { content: "DEPTH\A" attr(data-depth); top: 56px; }
  .three { position: relative; }
  .three > li { position: relative; grid-template-columns: 92px 60px minmax(0, 1fr); gap: 0 18px; padding-top: 26px;
    background: repeating-linear-gradient(180deg, #4A4A44 0 2px, transparent 2px 7px) 28px 72px / 1px calc(100% - 90px) no-repeat; }
  .three > li::before { grid-column: 2; font-size: 52px; }
  .three > li > * { grid-column: 3; }
  .three > li::after { top: 30px; }
  .three > li:nth-child(1)::after { content: "DEPTH\A\2212 12m"; }
  .three > li:nth-child(2)::after { content: "DEPTH\A\2212 24m"; }
  .three > li:nth-child(3)::after { content: "DEPTH\A\2212 36m"; }
  .week { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 44px; align-items: start; }
  .week > * { grid-column: 1; }
  .week > .side-strata { display: block; grid-column: 2; grid-row: 1 / span 6; align-self: stretch; }
  .side-strata canvas { position: sticky; top: 72px; display: block; width: 300px; height: 440px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .standards li { grid-template-columns: 100px 100px minmax(0, 1fr); }
  .std-date { grid-column: 3; }
}

@media (max-width: 900px) {
  :root { --gut: 16px; }
  .wrap { display: block; padding: 0 var(--gut); }
  .index {
    position: sticky; top: 0; z-index: 20;
    margin: 0 calc(-1 * var(--gut)); padding: 0; max-height: none; overflow: visible;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .index-title { display: none; }
  .index ol { display: flex; gap: 6px; overflow-x: auto; border-left: 0; padding: 10px var(--gut); scrollbar-width: none; scroll-padding-inline: var(--gut); }
  .index ol::-webkit-scrollbar { display: none; }
  .index li { flex: none; }
  .index a { border: 1px solid var(--line); margin: 0; padding: 8px 10px; gap: 8px; font-size: 13px; white-space: nowrap; min-height: 36px; align-items: center; }
  .index a.is-active { border-color: var(--accent); }
  .sec { scroll-margin-top: 64px; padding-top: 36px; }
  .sec + .sec { margin-top: 28px; }
  .tool { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .block { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rules .exp { display: none; }
  .honesty > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .table-box:has(#rules-table) { max-height: none; overflow: visible; border: 0; }
  /* stacked rule rows on narrow screens */
  .rules thead { display: none; }
  .rules, .rules tbody, .rules tr, .rules td { display: block; width: 100%; }
  .rules tr { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .rules tr[hidden] { display: none; }
  .rules td { padding: 0; border: 0; }
  .rules td.id { grid-column: 1; grid-row: 1; white-space: normal; overflow-wrap: anywhere; }
  .rules td:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .rules td:nth-child(3) { grid-column: 1 / -1; }
  .rules td:nth-child(4) { grid-column: 1 / -1; color: #CFCFC6; font-size: 13.5px; }
  .rules td:nth-child(4)::before { content: "Replace with: "; font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  /* stacked support rows */
  .support thead { display: none; }
  .support, .support tbody, .support tr, .support th, .support td { display: block; width: 100%; }
  .support tr { padding: 12px; border-bottom: 1px solid var(--line); }
  .support th, .support td { padding: 2px 0; border: 0; min-width: 0; }
  .support td[data-h]::before { content: attr(data-h) ": "; color: var(--muted); }
  .support .src { white-space: normal; margin-top: 6px; }
  .standards li { grid-template-columns: 90px minmax(0, 1fr); gap: 4px 12px; }
  .std-plain, .std-date { grid-column: 2; }
  .stub-banner { padding: 10px var(--gut); }
  .three > li { grid-template-columns: 34px minmax(0, 1fr); gap: 0 12px; }
  .three > li::before { font-size: 30px; }
  .aside { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .gloss { columns: 1; }
  .g { scroll-margin-top: 70px; }
  .g-also { display: block; margin-left: 0; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .topbar { gap: 12px; padding: 12px var(--gut); }
  .path { display: none; }
  .files th { padding-right: 14px; }
  .files th, .files td { display: block; width: auto; padding: 4px 0; border: 0; }
  .files tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .ks-total b { font-size: 28px; }
}

@media (max-width: 1179px) {
  .stage-shade { background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0) 46%, rgba(10,10,10,.8) 60%, rgba(10,10,10,.96) 74%); }
  .beat { align-items: flex-end; padding: 0 var(--gut) 28px; }
  .beat-hero { padding-top: 50vh; padding-top: 50svh; }
  .beat:not(.beat-hero) .beat-card { max-width: 620px; background: rgba(10,10,10,.9); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 18px 16px 6px; }
  .beat-hero .beat-card { max-width: 640px; }
}
@media (max-width: 900px) {
  /* phone stamp: one tight row, all four parts kept */
  .beat-hero .stamp { flex-wrap: nowrap; margin-bottom: 18px; font-size: 10px; letter-spacing: .04em; box-shadow: 0 0 18px rgba(132,248,0,.18); }
  .beat-hero .stamp > * { padding: 6px 7px; white-space: nowrap; }
  /* glass cards over the full-bleed canvas */
  .beat:not(.beat-hero) .beat-card { background: rgba(14,14,13,.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: rgba(245,245,237,.16); border-left-color: var(--accent); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
  .beat-hero .beat-card { background: linear-gradient(180deg, rgba(10,10,10,0), rgba(10,10,10,.6) 18%); }
  html.has-strata { scroll-snap-type: y proximity; }
  .beat:not(.beat-hero) { scroll-snap-align: end; }
  .beats { touch-action: pan-y; }
  .beat p { font-size: 16px; }
  .beat h2 { font-size: 30px; }
  .sec::before { display: none; }
  .sec:nth-of-type(even) { box-shadow: none; clip-path: none; }
}
@media (max-width: 520px) {
  .beat h1 { font-size: 38px; }
  .pitch { font-size: 17px; }
  .btn { padding: 0 16px; font-size: 14px; }
}

/* ---------- round 3: depth meter, reveal, film, glow ---------- */
.depth-meter { display: none; }
@media (min-width: 1180px) {
  .depth-meter { display: flex; position: fixed; right: 10px; top: 50%; z-index: 30; transform: translateY(-50%); flex-direction: column; align-items: center; gap: 8px; pointer-events: none; font: 600 10px/1 var(--mono); letter-spacing: .08em; color: var(--muted); }
  .dm-track { position: relative; display: block; width: 2px; height: 180px; background: rgba(245,245,237,.14); overflow: hidden; }
  .dm-fill { position: absolute; inset: 0; display: block; background: linear-gradient(180deg, var(--accent), #FF5C3D); transform-origin: top; transform: scaleY(0); box-shadow: 0 0 8px rgba(132,248,0,.6); }
  .dm-v { font: 700 11px/1 var(--mono); color: var(--accent); white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); }
}
.sec.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.sec.rv.in { opacity: 1; transform: none; }
.sec.rv.in { animation: stratum-edge 1.4s ease-out 1; }
@keyframes stratum-edge {
  0% { box-shadow: inset 0 2px 0 rgba(132,248,0,0); }
  25% { box-shadow: inset 0 2px 0 rgba(132,248,0,.85), 0 -10px 24px -14px rgba(132,248,0,.6); }
  100% { box-shadow: inset 0 2px 0 rgba(132,248,0,0); }
}
.tip { box-shadow: 0 0 0 1px rgba(132,248,0,.25), 0 0 22px rgba(132,248,0,.16), 0 12px 30px rgba(0,0,0,.5); }
.term:hover, .term:focus-visible { text-shadow: 0 0 10px rgba(132,248,0,.45); }
.copy.done { animation: copy-flash .7s ease-out 1; }
@keyframes copy-flash {
  0% { box-shadow: 0 0 0 0 rgba(132,248,0,.9); }
  100% { box-shadow: 0 0 0 12px rgba(132,248,0,0); }
}
.film { position: relative; max-width: 1360px; margin: 0 auto; padding: 72px var(--gut) 76px; border-bottom: 1px solid var(--line); }
.film-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.film h2 { margin: 0; font-size: clamp(26px, 3vw, 40px); line-height: 1.05; letter-spacing: -.03em; }
.film-depth { margin: 0; font: 600 12px/1.4 var(--mono); letter-spacing: .08em; color: var(--muted); }
.film-depth span { color: #FF5C3D; }
.film-frame { position: relative; aspect-ratio: 16 / 9; background: #0E0E0D radial-gradient(ellipse at 60% 60%, rgba(132,248,0,.08), rgba(10,10,10,0) 60%); border: 1px solid rgba(132,248,0,.55); box-shadow: 0 0 0 4px #0A0A0A, 0 0 0 5px rgba(132,248,0,.18), 0 0 40px rgba(132,248,0,.12); }
.film-frame::before { content: "DEPTH 0 \2192  \2212 180 m"; position: absolute; right: -1px; bottom: -24px; font: 600 10px/1 var(--mono); letter-spacing: .1em; color: var(--accent); }
.film-frame video { display: block; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.film-note { margin: 14px 0 0; font: 500 13px/1.5 var(--mono); color: var(--muted); }
@media (max-width: 900px) { .film { padding: 48px var(--gut) 40px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* one-tap copy for agent */
.btn-agent { position: relative; box-shadow: 0 0 0 0 rgba(132,248,0,.55), 0 0 28px rgba(132,248,0,.35); animation: agentPulse 2.8s ease-out infinite; }
.btn-agent::before { content: ">_"; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; margin-right: 10px; opacity: .75; }
.btn-agent.copied, .topbar-cta.copied { background: var(--ink); border-color: var(--ink); color: #0A0A0A; animation: none; }
.btn-agent.copied::before { content: none; }
.agent-hint { margin: -12px 0 22px; max-width: 34rem; font-size: .92rem; line-height: 1.5; color: rgba(245,245,237,.72); }
.agent-hint a { color: var(--accent); }
@keyframes agentPulse { 0% { box-shadow: 0 0 0 0 rgba(132,248,0,.5), 0 0 28px rgba(132,248,0,.35); } 70% { box-shadow: 0 0 0 14px rgba(132,248,0,0), 0 0 28px rgba(132,248,0,.35); } 100% { box-shadow: 0 0 0 0 rgba(132,248,0,0), 0 0 28px rgba(132,248,0,.35); } }
@media (prefers-reduced-motion: reduce) { .btn-agent { animation: none; } }
@media (max-width: 480px) { .ctas .btn-agent { flex: 1 1 100%; text-align: center; } }
