/* ============================================================
   SHORTWAVE — an archive of the numbers stations
   bakelite / dial-lamp amber / phosphor green / paper grey / needle red
   ============================================================ */

:root {
  --bakelite: #0E0B08;
  --panel: #191410;
  --panel-hi: #221b14;
  --amber: #F0A63C;
  --amber-dim: #8a7a61;
  --amber-deep: #b97d2a;
  --phosphor: #54F78C;
  --phosphor-dim: #3f9e63;
  --paper: #C6C0B2;
  --paper-bright: #D3CDBF;
  --ink: #26221c;
  --ink-dim: #524c3e;
  --red: #E23B2E;
  --body-dim: #9A9182;
  --engr: #8a7a61;
  --w: min(1240px, calc(100% - 48px));
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-settle: cubic-bezier(.2, 1.4, .3, 1);
}

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

html { scroll-behavior: smooth; scrollbar-color: #33291d #0a0806; }

body {
  background: var(--bakelite);
  background-image:
    radial-gradient(120% 90% at 50% 0%, rgba(240, 166, 60, .045), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--paper);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: var(--bakelite); }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: #0a0806; }
::-webkit-scrollbar-thumb { background: #33291d; border: 2px solid #0a0806; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber-deep); }

:focus-visible {
  outline: 2px dashed var(--amber);
  outline-offset: 3px;
}

/* amber vanishes on the paper surfaces — use the registrar's red ink there */
.dossier :focus-visible,
.worksheet :focus-visible {
  outline-color: #8c1f14;
}

/* ---------- shared utility type ---------- */

.engr {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-stretch: 78%;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--engr);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .8);
}

/* ============================================================
   MASTHEAD
   ============================================================ */

.masthead {
  width: var(--w);
  margin: 0 auto;
  padding: 42px 0 24px;
}

.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 24px;
  border-bottom: 1px solid #241c13;
  padding-bottom: 18px;
}

.wordmark {
  grid-column: 1;
  font-family: "Archivo", sans-serif;
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(2rem, 9vw, 5.6rem);
  line-height: .92;
  letter-spacing: .005em;
  color: var(--paper);
  text-shadow: 0 0 34px rgba(240, 166, 60, .18);
}

.wordmark .wl {
  display: inline-block;
  opacity: 0;
  filter: blur(7px);
  transform: translateY(8px);
}
.wordmark .wl.lit {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition: opacity .7s var(--ease-out), filter .7s var(--ease-out), transform .7s var(--ease-out);
}

.masthead-sub {
  grid-column: 1;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .42em;
  color: var(--amber);
  margin-top: 10px;
}

.masthead-clock {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-bottom: 4px;
}

.masthead-clock .utc {
  font-family: "DotGothic16", monospace;
  font-size: 26px;
  color: var(--amber);
  text-shadow: 0 0 14px rgba(240, 166, 60, .5);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   RECEIVER
   ============================================================ */

.rx-section {
  width: var(--w);
  margin: 0 auto;
  padding: 24px 0 20px;
}

.chassis {
  position: relative;
  border-radius: 12px;
  padding: 26px 34px 26px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #201913 0%, #181209 55%, #120e08 100%);
  border: 1px solid #2e2418;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, .65),
    0 3px 10px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .07),
    inset 0 -3px 8px rgba(0, 0, 0, .55);
}

.screw {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a3f31, #17110a 75%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .12), inset 0 -1px 2px #000, 0 1px 2px rgba(0,0,0,.7);
}
.screw::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; top: 50%;
  height: 1.6px;
  background: #0a0704;
  transform: rotate(38deg);
}
.screw-tl { top: 11px; left: 12px; }
.screw-tr { top: 11px; right: 12px; }
.screw-tr::after { transform: rotate(-24deg); }
.screw-bl { bottom: 11px; left: 12px; }
.screw-bl::after { transform: rotate(77deg); }
.screw-br { bottom: 11px; right: 12px; }
.screw-br::after { transform: rotate(-64deg); }

.chassis-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.rx-grid {
  display: grid;
  grid-template-columns: 1fr 264px;
  gap: 20px 24px;
}

/* ---------- glass ---------- */

.glass {
  position: relative;
  background: linear-gradient(180deg, #05100a, #030a06);
  border-radius: 7px;
  border: 1px solid #000;
  box-shadow:
    inset 0 0 0 1px rgba(84, 247, 140, .05),
    inset 0 10px 30px rgba(0, 0, 0, .75),
    0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden;
}

.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px),
    radial-gradient(130% 100% at 50% 0%, transparent 60%, rgba(0, 0, 0, .42) 100%);
  border-radius: 7px;
}

.glass-label {
  position: absolute;
  right: 10px;
  top: 7px;
  color: #2a5c3c;
  z-index: 2;
  text-shadow: none;
}

.glass-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.scope-wrap { height: 76px; }
.scope-wrap canvas { display: block; width: 100%; height: 100%; }

.fall-wrap {
  height: 372px;
  cursor: crosshair;
  touch-action: none;
}

#waterfall {
  position: absolute;
  inset: 0 0 44px 0;
  width: 100%;
  height: calc(100% - 44px);
  display: block;
  image-rendering: pixelated;
}

#ruler {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 44px;
  display: block;
  border-top: 1px solid rgba(240, 166, 60, .18);
  background: #0a0805;
}

.needle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  z-index: 3;
  pointer-events: none;
}

.needle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--red);
  box-shadow: 0 0 9px rgba(226, 59, 46, .8), 0 0 24px rgba(226, 59, 46, .35);
}

.needle-grip {
  position: absolute;
  bottom: 2px;
  left: -7px;
  width: 14px;
  height: 20px;
  background: var(--red);
  clip-path: polygon(0 100%, 100% 100%, 100% 35%, 50% 0, 0 35%);
  box-shadow: 0 0 10px rgba(226, 59, 46, .7);
}

/* passband window: the squelch capture band (±12 kHz) rides with the needle */
.passband {
  position: absolute;
  top: 0;
  bottom: 44px;
  left: 50%;
  width: max(1.42%, 10px);
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(240, 166, 60, .04), rgba(240, 166, 60, .12));
  border-left: 1px solid rgba(240, 166, 60, .13);
  border-right: 1px solid rgba(240, 166, 60, .13);
  mix-blend-mode: screen;
  opacity: .5;
  transition: opacity .35s;
}
.passband.locked {
  opacity: 1;
  background: linear-gradient(180deg, rgba(240, 166, 60, .07), rgba(240, 166, 60, .2));
  border-color: rgba(240, 166, 60, .34);
}

/* ghost needle: preview hairline under the cursor */
.ghost {
  position: absolute;
  top: 0;
  bottom: 44px;
  left: 50%;
  width: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.ghost::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -0.5px;
  width: 1px;
  background: rgba(240, 166, 60, .5);
  box-shadow: 0 0 7px rgba(240, 166, 60, .35);
}
.ghost-freq {
  position: absolute;
  top: 10px;
  left: 8px;
  font-family: "DotGothic16", monospace;
  font-size: 12px;
  color: var(--amber);
  background: rgba(8, 6, 3, .82);
  border: 1px solid rgba(240, 166, 60, .3);
  border-radius: 3px;
  padding: 3px 7px;
  white-space: nowrap;
}
.ghost.flip .ghost-freq { left: auto; right: 8px; }
@media (hover: hover) {
  .fall-wrap:hover .ghost { opacity: 1; }
  .fall-wrap.dragging .ghost { opacity: 0; }
}

.boot-veil {
  position: absolute;
  inset: 0;
  background: #010402;
  z-index: 4;
  transition: opacity 1.4s ease;
}
.boot-veil.off { opacity: 0; pointer-events: none; }

.rx-hint {
  text-align: center;
}
.hint-coarse { display: none; }
@media (pointer: coarse) {
  .hint-fine { display: none; }
  .hint-coarse { display: inline; }
}

/* ---------- control column ---------- */

.ctrl-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.ctl-label { display: block; margin-bottom: 7px; }

.readout-block {
  background: #0a0703;
  border-radius: 6px;
  border: 1px solid #000;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .05);
  padding: 12px 14px 10px;
}

.freq-readout {
  font-family: "DotGothic16", monospace;
  font-size: 52px;
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 16px rgba(240, 166, 60, .55), 0 0 42px rgba(240, 166, 60, .22);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.freq-readout.flick { animation: flick 1.15s steps(1) both; }
@keyframes flick {
  0%, 14%, 19%, 42%, 47%, 61% { opacity: .08; }
  16%, 45%, 63%, 100% { opacity: 1; }
}

.station-line {
  font-family: "DotGothic16", monospace;
  font-size: 14px;
  margin-top: 8px;
  color: #8a7a61;
  letter-spacing: .08em;
  min-height: 18px;
  transition: color .3s;
}
.station-line.locked { color: var(--amber); text-shadow: 0 0 10px rgba(240, 166, 60, .5); }

.smeter-block {
  background: #0a0703;
  border-radius: 6px;
  border: 1px solid #000;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .05);
  padding: 10px 14px 6px;
}

#smeter { width: 100%; height: auto; display: block; }
.sm-arc { stroke: #3a2f22; stroke-width: 2; }
.sm-ticks line { stroke: var(--amber-dim); stroke-width: 1.4; }
.sm-txt { fill: var(--amber-dim); font-family: "DotGothic16", monospace; font-size: 9px; }
.sm-line { stroke: var(--red); stroke-width: 2; filter: drop-shadow(0 0 3px rgba(226, 59, 46, .8)); }
.sm-peak { stroke: rgba(240, 166, 60, .55); stroke-width: 1.3; }
.sm-hub { fill: #3a2f22; stroke: #000; }

.lamp-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.lamp {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Archivo", sans-serif;
  font-stretch: 78%;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--engr);
}

.lamp i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2c241a;
  box-shadow: inset 0 1px 2px #000;
  transition: background .25s, box-shadow .25s;
}
.lamp.on i { background: var(--amber); box-shadow: 0 0 9px rgba(240, 166, 60, .8); }
#lamp-audio.on i { background: var(--red); box-shadow: 0 0 9px rgba(226, 59, 46, .8); }

.audio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 10px;
  background: linear-gradient(180deg, #2a2118, #1a140d);
  border: 1px solid #35291b;
  border-radius: 6px;
  box-shadow: 0 3px 0 #0a0704, inset 0 1px 0 rgba(255, 255, 255, .08);
  color: var(--amber);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .22em;
  cursor: pointer;
  transition: background .2s, transform .12s, box-shadow .12s;
}
.audio-btn:hover { background: linear-gradient(180deg, #332818, #211a10); }
.audio-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a0704, inset 0 1px 0 rgba(255,255,255,.08); }
.audio-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #1a140d, #241b10);
  box-shadow: 0 1px 0 #0a0704, inset 0 2px 6px rgba(0, 0, 0, .6);
  transform: translateY(2px);
}

.audio-btn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2c241a;
  transition: background .2s, box-shadow .2s;
}
.audio-btn[aria-pressed="true"] .audio-btn-dot {
  background: var(--red);
  box-shadow: 0 0 8px rgba(226, 59, 46, .9);
  animation: recpulse 1.6s ease-in-out infinite;
}
@keyframes recpulse { 50% { opacity: .5; } }

.audio-note {
  margin-top: -8px;
  text-align: center;
  font-size: 9px;
}

.knob-block {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.knob {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  touch-action: none;
  background:
    repeating-conic-gradient(rgba(255, 255, 255, .05) 0deg 4deg, rgba(0, 0, 0, .35) 4deg 8deg),
    radial-gradient(circle at 38% 32%, #3a2f24, #16110a 70%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .6), inset 0 2px 3px rgba(255, 255, 255, .1), inset 0 -3px 6px #000;
  cursor: grab;
  display: grid;
  place-items: center;
}
.knob:active { cursor: grabbing; }

.knob-face {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #2c2318, #0f0b06 75%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .1), 0 2px 6px rgba(0, 0, 0, .7);
  position: relative;
  will-change: transform;
}

.knob-mark {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 16px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--amber);
  box-shadow: 0 0 6px rgba(240, 166, 60, .7);
}

.knob-label { margin: 0; }

/* ---------- decode strip ---------- */

.decode-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 14px;
}

.decode-label { text-align: right; }

.ticker-glass {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  white-space: nowrap;
  overflow: hidden;
}

/* phosphor persistence: older characters decay to the left */
.ticker-glass .ticker {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .12) 0, #000 34%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .12) 0, #000 34%);
}

.ticker {
  font-family: "DotGothic16", monospace;
  font-size: 21px;
  color: var(--phosphor);
  text-shadow: 0 0 10px rgba(84, 247, 140, .55), 0 0 30px rgba(84, 247, 140, .18);
  letter-spacing: .06em;
  transition: color .3s, text-shadow .3s;
}

/* no carrier: the glass shows dim static, not silence */
.ticker.noise {
  color: #2f5c40;
  text-shadow: none;
}

.ticker-cursor {
  display: inline-block;
  flex-shrink: 0;
  width: 11px;
  height: 24px;
  margin-left: 3px;
  background: var(--phosphor);
  box-shadow: 0 0 10px rgba(84, 247, 140, .55);
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.rx-caption {
  max-width: 62ch;
  margin: 30px auto 0;
  text-align: center;
  color: var(--body-dim);
  font-size: 15.5px;
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */

section { scroll-margin-top: 24px; }

.stations-section, .pad-section, .reports-section {
  width: var(--w);
  margin: 0 auto;
  padding: 110px 0 0;
}

.sec-head { max-width: 780px; margin-bottom: 52px; }

.sec-eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .34em;
  color: var(--amber);
  margin-bottom: 18px;
}
.sec-eyebrow::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  margin-top: 12px;
  background: var(--amber-deep);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .9s var(--ease-out) .2s;
}
.sec-head.in .sec-eyebrow::after { transform: scaleX(1); }

.sec-head h2 {
  font-family: "Archivo", sans-serif;
  font-stretch: 125%;
  font-weight: 850;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: .98;
  letter-spacing: .002em;
  color: var(--paper);
  margin-bottom: 22px;
}

.sec-intro {
  color: var(--body-dim);
  font-size: 16.5px;
  max-width: 64ch;
}

/* ---------- reveal system ---------- */

.rev { opacity: 0; transform: translateY(26px); }
.rev.in {
  opacity: 1;
  transform: none;
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
}

/* ============================================================
   DOSSIERS — paper file cards
   ============================================================ */

.dossier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px 28px;
}

.dossier {
  position: relative;
  margin-top: 26px;
}

.dossier-featured { grid-column: 1 / -1; }

.dossier-tab {
  position: absolute;
  top: -26px;
  left: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 6px 18px 4px 14px;
  background: linear-gradient(180deg, #bab4a5, #aca697);
  border-radius: 5px 10px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--ink);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, .25);
}

.tab-freq { font-size: 10px; color: #443e33; letter-spacing: .16em; }

.dossier-body {
  position: relative;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23p)'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #ccc6b8 0%, #c2bcae 60%, #b8b2a3 100%);
  border-radius: 0 6px 3px 3px;
  padding: 26px 28px 26px;
  color: var(--ink);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, .5),
    0 2px 6px rgba(0, 0, 0, .4),
    inset 0 0 70px rgba(70, 58, 36, .1);
}

/* the file lifts off the desk when you reach for it */
@media (hover: hover) {
  .dossier-tab { transition: background .35s var(--ease-out); }
  .dossier-body { transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
  .dossier:hover .dossier-body {
    transform: translateY(-3px);
    box-shadow:
      0 26px 56px rgba(0, 0, 0, .56),
      0 4px 9px rgba(0, 0, 0, .42),
      inset 0 0 70px rgba(70, 58, 36, .1);
  }
  .dossier:hover .dossier-tab { background: linear-gradient(180deg, #c6c0b1, #b6b0a1); }
}

.d-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  border-bottom: 1.5px solid #928b7a;
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.d-reg {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

.d-name {
  font-family: "Archivo", sans-serif;
  font-stretch: 118%;
  font-weight: 880;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: .95;
  letter-spacing: .005em;
  color: #1d1a15;
}

.d-sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: #7b4a1e;
  margin-top: 9px;
}

/* ---------- stamps ---------- */

.stamp {
  flex-shrink: 0;
  display: inline-block;
  padding: 7px 12px;
  border: 2.5px solid var(--red);
  border-radius: 3px;
  color: var(--red);
  font-family: "Archivo", sans-serif;
  font-stretch: 82%;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.15;
  letter-spacing: .12em;
  text-align: center;
  transform: rotate(-5deg);
  opacity: .82;
  mix-blend-mode: multiply;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.28' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.62 0.5'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23r)'/%3E%3C/svg%3E");
  mask-size: 120px;
}

.rev.in .stamp { animation: stampland .5s var(--ease-settle) .55s backwards; }
@keyframes stampland {
  from { transform: rotate(-9deg) scale(1.25); opacity: 0; }
  to { transform: rotate(-5deg) scale(1); opacity: .82; }
}

.stamp-live { border-style: double; border-width: 4px; }
.stamp-int { border-style: dashed; }

/* ---------- fields ---------- */

.d-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px 26px;
  margin-bottom: 18px;
}

.dossier-featured .d-fields { grid-template-columns: 1fr 1fr; }

.d-fields dt {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-dim);
  margin-bottom: 2px;
}

.d-fields dd {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.d-notes {
  font-size: 15px;
  line-height: 1.6;
  color: #332d26;
  border-left: 3px solid #a39c8b;
  padding-left: 14px;
  margin-bottom: 18px;
}

.d-transcript {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  letter-spacing: .05em;
  color: var(--ink-dim);
  background: rgba(38, 34, 28, .06);
  border: 1px dashed #a39c8b;
  border-radius: 3px;
  padding: 10px 13px;
  margin-bottom: 18px;
}

.tune-btn {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--amber);
  background: linear-gradient(180deg, #322a20, #1d1710);
  border: 1px solid #0e0b08;
  border-radius: 4px;
  padding: 11px 20px;
  cursor: pointer;
  box-shadow: 0 3px 0 #4d453a, 0 5px 10px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: transform .12s, box-shadow .12s, color .2s;
}
.tune-btn:hover { color: #ffc46a; }
.tune-btn:active { transform: translateY(3px); box-shadow: 0 0 0 #4d453a, 0 1px 3px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255,255,255,.1); }

/* ============================================================
   ONE-TIME PAD
   ============================================================ */

.pad-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 56px;
  align-items: center;
}

.pad-prose p {
  color: var(--body-dim);
  font-size: 16px;
  max-width: 58ch;
  margin-bottom: 20px;
}

.pad-prose .inline-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  color: var(--amber);
  white-space: nowrap;
}

.worksheet {
  position: relative;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.055 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23p)'/%3E%3C/svg%3E"),
    linear-gradient(170deg, #d8d2c4, #cbc5b6 70%, #c1bbac);
  border-radius: 3px;
  padding: 26px 28px 24px;
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .4), inset 0 0 70px rgba(70, 58, 36, .1);
  transform: rotate(.6deg);
}

.ws-head {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--ink-dim);
  border-bottom: 1.5px solid #928b7a;
  padding-right: 104px; /* keep DESTROY AFTER USE clear of the stamp */
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.ws-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.ws-tag {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-dim);
}

.ws-digits {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: .12em;
  color: var(--ink);
  display: flex;
  gap: 0;
}

.ws-digits span {
  flex: 1 0 auto;
  text-align: center;
  border-radius: 3px;
  transition: background .25s, color .25s, box-shadow .25s;
}

.ws-digits span.hot {
  background: rgba(226, 59, 46, .16);
  box-shadow: 0 0 0 1px rgba(226, 59, 46, .4);
}

.ws-sent span { color: #8c1f14; font-weight: 600; }
.ws-sent span.pending {
  color: transparent;
  text-shadow: none;
  background-image: linear-gradient(to top, transparent 4px, rgba(38, 34, 28, .38) 4px, rgba(38, 34, 28, .38) 5.5px, transparent 5.5px);
  background-size: 60% 100%;
  background-position: center bottom;
  background-repeat: no-repeat;
}

.ws-rule {
  height: 0;
  border-top: 2px solid var(--ink);
  margin: 4px 0 12px 96px;
}

.ws-note {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-dim);
  margin: 16px 0 18px;
  min-height: 32px;
}

.ws-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.ws-btn {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .18em;
  padding: 10px 16px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.ws-btn:hover { background: var(--ink); color: var(--paper-bright); }
.ws-btn:disabled { opacity: .45; cursor: default; }
.ws-btn:disabled:hover { background: transparent; color: var(--ink); }

.stamp-ws {
  position: absolute;
  right: 20px;
  top: 34px;
  font-size: 11px;
  transform: rotate(4deg);
}

/* ============================================================
   RECEPTION REPORTS — teletype glass
   ============================================================ */

.tty-panel {
  background: linear-gradient(180deg, #05100a, #030a06);
  border: 1px solid #000;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(84, 247, 140, .05),
    inset 0 10px 40px rgba(0, 0, 0, .7),
    0 24px 60px rgba(0, 0, 0, .45);
  padding: 14px 0;
  position: relative;
  overflow: hidden;
}

.tty-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px),
    radial-gradient(130% 120% at 50% 0%, transparent 55%, rgba(0, 0, 0, .4) 100%);
}

.tty-report {
  padding: 26px 34px;
  transition: background .3s;
}
.tty-report + .tty-report { border-top: 1px dashed rgba(84, 247, 140, .18); }
@media (hover: hover) {
  .tty-report:hover { background: rgba(84, 247, 140, .03); }
}

.tty-meta {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--phosphor-dim);
  margin-bottom: 12px;
}

.tty-body {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 1.75;
  color: #8fffb5;
  text-shadow: 0 0 8px rgba(84, 247, 140, .3);
  max-width: 72ch; /* a real teletype page is 72 columns */
}

/* ============================================================
   COLOPHON
   ============================================================ */

.colophon {
  margin-top: 130px;
  border-top: 1px solid #241c13;
  padding: 64px 0 72px;
}

.colophon-inner {
  width: var(--w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}

.colo-mark {
  font-family: "Archivo", sans-serif;
  font-stretch: 125%;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .1em;
  color: var(--amber);
  border: 2px solid var(--amber-deep);
  border-radius: 3px;
  padding: 6px 10px;
}

.colo-line {
  max-width: 68ch;
  color: var(--body-dim);
  font-size: 15px;
}

.colo-tech {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: .16em;
  color: #8a7a61;
  max-width: 72ch;
  line-height: 2;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1080px) {
  /* the clock column squeezes the wordmark on tablets */
  .wordmark { font-size: clamp(2rem, 6.3vw, 4.4rem); }

  .rx-grid { grid-template-columns: 1fr; }

  .ctrl-col {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 14px;
  }
  .readout-block { flex: 1 1 240px; }
  .smeter-block { flex: 0 1 180px; }
  .lamp-row { flex: 1 1 160px; flex-direction: column; justify-content: center; align-items: flex-start; }
  .audio-btn { width: auto; flex: 1 1 180px; align-self: center; }
  .audio-note { display: none; }
  .knob-block { margin-top: 0; flex: 0 0 auto; }
  .knob { width: 84px; height: 84px; }
  .knob-face { width: 58px; height: 58px; }

  .fall-wrap { height: 360px; }

  .pad-grid { grid-template-columns: 1fr; gap: 40px; }
  .worksheet { max-width: 560px; }
}

@media (max-width: 860px) {
  .dossier-grid { grid-template-columns: 1fr; gap: 44px; }
  .dossier-featured .d-fields { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --w: calc(100% - 32px); }

  .masthead { padding-top: 32px; }
  .masthead-inner { grid-template-columns: 1fr; }
  .wordmark { font-size: clamp(2rem, 9vw, 4.4rem); }
  .masthead-sub { font-size: 10px; letter-spacing: .28em; }
  .masthead-clock { grid-column: 1; grid-row: auto; align-items: flex-start; margin-top: 12px; }
  .masthead-clock .utc { font-size: 20px; }
  .chassis-model { font-size: 8.5px; letter-spacing: .1em; }

  .chassis { padding: 22px 16px; border-radius: 9px; }
  .chassis-head { flex-direction: column; gap: 4px; margin-bottom: 14px; }
  .chassis-serial { display: none; }
  .fall-wrap { height: 300px; }
  .scope-wrap { height: 64px; }

  .freq-readout { font-size: 42px; }

  .decode-strip { grid-template-columns: 1fr; gap: 6px; }
  .decode-label { text-align: left; }
  .ticker { font-size: 17px; }
  .ticker-cursor { width: 9px; height: 19px; }
  .ticker-glass { height: 46px; padding: 0 12px; }

  .stations-section, .pad-section, .reports-section { padding-top: 84px; }

  .d-head { flex-direction: column; }
  .stamp { align-self: flex-start; }
  .dossier-body { padding: 22px 18px; }

  .worksheet { padding: 22px 16px; transform: none; }
  .ws-head { padding-right: 0; } /* stamp is hidden here */
  .ws-row { grid-template-columns: 64px 1fr; gap: 8px; }
  .ws-digits { font-size: 15px; letter-spacing: .06em; }
  .ws-rule { margin-left: 72px; }
  .stamp-ws { display: none; }

  .tty-report { padding: 22px 18px; }

  .rx-hint { font-size: 8.5px; letter-spacing: .12em; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rev { opacity: 1; transform: none; }
  .rev.in .stamp { animation: none; }
  .wordmark .wl { opacity: 1; filter: none; transform: none; }
  .freq-readout.flick { animation: none; }
  .ticker-cursor { animation: none; }
  .audio-btn[aria-pressed="true"] .audio-btn-dot { animation: none; }
  .boot-veil { transition: none; }
  .sec-eyebrow::after { transform: scaleX(1); transition: none; }
  .dossier-body, .dossier-tab { transition: none; }
  .dossier:hover .dossier-body { transform: none; }
}
