/* =========================================================================
   CARTERS LAB — CRT TERMINAL STYLESHEET
   Ohio State scarlet & gray CRT aesthetic. Pure CSS, file:// safe.
   Owns: bezel/screen frame, scanlines, vignette, flicker, power-on,
   blinking cursor, all .line classes, and all APP CSS HOOK classes.
   Primary text = Buckeye gray/silver. Accent = scarlet (prompt, cursor,
   headers, status dots, glow).
   ========================================================================= */

/* ---- Optional webfont (degrades gracefully to monospace) ---------------- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---- Design tokens ----------------------------------------------------- */
:root {
  --bg:            #0a0a0a;   /* near-black screen */
  --bg-deep:       #050505;   /* darker outer void */
  --phosphor:      #c9ccce;   /* primary text — Buckeye gray/silver */
  --phosphor-dim:  #7c8084;   /* muted gray */
  --phosphor-faint:#33373a;   /* very dim gray (borders) */
  --scarlet:       #d10000;   /* Ohio State scarlet — accents/headers/prompt */
  --scarlet-bright:#ff3b3b;   /* brighter scarlet for glow */
  --gray:          #9aa0a4;   /* OSU gray */
  --amber:         #ffb000;   /* warn dot */
  --white:         #eef1f3;   /* near-white silver (ascii/highlights) */

  --glow:          0 0 2px rgba(210,214,217,.40), 0 0 6px rgba(210,214,217,.18);
  --glow-strong:   0 0 4px rgba(235,238,240,.70), 0 0 12px rgba(200,205,210,.35), 0 0 22px rgba(180,185,190,.18);
  --glow-scarlet:  0 0 3px rgba(255,59,59,.75), 0 0 11px rgba(209,0,0,.55);

  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Courier New', monospace;

  --screen-max: 1080px;
  --radius-bezel: 22px;
  --radius-screen: 14px;
}

/* ---- Reset / base ------------------------------------------------------ */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 50% 30%, #111 0%, var(--bg-deep) 60%, #000 100%);
  font-family: var(--font-mono);
  color: var(--phosphor);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2.5vw, 40px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;          /* screen scrolls internally */
}

/* =========================================================================
   BEZEL  (#crt)
   ========================================================================= */
#crt {
  position: relative;
  width: 100%;
  max-width: var(--screen-max);
  height: min(88vh, 820px);
  padding: clamp(10px, 1.6vw, 22px);
  border-radius: var(--radius-bezel);
  background:
    linear-gradient(160deg, #2a2c2e 0%, #161718 40%, #0c0d0e 100%);
  box-shadow:
    0 0 0 2px #000,
    0 18px 50px rgba(0,0,0,.85),
    0 4px 12px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -3px 8px rgba(0,0,0,.7);
}

/* little power LED on the bezel — scarlet */
#crt::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--scarlet);
  box-shadow: 0 0 6px rgba(209,0,0,.9), 0 0 12px rgba(209,0,0,.5);
  animation: led-pulse 4s ease-in-out infinite;
}

/* =========================================================================
   SCREEN  (#screen)  — holds glow + curvature + overlays
   ========================================================================= */
#screen {
  position: relative;
  height: 100%;
  width: 100%;
  border-radius: var(--radius-screen);
  background:
    radial-gradient(ellipse at 50% 45%, #131011 0%, var(--bg) 70%, #060606 100%);
  overflow: hidden;
  padding: clamp(14px, 2vw, 28px);
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,.9),
    inset 0 0 18px rgba(209,0,0,.05);
  color: var(--phosphor);
  text-shadow: var(--glow);
  /* faint barrel-curvature feel */
  transform: perspective(1200px);
}

/* subtle scarlet screen-wide bloom */
#screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(209,0,0,.05) 0%, transparent 60%);
  z-index: 3;
}

/* power-on sweep — plays once */
#screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  pointer-events: none;
  animation: power-on 1.1s ease-out forwards;
}

/* =========================================================================
   OUTPUT  (#output)  — scrollable text area
   ========================================================================= */
#output {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: clamp(12px, 1.45vw, 15px);
  line-height: 1.5;
  letter-spacing: .3px;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--phosphor-dim) transparent;
}

/* webkit scrollbar */
#output::-webkit-scrollbar { width: 8px; }
#output::-webkit-scrollbar-track { background: transparent; }
#output::-webkit-scrollbar-thumb {
  background: var(--phosphor-faint);
  border-radius: 4px;
  box-shadow: inset 0 0 4px rgba(154,160,164,.4);
}
#output::-webkit-scrollbar-thumb:hover { background: var(--phosphor-dim); }

/* =========================================================================
   LINE CLASSES
   ========================================================================= */
.line {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  min-height: 1.1em;
  color: var(--phosphor);
}
.line.ok     { color: var(--phosphor); text-shadow: var(--glow); }
.line.err    { color: var(--scarlet-bright); text-shadow: var(--glow-scarlet); }
.line.accent { color: var(--scarlet); text-shadow: var(--glow-scarlet); font-weight: 700; }
.line.dim    { color: var(--phosphor-dim); text-shadow: none; opacity: .85; }

/* preformatted ASCII art / banners */
.ascii {
  white-space: pre;
  color: var(--white);
  text-shadow: var(--glow-strong), -0.5px 0 rgba(255,40,40,.30), 0.5px 0 rgba(40,150,255,.22);
  font-weight: 500;
  line-height: 1.05;
  overflow-x: auto;
  scrollbar-width: none;
}
.ascii::-webkit-scrollbar { display: none; }

/* generic helpers apps may reuse */
.scarlet { color: var(--scarlet) !important; text-shadow: var(--glow-scarlet); }
.gray    { color: var(--gray)    !important; text-shadow: none; }

/* =========================================================================
   INPUT LINE  (#inputline / #prompt-label / #cmdline)
   ========================================================================= */
#inputline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: .55ch;
  margin-top: 4px;
  font-size: clamp(12px, 1.45vw, 15px);
  line-height: 1.5;
}

#prompt-label {
  flex: 0 0 auto;
  color: var(--scarlet);
  text-shadow: var(--glow-scarlet);
  font-weight: 700;
  white-space: nowrap;
}

#cmdline {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--phosphor);
  font-family: var(--font-mono);
  font-size: inherit;
  line-height: inherit;
  letter-spacing: .3px;
  caret-color: var(--scarlet);
  text-shadow: var(--glow);
  padding: 0;
}
#cmdline::placeholder { color: var(--phosphor-dim); opacity: .6; }

/* blinking block cursor — scarlet */
#inputline::after {
  content: "";
  display: inline-block;
  width: .6ch;
  height: 1.05em;
  margin-left: 1px;
  background: var(--scarlet);
  box-shadow: var(--glow-scarlet);
  transform: translateY(.18em);
  animation: cursor-blink 1.05s steps(1) infinite;
}
/* hide the faux cursor while a command is running (terminal sets aria-busy) */
#inputline[aria-busy="true"]::after { animation: none; opacity: 0; }
#inputline[aria-busy="true"] #cmdline { caret-color: transparent; }

/* =========================================================================
   COUNTDOWN APP  (.cd ...)
   ========================================================================= */
.cd {
  margin: 14px 0 18px;
  padding: 18px 20px;
  border: 1px solid var(--scarlet);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(209,0,0,.08), rgba(0,0,0,0)),
    rgba(14,10,10,.55);
  box-shadow: inset 0 0 28px rgba(0,0,0,.6), 0 0 16px rgba(209,0,0,.14);
}

.cd-title {
  font-size: clamp(13px, 1.7vw, 17px);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--scarlet);
  text-shadow: var(--glow-scarlet);
  margin-bottom: 14px;
}

.cd-timer {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2.4vw, 26px);
  align-items: flex-end;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.cd-num {
  font-size: clamp(34px, 7vw, 68px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--scarlet);
  text-shadow: var(--glow-scarlet), -0.6px 0 rgba(255,40,40,.35), 0.6px 0 rgba(40,150,255,.22);
  font-variant-numeric: tabular-nums;
}
/* scarlet/gray variants for countdown digits */
.cd-num.scarlet,
.cd .scarlet { color: var(--scarlet); text-shadow: var(--glow-scarlet); }
.cd-num.gray,
.cd .gray    { color: var(--gray); text-shadow: 0 0 6px rgba(154,160,164,.4); }

.cd-label {
  margin-top: 8px;
  font-size: clamp(9px, 1.1vw, 12px);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
  text-shadow: none;
}

.cd-taunt {
  margin-top: 16px;
  font-size: clamp(11px, 1.4vw, 14px);
  font-style: italic;
  color: var(--phosphor);
  text-shadow: none;
  border-left: 3px solid var(--scarlet);
  padding-left: 12px;
  line-height: 1.45;
}

/* kickoff line + all-time series + last-10 strip */
.cd-kick {
  margin-top: 12px;
  font-size: clamp(10px, 1.2vw, 13px);
  letter-spacing: .5px;
  color: var(--phosphor-dim);
}
.cd-series {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--phosphor-faint);
}
.cd-series-line,
.cd-last-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: clamp(11px, 1.3vw, 14px);
}
.cd-last-head { margin-top: 14px; }
.cd-series-lab {
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--phosphor); text-shadow: var(--glow);
  font-size: clamp(10px, 1.15vw, 12px);
}
.cd-series-val,
.cd-last-rec { font-variant-numeric: tabular-nums; }
.cd-last {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.cd-game {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 2px; border-radius: 6px;
  border: 1px solid var(--phosphor-faint);
  background: rgba(255,255,255,.02);
}
.cd-game.win  { border-color: var(--scarlet); box-shadow: inset 0 0 10px rgba(209,0,0,.18); }
.cd-game.loss { opacity: .6; }
.cd-game-yr { font-size: clamp(8px, 1vw, 10px); color: var(--phosphor-dim); letter-spacing: .5px; }
.cd-game-rs { font-size: clamp(13px, 1.7vw, 18px); font-weight: 700; line-height: 1.15; }
.cd-game.win  .cd-game-rs { color: var(--scarlet); text-shadow: var(--glow-scarlet); }
.cd-game.loss .cd-game-rs { color: var(--gray); }
.cd-game-sc { font-size: clamp(7px, .9vw, 9.5px); color: var(--phosphor-dim); font-variant-numeric: tabular-nums; }
.cd-last-note { margin-top: 10px; font-size: clamp(10px, 1.2vw, 12.5px); font-style: italic; }
.cd-foot {
  margin-top: 14px; padding-top: 10px;
  border-top: 1px dashed var(--phosphor-faint);
  font-size: clamp(9px, 1.05vw, 11px);
  color: var(--phosphor-dim);
  letter-spacing: 1px;
}
@media (max-width: 700px) {
  .cd-last { grid-template-columns: repeat(5, 1fr); }
}

/* =========================================================================
   SERVICES APP  (.svc ...)
   ========================================================================= */
.svc {
  margin: 14px 0 18px;
}

/* "NOW SERVING" animated header */
.svc-header {
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--phosphor);
  text-shadow: var(--glow-strong);
  margin-bottom: 4px;
}
.svc-header-mark { color: var(--scarlet); margin-right: 8px; text-shadow: var(--glow-scarlet); }
.svc-header-cursor { color: var(--scarlet); animation: cursor-blink 1.05s steps(1) infinite; }

.svc-summary {
  font-size: clamp(10px, 1.2vw, 12px);
  color: var(--phosphor-dim);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.svc-cat {
  font-size: clamp(11px, 1.3vw, 13px);
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--scarlet);
  text-shadow: var(--glow-scarlet);
  margin: 18px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--phosphor-faint);
}
.svc-cat:first-child { margin-top: 4px; }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.svc-card {
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--phosphor-faint);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(209,0,0,.05), rgba(0,0,0,0)),
    rgba(10,10,11,.55);
  box-shadow: inset 0 0 16px rgba(0,0,0,.5);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.svc-card:hover {
  border-color: var(--scarlet);
  box-shadow: inset 0 0 16px rgba(0,0,0,.5), 0 0 16px rgba(209,0,0,.22);
  transform: translateY(-1px);
}

.svc-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(13px, 1.5vw, 15px);
  font-weight: 700;
  color: var(--phosphor);
  text-shadow: var(--glow);
  margin-bottom: 5px;
}

.svc-blurb {
  font-size: clamp(10px, 1.2vw, 12.5px);
  line-height: 1.45;
  color: var(--phosphor-dim);
  text-shadow: none;
}

.svc-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
  text-shadow: none;
}

/* status dot */
.svc-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--gray);
  box-shadow: 0 0 5px rgba(154,160,164,.5);
}
.svc-dot.up {
  background: var(--scarlet);
  box-shadow: 0 0 5px rgba(209,0,0,.95), 0 0 11px rgba(209,0,0,.6);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
.svc-dot.warn {
  background: var(--amber);
  box-shadow: 0 0 5px rgba(255,176,0,.9), 0 0 11px rgba(255,176,0,.5);
}
.svc-dot.down {
  background: #4a4d4f;
  box-shadow: 0 0 4px rgba(0,0,0,.6);
}

/* =========================================================================
   STATUS BAR  (#statusbar) — slim CRT OSD strip across the top of the screen
   ========================================================================= */
#statusbar {
  flex: 0 0 auto;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--phosphor-faint);
  font-size: clamp(10px, 1.15vw, 12.5px);
  letter-spacing: 1px;
  color: var(--phosphor-dim);
  text-shadow: none;
  white-space: nowrap;
}
.sb-left { color: var(--phosphor); }
.sb-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--scarlet); margin-right: 7px; vertical-align: 1px;
  box-shadow: 0 0 5px rgba(209,0,0,.95), 0 0 10px rgba(209,0,0,.6);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
.sb-right { display: flex; align-items: center; gap: 12px; }
.sb-clock { color: var(--phosphor); font-variant-numeric: tabular-nums; }
.sb-snd {
  font: inherit; cursor: pointer; color: var(--phosphor-dim);
  background: transparent; border: 1px solid var(--phosphor-faint);
  border-radius: 5px; padding: 1px 7px; letter-spacing: 1px;
  transition: color .15s ease, border-color .15s ease;
}
.sb-snd:hover { color: var(--phosphor); border-color: var(--phosphor-dim); }
.sb-snd.on { color: var(--scarlet); border-color: var(--scarlet); text-shadow: var(--glow-scarlet); }

/* =========================================================================
   COMMAND DOCK  (#dock) — clickable command keys, revealed after boot
   ========================================================================= */
#dock {
  flex: 0 0 auto;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid transparent;
  transition: max-height .45s ease, opacity .45s ease, padding-top .45s ease, margin-top .45s ease;
}
#dock.ready {
  max-height: 160px;
  opacity: 1;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--phosphor-faint);
}
.dock-key {
  font: inherit;
  cursor: pointer;
  color: var(--phosphor);
  background: linear-gradient(180deg, rgba(209,0,0,.06), rgba(0,0,0,0)), rgba(12,12,13,.6);
  border: 1px solid var(--phosphor-faint);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: clamp(11px, 1.25vw, 13px);
  letter-spacing: .5px;
  text-shadow: var(--glow);
  transition: border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .1s ease;
}
.dock-key:hover { border-color: var(--scarlet); color: #fff; box-shadow: 0 0 12px rgba(209,0,0,.3); }
.dock-key:active { transform: translateY(1px); }

/* =========================================================================
   LAB OPS PANEL  (.noc ...) — ASCII gauges + counters
   ========================================================================= */
.noc {
  margin: 14px 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--phosphor-faint);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(209,0,0,.04), rgba(0,0,0,0)), rgba(9,9,10,.55);
  box-shadow: inset 0 0 22px rgba(0,0,0,.55);
}
.noc-head {
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--phosphor); text-shadow: var(--glow-strong); margin-bottom: 12px;
  font-size: clamp(12px, 1.4vw, 15px);
}
.noc-head .scarlet { margin-right: 6px; }
.noc-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 5px 0;
  font-size: clamp(10px, 1.2vw, 13px);
}
.noc-label { color: var(--gray); letter-spacing: 1px; white-space: nowrap; }
.noc-bar { letter-spacing: -1px; white-space: nowrap; overflow: hidden; }
.noc-bar.lvl-ok   { color: var(--scarlet); text-shadow: var(--glow-scarlet); }
.noc-bar.lvl-warn { color: var(--amber); }
.noc-bar.lvl-crit { color: var(--scarlet-bright); text-shadow: var(--glow-scarlet); }
.noc-val { color: var(--phosphor); font-variant-numeric: tabular-nums; text-align: right; }
.noc-foot {
  display: flex; flex-wrap: wrap; gap: 22px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--phosphor-faint);
}
.noc-stat { display: flex; flex-direction: column; }
.noc-stat-num { font-size: clamp(20px, 3vw, 30px); font-weight: 700; color: var(--phosphor); text-shadow: var(--glow); line-height: 1; }
.noc-stat-num.scarlet { color: var(--scarlet); text-shadow: var(--glow-scarlet); }
.noc-stat-lab { font-size: clamp(8px, 1vw, 10.5px); letter-spacing: 1.5px; text-transform: uppercase; color: var(--phosphor-dim); margin-top: 5px; }
.noc-dns .noc-stat-lab { color: var(--scarlet); }

/* =========================================================================
   FULL-SCREEN OVERLAYS  (.scanlines / .vignette / .flicker)
   These overlay the WHOLE viewport; pointer-events:none so they never block.
   ========================================================================= */
.scanlines,
.vignette,
.flicker {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* horizontal scanlines + slow vertical scroll */
.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0)   0px,
    rgba(0,0,0,0)   2px,
    rgba(0,0,0,.22) 3px,
    rgba(0,0,0,.22) 3px
  );
  background-size: 100% 4px;
  mix-blend-mode: multiply;
  animation: scanline-scroll 8s linear infinite;
  opacity: .8;
}

/* tube curvature darkening at edges */
.vignette {
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0) 55%,
    rgba(0,0,0,.35) 85%,
    rgba(0,0,0,.7) 100%
  );
  box-shadow: inset 0 0 160px rgba(0,0,0,.55);
}

/* very low-opacity flicker overlay — faint scarlet */
.flicker {
  background: rgba(209,0,0,.02);
  animation: screen-flicker 7s steps(1) infinite;
}

/* =========================================================================
   KEYFRAMES
   ========================================================================= */
@keyframes power-on {
  0%   { transform: scaleY(.004) scaleX(.6); opacity: 1; background: #f0f3f5; }
  18%  { transform: scaleY(.004) scaleX(1);  opacity: 1; background: #f0f3f5; }
  40%  { transform: scaleY(1) scaleX(1);     opacity: .55; background: var(--scarlet); }
  70%  { opacity: .2; background: var(--bg); }
  100% { transform: scaleY(1) scaleX(1);     opacity: 0; background: var(--bg); }
}

@keyframes cursor-blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@keyframes scanline-scroll {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

@keyframes screen-flicker {
  0%, 100%      { opacity: .50; }
  4%            { opacity: .62; }
  6%            { opacity: .44; }
  9%            { opacity: .56; }
  12%           { opacity: .50; }
  40%           { opacity: .53; }
  42%           { opacity: .60; }
  44%           { opacity: .50; }
  70%           { opacity: .50; }
  72%           { opacity: .57; }
  74%           { opacity: .50; }
}

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 700px) {
  body { padding: 0; }
  #crt {
    height: 100vh;
    max-width: 100%;
    border-radius: 0;
    padding: 8px;
  }
  #screen { border-radius: 8px; padding: 14px; }
  .svc-grid { grid-template-columns: 1fr; }
  .cd-timer { gap: 14px; }
  .cd-unit { min-width: 52px; }
  #statusbar { font-size: 10px; letter-spacing: .5px; }
  .noc-row { grid-template-columns: 92px 1fr auto; gap: 8px; font-size: 11px; }
  .noc-foot { gap: 16px; }
}

@media (max-width: 420px) {
  #output, #inputline { font-size: 12px; }
  .cd-num { font-size: 30px; }
}

/* =========================================================================
   ACCESSIBILITY — reduced motion kills flicker / scanline scroll / power-on
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  #screen::after { display: none; }          /* skip power-on sweep */
  .flicker { animation: none; opacity: .04; }
  .scanlines { animation: none; }
  #inputline::after { animation: none; opacity: 1; } /* steady cursor */
  .svc-dot.up, #crt::after { animation: none; }
}
