/* |bloch⟩ — every block is an observation */
@font-face { font-family: "Space Grotesk"; src: url(/assets/fonts/space-grotesk-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(/assets/fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(/assets/fonts/space-grotesk-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/assets/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/assets/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/assets/fonts/jetbrains-mono-greek-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0370-03FF; }
@font-face { font-family: "JetBrains Mono"; src: url(/assets/fonts/jetbrains-mono-greek-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0370-03FF; }
@font-face { font-family: "BlochKet"; src: url(/assets/fonts/ket.woff2) format("woff2"); font-display: swap; unicode-range: U+27E8-27E9; }
@font-face { font-family: "Instrument Serif"; src: url(/assets/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/assets/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #080a08;
  --panel: rgba(11, 14, 11, 0.84);
  --panel-2: rgba(16, 20, 16, 0.92);
  --line: rgba(232, 229, 216, 0.09);
  --line-2: rgba(232, 229, 216, 0.17);
  --cream: #e8e5d8;
  --muted: #a6a79a;
  --dim: #6c6f65;
  --phos: #78f59a;
  --phos-2: #4fc571;
  --phos-glow: rgba(120, 245, 154, 0.35);
  --amber: #ffb547;
  --red: #ff7a68;
  --sans: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "BlochKet", "Cambria Math", "Segoe UI Symbol", ui-monospace, Menlo, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --wrap: 1240px;
  --top-h: 64px;
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--cream); font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--muted); letter-spacing: 0; }
::selection { background: var(--phos); color: #061006; }
:focus-visible { outline: 1px solid var(--phos); outline-offset: 3px; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
main, .top, .foot { position: relative; z-index: 2; }

/* CRT veil over the whole page */
.crt-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 80;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.16) 2px 3px),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.42) 100%);
  mix-blend-mode: multiply;
}
.crt-overlay::after {
  content: ""; position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.06; animation: grain 0.9s steps(5) infinite; mix-blend-mode: screen;
}
@keyframes grain { 0% { transform: translate(0,0) } 20% { transform: translate(-3%,2%) } 40% { transform: translate(2%,-3%) } 60% { transform: translate(-2%,-1%) } 80% { transform: translate(3%,3%) } 100% { transform: translate(0,0) } }

/* ---------------------------------------------------------------- boot */
.boot {
  position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center;
  transition: opacity .5s ease, visibility .5s;
}
.boot pre { font-family: var(--mono); font-size: 12px; color: var(--phos); line-height: 1.8; margin: 0; min-width: min(460px, 86vw); text-shadow: 0 0 12px var(--phos-glow); white-space: pre-wrap; }
.boot pre .d { color: var(--dim); text-shadow: none; }
.boot pre .c { color: var(--cream); text-shadow: none; }
body:not(.booting) .boot { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------------------------------------------------------------- top bar */
.top {
  position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); z-index: 70;
  display: flex; align-items: center; gap: 28px; padding: 0 22px;
  background: linear-gradient(to bottom, rgba(8,10,8,0.92), rgba(8,10,8,0.72));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 19px; letter-spacing: -0.02em; }
.mark { width: 26px; height: 26px; color: var(--cream); filter: drop-shadow(0 0 6px rgba(120,245,154,.35)); }
.word .k, .title .k, .foot-brand .k { color: var(--phos); font-family: var(--mono); font-weight: 400; }
.word .k { font-size: 0.95em; }
.nav { display: flex; gap: 26px; font-size: 13px; color: var(--muted); }
.nav a { position: relative; padding: 6px 0; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--phos); transition: width .3s; }
.nav a:hover, .nav a.on { color: var(--cream); }
.nav a.on::after, .nav a:hover::after { width: 100%; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.block-tick { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; transition: border-color .2s; }
.block-tick:hover { border-color: var(--line-2); }
.block-tick .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 0 var(--phos-glow); }
.block-tick.live .dot { background: var(--phos); animation: ping 2.4s infinite; }
.block-tick.flash .bt-num { color: var(--phos); }
.bt-label { color: var(--dim); }
.bt-num { color: var(--cream); transition: color .4s; font-variant-numeric: tabular-nums; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(120,245,154,.55) } 70% { box-shadow: 0 0 0 7px rgba(120,245,154,0) } 100% { box-shadow: 0 0 0 0 rgba(120,245,154,0) } }
.sound { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.sound .bars { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.sound .bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; }
.sound[aria-pressed="true"] { color: var(--phos); border-color: rgba(120,245,154,.35); }
.sound[aria-pressed="true"] .bars i { animation: eq 1s ease-in-out infinite; }
.sound .bars i:nth-child(2) { animation-delay: -.3s !important; } .sound .bars i:nth-child(3) { animation-delay: -.6s !important; } .sound .bars i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes eq { 0%, 100% { height: 3px } 50% { height: 11px } }
.ca-chip { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(120,245,154,.08); border: 1px solid rgba(120,245,154,.28); font-family: var(--mono); font-size: 11px; transition: background .2s, border-color .2s; }
.ca-chip:hover { background: rgba(120,245,154,.14); border-color: rgba(120,245,154,.5); }
.ca-k { color: var(--phos); font-weight: 500; }
.ca-v { color: var(--cream); }
.ca-chip.soon .ca-v { color: var(--muted); }
.x-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); transition: background .2s, color .2s; }
.x-btn svg { width: 14px; height: 14px; }
.x-btn:hover { background: var(--cream); color: var(--bg); }
.menu { display: none; width: 32px; height: 32px; position: relative; }
.menu i { position: absolute; left: 8px; right: 8px; height: 1.5px; background: var(--cream); transition: transform .3s; }
.menu i:first-child { top: 12px; } .menu i:last-child { top: 19px; }
.menu[aria-expanded="true"] i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu[aria-expanded="true"] i:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero */
.hero { min-height: 100svh; padding: calc(var(--top-h) + 22px) 28px 26px; display: flex; flex-direction: column; align-items: center; max-width: 1440px; margin: 0 auto; }
.hero-meta { width: 100%; display: flex; justify-content: space-between; gap: 12px; font-size: 10px; letter-spacing: .1em; color: var(--dim); }
.hero-meta .hm-block { display: none; color: var(--phos); }
.eyebrow { margin: 26px 0 0; font-size: 11px; letter-spacing: .22em; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.title { margin: 6px 0 0; font-weight: 500; font-size: clamp(76px, 12.5vw, 176px); line-height: .95; letter-spacing: -0.05em; display: flex; align-items: baseline; text-shadow: 0 0 40px rgba(232,229,216,.08); }
.title .k { font-size: .78em; letter-spacing: 0; text-shadow: 0 0 24px var(--phos-glow); }
.title .k:first-child { margin-right: .02em; }
.title .t { animation: flicker 6s infinite; }
@keyframes flicker { 0%, 92%, 100% { opacity: 1 } 93% { opacity: .55 } 94% { opacity: 1 } 96% { opacity: .75 } 97% { opacity: 1 } }
.hero-stage { width: 100%; display: grid; grid-template-columns: 1fr minmax(300px, 640px) 1fr; align-items: center; gap: 24px; margin-top: -6px; }
.dock { position: relative; }
.hero-dock { height: clamp(330px, 54vh, 620px); cursor: grab; touch-action: pan-y; }
.hero-dock:active { cursor: grabbing; }
.dock-hint { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); font-size: 10px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; white-space: nowrap; pointer-events: none; opacity: .8; }
.side { font-size: 11px; color: var(--muted); line-height: 1.85; }
.side p { margin: 0; }
.side .tag { color: var(--phos); letter-spacing: .06em; margin-bottom: 6px; }
.side .tag b { font-weight: 500; }
.side-l { justify-self: end; text-align: left; max-width: 240px; }
.side-r { justify-self: start; text-align: right; max-width: 260px; }
.side .rule { display: block; width: 70px; height: 1px; background: var(--line-2); margin-top: 14px; }
.side-r .rule { margin-left: auto; }
.side .amp { color: var(--cream); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.side .odds { color: var(--dim); font-size: 10.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.fig { font-size: 9.5px; letter-spacing: .16em; color: var(--dim); margin: 2px 0 0; }
.prompt { width: 100%; max-width: 640px; text-align: center; margin-top: 30px; }
.prompt-h { margin: 0; font-weight: 500; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; }
.prompt-p { margin: 6px 0 18px; color: var(--muted); font-size: 13.5px; }
.prompt-form, .con-in { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px 6px 6px 14px; transition: border-color .2s, box-shadow .2s; }
.prompt-form:focus-within, .con-in:focus-within { border-color: rgba(120,245,154,.5); box-shadow: 0 0 0 4px rgba(120,245,154,.07), 0 0 30px rgba(120,245,154,.06); }
.pr { color: var(--phos); font-size: 13px; }
.prompt-form input, .con-in input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 14px; padding: 9px 0; color: var(--cream); }
.prompt-form input::placeholder, .con-in input::placeholder { color: var(--dim); }
.go { width: 36px; height: 36px; border-radius: 4px; background: var(--phos); color: #052010; font-weight: 600; display: grid; place-items: center; transition: transform .15s, box-shadow .2s; }
.go:hover { box-shadow: 0 0 22px var(--phos-glow); }
.go:active { transform: scale(.94); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; }
.chips-l { color: var(--dim); font-size: 10px; letter-spacing: .14em; margin-right: 4px; }
.chips button { padding: 5px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--cream); transition: border-color .2s, color .2s, background .2s; }
.chips button:hover { border-color: rgba(120,245,154,.45); color: var(--phos); background: rgba(120,245,154,.05); }
.hero-out { min-height: 22px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.hero-out b { color: var(--phos); font-weight: 500; }
.hero-out .err { color: var(--red); }
.hero-out a { color: var(--cream); border-bottom: 1px solid var(--line-2); }
.hero-foot { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 34px; font-size: 10px; letter-spacing: .12em; color: var(--dim); }
.hero-foot a { color: var(--cream); }
.hero-foot a:hover { color: var(--phos); }
.led { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--phos); box-shadow: 0 0 8px var(--phos); margin-right: 8px; vertical-align: 1px; }

/* ---------------------------------------------------------------- sections */
.sec { max-width: var(--wrap); margin: 0 auto; padding: 120px 28px 40px; }
.sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px 30px; margin-bottom: 36px; }
.label { grid-column: 1 / -1; margin: 0 0 14px; font-size: 10.5px; letter-spacing: .16em; color: var(--muted); display: inline-flex; width: max-content; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.sec-head h2 { margin: 0; font-weight: 500; font-size: clamp(34px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.035em; }
.sec-head h2 em { font-size: 1.06em; letter-spacing: -0.01em; }
.aside { margin: 0; font-size: 11px; color: var(--muted); text-align: right; line-height: 1.7; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 10.5px; letter-spacing: .1em; color: var(--muted); }
.ph-btns { display: flex; gap: 6px; }
.ph-btns button { font-size: 10px; letter-spacing: .1em; padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); transition: color .2s, border-color .2s; }
.ph-btns button:hover { color: var(--cream); border-color: var(--line-2); }
.sub { margin: 22px 0 10px; font-size: 10px; letter-spacing: .14em; color: var(--dim); }
.sub b { color: var(--cream); font-weight: 500; }

/* ---------------------------------------------------------------- console */
.console { overflow: hidden; }
.con-help { padding: 14px 16px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); display: grid; gap: 6px; background: rgba(120,245,154,.03); }
.con-help b { color: var(--phos); font-weight: 500; margin-right: 6px; }
.con-log { min-height: 300px; max-height: 470px; overflow-y: auto; padding: 8px 16px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.con-empty { min-height: 280px; display: grid; place-content: center; text-align: center; gap: 2px; }
.con-empty .psi { font-family: var(--mono); font-size: 44px; color: var(--phos); text-shadow: 0 0 22px var(--phos-glow); line-height: 1.1; animation: breathe 3.2s ease-in-out infinite; }
.con-empty p { margin: 0; }
.con-empty p.dim { font-size: 11px; margin-top: 6px; }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(.97) } 50% { opacity: 1; transform: scale(1.03) } }
.entry { padding: 14px 0; border-bottom: 1px dashed var(--line); animation: enter .45s cubic-bezier(.2,.7,.2,1); }
.entry:last-child { border-bottom: 0; }
@keyframes enter { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.e-in { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.e-in span:first-child::before { content: "> "; color: var(--phos); }
.e-in time { color: var(--dim); font-size: 10.5px; }
.e-out { margin-top: 8px; }
.e-val { font-family: var(--mono); font-size: 22px; color: var(--cream); word-break: break-all; letter-spacing: -0.01em; }
.e-val.big { font-size: 26px; }
.e-note { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.e-note b { color: var(--phos); font-weight: 500; }
.e-err { font-family: var(--mono); font-size: 12.5px; color: var(--red); }
.e-ket { display: grid; grid-template-columns: 1fr auto; gap: 8px 22px; align-items: start; }
.e-ket .pbar { margin-top: 6px; }
.e-mat { display: inline-grid; grid-template-columns: auto auto; gap: 4px 18px; font-family: var(--mono); font-size: 14px; padding: 8px 14px; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); margin: 4px 0; }
.e-actions { display: flex; gap: 8px; margin-top: 10px; }
.mini { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; padding: 6px 10px; border: 1px solid rgba(120,245,154,.35); color: var(--phos); border-radius: 4px; transition: background .2s; }
.mini:hover { background: rgba(120,245,154,.1); }
.con-in { margin: 0 12px 12px; }
.con-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .1em; color: var(--dim); }
.con-foot button { color: var(--muted); letter-spacing: .1em; font-size: 10px; }
.con-foot button:hover { color: var(--cream); }

/* probability bars (shared) */
.pbar { display: grid; grid-template-columns: 34px 1fr 74px; align-items: center; gap: 10px; font-size: 12px; margin-top: 10px; }
.pk.z, .hk.z { color: var(--phos); } .pk.o, .hk.o { color: var(--amber); }
.pb, .hb { height: 6px; background: rgba(232,229,216,.07); border-radius: 3px; overflow: hidden; position: relative; }
.pb i, .hb i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--phos); border-radius: 3px; box-shadow: 0 0 12px var(--phos-glow); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.pb i.o, #h1 { background: var(--amber); box-shadow: 0 0 12px rgba(255,181,71,.35); }
.pv, .hv { text-align: right; color: var(--cream); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- lab */
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.lab-ctl { padding-bottom: 18px; }
.lab-ctl > :not(.panel-head) { margin-left: 18px; margin-right: 18px; }
.wire { display: flex; align-items: center; gap: 10px; margin-top: 18px; min-height: 52px; }
.q { font-size: 12px; color: var(--muted); }
.init { font-size: 13px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--cream); transition: border-color .2s; }
.init:hover { border-color: var(--phos); }
.wire-track { flex: 1; position: relative; min-height: 40px; display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; }
.wire-track::-webkit-scrollbar { display: none; }
.wire-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-2); }
.wire-chips { position: relative; display: flex; gap: 6px; padding: 0 4px; }
.wire-empty { font-size: 11px; color: var(--dim); background: var(--panel-2); padding: 2px 8px; letter-spacing: .08em; }
.chip { position: relative; font-size: 12px; min-width: 34px; height: 32px; padding: 0 8px; display: grid; place-items: center; background: #0e130e; border: 1px solid rgba(120,245,154,.4); color: var(--phos); border-radius: 4px; white-space: nowrap; transition: background .2s, box-shadow .2s, border-color .2s; animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
.chip:hover { background: rgba(255,122,104,.12); border-color: var(--red); color: var(--red); }
.chip.playing { background: var(--phos); color: #052010; box-shadow: 0 0 18px var(--phos-glow); }
@keyframes pop { from { transform: scale(.6); opacity: 0 } to { transform: none; opacity: 1 } }
.meter { width: 34px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); }
.meter svg { width: 22px; }
.meter.hit { border-color: var(--phos); color: var(--phos); box-shadow: 0 0 16px var(--phos-glow); }
.gates { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.gates button { height: 42px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 14px; color: var(--cream); background: rgba(232,229,216,.02); transition: border-color .15s, color .15s, background .15s, transform .1s, box-shadow .2s; }
.gates button:hover { border-color: var(--phos); color: var(--phos); background: rgba(120,245,154,.06); box-shadow: 0 0 16px rgba(120,245,154,.12); }
.gates button:active { transform: scale(.94); }
.gates-rot { grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
.rot input[type=range] { width: 100%; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--phos) var(--fill, 66%), rgba(232,229,216,.12) var(--fill, 66%)); outline: none; }
.rot input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--phos); box-shadow: 0 0 0 4px rgba(120,245,154,.18), 0 0 16px var(--phos-glow); cursor: pointer; }
.rot input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--phos); box-shadow: 0 0 0 4px rgba(120,245,154,.18); cursor: pointer; }
.rot-scale { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--dim); margin-top: 6px; }
.measure { margin-top: 24px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.btn-primary { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 46px; padding: 0 16px; border-radius: 4px; background: var(--phos); color: #052010; font-weight: 600; font-size: 14px; transition: box-shadow .25s, transform .12s, filter .2s; }
.btn-primary:hover { box-shadow: 0 0 34px var(--phos-glow); }
.btn-primary:active { transform: scale(.985); }
.btn-primary .arr { transition: transform .25s; }
.btn-primary:hover .arr { transform: translateX(4px); }
.btn-primary[disabled], .btn-primary.off { filter: grayscale(1) brightness(.6); pointer-events: none; }
.btn-primary.busy { animation: busy 1s ease-in-out infinite; }
@keyframes busy { 50% { filter: brightness(1.25) } }
.shots { display: flex; gap: 6px; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 10.5px; letter-spacing: .1em; color: var(--cream); transition: border-color .2s, color .2s, background .2s; white-space: nowrap; }
.btn-ghost:hover { border-color: var(--phos); color: var(--phos); }
.shots select { height: 46px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 8px; font-size: 12px; color: var(--cream); }
.hist { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: rgba(0,0,0,.25); }
.hist-row { display: grid; grid-template-columns: 34px 1fr 64px; gap: 10px; align-items: center; font-size: 12px; margin: 6px 0; }
.hb { height: 10px; }
.hb u { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--cream); opacity: .5; left: 0; transition: left .5s; }
.hist-note { margin: 10px 0 0; font-size: 10.5px; color: var(--dim); line-height: 1.6; }
.hist-note a { color: var(--muted); border-bottom: 1px solid var(--line-2); }
.lab-view { display: grid; gap: 14px; }
.lab-dock { height: clamp(320px, 40vw, 460px); border: 1px solid var(--line); border-radius: var(--r); background: radial-gradient(circle at 50% 50%, rgba(120,245,154,.035), transparent 60%); cursor: grab; touch-action: pan-y; }
.lab-dock::before, .lab-dock::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--line-2); pointer-events: none; }
.lab-dock::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.lab-dock::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.readout { padding-bottom: 14px; }
.readout > :not(.panel-head) { margin-left: 16px; margin-right: 16px; }
.readout .psi { font-size: clamp(16px, 1.7vw, 21px); margin: 16px 16px 8px; color: var(--cream); min-height: 30px; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; margin-top: 16px; margin-bottom: 0; }
.stats div { border-top: 1px solid var(--line); padding-top: 8px; }
.stats dt { font-size: 9.5px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.stats dd { margin: 2px 0 0; font-size: 12px; color: var(--cream); font-variant-numeric: tabular-nums; word-break: break-word; }
.collapse-card { padding: 16px 18px 18px; border-color: rgba(120,245,154,.35); box-shadow: 0 0 40px rgba(120,245,154,.06) inset; animation: enter .5s cubic-bezier(.2,.7,.2,1); }
.collapse-card.one { border-color: rgba(255,181,71,.4); box-shadow: 0 0 40px rgba(255,181,71,.06) inset; }
.collapse-card .sub { margin-top: 0; }
.cc-out { margin: 0; font-family: var(--mono); font-size: 46px; line-height: 1.1; color: var(--phos); text-shadow: 0 0 26px var(--phos-glow); }
.collapse-card.one .cc-out { color: var(--amber); text-shadow: 0 0 26px rgba(255,181,71,.4); }
.cc-by { margin: 8px 0 0; font-size: 12px; color: var(--cream); }
.cc-by a { border-bottom: 1px solid var(--line-2); }
.cc-by a:hover { color: var(--phos); }
.cc-math { margin: 6px 0 0; font-size: 11px; color: var(--muted); line-height: 1.7; word-break: break-all; }
.cc-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cc-btns .btn-ghost { height: 36px; }

/* ---------------------------------------------------------------- futures */
.futures { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.fut { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 18px; min-height: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .25s, transform .3s cubic-bezier(.2,.8,.2,1), background .25s; position: relative; overflow: hidden; }
.fut::after { content: "RUN →"; position: absolute; right: 16px; bottom: 16px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--phos); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s; }
.fut:hover { border-color: rgba(120,245,154,.45); transform: translateY(-4px); background: rgba(14,20,14,.9); }
.fut:hover::after { opacity: 1; transform: none; }
.fut-n { font-size: 10px; color: var(--dim); letter-spacing: .14em; }
.fut-f { font-size: 18px; color: var(--phos); margin-top: 8px; }
.fut b { font-weight: 500; font-size: 17px; margin-top: auto; }
.fut-d { font-size: 13px; color: var(--muted); line-height: 1.45; }
.fut-o { font-size: 10.5px; color: var(--dim); letter-spacing: .06em; margin-top: 4px; }

/* ---------------------------------------------------------------- lessons */
.lessons-nav { display: flex; gap: 6px; }
.lessons-nav button { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--cream); transition: border-color .2s, color .2s; }
.lessons-nav button:hover { border-color: var(--phos); color: var(--phos); }
.lessons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 330px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; cursor: grab; }
.lessons.dragging { cursor: grabbing; scroll-snap-type: none; }
.lesson { scroll-snap-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 340px; user-select: none; }
.lesson.bonus { border-color: rgba(120,245,154,.3); background: linear-gradient(160deg, rgba(120,245,154,.06), var(--panel) 50%); }
.les-n { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--dim); }
.lesson h3 { margin: 4px 0 0; font-weight: 500; font-size: 20px; letter-spacing: -0.01em; }
.lesson p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.les-f { font-family: var(--mono); font-size: 12.5px; color: var(--phos); padding: 9px 11px; border: 1px solid var(--line); border-radius: 4px; background: rgba(0,0,0,.25); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.les-w { font-family: var(--mono); font-size: 11px; color: var(--dim) !important; }
.les-w b { color: var(--cream); font-weight: 500; }
.les-run { margin-top: auto; align-self: flex-start; font-family: var(--mono); font-size: 11.5px; color: var(--cream); padding: 6px 0; border-bottom: 1px solid var(--line-2); transition: color .2s, border-color .2s; }
.les-run:hover { color: var(--phos); border-color: var(--phos); }

/* ---------------------------------------------------------------- engine */
.engine { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.eng { padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 250px; }
.eng-n { margin: 0; font-size: 10px; letter-spacing: .14em; color: var(--dim); }
.eng h3 { margin: 0; font-weight: 500; font-size: 19px; }
.eng p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.eng code { margin-top: auto; font-size: 11.5px; color: var(--phos); padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: rgba(0,0,0,.25); }
.obslog { margin-top: 14px; }
.log-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.log-stats > div { padding: 14px 16px; border-right: 1px solid var(--line); display: grid; gap: 4px; }
.log-stats > div:last-child { border-right: 0; }
.ls-k { font-size: 9.5px; letter-spacing: .14em; color: var(--dim); }
.log-stats b { font-weight: 500; font-size: 18px; color: var(--cream); font-variant-numeric: tabular-nums; }
.log-list { max-height: 360px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.log-row { display: grid; grid-template-columns: 64px 1.2fr 1.4fr 70px 1fr 90px; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); cursor: pointer; transition: background .15s; }
.log-row:hover, .log-row.open { background: rgba(120,245,154,.04); }
.log-row .n { color: var(--dim); }
.log-row .o0 { color: var(--phos); } .log-row .o1 { color: var(--amber); }
.log-row .c { color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row .t { text-align: right; color: var(--dim); }
.log-empty { padding: 26px 16px; color: var(--dim); font-size: 12px; margin: 0; text-align: center; }
.verify { padding: 16px; border-top: 1px solid var(--line); background: rgba(0,0,0,.28); font-size: 11.5px; color: var(--muted); line-height: 1.9; word-break: break-all; }
.verify b { color: var(--cream); font-weight: 500; }
.verify .ok { color: var(--phos); } .verify .bad { color: var(--red); }
.verify a { color: var(--cream); border-bottom: 1px solid var(--line-2); }
.verify button { margin-top: 8px; }

/* ---------------------------------------------------------------- token */
.token { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 26px; }
.tok-ca .sub { margin-top: 0; }
.tok-v { margin: 0; font-size: clamp(13px, 1.6vw, 18px); color: var(--cream); word-break: break-all; }
.tok-v.soon { color: var(--muted); font-size: 14px; }
.tok-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- outro */
.outro { text-align: center; padding-top: 150px; padding-bottom: 130px; display: flex; flex-direction: column; align-items: center; }
.outro .label { margin-bottom: 26px; }
.outro-h { margin: 0; font-weight: 500; font-size: clamp(40px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.04em; }
.back { margin-top: 30px; font-size: 11px; letter-spacing: .14em; color: var(--muted); padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; transition: color .2s, border-color .2s; }
.back:hover { color: var(--phos); border-color: rgba(120,245,154,.45); }

/* ---------------------------------------------------------------- footer */
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px; border-top: 1px solid var(--line); font-size: 10.5px; letter-spacing: .12em; background: rgba(8,10,8,.8); }
.foot-brand { font-family: var(--sans); font-size: 17px; letter-spacing: -0.02em; font-weight: 500; }
.foot nav { display: flex; gap: 18px; }
.foot nav a:hover { color: var(--phos); }

/* ---------------------------------------------------------------- toast & cursor */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 85; background: var(--panel-2); border: 1px solid rgba(120,245,154,.4); color: var(--cream); font-size: 12px; padding: 10px 16px; border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.cursor { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.cursor-ring { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 1px solid rgba(232,229,216,.5); border-radius: 50%; transition: width .25s, height .25s, margin .25s, border-color .25s, background .25s; }
.cursor-dot { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--phos); box-shadow: 0 0 8px var(--phos); }
.cursor-label { position: absolute; left: 22px; top: 12px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--phos); white-space: nowrap; opacity: 0; transition: opacity .2s; }
.cursor.hot .cursor-ring { width: 46px; height: 46px; margin: -23px 0 0 -23px; border-color: rgba(120,245,154,.7); background: rgba(120,245,154,.05); }
.cursor.observe .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--phos); border-style: dashed; animation: spin 6s linear infinite; }
.cursor.observe .cursor-label { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg) } }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor .dock { cursor: none; }
.has-cursor input, .has-cursor select { cursor: text; }

/* ---------------------------------------------------------------- reveal */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- og image mode */
body.og .top, body.og .prompt, body.og .hero-foot, body.og .hero-meta, body.og .dock-hint, body.og .fig, body.og main > .sec, body.og .foot, body.og .cursor { display: none !important; }
body.og .hero { min-height: 100vh; justify-content: center; padding-top: 30px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .futures { grid-template-columns: repeat(3, 1fr); }
  .engine { grid-template-columns: repeat(2, 1fr); }
  .block-tick .bt-label { display: none; }
}
@media (max-width: 980px) {
  .nav { position: fixed; top: var(--top-h); left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(8,10,8,.97); border-bottom: 1px solid var(--line); padding: 8px 22px 16px; transform: translateY(-120%); transition: transform .35s cubic-bezier(.2,.8,.2,1); z-index: -1; }
  .nav.open { transform: none; }
  .nav a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .menu { display: block; }
  .hero-stage { grid-template-columns: 1fr; gap: 6px; }
  .side { display: none; }
  .lab-grid { grid-template-columns: 1fr; }
  .lab-view { order: -1; }
  .log-row { grid-template-columns: 50px 1fr 1fr 60px; }
  .log-row .r, .log-row .t { display: none; }
}
@media (max-width: 560px) {
  .block-tick { display: none; }
  .hero-meta .hm-block { display: inline; }
  .hero-meta .hm-rh { display: none; }
}
@media (max-width: 640px) {
  :root { --top-h: 58px; }
  .top { padding: 0 14px; gap: 10px; }
  .brand .word { display: none; }
  .sound .sound-l { display: none; }
  .sound { padding: 0 9px; }
  .block-tick { padding: 7px 9px; }
  .ca-chip { padding: 0 10px; max-width: 132px; overflow: hidden; }
  .ca-chip .ca-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { padding-left: 18px; padding-right: 18px; }
  .hero-meta .hm-chain { display: none; }
  .hero-dock { height: 48vh; min-height: 300px; }
  .sec { padding: 90px 18px 30px; }
  .sec-head { grid-template-columns: 1fr; }
  .aside { text-align: left; }
  .gates { grid-template-columns: repeat(4, 1fr); }
  .measure { grid-template-columns: 1fr; }
  .futures { grid-template-columns: 1fr 1fr; }
  .fut { min-height: 190px; }
  .engine { grid-template-columns: 1fr; }
  .log-stats { grid-template-columns: 1fr 1fr; }
  .log-stats > div:nth-child(2) { border-right: 0; }
  .log-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .token { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero-foot span:last-child { display: none; }
  .foot { justify-content: center; text-align: center; }
  .e-ket { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .futures { grid-template-columns: 1fr; }
  .ca-chip { max-width: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  .crt-overlay::after, .title .t, .con-empty .psi { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =================================================================== MOTION (v2) */
/* header + scroll progress */
.top { transition: height .35s cubic-bezier(.2,.8,.2,1), background .35s; }
body.scrolled .top { height: 54px; background: rgba(8,10,8,.95); }
.scroll-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; }
.scroll-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--phos), var(--amber)); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 10px var(--phos-glow); }

/* title: letters resolve, then live in two states */
.title .ch { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(.14em) scale(1.06); transition: opacity .5s calc(var(--i) * .09s), filter .7s calc(var(--i) * .09s), transform .8s cubic-bezier(.2,.8,.2,1) calc(var(--i) * .09s); }
.title .ch.on { opacity: 1; filter: none; transform: none; }
.title .t { animation: dual 5.5s ease-in-out infinite, flicker 6s infinite; }
@keyframes dual {
  0%, 100% { text-shadow: -.016em 0 0 rgba(120,245,154,.38), .016em 0 0 rgba(255,181,71,.24), 0 0 40px rgba(232,229,216,.08); }
  50% { text-shadow: .022em 0 0 rgba(120,245,154,.3), -.022em 0 0 rgba(255,181,71,.3), 0 0 40px rgba(232,229,216,.1); }
}
.title.glitch { animation: tglitch .45s steps(2) 1; }
@keyframes tglitch { 0% { transform: none } 20% { transform: translate(-5px, 1px) skewX(-7deg) } 40% { transform: translate(6px, -2px) skewX(5deg); filter: hue-rotate(60deg) } 60% { transform: translate(-3px, 0) } 80% { transform: translate(2px, 1px) skewX(2deg) } 100% { transform: none } }

/* headings: lines slide out of a mask; labels draw their rule */
.ln { display: block; overflow: hidden; padding: 0 .08em .07em 0; margin-bottom: -.07em; }
.ln > span { display: inline-block; transform: translateY(108%); transition: transform 1.05s cubic-bezier(.2,.75,.15,1) var(--ld, 0s); }
.in .ln > span, .in.ln > span { transform: none; }
.label { border-bottom: 0 !important; position: relative; }
.label::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-2); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.2,.7,.2,1) .15s; }
.in .label::after, .label.in::after { transform: scaleX(1); }
.outro-h em { display: inline-block; animation: drift 7s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }

/* cards: tilt + glare */
.fut, .lesson, .eng, .token, .machine { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%; position: relative; }
.fut.in, .lesson.in, .eng.in, .token.in, .machine.in { transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .9s cubic-bezier(.2,.7,.2,1), border-color .25s, background .25s; }
.fut.in.tilt-on, .lesson.in.tilt-on, .eng.in.tilt-on, .token.in.tilt-on, .machine.in.tilt-on { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0); transition: transform .14s ease-out, opacity .9s, border-color .25s, background .25s; }
.fut::before, .lesson::before, .eng::before, .token::before, .machine::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--gx) var(--gy), rgba(120,245,154,.11), transparent 46%); opacity: 0; transition: opacity .35s; z-index: 0; }
.tilt-on::before { opacity: 1; }
.fut:hover { transform: none; }
.lesson:hover, .eng:hover { border-color: rgba(120,245,154,.3); }

/* magnetic buttons: smooth the `translate` they get from JS */
.btn-primary { transition: box-shadow .25s, transform .12s, filter .2s, translate .35s cubic-bezier(.2,.8,.2,1); }
.go { transition: transform .15s, box-shadow .2s, translate .35s cubic-bezier(.2,.8,.2,1); }
.back, .les-run { transition: color .2s, border-color .2s, translate .35s cubic-bezier(.2,.8,.2,1); }
.x-btn { transition: background .2s, color .2s, translate .35s cubic-bezier(.2,.8,.2,1); }
.ca-chip { transition: background .2s, border-color .2s, translate .35s cubic-bezier(.2,.8,.2,1); }
.sound { transition: color .2s, border-color .2s, translate .35s cubic-bezier(.2,.8,.2,1); }
.chips button { transition: border-color .2s, color .2s, background .2s, translate .35s cubic-bezier(.2,.8,.2,1); }
.gates button { transition: border-color .15s, color .15s, background .15s, transform .1s, box-shadow .2s, translate .3s cubic-bezier(.2,.8,.2,1); }
.mini { transition: background .2s, translate .3s cubic-bezier(.2,.8,.2,1); }

/* cursor photon trail + click ripples */
.trail { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 79; }
.ripple { position: fixed; z-index: 96; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 1px solid var(--phos); border-radius: 50%; pointer-events: none; animation: ripple .65s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes ripple { from { transform: scale(.3); opacity: .9 } to { transform: scale(5.5); opacity: 0 } }

/* hero oscilloscope */
.scope-wrap { position: relative; margin-top: 14px; width: 214px; height: 64px; border: 1px solid var(--line); border-radius: 3px; background: rgba(0,0,0,.4); overflow: hidden; }
.scope-wrap::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.22) 2px 3px); pointer-events: none; }
#scope { width: 100%; height: 100%; display: block; }
.scope-l { position: absolute; right: 6px; top: 3px; font-size: 8.5px; letter-spacing: .1em; color: var(--phos); z-index: 1; }
.scope-l .z { color: var(--amber); font-style: normal; }

/* live block band */
.stream { position: relative; z-index: 2; overflow: hidden; height: 46px; display: flex; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(8,10,8,.82); font-size: 11px; letter-spacing: .14em; color: var(--muted); -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.stream-track { display: flex; align-items: center; gap: 28px; white-space: nowrap; will-change: transform; }
.st-tag { color: var(--dim); }
.st-tag::after { content: "✦"; margin-left: 28px; color: rgba(120,245,154,.35); }
.st-item { display: inline-flex; align-items: center; gap: 9px; color: var(--cream); animation: stin .6s cubic-bezier(.2,.8,.2,1); }
.st-item i { width: 6px; height: 6px; border-radius: 50%; background: var(--phos); box-shadow: 0 0 8px var(--phos); }
.st-item em { font-style: normal; color: var(--muted); }
.st-item:hover, .st-item:hover em { color: var(--phos); }
@keyframes stin { from { opacity: 0; filter: blur(4px) } to { opacity: 1; filter: none } }

/* watch: pinned, scroll-scrubbed */
.watch { position: relative; height: 560vh; z-index: 2; }
.watch-pin { position: sticky; top: 0; height: 100vh; height: 100svh; max-width: var(--wrap); margin: 0 auto; padding: calc(var(--top-h) + 24px) 28px 46px; display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 30px; align-items: center; }
.watch-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.watch .label { margin: 0; }
.watch-h { margin: 0; font-weight: 500; font-size: clamp(30px, 3.8vw, 50px); line-height: 1.02; letter-spacing: -0.035em; }
.watch-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.watch-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 9px 12px; border-left: 1px solid var(--line); opacity: .3; transition: opacity .45s, border-color .45s, background .45s, transform .55s cubic-bezier(.2,.8,.2,1); }
.watch-steps li b { display: block; font-weight: 500; font-size: 16px; }
.watch-steps li div > span { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .55s cubic-bezier(.2,.8,.2,1), opacity .4s, margin .4s; }
.watch-steps li div > span a { color: var(--phos); border-bottom: 1px solid rgba(120,245,154,.4); }
.watch-steps li.on { opacity: 1; border-color: var(--phos); background: linear-gradient(90deg, rgba(120,245,154,.08), transparent 80%); transform: translateX(8px); }
.watch-steps li.on div > span { max-height: 90px; opacity: 1; margin-top: 4px; }
.watch-steps li.done { opacity: .58; }
.ws-k { font-size: 15px; color: var(--phos); text-align: center; padding-top: 1px; }
.watch-live { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 12px 14px; font-size: 12px; }
.wl-wire { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.wl-q { color: var(--muted); }
.wl-line { flex: 0 0 26px; height: 1px; background: var(--line-2); }
.wl-chips { display: flex; gap: 6px; }
.wl-chips .chip { pointer-events: none; }
.wl-psi { font-size: 16px; color: var(--cream); margin: 6px 0 2px; font-variant-numeric: tabular-nums; min-height: 24px; }
.wl-block { margin-top: 8px; font-size: 11px; color: var(--muted); opacity: 0; transform: translateY(6px); transition: opacity .45s, transform .45s; line-height: 1.6; }
.wl-block.on { opacity: 1; transform: none; }
.wl-block b { color: var(--cream); font-weight: 500; }
.wl-block .o1 { color: var(--amber); }
.watch-dock { height: min(76vh, 720px); }
.watch-prog { position: absolute; left: 28px; right: 28px; bottom: 22px; height: 1px; background: var(--line); }
.watch-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--phos), var(--amber)); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 8px var(--phos-glow); }

/* the machine (engine) */
.machine { margin-top: 14px; overflow: hidden; }
.m-flow { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 36px 1fr 36px 1fr 36px .8fr; align-items: stretch; padding: 18px; }
.m-cell { border: 1px solid var(--line); border-radius: 4px; padding: 12px; background: rgba(0,0,0,.32); display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: border-color .4s; }
.m-k { font-size: 9.5px; letter-spacing: .12em; color: var(--dim); }
.m-cell > b { font-weight: 500; font-size: 17px; color: var(--cream); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-cell > b a:hover { color: var(--phos); }
.m-s { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-s b { color: var(--cream); font-weight: 500; }
.m-dig { color: var(--phos) !important; letter-spacing: .05em; }
.m-track { position: relative; height: 8px; border-radius: 4px; background: rgba(232,229,216,.07); margin: 3px 0; }
.m-p0 { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(120,245,154,.38); border-radius: 4px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.m-r { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; left: 0; background: var(--cream); box-shadow: 0 0 10px var(--cream); transition: left .8s cubic-bezier(.2,.8,.2,1); }
.m-arrow { position: relative; align-self: center; height: 1px; margin: 0 6px; background: repeating-linear-gradient(90deg, rgba(120,245,154,.55) 0 5px, transparent 5px 10px); background-size: 20px 1px; animation: mflow .9s linear infinite; }
.m-arrow i { position: absolute; right: -3px; top: -3.5px; border: 4px solid transparent; border-left: 6px solid rgba(120,245,154,.7); border-right: 0; }
@keyframes mflow { to { background-position: 20px 0 } }
.m-out { font-family: var(--mono); font-size: 32px !important; line-height: 1.05; }
.m-out.o0 { color: var(--phos) !important; text-shadow: 0 0 18px var(--phos-glow); }
.m-out.o1 { color: var(--amber) !important; text-shadow: 0 0 18px rgba(255,181,71,.45); }
.m-note { position: relative; z-index: 1; margin: 0; padding: 0 18px 16px; font-size: 10.5px; color: var(--dim); }
.machine.pulse .m-cell { animation: mcell 1s ease; }
.machine.pulse .m-cell:nth-child(3) { animation-delay: .15s; }
.machine.pulse .m-cell:nth-child(5) { animation-delay: .3s; }
.machine.pulse .m-cell:nth-child(7) { animation-delay: .45s; }
@keyframes mcell { 0% { border-color: var(--line) } 35% { border-color: rgba(120,245,154,.65); box-shadow: inset 0 0 24px rgba(120,245,154,.1) } 100% { border-color: var(--line) } }

/* token: a coin in superposition */
.token { grid-template-columns: auto 1fr auto; }
.coin { position: relative; width: 112px; height: 112px; perspective: 600px; margin-right: 8px; }
.coin-in { position: absolute; inset: 0; transform-style: preserve-3d; animation: coinspin 2.4s linear infinite; }
.coin:hover .coin-in { animation-play-state: paused; }
.face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-family: var(--mono); font-size: 28px; color: var(--phos); border: 1px solid rgba(120,245,154,.5); background: radial-gradient(circle at 34% 28%, rgba(120,245,154,.26), rgba(8,12,8,.96) 68%); box-shadow: inset 0 0 18px rgba(120,245,154,.28), 0 0 26px rgba(120,245,154,.14); text-shadow: 0 0 14px var(--phos-glow); }
.face.f1 { transform: rotateY(180deg); color: var(--amber); border-color: rgba(255,181,71,.55); background: radial-gradient(circle at 34% 28%, rgba(255,181,71,.24), rgba(12,10,6,.96) 68%); box-shadow: inset 0 0 18px rgba(255,181,71,.28), 0 0 26px rgba(255,181,71,.14); text-shadow: 0 0 14px rgba(255,181,71,.45); }
.coin-shadow { position: absolute; left: 18%; right: 18%; bottom: -16px; height: 8px; border-radius: 50%; background: radial-gradient(rgba(120,245,154,.3), transparent 70%); animation: coinshadow 1.2s ease-in-out infinite alternate; }
@keyframes coinspin { to { transform: rotateY(360deg) } }
@keyframes coinshadow { from { transform: scaleX(1); opacity: .9 } to { transform: scaleX(.4); opacity: .35 } }

/* lab: meter needle, flying gates, futures mini spheres, lessons progress */
.meter .needle { transform-box: view-box; transform-origin: 14px 16px; transform: rotate(32deg); transition: transform .55s cubic-bezier(.3,1.6,.4,1); }
.meter.reading { border-color: var(--phos); color: var(--phos); }
.meter.reading .needle { animation: needle .26s ease-in-out infinite alternate; }
.meter.r0 .needle { transform: rotate(-52deg); }
.meter.r1 .needle { transform: rotate(52deg); }
.meter.r1 { color: var(--amber) !important; border-color: var(--amber) !important; box-shadow: 0 0 16px rgba(255,181,71,.35) !important; }
@keyframes needle { from { transform: rotate(-42deg) } to { transform: rotate(42deg) } }
.fly { position: fixed; z-index: 90; pointer-events: none; font-family: var(--mono); font-size: 13px; line-height: 1; padding: 9px 11px; border-radius: 4px; background: var(--phos); color: #052010; box-shadow: 0 0 24px var(--phos-glow); }
.fut-viz { position: absolute; right: 10px; top: 10px; width: 82px; height: 82px; pointer-events: none; z-index: 1; }
.fut > * { position: relative; z-index: 1; }
.fut > .fut-viz { position: absolute; }
.les-prog { position: relative; height: 1px; background: var(--line); margin-top: 8px; }
.les-prog i { position: absolute; top: -1px; height: 3px; left: 0; width: 20%; background: var(--phos); border-radius: 2px; box-shadow: 0 0 8px var(--phos-glow); }
.lesson > *, .eng > *, .token > * { position: relative; z-index: 1; }

@media (max-width: 980px) {
  .watch { height: 520vh; }
  .watch-pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; gap: 6px; padding-top: calc(var(--top-h) + 10px); }
  .watch-dock { order: -1; height: 38vh; height: 38svh; }
  .watch-h { display: none; }
  .watch-steps li:not(.on) { display: none; }
  .watch-steps li.on { transform: none; }
  .m-flow { grid-template-columns: 1fr; gap: 0; }
  .m-arrow { width: 1px; height: 18px; margin: 4px auto; background: repeating-linear-gradient(180deg, rgba(120,245,154,.55) 0 5px, transparent 5px 10px); background-size: 1px 20px; animation: mflowv .9s linear infinite; }
  .m-arrow i { right: -4px; top: auto; bottom: -3px; border: 4px solid transparent; border-top: 6px solid rgba(120,245,154,.7); border-bottom: 0; }
  @keyframes mflowv { to { background-position: 0 20px } }
  .token { grid-template-columns: 1fr; justify-items: start; }
}
@media (max-width: 640px) {
  .scope-wrap { display: none; }
  .stream { height: 40px; font-size: 10px; }
  .fut-viz { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .title .t, .outro-h em, .coin-in, .coin-shadow, .m-arrow { animation: none !important; }
  .title .ch { opacity: 1; filter: none; transform: none; transition: none; }
  .ln > span { transform: none; transition: none; }
  .label::after { transform: scaleX(1); transition: none; }
}
