:root {
  --bg: #0b100e; --panel: #121a17; --panel2: #18221e; --ink: #efe9d8; --muted: #a9b0a6; --rule: #26332d;
  --amber: #ffb22e; --amber-dim: #8a6215; --compare: #8fa39a; --red: #ff5a4e; --green: #59e38f; --aurora: #5dffa0;
  --b1: #c0c0c0; --b2: #c0c000; --b3: #00c0c0; --b4: #00c000; --b5: #c000c0; --b6: #c00000; --b7: #0000c0;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg) radial-gradient(ellipse at 50% -10%, #1a2a23 0%, var(--bg) 60%) no-repeat; color: var(--ink); font: 17px/1.55 var(--serif); }
a { color: #a8dcff; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); height: 10px; }
.bars i:nth-child(1) { background: var(--b1); } .bars i:nth-child(2) { background: var(--b2); } .bars i:nth-child(3) { background: var(--b3); }
.bars i:nth-child(4) { background: var(--b4); } .bars i:nth-child(5) { background: var(--b5); } .bars i:nth-child(6) { background: var(--b6); } .bars i:nth-child(7) { background: var(--b7); }
.mast, main, .foot { max-width: 84rem; margin: 0 auto; padding: 0 16px; }
.kicker { margin: 1.2rem 0 .3rem; font: 600 .8rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); display: flex; align-items: center; gap: .55rem; }
.rec { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { opacity: .15; } }
h1 { font: 800 clamp(2.3rem, 7vw, 4.6rem)/.95 var(--display); text-transform: uppercase; letter-spacing: .01em; margin: .2rem 0 .7rem; }
h1 span { display: block; color: var(--amber); font-size: .62em; letter-spacing: .03em; margin-top: .25rem; }
.dek { max-width: 50rem; color: #ddd7c6; margin: 0 0 1.3rem; font-size: 1.08rem; }

/* the room: board + console */
.room { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(300px, 1fr); gap: 14px; margin-bottom: 2.2rem; }
.board { position: relative; background: #0d1512; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 80px #000a, 0 10px 40px #0008; min-height: 260px; }
.board::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, #0000 0 3px, #0002 3px 4px); }
.mapwrap { position: relative; }
.board svg { display: block; width: 100%; height: auto; }
.board canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#map .state { fill: #13201b; stroke: #2d4038; stroke-width: .7; }
#map .lit { stroke: var(--amber); stroke-width: 1.2; }
#map .grat { fill: none; stroke: #1b2a24; stroke-width: .6; stroke-dasharray: 2 4; }
#map text { font: 600 15px var(--mono); fill: var(--ink); paint-order: stroke; stroke: #0b100e; stroke-width: 4px; }
#map text.big { font: 800 30px var(--display); fill: var(--amber); }
#map text.small { font: 600 16px var(--mono); fill: #d8dccf; }
.board-note { position: absolute; left: 12px; right: 12px; bottom: 8px; margin: 0; font: 400 .78rem/1.35 var(--mono); color: var(--muted); text-shadow: 0 1px 2px #000; z-index: 2; }
.board-note b { color: var(--ink); font-weight: 600; }
.console { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.monitor { position: relative; border-radius: 18px; padding: 10px; background: linear-gradient(#2a2f2c, #171a18); box-shadow: inset 0 2px 0 #fff2, 0 8px 30px #0009; }
.monitor canvas { display: block; width: 100%; height: auto; border-radius: 12px / 18px; }
.tv-text { position: absolute; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.tv-top { margin: 0; font: 800 clamp(1rem, 2.4vw, 1.35rem)/1 var(--display); letter-spacing: .14em; text-transform: uppercase; background: #000c; padding: .35rem .7rem; }
.nixie { margin: .35rem 0; font: 600 clamp(2rem, 5.4vw, 3.1rem)/1 var(--mono); color: #ffb35c; text-shadow: 0 0 6px #ff7b1c, 0 0 18px #ff5a00; background: #000d; padding: .15rem .6rem; border-radius: 4px; letter-spacing: .04em; }
.tv-sub { margin: 0; font: 600 .74rem/1.2 var(--mono); background: #000c; padding: .25rem .5rem; text-transform: uppercase; letter-spacing: .08em; }
.monitor.onair .tv-top { background: var(--red); color: #fff; animation: blink 1s steps(2, start) infinite; }
.preview { align-self: flex-start; border: 1px solid var(--amber-dim); background: #1f2a25; color: var(--amber); font: 600 .78rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: .55rem .8rem; border-radius: 16px; cursor: pointer; }
.preview:hover { background: #2a372f; } .preview:disabled { opacity: .5; cursor: default; }
#map .lit { cursor: pointer; } #map .lit:focus-visible { outline: none; stroke-width: 3; }
.lamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lamp { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: .5rem .55rem; display: flex; gap: .5rem; align-items: center; min-width: 0; }
.lamp i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #333; box-shadow: inset 0 -2px 3px #0008; }
.lamp.g i { background: var(--green); box-shadow: 0 0 10px var(--green), inset 0 -2px 3px #0006; }
.lamp.a i { background: var(--amber); box-shadow: 0 0 12px var(--amber); animation: blink 1.2s steps(2, start) infinite; }
.lamp.r i { background: var(--red); box-shadow: 0 0 14px var(--red); animation: blink .7s steps(2, start) infinite; }
.lamp span { font: 600 .66rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 0; }
.lamp span b { display: block; color: var(--ink); font-size: .74rem; }
.card { border: 2px solid var(--ink); background: #000; padding: .8rem 1rem; border-radius: 4px; }
.card-label { margin: 0; font: 600 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.clock { font: 800 clamp(1.25rem, 2.4vw, 1.6rem)/1.15 var(--display); letter-spacing: .02em; margin: .45rem 0 .35rem; text-transform: uppercase; }
.verdict { margin: .2rem 0; font-size: .98rem; }
.updated { margin: .4rem 0 0; color: var(--muted); font: .78rem/1.4 var(--mono); }
.updated.stale { color: var(--red); font-weight: 600; }

/* section heads */
.sect-head { display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; align-items: baseline; margin: 0 0 .8rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.sect-head h2 { margin: 0; font: 800 1.9rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.sect-head p { margin: 0; color: var(--muted); max-width: 46rem; font-size: .95rem; }

/* gauges */
.gauges { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 2.2rem; }
.gauge { background: linear-gradient(#1b2521, #111816); border: 1px solid var(--rule); border-radius: 8px; padding: .6rem .6rem .7rem; text-align: center; cursor: pointer; transition: transform .2s, border-color .2s; color: inherit; font: inherit; width: 100%; }
.gauge:hover, .gauge:focus-visible { transform: translateY(-2px); border-color: var(--amber-dim); outline: none; }
.gauge svg { width: 100%; height: auto; display: block; }
.gauge .needle { transition: transform 1.1s cubic-bezier(.34, 1.56, .64, 1); transform-origin: 100px 100px; }
.gauge .gname { display: block; margin: .1rem 0 0; font: 600 .72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.gauge .val { display: block; font: 800 1.45rem/1.1 var(--display); letter-spacing: .02em; }
.gauge .cmp { display: block; font: .72rem/1.3 var(--mono); color: var(--muted); }
.gauge svg text { font: 600 13px var(--mono); fill: var(--muted); }

/* recorders */
.scrub { display: flex; align-items: center; gap: .7rem; margin: 0 0 1rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 30px; padding: .45rem .7rem; position: sticky; top: 6px; z-index: 5; box-shadow: 0 6px 20px #0008; }
.scrub button { flex: none; height: 38px; min-width: 38px; border-radius: 19px; border: 1px solid var(--amber-dim); background: #1f2a25; color: var(--amber); font: 600 .9rem var(--mono); cursor: pointer; padding: 0 .7rem; }
.scrub button:hover { background: #2a372f; }
.scrub .live-btn.on { background: #a32019; color: #fff; border-color: var(--red); }
.scrub input { flex: 1; min-width: 60px; accent-color: var(--amber); height: 28px; }
.scrub-time { margin: 0; font: 600 .9rem var(--mono); min-width: 5.6rem; text-align: right; color: var(--amber); }
.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin-bottom: 2rem; }
.ch { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: .75rem .85rem .7rem; min-width: 0; position: relative; scroll-margin-top: 70px; }
.ch.hi { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 30px #ffb22e33; }
.ch h3 { margin: 0; font: 800 1.15rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.ch .num { font: 600 .7rem/1 var(--mono); color: var(--amber); letter-spacing: .1em; margin-right: .45rem; }
.ch .src { margin: .1rem 0 .35rem; color: var(--muted); font: .76rem/1.35 var(--mono); }
.ch svg { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: crosshair; }
.ch .read { margin: .35rem 0 0; font-size: .92rem; }
.ch .old { color: var(--red); font-weight: 600; }
.key { display: flex; gap: 1rem; flex-wrap: wrap; margin: .25rem 0 0; font: .72rem var(--mono); color: var(--muted); }
.key span::before { content: ""; display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--amber); vertical-align: middle; margin-right: .35rem; }
.key span.cmp::before { border-top: 2px dashed var(--compare); }
.ch svg text { fill: #b8bfb4; font: 15px var(--mono); }
.ch .draw { animation: draw 1.6s ease-out forwards; }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
.ch .xh-label { font: 600 15px var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 5px; }

/* story */
.story { max-width: 46rem; margin: 0 0 3rem; }
.story h2 { font: 800 1.7rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 2.2rem 0 .5rem; color: var(--amber); }
details { margin-top: 2rem; border-top: 1px solid var(--rule); padding-top: .8rem; }
summary { cursor: pointer; font: 600 1rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
details li { margin: .55rem 0; }
.credits { color: var(--muted); font-size: .9rem; }
.foot { color: var(--muted); font-size: .9rem; padding-bottom: 2rem; }

@media (max-width: 1100px) { .gauges { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .room { grid-template-columns: 1fr; } .console { display: grid; grid-template-columns: 1fr 1fr; } .console .card { grid-column: 1 / -1; } }
@media (max-width: 620px) {
  body { font-size: 16px; }
  .console { display: flex; }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channels { grid-template-columns: 1fr; }
  .lamps { grid-template-columns: repeat(2, 1fr); }
  .board-note { position: static; padding: .5rem .6rem .7rem; }
  .scrub-time { min-width: 4.4rem; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* the live moment */
.onair-banner { position: sticky; top: 0; z-index: 20; background: #a32019; color: #fff; padding: .6rem 16px; font: 600 .95rem/1.4 var(--serif); text-align: center; box-shadow: 0 4px 20px #0009; }
.onair-banner b { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; margin-right: .4rem; }
.crawl { position: absolute; left: 10px; right: 10px; bottom: 10px; overflow: hidden; background: #000e; border-top: 2px solid var(--red); border-radius: 0 0 12px 12px; z-index: 2; }
.crawl span { display: inline-block; white-space: nowrap; padding: .4rem 0 .4rem 100%; font: 600 .9rem/1 var(--mono); color: #fff; animation: crawl 30s linear infinite; }
@keyframes crawl { to { transform: translateX(-100%); } }
.tv-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-note { margin: 0; color: var(--muted); font: .76rem/1.45 var(--mono); }
.tip { position: absolute; z-index: 4; max-width: 230px; background: #000e; border: 1px solid var(--amber-dim); border-radius: 6px; padding: .5rem .6rem; font: .78rem/1.4 var(--mono); color: var(--ink); pointer-events: none; }
#map .state.hl { stroke: var(--ink); stroke-width: 1.6; }
#map .lit { stroke: var(--ink); stroke-width: 1.4; }
/* the whole grid */
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 2.2rem; }
.reg { background: var(--panel); border: 1px solid var(--rule); border-left: 6px solid var(--fill); border-radius: 6px; padding: .5rem .6rem; min-width: 0; }
.reg svg { display: block; width: 100%; height: auto; margin: .2rem 0; }
.reg p { margin: 0; }
.rname { font: 800 1.05rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.rval { font: 600 .95rem/1.2 var(--mono); }
.rcmp { font: .72rem/1.3 var(--mono); color: var(--muted); }
@media (max-width: 620px) { .regions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
