:root {
  --bg: #0b0b0c;
  --panel: #131315;
  --panel-2: #18181b;
  --line: #26262b;
  --line-2: #34343a;
  --ink: #f2efe8;
  --muted: #8f8b82;
  --dim: #5d5a54;
  --accent: #ff5b2e;
  --good: #7ee08a;
  --bad: #ff6b6b;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --gut: clamp(16px, 4vw, 48px);
  --head: 56px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
#grain { position: fixed; inset: 0; width: 100%; height: 100%; opacity: .045; pointer-events: none; z-index: 0; image-rendering: pixelated; }
main, footer { position: relative; z-index: 1; }
a { color: var(--ink); }
b { font-weight: 600; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(28px, 7.4vw, 44px); line-height: 1.05; }
h2 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; }
canvas { display: block; }
output { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- buttons */
.btn { appearance: none; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font: 600 15px/1.2 var(--sans); padding: 11px 18px; min-height: 44px; border-radius: 2px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:disabled { background: transparent; color: var(--muted); border-color: var(--line-2); cursor: not-allowed; }
.btn.small { padding: 8px 14px; font-size: 13px; min-height: 44px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.wide { width: 100%; padding: 12px 14px; font-size: 16px; min-height: 50px; }
.btn.wide.live { background: var(--accent); border-color: var(--accent); color: #0b0b0c; }
.btn.wide.live:hover { background: var(--ink); border-color: var(--ink); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.icon-btn { appearance: none; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--ink); }
.icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--head); padding: 0 var(--gut); padding-left: max(var(--gut), env(safe-area-inset-left)); padding-right: max(calc(var(--gut) - 10px), env(safe-area-inset-right));
  background: rgba(11, 11, 12, .78); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }
.brand { display: block; line-height: 0; }
.brand canvas { height: 24px; width: auto; image-rendering: pixelated; }
.top-right, .chips { display: flex; align-items: center; gap: 6px; }
#mute .off { display: none; }
#mute[aria-pressed="true"] .on { display: none; }
#mute[aria-pressed="true"] .off { display: inline; }
#mute .spk { fill: currentColor; stroke: none; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; font: 600 11px/1 var(--mono); letter-spacing: .08em; border: 1px solid var(--line-2); border-radius: 2px; color: var(--muted); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.pill.preview { color: var(--accent); border-color: rgba(255, 91, 46, .55); }
.pill.live { color: var(--good); border-color: rgba(126, 224, 138, .55); }
.pill.live i { box-shadow: 0 0 8px var(--good); animation: pulse 1.6s infinite; }
/* chips on the sub pages */
.chip { font: 600 11px/1 var(--mono); letter-spacing: .06em; padding: 0 12px; min-height: 36px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--muted); background: transparent; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; text-decoration: none; }
.chip.btn { cursor: pointer; }
.chip.btn:hover { color: var(--ink); border-color: var(--ink); background: transparent; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------------------------------------------------------------- layout */
main { padding: 0 var(--gut); max-width: 1320px; margin: 0 auto; }
section { padding: 56px 0 0; }
.sec-head { display: grid; gap: 8px; margin-bottom: 18px; }
.sec-head p { margin: 0; color: var(--muted); max-width: 68ch; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 18px; }
.mini-head { font: 600 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.sub { color: var(--muted); max-width: 60ch; margin: 12px 0 0; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.dim { color: var(--dim); }
.empty { color: var(--dim); font: 13px/1.5 var(--mono); padding: 4px 0; grid-column: 1 / -1; }
.msg { font: 13px/1.5 var(--mono); color: var(--muted); min-height: 0; }
.msg:empty { display: none; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--good); }

/* ---------------------------------------------------------------- hero: wall first, then the CA box */
.hero { padding-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr); }
.hero > *, .claim-grid > *, .hero-side > * { min-width: 0; }
.hero-h1 { margin: 0 0 14px; }
.hero-wall { min-width: 0; }
.frame { position: relative; border: 1px solid var(--line); background: #000; aspect-ratio: 1; width: 100%; overflow: hidden; }
#grid { width: 100%; height: 100%; image-rendering: pixelated; }
.frame-note { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; font: 600 14px/1.4 var(--mono); color: var(--ink); background: rgba(0, 0, 0, .55); }
.frame-tag { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 11px/1 var(--mono); background: rgba(11, 11, 12, .84); padding: 6px 8px; letter-spacing: .04em; }
.ckpt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .1); }
.ckpt-bar i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 8px rgba(255, 91, 46, .6); transition: width 1s linear; }

.hud { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; gap: 8px; padding: 10px 0 2px; }
.hud .cell { min-width: 0; }
.hud label { display: flex; align-items: center; gap: 5px; font: 600 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud output { display: block; font: 500 12px/1.5 var(--mono); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud label i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); flex: none; }
#trainerChip.on label i { background: var(--good); box-shadow: 0 0 6px var(--good); animation: pulse 1.6s infinite; }
#trainerChip.on output { color: var(--ink); }
#trainerChip.off output { color: var(--muted); }

.scrub { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.scrub .play { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.scrub .play:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.scrub .play svg { fill: currentColor; stroke: none; }
.play .i-stop, .play.playing .i-play { display: none; }
.play.playing .i-stop { display: inline; }
.scrub-pos { font: 500 12px/1 var(--mono); color: var(--muted); white-space: nowrap; min-width: 9ch; text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; cursor: pointer; --fill: 100%; padding: 0; border: 0; }
input[type=range]:focus { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255, 91, 46, .45); }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent)) 0 0 / var(--fill) 100% no-repeat, var(--line-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--ink); border: 4px solid var(--accent); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 4px solid var(--accent); }

.wall-more { margin-top: 2px; border-top: 1px solid var(--line); }
.wall-more summary, .sig-paste summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; font: 12px/1.3 var(--mono); color: var(--muted); }
.wall-more summary::-webkit-details-marker, .sig-paste summary::-webkit-details-marker, .fold-sec > summary::-webkit-details-marker { display: none; }
.wall-more summary::before, .sig-paste summary::before { content: "+"; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--line-2); font-size: 11px; line-height: 1; color: var(--ink); flex: none; }
.wall-more[open] summary::before, .sig-paste[open] summary::before { content: "−"; }
.wall-more summary:hover, .sig-paste summary:hover { color: var(--ink); }
.wall-more-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0 0 12px; justify-items: start; }
.scrub-info { margin: 0; font: 12px/1.6 var(--mono); color: var(--muted); }
.run-pick { display: flex; align-items: center; gap: 10px; max-width: 100%; font: 600 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
select { max-width: 100%; min-width: 0; min-height: 44px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; font: 12px var(--mono); padding: 6px 8px; }
#runSel { max-width: 100%; flex: 1; width: 0; min-width: 0; text-overflow: ellipsis; }
.run-pick { width: 100%; }

.hero-side { margin-top: 0; }
.lede { font-size: 15px; line-height: 1.5; margin: 12px 0 12px; }
.redraw-form { display: grid; gap: 8px; }
.ca-field { position: relative; }
input { background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); font: 14px var(--mono); padding: 10px 12px; border-radius: 2px; min-width: 0; flex: 1; }
input:focus { outline: none; border-color: var(--ink); }
.ca-field input { width: 100%; height: 52px; font-size: 16px; padding: 0 84px 0 14px; background: rgba(11, 11, 12, .9); }
.ca-field input::placeholder { color: var(--dim); }
@media (max-width: 400px) { .ca-field input::placeholder { font-size: 14px; } }
.paste-chip { position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 12px; min-width: 64px; border: 1px solid var(--line-2); border-radius: 2px; background: var(--panel-2); color: var(--muted); font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.paste-chip:hover { color: var(--ink); border-color: var(--ink); }
.hook-live { font: 500 12px/1.5 var(--mono); color: var(--good); margin: 10px 0 0; }
.hook-live.off { color: var(--muted); }
.hero-side .msg { margin-top: 8px; }

.redraw-out { margin-top: 16px; display: grid; gap: 12px; }
.trip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trip figure { margin: 0; }
.trip canvas, .trip img { width: 100%; aspect-ratio: 1; image-rendering: pixelated; border: 1px solid var(--line); display: block; background: #000; }
.trip figure:last-child canvas { border-color: var(--accent); }
.trip figcaption { font: 11px var(--mono); color: var(--muted); margin-top: 4px; }
.share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share > :first-child { grid-column: 1 / -1; }

.featured { margin-top: 22px; }
.featured-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 6px; scroll-padding: 0 var(--gut); scrollbar-width: none; }
.featured-row::-webkit-scrollbar { display: none; }
.feat { flex: 0 0 160px; scroll-snap-align: start; display: grid; gap: 8px; text-decoration: none; border: 1px solid var(--line); background: var(--panel); padding: 8px; }
.feat:hover { border-color: var(--accent); }
.feat .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.feat canvas { width: 100%; aspect-ratio: 1; image-rendering: pixelated; background: #000; border: 1px solid var(--line); }
.feat canvas:last-child { border-color: var(--accent); }
.feat small { font: 11px/1.2 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat small b { color: var(--ink); }

/* ---------------------------------------------------------------- training stats panel */
.stats { display: flex; flex-direction: column; gap: 14px; }
.run-label { font: 600 11px/1.4 var(--mono); letter-spacing: .08em; color: var(--accent); min-height: 1em; text-transform: uppercase; }
.stat { min-width: 0; }
.stat label { display: block; font: 600 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat output { font-size: 22px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.big output { font-size: clamp(36px, 4.4vw, 52px); line-height: 1; letter-spacing: -.02em; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.loss { width: 100%; height: 110px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.compute { margin: 0; color: var(--muted); font-size: 14px; }

/* collapsible sections (phones) */
.fold-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fold-sec > summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--muted); }
.fold-sec[open] > summary::after { content: "−"; }
.fold-sec[open] > summary { margin-bottom: 16px; border-bottom-color: transparent; }
section.stats-sec, section.how-sec { padding-top: 40px; }

/* ---------------------------------------------------------------- seeds */
.claim-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.claim { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-color: var(--line-2); background: linear-gradient(180deg, rgba(255, 91, 46, .05), rgba(255, 91, 46, 0) 140px), var(--panel); }
.claim-state:empty { display: none; }
.claim-lead { margin: 0; font: 700 22px/1.2 var(--sans); letter-spacing: -.01em; }
.claim-lead b { font-weight: 700; color: var(--accent); }
.claim-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.claim-facts li { font: 12px/1.45 var(--mono); color: var(--muted); padding: 9px 10px; border: 1px solid var(--line); border-left: 2px solid var(--accent); background: rgba(255, 255, 255, .015); }
.claim-facts b { color: var(--ink); }
.claim-body { margin: 0; color: var(--muted); font-size: 15px; }
.claim-note { margin: -4px 0 0; font: 12px/1.5 var(--mono); color: var(--muted); }
.claim-note a { color: var(--ink); }
.sig-paste { border-top: 1px solid var(--line); }
.sig-paste .hint { margin: 0 0 10px; }
.sig-paste form { display: flex; gap: 8px; padding-bottom: 6px; }
.sig-paste input { min-height: 44px; }
.estimate { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; color: var(--muted); }
.estimate b { color: var(--ink); font-family: var(--mono); }
.estimate input { width: 64px; flex: none; padding: 4px 6px; margin: 0 4px; }
.my-seeds:empty { display: none; }
.my-seeds { font: 13px var(--mono); color: var(--muted); }
.my-seeds a { display: inline-flex; align-items: center; min-height: 32px; margin-right: 10px; }
.pool-body { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.pool-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pool-nums .stat output { font-size: 20px; }
.pool-rounds { font: 13px var(--mono); color: var(--muted); overflow-x: auto; }
.pool-rounds table { width: 100%; border-collapse: collapse; }
.pool-rounds td, .pool-rounds th { text-align: left; padding: 6px 8px 6px 0; border-top: 1px solid var(--line); font-weight: 400; white-space: nowrap; }

.seed-wall .mini-head { margin-bottom: 12px; }
.tiles { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 6px; scroll-padding: 0 var(--gut); scrollbar-width: none; }
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 96px; scroll-snap-align: start; text-decoration: none; display: block; }
.tile img, .tile .blank { width: 100%; aspect-ratio: 1; image-rendering: pixelated; display: block; border: 1px solid var(--line); background: #000; }
.tile span { font: 12px var(--mono); color: var(--muted); display: flex; justify-content: space-between; gap: 4px; margin-top: 4px; white-space: nowrap; overflow: hidden; }
.tile:hover img { border-color: var(--accent); }
.tag { font: 600 10px var(--mono); color: var(--accent); font-style: normal; }
.tiles .empty { padding: 0; }

/* ---------------------------------------------------------------- training feed */
.strip { display: flex; gap: 8px; overflow: hidden; padding: 2px 0 4px; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.coin { flex: 0 0 auto; width: 56px; text-decoration: none; text-align: center; animation: in .6s ease-out; }
.coin img { width: 56px; height: 56px; image-rendering: pixelated; border: 1px solid var(--line); display: block; background: #000; }
.coin span { display: block; font: 10px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.coin.new span { color: var(--ink); }
.coin.new img { border-color: var(--accent); }
@keyframes in { from { opacity: 0; transform: translateX(-24px); filter: contrast(3) saturate(0) blur(2px); } }
.feed-off { margin: 0; font: 12px/1.5 var(--mono); color: var(--dim); }

/* ---------------------------------------------------------------- bigger runs */
.road { list-style: none; padding: 0; margin: 0; display: grid; border-top: 1px solid var(--line); }
.road li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 2px 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.road .res { font: 600 18px/1.2 var(--mono); color: var(--ink); white-space: nowrap; }
.road .state { font: 600 12px/1.4 var(--mono); color: var(--muted); }
.road p { grid-column: 2; margin: 2px 0 0; color: var(--dim); font-size: 14px; }
.road li.now .state, .road li.now .res { color: var(--good); }
.road li.reached .state { color: var(--accent); }
.road li.done .state { color: var(--ink); }
.road .bar { grid-column: 2; }
.bar { height: 4px; background: var(--line); margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.weights { margin-top: 12px; font: 13px var(--mono); color: var(--muted); }

/* ---------------------------------------------------------------- ledger + trades */
.ledger-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 14px; }
.ledger table { width: 100%; border-collapse: collapse; font: 13px var(--mono); }
.ledger td, .ledger th { text-align: left; padding: 6px 8px 6px 0; border-top: 1px solid var(--line); font-weight: 400; }
.trade-list { font: 13px var(--mono); display: grid; gap: 2px; max-height: 360px; overflow: auto; }
.trade { display: grid; grid-template-columns: 52px 1fr 1fr 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.trade .buy { color: var(--good); }
.trade .sell { color: var(--bad); }
.trade a { color: var(--muted); }

.how-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 32px; }
.how-grid p { margin: 0; color: var(--muted); }
.how-grid b { color: var(--ink); }

/* ---------------------------------------------------------------- footer */
.foot { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; padding: 28px var(--gut) calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin-top: 56px; font: 13px var(--mono); color: var(--muted); }
.foot a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.foot .dim { flex-basis: 100%; }

/* ---------------------------------------------------------------- sticky dock (phones) */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(11, 11, 12, .9); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transform: translateY(110%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
.dock.show { transform: none; visibility: visible; transition: transform .22s ease; }
.dock .btn { min-height: 44px; padding: 8px 10px; font-size: 15px; }
.dock .btn.ghost { background: rgba(11, 11, 12, .6); }

/* ---------------------------------------------------------------- announcements */
.announce { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 0, 0, .7); cursor: pointer; }
.announce canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: .5; }
.announce-text { position: relative; text-align: center; font: 700 clamp(40px, 9vw, 120px)/1 var(--sans); letter-spacing: -.02em; padding: 0 16px; }
.announce-text small { display: block; font: 500 clamp(14px, 2vw, 20px)/1.4 var(--mono); color: var(--muted); margin-top: 18px; letter-spacing: 0; }

/* ---------------------------------------------------------------- seed + redraw pages */
.seed-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
.seed-page > * { min-width: 0; }
.seed-big { border: 1px solid var(--line); background: #000; aspect-ratio: 1; position: relative; width: 100%; overflow: hidden; }
.seed-big canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.film { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; margin-top: 10px; }
.film button { padding: 0; border: 1px solid var(--line); background: #000; cursor: pointer; }
.film button.sel { border-color: var(--accent); }
.film img { width: 100%; aspect-ratio: 1; image-rendering: pixelated; display: block; }
.card-img { width: 100%; border: 1px solid var(--line); display: block; }
.seed-side { display: flex; flex-direction: column; gap: 14px; align-self: start; }
.seed-side h1 { font-size: clamp(30px, 8vw, 44px); }
.seed-side .stat output { font-size: 20px; }
.seed-side .run-label:empty, .burn-link:empty, .seed-about:empty { display: none; }
.seed-about { font-size: 14px; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seed-page .scrub { margin-top: 8px; }
.unclaimed-cta { display: grid; gap: 10px; }
.redraw-page { padding-top: 24px; max-width: 900px; }
.redraw-page h1 { font-size: clamp(26px, 6.4vw, 40px); max-width: 22ch; }
.redraw-page .hint { margin-top: 10px; font-size: 15px; max-width: 62ch; }
.redraw-page .card-img { margin-top: 20px; }
.redraw-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; max-width: 560px; }
.redraw-actions > :first-child, .redraw-actions #copy[hidden] + #another { grid-column: 1 / -1; }
.wait-dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------------------------------------------------------------- phones */
@media (max-width: 900px) {
  .foot { margin-top: 40px; }
  /* one column: the wall's extra controls (other runs, card) go after the CA box, so the first screen ends on the CA box */
  .hero-wall, .hero-side { display: contents; }
  .wall-more { order: 1; margin-top: 16px; }
  .featured { order: 2; }
  body.home .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .stats-slot { display: none; }
  /* seed page, one column: title, the seed, its controls and share buttons first; the film strip and card after */
  .seed-page { gap: 12px; }
  .seed-main, .seed-side { display: contents; }
  .seed-side > .run-label { order: 1; }
  .seed-side > h1 { order: 2; }
  .seed-big { order: 3; }
  .seed-page .scrub { order: 4; margin-top: -4px; }
  .share-row, .unclaimed-cta { order: 5; }
  .seed-about { order: 6; }
  .seed-stats { order: 7; }
  .film { order: 8; margin-top: 0; }
  .seed-side > .card-img { order: 9; }
  .burn-link { order: 10; }
}
@media (max-width: 520px) {
  body { font-size: 15px; }
  :root { --head: 52px; }
  .pill { height: 28px; padding: 0 9px; font-size: 10px; }
  section { padding-top: 44px; }
  .claim-facts { grid-template-columns: minmax(0, 1fr); }
  .claim-facts li { padding: 8px 10px; }
  .ledger-rows { grid-template-columns: 1fr 1fr; gap: 14px; }
  .ledger-rows .stat output { font-size: 19px; }
  .trade { grid-template-columns: 40px 1fr 1fr; }
  .trade .mc { display: none; }
  .stat.big output { font-size: 40px; }
  .sub, .sec-head p, .claim-body { font-size: 15px; }
  .sig-paste form { flex-direction: column; }
  .chip { padding: 0 10px; }
}
@media (max-width: 370px) {
  .hud { gap: 6px; }
  .hud label { letter-spacing: .06em; }
  .hud output { font-size: 11.5px; }
  .claim-lead { font-size: 20px; }
}

/* ---------------------------------------------------------------- desktop */
@media (min-width: 901px) {
  :root { --head: 64px; }
  .brand canvas { height: 28px; }
  .dock { display: none; }
  .hero { grid-template-columns: minmax(0, min(560px, max(380px, calc(100vh - 220px)))) minmax(320px, 1fr); grid-template-areas: "wall h1" "wall side"; grid-template-rows: auto 1fr; column-gap: clamp(32px, 4vw, 56px); padding-top: 28px; align-items: start; }
  .hero-h1 { grid-area: h1; font-size: 44px; max-width: 16ch; margin: 4px 0 16px; }
  .hero-wall { grid-area: wall; width: min(100%, max(380px, calc(100vh - 220px))); position: sticky; top: calc(var(--head) + 20px); }
  .hero-side { grid-area: side; margin-top: 0; }
  .lede { font-size: 16px; max-width: 54ch; margin-bottom: 18px; }
  .hud { gap: 12px; padding-top: 12px; }
  .hud output { font-size: 13px; }
  .featured-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .stats-slot { margin-top: 24px; }
  .stats-slot .fold-sec > summary { display: none; }
  .stats-sec { display: none; }
  .redraw-out .share { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .redraw-out .share > :first-child { grid-column: auto; }

  .sec-head { grid-template-columns: minmax(200px, 300px) 1fr; gap: 12px 40px; align-items: baseline; margin-bottom: 22px; }
  .claim-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
  .claim { padding: 26px; }
  .claim-lead { font-size: 28px; }
  .pool-nums { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .road li { grid-template-columns: 110px minmax(0, 300px) minmax(0, 1fr); align-items: center; }
  .road p { grid-column: 3; margin: 0; }
  .road .bar { grid-column: 2 / -1; }
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how > summary { cursor: default; pointer-events: none; }
  .how.fold-sec[open] > summary::after { content: none; }
  .foot .dim { flex-basis: auto; margin-left: auto; }
  .seed-page { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 32px; padding-top: 32px; }
  .seed-main { width: min(100%, max(380px, calc(100vh - 220px))); }
  .redraw-page { padding-top: 40px; }
}
