@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@500;600;700&family=Libre+Baskerville:ital@0;1&display=swap');
/* chart-theme -- the "Lake Superior Chart" look, as a separate sheet.
 *
 * Served by the weather-data plane at
 *     https://weather-data.legal2carry.workers.dev/chart.css
 * Loaded by the Duluth Area Weather pages AFTER their own <style> block (last
 * thing in <head>), so these rules win the cascade. theme.css stays the dark
 * default that RMW / Indy / Austin still use; porting a sibling site is one
 * <link> plus a pass over that page's own hard-coded colours.
 *
 * Fail-soft: if this sheet is unreachable a page simply renders in the old dark
 * theme, which its own CSS still fully supports.
 *
 * Chart paper: land is buff, water is blue, ink is chart navy, one magenta
 * accent for the thing to look at. Text >= 6:1 on the paper.
 */

:root {
      --wx-font: 'Barlow', 'Segoe UI', Arial, sans-serif;
      --chart-serif: 'Libre Baskerville', Georgia, serif;
      --chart-ink: #1d3d5c;
      --chart-ink-2: #0f2740;
      --chart-land: #f1e7c8;
      --chart-land-2: #f8f2dd;
      --chart-shoal: #cfe3ea;
      --chart-deep: #6fa3bd;
      --chart-mag: #a8285f;
      --wx-bg: #f1e7c8;
      --wx-bg-deep: #e6dbb8;
      --wx-panel: #f8f2dd;
      --wx-panel-hover: #fffaea;
      --wx-panel-solid: #f8f2dd;
      --wx-border: #1d3d5c;
      --wx-border-soft: #9fb3c2;
      --wx-shadow: none;
      --wx-radius: 3px;
      --wx-header-a: #1d3d5c;
      --wx-header-b: #1d3d5c;
      --wx-header-rule: #1d3d5c;
      --wx-text: #16324d;
      --wx-text-soft: #1d3d5c;
      --wx-text-dim: #35526b;
      --wx-text-max: #0f2740;
      --wx-link: #0b4f8a;
      --wx-accent: #0b4f8a;
      --wx-accent-2: #0b4f8a;
      --wx-accent-3: #a8285f;
      --wx-accent-deep: #0b4f8a;
      --wx-hot: #b23a00;
      --wx-hot-2: #b23a00;
      --wx-cold: #0b6a9c;
      --wx-cold-2: #1d4f7c;
      --wx-water: #0a6d86;
      --wx-water-2: #0d7a6f;
      --wx-sky: #1d5f8a;
      --wx-good: #2e6b32;
      --wx-caution: #8a5200;
      --wx-warn: #8a5200;
      --wx-danger: #a3231b;
      --wx-info: #00667d;
    }

html, body { background: var(--chart-land); color: var(--wx-text); }
header { background: var(--chart-ink); border-bottom: 3px solid var(--chart-ink-2); }
.hdr-title { font-family: var(--chart-serif); font-style: italic; font-weight: 400;
  letter-spacing: 0; text-transform: none; text-shadow: none; color: var(--chart-land); }
.hdr-sub { color: #d6e4ec; }
.back-link { color: var(--chart-land); border-color: rgba(241,231,200,0.6); border-radius: 3px; }
.back-link:hover { color: #fff; border-color: #fff; }
.sec-title { font-family: var(--chart-serif); font-style: italic; font-weight: 400; font-size: 1.1rem;
  letter-spacing: 0; text-transform: none; color: var(--chart-ink); }
.card-hdr { font-family: var(--chart-serif); font-style: italic; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--chart-ink); }
.card { background: var(--chart-land-2); border: 2px solid var(--chart-ink); border-radius: 3px; }
.muted { color: var(--wx-text-dim); }
a { color: var(--wx-link); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--chart-mag); outline-offset: 2px; }
.leaflet-container { background: var(--chart-shoal); }
footer, footer a { color: var(--wx-text-dim); }

/* ── Auto-darkened text: these rules named a light colour that only worked on the old dark ground ── */
#honesty-note { color: var(--wx-text-dim); }
#intro-note { color: #306953; }
#map-status { color: var(--wx-text-dim); }
#season-note { color: #865713; }
#state-map-cap { color: #6d492c; }
#state-map-cap a { color: #865113; }
.about a { color: var(--wx-text-dim); }
.action-banner { color: #863013; }
.alert-box b { color: #866713; }
.card a { color: #138657; }
.card-body { color: #37624e; }
.card-note { color: #395149; }
.err-txt { color: #7e1b1b; }
.error-card { color: #861313; }
.event-name { color: #138657; }
.event-venue { color: #395149; }
.event-when { color: #395149; }
.ext-date { color: var(--wx-text-dim); }
.ext-stale { color: #866013; }
.ext-stn { color: var(--wx-text-dim); }
.forecast-text { color: var(--wx-text-dim); }
.forecast-text strong { color: var(--wx-text-dim); }
.jump-nav a { color: var(--wx-text-dim); }
.link-item-sub { color: #395149; }
.link-item-title { color: #138657; }
.lt-btn { color: #864c13; }
.map-note { color: var(--wx-text-dim); }
.map-note a { color: #865113; }
.meta .updated { color: var(--wx-text-dim); }
.muted { color: #395149; }
.nerd-link-desc { color: var(--wx-text-dim); }
.nerd-link-title { color: #865113; }
.outlook-card-lbl { color: var(--wx-text-dim); }
.product-text { color: var(--wx-text-dim); }
.rec-meta { color: var(--wx-text-dim); }
.rec-val.none { color: var(--wx-text-dim); }
.resort-link-title { color: var(--wx-text-dim); }
.ship-eta { color: #866713; }
.ship-meta { color: #395149; }
.ship-name { color: #138657; }
.stat-lbl { color: #395149; }
.stat-val { color: #454545; }
.state-group h3 { color: var(--wx-text-dim); }
.sw-tab { color: var(--wx-text-dim); }
.verdict.good { color: #178249; }
.verdict.ok { color: #866713; }
.verdict.rough { color: #863813; }
.wxh-desc { color: var(--wx-text-dim); }
.wxh-src { color: var(--wx-text-dim); }
.wxh-src a { color: var(--wx-text-dim); }
/* ── Footer ──────────────────────────────────────────────── */ footer { color: var(--wx-text-dim); }
footer { color: var(--wx-text-dim); }
footer a { color: var(--wx-text-dim); }

header h1 { font-family: var(--chart-serif); font-style: italic; font-weight: 400; letter-spacing: 0;
  text-transform: none; text-shadow: none; color: var(--chart-land); }
.meta, .meta .updated { color: var(--wx-text-dim); }
.forecast-text, .forecast-text strong, .product-text { color: var(--wx-text); }
.action-banner { background: #f6d9d4; border-color: #a3231b; color: #6d130d; }
.error-card, #status.err { color: #8a1c14; }
.verdict.good { color: #1f6b3f; } .verdict.ok { color: #7a5a00; } .verdict.rough { color: #a04a00; }
.ship-name, .link-item-title, .event-name, .stat-val { color: var(--chart-ink-2); }
.card a { color: var(--wx-link); }

/* Panels that were translucent dark fills on the old ground */
.extremes-box, .outlook-card, .product-text { background: var(--chart-land-2); border: 2px solid var(--chart-ink); border-radius: 3px; }
.sum-ai { color: var(--wx-accent); border-color: var(--wx-accent); }

/* Phones: a little larger type everywhere (the old rem sizes ran 10-12px) */
@media (max-width: 700px) {
  html { font-size: 17.5px; }
  body { font-size: 16px; }
}

/* Link-ish labels: one link colour across pages instead of each page's old accent */
.map-note a, #state-map-cap a, .nerd-link-title, .resort-link-title, .card a, .wxh-src a, .jump-nav a { color: var(--wx-link); }

/* Map legends and Leaflet chrome: light chart-paper panels (was dark glass over a dark map) */
#main-legend, #air-legend, #fire-legend, #fall-legend, #ski-legend, #aq-legend {
  background: rgba(248,242,221,0.96); border: 2px solid var(--chart-ink); border-radius: 3px; box-shadow: none; }
/* !important on purpose: legends carry per-page accent colours at higher specificity that only worked on dark */
#main-legend, #main-legend *, #air-legend, #air-legend *, #fire-legend, #fire-legend *,
#fall-legend, #fall-legend *, #ski-legend, #ski-legend *, #aq-legend, #aq-legend * { color: var(--chart-ink-2) !important; }
.leaflet-control-zoom a { background: var(--chart-land-2); color: var(--chart-ink); border-color: var(--chart-ink); }
.leaflet-control-zoom a:hover { background: #fffaea; color: var(--chart-ink-2); }
.leaflet-control-layers { background: var(--chart-land-2); border: 2px solid var(--chart-ink); color: var(--chart-ink); border-radius: 3px; }
.leaflet-control-attribution { background: rgba(248,242,221,0.85); color: var(--wx-text-dim); }
.leaflet-control-attribution a { color: var(--wx-link); }

/* What's New page */
.release li, .release p { color: var(--wx-text); }
.release li strong, .release h2 { color: var(--chart-ink-2); }
.release-date { color: var(--wx-text-dim); }

/* Pages restyle Leaflet chrome with !important for the dark theme, so these need it too */
.leaflet-control-zoom a { background: var(--chart-land-2) !important; color: var(--chart-ink) !important; border-color: var(--chart-ink) !important; }
.leaflet-control-attribution { background: rgba(248,242,221,0.88) !important; color: var(--wx-text-dim) !important; }
.leaflet-control-attribution a { color: var(--wx-link) !important; }
#main-map-time { background: rgba(248,242,221,0.96); border: 2px solid var(--chart-ink); color: var(--chart-ink-2); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--chart-land-2); color: var(--chart-ink-2); }

/* Dashboard chrome tokens (read by dashboard.css) */
:root { --db-bar-bg: #1d3d5c; --db-bar-fg: #f1e7c8; --db-bar-dim: #b9cbd8; --db-band-bg: #f8f2dd; --db-band-fg: #0f2740;
  --db-band-border: #1d3d5c; --db-title-font: 'Libre Baskerville', Georgia, serif; --db-title-style: italic; --db-title-weight: 400;
  --db-title-case: none; --db-title-ls: 0; }

/* Phone floor: the Weather Nerds records box wraps instead of scrolling sideways, and small labels stay readable */
@media (max-width: 700px) {
  .rec-row { grid-template-columns: 4.4rem auto minmax(0, 1fr); }
  .rec-meta, .rec-lbl { min-width: 0; overflow-wrap: anywhere; }
  .moon-rs-lbl, .aurora-kp-lbl, .aurora-day-lbl, .sum-ai, .ext-col-hdr, .rec-col-hdr { font-size: 11px; }
}

/* Phone: column headers keep contrast (the "hdr" rule family was excluded from the auto pass); legends clear the attribution bar */
.ext-col-hdr, .rec-col-hdr { color: var(--wx-text-dim); }
@media (max-width: 700px) {
  #main-legend, #air-legend, #fire-legend, #fall-legend, #ski-legend, #aq-legend { bottom: 44px; }
}

/* About window (the page's own rules assumed a dark panel): paper panel, ink text, readable What's New badges */
.modal-overlay { background: rgba(20,20,20,0.55); }
.modal-box { background: var(--chart-land-2); border: 2px solid var(--chart-ink); border-radius: 0; color: var(--wx-text); box-shadow: none; }
.modal-box h2, .modal-box h3 { color: var(--chart-ink-2); }
.modal-box p, .modal-box li, .modal-box .wn-item > span:last-child, .modal-box .wn-text { color: var(--wx-text); }
.modal-box strong, .modal-box b { color: var(--chart-ink-2); }
.modal-box a { color: var(--wx-link); text-decoration: underline; }
.modal-close { color: var(--wx-text-dim); } .modal-close:hover { color: var(--chart-ink-2); background: none; }
.wn-item { border-bottom: 1px solid var(--wx-border-soft); }
.wn-badge { border-radius: 0; border: 1px solid transparent; }
.wn-badge.new { background: #d6ead3; color: #1f5a23; border-color: #2e6b32; }
.wn-badge.fix, .wn-badge:not(.new):not(.upd) { background: #d3e3f2; color: #0b3d6a; border-color: #0b4f8a; }
.wn-badge.upd { background: #f4e2bf; color: #6a3d00; border-color: #8a5200; }

/* Phone: records-box meta text always wraps; page never scrolls sideways by a few px */
@media (max-width: 700px) {
  .rec-meta { white-space: normal; }
  .rec-row { grid-template-columns: 4.4rem minmax(0, auto) minmax(0, 1fr); }
  main { overflow-x: clip; }
}

/* Radar maps: a mid-grey base (not the pale one) so faint echoes such as snow stay visible. Only the base tiles are dimmed; labels, bubbles and the radar layers are not. */
#radar-map .leaflet-tile[src*="World_Light_Gray_Base"], #main-map .leaflet-tile[src*="World_Light_Gray_Base"], .cmp-map .leaflet-tile[src*="World_Light_Gray_Base"],
#phase2 .leaflet-tile[src*="World_Light_Gray_Base"], #phase3 .leaflet-tile[src*="World_Light_Gray_Base"] { filter: brightness(0.68) contrast(1.12); }
#radar-map.leaflet-container, #main-map.leaflet-container, .cmp-map.leaflet-container { background: #8e9499; }

/* Station temperature graph (home Current Conditions): observed solid, forecast dashed */
.tg-head, .tg-cap { color: var(--wx-text-dim); }
.tg-grid { stroke: var(--wx-border-soft); opacity: 1; }
.tg-obs { stroke: var(--chart-ink-2); } .tg-fc { stroke: var(--chart-ink); }
.tg-now { stroke: var(--chart-mag); } .tg-dot { fill: var(--chart-mag); stroke: var(--chart-land-2); stroke-width: 2; }
.tg-txt { fill: var(--wx-text-dim); }
.tg-card { margin-top: 1rem; padding-top: 0.7rem; border-top: 1px solid var(--wx-border-soft); }
