/* Retrace — blueprint. Solid navy paper, cyan grid, white linework, one signal orange. Headlines: one weight, high contrast, never over moving art. */
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; overflow-x: clip;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
@media (min-width: 1360px) and (max-width: 1640px) { .wrap { width: min(1240px, 100% - 320px); margin-left: max(16px, calc((100% - 1240px) / 2)); } }
section { position: relative; }
:where(h1, h2, h3) { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.h-xxl { font-size: clamp(40px, 6vw, 104px); }
.h-xl { font-size: clamp(34px, 4.6vw, 72px); max-width: 18ch; padding-bottom: .06em; }
.h-l { font-size: clamp(28px, 3.4vw, 50px); padding-bottom: .06em; }
.sec-lede { color: var(--muted); max-width: 62ch; font-size: 18px; }
.k-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.mono { font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; }
a { color: var(--ink); text-underline-offset: 3px; } a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.k-btn { min-height: 44px; border-radius: 4px; transition: transform .25s cubic-bezier(.2,1.6,.4,1), background .2s, color .2s, box-shadow .25s; }
.k-btn:hover { transform: scale(1.05); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(255,154,77,.18); }
.k-btn:active { transform: scale(.95); }
.k-btn[disabled], .k-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.k-chip { min-height: 40px; border-radius: 4px; transition: transform .2s, border-color .2s, background .2s; }
.k-chip:hover { transform: translateY(-2px); border-color: var(--accent); }
.k-chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.k-iconbtn { min-width: 44px; min-height: 44px; }
.linkbtn { background: none; border: 0; padding: 6px 0; min-height: 44px; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: color .2s; }
.linkbtn:hover { color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* intro */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; align-content: center; gap: 18px; cursor: pointer; --tb: 0; }
.intro__sheet { width: min(80vw, 520px); }
.intro__frame { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro__rule { fill: none; stroke: rgba(159,211,255,.35); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro__tb { fill: var(--bg); stroke: var(--ink); stroke-width: 2; opacity: var(--tb); transition: opacity .3s; }
.intro__t, .intro__s { opacity: var(--tb); transition: opacity .3s .1s; font-family: var(--font-mono); fill: var(--ink); }
.intro__t { font-size: 15px; font-weight: 600; } .intro__s { font-size: 9px; fill: var(--accent); letter-spacing: .08em; }
.intro__count { font-family: var(--font-display); font-size: clamp(40px, 6vw, 72px); font-weight: 500; margin: 0; font-variant-numeric: tabular-nums; }
.intro__count small { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-left: 8px; }
.intro__skip { position: absolute; right: 24px; bottom: 20px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* nav: solid bar (no glass over moving art) */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(7,24,48,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.nav__bar { display: flex; align-items: center; gap: 14px; width: min(1400px, 100% - 32px); margin: 0 auto; min-height: 64px; }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 19px; min-height: 44px; }
.nav__chain { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--ink); padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; }
.nav__chain b { color: var(--accent); font-weight: 500; font-variant-numeric: tabular-nums; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(143,227,192,.6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(143,227,192,0); } }
.nav__links { display: flex; gap: 2px; margin-left: auto; }
.nav__links a { text-decoration: none; padding: 10px 12px; font-size: 15px; color: var(--muted); border-radius: 4px; transition: color .2s, background .2s; }
.nav__links a:hover, .nav__links a[aria-current] { color: var(--ink); background: rgba(159,211,255,.08); }
.nav__k { min-width: 44px; min-height: 44px; border-radius: 4px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: 12px; cursor: pointer; transition: color .2s, border-color .2s, transform .2s; }
.nav__k:hover { color: var(--ink); border-color: var(--accent); transform: scale(1.05); }
.nav__menu { display: none; }
@media (max-width: 1080px) { .nav__links { display: none; } .nav__menu { display: inline-grid; } .nav__k { margin-left: auto; } }
@media (max-width: 640px) { .nav__cta { display: none; } .nav__chain { font-size: 11px; padding: 5px 8px; } }
@media (max-width: 480px) { .nav__brand span { display: none; } .nav__chain .sep, .nav__chain b { display: none; } .nav__bar { gap: 10px; } }
.drawer-nav { display: grid; gap: 4px; } .drawer-nav a { padding: 12px 6px; font-family: var(--font-display); font-size: 22px; text-decoration: none; border-bottom: 1px solid var(--line); }

/* hero: solid text plate left, live drawing right */
.hero { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); padding-top: 64px; }
.hero__plate { background: var(--deep); border-right: 1px solid var(--line); padding: clamp(40px, 6vw, 96px) clamp(20px, 4vw, 64px); display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.hero__chain { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 26px; }
.badge { font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--accent-ink); background: var(--accent); padding: 7px 12px; border-radius: 3px; }
.hero__meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.hero__title { font-size: clamp(44px, 5.4vw, 92px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; max-width: 13ch; color: var(--ink); text-wrap: balance; }
.hero__title .hl { color: var(--accent); }
.hero__lede { color: var(--muted); font-size: clamp(17px, 1.3vw, 20px); max-width: 44ch; margin: 24px 0 28px; }
.hero__form { display: flex; gap: 8px; max-width: 560px; }
.hero__form input { flex: 1; min-width: 0; min-height: 52px; padding: 0 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: var(--font-mono); font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.hero__form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,154,77,.2); }
.hero__form input[aria-invalid="true"] { border-color: var(--bad); }
.hero__form .k-btn { min-height: 52px; padding-inline: 24px; }
.hero__try { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.hero__ca { margin-top: 22px; max-width: 520px; }
.hero__draw { position: relative; min-height: 420px; overflow: hidden; touch-action: pan-y; }
.hero__draw canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__readout { position: absolute; top: 28px; left: 28px; right: 28px; display: flex; flex-wrap: wrap; gap: 10px 32px; z-index: 1; }
.hero__readout span { display: grid; } .hero__readout small { font-family: var(--font-mono); font-size: 11px; color: var(--cyan); letter-spacing: .1em; text-transform: uppercase; }
.hero__readout b { font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 34px); font-weight: 500; font-variant-numeric: tabular-nums; }
.hero__cap { position: absolute; left: 28px; bottom: 20px; margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .hero__plate { border-right: 0; border-bottom: 1px solid var(--line); padding-top: 40px; } .hero__draw { min-height: 58svh; } .hero__title { font-size: clamp(40px, 11vw, 64px); } }
@media (max-width: 480px) { .hero__form { flex-direction: column; } .hero__readout { gap: 8px 20px; left: 16px; right: 16px; top: 16px; } }

/* sections */
.livesec, .replaysec, .anatsec, .netsec, .appsec, .modesec, .statussec, .faqsec { padding: clamp(80px, 10vw, 150px) 0; }
.replaysec, .appsec, .statussec { background: linear-gradient(180deg, transparent, rgba(7,24,48,.6) 12%, rgba(7,24,48,.6) 88%, transparent); }
/* drafting-line reveal (ours) */
.dim { position: relative; max-width: 600px; margin: 14px 0 36px; height: 20px; }
.dim svg { width: 100%; height: 20px; display: block; overflow: visible; } .dim path { fill: none; stroke: var(--cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dim span { position: absolute; left: 50%; top: -2px; transform: translate(-50%, -100%); font-family: var(--font-mono); font-size: 11px; color: var(--cyan); background: var(--bg); padding: 0 8px; white-space: nowrap; }

/* 01 tape */
.tape { display: grid; gap: 20px; }
.tape__stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.tape__stats div { padding: 20px 22px; display: grid; gap: 4px; } .tape__stats div + div { border-left: 1px solid var(--line); }
.tape__stats small { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.tape__stats b { font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 56px); font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.05; }
.livesec table, .k-af table { width: 100%; border-collapse: collapse; }
.livesec th, .livesec td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.livesec thead th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); font-weight: 500; }
.livesec tr.is-new td { background: rgba(255,154,77,.07); }
.livesec tr.is-new td:first-child a { color: var(--accent); }
@media (max-width: 640px) { .tape__stats { grid-template-columns: 1fr; } .tape__stats div + div { border-left: 0; border-top: 1px solid var(--line); } .livesec th:nth-child(3), .livesec td:nth-child(3), .livesec th:nth-child(4), .livesec td:nth-child(4) { display: none; } .livesec th, .livesec td { padding: 10px 6px; } }

/* 02 replay console (signature) */
.console { border: 1px solid var(--line); background: var(--deep); padding: clamp(16px, 2.4vw, 28px); display: grid; gap: 16px; }
.console__bar { display: flex; gap: 10px; align-items: end; } .console__bar .field { flex: 1; margin: 0; } .console__bar .k-btn { margin-bottom: 22px; }
.console__presets, .console__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.console__state:empty { display: none; }
.rp-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-family: var(--font-mono); font-size: 13px; }
.console__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.console__stage { position: relative; border: 1px solid var(--line); background: var(--bg); cursor: ew-resize; touch-action: pan-y; user-select: none; }
.console__stage.is-drag { cursor: grabbing; }
#rp-svg { display: block; width: 100%; height: auto; }
.rp-seg { fill: none; stroke: var(--accent); stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; }
.rp-node rect { fill: var(--bg); stroke: rgba(243,247,251,.35); stroke-width: 2; transition: stroke .3s, fill .3s; }
.rp-node text { fill: var(--muted); font-family: var(--font-mono); font-size: 15px; letter-spacing: .06em; transition: fill .3s; }
.rp-node .rp-n { font-size: 12px; fill: var(--cyan); }
.rp-node.is-on rect { stroke: var(--ink); } .rp-node.is-on text { fill: var(--ink); }
.rp-node.is-cur rect { stroke: var(--accent); fill: rgba(255,154,77,.12); }
.rp-pins { position: absolute; inset: 0; pointer-events: none; }
.rp-pin { position: absolute; transform: translate(-50%, -50%) scale(.9); opacity: 0; font-family: var(--font-mono); font-size: 11.5px; padding: 3px 8px; background: var(--accent); color: var(--accent-ink); border-radius: 3px; white-space: nowrap; transition: opacity .3s, transform .3s cubic-bezier(.2,1.6,.4,1); }
.rp-pin.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.console__term { border: 1px solid var(--line); background: #051226; display: flex; flex-direction: column; min-height: 280px; }
.term__bar { display: flex; justify-content: space-between; align-items: center; padding: 0 12px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.term { flex: 1; overflow: auto; max-height: 360px; padding: 12px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; color: var(--ink); }
.term .cmd { color: var(--accent); margin-top: 6px; }
.console__transport { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.console__transport input[type=range] { flex: 1; min-width: 160px; accent-color: var(--accent); min-height: 44px; }
.console__transport select { min-height: 44px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; font-family: var(--font-mono); }
.console__count { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); min-width: 170px; }
.console__narr { margin: 0; font-size: 18px; color: var(--ink); min-height: 1.6em; border-left: 3px solid var(--accent); padding-left: 14px; }
@media (max-width: 900px) { .console__grid { grid-template-columns: 1fr; } .rp-pin { font-size: 10px; padding: 2px 5px; } .console__bar { flex-direction: column; align-items: stretch; } .console__bar .k-btn { margin: 0; } }

/* 03 horizontal chapters */
.chapsec { padding: clamp(80px, 10vw, 140px) 0 40px; overflow: hidden; }
.chap__pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 40px; padding-top: 64px; }
.chap__track { display: flex; gap: 24px; padding-left: max(16px, calc((100% - 1240px) / 2)); padding-right: 32px; width: max-content; }
.chap { width: min(380px, 78vw); border: 1px solid var(--line); background: var(--deep); padding: 28px; position: relative; transition: border-color .25s; }
.chap:hover { border-color: var(--accent); }
.chap__n { font-family: var(--font-display); font-size: 72px; font-weight: 500; color: transparent; -webkit-text-stroke: 1.5px var(--cyan); line-height: 1; }
.chap__art svg { width: 100%; max-width: 200px; height: auto; display: block; margin: 16px 0; }
.chap__art svg * { fill: none; stroke: var(--ink); stroke-width: 3; } .chap__art svg .acc { stroke: var(--accent); }
.chap h3 { font-size: 30px; } .chap p { color: var(--muted); margin: 8px 0 0; }
@media (max-width: 899px) { .chap__pin { min-height: 0; } .chap__track { flex-direction: column; width: auto; padding: 0 16px; } .chap { width: auto; } }
@media (prefers-reduced-motion: reduce) { .chap__track { flex-wrap: wrap; width: auto; padding: 0 16px; } }

/* 04 stepper stages */
#stepper { margin-top: 8px; }
.stage svg { width: 100%; height: auto; }
.stage .paper { fill: var(--deep); stroke: var(--ink); stroke-width: 2; }
.svgt { font-family: var(--font-mono); font-size: 18px; fill: var(--muted); } .svgt--a { fill: var(--accent); font-weight: 600; }
.stage .acc { stroke: var(--accent); stroke-width: 3; } .stage .faint { stroke: rgba(159,211,255,.2); stroke-width: 1; }
#net { margin-top: 8px; }

/* 06 app */
#appframe { margin-top: 32px; }
.k-af { border-radius: 6px; }
.scr__head { margin-bottom: 16px; } .scr__head h3 { font-size: 26px; }
.field { display: grid; gap: 6px; margin: 0 0 12px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 14px; color: var(--muted); }
.field input, .field textarea, .field select { min-height: 44px; padding: 10px 12px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; width: 100%; transition: border-color .2s, box-shadow .2s; }
.field input, .field textarea { font-family: var(--font-mono); font-size: 14px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,154,77,.18); outline: none; }
.field [aria-invalid="true"] { border-color: var(--bad); }
.field__msg { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--bad); }
.field__msg[data-ok="true"] { color: var(--ok); }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; } .check input { width: 20px; height: 20px; accent-color: var(--accent); }
.kv { display: grid; gap: 8px; margin: 12px 0; } .kv div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; font-family: var(--font-mono); font-size: 14px; text-align: right; word-break: break-all; }
.words { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 4px; font-family: var(--font-mono); font-size: 12px; }
.words li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 6px; border-left: 2px solid transparent; } .words li span { color: var(--cyan); } .words code { word-break: break-all; color: var(--muted); }
.words li.is-addr { border-left-color: var(--accent); } .words li.is-addr code { color: var(--ink); } .words small { color: var(--ok); }
.receipt__big { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 48px); margin: 6px 0 12px; }
.split { display: flex; height: 22px; border: 1px solid var(--line); } .split i { width: var(--w); display: block; } .split__l2 { background: var(--cyan); } .split__l1 { background: var(--accent); min-width: 3px; }

/* 07 modes, 08 status, 09 faq */
#modes-root, #claims { margin-top: 8px; }
.modes__note { margin-top: 18px; color: var(--muted); min-height: 1.6em; }
.k-mode { border-radius: 6px; transition: transform .3s cubic-bezier(.2,1.4,.4,1), border-color .2s; } .k-mode:hover { transform: translateY(-4px); }
.faq__grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 5vw, 80px); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item h3 { font-family: var(--font-body); font-size: 18px; font-weight: 500; letter-spacing: 0; }
.faq__item button { width: 100%; min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; padding: 12px 0; transition: color .2s; }
.faq__item button:hover { color: var(--accent); }
.faq__item button i { width: 14px; height: 14px; flex: none; position: relative; }
.faq__item button i::before, .faq__item button i::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: currentColor; }
.faq__item button i::after { transform: rotate(90deg); transition: transform .3s; } .faq__item button[aria-expanded="true"] i::after { transform: rotate(0); }
.faq__panel p { color: var(--muted); margin: 0 0 18px; max-width: 62ch; }
@media (max-width: 900px) { .faq__grid { grid-template-columns: 1fr; } }

/* finale */
.finale { height: 220svh; }
.finale__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: start; }
.finale__scene { position: absolute; inset: 0; width: 100%; height: 100%; }
#f-frame, #f-route { stroke-dasharray: 1; }
.f-node { fill: var(--bg); stroke: var(--ink); stroke-width: 3; }
.f-tt { font-family: var(--font-mono); font-size: 22px; fill: var(--ink); font-weight: 600; } .f-ts { font-family: var(--font-mono); font-size: 16px; fill: var(--muted); } .f-tv { font-family: var(--font-mono); font-size: 24px; fill: var(--accent); }
.f-stamp { font-family: var(--font-display); font-size: 58px; font-weight: 700; fill: var(--accent); letter-spacing: 4px; }
.finale__copy { position: relative; width: min(1240px, 100% - 32px); margin: 0 auto; padding-top: clamp(100px, 14vh, 160px); }
.finale__copy .h-xxl { max-width: 14ch; background: var(--bg); box-shadow: 0 0 0 12px var(--bg); }
.finale__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* pages */
.page { padding: 120px 0 100px; min-height: 80svh; }
.launch { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 4vw, 56px); margin-top: 36px; align-items: start; }
.launch__form { background: var(--deep); border: 1px solid var(--line); padding: clamp(18px, 3vw, 32px); }
.launch__receipt { position: sticky; top: 90px; }
.cardout__img svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
@media (max-width: 860px) { .launch { grid-template-columns: 1fr; } .launch__receipt { position: static; } }

/* footer */
.foot { padding: 0 16px 16px; }
.foot__panel { width: min(1240px, 100%); margin: 0 auto; border: 1px solid var(--line); background: var(--deep); padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: 5fr 7fr; gap: 32px; }
.foot__word { font-family: var(--font-display); font-size: clamp(44px, 6vw, 88px); font-weight: 600; letter-spacing: -0.04em; margin: 0 0 8px; line-height: 1; }
.foot__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.foot__cols a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); transition: color .2s, transform .2s; }
.foot__cols a:hover { color: var(--ink); transform: translateX(3px); }
.foot__bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .foot__panel { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .foot__cols { grid-template-columns: 1fr 1fr; } }

/* reduced motion (≥12 overrides) */
@media (prefers-reduced-motion: reduce) {
  .live { animation: none; }
  .k-btn, .k-chip, .k-mode, .nav__k, .foot__cols a, .linkbtn, .chap { transition: none; }
  .k-btn:hover, .k-chip:hover, .k-mode:hover, .nav__k:hover, .foot__cols a:hover { transform: none; }
  .rp-node rect, .rp-node text { transition: none; }
  .rp-pin { transition: none; }
  .intro__tb, .intro__t, .intro__s { transition: none; }
  .faq__item button i::after { transition: none; }
  .finale { height: auto; } .finale__sticky { position: relative; height: 100svh; }
  .field input, .field textarea, .field select, .hero__form input { transition: none; }
  .rp-seg { stroke-dashoffset: 0; }
}

body.at-top .k-rail { opacity: 0; pointer-events: none; }
.k-rail { transition: opacity .4s; }

/* ═════════ WORKSPACE (multi-page upgrade) ═════════ */
#space { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main, .foot { position: relative; z-index: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h-m { font-family: var(--font-display); font-size: clamp(22px, 2vw, 30px); font-weight: 600; margin: 0 0 14px; }
.k-status--muted i { background: var(--muted); }

/* workspace nav: sidebar ≥1100px, bottom tab bar below */
.ws { display: none; }
body[data-shell="on"] .ws { display: flex; flex-direction: column; position: fixed; z-index: 40; top: 64px; bottom: 0; left: 0; width: 212px; padding: 22px 14px; background: rgba(7,24,48,.92); border-right: 1px solid var(--line); backdrop-filter: blur(10px); }
.ws ul { list-style: none; margin: 10px 0 auto; padding: 0; display: grid; gap: 2px; }
.ws a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--radius); color: var(--muted); text-decoration: none; font-size: 15px; transition: background .2s, color .2s, transform .2s; }
.ws a:hover { color: var(--ink); background: var(--surface); transform: translateX(3px); }
.ws a[aria-current="page"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.ws__ico { width: 22px; text-align: center; font-family: var(--font-mono); color: var(--cyan); }
.ws__chain { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 0; } .ws__chain b { color: var(--accent); font-weight: 500; }
@media (min-width: 1100px) { body[data-shell="on"] main, body[data-shell="on"] .foot { margin-left: 212px; } body[data-shell="on"] .wrap { width: min(1180px, 100% - 64px); } }
.ws__s { display: none; }
@media (max-width: 1099px) {
  body[data-shell="on"] .ws { top: auto; bottom: 0; right: 0; width: auto; height: 60px; padding: 0; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); }
  .ws__title, .ws__chain { display: none !important; }
  .ws ul { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; width: 100%; gap: 0; }
  .ws a { height: 60px; padding: 4px 2px; flex-direction: column; justify-content: center; gap: 2px; border-radius: 0; font-size: 12px; line-height: 1.15; text-align: center; }
  .ws a:hover { transform: none; }
  .ws__ico { width: auto; font-size: 16px; }
  .ws a[aria-current="page"] { box-shadow: inset 0 3px 0 var(--accent); }
  body[data-shell="on"] .foot { padding-bottom: 72px; }
}
@media (max-width: 760px) {
  .ws__i--replay { display: none; }
  .ws__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ws__s { display: block; font-size: 11px; }
}

/* page-change wipe: a drafting sheet with the route name stamped on it */
.wipe { display: none; position: fixed; inset: 0; z-index: 90; place-items: center; background: var(--deep); background-image: linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px); background-size: 48px 48px; }
.wipe__label { font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 7vw, 110px); color: transparent; -webkit-text-stroke: 1.5px var(--accent); letter-spacing: -.02em; }

/* page hero: copy left, 3D stage right with a giant outlined route code that parallaxes */
.phero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(20px, 4vw, 60px); align-items: center; padding: 116px 0 40px; min-height: min(86svh, 780px); }
.phero--slim { min-height: 0; padding-bottom: 0; }
.phero__copy .h-xl { margin: 10px 0 14px; }
.phero__stage { position: relative; height: clamp(260px, 38vw, 480px); border: 1px dashed var(--line); border-radius: 50%; display: grid; place-items: center; transition: border-color .5s, box-shadow .5s; }
.phero__stage::after { content: ''; position: absolute; inset: 18%; border: 1px solid var(--grid-major); border-radius: 50%; }
.phero__stage--slim { height: 200px; }
.phero__stage--float { position: absolute; right: 4%; top: 90px; width: 240px; height: 240px; }
.page--card { position: relative; }
.phero__code { font-family: var(--font-display); font-weight: 700; font-size: clamp(80px, 13vw, 200px); color: transparent; -webkit-text-stroke: 1px var(--grid-major); letter-spacing: -.04em; user-select: none; }
.page--docs { padding-top: 24px; }

/* page stepper */
.psteps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; padding: 0; }
.psteps li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--muted); transition: border-color .3s, color .3s, background .3s; }
.psteps__n { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); }
.psteps li.is-cur { border-color: var(--accent); color: var(--ink); background: rgba(255,154,77,.08); }
.psteps li.is-done { color: var(--ink); } .psteps li.is-done .psteps__n { color: var(--ok); }
.psteps li.is-done .psteps__n::after { content: ' ✓'; }

/* tool page parts */
.tool { padding: 28px 0 60px; }
.stats { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px; padding: 18px 0; border-block: 1px solid var(--line); margin-bottom: 18px; }
.stats > div { display: grid; } .stats b { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 48px); font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--muted); } .stats--sm { border: 0; padding: 0; margin: 0; } .stats--sm b { font-size: 28px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 10px 0 14px; }
.field--inline { display: flex; align-items: center; gap: 8px; margin: 0; } .field--inline input { min-width: min(300px, 70vw); }
.field--inline select, .field--inline input { min-height: 44px; }
.k-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); padding: 3px; gap: 2px; flex-wrap: wrap; }
.k-tabs button { min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--radius-s); background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.k-tabs button:hover { color: var(--ink); } .k-tabs button:active { transform: scale(.96); }
.k-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chips .k-chip { color: var(--muted); font-family: inherit; cursor: pointer; transition: transform .15s, border-color .2s, color .2s; } .chips .k-chip:hover { transform: translateY(-2px); color: var(--ink); }
.chips .k-chip[aria-pressed="true"] { background: var(--surface-2); border-color: var(--accent); color: var(--ink); }

/* catalogue: a ruled two-column register, not a card wall */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-top: 1px solid var(--line); min-height: 200px; }
.citem { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; transition: background .25s; }
.citem:hover { background: linear-gradient(90deg, rgba(159,211,255,.05), transparent); }
.citem header, .citem footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.citem h3 { margin: 4px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.citem code { font-family: var(--font-mono); font-size: 13px; color: var(--cyan); overflow-wrap: anywhere; }
.citem p { margin: 2px 0 6px; color: var(--muted); font-size: 15px; }
.citem__cat { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.citem__n { font-family: var(--font-mono); font-size: 13px; }
.cat-empty { grid-column: 1 / -1; }

/* builder */
.builder__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 13px; color: var(--cyan); }
.bd-pane { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7,24,48,.7); }
.tpls { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-top: 1px solid var(--line); }
.tpl { text-align: left; display: grid; gap: 6px; align-content: start; padding: 18px 16px; min-height: 110px; background: none; border: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--ink); font: inherit; cursor: pointer; transition: background .2s, box-shadow .2s; }
.tpl strong { font-family: var(--font-display); font-size: 19px; } .tpl span { color: var(--muted); font-size: 14px; }
.tpl:hover { background: var(--surface); box-shadow: inset 0 -3px 0 var(--cyan); } .tpl[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--accent); }
#bd-form { display: grid; gap: 4px; max-width: 520px; } #bd-form .k-btn { justify-self: start; margin-top: 8px; }
.bd-rule { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 32px); margin: 4px 0 12px; }
.bd-checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.bd-save { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); max-width: 640px; }
.bd-saved { list-style: none; padding: 0; margin: 12px 0 0; } .bd-saved li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* explore */
.explore { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
.explore__wrap { position: relative; height: clamp(380px, 58vh, 620px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7,24,48,.78); overflow: hidden; touch-action: none; }
.explore__wrap canvas { width: 100%; height: 100%; display: block; cursor: grab; } .explore__wrap.is-drag canvas { cursor: grabbing; }
.explore__legend { position: absolute; left: 14px; bottom: 10px; margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; pointer-events: none; }
.dotk { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--cyan); } .dotk--contract, .dotk--deploy { border-color: var(--accent); }
.explore__side { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: rgba(7,24,48,.78); max-height: clamp(380px, 58vh, 620px); overflow: auto; }
.ex-addr { overflow-wrap: anywhere; font-size: 13px; }
.ex-list { list-style: none; padding: 0; margin: 6px 0 0; } .ex-list button { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-align: left; transition: background .2s, padding .2s; }
.ex-list button:hover { background: var(--surface); padding-left: 6px; } .ex-list small { margin-left: auto; color: var(--muted); }

/* live tape */
.tp-spark { width: 100%; height: 56px; display: block; margin-bottom: 6px; }
.tp-table { background: rgba(7,24,48,.6); }
.tp-table tbody tr { transition: background .3s; } .tp-table tbody tr:hover { background: var(--surface); }
.tp-table tr.is-watch { box-shadow: inset 3px 0 0 var(--accent); }
.tp-tag { margin-left: 8px; font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--accent); border-radius: 3px; color: var(--accent); }
[data-view="tape"].is-paused .tp-status i { background: var(--warn); animation: none; }

/* leaderboard: pinned podium + ranked bars */
.podium { min-height: 100svh; display: grid; align-items: center; }
.podium__in { text-align: center; }
.pods { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); justify-content: center; align-items: end; gap: 16px; height: 52svh; margin-top: 30px; }
.pod { --rise: 1; --h: .1; position: relative; height: calc(var(--h) * var(--rise) * 100%); min-height: 60px; border: 1px solid var(--cyan); border-bottom: 0; background: linear-gradient(180deg, rgba(159,211,255,.14), rgba(159,211,255,.02)); display: flex; flex-direction: column; padding: 14px 8px; gap: 2px; transition: height .8s cubic-bezier(.2,.8,.2,1); }
.pod--first { border-color: var(--accent); background: linear-gradient(180deg, rgba(255,154,77,.18), rgba(255,154,77,.02)); }
.pod i { position: absolute; bottom: 8px; left: 0; right: 0; font-style: normal; font-family: var(--font-display); font-size: clamp(40px, 6vw, 84px); font-weight: 700; color: transparent; -webkit-text-stroke: 1px var(--cyan); }
.pod--first i { -webkit-text-stroke-color: var(--accent); }
.pod__v { font-size: clamp(18px, 2vw, 26px); color: var(--ink); } .pod__l { font-size: 12px; color: var(--muted); }
.pod.is-docked { box-shadow: 0 -20px 60px -20px rgba(255,154,77,.4); }
.lb-list { list-style: none; padding: 0; margin: 10px 0 0; border-top: 1px solid var(--line); }
.lb-row { display: grid; grid-template-columns: 40px minmax(120px, 160px) minmax(0, 150px) minmax(0, 1fr) 90px auto; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); transition: background .2s; }
.lb-row:hover { background: var(--surface); }
.lb-rank { font-family: var(--font-mono); color: var(--cyan); } .lb-kind { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-bar { height: 10px; background: var(--grid); border-radius: 2px; overflow: hidden; } .lb-bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--cyan), var(--accent)); }
.lb-row b { text-align: right; font-weight: 500; }

/* verify */
.verify__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.verify__head { display: flex; justify-content: space-between; align-items: center; }
.vf-list { list-style: none; padding: 0; margin: 14px 0; border-top: 1px solid var(--line); }
.vf-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 4px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.vf-row small { grid-column: 2; color: var(--muted); overflow-wrap: anywhere; }
.vf-form { display: grid; gap: 6px; margin-bottom: 14px; } .vf-form .k-btn { justify-self: start; }
.vf-score { font-family: var(--font-display); font-size: 28px; margin: 0; } .vf-score b { color: var(--accent); }

/* dock slots: where the 3D objects land */
.split-note { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: center; padding: 60px 0 100px; }
.dockslot { position: relative; height: 220px; border: 1px dashed var(--line); border-radius: 50%; transition: border-color .5s, box-shadow .5s; }
.dockslot::after { content: ''; position: absolute; inset: 42%; border: 1px solid var(--grid-major); }
.dockslot.is-docked, .phero__stage.is-docked { border-color: rgba(255,154,77,.6); box-shadow: 0 0 80px -30px rgba(255,154,77,.5); }
.dockslot--abs { position: absolute; right: max(16px, 4vw); top: 60px; width: 150px; height: 150px; pointer-events: none; }
.livesec, .anatsec, .statussec { position: relative; }
/* static fallback drawing when there is no WebGL or motion is reduced */
.no-space .dockslot::before, .no-space .phero__stage::before { content: ''; position: absolute; inset: 32%; border: 1.5px solid var(--cyan); transform: rotate(45deg); }

@media (max-width: 900px) {
  .phero { grid-template-columns: 1fr; min-height: 0; padding-top: 100px; }
  .phero__stage { height: 220px; width: min(320px, 80%); justify-self: center; order: -1; }
  .phero__stage--float { display: none; }
  .cat-grid, .verify__grid, .explore { grid-template-columns: 1fr; }
  .split-note { grid-template-columns: 1fr; } .split-note .dockslot { width: 180px; height: 180px; justify-self: center; }
  .dockslot--abs { display: none; }
  .lb-row { grid-template-columns: 32px minmax(0, 1fr) 70px; } .lb-kind, .lb-bar { display: none; } .lb-row .k-btn { grid-column: 2 / -1; justify-self: start; }
  .pods { height: 44svh; gap: 8px; }
  .tp-table th:nth-child(4), .tp-table td:nth-child(4), .tp-table th:nth-child(6), .tp-table td:nth-child(6) { display: none; }
}
@media (max-width: 480px) { .tp-table th:nth-child(1), .tp-table td:nth-child(1), .tp-table th:nth-child(5), .tp-table td:nth-child(5) { display: none; } .field--inline input { min-width: 0; width: 100%; } .field--inline { flex: 1 1 100%; } }

@media (prefers-reduced-motion: reduce) {
  .wipe { display: none !important; }
  .ws a, .ws a:hover, .chips .k-chip:hover, .ex-list button:hover { transition: none; transform: none; }
  .ex-list button:hover { padding-left: 0; }
  .psteps li, .citem, .tpl, .k-tabs button, .tp-table tbody tr, .lb-row, .dockslot, .phero__stage { transition: none; }
  .pod { transition: none; --rise: 1 !important; }
  .podium { min-height: 0; padding: 60px 0; }
  .tp-status i { animation: none; }
  .phero__code { transform: none !important; }
}
