/* TINKER explainer — palette follows the paper figures (navy + tile red). */
:root {
  --bg: #F7F8FA;
  --bg-alt: #EDF0F5;
  --surface: #FFFFFF;
  --ink: #16243A;
  --ink-2: #44546B;
  --ink-3: #7A889C;
  --line: #D5DCE6;
  --navy: #1F3A5F;
  --navy-2: #34547A;
  --navy-3: #4A6E96;
  --navy-4: #6B8AAE;
  --navy-5: #8FA6C2;
  --tile: #B83A3A;
  --tile-soft: #F6DCDC;
  --on: #1F3A5F;
  --off: #DDE3EB;
  --good: #1E7A4E;
  --dark-band: #12213A;
  --dark-ink: #E6ECF5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 58, .06), 0 8px 24px rgba(16, 32, 58, .06);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1626;
    --bg-alt: #111D31;
    --surface: #16243A;
    --ink: #E6ECF5;
    --ink-2: #B3C0D3;
    --ink-3: #7F8FA8;
    --line: #26364F;
    --navy: #8FB3E0;
    --navy-2: #6F97C8;
    --navy-3: #5A80B0;
    --navy-4: #476A96;
    --navy-5: #37557C;
    --tile: #E86A6A;
    --tile-soft: #4A2226;
    --on: #8FB3E0;
    --off: #22324A;
    --good: #5CCB93;
    --dark-band: #081020;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); max-width: 22ch; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--navy-2); }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--bg-alt); padding: .08em .35em; border-radius: 5px; }
abbr { text-decoration: none; border-bottom: 1px dotted var(--ink-3); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.band { padding: clamp(72px, 12vh, 140px) 0; }
.band.alt { background: var(--bg-alt); }
.band.dark { background: var(--dark-band); color: var(--dark-ink); }
.band.dark a { color: #BCD2F0; }
.eyebrow { font: 600 .8rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tile); margin-bottom: 1rem; }
.prose { max-width: 68ch; color: var(--ink-2); font-size: 1.08rem; }
.hl { background: linear-gradient(transparent 60%, color-mix(in srgb, var(--tile) 25%, transparent) 0); padding: 0 .1em; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 24px;
  padding: 10px 20px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { font: 800 1rem/1 var(--mono); letter-spacing: .08em; color: var(--ink); text-decoration: none; }
.navlinks { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.navlinks a { color: var(--ink-2); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.navlinks a:hover { color: var(--tile); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.progress span { display: block; height: 100%; width: 0; background: var(--tile); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4em; padding: .75em 1.2em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .95rem/1 var(--sans);
  text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--tile); color: #fff; border-color: transparent; }
.btn.small { padding: .5em .9em; font-size: .85rem; }
.btn:focus-visible, a:focus-visible, input:focus-visible, canvas:focus-visible { outline: 2px solid var(--tile); outline-offset: 3px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: 90px 20px 60px; }
#hero-bits { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .4; -webkit-mask: radial-gradient(ellipse at center, transparent 18%, #000 70%); mask: radial-gradient(ellipse at center, transparent 18%, #000 70%); }
.hero-inner { position: relative; text-align: center; max-width: 820px; }
.hero h1 { font: 900 clamp(4rem, 16vw, 10rem)/.9 var(--mono); letter-spacing: -.04em; margin: .1em 0 .2em; color: var(--navy); }
.hero h1 .accent { color: var(--tile); }
.kicker { font: 600 .8rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.lede { font-size: clamp(1.1rem, 2.4vw, 1.45rem); color: var(--ink-2); max-width: 36ch; margin: 0 auto 1em; }
.authors { color: var(--ink-3); font-size: .95rem; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 1.6em; }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--ink-3); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink-3); animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-clip img { clip-path: inset(0 0 100% 0); transition: clip-path 1.6s cubic-bezier(.6, .1, .2, 1); }
.reveal-clip.in img { clip-path: inset(0 0 0 0); }

/* ---------- 01 question ---------- */
.neuron-hero { max-width: 620px; margin: 10px 0 30px; }
.neuron-hero svg { width: 100%; height: auto; overflow: visible; }
.tlg-body { fill: var(--surface); stroke: var(--navy); stroke-width: 2.5; }
.tlg-sigma { font: 600 17px var(--sans); fill: var(--ink); }
.tlg-wire { stroke: var(--navy); stroke-width: 2.5; fill: none; }
.tlg-th { fill: var(--navy); }
.tlg-th-t { font: 700 18px var(--sans); fill: #fff; }
.tlg-out { fill: var(--off); stroke: var(--navy); stroke-width: 2; transition: fill .2s; }
.tlg-out.fire { fill: var(--tile); filter: drop-shadow(0 0 8px var(--tile)); }
.tlg-in-line { stroke: var(--navy-4); stroke-width: 1.6; }
.tlg-in-dot { fill: var(--off); stroke: var(--navy); stroke-width: 1.5; transition: fill .25s; }
.tlg-in-dot.on { fill: var(--navy); }
.tlg-w { font: 500 12px var(--mono); fill: var(--ink-3); }
.tlg-pulse { fill: var(--tile); }

.cards { display: grid; gap: 16px; margin: 28px 0; }
.cards.four { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.cards.two-col { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card p, .card li { color: var(--ink-2); font-size: .95rem; }
.card ul { margin: 0; padding-left: 1.1em; }
.card li { margin-bottom: .5em; }
.card .ico { width: 34px; height: 34px; color: var(--tile); margin-bottom: 12px; }
.card .ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cards.four .card { transition: opacity .8s, transform .8s, filter .6s; }
.cards.four .card:nth-child(2) { transition-delay: .1s; }
.cards.four .card:nth-child(3) { transition-delay: .2s; }
.cards.four .card:nth-child(4) { transition-delay: .3s; }
.big-q { font-size: clamp(1.25rem, 2.8vw, 1.8rem); font-weight: 650; max-width: 34ch; margin-top: 1.4em; line-height: 1.35; }

/* ---------- 02 neuron demo ---------- */
.neuron-demo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-top: 24px; }
.neuron-demo .row { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 10px; margin-bottom: 8px; }
.lbl { font: 700 .85rem var(--mono); color: var(--ink-2); text-align: right; }
.lbl.xn { color: var(--tile); }
.bits { display: grid; grid-template-columns: repeat(32, 1fr); gap: 3px; }
.bit { aspect-ratio: 1; border-radius: 3px; background: var(--off); border: 0; padding: 0; cursor: pointer; transition: background .2s, transform .2s; }
.bit.on { background: var(--on); }
.bits.xnor .bit { cursor: default; }
.bits.xnor .bit.on { background: var(--tile); }
.bits.xnor .bit.flash { transform: scale(1.35); }
.nd-foot { display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center; margin-top: 18px; }
.meter-track { position: relative; height: 14px; background: var(--off); border-radius: 7px; overflow: visible; }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--tile); border-radius: 7px; transition: width .35s; }
.meter-theta { position: absolute; top: -6px; bottom: -6px; width: 3px; background: var(--ink); border-radius: 2px; transition: left .2s; }
.meter-labels { display: flex; justify-content: space-between; font: .75rem var(--mono); color: var(--ink-3); margin-top: 6px; }
.nd-readout { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.nd-readout > div { display: flex; align-items: center; gap: 8px; }
.nd-readout .k { font: 600 .8rem var(--mono); color: var(--ink-3); text-transform: uppercase; }
.nd-readout .v { font-size: 1.3rem; font-weight: 700; min-width: 2ch; }
input[type="range"] { accent-color: var(--tile); width: 130px; }
.led { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--off); border: 2px solid var(--navy); transition: background .2s, box-shadow .2s; }
.led.big { width: 26px; height: 26px; }
.led.on { background: var(--tile); box-shadow: 0 0 14px var(--tile); border-color: var(--tile); }

/* ---------- scrolly ---------- */
.scrolly { position: relative; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 0 48px; max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.scrolly .stage { position: sticky; top: 60px; height: calc(100vh - 60px); display: flex; align-items: center; grid-column: 1; grid-row: 1; }
.stage-inner { width: 100%; }
.stage svg { width: 100%; height: auto; max-height: 76vh; overflow: visible; }
.scrolly .steps { grid-column: 2; grid-row: 1; padding: 30vh 0 40vh; }
.step { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .4s; }
.step.active { opacity: 1; }
.step h3 { font-size: 1.4rem; }
.step p { color: var(--ink-2); }
.step > * { background: var(--bg); }

/* decomposition svg */
.dc-bit { transition: transform .7s cubic-bezier(.6, 0, .2, 1), fill .3s, opacity .4s; }
.dc-bit.on { fill: var(--tile); }
.dc-bit.off { fill: var(--surface); stroke: var(--navy-5); stroke-width: 1; }
.dc-chunk { fill: var(--tile-soft); stroke: var(--tile); stroke-width: 1.5; opacity: 0; transition: opacity .5s; }

.dc-count { font: 700 19px var(--mono); fill: var(--tile); text-anchor: middle; opacity: 0; transition: opacity .5s; }
.dc-node { fill: var(--navy); opacity: 0; transition: opacity .5s; }
.dc-node-t { font: 700 16px var(--mono); fill: #fff; text-anchor: middle; opacity: 0; transition: opacity .5s; }
.dc-edge { stroke: var(--navy-4); stroke-width: 1.5; fill: none; opacity: 0; transition: opacity .5s; }
.dc-label { font: 600 16px var(--sans); fill: var(--ink-3); transition: opacity .5s; }
.dc-big { font: 800 22px var(--mono); fill: var(--ink); text-anchor: middle; }
.dc-cmp { fill: var(--navy); }
.dc-y { fill: var(--off); stroke: var(--navy); stroke-width: 2; transition: fill .3s; }
.dc-y.on { fill: var(--tile); }
.vis { opacity: 1 !important; }

/* ---------- 04 tile ---------- */
.tile-anim { display: grid; grid-template-columns: 90px 1fr 90px; gap: 14px; align-items: stretch; margin-top: 30px; }
.ta-col { border-radius: 10px; padding: 10px 0; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 700 .9rem var(--mono); }
.ta-col small { opacity: .75; font-weight: 500; }
.ta-y { background: var(--tile); }
.ta-mid { display: flex; flex-direction: column; gap: 6px; }
.ta-head { display: grid; grid-template-columns: repeat(4, 1fr); font: 600 .72rem var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.ta-head span { border-left: 1px dashed var(--line); padding-left: 8px; }
.ta-lanes { display: grid; grid-template-rows: repeat(16, 1fr); gap: 4px; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%); }
.ta-ybits { display: grid; grid-template-rows: repeat(16, 1fr); gap: 4px; margin-top: 8px; width: 14px; }
.ta-ybits i { height: 10px; border-radius: 3px; background: rgba(255, 255, 255, .25); transition: background .15s; }
.ta-ybits i.on { background: #fff; }
.lane { position: relative; height: 14px; border-radius: 7px; background: var(--off); overflow: hidden; }
.lane::after { content: ""; position: absolute; top: 0; bottom: 0; width: 22%; left: -22%; border-radius: 7px; background: linear-gradient(90deg, transparent, var(--tile)); }
.tile-anim.in .lane::after { animation: lane 2.4s cubic-bezier(.5, 0, .5, 1) infinite; animation-delay: var(--d); }
@keyframes lane { 0% { left: -22%; } 60%, 100% { left: 100%; } }
.clock { display: flex; align-items: center; gap: 12px; margin-top: 18px; font: .8rem var(--mono); color: var(--ink-3); flex-wrap: wrap; }
.clock-wave { width: 200px; height: 26px; }
.clock-wave path { fill: none; stroke: var(--navy-3); stroke-width: 2; }

/* ---------- 05 soc svg ---------- */
.blk rect { fill: var(--surface); stroke: var(--navy); stroke-width: 2; transition: fill .4s, stroke .4s, filter .4s; }
.blk.cpu rect { fill: var(--navy); }
.blk.cpu text { fill: #fff !important; }
.blk.tile rect { fill: var(--tile-soft); stroke: var(--tile); }
.blk.lit rect { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--tile) 60%, transparent)); stroke: var(--tile); stroke-width: 3; }
.bt { font: 700 23px var(--sans); fill: var(--ink); text-anchor: middle; }
.blk.tile .bt { fill: var(--tile); }
.bs { font: 500 16px var(--sans); fill: var(--ink-2); text-anchor: middle; }
.ba { font: 600 14px var(--mono); fill: var(--ink-3); text-anchor: middle; }
.wire { stroke: var(--navy-3); stroke-width: 3; fill: none; transition: stroke .3s, stroke-width .3s; }
.wire.lit { stroke: var(--tile); stroke-width: 4; }
.arrowhead { fill: var(--navy-3); }
.packet { fill: var(--tile); }
.packet-t { font: 700 14px var(--mono); fill: var(--tile); }
.cap-box { fill: var(--bg-alt); stroke: var(--line); }
.cap-h { font: 700 13px var(--mono); fill: var(--tile); letter-spacing: .06em; }
.cap-body { font: 14px/1.45 var(--mono); color: var(--ink-2); }

/* ---------- 06 lab ---------- */
.lab { display: grid; grid-template-columns: 300px 1fr 180px; gap: 24px; margin-top: 30px; align-items: start; }
.lab-in, .lab-pipe, .lab-out { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
#pad { width: 100%; aspect-ratio: 1; background: #0B1424; border-radius: 10px; touch-action: none; cursor: crosshair; display: block; }
.pad-tools { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hint { font-size: .85rem; color: var(--ink-3); margin: 8px 0 0; }
.lab-pipe { display: grid; grid-template-columns: auto 1fr; gap: 16px; }
.stagebox h4 { font: 600 .78rem/1.3 var(--mono); color: var(--ink-3); margin-bottom: 8px; }
.stagebox.wide { grid-column: 1 / -1; }
#c14 { width: 140px; height: 140px; image-rendering: pixelated; border-radius: 6px; background: #0B1424; }
.quads { display: grid; grid-template-columns: repeat(2, auto); gap: 8px; justify-content: start; }
.quad { display: grid; grid-template-columns: repeat(7, 9px); gap: 1px; padding: 3px; border-radius: 4px; background: var(--bg-alt); }
.quad i { width: 9px; height: 9px; border-radius: 2px; background: var(--off); transition: background .25s; }
.quad i.on { background: var(--on); }
.quad.active { outline: 2px solid var(--tile); }
.hidden-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.evalblk { background: var(--bg-alt); border-radius: 8px; padding: 8px; }
.evalblk b { display: block; font: 600 .72rem var(--mono); color: var(--ink-3); margin-bottom: 6px; }
.evalblk .hb { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.hb i { aspect-ratio: 1; border-radius: 50%; background: var(--off); transition: background .2s, box-shadow .2s; }
.hb i.on { background: var(--tile); box-shadow: 0 0 6px color-mix(in srgb, var(--tile) 60%, transparent); }
.logits { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; align-items: end; height: 120px; }
.lg { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.lg .bar { width: 100%; background: var(--navy-4); border-radius: 4px 4px 0 0; height: 0; transition: height .5s cubic-bezier(.2, .7, .2, 1), background .3s; }
.lg.win .bar { background: var(--tile); }
.lg span { font: 600 .8rem var(--mono); color: var(--ink-2); }
.lg small { font: .66rem var(--mono); color: var(--ink-3); }
.lab-out { text-align: center; }
.pred { font: 900 6rem/1 var(--mono); color: var(--tile); }
.pred-sub { font: .8rem var(--mono); color: var(--ink-3); margin-bottom: 18px; }
.costs { display: grid; gap: 8px; font-size: .85rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; }
.costs .mono { color: var(--ink); font-weight: 700; }
.fine { font-size: .85rem; color: var(--ink-3); max-width: 80ch; margin-top: 18px; }

/* ---------- 07 silicon ---------- */
.wrap.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: center; color: var(--ink-2); }
.checks .ok { font: 700 .9rem var(--mono); color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); border-radius: 6px; padding: 2px 8px; min-width: 4.5em; text-align: center; }
.floorplan { margin: 0; }
.floorplan img { width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow); display: block; background: #fff; }
.floorplan figcaption { font-size: .82rem; color: var(--ink-3); margin-top: 10px; }

/* ---------- 08 power ---------- */
.pw { max-width: 640px; }
.pw-total { font-size: 1.1rem; color: var(--ink-2); margin-bottom: 14px; }
.pw-total .mono { font-size: 3.2rem; font-weight: 800; color: var(--ink); }
.pw-total small { display: block; font: .8rem var(--mono); color: var(--ink-3); }
.pw-bar { display: flex; height: 54px; border-radius: 10px; overflow: hidden; background: var(--off); }
.pw-seg { height: 100%; transition: flex-basis 1.1s cubic-bezier(.6, 0, .2, 1); flex: 0 0 0; position: relative; }
.pw-seg.tile { box-shadow: inset 0 0 0 2px color-mix(in srgb, #fff 40%, transparent); }
.pw-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 26px; font: .75rem var(--mono); color: var(--ink-2); }
.pw-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.pw-share { display: flex; gap: 20px; align-items: center; }
.pw-share p { color: var(--ink-2); margin: 0; }
.tilec { color: var(--tile); }
.ring { position: relative; width: 130px; height: 130px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--off); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--tile); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .2, 1); }
.ring-v { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1rem; color: var(--ink-2); white-space: nowrap; }
.ring-v .mono { font-size: 1.9rem; font-weight: 800; color: var(--tile); }

/* ---------- 09 numbers ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); }
.stat .n { font: 800 clamp(2.2rem, 5vw, 3.2rem)/1 var(--mono); color: var(--navy); margin-bottom: 12px; }
.stat:first-child .n { color: var(--tile); }
.stat .l { color: var(--ink-2); font-size: .95rem; }
.stat small { color: var(--ink-3); }

/* ---------- paper ---------- */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 26px 0; }
.link-card { display: block; padding: 18px 20px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); text-decoration: none; transition: background .2s, transform .2s; }
.link-card:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.link-card b { display: block; color: #fff; margin-bottom: 4px; }
.link-card span { color: #AFC0D8; font-size: .9rem; }
.bib { background: rgba(0, 0, 0, .35); border-radius: 10px; padding: 16px; overflow-x: auto; font-size: .82rem; color: #D5E0EF; }
.bib code { background: none; padding: 0; }
.band.dark .btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.foot { text-align: center; padding: 28px 20px; font-size: .8rem; color: var(--ink-3); background: var(--dark-band); border-top: 1px solid rgba(255, 255, 255, .08); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .lab { grid-template-columns: 1fr; }
  .lab-in { max-width: 340px; }
  .wrap.two { grid-template-columns: 1fr; }
  .nd-foot { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .navlinks { display: none; }
  .scrolly { grid-template-columns: 1fr; }
  .scrolly .stage { top: 44px; height: 52vh; grid-row: 1; z-index: 3; background: var(--bg); align-items: flex-start; padding-top: 12px; box-shadow: 0 12px 16px -12px rgba(0, 0, 0, .15); }
  .scrolly .stage svg { max-height: 44vh; }
  .scrolly .steps { grid-column: 1; grid-row: 2; padding: 4vh 0 40vh; position: relative; z-index: 1; }
  .step { min-height: 62vh; opacity: .35; justify-content: flex-start; }
  .step > * { background: color-mix(in srgb, var(--surface) 94%, transparent); padding: 14px 16px; margin: 0; border: 1px solid var(--line); }
  .step > h3 { border-radius: 12px 12px 0 0; border-bottom: 0; }
  .step > p { border-radius: 0 0 12px 12px; border-top: 0; }
  .bits { grid-template-columns: repeat(16, 1fr); }
  .lab-pipe { grid-template-columns: 1fr; }
  .hidden-grid { grid-template-columns: repeat(2, 1fr); }
  .logits { height: 100px; }
  .tile-anim { grid-template-columns: 60px 1fr 60px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .reveal-clip img { clip-path: none; }
  #hero-bits { display: none; }
}
