:root {
  --bg: #07080b;
  --bg-2: #0c0e12;
  --panel: #0f1116;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --fg: #ededef;
  --fg-2: #c4c7ce;
  --muted: #8a8f98;
  --dim: #5b606a;
  --accent: #45e3a0;
  --accent-ink: #062016;
  --bad: #ff5c5c;
  --code-bg: #0b0d11;
  --tok-key: #b4a7ff;
  --tok-str: #f2c47e;
  --tok-com: #5f6570;
  --tok-num: #7cc7ff;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafafa; --bg-2: #f3f3f4; --panel: #ffffff; --line: rgba(0, 0, 0, .07); --line-2: rgba(0, 0, 0, .13);
    --fg: #16171b; --fg-2: #3c3f46; --muted: #5d626b; --dim: #9a9ea6; --accent: #0a8f5a; --accent-ink: #ffffff; --bad: #d93636;
    --code-bg: #ffffff; --tok-key: #6b4fd8; --tok-str: #a35f00; --tok-com: #9a9ea6; --tok-num: #0b6fb8;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #fafafa; --bg-2: #f3f3f4; --panel: #ffffff; --line: rgba(0, 0, 0, .07); --line-2: rgba(0, 0, 0, .13);
  --fg: #16171b; --fg-2: #3c3f46; --muted: #5d626b; --dim: #9a9ea6; --accent: #0a8f5a; --accent-ink: #ffffff; --bad: #d93636;
  --code-bg: #ffffff; --tok-key: #6b4fd8; --tok-str: #a35f00; --tok-com: #9a9ea6; --tok-num: #0b6fb8;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.65 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--fg); text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
code { font-family: var(--mono); font-size: .86em; }
p code, li code, td code { background: var(--bg-2); border: 1px solid var(--line); padding: .05em .35em; border-radius: 5px; }
em { font-style: normal; color: var(--accent); }
h1, h2 { font-weight: 600; letter-spacing: -.045em; line-height: 1; margin: 0; }
h2 { font-size: clamp(34px, 5vw, 56px); }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; justify-content: center; }

/* header */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.mark { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 600; letter-spacing: -.02em; }
.mark img { border-radius: 6px; }
.top nav { display: flex; gap: clamp(14px, 2.4vw, 28px); font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--fg); }
@media (max-width: 640px) { .top nav a:not(.gh) { display: none; } }

/* hero: runs of the budget rule, drawn in once */
.hero { position: relative; min-height: min(88vh, 820px); display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; isolation: isolate; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art .runs { position: absolute; inset: 0; width: 100%; height: 100%; }
.runs .run { fill: none; stroke: var(--fg); stroke-width: .8; stroke-opacity: var(--o); stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.runs .run.hot { stroke: var(--accent); stroke-width: 1.5; }
.runs .bound { fill: none; stroke: var(--accent); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.js .runs .run, .js .runs .bound { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.8s cubic-bezier(.65, 0, .2, 1) var(--d, 0s) forwards; }
.js .runs .bound { --d: 2.1s; animation-duration: 1.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .js .runs .run, .js .runs .bound { animation: none; stroke-dashoffset: 0; } }
.hero-copy { padding: clamp(72px, 12vh, 140px) var(--gutter); max-width: var(--max); width: 100%; margin: 0 auto; position: relative; }
.hero-eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(60px, 11vw, 136px); letter-spacing: -.055em; }
.lede { font-size: clamp(22px, 2.8vw, 32px); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; margin: 14px 0 18px; }
.sub { max-width: 60ch; color: var(--fg-2); margin: 0 0 28px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.cmd {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  font: 450 14px/1 var(--mono); color: var(--fg);
  background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 12px 13px; cursor: pointer; text-align: left; overflow-x: auto; white-space: nowrap;
  transition: border-color .15s;
}
.cmd:hover { border-color: var(--accent); }
.cmd .prompt { color: var(--accent); }
.cmd .copy-label { font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); border-left: 1px solid var(--line-2); padding-left: 10px; margin-left: 2px; }
.cmd.copied .copy-label { color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; font-size: 14px; }
.links a { color: var(--fg-2); }
.links span { color: var(--dim); }
@media (max-width: 760px) {
  .hero { align-items: start; }
  .hero-copy { padding-bottom: 300px; }
  .hero-art { top: auto; height: 280px; }
  .cmd { font-size: 12.5px; padding: 11px; gap: 8px; }
}

/* film */
.film[hidden] { display: none; }
.film { padding: 64px var(--gutter) 0; max-width: var(--max); margin: 0 auto; }
.film-frame { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #000; aspect-ratio: 16 / 9; }
.film-frame video { width: 100%; height: 100%; object-fit: cover; }

/* section divider: a hairline with the bound's accent at its start */
.circuit { max-width: var(--max); margin: 88px auto 0; padding: 0 var(--gutter); }
.circuit span { display: block; height: 1px; background: var(--line-2); position: relative; }
.circuit span::before { content: ""; position: absolute; left: 0; top: 0; width: 48px; height: 1px; background: var(--accent); }

/* bands */
.band { max-width: var(--max); margin: 0 auto; padding: 96px var(--gutter) 0; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.intro { max-width: 68ch; color: var(--fg-2); margin: 20px 0 32px; }
.note, .caption { color: var(--muted); font-size: 13.5px; }
.caption { margin: 10px 2px 0; }

/* code */
.code {
  margin: 0; background: var(--code-bg); color: var(--fg);
  border: 1px solid var(--line-2); border-radius: 10px;
  padding: 18px 20px; overflow: auto; max-height: 520px;
  font: 400 13.5px/1.65 var(--mono); tab-size: 2;
}
.code code { font-size: inherit; background: none; border: 0; padding: 0; }
.tok-key { color: var(--tok-key); }
.tok-str { color: var(--tok-str); }
.tok-com { color: var(--tok-com); }
.tok-num { color: var(--tok-num); }
.tok-hi { color: var(--accent); font-weight: 500; }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-bottom: 12px; padding: 3px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg-2); }
.tabs button { font: 500 14px/1 var(--sans); color: var(--muted); background: transparent; border: 0; border-radius: 6px; padding: 9px 14px; cursor: pointer; }
.tabs button:hover { color: var(--fg); }
.tabs button .count { font: 400 11.5px/1 var(--mono); color: var(--dim); margin-left: 6px; }
.tabs button[aria-selected="true"] { color: var(--fg); background: var(--panel); box-shadow: 0 0 0 1px var(--line-2); }
.tabs button[aria-selected="true"] .count { color: var(--accent); }

.table-wrap { overflow-x: auto; margin-top: 40px; border: 1px solid var(--line-2); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
caption { caption-side: bottom; text-align: left; padding: 12px 16px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
thead th { font: 500 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); }
tbody th { font-weight: 500; vertical-align: top; color: var(--fg-2); }
td { color: var(--fg-2); }
.n { text-align: right; font-family: var(--mono); font-size: 13px; }
tr.us td { color: var(--accent); font-weight: 500; }
.note { margin-top: 14px; max-width: 75ch; }

/* splits */
.split > *, .grid > *, .trust > *, .people > * { min-width: 0; }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: start; margin-top: 32px; }
.split p { margin: 0 0 14px; color: var(--fg-2); max-width: 56ch; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.false .code { border-color: color-mix(in srgb, var(--bad) 35%, var(--line-2)); }

/* what it proves */
.grid { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.grid li { background: var(--bg); padding: 22px 22px 24px; }
.grid li p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.uses { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.uses p { margin: 0; color: var(--fg-2); font-size: 15px; }
.uses strong { color: var(--accent); font-weight: 600; font-family: var(--mono); font-size: .95em; }
@media (max-width: 700px) { .uses { grid-template-columns: 1fr; } }

/* boundary diagram */
.boundary { grid-template-columns: 1.1fr 1fr; }
@media (max-width: 860px) { .boundary { grid-template-columns: 1fr; } }
.diagram { margin: 0; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); padding: 12px; }
.diagram svg { width: 100%; height: auto; }
.r-lean { fill: none; stroke: var(--dim); stroke-width: 1; stroke-dasharray: 4 4; }
.r-bend { fill: var(--bg-2); stroke: var(--dim); stroke-width: 1; }
.r-gdp { fill: color-mix(in srgb, var(--accent) 7%, var(--bg)); stroke: var(--accent); stroke-width: 1.25; }
.t-region { font: 600 22px var(--sans); letter-spacing: -.03em; fill: var(--fg); }
.t-region.gold { fill: var(--accent); font-size: 24px; }
.t-small { font: 400 12px var(--sans); fill: var(--muted); }
.t-tag { font: 500 11.5px var(--mono); fill: var(--fg-2); }
.t-mono { font: 500 12px var(--mono); fill: var(--fg); }
.t-mono.dim { fill: var(--accent); font-weight: 400; }
.wire path { fill: none; stroke: var(--fg-2); stroke-width: 1; }
.wire circle { fill: var(--bg-2); stroke: var(--fg-2); stroke-width: 1; }
.wire.soft path { stroke: var(--dim); }
.wire.soft circle { stroke: var(--dim); }
.structures { display: grid; gap: 26px; }
.structure { border-left: 1px solid var(--accent); padding-left: 18px; }
.structure.handoff { border-left-color: var(--dim); }
.structure p { margin: 0; color: var(--fg-2); font-size: 15px; }

/* trust */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 32px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.tier { background: var(--bg); padding: 22px; }
.tier h3 { font: 500 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.tier p { margin: 0; color: var(--fg-2); font-size: 14.5px; }
.tier.yes h3 { color: var(--accent); }
.tier.no h3 { color: var(--muted); }
.tier.lean h3 { color: var(--fg); }
@media (max-width: 860px) { .trust { grid-template-columns: 1fr; } }
.checks { margin: 24px 0 0; padding-left: 20px; color: var(--fg-2); font-size: 14.5px; display: grid; gap: 6px; max-width: 80ch; }
.checks li::marker { color: var(--accent); }

/* start, credits, footer */
.start { text-align: center; }
.start h2 { margin-bottom: 26px; }
.start .muted { margin-top: 16px; font-size: 14.5px; }
.people { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.people li { background: var(--bg); padding: 22px; }
.people a h3 { font-size: 22px; letter-spacing: -.03em; color: var(--fg); margin-bottom: 8px; }
.people > li > a { text-decoration: none; }
.people > li > a:hover h3 { color: var(--accent); }
.people p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 760px) { .people { grid-template-columns: 1fr; } }
.foot { padding: 0 0 48px; }
.foot .circuit { margin-top: 96px; }
.foot p { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; color: var(--muted); font-size: 13.5px; margin: 24px 0 0; }
.foot p a { color: var(--fg-2); }
.foot span { color: var(--dim); }

@media (max-width: 640px) {
  .code { font-size: 12.5px; padding: 14px; }
  .band { padding-top: 72px; }
}
