/* ───────── TALON — Apple-style system theme (light + dark) ───────── */
:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --surface: rgba(250, 250, 252, 0.9);
  --surface-solid: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.96);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);
  --sep: rgba(60, 60, 67, 0.13);
  --ink: #1d1d1f;
  --ink-2: rgba(60, 60, 67, 0.75);
  --ink-3: rgba(60, 60, 67, 0.45);
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --red: #ff3b30;
  --orange: #ff9500;
  --yellow: #ffcc00;
  --green: #34c759;
  --model: #5ac8fa;
  --grid: rgba(60, 60, 67, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  --r: 16px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  --panel-w: 360px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #000000;
  --surface: rgba(28, 28, 30, 0.88);
  --surface-solid: #1c1c1e;
  --surface-2: rgba(36, 36, 38, 0.97);
  --fill: rgba(118, 118, 128, 0.24);
  --fill-2: rgba(118, 118, 128, 0.36);
  --sep: rgba(84, 84, 88, 0.55);
  --ink: #f5f5f7;
  --ink-2: rgba(235, 235, 245, 0.7);
  --ink-3: rgba(235, 235, 245, 0.4);
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.2);
  --red: #ff453a;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --green: #30d158;
  --model: #64d2ff;
  --grid: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.4 var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; }
button, select, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mono { font-family: var(--font); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.hidden { display: none !important; }
#map { position: fixed; inset: 0; }
#wind { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.glass { background: var(--surface); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); box-shadow: var(--shadow); }

/* ───── top bar ───── */
.topbar { position: fixed; top: 12px; left: 12px; right: 12px; height: 52px; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 14px; border-radius: var(--r); }
.brand { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.brand svg path { fill: var(--accent); stroke: var(--accent); stroke-width: 0.8; stroke-linejoin: round; }
.search { position: relative; flex: 0 1 300px; }
.search input { width: 100%; background: var(--fill); border: 0; border-radius: 10px; padding: 8px 12px 8px 32px; outline: none; font-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center; }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.search-results { position: absolute; top: 42px; left: 0; right: 0; background: var(--surface-2); border-radius: 12px; overflow: hidden; display: none; box-shadow: var(--shadow); }
.search-results.on { display: block; }
.search-results button { display: block; width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0; border-bottom: 0.5px solid var(--sep); }
.search-results button:last-child { border-bottom: 0; }
.search-results button:hover { background: var(--fill); }

.seg { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; transition: background .15s; }
.seg button.on { background: var(--surface-solid); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14), 0 0 0 0.5px rgba(0, 0, 0, 0.04); font-weight: 600; }
:root[data-theme='dark'] .seg button.on { background: #636366; }

.pills { display: flex; gap: 6px; margin-left: auto; }
.pill { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; background: var(--fill); }
.pill b { font-weight: 500; color: var(--ink-2); }
.pill span { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.pill.live i { background: var(--green); }
.pill.warn i { background: var(--orange); }
.pill.bad i { background: var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.clock { font-size: 13px; color: var(--ink-2); min-width: 92px; text-align: right; font-variant-numeric: tabular-nums; }

/* ───── banner ───── */
.banner { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 12; padding: 10px 18px; border-radius: 14px; font-weight: 600; font-size: 14px;
  background: var(--c, var(--red)); color: #fff; box-shadow: var(--shadow); cursor: pointer; max-width: calc(100vw - 32px); text-align: center; text-shadow: 0 1px 1px rgba(0,0,0,.25); }

/* ───── side panel (sheet) ───── */
.panel { position: fixed; top: 76px; left: 12px; bottom: 100px; width: var(--panel-w); z-index: 9; display: flex; flex-direction: column; border-radius: var(--r); transition: transform .3s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
.panel.collapsed { transform: translateX(calc(-100% + 44px)); }
.panel.collapsed .tab-body, .panel.collapsed .tabs button:not(.collapse) { visibility: hidden; }
.tabs { display: flex; margin: 10px 10px 4px; padding: 2px; gap: 2px; background: var(--fill); border-radius: 10px; }
.tabs button { flex: 1 1 auto; min-width: 0; white-space: nowrap; background: none; border: 0; padding: 6px 5px; border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 500; position: relative; }
.tabs button.on { background: var(--surface-solid); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); font-weight: 600; }
:root[data-theme='dark'] .tabs button.on { background: #636366; }
.tabs .collapse { flex: 0 0 26px; color: var(--ink-2); }
/* counts ride on the tab's corner instead of taking width, so every tab label always fits */
.tabs .count { position: absolute; top: -5px; right: -3px; margin: 0; min-width: 15px; line-height: 15px; font-size: 9.5px; padding: 0 3px; z-index: 1; box-shadow: 0 0 0 1.5px var(--surface-solid); }
.tabs { position: relative; }
.tabs.tight button { font-size: 12px; padding: 6px 3px; }
.tabs.tighter button { font-size: 11px; padding: 6px 2px; letter-spacing: -0.01em; }
.count { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; font-size: 10.5px; font-weight: 600; background: var(--fill-2); color: var(--ink); margin-left: 3px; line-height: 16px; vertical-align: 1px; }
.count:empty { display: none; }
.count.hot { background: var(--red); color: #fff; }
.tab-body { flex: 1; overflow-y: auto; padding: 8px 14px 16px; scrollbar-width: thin; }
.sec { margin-bottom: 18px; }
.sec h4 { margin: 0 0 7px 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; }
.sec h4 .muted { font-weight: 400; font-size: 12px; }
.card { border-radius: 12px; padding: 12px; background: var(--fill); }
:root[data-theme='light'] .card { background: rgba(255, 255, 255, 0.75); box-shadow: 0 0 0 0.5px var(--sep); }

/* overview tab */
.loc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin: 6px 0 12px; }
.loc-head h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.025em; }
.loc-head small { color: var(--ink-3); font-size: 12px; }
.btn { background: var(--accent-soft); border: 0; color: var(--accent); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn.armed { background: var(--accent); color: #fff; }
.status { border-radius: 14px; padding: 13px 14px; margin-bottom: 14px; display: flex; gap: 12px; align-items: center; background: var(--fill); }
.status .big { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.status small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.status .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; flex: none; color: #fff; font-weight: 700; }
.status.clear .ico { background: var(--green); }
.status.watch .ico { background: var(--orange); }
.status.danger { background: color-mix(in srgb, var(--red) 14%, transparent); }
.status.danger .ico { background: var(--red); }
.status.danger .big { color: var(--red); }
.now { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.now .temp { font-size: 52px; font-weight: 300; line-height: 1; letter-spacing: -0.04em; }
.now .cond { font-size: 16px; font-weight: 600; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 12px; background: var(--sep); border-radius: 10px; overflow: hidden; }
.kv div { background: var(--surface-solid); padding: 8px 10px; }
:root[data-theme='dark'] .kv div { background: #2c2c2e; }
.kv label, .grid2 label { display: block; font-size: 11.5px; color: var(--ink-2); margin-bottom: 2px; }
.kv b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart svg { width: 100%; height: 96px; display: block; }
.chart .legend-row { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 6px; flex-wrap: wrap; }
.chart .legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.say { font-size: 14px; color: var(--ink); margin-top: 8px; font-weight: 500; }
.hours { display: flex; gap: 2px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.hour { flex: 0 0 50px; text-align: center; padding: 6px 2px; font-size: 13px; }
.hour .t { color: var(--ink-2); font-size: 12px; }
.hour .tt { font-size: 16px; font-weight: 600; margin: 3px 0; }
.hour .p { color: var(--model); font-size: 12px; font-weight: 600; }
.hour .cape { height: 3px; border-radius: 2px; margin: 5px 10px 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 0.5px solid var(--sep); }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row:first-child { padding-top: 0; }

/* lists */
.item { border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; cursor: pointer; background: var(--fill); transition: background .15s; }
:root[data-theme='light'] .item { background: rgba(255, 255, 255, 0.75); box-shadow: 0 0 0 0.5px var(--sep); }
.item:hover { background: var(--fill-2); }
.alert-card { border-left: 3px solid var(--c); padding-left: 10px; }
.ac-top { display: flex; align-items: center; gap: 8px; }
.ac-top b { font-weight: 600; }
.ac-top .muted { margin-left: auto; font-size: 12px; white-space: nowrap; }
.ac-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.ac-area { color: var(--ink-2); font-size: 12.5px; margin-top: 3px; }
.alert-card pre { white-space: pre-wrap; font: 12px/1.5 var(--font); color: var(--ink-2); max-height: 260px; overflow: auto; }
.alert-card summary { cursor: pointer; color: var(--accent); font-size: 13px; margin-top: 6px; font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); }
.tag.tor { background: var(--red); color: #fff; }
.tag.svr { background: var(--orange); color: #fff; }
.tag.hail { background: var(--model); color: #00293a; }
.filters { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { border: 0; background: var(--fill); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 500; color: var(--ink); text-transform: capitalize; }
.chip.on { background: var(--accent); color: #fff; }
.empty { color: var(--ink-2); text-align: center; padding: 30px 10px; font-size: 14px; }

/* layers */
.toggle { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 0.5px solid var(--sep); gap: 10px; }
.toggle:first-child { padding-top: 0; }
.toggle:last-child { border-bottom: 0; padding-bottom: 0; }
.toggle span small { display: block; color: var(--ink-2); font-size: 12px; }
.sw { position: relative; width: 46px; height: 28px; flex: none; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw i { position: absolute; inset: 0; border-radius: 99px; background: var(--fill-2); transition: .2s; }
.sw i::after { content: ''; position: absolute; width: 24px; height: 24px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.25); transition: .2s cubic-bezier(.3,.7,.3,1); }
.sw input:checked + i { background: var(--green); }
.sw input:checked + i::after { left: 20px; }
input[type=range] { accent-color: var(--accent); width: 130px; }
select { background: var(--fill); border: 0; border-radius: 8px; padding: 5px 8px; font-size: 13px; max-width: 200px; }

/* ───── right tools ───── */
.tools { position: fixed; right: 12px; top: 76px; z-index: 9; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.tool-group { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; }
.tool-group button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); border-bottom: 0.5px solid var(--sep); }
.tool-group button:last-child { border-bottom: 0; }
.tool-group button:hover { background: var(--fill); }
.tool-group button svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tool-group button.on { color: var(--accent); }
#t-prod { border-radius: 12px; }

/* ───── HUD ───── */
.hud { position: fixed; left: 0; top: 0; z-index: 9; padding: 10px 14px; border-radius: 14px; min-width: 220px; pointer-events: none; font-size: 12.5px; }
.hud .v { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; }
.hud .sub { color: var(--ink-2); margin-top: 1px; }
.hud .sw-c { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 7px; }

/* ───── timeline ───── */
.timeline { position: fixed; left: 12px; right: 12px; bottom: 12px; height: 76px; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 0 16px; border-radius: var(--r); }
.tl-controls { display: flex; gap: 6px; align-items: center; }
.tl-controls button { background: none; border: 0; border-radius: 50%; height: 34px; min-width: 34px; color: var(--ink); font-size: 14px; display: grid; place-items: center; }
.tl-controls button:hover { background: var(--fill); }
.tl-controls button svg { width: 18px; height: 18px; fill: currentColor; }
#tl-live { border-radius: 999px; padding: 0 12px; font-size: 13px; font-weight: 600; background: var(--fill); }
#tl-live.on { background: var(--accent-soft); color: var(--accent); }
.tl-controls .play { width: 46px; height: 46px; background: var(--accent); color: #fff; box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 40%, transparent); }
.tl-controls .play:hover { background: var(--accent); filter: brightness(1.08); }
.tl-controls .play svg { width: 20px; height: 20px; }
.tl-main { flex: 1; min-width: 0; }
.tl-label { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
#tl-time { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.rel { font-size: 13px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.rel.fc { color: var(--accent); }
.note { margin-left: auto; color: var(--ink-3); font-size: 12px; text-align: right; line-height: 1.3; min-width: 0; }
.tl-track { position: relative; height: 20px; cursor: pointer; touch-action: none; }
.tl-ticks { position: absolute; inset: 0; display: flex; align-items: center; }
.tl-ticks i { flex: 1; height: 6px; margin: 0 1px; border-radius: 3px; background: var(--fill-2); transition: height .12s, background .12s; }
.tl-ticks i.past { background: color-mix(in srgb, var(--ink) 35%, transparent); }
.tl-ticks i.fc { background: repeating-linear-gradient(90deg, var(--accent-soft) 0 3px, transparent 3px 5px); }
.tl-ticks i.fc.past { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.tl-ticks i.cur { height: 16px; background: var(--ink); }
.tl-ticks i.fc.cur { background: var(--accent); }
.tl-ticks i.model { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--model) 35%, transparent) 0 2px, transparent 2px 4px); }
.tl-ticks i.model.past { background: color-mix(in srgb, var(--model) 60%, transparent); }
.tl-ticks i.model.cur { background: var(--model); }
.tl-ticks.dense i { margin: 0 0.5px; border-radius: 2px; }
.rel.model { color: var(--model); }
#tl-span, #tl-future, #tl-speed { font-weight: 500; }
.tl-knob, .tl-fill { display: none; }
.tl-side { display: flex; align-items: center; gap: 12px; }
#legend { width: 250px; height: 34px; }

/* ───── popups ───── */
.maplibregl-popup-content { background: var(--surface-2) !important; color: var(--ink); border-radius: 16px !important; padding: 14px 15px !important; box-shadow: var(--shadow) !important; font: 13.5px/1.4 var(--font); backdrop-filter: blur(20px); }
.maplibregl-popup-tip { border-top-color: var(--surface-2) !important; border-bottom-color: var(--surface-2) !important; }
.maplibregl-popup-close-button { color: var(--ink-2); font-size: 20px; padding: 4px 9px; border-radius: 50%; }
.maplibregl-popup-close-button:hover { background: var(--fill); }
.pop { width: 290px; }
.pop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; padding-right: 18px; }
.pop-head b { font-size: 16px; font-weight: 700; }
.pop-head .muted { font-size: 12px; }
.big-read { display: flex; align-items: center; gap: 9px; }
.big-read .v { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 10px; }
.grid2 b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.grid2 small { color: var(--ink-2); margin-left: 4px; }
.eta { margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--ink); font-weight: 600; font-size: 13px; }
.spark { width: 100%; height: 56px; display: block; margin-top: 10px; }
.pop .alert-card { margin-top: 10px; }
.pop .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.maplibregl-ctrl-attrib { background: var(--surface) !important; color: var(--ink-3) !important; font-size: 10px; border-radius: 8px !important; }
.maplibregl-ctrl-attrib a { color: var(--ink-2) !important; }
.maplibregl-ctrl-attrib-button { filter: var(--attrib-filter, none); }
:root[data-theme='dark'] { --attrib-filter: invert(1); }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: 92px; }
.maplibregl-ctrl-scale { background: var(--surface) !important; color: var(--ink-2) !important; border-color: var(--ink-3) !important; }

/* you-are-here (Apple Maps style) */
.me { width: 20px; height: 20px; border-radius: 50%; background: #007aff; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.35); position: relative; }
.me::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; background: rgba(0,122,255,.18); z-index: -1; animation: ping 2.4s infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0,0,0,.35); backdrop-filter: blur(6px); padding: 16px; }
.modal-card { max-width: 780px; width: 100%; max-height: 90vh; overflow: auto; background: var(--surface-2); border-radius: 22px; padding: 26px 28px; position: relative; box-shadow: var(--shadow); }
.modal-card h2 { margin: 0 0 16px; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }
.modal-card h3 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; align-items: center; }
.keys dt { font-size: 12px; font-weight: 600; background: var(--fill); border-radius: 6px; padding: 2px 8px; text-align: center; }
.keys dd { margin: 0; color: var(--ink-2); }
.modal-card ul { padding-left: 18px; color: var(--ink-2); margin: 0; }
.modal-card li { margin-bottom: 9px; }
.modal-card li b { color: var(--ink); }
.fine { color: var(--ink-3); font-size: 12px; border-top: 0.5px solid var(--sep); padding-top: 14px; margin-bottom: 0; }
.close { position: absolute; top: 18px; right: 20px; background: var(--fill); border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 600; color: var(--ink); }

.toast { position: fixed; bottom: 102px; left: 50%; transform: translateX(-50%); z-index: 30; padding: 10px 16px; border-radius: 14px; font-size: 13.5px; font-weight: 500; max-width: calc(100vw - 32px); }

/* ───── responsive ───── */
@media (max-width: 1100px) {
  .pills .pill b { display: none; }
  .clock { display: none; }
}
@media (max-width: 900px) {
  .pills { display: none; }
  #legend { width: 170px; }
}
@media (max-width: 680px) {
  :root { --panel-w: auto; }
  .topbar { left: 8px; right: 8px; top: 8px; gap: 8px; padding: 0 8px 0 12px; height: 48px; flex-wrap: nowrap; }
  .brand span { display: none; }
  .search { flex: 1; }
  #t-mode { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); box-shadow: var(--shadow); background: var(--surface); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); }
  #t-mode button { padding: 6px 16px; }
  .panel { left: 8px; right: 8px; top: auto; bottom: 128px; height: 50vh; }
  .panel.collapsed { transform: translateY(calc(100% - 52px)); }
  .panel.collapsed .tabs button:not(.collapse) { visibility: visible; }
  .panel.collapsed .tabs button.on { background: none; box-shadow: none; font-weight: 500; }
  .tools { right: 8px; top: 110px; }
  .panel { z-index: 10; } /* the open panel sits above the tool buttons on phones */
  #t-theme { display: none; } /* still under Layers → Appearance */
  .timeline { left: 8px; right: 8px; bottom: 8px; height: auto; flex-wrap: wrap; padding: 10px 12px; gap: 6px 10px; }
  .tl-main { order: -1; flex-basis: 100%; }
  .tl-label { margin-bottom: 4px; }
  #tl-time { font-size: 16px; }
  .note { display: none; }
  .tl-controls { gap: 2px; }
  .tl-controls .play { width: 40px; height: 40px; }
  .tl-side { margin-left: auto; gap: 6px; }
  #tl-speed { display: none; }
  #tl-span, #tl-future { max-width: 108px; font-size: 12.5px; padding: 4px 4px; }
  #legend { display: none; }
  #legend { width: 130px; }
  .hud { display: none !important; }
  .cols { grid-template-columns: 1fr; }
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: 128px; }
}

.est { font-size: 10px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.src { font-size: 11.5px; color: var(--ink-3); margin-top: 9px; }
.fresh { font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 4px 6px 2px; line-height: 1.6; }
.fresh .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-right: 6px; vertical-align: 0; }
.fresh .dot.on { background: var(--green); }
.pill { cursor: pointer; }
.pill:hover { background: var(--fill-2); }

/* ───── sounding sheet ───── */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.35); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 14px; }
.sheet-card { width: min(1280px, 100%); max-height: calc(100vh - 28px); overflow: auto; background: var(--surface-2); border-radius: 22px; box-shadow: var(--shadow); padding: 18px 20px 14px; }
.snd-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.snd-title h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }
.snd-title .close { position: static; }
.snd-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 14px; }
.snd-bar select { max-width: 280px; font-size: 13px; padding: 6px 8px; }
.snd-hour { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; background: var(--fill); border-radius: 10px; padding: 4px 10px; }
.snd-hour span { min-width: 150px; }
.snd-hour input { width: 220px; }
.snd-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 14px; }
.snd-plot { padding: 8px; }
.snd-plot svg.skewt { width: 100%; height: auto; display: block; }
.snd-side { display: flex; flex-direction: column; gap: 14px; }
.hodo-card svg { width: 100%; max-width: 340px; display: block; margin: 0 auto; }
.snd-h { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.snd-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--ink-2); margin-top: 6px; }
.snd-legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: 3px; }
.snd-legend i.dash { background: repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 7px); }
.snd-note { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 7px 0; border-bottom: 0.5px solid var(--sep); font-size: 13.5px; }
.snd-note:last-child { border-bottom: 0; }
.snd-note b { font-weight: 600; color: var(--ink-2); font-size: 12.5px; }
.snd-note.t2 span { color: var(--orange); font-weight: 600; }
.snd-note.t3 span { color: var(--red); font-weight: 700; }
.snd-tables { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; grid-auto-flow: row dense; }
.snd-tables .wide { grid-column: span 2; }
.snd-t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.snd-t th, .snd-t td { padding: 6px 6px; text-align: right; border-bottom: 0.5px solid var(--sep); white-space: nowrap; }
.snd-t thead th { color: var(--ink-2); font-weight: 500; font-size: 11.5px; }
.snd-t tbody th { text-align: left; font-weight: 600; }
.snd-t small { color: var(--ink-3); font-weight: 400; }
.snd-dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 13px; }
.snd-dl.two { grid-template-columns: 1fr auto 1fr auto; margin-top: 10px; }
.snd-dl dt { color: var(--ink-2); }
.snd-dl dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.t1 { color: var(--yellow); } .t2 { color: var(--orange); font-weight: 700; } .t3 { color: var(--red); font-weight: 800; }
:root[data-theme='light'] .t1 { color: #b38600; }
.snd-loading, #snd-body > .empty { padding: 60px 10px; text-align: center; color: var(--ink-2); }
.ingr .snd-note { grid-template-columns: 84px 1fr; font-size: 13px; }
.ingr .nums { display: flex; justify-content: space-between; gap: 6px; margin: 4px 0 8px; font-size: 12px; color: var(--ink-2); }
.ingr .nums b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 980px) { .snd-grid { grid-template-columns: 1fr; } .snd-tables { grid-template-columns: 1fr 1fr; } .snd-tables .wide { grid-column: span 2; } }
@media (max-width: 680px) { .sheet { padding: 0; } .sheet-card { border-radius: 0; max-height: 100vh; height: 100vh; padding: 12px; } .snd-tables { grid-template-columns: 1fr; } .snd-tables .wide { grid-column: auto; overflow-x: auto; } .snd-dl.two { grid-template-columns: 1fr auto; } .snd-hour input { width: 140px; } .snd-hour span { min-width: 0; } }

.ver { font-variant-numeric: tabular-nums; color: var(--accent); }

.spark-wrap { margin-top: 8px; }
.spark { cursor: crosshair; }
.spark-read { font-size: 12px; min-height: 17px; margin-top: 3px; color: var(--ink-2); }
.spark-read b { color: var(--ink); }
.spark-read .sw-c, .tip .sw-c { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.eta.now { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.eta-sub { font-weight: 500; font-size: 12px; color: var(--ink-2); }
.tag.home { background: var(--accent-soft); color: var(--accent); font-size: 12.5px; padding: 6px 12px; display: inline-flex; align-items: center; }
.tip { position: fixed; z-index: 30; padding: 8px 11px; border-radius: 10px; font-size: 12.5px; pointer-events: none; white-space: nowrap; }
#legend { cursor: crosshair; }
.hud { transition: none; }

/* chase mode */
.me.heading.has-hdg::before { content: ''; position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-bottom: 34px solid rgba(0,122,255,.35); transform: translate(-50%, -100%) rotate(var(--hdg, 0deg)); transform-origin: 50% 100%; z-index: -1; filter: blur(.5px); }
.chase-hud { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 11; width: min(440px, calc(100vw - 140px)); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.chase-hud .ch-top { display: flex; align-items: center; gap: 12px; }
.chase-hud .ch-speed b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.chase-hud .ch-speed small { display: block; color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.chase-hud .ch-gps { flex: 1; font-size: 11.5px; line-height: 1.4; }
.chase-hud .ch-btns { display: flex; gap: 6px; }
.chase-hud .ch-tgt { display: flex; gap: 12px; align-items: center; border-top: 0.5px solid var(--sep); padding-top: 8px; }
.chase-hud .ch-big { text-align: center; min-width: 64px; }
.chase-hud .ch-big b { font-size: 26px; font-weight: 700; display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.chase-hud .ch-big small { color: var(--ink-2); font-weight: 600; font-size: 11.5px; }
.chase-hud .ch-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chase-hud .ch-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.chase-hud .ch-none { color: var(--ink-2); border-top: 0.5px solid var(--sep); padding-top: 8px; }
.chase-hud .ch-warn { background: color-mix(in srgb, var(--c) 22%, transparent); border-left: 3px solid var(--c); border-radius: 8px; padding: 6px 9px; font-weight: 600; }
.chase-hud .eta { margin: 0; }
@media (max-width: 680px) { .chase-hud { top: 106px; width: calc(100vw - 72px); left: 8px; transform: none; } }

/* ───────── rotation & tornadoes ───────── */
.small { font-size: 12px; }
.rot-head .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rot-head .bad { color: var(--red); }
.rot-item { border-radius: 12px; padding: 11px 12px 10px; margin-bottom: 8px; cursor: pointer; background: var(--fill); border-left: 4px solid var(--c); transition: background .15s; }
:root[data-theme='light'] .rot-item { background: rgba(255, 255, 255, 0.78); box-shadow: 0 0 0 0.5px var(--sep); }
.rot-item:hover { background: var(--fill-2); }
.rot-item.full { cursor: default; background: none; box-shadow: none; padding: 0 0 0 10px; margin: 0; }
.ri-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ri-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: var(--c); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.25); align-self: center; }
.ri-v { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ri-v small { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ri-trend { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.ri-trend.up { color: var(--red); }
.ri-trend.down { color: var(--green); }
.ri-where { margin-left: auto; font-size: 12px; }
.ri-line { font-size: 12.5px; margin-top: 4px; line-height: 1.4; }
.ri-why { font-size: 11.5px; margin-top: 5px; color: var(--orange); line-height: 1.35; }
.tag.debris { background: #ff2bd6; color: #fff; }
.tag.unwarned { background: color-mix(in srgb, var(--orange) 22%, transparent); color: var(--ink); }
.motion-card .mc-top { display: grid; grid-template-columns: 116px 1fr; gap: 12px; align-items: center; font-size: 13px; line-height: 1.4; }
.motion-card .actions { margin: 10px 0 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.btn.armed { background: var(--accent); color: #fff; }
.dial { width: 116px; height: 116px; touch-action: none; cursor: crosshair; user-select: none; }
.dial .dl-ring { fill: none; stroke: var(--grid); stroke-width: 1; }
.dial .dl-k { font-size: 6.5px; fill: var(--ink-3); }
.dial .dl-c { font-size: 8px; font-weight: 700; fill: var(--ink-2); text-anchor: middle; }
.dial .dl-arrow { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.dial .dl-knob { fill: var(--accent); stroke: var(--surface-solid, #fff); stroke-width: 2; }
.replay-bar { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, transparent); font-size: 13px; }
.replay-bar .actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.rp-preset { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; cursor: pointer; border-bottom: 0.5px solid var(--sep); }
.rp-custom { display: flex; gap: 6px; margin: 10px 0 6px; flex-wrap: wrap; }
.rp-custom input, .rp-custom select { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 8px; border: 0.5px solid var(--sep); background: var(--surface-solid, transparent); color: var(--ink); }
.how p { margin: 0 0 8px; line-height: 1.45; }
.ps-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: 12.5px; margin: 8px 0 2px; }
.ps-row span { color: var(--ink-2); font-size: 11.5px; }
.ps-row b.hot { color: var(--red); }
.ch-rot { margin: 8px 0 4px; padding: 8px 10px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, var(--c) 20%, transparent); border-left: 4px solid var(--c); }
#t-rot.on { color: var(--accent); }

.rot-item .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rot-item .tags, .rot-item .ri-top { min-width: 0; }
.rot-item .tag { white-space: normal; max-width: 100%; }
.back-chip { position: fixed; top: 82px; left: 50%; transform: translateX(-50%); z-index: 11; display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.back-chip.hidden { display: none; }
.back-chip .btn { padding: 5px 12px; }
.back-chip .btn.primary { background: var(--accent); color: #fff; }
@media (max-width: 680px) { .back-chip { top: 112px; max-width: calc(100vw - 80px); } .back-chip span { display: none; } }
/* names for the icon buttons: shown beside the button, always fully on screen */
.tool-tip { position: fixed; z-index: 40; padding: 6px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none; color: var(--ink); background: var(--surface-solid); box-shadow: 0 4px 16px rgba(0,0,0,.22), 0 0 0 0.5px var(--sep); opacity: 0; transition: opacity .12s; max-width: calc(100vw - 16px); }
.tool-tip.on { opacity: 1; }
.tool-tip small { display: block; font-weight: 500; color: var(--ink-2); font-size: 11.5px; margin-top: 1px; }
#tl-future.dim { opacity: .55; }

/* TALON name: acronym letters highlighted wherever the full name appears */
.acro i { font-style: normal; font-weight: 800; color: var(--accent); }
.brand { cursor: default; outline: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-full { display: none; font-size: 10.5px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); margin-top: 2px; }
.topbar.brand-wide .brand-full { display: block; }
.tool-tip .tt-name { display: block; font-size: 15px; letter-spacing: -0.01em; }
.tool-tip .tt-acro { display: block; font-weight: 500; margin: 2px 0 3px; font-size: 12.5px; }
.help-full { margin: -6px 0 14px; font-size: 14px; color: var(--ink-2); }
