/* Layout: full-bleed map with a filter rail on the left (bottom sheet on phones).
   Colour is reserved for data (band and carrier hues); the interface itself is ink on paper. */
:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --fg: #17201c;
  --muted: #56645e;
  --line: #d6ddd9;
  --ink: #17201c;
  --ink-fg: #f4f6f4;
  --hover: #e8ece9;
  --focus: #1b6dd1;
  --map-bg: #e9ece9;
  --warn: #b3261e;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 6px;
  --panel-w: 352px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121715;
    --surface: #1a211e;
    --fg: #e5ebe8;
    --muted: #9aa8a1;
    --line: #2c3632;
    --ink: #e5ebe8;
    --ink-fg: #121715;
    --hover: #222b27;
    --focus: #6aa8ff;
    --map-bg: #1b201e;
    --warn: #ff8a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121715;
  --surface: #1a211e;
  --fg: #e5ebe8;
  --muted: #9aa8a1;
  --line: #2c3632;
  --ink: #e5ebe8;
  --ink-fg: #121715;
  --hover: #222b27;
  --focus: #6aa8ff;
  --map-bg: #1b201e;
  --warn: #ff8a80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.45 var(--font-body);
}
a { color: inherit; text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Room at the window's edges for the ring of a control Tab scrolls into view, as in the panels. */
html { scroll-padding-block: 8px; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
[hidden] { display: none !important; }
/* For screen readers only, such as each page's live region (#announce). */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- map page shell ---------- */
.map-page #app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: var(--panel-w) 1fr;
}
#map { position: relative; min-width: 0; background: var(--map-bg); }
#panel {
  position: relative;
  z-index: 1001;
  min-width: 0;
  background: var(--bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-body {
  overflow-y: auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  scroll-padding-block: 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel-toggle { display: none; }

.brand h1 {
  margin: 0;
  font: 700 26px/1.05 var(--font-display);
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.brand .sub { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.brand time { font-family: var(--font-mono); font-size: 12px; color: var(--fg); }
.page-nav { display: flex; gap: 4px; margin-top: 10px; }
.page-nav a {
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}
.page-nav a[aria-current="page"] { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
/* Hover styles only where there is a pointer to hover with: after a tap they stuck. */
@media (hover: hover) { .page-nav a:not([aria-current]):hover { background: var(--hover); } }

.block { display: flex; flex-direction: column; gap: 8px; }
.block h2, .block-head h2 {
  margin: 0;
  font: 600 13px/1.2 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.head-actions { display: flex; gap: 10px; }
button.link {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
@media (hover: hover) { button.link:hover { color: var(--fg); } }
.hint { margin: 0; font-size: 12px; color: var(--muted); }

/* search boxes + suggestion lists */
.search { position: relative; }
.search input, .field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.14);
  max-height: 320px;
  overflow-y: auto;
}
.results li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 7px 8px;
  border-radius: 4px;
  cursor: pointer;
}
/* The active option (arrow keys, or what Enter takes) has an ink edge: the grey alone is too faint. */
.results li[aria-selected="true"] { background: var(--hover); box-shadow: inset 3px 0 0 var(--fg); }
@media (forced-colors: active) { .results li[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; } }
@media (hover: hover) { .results li:hover { background: var(--hover); } }
.results .r-main { min-width: 0; overflow-wrap: anywhere; }
.results .r-sub { grid-column: 1 / -1; color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.results .r-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.results .r-empty { cursor: default; color: var(--muted); }
.results .r-address .r-main { font-weight: 600; }
.results .r-credit { display: block; font-size: 11.5px; }   /* one line of text, not grid cells */
.results .r-credit a { color: inherit; }
/* Phones: "Find a site" is a bar at the top of the map, where the keyboard leaves its suggestions in view. */
.map-search { display: none; }
@media (max-width: 820px) {
  /* Over the details sheet, so its suggestions are too. It stops short of "Near me",
     whose width (--near, from app.js) changes with its label. */
  .map-search {
    --clear: calc(var(--near, 84px) + 10px);
    display: block;
    position: fixed;
    z-index: 1301;
    top: calc(10px + env(safe-area-inset-top, 0px));
    left: max(10px, env(safe-area-inset-left, 0px));
    right: calc(max(10px, env(safe-area-inset-right, 0px)) + var(--clear));
  }
  .map-search .search input { min-height: 44px; padding-inline: 16px; border-radius: 999px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.15); }
  /* The list runs on under "Near me", to its right edge. */
  .map-search .results { right: calc(-1 * var(--clear)); max-height: min(320px, calc(100dvh - 80px)); }
  #find-block { display: none; }
  /* The antenna box stays in the filter sheet, where the keyboard covers what is under
     it: its suggestions open above it, in the room app.js measures (--room). Focus takes
     the box to the sheet's foot, short of the keyboard's edge and the home indicator. */
  #antenna-results { top: auto; bottom: calc(100% + 4px); max-height: min(320px, var(--room, 320px)); box-shadow: 0 -8px 24px rgb(0 0 0 / 0.14); }
  #antenna-search { scroll-margin-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* toggle rows (carriers, bands) */
.toggle-list { display: flex; flex-direction: column; gap: 2px; }
.toggle {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  text-align: left;
  cursor: pointer;
}
@media (hover: hover) { .toggle:hover { background: var(--hover); } }
.toggle .swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.toggle .label { min-width: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.toggle .label small { color: var(--muted); font-family: var(--font-mono); font-size: 11.5px; }
.toggle .count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.toggle[aria-pressed="false"] .label { color: var(--muted); text-decoration: line-through; }
.toggle[aria-pressed="false"] .swatch { opacity: 0.25; }
/* The test sites layer: set apart from the carriers and hatched like its wedges. */
.toggle.layer-test { margin-top: 6px; border-top: 1px dashed var(--line); border-radius: 0 0 var(--radius) var(--radius); padding-top: 8px; }
.toggle.layer-test[aria-pressed="false"] .label { text-decoration: none; }
.swatch.hatched { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0 1.5px, transparent 1.5px 4px) !important; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
}
.chip[aria-pressed="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.chip[aria-pressed="false"] { color: var(--muted); border-style: dashed; }
.chip[aria-pressed="false"] .dot { opacity: 0.35; }
.chip .count { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .chip:hover, .chips.jump .chip:hover { background: var(--hover); } }

/* Checkbox rows, of one family with the toggles and chips: an ink box with the swatches' corners. */
.check-row { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check-row input[type="checkbox"] {
  appearance: none;
  flex: none;
  display: grid;
  place-content: center;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid var(--muted);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
}
.check-row input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 5px;
  border: solid var(--ink-fg);
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
  opacity: 0;
}
.check-row input[type="checkbox"]:checked { background: var(--ink); border-color: var(--ink); }
.check-row input[type="checkbox"]:checked::before { opacity: 1; }
.check-row .label { min-width: 0; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.check-row .label small { color: var(--muted); font-size: 12px; }
.check-row .count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* In the filter panel: the toggle rows' grid, the box in the swatch column, the count on
   the right. The focus ring stays on the box, the part Tab scrolls into view (round the row
   it was cut off at the panel's edges); the margin brings the rest of the row with it. */
.panel-body .check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
}
.panel-body .check-row input[type="checkbox"] { width: 18px; height: 18px; scroll-margin-block: 16px; }
@media (hover: hover) {
  .panel-body .check-row:hover { background: var(--hover); }
  .check-row:hover input[type="checkbox"]:not(:checked) { border-color: var(--fg); }
}
@media (pointer: coarse) { .check-row { min-height: 44px; } .panel-body .check-row { padding: 8px 10px; } }

.field { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; font-size: 13px; }
.field > span { color: var(--muted); }
.field input[type="range"] { width: 100%; accent-color: var(--ink); }

.chan-fields { display: grid; gap: 8px; }
.chan-fields select:disabled { opacity: 0.55; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); }
.segmented button { border: 0; background: var(--surface); padding: 7px 8px; cursor: pointer; font-size: 13px; }
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button[aria-checked="true"] { background: var(--ink); color: var(--ink-fg); }
/* Corners of their own, not overflow: hidden, which cut the focus ring; the ring paints over the neighbour. */
.segmented button:first-child { border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px); }
.segmented button:last-child { border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0; }
.segmented button:focus-visible { position: relative; z-index: 1; }
@media (hover: hover) { .segmented button[aria-checked="false"]:hover { background: var(--hover); } }

.summary-block { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
/* Beside the map (in a window tall enough) the count and its actions stay at the panel's
   foot as the filters scroll, over a strip of the panel's background. Tab keeps what it
   focuses clear of them, ring and all (--summary-h: their height, from app.js). */
@media (min-width: 821px) and (min-height: 560px) {
  .summary-block { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -8px 16px -12px rgb(0 0 0 / 0.35); }
  .summary-block::after { content: ""; position: absolute; top: calc(100% + 1px); left: -1px; right: -1px; height: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
  .panel-body { scroll-padding-bottom: calc(var(--summary-h, 160px) + 24px + env(safe-area-inset-bottom, 0px)); }
}
.summary { margin: 0; font-size: 13.5px; }
.summary strong { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions button, .btn {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}
@media (hover: hover) { .actions button:hover, .btn:hover { background: var(--hover); } }
.actions button:disabled { opacity: 0.55; cursor: default; background: var(--bg); }   /* no sites to zoom to or save */
.about { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.about p { margin: 0; }

/* loading + hover tooltip */
.loading {
  position: fixed;
  z-index: 1200;
  left: calc(var(--panel-w) + 50%);
  top: 50%;
  transform: translate(calc(-50% - var(--panel-w) / 2), -50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
}
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--fg); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.hover-tip {
  position: fixed;
  z-index: 1100;
  pointer-events: none;
  max-width: 300px;
  padding: 6px 9px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.16);
  font-size: 12.5px;
}
.hover-tip .t-name { font-weight: 600; }
.hover-tip .t-sub { color: var(--muted); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
/* Messages over the map (app.js notify()), above the phone sheets and clear of the Filters bar. */
.toast {
  position: fixed;
  z-index: 1400;
  left: calc(var(--panel-w) + (100vw - var(--panel-w)) / 2);
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: min(480px, calc(100vw - var(--panel-w) - 24px));
  padding: 10px 8px 10px 14px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
  font: 13.5px/1.4 var(--font-body);
}
.toast.error { border-left: 3px solid var(--warn); }
.toast-text { margin: 0; min-width: 0; overflow-wrap: anywhere; text-wrap: pretty; }
.toast-close { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
@media (hover: hover) { .toast-close:hover { background: var(--hover); color: var(--fg); } }
.map-page #app.panel-collapsed .toast { left: 50%; max-width: min(480px, calc(100vw - 24px)); }
@media (pointer: coarse) { .toast-close { width: 40px; height: 40px; } }
@media (max-width: 820px) { .toast { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); } }

/* shared data atoms */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.band-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px 1px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  background: var(--surface);
}
.band-chip i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.band-chip.match { border-color: var(--fg); }
/* Bands registered only under test (scientific) licences: hatched like their map wedges. */
.band-chip.test { border-style: dashed; border-color: var(--muted); }
.band-chip.test i { position: relative; overflow: hidden; }
.band-chip.test i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0 1.2px, transparent 1.2px 3px);
}
.tag.test, .tag.temp {
  display: inline-block;
  padding: 0 6px;
  border: 1px dashed var(--fg);
  border-radius: 999px;
  font: 500 11px/1.5 var(--font-body);
  white-space: nowrap;
}
.tag.temp { border-style: solid; background: var(--hover); }
.hatch-key {
  display: inline-block;
  width: 14px;
  height: 10px;
  margin: 0 2px -1px;
  border-radius: 2px;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0 1.5px, transparent 1.5px 4px), var(--muted);
}

/* ---------- popups ---------- */
.leaflet-container { font: 13px/1.4 var(--font-body); background: var(--map-bg); }
/* The map's focus ring, inside its edge: an outline there would paint under the panes.
   Not after a click or tap (common.js), which Leaflet turns into focus from script. */
.leaflet-container:focus-visible { outline: none; }
.leaflet-container:focus-visible:not(.pointer-focus)::after { content: ""; position: absolute; inset: 0; z-index: 1000; border-radius: inherit; box-shadow: inset 0 0 0 3px var(--focus); pointer-events: none; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--fg); }
.leaflet-popup-content-wrapper { border-radius: 8px; }
/* Padding inside the scrolling box leaves room for focus rings at its edges. */
.leaflet-popup-content { margin: 8px 10px; padding: 4px; width: min(420px, 78vw) !important; max-height: min(60vh, 520px); overflow-y: auto; scroll-padding-block: 8px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-zoom a, .leaflet-bar a { background: var(--surface); color: var(--fg); border-color: var(--line); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 85%, transparent) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--fg); }
.leaflet-control-attribution a:focus-visible { outline-offset: -2px; }   /* inside: the map's edge cut a ring outside */
.pop h3 { margin: 0; font: 600 18px/1.15 var(--font-display); letter-spacing: 0.01em; padding-right: 18px; }
.pop .meta { margin: 4px 0 0; color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pop .meta a { color: var(--fg); }
.pop .tag { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; }
.pop-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.leaflet-container .pop-links a.btn, .pop-links a.btn { color: var(--fg); font-size: 12.5px; padding: 4px 9px; }
@media (pointer: coarse) { .pop-links a.btn { min-height: 40px; display: inline-flex; align-items: center; } }
.pop + .pop { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pop .carrier { margin-top: 10px; }
.pop .carrier-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-weight: 600; }
.pop .carrier-head small { font-weight: 400; color: var(--muted); }
.pop .dates { color: var(--muted); font-size: 11.5px; margin: 2px 0 6px 18px; }
.pop table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pop th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 4px; border-bottom: 1px solid var(--line); }
.pop td { padding: 4px; vertical-align: top; border-bottom: 1px solid var(--line); }
.pop td.az { font-family: var(--font-mono); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pop td .bands { display: flex; flex-wrap: wrap; gap: 3px; }
.pop .ant { font-family: var(--font-mono); font-size: 11.5px; overflow-wrap: anywhere; }
.pop .ant-row { display: grid; gap: 2px; padding: 2px 0; }
.pop .ant-row + .ant-row { border-top: 1px dashed var(--line); padding-top: 4px; margin-top: 2px; }
.pop .ant.match { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; }
.pop .freqs { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.pop .freqs-head { margin: 6px 0 2px; font-weight: 600; color: var(--fg); }
.pop .held { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 6px 18px; font-size: 11.5px; }
.pop .held-label { color: var(--muted); }
.pop .held-band { display: inline-flex; align-items: center; gap: 3px; }
.pop .held-band .mono { font-size: 11.5px; }
.pop .held-band.idle { opacity: 0.55; }
/* n78's share at 3.7 GHz, and Telstra's carrier there, as its staff call it. */
.pop .held-note { color: var(--muted); font-size: 11px; }
.pop .tag.r-carrier { padding: 0 5px; font: 600 10.5px/1.45 var(--font-mono); border-color: var(--fg); white-space: nowrap; }
.pop .held-note.idle, .pop .tag.r-carrier.idle { opacity: 0.55; }
/* Optus and TPG's shared (MOCN) sites: a tag in both carriers' colours. */
.pop .tag.mocn-tag { border-color: transparent; background: linear-gradient(90deg, rgb(0 161 154 / 0.22), rgb(196 52 47 / 0.22)); color: var(--fg); font-weight: 600; white-space: nowrap; }
.pop .mocn-box { margin: 6px 0 8px; padding: 8px 10px; border-left: 3px solid #00a19a; border-image: linear-gradient(#00a19a, #c4342f) 1; background: var(--bg); display: grid; gap: 4px; }
.pop .mocn-head, .pop .mocn-note { margin: 0; font-size: 12.5px; }
.pop .mocn-what { margin: 0; font-size: 12px; }
.pop .mocn-why { margin: 0; padding-left: 18px; font-size: 12px; color: var(--muted); display: grid; gap: 2px; }
.pop .mocn-box .held { margin: 2px 0 0; }
/* In a band that is faded already, fade them once, with it. */
.pop .held-band.idle .held-note, .pop .held-band.idle .tag.r-carrier { opacity: 1; }
/* An interleaved passive-active antenna's "IPAA", wherever its model is named. */
.tag.ipaa { display: inline-block; padding: 0 5px; border: 1px solid var(--muted); border-radius: 999px; font: 600 10px/1.5 var(--font-mono); letter-spacing: 0.03em; color: var(--fg); white-space: nowrap; vertical-align: 1px; }
.pop .freqs li { list-style: none; }
.pop .freqs ul { margin: 0; padding: 0; display: grid; gap: 1px; }
.pop .freqs .mono { color: var(--fg); }
.pop .muted { color: var(--muted); }

.locate-btn {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
  cursor: pointer;
  font: 500 13px var(--font-body);
}
.locate-btn:disabled { opacity: 0.6; cursor: progress; }
.locate-btn[aria-pressed="true"] { color: #ffffff; background: #1a73e8; border-color: #1a73e8; }
@media (hover: hover) { .locate-btn:not([aria-pressed="true"]):hover { background: var(--hover); } }
/* "None of the matches are on screen", over the map. */
.map-note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(340px, calc(100vw - 24px));
  padding: 6px 6px 6px 12px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
  font: 13px/1.35 var(--font-body);
}
.map-note .btn { flex: none; }
/* A searched address: a red pin, its point at the address. */
.place-pin-wrap { background: none; border: 0; }
.place-pin {
  position: relative;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  background: #d93025;
  box-shadow: 0 1px 5px rgb(0 0 0 / 0.45);
  transform: rotate(-45deg);
  cursor: pointer;
}
.place-pin::after { content: ""; position: absolute; left: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #ffffff; }
/* "You are here": the sectors pointing at you. */
.pop .facing { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pop .facing li { display: grid; gap: 2px; }
.pop .facing-site { color: var(--fg); font: 600 13px var(--font-body); text-align: left; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@media (pointer: coarse) { .locate-btn { min-height: 44px; padding: 10px 16px; } }

/* ---------- collapsible side panel (tablet / desktop) ---------- */
.brand { position: relative; }
.panel-hide {
  position: absolute;
  top: -4px;
  right: -6px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.brand h1 { padding-right: 36px; }
.map-page #app.panel-collapsed { grid-template-columns: 0 1fr; }
.map-page #app.panel-collapsed #panel { visibility: hidden; }
.panel-open {
  position: fixed;
  z-index: 1001;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.15);
  cursor: pointer;
  font-weight: 500;
}
@media (hover: hover) { .panel-hide:hover, .panel-open:hover { background: var(--hover); } }

/* site details sheet (phones) */
.site-sheet {
  position: fixed;
  z-index: 1300;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 72dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 30px rgb(0 0 0 / 0.2);
}
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 12px 4px; }
.sheet-head .grip { grid-column: 2; width: 36px; height: 4px; border-radius: 2px; background: var(--line); }
.sheet-close {
  grid-column: 3;
  justify-self: end;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
}
@media (hover: hover) { .sheet-close:hover { background: var(--hover); } }
.sheet-body { overflow-y: auto; padding: 4px 16px calc(16px + env(safe-area-inset-bottom, 0px)); -webkit-overflow-scrolling: touch; }
.freqs summary { cursor: pointer; color: var(--fg); padding: 4px 0; }

/* ---------- tablets ---------- */
@media (min-width: 821px) and (max-width: 1180px) {
  :root { --panel-w: 316px; }
}

/* ---------- touch screens: bigger targets, no iOS focus zoom ---------- */
@media (pointer: coarse) {
  .toggle { min-height: 44px; padding: 8px 10px; }
  .chip { min-height: 40px; padding: 8px 14px; }
  .actions button, .btn, .segmented button { min-height: 44px; padding: 10px 14px; }
  button.link { padding: 8px 2px; }
  .search input, .field select, .search input[type="search"] { font-size: 16px; min-height: 44px; }
  .results li { padding: 12px 10px; }
  .field input[type="range"] { height: 32px; }
  .panel-hide { width: 40px; height: 40px; }
  .page-nav a { padding: 8px 14px; }
  .leaflet-container a.leaflet-popup-close-button { width: 36px; height: 36px; font-size: 26px; line-height: 32px; }
}

/* ---------- phones: map on top, filters in a bottom sheet ---------- */
@media (max-width: 820px) {
  :root { --panel-w: 0px; }
  .map-page #app { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  #map { grid-row: 1; grid-column: 1; }
  #panel {
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    max-height: 62%;
    border-right: 0;
    border-top: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 24px rgb(0 0 0 / 0.15);
  }
  .panel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--muted);
  }
  .panel-toggle .grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line); }
  /* The sheet's overflow: hidden cuts a ring outside the bar: draw it inside, round the sheet's corners. */
  .panel-toggle:focus-visible { outline-offset: -3px; border-radius: 13px 13px 0 0; }
  #panel.collapsed .panel-body { display: none; }
  #panel.collapsed .panel-toggle { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .panel-body { padding-top: 4px; }
  .loading { left: 50%; transform: translate(-50%, -50%); }
  .panel-hide, .panel-open { display: none !important; }
  .map-page #app.panel-collapsed #panel { visibility: visible; }
  #panel { max-height: 62dvh; }
}

/* ---------- changes page ---------- */
.changes-page { height: auto; }
.changes-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: calc(20px + env(safe-area-inset-top, 0px)) calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.changes-brand h1 { font-size: clamp(28px, 4vw, 40px); padding-right: 0; }
.changes-brand .sub { max-width: 65ch; font-size: 14px; }
.changes-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.day-rail { position: sticky; top: calc(16px + env(safe-area-inset-top, 0px)); }
.day-select { display: none; }
/* Padding inside the scrolling list leaves room for the links' focus rings. */
.day-list { list-style: none; margin: 0 -4px; padding: 4px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100dvh - 140px); overflow-y: auto; scroll-padding-block: 8px; }
.day-list a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  text-decoration: none;
}
@media (hover: hover) { .day-list a:hover { background: var(--hover); } }
.day-list a[aria-current] { background: var(--ink); color: var(--ink-fg); }
.d-count { font-family: var(--font-mono); font-size: 12px; opacity: 0.8; font-variant-numeric: tabular-nums; }
.day { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.day-head h2 { margin: 0; font: 600 26px/1.15 var(--font-display); text-wrap: balance; }
.day-head .sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.notice { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-width: 65ch; }
.notice h2 { margin: 0 0 6px; font: 600 20px/1.2 var(--font-display); }
.notice p { margin: 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.summary-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.summary-table th, .summary-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.summary-table thead th { font-weight: 500; color: var(--muted); font-size: 12px; }
.summary-table th[scope="row"], .summary-table thead th:first-child { text-align: left; }
.summary-table th[scope="row"] { font-weight: 500; }
.carrier-cell { display: inline-flex; align-items: center; gap: 8px; }
#groups { display: flex; flex-direction: column; gap: 28px; }
.summary-table td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.summary-table tr.total th, .summary-table tr.total td { font-weight: 600; border-bottom: 0; }
.filter-bar { display: flex; flex-direction: column; gap: 10px; }
.filter-bar input[type="search"] { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-width: 420px; }
.change-group h3 { margin: 0; font: 600 18px/1.2 var(--font-display); display: flex; gap: 8px; align-items: baseline; }
.change-group h4 { margin: 0; font: 600 16px/1.2 var(--font-display); display: flex; gap: 8px; align-items: baseline; }
.change-group :is(h3, h4) .count { font: 500 13px var(--font-mono); color: var(--muted); }
/* One section per ACMA extract (several a day), newest first. */
.update { display: flex; flex-direction: column; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
#groups > .update:first-child { padding-top: 0; border-top: 0; }
.update-head h3 { margin: 0; font: 600 22px/1.2 var(--font-display); display: flex; gap: 8px; align-items: baseline; }
.update-head .sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.u-link { font: 500 15px var(--font-mono); color: var(--muted); text-decoration: none; }
.u-link:focus-visible { color: var(--fg); }
@media (hover: hover) { .u-link:hover { color: var(--fg); } }
.quiet { margin: 0; color: var(--muted); font-size: 13px; }
.quiet span { scroll-margin-top: 12px; }
.tag.when {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 11px/1.5 var(--font-mono);
  color: var(--muted);
  text-decoration: none;
}
@media (hover: hover) { .tag.when:hover { color: var(--fg); border-color: var(--fg); } }
.flash { animation: flash 2.4s ease-out; border-radius: var(--radius); }
@keyframes flash { from { background: var(--hover); box-shadow: 0 0 0 8px var(--hover); } to { background: transparent; box-shadow: 0 0 0 8px transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }
.change-group > .hint { margin: 2px 0 8px; }
.change-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.change {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.change.first { border-color: var(--fg); }
.c-top { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 13px; }
.c-title { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.c-meta { margin: 0; color: var(--muted); font-size: 12.5px; }
.c-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.c-label { color: var(--muted); font-size: 12px; min-width: 64px; }
.c-ant { font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.change .bands { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.c-sites { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.c-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.c-links .btn { font-size: 12.5px; padding: 5px 9px; }
.btn.more { align-self: flex-start; margin-top: 10px; }
.muted { color: var(--muted); }

@media (max-width: 820px) {
  .changes-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .day-rail { position: static; }
  .day-list { display: none; }
  .day-select { display: grid; }
}
@media (pointer: coarse) {
  .c-links .btn { min-height: 40px; display: inline-flex; align-items: center; }
  .filter-bar input[type="search"] { font-size: 16px; min-height: 44px; }
}
.changes-footer { max-width: 65ch; }
.others-head { border-top: 1px solid var(--line); padding-top: 18px; }
.others-head h2 { margin: 0; font: 600 21px/1.2 var(--font-display); }
.others-head .hint { margin-top: 2px; }

/* test sites page */
.chips.jump .chip { text-decoration: none; background: none; }   /* in-page links, like the page nav */
.t-sites { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.t-sites > li { display: grid; gap: 5px; padding-top: 10px; border-top: 1px dashed var(--line); min-width: 0; }
.t-sites .c-title { font-size: 14px; }
.t-freqs { display: grid; gap: 3px; font-size: 12.5px; }
.t-freqs .mono { font-size: 12px; }
.test-page .change-list { align-items: start; }
.t-more summary { cursor: pointer; color: var(--muted); font-size: 12.5px; padding: 2px 0; }
.t-more[open] summary { margin-bottom: 3px; }
.nowrap { white-space: nowrap; }
.dot.hatched { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0 1.2px, transparent 1.2px 3px) !important; }

.reg-links { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
/* Registrations by band: the chip links to the band's registration. */
.reg-bands { display: grid; gap: 5px; min-width: 0; }
.reg-band { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 6px; align-items: start; }
.reg-band > .band-link, .reg-band > .band-chip { margin-top: 3px; }
.reg-links .extra { display: none; }
.reg-links.open .extra { display: inline-flex; }
.btn.reg-more { font-size: 12px; padding: 3px 7px; }
a.band-link { text-decoration: none; color: inherit; border-radius: 999px; }
a.band-link .band-chip { cursor: pointer; }
a.band-link:focus-visible .band-chip { border-color: var(--fg); }
@media (hover: hover) { a.band-link:hover .band-chip { border-color: var(--fg); } }
.view-toggle.segmented { max-width: 340px; }
.btn.reg { font-family: var(--font-mono); font-size: 12px; padding: 3px 7px; }
.pop .freqs li { display: grid; gap: 2px; padding: 3px 0; }
.pop .freqs li + li { border-top: 1px dashed var(--line); }
@media (pointer: coarse) { .btn.reg { min-height: 36px; display: inline-flex; align-items: center; } }

/* ---------- spectrum page: band plans, one bar per band ---------- */
.bp-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.bp-field { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); flex: 0 1 220px; }
.bp-field select, .bp-field input { width: 100%; color: var(--fg); padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bp-search { flex: 1 1 280px; max-width: 460px; }
.bp-locate { min-height: 38px; }
.spectrum-page { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.bp-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.bp-legend li { display: inline-flex; align-items: center; gap: 6px; }
.bp-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; flex: none; }
.bp-swatch.gap { border: 1px solid var(--muted); }
.bp-swatch.gap, .bp-block.gap { background: var(--surface) repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 7px); }
.bp-totals { display: grid; gap: 6px; min-width: 0; }
.bp-totals h3, .bp-band-head h3 { margin: 0; font: 600 20px/1.2 var(--font-display); }
.bp-bands { display: flex; flex-direction: column; gap: 28px; }
.bp-band { display: grid; gap: 8px; min-width: 0; scroll-margin-top: 12px; }
.bp-band-head { display: grid; gap: 2px; }
.bp-sub { font: 500 14px var(--font-mono); color: var(--muted); }
.bp-box { display: grid; gap: 8px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.bp-title { margin: 0; font-size: 13px; color: var(--muted); }
.bp-bar { --row: 54px; position: relative; height: calc(var(--lanes, 1) * var(--row)); border: 2px solid var(--fg); border-radius: 4px; overflow: hidden; background: var(--surface); }
.bp-block {
  position: absolute;
  top: calc(var(--lane, 0) * var(--row));
  left: var(--x);
  width: var(--w);
  min-width: 3px;
  height: var(--row);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: var(--fill);
  color: var(--text);
  box-shadow: inset 1px 0 0 var(--surface), inset -1px 0 0 var(--surface);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.bp-block.gap { top: 0; height: 100%; z-index: 0; }
/* Assigned transmitter by transmitter (apparatus licences), not held over an area. */
.bp-block.assigned, .bp-swatch.assigned {
  background: repeating-linear-gradient(135deg, var(--fill, #5b6370) 0 7px, color-mix(in srgb, var(--fill, #5b6370) 45%, var(--surface)) 7px 10px);
}
.bp-block.assigned { text-shadow: 0 0 3px var(--fill), 0 0 2px var(--fill); }
@media (hover: hover) { .bp-block:hover { filter: brightness(1.08); } }
.bp-block[aria-pressed="true"] { z-index: 3; outline: 3px solid #f5c518; outline-offset: -3px; }
.bp-block:focus-visible { z-index: 3; outline: 3px solid var(--focus); outline-offset: -3px; }
.bp-name { max-width: 100%; overflow: hidden; white-space: nowrap; font: 600 13px/1.15 var(--font-body); }
.bp-mhz { white-space: nowrap; font: 500 11.5px/1.15 var(--font-mono); }
.bp-split { position: absolute; top: 0; bottom: 0; width: 0; z-index: 2; border-left: 2px dashed var(--fg); pointer-events: none; }
.bp-axis { position: relative; display: flex; justify-content: space-between; min-height: 18px; font: 500 12px var(--font-mono); color: var(--muted); }
.bp-tick { position: absolute; top: 0; transform: translateX(-50%); color: var(--fg); background: var(--surface); padding: 0 4px; }
.bp-detail { min-height: 40px; padding-top: 10px; border-top: 1px solid var(--line); }
.bp-detail h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font: 600 17px/1.2 var(--font-display); }
.bp-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 0; font-size: 13.5px; }
.bp-dl dt { color: var(--muted); }
.bp-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bp-lic { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.bp-detail .tag { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; white-space: nowrap; }
.bp-detail .tag.r-carrier { padding: 0 5px; border-color: var(--fg); font: 600 10.5px/1.45 var(--font-mono); }
.bp-detail .hint { margin-top: 8px; }
.bp-band.empty .quiet { padding: 4px 0; }
.chips.jump button.chip { font: inherit; font-size: 13px; color: inherit; }
@media (max-width: 560px) {
  .bp-field, .bp-search { flex: 1 1 100%; max-width: none; }
  .bp-box { padding: 12px 10px 10px; }
  .bp-bar { --row: 48px; }
  .bp-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .bp-dl dt { margin-top: 6px; }
}
@media (pointer: coarse) {
  .bp-block { min-width: 6px; }
  .bp-field select, .bp-field input { font-size: 16px; min-height: 44px; }
  .bp-locate { min-height: 44px; }
}

/* ---------- community notes ---------- */
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.note-list li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.note-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.note-list .note-site { text-align: left; font-size: 13px; color: var(--fg); font-weight: 500; }
.note-list .note-line { display: flex; gap: 6px; align-items: baseline; overflow-wrap: anywhere; }
.note-list .dot { position: relative; top: 1px; }
.note-list .muted { font-size: 12px; }
.pop .community { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); display: grid; gap: 8px; }
.pop .notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pop .note + .note { padding-top: 8px; border-top: 1px dashed var(--line); }
.pop .note-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.pop .note-meta { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; }
.pop .note-meta .link, .pop .hidden-banner .link { font-size: 11.5px; margin-left: auto; }
.pop .hidden-banner { margin: 0; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.pop .note-add summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.pop .note-add[open] summary { margin-bottom: 6px; color: var(--fg); }
.pop .note-form, .pop .hide-form, .pop .photo-form { display: grid; gap: 6px; }
.pop .note-form textarea, .pop .note-form select, .pop .note-form input, .pop .hide-form input, .pop .hide-form select,
.pop .photo-form select, .pop .photo-form input:not([type="file"]), .pop .merge-form input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}
.pop .note-form textarea { resize: vertical; min-height: 64px; }
.pop .note-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pop .note-form .btn, .pop .hide-form .btn { justify-self: start; }
.pop .photo-form input[type="file"] { font-size: 12.5px; max-width: 100%; }
.pop .community .hint { margin: 0; }   /* not Leaflet's popup paragraph spacing */
.pop .upload-row { display: flex; align-items: center; gap: 8px; }
.pop .upload-row progress { flex: 1; min-width: 0; accent-color: var(--ink); }
.pop .carrier .hidden-banner { margin: 2px 0 4px; }
/* One place registered under two ACMA site IDs, merged by an admin. */
.pop .merged { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.pop .merged a { color: var(--fg); }
.pop .merged .link { font-size: 11.5px; }
.pop .tag.merged-tag { border-style: dashed; color: var(--muted); font: 400 11px/1.5 var(--font-mono); text-decoration: none; }
@media (hover: hover) { .pop .tag.merged-tag:hover { color: var(--fg); } }
.pop .merge-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.pop .merge-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.pop .merge-site { min-width: 0; overflow-wrap: anywhere; }
.pop .merge-site .muted { display: block; font-size: 11.5px; }
.pop .merge-site .dot + .dot { margin-left: 3px; }
.pop .merge-list .btn { flex: none; font-size: 12px; padding: 3px 8px; color: var(--fg); }
.pop .merge-form .note-row { grid-template-columns: minmax(0, 1fr) auto; }
/* Photos and speed tests: thumbnails that open full size. */
.pop .photos { display: grid; gap: 8px; }
.pop .photo-day { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; }
.pop .photo-day .muted { font-weight: 400; }
.pop .photo-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pop .photo-item { position: relative; }
/* Your own photos (or any, for an admin): delete straight from the thumbnail. */
.pop .photo-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.68);
  color: #fff;
  font: 600 14px/20px var(--font-body);
  cursor: pointer;
}
.pop .photo-del:focus-visible { background: #b3261e; }
@media (hover: hover) { .pop .photo-del:hover { background: #b3261e; } }
.pop .photo {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  line-height: 0;
  cursor: zoom-in;
}
.pop .photo img { display: block; height: 72px; width: auto; max-width: 160px; object-fit: cover; }
.pop .photo-kind { position: absolute; left: 3px; bottom: 3px; padding: 2px 4px; border-radius: 3px; background: rgb(0 0 0 / 0.68); color: #fff; font: 600 10px/1.2 var(--font-body); }
.photo-viewer { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--fg); }
.photo-viewer::backdrop { background: rgb(0 0 0 / 0.86); }
.photo-viewer .pv-body { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
.photo-viewer .pv-image { min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; }
.photo-viewer .pv-image img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; background: #222; }
.photo-viewer .pv-bar { display: grid; gap: 4px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.photo-viewer .pv-caption { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.photo-viewer .pv-meta { margin: 0; font-size: 12px; color: var(--muted); }
.photo-viewer .pv-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.photo-viewer .pv-actions .btn { color: var(--fg); }
.community-user { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.community-user a:not(.btn) { color: var(--fg); }
.btn.discord-btn { background: #5865f2; border-color: #5865f2; color: #fff; font-weight: 600; }
@media (hover: hover) { .btn.discord-btn:hover { background: #4752c4; border-color: #4752c4; } }
.note-list .note-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); flex: none; align-self: center; }
/* A site with notes: a small count beside it on the map. */
.note-pin-wrap { background: none; border: 0; }
.note-pin {
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 14px;
  padding: 0 3px;
  border: 1px solid #17201c;
  border-radius: 3px 3px 3px 0;
  background: #f5c518;
  color: #17201c;
  font: 700 9.5px/1 var(--font-body);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
  cursor: pointer;
}
.note-pin { grid-auto-flow: column; gap: 2px; }
.note-pin svg { display: block; }
.note-pin.photos-only { background: #ffffff; }
@media (pointer: coarse) {
  .pop .note-form textarea, .pop .note-form select, .pop .note-form input, .pop .hide-form input, .pop .hide-form select,
  .pop .photo-form select, .pop .photo-form input, .pop .merge-form input { font-size: 16px; }
  .pop .merge-list .btn { min-height: 40px; }
  .pop .photo img { height: 84px; }
  .pop .photo-del { width: 28px; height: 28px; font-size: 17px; line-height: 28px; }
  .photo-viewer .pv-actions .btn, .community-user .btn { min-height: 44px; display: inline-flex; align-items: center; }
  .note-list .note-site { min-height: 32px; }
}

/* ---------- admin dashboard (/ygdadmin/) ---------- */
.admin { display: flex; flex-direction: column; gap: 18px; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.admin-bar p { margin: 0; }
.admin-bar #admin-status { flex-basis: 100%; }
.admin-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.admin-card h2 { margin: 0; font: 600 20px/1.2 var(--font-display); display: flex; gap: 8px; align-items: baseline; }
.admin-card h3 { margin: 6px 0 0; font: 600 16px/1.2 var(--font-display); display: flex; gap: 8px; align-items: baseline; }
.admin-card :is(h2, h3) .count { font: 500 13px var(--font-mono); color: var(--muted); }
.admin-card p { margin: 0; }
.admin-card .table-scroll { background: var(--bg); }
.warn { color: var(--warn); }
.link.danger { color: var(--warn); }
.meter { height: 10px; border-radius: 999px; background: var(--hover); overflow: hidden; border: 1px solid var(--line); }
.meter span { display: block; height: 100%; background: var(--ink); }
.meter.high span { background: var(--warn); }
.admin-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 7px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.admin-table thead th { font-weight: 500; color: var(--muted); font-size: 12px; white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table .acts { text-align: right; white-space: nowrap; }
.admin-table .when { white-space: nowrap; }
.admin-table .acts .link + .link { margin-left: 10px; }
.admin-table .note-cell { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 18ch; max-width: 60ch; }
.admin-table tr.blocked td { opacity: 0.7; }
.admin-table .dot, .admin-photo .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.admin-table a, .admin-photo a { color: var(--fg); }
.link-row { display: flex; flex-wrap: wrap; gap: 6px; }
.link-row input { flex: 1 1 280px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--fg); font: 12.5px var(--font-mono); }
.add-member { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.add-member label { flex: 1 1 280px; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.add-member input, .admin-filter { padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--fg); font: inherit; }
.admin-filter { max-width: 420px; width: 100%; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.admin-photo { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; min-width: 0; }
.admin-photo img { display: block; width: 100%; height: 140px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--hover); }
.admin-photo figcaption { display: grid; gap: 2px; overflow-wrap: anywhere; }
.admin-photo .link { justify-self: start; font-size: 12.5px; }
.admin-signin { display: grid; gap: 10px; }
.admin-signin .btn { display: inline-block; }
@media (pointer: coarse) {
  .admin-table .acts .link, .admin-photo .link { min-height: 40px; }
  .add-member input, .admin-filter, .link-row input { font-size: 16px; }
}

/* ---------- speed tests (/ygdadmin/speedtests.html) ---------- */
.speed { display: flex; flex-direction: column; gap: 16px; }
.speed select, .speed input:not([type="checkbox"]):not([type="file"]) {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--fg);
}
.st-import > summary { cursor: pointer; list-style: none; }
.st-import > summary::-webkit-details-marker { display: none; }
.st-import > summary h2::before { content: "+"; font: 500 18px var(--font-mono); color: var(--muted); width: 1ch; }
.st-import[open] > summary h2::before { content: "\2212"; }
.st-import-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; }
.st-field { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.st-field input, .st-field select { color: var(--fg); font-size: 13px; }
.st-field input[type="file"] { font-size: 12.5px; max-width: 100%; }
.st-ookla { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.st-ookla h3 { margin: 0 0 4px; font: 600 15px var(--font-display); }
.st-ookla-form, .st-links-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin-top: 8px; }
.st-links-form { margin-top: 14px; }
.st-links-form .hint { flex-basis: 100%; margin: 0; }
.st-wide { flex: 1 1 320px; min-width: 0; }
.st-wide textarea {
  width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--fg); font: 12.5px/1.4 var(--font-mono); resize: vertical;
}
#st-ookla-saved:empty { display: none; }
#st-ookla-saved .btn { margin-left: 6px; }
.st-filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.st-facet, .st-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-facet-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.st-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.st-tile { display: grid; gap: 2px; align-content: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.st-tile[data-zoom] { cursor: pointer; }
@media (hover: hover) { .st-tile[data-zoom]:hover { background: var(--hover); } }
.st-tile-label { font-size: 12px; color: var(--muted); }
.st-tile-value { font: 600 26px/1.15 var(--font-display); }
.st-tile-value small { font: 500 13px var(--font-body); color: var(--muted); }
.st-tile-sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.st-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; }
.st-toolbar label { display: inline-flex; align-items: center; gap: 6px; }
.st-toolbar .hint { margin-left: auto; }
.st-map { height: min(68vh, 640px); min-height: 360px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--map-bg); }
.st-legend { padding: 8px 10px; border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--fg); border: 1px solid var(--line); font: 12px/1.4 var(--font-body); max-width: 220px; }
.st-legend p { margin: 0; }
.st-legend-head { font-weight: 600; margin-bottom: 4px !important; }
.st-legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.st-legend li { display: flex; align-items: center; gap: 6px; }
.st-legend-foot { margin-top: 4px !important; }
.st-key { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #ffffff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.15); flex: none; }
.st-ring { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 3px solid var(--fg); background: #ffffff; margin-right: 6px; vertical-align: -1px; }
.st-filter-hint { flex-basis: 100%; }
.st-pop { display: grid; gap: 6px; font: 13px/1.4 var(--font-body); }
.st-pop p { margin: 0; }
.st-pop-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.st-pop a { color: var(--fg); }
.st-tests { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.st-test + .st-test { padding-top: 8px; border-top: 1px dashed var(--line); }
.st-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.st-line .dot { margin-right: 2px; }
.st-meta, .st-pred { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.st-pred { color: var(--fg); }
.st-more summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.st-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px !important; }
.st-acts .link { font-size: 12px; }
.st-chart-head { font-size: 12.5px; color: var(--muted); }
.st-keys { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.st-keys li { display: inline-flex; align-items: center; gap: 6px; }
.st-linekey { display: inline-block; width: 14px; height: 2px; border-radius: 1px; flex: none; }
.st-chart { position: relative; }
.st-chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.st-grid { stroke: var(--line); stroke-width: 1; }
.st-tick { fill: var(--muted); font: 11px var(--font-mono); font-variant-numeric: tabular-nums; }
.st-series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.st-dot { stroke: var(--surface); stroke-width: 2; }
.st-cross { stroke: var(--muted); stroke-width: 1; }
.st-hit { fill: transparent; cursor: crosshair; }
.st-hit:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.st-tip { position: absolute; top: 4px; padding: 8px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 14px rgb(0 0 0 / 0.12); font-size: 12px; pointer-events: none; min-width: 150px; z-index: 2; }
.st-tip p { margin: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.st-tip-head { color: var(--muted); margin-bottom: 4px !important; }
.st-tip strong { font-weight: 600; }
@media (max-width: 620px) {
  .st-toolbar .hint { margin-left: 0; flex-basis: 100%; }
  .st-tile-value { font-size: 22px; }
}
@media (pointer: coarse) {
  .speed select, .speed input:not([type="checkbox"]):not([type="file"]) { font-size: 16px; min-height: 40px; }
  .chip { min-height: 36px; }
  .st-acts .link { min-height: 36px; }
}
@media (max-width: 620px) {
  .st-legend { font-size: 11px; padding: 6px 8px; max-width: 150px; }
  .st-legend-head .muted, .st-legend-foot { display: none; }
}
