/* Live forecast page (tools/live/page). Light and dark from the design: light for daylight, dark for night use. */
:root {
  --bg: #EEF2F5; --card: #FFFFFF; --ink: #0F1B2A; --body: #24364A; --muted: #4A5B6E; --soft: #F2F5F8;
  --line: #E1E7ED; --chip-line: #C9D3DC; --accent: #1F5C99; --accent-ink: #FFFFFF; --link: #1F5C99; --link-hover: #123E69;
  --top-bg: #0F1B2A; --top-ink: #F4F7FA; --top-muted: #A9BACB; --top-chip: #1E3047; --ok-bg: #24543A; --ok-ink: #DDF5E5;
  --sel: #0F1B2A; --sel-ink: #FFFFFF; --hatch-a: #F2F5F8; --hatch-b: #E3E9EE; --hatch-ink: #6B7A89;
  --shadow: 0 1px 2px rgba(15, 27, 42, 0.06); --map-bg: #E3E9EE; --panel: rgba(255, 255, 255, 0.94);
  --mono: "IBM Plex Mono", ui-monospace, monospace; --sans: "Instrument Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1420; --card: #15212F; --ink: #E8EEF4; --body: #C9D6E2; --muted: #8FA3B8; --soft: #1B2838;
    --line: #26364A; --chip-line: #33465B; --accent: #6FA3D8; --accent-ink: #0B1420; --link: #8DB9E6; --link-hover: #B5D3F2;
    --top-bg: #0B1420; --top-ink: #E8EEF4; --top-muted: #A9BACB; --top-chip: #15212F; --ok-bg: #1F4A33; --ok-ink: #CFEFD9;
    --sel: #E8EEF4; --sel-ink: #0B1420; --hatch-a: #15212F; --hatch-b: #1E2C3D; --hatch-ink: #7F93A8;
    --shadow: none; --map-bg: #1B2838; --panel: rgba(21, 33, 47, 0.92);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1420; --card: #15212F; --ink: #E8EEF4; --body: #C9D6E2; --muted: #8FA3B8; --soft: #1B2838;
  --line: #26364A; --chip-line: #33465B; --accent: #6FA3D8; --accent-ink: #0B1420; --link: #8DB9E6; --link-hover: #B5D3F2;
  --top-bg: #0B1420; --top-ink: #E8EEF4; --top-muted: #A9BACB; --top-chip: #15212F; --ok-bg: #1F4A33; --ok-ink: #CFEFD9;
  --sel: #E8EEF4; --sel-ink: #0B1420; --hatch-a: #15212F; --hatch-b: #1E2C3D; --hatch-ink: #7F93A8;
  --shadow: none; --map-bg: #1B2838; --panel: rgba(21, 33, 47, 0.92);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
button { font: inherit; color: inherit; }
h2 { margin: 0; font-size: 20px; font-weight: 600; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); font-size: 13px; }
.foot { font-size: 12px; color: var(--muted); margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* header */
.top { background: var(--top-bg); color: var(--top-ink); }
.top-row { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding-top: 18px; }
.chips-row { padding-top: 12px; padding-bottom: 18px; align-items: flex-start; }
.title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.title h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.top-muted { font-size: 14px; color: var(--top-muted); }
.areas { display: flex; gap: 8px; flex-wrap: wrap; }
.areas a { color: var(--top-muted); text-decoration: none; font-size: 14px; padding: 10px 14px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.areas a[aria-current="page"] { color: var(--top-ink); background: var(--top-chip); }
.time-chips { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 600px; }
.time-chips span { font-size: 13px; padding: 6px 10px; border-radius: 999px; background: var(--top-chip); }
.time-chips .ok { background: var(--ok-bg); color: var(--ok-ink); }
.top-tools { display: flex; gap: 8px; }
.tool { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #33465B; background: transparent; color: var(--top-ink); font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tool[aria-pressed="true"] { background: var(--top-ink); color: var(--top-bg); }
.tool-sm { min-width: 44px; min-height: 44px; border-radius: 8px; border: 1px solid var(--chip-line); background: var(--card); cursor: pointer; font-size: 18px; }
.tool-sm:disabled { opacity: 0.4; cursor: default; }

/* layout */
.card { background: var(--card); border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); min-width: 0; }
.status { margin: 0; padding: 14px 18px; border-radius: 10px; background: var(--card); color: var(--body); }
.pair { display: flex; flex-wrap: wrap; gap: 28px; }
.pair > .stations { flex: 999 1 560px; }
.pair > .profile { flex: 1 1 340px; }

/* AI summary */
.summary { padding: 28px 32px; }
.ai-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.ai-label a { margin-left: auto; }
.headline { font-size: 34px; line-height: 1.15; letter-spacing: -0.015em; max-width: 900px; }
.summary-text { margin: 0; font-size: 18px; line-height: 1.55; color: var(--body); max-width: 860px; }
.ai-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-tabs:empty { display: none; }
.tab { min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; cursor: pointer; border: 1px solid var(--chip-line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.tab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: var(--card); }
.tab .dot { width: 8px; height: 8px; border-radius: 50%; }
.ai-panel { display: flex; flex-direction: column; gap: 14px; }
.act-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.act-head h3 { margin: 0; font-size: 20px; font-weight: 600; }
.verdict { font-size: 13px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.v-good { background: #24543A; color: #DDF5E5; }
.v-fair { background: #7A5A12; color: #FCEFCF; }
.v-poor { background: #7E2A20; color: #FBE1DC; }
.dot.v-good { background: #3E8F5F; } .dot.v-fair { background: #C8961E; } .dot.v-poor { background: #C2493A; }
.ai-zones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.box { background: var(--soft); border-radius: 10px; padding: 12px 14px; }
.box .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.box .v { font-size: 15px; margin-top: 4px; }

/* now cards: on phones (and on desktop when there is no AI summary) */
.now-cards { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.now-cards.show { display: grid; }
.now-cards .box { background: var(--card); padding: 14px; box-shadow: var(--shadow); }
.now-cards .big { font-family: var(--mono); font-size: 30px; margin-top: 4px; }
.now-cards .v { font-size: 14px; color: var(--body); }

/* chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 14px; cursor: pointer; border: 1px solid var(--chip-line); background: var(--card); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.chip:disabled { opacity: 0.45; cursor: default; }

/* map */
.map-card { gap: 16px; }
.map-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.map-body { display: flex; flex-wrap: wrap; gap: 16px; }
.map-box { flex: 999 1 640px; min-width: 0; position: relative; border-radius: 10px; overflow: hidden; background: var(--map-bg); height: 560px; }
.map { position: absolute; inset: 0; background: var(--map-bg); }
.overlay { position: absolute; inset: 0; pointer-events: none; z-index: 450; }
.overlay.trail { z-index: 451; }
.legend, .map-note { position: absolute; z-index: 500; background: var(--panel); color: var(--body); border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.legend { left: 12px; bottom: 12px; max-width: calc(100% - 24px); }
.legend .bar { height: 10px; border-radius: 3px; margin: 6px 0 2px; width: 220px; max-width: 100%; }
.legend .ends { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; width: 220px; max-width: 100%; }
.map-note { right: 12px; top: 12px; color: var(--muted); }
.map-btn { position: absolute; z-index: 500; left: 10px; top: 86px; width: 34px; height: 34px; border-radius: 4px; border: 2px solid rgba(0, 0, 0, 0.2); background: #FFFFFF; color: #0F1B2A; cursor: pointer; display: grid; place-items: center; padding: 0; background-clip: padding-box; }
.map-btn:hover { background: #F4F4F4; }
.fs-hours { display: none; position: absolute; z-index: 500; left: 50%; bottom: 14px; transform: translateX(-50%); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 4px; gap: 4px; align-items: center; font-family: var(--mono); font-size: 14px; }
.fs-hours button { min-width: 44px; min-height: 44px; border-radius: 999px; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: inherit; }
.fs-hours button:disabled { opacity: 0.35; cursor: default; }
.fs-hours span { padding: 0 6px; white-space: nowrap; }
.map-box.full { position: fixed; inset: 0; z-index: 3000; height: auto; border-radius: 0; }
.map-box:fullscreen { width: 100%; height: 100%; border-radius: 0; }
.map-box.full .fs-hours { display: flex; }
.map-box.full .legend { bottom: 76px; }
.map-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.side-label { font-size: 13px; color: var(--muted); }
.side-note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.point { background: var(--soft); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.point-name { font-size: 15px; font-weight: 600; }
.point-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-main { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pt-tile { background: var(--card); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.pt-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.pt-big { font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1.15; margin-top: 4px; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-big small { font-size: 13px; color: var(--muted); font-weight: 400; align-self: flex-end; margin-bottom: 5px; }
.pt-arrow { flex: none; transition: transform 0.15s; }
.pt-sub { font-size: 13px; color: var(--body); margin-top: 2px; min-height: 2.9em; line-height: 1.45; white-space: pre-line; }
.point-lines { font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre-line; min-height: 4.8em; color: var(--body); }
.leaflet-container { font-family: var(--sans); background: var(--map-bg); }
.leaflet-control-attribution { font-size: 10px; }
.st-label { background: var(--panel); color: var(--ink); border: 0; box-shadow: none; font-size: 11px; padding: 1px 5px; border-radius: 4px; }
.st-label::before { display: none; }

/* hours */
.hours-wrap { display: flex; flex-direction: column; gap: 8px; }
.hours-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); flex-wrap: wrap; gap: 8px; }
.hours-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin: 0 4px -1px 10px; border: 1px solid var(--chip-line); }
.hours-key .k-solved { background: var(--card); }
.hours-key .k-older { background: var(--card); border-style: dashed; }
.hr.older { border-style: dashed; font-style: italic; }
.hr.src-start, .hlabel.src-start { box-shadow: -3px 0 0 -1px var(--accent); }
.hlabel.older { font-style: italic; }
.map-src { font-size: 13px; font-weight: 400; color: var(--muted); }
/* past forecasts */
.when-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 14px; }
.when-row label { font-weight: 600; }
.when-row input[type="date"] { min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--chip-line); background: var(--card); color: var(--ink); font: inherit; }
.src-pick { min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--chip-line); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; max-width: 100%; }
.past-note { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 12px; background: var(--card); border-left: 0; box-shadow: var(--shadow); font-size: 15px; color: var(--body); }
.past-note[hidden] { display: none; }
body.past #summary, body.past #now, body.past #stations-card { display: none !important; }
body.past .pair > .profile { flex-basis: 100%; }
.hours-key .k-comp { background: repeating-linear-gradient(45deg, var(--hatch-a) 0 3px, var(--hatch-b) 3px 6px); }
.hours { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.day { display: flex; flex-direction: column; gap: 4px; }
.day-label { font-size: 12px; color: var(--muted); }
.day-hours { display: flex; gap: 4px; flex-wrap: wrap; }
.hr { min-width: 40px; min-height: 44px; border-radius: 6px; font-size: 12px; font-family: var(--mono); cursor: pointer; border: 1px solid var(--chip-line); background: var(--card); color: var(--ink); padding: 0; }
.hr[aria-pressed="true"] { background: var(--sel); border-color: var(--sel); color: var(--sel-ink); }
.hr:disabled { cursor: default; color: var(--hatch-ink); border-color: var(--line); background: repeating-linear-gradient(45deg, var(--hatch-a) 0 6px, var(--hatch-b) 6px 12px); }
.slider-phone { display: none; }

/* zone strips */
.zones-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.strip-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.strips { display: grid; gap: 6px 14px; align-items: center; }
.strip-name { position: sticky; left: 0; background: var(--card); z-index: 2; padding-right: 6px; }
.strip-name b { font-size: 15px; font-weight: 600; display: block; }
.strip-name small { font-size: 12px; color: var(--muted); }
.cells { display: grid; gap: 3px; }
.cell { border-radius: 6px; padding: 7px 2px; text-align: center; border: 0; cursor: pointer; min-height: 44px; }
.cell .t { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.cell .w { font-size: 11px; }
.cell.sel { outline: 2px solid var(--sel); outline-offset: 1px; }
.cell.na { background: repeating-linear-gradient(45deg, var(--hatch-a) 0 6px, var(--hatch-b) 6px 12px); color: var(--hatch-ink); cursor: default; }
/* weather symbols */
:root { --wx-sun: #F4B400; --wx-ray: #E09B00; --wx-moon: #F1DE9C; --wx-moon-line: #A68A2E; --wx-cloud: #FFFFFF; --wx-cloud2: #DCE3EA;
  --wx-cloud-line: #6B7C8F; --wx-rain: #2F7FD3; --wx-snow: #5E9ED6; --wx-fog: #8A99A8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wx-cloud: #C9D4DF; --wx-cloud2: #8C9BAA; --wx-cloud-line: #3E4E60;
  --wx-moon: #E9D79A; --wx-moon-line: #E9D79A; --wx-rain: #6FB1F0; --wx-snow: #E8EEF4; --wx-fog: #9FB0C2; } }
:root[data-theme="dark"] { --wx-cloud: #C9D4DF; --wx-cloud2: #8C9BAA; --wx-cloud-line: #3E4E60; --wx-moon: #E9D79A;
  --wx-moon-line: #E9D79A; --wx-rain: #6FB1F0; --wx-snow: #E8EEF4; --wx-fog: #9FB0C2; }
.wx .wx-sun { fill: var(--wx-sun); }
.wx .wx-ray { stroke: var(--wx-ray); stroke-width: 2; stroke-linecap: round; fill: none; }
.wx .wx-moon { fill: var(--wx-moon); stroke: var(--wx-moon-line); stroke-width: 1.2; stroke-linejoin: round; }
.wx .wx-cloud { fill: var(--wx-cloud); stroke: var(--wx-cloud-line); stroke-width: 1.5; stroke-linejoin: round; }
.wx .wx-cloud2 { fill: var(--wx-cloud2); stroke: var(--wx-cloud-line); stroke-width: 1.5; stroke-linejoin: round; }
.wx .wx-drop { stroke: var(--wx-rain); stroke-width: 2.2; stroke-linecap: round; }
.wx .wx-flake { stroke: var(--wx-snow); stroke-width: 1.5; stroke-linecap: round; }
.wx .wx-fog { stroke: var(--wx-fog); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.wxcell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 44px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; padding: 2px 0; color: var(--ink); }
.wxcell:hover { background: var(--soft); }
.wxcell.sel { outline: 2px solid var(--sel); outline-offset: 1px; }
.wxcell.na { cursor: default; background: repeating-linear-gradient(45deg, var(--hatch-a) 0 6px, var(--hatch-b) 6px 12px); }
.wxmm { font-family: var(--mono); font-size: 10px; color: var(--muted); line-height: 1; }
.hlabel { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; }
.inv { font-family: var(--mono); font-size: 12px; text-align: center; color: var(--body); }

/* stations */
.table-scroll { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.st-table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 6px; font-weight: 600; }
.st-table td { padding: 9px 6px; border-top: 1px solid var(--line); font-family: var(--mono); vertical-align: top; }
.st-table td:first-child { font-family: var(--sans); }
.st-table td small { display: block; color: var(--muted); font-size: 12px; }
.st-table td:not(:first-child) { white-space: nowrap; }
.st-nav { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.st-table tr.pick { cursor: pointer; }
.st-table tr.pick:hover td { background: var(--soft); }

/* profile */
.profile svg { width: 100%; height: auto; display: block; }
.profile text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }

/* how it was made */
.made p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--body); max-width: 900px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--body); }
details summary { cursor: pointer; padding: 8px 0; font-size: 14px; min-height: 44px; display: flex; align-items: center; }
details pre { white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; background: var(--soft); color: var(--body); border-radius: 8px; padding: 12px 14px; margin: 6px 0 8px; }
.page-foot { padding-bottom: 32px; }

/* the list of areas (areas.html) */
.top-intro { margin: 0; font-size: 14px; color: var(--top-muted); max-width: 820px; line-height: 1.5; }
.areas-list { display: flex; flex-direction: column; gap: 24px; }
.area-card { flex-direction: row; padding: 0; overflow: hidden; gap: 0; }
.area-map { flex: 0 0 300px; min-height: 340px; background: var(--map-bg); }
.area-body { flex: 1 1 auto; min-width: 0; padding: 22px 26px; display: flex; flex-direction: column; gap: 14px; }
.area-head { display: flex; flex-direction: column; gap: 2px; }
.area-head h2 { font-size: 26px; letter-spacing: -0.01em; }
.area-head h2 a { color: var(--ink); text-decoration: none; }
.area-head h2 a:hover { color: var(--link); }
.area-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.area-chips span { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--soft); color: var(--body); }
.area-chips .ok { background: var(--ok-bg); color: var(--ok-ink); }
.area-ai { display: flex; flex-direction: column; gap: 6px; }
.area-ai .ai-label { font-size: 12px; }
.area-headline { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.25; }
.area-summary { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); max-width: 760px; }
.area-now { display: flex; flex-direction: column; gap: 6px; }
.area-now-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.area-now-v { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--body); margin-top: 2px; }
.big2 { font-size: 24px; color: var(--ink); }
.area-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--chip-line); color: var(--ink); text-decoration: none; font-size: 15px; background: var(--card); }
.btn:hover { border-color: var(--accent); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
@media (max-width: 720px) {
  .area-card { flex-direction: column; }
  .area-map { flex-basis: auto; height: 220px; min-height: 0; }
  .area-body { padding: 16px; }
  .area-head h2 { font-size: 22px; }
  .area-headline { font-size: 18px; }
  .top-intro { font-size: 13px; }
}

/* phone */
@media (max-width: 720px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .top-row { padding-top: 16px; gap: 8px; }
  .title h1 { font-size: 20px; }
  .areas { display: none; }
  .chips-row { padding-top: 8px; padding-bottom: 12px; }
  .time-chips { gap: 6px; }
  .time-chips span { padding: 0; background: none; color: var(--top-muted); font-size: 13px; }
  .time-chips span:not(:last-child)::after { content: " ·"; }
  .time-chips { display: block; line-height: 1.5; }
  .time-chips span { display: inline; }
  .time-chips .ok { background: none; color: var(--top-muted); }
  .time-chips .opt { display: none; }
  .main { padding-top: 4px; gap: 16px; }
  .card { padding: 16px; border-radius: 14px; gap: 12px; }
  .summary { padding: 18px 16px; gap: 10px; }
  .ai-label a { margin-left: 0; }
  .headline { font-size: 24px; line-height: 1.2; }
  .summary-text { font-size: 16px; line-height: 1.5; }
  .ai-zones { display: none; }
  .ai-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tab { white-space: nowrap; min-height: 44px; }
  .now-cards, .now-cards.show { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .now-cards .box:nth-child(n+3) { display: none; }
  .map-card { padding: 0; overflow: hidden; gap: 0; }
  .map-head { padding: 12px; }
  .map-head h2 { display: none; }
  .map-head .chips { flex-wrap: nowrap; overflow-x: auto; }
  .chip { white-space: nowrap; }
  .map-box { flex-basis: 100%; height: 440px; border-radius: 0; }
  .map-side { padding: 12px; }
  .side-note { display: none; }
  .hours-wrap { padding: 0 12px 14px; }
  .hours, .hours-head { display: none; }
  .when-row #when-help { display: none; }
  .slider-phone { display: flex; flex-direction: column; gap: 6px; position: relative; }
  .slider-top, .slider-bottom { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
  .slider-bottom { font-size: 12px; }
  .slider-phone input { width: 100%; height: 44px; margin: 0; position: relative; z-index: 2; background: transparent; -webkit-appearance: none; appearance: none; }
  .slider-phone input::-webkit-slider-runnable-track { height: 6px; background: transparent; }
  .slider-phone input::-moz-range-track { height: 6px; background: transparent; }
  .slider-phone input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); margin-top: -11px; border: 0; }
  .slider-phone input::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); border: 0; }
  .slider-track { position: absolute; left: 0; right: 0; top: 46px; height: 6px; border-radius: 3px; background: var(--chip-line); z-index: 1; }
  .slider-track div { height: 100%; border-radius: 3px; background: var(--accent); }
  .pair { gap: 16px; }
  .st-table { min-width: 0; font-size: 14px; }
  .st-table td, .st-table th { padding: 8px 4px; }
  .st-table .muni { display: none; }
  .st-table th:nth-child(2), .st-table td:nth-child(2) { display: none; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}

/* ---- the map stage: a full-width map with the title, the controls, the point forecast and the hours on it ---- */
.main { padding: 0 0 48px; display: block; }
.below { display: flex; flex-direction: column; gap: 28px; padding-top: 28px; }
.map-card.stage { display: block; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.stage .map-box { height: min(86vh, 1000px); min-height: 560px; border-radius: 0; }
.ov { position: absolute; z-index: 600; }
.ov-title, .ov-row, .ov > .chips, .ov .point, .ov .hours-wrap { background: var(--panel); border-radius: 12px; box-shadow: 0 2px 12px rgba(15, 27, 42, 0.18); backdrop-filter: blur(6px); }
.ov .chip { min-height: 36px; padding: 0 12px; font-size: 13px; }
.ov-tl { left: 14px; top: 14px; display: flex; flex-direction: column; gap: 8px; max-width: min(680px, calc(100% - 360px)); }
.ov-title { padding: 10px 10px 10px 16px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.ov-title h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.ov-tools { display: flex; gap: 4px; margin-left: auto; }
.tool-ic { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--chip-line); background: var(--card); color: var(--ink); display: inline-grid; place-items: center; font-size: 12px; cursor: pointer; text-decoration: none; }
.tool-ic:hover { border-color: var(--accent); color: var(--ink); }
.tool-ic.tz[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ov-tl .past-note { padding: 8px 10px 8px 16px; font-size: 14px; border-radius: 12px; background: var(--panel); box-shadow: 0 2px 12px rgba(15, 27, 42, 0.18); }
.ov-row { padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ov-row .chips { gap: 6px; }
.view-toggle { display: inline-flex; border: 1px solid var(--chip-line); border-radius: 999px; overflow: hidden; flex: none; }
.view-toggle .vt { min-height: 34px; padding: 0 14px; border: 0; background: var(--card); color: var(--ink); font-size: 13px; cursor: pointer; }
.view-toggle .vt[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.view-toggle .vt:disabled { color: var(--muted); cursor: not-allowed; }
.ov-l { left: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.ov-l .chips { flex-direction: column; padding: 6px; gap: 6px; }
.ov-r { right: 14px; top: 110px; width: 300px; }
.ov-r .point-lines { min-height: 0; }
.ov-b { left: 14px; right: 14px; bottom: 14px; }
.ov-b .hours-wrap { padding: 10px 12px; gap: 6px; }
.ov-b .hours { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.ov-b .day { flex: none; }
.ov-b .hr { min-width: 34px; min-height: 36px; }
.stage .legend { bottom: 172px; }
.stage .leaflet-bottom { bottom: 162px; }
.stage .map-btn { left: auto; right: 10px; top: 84px; }
.stage .map-note { display: none; }  /* the layer menu says which basemap is on */
.stage .fs-hours { bottom: 160px; }
@media (max-width: 720px) {
  .stage .map-box { height: 78vh; min-height: 460px; }
  .ov-tl { left: 8px; right: 8px; top: 8px; max-width: none; gap: 6px; }
  .ov-title { padding: 6px 6px 6px 12px; }
  .ov-title h1 { font-size: 16px; }
  .ov-title .map-src { display: none; }
  .ov-row { flex-wrap: nowrap; overflow-x: auto; padding: 6px; }
  .ov-row .chips { flex-wrap: nowrap; }
  .ov-l { top: auto; bottom: 118px; left: 8px; right: 8px; transform: none; flex-direction: row; gap: 6px; overflow-x: auto; }
  .ov-l .chips { flex-direction: row; flex-wrap: nowrap; padding: 4px; }
  .ov-l .chip { padding: 0 10px; font-size: 13px; }  /* heights and flow style fit one phone row */
  .ov-b { left: 8px; right: 8px; bottom: 8px; }
  .ov-b .when-row { display: none; }
  .stage .legend { display: none; }
  .stage .leaflet-control-zoom { display: none; }
  .stage .map-btn { right: 8px; top: auto; bottom: 176px; }
  .stage .leaflet-bottom { bottom: 172px; }
  .below { padding-top: 16px; gap: 16px; }
  /* the point forecast sits under the map on phones (page.js moves it) */
  #point-slot.under { position: static; width: auto; }
  .below .when-row { display: flex; padding: 0 4px; }
}
