:root {
  --ink: #0d0d0d;
  --chalk: #f1f1ee;
  --stone: #d8d5cd;
  --neon: #00ff1f;
  --card: var(--ink);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --side: clamp(1rem, 2.2vw, 2rem);
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--ink); color: var(--chalk); font: 400 17px/1.5 var(--display); letter-spacing: -0.01em;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; border-radius: 0; }
:focus-visible { outline: 3px solid var(--neon); outline-offset: 4px; }
.green :focus-visible { outline-color: var(--ink); }
.hidden { display: none !important; }

.mono, .strip, .bullet, .btn-neon, .btn-ink, .seg button, .spec-table, .links a {
  font-family: var(--mono); font-weight: 400; font-size: 0.85rem; line-height: 1.3; letter-spacing: -0.03em; text-transform: uppercase;
}
.bullet { display: inline-flex; align-items: baseline; gap: 0.55em; }
.bullet::before { content: ""; width: 0.7em; height: 0.7em; background: currentColor; flex: none; align-self: center; }
.dim { opacity: 0.6; }

.strip { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem 2rem; flex-wrap: wrap; padding: 1rem var(--side); position: relative; z-index: 2; }
.links { display: flex; gap: 1.75rem; }
.links a, .foot a { position: relative; }
.links a::after, .foot a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.links a:hover::after, .foot a:hover::after { transform: scaleX(1); }

.dark { background: var(--ink); color: var(--chalk); }
.light { background: var(--chalk); color: var(--ink); --card: var(--ink); --card-ink: var(--chalk); --rule: var(--ink); }
.green { background: var(--neon); color: var(--ink); }
@media (prefers-color-scheme: dark) {
  .light { background: var(--ink); color: var(--chalk); --card: #1d1d1b; --card-ink: var(--chalk); --rule: var(--chalk); }
}

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--neon); transform: scaleX(0); transform-origin: left; z-index: 50; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; display: block; }

.field { position: absolute; inset: 0; padding: 0 var(--side); z-index: 0; overflow: hidden; }
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero { position: relative; min-height: max(260svh, 640px); }
.wordmark {
  position: relative; z-index: 2; font: 400 clamp(4.6rem, 19vw, 19rem)/0.8 var(--display); letter-spacing: -0.055em;
  padding: 3rem var(--side) 0; margin-left: -0.03em; animation: rise 1.1s var(--ease) both;
}
.hero-sub { position: relative; z-index: 2; padding: 2rem var(--side) 0; max-width: 46rem; opacity: 0.75; animation: rise 1.1s 0.15s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
.neon-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--neon); color: var(--ink); font: 400 clamp(1.2rem, 2.6vw, 2.2rem)/1 var(--display); letter-spacing: -0.02em;
  padding: clamp(1.2rem, 2.4vw, 2rem) var(--side); transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.neon-bar i { font-style: normal; font-size: 1.5rem; display: inline-block; transition: transform 0.3s var(--ease); }
.neon-bar:hover { background: var(--ink); color: var(--neon); }
.neon-bar:hover i { transform: translate(4px, -4px); }

.about { position: relative; z-index: 1; padding-bottom: clamp(3rem, 8vw, 6rem); }
.lede {
  padding: clamp(2rem, 6vw, 5rem) var(--side) clamp(3rem, 7vw, 6rem);
  font-size: clamp(2.1rem, 6.6vw, 6.6rem); line-height: 0.96; letter-spacing: -0.04em;
}
.lede .w { opacity: 0.14; transition: opacity 0.4s var(--ease); }
.lede .w.on { opacity: 1; }
.note {
  display: inline-block; vertical-align: super; font: 400 0.75rem/1.15 var(--mono); letter-spacing: -0.03em; text-transform: uppercase;
  max-width: 10ch; margin: 0 0.4em; transform: translateY(-0.6em);
}
.rule { display: inline-block; width: 11vw; height: 1px; background: currentColor; vertical-align: middle; position: relative; margin: 0 0.15em; }
.rule.arrow::after {
  content: ""; position: absolute; right: -1px; top: -4px; width: 0; height: 0;
  border-left: 8px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}
.source-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule); margin: 0 var(--side); }
.source-row .cell { position: relative; padding: 0.9rem 0.75rem 2.4rem; min-height: 8.5rem; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 0.3rem; }
.source-row .cell:first-child { border-left: 0; padding-left: 0; }
.source-row .cell > * { position: relative; z-index: 1; transition: color 0.4s 0.6s var(--ease); }
.source-row small { opacity: 0.6; }
.source-row .hot::before {
  content: ""; position: absolute; inset: 0; background: var(--card); transform: scaleX(0); transform-origin: left; transition: transform 0.9s 0.5s var(--ease);
}
.source-row.in .hot::before { transform: scaleX(1); }
.source-row.in .hot > * { color: var(--card-ink); }
.source-row .hot small { opacity: 0.8; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: clamp(2rem, 5vw, 4rem) var(--side) 0; }
.card {
  background: var(--card); color: var(--card-ink); min-height: clamp(15rem, 32vw, 30rem); padding: 1rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
}
.card .num { font: 400 clamp(6rem, 19vw, 19rem)/0.8 var(--display); letter-spacing: -0.06em; margin-left: -0.04em; }
.card .cap { font-size: clamp(0.8rem, 1.5vw, 1.3rem); }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

.pin { position: relative; }
.receipt-pin { height: 340vh; }
.spec { height: 550vh; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; }

.seg { position: relative; display: inline-flex; padding: 0.3rem; box-shadow: inset 0 0 0 1px rgba(241, 241, 238, 0.4); }
.seg .slab { position: absolute; top: 0.3rem; bottom: 0.3rem; left: 0; width: 0; background: var(--chalk); transition: transform 0.3s var(--ease), width 0.3s var(--ease); }
.seg button { position: relative; z-index: 1; padding: 0.45rem 0.9rem; transition: color 0.3s var(--ease); }
.seg button[aria-selected="true"] { color: var(--ink); }
.btn-neon { background: var(--neon); color: var(--ink); padding: 0.6rem 0.9rem; transition: background 0.25s var(--ease), color 0.25s var(--ease); white-space: nowrap; }
.btn-neon:hover { background: var(--chalk); }
.light .btn-neon:hover { background: var(--ink); color: var(--neon); }
.btn-neon:disabled { cursor: progress; opacity: 0.6; }
.btn-ink { background: var(--ink); color: var(--neon); padding: 0.45rem 0.7rem; white-space: nowrap; transition: background 0.25s var(--ease), color 0.25s var(--ease); }
.btn-ink:hover { background: var(--neon); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-ink:disabled { opacity: 0.5; cursor: progress; }

.receipt-head { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--side); font: 400 clamp(4.5rem, 15vw, 14rem)/0.8 var(--display); letter-spacing: -0.05em; }
.receipt-head span { display: block; white-space: nowrap; }
.receipt-head .l2 { padding-left: 30%; will-change: transform; }
.notes { position: relative; z-index: 2; align-self: flex-end; width: min(40rem, calc(100% - 2 * var(--side))); margin: 0 var(--side) 1rem; display: grid; gap: 0.6rem; }
.notes textarea {
  width: 100%; resize: none; background: transparent; color: var(--chalk); border: 1px solid rgba(241, 241, 238, 0.4); border-radius: 0;
  font: 400 1rem/1.4 var(--display); padding: 0.6rem 0.8rem; height: calc(7em + 1.2rem); overflow-y: auto;
}
.strip.bottom { padding-top: 0.4rem; }

.spec .sticky { padding-bottom: var(--side); }
.spec-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--side); padding: 0 var(--side); }
.spec-tables { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding-top: 1rem; }
.spec-table > div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--ink); align-items: center; }
.spec-table > div:last-child { border-bottom: 1px solid var(--ink); }
.spec-table dd { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.letter-box { position: relative; display: grid; place-items: center; min-height: 0; }
.letter { font: 400 clamp(16rem, 38vw, 38rem)/0.8 var(--display); letter-spacing: -0.05em; }
.gl-on .letter { visibility: hidden; }
.crop { position: absolute; width: 18px; height: 18px; }
.crop::before, .crop::after { content: ""; position: absolute; background: var(--ink); }
.crop::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.crop::after { top: 50%; left: 0; right: 0; height: 1px; }
.crop.tl { top: 6%; left: 6%; } .crop.tr { top: 6%; right: 6%; } .crop.bl { bottom: 6%; left: 6%; } .crop.br { bottom: 6%; right: 6%; }

.try { position: relative; z-index: 21; padding-bottom: clamp(4rem, 9vw, 8rem); }
.try-head { padding: clamp(2rem, 5vw, 4rem) var(--side) clamp(2rem, 4vw, 3rem); font: 400 clamp(2.6rem, 7vw, 7rem)/0.9 var(--display); letter-spacing: -0.045em; }
.ask { margin: 0 var(--side); display: grid; gap: 0.6rem; }
.ask-row { display: flex; gap: 1rem; align-items: stretch; border-bottom: 1px solid var(--rule); padding-bottom: 0.8rem; }
.ask input { flex: 1; min-width: 0; background: transparent; border: 0; color: inherit; font: 400 clamp(1.3rem, 2.4vw, 2rem)/1.2 var(--display); letter-spacing: -0.02em; }
.ask input:focus { outline: none; }
.ask-row:focus-within { border-bottom-color: var(--neon); box-shadow: 0 1px 0 var(--neon); }
.btn-neon.big { font-size: 1rem; padding: 0.9rem 1.4rem; }

.src-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 2.2rem var(--side) 0; border-top: 1px solid var(--rule); }
.src { position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 0.9rem 0.75rem 1rem; border-left: 1px solid var(--rule); min-height: 9rem; transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.src:first-child { border-left: 0; }
.src .name { font: 400 1.25rem/1.1 var(--display); letter-spacing: -0.02em; }
.src .status { min-height: 2.6em; opacity: 0.7; }
.src .status a { text-decoration: underline; text-underline-offset: 2px; }
.src .toggle { margin-top: auto; align-self: flex-start; padding: 0.3rem 0.55rem; box-shadow: inset 0 0 0 1px currentColor; }
.src .toggle:hover { background: var(--ink); color: var(--chalk); }
.src.off { opacity: 0.45; }
.src.off .name { text-decoration: line-through; }
.src.paying .status::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; background: currentColor; margin-right: 0.5em; animation: blink 0.6s steps(2) infinite; }
.src.flagged { background: var(--ink); color: var(--chalk); }
.src.flagged .status { opacity: 1; color: var(--chalk); }
.src.decisive { background: var(--neon); color: var(--ink); }
@keyframes blink { 50% { opacity: 0; } }
.hint { margin: 0.9rem var(--side) 0; opacity: 0.6; max-width: 60rem; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin: 2.4rem var(--side) 0; }
.steps li { padding: 0.7rem 0.75rem; box-shadow: inset 0 0 0 1px var(--rule); transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.steps li.active { background: var(--neon); color: var(--ink); }
.steps li.done { background: var(--ink); color: var(--chalk); }
.error { margin: 1.2rem var(--side) 0; padding: 0.9rem 1rem; box-shadow: inset 0 0 0 1px var(--rule); }

.results { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); margin: clamp(2.5rem, 5vw, 4rem) var(--side) 0; align-items: start; }
.pick { font: 400 clamp(2rem, 4vw, 3.6rem)/1 var(--display); letter-spacing: -0.035em; }
.reason { margin-top: 0.8rem; max-width: 40em; opacity: 0.75; }
.scores { margin-top: 1.4rem; display: grid; gap: 0.5rem; }
.score { display: grid; grid-template-columns: 11rem 1fr 2.6rem; gap: 1rem; align-items: center; font-family: var(--mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: -0.03em; opacity: 0.6; }
.score.win { opacity: 1; }
.track { position: relative; height: 10px; background: var(--stone); overflow: hidden; }
.fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); transition: width 0.9s var(--ease); }
@media (prefers-color-scheme: dark) { .light .track { background: #2a2a28; } .light .fill { background: var(--chalk); } }
.score .v { text-align: right; }
.flip { margin-top: 1.6rem; padding: 1rem 1.1rem; background: var(--neon); color: var(--ink); font-size: 1.2rem; line-height: 1.35; letter-spacing: -0.015em; }

.block { margin-top: 2.6rem; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-bottom: 0.7rem; border-bottom: 1px solid var(--rule); }
.inf { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: center; }
.inf .who { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; font: 400 1.25rem/1.1 var(--display); letter-spacing: -0.02em; }
.inf .pct { font: 400 2.2rem/1 var(--display); letter-spacing: -0.04em; text-align: right; }
.inf .track { grid-column: 1 / -1; }
.inf .meta { opacity: 0.7; }
.inf .btn-ink { justify-self: end; }
.inf.removed { opacity: 0.55; }
.inf.flagged .fill { background: var(--stone); }
.tag { font: 400 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: -0.02em; padding: 0.3rem 0.45rem; }
.tag.decisive { background: var(--neon); color: var(--ink); }
.tag.cheat { background: var(--ink); color: var(--chalk); }
.tag.delta { box-shadow: inset 0 0 0 1px currentColor; }
.ghost { position: absolute; top: 0; bottom: 0; left: 0; border-right: 2px solid var(--neon); }
.evidence { display: block; margin-top: 0.8rem; padding: 0.9rem 1rem; background: var(--ink); color: var(--chalk); font: 400 0.82rem/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }
.evidence mark { background: var(--neon); color: var(--ink); padding: 0 0.25em; }
#cheatBody p { margin-top: 0.9rem; max-width: 40em; }

.res-side { position: sticky; top: 1.5rem; }
.txlink { display: block; margin: 0.8rem 0 0; word-break: break-all; text-decoration: underline; text-underline-offset: 3px; }
.legs { margin-top: 0.8rem; }
.legs > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.legs dt { font: 400 1.15rem/1.15 var(--display); letter-spacing: -0.02em; }
.legs dt a { display: block; font: 400 0.78rem/1.4 var(--mono); opacity: 0.6; }
.legs dd { font: 400 1.15rem/1 var(--display); text-align: right; white-space: nowrap; }
.legs .payer dd { opacity: 0.6; }
.legs .total { border-bottom: 0; }
.legs .total dt, .legs .total dd { font: 400 0.85rem/1.3 var(--mono); text-transform: uppercase; opacity: 0.7; }
#receiptLine { margin-top: 1rem; }
#receiptLine a { text-decoration: underline; }

.ledger { margin: clamp(4rem, 9vw, 7rem) var(--side) 0; }
.audit { margin-top: 1rem; padding: 0.9rem 1rem; background: var(--neon); color: var(--ink); }
.audit.bad { background: var(--ink); color: var(--chalk); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin-top: 1.4rem; }
.stat { background: var(--card); color: var(--card-ink); padding: 1rem; min-height: 11rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1.2rem; }
.stat b { font: 400 clamp(2rem, 3.6vw, 3.4rem)/0.9 var(--display); letter-spacing: -0.045em; }
.stat small { opacity: 0.7; }
.receipts { width: 100%; border-collapse: collapse; margin-top: 1.8rem; }
.receipts th, .receipts td { text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; font-weight: 400; }
.receipts th { opacity: 0.6; }
.receipts .num { text-align: right; padding-right: 0; }
.receipts a { text-decoration: underline; text-underline-offset: 2px; }

.agents { position: relative; z-index: 21; padding-bottom: clamp(4rem, 8vw, 7rem); }
.agents-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(2rem, 5vw, 4rem) var(--side) 0; }
.agents-head { font: 400 clamp(2.4rem, 5vw, 5rem)/0.92 var(--display); letter-spacing: -0.045em; }
.agents-copy p { max-width: 34em; opacity: 0.8; }
.agents-copy p + p { margin-top: 1rem; }
.code { margin-top: 1.6rem; padding: 1rem 1.1rem; box-shadow: inset 0 0 0 1px rgba(241, 241, 238, 0.4); white-space: pre; overflow-x: auto; text-transform: none; }
.foot { position: relative; z-index: 21; padding-top: 1.2rem; padding-bottom: 1.6rem; border-top: 1px solid rgba(241, 241, 238, 0.15); }

@media (max-width: 759px) {
  .hero { min-height: 100svh; }
  .links { display: none; }
  .cards { grid-template-columns: 1fr; }
  .rule { width: 14vw; }
  .source-row .cell { padding: 0.7rem 0.4rem 2rem; min-height: 7rem; }
  .source-row .cell span { font-size: 0.6rem; overflow-wrap: anywhere; }
  .source-row small { display: none; }
  .seg { width: 100%; order: 3; }
  .seg button { flex: 1; }
  .spec-grid { grid-template-columns: 1fr; }
  .letter-box { order: -1; min-height: 62vw; }
  .letter { font-size: 62vw; }
  .src-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .src:nth-child(odd) { border-left: 0; }
  .src { border-bottom: 1px solid var(--rule); }
  .steps { grid-template-columns: 1fr; }
  .results, .agents-grid { grid-template-columns: 1fr; }
  .res-side { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receipts th:nth-child(3), .receipts td:nth-child(3) { display: none; }
  .score { grid-template-columns: 7.5rem 1fr 2rem; }
  .ask-row { flex-direction: column; }
}
@media (max-width: 759px), (prefers-reduced-motion: reduce) {
  .receipt-pin, .spec { height: auto; }
  .sticky { position: relative; height: auto; min-height: 100svh; }
  .receipt-head .l2 { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .lede .w { opacity: 1; }
}
