/* ═══════════════════════════════════════════════════════════════════════════
   CATHODE — The CRT Museum
   css/style.css · Design engineer build
   Dark broadcast museum · phosphor glow · wood cabinets · 375px → 1440px+
   ═══════════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────── 0 · TOKENS ─────────────────────────────── */

:root {
  --ink:        #0a0c10;   /* page background, near-black blue */
  --ink-2:      #11151c;   /* raised surfaces */
  --ink-3:      #1a2028;   /* cards */
  --phos:       #33ff66;   /* phosphor green — OSD, primary accent */
  --phos-dim:   #1d8f44;
  --amber:      #ffb347;   /* warm accent — knobs, secondary headings */
  --cream:      #f2ead9;   /* body text */
  --cream-dim:  #b8b0a0;
  --rgb-r: #ff4a4a;  --rgb-g: #4aff6a;  --rgb-b: #4a6aff;
  --wood-1: #5e3a1e; --wood-2: #7a4f2c; /* cabinet wood grain */
  --bezel: #2b2b30;                     /* TV bezel plastic */
  --font-display: 'Bungee', cursive;
  --font-body: 'Familjen Grotesk', sans-serif;
  --font-osd: 'VT323', monospace;

  /* derived (internal) */
  --phos-glow-1: rgba(51, 255, 102, .55);
  --phos-glow-2: rgba(51, 255, 102, .22);
  --phos-glow-3: rgba(51, 255, 102, .10);
  --amber-glow-1: rgba(255, 179, 71, .5);
  --amber-glow-2: rgba(255, 179, 71, .18);
  --line: rgba(242, 234, 217, .09);
  --line-strong: rgba(242, 234, 217, .16);
  --noise-uri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --nav-w: 92px;           /* room reserved for the desktop channel rail */
  --pad-x: clamp(1.25rem, 5vw, 5rem);
}

/* ───────────────────────────── 1 · RESET + BASE ───────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  background-color: var(--ink);
  /* layered ambient: two vignette pools + faint vertical scan texture */
  background-image:
    radial-gradient(1100px 700px at 18% -6%, rgba(29, 143, 68, .10), transparent 60%),
    radial-gradient(900px 640px at 100% 32%, rgba(255, 179, 71, .05), transparent 60%),
    radial-gradient(1200px 900px at 50% 110%, rgba(20, 60, 38, .12), transparent 65%);
  background-attachment: fixed;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img, canvas, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--phos);
  outline-offset: 3px;
  border-radius: 4px;
}
input, label { font: inherit; }
strong { color: var(--cream); font-weight: 700; }
em { color: var(--amber); font-style: italic; }
p { max-width: 62ch; }

::selection { background: var(--phos); color: var(--ink); text-shadow: none; }
::-moz-selection { background: var(--phos); color: var(--ink); text-shadow: none; }

/* custom scrollbar — thin phosphor rail */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--phos-dim), #14562c);
  border-radius: 8px;
  border: 2px solid var(--ink);
}
::-webkit-scrollbar-thumb:hover { background: var(--phos-dim); }
@supports (scrollbar-color: red blue) {
  html { scrollbar-color: var(--phos-dim) var(--ink); scrollbar-width: thin; }
}

.hidden { display: none !important; }

/* ───────────────────────────── 2 · TYPE ───────────────────────────────── */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.04;
  letter-spacing: .01em;
  color: var(--cream);
}

h1 { font-size: clamp(2.5rem, 1.4rem + 6.5vw, 6rem); }
h2 { font-size: clamp(1.9rem, 1.1rem + 4.2vw, 4rem); }
h3 { font-size: clamp(1.15rem, 1rem + .9vw, 1.6rem); line-height: 1.2; }

.osd-text {
  font-family: var(--font-osd);
  color: var(--phos);
  letter-spacing: .045em;
  text-shadow:
    0 0 6px var(--phos-glow-1),
    0 0 18px var(--phos-glow-2);
}

.osd-svg {
  font-family: var(--font-osd);
  fill: var(--phos);
  letter-spacing: .5px;
}

.svg-note {
  font-size: 13px;
  text-anchor: middle;
  fill: var(--phos);
  opacity: .85;
}

/* headline glow accents */
.glow-word {
  color: var(--phos);
  text-shadow:
    0 0 8px var(--phos-glow-1),
    0 0 28px var(--phos-glow-2),
    0 0 64px var(--phos-glow-3);
}
.glow-word.amber {
  color: var(--amber);
  text-shadow:
    0 0 8px var(--amber-glow-1),
    0 0 28px var(--amber-glow-2),
    0 0 64px rgba(255, 179, 71, .1);
}

/* R·G·B tinted letters, slow cycling */
.rgbword span { animation: rgbcycle 4.5s linear infinite; }
.rgbword span:nth-child(3n+1) { color: var(--rgb-r); text-shadow: 0 0 10px rgba(255,74,74,.6), 0 0 30px rgba(255,74,74,.25); animation-delay: 0s; }
.rgbword span:nth-child(3n+2) { color: var(--rgb-g); text-shadow: 0 0 10px rgba(74,255,106,.6), 0 0 30px rgba(74,255,106,.25); animation-delay: -1.5s; }
.rgbword span:nth-child(3n)   { color: var(--rgb-b); text-shadow: 0 0 10px rgba(74,106,255,.7), 0 0 30px rgba(74,106,255,.3); animation-delay: -3s; }
@keyframes rgbcycle {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.45); }
}

.kicker {
  font-size: clamp(.95rem, .85rem + .4vw, 1.2rem);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ───────────────────────────── 3 · POWER OVERLAY ──────────────────────── */

#power-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background:
    radial-gradient(900px 620px at 50% 42%, rgba(29, 143, 68, .08), transparent 65%),
    #000;
  display: grid;
  place-items: center;
  transition: opacity .7s ease;
}
#power-overlay.off { opacity: 0; pointer-events: none; }

.power-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vh, 3.25rem);
  text-align: center;
  padding: 2rem;
}

.power-logo {
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  letter-spacing: .18em;
  text-indent: .18em; /* optically recenter */
}

#power-btn {
  width: clamp(108px, 22vw, 148px);
  height: clamp(108px, 22vw, 148px);
  color: var(--phos);
  border-radius: 50%;
  position: relative;
  transition: transform .25s ease, color .25s ease;
  animation: power-pulse 2.4s ease-in-out infinite;
}
#power-btn svg { width: 100%; height: 100%; }
#power-btn::before {
  /* soft halo behind the button */
  content: "";
  position: absolute;
  inset: -34%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--phos-glow-2), transparent 65%);
  z-index: -1;
  pointer-events: none;
}
#power-btn:hover { transform: scale(1.06); color: #7dffa4; }
#power-btn:active { transform: scale(.94); }
@keyframes power-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px var(--phos-glow-1)) drop-shadow(0 0 22px var(--phos-glow-2)); }
  50%      { filter: drop-shadow(0 0 14px var(--phos-glow-1)) drop-shadow(0 0 46px var(--phos-glow-2)); }
}

.power-hint {
  font-size: clamp(1rem, 3.4vw, 1.35rem);
  opacity: .8;
  animation: hint-breathe 2.4s ease-in-out infinite;
}
@keyframes hint-breathe { 0%, 100% { opacity: .45; } 50% { opacity: .95; } }

/* the white line/bloom main.js animates during turn-on */
#turn-on-flash {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: #fff;
  box-shadow:
    0 0 12px #fff,
    0 0 60px rgba(255, 255, 255, .9),
    0 0 140px rgba(180, 255, 210, .8);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  pointer-events: none;
  will-change: transform, opacity;
}

/* ───────────────────────────── 4 · GLOBAL CRT FX ──────────────────────── */

.crt-fx { pointer-events: none; }
.crt-fx > div {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50; /* above content, below nav (60) */
}

.fx-scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, .9) 0px,
    rgba(0, 0, 0, .9) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: .06;
  mix-blend-mode: multiply;
}

.fx-vignette {
  background:
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 58%, rgba(0, 0, 0, .42) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.22), transparent 8%, transparent 92%, rgba(0,0,0,.28));
}

.fx-grain {
  inset: -100%;
  width: 300%;
  height: 300%;
  background-image: var(--noise-uri);
  background-size: 160px 160px;
  opacity: .05;
  animation: grain-jitter .9s steps(1) infinite;
}
@keyframes grain-jitter {
  0%   { transform: translate(0, 0); }
  12%  { transform: translate(-2%, -3%); }
  25%  { transform: translate(1.5%, -1%); }
  37%  { transform: translate(-1%, 2.5%); }
  50%  { transform: translate(2.5%, 1%); }
  62%  { transform: translate(-2.5%, .5%); }
  75%  { transform: translate(1%, -2.5%); }
  87%  { transform: translate(-.5%, 1.5%); }
  100% { transform: translate(0, 0); }
}

/* ───────────────────────────── 5 · OSD INDICATORS ─────────────────────── */

#osd {
  position: fixed;
  top: clamp(1rem, 3vw, 2rem);
  left: clamp(1rem, 3vw, 2.25rem);
  z-index: 70;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  white-space: pre-line;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
#osd.show, #osd.on { opacity: 1; transform: none; }

#osd-vol {
  position: fixed;
  left: clamp(1rem, 3vw, 2.25rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 70;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
#osd-vol.show, #osd-vol.on { opacity: 1; }

/* ───────────────────────────── 6 · CHANNEL NAV ────────────────────────── */

#channel-nav {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
  padding: 1rem .9rem 1rem 2.5rem;
  background: linear-gradient(to left, rgba(10, 12, 16, .92) 40%, transparent);
}

.nav-brand {
  font-size: .8rem;
  letter-spacing: .3em;
  writing-mode: vertical-rl;
  opacity: .5;
  margin-bottom: .9rem;
  user-select: none;
}

.ch-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
  padding: .3rem .2rem;
  color: var(--cream-dim);
  transition: color .25s ease;
}

.ch-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .25s ease, transform .25s ease;
}

.ch-num {
  font-size: 1.35rem;
  line-height: 1;
  min-width: 2.4rem;
  text-align: center;
  padding: .28rem .3rem .2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--cream-dim);
  text-shadow: none;
  background: rgba(17, 21, 28, .6);
  transition: color .25s ease, border-color .25s ease, text-shadow .25s ease, background .25s ease, box-shadow .25s ease;
}

.ch-btn:hover .ch-label,
.ch-btn.active .ch-label,
.ch-btn[aria-current] .ch-label { opacity: 1; transform: none; }
.ch-btn:hover .ch-label { color: var(--cream); }
.ch-btn.active .ch-label,
.ch-btn[aria-current] .ch-label { color: var(--phos); }

.ch-btn:hover .ch-num { color: var(--cream); border-color: var(--line-strong); }
.ch-btn.active .ch-num,
.ch-btn[aria-current] .ch-num {
  color: var(--ink);
  background: var(--phos);
  border-color: var(--phos);
  text-shadow: none;
  box-shadow:
    0 0 10px var(--phos-glow-1),
    0 0 30px var(--phos-glow-2);
}

#mute-btn {
  margin-top: .9rem;
  padding: .35rem .6rem .25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(17, 21, 28, .6);
  transition: border-color .25s ease, box-shadow .25s ease;
}
#mute-btn .osd-text { font-size: .95rem; }
#mute-btn:hover { border-color: var(--phos-dim); box-shadow: 0 0 12px var(--phos-glow-3); }
#mute-btn.muted .osd-text,
#mute-btn[aria-pressed="true"] .osd-text {
  color: var(--cream-dim);
  text-shadow: none;
}

/* ───────────────────────────── 7 · SECTIONS / SHARED ──────────────────── */

main { position: relative; z-index: 1; }

.channel {
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(4.5rem, 9vh, 7.5rem) var(--pad-x);
  padding-right: calc(var(--pad-x) + var(--nav-w));
  position: relative;
  scroll-margin-top: 1rem;
  overflow: clip;
}

/* per-channel ambient hue shifts — stay in family */
#ch1 { background: radial-gradient(1000px 700px at 68% 40%, rgba(29, 143, 68, .09), transparent 62%); }
#ch2 { background: radial-gradient(900px 700px at 12% 8%, rgba(29, 143, 68, .07), transparent 60%); }
#ch3 { background: radial-gradient(1000px 720px at 82% 16%, rgba(255, 179, 71, .06), transparent 62%); }
#ch4 { background: radial-gradient(950px 700px at 16% 30%, rgba(29, 143, 68, .08), transparent 60%); }
#ch5 { background:
  radial-gradient(760px 560px at 78% 18%, rgba(74, 106, 255, .05), transparent 62%),
  radial-gradient(760px 560px at 18% 74%, rgba(255, 74, 74, .04), transparent 62%); }
#ch6 { background: radial-gradient(1050px 780px at 60% 46%, rgba(255, 179, 71, .07), transparent 62%); }
#ch7 { background: radial-gradient(950px 720px at 50% 12%, rgba(29, 143, 68, .08), transparent 62%); }

.section-head {
  max-width: 880px;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}
.section-head h2 { margin-bottom: 1.1rem; }
.section-intro {
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
  color: var(--cream-dim);
  max-width: 56ch;
}
.section-intro strong { color: var(--phos); font-weight: 600; }

.lab-note {
  font-size: .92rem;
  line-height: 1.55;
  color: var(--cream-dim);
  border-left: 2px solid var(--phos-dim);
  padding-left: .9rem;
  max-width: 52ch;
}

/* ───────────────────────────── 8 · REVEAL TRANSITIONS ─────────────────── */

.reveal {
  transition:
    opacity .8s ease,
    transform .8s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
/* JS failsafe: content is only hidden once main.js has booted (body.on) —
   if scripts never run, everything stays visible */
body.powering .reveal:not(.in),
body.on .reveal:not(.in) {
  opacity: 0;
  transform: translateY(26px);
}
.reveal.in { opacity: 1; transform: none; }

/* ───────────────────────────── 9 · BUTTONS ────────────────────────────── */

.btn-crt {
  --btn-c: var(--phos);
  --btn-glow: var(--phos-glow-1);
  display: inline-block;
  font-family: var(--font-osd);
  font-size: 1.25rem;
  letter-spacing: .06em;
  color: var(--btn-c);
  text-shadow: 0 0 8px var(--btn-glow);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 45%),
    var(--ink-3);
  border: 2px solid var(--btn-c);
  border-radius: 8px;
  padding: .7rem 1.4rem .55rem;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, .55),
    inset 0 0 0 1px rgba(0, 0, 0, .4),
    0 0 0 rgba(51, 255, 102, 0);
  transition: box-shadow .2s ease, transform .12s ease, background-color .2s ease, color .2s ease;
  user-select: none;
}
.btn-crt:hover {
  box-shadow:
    0 4px 0 rgba(0, 0, 0, .55),
    inset 0 0 12px rgba(51, 255, 102, .12),
    0 0 18px var(--btn-glow),
    0 0 44px var(--phos-glow-2);
}
.btn-crt:active {
  transform: translateY(4px);
  box-shadow:
    0 0 0 rgba(0, 0, 0, .55),
    inset 0 2px 8px rgba(0, 0, 0, .6);
}
.btn-crt.ghost {
  border-color: var(--line-strong);
  color: var(--cream-dim);
  text-shadow: none;
  background: transparent;
}
.btn-crt.ghost:hover {
  border-color: var(--phos-dim);
  color: var(--phos);
  text-shadow: 0 0 8px var(--phos-glow-1);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, .55),
    0 0 16px var(--phos-glow-3);
}
.btn-crt.small { font-size: 1.05rem; padding: .5rem 1rem .38rem; border-width: 2px; box-shadow: 0 3px 0 rgba(0,0,0,.55), inset 0 0 0 1px rgba(0,0,0,.4); }
.btn-crt.small:active { transform: translateY(3px); }
.btn-crt.danger {
  --btn-c: var(--rgb-r);
  --btn-glow: rgba(255, 74, 74, .55);
}
.btn-crt.danger:hover {
  box-shadow:
    0 3px 0 rgba(0, 0, 0, .55),
    inset 0 0 12px rgba(255, 74, 74, .14),
    0 0 18px rgba(255, 74, 74, .5),
    0 0 44px rgba(255, 74, 74, .2);
}

/* pill buttons — anatomy chips + glossary words */
.chip, .gloss {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--cream-dim);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: .42rem .95rem .38rem;
  background: rgba(17, 21, 28, .7);
  transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .12s ease;
}
.gloss { font-family: var(--font-osd); font-size: 1.05rem; letter-spacing: .07em; }
.chip:hover, .gloss:hover {
  color: var(--phos);
  border-color: var(--phos-dim);
  box-shadow: 0 0 12px var(--phos-glow-3);
  transform: translateY(-1px);
}
.chip.active, .gloss.active {
  color: var(--ink);
  background: var(--phos);
  border-color: var(--phos);
  box-shadow:
    0 0 12px var(--phos-glow-1),
    0 0 34px var(--phos-glow-2);
  text-shadow: none;
}

/* ───────────────────────────── 10 · CH1 HERO ──────────────────────────── */

#ch1 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 0;
}

.hero-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: clamp(2rem, 5vh, 4rem);
}

.hero-copy .kicker { margin-bottom: 1.4rem; }

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}
.hero-title span { display: block; }
/* asymmetric composition: THE small, CATHODE huge, MUSEUM medium+indented */
.hero-title span:nth-child(1) { font-size: .38em; opacity: .82; letter-spacing: .25em; }
.hero-title span:nth-child(3) { font-size: .62em; margin-left: .35em; color: var(--cream-dim); }

.hero-sub {
  font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem);
  color: var(--cream-dim);
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* — the hero television — */

.hero-tv {
  justify-self: center;
  width: min(100%, 520px);
  position: relative;
}
/* museum spotlight pooling under the set */
.hero-tv::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -34px;
  height: 44px;
  background: radial-gradient(ellipse at 50% 50%, rgba(51, 255, 102, .13), transparent 70%);
  filter: blur(6px);
  z-index: -1;
}

.tv-shell {
  position: relative;
  border-radius: 18px;
  padding: clamp(.9rem, 2.5vw, 1.4rem);
  background:
    /* sheen */
    linear-gradient(115deg, rgba(255, 255, 255, .10), transparent 30%, transparent 72%, rgba(0, 0, 0, .28)),
    /* wood grain streaks */
    repeating-linear-gradient(
      93deg,
      var(--wood-2) 0px,
      var(--wood-1) 7px,
      var(--wood-2) 13px,
      #6a4426 21px,
      var(--wood-1) 30px
    );
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .12),
    inset 0 -3px 8px rgba(0, 0, 0, .5),
    0 24px 48px -18px rgba(0, 0, 0, .8),
    0 8px 18px rgba(0, 0, 0, .5);
}
/* carved edge highlight */
.tv-shell::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 13px;
  border: 1px solid rgba(0, 0, 0, .35);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 170, .07);
  pointer-events: none;
}

.tv-screen-frame {
  position: relative;
  background: var(--bezel);
  border-radius: 14px;
  padding: clamp(.7rem, 2vw, 1.1rem);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .09),
    inset 0 -2px 4px rgba(0, 0, 0, .55),
    0 2px 6px rgba(0, 0, 0, .4);
}
.tv-screen-frame canvas {
  width: 100%;
  height: auto;
  background: #050805;
  border-radius: 10px / 12px;
  /* bulged-glass illusion: bright top-edge catch + deep corner shadows */
  box-shadow:
    inset 0 0 4px rgba(0, 0, 0, .9),
    inset 0 0 34px 10px rgba(0, 0, 0, .55),
    inset 0 2px 10px rgba(190, 255, 210, .05);
}
/* curved-glass glare sweep */
.tv-screen-frame::after {
  content: "";
  position: absolute;
  inset: clamp(.7rem, 2vw, 1.1rem);
  border-radius: 10px / 12px;
  background:
    radial-gradient(120% 90% at 24% 8%, rgba(255, 255, 255, .09), transparent 40%),
    radial-gradient(150% 120% at 50% 130%, rgba(0, 0, 0, .32), transparent 55%);
  pointer-events: none;
}

.tv-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(.7rem, 2vw, 1rem);
  padding: 0 .25rem;
}

.tv-knob {
  --rot: 0deg;
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  cursor: pointer;
  background:
    radial-gradient(circle at 34% 30%, #4a4a52, #232328 62%, #101013 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .18),
    inset 0 -2px 4px rgba(0, 0, 0, .7),
    0 3px 6px rgba(0, 0, 0, .55);
  transition: transform .15s ease;
}
.tv-knob::before {
  /* ridged rim */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(255, 255, 255, .1) 0deg 4deg,
    transparent 4deg 10deg
  );
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%);
          mask: radial-gradient(circle, transparent 62%, #000 64%);
  pointer-events: none;
}
.tv-knob:hover { transform: scale(1.06); }
.tv-knob:active { transform: scale(.95); }

.knob-line {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: rotate(var(--rot, 0deg));
  transition: transform .12s ease-out;
  pointer-events: none;
}
.knob-line::before {
  content: "";
  position: absolute;
  top: 9%;
  left: 50%;
  width: 3px;
  height: 30%;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber-glow-1);
}

.tv-speaker {
  flex: 1;
  height: 34px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, .55) 0 3px,
      rgba(120, 84, 48, .5) 3px 7px
    ),
    var(--wood-1);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, .6),
    inset 0 -1px 0 rgba(255, 220, 170, .08);
}

.tv-badge {
  flex: none;
  font-size: .82rem;
  letter-spacing: .12em;
  color: var(--amber);
  text-shadow: 0 0 6px var(--amber-glow-2);
  border: 1px solid rgba(255, 179, 71, .35);
  border-radius: 4px;
  padding: .22rem .5rem .14rem;
  background: rgba(0, 0, 0, .3);
}

.tv-legs {
  display: flex;
  justify-content: space-between;
  padding: 0 14%;
  height: 46px;
}
.tv-legs span {
  width: 12px;
  height: 100%;
  background: linear-gradient(180deg, #4a2d16, #2c1a0b);
  box-shadow: inset 1px 0 0 rgba(255, 220, 170, .12), 0 6px 8px -4px rgba(0, 0, 0, .8);
}
.tv-legs span:first-child { transform: rotate(9deg); border-radius: 0 0 4px 4px; }
.tv-legs span:last-child  { transform: rotate(-9deg); border-radius: 0 0 4px 4px; }

/* — fact ticker — */

.ticker {
  margin: 0 calc(-1 * var(--pad-x)) 0 calc(-1 * var(--pad-x));
  margin-right: calc(-1 * (var(--pad-x) + var(--nav-w)));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 16, .85);
  overflow: hidden;
  padding: .55rem 0 .4rem;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  animation: ticker-roll 42s linear infinite;
}
.ticker-track span { white-space: nowrap; padding-right: 2rem; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-roll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ───────────────────────────── 11 · CH2 TIMELINE ──────────────────────── */

.timeline {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 0 1rem;
}
/* glowing phosphor spine */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--phos-dim) 6%,
    var(--phos) 50%,
    var(--phos-dim) 94%,
    transparent
  );
  box-shadow:
    0 0 8px var(--phos-glow-1),
    0 0 26px var(--phos-glow-2);
}

.era {
  position: relative;
  margin-bottom: clamp(3.5rem, 8vh, 5.5rem);
}
.era:last-child { margin-bottom: 0; }

/* spine node */
.era::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4.35rem;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--phos);
  box-shadow:
    0 0 0 4px var(--ink),
    0 0 10px var(--phos-glow-1),
    0 0 28px var(--phos-glow-2);
  z-index: 2;
}

.era-year {
  position: relative;
  z-index: 3;
  width: fit-content;
  margin: 0 auto 1.1rem;
  font-size: clamp(2.8rem, 2rem + 4vw, 4.6rem);
  line-height: .9;
  padding: 0 1rem;
  background: var(--ink);
  border-radius: 8px;
  text-shadow:
    0 0 10px var(--phos-glow-1),
    0 0 34px var(--phos-glow-2),
    0 0 80px var(--phos-glow-3);
}

.era-card {
  width: calc(50% - 3.25rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 30%),
    var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.era:nth-child(even) .era-card { margin-left: auto; }
.era-card:hover {
  border-color: rgba(51, 255, 102, .28);
  box-shadow:
    0 18px 40px -18px rgba(0, 0, 0, .8),
    0 0 30px var(--phos-glow-3);
  transform: translateY(-3px);
}

/* connector stub from card to spine */
.era::after {
  content: "";
  position: absolute;
  top: 4.75rem;
  width: 3.25rem;
  height: 1px;
  background: linear-gradient(90deg, var(--phos-dim), transparent);
  pointer-events: none;
}
.era:nth-child(odd)::after  { left: calc(50% - 3.25rem); background: linear-gradient(90deg, transparent, var(--phos-dim)); }
.era:nth-child(even)::after { right: calc(50% - 3.25rem); }

/* exhibit art: pedestal + spotlight */
.era-art {
  position: relative;
  padding: clamp(1rem, 3vw, 1.75rem) clamp(1rem, 3vw, 1.75rem) .9rem;
  background:
    radial-gradient(75% 90% at 50% 12%, rgba(51, 255, 102, .07), transparent 62%),
    linear-gradient(180deg, var(--ink-2), var(--ink-3));
  border-bottom: 1px solid var(--line);
}
.era-art::after {
  /* pedestal shadow line under the exhibit */
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: .55rem;
  height: 10px;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .55), transparent 72%);
  pointer-events: none;
}
.era-art svg { width: 100%; height: auto; }

.era-body { padding: clamp(1.1rem, 3vw, 1.6rem); }
.era-body h3 { color: var(--amber); text-shadow: 0 0 14px var(--amber-glow-2); margin-bottom: .6rem; }
.era-body p { color: var(--cream-dim); font-size: .98rem; }
.era-body p strong { color: var(--cream); }

.era-fact {
  margin-top: 1rem;
  padding: .55rem .8rem .45rem;
  font-size: 1rem;
  line-height: 1.35;
  border: 1px dashed rgba(51, 255, 102, .35);
  border-radius: 8px;
  background: rgba(51, 255, 102, .05);
}

/* archival photo prints */
.era-photo {
  margin: 1.1rem auto .4rem;
  width: fit-content;
  max-width: 92%;
  background: #ece5d4;
  padding: .55rem .55rem .4rem;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, .5),
    0 14px 28px -10px rgba(0, 0, 0, .75);
  transform: rotate(-1.5deg);
  transition: transform .3s ease;
}
.era:nth-child(even) .era-photo { transform: rotate(1.5deg); }
.era-photo:hover { transform: rotate(0deg) scale(1.02); }
.era-photo img {
  width: 100%;
  height: auto;
  filter: sepia(.14) contrast(1.04) saturate(.9);
}
.era-photo figcaption {
  font-family: var(--font-osd);
  font-size: .95rem;
  letter-spacing: .04em;
  color: #3d3527;
  text-align: center;
  padding-top: .35rem;
  line-height: 1.25;
}

/* ───────────────────────────── 12 · CH3 ANATOMY ───────────────────────── */

.anatomy-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
}

.anatomy-stage {
  background:
    radial-gradient(70% 80% at 50% 40%, rgba(51, 255, 102, .05), transparent 70%),
    var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(.75rem, 2vw, 1.5rem);
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, .75);
}
#anatomy-svg { width: 100%; height: auto; }

/* interactive parts */
#anatomy-svg .part {
  cursor: pointer;
  transition: opacity .3s ease, filter .3s ease;
}
#anatomy-svg .part:hover {
  filter: drop-shadow(0 0 6px var(--phos-glow-1)) brightness(1.15);
}
#anatomy-svg .part.active {
  filter: drop-shadow(0 0 8px var(--phos-glow-1)) drop-shadow(0 0 22px var(--phos-glow-2)) brightness(1.3);
}
/* dim siblings when one part is selected */
#anatomy-svg:has(.part.active) .part:not(.active) { opacity: .22; }
#anatomy-svg .part.dim { opacity: .22; } /* JS fallback if :has unsupported */

/* labels */
#anatomy-svg .lbl {
  font-size: 17px;
  cursor: pointer;
  fill: var(--cream-dim);
  letter-spacing: 1.5px;
  transition: fill .25s ease, opacity .25s ease;
}
#anatomy-svg .lbl:hover { fill: var(--phos); }
#anatomy-svg .lbl.active {
  fill: var(--phos);
  filter: drop-shadow(0 0 6px var(--phos-glow-1));
}
#anatomy-svg:has(.part.active) .lbl:not(.active) { opacity: .4; }
#anatomy-svg .lbl[data-part="screen"] { text-anchor: end; }

#beam-line {
  filter: drop-shadow(0 0 4px var(--phos-glow-1));
  pointer-events: none;
}
#beam-spot {
  filter: drop-shadow(0 0 6px #b9ffd9) drop-shadow(0 0 14px var(--phos-glow-1));
  pointer-events: none;
}

/* info panel */
#anatomy-info {
  position: sticky;
  top: 2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 40%),
    var(--ink-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--phos-dim);
  border-radius: 12px;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .7);
}
.info-head {
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  margin-bottom: .7rem;
  min-height: 1.3em;
}
#info-body {
  color: var(--cream-dim);
  font-size: .98rem;
  min-height: 7.5em;
}
.info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

/* how-it-works strip */
.how-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.75rem, 2vw, 1.5rem);
  max-width: 1280px;
  margin: clamp(2.5rem, 6vh, 4rem) auto 0;
}
.how-step {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.1rem 1rem;
  transition: border-color .3s ease, transform .3s ease;
}
.how-step:hover { border-color: rgba(255, 179, 71, .3); transform: translateY(-3px); }
.how-num {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: .6rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 8px var(--amber-glow-1);
  border: 1px solid rgba(255, 179, 71, .4);
  border-radius: 50%;
}
.how-step p { font-size: .92rem; color: var(--cream-dim); }

/* ───────────────────────────── 13 · CH4 RASTER LAB ────────────────────── */

.lab {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
}

.lab-screen {
  background: var(--bezel);
  border-radius: 16px;
  padding: clamp(.8rem, 2vw, 1.25rem);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .08),
    inset 0 -2px 5px rgba(0, 0, 0, .55),
    0 20px 46px -20px rgba(0, 0, 0, .8);
}
.lab-screen canvas {
  width: 100%;
  height: auto;
  background: #030503;
  border-radius: 10px;
  box-shadow:
    inset 0 0 4px rgba(0, 0, 0, .9),
    inset 0 0 40px 12px rgba(0, 0, 0, .5);
}

.lab-controls {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.2rem, 3vw, 1.7rem);
}

.ctl { display: block; }
.ctl-label {
  display: block;
  font-size: 1.05rem;
  margin-bottom: .55rem;
}
.ctl-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* — range sliders, phosphor style — */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--phos-dim), rgba(29, 143, 68, .25));
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7), 0 0 8px var(--phos-glow-3);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #66ff8f, var(--phos) 55%, #17b04a);
  border: 2px solid #0d3a1e;
  box-shadow: 0 0 8px var(--phos-glow-1), 0 0 22px var(--phos-glow-2);
  transition: transform .15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--phos-dim), rgba(29, 143, 68, .25));
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #66ff8f, var(--phos) 55%, #17b04a);
  border: 2px solid #0d3a1e;
  box-shadow: 0 0 8px var(--phos-glow-1);
}

/* ───────────────────────────── 14 · CH5 PHOSPHOR LAB ──────────────────── */

.loupe-lab {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
}

#loupe-stage {
  position: relative;
  background: var(--bezel);
  border-radius: 16px;
  padding: clamp(.8rem, 2vw, 1.25rem);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .08),
    inset 0 -2px 5px rgba(0, 0, 0, .55),
    0 20px 46px -20px rgba(0, 0, 0, .8);
  touch-action: none;
}
#loupe-base {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: inset 0 0 30px 8px rgba(0, 0, 0, .4);
}

#loupe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190px;
  height: 190px;
  margin: -95px 0 0 -95px;
  border-radius: 50%;
  cursor: grab;
  z-index: 4;
  will-change: transform;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .6));
}
#loupe:active { cursor: grabbing; }
#loupe-zoom {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #000;
}
.loupe-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 8px solid;
  border-color: #d8dee2 #8d979e #6a747b #b8c0c6; /* brushed metal */
  box-shadow:
    inset 0 0 0 2px #30363a,
    0 0 0 2px #23282c,
    inset 0 0 24px rgba(0, 0, 0, .55);
  pointer-events: none;
}
/* loupe handle */
.loupe-ring::after {
  content: "";
  position: absolute;
  bottom: -46px;
  right: -18px;
  width: 16px;
  height: 62px;
  border-radius: 8px;
  background: linear-gradient(90deg, #6a747b, #b8c0c6 40%, #4d565c);
  transform: rotate(-38deg);
  box-shadow: 0 6px 10px rgba(0, 0, 0, .5);
  z-index: -1;
}

.loupe-hint {
  position: absolute;
  left: 50%;
  top: calc(50% + 108px);
  transform: translateX(-50%);
  font-size: 1.2rem;
  padding: .3rem .8rem .2rem;
  background: rgba(10, 12, 16, .85);
  border: 1px solid rgba(51, 255, 102, .4);
  border-radius: 8px;
  animation: hint-breathe 1.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}
.loupe-hint.hidden, .loupe-hint.off { display: none; }

.mask-picker {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.2rem, 3vw, 1.7rem);
}
.mask-picker .ctl-label { margin-bottom: .1rem; }

.mask-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  text-align: left;
  padding: .85rem 1rem .75rem;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 10px;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, transform .15s ease;
}
.mask-btn:hover { border-color: var(--line-strong); transform: translateX(3px); }
.mask-btn.active {
  border-color: rgba(51, 255, 102, .35);
  border-left-color: var(--phos);
  background: rgba(51, 255, 102, .06);
  box-shadow: 0 0 18px var(--phos-glow-3), inset 0 0 14px rgba(51, 255, 102, .05);
}
.mask-name {
  font-family: var(--font-osd);
  font-size: 1.25rem;
  letter-spacing: .05em;
  color: var(--cream);
  transition: color .25s ease, text-shadow .25s ease;
}
.mask-btn.active .mask-name {
  color: var(--phos);
  text-shadow: 0 0 8px var(--phos-glow-1);
}
.mask-desc { font-size: .82rem; color: var(--cream-dim); }

/* ───────────────────────────── 15 · CH6 CONTROL ROOM ──────────────────── */

.simroom {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.sim-tv { position: relative; }
.sim-tv::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -30px;
  height: 40px;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 179, 71, .12), transparent 70%);
  filter: blur(6px);
  z-index: -1;
}

.tv-shell.big { max-width: 640px; margin: 0 auto; }

.sim-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: clamp(.7rem, 2vw, 1rem);
  padding: .6rem .8rem .5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, .28);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5), inset 0 -1px 0 rgba(255, 220, 170, .07);
}
.sim-ch {
  font-size: 1.7rem;
  line-height: 1;
  min-width: 4.2ch;
  padding: .3rem .55rem .18rem;
  background: #061007;
  border-radius: 6px;
  border: 1px solid rgba(51, 255, 102, .25);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .8);
}
.sim-panel .btn-crt { margin-left: auto; }
.sim-panel .btn-crt + .btn-crt { margin-left: 0; }

/* knob bank */
.sim-knobs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 35%),
    var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, .75);
}

.knob-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
}

.knob {
  --rot: 0deg;
  position: relative;
  width: clamp(72px, 9vw, 92px);
  height: clamp(72px, 9vw, 92px);
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  background:
    radial-gradient(circle at 32% 28%, #3d3d45, #1c1c21 58%, #0c0c0f 100%);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .16),
    inset 0 -3px 6px rgba(0, 0, 0, .75),
    0 5px 10px rgba(0, 0, 0, .6),
    0 0 0 rgba(255, 179, 71, 0);
  transition: box-shadow .25s ease;
}
.knob:active { cursor: grabbing; }
/* ridged grip rim */
.knob::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(255, 255, 255, .12) 0deg 3.5deg,
    rgba(0, 0, 0, .35) 3.5deg 6deg,
    transparent 6deg 9deg
  );
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 63%);
          mask: radial-gradient(circle, transparent 60%, #000 63%);
  pointer-events: none;
}
/* center cap */
.knob::after {
  content: "";
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #34343c, #17171b 70%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .14),
    inset 0 -2px 3px rgba(0, 0, 0, .7);
  pointer-events: none;
}
.knob:hover,
.knob:focus-visible {
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .16),
    inset 0 -3px 6px rgba(0, 0, 0, .75),
    0 5px 10px rgba(0, 0, 0, .6),
    0 0 18px var(--amber-glow-2);
}
.knob .knob-line { z-index: 2; }
.knob .knob-line::before {
  top: 7%;
  height: 24%;
  width: 4px;
  margin-left: -2px;
  background: var(--amber);
  box-shadow: 0 0 7px var(--amber-glow-1), 0 0 18px var(--amber-glow-2);
}

.knob-label {
  font-size: 1.1rem;
  color: var(--amber);
  text-shadow: 0 0 7px var(--amber-glow-2);
}

.knob-note { grid-column: 1 / -1; margin-top: .4rem; border-left-color: rgba(255, 179, 71, .5); }

/* ───────────────────────────── 16 · CH7 LEGACY ────────────────────────── */

.legacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
  max-width: 1280px;
  margin: 0 auto clamp(3rem, 7vh, 5rem);
}

.legacy-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 32%),
    var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.2rem, 3vw, 1.7rem);
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .7);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.legacy-card:hover {
  border-color: rgba(51, 255, 102, .25);
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px -18px rgba(0, 0, 0, .8),
    0 0 26px var(--phos-glow-3);
}
.legacy-card.wide { grid-column: span 2; }
.legacy-card h3 {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .7rem;
  color: var(--cream);
}
.card-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px var(--phos-glow-2));
}
.legacy-card p { color: var(--cream-dim); font-size: .96rem; }

/* light-gun lab */
.lightgun-stage {
  position: relative;
  margin: 1.2rem 0 1rem;
  background: var(--bezel);
  border-radius: 12px;
  padding: .7rem;
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .08),
    inset 0 -2px 5px rgba(0, 0, 0, .55);
}
#duck-canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #0a1520;
  cursor: crosshair;
  box-shadow: inset 0 0 30px 8px rgba(0, 0, 0, .45);
}
.lg-score {
  position: absolute;
  top: 1.15rem;
  right: 1.25rem;
  font-size: 1.4rem;
  padding: .2rem .6rem .1rem;
  background: rgba(6, 16, 7, .85);
  border: 1px solid rgba(51, 255, 102, .35);
  border-radius: 6px;
  pointer-events: none;
}

/* glossary */
.glossary {
  max-width: 900px;
  margin: 0 auto clamp(3.5rem, 8vh, 6rem);
  text-align: center;
}
.glossary .kicker { margin-bottom: 1.3rem; }
.gloss-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1.4rem;
}
.gloss-def {
  min-height: 4.6em;
  display: grid;
  place-items: center;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  line-height: 1.35;
  padding: 1rem 1.4rem .85rem;
  border: 1px solid rgba(51, 255, 102, .25);
  border-radius: 12px;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .25) 0 1px, transparent 1px 3px),
    rgba(6, 16, 7, .75);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, .6), 0 0 22px var(--phos-glow-3);
}

/* ───────────────────────────── 17 · FOOTER ────────────────────────────── */

.site-foot {
  text-align: center;
  padding: clamp(2rem, 6vh, 4rem) 0 1rem;
  border-top: 1px solid var(--line);
  max-width: 900px;
  margin: 0 auto;
}

.foot-tv {
  width: 220px;
  margin: 0 auto 1.6rem;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .09), transparent 35%, rgba(0, 0, 0, .25)),
    repeating-linear-gradient(93deg, var(--wood-2) 0 6px, var(--wood-1) 6px 11px, #6a4426 11px 18px);
  border-radius: 10px;
  padding: .55rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 14px 26px -12px rgba(0, 0, 0, .8);
}

.foot-screen {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background-color: #0c130d;
  box-shadow: inset 0 0 18px 4px rgba(0, 0, 0, .7);
}
/* animated TV snow — feTurbulence data-URI, jittered with steps() */
.foot-screen::before {
  content: "";
  position: absolute;
  inset: -100%;
  background-image: var(--noise-uri);
  background-size: 110px 110px;
  opacity: .3;
  animation: grain-jitter .5s steps(1) infinite;
  mix-blend-mode: screen;
}
.foot-screen .osd-text {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  animation: hint-breathe 2.2s ease-in-out infinite;
}

.site-foot > .osd-text {
  display: block;
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 60ch;
  margin: 0 auto;
  opacity: .8;
}

/* ───────────────────────────── 18 · SVG HELPER ANIMATIONS ─────────────── */

.flicker { animation: svg-flicker 2.6s steps(2, jump-none) infinite; }
@keyframes svg-flicker {
  0%   { opacity: 1; }
  8%   { opacity: .55; }
  10%  { opacity: 1; }
  33%  { opacity: .85; }
  35%  { opacity: 1; }
  62%  { opacity: .5; }
  64%  { opacity: 1; }
  87%  { opacity: .75; }
  100% { opacity: 1; }
}

.pulse-slow { animation: svg-pulse 3.4s ease-in-out infinite; }
@keyframes svg-pulse {
  0%, 100% { opacity: .65; }
  50%      { opacity: 1; }
}

.dashflow { animation: svg-dashflow 1.2s linear infinite; }
@keyframes svg-dashflow {
  to { stroke-dashoffset: -20; }
}

.sway {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: svg-sway 5.5s ease-in-out infinite;
}
@keyframes svg-sway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

.jump {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: svg-jump 1.1s cubic-bezier(.3, 0, .4, 1) infinite;
}
@keyframes svg-jump {
  0%, 100% { transform: translateY(0); }
  35%      { transform: translateY(-14px); }
  55%      { transform: translateY(-14px); }
}

.coin-spin {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: svg-coin 1.4s linear infinite;
}
@keyframes svg-coin {
  0%   { transform: scaleX(1); }
  25%  { transform: scaleX(.12); }
  50%  { transform: scaleX(1); }
  75%  { transform: scaleX(.12); }
  100% { transform: scaleX(1); }
}

/* switch-off: line collapses to nothing, then a dot blinks out — looped */
.collapse-line {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: svg-collapse-line 4s ease-in-out infinite;
}
@keyframes svg-collapse-line {
  0%       { transform: scale(1, 1); opacity: 1; }
  42%      { transform: scale(1, 1); opacity: 1; }
  54%      { transform: scale(1, .04); opacity: 1; }
  58%      { transform: scale(.06, .04); opacity: 1; }
  60%      { transform: scale(.02, .04); opacity: 0; }
  92%      { transform: scale(.02, .04); opacity: 0; }
  100%     { transform: scale(1, 1); opacity: 1; }
}
.collapse-dot { animation: svg-collapse-dot 4s ease-in-out infinite; opacity: 0; }
@keyframes svg-collapse-dot {
  0%, 56%  { opacity: 0; }
  60%      { opacity: 1; }
  74%      { opacity: 1; }
  86%      { opacity: 0; }
  100%     { opacity: 0; }
}

/* TV snow on SVG rect/circle: flickering fills between two dark greens */
.screen-static-rect, .screen-static-circle {
  fill: #1c3524;
  animation: svg-static .16s steps(2, jump-none) infinite;
}
.screen-static-circle { animation-duration: .19s; }
@keyframes svg-static {
  0%   { fill: #16301f; opacity: .95; }
  25%  { fill: #24402c; opacity: .8; }
  50%  { fill: #1a3823; opacity: 1; }
  75%  { fill: #203c28; opacity: .85; }
  100% { fill: #16301f; opacity: .95; }
}

/* aperture-grille shimmer */
.grille-anim { animation: svg-grille 1.8s ease-in-out infinite; }
@keyframes svg-grille {
  0%, 100% { opacity: .8; }
  45%      { opacity: 1; }
  50%      { opacity: .65; }
  55%      { opacity: 1; }
}

/* early-color-set flicker */
.colorbars-anim { animation: svg-colorbars 3.2s steps(2, jump-none) infinite; }
@keyframes svg-colorbars {
  0%   { opacity: .88; }
  12%  { opacity: 1; }
  40%  { opacity: .8; }
  42%  { opacity: 1; }
  70%  { opacity: .92; }
  74%  { opacity: .7; }
  76%  { opacity: 1; }
  100% { opacity: .88; }
}

/* game screen shimmer */
.game-anim { animation: svg-game 2.4s ease-in-out infinite; }
@keyframes svg-game {
  0%, 100% { opacity: .92; filter: brightness(1); }
  50%      { opacity: 1; filter: brightness(1.12); }
}

.blink { animation: svg-blink 1s steps(1) infinite; }
@keyframes svg-blink {
  0%, 49%  { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* generic div TV-snow utility (same recipe as .foot-screen) */
.static-bg { position: relative; overflow: hidden; }
.static-bg::before {
  content: "";
  position: absolute;
  inset: -100%;
  background-image: var(--noise-uri);
  background-size: 110px 110px;
  opacity: .35;
  animation: grain-jitter .5s steps(1) infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* ───────────────────────────── 19 · RESPONSIVE ────────────────────────── */

@media (max-width: 1080px) {
  .legacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legacy-card.wide { grid-column: span 2; }
  .how-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  :root { --nav-w: 0px; }

  .channel {
    padding: clamp(3.5rem, 8vh, 5rem) var(--pad-x);
    padding-bottom: calc(clamp(3.5rem, 8vh, 5rem) + 76px); /* clear bottom nav */
  }
  /* #ch1 has specificity 1,0,0 with padding-bottom: 0 — re-override here so
     the hero fact ticker clears the fixed bottom channel nav */
  #ch1 { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* nav → bottom bar, numbers only */
  #channel-nav {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    padding: .5rem .5rem calc(.5rem + env(safe-area-inset-bottom));
    background: rgba(10, 12, 16, .94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .nav-brand { display: none; }
  .ch-label { display: none; }
  .ch-btn { padding: .2rem .1rem; }
  .ch-num {
    font-size: 1.2rem;
    min-width: 2.15rem;
    padding: .3rem .2rem .2rem;
  }
  #mute-btn { margin-top: 0; margin-left: .4rem; padding: .3rem .45rem .22rem; }
  #mute-btn .osd-text { font-size: .85rem; }

  #osd-vol { bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* footer sign-off must clear the fixed bottom channel bar */
  .site-foot { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* hero stacks */
  .hero-wrap {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 1rem;
  }
  .hero-tv { width: min(100%, 420px); }
  .hero-cta { gap: .7rem; }
  .ticker { margin-right: calc(-1 * var(--pad-x)); }

  /* timeline → single column, spine on the left */
  .timeline::before { left: 14px; margin-left: 0; }
  .era::before { left: 14px; margin-left: -5px; top: 4.6rem; }
  .era-year {
    margin: 0 0 .9rem 2.4rem;
    font-size: clamp(2.4rem, 10vw, 3.2rem);
    padding: 0 .6rem;
  }
  .era-card,
  .era:nth-child(even) .era-card {
    width: auto;
    margin-left: 2.4rem;
  }
  .era:nth-child(odd)::after,
  .era:nth-child(even)::after {
    left: 14px;
    right: auto;
    width: 2.1rem;
    top: 4.6rem;
    background: linear-gradient(90deg, var(--phos-dim), transparent);
  }

  /* labs stack */
  .anatomy-wrap, .lab, .loupe-lab, .simroom { grid-template-columns: 1fr; }
  #anatomy-info { position: static; }

  .legacy-grid { grid-template-columns: 1fr; }
  .legacy-card.wide { grid-column: auto; }

  #loupe { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
  .loupe-hint { top: calc(50% + 88px); }

  .sim-knobs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-panel .btn-crt { margin-left: 0; }
}

@media (max-width: 480px) {
  .how-strip { grid-template-columns: 1fr; }
  .ch-num { min-width: 1.95rem; font-size: 1.1rem; }
  .hero-title span:nth-child(1) { letter-spacing: .15em; }
  .btn-crt { font-size: 1.1rem; padding: .6rem 1.1rem .48rem; }
  .era-year { margin-left: 2.1rem; }
  .era-card, .era:nth-child(even) .era-card { margin-left: 2.1rem; }
  .era:nth-child(odd)::after,
  .era:nth-child(even)::after { width: 1.8rem; }
  .tv-legs { height: 34px; }
  .loupe-ring::after { display: none; }
}

@media (min-width: 1700px) {
  .channel { padding-left: calc((100vw - 1440px) / 2); padding-right: calc((100vw - 1440px) / 2 + var(--nav-w)); }
  .ticker { margin-left: calc(-1 * (100vw - 1440px) / 2); margin-right: calc(-1 * ((100vw - 1440px) / 2 + var(--nav-w))); }
}

/* coarse pointers: bigger hit targets, no hover-dependent labels */
@media (hover: none) {
  .ch-btn.active .ch-label { opacity: 1; transform: none; }
  .era-photo:hover { transform: rotate(-1.5deg); }
  .era:nth-child(even) .era-photo:hover { transform: rotate(1.5deg); }
}

/* ───────────────────────────── 20 · REDUCED MOTION ────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .2s !important;
  }

  /* keep meaning-carrying fades, kill movement */
  .reveal,
  body.powering .reveal:not(.in),
  body.on .reveal:not(.in) { transform: none; transition: opacity .4s ease !important; }
  .ticker-track { animation: none !important; transform: none; }
  .fx-grain, .foot-screen::before, .static-bg::before { animation: none !important; }
  .screen-static-rect, .screen-static-circle { animation: none !important; fill: #1c3524; }
  #power-btn, .power-hint, .loupe-hint, .foot-screen .osd-text { animation: none !important; }
  .flicker, .pulse-slow, .dashflow, .sway, .jump, .coin-spin,
  .collapse-line, .collapse-dot, .grille-anim, .colorbars-anim,
  .game-anim, .blink, .rgbword span { animation: none !important; }
  .collapse-dot { opacity: 1; }
}

/* ───────────────────────────── 21 · PRINT ─────────────────────────────── */

@media print {
  #power-overlay, .crt-fx, #channel-nav, #osd, #osd-vol { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal,
  body.powering .reveal:not(.in),
  body.on .reveal:not(.in) { opacity: 1; transform: none; }
}
