@font-face {
  font-family: "Fira Mono";
  src: url("/fonts/fira-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07070a;
  --fg: #d8d0e8;
  --accent: #7d9bff;
  --orange: #ff7a3d;
  --purple: #c4b5fd;
  --dim: #857e93;
  --line: rgba(125, 155, 255, 0.22);
  --warn: #ff7a3d;
  --emergency: #ff3b6b;
  --mode-internet: #00e5ff;
  --mode-internet-radio: #39ff14;
  --mode-radio: #ffbf00;
  --mode-radio-plus: #ff4dff;
  --font-mono: "Fira Mono", ui-monospace, monospace;
  --topbar-h: 52px;
  color-scheme: dark;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  color: var(--fg);
  font-family: var(--font-mono);
  background: var(--bg);
}

a, button, input, select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(125, 155, 255, 0.18);
}

.nav-toggle,
.nav-backdrop {
  display: none;
}

body.page-doc { overflow: auto; }

#scan {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
  mix-blend-mode: multiply;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-track { background: #111116; }
::-webkit-scrollbar-thumb { background: var(--accent); }

.topbar {
  position: relative;
  z-index: 12;
  min-height: 48px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #050508;
}

.prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.06em;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
a.prompt:hover .brand-weechat { color: var(--orange); }
.prompt .who { color: var(--accent); }
.prompt .sym { color: var(--orange); }
.prompt .brand-mark {
  width: 28px;
  height: 26px;
  flex: none;
  display: block;
}
.prompt .brand-weechat { color: var(--fg); font-weight: 700; }
.prompt .brand-radio { color: var(--accent); font-weight: 400; }

.clock-mod {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 12px;
  margin-left: auto;
  font-size: 11px;
  line-height: 1.3;
  color: var(--dim);
  white-space: nowrap;
}
.clock-mod .sub { color: var(--dim); }
.clock-mod .colon { animation: blink 1s step-end infinite; color: var(--orange); }

.topbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}
.topbar-end .clock-mod { margin-left: 0; }

nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
nav a {
  color: var(--purple);
  text-decoration: none;
  font-size: 13px;
}
nav a::before { content: ""; }
nav a.on, nav a:hover { color: var(--orange); }
nav a.on::before { content: "▸ "; color: var(--accent); }
/* Top bar: github with its icon, and download as the one filled button. */
.topbar nav { align-items: center; }
.topbar nav .nav-github { display: inline-flex; align-items: center; gap: 5px; }
.topbar nav .nav-cta {
  padding: 3px 10px;
  border-radius: 3px;
  background: var(--accent);
  color: #050508;
  font-weight: 700;
}
.topbar nav .nav-cta:hover { background: var(--orange); color: #050508; }
.topbar nav .nav-cta.on { color: #050508; }
.topbar nav .nav-cta.on::before { color: #050508; }
.topbar nav .nav-cta:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
/* Narrow desktops keep every nav item on one line; the local clock gives way. */
@media (min-width: 961px) and (max-width: 1240px) {
  .topbar #clock-local { display: none; }
}
@media (min-width: 961px) and (max-width: 1100px) {
  .topbar .nav-github-text { display: none; }
}
/* The map's top bar also carries node counts; below 1000 px the clock
   gives way so the bar stays on one line (#185). */
@media (min-width: 961px) and (max-width: 999px) {
  .topbar-end:has(#stats) .clock-mod { display: none; }
}

#stats {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
#stats b {
  color: var(--accent);
  font-weight: 400;
  display: inline-block;
  min-width: 6ch;
  text-align: right;
}

.workspace {
  position: relative;
  height: calc(100% - 48px);
  min-height: 0;
  display: grid;
  grid-template-columns: 18% 1fr 18%;
  gap: 0;
}

.mod_column {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
}
#mod_column_right {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.mod {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  opacity: 0;
}
.mod.activated, .mod_column.activated .mod { opacity: 1; animation: fadeIn 0.35s ease forwards; }
.mod.grow { flex: 1; border-bottom: 0; }

h3.title {
  font-weight: 400;
  font-size: 12px;
  color: var(--accent);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
h3.title p { margin: 0; }
h3.title p:last-child { color: var(--orange); text-align: right; }
.release h3.title p:first-child { color: var(--accent); }

.mod-body {
  flex: 1;
  min-height: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg);
}
.mod-body.scroll { overflow: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.kv span { color: var(--dim); }
.kv b { font-weight: 400; color: var(--purple); }

.station {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid rgba(125, 155, 255, 0.1);
  cursor: pointer;
  font-size: 12px;
}
.station b { display: block; font-weight: 400; color: var(--accent); }
.station .heard { display: block; color: var(--dim); font-size: 11px; }
.station.online .heard { color: var(--fg); }
.station:hover { color: var(--orange); }
.station.on, .station.on b { color: var(--orange); }
.station .mode-mark {
  width: 22px;
  height: 21px;
  margin-top: 2px;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
}

.mode-mark {
  width: 22px;
  height: 21px;
  flex: none;
  display: block;
  overflow: visible;
}

.maplibregl-marker.map-mark-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 26px;
  cursor: pointer;
  overflow: visible;
}
.map-mark-age {
  width: 28px;
  height: 26px;
}
.map-mark-wrap .tower-freq {
  position: absolute;
  left: calc(100% + 3px);
  top: 6px;
  font-family: "Fira Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 4px #07070a, 0 1px 2px #07070a;
}
.map-mark-wrap .kind-tag {
  position: absolute;
  left: calc(100% + 2px);
  top: 7px;
  color: var(--dim);
  font-family: "Fira Mono", ui-monospace, monospace;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 4px #07070a, 0 1px 2px #07070a;
}
.map-mark-wrap.mail-overlay .tower-freq {
  top: 18px;
}
.map-mark-wrap.mail-overlay::after {
  content: "e";
  position: absolute;
  left: 100%;
  top: 4px;
  margin-left: 1px;
  color: var(--orange);
  font-family: "Fira Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
.mail-logo {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex: none;
  margin-right: 4px;
}
.mail-logo .mode-mark {
  width: 22px;
  height: 21px;
}
.mail-e {
  color: var(--orange);
  font-family: "Fira Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.map-mark-wrap.pulse-tx svg {
  animation: wcr-pulse-tx 1.2s ease-out 1;
}
.map-mark-wrap.pulse-rx svg {
  animation: wcr-pulse-rx 1.2s ease-out 1;
}
@keyframes wcr-pulse-tx {
  0% { filter: drop-shadow(0 0 0 rgba(57, 255, 20, 0)); transform: scale(1); }
  40% { filter: drop-shadow(0 0 14px rgba(57, 255, 20, 0.95)); transform: scale(1.15); }
  100% { filter: drop-shadow(0 0 6px rgba(7, 7, 10, 0.85)); transform: scale(1); }
}
@keyframes wcr-pulse-rx {
  0% { filter: drop-shadow(0 0 0 rgba(0, 229, 255, 0)); transform: scale(1); }
  40% { filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.95)); transform: scale(1.12); }
  100% { filter: drop-shadow(0 0 6px rgba(7, 7, 10, 0.85)); transform: scale(1); }
}
#map-arcs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.map-mark-wrap svg,
.map-mark {
  width: 28px;
  height: 26px;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 6px rgba(7, 7, 10, 0.85));
}

.mode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 11px;
  color: var(--dim);
}
.mode-row .mode-mark {
  width: 20px;
  height: 19px;
}
.mode-row .mode-name { min-width: 10em; }
/* Map page BANDS panel: name | frequency | stations on one grid row.
   Class names are band-row-* so the planner's big .band-freq never leaks in. */
.band-row {
  display: grid;
  grid-template-columns: 6em 1fr 3ch;
  cursor: pointer;
}
.band-row:hover .band-row-name { color: var(--fg); }
.band-row.on, .band-row.on .band-row-name { color: var(--orange); }
.band-row-freq { color: var(--purple); font-variant-numeric: tabular-nums; }
.band-row-unit { color: var(--dim); }
.band-row-n { text-align: right; color: var(--accent); font-variant-numeric: tabular-nums; }
.mode-bar {
  flex: 1;
  height: 4px;
  background: #1a1a22;
}
.mode-bar i { display: block; height: 100%; }

#spark {
  width: 100%;
  height: 64px;
  display: block;
}

#main_shell {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #15151e;
}

.map-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 0;
  position: relative;
}
#map {
  flex: 1;
  min-height: 12vh;
  border: 1px solid var(--line);
}

.map-key {
  position: absolute;
  z-index: 5;
  left: 20px;
  bottom: 36px;
  width: max-content;
  max-width: min(420px, calc(100% - 40px));
  background: rgba(7, 7, 10, 0.92);
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: auto;
}
.map-key summary {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--fg);
  list-style: none;
}
.map-key summary::-webkit-details-marker { display: none; }
.map-key summary::marker { content: ""; }
.map-key summary::before {
  content: "▸";
  margin-right: 6px;
  color: var(--orange);
}
.map-key[open] summary::before { content: "▾"; }
.map-key summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.map-key-body {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 16px;
  align-items: start;
  padding: 0 10px 8px;
}
.map-key-lines,
.map-key-modes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.map-key li {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.map-key-line {
  width: 36px;
  height: 12px;
  flex: none;
  display: block;
}
.map-key-pin {
  width: 16px;
  height: 15px;
  flex: none;
  display: block;
}
.map-key-pin .map-key-mark {
  width: 16px;
  height: 15px;
  display: block;
  overflow: visible;
}
.map-key-note {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: var(--fg);
  font-size: 12px;
  line-height: 1.4;
}

.map-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.map-night {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--orange);
  font-size: 11px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.map-night input {
  accent-color: var(--orange);
  width: 12px;
  height: 12px;
  margin: 0;
  cursor: pointer;
}
.map-style {
  margin: 0;
  min-width: 0;
}
.map-style select {
  appearance: none;
  -webkit-appearance: none;
  background: #000;
  border: 1px solid var(--line);
  color: var(--orange);
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  padding: 2px 20px 2px 8px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--orange) 50%),
    linear-gradient(135deg, var(--orange) 50%, transparent 50%);
  background-position: calc(100% - 11px) 8px, calc(100% - 7px) 8px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.map-style select:hover,
.map-style select:focus {
  border-color: var(--orange);
  outline: none;
}

.log-panel {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding: 8px 12px 10px;
  background: #050508;
}

.tape {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}
#play,
#speed {
  flex-shrink: 0;
  min-width: 72px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}
#speed { min-width: 44px; }
#play[aria-pressed="true"] { background: var(--accent); color: #000; }
#play:hover,
#speed:hover { border-color: var(--orange); color: var(--orange); }
#play[aria-pressed="true"]:hover { background: var(--orange); color: #000; border-color: var(--orange); }
.tape-title { font-size: 12px; color: var(--accent); }
.tape-hint { font-size: 11px; color: var(--dim); margin-top: 2px; }
.scrub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--dim);
}
.scrub-row span { white-space: nowrap; }
#scrub { width: 100%; accent-color: var(--orange); cursor: pointer; }
#ticker {
  font-size: 12px;
  height: 40px;
  overflow: hidden;
  margin-top: 4px;
  color: var(--purple);
}
#ticker.reel {
  height: auto;
  overflow: auto;
  margin-top: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--purple);
}
#ticker.reel .reel-line {
  padding: 4px 0;
  border-bottom: 1px solid rgba(125, 155, 255, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ticker.reel .reel-line:first-child { color: var(--fg); }
.station-pop {
  position: absolute;
  top: 40px;
  left: 12px;
  z-index: 3;
  min-width: 168px;
  max-width: 240px;
  padding: 8px 10px;
  background: rgba(7, 7, 10, 0.92);
  border: 1px solid var(--line);
  font-size: 11px;
}

.page-wrap {
  height: calc(100% - 48px);
  overflow: auto;
  padding: 8vh 20px 48px;
  display: flex;
  justify-content: center;
}
.page-panel {
  width: min(92vw, 800px);
  line-height: 1.65;
}
.page-panel h1 {
  font-weight: 400;
  font-size: 28px;
  color: var(--purple);
  margin-bottom: 18px;
  letter-spacing: 0;
  text-transform: none;
}
.page-panel h1 .who { color: var(--accent); }
.page-panel h1 .sym { color: var(--orange); }
.page-panel h2 {
  font-weight: 400;
  font-size: 14px;
  color: var(--accent);
  margin: 22px 0 8px;
  text-transform: none;
  letter-spacing: 0;
}
.page-panel h3 {
  font-weight: 400;
  font-size: 13px;
  color: var(--orange);
  margin: 16px 0 8px;
}
.page-panel p, .page-panel li { font-size: 14px; color: var(--fg); }
/* Keep a gap between back-to-back paragraphs on plain pages (hub and downloads pages). */
.page-panel > p:not([class]) + p:not([class]) { margin-top: 12px; }
.page-panel.story p {
  margin: 0 0 1.35em;
  line-height: 1.65;
}
.page-panel.story p:last-child { margin-bottom: 0; }
.page-panel em { font-style: italic; color: var(--purple); }
.page-panel ul { padding-left: 18px; margin: 8px 0 12px; }
.page-panel a { color: var(--orange); }
.page-panel code {
  color: var(--accent);
  background: #121218;
  padding: 0 5px;
  white-space: nowrap;
}
.crumb {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 10px;
}
.crumb a { color: var(--purple); text-decoration: none; }
.crumb a:hover { color: var(--orange); }
.lead { color: var(--purple); margin-bottom: 16px; }

.need, .ok, .note, .warn-box {
  border: 1px solid var(--line);
  padding: 12px 14px;
  margin: 12px 0 18px;
  background: rgba(0, 0, 0, 0.35);
}
.need h2, .ok h2, .note h2, .warn-box h2 { margin-top: 0; }
.ok { border-color: var(--mode-internet-radio); }
.warn-box { border-color: var(--warn); }
.note p, .need p, .ok p, .warn-box p { margin: 6px 0; }
.note p:last-child, .need p:last-child, .ok p:last-child, .warn-box p:last-child { margin-bottom: 0; }

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
a.guide-card {
  display: block;
  border: 1px solid var(--line);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--fg);
  background: rgba(0, 0, 0, 0.35);
}
a.guide-card:hover { border-color: var(--orange); color: var(--fg); }
.guide-card h2 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--accent);
}
.guide-card p {
  margin: 0;
  font-size: 13px;
  color: var(--dim);
}
.guide-card .tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--orange);
}
a.guide-card.featured {
  grid-column: 1 / -1;
  border-color: var(--orange);
  background: rgba(255, 122, 61, 0.08);
}
a.guide-card.featured h2 { color: var(--orange); }
a.guide-card.featured-star {
  border-color: var(--accent);
  background: rgba(125, 155, 255, 0.07);
}
a.guide-card.featured-star h2 { color: var(--accent); }
.docs-section-title {
  margin: 20px 0 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: normal;
}
.docs-featured-grid {
  grid-template-columns: 1fr 1fr;
}
.docs-featured-grid a.guide-card.featured {
  grid-column: auto;
}
@media (max-width: 720px) {
  .docs-featured-grid {
    grid-template-columns: 1fr;
  }
}
.docs-featured-grid a.guide-card {
  min-height: 8.5rem;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
  counter-reset: step;
}
.steps > li {
  position: relative;
  padding: 2px 0 16px 42px;
  border-left: 1px solid var(--line);
  margin-left: 14px;
}
.steps > li:last-child { border-left-color: transparent; }
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -14px;
  top: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: #07070a;
  text-align: center;
  line-height: 26px;
  font-size: 12px;
}

figure.diagram { margin: 12px 0 18px; }
figure.diagram figcaption {
  font-size: 12px;
  color: var(--dim);
  margin-top: 8px;
}
.dgm-wrap {
  border: 1px solid var(--line);
  background: #000;
  overflow-x: auto;
}
svg.dgm {
  display: block;
  width: 100%;
  height: auto;
}
svg.dgm text {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--fg);
}
svg.dgm .sub { font-size: 10px; fill: var(--dim); }
svg.dgm .tag {
  font-size: 10px;
  fill: var(--dim);
  letter-spacing: 0.1em;
}
svg.dgm .box {
  fill: #050509;
  stroke: var(--line);
  stroke-width: 1;
}
svg.dgm .box.radio { stroke: var(--mode-radio); }
svg.dgm .box.gw { stroke: var(--mode-internet-radio); }
svg.dgm .box.hub { stroke: var(--mode-internet); }
svg.dgm .box.rplus { stroke: var(--mode-radio-plus); }
svg.dgm .box.gate,
svg.dgm .box.accent { stroke: var(--accent); }
svg.dgm .box.orange { stroke: var(--orange); }
svg.dgm .box.off { stroke: var(--dim); }
svg.dgm .on-radio { fill: var(--mode-radio); }
svg.dgm .on-gw { fill: var(--mode-internet-radio); }
svg.dgm .on-hub { fill: var(--mode-internet); }
svg.dgm .on-rplus { fill: var(--mode-radio-plus); }
svg.dgm .on-gate,
svg.dgm .on-accent { fill: var(--accent); }
svg.dgm .on-orange { fill: var(--orange); }
svg.dgm .on-off { fill: var(--dim); }
svg.dgm .rf {
  stroke: var(--orange);
  stroke-width: 1.4;
  fill: none;
}
svg.dgm .net {
  stroke: var(--mode-internet);
  stroke-width: 1.4;
  fill: none;
}
svg.dgm .none {
  stroke: var(--dim);
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
  fill: none;
}
svg.dgm .wire {
  stroke: var(--accent);
  stroke-width: 1.4;
  fill: none;
}
svg.dgm .bt {
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-dasharray: 6 4;
  fill: none;
}
svg.dgm .lane {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}
svg.dgm .zone {
  fill: none;
  stroke: var(--mode-radio-plus);
  stroke-width: 1;
  stroke-dasharray: 4 5;
  opacity: 0.7;
}
svg.dgm .step { fill: #050509; stroke: var(--accent); }
svg.dgm .step-n { font-size: 10px; fill: var(--accent); }
svg.dgm .cross { stroke: var(--emergency); stroke-width: 1.6; }
svg.dgm .mk-rf { fill: var(--orange); }
svg.dgm .mk-accent { fill: var(--accent); }
svg.dgm .mk-net { fill: var(--mode-internet); }
svg.dgm .mk-dim { fill: var(--dim); }
svg.dgm .land {
  fill: #12121c;
  stroke: rgba(125, 155, 255, 0.55);
  stroke-width: 1.1;
  stroke-linejoin: round;
}
svg.dgm .border {
  fill: none;
  stroke: rgba(125, 155, 255, 0.22);
  stroke-width: 0.8;
}
svg.dgm .sea {
  font-size: 10px;
  fill: rgba(125, 155, 255, 0.38);
  letter-spacing: 0.16em;
}
svg.dgm .range {
  fill: rgba(255, 191, 0, 0.035);
  stroke: rgba(255, 191, 0, 0.7);
  stroke-width: 1.15;
  stroke-dasharray: 3 4;
}
svg.dgm .city {
  font-size: 13px;
  fill: var(--mode-radio);
  paint-order: stroke fill;
  stroke: #07070a;
  stroke-width: 4px;
}
svg.dgm .city.on-gw { fill: var(--mode-internet-radio); }
svg.dgm .city.on-hub { fill: var(--mode-internet); }
svg.dgm .hop-n {
  font-size: 11px;
  fill: var(--orange);
  paint-order: stroke fill;
  stroke: #07070a;
  stroke-width: 4px;
}
svg.dgm .town { fill: var(--dim); }
svg.dgm .town-name {
  font-size: 11px;
  fill: var(--dim);
  paint-order: stroke fill;
  stroke: #07070a;
  stroke-width: 3px;
}
svg.dgm .river {
  fill: none;
  stroke: rgba(125, 155, 255, 0.7);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.dgm .scale { stroke: var(--dim); stroke-width: 1.2; }
svg.dgm .hop-run {
  stroke-width: 1.8;
  stroke-dasharray: 8 14;
  marker-end: none;
}
@media (prefers-reduced-motion: no-preference) {
  svg.dgm .hop-run { animation: hop-march 1.15s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
  svg.dgm .hop-run { display: none; }
}
@keyframes hop-march { to { stroke-dashoffset: -44; } }

.dgm-key i.k-range {
  height: 0;
  border: 0;
  border-top: 2px dashed var(--mode-radio);
  width: 20px;
}

.dgm-key {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 12px 0 18px;
  padding: 0;
  font-size: 12px;
  color: var(--dim);
}
.dgm-key li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dgm-key i {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  flex: none;
}
.dgm-key i.k-radio { border-color: var(--mode-radio); }
.dgm-key i.k-gw { border-color: var(--mode-internet-radio); }
.dgm-key i.k-hub { border-color: var(--mode-internet); }
.dgm-key i.k-rplus { border-color: var(--mode-radio-plus); }
.dgm-key i.k-rf,
.dgm-key i.k-net,
.dgm-key i.k-none {
  height: 0;
  border: 0;
  border-top: 2px solid var(--orange);
  width: 20px;
}
.dgm-key i.k-net { border-top-color: var(--mode-internet); }
.dgm-key i.k-none {
  border-top-style: dashed;
  border-top-color: var(--dim);
}

.mode-grid-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 18px;
}
.mode-card {
  border: 1px solid var(--line);
  padding: 12px;
  background: #000;
}
.mode-card h3 {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mode-card .mode-mark {
  width: 32px;
  height: 30px;
}
.mode-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.page-panel td.mode-swatch,
.page-panel td.mode-swatch code {
  white-space: nowrap;
  word-break: normal;
}
.mode-swatch .mode-mark {
  width: 20px;
  height: 19px;
}
.mode-card p { margin: 0; font-size: 13px; color: var(--dim); }
.mode-card.cyan { border-color: var(--mode-internet); }
.mode-card.cyan h3 { color: var(--mode-internet); }
.mode-card.green { border-color: var(--mode-internet-radio); }
.mode-card.green h3 { color: var(--mode-internet-radio); }
.mode-card.amber { border-color: var(--mode-radio); }
.mode-card.amber h3 { color: var(--mode-radio); }
.mode-card.magenta { border-color: var(--mode-radio-plus); }
.mode-card.magenta h3 { color: var(--mode-radio-plus); }

.table-wrap { overflow-x: auto; margin: 8px 0 16px; }
.page-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.page-panel th {
  color: var(--accent);
  text-align: left;
  font-weight: 400;
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
}
.page-panel td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(125, 155, 255, 0.12);
  vertical-align: top;
}

.next {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.pre-wrap { position: relative; margin: 8px 0 16px; }
.page-panel pre, .pre-wrap pre {
  background: #000;
  border: 1px solid var(--line);
  padding: 12px 14px 12px 28px;
  overflow: auto;
  font-size: 13px;
  color: var(--orange);
  position: relative;
}
.pre-wrap pre::before {
  content: "$";
  position: absolute;
  left: 10px;
  top: 12px;
  color: var(--accent);
}
.pre-wrap.plain pre::before { content: none; }
.pre-wrap.plain pre { padding-left: 14px; color: var(--fg); }
.copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  border: 1px solid var(--line);
  background: #07070a;
  color: var(--dim);
  font: inherit;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--orange); }

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.release {
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.release pre {
  background: none;
  border: none;
  padding: 0;
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--fg);
  font-size: 14px;
}

#boot_screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
}
#boot_screen[hidden] { display: none !important; }
#boot_log { width: min(80vw, 560px); white-space: pre-wrap; }

.maplibregl-ctrl-bottom-right {
  z-index: 2;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.maplibregl-ctrl-bottom-right .maplibregl-ctrl {
  pointer-events: auto;
  margin: 0 !important;
  float: none !important;
}
.maplibregl-ctrl-attrib {
  background: rgba(7, 7, 10, 0.88) !important;
  color: var(--dim) !important;
  font: 10px/1.35 var(--font-mono) !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 100%;
  max-width: none;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.maplibregl-ctrl-attrib,
.maplibregl-ctrl-attrib.maplibregl-compact,
.maplibregl-ctrl-attrib.maplibregl-compact-show,
details.maplibregl-ctrl-attrib:not([open]) {
  min-height: 0 !important;
  background-color: rgba(7, 7, 10, 0.88) !important;
}
.maplibregl-ctrl-attrib-inner {
  display: inline !important;
  position: static !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--dim);
  white-space: nowrap;
  background: transparent !important;
}
.maplibregl-ctrl-attrib a {
  color: var(--accent);
  text-decoration: none;
}
.maplibregl-ctrl-attrib a:hover { color: var(--orange); }
.maplibregl-ctrl-attrib-button,
.maplibregl-ctrl-attrib summary {
  display: none !important;
}

.band-workspace {
  display: flex;
  flex-direction: column;
  height: calc(100% - var(--topbar-h, 48px));
  min-height: 0;
}
/* The map never shrinks under 240 px when the result card opens; on a short
   window the workspace scrolls instead (#150). */
.band-workspace { overflow-y: auto; }
.band-map-panel { flex: 1 0 auto; }
.band-map-stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}
.band-map-stage #map { flex: 1; min-height: 240px; }
.band-los-key {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  max-width: calc(100% - 64px);
  padding: 6px 8px;
  background: rgba(7, 7, 10, 0.88);
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
  pointer-events: none;
}
.band-los-key i {
  display: inline-block;
  width: 16px;
  height: 8px;
  margin-right: 5px;
  vertical-align: middle;
  border: 1.5px solid;
}
.los-clear { border-color: #7d9bff; background: rgba(125, 155, 255, 0.45); }
.los-marginal { border-color: #ffd60a; background: #ffd60a; }
.los-block { border-color: #ff3b6b; background: rgba(255, 59, 107, 0.55); }
.band-los-note { color: var(--fg); }
/* HF sky view (#157): the sky key replaces the terrain key. */
.band-sky-key { display: none; }
.band-map-stage.is-sky .band-los-key { display: none; }
.band-map-stage.is-sky .band-sky-key {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  max-width: calc(100% - 64px);
  padding: 6px 8px;
  background: rgba(7, 7, 10, 0.88);
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
  pointer-events: none;
}
.band-sky-key i {
  display: inline-block;
  width: 16px;
  height: 3px;
  margin-right: 5px;
  vertical-align: middle;
}
.band-sky-key .sky-open { background: #39ff14; }
.band-sky-key .sky-marginal { background: #ffd60a; }
.band-sky-key .sky-closed { background: #ff3b6b; }
.band-sky-key .sky-grey { height: 0; border-top: 1.5px dashed #ffd60a; }
.band-hop-chip { color: var(--fg); border: 1px solid var(--line); padding: 1px 6px; }
.band-credit,
.band-live-note {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--dim);
  overflow-wrap: anywhere;
}
.band-live-note { color: #ffd60a; }
.band-muf-label {
  font: 10px/1 var(--font-mono);
  text-shadow: 0 0 3px #07070a, 0 0 3px #07070a;
  pointer-events: none;
  white-space: nowrap;
}
.band-profile svg.pf-sky .sky-earth { fill: rgba(125, 155, 255, 0.28); stroke: #7d9bff; stroke-width: 1; }
.band-profile svg.pf-sky .sky-f2 { fill: rgba(179, 136, 255, 0.18); stroke: var(--purple); stroke-width: 1; stroke-dasharray: 3 3; }
.band-profile svg.pf-sky .sky-ray { fill: none; stroke-width: 2; }
.band-profile svg.pf-sky .sky-punch { fill: none; stroke: #ff3b6b; stroke-width: 2; stroke-dasharray: 5 4; }
.band-profile svg.pf-sky .sky-punch-label { fill: #ff3b6b; }
.sky-line { margin: 0; font-size: 13px; color: var(--fg); }
.sky-nvis,
.sky-skip,
.band-live { margin: 0; font-size: 12px; line-height: 1.45; color: var(--dim); }
.sky-nvis { color: #7d9bff; }
.sky-skip { color: #ff3b6b; }
.band-live { color: var(--accent); }
.sky-strip { display: grid; gap: 4px; }
.sky-cells { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.sky-cell {
  height: 14px;
  min-width: 0;
  padding: 0;
  border: 1px solid transparent;
  cursor: pointer;
}
.sky-cell.sky-open { background: #39ff14; }
.sky-cell.sky-marginal { background: #ffd60a; }
.sky-cell.sky-closed { background: rgba(255, 59, 107, 0.55); }
.sky-cell.is-sel { outline: 2px solid var(--fg); outline-offset: 1px; }
.sky-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: middle;
}
.sky-dot.sky-open { background: #39ff14; }
.sky-dot.sky-marginal { background: #ffd60a; }
.sky-dot.sky-closed { background: #ff3b6b; }
/* One line, cut with an ellipsis: a hint that wraps on a phone moves the
   map and the card on every recompute (#164). */
.band-map-panel h3.title p:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band-map-panel .map-tools { flex: none; }
.band-hint {
  color: var(--dim);
  font-size: 12px;
  margin-left: 12px;
}
.band-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  align-items: flex-start;
}
.band-rx-field {
  position: relative;
  flex: 1 1 180px;
  min-width: 0;
}
.band-search-row input {
  width: 100%;
  min-width: 0;
  background: #050508;
  border: 1px solid var(--line);
  color: var(--fg);
  font: 13px/1.4 var(--font-mono);
  padding: 8px 10px;
}
.band-places {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: rgba(7, 7, 10, 0.96);
  border: 1px solid var(--line);
  max-height: 180px;
  overflow: auto;
}
.band-places button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(125, 155, 255, 0.12);
  color: var(--fg);
  font: 13px/1.4 var(--font-mono);
  padding: 8px 10px;
  cursor: pointer;
}
.band-places button:hover { color: var(--orange); }
.band-search-row input:focus {
  outline: none;
  border-color: var(--accent);
}
.band-locate {
  position: static;
  flex: none;
  border: 1px solid var(--line);
  background: #07070a;
  color: var(--dim);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.band-locate:hover { color: var(--orange); }
.band-locate.is-busy {
  position: relative;
  color: transparent;
  cursor: progress;
}
.band-locate.is-busy::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -7px 0 0 -7px;
  border: 1px solid var(--dim);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: band-spin 0.8s linear infinite;
}
@keyframes band-spin { to { transform: rotate(360deg); } }
.band-override-pick {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.band-override-pick select {
  background: #050508;
  border: 1px solid var(--line);
  color: var(--fg);
  font: 12px/1.4 var(--font-mono);
  padding: 4px 6px;
}
.band-ant i { font-style: normal; }
/* Stations: home on the left, RX on the right (stacked on narrow
   screens), each with its antenna, height and power. */
.band-stations {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}
.band-stations-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.band-station-name {
  width: 3em;
  font-weight: 400;
  color: var(--orange);
}
.band-station label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.band-station select,
.band-station input[type="number"] {
  background: #050508;
  border: 1px solid var(--line);
  color: var(--fg);
  font: 12px/1.4 var(--font-mono);
  padding: 4px 6px;
}
.band-station input[type="number"] { width: 5em; }
.band-hfwire-btn svg, .band-hfwire-menu svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
/* With a band picked, only that band's antenna pickers show. */
.band-stations[data-range="hf"] .band-vhf-only,
.band-stations[data-range="vhf"] .band-hf-only { display: none; }
/* Inside each station: V/UHF antenna on one line, height and power side
   by side, then the HF antenna tiles and (home only) how a wire is
   strung up, under the tiles. */
.band-station { display: grid; grid-template-columns: 3em 1.5fr 1fr; gap: 6px 8px; align-content: start; }
.band-station label { min-width: 0; }
.band-station label select { flex: 1; min-width: 0; }
.band-station .band-ant-type { grid-column: 2 / 4; }
.band-station .band-hf-type { grid-column: 2 / 4; display: flex; align-items: flex-start; gap: 6px; }
.band-station .band-hf-type > span { padding-top: 5px; }
.band-station .band-pwr { grid-column: 3; grid-row: 2; }
.band-stations[data-range="hf"] .band-station .band-pwr { grid-row: 2; }
.band-stations[data-range="hf"] .band-station .band-hfwire { grid-column: 2; grid-row: 2; }
.band-station .band-hfwire { grid-column: 2; }
.band-station .band-hfwire-notes { grid-column: 2 / 4; padding-left: 0; }
.band-station .band-ant input[type="number"] { width: 3.5em; }
/* Every picker in the middle column starts at the same x: the labels
   there share one width ("V/UHF ant." is the longest), and the wire
   picker, which has no label, is indented by the same amount. */
.band-station :is(.band-ant-type, .band-ant, .band-hf-type) > span { flex: none; width: 6em; }
.band-station .band-hfwire { justify-self: stretch; }
.band-station .band-hfwire { margin-left: calc(6em + 6px); }
.band-station .band-hfwire .band-hfwire-btn { flex: 1; min-width: 0; }
.band-station .band-hfwire .band-hfwire-btn i { margin-left: auto; }
.band-station-name { grid-row: 1 / span 3; align-self: start; padding-top: 5px; }
/* Loft / indoors tick: its own line under height and power, lined up
   with the pickers. */
.band-station .band-loft { grid-column: 2 / 4; margin-left: calc(6em + 6px); font-size: 12px; cursor: pointer; }
.band-station .band-loft input { margin: 0; accent-color: var(--orange); }
/* Phones: the station name goes on its own line above its pickers, so the
   pickers get the full width. */
@media (max-width: 600px) {
  .band-station { grid-template-columns: 1.5fr 1fr; }
  .band-station-name { grid-column: 1 / -1; grid-row: 1; padding-top: 0; }
  .band-station .band-ant-type { grid-column: 1 / 3; }
  .band-station .band-ant { grid-column: 1; }
  .band-station .band-hf-type { grid-column: 1 / 3; }
  .band-station .band-pwr { grid-column: 2; grid-row: 3; }
  /* HF only: power gets its own line under the antenna, lined up with it. */
  .band-stations[data-range="hf"] .band-station .band-pwr { grid-column: 1 / 3; grid-row: 4; }
  .band-stations[data-range="hf"] .band-station .band-pwr > span { flex: none; width: 6em; }
  .band-station .band-hfwire { grid-column: 1 / 3; justify-self: start; }
  .band-stations[data-range="hf"] .band-station .band-hfwire { grid-column: 1 / 3; grid-row: 3; }
  .band-station .band-hfwire-notes { grid-column: 1 / 3; }
  .band-station .band-loft { grid-column: 1 / 3; margin-left: 0; }
  .band-station + .band-station { margin-top: 8px; }
}
@media (min-width: 861px) {
  .band-stations { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .band-stations-head { grid-column: 1 / -1; }
}
/* HF antenna tiles: a drawing and a name for each antenna. */
.band-hfant-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.band-hfant-tiles label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 4px;
  border: 1px solid var(--line);
  background: #050508;
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.band-hfant-tiles input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.band-hfant-tiles svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.band-hfant-tiles label:hover { color: var(--fg); }
.band-hfant-tiles label:has(input:checked) { color: var(--orange); border-color: var(--orange); }
.band-hfant-tiles label:has(input:focus-visible) { outline: 1px solid var(--accent); }
/* #177: a clear way from the antenna pickers to the antenna guides. */
.band-ant-guide {
  display: inline-block;
  line-height: 24px;
  color: var(--accent);
  white-space: nowrap;
}
.band-ant-guide:hover { color: var(--orange); }
.band-ant-guide-short { display: none; }
/* Phones: each link shares a line that is already there, so nothing below
   moves. The padding keeps a 24 px tap target without taking more height. */
@media (max-width: 600px) {
  .band-ant-guide { line-height: 14px; padding: 5px 0; margin: -5px 0; }
  .band-ant-guide-full { display: none; }
  .band-ant-guide-short { display: inline; }
}
/* How a wire HF antenna is strung up, right after the home HF antenna. */
.band-hfwire {
  position: relative;
  display: flex;
}
.band-hfwire-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #050508;
  border: 1px solid var(--orange);
  color: var(--fg);
  font: 12px/1.4 var(--font-mono);
  padding: 3px 8px 3px 6px;
  cursor: pointer;
  white-space: nowrap;
}
.band-hfwire-btn i { font-style: normal; color: var(--dim); }
.band-hfwire-btn b { font-weight: normal; color: var(--orange); }
.band-hfwire-btn b:empty { display: none; }
.band-hfwire-btn:hover i, .band-hfwire-btn[aria-expanded="true"] i { color: var(--orange); }
.band-hfwire-btn:focus-visible { outline: 1px solid var(--accent); }
.band-hfwire-btn svg, .band-hfwire-menu svg { width: 18px; height: 18px; color: var(--orange); }
.band-hfwire-menu {
  position: absolute;
  top: 100%;
  z-index: 20;
  min-width: 150px;
  margin: 2px 0 0;
  padding: 2px 0;
  list-style: none;
  background: #050508;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}
.band-hfwire-menu[hidden] { display: none; }
.band-hfwire-menu li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 8px;
  color: var(--dim);
  cursor: pointer;
  white-space: nowrap;
}
.band-hfwire-menu li:hover, .band-hfwire-menu li:focus { color: var(--fg); background: #0d0d14; outline: none; }
.band-hfwire-menu li[aria-selected="true"] { color: var(--orange); }
/* Antenna type pickers: a drawing of each antenna in the button and the
   list. The real <select> stays (links, screen readers) but is hidden. */
.band-ant-type, .band-hf-type { position: relative; }
.band-icopick-select {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.band-icopick { position: relative; display: flex; min-width: 0; }
.band-icopick-btn { border-color: var(--line); min-width: 0; }
.band-icopick-btn:hover, .band-icopick-btn[aria-expanded="true"] { border-color: var(--orange); }
.band-icopick-btn span { overflow: hidden; text-overflow: ellipsis; }
.band-icopick-btn svg, .band-icopick .band-hfwire-menu svg { flex: none; }
.band-icopick .band-hfwire-menu svg { width: 22px; height: 22px; }
.band-icopick, .band-icopick-btn { flex: 1; }
.band-icopick-btn i { margin-left: auto; }
.band-hfwire-notes {
  display: grid;
  padding-left: 3em;
}
.band-hfwire-note {
  grid-area: 1 / 1;
  margin: 0;
  color: var(--fg);
  font-size: 12px;
  line-height: 1.4;
}
.band-hfwire-sizer { visibility: hidden; }
.band-bandbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.band-label {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.band-override-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-left: auto;
  color: var(--dim);
  font-size: 12px;
}
.band-override-banner p { margin: 0; }
.band-override-banner b { color: var(--orange); font-weight: 400; }
.band-tag {
  padding: 2px 8px;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.band-override-info {
  margin: 4px 0 0;
  color: #ffd60a;
  font-size: 12px;
  line-height: 1.45;
}
.band-revert,
.band-retry {
  border: 1px solid var(--orange);
  background: #07070a;
  color: var(--orange);
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}
.band-revert:hover,
.band-retry:hover { background: var(--orange); color: #07070a; }
.band-places .band-onair-hit span {
  float: right;
  color: #39ff14;
  font-size: 11px;
}
.band-places button:disabled { color: var(--dim); cursor: default; }
.band-profile {
  flex: none;
  margin: 6px 0 8px;
  border: 1px solid var(--line);
  background: #050508;
}
.band-profile svg { display: block; width: 100%; height: 104px; }
.band-profile text { fill: var(--dim); font: 10px var(--font-mono); }
.band-profile .pf-ground { fill: rgba(125, 155, 255, 0.28); stroke: #7d9bff; stroke-width: 1; }
.band-profile .pf-curve { fill: none; stroke: var(--purple); stroke-width: 1; stroke-dasharray: 3 3; }
.band-profile .pf-marginal { fill: none; stroke: #ffd60a; stroke-width: 2.5; }
.band-profile .pf-block { fill: none; stroke: #ff3b6b; stroke-width: 2.5; }
.band-profile .pf-line { stroke: #39ff14; stroke-width: 1.5; }
.band-profile .pf-key-line { fill: #39ff14; }
.band-profile .pf-key-curve { fill: var(--purple); }
.band-result {
  flex: none;
  border-top: 1px solid var(--line);
  background: #050508;
  padding: 14px 16px 16px;
}
.band-empty,
.band-wait {
  margin: 0;
  font-size: 15px;
  color: var(--dim);
}
.band-wait { color: var(--accent); }
.band-result.has-answer .band-empty { display: none; }
.band-answer {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.band-body {
  display: grid;
  grid-template-columns: 290px minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px 32px;
  align-items: start;
}
.band-freq {
  margin: 0;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.band-freq span {
  font-size: 16px;
  color: var(--orange);
  letter-spacing: 0;
}
.band-band {
  margin: 6px 0 0;
  color: var(--orange);
  font-size: 15px;
}
.band-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 16px;
  margin: 12px 0 0;
  font-size: 13px;
}
.band-stats dt { color: var(--dim); }
.band-stats dd { margin: 0; color: var(--fg); }
.band-verdict,
.band-do {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.band-conf {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 3px 10px;
  border: 1px solid currentColor;
  color: #39ff14;
  font-size: 13px;
  line-height: 1.4;
}
.band-conf.band-conf-warn { color: #ffd60a; }
.band-conf.band-conf-bad { color: var(--emergency); }
.band-led {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .band-conf-ok .band-led { animation: band-led-blink 2.4s ease-in-out infinite; }
}
@keyframes band-led-blink { 50% { opacity: 0.45; } }
.band-note,
.band-voice {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
}
.band-voice { color: var(--purple); }
.band-why {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--fg);
}
.band-err { color: var(--warn); font-size: 15px; margin: 0; }
.band-heard {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg);
}
.band-heard li { display: flex; align-items: baseline; gap: 6px; }
.band-heard .band-dot { flex: none; }
.band-works {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}
p.band-works { border: 0; }
.band-works-pick {
  display: grid;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
  padding: 5px 12px;
  cursor: pointer;
}
.band-works-pick:last-child { border-right: 0; }
.band-works-pick small { color: var(--dim); font-size: 10px; }
.band-works-pick:hover { background: rgba(125, 155, 255, 0.12); }
.band-works-pick[aria-pressed="true"] { background: var(--accent); color: #07070a; }
.band-works-pick[aria-pressed="true"] small { color: #07070a; opacity: 0.75; }
/* Chip and legend colours (#170): green works, yellow skips, grey won't work. */
.band-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: middle;
  background: #39ff14;
}
.is-skips .band-dot { background: #ffd60a; }
.is-none .band-dot { background: #8a8a99; }
.band-heard .is-none .band-dot { background: #ff4d6d; }
.band-works-pick.is-works { color: #39ff14; }
.band-works-pick.is-skips { color: #ffd60a; }
.band-works-pick.is-none { color: #8a8a99; }
.band-works-pick.is-skips[aria-pressed="true"],
.band-works-pick.is-none[aria-pressed="true"] { color: #07070a; }
.band-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  font-size: 11px;
  color: var(--dim);
}
.band-legend span { white-space: nowrap; }
.band-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  background: #07070a;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  text-align: left;
  cursor: pointer;
}
.band-copy::before { content: "$"; color: var(--accent); }
.band-copy code { flex: 1; min-width: 0; font: inherit; overflow-wrap: anywhere; }
.band-copy em {
  font-style: normal;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.band-copy:hover { border-color: var(--accent); }
.band-copy:hover em,
.band-copy.band-copied em { color: #39ff14; }
.band-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
}
.band-foot span { flex: 1 1 320px; min-width: 0; }
.band-foot b { color: #ffd60a; font-weight: 400; }
.band-pin-label {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  margin-top: 2px;
  font: 10px/1 var(--font-mono);
  color: var(--fg);
  text-shadow: 0 0 4px #07070a;
  pointer-events: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .clock-mod .colon { animation: none; }
  .mod, .mod_column.activated .mod { animation: none; opacity: 1; }
  .map-mark-wrap.pulse-tx svg,
  .map-mark-wrap.pulse-rx svg { animation: none; }
}

@media (max-width: 900px), (max-height: 560px) {
  html {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  body.page-map,
  body.page-doc {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .page-panel h2[id] { scroll-margin-top: 72px; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .workspace {
    height: auto;
    grid-template-columns: 1fr;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #main_shell {
    order: -1;
    min-height: 0;
  }
  .mod_column, #mod_column_right { border: 0; border-top: 1px solid var(--line); }
  #map {
    flex: none;
    height: 52dvh;
    min-height: 280px;
  }
  .map-key summary {
    min-height: 44px;
    padding: 0 12px;
    font-size: 15px;
  }
  .map-key-body,
  .map-key-note {
    font-size: 13px;
  }
  .map-key-note { white-space: normal; }
  .log-panel { flex: none; min-height: 0; }
  .status-grid { grid-template-columns: 1fr; }
  .page-wrap {
    height: auto;
    min-height: calc(100dvh - var(--topbar-h));
    padding: 20px max(16px, env(safe-area-inset-left)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  }
  .page-panel {
    width: 100%;
    max-width: 800px;
  }
  .page-panel h1 { font-size: 22px; }
  .guide-grid, .mode-grid-docs { grid-template-columns: 1fr; }
  .map-style select {
    font-size: 16px;
    min-height: 36px;
    padding: 6px 28px 6px 10px;
    background-position: calc(100% - 11px) 16px, calc(100% - 7px) 16px;
  }
  #play {
    min-width: 88px;
    min-height: 44px;
  }
  #speed {
    min-width: 52px;
    min-height: 44px;
  }
  .station { padding: 12px 0; }
  .copy-btn {
    min-height: 36px;
    min-width: 52px;
    padding: 6px 10px;
  }
}

@media (max-width: 900px) {
  body.page-band .band-workspace {
    height: auto;
    min-height: calc(100dvh - var(--topbar-h, 48px));
  }
  body.page-band #map {
    height: 46dvh;
    min-height: 240px;
    flex: none;
  }
  .band-body { grid-template-columns: 1fr; }
  .band-freq { font-size: 34px; }
  .band-override-banner { margin-left: 0; }
}

@media (max-width: 960px) {
  #scan { opacity: 0.28; }
  .prompt { font-size: 15px; }
  .page-panel p, .page-panel li { font-size: 16px; line-height: 1.55; }
  .page-panel code { white-space: pre-wrap; word-break: break-word; }
  /* Short preset names in table cells (hf-poor, vhf-fm) stay on one line; the table scrolls if it must. */
  .page-panel td code { white-space: nowrap; }
  .page-panel pre, .pre-wrap pre {
    font-size: 13px;
    padding-right: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    -webkit-overflow-scrolling: touch;
  }
  .release pre {
    padding: 0;
    overflow: visible;
  }
  .pre-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .pre-wrap .copy-btn {
    position: static;
    align-self: flex-end;
    order: -1;
  }
  a.guide-card {
    padding: 16px;
    min-height: 72px;
  }
  .dgm-wrap { -webkit-overflow-scrolling: touch; }
  svg.dgm { min-width: 620px; }
  .dgm-key { font-size: 13px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .tape-title { font-size: 13px; }
  .tape-hint { display: none; }

  .nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    background: #000;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  body.nav-ready .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "prompt meta toggle";
    align-items: center;
    gap: 8px 10px;
  }
  body.nav-ready .prompt { grid-area: prompt; min-width: 0; }
  body.nav-ready .clock-mod,
  body.nav-ready .topbar-end {
    grid-area: meta;
    margin-left: 0;
  }
  body.nav-ready .topbar-end .clock-mod { display: none; }
  body.nav-ready #stats {
    margin-left: 0;
    font-size: 11px;
  }
  body.nav-ready .nav-toggle {
    display: flex;
    grid-area: toggle;
  }
  body.nav-ready .topbar nav {
    display: none;
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 22;
    background: #050508;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 8px max(16px, env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
    overflow: auto;
  }
  body.nav-ready.nav-open .topbar nav { display: flex; }
  body.nav-ready.nav-open { overflow: hidden; }
  html:has(body.nav-open) { overflow: hidden; }
  body.nav-ready.nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 18;
    background: rgba(0, 0, 0, 0.55);
  }
  body.nav-ready .topbar nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
    padding: 0 4px;
  }
  body.nav-ready .topbar nav a.on::before { content: "▸ "; }
  body.nav-ready .topbar nav .nav-cta {
    justify-content: center;
    margin-top: 16px;
    border-bottom: 0;
    padding: 0 16px;
  }
}

@media (max-width: 420px) {
  .map-key-body { grid-template-columns: 1fr; }
  .map-key li { white-space: normal; }
}

@media (max-width: 380px) {
  .prompt { font-size: 14px; }
  .page-panel h1 { font-size: 20px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  #map {
    height: 72dvh;
    min-height: 180px;
  }
  .log-panel { min-height: 0; }
}

body.cmp-page .page-panel {
  width: min(96vw, 1080px);
}

.page-panel th.cmp-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.page-panel th.cmp-sort:hover,
.page-panel th.cmp-sort:focus {
  color: var(--orange);
  outline: none;
}
.page-panel th.cmp-sort[aria-sort="descending"]::after,
.page-panel th.cmp-sort[aria-sort="ascending"]::after {
  color: var(--orange);
  font-size: 11px;
}
.page-panel th.cmp-sort[aria-sort="descending"]::after { content: " v"; }
.page-panel th.cmp-sort[aria-sort="ascending"]::after { content: " ^"; }

.page-panel #cmp-table {
  width: 100%;
  table-layout: fixed;
  line-height: 1.2;
}
.page-panel #cmp-table th,
.page-panel #cmp-table td {
  white-space: nowrap;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-panel #cmp-table td { text-align: center; padding: 5px 6px; }
.page-panel #cmp-table td:nth-child(1),
.page-panel #cmp-table td:nth-child(2),
.page-panel #cmp-table th:nth-child(1),
.page-panel #cmp-table th:nth-child(2) { text-align: left; }
.page-panel #cmp-table th:nth-child(1),
.page-panel #cmp-table td:nth-child(1) { width: 22%; }
.page-panel #cmp-table th:nth-child(2),
.page-panel #cmp-table td:nth-child(2) { width: 16%; }
.page-panel #cmp-table td[data-s] {
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}

.page-panel [data-s="1"] { color: #ff4d6d; background: rgba(255, 61, 107, 0.2); }
.page-panel [data-s="2"] { color: #ff8a3d; background: rgba(255, 122, 61, 0.2); }
.page-panel [data-s="3"] { color: #ffd166; background: rgba(255, 191, 0, 0.18); }
.page-panel [data-s="4"] { color: #c6ef6a; background: rgba(174, 224, 90, 0.16); }
.page-panel [data-s="5"] { color: #39ff14; background: rgba(57, 255, 20, 0.16); }

tr.cmp-wcr {
  background: rgba(255, 122, 61, 0.1);
}
tr.cmp-wcr td {
  border-bottom-color: rgba(255, 122, 61, 0.35);
}
tr.cmp-wcr td:first-child { color: var(--orange); }
.cmp-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 5px;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}
tr.cmp-wcr-vhf td:first-child { color: var(--accent); }
.cmp-tag.vhf {
  border-color: var(--accent);
  color: var(--accent);
}

.cmp-legend { margin: 4px 0 12px; }
.cmp-scale {
  list-style: none;
  display: flex;
  gap: 4px;
  padding: 0;
  margin: 0 0 8px;
}
.cmp-scale li {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 6px;
  border: 1px solid rgba(125, 155, 255, 0.18);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}
.cmp-scale li b { font-weight: 400; font-size: 11px; }
.cmp-legend-notes {
  color: var(--dim);
  font-size: 12px;
  margin: 0;
  padding-left: 16px;
}
.cmp-legend-notes li { margin: 2px 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.band-profile svg.pf-sky .sky-end { fill: var(--fg); }
@media (max-width: 600px) {
  .band-hop-chip { display: none; }
}
.band-profile svg.pf-sky text { paint-order: stroke; stroke: #07070a; stroke-width: 3px; }
