/* Inter (SIL Open Font License, served from this site) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-var-latin.woff2") format("woff2"); }
/* MB7UKC Live APRS */
:root {
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc; --ink: #0f172a; --ink-2: #334155; --muted: #64748b;
  --line: #e2e8f0; --line-2: #cbd5e1; --brand: #0b1b30; --brand-2: #12345a; --accent: #0284c7; --accent-ink: #ffffff;
  --direct: #059669; --digi: #2563eb; --igated: #d97706; --heard: #94a3b8;
  --ok: #16a34a; --bad: #dc2626; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
  --radius: 14px; --header: 64px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); -webkit-text-size-adjust: 100%; font-feature-settings: "tnum" 1, "cv11" 1;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a1220; --surface: #111b2d; --surface-2: #0e1727; --ink: #e2e8f0; --ink-2: #cbd5e1; --muted: #8b9ab0;
    --line: #1e2b42; --line-2: #2a3a57; --accent: #38bdf8; --accent-ink: #04111f; --heard: #64748b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); overflow-x: hidden; }
body { font-size: 15px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.01em; }
.muted { color: var(--muted); } .small { font-size: 13px; }
button, select, input { font: inherit; font-size: 14px; color: var(--ink); }
.btn, select, .toolbar input { height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
.btn { cursor: pointer; font-weight: 600; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--accent); } .btn.on, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
select { padding-right: 30px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 1200; background: linear-gradient(180deg, #0b1b30, #0d2240); color: #e2e8f0;
  padding-top: env(safe-area-inset-top); box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(2,8,23,.25); overflow: hidden; }
.top-in { max-width: 1440px; margin: 0 auto; height: var(--header); display: flex; align-items: center; gap: 22px; padding: 0 18px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none !important; flex: none; }
.brand img { border-radius: 9px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.brand-t strong { display: block; font-size: 17px; letter-spacing: .04em; line-height: 1.1; }
.brand-t small { display: block; font-size: 12px; color: #93a7c1; letter-spacing: .02em; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; padding-bottom: 14px; margin-bottom: -14px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: none; color: #a9bad0; padding: 8px 13px; border-radius: 9px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: #fff; background: rgba(255,255,255,.06); }
.tabs button.on { color: #fff; background: rgba(56,189,248,.16); box-shadow: inset 0 0 0 1px rgba(56,189,248,.35); }
.pill { display: flex; align-items: center; gap: 8px; flex: none; font-size: 13px; color: #cbd5e1; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); padding: 6px 12px; border-radius: 999px; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #64748b; display: inline-block; flex: none; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: beat 2s infinite; } .dot.off { background: #ef4444; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* ---------- map layout ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: calc(100dvh - var(--header) - env(safe-area-inset-top)); }
.mapbox { position: relative; min-width: 0; }
.map { position: absolute; inset: 0; background: #dbe4ee; }
.side { border-left: 1px solid var(--line); background: var(--surface-2); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.panel-h, .card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-h h2, .card-h h2 { font-size: 15px; margin: 0; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; border-left: 4px solid var(--heard); }
.kpi.direct { border-left-color: var(--direct); } .kpi.digi { border-left-color: var(--digi); } .kpi.igated { border-left-color: var(--igated); }
.kpi b { display: block; font-size: 24px; line-height: 1.15; font-weight: 750; } .kpi span { font-size: 12.5px; color: var(--muted); }
.meta { margin-top: 10px; font-size: 13px; color: var(--muted); display: grid; gap: 3px; } .meta b { color: var(--ink-2); font-weight: 600; }
.live-tag { display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; color: var(--ok); text-transform: uppercase; letter-spacing: .06em; }
.activity { flex: 1; min-height: 260px; display: flex; flex-direction: column; }
.act { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.act li { display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.act li:last-child { border-bottom: none; } .act li.empty { display: block; color: var(--muted); cursor: default; }
.act li.new { animation: slide .5s ease-out; } @keyframes slide { from { opacity: 0; transform: translateY(-6px); background: rgba(56,189,248,.12); } }
.act .call { font-weight: 700; font-size: 14px; } .act .when { font-size: 12px; color: var(--muted); }
.act .what { grid-column: 2 / -1; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--heard); grid-row: span 2; }
.badge svg { width: 17px; height: 17px; }
.badge.direct { background: var(--direct); } .badge.digi { background: var(--digi); } .badge.igated { background: var(--igated); }
.badge.beacon { background: var(--brand-2); } .badge.is2rf { background: #7c3aed; }

.legend { position: absolute; z-index: 500; left: 12px; bottom: 26px; display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: calc(100% - 24px);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line);
  border-radius: 11px; padding: 8px 12px; font-size: 12.5px; box-shadow: var(--shadow); color: var(--ink-2); }
.legend span { display: flex; gap: 6px; align-items: center; }
.legend.heat .ramp { width: 120px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #fde047, #fb923c, #dc2626); }
.k { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; }
.k.direct { background: var(--direct); } .k.digi { background: var(--digi); } .k.igated { background: var(--igated); } .k.heard { background: var(--heard); }

/* map markers */
.mk { display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -16px); width: max-content; }
.mk .b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--heard);
  border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(2,8,23,.35); transition: transform .15s; }
.mk:hover .b { transform: scale(1.12); }
.mk .b svg { width: 17px; height: 17px; }
.mk.direct .b { background: var(--direct); } .mk.digi .b { background: var(--digi); } .mk.igated .b { background: var(--igated); }
.mk .l { margin-top: 3px; font-size: 11px; font-weight: 700; color: #0f172a; background: rgba(255,255,255,.92); padding: 1px 6px;
  border-radius: 6px; box-shadow: 0 1px 3px rgba(2,8,23,.25); white-space: nowrap; letter-spacing: .02em; }
.mk.fresh .b { animation: ping 1.5s ease-out 1; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(56,189,248,.9), 0 2px 6px rgba(2,8,23,.35); } 100% { box-shadow: 0 0 0 18px rgba(56,189,248,0), 0 2px 6px rgba(2,8,23,.35); } }
.mk.home { transform: translate(-50%, -21px); }
.mk.home .b { position: relative; width: 42px; height: 42px; background: var(--brand); border-color: #38bdf8; }
.mk.home .b svg { width: 22px; height: 22px; color: #38bdf8; }
/* the pulse ring is pinned to the icon's own box, so every browser centres it */
.mk.home .b::after { content: ""; position: absolute; inset: -2.5px; box-sizing: border-box; border-radius: 50%; border: 2px solid #38bdf8; opacity: 0; }
/* pulses once each time MB7UKC digipeats, iGates or beacons (class added by app.js) */
.mk.home.busy .b::after { animation: radiate 1.6s ease-out 1; }
@keyframes radiate { from { transform: scale(1); opacity: .8; } to { transform: scale(2.4); opacity: 0; } }
.mk.home .l { background: var(--brand); color: #fff; }
.mk.trophy .b { background: #dc2626; }
.route { stroke-dasharray: 1800; stroke-dashoffset: 1800; animation: draw 1.4s ease-out forwards; transition: opacity 8s ease; }
.route.fade { opacity: 0 !important; } @keyframes draw { to { stroke-dashoffset: 0; } }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 8px 30px rgba(2,8,23,.25); }
.leaflet-popup-content { margin: 12px 14px; }
.pop h3 { margin: 0 0 2px; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.pop .sub { color: #64748b; font-size: 12.5px; margin-bottom: 8px; }
.pop table { border-collapse: collapse; font-size: 12.5px; width: 100%; } .pop td { padding: 3px 8px 3px 0; vertical-align: top; }
.pop td:first-child { color: #64748b; white-space: nowrap; } .pop code { font-size: 11.5px; word-break: break-all; }
.pop .wx { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.pop .wx div { background: #f1f5f9; border-radius: 8px; padding: 6px; text-align: center; } .pop .wx b { display: block; font-size: 15px; }
.pop .wx span { font-size: 11px; color: #64748b; }

/* ---------- pages ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 22px 18px 30px; width: 100%; }
.page-h h1 { font-size: 24px; margin: 0; } .page-h p { margin: 2px 0 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.search { flex: 1 1 220px; } .search input { width: 100%; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table.feed { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.feed th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.feed td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.feed tr:last-child td { border-bottom: none; } .feed tbody tr:hover td { background: var(--surface-2); }
.feed td.time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.feed td.stn { font-weight: 700; white-space: nowrap; } .feed td.path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink-2); }
.feed td.raw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--muted); max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed tr.new td { animation: flash 2.2s ease-out; } @keyframes flash { from { background: rgba(56,189,248,.18); } to { background: transparent; } }
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin: 1px 3px 1px 0;
  border: 1px solid transparent; white-space: nowrap; }
.tag.direct { color: var(--direct); background: color-mix(in srgb, var(--direct) 12%, transparent); border-color: color-mix(in srgb, var(--direct) 30%, transparent); }
.tag.digi { color: var(--digi); background: color-mix(in srgb, var(--digi) 12%, transparent); border-color: color-mix(in srgb, var(--digi) 30%, transparent); }
.tag.igated { color: var(--igated); background: color-mix(in srgb, var(--igated) 12%, transparent); border-color: color-mix(in srgb, var(--igated) 30%, transparent); }
.tag.heard { color: var(--muted); background: color-mix(in srgb, var(--heard) 14%, transparent); border-color: color-mix(in srgb, var(--heard) 30%, transparent); }
.tag.beacon { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tag.is2rf { color: #7c3aed; background: rgba(124,58,237,.1); }
.type { font-size: 12px; color: var(--muted); text-transform: capitalize; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--line-2); }
.stat.direct::before { background: var(--direct); } .stat.digi::before { background: var(--digi); } .stat.igated::before { background: var(--igated); }
.stat.ok::before { background: var(--ok); } .stat.bad::before { background: var(--bad); } .stat.accent::before { background: var(--accent); }
.stat span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat b { display: block; font-size: 28px; font-weight: 750; margin-top: 2px; line-height: 1.2; }
.stat small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .grid2 > .card { margin-bottom: 0; } .grid2 { margin-bottom: 16px; }
.chart svg { width: 100%; height: 220px; display: block; }
.chart .grid line { stroke: var(--line); } .chart text { fill: var(--muted); font-size: 10.5px; font-family: inherit; }
.chart rect { transition: opacity .15s; } .chart rect:hover { opacity: .75; }
.keys { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.keys span { display: flex; gap: 6px; align-items: center; }
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.health div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.health span { display: block; font-size: 12px; color: var(--muted); } .health b { font-size: 17px; }

/* coverage side */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; margin: 6px 0 12px; flex-wrap: wrap; }
.seg button { border: none; background: none; padding: 7px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.cov-facts { display: grid; gap: 8px; }
.cov-facts div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.cov-facts span { display: block; font-size: 12px; color: var(--muted); } .cov-facts b { font-size: 18px; }

/* about */
.hero { background: radial-gradient(1200px 300px at 80% -40%, rgba(56,189,248,.25), transparent), linear-gradient(135deg, #0b1b30, #12345a);
  color: #e2e8f0; border-radius: 18px; padding: 30px 30px 26px; margin-bottom: 16px; box-shadow: var(--shadow); }
.hero h1 { color: #fff; font-size: 30px; margin: 4px 0 8px; } .hero p { max-width: 720px; color: #b9c8db; margin: 0 0 18px; font-size: 16px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #38bdf8; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; } .hero .btn:not(.primary) { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.facts div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.facts dt { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; } .facts dd { margin: 2px 0 0; font-weight: 650; }
.prose p { color: var(--ink-2); max-width: 860px; } .prose h3 { font-size: 15px; margin: 22px 0 8px; }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 20px 0 6px; position: relative; }
.step { position: relative; text-align: center; padding: 0 8px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 28px; left: calc(50% + 34px); right: calc(-50% + 34px); height: 2px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, transparent)); }
.step .ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 8px; background: var(--brand); color: #38bdf8;
  box-shadow: 0 6px 16px rgba(11,27,48,.25); }
.step .ico svg { width: 26px; height: 26px; }
.step b { display: block; font-size: 14px; } .step small { display: block; color: var(--muted); font-size: 12px; }
.keylist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; } .keylist li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.keylist .k { position: relative; top: 1px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); background: var(--surface); }
.tab[data-tab="map"]:not([hidden]) ~ .foot, body:has(.tab[data-tab="map"]:not([hidden])) .foot,
body:has(.tab[data-tab="coverage"]:not([hidden])) .foot { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } .split { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 760px) {
  :root { --header: 104px; }
  .top-in { flex-wrap: wrap; height: auto; padding: 8px 12px 0; gap: 6px 10px; }
  .brand img { width: 30px; height: 30px; } .brand-t small { display: none; }
  .pill { margin-left: auto; font-size: 12px; padding: 5px 10px; }
  .tabs { order: 3; flex-basis: 100%; margin: 0 -6px -14px; }
  .split { display: block; height: auto; }
  .mapbox { height: 62dvh; } .side { border-left: none; border-top: 1px solid var(--line); }
  .activity { min-height: 0; } .act { max-height: 420px; }
  .page { padding: 16px 12px 24px; }
  .feed thead { display: none; }
  .feed tr { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .feed td { padding: 0; border: none !important; }
  .feed td.time { grid-row: 1; grid-column: 1; font-size: 12px; } .feed td.stn { grid-row: 1; grid-column: 2; }
  .feed td.typecol { grid-row: 1; grid-column: 3; } .feed td.tags { grid-row: 2; grid-column: 1 / -1; }
  .feed td.path { grid-row: 3; grid-column: 1 / -1; word-break: break-all; } .feed .rawcol, .feed td.raw { display: none; }
  .cards { grid-template-columns: 1fr 1fr; } .stat b { font-size: 22px; }
  .hero { padding: 22px 18px; } .hero h1 { font-size: 24px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 8px; } .facts div { padding: 8px 10px; } .facts dd { font-size: 14px; }
  .flow { grid-template-columns: 1fr; gap: 14px; }
  .step { display: grid; grid-template-columns: 56px 1fr; text-align: left; align-items: center; gap: 0 12px; }
  .step .ico { grid-row: span 2; margin: 0; } .step:not(:last-child)::after { top: 58px; left: 27px; right: auto; width: 2px; height: 14px; }
}

/* link status */
.linkrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 10px; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.lk { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.lk i { flex: none; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--heard); }
.lk span { min-width: 0; } .lk b { font-weight: 700; } .lk span { color: var(--ink); }
.lk small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk.ok i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.lk.warn i { background: #f59e0b; } .lk.bad i { background: var(--bad); }
.step .st { display: block; font-style: normal; font-size: 12px; font-weight: 700; margin-top: 4px; color: var(--muted); }
.step .st.ok { color: var(--ok); } .step .st.warn { color: #d97706; } .step .st.bad { color: var(--bad); }
.stat.warn::before { background: #f59e0b; }

/* station page */
.back { margin-bottom: 14px; }
.st-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.st-head .badge { width: 52px; height: 52px; grid-row: auto; } .st-head .badge svg { width: 28px; height: 28px; }
.st-head h1 { margin: 0; font-size: 28px; letter-spacing: .02em; } .st-head .sub { color: var(--muted); font-size: 14px; }
.st-head .links { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.st-head .links a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px;
  font-weight: 600; font-size: 13.5px; background: var(--surface); color: var(--ink); text-decoration: none; }
.st-head .links a:hover { border-color: var(--accent); color: var(--accent); }
.st-mapcard { padding: 0; overflow: hidden; } .stmap { height: 320px; }
.bars { display: grid; gap: 8px; } .bars .row { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; font-size: 13.5px; }
.bars .track { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bars .fill { height: 100%; background: var(--digi); border-radius: 6px; } .bars .n { text-align: right; color: var(--muted); }
.bars .fill.w10 { width: 10%; } .bars .fill.w20 { width: 20%; } .bars .fill.w30 { width: 30%; } .bars .fill.w40 { width: 40%; } .bars .fill.w50 { width: 50%; }
.bars .fill.w60 { width: 60%; } .bars .fill.w70 { width: 70%; } .bars .fill.w80 { width: 80%; } .bars .fill.w90 { width: 90%; } .bars .fill.w100 { width: 100%; }
.feed td.stn a, .act .call a { color: inherit; } .feed td.stn a:hover, .act .call a:hover { color: var(--accent); }
.pop .more { display: inline-block; margin-top: 8px; font-weight: 700; }

/* weather */
.wx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.wx-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; cursor: pointer;
  text-align: left; font: inherit; color: inherit; transition: border-color .15s, transform .15s; }
.wx-card:hover { border-color: var(--accent); transform: translateY(-1px); } .wx-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.wx-card .t { font-size: 30px; font-weight: 750; line-height: 1.1; } .wx-card .c { font-weight: 700; } .wx-card .m { color: var(--muted); font-size: 13px; }
.wx-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.wx-now div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.wx-now span { display: block; font-size: 12px; color: var(--muted); } .wx-now b { font-size: 19px; }
.wx-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; } .wx-charts h3 { font-size: 14px; margin: 0 0 4px; }
.chart.sm svg { height: 170px; } .chart .ln { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .area { opacity: .12; }

/* range by direction + records */
.polar svg { width: 100%; max-width: 320px; display: block; margin: 0 auto; }
.polar .ring { fill: none; stroke: var(--line-2); } .polar .spoke { stroke: var(--line); } .polar text { fill: var(--muted); font-size: 10px; }
.polar .wedge { fill: var(--direct); fill-opacity: .55; stroke: var(--direct); stroke-width: 1; } .polar .wedge:hover { fill-opacity: .85; }
.polar .home { fill: var(--brand); stroke: #38bdf8; stroke-width: 2; }
.records { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.records div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.records span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.records b { display: block; font-size: 18px; } .records small { color: var(--muted); }
.top10 { margin: 0; padding-left: 22px; font-size: 13.5px; } .top10 li { padding: 3px 0; border-bottom: 1px solid var(--line); }
.top10 li:last-child { border-bottom: none; } .top10 .d { float: right; color: var(--muted); }
@media (max-width: 760px) { .wx-charts { grid-template-columns: 1fr; } .st-head .links { margin-left: 0; width: 100%; } .stmap { height: 260px; } .records { grid-template-columns: 1fr 1fr; } }

/* ---------- finishing touches ---------- */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -.003em; }
h1 { font-weight: 750; letter-spacing: -.02em; } h2 { font-weight: 680; }
.kpi b, .stat b, .records b, .cov-facts b, .health b, .wx-card .t { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.tabs button:focus-visible { outline-color: #38bdf8; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
/* numbers still loading */
.kpi b:only-child, .kpi b { min-height: 28px; }
.loading { color: transparent !important; background: linear-gradient(90deg, var(--line) 25%, var(--surface-2) 50%, var(--line) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }
/* map controls to match */
.leaflet-bar a, .leaflet-control-layers { border: none !important; }
.leaflet-bar { border: 1px solid var(--line) !important; border-radius: 10px !important; overflow: hidden; box-shadow: var(--shadow) !important; }
.leaflet-bar a { background: var(--surface); color: var(--ink); } .leaflet-bar a:hover { background: var(--surface-2); }
.leaflet-control-layers { border-radius: 10px !important; box-shadow: var(--shadow) !important; background: var(--surface); color: var(--ink); }
.leaflet-control-layers-expanded { padding: 8px 12px; font-size: 13px; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 85%, transparent) !important; color: var(--muted); border-radius: 8px 0 0 0; }
.leaflet-control-attribution a { color: var(--accent); }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.pop .sub, .pop td:first-child, .pop .wx span { color: var(--muted); } .pop .wx div { background: var(--surface-2); }
.leaflet-tooltip { border-radius: 8px; border: 1px solid var(--line); box-shadow: var(--shadow); font-family: inherit; }
/* header refinements */
/* (no backdrop-filter on the header: it would trap the search suggestions inside it) */
.brand-t strong { font-weight: 800; letter-spacing: .06em; }
.foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foot strong { color: var(--ink-2); }
/* cards: gentle lift on hover where they're clickable */
.act li:hover { background: var(--surface-2); border-radius: 10px; }
.wx-card, .records div, .stat { transition: box-shadow .2s, transform .2s; }
.stat:hover { box-shadow: 0 2px 4px rgba(15,23,42,.06), 0 10px 26px rgba(15,23,42,.08); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* base map tone (applied to OpenStreetMap tiles in the browser) */
.tiles-light { filter: grayscale(.9) brightness(1.06) contrast(.9); }
.tiles-dark { filter: invert(1) hue-rotate(185deg) grayscale(.75) brightness(.92) contrast(.88); }
.map, .stmap { background: #e9edf2; }
@media (prefers-color-scheme: dark) { .map, .stmap { background: #1b2433; } }

/* header callsign search */
.find { position: relative; flex: 0 1 280px; min-width: 0; margin: 0; }
.find-open, .find-x { display: none; }
.find-box { position: relative; }
.find-ico, .find-open { width: 18px; height: 18px; }
.find-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #93a7c1; pointer-events: none; display: grid; }
.find-ico svg, .find-open svg { width: 18px; height: 18px; }
#find-q { width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07); color: #fff; font-size: 14px; outline: none; }
#find-q::placeholder { color: #93a7c1; } #find-q:focus { border-color: #38bdf8; background: rgba(255,255,255,.1); }
#find-q::-webkit-search-cancel-button { filter: invert(1); }
.find-list { position: fixed; z-index: 3001; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(2,8,23,.3);
  max-height: 60vh; overflow-y: auto; min-width: 260px; }
.find-list li { display: grid; grid-template-columns: 30px 1fr; gap: 0 10px; align-items: center; padding: 8px; border-radius: 9px; cursor: pointer; }
.find-list li.sel, .find-list li:hover { background: var(--surface-2); }
.find-list .badge { width: 30px; height: 30px; grid-row: span 2; } .find-list .badge svg { width: 16px; height: 16px; }
.find-list b { font-size: 14px; } .find-list small { color: var(--muted); font-size: 12px; }
.find-list li.none { display: block; cursor: default; padding: 10px; } .find-list li.none:hover { background: none; }
.find-list li.none b { display: block; margin-bottom: 3px; } .find-list li.none p { margin: 0; color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) { .find { flex-basis: 220px; } }
@media (max-width: 760px) {
  .find { flex: none; order: 2; margin-left: auto; }
  .find-open { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.07); color: #e2e8f0; cursor: pointer; padding: 0; }
  .find .find-box { display: none; }
  .find.open .find-box { display: block; position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top) + 8px); z-index: 3000; }
  .find.open .find-box { display: flex; align-items: center; gap: 8px; }
  .find.open .find-ico { left: 11px; }
  .find.open .find-x { display: block; flex: none; height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
    background: #0d2240; color: #fff; font: inherit; font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px rgba(2,8,23,.5); cursor: pointer; }
  .mk { transform: translate(-50%, -12px); }
  .mk .b { width: 24px; height: 24px; border-width: 2px; } .mk .b svg { width: 13px; height: 13px; }
  .mk .l { font-size: 10px; padding: 0 4px; margin-top: 2px; }
  .mk.home { transform: translate(-50%, -16px); }
  .mk.home .b { width: 32px; height: 32px; } .mk.home .b svg { width: 17px; height: 17px; }
  .find.open #find-q { flex: 1; min-width: 0; height: 46px; font-size: 16px; background: #0d2240; box-shadow: 0 10px 30px rgba(2,8,23,.5); }
  .pill { order: 3; margin-left: 0; max-width: 100%; }
  .leaflet-popup-close-button { width: 36px !important; height: 36px !important; font-size: 26px !important; line-height: 34px !important; }
}
.pop-open .leaflet-control-layers, :has(> .pop-open) > .legend { visibility: hidden; }

/* phones: the diagram's live status sits beside the title, under the description, and the joining line stays clear */
@media (max-width: 760px) {
  .step { grid-template-columns: 56px 1fr; grid-template-rows: auto auto auto; padding-bottom: 14px; }
  .step .ico { grid-row: 1 / span 3; align-self: start; }
  .step b, .step small, .step .st { grid-column: 2; }
  .step .st { margin-top: 2px; }
  .step:not(:last-child)::after { top: 62px; bottom: 0; height: auto; left: 27px; right: auto; width: 2px; }
}

/* outside links in comments + the "may not be safe" check */
a.ext { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.leave { width: min(420px, calc(100vw - 32px)); border: 1px solid var(--line, rgba(148,163,184,.25)); border-radius: 16px; padding: 22px;
  background: var(--surface, #fff); color: var(--ink); box-shadow: 0 20px 60px rgba(2,8,23,.45); }
.leave::backdrop { background: rgba(2,8,23,.6); }
.leave h2 { margin: 0 0 10px; font-size: 18px; }
.leave p { margin: 0 0 12px; color: var(--muted, #64748b); font-size: 14px; line-height: 1.5; }
.leave p b { color: #dc2626; }
.leave .leave-host { margin: 0 0 2px; color: var(--ink); font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.leave .leave-url { font-family: ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; }
.leave-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.leave-btns button { height: 42px; padding: 0 18px; border-radius: 10px; border: 0; font: inherit; font-weight: 600; cursor: pointer;
  background: #2563eb; color: #fff; }
.leave-btns button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line, rgba(148,163,184,.4)); }

/* APRS symbols: aprs.fi symbol set (github.com/hessu/aprs-symbols), 16 x 6 grid from '!' */
.sym { display: inline-block; flex: none; position: relative; width: 22px; height: 22px; background-size: 1600% 600%; background-repeat: no-repeat; }
.sym.t0 { background-image: url(aprs/sym-0.png); } .sym.t1 { background-image: url(aprs/sym-1.png); }
.sym .ov { position: absolute; inset: 0; background-image: url(aprs/sym-2.png); background-repeat: no-repeat; background-size: 1600% 600%; }
.sy-0 { background-position: 0.000% 0%; }
.sy-1 { background-position: 6.667% 0%; }
.sy-2 { background-position: 13.333% 0%; }
.sy-3 { background-position: 20.000% 0%; }
.sy-4 { background-position: 26.667% 0%; }
.sy-5 { background-position: 33.333% 0%; }
.sy-6 { background-position: 40.000% 0%; }
.sy-7 { background-position: 46.667% 0%; }
.sy-8 { background-position: 53.333% 0%; }
.sy-9 { background-position: 60.000% 0%; }
.sy-10 { background-position: 66.667% 0%; }
.sy-11 { background-position: 73.333% 0%; }
.sy-12 { background-position: 80.000% 0%; }
.sy-13 { background-position: 86.667% 0%; }
.sy-14 { background-position: 93.333% 0%; }
.sy-15 { background-position: 100.000% 0%; }
.sy-16 { background-position: 0.000% 20%; }
.sy-17 { background-position: 6.667% 20%; }
.sy-18 { background-position: 13.333% 20%; }
.sy-19 { background-position: 20.000% 20%; }
.sy-20 { background-position: 26.667% 20%; }
.sy-21 { background-position: 33.333% 20%; }
.sy-22 { background-position: 40.000% 20%; }
.sy-23 { background-position: 46.667% 20%; }
.sy-24 { background-position: 53.333% 20%; }
.sy-25 { background-position: 60.000% 20%; }
.sy-26 { background-position: 66.667% 20%; }
.sy-27 { background-position: 73.333% 20%; }
.sy-28 { background-position: 80.000% 20%; }
.sy-29 { background-position: 86.667% 20%; }
.sy-30 { background-position: 93.333% 20%; }
.sy-31 { background-position: 100.000% 20%; }
.sy-32 { background-position: 0.000% 40%; }
.sy-33 { background-position: 6.667% 40%; }
.sy-34 { background-position: 13.333% 40%; }
.sy-35 { background-position: 20.000% 40%; }
.sy-36 { background-position: 26.667% 40%; }
.sy-37 { background-position: 33.333% 40%; }
.sy-38 { background-position: 40.000% 40%; }
.sy-39 { background-position: 46.667% 40%; }
.sy-40 { background-position: 53.333% 40%; }
.sy-41 { background-position: 60.000% 40%; }
.sy-42 { background-position: 66.667% 40%; }
.sy-43 { background-position: 73.333% 40%; }
.sy-44 { background-position: 80.000% 40%; }
.sy-45 { background-position: 86.667% 40%; }
.sy-46 { background-position: 93.333% 40%; }
.sy-47 { background-position: 100.000% 40%; }
.sy-48 { background-position: 0.000% 60%; }
.sy-49 { background-position: 6.667% 60%; }
.sy-50 { background-position: 13.333% 60%; }
.sy-51 { background-position: 20.000% 60%; }
.sy-52 { background-position: 26.667% 60%; }
.sy-53 { background-position: 33.333% 60%; }
.sy-54 { background-position: 40.000% 60%; }
.sy-55 { background-position: 46.667% 60%; }
.sy-56 { background-position: 53.333% 60%; }
.sy-57 { background-position: 60.000% 60%; }
.sy-58 { background-position: 66.667% 60%; }
.sy-59 { background-position: 73.333% 60%; }
.sy-60 { background-position: 80.000% 60%; }
.sy-61 { background-position: 86.667% 60%; }
.sy-62 { background-position: 93.333% 60%; }
.sy-63 { background-position: 100.000% 60%; }
.sy-64 { background-position: 0.000% 80%; }
.sy-65 { background-position: 6.667% 80%; }
.sy-66 { background-position: 13.333% 80%; }
.sy-67 { background-position: 20.000% 80%; }
.sy-68 { background-position: 26.667% 80%; }
.sy-69 { background-position: 33.333% 80%; }
.sy-70 { background-position: 40.000% 80%; }
.sy-71 { background-position: 46.667% 80%; }
.sy-72 { background-position: 53.333% 80%; }
.sy-73 { background-position: 60.000% 80%; }
.sy-74 { background-position: 66.667% 80%; }
.sy-75 { background-position: 73.333% 80%; }
.sy-76 { background-position: 80.000% 80%; }
.sy-77 { background-position: 86.667% 80%; }
.sy-78 { background-position: 93.333% 80%; }
.sy-79 { background-position: 100.000% 80%; }
.sy-80 { background-position: 0.000% 100%; }
.sy-81 { background-position: 6.667% 100%; }
.sy-82 { background-position: 13.333% 100%; }
.sy-83 { background-position: 20.000% 100%; }
.sy-84 { background-position: 26.667% 100%; }
.sy-85 { background-position: 33.333% 100%; }
.sy-86 { background-position: 40.000% 100%; }
.sy-87 { background-position: 46.667% 100%; }
.sy-88 { background-position: 53.333% 100%; }
.sy-89 { background-position: 60.000% 100%; }
.sy-90 { background-position: 66.667% 100%; }
.sy-91 { background-position: 73.333% 100%; }
.sy-92 { background-position: 80.000% 100%; }
.sy-93 { background-position: 86.667% 100%; }

/* a symbol picture sits on white inside a ring in the colour of how it was heard */
.mk .b:has(.sym), .badge:has(.sym) { background: #fff; border: 3px solid var(--heard); }
.mk.direct .b:has(.sym), .badge.direct:has(.sym) { border-color: var(--direct); }
.mk.digi .b:has(.sym), .badge.digi:has(.sym) { border-color: var(--digi); }
.mk.igated .b:has(.sym), .badge.igated:has(.sym) { border-color: var(--igated); }
.badge.beacon:has(.sym) { border-color: var(--brand-2); } .badge.is2rf:has(.sym) { border-color: #7c3aed; }
.mk .b .sym { width: 22px; height: 22px; } .badge .sym { width: 20px; height: 20px; }
.st-head .badge .sym { width: 36px; height: 36px; } .find-list .badge .sym { width: 20px; height: 20px; }
.symrow { display: inline-flex; align-items: center; gap: 8px; } .symrow .sym { width: 26px; height: 26px; }
.symrow code { margin-left: 4px; opacity: .65; font-size: .9em; }
@media (max-width: 760px) {
  .mk .b:has(.sym) { width: 26px; height: 26px; border-width: 2.5px; } .mk .b .sym { width: 19px; height: 19px; }
  .mk:has(.sym) { transform: translate(-50%, -13px); }
}

/* MB7UKC's own marker with its beacon symbol: white disc, sky-blue ring, a bit larger than the rest */
.mk.home .b:has(.sym) { border-color: #38bdf8; } .mk.home .b .sym { width: 30px; height: 30px; }
@media (max-width: 760px) {
  .mk.home .b:has(.sym) { width: 32px; height: 32px; } .mk.home .b .sym { width: 23px; height: 23px; }
  .mk.home:has(.sym) { transform: translate(-50%, -16px); }
}

/* how MB7UKC's beacon went out */
.via { display: inline-block; padding: 1px 8px; margin: 0 4px 3px 0; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.via.rf { background: color-mix(in srgb, var(--direct) 18%, transparent); color: var(--direct); }
.via.is { background: color-mix(in srgb, var(--igated) 18%, transparent); color: var(--igated); }

/* pop-ups can be dragged by their body; once moved the pointer tail no longer points anywhere, so hide it */
.leaflet-popup-content-wrapper { cursor: grab; touch-action: none; } .leaflet-popup-content-wrapper:active { cursor: grabbing; }
.leaflet-popup-content-wrapper a, .leaflet-popup-content-wrapper button { cursor: pointer; }
.leaflet-popup.moved .leaflet-popup-tip-container { visibility: hidden; }
.leaflet-popup-content-wrapper { position: relative; }
.leaflet-popup-content-wrapper::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
  border-radius: 2px; background: var(--line-2); }

/* Kevin's private visitor count page (/v/<key>) */
body.visits { background: var(--bg); color: var(--ink); }
.vpage { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.vpage h1 { margin: 0 0 6px; } .vpage h2 { margin: 26px 0 10px; font-size: 17px; }
.vpage .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 10px; }
.vpage .kpi small { display: block; color: var(--muted); font-size: 12px; }
.devs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.devs li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.vdays { width: 100%; border-collapse: collapse; font-size: 14px; }
.vdays th, .vdays td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.vdays .n { text-align: right; font-variant-numeric: tabular-nums; width: 70px; }
.vdays td:nth-child(2) { width: 45%; } .vdays progress { width: 100%; height: 10px; accent-color: var(--accent); }
@media (max-width: 760px) { .vpage .kpis { grid-template-columns: 1fr 1fr; } }
.docs { list-style: none; padding: 0; margin: 0; } .docs li { padding: 10px 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 8px; } .docs a { font-weight: 700; color: var(--accent); }

/* neighbours (Coverage tab) */
.legend .nbline { display: inline-block; width: 26px; height: 0; border-top: 4px solid #7c3aed; border-radius: 2px; }
.legend .nbline.dash { border-top: 3px dashed #7c3aed; }
.nb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nb-list li { display: grid; grid-template-columns: 30px 1fr; gap: 0 10px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.nb-list li:last-child { border-bottom: 0; } .nb-list .badge { width: 30px; height: 30px; grid-row: span 2; }
.nb-list a { color: var(--ink); text-decoration: none; } .nb-list small { color: var(--muted); font-size: 12px; grid-column: 2; }

.vsite { margin: 22px 0 8px; padding-top: 6px; border-top: 2px solid var(--line); }
.vsite h2 { margin: 12px 0 4px; } .vsite h3 { margin: 18px 0 8px; font-size: 15px; } .vpage .small { font-size: 13px; }
.vdetails { margin-top: 14px; } .vdetails summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 6px 0; }

/* link to the sister site (MeshCore live chat) */
.xsite { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius, 14px); text-decoration: none;
  color: #fff; background: linear-gradient(135deg, #0f2e2a 0%, #0b1220 60%, #0d2a26 100%); border: 1px solid #1f5c50;
  box-shadow: 0 6px 18px rgba(4, 20, 18, .25); position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; flex: none; }
.xsite::before { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  border: 2px solid rgba(43, 181, 150, .28); box-shadow: 0 0 0 18px rgba(43, 181, 150, .08), 0 0 0 40px rgba(43, 181, 150, .04); }
.xsite:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(4, 20, 18, .35); }
.xs-ico { flex: none; position: relative; width: 48px; height: 48px; }
.xs-ico img { display: block; border-radius: 12px; }
.xs-ico::after { content: ""; position: absolute; inset: -4px; border-radius: 15px; border: 2px solid #2bb596; opacity: 0;
  animation: xs-ping 2.8s ease-out infinite; }
@keyframes xs-ping { 0% { opacity: .8; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .xs-ico::after { animation: none; } }
.xs-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; position: relative; }
.xs-txt small { color: #5eead4; font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.xs-txt b { font-size: 16px; } .xs-txt span { font-size: 12.5px; color: #cbd5e1; line-height: 1.35; }
.xs-go { flex: none; font-size: 30px; line-height: 1; color: #5eead4; position: relative; }

/* private document viewer: always a way back */
.docbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top)); background: #0b1b30; color: #fff; }
.docbar b { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docback, .docpdf { flex: none; color: #fff; text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 9px; background: rgba(255,255,255,.12); }
.docpdf { background: #0284c7; }
.docmain { padding: 12px; max-width: 1400px; margin: 0 auto; }
.docimg { display: block; width: 100%; height: auto; border-radius: 8px; background: #fff; box-shadow: 0 4px 16px rgba(2,8,23,.18); }
.docfull { overflow: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; background: #fff; box-shadow: 0 4px 16px rgba(2,8,23,.18); }
.docfull img { display: block; width: 1400px; max-width: none; height: auto; }

/* packet details (tap a packet) */
#feed tr[data-id], #activity li[data-id] { cursor: pointer; }
#feed tr[data-id]:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.pkt { width: min(560px, calc(100vw - 24px)); max-height: min(86vh, 760px); border: 1px solid var(--line); border-radius: 16px; padding: 0;
  background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(2,8,23,.45); }
.pkt::backdrop { background: rgba(2,8,23,.55); }
.pkt-head { position: sticky; top: 0; display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line); z-index: 1; }
.pkt-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 19px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pkt-head .tag-row { display: inline-flex; flex-wrap: wrap; gap: 4px; font-size: 12px; font-weight: 600; }
.pkt-x { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  font-size: 18px; cursor: pointer; }
.pkt-body { padding: 4px 16px 18px; }
.pkt-body h3 { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hops { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hop { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); }
.hop.src { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.hop.digi { background: color-mix(in srgb, var(--digi) 14%, transparent); border-color: color-mix(in srgb, var(--digi) 45%, transparent); color: var(--digi); }
.hop.alias { color: var(--muted); }
.hop.faded { opacity: .6; border-style: dashed; } .left { margin: 10px 0 0; line-height: 2.1; }
.hop.me { background: #0284c7; color: #fff; border-color: #38bdf8; }
.pkt-x { display: grid; place-items: center; }
.hops .arrow { color: var(--muted); font-size: 13px; }
.pkt-kv { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.pkt-kv td { padding: 7px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pkt-kv td:first-child { color: var(--muted); width: 40%; padding-right: 10px; }
.pkt-kv .yes { color: var(--direct); }
.pkt-raw { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px;
  white-space: pre-wrap; word-break: break-all; }
.pkt-body .more { display: inline-block; margin-top: 14px; }

/* map markers about 15-20% smaller (Kevin, 21 Nov) */
.mk { transform: translate(-50%, -13px); }
.mk .b { width: 26px; height: 26px; } .mk .b svg { width: 14px; height: 14px; }
.mk .b:has(.sym) { width: 26px; height: 26px; border-width: 2.5px; } .mk .b .sym { width: 18px; height: 18px; }
.mk .l { font-size: 10.5px; padding: 1px 5px; margin-top: 2px; }
.mk.home { transform: translate(-50%, -18px); }
.mk.home .b, .mk.home .b:has(.sym) { width: 36px; height: 36px; } .mk.home .b svg { width: 19px; height: 19px; } .mk.home .b .sym { width: 25px; height: 25px; }
@media (max-width: 760px) {
  .mk, .mk:has(.sym) { transform: translate(-50%, -11px); }
  .mk .b, .mk .b:has(.sym) { width: 22px; height: 22px; border-width: 2px; } .mk .b svg { width: 12px; height: 12px; } .mk .b .sym { width: 16px; height: 16px; }
  .mk .l { font-size: 9.5px; padding: 0 4px; }
  .mk.home, .mk.home:has(.sym) { transform: translate(-50%, -14px); }
  .mk.home .b, .mk.home .b:has(.sym) { width: 28px; height: 28px; } .mk.home .b svg { width: 15px; height: 15px; } .mk.home .b .sym { width: 20px; height: 20px; }
}
