/* RoadSkies: mobile-first. The form is drawn as a road: a dashed center line joins start, stops and destination. */
:root {
  --asphalt: #0f2a44;
  --asphalt-soft: #4a5d70;
  --sky: #f1f6fb;
  --paper: #ffffff;
  --sign: #0a6fc2;
  --sign-deep: #08589b;
  --amber: #f26a3d;
  --brake: #b3261e;
  --line: #cfdbe7;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--asphalt);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
[hidden] { display: none !important; }

/* Brand font (Outfit, SIL Open Font License; served from this site, no outside requests) */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/outfit-400.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/outfit-700.woff2") format("woff2"); }

/* Header: logo + name + tagline, kept compact for phone screens */
.sign { background: var(--paper); border-bottom: 1px solid #d8e3ee; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); }
.sign-row { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.sign-inner { flex: 1 1 auto; min-width: 0; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.sign .logo { flex: none; width: 44px; height: 42px; } /* the cloud-and-timeline mark is wider than tall; same height as before */
.sign .brand { min-width: 0; font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.sign h1 { margin: 0; font-size: 26px; line-height: 1; font-weight: 700; letter-spacing: -.01em; color: var(--asphalt); }
.sign h1 span { color: var(--sign); }
.sign p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.3; color: var(--asphalt-soft); text-wrap: balance; }

main { max-width: 560px; margin: 0 auto; padding: 18px 14px 8px; }

/* The route spine */
.spine { list-style: none; margin: 0 0 14px; padding: 0; }
/* v1.37.2: markers sit level with the middle of each box (label line + 6 px gap + half the 50 px box).
   v1.37.3: the marker is 32 px tall (22 + 2 x 5 px border: * { box-sizing } does not reach ::after), so its top is 16 px above. */
.node { position: relative; padding: 0 0 20px 46px; --mark-mid: calc(2px + 1.45rem + 6px + 25px); }
.node::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; border-left: 4px dashed var(--amber); }
.node.start::before { top: var(--mark-mid); }
.node.dest { padding-bottom: 0; }
.node.dest::before { bottom: auto; height: var(--mark-mid); }
.node:not(.add)::after { content: ""; position: absolute; left: 4px; top: calc(var(--mark-mid) - 16px); width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 5px solid var(--amber); }
.node.start::after { background: var(--sign); border-color: var(--sign); }
.node.dest::after { border-radius: 5px; background: var(--asphalt); border-color: var(--asphalt); }
.node.add { padding-bottom: 20px; }

.field-label { display: block; font-weight: 700; margin: 0 0 6px; padding-top: 2px; }
.ac-wrap { position: relative; }
input[type="text"], select, input[type="time"] {
  width: 100%; min-height: 50px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--asphalt);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--asphalt-soft) 50%), linear-gradient(135deg, var(--asphalt-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible, .seg input:focus-visible + span {
  outline: 3px solid var(--asphalt); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(242,106,61,.45);
}
.invalid input { border-color: var(--brake); }
/* Red * on the label of anything that needs fixing (the message under the button names it). */
.node.invalid > .field-label::after, #departure.invalid > legend::after { content: " *"; color: var(--brake); font-weight: 800; }
.node.invalid > .field-label, #departure.invalid > legend { color: var(--brake); }
#departure.invalid { border-color: var(--brake); }
#departure.invalid select, #departure.invalid input[type="time"] { border-color: var(--brake); }
.field-msg { margin: 6px 0 0; color: var(--brake); font-size: .92rem; font-weight: 600; min-height: 0; }
.field-msg:empty { display: none; }

/* Suggestions */
.ac-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--paper); border: 1.5px solid var(--asphalt); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(15,42,68,.18); max-height: 300px; overflow-y: auto; }
.ac-item { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; min-height: 48px; justify-content: center; }
.ac-item.active, .ac-item:hover { background: var(--sky); }
.ac-l1 { font-weight: 650; }
.ac-l2 { color: var(--asphalt-soft); font-size: .88rem; }
.ac-more { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.ac-more .ac-l1 { color: var(--sign); font-weight: 600; }
.ac-msg { padding: 12px; color: var(--asphalt-soft); }
.ac-msg.error { color: var(--brake); font-weight: 600; }

/* Stops */
.stop-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.stay { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.stay select { width: auto; min-width: 120px; min-height: 44px; }
.move { display: flex; gap: 6px; }
button.icon { width: 44px; height: 44px; display: grid; place-items: center; background: var(--paper); color: var(--asphalt); border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; padding: 0; }
button.icon svg { width: 20px; height: 20px; }
button.icon:disabled { opacity: .35; cursor: default; }
button.icon[data-act="remove"] { color: var(--brake); }

.add-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px 0 14px; font: inherit; font-weight: 650; color: var(--asphalt); background: var(--paper); border: 1.5px dashed var(--asphalt-soft); border-radius: 999px; cursor: pointer; }
.add-btn svg { width: 18px; height: 18px; }
.add-btn:disabled { opacity: .5; cursor: default; }
.hint { margin-left: 10px; color: var(--asphalt-soft); font-size: .9rem; }
/* Swap Leaving From and Going To (goal 27): at the right end of the Add Stop row */
.node.add { display: flex; align-items: center; }
.node.add .hint { flex: 1 1 auto; min-width: 0; }
.node.add .add-btn { flex: none; white-space: nowrap; }
.swap-btn { flex: none; margin-left: 8px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; color: var(--asphalt); background: var(--paper); border: 1.5px solid var(--line); border-radius: 50%; cursor: pointer; }
.swap-btn svg { width: 20px; height: 20px; }

/* Departure panel */
.panel { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 14px; min-width: 0; }
.panel legend { font-weight: 700; padding: 0 6px; }
#departure legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; }
#departure .seg { clear: both; }
/* Leave now / Schedule (goal 24): a white pill slides behind the chosen option on a pale track.
   app.js adds .is-sched to move it. The radio buttons stay underneath for keyboards and screen readers. */
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #e6eef6; border-radius: 999px; }
.seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); background: var(--paper); border-radius: 999px; box-shadow: 0 1px 2px rgba(15,42,68,.14), 0 3px 8px rgba(15,42,68,.10); transition: transform .2s ease; }
.seg.is-sched::before { transform: translateX(100%); }
.seg label { position: relative; z-index: 1; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 6px; border-radius: 999px; text-align: center; font-weight: 600; color: var(--asphalt-soft); cursor: pointer; transition: color .2s ease; }
.seg span svg { flex: none; width: 17px; height: 17px; }
.seg input:checked + span { color: var(--asphalt); font-weight: 750; }
/* Date and Time slide open below the toggle (visibility keeps the closed fields out of the tab order) */
.drawer { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .25s ease, visibility 0s linear .25s; }
.drawer.open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .25s ease, visibility 0s linear 0s; }
.drawer-in { overflow: hidden; min-height: 0; }
@media (prefers-reduced-motion: reduce) { .seg::before, .seg span, .drawer, .drawer.open { transition: none; } }
.schedule { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 380px) { .schedule { grid-template-columns: 1fr; } }
.small-field { display: block; font-weight: 600; }
.small-field span { display: block; margin-bottom: 4px; }
.note { margin: 10px 0 0; color: var(--asphalt-soft); font-size: .92rem; }
.note:empty { display: none; }
.note.error { color: var(--brake); font-weight: 600; }
.summary { margin: 10px 0 0; font-weight: 700; }
.summary:empty { display: none; }
.link-btn { margin-top: 6px; min-height: 44px; padding: 0 4px; font: inherit; font-weight: 650; color: var(--sign); background: none; border: 0; text-decoration: underline; cursor: pointer; }

.check { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 600; margin-bottom: 8px; }
.check input { width: 24px; height: 24px; accent-color: var(--sign); }
/* Avoid: Highways and Tolls (goal 16). Real checkboxes, drawn as chips: the checkbox lies invisible
   over its chip, so taps, keyboards, and screen readers work as before. On: blue with a tick. */
.avoid { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 8px; }
.avoid.toggle { min-height: 58px; padding: 6px 14px; }
.avoid-h { font-weight: 700; margin-right: 2px; }
.avoid-chip { position: relative; display: inline-flex; }
.avoid-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.avoid-chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; font-weight: 600; color: var(--asphalt); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; }
.avoid-chip svg { display: none; flex: none; width: 16px; height: 16px; }
.avoid-chip input:checked + span { padding-left: 12px; font-weight: 700; color: var(--sign-deep); background: #e3f0fb; border-color: var(--sign); }
.avoid-chip input:checked + span svg { display: block; }
.avoid-chip input:focus-visible + span { outline: 3px solid var(--sign); outline-offset: 2px; }
.avoid-hint { display: none; margin: -4px 0 12px; font-size: .92rem; color: var(--asphalt-soft); }
.avoid:has(input[id^="avoid-highways"]:checked) + .avoid-hint { display: block; }
.avoid.toggle + .avoid-hint { margin-top: -6px; }

/* Main buttons (goal 24): rounded ends, an icon, a soft shadow, and a slight press-down */
button.primary { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; font: inherit; font-size: 1.1rem; font-weight: 750; color: #fff; background: var(--sign); border: 0; border-radius: 999px; box-shadow: 0 6px 16px rgba(10,111,194,.30); cursor: pointer; transition: transform .08s ease, box-shadow .08s ease, background-color .08s ease; }
button.primary:active { background: var(--sign-deep); transform: translateY(1px); box-shadow: 0 2px 6px rgba(10,111,194,.30); }
button.primary svg { flex: none; width: 22px; height: 22px; }
button.primary .ico-spin { animation: rcspin .8s linear infinite; }
@keyframes rcspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.primary { transition: none; } button.primary .ico-spin { animation-duration: 2.4s; } }
.form-summary { margin: 10px 0 0; color: var(--brake); font-weight: 650; text-align: center; }
.form-summary:empty { display: none; }
.form-summary.waiting { color: var(--asphalt-soft); font-weight: 600; }

/* ---- Route choice screen ---- */
.route-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.route-top h2 { margin: 0; font-size: 1.25rem; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 6px; font: inherit; font-weight: 650; color: var(--asphalt); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; }
.back-btn svg { width: 18px; height: 18px; }
.route-trip { margin: 6px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.route-depart { margin: 2px 0 12px; color: var(--asphalt-soft); font-size: .95rem; }

.map-wrap { position: relative; margin: 0 -14px 12px; }
#map { height: 30vh; height: clamp(200px, 30svh, 360px); min-height: 200px; max-height: 360px; background: #dfe7ec; } /* v2.3.0 (goal 52): was 46vh, 260 to 480 px; the route cards now show without scrolling */
@media (min-width: 560px) { .map-wrap { margin: 0 0 12px; } #map { border-radius: var(--radius); border: 1.5px solid var(--line); } }
.map-legend { position: absolute; left: 10px; top: 10px; z-index: 500; margin: 0; padding: 4px 10px; background: rgba(255,255,255,.94); border-radius: 999px; font-size: .82rem; font-weight: 650; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.map-legend .swatch { display: inline-block; width: 18px; height: 7px; background: linear-gradient(var(--asphalt) 0 2px, var(--amber) 2px 5px, var(--asphalt) 5px); border-radius: 3px; vertical-align: middle; margin-right: 6px; }
.leaflet-container { font: inherit; }
.pin { border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pin-start { background: var(--sign); border: 3px solid #fff; }
.pin-stop { background: #fff; border: 4px solid var(--amber); color: var(--asphalt); }
.pin-dest { background: var(--asphalt); border: 3px solid #fff; border-radius: 6px; }

.toggle { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0 14px; margin-bottom: 12px; }

.route-status { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--paper); border: 1.5px solid var(--line); }
.route-status p { margin: 0; font-weight: 600; }
.route-status.error { border-color: var(--brake); }
.route-status.error p { color: var(--brake); }
.route-status.loading p::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 10px; vertical-align: -2px; border: 3px solid var(--line); border-top-color: var(--sign); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.route-notes { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid var(--amber); background: #fff1eb; border-radius: 0 var(--radius) var(--radius) 0; }
.route-notes p { margin: 4px 0; font-size: .95rem; }

.route-list { display: grid; gap: 10px; margin-bottom: 14px; }
/* v1.21.0: route cards. Time first; the picked card (sky-blue border) shows everything, the
   others fold to two lines (.rc-mini). Every card holds both layouts; .selected picks which shows. */
.route-card { display: grid; gap: 3px; width: 100%; text-align: left; padding: 12px 15px; font: inherit; color: var(--asphalt); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.route-card.selected { border: 2.5px solid var(--sign); padding: 13px 14px; box-shadow: 0 4px 16px rgba(10,111,194,.16); }
.rc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rc-time { font-size: 1.2rem; font-weight: 750; letter-spacing: -.01em; line-height: 1.15; }
.route-card.selected .rc-time { font-size: 1.65rem; }
.rc-delta { font-weight: 700; font-size: .95rem; text-align: right; }
.rc-full, .rc-more { display: grid; gap: 3px; }
.route-card:not(.selected) .rc-full, .route-card.selected .rc-mini { display: none; }
.rc-facts { font-weight: 600; font-variant-numeric: tabular-nums; }
.rc-arrive:not(:empty) + .rc-dist::before, .rc-mini .rc-dist::before { content: "\00B7"; padding: 0 6px; color: var(--asphalt-soft); }
.rc-via { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--asphalt-soft); }
.rc-via .chip { padding: 1px 8px; }
.rc-traffic-when.warn { color: var(--asphalt); font-weight: 600; }
.chip { font-size: .82rem; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: #eef2f6; color: var(--asphalt); white-space: nowrap; }
.chip[hidden] { display: none; }
.chip.fast { background: var(--sign); color: #fff; }
.chip.tolls { background: #fff4d6; color: #8a5a00; }
.chip.tollna { color: var(--asphalt-soft); }
.chip.late { background: #fdeceb; color: #9f1d14; } /* goal 40: route ends past the forecast */
.route-fc { margin: 0 0 12px; }
.rc-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; color: var(--asphalt-soft); font-size: .92rem; }
.rc-mini .chip { margin-left: 8px; padding: 1px 7px; font-size: .78rem; }
.rc-more { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--asphalt-soft); font-size: .9rem; }
.rc-more > [hidden] { display: none; }
/* v2.6.0 (goal 52): one weather line on each card (routes.js paintHint); the folded cards show it too. */
.rc-hint { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: .9rem; font-weight: 650; line-height: 1.3; color: var(--asphalt); }
.rc-hint[hidden], .route-card.selected .rc-hint-mini { display: none; }
.rc-hint > span:last-child { min-width: 0; }
.rc-hint.hint-rain { color: var(--t-cold); }
.rc-hint.hint-dry, .rc-hint.hint-wait { color: var(--asphalt-soft); font-weight: 500; }
.rc-hint-mini { margin-top: 3px; font-size: .86rem; }
/* v1.21.0: labels on the route map ("53 min slower", "Tolls"). The marker box has no size; the label is centred on its point. */
.route-label { background: none; border: 0; }
.route-label .rl { position: relative; display: inline-grid; transform: translate(-50%, -50%); white-space: nowrap; padding: 3px 8px; border-radius: 9px; background: #fff; color: var(--asphalt); border: 1.5px solid var(--line); box-shadow: 0 1px 5px rgba(15,42,68,.3); font: 700 13px/1.2 "Outfit", system-ui, sans-serif; cursor: pointer; }
.route-label .rl small { font-size: 12px; font-weight: 600; color: var(--asphalt-soft); }
.route-label.sel .rl { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.route-label.sel .rl small { color: #d3e0ec; }
/* v1.27.1: a label with no room on its line sits beside it, with a pointer to the line (8 px gap, GAP in routes.js). */
.route-label .rl.at-r { transform: translate(8px, -50%); }
.route-label .rl.at-l { transform: translate(calc(-100% - 8px), -50%); }
.route-label .rl.at-a { transform: translate(-50%, calc(-100% - 8px)); }
.route-label .rl.at-b { transform: translate(-50%, 8px); }
.route-label .rl[class*="at-"]:not(.at-c)::before { content: ""; position: absolute; z-index: -1; width: 10px; height: 10px; background: inherit; border: 0 solid; border-color: inherit; transform: rotate(45deg); }
.route-label .rl.at-r::before { left: -6px; top: 50%; margin-top: -5px; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.route-label .rl.at-l::before { right: -6px; top: 50%; margin-top: -5px; border-right-width: 1.5px; border-top-width: 1.5px; }
.route-label .rl.at-a::before { bottom: -6px; left: 50%; margin-left: -5px; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.route-label .rl.at-b::before { top: -6px; left: 50%; margin-left: -5px; border-left-width: 1.5px; border-top-width: 1.5px; }
.toll { justify-self: start; font-size: .85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1.5px solid currentColor; }
.toll.detected { color: #8a5a00; background: #fff4d6; }
.toll.none_detected { color: var(--sign-deep); }
.toll.unknown { color: var(--asphalt-soft); }
.rc-desc { color: var(--asphalt-soft); }
.route-card.skeleton { height: 108px; cursor: default; background: linear-gradient(90deg, #fff 0%, #eef3f6 50%, #fff 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
button.primary:disabled { opacity: .5; cursor: default; box-shadow: none; transform: none; }
.fineprint { margin: 14px 0 0; color: var(--asphalt-soft); font-size: .82rem; }
/* v2.3.0 (goal 52): "See weather on this route" stays at the bottom of the screen while the route cards scroll.
   z-index above Leaflet's controls (1000) on the route map, below the full-screen map (3000) and menus. */
.go-bar { position: sticky; bottom: 0; z-index: 1010; margin: 4px -14px 0; padding: 10px 14px max(10px, env(safe-area-inset-bottom)); background: var(--sky); box-shadow: 0 -6px 10px -8px rgba(15,42,68,.35); }
@media (min-width: 560px) { .go-bar { margin: 4px 0 0; padding-left: 0; padding-right: 0; } }
html.rc-mapfull .go-bar { visibility: hidden; }
:root[data-theme="dark"] .go-bar { box-shadow: 0 -6px 10px -8px rgba(0,0,0,.7); }

/* ---- Weather screen ---- */
/* Phones: the route bar and map stay pinned at the top while the timeline scrolls underneath. */
.wx-dock { position: sticky; top: 0; z-index: 700; margin: 0 -14px 12px; background: var(--sky); box-shadow: 0 6px 10px -8px rgba(15,42,68,.35); }
.wx-bar { display: flex; align-items: flex-start; gap: 8px; padding: 6px 14px 7px; }
.wx-bar-main { flex: 1; min-width: 0; }
.wx-bar p { margin: 0; }
/* v1.18.0 (goal 36): trip name beside "< Routes" (up to 2 lines), then arrival in bold and one grey details line */
.wx-trip { flex: 1; min-width: 0; margin: 0; font-weight: 750; font-size: 1.05rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.wx-times { font-size: 1.2rem; font-weight: 750; line-height: 1.25; }
.wx-route { color: var(--asphalt-soft); font-size: .88rem; line-height: 1.45; }
.wx-route .toll { display: inline-block; margin-left: 6px; font-size: .76rem; line-height: 1.4; padding: 0 8px; border-width: 1.2px; border-radius: 10px; vertical-align: 1px; }
.wx-route .toll[hidden] { display: none; }
.wx-route .toll { font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
#weather > .route-top .back-btn { flex: none; }
.map-toggle { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; font: inherit; font-size: .85rem; font-weight: 700; color: var(--asphalt); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; }
.wx-map-wrap { position: relative; }
#wx-map { height: 34vh; height: clamp(190px, 34svh, 380px); min-height: 190px; max-height: 380px; background: #dfe7ec; }
.wx-list .wx-item { scroll-margin-top: calc(var(--dock-h, 0px) + 10px); scroll-margin-bottom: 14px; }

/* Selected-point panel over the bottom of the map */
.wx-panel { position: absolute; z-index: 1001; left: 8px; right: 8px; bottom: 26px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 0 8px; align-items: center; padding: 6px 4px 6px 8px; background: rgba(255,255,255,.97); border: 1.5px solid var(--asphalt); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(15,42,68,.25); }
.wx-panel p { margin: 0; }
.wp-icon svg { width: 40px; height: 40px; display: block; }
.wp-icon.na svg { width: 32px; height: 32px; }
.wp-main { min-width: 0; line-height: 1.25; }
.wp-top { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-time { font-weight: 800; }
.wp-kind, .wp-count { color: var(--asphalt-soft); font-weight: 650; }
.wp-place { font-weight: 750; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-cond { font-size: .83rem; }
.wp-temp { font-weight: 800; font-size: 1.35rem; }
.wp-nav { display: grid; grid-template-columns: 44px 44px; grid-template-rows: 32px 40px; /* v2.2.0: was 38 wide, 30 and 34 tall */ border-left: 1px solid var(--line); padding-left: 2px; }
.wp-btn { display: grid; place-items: center; padding: 0; color: var(--asphalt); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.wp-btn svg { width: 18px; height: 18px; }
.wp-btn:disabled { opacity: .3; cursor: default; }
.wp-close { grid-column: 1 / -1; grid-row: 1; justify-self: end; width: 44px; }
.wp-close svg { width: 15px; height: 15px; }
.wp-btn[data-go] { grid-row: 2; }

/* Map markers: a small weather bubble pointing at the spot (64 x 34 + 7 px tail; see wxmap.js) */
.wxm-wrap, .wxm-dot-wrap, .wxm-none { background: none; border: 0; }
.wxm { position: relative; box-sizing: border-box; width: 64px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 6px 0 3px; background: #fff; border: 2px solid var(--asphalt-soft); border-radius: 999px; box-shadow: 0 2px 6px rgba(15,42,68,.3); cursor: pointer; }
.wxm::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 10px; height: 10px; margin-left: -5px; background: inherit; border: inherit; border-top: 0; border-left: 0; transform: rotate(45deg) scale(.8); transform-origin: center; border-radius: 0 0 3px 0; }
.wxm-ic svg { width: 26px; height: 26px; display: block; }
.wxm-t { font-weight: 800; font-size: 14px; color: var(--asphalt); }
.wxm.kind-start { border-color: var(--sign); }
.wxm.kind-stop { border-color: var(--amber); }
.wxm.kind-end { border-color: var(--asphalt); }
.wxm.st-loading .wxm-wait { width: 14px; height: 14px; border: 3px solid var(--line); border-top-color: var(--sign); border-radius: 50%; animation: spin .8s linear infinite; }
.wxm.st-beyond_horizon, .wxm.st-unavailable, .wxm.st-outside_coverage, .wxm.st-busy { background: #f3f6f8; border-style: dashed; }
.wxm.sel { background: var(--asphalt); border-color: var(--asphalt); transform: scale(1.12); transform-origin: 50% 100%; }
.wxm.sel .wxm-t { color: #fff; }
.wxm-dot { display: block; width: 14px; height: 14px; margin: 2px; border-radius: 50%; background: #fff; border: 3px solid var(--asphalt-soft); box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; }
.wxm-dot.na { border-style: dashed; }

/* Icon cut-out colour (the thin outline between a cloud and the sun/moon behind it) */
.wxm.sel { --wx-icon-bg: var(--asphalt); }
.wxm.st-beyond_horizon, .wxm.st-unavailable, .wxm.st-outside_coverage, .wxm.st-busy,
.wx-item.st-beyond_horizon, .wx-item.st-unavailable, .wx-item.st-outside_coverage, .wx-item.st-busy { --wx-icon-bg: #f3f6f8; }

/* Colour cues from the forecast numbers */
:root { --t-cold: #1d63a6; --t-warm: #c2410c; }
.t-freeze { color: var(--t-cold); }
.t-hot { color: var(--t-warm); }
.wxm.sel .wxm-t.t-freeze { color: #9fd0ff; }
.wxm.sel .wxm-t.t-hot { color: #ffb38a; }
.wx-pop { border-radius: 999px; }
.wx-pop.pop-lo, .wx-pop.pop-na { color: var(--asphalt); }
.wx-pop.pop-mid, .wx-pop.pop-hi { color: var(--t-cold); } /* 30% or more: blue numbers (v1.10.5: the blue badge for 60% or more was removed, owner request) */

/* Timeline */
.wx-list { list-style: none; margin: 0 0 6px; padding: 0; position: relative; }
.wx-day { margin: 14px 0 6px; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--asphalt-soft); }
.wx-day:first-child { margin-top: 0; }
.wx-row { margin-bottom: 8px; }
.wx-item { display: grid; grid-template-columns: 4.6rem 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; text-align: left; font: inherit; color: var(--asphalt); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.wx-item.kind-start, .wx-item.kind-end, .wx-item.kind-stop { border-left: 6px solid var(--amber); padding-left: 8px; }
.wx-item.kind-start { border-left-color: var(--sign); }
.wx-item.kind-end { border-left-color: var(--asphalt); }
.wx-item.selected { border-color: var(--asphalt); border-width: 2.5px; padding: 9px 11px; box-shadow: 0 0 0 3px rgba(242,106,61,.55), 0 2px 10px rgba(15,42,68,.15); }
.wx-item.selected.kind-start, .wx-item.selected.kind-end, .wx-item.selected.kind-stop { border-left-width: 6px; padding-left: 8px; }
.wx-when { display: flex; flex-direction: column; line-height: 1.15; }
.wx-clock { font-weight: 800; font-size: 1.02rem; white-space: nowrap; }
.wx-zone { color: var(--asphalt-soft); font-size: .78rem; font-weight: 650; }
.wx-mid { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.wx-kind { font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: var(--asphalt-soft); }
.wx-place { font-weight: 700; overflow-wrap: anywhere; }
.wx-cond { font-size: .9rem; color: var(--asphalt); }
.wx-pop { font-weight: 700; white-space: nowrap; }
.wx-right { display: flex; flex-direction: column; align-items: center; min-width: 3.2rem; }
.wx-icon svg { width: 40px; height: 40px; display: block; }
.wx-icon.na svg { width: 32px; height: 32px; opacity: .8; }
.wx-temp { font-weight: 800; font-size: 1.15rem; }
.wx-item.st-loading .wx-cond { color: var(--asphalt-soft); }
.wx-item.st-beyond_horizon, .wx-item.st-unavailable, .wx-item.st-outside_coverage, .wx-item.st-busy { background: #f3f6f8; border-style: dashed; }
.wx-item.st-beyond_horizon .wx-cond, .wx-item.st-unavailable .wx-cond, .wx-item.st-outside_coverage .wx-cond, .wx-item.st-busy .wx-cond { color: var(--asphalt-soft); font-style: italic; }
.route-notes .link-btn { margin-top: 0; }

/* Key on the weather map: top left, clear of the point panel (bottom) and the map buttons (top right, goal 33) */
.wx-legend { z-index: 800; padding: 3px 9px; font-size: .76rem; }

/* Actions under the timeline */
.wx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.secondary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px 0 16px; font: inherit; font-weight: 700; color: var(--asphalt); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; }
.secondary-btn svg { width: 18px; height: 18px; flex: none; }
.secondary-btn[aria-expanded="true"] { background: var(--sign); border-color: var(--sign); color: #fff; }
.go-now { width: 100%; }
.go-menu { margin-top: 10px; padding: 12px 14px; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); }
.go-title { margin: 0 0 8px; font-weight: 700; }
.go-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.go-app { display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 6px 12px; color: var(--asphalt); text-decoration: none; font-weight: 750; background: var(--sky); border: 1.5px solid var(--line); border-radius: 10px; }
.go-app small { font-weight: 600; font-size: .75rem; color: var(--asphalt-soft); }
.go-app:active { border-color: var(--asphalt); }
.go-note { margin: 10px 0 0; font-size: .85rem; color: var(--asphalt-soft); }

/* v1.34.0 (goal 46): Go now on its own row, Share trip and Save forecast side by side under it;
   each menu opens under its own row. */
#go-now-btn { width: 100%; }
.wx-pair { display: flex; gap: 10px; width: 100%; }
.wx-pair .secondary-btn { flex: 1 1 0; min-width: 0; padding: 0 10px 0 8px; }
.wx-actions .share-msg { margin: 0; }
.save-menu { margin-top: 0; width: 100%; }
.save-opt { font: inherit; font-weight: 750; text-align: left; cursor: pointer; }
.save-opt:disabled { cursor: default; color: var(--asphalt-soft); }

/* The saved forecast's print page (#sheet-view). It takes the place of the app while open, and is
   always light (made for paper), so it uses fixed colours instead of the theme tokens. */
html.rc-sheet body > *:not(#sheet-view) { display: none !important; }
html.rc-sheet, html.rc-sheet body { background: #e9eef4; color-scheme: light; }
.sv { color: #0f2a44; padding: 14px max(14px, env(safe-area-inset-right)) 30px max(14px, env(safe-area-inset-left)); }
.sv-bar { max-width: 800px; margin: 0 auto 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.sv-bar button.primary { width: auto; flex: 1 1 220px; min-height: 48px; font-size: 1rem; color: #fff; background: #0a6fc2; }
.sv-bar .secondary-btn { flex: 1 1 160px; color: #0f2a44; background: #fff; border-color: #cfdbe7; }
.sv-tip { flex-basis: 100%; margin: 0; font-size: .82rem; color: #4a5d70; }
.sv-page { max-width: 800px; margin: 0 auto; padding: 24px 26px; background: #fff; border-radius: 6px; box-shadow: 0 4px 18px rgba(15,42,68,.15); }
.sv-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 2px solid #0f2a44; }
.sv-brand { display: flex; align-items: center; gap: 6px; }
.sv-brand svg { width: 26px; height: 22px; flex: none; }
.sv-name { font: 700 1.2rem/1 "Outfit", system-ui, sans-serif; }
.sv-name span { color: #0a6fc2; }
.sv-asof { margin: 0; font-size: .8rem; color: #4a5d70; text-align: right; }
.sv-trip { margin: 12px 0 2px; font: 700 1.5rem/1.2 "Outfit", system-ui, sans-serif; text-wrap: balance; }
.sv-meta { margin: 0; font-size: .92rem; color: #4a5d70; }
.sv-alerts { margin: 12px 0 0; padding: 8px 12px; font-size: .9rem; color: #7a1a12; background: #fdeceb; border: 1.5px solid #f3c2bf; border-radius: 8px; }
.sv-alerts b { color: #b3261e; }
.sv-alerts ul { margin: 2px 0 0; padding-left: 1.1em; }
.sv-note { margin: 10px 0 0; font-size: .88rem; color: #4a5d70; }
.sv-scroll { overflow-x: auto; }
.sv-table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.sv-table th { padding: 4px 6px; text-align: left; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #4a5d70; border-bottom: 1.5px solid #0f2a44; }
.sv-table td { padding: 5px 6px; vertical-align: middle; border-bottom: 1px solid #d5e0ea; }
.sv-table .n { text-align: right; white-space: nowrap; }
.sv-table th.n { white-space: normal; }
.sv-table td.n { font-weight: 700; }
.sv-table td.cold { color: #1d63a6; }
.sv-table td.hot { color: #c2410c; }
.sv-table .t { font-weight: 800; white-space: nowrap; }
.sv-table .pl span { display: block; }
.sv-table .k { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #4a5d70; }
.sv-table .p { font-weight: 700; }
.sv-table .w { font-size: .78rem; font-weight: 700; color: #0d4f8b; }
.sv-table .a { font-size: .78rem; font-weight: 800; color: #b3261e; }
.sv-table .wxi { display: flex; align-items: center; gap: 6px; }
.sv-table .ic svg { display: block; width: 24px; height: 24px; flex: none; }
.sv-table .c .f { display: block; font-size: .78rem; color: #4a5d70; }
.sv-table tr.night td { background: #e3e9f4; }
.sv-table tr.band td { padding: 3px 6px; font-size: .76rem; font-weight: 700; color: #4a5d70; background: #f5f8fb; }
.sv-table tr.band.night td { background: #e3e9f4; }
.sv-table .sv-wind { font-size: .82rem; }
.sv-foot { margin-top: 14px; padding-top: 8px; border-top: 1px solid #d5e0ea; font-size: .76rem; color: #4a5d70; }
.sv-foot p { margin: 0 0 4px; }
.sv-link a { font-weight: 700; color: #0a6fc2; }
@media (max-width: 560px) {
  .sv-page { padding: 16px 12px; }
  .sv-trip { font-size: 1.25rem; }
  .sv-table { font-size: .8rem; }
  .sv-table td, .sv-table th { padding-left: 3px; padding-right: 3px; }
  .sv-table .ic svg { width: 20px; height: 20px; }
  .sv-table .sv-wind { display: none; } /* on a phone screen only; the printed page has it */
}
@media print {
  @page { margin: 12mm; }
  html.rc-sheet, html.rc-sheet body { background: #fff; }
  html.rc-sheet .sv { padding: 0; }
  html.rc-sheet .sv-bar { display: none; }
  html.rc-sheet .sv-page { max-width: none; padding: 0; box-shadow: none; border-radius: 0; }
  html.rc-sheet .sv-table { font-size: 10pt; }
  html.rc-sheet .sv-table .sv-wind { display: table-cell; }
  html.rc-sheet .sv-table tr { break-inside: avoid; }
  html.rc-sheet .sv-table thead { display: table-header-group; }
  html.rc-sheet .sv * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Goal 13: buttons under the map (pinned with it): Hide map, and the Details | List switch */
.wx-tools { display: flex; align-items: center; gap: 8px; padding: 7px 14px 8px; }
.map-toggle svg, .view-switch svg { width: 16px; height: 16px; flex: none; }
.view-switch { display: flex; margin-left: auto; padding: 2px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; }
.view-switch button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; font: inherit; font-size: .85rem; font-weight: 700; color: var(--asphalt); background: none; border: 0; border-radius: 999px; cursor: pointer; }
.view-switch button[aria-pressed="true"] { color: #fff; background: var(--sign); }

/* Wider phones and tablets: map with rounded corners */
@media (min-width: 560px) {
  .wx-dock { margin: 0 0 12px; border-radius: 0 0 var(--radius) var(--radius); }
  .wx-bar, .wx-tools { padding-left: 0; padding-right: 0; }
  #wx-map { border-radius: var(--radius); border: 1.5px solid var(--line); }
}
/* Laptops and desktops, and phones held sideways (v1.10.4): timeline on the left, map on the right (both visible, nothing pinned over the list). */
@media (min-width: 900px), (min-width: 560px) and (max-height: 500px) and (orientation: landscape) {
  body.rc-wx main { max-width: 1120px; }
  #weather { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 20px; align-items: start; }
  #weather > * { grid-column: 1; }
  #weather > .route-top { grid-column: 1 / -1; }
  #weather > .wx-dock { grid-column: 2; grid-row: 2 / span 20; position: sticky; top: 12px; margin: 0; box-shadow: none; background: none; }
  #wx-map { height: calc(100vh - 140px); max-height: 760px; min-height: 360px; }
  .map-toggle { display: none; }
  .wx-list .wx-item { scroll-margin-top: 12px; }
}

footer { max-width: 560px; margin: 0 auto; padding: 8px 14px 28px; color: var(--asphalt-soft); font-size: .82rem; }
footer a { color: inherit; }
footer .copyright { margin-top: 10px; }

@media (forced-colors: active) { .node::before { border-left-color: CanvasText; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } .route-card.skeleton, .route-status.loading p::before, .wxm.st-loading .wxm-wait { animation: none; } .wx-item { transition: none; } }
@media (min-width: 900px), (min-width: 560px) and (max-height: 500px) and (orientation: landscape) { #wx-map-wrap[hidden] { display: block !important; } }

/* ---- Full-screen map (assets/js/mapfull.js) ---- */
html.rc-mapfull, html.rc-mapfull body { overflow: hidden; }
html.rc-mapfull .wx-dock { z-index: 3000; } /* the pinned block holds the weather map; lift it above everything */
.map-full { position: fixed !important; inset: 0; z-index: 3000; margin: 0 !important; background: #dfe7ec; }
.map-full #map, .map-full #wx-map { height: 100% !important; min-height: 0 !important; max-height: none !important; border: 0 !important; border-radius: 0 !important; }
.map-full .leaflet-top { top: env(safe-area-inset-top); }
.map-full .leaflet-bottom { bottom: env(safe-area-inset-bottom); }
.map-full .leaflet-bottom.leaflet-right { bottom: calc(env(safe-area-inset-bottom) + var(--wp-lift, 0px)); } /* v2.5.1: above the card (weather.js) */
.map-full .map-legend { top: calc(10px + env(safe-area-inset-top)); }
.map-full .wx-panel { bottom: calc(26px + env(safe-area-inset-bottom)); }
/* Full screen: taller weather bubbles with the arrival time (sizes match BIG in wxmap.js) */
.wxm.big { width: 76px; height: 50px; flex-direction: column; justify-content: center; gap: 0; padding: 2px 4px; }
.wxm-time { font-size: 11.5px; font-weight: 750; line-height: 1.1; color: var(--asphalt-soft); white-space: nowrap; }
.wxm-row { display: flex; align-items: center; gap: 2px; }
.wxm.big .wxm-ic svg { width: 24px; height: 24px; }
.wxm.sel .wxm-time { color: #dfe7ec; }


/* R2 goal 3: after dark. A dusk band behind timeline rows reached between sunset and sunrise
   (sun.js), with sunset and sunrise lines; tinted map bubbles and an "After dark" key. */
:root { --dusk: #dfe6f2; --dusk-edge: #b9c6db; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wx-sun { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; font-size: .86rem; font-weight: 700; color: var(--asphalt-soft); }
.wx-sun-ic svg { width: 24px; height: 24px; display: block; }
.wx-list > li.night { background: var(--dusk); margin: 0 -8px; padding: 0 8px; }
.wx-list > .wx-row.night { padding-bottom: 8px; }
.wx-list > .wx-day.night { padding-top: 14px; padding-bottom: 6px; }
.wx-list > .wx-sun.night { padding-top: 8px; padding-bottom: 8px; color: var(--asphalt); }
.wx-list > li.night-first { border-radius: 20px 20px 0 0; padding-top: 8px; } /* v2.2.0: 12 px card corners + 8 px gap */
.wx-list > li.night-last { border-radius: 0 0 20px 20px; margin-bottom: 8px; }
.wx-list > li.night-first.night-last { border-radius: 20px; }
.wx-list > .wx-day.night-first { padding-top: 10px; }
.wx-list > li.night .wx-item:not(.selected) { border-color: var(--dusk-edge); }
.wx-legend .key + .key { margin-left: 10px; }
.wx-legend .key[hidden] { display: none; }
/* Goal 22: moon badge on after-dark bubbles and in the key (the tint alone was too subtle) */
:root { --night-badge: #3d4a8f; --dusk-bubble: #d3dcef; }
.wxm.night.st-ok:not(.sel), .wxm.night.st-loading:not(.sel) { background: var(--dusk-bubble); --wx-icon-bg: var(--dusk-bubble); }
.wxm-moon { position: absolute; top: -7px; left: -6px; width: 16px; height: 16px; display: grid; place-items: center; background: var(--night-badge); border: 1.5px solid #fff; border-radius: 50%; box-sizing: content-box; z-index: 1; }
.wxm-moon svg { width: 11px; height: 11px; display: block; }
.wxm-dot.night:not(.na) { background: var(--night-badge); border-color: var(--night-badge); }
/* R2 goals 2 and 4: wind, gusts and feels-like line; snow and ice tags */
.wx-extra { font-size: .84rem; color: var(--asphalt-soft); font-weight: 600; }
.wx-winter { display: inline-block; align-self: flex-start; margin-top: 4px; padding: 1px 9px; border-radius: 9px; font-size: .8rem; font-weight: 750; }
.wx-winter.w-snow { background: #e3f0fc; color: #0d4f8b; border: 1px solid #b6d6f3; }
.wx-winter.w-ice { background: #fdeceb; color: #9f1d14; border: 1px solid #f3c2bf; }
.wp-extra { font-size: .78rem; font-weight: 600; color: var(--asphalt-soft); }
.wp-extra .wx-winter { margin: 2px 4px 0 0; padding: 0 7px; font-size: .74rem; }
/* R2 goal 1: weather alert tags (same shape as the snow/ice tags) and the map badge */
.wx-winter.wx-alert.a-warn { background: #fdeceb; color: #9f1d14; border: 1px solid #f3c2bf; }
.wx-winter.wx-alert.a-watch { background: #fff0e3; color: #8a3a00; border: 1px solid #f6c9a1; }
.wx-winter.wx-alert.a-adv { background: #fff7d6; color: #6b4e00; border: 1px solid #ecd58a; }
.wx-winter.wx-alert.a-other { background: #eef2f6; color: var(--asphalt); border: 1px solid var(--line); }
/* Goal 14: "and N more" / "Show fewer" button, same shape as a tag */
.wx-winter.a-more { font-family: inherit; line-height: inherit; color: var(--sign-deep); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; position: relative; }
.wx-winter.a-more::after { content: ""; position: absolute; inset: -8px -4px; } /* bigger tap area */
/* v1.32.0 (goal 48): alert tags are buttons with a small "i"; a tap opens the full NWS text (.al-view) */
.wx-winter.a-tap { display: inline-flex; align-items: center; gap: 5px; font-family: inherit; line-height: inherit; text-align: left; cursor: pointer; position: relative; padding-right: 4px; }
.wx-winter.a-tap::after { content: ""; position: absolute; inset: -5px -3px; } /* bigger tap area */
.a-i { flex: none; display: inline-grid; place-items: center; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; color: var(--sign-deep); font: italic 800 10px/1 Georgia, "Times New Roman", serif; }
.wx-alerts-item { display: inline-flex; align-items: center; gap: 7px; padding: 2px 0; font: inherit; color: inherit; background: none; border: 0; text-align: left; cursor: pointer; position: relative; }
.wx-alerts-item::after { content: ""; position: absolute; inset: -4px -6px; }
.wx-alerts-name { text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.wxm.has-alert::before { content: "!"; position: absolute; top: -7px; right: -6px; width: 16px; height: 16px; display: grid; place-items: center; font-size: 11px; font-weight: 900; line-height: 1; color: #fff; background: var(--brake); border: 1.5px solid #fff; border-radius: 50%; }
.wxm-dot.has-alert { border-color: var(--brake); }
/* v2.4.0 (goal 52): rain or snow chance of 30% or more, bottom-right corner of the bubble (moon top left, alert top right).
   Fixed colours: the map keeps its light look in dark mode. */
.wxm-pop { position: absolute; bottom: -8px; right: -9px; z-index: 1; min-width: 15px; height: 16px; padding: 0 4px; box-sizing: border-box; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; line-height: 1; color: #fff; background: #1d63a6; border: 1.5px solid #fff; border-radius: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* R2 goal 6: shared trip links */
.share-note { margin: 0 0 14px; padding: 10px 12px; font-size: .9rem; font-weight: 600; color: var(--asphalt); background: #e8f2fb; border: 1.5px solid #b6d6f3; border-radius: var(--radius); }
.share-note.error { background: #fdeceb; border-color: #f3c2bf; color: #7a1a12; }
.share { width: 100%; }
.share-msg { margin: 8px 0 0; font-size: .88rem; font-weight: 600; color: var(--asphalt-soft); }
.share-link { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 8px 10px; font: inherit; font-size: .85rem; color: var(--asphalt); background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; }
/* Credits (R2 goal 9). Map: small corner credit that collapses to an (i) button (mapcredit.js). */
.rc-credit { display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 70px); margin: 0 !important; padding: 2px 4px 2px 2px; background: rgba(255,255,255,.85); border-radius: 4px 0 0 0; font-size: 11px; line-height: 1.35; color: #333; }
.rc-credit a { color: #0a6fc2; text-decoration: none; }
.rc-credit-btn { flex: none; width: 20px; height: 20px; padding: 0; border: 1px solid #b7c4d1; border-radius: 50%; background: #fff; color: var(--asphalt); font: italic 700 12px/18px Georgia, serif; cursor: pointer; }
.rc-credit.is-min { background: transparent; padding: 4px; }
.rc-credit.is-min .rc-credit-text { display: none; }
/* Address suggestions: "Powered by Geoapify" under the list of results */
.ac-credit { padding: 6px 12px 4px; font-size: .78rem; color: var(--asphalt-soft); text-align: right; }
.ac-credit a { color: inherit; }
/* Footer: links on the first line, copyright and version smaller and lighter below */
footer { text-align: center; }
footer .footline { margin: 0; }
footer .footline a { display: inline-block; padding: 4px 6px; }
footer .footsmall { margin: 2px 0 0; font-size: .72rem; opacity: .8; }
.tip-heart { display: inline-block; color: var(--amber); margin-right: .3em; }
/* Help page (help.html) */
.help h2 { font-family: "Outfit", system-ui, sans-serif; font-size: 1.45rem; margin: 18px 0 8px; }
.help h3 { font-family: "Outfit", system-ui, sans-serif; font-size: 1.15rem; margin: 0 0 6px; }
.help p { margin: 0 0 10px; }
.help-back { text-decoration: none; }
.help-lead { font-size: 1.05rem; }
.help-example { color: var(--asphalt-soft); font-size: .92rem; }
.help-steps { list-style: none; counter-reset: step; margin: 16px 0 0; padding: 0; }
/* v1.10.6: each step is a tap-to-open bar (details/summary); the number sits in the bar. */
.help-steps > li { counter-increment: step; margin: 0 0 10px; }
.help-steps details { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); }
.help-steps summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; cursor: pointer; list-style: none; }
.help-steps summary::-webkit-details-marker { display: none; }
.help-steps summary::before { content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--sign); color: #fff; font: 700 1rem/30px "Outfit", system-ui, sans-serif; text-align: center; }
.help-steps summary::after { content: ""; flex: none; margin-left: auto; width: 9px; height: 9px; border-right: 2.4px solid var(--asphalt-soft); border-bottom: 2.4px solid var(--asphalt-soft); transform: translateY(-3px) rotate(45deg); transition: transform .15s; }
.help-steps details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.help-steps summary h3 { margin: 0; }
.help-steps summary:focus-visible { outline: 2px solid var(--sign); outline-offset: 2px; border-radius: var(--radius); }
.help-body { padding: 2px 14px 14px; }
.help-body figure:last-child { margin-bottom: 0; }
.help-body figure + ul { margin-top: 14px; }
/* v1.10.7: Close button at the bottom of each step. */
.help-close-row { display: flex; justify-content: flex-end; margin: 14px 0 0; }
.help-close { padding: 0 14px 0 10px; }
.help-steps ul, .help-list { margin: 0 0 10px; padding-left: 20px; }
.help-steps li li, .help-list li { margin-bottom: 4px; }
.help figure { margin: 12px 0 0; }
.help figure img { display: block; width: 100%; max-width: 330px; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(15,42,68,.12); background: var(--paper); }
.help a { color: var(--sign-deep); }
.help-credits li { margin-bottom: 6px; }
.help-credits ul { margin: 4px 0 0; padding-left: 18px; } /* camera credits, one state a line (v1.40.0) */
.help-credits li li { margin-bottom: 2px; }
/* R2 goal 13: List view. One white panel, one line per point; day, sunset, and time zone lines
   become thin bands; the dusk band fills whole rows. Details (.wl-more) open under the selected
   row (v2.5.0: in every layout; see below). */
.wx-list.compact { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.wx-list.compact > li { margin: 0; border-bottom: 1px solid #e3eaf1; }
.wx-list.compact > li:last-child { border-bottom: 0; }
.wx-list.compact > li.night { margin: 0; padding: 0; border-radius: 0; background: var(--dusk); border-bottom-color: #c9d4e6; }
.wl-head, .wx-list.compact .wx-item { display: grid; grid-template-columns: 4.3rem minmax(0, 1fr) 26px 2.5rem 3.1rem; column-gap: 6px; align-items: center; }
.wl-head { padding: 6px 10px; background: var(--sky); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--asphalt-soft); }
.wl-head span:nth-child(n+4) { text-align: right; }
.wx-list.compact > li.wx-day { margin: 0; padding: 6px 10px; font-size: .74rem; background: #f7fafc; }
.wx-list.compact > li.wx-day.night { background: var(--dusk); }
.wx-list.compact > li.wx-sun { margin: 0; padding: 4px 10px; font-size: .8rem; gap: 7px; }
.wx-list.compact .wx-sun-ic svg { width: 18px; height: 18px; }
.wx-list.compact .wx-item { min-height: 44px; padding: 4px 10px; border: 0; border-radius: 0; background: transparent; box-shadow: inset 4px 0 0 var(--k, transparent); transition: none; }
.wx-list.compact .wx-item.kind-start { --k: var(--sign); }
.wx-list.compact .wx-item.kind-stop { --k: var(--amber); }
.wx-list.compact .wx-item.kind-end { --k: var(--asphalt); }
.wx-list.compact .wx-item.selected { background: #fff3ee; box-shadow: inset 4px 0 0 var(--k, transparent), inset 0 0 0 2px var(--asphalt); }
.wl-time { font-weight: 800; font-size: .92rem; white-space: nowrap; }
.wl-place { display: flex; align-items: center; gap: 5px; min-width: 0; }
.wl-name { min-width: 0; font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-alert { flex: none; width: 16px; height: 16px; display: grid; place-items: center; font-size: 11px; font-weight: 900; line-height: 1; color: #fff; background: var(--brake); border-radius: 50%; }
.wl-tag { flex: none; width: 18px; height: 18px; display: grid; place-items: center; box-sizing: border-box; border-radius: 50%; }
.wl-tag svg { width: 12px; height: 12px; display: block; }
.wl-tag.w-snow { background: #e3f0fc; color: #0d4f8b; border: 1px solid #b6d6f3; }
.wl-tag.w-ice { background: #fdeceb; color: #9f1d14; border: 1px solid #f3c2bf; }
.wx-list.compact .wx-icon svg { width: 26px; height: 26px; }
.wx-list.compact .wx-icon.na svg { width: 22px; height: 22px; }
.wx-list.compact .wx-temp { font-size: .98rem; text-align: right; }
.wl-pop { text-align: right; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.wl-more { display: none; grid-column: 2 / -1; flex-direction: column; gap: 2px; padding: 2px 0 8px; font-size: .86rem; }
.wl-kind { font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: var(--asphalt-soft); }
/* v2.5.0 (goal 52): one list view. The tapped row always opens its details in place (was: only with the map
   hidden on a phone), and the map card shows only on the full-screen map, where the list can't be seen. */
.wx-list.compact .wx-item.selected .wl-more { display: flex; }
html:not(.rc-mapfull) .wx-panel { display: none !important; }
@media (min-width: 900px), (min-width: 560px) and (max-height: 500px) and (orientation: landscape) {
  #weather > .wx-dock { display: flex; flex-direction: column; }
  .wx-tools { order: 1; padding: 4px 0 10px; }
  .wx-map-wrap { order: 2; }
}

/* v1.10.4: phones held sideways (short screens). The side-by-side layout above applies; here the
   map fits the screen height (the laptop minimum of 360px is taller than these screens), and
   the page keeps clear of the notch at the left or right edge (the page uses viewport-fit=cover). */
@media (min-width: 560px) and (max-height: 500px) and (orientation: landscape) {
  #weather { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: 14px; }
  #weather > .wx-dock { top: 6px; }
  .wx-bar { padding-top: 0; padding-bottom: 2px; }
  .wx-tools { padding: 2px 0 6px; }
  #wx-map { height: calc(100vh - 140px); height: calc(100svh - 140px); min-height: 150px; max-height: none; }
}
main, .sign { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }

/* Dev copy only (roadskies.com/dev): small red DEV tag after the name. Inline, so the header keeps its height. */
.sign h1 .dev-tag { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 6px; border-radius: 4px; background: #d63b2f; color: #fff; font-size: 12px; line-height: 1.2; font-weight: 700; letter-spacing: .06em; }
/* Goal 30: traffic cameras on the weather map (cameras.js). Button under the full-screen button,
   icons on the map, and the picture in a popup. Goal 44: no key item; the status shows in the Layers row. */
:root { --cam: #0f2a44; }
.cam-wrap { background: none; border: 0; }
.cam-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--cam); border: 2px solid var(--cam); box-shadow: 0 1px 3px rgba(0,0,0,.35); cursor: pointer; }
.cam-ic svg { width: 14px; height: 14px; display: block; }
.cam-popup .leaflet-popup-content { margin: 10px 12px; width: auto !important; min-width: 220px; max-width: min(280px, 70vw); }
.cam-pop { font-family: inherit; color: var(--asphalt); }
.cam-name { margin: 0 18px 6px 0; font-weight: 750; font-size: .92rem; line-height: 1.25; }
.cam-views { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.cam-view { font: inherit; font-size: .78rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--asphalt); cursor: pointer; }
.cam-view[aria-pressed="true"] { background: var(--sign); border-color: var(--sign); color: #fff; }
.cam-img-link { position: relative; display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; font: inherit; cursor: zoom-in; }
.cam-img-link[hidden] { display: none; }
/* Corner badge on the picture: tap for full screen (v1.13.3). */
.cam-big { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: rgba(15,42,68,.72); color: #fff; pointer-events: none; }
.cam-big svg { width: 16px; height: 16px; display: block; }
.cam-img-link.wait .cam-big { display: none; }
.cam-img { display: block; width: 100%; height: auto; border-radius: 6px; }
/* While the first picture loads, a grey space of about picture size keeps the box at its final
   size, so the map pans for the whole box when it opens (v1.13.2). */
.cam-img-link.wait { aspect-ratio: 16 / 9; background: #dfe7ec; border-radius: 6px; }
.cam-img-link.wait .cam-img { display: none; }
.cam-msg { margin: 6px 0 0; font-size: .82rem; color: var(--asphalt-soft); }
.cam-msg:empty { display: none; }
.cam-meta { margin: 6px 0 0 !important; font-size: .74rem; line-height: 1.35; color: var(--asphalt-soft); }
.cam-meta:empty { display: none; }
/* Maryland live video (v1.38.0). While it starts, the video sits invisible over the grey space
   (some phones won't start a video that is not displayed). */
.cam-img-link.wait .cam-vid { display: block; position: absolute; inset: 0; height: 100%; opacity: 0; }
.cam-vid { background: #0f2a44; }
.cam-src { color: var(--sign); font-weight: 700; }
.cam-v-stage .cam-vid { width: 100%; height: 100%; object-fit: contain; border-radius: 0; background: none; }
/* Full-screen camera picture (cameras.js, v1.13.3): over everything, also the full-screen map.
   The picture fills the space above the name and time; any tap but a view button closes it. */
html.rc-camview, html.rc-camview body { overflow: hidden; }
.cam-viewer { position: fixed; inset: 0; z-index: 4000; display: flex; flex-direction: column; gap: 10px; padding: max(56px, calc(env(safe-area-inset-top) + 52px)) max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: rgba(6,16,28,.94); color: #fff; cursor: zoom-out; }
.cam-viewer[hidden] { display: none; }
/* v1.32.0 (goal 48): an alert's full text. A sheet along the bottom on a phone, centred on a computer. */
html.rc-alertview, html.rc-alertview body { overflow: hidden; }
.al-view { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: flex-end; justify-content: center; background: rgba(3,8,14,.55); }
.al-sheet { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 560px; max-height: 85vh; max-height: 85dvh; box-sizing: border-box; padding: 18px 18px max(18px, calc(env(safe-area-inset-bottom) + 10px)); background: var(--paper); color: var(--asphalt); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.25); }
@media (min-width: 600px) { .al-view { align-items: center; padding: 24px; } .al-sheet { border: 1px solid var(--line); border-radius: 18px; padding-bottom: 18px; } }
.al-head { display: flex; align-items: flex-start; gap: 12px; }
.al-ic { flex: none; margin-top: 3px; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brake); color: #fff; font-weight: 800; font-size: .9rem; }
.al-ic.a-watch { background: #c2570c; }
.al-ic.a-adv { background: #a16207; }
.al-ic.a-other { background: #4a5d70; }
.al-titles { flex: 1; min-width: 0; }
.al-title { margin: 0; font-size: 1.25rem; font-weight: 750; line-height: 1.25; }
.al-sub { margin: 2px 0 0; font-size: .9rem; color: var(--asphalt-soft); }
.al-x { flex: none; width: 44px; height: 44px; margin: -8px -8px 0 0; display: grid; place-items: center; padding: 0; color: var(--asphalt); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.al-x svg { width: 20px; height: 20px; }
.al-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.al-body p { margin: 0 0 10px; }
.al-body p:last-child { margin-bottom: 0; }
.al-body h3 { margin: 14px 0 6px; font-size: 1rem; font-weight: 750; }
.al-src { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--asphalt-soft); }
.al-sheet button.primary { min-height: 48px; flex: none; }
.cam-v-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.cam-v-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cam-v-img[hidden] { display: none; }
.cam-v-info { flex: none; text-align: center; }
.cam-v-name { margin: 0 0 6px; font-weight: 750; font-size: 1rem; line-height: 1.25; }
.cam-v-views { justify-content: center; }
.cam-v-views[hidden] { display: none; }
.cam-viewer .cam-view { font-size: .85rem; padding: 6px 12px; cursor: pointer; }
.cam-v-msg, .cam-v-meta { margin: 4px 0 0; font-size: .85rem; color: #c9d6e2; }
.cam-v-msg:empty, .cam-v-meta:empty { display: none; }
.cam-v-close { position: absolute; top: max(8px, calc(env(safe-area-inset-top) + 4px)); right: max(8px, env(safe-area-inset-right)); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; }
.cam-v-close:hover { background: rgba(255,255,255,.28); }
.cam-v-close svg { width: 22px; height: 22px; display: block; }
/* With the camera key the legend can be long: it wraps instead of running under the map buttons. */
.wx-legend { max-width: calc(100% - 80px); border-radius: 14px; }
.wx-legend .key { display: inline-block; }

/* ---- Map buttons (goal 33, assets/js/mapctl.js): one rounded group top right, Layers panel ---- */
.rc-ctl { display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(15,42,68,.22); }
.rc-ctl-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0; color: var(--asphalt); background: #fff; border: 0; border-radius: 0; cursor: pointer; }
.rc-ctl-btn + .rc-ctl-btn { border-top: 1px solid #e3eaf1; }
.rc-ctl-btn svg { width: 21px; height: 21px; }
.rc-ctl-btn:hover { background: var(--sky); }
.rc-ctl-btn:focus-visible { outline: 2.5px solid var(--sign); outline-offset: -3px; }
.rc-layers-btn.is-on, .rc-layers-btn[aria-expanded="true"] { color: var(--sign); }
.rc-layers-btn[aria-expanded="true"] { background: #eaf3fc; }
.rc-dot { display: none; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; background: var(--sign); border: 2px solid #fff; border-radius: 50%; }
.rc-layers-btn.is-on .rc-dot { display: block; }
.rc-layers { position: absolute; z-index: 1100; top: 10px; right: 64px; width: 300px; max-width: calc(100% - 84px); max-height: calc(100% - 20px); overflow: auto; box-sizing: border-box; padding: 6px 14px 10px; background: #fff; border-radius: 14px; box-shadow: 0 6px 24px rgba(15,42,68,.25); color: var(--asphalt); cursor: auto; }
.rc-layers.is-sheet { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; padding-bottom: calc(12px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; box-shadow: 0 -4px 20px rgba(15,42,68,.25); }
.rc-layers[hidden] { display: none; }
.rc-layers-head { display: flex; align-items: center; justify-content: space-between; }
.rc-layers-title { margin: 0; font-size: 1.05rem; font-weight: 800; }
.rc-layers-x { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; color: var(--asphalt); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.rc-layers-x svg { width: 18px; height: 18px; }
.rc-layer { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.rc-layer + .rc-layer { border-top: 1px solid #e3eaf1; }
.rc-layer-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; color: var(--asphalt); background: #eaf3fc; border-radius: 10px; }
.rc-layer-ic svg { width: 22px; height: 22px; }
.rc-layer-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rc-layer-name { font-weight: 700; font-size: .98rem; }
.rc-layer-desc { font-size: .8rem; color: var(--asphalt-soft); }
.rc-switch { position: relative; flex: none; width: 52px; height: 32px; padding: 0; background: #b7c4d1; border: 0; border-radius: 999px; cursor: pointer; transition: background .15s; }
.rc-switch[aria-checked="true"] { background: var(--sign); }
.rc-knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(15,42,68,.35); transition: left .15s; }
.rc-switch[aria-checked="true"] .rc-knob { left: 23px; }
.rc-switch:focus-visible { outline: 2.5px solid var(--sign); outline-offset: 2px; }
/* Zoom (computers with a mouse only): one joined block bottom right, above the map credit */
.leaflet-bar.leaflet-control-zoom { overflow: hidden; border: 0; border-radius: 12px; box-shadow: 0 2px 10px rgba(15,42,68,.22); }
.leaflet-bar.leaflet-control-zoom a { width: 44px; height: 40px; line-height: 40px; font: 600 22px/40px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--asphalt); border-radius: 0 !important; }
.leaflet-bar.leaflet-control-zoom a:hover { background: var(--sky); }
.leaflet-bar.leaflet-control-zoom a + a { border-top: 1px solid #e3eaf1; border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .rc-switch, .rc-knob { transition: none; } }
/* Scroll wheel hint (goal 35): plain scroll over a map in the page shows how to zoom it */
.rc-wheel-hint { position: absolute; inset: 0; z-index: 1050; display: grid; place-items: center; padding: 16px; background: rgba(15,42,68,.5); color: #fff; font-size: 1.1rem; font-weight: 700; text-align: center; pointer-events: none; opacity: 0; transition: opacity .25s; }
.rc-wheel-hint.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .rc-wheel-hint { transition: none; } }
/* Weather radar (goal 28, assets/js/radar.js): key item, greyed-out Layers row, colour key in the panel */
/* The radar layer is see-through as a whole (radar.js puts its tiles in this pane). */
.leaflet-rc-radar-pane { opacity: .6; }
.map-legend .swatch.radar { background: linear-gradient(90deg, #8aa0d6, #38c650, #f2dc3a, #d9302a); }
.wx-legend .key.old { color: #8a3f00; }
.wx-legend .key.old .swatch.radar { opacity: .6; }
.rc-layer.is-disabled .rc-layer-ic { color: #7a8896; background: #f1f4f7; }
.rc-layer.is-disabled .rc-layer-name { color: var(--asphalt-soft); }
.rc-switch:disabled { background: #e3e9ef; cursor: default; }
.rc-switch:disabled .rc-knob { box-shadow: 0 1px 3px rgba(15,42,68,.2); }
.rc-radar-more { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: .75rem; color: var(--asphalt-soft); }
.rc-radar-more[hidden], .rc-layer-desc[hidden] { display: none; }
.rc-radar-bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #8aa0d6, #4ec9d6, #38c650, #1d8f2c, #f2dc3a, #f39c2b, #d9302a, #c43fd0); }
.rc-radar-scale { display: flex; justify-content: space-between; }
.rc-radar-time { font-size: .8rem; }
.rc-radar-time.old { color: #8a3f00; font-weight: 600; }
/* Goal 44: a layer's status line in its Layers row (cameras.js), instead of the map key. */
.rc-layer-status { display: block; margin-top: 3px; font-size: .8rem; color: var(--asphalt-soft); }
.rc-layer-status[hidden] { display: none; }
.rc-layer-status.warn { color: #8a3f00; font-weight: 600; }

/* v1.18.0 (goal 36): weather alerts as one line that opens the list */
.wx-alerts { margin: -6px -10px; }
.wx-alerts + p { margin-top: 10px; }
.wx-alerts-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 10px; font: inherit; color: var(--asphalt); background: none; border: 0; border-radius: 8px; text-align: left; cursor: pointer; }
.wx-alerts-ic { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brake); color: #fff; font-weight: 800; font-size: .85rem; }
.wx-alerts-n { flex: 1; font-weight: 650; }
.wx-alerts-act { font-weight: 700; font-size: .92rem; color: var(--sign-deep); }
.wx-alerts ul { margin: 0; padding: 0 10px 8px 52px; font-size: .95rem; line-height: 1.5; }
.wx-alerts ul[hidden] { display: none; }

/* Rest areas (goal 37, assets/js/rest.js): map icons, popup, the route card chip, the stop's
   "Remove" line in the list, "Remove stop" in the map panel, and the Undo message.
   v1.36.0: no switch bar above the list and no rest-area lines in it (owner); Layers only. */
:root { --rest: #1d7a4e; --rest-soft: #e6f4ec; }
.wx-rest-tag { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 5px; border-radius: 5px; background: var(--rest); color: #fff; vertical-align: -3px; }
.wl-place .wx-rest-tag { margin-right: 0; }
.wx-rest-tag svg { width: 13px; height: 13px; display: block; }
.rest-wrap { background: none; border: 0; }
.rest-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--rest); color: #fff; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); box-sizing: border-box; cursor: pointer; }
.rest-ic svg { width: 16px; height: 16px; display: block; }
.rest-popup .leaflet-popup-content { margin: 10px 12px; width: auto !important; min-width: 190px; max-width: min(250px, 70vw); }
.rest-pop { font-family: inherit; color: var(--asphalt); line-height: 1.35; }
.rest-pop p { margin: 0 0 4px; }
.rest-name { margin-right: 18px !important; font-weight: 750; font-size: .95rem; }
.rest-sub { font-size: .8rem; color: var(--asphalt-soft); }
.rest-when { font-size: .88rem; }
.rest-add { display: block; width: 100%; min-height: 40px; margin-top: 8px; padding: 0 12px; font: inherit; font-weight: 700; font-size: .92rem; color: #fff; background: var(--sign); border: 0; border-radius: 999px; cursor: pointer; }
.rest-add:disabled { color: var(--asphalt-soft); background: #e3e9ef; cursor: default; }
.wl-restbar { display: block; padding: 2px 8px 7px calc(10px + 4.3rem + 6px); font-size: .78rem; color: var(--asphalt-soft); background: var(--rest-soft); box-shadow: inset 4px 0 0 var(--rest); }
.wl-restbar[hidden] { display: none; }
.wl-restbar-text { min-width: 0; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* v1.37.0 (owner choice B and D): "Stop − 15 min +" with Remove, in the list line and the map card. */
.wl-restbar-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rc-stay { display: flex; align-items: center; gap: 6px; font-size: .82rem; }
.rc-stay-name { margin-right: 2px; font-weight: 650; color: var(--asphalt); }
.rc-stay-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; font: inherit; font-size: 1.25rem; font-weight: 700; line-height: 1; color: var(--sign-deep); background: var(--paper); border: 1.5px solid var(--sign); border-radius: 50%; cursor: pointer; }
.rc-stay-btn:disabled { color: #8a99a8; border-color: var(--line); cursor: default; }
.rc-stay-btn:focus-visible { outline: 2.5px solid var(--sign); outline-offset: 1px; }
.rc-stay-val { min-width: 3.3rem; text-align: center; font-size: .95rem; font-weight: 800; color: var(--asphalt); white-space: nowrap; }
.wp-stay { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 0 48px; padding-top: 6px; border-top: 1px solid #e3eaf1; }
.wp-stay .rc-stay-btn { width: 36px; height: 36px; }
.wp-stay .wp-remove { margin: 0; min-height: 36px; }
.wl-remove { flex: none; min-height: 28px; padding: 0 10px; font: inherit; font-size: .78rem; font-weight: 750; color: var(--asphalt); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; }
.wl-remove:hover { border-color: var(--asphalt-soft); }
.wl-remove:focus-visible { outline: 2.5px solid var(--sign); outline-offset: 1px; }
/* v1.36.1 (owner): a rest area added as a stop keeps the rest-area green in the list and Details:
   a light green row, a green edge instead of the stop's orange, and a green time and name. The
   weather (icon, temperature, precipitation) keeps its own colours. After dark, a green-tinted
   dusk shade keeps it inside the night band. The map card is not changed. */
.wx-item.is-rest { border-left-color: var(--rest); background: var(--rest-soft); --wx-icon-bg: var(--rest-soft); }
.wx-list.compact .wx-item.is-rest { --k: var(--rest); background: var(--rest-soft); }
.wx-list > li.night .wx-item.is-rest, .wx-list > li.night .wl-restbar { background: #d6e3e4; --wx-icon-bg: #d6e3e4; }
.wx-list.compact .wx-item.is-rest.selected { background: #d3ecdd; --wx-icon-bg: #d3ecdd; }
.wx-item.is-rest .wx-clock, .wx-item.is-rest .wx-place, .wx-item.is-rest .wl-time, .wx-item.is-rest .wl-name { color: var(--rest); }
.chip.rest { background: var(--rest-soft); color: #1b6a44; }
.wp-remove { min-height: 30px; margin-top: 2px; padding: 0; font-size: .82rem; }
.rc-toast { position: fixed; z-index: 3500; left: 50%; bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px)); transform: translateX(-50%); width: min(520px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: #fff; background: var(--asphalt); border-radius: 12px; box-shadow: 0 6px 20px rgba(15,42,68,.35); font-size: .9rem; line-height: 1.35; }
.rc-toast[hidden] { display: none; }
.rc-toast-btn { flex: none; min-height: 40px; padding: 0 6px; font: inherit; font-weight: 750; color: #9fd6ff; background: none; border: 0; text-decoration: underline; cursor: pointer; }

/* ---- Goal 38 (v1.28.0): use my location -------------------------------------------------------
   Form: a target button inside the Leaving From box (filled blue once used), the town under it.
   Weather map: a round button bottom right (blue once the times run from the driver's spot), a
   blue dot for the driver, the "points already passed" row, the "You are here" tag, and the
   notice shown when the driver is off the planned route. */
.ac-wrap.has-locate input { padding-right: 52px; }
.locate-btn { position: absolute; z-index: 2; top: 3px; right: 3px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--sign); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.locate-btn svg { width: 22px; height: 22px; }
.locate-btn.is-on svg { width: 36px; height: 36px; padding: 7px; box-sizing: border-box; color: #fff; background: var(--sign); border-radius: 50%; }
.locate-btn.is-busy svg, .rc-locate.is-busy svg { animation: rcpulse 1s ease-in-out infinite; }
@keyframes rcpulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .locate-btn.is-busy svg, .rc-locate.is-busy svg { animation-duration: 3s; } }
.field-sub { margin: 6px 0 0; font-size: .92rem; color: var(--asphalt-soft); }

.rc-locate { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--sign); background: #fff; border: 0; border-radius: 12px; box-shadow: 0 2px 10px rgba(15,42,68,.22); cursor: pointer; }
.rc-locate:hover { background: var(--sky); }
.leaflet-control-zoom .rc-locate { float: none; clear: none; margin: 0; border-radius: 0; box-shadow: none; } /* v1.28.3: top of the zoom column on computers; v1.28.4: no float, or it covers + and hides - */
.leaflet-control-zoom .rc-locate:not([hidden]) + a { border-top: 1px solid #e3eaf1; }
.rc-locate svg { width: 24px; height: 24px; }
.rc-locate.is-on, .rc-locate.is-on:hover { color: #fff; background: var(--sign); }
.rc-locate:focus-visible { outline: 2.5px solid var(--sign); outline-offset: -3px; }
.rc-locate.is-on:focus-visible { outline-color: #fff; }
.rc-here-dot span { display: block; width: 22px; height: 22px; box-sizing: border-box; background: var(--sign); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 8px rgba(10,111,194,.22), 0 1px 4px rgba(0,0,0,.35); }

.wx-list.compact .wx-item.kind-here { --k: var(--sign); }
.wx-list.compact .wx-item.kind-here .wl-place { flex-wrap: wrap; row-gap: 0; }
.wl-here { flex: 0 0 100%; font-size: .74rem; font-weight: 750; line-height: 1.2; color: var(--sign); white-space: nowrap; }
.wx-passed-btn, .wx-locate-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; text-align: left; font: inherit; font-size: .9rem; font-weight: 700; color: var(--sign); background: var(--sky); border: 0; cursor: pointer; }
.wx-list:not(.compact) .wx-passed-btn, .wx-list:not(.compact) .wx-locate-btn { margin-bottom: 8px; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); }
.wx-locate-btn { background: var(--paper); }
.wx-locate-btn svg { flex: none; width: 18px; height: 18px; }
.wx-past-item { display: flex; gap: 10px; align-items: center; min-height: 40px; padding: 4px 10px; color: #6b7b8b; }
.wx-list:not(.compact) .wx-past-item { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); }
.wx-past-item.wl { display: grid; grid-template-columns: 4.3rem minmax(0, 1fr); column-gap: 6px; }
.wx-past-item .wl-time { font-weight: 700; }
.wx-past-item .wl-place { display: block; font-size: .92rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.route-status.offroute { display: flex; flex-direction: column; gap: 10px; background: #fff3ee; border-color: #f4b8a2; }
.route-status.offroute p { font-size: 1.02rem; font-weight: 750; }
.route-status .route-status-sub { font-size: .92rem; font-weight: 500; color: var(--asphalt-soft); }
.route-status.offroute .route-status-sub { font-size: .92rem; font-weight: 500; }
.route-status .primary-btn { min-height: 50px; padding: 0 18px; font: inherit; font-weight: 750; color: #fff; background: var(--sign); border: 0; border-radius: 999px; cursor: pointer; }
.route-status .primary-btn:active { background: var(--sign-deep); }
.route-status.offroute .secondary-btn { width: 100%; }

/* ---- Goal 42 (v1.31.0): dark mode ---------------------------------------------------------------
   assets/js/theme.js sets <html data-theme="light|dark"> before the page draws: Auto follows the
   device, or the visitor picks Light or Dark in the header menu (kept in this browser only).
   Light mode is unchanged. Dark mode swaps the colour tokens, then fixes the few rules that use a
   fixed light colour. The map and everything drawn on it (bubbles, labels, buttons, panel, key,
   popups) keep their light look; only the map picture underneath is dimmed. */

/* Appearance button at the right of the header, and its menu (both themes). It sits beside the
   "RoadSkies" name, above the tagline's line, so the tagline keeps the full width and the header
   keeps its height. An invisible margin makes the tap area 44 px. */
.sign-row { position: relative; }
.theme-pick { position: absolute; top: -3px; right: 0; }
.theme-btn { position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--asphalt-soft); background: var(--paper); border: 1.5px solid var(--line); border-radius: 50%; cursor: pointer; }
.theme-btn::before { content: ""; position: absolute; inset: -6px; }
.theme-btn svg { width: 18px; height: 18px; display: none; }
.theme-btn[data-choice="auto"] .ic-auto, .theme-btn[data-choice="light"] .ic-light, .theme-btn[data-choice="dark"] .ic-dark { display: block; }
.theme-btn[aria-expanded="true"] { color: var(--asphalt); border-color: var(--asphalt-soft); }
.theme-menu { position: absolute; z-index: 2500; top: calc(100% + 6px); right: 0; width: 196px; padding: 6px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(15,42,68,.22); }
.theme-menu[hidden] { display: none; }
.theme-menu-h { margin: 2px 8px 4px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--asphalt-soft); }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; font: inherit; font-size: .95rem; font-weight: 600; text-align: left; color: var(--asphalt); background: none; border: 0; border-radius: 9px; cursor: pointer; }
.theme-menu button svg { flex: none; width: 18px; height: 18px; color: var(--asphalt-soft); }
.theme-menu button span { display: flex; flex-direction: column; line-height: 1.2; }
.theme-menu button small { font-size: .76rem; font-weight: 500; color: var(--asphalt-soft); }
.theme-menu button:hover { background: var(--sky); }
.theme-menu button[aria-checked="true"] { font-weight: 750; background: #e3f0fb; }
.theme-menu button[aria-checked="true"] svg { color: var(--sign); }
.theme-menu button:focus-visible { outline: 2.5px solid var(--sign); outline-offset: -2px; box-shadow: none; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --asphalt: #e6eef6;
  --asphalt-soft: #a3b4c4;
  --sky: #0b1622;
  --paper: #1a2b3c;
  --sign: #4fa3e8;
  --sign-deep: #8cc4f2;
  --amber: #ff8a62;
  --brake: #ff8a80;
  --line: #2d4257;
  --dusk: #1b2546;
  --dusk-edge: #34427a;
  --rest: #4cc38a;
  --rest-soft: #15302a;
  --t-cold: #8cc4f2;
  --t-warm: #ff9f70;
  --ink-on-sky: #06243f;   /* text on sky-blue buttons */
  --wx-icon-bg: var(--paper);
}
/* The map keeps the light colours for everything on top of it. */
:root[data-theme="dark"] .map-wrap, :root[data-theme="dark"] .wx-map-wrap, :root[data-theme="dark"] .leaflet-container {
  color-scheme: light;
  --asphalt: #0f2a44; --asphalt-soft: #4a5d70; --sky: #f1f6fb; --paper: #ffffff; --sign: #0a6fc2; --sign-deep: #08589b;
  --amber: #f26a3d; --brake: #b3261e; --line: #cfdbe7; --dusk: #dfe6f2; --dusk-edge: #b9c6db; --rest: #1d7a4e; --rest-soft: #e6f4ec;
  --t-cold: #1d63a6; --t-warm: #c2410c; --wx-icon-bg: #fff;
  color: var(--asphalt);
}
/* Dim the map picture only (not the route line, bubbles, radar, or buttons). */
:root[data-theme="dark"] .leaflet-tile-pane { filter: brightness(.72) contrast(1.05) saturate(.9); }
:root[data-theme="dark"] #map, :root[data-theme="dark"] #wx-map, :root[data-theme="dark"] .map-full { background: #4b5660; }
@media (min-width: 560px) { :root[data-theme="dark"] #map, :root[data-theme="dark"] #wx-map { border-color: #2d4257; } }

/* Header */
:root[data-theme="dark"] .sign { background: #13212f; border-bottom-color: #2d4257; }
/* Logo in dark mode: lighter cloud and timeline; the sun stays yellow */
:root[data-theme="dark"] .sign .logo .logo-cloud { fill: #4fa3e8; }
:root[data-theme="dark"] .sign .logo .logo-line { fill: #ff8a62; }
:root[data-theme="dark"] .theme-menu { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
:root[data-theme="dark"] .theme-menu button[aria-checked="true"] { background: #17324a; }
:root[data-theme="dark"] .theme-menu button:hover { background: #243a50; }

/* Form */
:root[data-theme="dark"] .seg { background: #0b1622; }
:root[data-theme="dark"] .seg::before { background: #2d4a66; box-shadow: none; }
:root[data-theme="dark"] .ac-list { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
:root[data-theme="dark"] .ac-item.active, :root[data-theme="dark"] .ac-item:hover { background: #243a50; }
:root[data-theme="dark"] .avoid-chip input:checked + span { background: #17324a; }
:root[data-theme="dark"] input:focus-visible, :root[data-theme="dark"] select:focus-visible, :root[data-theme="dark"] button:focus-visible,
:root[data-theme="dark"] summary:focus-visible, :root[data-theme="dark"] .seg input:focus-visible + span { box-shadow: 0 0 0 6px rgba(255,138,98,.4); }
:root[data-theme="dark"] .share-note { background: #17324a; border-color: #24547f; }
:root[data-theme="dark"] .share-note.error { background: #3a1c1f; border-color: #6e3035; color: #f6b0aa; }

/* Sky-blue buttons: dark text, since white is hard to read on the lighter blue */
:root[data-theme="dark"] button.primary, :root[data-theme="dark"] .route-status .primary-btn { color: var(--ink-on-sky); box-shadow: 0 6px 16px rgba(0,0,0,.35); }
:root[data-theme="dark"] button.primary:active, :root[data-theme="dark"] .route-status .primary-btn:active { background: #3b8fd6; }
:root[data-theme="dark"] .chip.fast, :root[data-theme="dark"] .view-switch button[aria-pressed="true"],
:root[data-theme="dark"] .help-steps summary::before { color: var(--ink-on-sky); }
:root[data-theme="dark"] .locate-btn.is-on svg { color: var(--ink-on-sky); }
:root[data-theme="dark"] .secondary-btn[aria-expanded="true"] { color: var(--ink-on-sky); }

/* Route choice */
:root[data-theme="dark"] .route-card.selected { box-shadow: 0 4px 16px rgba(0,0,0,.35); }
:root[data-theme="dark"] .route-card.skeleton { background: linear-gradient(90deg, #1a2b3c 0%, #243a50 50%, #1a2b3c 100%); background-size: 200% 100%; }
:root[data-theme="dark"] .route-notes { background: #33231c; }
:root[data-theme="dark"] .chip { background: #243649; }
:root[data-theme="dark"] .chip.fast { background: var(--sign); }
:root[data-theme="dark"] .chip.tolls, :root[data-theme="dark"] .toll.detected { background: #3b2a12; color: #ffcf86; }
:root[data-theme="dark"] .chip.late { background: #3a1c1f; color: #f6b0aa; }
:root[data-theme="dark"] .chip.rest { color: #8fe0b6; }
:root[data-theme="dark"] .route-status.offroute { background: #33231c; border-color: #7a4a38; }

/* Weather screen */
:root[data-theme="dark"] .wx-dock { box-shadow: 0 6px 10px -8px rgba(0,0,0,.7); }
:root[data-theme="dark"] .wx-item.selected { box-shadow: 0 0 0 3px rgba(255,138,98,.5), 0 2px 10px rgba(0,0,0,.3); }
:root[data-theme="dark"] .wx-item.st-beyond_horizon, :root[data-theme="dark"] .wx-item.st-unavailable,
:root[data-theme="dark"] .wx-item.st-outside_coverage, :root[data-theme="dark"] .wx-item.st-busy { background: #142230; --wx-icon-bg: #142230; }
:root[data-theme="dark"] .wx-list.compact > li { border-bottom-color: #24384c; }
:root[data-theme="dark"] .wx-list.compact > li.night { border-bottom-color: var(--dusk-edge); --wx-icon-bg: var(--dusk); }
:root[data-theme="dark"] .wx-list.compact > li.wx-day { background: #15283a; }
:root[data-theme="dark"] .wx-list.compact > li.wx-day.night { background: var(--dusk); }
:root[data-theme="dark"] .wx-list.compact .wx-item.selected { background: #33261f; --wx-icon-bg: #33261f; }
:root[data-theme="dark"] .wx-list > li.night .wx-item.is-rest, :root[data-theme="dark"] .wx-list > li.night .wl-restbar { background: #183236; --wx-icon-bg: #183236; }
:root[data-theme="dark"] .wx-list.compact .wx-item.is-rest.selected { background: #1d4034; --wx-icon-bg: #1d4034; }
:root[data-theme="dark"] .wx-winter.w-snow, :root[data-theme="dark"] .wl-tag.w-snow { background: #12324f; color: #a9d3f7; border-color: #24547f; }
:root[data-theme="dark"] .wx-winter.w-ice, :root[data-theme="dark"] .wl-tag.w-ice,
:root[data-theme="dark"] .wx-winter.wx-alert.a-warn { background: #3a1c1f; color: #f6b0aa; border-color: #6e3035; }
:root[data-theme="dark"] .wx-winter.wx-alert.a-watch { background: #3a2414; color: #ffbe8a; border-color: #6d4220; }
:root[data-theme="dark"] .wx-winter.wx-alert.a-adv { background: #3b2a12; color: #ffcf86; border-color: #6d4d1c; }
:root[data-theme="dark"] .wx-winter.wx-alert.a-other { background: #243649; }
/* v1.32.1: the map card (#wx-panel) keeps the light colours in dark mode, so its tags do too
   (the dark tag colours above made "Special Weather Statement" dark text on a dark tag there). */
:root[data-theme="dark"] .wx-map-wrap .wx-winter.w-snow { background: #e3f0fc; color: #0d4f8b; border-color: #b6d6f3; }
:root[data-theme="dark"] .wx-map-wrap .wx-winter.w-ice,
:root[data-theme="dark"] .wx-map-wrap .wx-winter.wx-alert.a-warn { background: #fdeceb; color: #9f1d14; border-color: #f3c2bf; }
:root[data-theme="dark"] .wx-map-wrap .wx-winter.wx-alert.a-watch { background: #fff0e3; color: #8a3a00; border-color: #f6c9a1; }
:root[data-theme="dark"] .wx-map-wrap .wx-winter.wx-alert.a-adv { background: #fff7d6; color: #6b4e00; border-color: #ecd58a; }
:root[data-theme="dark"] .wx-map-wrap .wx-winter.wx-alert.a-other { background: #eef2f6; color: var(--asphalt); border-color: var(--line); }
:root[data-theme="dark"] .wx-alerts-ic, :root[data-theme="dark"] .wl-alert, :root[data-theme="dark"] .al-ic.a-warn { background: #d63b2f; }
:root[data-theme="dark"] .wx-past-item { color: #8293a4; }
:root[data-theme="dark"] .rc-toast { color: #e6eef6; background: #243a50; box-shadow: 0 6px 20px rgba(0,0,0,.5); }

/* Help page */
:root[data-theme="dark"] .help figure img { box-shadow: 0 4px 14px rgba(0,0,0,.4); }

/* ---- Goal 51 (v2.2.0): polish from the make-interfaces-feel-better review ----------------------
   1. Bigger tap areas: an invisible box around small buttons (no look change), sized so it never
      overlaps a neighbour. The map card's back, next, and close grew instead (.wp-nav above). */
.map-toggle, .view-switch button, .rc-stay-btn, .wl-remove, .wp-remove, .cam-view, .rc-credit-btn { position: relative; }
.map-toggle::after, .view-switch button::after, .rc-stay-btn::after, .wl-remove::after, .wp-remove::after,
.cam-view::after, .rc-credit-btn::after { content: ""; position: absolute; }
.map-toggle::after { inset: -4px 0; }            /* 36 to 44 tall */
.view-switch button::after { inset: -6px 0; }    /* 32 to 44 tall */
.rc-stay-btn::after { inset: -2px; }             /* 40 to 44 */
.wp-stay .rc-stay-btn::after { inset: -4px; }    /* 36 to 44 */
.wl-remove::after { inset: -6px -2px; }          /* 28 to 40 (the row above is a button too) */
.wp-remove::after { inset: -6px 0; }             /* 30 to 42 */
.cam-views { gap: 8px 4px; }
.cam-view::after { inset: -4px -2px; }           /* about 24 to 32 (rows of views sit 8 px apart) */
.rc-credit-btn::after { inset: -8px -4px; }      /* 20 to 36 tall */
footer .footline a { padding: 8px 6px; }         /* was 4 px top and bottom */

/* 2. Buttons shrink slightly while pressed (Find routes keeps its press-down; cards and timeline
      rows, tapped often, stay still). Off for visitors who turn off motion. */
:is(.back-btn, .add-btn, .swap-btn, .secondary-btn, button.icon, .map-toggle, .view-switch button, .rc-stay-btn,
    .wl-remove, .wp-btn, .theme-btn, .rest-add, .cam-view, .route-status .primary-btn), .avoid-chip span {
  transition-property: scale, background-color, color; transition-duration: 150ms; transition-timing-function: ease-out;
}
:is(.back-btn, .add-btn, .swap-btn, .secondary-btn, button.icon, .map-toggle, .view-switch button, .rc-stay-btn,
    .wl-remove, .wp-btn, .theme-btn, .rest-add, .cam-view, .route-status .primary-btn):active:not(:disabled),
.avoid-chip:active span { scale: .96; }
@media (prefers-reduced-motion: reduce) {
  :is(.back-btn, .add-btn, .swap-btn, .secondary-btn, button.icon, .map-toggle, .view-switch button, .rc-stay-btn,
      .wl-remove, .wp-btn, .theme-btn, .rest-add, .cam-view, .route-status .primary-btn), .avoid-chip span { transition: none; }
  :is(.back-btn, .add-btn, .swap-btn, .secondary-btn, button.icon, .map-toggle, .view-switch button, .rc-stay-btn,
      .wl-remove, .wp-btn, .theme-btn, .rest-add, .cam-view, .route-status .primary-btn):active:not(:disabled),
  .avoid-chip:active span { scale: none; }
}

/* 3. Equal-width digits, so times, temperatures, and rain chances line up and don't wobble. */
:is(.wl-time, .wx-temp, .wl-pop, .wx-pop, .wx-clock, .wp-time, .wp-temp, .rc-stay-val, .rc-time, .rc-delta,
    .wxm-t, .wxm-time, .route-depart, .wx-times) { font-variant-numeric: tabular-nums; }

/* 4. No lone last word in paragraphs; even lines in headings. The longhand (not text-wrap) so it
      never undoes a nowrap set elsewhere. */
p, li, figcaption { text-wrap-style: pretty; }
h1, h2, h3 { text-wrap-style: balance; }

/* 6. A faint edge on camera pictures, so a pale sky doesn't melt into the white popup. Pure black
      at 10%: the popup is always light, also in dark mode. */
.cam-img { outline: 1px solid rgba(0,0,0,.1); outline-offset: -1px; }
