/* ============================================================
   Track: homepage system ("checkpoint")
   Bone paper, graphite ink, hairline rules on a visible 6-column grid,
   zero radius. One highlighter (lime) for emphasis; verdict colours
   (forest / vermilion / amber / blue) appear only where a decision does.
   Archivo (width axis) for type, Geist Mono for every label and datum.
   ============================================================ */
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #ecebe4;
  --paper-2: #e3e1d8;
  --paper-3: #f5f4ef;
  --ink: #0e100d;
  --ink-2: #2b2e29;
  --mute: #63665e;
  --rule: rgba(14, 16, 13, .13);
  --rule-2: rgba(14, 16, 13, .32);

  --night: #0e100d;
  --night-2: #171a16;
  --night-3: #20241f;
  --on-night: #ecebe4;
  --on-night-mute: #9a9d93;
  --rule-night: rgba(236, 235, 228, .12);
  --rule-night-2: rgba(236, 235, 228, .28);

  --lime: #d4fb3c;
  --forest: #1e5c3a;
  --allow: #2f8a55;
  --deny: #e8432a;
  --hold: #e59a12;
  --restrict: #3a6df0;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1360px;
  --gutter: clamp(16px, 3vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-variation-settings: "wdth" 100;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
h2, h3 { text-wrap: balance; }
ol, ul { margin: 0; padding: 0; list-style: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.chapter--enforcement :focus-visible, .cta :focus-visible { outline-color: var(--lime); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.shell { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Visible column grid behind everything */
.grid-lines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto;
  display: grid; grid-template-columns: repeat(6, 1fr);
  border-right: 1px solid var(--rule);
}
.grid-lines i { border-left: 1px solid var(--rule); }
main, .footer, .masthead { position: relative; z-index: 1; }

/* Highlighter */
mark {
  background: linear-gradient(transparent 12%, var(--lime) 12%, var(--lime) 88%, transparent 88%);
  color: inherit;
  padding: 0 .06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--ink);
  font-size: 14px; font-weight: 600; letter-spacing: -.005em;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn span { font-family: var(--mono); font-weight: 400; transition: transform .15s ease; }
.btn:hover span { transform: translate(2px, -1px); }
.btn--lg { min-height: 52px; padding: 0 22px; font-size: 15px; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--lime); color: var(--ink); }
.btn--line { background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn--lime:hover { background: var(--paper); border-color: var(--paper); }
.btn--ghost { border-color: var(--rule-night-2); color: var(--on-night); font-family: var(--mono); font-weight: 400; font-size: 14px; }
.btn--ghost:hover { border-color: var(--on-night); }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: -.03em; font-variation-settings: "wdth" 112; }
.nav { display: flex; gap: 2px; margin-right: auto; }
.nav a { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 10px; font-size: 14px; color: var(--ink-2); transition: background .15s ease; }
.nav a span { font-family: var(--mono); font-size: 10px; color: var(--mute); }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.masthead__actions { display: flex; align-items: center; gap: 18px; }
.link-quiet { font-size: 14px; color: var(--ink-2); }
.link-quiet:hover { text-decoration: underline; text-underline-offset: 4px; }
.menu-toggle { display: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--ink); background: transparent; position: relative; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .2s ease; }
.menu-toggle span:first-child { top: 15px; }
.menu-toggle span:last-child { top: 23px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-nav { border-top: 1px solid var(--rule); padding: 8px var(--gutter) 24px; background: var(--paper); height: calc(100dvh - 60px); overflow: auto; }
.mobile-nav a { display: flex; gap: 10px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.mobile-nav a span { font-family: var(--mono); font-size: 11px; color: var(--mute); font-weight: 400; }
.mobile-nav .btn { margin-top: 20px; justify-content: center; font-size: 16px; border-bottom: 1px solid var(--ink); }

/* ---------- Hero: full-bleed WebGL stage ---------- */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: max(760px, calc(100svh - 60px)); border-bottom: 1px solid var(--ink); }
.hero__canvas, .cta__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; z-index: 0; }
.hero > :not(canvas) { position: relative; z-index: 1; }
.hero__top { padding-top: clamp(24px, 3vw, 40px); }
.hero__meta { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.hero__title {
  margin: clamp(22px, 3vw, 44px) 0 0;
  font-size: clamp(46px, 8.2vw, 136px);
  font-weight: 640;
  font-variation-settings: "wdth" 88;
  line-height: .9;
  letter-spacing: -.045em;
}
.hero__title .line { display: block; overflow: clip; overflow-clip-margin: .12em; padding-bottom: .02em; }
.hero__title .line > span { display: inline-block; animation: line-in 1.1s cubic-bezier(.16,1,.3,1) both; }
.hero__title .line:nth-child(2) > span { animation-delay: .09s; }
.hero__title .line:nth-child(3) > span { animation-delay: .18s; }
.hero__title mark { animation: mark-in .7s cubic-bezier(.65,0,.35,1) .85s both; background-size: 100% 100%; background-repeat: no-repeat; }
@keyframes line-in {
  from { transform: translateY(105%); font-variation-settings: "wdth" 125, "wght" 300; }
  to { transform: none; font-variation-settings: "wdth" 88, "wght" 640; }
}
@keyframes mark-in { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }

.hero__band { flex: 1 1 auto; min-height: clamp(260px, 36vh, 440px); margin: clamp(18px, 2.5vw, 32px) 0; }
.flow-gate { position: absolute; top: -14px; bottom: -14px; left: 58%; width: 0; border-left: 1px solid var(--ink); }
.flow-gate span { position: absolute; top: -10px; left: 0; transform: translate(-50%, -100%); padding: 4px 8px; background: var(--ink); color: var(--lime); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.flow-label { position: absolute; transform: translateY(-50%); padding: 3px 7px; border: 1px solid var(--ink); background: var(--paper); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.flow-label--src { left: max(var(--gutter), calc((100% - var(--max)) / 2)); }
.flow-label--dst { right: max(var(--gutter), calc((100% - var(--max)) / 2)); background: var(--ink); color: var(--paper); }
.flow-legend { position: absolute; bottom: -10px; left: 58%; transform: translate(12px, 100%); display: flex; gap: 14px; font-size: 10.5px; color: var(--ink-2); white-space: nowrap; }
.flow-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 0; background: var(--ink); }
.flow-legend .k-hold::before { background: var(--hold); }
.flow-legend .k-deny::before { background: var(--deny); }
.flow-legend .k-lens::before { background: var(--lime); outline: 1px solid var(--ink); }
.hero.no-gl .hero__band { background: repeating-linear-gradient(90deg, transparent 0 3px, rgba(14,16,13,.08) 3px 4px); }

.hero__foot { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: 24px; padding-bottom: clamp(28px, 4vw, 52px); }
.hero__lede { grid-column: 1 / span 3; max-width: 560px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; color: var(--ink-2); }
.hero__actions { grid-column: 4 / span 3; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.record { padding-top: clamp(40px, 5vw, 72px); }

/* Ledger */
.ledger { border: 1px solid var(--ink); background: var(--paper-3); }
.ledger__bar { display: flex; align-items: center; gap: 20px; padding: 10px 14px; border-bottom: 1px solid var(--ink); background: var(--ink); color: var(--on-night); font-size: 11.5px; letter-spacing: .02em; }
.ledger__live { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .06em; }
.ledger__live i { width: 7px; height: 7px; background: var(--lime); animation: blink 1.2s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.ledger__counts { display: flex; gap: 18px; margin-left: auto; color: var(--on-night-mute); }
.ledger__counts b { color: var(--on-night); font-weight: 500; }
.ledger__counts .t-deny b { color: #ff7a63; }
.ledger__counts .t-hold b { color: #ffc04d; }
.ledger__counts .t-restrict b { color: #8fb0ff; }
.ledger__pause { padding: 3px 9px; border: 1px solid var(--rule-night-2); background: transparent; color: var(--on-night); font-family: var(--mono); font-size: 11px; }
.ledger__pause:hover { border-color: var(--on-night); }

.ledger__head, .ledger__row {
  display: grid;
  grid-template-columns: 104px minmax(130px, 1fr) minmax(220px, 2.2fr) 150px minmax(150px, 1fr) 112px;
  align-items: center;
  column-gap: 16px;
  padding: 0 14px;
}
.ledger__head { height: 34px; border-bottom: 1px solid var(--rule-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); }
.ledger__rows { position: relative; height: calc(7 * 46px); overflow: hidden; }
.ledger__row { height: 46px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; animation: row-in .5s cubic-bezier(.2,.7,.2,1); }
.ledger__row > * { overflow: hidden; text-overflow: ellipsis; }
.ledger__row .t { color: var(--mute); }
.ledger__row .a { color: var(--ink); }
.ledger__row .x { color: var(--ink-2); }
.ledger__row .x b { font-weight: 500; color: var(--ink); }
.ledger__row .r { color: var(--mute); font-size: 11.5px; }
@keyframes row-in {
  from { opacity: 0; transform: translateY(-46px); background: color-mix(in srgb, var(--lime) 40%, transparent); }
  60% { background: color-mix(in srgb, var(--lime) 30%, transparent); }
  to { opacity: 1; transform: none; background: transparent; }
}
.insp { display: flex; gap: 4px; }
.insp i { width: 14px; height: 14px; border: 1px solid var(--rule-2); background: transparent; }
.insp i.ok { background: var(--ink); border-color: var(--ink); opacity: .16; }
.insp i.hit { background: var(--deny); border-color: var(--deny); }
.insp i.warn { background: var(--hold); border-color: var(--hold); }

/* Stamps: verdict marks */
.stamp {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 8px 2px;
  border: 1.5px solid currentColor;
  font-family: var(--mono); font-weight: 600; font-size: 11px; letter-spacing: .1em;
  line-height: 1.3;
  color: var(--ink);
}
.v-allow { color: var(--allow); }
.v-deny { color: var(--deny); transform: rotate(-3deg); }
.v-hold { color: var(--hold); }
.v-restrict { color: var(--restrict); }

.runs-with { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 22px 0; border-bottom: 1px solid var(--ink); font-size: 12.5px; }
.runs-with__label { text-transform: uppercase; letter-spacing: .07em; color: var(--mute); font-size: 11px; }
.runs-with ul { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.runs-with li { color: var(--ink); }
.runs-with li::before { content: "+ "; color: var(--mute); }

/* ---------- Index ---------- */
.index__list { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--ink); }
.index__list li + li { border-left: 1px solid var(--rule-2); }
.index__list a { display: grid; gap: 6px; height: 100%; padding: 28px 22px 32px; transition: background .2s ease; }
.index__list a:hover { background: var(--lime); }
.index__list span { font-size: 11px; color: var(--mute); }
.index__list strong { font-size: clamp(28px, 2.8vw, 40px); font-weight: 620; font-variation-settings: "wdth" 88; letter-spacing: -.04em; line-height: 1; }
.index__list em { font-style: normal; color: var(--ink-2); font-size: 15px; max-width: 30ch; }
.index__list li:first-child a { padding-left: 0; }

/* ---------- Chapters ---------- */
.chapter { padding: clamp(80px, 10vw, 150px) 0 clamp(70px, 8vw, 120px); }
.chapter__head { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px 24px; margin-bottom: clamp(48px, 6vw, 88px); }
.chapter__num { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid currentColor; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.chapter__num span { display: inline-grid; place-items: center; min-width: 34px; height: 22px; padding: 0 6px; background: currentColor; }
.chapter__num span { color: inherit; }
.chapter--discovery .chapter__num span, .chapter--proof .chapter__num span { background: var(--ink); color: var(--paper); }
.chapter--enforcement .chapter__num span { background: var(--lime); color: var(--ink); }
.chapter h2 {
  grid-column: 1 / span 4;
  font-size: clamp(40px, 6vw, 96px);
  font-weight: 640;
  font-variation-settings: "wdth" 88;
  line-height: .93;
  letter-spacing: -.045em;
}
.chapter__intro { grid-column: 5 / span 2; align-self: end; display: grid; gap: 16px; color: var(--ink-2); font-size: 16px; }
.chapter__intro .pull { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; color: var(--ink); padding-left: 14px; border-left: 3px solid var(--lime); }
.chapter__intro .btn { justify-self: start; }

.label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .07em; }
.label small { font-size: inherit; color: var(--mute); text-transform: none; letter-spacing: .02em; }
.label-sm { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin-bottom: 14px; }

/* Discovery: sources */
.sources { margin-bottom: clamp(56px, 7vw, 100px); }
.sources > .label { padding-bottom: 14px; }
.sources__list { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--ink); background: var(--paper-3); }
.sources__list li { display: grid; align-content: start; gap: 8px; min-height: 168px; padding: 16px 14px; transition: background .2s ease; }
.sources__list li + li { border-left: 1px solid var(--rule-2); }
.sources__list li span { font-size: 11px; color: var(--mute); }
.sources__list li strong { font-size: 17px; font-weight: 620; letter-spacing: -.02em; line-height: 1.1; font-variation-settings: "wdth" 92; }
.sources__list li small { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.sources__list li.is-lit { background: var(--lime); }
.sources__list li.is-dim { opacity: .35; }
.sources__join { position: relative; height: 72px; }
.sources__join svg { width: 100%; height: 60px; fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sources__join svg path { vector-effect: non-scaling-stroke; }
.sources__join span { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); padding: 6px 14px; background: var(--ink); color: var(--lime); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; z-index: 1; }
.sources__note { margin-top: 30px; text-align: center; font-size: 12px; color: var(--mute); }

/* Discovery: estate explorer */
.estate { margin-bottom: clamp(56px, 7vw, 100px); }
.estate__top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; padding-bottom: 14px; }
.estate__filters { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); }
.estate__filters button { padding: 8px 12px; border: 0; background: transparent; font-size: 13px; font-weight: 500; }
.estate__filters button + button { border-left: 1px solid var(--rule-2); }
.estate__filters button b { margin-left: 4px; font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--mute); }
.estate__filters button:hover { background: var(--paper-2); }
.estate__filters button.is-active { background: var(--ink); color: var(--paper); }
.estate__filters button.is-active b { color: var(--lime); }

.estate__body { display: grid; grid-template-columns: 4fr 2fr; border: 1px solid var(--ink); background: var(--paper-3); min-height: 520px; }
.estate__table { border-right: 1px solid var(--ink); }
.erow, .erow-head {
  display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(110px, 1fr) minmax(140px, 1.4fr) 92px 128px;
  align-items: center; gap: 12px; padding: 0 16px;
}
.erow-head { height: 36px; border-bottom: 1px solid var(--rule-2); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); }
.erow { width: 100%; min-height: 62px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; text-align: left; transition: background .15s ease; }
.erow:hover { background: var(--paper-2); }
.erow.is-active { background: var(--ink); color: var(--paper); }
.erow.is-active .erow__sub, .erow.is-active .erow__reach { color: var(--on-night-mute); }
.erow.is-active .evid i { border-color: var(--rule-night-2); }
.erow.is-active .evid i.on { background: var(--lime); border-color: var(--lime); }
.erow.is-hidden { display: none; }
.erow__name { display: grid; gap: 2px; min-width: 0; }
.erow__name b { font-family: var(--mono); font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erow__sub { font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erow__reach { font-family: var(--mono); font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evid { display: flex; gap: 3px; }
.evid i { width: 10px; height: 10px; border: 1px solid var(--rule-2); }
.evid i.on { background: currentColor; border-color: currentColor; }

.tag { display: inline-block; padding: 3px 6px 2px; font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; line-height: 1.3; white-space: nowrap; }
.tag--red { color: var(--deny); }
.tag--amber { color: #b67400; }
.tag--ink { color: var(--ink); }
.tag--green { color: var(--allow); }
.erow.is-active .tag--ink { color: var(--paper); }
.erow.is-active .tag--amber { color: var(--hold); }
.erow.is-active .tag--green { color: #6fd39a; }
.erow.is-active .tag--red { color: #ff7a63; }

.estate__detail { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.detail__head { display: grid; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--rule-2); }
.detail__head b { font-family: var(--mono); font-weight: 500; font-size: 16px; }
.detail__head small { color: var(--mute); font-size: 13px; }
.detail__label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin-bottom: 8px; }
.chain { display: grid; }
.chain li { position: relative; display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 7px 0 7px 16px; font-size: 13px; }
.chain li::before { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; border-left: 1px solid var(--ink); }
.chain li::after { content: ""; position: absolute; left: 0; top: 13px; width: 7px; height: 7px; background: var(--paper-3); border: 1px solid var(--ink); }
.chain li:first-child::before { top: 13px; }
.chain li:last-child::before { bottom: calc(100% - 14px); }
.chain li.is-write::after { background: var(--deny); border-color: var(--deny); }
.chain li span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); padding-top: 2px; }
.chain li b { font-family: var(--mono); font-weight: 500; font-size: 12.5px; word-break: break-word; }
.chain li.is-write b { color: var(--deny); }
.ev-list { display: flex; flex-wrap: wrap; gap: 4px; }
.ev-list span { padding: 3px 7px; border: 1px solid var(--rule-2); font-family: var(--mono); font-size: 11px; color: var(--mute); }
.ev-list span.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.detail__finding { padding: 14px; border-left: 3px solid var(--deny); background: var(--paper); font-size: 14px; line-height: 1.45; }
.detail__finding.is-ok { border-left-color: var(--allow); }
.detail__finding.is-warn { border-left-color: var(--hold); }
.detail__next { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--rule-2); font-family: var(--mono); font-size: 12px; }
.detail__next a { text-decoration: underline; text-underline-offset: 3px; }

/* Discovery: findings */
.findings > .label { padding-bottom: 14px; }
.findings__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.findings__grid li { display: grid; align-content: start; gap: 10px; padding: 24px 24px 30px 0; border-bottom: 1px solid var(--rule-2); }
.findings__grid li:not(:nth-child(3n+1)) { padding-left: 24px; border-left: 1px solid var(--rule-2); }
.findings__grid .tag { justify-self: start; }
.findings__grid strong { font-size: 22px; font-weight: 620; letter-spacing: -.03em; line-height: 1.1; font-variation-settings: "wdth" 92; }
.findings__grid p { color: var(--ink-2); font-size: 15px; }

.handoff { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 48px; padding: 22px 24px; background: var(--ink); color: var(--paper); }
.handoff p { font-size: 17px; max-width: 760px; }
.handoff p span { color: var(--lime); margin-right: 6px; }
.handoff .btn { border-color: var(--paper); color: var(--paper); }
.handoff .btn:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }

/* ---------- Enforcement (night) ---------- */
.chapter--enforcement { background: var(--night); color: var(--on-night); }
.chapter--enforcement .chapter__intro { color: var(--on-night-mute); }
.chapter--enforcement .chapter__intro .pull { color: var(--on-night); }
.chapter--enforcement mark { color: var(--ink); }
.chapter--enforcement .label small, .chapter--enforcement .label-sm { color: var(--on-night-mute); }

.console { margin-bottom: clamp(56px, 7vw, 100px); }
.console__top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; padding-bottom: 14px; }
.console__picker { display: flex; flex-wrap: wrap; border: 1px solid var(--rule-night-2); }
.console__picker button { padding: 8px 12px; border: 0; background: transparent; color: var(--on-night-mute); font-size: 13px; font-weight: 500; }
.console__picker button + button { border-left: 1px solid var(--rule-night); }
.console__picker button:hover { color: var(--on-night); background: var(--night-3); }
.console__picker button.is-active { background: var(--lime); color: var(--ink); }

.console__grid { display: grid; grid-template-columns: 1fr 1.35fr 1.15fr; border: 1px solid var(--rule-night-2); background: var(--night-2); }
.console__grid > div { min-width: 0; display: flex; flex-direction: column; }
.console__grid > div + div { border-left: 1px solid var(--rule-night-2); }
.console__pane-h { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--rule-night); font-size: 11px; color: var(--on-night); }
.console__pane-h span { color: var(--on-night-mute); }

.code { margin: 0; padding: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #cfd1c8; white-space: pre-wrap; word-break: break-word; overflow: auto; }
.code .k { color: var(--on-night-mute); }
.code .s { color: #e9f0c9; }
.code .n { color: #8fb0ff; }
.code .hl { background: color-mix(in srgb, var(--lime) 22%, transparent); color: var(--lime); }
.code--lines { padding: 10px 0; counter-reset: ln; }
.code--lines li { display: grid; grid-template-columns: 34px 1fr; padding-right: 12px; white-space: pre; overflow: hidden; transition: background .25s ease, color .25s ease, opacity .25s ease; }
.code--lines li::before { counter-increment: ln; content: counter(ln); text-align: right; padding-right: 12px; color: #4f544b; }
.code--lines.has-match li { opacity: .45; }
.code--lines li.is-match { opacity: 1; background: color-mix(in srgb, var(--lime) 15%, transparent); color: var(--paper); box-shadow: inset 2px 0 0 var(--lime); }
.code--lines li.is-match::before { color: var(--lime); }

.trace { padding: 6px 14px; flex: 1; }
.trace li { display: grid; grid-template-columns: 18px 82px 1fr; gap: 8px; align-items: start; padding: 9px 0; border-bottom: 1px dashed var(--rule-night); font-size: 13px; opacity: 0; transform: translateX(-6px); animation: trace-in .32s ease forwards; }
.trace li:last-child { border-bottom: 0; }
.trace li i { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--allow); }
.trace li.is-risk i { color: #ff7a63; }
.trace li.is-warn i { color: #ffc04d; }
.trace li span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--on-night-mute); padding-top: 2px; }
.trace li b { font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--on-night); }
@keyframes trace-in { to { opacity: 1; transform: none; } }

.verdict { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 16px; padding: 16px 14px; border-top: 1px solid var(--rule-night-2); }
.verdict > span { grid-column: 1 / -1; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--on-night-mute); }
.verdict .stamp { font-size: 20px; padding: 5px 12px 4px; border-width: 2px; animation: stamp .35s cubic-bezier(.3,1.6,.5,1); }
.verdict p { font-size: 13.5px; color: var(--on-night-mute); line-height: 1.4; }
@keyframes stamp { from { transform: scale(1.5) rotate(var(--rot, 0deg)); opacity: 0; } to { transform: scale(1) rotate(var(--rot, 0deg)); opacity: 1; } }
.chapter--enforcement .v-allow { color: #6fd39a; }
.chapter--enforcement .v-deny { color: #ff6a50; --rot: -3deg; }
.chapter--enforcement .v-hold { color: #ffbe45; }
.chapter--enforcement .v-restrict { color: #8fb0ff; }

/* Outcomes */
.outcomes { margin-bottom: clamp(56px, 7vw, 100px); }
.outcomes > .label { padding-bottom: 14px; }
.outcomes__grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule-night-2); }
.outcomes__grid li { display: grid; align-content: start; gap: 18px; padding: 26px 22px 30px; border-bottom: 1px solid var(--rule-night-2); }
.outcomes__grid li:first-child { padding-left: 0; }
.outcomes__grid li + li { border-left: 1px solid var(--rule-night-2); }
.outcomes__grid .stamp { justify-self: start; font-size: 18px; padding: 5px 12px 4px; border-width: 2px; }
.outcomes__grid p { color: var(--on-night-mute); font-size: 15px; }
.o-allow .stamp { color: #6fd39a; }
.o-deny .stamp { color: #ff6a50; transform: rotate(-3deg); }
.o-restrict .stamp { color: #8fb0ff; }
.o-hold .stamp { color: #ffbe45; }

/* Detect */
.detect { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--rule-night-2); margin-bottom: clamp(40px, 5vw, 64px); }
.detect__copy { grid-column: 1 / span 3; display: grid; gap: 18px; align-content: start; }
.detect h3, .contain h3, .lifecycle h3, .install h3 { font-size: clamp(26px, 2.8vw, 40px); font-weight: 620; font-variation-settings: "wdth" 90; letter-spacing: -.035em; line-height: 1.02; }
.detect__copy p { color: var(--on-night-mute); max-width: 520px; font-size: 16px; }
.detect__list { grid-column: 4 / span 3; border-top: 1px solid var(--rule-night-2); }
.detect__list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule-night); font-size: 13px; }
.detect__list li span::before { content: "■ "; color: var(--lime); font-size: 9px; vertical-align: 2px; }
.detect__list li i { font-style: normal; color: var(--on-night-mute); text-align: right; }

/* Contain */
.contain { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule-night-2); border-bottom: 1px solid var(--rule-night-2); margin-bottom: clamp(56px, 7vw, 100px); }
.contain article { padding: 28px 24px 34px; }
.contain article:first-child { padding-left: 0; }
.contain article + article { border-left: 1px solid var(--rule-night-2); }
.contain h3 { font-size: clamp(22px, 2vw, 28px); margin-bottom: 12px; }
.contain article > p:last-child { color: var(--on-night-mute); font-size: 15px; }

/* Lifecycle */
.lifecycle { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; margin-bottom: clamp(56px, 7vw, 100px); }
.lifecycle__copy { grid-column: 1 / span 2; display: grid; gap: 14px; align-content: start; }
.lifecycle__copy .label-sm { margin: 0; }
.lifecycle__copy p:last-child { color: var(--on-night-mute); font-size: 15.5px; }
.lifecycle__steps { grid-column: 3 / span 4; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.lifecycle__steps li { position: relative; display: grid; align-content: start; gap: 8px; padding: 0 14px 0 0; }
.lifecycle__steps li span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--rule-night-2); font-size: 12px; background: var(--night); position: relative; z-index: 1; }
.lifecycle__steps li:last-child span { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.lifecycle__steps li:nth-child(4) span { border-color: var(--on-night); }
.lifecycle__steps li::before { content: ""; position: absolute; top: 17px; left: 34px; right: 0; border-top: 1px dashed var(--rule-night-2); }
.lifecycle__steps li:last-child::before { display: none; }
.lifecycle__steps strong { margin-top: 8px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.lifecycle__steps small { color: var(--on-night-mute); font-size: 13.5px; line-height: 1.4; }

/* Install */
.install { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--rule-night-2); }
.install__copy { grid-column: 1 / span 3; display: grid; gap: 14px; align-content: start; }
.install__copy .label-sm { margin: 0; }
.install__copy > p:not(.label-sm) { color: var(--on-night-mute); max-width: 540px; }
.install__fine { font-size: 12px; color: var(--on-night) !important; }
.install .code--diff { grid-column: 4 / span 3; align-self: start; padding: 18px 20px; border: 1px solid var(--rule-night-2); background: var(--night-2); font-size: 13px; white-space: pre; }
.code--diff .c { color: #5f6559; }
.code--diff .del { display: inline-block; width: 100%; color: #ff8b77; background: rgba(232,67,42,.12); }
.code--diff .add { display: inline-block; width: 100%; color: var(--lime); background: rgba(212,251,60,.1); }

/* ---------- Proof ---------- */
.proof { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.chapter__head--tight { grid-column: 1 / span 3; grid-template-columns: 1fr; margin: 0; align-content: start; }
.chapter__head--tight h2, .chapter__head--tight .chapter__intro { grid-column: 1; }
.chapter__head--tight h2 { font-size: clamp(38px, 4.6vw, 72px); }
.receipt { grid-column: 4 / span 3; align-self: end; border: 1px solid var(--ink); background: var(--paper-3); box-shadow: 10px 10px 0 var(--ink); }
.receipt__head { display: flex; justify-content: space-between; padding: 12px 16px; background: var(--ink); color: var(--paper); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.receipt dl { margin: 0; padding: 4px 16px; }
.receipt dl div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--rule-2); }
.receipt dt { color: var(--mute); font-size: 13px; }
.receipt dd { margin: 0; font-size: 13px; word-break: break-word; }
.receipt .match { margin-left: 8px; padding: 1px 6px; background: var(--lime); font-weight: 500; font-size: 10.5px; letter-spacing: .06em; }
.receipt__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 18px 16px; }
.receipt__foot .mono { font-size: 12px; color: var(--mute); }
.stamp--ok { color: var(--allow); font-size: 15px; transform: rotate(-2deg); border-width: 2px; }

/* ---------- Path ---------- */
.path { padding: clamp(60px, 8vw, 110px) 0 clamp(80px, 10vw, 140px); border-top: 1px solid var(--ink); }
.path h2 { max-width: 15ch; font-size: clamp(36px, 5vw, 80px); font-weight: 640; font-variation-settings: "wdth" 88; line-height: .95; letter-spacing: -.045em; margin-bottom: clamp(36px, 5vw, 64px); }
.path h2 span { color: var(--mute); }
.path__steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.path__steps li { display: grid; align-content: start; gap: 10px; padding: 22px 22px 0 0; }
.path__steps li + li { padding-left: 22px; border-left: 1px solid var(--rule-2); }
.path__steps span { font-size: 11px; color: var(--mute); }
.path__steps strong { font-size: 21px; font-weight: 620; letter-spacing: -.025em; }
.path__steps p { color: var(--ink-2); font-size: 15px; }

/* ---------- CTA ---------- */
.cta { background: var(--night); color: var(--on-night); padding: clamp(80px, 11vw, 160px) 0; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, var(--rule-night) 0 1px, transparent 1px 64px), repeating-linear-gradient(0deg, var(--rule-night) 0 1px, transparent 1px 64px);
  -webkit-mask-image: radial-gradient(ellipse at 80% 70%, #000 0, transparent 60%); mask-image: radial-gradient(ellipse at 80% 70%, #000 0, transparent 60%);
}
.cta__inner { position: relative; display: grid; gap: 22px; justify-items: start; }
.cta .label-sm { color: var(--on-night-mute); margin: 0; }
.cta h2 { max-width: 14ch; font-size: clamp(44px, 7.4vw, 124px); font-weight: 640; font-variation-settings: "wdth" 86; line-height: .9; letter-spacing: -.05em; }
.cta mark { color: var(--ink); }
.cta p:not(.label-sm) { max-width: 560px; font-size: 18px; color: var(--on-night-mute); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: var(--on-night); border-top: 1px solid var(--rule-night-2); }
.footer__inner { display: grid; grid-template-columns: 2fr 3fr; gap: 40px; padding: 56px 0 48px; }
.footer__brand p { margin-top: 14px; max-width: 320px; color: var(--on-night-mute); font-size: 14px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols div { display: grid; align-content: start; gap: 10px; }
.footer__cols strong { font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--on-night-mute); margin-bottom: 4px; }
.footer__cols a { font-size: 14px; }
.footer__cols a:hover { color: var(--lime); }
.footer__bottom { display: flex; justify-content: space-between; padding: 18px 0 26px; border-top: 1px solid var(--rule-night); font-size: 11.5px; color: var(--on-night-mute); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Masthead scroll progress + active chapter ---------- */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.nav a[aria-current="true"] { background: var(--lime); color: var(--ink); }
.nav a[aria-current="true"] span { color: var(--ink); }

/* ---------- Discovery scroll story ---------- */
.story { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; margin-bottom: clamp(56px, 7vw, 100px); }
.story__steps { grid-column: 1 / span 2; }
.story__step { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; opacity: .28; transition: opacity .4s ease; }
.story__step:first-child { min-height: 70vh; justify-content: flex-start; padding-top: 18vh; }
.story__step.is-active { opacity: 1; }
.story__step .label-sm { margin: 0; color: var(--ink); }
.story__step h3 { font-size: clamp(26px, 2.6vw, 38px); font-weight: 620; font-variation-settings: "wdth" 90; letter-spacing: -.035em; line-height: 1.02; }
.story__step p:last-child { color: var(--ink-2); font-size: 16px; max-width: 400px; }
.story__stage { grid-column: 3 / span 4; position: sticky; top: 60px; height: calc(100vh - 60px); display: flex; align-items: center; }
.story__frame { position: relative; width: 100%; border: 1px solid var(--ink); background: var(--paper-3); }
.story__svg { display: block; width: 100%; height: auto; font-family: var(--mono); }
.story__bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.story__bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(var(--story-p, 0)); }
.st-head { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; fill: var(--mute); }
.st-rec rect { fill: var(--paper); stroke: var(--rule-2); stroke-width: 1; }
.st-rec text { font-size: 10.5px; fill: var(--ink-2); }
.st-node rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1; transition: fill .3s ease, stroke .3s ease; }
.st-node text { fill: var(--ink); transition: fill .3s ease; }
.st-node.is-risk rect { fill: var(--deny); stroke: var(--deny); }
.st-node.is-risk rect + text { fill: #fff; }
.st-node.is-warn rect { fill: var(--hold); stroke: var(--hold); }
.st-node.is-ok rect { fill: transparent; stroke: var(--rule-2); }
.st-tag { font-size: 10px; letter-spacing: .08em; }
.st-tag--risk { fill: var(--deny); }
.st-tag--warn { fill: #b67400; }
.st-tag--ok { fill: var(--allow); }
.st-edge { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.st-edge.is-risk { stroke: var(--deny); stroke-width: 2; }
.st-edge.is-warn { stroke: var(--hold); stroke-width: 2; }

/* ---------- Base-rate calculator ---------- */
.calc { margin-bottom: clamp(56px, 7vw, 100px); }
.calc__top { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 24px; padding-bottom: 18px; }
.calc__top .label { grid-column: 1 / -1; }
.calc__intro { grid-column: 1 / span 4; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.35; color: var(--on-night); max-width: 760px; }
.calc__grid { display: grid; grid-template-columns: 1fr 1.15fr; border: 1px solid var(--rule-night-2); }
.calc__controls { display: grid; gap: 34px; align-content: space-around; padding: 30px; border-right: 1px solid var(--rule-night-2); }
.field label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; font-size: 15px; color: var(--on-night-mute); }
.field output { font-family: var(--mono); font-size: 24px; color: var(--on-night); letter-spacing: -.02em; }
.field input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; }
.field input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--on-night) var(--fill, 50%), var(--rule-night-2) var(--fill, 50%)); }
.field input[type="range"]::-moz-range-track { height: 2px; background: var(--rule-night-2); }
.field input[type="range"]::-moz-range-progress { height: 2px; background: var(--on-night); }
.field input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; background: var(--lime); border: 0; transition: transform .15s ease; }
.field input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; background: var(--lime); border: 0; border-radius: 0; }
.field input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.3); }
.field input[type="range"]:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.calc__out { display: grid; gap: 18px; align-content: start; padding: 30px; background: var(--night-2); }
.calc__out .label-sm { margin: 0; }
.calc__big { font-size: clamp(80px, 11vw, 176px); font-weight: 800; font-variation-settings: "wdth" 125; line-height: .82; letter-spacing: -.06em; color: var(--lime); font-variant-numeric: tabular-nums; }
.calc__sentence { font-size: 17px; color: var(--on-night-mute); max-width: 34rem; }
.calc__sentence strong { color: var(--on-night); font-weight: 600; }
.calc__stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule-night-2); }
.calc__stats > div { display: grid; gap: 4px; padding-top: 14px; }
.calc__stats > div + div { padding-left: 18px; border-left: 1px solid var(--rule-night); }
.calc__stats .label-sm { margin: 0; }
.calc__stats b { font-weight: 500; font-size: 26px; letter-spacing: -.02em; }
.calc__alerts { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; }
.calc__alerts i { aspect-ratio: 1; border: 1px solid var(--rule-night-2); transition: background-color .25s ease, border-color .25s ease; }
.calc__alerts i.on { background: var(--lime); border-color: var(--lime); }
.calc__key { display: flex; flex-wrap: wrap; gap: 18px; font-size: 11px; color: var(--on-night-mute); }
.calc__key span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; vertical-align: -1px; border: 1px solid var(--rule-night-2); }
.calc__key .real::before { background: var(--lime); border-color: var(--lime); }
.calc__key .calc__note::before { display: none; }
.calc__moral { margin-top: 18px; padding: 18px 22px; border-left: 3px solid var(--lime); background: var(--night-2); font-size: 17px; }
.calc__moral span { color: var(--lime); margin-right: 6px; }

/* ---------- CTA: dithered night band ---------- */
.cta::before { display: none; }
.cta__band { position: absolute; left: 0; right: 0; top: 18%; bottom: 18%; pointer-events: none; }
.cta__inner { z-index: 1; }
.cta h2, .cta p { text-shadow: none; }

/* ---------- Scramble ---------- */
[data-scramble] { font-variant-ligatures: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav a span { display: none; }
  .ledger__head, .ledger__row { grid-template-columns: 96px minmax(120px, 1fr) minmax(200px, 2fr) 120px 104px; }
  .ledger__head > :nth-child(5), .ledger__row > :nth-child(5) { display: none; }
  .sources__list { grid-template-columns: repeat(4, 1fr); }
  .sources__list li:nth-child(5) { border-left: 0; }
  .sources__list li:nth-child(n+5) { border-top: 1px solid var(--rule-2); }
  .sources__join { display: none; }
  .sources__note { margin-top: 16px; }
  .estate__body { grid-template-columns: 1fr; }
  .estate__table { border-right: 0; border-bottom: 1px solid var(--ink); }
  .console__grid { grid-template-columns: 1fr 1fr; }
  .console__request { grid-column: 1 / -1; border-bottom: 1px solid var(--rule-night-2); }
  .console__policy { border-left: 0 !important; }
  .lifecycle__copy { grid-column: 1 / -1; max-width: 640px; }
  .lifecycle__steps { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .nav, .link-quiet { display: none; }
  .masthead__inner { justify-content: space-between; }
  .menu-toggle { display: block; }
  .hero__foot { grid-template-columns: 1fr; }
  .hero__lede, .hero__actions { grid-column: 1; }
  .hero__actions { justify-content: flex-start; }
  .index__list { grid-template-columns: repeat(2, 1fr); }
  .index__list li:nth-child(3) { border-left: 0; }
  .index__list li:nth-child(n+3) { border-top: 1px solid var(--rule-2); }
  .index__list li:nth-child(3) a { padding-left: 0; }
  .chapter__head { grid-template-columns: 1fr; }
  .chapter h2, .chapter__intro { grid-column: 1; max-width: 760px; }
  .findings__grid { grid-template-columns: repeat(2, 1fr); }
  .findings__grid li:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .findings__grid li:nth-child(2n) { padding-left: 24px; border-left: 1px solid var(--rule-2); }
  .outcomes__grid { grid-template-columns: repeat(2, 1fr); }
  .outcomes__grid li:nth-child(3) { padding-left: 0; border-left: 0; }
  .detect, .install { grid-template-columns: 1fr; }
  .detect__copy, .detect__list, .install__copy, .install .code--diff { grid-column: 1; }
  .contain { grid-template-columns: 1fr; }
  .contain article { padding-left: 0; }
  .contain article + article { border-left: 0; border-top: 1px solid var(--rule-night-2); }
  .lifecycle__steps { grid-template-columns: 1fr; gap: 0; }
  .lifecycle__steps li { grid-template-columns: 34px 1fr; column-gap: 16px; padding: 0 0 22px; }
  .lifecycle__steps li span { grid-row: span 2; }
  .lifecycle__steps strong { margin-top: 4px; }
  .lifecycle__steps li::before { top: 34px; left: 17px; right: auto; bottom: 0; border-top: 0; border-left: 1px dashed var(--rule-night-2); }
  .proof { grid-template-columns: 1fr; gap: 56px; }
  .chapter__head--tight, .receipt { grid-column: 1; }
  .receipt { margin-right: 10px; }
  .path__steps { grid-template-columns: repeat(2, 1fr); }
  .path__steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .path__steps li { padding-bottom: 26px; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .grid-lines { grid-template-columns: repeat(2, 1fr); }
  .grid-lines i:nth-child(n+3) { display: none; }
  .hero__meta span:last-child { display: none; }
  .ledger__counts { display: none; }
  .ledger__bar { justify-content: space-between; }
  .ledger__head { display: none; }
  .ledger__rows { height: calc(6 * 64px); }
  .ledger__row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; height: 64px; row-gap: 2px; align-content: center; }
  .ledger__row .t, .ledger__row .insp, .ledger__row .r { display: none; }
  .ledger__row .a { grid-column: 1; grid-row: 1; color: var(--mute); font-size: 11.5px; }
  .ledger__row .x { grid-column: 1; grid-row: 2; }
  .ledger__row .v { grid-column: 2; grid-row: 1 / span 2; }
  @keyframes row-in { from { opacity: 0; transform: translateY(-64px); } to { opacity: 1; transform: none; } }
  .sources__list { grid-template-columns: repeat(2, 1fr); }
  .sources__list li { min-height: 0; }
  .sources__list li:nth-child(odd) { border-left: 0; }
  .sources__list li:nth-child(5) { border-left: 0; }
  .sources__list li:nth-child(n+3) { border-top: 1px solid var(--rule-2); }
  .sources__list li:nth-child(even) { border-left: 1px solid var(--rule-2); }
  .estate__filters, .console__picker { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .estate__filters button, .console__picker button { flex: 0 0 auto; white-space: nowrap; }
  .erow-head { display: none; }
  .erow { grid-template-columns: 1fr auto; padding: 12px 14px; row-gap: 6px; }
  .erow__reach, .erow .evid { display: none; }
  .erow .tag { grid-column: 2; grid-row: 1; }
  .erow__owner { display: none; }
  .findings__grid { grid-template-columns: 1fr; }
  .findings__grid li:nth-child(2n) { padding-left: 0; border-left: 0; }
  .console__grid { grid-template-columns: 1fr; }
  .console__grid > div + div { border-left: 0; border-top: 1px solid var(--rule-night-2); }
  .console__request { border-bottom: 0; }
  .code--lines { overflow-x: auto; font-size: 11.5px; }
  .code--lines li { overflow: visible; width: max-content; min-width: 100%; }
  .outcomes__grid { grid-template-columns: 1fr; }
  .outcomes__grid li { padding-left: 0 !important; border-left: 0 !important; }
  .index__list { grid-template-columns: 1fr; }
  .index__list li + li { border-left: 0; border-top: 1px solid var(--rule-2); }
  .index__list a { padding: 20px 0; }
  .path__steps { grid-template-columns: 1fr; }
  .path__steps li { padding-left: 0 !important; border-left: 0 !important; border-bottom: 1px solid var(--rule-2); padding-bottom: 20px; }
  .receipt dl div { grid-template-columns: 1fr; gap: 2px; }
  .install .code--diff { font-size: 11.5px; overflow-x: auto; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
.nw { white-space: nowrap; }

@media (max-width: 1180px) {
  .calc__intro { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .hero__foot { grid-template-columns: 1fr; }
  .hero__lede, .hero__actions { grid-column: 1; }
  .hero__actions { justify-content: flex-start; }
  .flow-legend { left: auto; right: var(--gutter); transform: translateY(100%); }
  .flow-legend .k-lens { display: none; }
  .story { grid-template-columns: 1fr; gap: 0; }
  .story__stage { grid-column: 1; grid-row: 1; position: sticky; top: 60px; z-index: 2; height: auto; padding: 12px 0; background: var(--paper); }
  .story__steps { grid-column: 1; grid-row: 2; }
  .story__step, .story__step:first-child { min-height: 62vh; justify-content: flex-start; padding: 28px 0 0; }
  .calc__grid { grid-template-columns: 1fr; }
  .calc__controls { border-right: 0; border-bottom: 1px solid var(--rule-night-2); }
}
@media (max-width: 720px) {
  .flow-label { font-size: 10px; padding: 2px 5px; }
  .flow-gate span { font-size: 9.5px; }
  .flow-legend { gap: 10px; font-size: 9.5px; }
  .calc__controls, .calc__out { padding: 22px 18px; }
  .calc__alerts { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title .line > span, .hero__title mark { animation: none; }
}

/* View transitions for state swaps in the explorer and console */
.estate__detail { view-transition-name: estate-detail; }
.verdict { view-transition-name: console-verdict; }
::view-transition-old(estate-detail), ::view-transition-old(console-verdict) { animation: vt-out .18s ease both; }
::view-transition-new(estate-detail), ::view-transition-new(console-verdict) { animation: vt-in .32s cubic-bezier(.2,.7,.2,1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 720px) {
  .hero__band { margin-top: 56px; min-height: 300px; }
  .flow-label { display: none; }
  .flow-gate span { top: -6px; }
  .flow-legend { left: var(--gutter); right: auto; bottom: 0; transform: translateY(calc(100% + 8px)); }
  .hero__foot { padding-top: 34px; }
}

/* Hero inspection card (hover to inspect) */
.inspect, .inspect__mark { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .15s ease; }
.inspect.is-on, .inspect__mark.is-on { opacity: 1; }
.inspect { width: 300px; border: 1px solid var(--ink); background: var(--paper-3); box-shadow: 6px 6px 0 var(--ink); }
.inspect__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--ink); color: var(--paper); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.inspect__head .stamp { color: var(--paper); font-size: 10px; padding: 2px 6px 1px; }
.inspect__head .stamp.v-allow { color: #6fd39a; }
.inspect__head .stamp.v-deny { color: #ff6a50; }
.inspect__head .stamp.v-hold { color: #ffbe45; }
.inspect dl { margin: 0; padding: 4px 10px; font-size: 11.5px; }
.inspect dl div { display: grid; grid-template-columns: 78px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--rule-2); }
.inspect dt { color: var(--mute); }
.inspect dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspect .insp i { width: 11px; height: 11px; }
.inspect__run { color: var(--mute); animation: blink 1s steps(2, jump-none) infinite; }
.inspect__note { padding: 8px 10px 10px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.inspect[data-phase="deny"] .inspect__note { color: var(--deny); }
.inspect__mark { width: 18px; height: 18px; border: 2px solid var(--lime); outline: 1px solid var(--ink); }
.inspect__mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: var(--lime); }
@media (hover: none) { .inspect, .inspect__mark { display: none; } }
.hero > .inspect, .hero > .inspect__mark { position: absolute; z-index: 3; }

/* Hero teaser: plays over the hero on load, then hands over to it */
.hero__intro { display: none; position: absolute; inset: 0; z-index: 6; background: var(--paper); transition: opacity .7s ease, background-color .35s ease; }
.intro-on .hero__intro, .hero__intro.is-open, .hero__intro.is-out { display: block; }
.hero__intro.is-night { background: var(--ink); }
.hero__intro.is-out { opacity: 0; pointer-events: none; }
.hero__frame { position: relative; margin: 0 auto; width: min(100%, (100svh - 60px) * 16 / 9); aspect-ratio: 16 / 9; }
.hero__intro[data-cut="4x5"] .hero__frame { width: min(100%, (100svh - 60px) * 4 / 5); aspect-ratio: 4 / 5; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__intro-ctl { position: absolute; right: clamp(10px, 1.6vw, 24px); bottom: clamp(10px, 1.6vw, 24px); display: flex; gap: 8px; }
.hero__intro-ctl button { min-height: 36px; padding: 0 12px; border: 1px solid var(--ink); background: var(--paper-3); color: var(--ink); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .07em; cursor: pointer; }
.hero__intro-ctl button:hover, .hero__intro-ctl button[aria-pressed="true"] { background: var(--lime); }
.hero__intro.is-night .hero__intro-ctl button { border-color: var(--rule-night-2); background: var(--night-2); color: var(--on-night); }
.hero__intro.is-night .hero__intro-ctl button:hover { background: var(--lime); color: var(--ink); }
.intro-on .hero__title .line > span, .intro-on .hero__title mark { animation-play-state: paused; }
.hero__replay { flex-basis: 100%; display: inline-flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 4px 0; border: 0; background: none; color: var(--ink-2); font-size: 13px; letter-spacing: .02em; cursor: pointer; }
.hero__replay span { font-size: 10px; }
.hero__replay:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 960px) { .hero__replay { justify-content: flex-start; } }
.hero > .hero__intro { position: absolute; z-index: 6; }
.hero__intro[data-cut="4x5"] .hero__intro-ctl { top: 100%; bottom: auto; right: var(--gutter); margin-top: 12px; }
