/* Granny Bot portal.
   A field of 105 lights, the members of a community, beside the reading
   column. Bitcoin dusk: charcoal ground, cool grey-blue for the majority,
   Bitcoin orange for the dissenting few and for the page's accent, red for
   a conviction (never without its × glyph), pale gold for founders. Inter
   throughout, IBM Plex Mono for events and figures. */

@font-face { font-family: "Inter"; src: url("fonts/inter-roman.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #111214;
  --night2: #1A1B1E;
  --veil: rgba(22, 23, 26, .93);
  --well: rgba(255, 255, 255, .03);
  --line: rgba(var(--line-rgb), .09);
  --line2: rgba(var(--line-rgb), .19);
  --ink: #F2F2F2;
  --ink2: #B6B6B6;
  --ink3: #8F8F8F;
  --steel: #8FA3B8;
  --steel-hi: #AFC0D2;
  --ember: #F7931A;
  --ember-hi: #F7931A;
  --rose: #E5484D;
  --rose-hi: #F16A6F;
  --gold: #FFD27A;
  --serif: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sans: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ez: cubic-bezier(.22, .61, .36, 1);
  --top: 3.5rem;
  /* channels for tints, so every wash and border follows the palette */
  --b-rgb: 247, 147, 26; --b2-rgb: 247, 147, 26; --a-rgb: 143, 163, 184; --a-hi-rgb: 175, 192, 210;
  --x-rgb: 229, 72, 77; --x-hi-rgb: 241, 106, 111; --gold-rgb: 255, 210, 122; --ink-rgb: 242, 242, 242;
  --line-rgb: 255, 255, 255; --hl-rgb: 255, 255, 255; --shadow-rgb: 0, 0, 0; --bg-rgb: 17, 18, 20; --glow-rgb: 36, 38, 43;
  --bg: radial-gradient(110% 80% at 80% 35%, #1D1F23 0%, #111214 60%) fixed, #111214;
  --j-s: #E8D9C0;
  --radius: 4px;
  --card-bg: var(--veil); --card-border: rgba(255, 255, 255, .08); --card-shadow: none; --card-bg-m: #16171A;
  /* the field of lights reads these: majority, minority, conviction, founders,
     the brightest light, a dimmed light, threads, labels, stars, and whether
     the lights glow additively (dark grounds) or sit flat (light grounds) */
  --f-a: #8FA3B8; --f-b: #F7931A; --f-x: #E5484D; --f-gold: #FFD27A; --f-hi: #F2F2F2;
  --f-dim: #2C2E33; --f-line: #8C8C8C; --f-label: #8F8F8F; --f-star: #6C6F76; --f-glow: 1;
}

*, *::before, *::after { box-sizing: border-box; }
/* the whole page scales a little with the screen: every rem-based size grows
   from 16px on a laptop to 18.5px on a wide monitor */
html { font-size: clamp(16px, calc(.42vw + 10.5px), 18.5px); scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--serif);
  font-synthesis: none; font-kerning: normal;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--ember-hi); text-decoration-color: rgba(var(--b-rgb), .35); text-underline-offset: .18em; transition: text-decoration-color .2s var(--ez); }
a:hover { text-decoration-color: var(--ember-hi); }
:focus-visible { outline: 2px solid var(--ember-hi); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(var(--b-rgb), .32); color: var(--ink); }
b, strong { color: var(--ink); font-weight: 600; }
code { font: 400 .84em var(--mono); color: var(--ink); }

.skip { position: absolute; left: -9999px; top: 0; z-index: 90; background: var(--night2); color: var(--ink); padding: .7rem 1rem; font-family: var(--sans); }
.skip:focus { left: 1rem; top: 1rem; }

/* ——— the field */
#sky { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; }
/* on narrow screens the field is drawn into a window inside each card, above it */
#stagecv { position: fixed; inset: 0; z-index: 6; display: block; width: 100%; height: 100%; pointer-events: none; }
@media (min-width: 1201px) { #stagecv { display: none; } }
.stage { display: none; }
body.over-dot { cursor: pointer; }
#chip {
  position: fixed; z-index: 30; left: 0; top: 0; pointer-events: none; opacity: 0;
  font: 500 .78rem/1.45 var(--sans); color: var(--ink2);
  background: rgba(var(--bg-rgb), .92); border: 1px solid var(--line2); border-radius: 6px;
  padding: .4rem .65rem; max-width: 16rem; transition: opacity .18s var(--ez);
}
#chip.on { opacity: 1; }
#chip b { display: block; color: var(--ink); font-weight: 600; }

/* ——— top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: calc(var(--top) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(1rem, env(safe-area-inset-right, 0px)) 0 max(1rem, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 1.5rem;
  background: linear-gradient(to bottom, rgba(var(--bg-rgb), .94), rgba(var(--bg-rgb), .78));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; flex: none; }
.brand svg { width: 1.45rem; height: 1.45rem; color: var(--ember-hi); }
.brand-name { font: 600 1.05rem/1 var(--serif); letter-spacing: -.02em; }
.nav { display: flex; gap: .25rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font: 600 .7rem/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink3); text-decoration: none; padding: .55rem .7rem; border-radius: 999px;
  transition: color .25s var(--ez), background .25s var(--ez);
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ember-hi); background: rgba(var(--b-rgb), .09); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--ember-hi)); transform-origin: 0 50%; transform: scaleX(0); }

/* ——— scenes and cards */
.flow { position: relative; z-index: 1; }
.step {
  min-height: 94vh; display: flex; align-items: center; align-items: safe center;
  padding-block: calc(var(--top) + 6vh) 6vh; padding-inline: 1.25rem;
}
.card {
  position: relative; width: 100%; max-width: min(46rem, 48vw); margin-left: clamp(0rem, 5vw, 7rem);
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 8px;
  padding: 2.1rem 2.3rem 1.9rem;
  box-shadow: var(--card-shadow);
}
.card.bare { background: none; border: none; box-shadow: none; padding: 0; max-width: min(48rem, 50vw); }
.js .card:not(.bare) { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .9s var(--ez), transform .9s var(--ez); }
.js .card.in { opacity: 1; transform: none; }

.eyebrow {
  display: flex; align-items: center; gap: .75rem;
  font: 600 .7rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ember-hi); margin: 0 0 1.1rem; text-wrap: balance;
}
h1 {
  font: 600 clamp(2.7rem, 6.2vw, 5.2rem)/1 var(--serif); letter-spacing: -.045em;
  margin: 0 0 1.6rem; text-wrap: balance;
}
h1 .em {
  display: block; font-style: normal; font-weight: 600;
  color: var(--ember-hi);
}
h2 { font: 600 clamp(1.65rem, 3.1vw, 2.4rem)/1.14 var(--serif); letter-spacing: -.03em; margin: 0 0 1.1rem; text-wrap: balance; }
h3 { font: 600 1.1rem/1.3 var(--serif); letter-spacing: -.01em; margin: 0 0 .35rem; color: var(--ink); }
p { margin: .85rem 0; color: var(--ink2); }
p.first { font-size: 1.06em; color: var(--ink2); margin-top: 0; }
.lede { font-size: clamp(1.12rem, 1.6vw, 1.32rem); line-height: 1.6; color: var(--ink2); max-width: 36rem; margin: 0; }
.sub { color: var(--ink3); font-size: 1.02rem; max-width: 34rem; }
.status { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .7rem; max-width: 36rem; margin: 1.2rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--ink2); }
.status span { font: 600 .66rem/1.6 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ember-hi); border: 1px solid rgba(var(--b-rgb), .45); border-radius: 3px; padding: 0 .45rem; }
.aside { font-style: italic; color: var(--ink3); font-size: .97rem; line-height: 1.6; }
.quiet { font-size: .92rem; color: var(--ink3); margin-top: 1.2rem; }
.hint { font: 400 .82rem/1.5 var(--sans); color: var(--ink3); margin: .3rem 0 .9rem; }

.pull {
  margin: 1.6rem 0 .2rem; padding: 0 0 0 1.2rem; border-left: 2px solid var(--ember);
  font: italic 500 1.18rem/1.5 var(--serif); color: var(--ink); text-wrap: pretty;
}
.pull cite { display: block; margin-top: .6rem; font: 600 .66rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; font-style: normal; color: var(--ink3); }

/* ——— buttons and controls */
.btnrow { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.btnrow.tight { margin-top: 0; }
.console .btnrow { display: grid; grid-template-columns: minmax(0, 1fr); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-align: center;
  font: 600 .8rem/1 var(--sans); letter-spacing: .05em; color: var(--ink); text-decoration: none;
  background: rgba(var(--a-rgb), .1); border: 1px solid rgba(var(--a-hi-rgb), .38); border-radius: var(--radius);
  padding: .8rem 1.25rem; cursor: pointer;
  transition: background .25s var(--ez), border-color .25s var(--ez), box-shadow .3s var(--ez), transform .2s var(--ez);
}
.btn.ember { background: rgba(var(--b2-rgb), .17); border-color: rgba(var(--b-rgb), .6); }
.btn.steel { background: rgba(var(--a-rgb), .15); border-color: rgba(var(--a-hi-rgb), .55); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.btn.on { border-color: var(--ember-hi); color: var(--ember-hi); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not([disabled]) { background: rgba(var(--a-rgb), .2); border-color: var(--steel-hi); }
  .btn.ember:hover:not([disabled]) { background: rgba(var(--b2-rgb), .28); border-color: var(--ember-hi); }
}
@media (hover: none), (pointer: coarse) { .pointer-only { display: none; } }
@media (hover: hover) and (pointer: fine) { .touch-only { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.actions .btn { padding: .95rem 1.45rem; font-size: .82rem; }

.strip {
  list-style: none; margin: 2.4rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .45rem 1.4rem;
  font: 400 .76rem/1.4 var(--mono); color: var(--ink3); letter-spacing: .01em;
}
.strip li { display: flex; align-items: center; gap: .55rem; }
.strip li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ember-hi); }
.field-hint { position: fixed; right: 1.4rem; bottom: 1.2rem; margin: 0; font: italic 400 .9rem var(--serif); color: var(--ink3); pointer-events: none; transition: opacity .6s var(--ez); }
body.past-hero .field-hint { opacity: 0; }

.ctl { margin: 1.3rem 0 .4rem; font-family: var(--sans); }
.ctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .45rem; }
.ctl-head label { font-size: .86rem; color: var(--ink2); }
.ctl .vl { font: 600 .95rem var(--mono); font-variant-numeric: tabular-nums; color: var(--ember-hi); }
input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; height: 28px; background: none; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--ember-hi) var(--fill, 0%), var(--line2) var(--fill, 0%)); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 19px; height: 19px; margin-top: -8.5px; border-radius: 50%; background: var(--ember-hi); border: 3px solid var(--night); box-shadow: 0 0 0 1px var(--ember-hi); }
input[type=range]::-moz-range-track { height: 2px; background: var(--line2); border-radius: 2px; }
input[type=range]::-moz-range-progress { height: 2px; background: var(--ember-hi); }
input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--ember-hi); border: 3px solid var(--night); box-shadow: 0 0 0 1px var(--ember-hi); }

/* segmented radio groups */
/* equal options in one row, each the same width and height; stacked on narrow phones */
.seg, .layers { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); justify-self: stretch; gap: 3px; padding: 3px; border: 1px solid var(--line2); border-radius: 8px; background: var(--well); }
.seg label, .layers label { position: relative; cursor: pointer; display: flex; min-width: 0; }
.seg input, .layers input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span, .layers span {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: .6rem .7rem; border-radius: 5px;
  font: 600 .72rem/1.25 var(--sans); letter-spacing: .02em; color: var(--ink3);
  transition: background .25s var(--ez), color .25s var(--ez);
}
.seg input:checked + span, .layers input:checked + span { background: rgba(var(--b-rgb), .16); color: var(--ember-hi); box-shadow: 0 0 0 1px rgba(var(--b-rgb), .45) inset; }
.seg input:focus-visible + span, .layers input:focus-visible + span { outline: 2px solid var(--ember-hi); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { .seg label:hover span, .layers label:hover span { color: var(--ink); } }

/* ——— tabs (the idea) */
.tabs { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; margin: 1.5rem 0 0; border-bottom: 1px solid var(--line); }
.tabs [role=tab] {
  position: relative; appearance: none; background: none; border: 0; cursor: pointer;
  padding: .7rem 0 .8rem; font: 600 .7rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--ink3);
  transition: color .25s var(--ez);
}
.tabs [role=tab]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ember-hi); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ez); }
.tabs [role=tab][aria-selected=true] { color: var(--ink); }
.tabs [role=tab][aria-selected=true]::after { transform: scaleX(1); }
.tabs [role=tab]:hover { color: var(--ink); }
.tabpanel { padding: 1.1rem 0 .3rem; animation: panelIn .6s var(--ez) both; }
.tabpanel:focus-visible { outline-offset: 6px; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.checklist, .mapping, .decl { margin: 1rem 0; padding: 0; display: grid; gap: 0; }
.checklist > div, .mapping > div, .decl > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.checklist > div:last-child, .mapping > div:last-child, .decl > div:last-child { border-bottom: 1px solid var(--line); }
.checklist dt, .mapping dt, .decl dt { font: 600 .74rem/1.4 var(--sans); letter-spacing: .06em; color: var(--ink2); }
.checklist dd, .mapping dd, .decl dd { margin: 0; color: var(--ink2); font-size: .98rem; line-height: 1.5; min-width: 0; }
.checklist dd { display: flex; gap: .55rem; align-items: baseline; }
.checklist dd::before { font: 600 .82rem var(--mono); flex: none; }
.checklist dd.yes::before { content: "✓"; color: var(--steel-hi); }
.checklist dd.no { color: var(--ink); }
.checklist dd.no::before { content: "×"; color: var(--rose-hi); font-size: 1rem; }
.mapping .kind { display: inline-block; margin-right: .55rem; padding: .12rem .45rem; border-radius: 4px; font: 600 .74rem/1.3 var(--mono); color: var(--ember-hi); background: rgba(var(--b-rgb), .1); border: 1px solid rgba(var(--b-rgb), .3); }

/* ——— the clause */
.clause { margin: 1.5rem 0 1.2rem; border: 1px solid var(--line2); border-radius: 10px; background: var(--well); overflow: hidden; }
.clause-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
.clause-tabs { display: flex; align-items: center; gap: .25rem; }
.clause-tabs [role=tab] {
  appearance: none; cursor: pointer; border: 1px solid transparent; background: none; border-radius: 6px;
  padding: .35rem .65rem; font: 600 .8rem/1 var(--mono); color: var(--ink3); transition: all .2s var(--ez);
}
.clause-tabs [role=tab][aria-selected=true] { color: var(--ember-hi); border-color: rgba(var(--b-rgb), .45); background: rgba(var(--b-rgb), .08); }
.clause-src { margin-left: auto; font: 400 .72rem var(--mono); color: var(--ink3); padding-right: .3rem; }
.layers { margin: .9rem .9rem 0; }
.clause-panel { padding: .9rem 1.2rem 1.2rem; }
.clause-panel h3 { margin: .2rem 0 .5rem; font-size: 1.25rem; }
.clause-panel .prose-layer { margin: 0; color: var(--ink2); }
.clause-panel pre { margin: 0; }
.clause[data-layer=prose] .rule-layer, .clause[data-layer=rule] .prose-layer { display: none; }
.clause[data-layer] .prose-layer, .clause[data-layer] .rule-layer { animation: panelIn .5s var(--ez) both; }

pre { overflow-x: auto; max-width: 100%; }
pre code, .json { display: block; font: 400 .8rem/1.6 var(--mono); color: var(--ink2); white-space: pre; tab-size: 2; }
.j-k { color: var(--steel-hi); }
.j-s { color: var(--j-s); }
.j-n { color: var(--ember-hi); }
.j-p { color: var(--ink3); }

/* ——— the case console */
.console { margin: 1.4rem 0 1rem; padding: 1.2rem; border: 1px solid var(--line2); border-radius: 12px; background: var(--well); }
.console-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; margin: 0 0 1rem; padding: 0; border: 0; min-width: 0; }
.console-row .label { font: 600 .66rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); padding: 0; }
.console .btn { padding: .7rem 1rem; font-size: .76rem; }
.console .hint { margin: -.4rem 0 1rem; }

.bench { margin: 1.2rem 0 .9rem; padding: 1.1rem 0 .4rem; border-top: 1px solid var(--line); }
.seats { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; gap: clamp(.35rem, 1.6vw, .8rem); }
.seat { position: relative; width: 2.35rem; text-align: center; }
.seat i {
  display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: 50%;
  border: 1px dashed var(--line2); font: 600 .85rem/1 var(--mono); font-style: normal; color: var(--ink3);
  transition: all .45s var(--ez);
}
.seat::after { content: attr(data-who); display: block; margin-top: .35rem; font: 600 .56rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); min-height: .6rem; }
.seat-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem 1rem; margin: .7rem 0 0; font: 400 .72rem/1.3 var(--sans); color: var(--ink3); }
.seat-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.seat-legend i { width: .7rem; height: .7rem; border-radius: 50%; border: 1px solid; }
.seat-legend .n i { border-color: rgba(var(--b-rgb), .8); background: rgba(var(--b-rgb), .15); }
.seat-legend .d i { border-color: rgba(var(--a-hi-rgb), .7); background: rgba(var(--a-rgb), .12); }
.seat.drawn i { border: 1px solid rgba(var(--a-hi-rgb), .55); background: rgba(var(--a-rgb), .1); }
.seat.named i { border: 1px solid rgba(var(--b-rgb), .7); background: rgba(var(--b-rgb), .12); }
.seat.yes i { background: rgba(var(--x-rgb), .32); border-color: var(--rose-hi); color: var(--ink); }
.seat.yes i::before { content: "×"; font-size: 1.15rem; }
.seat.no i { background: rgba(var(--ink-rgb), .08); border-color: rgba(var(--ink-rgb), .75); color: var(--ink); }
.seat.no i::before { content: "○"; font-size: .9rem; }
.verdict { text-align: center; margin: 1rem auto .2rem; max-width: 30rem; font: italic 400 1.04rem/1.5 var(--serif); color: var(--ink2); min-height: 3em; }
.verdict b { font-style: normal; font-family: var(--sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; display: block; margin-bottom: .25rem; }
.verdict.convict b { color: var(--rose-hi); }
.verdict.acquit b { color: var(--ink); }

.log-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: .9rem 0 .5rem; border-top: 1px solid var(--line); font: 600 .66rem/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); }
.log-head .tag { font: 400 .68rem var(--mono); letter-spacing: 0; text-transform: none; }
.log { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; }
.log li, .console, .console > *, .bench { min-width: 0; }
.log-empty { font: italic 400 .92rem/1.5 var(--serif); color: var(--ink3); padding: .4rem 0; }
.log li { animation: rowIn .5s var(--ez) both; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.ev {
  width: 100%; display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; align-items: center; gap: .7rem;
  appearance: none; text-align: left; cursor: pointer; color: var(--ink2);
  background: rgba(var(--hl-rgb), .025); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem;
  font: 400 .84rem/1.35 var(--sans); transition: border-color .2s var(--ez), background .2s var(--ez);
}
.ev:hover { border-color: var(--line2); background: rgba(var(--hl-rgb), .045); }
.ev .kd { font: 600 .78rem/1 var(--mono); color: var(--steel-hi); text-align: center; padding: .3rem 0; border-radius: 5px; background: rgba(var(--a-rgb), .12); }
.ev.agent .kd { color: var(--ember-hi); background: rgba(var(--b-rgb), .12); }
.ev .nm { min-width: 0; }
.ev .nm b { display: block; font-weight: 600; font-size: .84rem; }
.ev .nm span { display: block; font-size: .74rem; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .id { font: 400 .72rem var(--mono); color: var(--ink3); }
.ev .id::after { content: " ▸"; color: var(--ink3); }
.ev[aria-expanded=true] .id::after { content: " ▾"; }
.ev.note { cursor: default; background: none; border-style: dashed; }
.ev.note .id::after { content: ""; }
.ev.refused .kd { color: var(--ink3); background: none; border: 1px dashed var(--line2); }
.evjson { margin: .3rem 0 .4rem; padding: .8rem .9rem; border-radius: 8px; background: rgba(var(--bg-rgb), .7); border: 1px solid var(--line); max-height: 22rem; overflow: auto; }
.tally { margin: .9rem 0 0; font: 400 .78rem/1.5 var(--mono); color: var(--ink3); min-height: 1.2em; }
.tally b { color: var(--ink); font-weight: 600; }

details.kinds { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: .9rem; }
details.kinds summary { cursor: pointer; font: 600 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); list-style: none; display: flex; align-items: center; gap: .6rem; }
details.kinds summary::-webkit-details-marker { display: none; }
details.kinds summary::before { content: "+"; font: 400 1rem var(--mono); color: var(--ember-hi); width: 1rem; }
details.kinds[open] summary::before { content: "−"; }
.table-scroll { overflow-x: auto; margin: .9rem 0 0; }
table { width: 100%; border-collapse: collapse; font: 400 .84rem/1.45 var(--sans); }
th { text-align: left; font: 600 .62rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); padding: .5rem .6rem; border-bottom: 1px solid var(--line2); }
td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); color: var(--ink2); vertical-align: top; }
td.k { font: 600 .8rem var(--mono); color: var(--steel-hi); white-space: nowrap; }
tr.agent td { background: rgba(var(--b-rgb), .05); }
tr.agent td.k { color: var(--ember-hi); }

/* ——— evidence */
.evid { margin: 1.5rem 0 1.2rem; border: 1px solid var(--line2); border-radius: 12px; background: var(--well); padding: .4rem 1.1rem 1rem; }
.evid-head, .evid-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: end; }
.evid-head { padding: .8rem 0 .55rem; font: 600 .6rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.evid-row { padding: .9rem 0; border-top: 1px solid var(--line); }
.evid-row .rule { align-self: center; font: 500 .98rem/1.3 var(--serif); color: var(--ink); }
.evid-row .rule small { display: block; margin-top: .15rem; font: 400 .78rem/1.35 var(--sans); color: var(--ink3); }
.meter { display: grid; gap: .35rem; min-width: 0; }
.meter b { font: 600 clamp(1.35rem, 2.6vw, 1.75rem)/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--steel-hi); }
.meter.rose b { color: var(--rose-hi); }
.meter b small { font: 400 .68rem var(--mono); color: var(--ink3); margin-left: .3rem; }
.meter i { display: block; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter s { display: block; height: 100%; width: var(--w, 0%); background: var(--steel); border-radius: 2px; transition: width .35s var(--ez); }
.meter.rose s { background: var(--rose); }
.evid-foot { display: flex; flex-wrap: wrap; gap: .9rem 1.2rem; align-items: center; justify-content: space-between; padding-top: .9rem; border-top: 1px solid var(--line); font: 400 .78rem/1.5 var(--sans); color: var(--ink3); }
.evid-foot span { flex: 1 1 15rem; }
.evid.running .meter b { color: var(--ink); }

.caveat { display: flex; gap: .85rem; align-items: baseline; margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.caveat .mark { font: 600 .9rem var(--mono); color: var(--ember-hi); flex: none; }
.caveat p { margin: 0; font: italic 400 .97rem/1.6 var(--serif); color: var(--ink3); }
.caveat b { font-style: normal; color: var(--ink2); }

/* ——— founders */
.stages { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.stages li { text-align: center; padding: .5rem .2rem .45rem; border-radius: 6px; border: 1px solid var(--line); transition: all .35s var(--ez); }
.stages b { display: block; font: 600 .95rem/1.1 var(--mono); color: var(--ink3); }
.stages span { font: 400 .62rem/1 var(--sans); color: var(--ink3); letter-spacing: .04em; }
.stages li.on { border-color: rgba(var(--gold-rgb), .65); background: rgba(var(--gold-rgb), .08); }
.stages li.on b { color: var(--gold); }
.readout { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.1rem 0 .4rem; }
.stat { flex: 1 1 10rem; display: grid; gap: .2rem; padding: .8rem .95rem; border: 1px solid var(--line); border-radius: 8px; background: var(--well); }
.stat .k { font: 600 .6rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.stat .v { font: 600 1.7rem/1.1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.stat .v.ember { color: var(--gold); }
.stat .u { font: 400 .76rem/1.4 var(--sans); color: var(--ink3); }

/* ——— fork */
.fork-panel { margin: 1.3rem 0 0; padding: 1rem 1.1rem; border: 1px solid var(--line2); border-radius: 10px; background: var(--well); animation: panelIn .6s var(--ez) both; }
.fork-panel .k { margin: 0 0 .4rem; font: 600 .64rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ember-hi); }
.decl { margin: .3rem 0 0; }
.decl dt { font-family: var(--mono); font-weight: 400; color: var(--steel-hi); letter-spacing: 0; }
.findings { list-style: none; margin: .2rem 0 1.1rem; padding: 0; display: grid; gap: .45rem; }
.findings li { position: relative; padding-left: 1.4rem; font-size: .96rem; line-height: 1.45; color: var(--ink2); }
.findings li::before { content: "×"; position: absolute; left: 0; top: -.05em; font: 600 1.05rem var(--mono); color: var(--rose-hi); }
.js .findings li { opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ez), transform .45s var(--ez); }
.js .findings li.in { opacity: 1; transform: none; }
.findings code { font-size: .8em; color: var(--ink); background: rgba(var(--hl-rgb), .06); padding: .05rem .3rem; border-radius: 4px; }
.clausemap { list-style: none; margin: .3rem 0 .6rem; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.clausemap li { text-align: center; padding: .42rem 0; border-radius: 6px; font: 600 .76rem/1 var(--mono); border: 1px solid; transition: transform .4s var(--ez); }
.portable { color: var(--steel-hi); border-color: rgba(var(--a-hi-rgb), .5); background: rgba(var(--a-rgb), .12); }
.persuasive { color: var(--ember-hi); border-color: rgba(var(--b-rgb), .5); background: rgba(var(--b-rgb), .1); }
.void { color: var(--rose-hi); border-color: rgba(var(--x-hi-rgb), .55); background: rgba(var(--x-rgb), .14); }
.orphaned { color: var(--ink3); border-color: var(--line2) !important; border-style: dashed !important; background: none; }
.clausemap li.void::after { content: " ×"; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.noforce { color: var(--ink2); border-color: var(--line2); background: none; }
.override { margin: 1rem 0 .2rem; padding: .8rem .9rem; border-left: 2px solid var(--rose); background: rgba(var(--x-rgb), .07); border-radius: 0 6px 6px 0; font-size: .95rem; line-height: 1.5; color: var(--ink2); }
.override .legend { margin-top: .6rem; }
.js .override { display: none; }
.js .override.in { display: block; animation: panelIn .6s var(--ez) both; }
.clausemap li { transition: color .5s var(--ez), border-color .5s var(--ez), background .5s var(--ez), opacity .5s var(--ez); }
.clausemap.overridden li:not(.orphaned) { color: var(--ink3); border-color: var(--line2); background: none; text-decoration: line-through; text-decoration-color: rgba(var(--x-rgb), .8); }
.clausemap.overridden li.void::after { content: ""; }
.legend span { font: 600 .66rem/1 var(--sans); letter-spacing: .06em; padding: .35rem .55rem; border-radius: 999px; border: 1px solid; }

/* ——— progress */
.facts { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1.6rem; }
.facts li { min-width: 0; border-top: 1px solid var(--line2); padding-top: .8rem; }
.fig { display: block; font: 600 clamp(2rem, 3.6vw, 2.7rem)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.02em; color: var(--ink); }
.facts .what { display: block; margin-top: .35rem; font: 600 .66rem/1.35 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ember-hi); }
.facts p { margin: .45rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--ink3); }
.notyet { margin: 1.6rem 0 0; padding: .9rem 1rem; border: 1px dashed var(--line2); border-radius: 8px; font-style: italic; color: var(--ink2); }

/* ——— roadmap */
.phases { list-style: none; margin: 1.4rem 0 0; padding: 0 0 0 1.4rem; position: relative; }
.phases::before { content: ""; position: absolute; left: .32rem; top: .4rem; bottom: .4rem; width: 1px; background: linear-gradient(var(--ember-hi), var(--line2) 30%, var(--line2)); }
.phase { position: relative; padding: 0 0 1.1rem; }
.phase::before { content: ""; position: absolute; left: -1.35rem; top: .35rem; width: .62rem; height: .62rem; border-radius: 50%; border: 1px solid var(--line2); background: var(--night); }
.phase.now::before { background: var(--ember-hi); border-color: var(--ember-hi); }
.phase .when { font: 600 .64rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); }
.phase.now .when { color: var(--ember-hi); }
.phase h3 { margin: .35rem 0 .3rem; font-size: 1.3rem; }
.phase ul { margin: 0; padding: 0 0 0 1rem; color: var(--ink2); font-size: .96rem; line-height: 1.55; }
.phase li::marker { color: var(--ink3); }
.gate { position: relative; margin: 0 0 1.1rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--well); }
.gate::before { content: ""; position: absolute; left: -1.27rem; top: .9rem; width: .45rem; height: .45rem; transform: rotate(45deg); border: 1px solid var(--ember-hi); background: var(--night); }
.gate span { font: 600 .62rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ember-hi); }
.gate p { margin: .3rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--ink2); }

/* ——— people and contact */
.logo-heading { margin: .3rem 0 1.5rem; }
.logo-heading img { display: block; width: min(22rem, 100%); height: auto; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.3rem; }
.person { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--well); min-width: 0; }
.person .role { font: 600 .62rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ember-hi); }
.person h3 { margin: .45rem 0 .35rem; }
.person p { margin: 0; font-size: .94rem; line-height: 1.5; }
.asks { list-style: none; margin: 1rem 0 1.4rem; padding: 0; display: grid; gap: .7rem; }
.asks li { color: var(--ink2); font-size: .98rem; line-height: 1.5; padding-left: 1.1rem; position: relative; }
.asks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ember-hi); }
.asks b { display: block; }
.contact-lines { display: grid; gap: .5rem; }
.contact-line { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--well); }
.contact-line .label { font: 600 .62rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); }
.contact-line .value { font: 400 .8rem/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.copy { appearance: none; cursor: pointer; font: 600 .66rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); background: none; border: 1px solid var(--line2); border-radius: 999px; padding: .5rem .75rem; }
.copy:hover { color: var(--ember-hi); border-color: var(--ember-hi); }

/* ——— footer */
.footer { position: relative; z-index: 1; padding: 5rem 1.25rem 3rem; background: linear-gradient(to bottom, transparent, rgba(var(--bg-rgb), .92) 6rem); }
.footer .cols { max-width: 64rem; margin: 0 0 0 clamp(0rem, 5vw, 7rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.footer h2 { font: 600 .64rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); margin: 0 0 .9rem; }
.footer p { font: 400 .8rem/1.6 var(--sans); color: var(--ink3); margin: 0 0 .7rem; }
.footer a { color: var(--ink2); }

/* ——— the entry: a spark, then the community, then the words */
@keyframes rise { from { opacity: 0; transform: translateY(22px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drop { from { transform: translateY(-100%); } to { transform: none; } }
.topbar { animation: drop 1s var(--ez) 1.9s backwards; }
.hero .eyebrow { animation: rise 1.1s var(--ez) 1.15s backwards; }
.hero h1 > span:first-child, .hero h1 .lead { display: block; animation: rise 1.3s var(--ez) 1.3s backwards; }
.hero h1 .em { animation: rise 1.4s var(--ez) 1.6s backwards; }
.hero .lede { animation: rise 1.2s var(--ez) 2s backwards; }
.hero .sub { animation: rise 1.2s var(--ez) 2.15s backwards; }
.hero .actions { animation: rise 1.2s var(--ez) 2.3s backwards; }
.hero .status, .hero .quiet, .hero .strip { animation: fade 1.4s var(--ez) 2.5s backwards; }
.field-hint { animation: fade 2s var(--ez) 3.2s backwards; }
.intro-skip .topbar, .intro-skip .hero *, .intro-skip .field-hint { animation: none !important; }

/* ——— layout below the desktop width: the field sits in a band above the text */
/* desktop: the column a touch smaller than on a tablet */
@media (min-width: 1201px) {
  body { font-size: 1rem; }
  .card { max-width: min(42rem, 44vw); padding: 1.9rem 2.1rem 1.75rem; }
  .card.bare { max-width: min(44rem, 46vw); }
  h1 { font-size: clamp(2.6rem, 5.6vw, 4.7rem); }
  h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); }
}
@media (max-width: 1200px) {
  html { scroll-padding-top: 0; }
  .step { align-items: flex-start; padding-block: calc(var(--top) + 3vh) 3vh; min-height: 0; }
  .step.hero { padding-top: calc(var(--top) + 1vh); }
  .stage.stage-hero { height: clamp(230px, 40vh, 400px); margin: 0 0 .6rem; border: 0; background: none; box-shadow: none; cursor: default; }
  .stage {
    display: block; position: relative; height: clamp(240px, 66vw, 380px); margin: 1.3rem 0;
    border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
    background: radial-gradient(120% 100% at 50% 42%, rgba(var(--glow-rgb), .95), rgba(var(--bg-rgb), .98) 78%);
    box-shadow: inset 0 0 40px rgba(var(--shadow-rgb), .5);
  }
  .card, .card.wide, .card.bare { margin: 0 auto; max-width: 44rem; }
  .field-hint { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 1.03rem; }
  .topbar { gap: .8rem; }
  .brand-name { display: none; }
  .nav a { padding: .5rem .55rem; letter-spacing: .06em; font-size: .64rem; }
  .nav { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 1.5rem; }
  .step { padding-inline: 16px; padding-block: calc(var(--top) + 2vh) 2vh; min-height: 0; }
  .card { padding: 1.45rem 1.25rem 1.3rem; border-radius: 10px; }
  .console { padding: .9rem .8rem; }
  .console-row { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .console .hint { margin-left: 0; }
  .btnrow, .actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .console .btn { padding-inline: .7rem; letter-spacing: .03em; }
  .seg span, .layers span { padding: .55rem .5rem; font-size: .68rem; }
  .seg { grid-auto-flow: row; }
  .evid { padding: .3rem .8rem .9rem; }
  .evid-head { display: none; }
  .evid-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem .9rem; }
  .evid-row .rule { grid-column: 1 / -1; }
  .meter::before { font: 600 .56rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
  .meter.rose::before { content: "Innocent convicted"; }
  .meter:not(.rose)::before { content: "Violation missed"; }
  .checklist > div, .mapping > div, .decl > div { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .people { grid-template-columns: minmax(0, 1fr); }
  .contact-line { grid-template-columns: minmax(0, 1fr) auto; }
  .contact-line .label { grid-column: 1 / -1; }
  .footer .cols { grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 0 auto; }
  .ev { grid-template-columns: 3.1rem minmax(0, 1fr); }
  .seat::after { display: none; }
  .seat, .seat i { width: 2.1rem; height: 2.1rem; }
  .card { background: var(--card-bg-m, rgba(var(--bg-rgb), .96)); }
  .ev .id { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .card:not(.bare), .js .findings li { opacity: 1; transform: none; }
}

/* ——— the neighbourhood */
.stack { list-style: none; margin: 1.4rem 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.stack li {
  display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: .85rem; align-items: start;
  padding: .85rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--well);
  transition: border-color .3s var(--ez), background .3s var(--ez), transform .3s var(--ez); cursor: default;
}
.stack li:hover, .stack li:focus-visible, .stack li.on { border-color: rgba(var(--b-rgb), .5); background: rgba(var(--b-rgb), .06); }
.stack img { display: block; width: 2.75rem; height: 2.75rem; border-radius: 10px; object-fit: contain; }
.logo-tile { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 10px; background: #000; border: 1px solid var(--line2); }
.logo-tile img { width: 1.9rem; height: auto; border-radius: 0; }
.logo-tile.letter { font: 500 1.5rem/1 var(--serif); color: var(--ember-hi); background: rgba(var(--b-rgb), .08); border-color: rgba(var(--b-rgb), .4); }
.stack b { display: block; font: 600 .82rem/1.3 var(--sans); letter-spacing: .02em; color: var(--ink); }
.stack li div span { display: block; margin-top: .2rem; font-size: .9rem; line-height: 1.45; color: var(--ink2); }
@media (max-width: 720px) { .stack { grid-template-columns: minmax(0, 1fr); } }
