/* ============================================================
   NODE 1 — jaramie.com
   BBS chrome, broadcast soul
   ============================================================ */

/* ---------- TOKENS ---------- */

:root {
  /* type scale */
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  /* display-font floor is 24px — used for guide/credit titles */
  --text-head: clamp(1.5rem, 1.28rem + 0.7vw, 1.8125rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4.5vw, 5rem);

  /* spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* fonts */
  --font-display: 'Clash Display', 'Arial Black', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* SMPTE-ish bar colours — decorative, fixed in both modes */
  --bar-1: #c8c8c8;
  --bar-2: #c8c800;
  --bar-3: #00c8c8;
  --bar-4: #00c832;
  --bar-5: #c800c8;
  --bar-6: #c81e1e;
  --bar-7: #1e28c8;

  --shell: min(1220px, 100% - 2 * var(--gutter));
  --gutter: clamp(1rem, 4vw, 3rem);
}

/* ---------- NIGHT (default) ---------- */

:root,
[data-signal='night'] {
  color-scheme: dark;
  --c-bg: oklch(0.145 0.012 145);
  --c-bg-deep: oklch(0.105 0.01 145);
  --c-surface: oklch(0.19 0.014 145);
  --c-surface-2: oklch(0.235 0.016 140);
  --c-border: oklch(0.36 0.022 135);
  --c-border-soft: oklch(0.28 0.018 140);
  --c-text: oklch(0.93 0.026 88);
  --c-muted: oklch(0.71 0.035 85);
  --c-faint: oklch(0.55 0.03 90);
  --c-amber: oklch(0.815 0.155 78);
  --c-amber-dim: oklch(0.62 0.12 75);
  --c-cyan: oklch(0.84 0.115 197);
  --c-red: oklch(0.65 0.21 26);
  --scan-opacity: 0.5;
  --vignette-opacity: 1;
  --img-blend: luminosity;
  --img-opacity: 0.32;
}

/* ---------- DAYLIGHT ---------- */

[data-signal='day'] {
  color-scheme: light;
  --c-bg: oklch(0.935 0.019 86);
  --c-bg-deep: oklch(0.885 0.026 84);
  --c-surface: oklch(0.968 0.014 88);
  --c-surface-2: oklch(0.9 0.024 85);
  --c-border: oklch(0.62 0.04 72);
  --c-border-soft: oklch(0.77 0.032 78);
  --c-text: oklch(0.2 0.026 62);
  --c-muted: oklch(0.39 0.032 66);
  --c-faint: oklch(0.51 0.034 68);
  --c-amber: oklch(0.47 0.155 52);
  --c-amber-dim: oklch(0.56 0.135 56);
  --c-cyan: oklch(0.42 0.14 224);
  --c-red: oklch(0.48 0.2 26);
  --scan-opacity: 0.2;
  --vignette-opacity: 0.4;
  --img-blend: multiply;
  --img-opacity: 0.38;
}

/* ---------- SHELL ---------- */

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  overflow-x: hidden;
}

.wrap {
  width: var(--shell);
  margin-inline: auto;
}

section {
  position: relative;
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}

/* CRT overlays — fixed, non-interactive */
.crt,
.crt-vignette {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.crt {
  background-image: repeating-linear-gradient(
    to bottom,
    oklch(0 0 0 / 0.16) 0 1px,
    transparent 1px 3px
  );
  opacity: var(--scan-opacity);
  mix-blend-mode: multiply;
}

.crt-vignette {
  opacity: var(--vignette-opacity);
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 55%, oklch(0 0 0 / 0.55) 100%);
}

.crt-flicker {
  position: fixed;
  inset: 0;
  z-index: 201;
  pointer-events: none;
  background: var(--c-amber);
  opacity: 0;
  mix-blend-mode: soft-light;
  animation: flicker 7.3s steps(1, end) infinite;
}

@keyframes flicker {
  0%, 96%, 100% { opacity: 0; }
  97% { opacity: 0.05; }
  98% { opacity: 0.015; }
  99% { opacity: 0.04; }
}

@media (prefers-reduced-motion: reduce) {
  .crt-flicker { display: none; }
}

/* ---------- TYPE PRIMITIVES ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prose {
  max-width: 66ch;
}

.prose p + p {
  margin-top: var(--space-5);
}

.prose strong {
  color: var(--c-amber);
  font-weight: 600;
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--c-text);
}

.muted {
  color: var(--c-muted);
}

a.link {
  color: var(--c-cyan);
  text-decoration: none;
  border-bottom: 1px solid oklch(from var(--c-cyan) l c h / 0.4);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

a.link:hover {
  border-bottom-color: var(--c-cyan);
  color: var(--c-text);
}

/* ---------- COLOUR BARS ---------- */

.bars {
  display: flex;
  height: 4px;
  width: 100%;
}

.bars span {
  flex: 1;
}

.bars span:nth-child(1) { background: var(--bar-1); }
.bars span:nth-child(2) { background: var(--bar-2); }
.bars span:nth-child(3) { background: var(--bar-3); }
.bars span:nth-child(4) { background: var(--bar-4); }
.bars span:nth-child(5) { background: var(--bar-5); }
.bars span:nth-child(6) { background: var(--bar-6); }
.bars span:nth-child(7) { background: var(--bar-7); }

/* ---------- STATION BAR ---------- */

.station {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--c-bg-deep) l c h / 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border-soft);
}

.station__row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  width: var(--shell);
  margin-inline: auto;
  min-height: 60px;
  padding-block: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.brand svg {
  width: 30px;
  height: 30px;
  color: var(--c-amber);
  flex-shrink: 0;
}

.brand__id {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.1;
}

.brand__sub {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--c-faint);
  font-weight: 400;
}

.tally {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border: 1px solid oklch(from var(--c-red) l c h / 0.55);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--c-red);
  white-space: nowrap;
}

.tally::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-red);
  animation: pulse 1.9s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.chan-nav {
  display: flex;
  gap: var(--space-1);
  margin-left: auto;
  flex-wrap: wrap;
}

.chan-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-muted);
  border: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.chan-nav a b {
  color: var(--c-amber-dim);
  font-weight: 500;
}

.chan-nav a:hover,
.chan-nav a:focus-visible {
  color: var(--c-text);
  border-color: var(--c-border);
  background: var(--c-surface);
}

.chan-nav a:hover b {
  color: var(--c-amber);
}

.signal-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  border: 1px solid var(--c-border);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  color: var(--c-muted);
  flex-shrink: 0;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.signal-toggle:hover {
  color: var(--c-amber);
  border-color: var(--c-amber-dim);
}

.signal-toggle svg {
  width: 15px;
  height: 15px;
}

.nav-toggle {
  display: none;
}

/* ---------- PANEL (BBS frame) ---------- */

.panel {
  position: relative;
  border: 1px solid var(--c-border-soft);
  background: oklch(from var(--c-surface) l c h / 0.62);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
}

.panel::before,
.panel::after {
  content: '';
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1px solid var(--c-amber);
  pointer-events: none;
}

.panel::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.panel::after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

.panel__tag {
  position: absolute;
  top: 0;
  left: var(--space-6);
  transform: translateY(-50%);
  background: var(--c-bg);
  padding-inline: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-amber);
}

/* ---------- SECTION HEADER ---------- */

.sec-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}

.sec-head__ch {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--c-bg);
  background: var(--c-amber);
  padding: var(--space-1) var(--space-3);
}

.sec-head__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
  grid-column: 1 / -1;
  grid-row: 2;
}

.sec-head__tc {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--c-faint);
  font-variant-numeric: tabular-nums;
}

.sec-head__rule {
  height: 1px;
  background: linear-gradient(to right, var(--c-border), transparent);
}

.sec-head__note {
  grid-column: 1 / -1;
  grid-row: 3;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-top: var(--space-3);
}

/* ---------- HERO / SIGN-ON ---------- */

.signon {
  position: relative;
  min-height: min(80vh, 860px);
  display: flex;
  align-items: center;
  padding-block: clamp(var(--space-16), 10vw, var(--space-24));
  overflow: hidden;
  border-bottom: 1px solid var(--c-border-soft);
}

.signon__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.signon__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--img-opacity);
  mix-blend-mode: var(--img-blend);
  filter: saturate(0.6);
}

.signon__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--c-bg) 6%, oklch(from var(--c-bg) l c h / 0.55) 60%, var(--c-bg) 100%),
    linear-gradient(to bottom, var(--c-bg), transparent 30%, var(--c-bg));
}

.signon__inner {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin-inline: auto;
}

.signon__ident {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-amber);
  margin-bottom: var(--space-6);
}

.signon__ident em {
  font-style: normal;
  color: var(--c-faint);
  letter-spacing: 0.18em;
}

.signon h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.signon h1 span {
  display: block;
  color: var(--c-amber);
}

.signon__lede {
  max-width: 42ch;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--c-text);
}

.signon__lede em {
  font-style: normal;
  color: var(--c-muted);
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-base);
}

.readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-top: clamp(var(--space-10), 6vw, var(--space-16));
  background: var(--c-border-soft);
  border: 1px solid var(--c-border-soft);
}

.readout div {
  background: oklch(from var(--c-bg) l c h / 0.9);
  padding: var(--space-4) var(--space-5);
}

.readout dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-faint);
  margin-bottom: var(--space-2);
}

.readout dd {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-amber);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.readout dd small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  margin-top: var(--space-1);
  text-transform: uppercase;
}

.tc-overlay {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 150;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: oklch(from var(--c-amber) l c h / 0.65);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  text-shadow: 0 0 8px oklch(from var(--c-bg) l c h / 0.9);
}

/* ---------- CARRIER SIGNAL / ABOUT ---------- */

.carrier {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: start;
}

.carrier__aside {
  display: grid;
  gap: var(--space-6);
}

.pull {
  border-left: 2px solid var(--c-amber);
  padding-left: var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-head);
  font-weight: 500;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: -0.01em;
}

.seedlist {
  display: grid;
  gap: var(--space-2);
}

.seedlist li {
  display: flex;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  padding-block: var(--space-2);
  border-bottom: 1px dotted var(--c-border-soft);
}

.seedlist li b {
  color: var(--c-amber);
  font-weight: 500;
  flex-shrink: 0;
}

/* ---------- PROGRAM GUIDE ---------- */

.guide {
  border-top: 1px solid var(--c-border);
}

.slot {
  display: grid;
  grid-template-columns: 118px 1fr 186px;
  gap: var(--space-6);
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--c-border-soft);
  align-items: start;
  transition: background 0.25s var(--ease);
}

.slot:hover {
  background: oklch(from var(--c-surface) l c h / 0.5);
}

.slot__time {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-amber);
  font-variant-numeric: tabular-nums;
  padding-top: 0.35em;
}

.slot__time small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-faint);
  margin-top: var(--space-1);
}

.slot__title {
  font-family: var(--font-display);
  font-size: var(--text-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: var(--space-2);
}

.slot__title i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  color: var(--c-faint);
  text-transform: uppercase;
  vertical-align: 0.35em;
  margin-left: var(--space-2);
  font-weight: 400;
}

.slot__genre {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-cyan);
  margin-bottom: var(--space-3);
}

.slot__desc {
  color: var(--c-muted);
  max-width: 62ch;
  font-size: var(--text-base);
}

.slot__status {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
  border: 1px solid var(--c-border-soft);
  padding: var(--space-3);
  display: grid;
  gap: var(--space-2);
  justify-self: end;
  width: 100%;
}

.slot__status b {
  display: block;
  color: var(--c-amber);
  font-weight: 500;
  margin-top: var(--space-1);
}

.meter {
  height: 5px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border-soft);
}

.meter i {
  display: block;
  height: 100%;
  background: var(--c-amber-dim);
}

/* ---------- INTERSTITIAL ---------- */

.interstitial {
  position: relative;
  height: clamp(180px, 26vw, 320px);
  overflow: hidden;
  border-block: 1px solid var(--c-border-soft);
  display: grid;
  place-items: center;
}

.interstitial img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(0.85) contrast(1.05);
}

[data-signal='day'] .interstitial img {
  opacity: 0.4;
}

.interstitial::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--c-bg) 0%,
    oklch(from var(--c-bg) l c h / 0.35) 45%,
    var(--c-bg) 100%
  );
}

.interstitial__line {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-text);
  text-align: center;
  padding-inline: var(--space-6);
  text-shadow: 0 2px 14px oklch(from var(--c-bg) l c h / 0.95);
}

.interstitial .bars {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 5px;
}

/* ---------- TRANSMISSION LOG / REPOS ---------- */

.repos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: var(--space-4);
}

.repo {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--c-border-soft);
  background: oklch(from var(--c-surface) l c h / 0.5);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.25s var(--ease), background 0.2s var(--ease);
}

.repo:hover {
  border-color: var(--c-amber-dim);
  background: oklch(from var(--c-surface) l c h / 0.95);
  transform: translateY(-2px);
}

.repo__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.repo__name {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-amber);
}

.repo__lang {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-faint);
  white-space: nowrap;
}

.repo p {
  font-size: var(--text-sm);
  color: var(--c-muted);
  line-height: 1.55;
  margin-top: auto;
}

.repo__stars {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--c-cyan);
}

.log-foot {
  margin-top: var(--space-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-6);
  border-top: 1px solid var(--c-border-soft);
}

/* ---------- OPERATOR FILE ---------- */

.operator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: start;
}

.credit {
  display: grid;
  gap: var(--space-5);
}

.credit__row {
  display: grid;
  gap: var(--space-2);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--c-border-soft);
}

.credit__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.credit__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-faint);
}

.credit__value {
  font-family: var(--font-display);
  font-size: var(--text-head);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.15;
}

.credit__meta {
  font-size: var(--text-sm);
  color: var(--c-muted);
}

.stack {
  display: grid;
  gap: var(--space-6);
}

.stack__group h4 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-faint);
  font-weight: 400;
  margin-bottom: var(--space-3);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chips li {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--c-border-soft);
  color: var(--c-muted);
  background: oklch(from var(--c-surface) l c h / 0.6);
}

/* ---------- TAPE ARCHIVE ---------- */

.tape {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--c-border);
}

.tape__row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-6);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--c-border-soft);
  align-items: baseline;
}

.tape__row:hover .tape__year {
  color: var(--c-amber);
}

.tape__year {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-amber-dim);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s var(--ease);
}

.tape__body h4 {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

.tape__body p {
  color: var(--c-muted);
  font-size: var(--text-sm);
  max-width: 70ch;
}

.tape__row--now .tape__year,
.tape__row--now .tape__body h4 {
  color: var(--c-amber);
}

.archive {
  margin-top: clamp(var(--space-12), 6vw, var(--space-20));
}

.archive__list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.archive__list li {
  display: grid;
  grid-template-columns: 118px 1fr auto;
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px dotted var(--c-border-soft);
  font-size: var(--text-sm);
}

.archive__list .a-tape {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--c-faint);
}

.archive__list .a-status {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--c-cyan);
  text-transform: uppercase;
  white-space: nowrap;
}

.archive__list .a-link {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--c-amber);
  text-decoration: none;
  border-bottom: 1px solid oklch(from var(--c-amber) l c h / 0.45);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.archive__list .a-link:hover,
.archive__list .a-link:focus-visible {
  color: var(--c-cyan);
  border-bottom-color: var(--c-cyan);
}

.archive__list li {
  color: var(--c-muted);
}

/* ---------- SIGN-OFF ---------- */

.signoff {
  border-top: 1px solid var(--c-border);
  background: var(--c-bg-deep);
}

.signoff__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

.testcard {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--c-border);
  display: grid;
  grid-template-rows: 1fr auto 34px;
  overflow: hidden;
  background: var(--c-bg);
}

.testcard__bars {
  display: flex;
}

.testcard__bars span {
  flex: 1;
  opacity: 0.85;
}

.testcard__bars span:nth-child(1) { background: var(--bar-1); }
.testcard__bars span:nth-child(2) { background: var(--bar-2); }
.testcard__bars span:nth-child(3) { background: var(--bar-3); }
.testcard__bars span:nth-child(4) { background: var(--bar-4); }
.testcard__bars span:nth-child(5) { background: var(--bar-5); }
.testcard__bars span:nth-child(6) { background: var(--bar-6); }
.testcard__bars span:nth-child(7) { background: var(--bar-7); }

.testcard__mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: oklch(0.18 0.01 250);
  color: oklch(0.9 0.02 90);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.testcard__grey {
  display: flex;
}

.testcard__grey span {
  flex: 1;
}

.contact h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.05;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.contact p {
  color: var(--c-muted);
  max-width: 52ch;
  margin-bottom: var(--space-8);
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--c-amber-dim);
  color: var(--c-amber);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  background: var(--c-amber);
  color: var(--c-bg);
  border-color: var(--c-amber);
}

.btn--ghost {
  border-color: var(--c-border);
  color: var(--c-muted);
}

.btn--ghost:hover {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-text);
}

.btn svg {
  width: 16px;
  height: 16px;
}

footer.foot {
  border-top: 1px solid var(--c-border-soft);
  background: var(--c-bg-deep);
}

.foot__row {
  width: var(--shell);
  margin-inline: auto;
  padding-block: var(--space-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-faint);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.foot__links a {
  color: var(--c-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.foot__links a:hover,
.foot__links a:focus-visible {
  color: var(--c-cyan);
  border-bottom-color: var(--c-cyan);
}

/* ---------- SCROLL REVEAL (channel wipe) ---------- */

/* Negative insets keep overlapping chrome (panel tags, corner brackets)
   from being clipped by the wipe. */
.reveal {
  opacity: 0;
  clip-path: inset(-2rem 100% -2rem -2rem);
  transition: opacity 0.5s var(--ease), clip-path 0.8s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  clip-path: inset(-2rem -2rem -2rem -2rem);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    clip-path: none;
    transition: none;
  }
}

/* ---------- HEADING ABERRATION (hover only) ---------- */

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .sec-head__title,
  .signon h1 {
    transition: text-shadow 0.18s var(--ease);
  }
  .sec-head:hover .sec-head__title,
  .signon:hover h1 {
    text-shadow:
      -1.5px 0 0 oklch(from var(--c-red) l c h / 0.55),
      1.5px 0 0 oklch(from var(--c-cyan) l c h / 0.55);
  }
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1080px) {
  .carrier,
  .operator,
  .signoff__grid {
    grid-template-columns: 1fr;
  }
  .signoff__grid {
    gap: var(--space-10);
  }
  .testcard {
    max-width: 460px;
  }
}

@media (max-width: 900px) {
  .slot {
    grid-template-columns: 100px 1fr;
    gap: var(--space-4) var(--space-5);
  }
  .slot__status {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 44px;
    min-width: 44px;
    padding-inline: var(--space-3);
    margin-left: auto;
    border: 1px solid var(--c-border);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
    color: var(--c-muted);
  }
  .chan-nav {
    display: none;
    order: 5;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    gap: 0;
    padding-bottom: var(--space-4);
    border-top: 1px solid var(--c-border-soft);
    padding-top: var(--space-3);
  }
  .chan-nav.is-open {
    display: flex;
  }
  .chan-nav a {
    padding: var(--space-3) var(--space-2);
    min-height: 44px;
  }
  /* wrap must stay on: the open channel menu is width:100% and needs its own row */
  .station__row {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .chan-nav {
    order: 5;
  }
}

@media (max-width: 620px) {
  /* keep the station bar on one row: icon-only toggle, tighter tally */
  #signalLabel {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .signal-toggle {
    padding: var(--space-2);
    min-width: 40px;
    justify-content: center;
  }
  .tally {
    padding: var(--space-1) var(--space-2);
    letter-spacing: 0.12em;
  }
  .brand__mark {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand__sub {
    display: none;
  }
  .signon h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
  }
  .slot {
    grid-template-columns: 1fr;
  }
  .slot__time {
    padding-top: 0;
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
  }
  .slot__time small {
    margin-top: 0;
  }
  .tape__row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .archive__list li {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
  .readout dd {
    font-size: var(--text-base);
  }
  .tc-overlay {
    display: none;
  }
  .signon__ident {
    display: block;
    letter-spacing: 0.14em;
  }
  .signon__ident em {
    display: block;
    letter-spacing: 0.14em;
    margin-top: var(--space-1);
  }
}
