* {
  box-sizing: border-box;
}

:root {
  --bg: #050705;
  --fg: #c7d6c7;
  --dim: #6f7f70;
  --faint: #263126;
  --hot: #edf7ed;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(46, 67, 48, 0.16), transparent 34rem),
    var(--bg);
  color: var(--fg);
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.018) 0,
      rgba(255,255,255,0.018) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: screen;
}

.station {
  position: relative;
  width: min(90vw, 720px);
  padding: 46px 48px 34px;
  border: 1px solid var(--faint);
  background: rgba(5, 7, 5, 0.72);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.012) inset,
    0 24px 80px rgba(0,0,0,0.45);
}

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.scanline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  top: -1px;
  background: rgba(210, 255, 210, 0.12);
  animation: scan 17s linear infinite;
}

@keyframes scan {
  to { transform: translateY(560px); }
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--faint);
}

.lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.4rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
}

.indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 8px rgba(199, 214, 199, 0.4);
  opacity: 0.9;
}

.indicator.lost {
  opacity: 0.15;
  box-shadow: none;
}

.clock {
  color: var(--dim);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.readout {
  padding: 30px 0 24px;
}

.row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  padding: 5px 0;
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  letter-spacing: 0.055em;
}

.label {
  color: var(--dim);
}

.value {
  color: var(--hot);
}

.transmission {
  min-height: 88px;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  padding: 20px 0 18px;
}

.carrier {
  color: var(--hot);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.message {
  margin-top: 10px;
  color: var(--dim);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  color: #4d5a4e;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

.station.signal-lost .value {
  color: #899189;
}

.station.signal-lost .carrier {
  animation: blink 1.25s steps(1, end) infinite;
}

@keyframes blink {
  0%, 52% { opacity: 1; }
  53%, 100% { opacity: 0.22; }
}

@media (max-width: 620px) {
  .station {
    width: 92vw;
    padding: 32px 24px 26px;
  }

  .masthead {
    display: block;
  }

  .clock {
    margin-top: 14px;
  }

  .row {
    grid-template-columns: 7rem 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scanline::after,
  .station.signal-lost .carrier {
    animation: none;
  }
}
