/* Landing (/) — "Evaluation Console".
   First screen: pitch + desk numbers (row 1), strategy console + result instrument (row 2).
   Below: a tape of the practice day, then the pinned 5-stage console scrubbed by scroll, then funded accounts. */

/* ================= first screen ================= */
.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px; row-gap: 22px;
  padding-top: clamp(24px, 4.2vh, 44px);
  padding-bottom: 28px;
  align-items: start;
}
.pitch { grid-column: 1 / 8; grid-row: 1; align-self: end; }
.desk { grid-column: 8 / 13; grid-row: 1; align-self: end; }
.strategy { grid-column: 1 / 6; grid-row: 2; }
.result { grid-column: 6 / 13; grid-row: 2; }

.pitch h1 {
  margin: 0;
  font: 640 clamp(31px, 3.1vw, 46px)/1.02 var(--display);
  font-stretch: 116%;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.pitch h1 span { display: block; }
.pitch h1 .l2 {
  color: var(--ice);
  background: linear-gradient(92deg, var(--ice) 10%, var(--ice-2) 60%, var(--ice) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sub { margin: 14px 0 0; font-size: 15.5px; color: var(--ink-2); letter-spacing: .005em; }

/* ---------- desk: 3 live numbers + CTA ---------- */
.desk { padding: 0; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { display: grid; gap: 8px; padding: 14px 14px 12px; border-right: 1px solid var(--line); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi .label { font-size: 9.5px; letter-spacing: .12em; line-height: 1.25; min-height: 2.5em; display: flex; align-items: flex-end; }
.kpi .v { font: 500 22px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v small { font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-left: 4px; }
.stale { margin: 0; padding: 6px 14px; border-top: 1px solid var(--line); font: 500 10.5px/1.3 var(--mono); color: var(--amber-ink); }
.desk-cta { display: flex; width: 100%; border-width: 1px 0 0; border-color: var(--line); min-height: 46px; justify-content: space-between; padding: 0 14px; background: var(--bg-3); }
.desk-cta:hover { background: var(--ice); color: var(--ice-ink); border-color: var(--ice); }
.desk-cta[aria-disabled="true"] { justify-content: center; }

/* ---------- strategy console ---------- */
.strategy { overflow: hidden; display: flex; flex-direction: column; }
.strategy .mod-h { padding-right: 6px; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-2); }
.tabs [role="tab"] {
  appearance: none; border: 0; background: transparent; cursor: pointer; border-radius: 1px;
  padding: 6px 10px; font: 600 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { background: var(--bg-4); color: var(--ice); box-shadow: inset 0 0 0 1px var(--line-3); }
.panel { padding: 14px 14px 0; }
.field { position: relative; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.field:focus-within { border-color: var(--ice); box-shadow: 0 0 0 3px var(--ice-soft); }
.field .prompt { position: absolute; left: 12px; top: 11px; font: 600 14px/24px var(--mono); color: var(--ice); }
.strategy textarea {
  display: block; width: 100%; resize: none; border: 0; outline: 0; background: transparent;
  padding: 11px 12px 22px 30px; font: 500 14.5px/24px var(--mono); color: var(--ink); letter-spacing: -.01em;
}
#en-text { min-height: 98px; }
.count { position: absolute; right: 10px; bottom: 6px; font: 500 10px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.chips-row { display: grid; gap: 8px; margin-top: 12px; }
.chips { display: grid; gap: 6px; }
.chip {
  appearance: none; cursor: pointer; text-align: left; position: relative;
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-3);
  padding: 7px 10px; font: 500 11.5px/1.35 var(--mono); color: var(--ink-2);
  transition: border-color .15s var(--ease), color .15s var(--ease), background-color .15s var(--ease);
}
.chip::before { content: attr(data-n); font-size: 9.5px; letter-spacing: .1em; color: var(--muted); flex: none; }
.chip:hover { border-color: var(--line-3); color: var(--ink); background: var(--bg-4); }
.chip[aria-pressed="true"] { border-color: var(--ice-line); color: var(--ink); background: var(--ice-soft); }
.chip[aria-pressed="true"]::before { color: var(--ice); }

.panel-json:not([hidden]) { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 12px; }
#json-text {
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg);
  padding: 10px 12px; font: 500 12px/19px var(--mono); min-height: 214px; white-space: pre; overflow: auto; resize: vertical;
}
#json-text:focus { border-color: var(--ice); box-shadow: 0 0 0 3px var(--ice-soft); }
.schema { margin: 0; font: 500 10.5px/1.45 var(--mono); color: var(--ink-2); align-self: start; }
.schema dt { color: var(--ice); margin-top: 8px; }
.schema dt:first-child { margin-top: 0; }
.schema dd { margin: 1px 0 0; color: var(--muted); }

.notes, .err { margin: 12px 14px 0; padding: 9px 11px; border-radius: var(--radius); font: 500 11.5px/1.5 var(--mono); }
.notes { background: var(--amber-soft); color: var(--amber-ink); border: 1px solid var(--amber-line); }
.err { background: var(--amber-soft); color: var(--amber-ink); border-left: 2px solid var(--amber); }
.run-row { padding: 14px; margin-top: auto; }
.run { width: 100%; justify-content: space-between; overflow: hidden; }
.run::after { content: "↵"; font: 600 15px/1 var(--sans); opacity: .7; }
.run[aria-busy="true"] { cursor: progress; background: var(--bg-3); border-color: var(--ice-line); color: var(--ice); }
.run[aria-busy="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 34%; background: var(--ice); box-shadow: 0 0 12px var(--ice); animation: scan 1s var(--ease) infinite; }
.run[aria-busy="true"] .run-t::after { content: " · replaying"; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ---------- result instrument ---------- */
.result { overflow: hidden; }
.mod-h > span:not(.sp):not(.session) { white-space: nowrap; }
.result .session { text-transform: none; letter-spacing: .02em; font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.result.has-result #r-led { background: var(--ice); box-shadow: 0 0 0 3px var(--ice-soft), 0 0 10px var(--ice); }
.result.is-fail #r-led { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.r-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px 16px 14px; }
.score { display: grid; gap: 4px; }
.score-v {
  font: 500 clamp(44px, 4.4vw, 64px)/.92 var(--mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.result.has-result .score-v { color: var(--ice); text-shadow: 0 0 28px rgba(108, 213, 255, .35); }
.result.is-fail .score-v { color: var(--amber); text-shadow: 0 0 28px rgba(255, 174, 61, .25); }
.score-u { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.verdict {
  display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 9px 13px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-3);
  font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.vd-led { width: 7px; height: 7px; border-radius: 50%; background: var(--line-3); }
.verdict.pass { color: var(--ice); border-color: var(--ice-line); background: var(--ice-soft); }
.verdict.pass .vd-led { background: var(--ice); box-shadow: 0 0 8px var(--ice); }
.verdict.fail { color: var(--amber-ink); border-color: var(--amber-line); background: var(--amber-soft); }
.verdict.fail .vd-led { background: var(--amber); }

.crit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.crit li { display: grid; gap: 6px; padding: 11px 14px 12px; border-right: 1px solid var(--line); min-width: 0; }
.crit li:last-child { border-right: 0; }
.crit .label { font-size: 9.5px; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.crit .label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line-3); flex: none; }
.crit li.ok .label::before { background: var(--ice); box-shadow: 0 0 6px var(--ice); }
.crit li.no .label::before { background: var(--amber); }
.crit .cv { font: 500 16px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.crit li.no .cv { color: var(--amber-ink); }
.crit .bar { position: relative; height: 3px; background: var(--line); overflow: hidden; }
.crit .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ice); transition: width .9s var(--ease); }
.crit li.no .bar i { background: var(--amber); }

.chart-box { position: relative; height: clamp(190px, 26vh, 250px); padding: 12px 8px 4px 4px; }
.chart-box canvas { display: block; width: 100%; height: 100%; }
.result[aria-busy="true"] .chart-box::after {
  content: ""; position: absolute; left: 48px; right: 18px; top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ice), transparent) 0 0 / 40% 100% no-repeat;
  animation: sweep 1.1s linear infinite; opacity: .8;
}
@keyframes sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.zero-note { margin: 4px 16px 0; padding: 9px 11px; font: 500 11.5px/1.5 var(--mono); color: var(--amber-ink); background: var(--amber-soft); border-left: 2px solid var(--amber); }
.zero-note code { color: var(--ink); }
.nodata { list-style: none; margin: 4px 16px 0; padding: 0; font: 500 11px/1.6 var(--mono); color: var(--muted); }
.trades-wrap { margin: 8px 0 0; overflow-x: auto; border-top: 1px solid var(--line); }
.trades { width: 100%; border-collapse: collapse; font: 500 11.5px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.trades th { text-align: left; font-weight: 500; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 9px 12px 7px; white-space: nowrap; }
.trades td { padding: 7px 12px; border-top: 1px solid var(--line); white-space: nowrap; color: var(--ink-2); }
.trades td:first-child { color: var(--ink); }
.trades .r { text-align: right; }
.trades tbody tr { transition: background-color .15s; }
.trades tbody tr:hover { background: var(--bg-3); }
.trades a { color: var(--ink-2); text-decoration-color: var(--line-3); }
.trades a:hover { color: var(--ice); }
.practice-day { margin: 0; padding: 10px 16px 12px; border-top: 1px solid var(--line); font: 500 10.5px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; }
.practice-day:empty { display: none; }
.result.has-result .r-top, .result.has-result .crit, .result.has-result .trades-wrap { animation: rise .5s var(--ease) both; }
.result.has-result .crit { animation-delay: .06s; }
@keyframes rise { from { opacity: .0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ================= tape ================= */
.tape { position: relative; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); height: 38px; margin-top: 18px; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tape-run { display: flex; width: max-content; height: 100%; align-items: center; animation: tape 60s linear infinite; }
.tape:hover .tape-run { animation-play-state: paused; }
.tape-run span { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; border-right: 1px solid var(--line); height: 100%; }
.tape-run b { color: var(--ink); font-weight: 500; letter-spacing: .02em; }
.tape-run em { font-style: normal; color: var(--ice); }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================= pipeline (scroll console) ================= */
.pipeline { position: relative; padding-top: clamp(72px, 12vh, 140px); }
.pipe-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 14px; align-items: end; }
.pipe-intro .label { grid-column: 1 / -1; }
.pipe-intro h2 { grid-column: 1 / -1; margin: 0; font: 640 clamp(30px, 4.1vw, 64px)/1 var(--display); font-stretch: 118%; letter-spacing: -.03em; }
.pipe-intro h2 i { font-style: normal; color: var(--ice); font-weight: 400; }
.pipe-intro p { grid-column: 1 / 8; margin: 6px 0 0; color: var(--ink-2); font-size: 16px; max-width: 64ch; }

.pipe-track { position: relative; margin-top: 44px; }
.stages-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 2px; column-gap: 20px; row-gap: 0; align-items: end; }
.stages-nav ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stages-nav button {
  appearance: none; border: 0; background: none; cursor: pointer; width: 100%; text-align: left;
  display: flex; align-items: baseline; gap: 10px; padding: 0 0 12px;
  font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: color .25s var(--ease);
}
.stages-nav button .n { font-weight: 500; font-size: 10px; color: var(--line-3); transition: color .25s var(--ease); }
.stages-nav button:hover { color: var(--ink); }
.stages-nav li.on button, .stages-nav li.done button { color: var(--ink); }
.stages-nav li.on button .n { color: var(--ice); }
.stages-nav li.done button .n { color: var(--ink-2); }
.sn-bar { grid-column: 1 / 2; grid-row: 2; position: relative; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 2%), var(--line);
}
.sn-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ice); box-shadow: 0 0 10px var(--ice); }
.sn-bar i::after { content: ""; position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 0 4px var(--ice-soft); }
.sn-read { min-width: 25ch; text-align: right; white-space: pre; grid-column: 2; grid-row: 1 / 3; align-self: center; font: 500 12px/1 var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; letter-spacing: .06em; padding-bottom: 6px; }
.sn-read b { color: var(--ice); font-weight: 500; }

.stages { position: relative; }
.stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
.st-copy { grid-column: 1 / 5; min-width: 0; }
.st-vis { grid-column: 5 / 13; min-width: 0; }
.st-n { display: block; font: 500 12px/1 var(--mono); color: var(--ice); letter-spacing: .12em; margin-bottom: 14px; }
.st-copy h3 { margin: 0 0 18px; font: 660 clamp(40px, 5vw, 76px)/.9 var(--display); font-stretch: 125%; letter-spacing: -.04em; }
.st-copy p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; max-width: 44ch; }
.st-copy p.st-lead { color: var(--ink); font-size: 17px; line-height: 1.4; font-weight: 500; }
.st-copy a { color: var(--ice); text-decoration-color: var(--ice-line); }
.st-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0; margin: 20px 0 0; font: 500 11px/1.3 var(--mono); max-width: 46ch; border-top: 1px solid var(--line); }
.st-kv dt, .st-kv dd { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; min-height: 32px; }
.st-kv dt { color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-size: 9.5px; padding-right: 18px; }
.st-kv dd { justify-content: flex-end; }
.st-kv dd { margin: 0; color: var(--ink); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-kv dd a { color: var(--ice); text-decoration: none; }
.st-vis { padding: 0; overflow: hidden; }

/* ----- flow mode (default, mobile, no JS, reduced motion): stages one after another ----- */
.pipeline .stage { padding: 56px 0; border-top: 1px solid var(--line); }
.pipeline .stage:first-child { border-top: 0; }
.pipeline:not(.is-pinned) .stages-nav { position: sticky; top: var(--bar-h); z-index: 5; background: rgba(9, 11, 14, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-top: 14px; }

/* ----- pinned mode (desktop with motion): one frame, stages cross-fade, scroll scrubs ----- */
.pipeline.is-pinned .pipe-track { height: calc(var(--stages, 5) * 110vh + 100vh); }
.pipeline.is-pinned .pipe-frame { position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); overflow: hidden; }
.pipeline.is-pinned .pipe-inner { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); padding-top: clamp(16px, 3vh, 32px); padding-bottom: clamp(16px, 3vh, 32px); }
.pipeline.is-pinned .stages { height: 100%; }
.pipeline.is-pinned .stage { position: absolute; inset: 0; padding: 0; border: 0; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s linear .45s; }
.pipeline.is-pinned .stage.on { opacity: 1; visibility: visible; transition: opacity .45s var(--ease), visibility 0s; }
.pipeline.is-pinned .stage .st-copy > * { transform: translateY(14px); opacity: 0; transition: transform .6s var(--ease), opacity .6s var(--ease); }
.pipeline.is-pinned .stage.on .st-copy > * { transform: none; opacity: 1; }
.pipeline.is-pinned .stage.on .st-copy > :nth-child(2) { transition-delay: .04s; }
.pipeline.is-pinned .stage.on .st-copy > :nth-child(3) { transition-delay: .08s; }
.pipeline.is-pinned .stage.on .st-copy > :nth-child(4) { transition-delay: .12s; }
.pipeline.is-pinned .stage.on .st-copy > :nth-child(5) { transition-delay: .16s; }
.pipeline.is-pinned .stage .st-vis { transform: translateY(18px) scale(.985); transition: transform .7s var(--ease); }
.pipeline.is-pinned .stage.on .st-vis { transform: none; }
.pipeline.is-pinned .stage { align-content: center; }

/* ----- stage visuals (built by console.js) ----- */
.vh { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-3); font: 500 10px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.vh .sp { flex: 1; }
.vh .src { text-transform: none; letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vb { padding: 18px; }
.vf { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; border-top: 1px solid var(--line); font: 500 10.5px/1.4 var(--mono); color: var(--muted); }
.vf b { color: var(--ink); font-weight: 500; }

/* lock */
.lk { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); gap: 0; align-items: stretch; }
.lk-json { margin: 0; padding: 12px 14px 14px; border: 1px solid var(--line); background: var(--bg); font: 500 11.5px/1.6 var(--mono); color: var(--ink-2); white-space: pre-wrap; word-break: break-all; }
.lk-json::before { content: "canonical JSON · sorted keys, no spaces"; display: block; margin-bottom: 10px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lk-json .k { color: var(--ink); }
.lk-json .on { color: var(--ice); }
.lk-mid { display: grid; place-items: center; position: relative; }
.lk-mid::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: var(--line-2); }
.lk-mid i { position: absolute; left: 6px; top: 50%; height: 1px; width: calc((100% - 12px) * var(--p, 0)); background: var(--ice); box-shadow: 0 0 8px var(--ice); }
.lk-mid span { position: relative; background: var(--bg-2); padding: 4px 2px; font: 500 9px/1 var(--mono); letter-spacing: .1em; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); }
.lk-hash { padding: 14px; border: 1px solid var(--line); background: var(--bg); display: grid; align-content: start; gap: 12px; }
.lk-hex { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; font: 500 13px/1 var(--mono); }
.lk-hex span { display: grid; place-items: center; height: 26px; border: 1px solid var(--line); color: var(--line-3); transition: color .2s, border-color .2s, background-color .2s; }
.lk-hex span.set { color: var(--ink); border-color: var(--line-2); }
.lk-hex span.hot { color: var(--ice); border-color: var(--ice-line); background: var(--ice-soft); }
.lk-state { display: flex; align-items: center; gap: 8px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lk-state.on { color: var(--ice); }

/* draw */
.dr-seed { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font: 500 11.5px/1.3 var(--mono); color: var(--ink-2); min-width: 0; }
.dr-seed .label { flex: none; }
.dr-seed code { color: var(--ice); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dr-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.dc { position: relative; display: grid; gap: 4px; padding: 9px 10px; border: 1px solid var(--line); background: var(--bg); transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.dc .dw { font: 500 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dc .dd { font: 500 13px/1 var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dc .di { position: absolute; right: 8px; top: 8px; font: 500 9px/1 var(--mono); color: var(--line-3); }
.dc.scan { border-color: var(--line-3); background: var(--bg-4); }
.dc.pick { border-color: var(--ice); background: var(--ice-soft); box-shadow: inset 0 0 0 1px var(--ice-line), 0 0 22px -8px var(--ice); }
.dc.pick .dd { color: var(--ink); }
.dc.pick .dw, .dc.pick .di { color: var(--ice); }

/* grade */
.gr-read { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.gr-read div { padding: 10px 14px; border-right: 1px solid var(--line); display: grid; gap: 5px; }
.gr-read div:last-child { border-right: 0; }
.gr-read b { font: 500 20px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--ink); }
.gr-read b.up { color: var(--ice); } .gr-read b.down { color: var(--amber-ink); }
.gr-canvas { display: block; width: 100%; height: clamp(170px, 30vh, 300px); }
.gr-plot { padding: 12px 8px 4px 4px; }
.gr-checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.gr-checks div { padding: 10px 14px; border-right: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font: 500 10px/1.25 var(--mono); letter-spacing: .06em; color: var(--muted); }
.gr-checks div:last-child { border-right: 0; }
.gr-checks div.ok { color: var(--ink); }
.gr-checks div.ok .led { background: var(--ice); box-shadow: 0 0 0 3px var(--ice-soft), 0 0 8px var(--ice); }
.gr-checks div.no { color: var(--amber-ink); }
.gr-checks div.no .led { background: var(--amber); }
.gr-verdict { margin-left: auto; }

/* fund */
.fd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; }
.fd-acct { padding: 20px; border-right: 1px solid var(--line); display: grid; align-content: start; gap: 14px; }
.fd-bal { font: 500 clamp(40px, 4.2vw, 60px)/.95 var(--mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--ink); }
.fd-bal small { font-size: .3em; letter-spacing: .1em; color: var(--muted); margin-left: 8px; }
.fd-fill { position: relative; height: 4px; background: var(--line); }
.fd-fill i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ice); box-shadow: 0 0 10px var(--ice); }
.fd-seats { display: grid; gap: 8px; }
.fd-seat-row { display: flex; gap: 6px; }
.fd-seat-row span { flex: 1; height: 28px; border: 1px dashed var(--line-3); display: grid; place-items: center; font: 500 9.5px/1 var(--mono); color: var(--muted); letter-spacing: .1em; }
.fd-seat-row span.taken { border: 1px solid var(--ice); background: var(--ice-soft); color: var(--ice); }
.fd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fd-cell { padding: 14px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: grid; gap: 8px; opacity: .25; transform: translateY(6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.fd-cell:nth-child(2n) { border-right: 0; }
.fd-cell:nth-last-child(-n + 2) { border-bottom: 0; }
.fd-cell.on { opacity: 1; transform: none; }
.fd-cell b { font: 500 19px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: -.02em; }
.fd-cell b small { font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-left: 4px; }

/* settle */
.se-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.se-top div { padding: 14px 16px; border-right: 1px solid var(--line); display: grid; gap: 8px; }
.se-top div:last-child { border-right: 0; }
.se-top b { font: 500 24px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.se-top .pay b { color: var(--ice); }
.se-bar-wrap { padding: 22px 18px 8px; }
.se-bar { position: relative; display: flex; height: 44px; border: 1px solid var(--line-2); background: var(--bg); overflow: hidden; }
.se-bar > span { position: relative; height: 100%; display: flex; align-items: center; padding: 0 10px; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; transition: flex-basis .12s linear; }
.se-bar .s-stake { background: repeating-linear-gradient(135deg, var(--bg-4) 0 6px, var(--bg-3) 6px 12px); color: var(--ink-2); }
.se-bar .s-pay { background: var(--ice); color: var(--ice-ink); }
.se-bar .s-desk { background: var(--line-3); color: var(--ink); padding: 0 4px; justify-content: center; }
.se-scale { display: flex; justify-content: space-between; margin-top: 8px; font: 500 10px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.se-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 18px 18px; }
.se-flow div { border: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 6px; font: 500 11px/1.4 var(--mono); color: var(--ink-2); background: var(--bg); }
.se-flow div.on { border-color: var(--ice-line); }
.se-note { font: 500 10px/1.4 var(--mono); color: var(--muted); letter-spacing: .04em; }

/* ================= funded accounts ================= */
.funded { padding-top: clamp(72px, 10vh, 120px); }
.sec-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sec-row h2 { margin: 8px 0 0; font: 640 clamp(26px, 2.6vw, 38px)/1 var(--display); font-stretch: 118%; letter-spacing: -.025em; }
.accounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.accounts .empty {
  grid-column: 1 / -1; margin: 0; padding: 30px 18px; text-align: center;
  border: 1px dashed var(--line-2); font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.acct { padding: 0; }
.acct-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-3); font: 500 11px/1 var(--mono); }
.acct-h .id { color: var(--ice); }
.acct-h a { color: var(--ink-2); text-decoration: none; }
.acct-h a:hover { color: var(--ice); }
.acct dl { display: grid; grid-template-columns: auto minmax(0, 1fr); margin: 0; padding: 6px 14px 10px; font: 500 12px/1.3 var(--mono); }
.acct dt { color: var(--muted); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; padding: 7px 0; border-bottom: 1px solid var(--line); }
.acct dd { margin: 0; text-align: right; padding: 7px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.acct dd.up { color: var(--ice); } .acct dd.down { color: var(--amber-ink); }
.acct-warn { margin: 0 14px 12px; padding: 8px 10px; font: 500 11px/1.4 var(--mono); color: var(--amber-ink); background: var(--amber-soft); border-left: 2px solid var(--amber); }
.closing { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }

/* ================= responsive ================= */
@media (max-width: 1180px) {
  .pitch { grid-column: 1 / 8; }
  .desk { grid-column: 8 / 13; }
  .pitch h1 { font-size: clamp(28px, 3.3vw, 40px); }
  .strategy { grid-column: 1 / 7; }
  .result { grid-column: 7 / 13; }
  .crit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crit li:nth-child(2) { border-right: 0; }
  .crit li:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .st-copy { grid-column: 1 / 6; }
  .st-vis { grid-column: 6 / 13; }
  .fd { grid-template-columns: minmax(0, 1fr); }
  .fd-acct { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); row-gap: 14px; padding-top: 18px; }
  .pitch, .desk, .strategy, .result { grid-column: 1; grid-row: auto; }
  .pitch { order: 1; } .strategy { order: 2; } .desk { order: 3; } .result { order: 4; }
  .pitch h1 { font-size: clamp(25px, 7.4vw, 40px); font-stretch: 108%; letter-spacing: -.03em; }
  .sub { margin-top: 8px; font-size: 14px; }
  .kpi { padding: 10px 10px 9px; gap: 6px; }
  .kpi .label { font-size: 8.5px; letter-spacing: .08em; }
  .kpi .v { font-size: 18px; }
  .desk-cta { min-height: 44px; }
  .panel { padding: 10px 10px 0; }
  #en-text { min-height: 74px; }
  .strategy textarea { font-size: 13.5px; line-height: 22px; padding: 8px 10px 18px 26px; }
  .field .prompt { top: 8px; left: 10px; line-height: 22px; }
  .chips-row { margin-top: 8px; gap: 0; }
  .chips-row > .label { display: none; }
  .chips { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; margin: 0 -10px; padding: 0 10px; scroll-snap-type: x proximity; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; width: auto; max-width: 78vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; scroll-snap-align: start; padding: 7px 10px; }
  .chip::before { margin-right: 8px; }
  .run-row { padding: 10px; }
  .panel-json:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  .panel-json .schema { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; }
  .panel-json .schema dt, .panel-json .schema dd { margin: 0; }
  .r-top { padding: 14px 14px 12px; }
  .crit li { padding: 9px 12px 10px; }
  .chart-box { height: 200px; }
  .pipe-intro { grid-template-columns: minmax(0, 1fr); }
  .pipe-intro h2, .pipe-intro p { grid-column: 1; }
  .pipe-track { margin-top: 28px; }
  .stages-nav { column-gap: 10px; }
  .stages-nav button { flex-direction: column; gap: 5px; font-size: 9.5px; letter-spacing: .08em; padding-bottom: 10px; }
  .sn-read { display: none; }
  .stages-nav { grid-template-columns: minmax(0, 1fr); }
  .stage { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .st-copy, .st-vis { grid-column: 1; }
  .pipeline .stage { padding: 40px 0; }
  .st-copy h3 { font-size: clamp(38px, 12vw, 56px); margin-bottom: 14px; }
  .st-copy p.st-lead { font-size: 16px; }
  .accounts { grid-template-columns: minmax(0, 1fr); }
  .lk { grid-template-columns: minmax(0, 1fr); }
  .lk-mid { height: 40px; }
  .lk-mid::before { left: 50%; right: auto; top: 4px; bottom: 4px; width: 1px; height: auto; }
  .lk-mid i { left: 50%; top: 4px; width: 1px; height: calc((100% - 8px) * var(--p, 0)); }
  .lk-mid span { writing-mode: horizontal-tb; transform: none; padding: 2px 6px; }
  .lk-json { min-height: 0; font-size: 11px; }
  .lk-hex { font-size: 12px; } .lk-hex span { height: 24px; }
  .dr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .dc { padding: 7px 7px; } .dc .dd { font-size: 11.5px; } .dc .di { display: none; }
  .gr-read b { font-size: 16px; }
  .gr-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gr-checks div:nth-child(2) { border-right: 0; }
  .gr-checks div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .se-top b { font-size: 18px; }
  .se-top div { padding: 12px; }
  .se-flow { grid-template-columns: minmax(0, 1fr); }
  .fd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fd-cell { padding: 12px; }
  .fd-cell b { font-size: 16px; }
}
@media (max-width: 420px) {
  .r-top { flex-wrap: wrap; align-items: flex-end; }
  .score-v { font-size: 44px; }
  .verdict { padding: 8px 10px; font-size: 10px; }
  .vb { padding: 12px; }
  .vh .src { display: none; }
  .gr-read div { padding: 9px 10px; }
  .gr-read .label { font-size: 8.5px; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  .tape-run { animation: none; }
  .tape { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
}
