/* Rain Station Board, the /v3/ page. Phone first. One physical wetness state per station. No colour without text. */
:root {
  --canvas: #08111F; --surface: #111C2E; --raised: #17243A; --border: #2A3A52;
  --text: #F8FAFC; --muted: #A8B3C5; --dim: #6B7A90;
  --locked: #22D3EE; --wet: #60A5FA; --imminent: #E879F9; --approaching: #A78BFA;
  --nearby: #FBBF24; --overdue: #F87171; --quiet: #94A3B8; --unknown: #64748B;
  --pos: #34D399; --neg: #FB7185; --accent: #38BDF8;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 60px;
}
body.light {
  --canvas: #F4F7FB; --surface: #FFFFFF; --raised: #EAF0F7; --border: #CBD5E1;
  --text: #0F172A; --muted: #526176; --dim: #7C8AA0;
  --locked: #0E7490; --wet: #1D4ED8; --imminent: #A21CAF; --approaching: #6D28D9;
  --nearby: #B45309; --overdue: #B91C1C; --quiet: #64748B; --unknown: #94A3B8;
  --pos: #047857; --neg: #BE123C; --accent: #0369A1;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--canvas); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; min-height: 100dvh; }
a { color: var(--accent); text-decoration: none; }
b { font-weight: 700; }
button { font: inherit; color: inherit; background: var(--raised); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; cursor: pointer; min-height: 40px; }
button.on { background: var(--accent); color: #041018; border-color: var(--accent); font-weight: 700; }
button:disabled { opacity: .5; cursor: default; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
small { font-size: 12.5px; color: var(--muted); }
.hidden { display: none !important; }

/* V3 navigation and separated model labels and values. */
.back-link { padding: 8px 14px; font-size: 12px; }
#board .model-freshness { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
#board .kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; }
#board .kv > span { overflow-wrap: anywhere; }

/* header */
#top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
#top .brand { font-weight: 800; letter-spacing: .02em; font-size: 15px; }
#top .brand span { color: var(--muted); font-weight: 500; margin-left: 8px; font-size: 12px; }
#top .fresh { margin-left: auto; font-size: 12px; color: var(--muted); }
#top .fresh.bad { color: var(--overdue); font-weight: 700; }
#top button { min-height: 32px; padding: 4px 10px; font-size: 12px; }

/* nav */
#nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h); display: flex; background: var(--surface); border-top: 1px solid var(--border); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
#nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; min-height: 44px; }
#nav a i { font-style: normal; font-size: 18px; line-height: 1; }
#nav a.on { color: var(--accent); }
#nav a .n { position: absolute; margin-top: -28px; margin-left: 34px; background: var(--overdue); color: #fff; border-radius: 9px; font-size: 10px; padding: 1px 5px; }

main { flex: 1; padding: 12px 12px calc(var(--nav-h) + 16px); max-width: 1180px; width: 100%; margin: 0 auto; }
section[data-mode] { display: none; }
section[data-mode].on { display: block; }
h2 { font-size: 20px; margin: 4px 0 10px; }
h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 8px; }
.note { color: var(--muted); font-size: 12px; margin: 6px 0 10px; }

/* state chips */
.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; font-size: 12px; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.st i { font-style: normal; font-size: 13px; }
.st.LOCKED { color: #041018; background: var(--locked); }
.st.WET_NOW { color: #041018; background: var(--wet); }
.st.WET_IMMINENT { color: #fff; background: var(--imminent); }
.st.APPROACHING { color: #fff; background: var(--approaching); }
.st.RAIN_NEARBY { color: #1a1200; background: var(--nearby); }
.st.OVERDUE { color: #fff; background: var(--overdue); }
.st.QUIET { color: var(--text); background: transparent; border-color: var(--border); }
.st.UNKNOWN { color: var(--text); background: repeating-linear-gradient(45deg, var(--raised), var(--raised) 4px, var(--border) 4px, var(--border) 8px); }
.row.ovl { box-shadow: inset 0 0 0 2px var(--overdue); }

/* station rows */
.queue { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.row:active { background: var(--raised); }
.row .city { font-size: 16px; font-weight: 800; }
.row .city small { margin-left: 6px; font-weight: 500; }
.row .line { color: var(--muted); font-size: 13px; grid-column: 1 / -1; }
.row .line b { color: var(--text); }
.row .right { text-align: right; }
.row .price { font-size: 15px; font-weight: 800; }
.row .price small { display: block; color: var(--muted); font-weight: 500; }
.row .gauge { font-size: 13px; }
.row .gauge b.lock { color: var(--locked); }
.row .timing { font-size: 13px; }
.row .timing b { color: var(--text); }
.row.expanded .more { display: block; }
.row .more { display: none; grid-column: 1 / -1; border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.urgent { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.urgent .u { flex: 0 0 auto; background: var(--raised); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; min-width: 130px; }
.urgent .u b { display: block; font-size: 14px; }
.urgent .u small { display: block; margin-top: 4px; max-width: 200px; white-space: normal; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.chips button { min-height: 34px; padding: 4px 12px; border-radius: 999px; font-size: 12px; }
.empty { color: var(--muted); padding: 14px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; }

/* maps */
.mapbox { position: relative; height: 46vh; min-height: 260px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #000; }
#map-live.mapbox { height: 52vh; }
#map-airport.mapbox { height: 56vh; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.radarctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.radarctl button { min-height: 34px; padding: 4px 10px; font-size: 12px; }
.radarctl .ft { font-size: 12px; font-weight: 700; flex: 1 1 100%; }
.radarctl .ft.fc { color: var(--nearby); }
.radarctl .ft.stale { color: var(--overdue); }
.radarctl .src { font-size: 11px; color: var(--muted); }
.radarctl input[type=range] { flex: 1 1 220px; }
.scrubwrap { position: relative; flex: 1 1 220px; }
.scrubwrap .zones { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); letter-spacing: .06em; margin-top: -2px; }
.legend { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 6px; }
.legend .sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.legend b { color: var(--text); }

/* airport */
.decision { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.decision .name { font-size: 22px; font-weight: 800; }
.decision .name small { font-weight: 500; }
.decision .big { font-size: 28px; font-weight: 750; text-align: right; }
.decision .big small { display: block; font-size: 11px; font-weight: 500; }
.decision .sub { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.selector { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.selector select { flex: 1; font: inherit; background: var(--raised); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-height: 40px; }
.stack details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; }
.stack summary { cursor: pointer; padding: 10px 12px; font-weight: 700; font-size: 13px; list-style: none; display: flex; justify-content: space-between; }
.stack summary::-webkit-details-marker { display: none; }
.stack summary span { color: var(--muted); font-weight: 500; }
.stack .body { padding: 0 12px 10px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.stack .body b { color: var(--text); }
.stack .body .kv { display: grid; grid-template-columns: 110px 1fr; gap: 2px 8px; }
.stack .body .kv span:nth-child(odd) { color: var(--dim); }
.hours { display: flex; gap: 2px; align-items: flex-end; height: 70px; margin: 8px 0 2px; }
.hours i { flex: 1; background: var(--raised); border-radius: 3px 3px 0 0; position: relative; min-height: 3px; }
.hours i.past { opacity: .35; }
.hours i.now { outline: 2px solid var(--text); }
.hours i.wet { background: var(--wet); }
.hours i.hrrr { box-shadow: inset 0 3px 0 var(--nearby); }
.hours i b { position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font-size: 9px; color: var(--dim); font-weight: 500; }
.hourlbl { display: flex; justify-content: space-between; font-size: 10px; color: var(--dim); margin-top: 14px; }
.camstrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; }
.camstrip .cam, .camgrid .cam { flex: 0 0 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.camgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.cam .ph { height: 124px; background: var(--raised); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; cursor: pointer; }
.cam img, .cam iframe { width: 100%; height: 124px; object-fit: cover; border: 0; display: block; }
.cam .cap { padding: 6px 8px; font-size: 11px; color: var(--muted); }
.cam .cap b { color: var(--text); display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam.dead { opacity: .5; }

/* scorecard */
table.sc { width: 100%; border-collapse: collapse; font-size: 13px; }
table.sc th, table.sc td { text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--border); }
table.sc th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
table.sc td.thin { color: var(--overdue); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 10px; }

/* map markers */
.mk { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #041018; box-shadow: 0 1px 6px rgba(0,0,0,.5); cursor: pointer; }
.mk.LOCKED { background: var(--locked); } .mk.WET_NOW { background: var(--wet); } .mk.WET_IMMINENT { background: var(--imminent); color: #fff; }
.mk.APPROACHING { background: var(--approaching); color: #fff; } .mk.RAIN_NEARBY { background: var(--nearby); } .mk.OVERDUE { background: var(--overdue); color: #fff; }
.mk.QUIET { background: #1f2937; color: #cbd5e1; } .mk.UNKNOWN { background: #374151; color: #cbd5e1; }
.mk.ovl { box-shadow: 0 0 0 3px var(--overdue), 0 1px 6px rgba(0,0,0,.5); }
.mk .lbl { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; color: #fff; text-shadow: 0 1px 3px #000; font-weight: 700; }
.pin { width: 18px; height: 18px; border-radius: 50%; background: var(--locked); border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(34,211,238,.35), 0 1px 6px #000; }
.pin .lbl { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; color: #fff; text-shadow: 0 1px 3px #000; font-weight: 800; letter-spacing: .04em; }
.cell { position: relative; }
.cell .arrow { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 22px solid var(--imminent); filter: drop-shadow(0 1px 3px #000); }
.cell.miss .arrow { border-bottom-color: var(--nearby); }
.cell .lbl { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; background: rgba(0,0,0,.65); color: #fff; padding: 1px 5px; border-radius: 6px; }
.nb { width: 12px; height: 12px; border-radius: 50%; background: #64748B; border: 2px solid #fff; }
.nb.wet { background: var(--wet); }
.nb .lbl { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9px; color: #fff; text-shadow: 0 1px 3px #000; }
.camk { width: 14px; height: 14px; border-radius: 3px; background: #fff; border: 2px solid var(--accent); }
.sheet { position: fixed; left: 0; right: 0; bottom: var(--nav-h); background: var(--surface); border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; padding: 12px; z-index: 25; max-height: 60vh; overflow: auto; }
.sheet .x { float: right; }
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 12px); transform: translateX(-50%); background: var(--raised); border: 1px solid var(--border); padding: 8px 12px; border-radius: 10px; font-size: 12px; opacity: 0; transition: opacity .2s; z-index: 40; pointer-events: none; }
#toast.show { opacity: 1; }

/* desktop */
@media (min-width: 900px) {
  :root { --nav-h: 0px; }
  body { flex-direction: row; }
  #top { position: fixed; top: 0; left: 0; right: 0; }
  #nav { position: fixed; top: 52px; bottom: 0; left: 0; width: 88px; height: auto; flex-direction: column; border-top: 0; border-right: 1px solid var(--border); padding: 8px 0; }
  #nav a { flex: 0 0 64px; }
  main { margin-left: 88px; margin-top: 52px; padding: 16px 20px 24px; }
  .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  #map-live.mapbox, #map-airport.mapbox { height: 68vh; }
  .sheet { left: auto; right: 20px; bottom: 20px; width: 380px; border-radius: 16px; border: 1px solid var(--border); }
}

/* ---------- one-page layout (2026-09-09 evening, Colin: one comprehensive page, map front and centre) ---------- */
#nav { display: none; }
:root { --nav-h: 0px; }
main { padding-bottom: 24px; }
.maptop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 6px; }
.maptop h3 { margin: 0; }
.maptop .chips { margin: 0; }
.mapbox.big { height: 62vh; min-height: 340px; border-radius: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06); }
#model .grp { margin-top: 8px; }
#model .grp small { display: block; margin-bottom: 4px; }
#model .st { margin: 2px 4px 2px 0; }
#model .dis { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; border-top: 1px dashed var(--border); font-size: 13px; cursor: pointer; }
#model .dis:first-of-type { border-top: 0; }
#model .dis b { font-size: 14px; }
#model .dis .r { text-align: right; white-space: nowrap; }
#model .dis .when { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.panel { position: fixed; inset: 0; background: var(--canvas); z-index: 50; overflow: auto; -webkit-overflow-scrolling: touch; }
.paneltop { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 12px; display: flex; gap: 8px; align-items: center; z-index: 2; }
.paneltop .selector { flex: 1; margin: 0; }
.panelbody { padding: 12px; max-width: 1180px; margin: 0 auto; }
#sc-details summary { cursor: pointer; display: flex; justify-content: space-between; list-style: none; }
#sc-details summary::-webkit-details-marker { display: none; }
#sc-details summary span { color: var(--muted); }
@media (min-width: 900px) {
  main { margin-left: 0; }
  .mapbox.big { height: 70vh; }
  .panelbody { padding: 16px 24px; }
}
#model .st { white-space: normal; line-height: 1.3; }
#model .st small { color: inherit; opacity: .85; margin-left: 4px; }
.why { display: block; font-size: 12px; color: var(--muted); background: var(--raised); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; margin: 4px 0; white-space: normal; }
/* desktop: a single centred column, never a row flex (the rail is gone) */
@media (min-width: 900px) {
  body { flex-direction: column; }
  #top { position: sticky; }
  main { margin: 0 auto; max-width: 1280px; }
}
.camk.approx { background: transparent; border-style: dashed; }
.sheet { z-index: 60; }   /* above the airport panel (50), or a tapped camera opens behind it */

/* jump bar: the four sections one tap away, sticky under the header */
#jump { position: sticky; top: 52px; z-index: 19; display: flex; gap: 6px; padding: 6px 12px; background: var(--canvas); border-bottom: 1px solid var(--border); }
#jump a { flex: 1; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 6px 4px; border-radius: 8px; background: var(--raised); }
#jump a:active { color: var(--text); }
.anchor { display: block; position: relative; top: -110px; visibility: hidden; height: 0; }

/* city page: taller hour chart, bigger camera tiles */
.hours { height: 120px; }
.hours i b { font-size: 10px; bottom: -18px; }
.hourlbl { margin-top: 20px; }
.camgrid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.camgrid .cam img, .camgrid .cam iframe, .camgrid .cam .ph { height: 180px; }

/* camera popup on the airport map, anchored on the camera's box */
.maplibregl-popup-content { padding: 0; border-radius: 12px; overflow: hidden; background: var(--surface); color: var(--text); box-shadow: 0 8px 30px rgba(0,0,0,.6); }
.maplibregl-popup-close-button { color: #fff; font-size: 20px; padding: 2px 8px; background: rgba(0,0,0,.45); border-radius: 0 12px 0 8px; z-index: 2; }
.campop { width: min(400px, 86vw); }
.campop img, .campop iframe { width: 100%; height: 240px; object-fit: cover; display: block; border: 0; background: #000; }
.campop .cap { padding: 6px 10px 8px; font-size: 11px; color: var(--muted); }
.campop .cap b { display: block; color: var(--text); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--surface); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }

/* codex walk: tappable chips show it, selected city highlighted, hour readout, legend swatches per state */
.st .q { opacity: .7; font-size: 11px; margin-left: 2px; }
.mk.sel { outline: 3px solid #fff; outline-offset: 2px; }
.row.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.hoursel { min-height: 18px; font-size: 12px; color: var(--text); margin-top: 6px; }
.legend .sw.mk-LOCKED { background: var(--locked); } .legend .sw.mk-WET_NOW { background: var(--wet); } .legend .sw.mk-WET_IMMINENT { background: var(--imminent); }
.legend .sw.mk-APPROACHING { background: var(--approaching); } .legend .sw.mk-RAIN_NEARBY { background: var(--nearby); } .legend .sw.mk-OVERDUE { background: var(--overdue); }
.legend .sw.mk-QUIET { background: #1f2937; border: 1px solid var(--border); } .legend .sw.mk-UNKNOWN { background: repeating-linear-gradient(45deg, #374151, #374151 3px, #6b7280 3px, #6b7280 6px); }
/* camera markers big enough for a thumb, with a camera glyph, and a generous tap area */
.camk { width: 26px; height: 26px; border-radius: 6px; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 6px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; cursor: pointer; }
.camk::before { content: "\25A3"; color: #0b3a55; font-size: 14px; }
.camk::after { content: ""; position: absolute; inset: -10px; }
.camk.approx { background: rgba(255,255,255,.55); border-style: dashed; }
.camk:active { transform: scale(1.15); }

/* full-screen map */
.mapbox.full { position: fixed !important; inset: 0 !important; height: 100vh !important; height: 100dvh !important; width: 100vw !important; border-radius: 0 !important; z-index: 70; }
.radarctl.fullctl { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 71; margin: 0; background: rgba(17,28,46,.92); backdrop-filter: blur(6px); }
body.light .radarctl.fullctl { background: rgba(255,255,255,.92); }
.fsx { position: absolute; top: 10px; left: 10px; z-index: 72; background: rgba(17,28,46,.9); color: #fff; border: 1px solid var(--border); min-height: 36px; font-size: 12px; }
body.mapfull { overflow: hidden; }

/* the card that floats over the big map for the selected city */
.mapcard { position: absolute; left: 10px; bottom: 10px; z-index: 5; width: min(420px, calc(100% - 20px)); background: rgba(17,28,46,.94); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: 12px; max-height: 62%; overflow: auto; }
body.light .mapcard { background: rgba(255,255,255,.94); }
.mapcard .mc-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mapcard .mc-city { font-size: 18px; }
.mapcard .mc-big { font-size: 26px; font-weight: 750; text-align: right; line-height: 1; }
.mapcard .mc-big small { display: block; font-size: 10px; font-weight: 500; margin-top: 4px; text-align: right; }
.mapcard .mc-line { margin: 8px 0 6px; font-size: 12px; line-height: 1.4; }
.mapcard .mc-grid { display: grid; grid-template-columns: 52px 1fr; gap: 3px 8px; line-height: 1.4; }
.mapcard .mc-grid span:nth-child(odd) { color: var(--dim); }
.mapcard .mc-btns { display: flex; gap: 6px; margin-top: 8px; }
.mapcard .mc-btns button { min-height: 34px; padding: 4px 10px; font-size: 12px; flex: 1; }
.mapcard .mc-btns button:first-child { background: var(--accent); color: #041018; font-weight: 700; flex: 2; }
/* layering: city panel above a full-screen big map; a full-screen city map above the panel */
.panel { z-index: 80; }
.sheet { z-index: 90; }
.panel .mapbox.full { z-index: 85; }
.panel .radarctl.fullctl { z-index: 86; }
.panel .fsx { z-index: 87; }

/* codex sign-off: stationary cells, stale quotes, the card above the radar panel in phone full screen */
.cell.still .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--nearby); border: 2px solid #fff; box-shadow: 0 1px 4px #000; }
.stale { color: var(--overdue); }
.mapbox.full .mapcard { bottom: 132px; max-height: 50%; }
@media (min-width: 900px) { .mapbox.full .mapcard { bottom: 96px; } }

/* a camera marker that stands for several cameras carries the count */
.camk.multi::before { content: ""; }
.camk.multi .n { font-size: 12px; font-weight: 800; color: #0b3a55; }
.campop .pick { display: block; width: 100%; text-align: left; margin-top: 6px; font-size: 12px; min-height: 36px; }

/* Model probability and market value remain separately labelled on every screen. */
.edge-note { color: var(--muted); font-size: 13px; }
.market-table { table-layout: fixed; }
.market-table td { vertical-align: top; overflow-wrap: anywhere; }
.market-table small { display: block; margin-top: 5px; }
.market-table .edge-value > b { font-size: 22px; }
.market-table .edge-direction > b { font-size: 17px; }
.edge-yes .edge-value, .edge-yes .edge-direction > b { color: var(--pos); }
.edge-no .edge-value, .edge-no .edge-direction > b { color: var(--nearby); }
.edge-yes { box-shadow: inset 3px 0 var(--pos); background: var(--raised); }
.edge-no { box-shadow: inset 3px 0 var(--nearby); background: var(--raised); }
@media (max-width: 760px) {
  .market-table, .market-table tbody { display: block; }
  .market-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .market-table thead tr, .market-table th { display: block; width: 1px; max-width: 1px; padding: 0; margin: 0; overflow: hidden; }
  .market-table tr { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 12px; }
  .market-table td { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 10px; border: 0; }
  .market-table td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; }
  .market-table td > small { grid-column: 2; }
  .market-table td:first-child { display: block; font-size: 17px; }
  .market-table td:first-child::before { display: none; }
}

.sentinel-stats { white-space:pre-line; overflow-wrap:anywhere; font-size:.85em; line-height:1.45; }

.expansion-panel {padding: 12px; border: 1px solid #536476; margin: 12px 0;}
.expansion-panel pre {white-space: pre-wrap; overflow-wrap: anywhere; font: inherit;}
.expansion-panel select, .expansion-panel button {margin: 6px; padding: 6px;}
.expansion-panel table {font-size: 12px; width: 100%;}
.history-context {font-size: 11px; color: #94aabc; margin: 4px 0;}

/* v3 names its role and its unmeasured record IN the header, never only in a footnote. */
#board .v3-identity { justify-content: flex-start; }
.v3-unmeasured { color: var(--overdue); border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px; font-size: 13px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
#top .brand span .v3-unmeasured { font-size: 11px; margin-left: 2px; }
.v3-role { margin: 6px 0 10px; font-size: 13px; }

/* The same device reading preference applies on the isolated comparison route. */
:root { --type-scale: 1; --fs: calc(15px * var(--type-scale)); --fs-small: max(13px, calc(13px * var(--type-scale))); }
html, body { font-size: var(--fs); font-variant-numeric: tabular-nums; }
#top { flex-wrap: wrap; }
#top .brand { flex: 1 0 100%; font-size: calc(16px * var(--type-scale)); }
#top .brand span { display: block; margin-left: 0; font-size: var(--fs-small); }
#top .fresh { margin-left: 0; margin-right: auto; min-width: 0; font-size: var(--fs-small); }
#top button, #text-size, button, select, input, summary, a[href] { min-height: 44px; }
#text-size { font: inherit; padding: 4px; color: var(--text); background: var(--raised); border: 1px solid var(--border); border-radius: 8px; }
summary { align-content: center; }
a[href] { display: inline-flex; align-items: center; }
#top button, table.sc, table.sc th, .edge-note, .v3-role, h3 { font-size: var(--fs); }
small, .note, .back-link, .history-context, .sentinel-stats, .v3-unmeasured, #top .brand span .v3-unmeasured { font-size: var(--fs-small); }
.market-table td::before { font-size: var(--fs); }
.market-table td:first-child, .market-table .edge-direction > b { font-size: calc(17px * var(--type-scale)); }
.market-table .edge-value > b { font-size: calc(22px * var(--type-scale)); }
.market-table th, .market-table td { overflow-wrap: anywhere; }
.expansion-panel table { font-size: var(--fs); }
