/* aprs.now: the sister sites' look (aprsthursday.com, spaceaprs.com), with aprs.now's own
   raspberry where they have amber. Light by default; the dark look is space round the globe.
   The layout stamps the reader's choice on <html data-theme> before anything is drawn.

   Every colour on the site is one of these, so the two looks differ in this block and nowhere
   else. "-rgb" tokens are the three numbers of a colour, for rgba(var(--x-rgb), 0.1). --tint is
   the ink laid thinly over a ground: white on dark, slate on light. */
:root {
    --bg: #0a0d12;
    --bg-rgb: 10, 13, 18;
    --panel: rgba(var(--panel-rgb), 0.86);
    --panel-rgb: 14, 18, 26;
    --panel-solid: #11161f;
    --tint: 255, 255, 255;
    --line: rgba(var(--tint), 0.08);
    --line-strong: rgba(var(--tint), 0.16);
    --text: #e8ecf2;
    --text-soft: #c9d0db;
    --muted: #8e98aa;
    --faint: #6a7386;
    --accent: #ff7a9c;
    --accent-rgb: 255, 122, 156;
    --accent-mark: #ff7a9c;
    --link: #8fc1ff;
    --ok: #5fd39a;
    --ok-rgb: 95, 211, 154;
    --warn: #f2b84b;
    --bad: #ff6b6b;
    --sky: radial-gradient(ellipse at 30% 20%, rgba(40, 60, 110, 0.25), transparent 60%), radial-gradient(ellipse at 70% 80%, rgba(110, 40, 60, 0.14), transparent 55%);
    --sun: none;
    --glint: none;
    --shade: 1;
    --invert: 1;
    --radius: 12px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
    color-scheme: dark;
}
/* The light look. Text on white: --text 16, --muted 6.0, --faint 4.6, --accent 5.2, --link 6.1 to 1. */
:root[data-theme="light"] {
    --bg: #f4f5f7;
    --bg-rgb: 244, 245, 247;
    --panel: rgba(var(--panel-rgb), 0.92);
    --panel-rgb: 255, 255, 255;
    --panel-solid: #ffffff;
    --tint: 16, 24, 40;
    --line: rgba(var(--tint), 0.1);
    --line-strong: rgba(var(--tint), 0.2);
    --text: #151a22;
    --text-soft: #343c4a;
    --muted: #586273;
    --faint: #6b7586;
    --accent: #c2335f;
    --accent-rgb: 194, 51, 95;
    --accent-mark: #c2335f;
    --link: #0b5fb8;
    --ok: #177a4a;
    --ok-rgb: 23, 122, 74;
    --warn: #b97c00;
    --bad: #c62a2f;
    /* Daylight behind the globe, as on the sister sites: blue at the top paling down, a white
       bloom behind the globe, and the sun the script moves (stars.js). */
    --sky: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9), transparent 58%), linear-gradient(180deg, #9cc5f2 0%, #c9e0f8 48%, #eef4fb 100%);
    --sun: radial-gradient(circle closest-side, rgba(255, 254, 246, 1) 0, rgba(255, 249, 226, 0.96) 3.5%, rgba(255, 236, 182, 0.62) 9%, rgba(255, 228, 164, 0.3) 24%, rgba(255, 228, 170, 0.11) 50%, rgba(255, 232, 184, 0) 100%);
    --glint: radial-gradient(circle closest-side, rgba(255, 255, 255, 0.72) 0, rgba(255, 255, 255, 0.4) 11%, rgba(255, 255, 255, 0.17) 34%, rgba(255, 255, 255, 0.05) 66%, rgba(255, 255, 255, 0) 100%);
    --shade: 0.3;
    --invert: 0;
    color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { overflow-x: hidden; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.45 var(--font);
    font-feature-settings: "tnum" 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.92em; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.top {
    position: relative;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 9px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(to bottom, rgba(var(--bg-rgb), 0.97), rgba(var(--bg-rgb), 0.85));
    backdrop-filter: blur(10px);
}
.brand { color: var(--text); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand .dot { color: var(--accent-mark); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.nav a.on, .nav a:hover { color: var(--text); background: rgba(var(--tint), 0.05); text-decoration: none; }
.menu-btn { display: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; place-items: center; }
.menu-btn svg { width: 18px; height: 18px; }
.powered-top { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; padding: 4px 12px 4px 5px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), 0.35); background: rgba(var(--accent-rgb), 0.07); color: var(--text); font-size: 13px; }
.powered-top:hover { text-decoration: none; border-color: var(--accent); }
.powered-top img { width: 24px; height: 24px; border-radius: 6px; }
.powered-top span { color: var(--muted); }
.powered-top b { color: var(--accent); font-weight: 650; }
.status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status.ok .dot { background: var(--ok); box-shadow: 0 0 10px rgba(var(--ok-rgb), 0.6); }
.status.warn .dot { background: var(--warn); }
.status.bad .dot { background: var(--bad); }
.theme-btn { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; margin-right: -8px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-btn:hover { color: var(--text); background: rgba(var(--tint), 0.06); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .ic-moon, :root[data-theme="light"] .theme-btn .ic-sun { display: none; }
:root[data-theme="light"] .theme-btn .ic-moon { display: block; }
.theme-btn.in-menu, .theme-btn[hidden] { display: none; }

/* Footer, on the ordinary pages. The map page has its own line on the map. */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.foot a, .legal a { color: var(--muted); }
.powered a { color: var(--accent); font-weight: 600; }

/* ---------- The map page: the map fills the window under the header ---------- */
body.map-page { height: 100vh; height: 100dvh; overflow: hidden; }
.map-main { position: relative; flex: 1; min-height: 0; }
/* The sky behind the globe (stars.js): space and stars in the dark, daylight and the sun in the light. */
.map {
    position: absolute; inset: 0;
    background-color: var(--bg);
    background-image: var(--stars, none), var(--sky);
    background-repeat: repeat, no-repeat, no-repeat, no-repeat;
    background-size: 1024px 1024px, auto, auto, auto;
}
.map .maplibregl-canvas { outline: none; }
.map .sun, .map .glint { position: absolute; left: 0; top: 0; border-radius: 50%; pointer-events: none; opacity: 0; will-change: transform, opacity; }
.map .sun { background-image: var(--sun); }
.map .glint { overflow: hidden; }
.map .glint i { position: absolute; left: 0; top: 0; border-radius: 50%; background-image: var(--glint); }
.map .empty { padding: 40px; color: var(--muted); }
/* The list of stations stacked on one spot (map.js, "Stacked stations"). */
.map .chooser { position: absolute; z-index: 5; min-width: 200px; max-width: min(320px, calc(100% - 16px)); max-height: min(60%, 360px); overflow: auto; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 10px; padding: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, calc(0.45 * var(--shade))); }
.chooser-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); padding: 4px 8px 2px; }
.chooser button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.chooser button:hover, .chooser button:focus-visible { background: rgba(var(--tint), 0.07); outline: none; }
.chooser .name { flex: 1; min-width: 0; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chooser .muted { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.chooser .tag { font-size: 10px; padding: 0 6px; }
.chooser-more { font-size: 12px; padding: 4px 8px 6px; }
/* A station's name under the pointer (map.js, installHover). */
.map .map-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; white-space: nowrap; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 7px; padding: 3px 8px; font-size: 12px; color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, calc(0.35 * var(--shade))); }
.map .map-tip[hidden] { display: none; }
.map .map-tip b { font-family: var(--mono); font-weight: 600; }
.map .map-tip span { color: var(--muted); }
/* Rings on new packets: a 2D canvas over the map's own (map.js says why not a map layer). */
.map .ring-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }

.maplibregl-ctrl-top-right { top: 6px; right: 6px; }
.maplibregl-ctrl-group { background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 6px 20px rgba(0, 0, 0, calc(0.4 * var(--shade))); }
.maplibregl-ctrl-group button { background-color: transparent; display: grid; place-items: center; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line); }
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(calc(0.85 * var(--invert))); }
.maplibregl-ctrl-group svg { width: 16px; height: 16px; color: var(--text); }
.maplibregl-ctrl-group .ic-flat, .maplibregl-ctrl-group[data-view="flat"] .ic-globe { display: none; }
.maplibregl-ctrl-group[data-view="flat"] .ic-flat { display: block; }
.maplibregl-ctrl-group { position: relative; overflow: visible; }
.maplibregl-ctrl-attrib { background: rgba(var(--panel-rgb), 0.9) !important; border-radius: 8px; font-size: 11px; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib-inner, .maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(calc(0.8 * var(--invert))); }

/* Demo mode: a circling arrow to start the globe turning, pause bars while it turns. */
.demo-ctrl .ic-pause, .demo-ctrl button[aria-pressed="true"] .ic-spin { display: none; }
.demo-ctrl button[aria-pressed="true"] .ic-pause { display: block; }
.maplibregl-ctrl-group button[aria-busy="true"] svg { animation: finding 1s ease-in-out infinite; }
@keyframes finding { 50% { opacity: 0.3; } }
.map-toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 5; max-width: calc(100% - 32px); background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 12px; font-size: 13px; color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, calc(0.45 * var(--shade))); }
.map-toast[hidden] { display: none; }
/* The time bar: the map at a past time (map.js, "The map at a past time"). */
.timebar { position: absolute; z-index: 4; left: 50%; bottom: 52px; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); display: flex; align-items: center; gap: 8px; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 12px; padding: 7px 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, calc(0.45 * var(--shade))); font-size: 13px; color: var(--text); }
.timebar[hidden] { display: none; }
.timebar.past { border-color: var(--accent); }
.timebar button, .timebar select { font: inherit; color: var(--text); background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 9px; cursor: pointer; }
.timebar .tb-live { white-space: nowrap; }
.timebar .tb-live[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.timebar .tb-play { width: 32px; height: 30px; padding: 0; display: grid; place-items: center; }
.timebar .tb-play svg { width: 14px; height: 14px; }
.timebar .tb-play .ic-pause, .timebar .tb-play[aria-pressed="true"] .ic-play { display: none; }
.timebar .tb-play[aria-pressed="true"] .ic-pause { display: block; }
.timebar .tb-range { flex: 1; min-width: 80px; accent-color: var(--accent); }
.timebar .tb-when { min-width: 9.5em; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timebar .tb-close { border: 0; font-size: 18px; line-height: 1; padding: 2px 6px; color: var(--muted); }
.timebar[aria-busy="true"] .tb-when { color: var(--muted); }
@media (max-width: 600px) {
    .timebar { bottom: 70px; flex-wrap: wrap; gap: 6px; }
    .timebar .tb-range { order: 5; flex-basis: 100%; }
    .timebar .tb-when { flex: 1; min-width: 0; }
}

/* The options menu, opening to the left of its button. */
.map-menu { position: absolute; right: calc(100% + 8px); top: 0; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, calc(0.45 * var(--shade))); font-size: 13px; color: var(--text); }
.map-menu[hidden] { display: none; }
.map-menu label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.map-menu label.check { justify-content: flex-start; gap: 7px; }
.map-menu select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 7px; padding: 3px 6px; }
.map-menu input { accent-color: var(--accent-mark); margin: 0; }

/* The search box, top left on the map. */
.search { position: absolute; z-index: 4; top: 12px; left: 12px; width: min(360px, calc(100% - 70px)); }
.search input {
    width: 100%; height: 40px; padding: 0 12px 0 36px; border-radius: 10px;
    border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
    font: 14px var(--font); backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, calc(0.35 * var(--shade)));
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); }
.search-ic { position: absolute; z-index: 1; left: 11px; top: 11px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.results { list-style: none; margin: 6px 0 0; padding: 4px; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, calc(0.45 * var(--shade))); max-height: min(60vh, 440px); overflow: auto; }
.results[hidden] { display: none; }
.results li { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.results li.on, .results li:hover { background: rgba(var(--tint), 0.06); }
.results li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.results li.ask { color: var(--muted); }
.results li.ask b { color: var(--text); font-weight: 600; }
.results li.ask .muted { margin-left: auto; }
.results li.note { color: var(--muted); cursor: default; }
.results li.note:hover { background: none; }
.results .muted { color: var(--faint); font-size: 12px; white-space: nowrap; }
.results .pin { width: 20px; height: 20px; flex-shrink: 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg) scale(0.7); background: var(--accent-mark); }
.sym { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; background-repeat: no-repeat; }

/* The station card, under the search box. */
.card {
    position: absolute; z-index: 3; top: 62px; left: 12px; width: min(360px, calc(100% - 70px));
    max-height: calc(100% - 110px); overflow: auto;
    background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: 0 16px 14px; backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, calc(0.45 * var(--shade)));
}
.card[hidden] { display: none; }
.card-close { flex-shrink: 0; margin-left: auto; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.card-close:hover { background: rgba(var(--tint), 0.06); color: var(--text); }
.card-close svg { width: 14px; height: 14px; }
/* The card's top line stays put while the rest scrolls under it (map.js, setCard). */
.card-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 9px; margin: 0 -16px 8px; padding: 12px 10px 8px 16px; background: var(--panel-solid); border-bottom: 1px solid transparent; }
.card-head h2 { min-width: 0; }
.card-head h2 { font-family: var(--mono); font-size: 18px; overflow-wrap: anywhere; }
.card-head h2 a { color: inherit; }
.card-head h2 a:hover { color: var(--link); }
code a.call { color: var(--link); }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; }
.card .said { margin: 0 0 10px; color: var(--text-soft); overflow-wrap: anywhere; }
.facts { display: grid; gap: 7px; margin: 0; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: baseline; }
.facts dt { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts code { font-size: 12px; color: var(--text-soft); }
.card .muted, .muted { color: var(--muted); }
.card p.muted { margin: 10px 0 0; font-size: 12.5px; }
/* The card's paths: a heading, the hour/day/3 days switch, then each route with its count. */
.paths { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.paths h3 { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.seg button { border: 0; background: transparent; padding: 3px 10px; font-size: 12px; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: rgba(var(--accent-rgb), 0.12); color: var(--text); }
.routes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.routes li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 13px; }
.routes .hops { min-width: 0; overflow-wrap: anywhere; }
.routes .muted { flex-shrink: 0; font-size: 12px; }
.paths p.muted { margin: 6px 0 0; }
button.link { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font-family: var(--mono); }
button.link:hover { text-decoration: underline; }

/* The line along the bottom: how many stations, and the small print. */
.map-foot { position: absolute; z-index: 2; left: 12px; bottom: 10px; right: 60px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; pointer-events: none; font-size: 12px; }
.map-foot > * { pointer-events: auto; background: rgba(var(--panel-rgb), 0.85); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; backdrop-filter: blur(8px); }
.map-foot .count { color: var(--text); font-weight: 500; }
.map-foot .legal { color: var(--faint); }
.map-foot .legal a:last-child { color: var(--accent); font-weight: 600; }

/* ---------- Ordinary pages ---------- */
.page { width: min(1080px, 100% - 32px); margin: 0 auto; padding: 28px 0 40px; flex: 1; }
.page-head { margin-bottom: 20px; }
.crumb { color: var(--faint); font-size: 12.5px; margin: 0 0 6px; }
.crumb a { color: var(--muted); }
.page h1 { font-size: 26px; }
.lede { color: var(--muted); margin: 6px 0 0; }
.prose { max-width: 720px; }
.prose p { color: var(--text-soft); line-height: 1.6; }
.prose h2 { font-size: 15px; margin: 22px 0 6px; color: var(--text); }

/* ---------- A station's page ---------- */
.station-head { margin-bottom: 18px; }
.station-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.station-title h1 { font-family: var(--mono); font-size: 28px; overflow-wrap: anywhere; }
.station-title .btn { margin-left: auto; }
.sym.big { transform: scale(1.4); margin: 0 4px; }
.station-head .said { margin: 10px 0 0; color: var(--text-soft); max-width: 72ch; overflow-wrap: anywhere; }
.facts.wide { margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 24px; }
.facts.wide div { grid-template-columns: 96px 1fr; }
.facts .call, .messages .call, .packets .call { font-family: var(--mono); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-strong); margin-bottom: 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 9px 14px; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs button[hidden] { display: none; }
.tz { margin: -8px 0 12px; font-size: 12px; }
.tab-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.tab-bar .seg { margin: 0; }
.tab-bar .check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.station-map { height: min(60vh, 520px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); background: var(--bg); }
.table-wrap { overflow-x: auto; }
.page table { border-collapse: collapse; width: 100%; font-size: 13px; }
.page th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line-strong); }
.page td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.page td time { white-space: nowrap; color: var(--muted); }
.packets td:nth-child(3) code { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.packets .raw { display: block; margin-top: 3px; font-size: 11.5px; color: var(--faint); overflow-wrap: anywhere; }
.packets.raw-only .said-cell { display: none; }
.packets.raw-only .raw { margin-top: 0; color: var(--text-soft); }
.messages tr.ack td { color: var(--muted); }
.wx-now { margin-bottom: 14px; }
.wx-now:empty { display: none; }
.wx-now .wx-head { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.wx-now dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0; }
.wx-now dl div { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.wx-now dt { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.wx-now dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.chart-box { position: relative; height: 240px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 34px; }
.chart-box h3 { font-size: 13px; margin: 0 0 6px; }
#tab-days .chart-box { height: 300px; margin-bottom: 16px; }
#trackCharts { margin-top: 16px; }
#trackCharts .chart-box { height: 220px; }
/* Telemetry bits: one row each, a cell per report, newest on the right. */
.chart-box.tlm-bits { height: auto; padding-bottom: 12px; }
.bit-row { display: grid; grid-template-columns: minmax(70px, 9em) 4em 1fr; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.bit-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bit-now { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.bit-cells { display: flex; gap: 1px; overflow: hidden; justify-content: flex-end; }
.bit { flex: 0 0 4px; height: 14px; border-radius: 1px; background: var(--line); }
.bit.on { background: var(--accent); }
.calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.calendar .day { border-radius: 8px; padding: 6px 8px; background: rgba(var(--accent-rgb), var(--level)); color: var(--text); display: flex; flex-direction: column; min-height: 48px; border: 1px solid var(--line); }
.calendar .day.none { background: transparent; color: var(--faint); border-style: dashed; }
.calendar .d { font-size: 12px; font-weight: 600; }
.calendar .n { font-size: 11px; font-family: var(--mono); }
/* The Charts tab. */
.chart-title { font-size: 15px; margin: 22px 0 4px; }
.chart-title:first-child { margin-top: 4px; }
#tab-charts > p.muted { margin: 0 0 10px; font-size: 13px; }
.activity { overflow-x: auto; }
.act-row { display: grid; grid-template-columns: 44px repeat(24, minmax(14px, 1fr)); gap: 3px; margin-bottom: 3px; min-width: 460px; }
.act-hours span { font-size: 11px; color: var(--faint); }
.act-day { font-size: 12px; color: var(--muted); align-self: center; }
.act-cell { display: inline-block; height: 20px; min-width: 14px; border-radius: 4px; background: rgba(var(--accent-rgb), var(--level)); }
.act-cell.none { background: transparent; border: 1px dashed var(--line-strong); }
.act-key { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.act-key .act-cell { width: 18px; height: 14px; }
#tab-charts .chart-box { height: 280px; }
.heard { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.heard .heard-map { height: 380px; }
.heard-lists h3 { font-size: 13px; margin: 0 0 6px; }
.heard-lists table + h3, .heard-lists p + h3 { margin-top: 16px; }
@media (max-width: 860px) { .heard { grid-template-columns: 1fr; } .heard .heard-map { height: 300px; } }
/* A station running APRS Connect: the app's logo, small, beside the name. */
.device.ours { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.device.ours img { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.device.ours:hover { color: var(--link); }
.card .station-link { display: inline-block; margin-top: 10px; font-weight: 600; }

/* ---------- The Live page ---------- */
.btn { font-size: 13px; border: 1px solid var(--line-strong); background: var(--panel-solid); color: var(--text); border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.live-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 8px 0; }
.live-bar .seg { margin: 0; }
.live-bar input { flex: 1 1 220px; min-width: 0; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel-solid); color: var(--text); font: 14px var(--font); }
.live-bar input:focus { outline: none; border-color: var(--accent); }
.live-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.live-list li { display: grid; gap: 2px 12px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; animation: arrive 0.6s ease-out; }
@keyframes arrive { from { background: rgba(var(--accent-rgb), 0.12); } to { background: transparent; } }
.live-list time { color: var(--faint); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.live-list .call { font-family: var(--mono); }
.live-list.messages li { grid-template-columns: 72px minmax(160px, 260px) 1fr; align-items: baseline; }
.live-list .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-list .to { color: var(--faint); font-size: 12px; }
.live-list .text { overflow-wrap: anywhere; color: var(--text-soft); }
.live-list li.ack .text, .live-list li.rej .text { color: var(--muted); }
.live-list.packets li { grid-template-columns: 72px 110px 1fr; align-items: baseline; }
.live-list .kind { color: var(--muted); font-size: 12px; }
.live-list code { overflow-wrap: anywhere; color: var(--text-soft); font-size: 12px; }
@media (max-width: 720px) {
    .live-list.messages li, .live-list.packets li { grid-template-columns: auto 1fr; }
    .live-list .text, .live-list code { grid-column: 1 / -1; }
}

/* ---------- Phones ---------- */
@media (max-width: 720px) {
    .top { gap: 10px; padding: 8px 12px; }
    .menu-btn { display: grid; order: 3; }
    .nav { display: none; position: absolute; top: 100%; right: 8px; flex-direction: column; min-width: 180px; padding: 6px; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, calc(0.45 * var(--shade))); }
    .nav.open { display: flex; }
    .nav a { padding: 9px 10px; }
    .theme-btn { display: none; }
    .theme-btn.in-menu:not([hidden]) { display: flex; width: auto; height: auto; gap: 8px; justify-content: flex-start; margin: 4px 0 0; padding: 9px 10px; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
    .powered-top { padding: 3px 9px 3px 4px; font-size: 12px; }
    .powered-top span { display: none; }
    .status .label { display: none; }
    .search { top: 8px; left: 8px; width: calc(100% - 62px); }
    /* On a phone the card is a sheet along the bottom, so the map above it stays to be seen. */
    .card { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 48%; border-radius: 14px 14px 0 0; border-bottom: 0; }
    .map-foot { left: 8px; bottom: 6px; right: 50px; }
    .map-foot .legal { display: none; }
}
