/* Layout: map on the left, instrument cluster (readout, dial, sliders) on the right; stacked on phones.
   Colours and type are the phone handoff's; --noaa is new (shoreline check overlay). */
:root {
  --bg: #edf1f3; --panel: #ffffff; --ink: #0f2230; --muted: #54697a; --line: #9db1bf;
  --land: #dde4dc; --accent: #c2410c; --current: #0b7285; --noaa: #c2187a;
  --font-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --font-num: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1822; --panel: #10242f; --ink: #e3eef3; --muted: #8aa3b2; --line: #3a586b;
    --land: #142029; --accent: #ff9a55; --current: #4cc9e0; --noaa: #ff6fb5; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1822; --panel: #10242f; --ink: #e3eef3; --muted: #8aa3b2; --line: #3a586b;
  --land: #142029; --accent: #ff9a55; --current: #4cc9e0; --noaa: #ff6fb5; color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font-body); padding: 16px 16px 32px; margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; }
h1 { font: 700 32px/1 var(--font-num); letter-spacing: .03em; text-transform: uppercase; margin: 0; }
.sub { color: var(--muted); margin: 6px 0 16px; font-size: 13px; }
.disclaimer { background: var(--panel); border-left: 4px solid var(--accent); border-radius: 6px; padding: 10px 14px; margin: 0 0 16px; }
.disclaimer p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink); }
.disclaimer a { color: var(--accent); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 780px) { .grid { grid-template-columns: minmax(0, 480px) minmax(0, 1fr); align-items: start; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 7px 12px; border-radius: 999px;
  font: 600 13px var(--font-body); cursor: pointer; min-height: 36px; }
.chip[aria-checked="true"], .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.noaa[aria-pressed="true"] { background: var(--noaa); border-color: var(--noaa); color: #fff; }
.chip:focus-visible, .dial:focus-visible, input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mapwrap { position: relative; aspect-ratio: 2 / 3; width: 100%; border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; background: var(--land); }
#map { position: absolute; inset: 0; }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.maplibregl-ctrl-top-right, .maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { z-index: 2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .maplibregl-ctrl-group { background: var(--panel); }
  :root:not([data-theme="light"]) .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
}
:root[data-theme="dark"] .maplibregl-ctrl-group { background: var(--panel); }
:root[data-theme="dark"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.layers { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend { margin-top: 10px; }
.bar { height: 10px; border-radius: 2px; border: 1px solid var(--line); }
.ticks { display: flex; justify-content: space-between; font: 500 12px var(--font-num); color: var(--muted); margin-top: 3px; letter-spacing: .03em; }
.legend p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.controls { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.readout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; align-items: end; }
.lab { font: 600 11px var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.big { font: 700 68px/.85 var(--font-num); font-variant-numeric: tabular-nums; }
.big small { font-size: 24px; font-weight: 600; margin-left: 4px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.stats b { display: block; font: 600 22px/1.1 var(--font-num); font-variant-numeric: tabular-nums; }
.tag { font: 700 20px/1.1 var(--font-num); letter-spacing: .02em; text-transform: uppercase; }
.delta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dialbox { display: flex; justify-content: center; }
.dial { width: 100%; max-width: 300px; height: auto; touch-action: none; cursor: grab; display: block; }
.dial text { font-family: var(--font-num); fill: var(--ink); }
.row { display: grid; gap: 6px; }
.row label { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 14px; }
.row output { font: 600 15px var(--font-num); font-variant-numeric: tabular-nums; color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); margin: 0; min-height: 28px; }
#cur { accent-color: var(--current); }
.row .hint { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.note { font-size: 12px; color: var(--muted); margin: 0; }
.live { display: grid; gap: 8px; }
.chart { width: 100%; height: auto; display: block; cursor: pointer; touch-action: manipulation; }
.chart text { font-family: var(--font-num); fill: var(--ink); }
.chart text.muted { fill: var(--muted); }
.chart.manual rect { opacity: .55; }
#hour { accent-color: var(--ink); }
.hourrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 600 14px var(--font-body); min-height: 36px; }
