/* ==========================================================================
   Avon News — Weather (/weather)
   Adapted from the mabeatty.com Tempest Weather Center; builds on site.css (tokens, cards, fonts)
   ========================================================================== */

:root {
  /* Status (fixed across themes; always paired with an icon + label) */
  --wx-good: #0ca30c;
  --wx-warning: #fab219;
  --wx-serious: #ec835a;
  --wx-critical: #d03b3b;
  --wx-extreme: #9085e9;

  --wx-s1: #2a78d6;
  --wx-s2: #eb6834;
  --wx-s3: #1baf7a;
  --wx-s4: #eda100;

  --wx-surface: var(--surface);
  --wx-grid: rgba(15, 23, 42, 0.07);
  --wx-axis: rgba(15, 23, 42, 0.2);
  --wx-band: rgba(15, 23, 42, 0.035);
  --wx-track: rgba(15, 23, 42, 0.08);
  --wx-tile-bg: var(--surface);
  --wx-chip-bg: rgba(15, 23, 42, 0.03);

  --wx-cloud: #f1f5f9;
  --wx-cloud-stroke: #94a3b8;
  --wx-cloud-back: #cbd5e1;
  --wx-cloud-dark: #94a3b8;
  --wx-moon: #cbd5e1;
  --wx-moon-stroke: #94a3b8;
  --wx-sun: #f59e0b;
  --wx-rain: #0284c7;
  --wx-snow: #7dd3fc;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Chart series (validated categorical slots, dark surface) */
    --wx-s1: #3987e5;
    --wx-s2: #d95926;
    --wx-s3: #199e70;
    --wx-s4: #c98500;


    --wx-surface: var(--surface);
    --wx-grid: rgba(255, 255, 255, 0.07);
    --wx-axis: rgba(255, 255, 255, 0.18);
    --wx-band: rgba(148, 163, 184, 0.06);
    --wx-track: rgba(148, 163, 184, 0.16);
    --wx-tile-bg: var(--surface);
    --wx-chip-bg: rgba(255, 255, 255, 0.035);

    /* Icon inks */
    --wx-cloud: #dbe3ee;
    --wx-cloud-stroke: transparent;
    --wx-cloud-back: #8a9ab0;
    --wx-cloud-dark: #7b8aa0;
    --wx-moon: #e5e9f0;
    --wx-moon-stroke: transparent;
    --wx-sun: #fbbf24;
    --wx-rain: #38bdf8;
    --wx-snow: #e0f2fe;
  }
}

/* The mabeatty.com design tokens this sheet was written against, mapped onto Avon News' (site.css) */
.wx-section {
  --text-primary: var(--ink);
  --text-secondary: var(--ink-soft);
  --text-muted: var(--muted);
  --text-accent: var(--link);
  --accent-blue: var(--p500);
  --accent-cyan: var(--p500);
  --bg-card: var(--surface);
  --bg-card-hover: var(--surface);
  --bg-secondary: var(--surface-2);
  --bg-glass: rgba(106, 67, 168, 0.045);
  --bg-glass-active: rgba(106, 67, 168, 0.12);
  --border-subtle: var(--line-soft);
  --border-card: var(--line);
  --border-glow: rgba(106, 67, 168, 0.45);
  --shadow-sm: var(--shadow-1);
  --shadow-md: var(--shadow-2);
  --shadow-lg: var(--shadow-3);
  --font-heading: var(--serif);
  --font-body: var(--sans);
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Section frame
   -------------------------------------------------------------------------- */
.wx-section {
  padding-bottom: 8px;
}

.wx-section [id] {
  scroll-margin-top: 16px;
}

.wx-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.wx-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.wx-meta {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.wx-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wx-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.wx-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.wx-live[data-state="live"] .wx-live-dot {
  background: var(--wx-good);
  box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.6);
  animation: wxPulse 2s infinite;
}

.wx-live[data-state="stale"] .wx-live-dot { background: var(--wx-warning); }
.wx-live[data-state="error"] .wx-live-dot { background: var(--wx-critical); }

@keyframes wxPulse {
  0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(12, 163, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0); }
}

.wx-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
}

.wx-seg button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: 600 0.85rem var(--font-body);
  padding: 5px 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.wx-seg button[aria-pressed="true"] {
  background: var(--accent-blue);
  color: #fff;
}

#wxRefresh.is-spinning svg {
  animation: wxSpin 0.9s linear infinite;
}

@keyframes wxSpin { to { transform: rotate(360deg); } }

/* Sticky in-page navigation */
.wx-subnav {
  position: sticky;
  top: 10px;
  z-index: 40;
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 0 20px;
  padding: 5px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.wx-subnav::-webkit-scrollbar { display: none; }

.wx-subnav a {
  flex: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.wx-subnav a:hover,
.wx-subnav a:focus-visible {
  background: var(--bg-glass-active);
  color: var(--text-primary);
}

.wx-notice {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(250, 178, 25, 0.35);
  background: rgba(250, 178, 25, 0.08);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.wx-muted, .wx-loading {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.wx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wx-u {
  font-size: 0.55em;
  font-weight: 500;
  color: inherit;
  opacity: 0.7;
  margin-left: 1px;
}

/* --------------------------------------------------------------------------
   Hero (current conditions over a sky that follows the weather)
   -------------------------------------------------------------------------- */
.wx-hero {
  --sky-a: #0b4fa8;
  --sky-b: #2f86d6;
  --sky-glow: rgba(251, 191, 36, 0.35);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
  padding: 32px;
  border-radius: 24px;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(circle at 12% 0%, var(--sky-glow), transparent 55%),
    linear-gradient(160deg, var(--sky-a) 0%, var(--sky-b) 100%);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.wx-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0) 40%, rgba(2, 6, 23, 0.35) 100%);
  pointer-events: none;
}

.wx-hero[data-sky="clear-night"]    { --sky-a: #050b1f; --sky-b: #1b2a57; --sky-glow: rgba(165, 180, 252, 0.22); }
.wx-hero[data-sky="partly-day"]     { --sky-a: #1d4f91; --sky-b: #4a7fb8; --sky-glow: rgba(251, 191, 36, 0.22); }
.wx-hero[data-sky="partly-night"]   { --sky-a: #0a1128; --sky-b: #283a5e; --sky-glow: rgba(165, 180, 252, 0.15); }
.wx-hero[data-sky="overcast"]       { --sky-a: #3b4a5e; --sky-b: #64748b; --sky-glow: rgba(255, 255, 255, 0.1); }
.wx-hero[data-sky="overcast-night"] { --sky-a: #111827; --sky-b: #2b3445; --sky-glow: rgba(255, 255, 255, 0.05); }
.wx-hero[data-sky="rain"]           { --sky-a: #1e293b; --sky-b: #3b5370; --sky-glow: rgba(106, 67, 168, 0.2); }
.wx-hero[data-sky="storm"]          { --sky-a: #120f24; --sky-b: #3a2f5b; --sky-glow: rgba(250, 204, 21, 0.18); }
.wx-hero[data-sky="snow"]           { --sky-a: #3c5a7a; --sky-b: #8aa6c1; --sky-glow: rgba(255, 255, 255, 0.25); }

.wx-hero .wx-loading { color: rgba(248, 250, 252, 0.8); }

.wx-hero-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.wx-hero-icon .wx-icon {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.25));
}

.wx-hero-temp {
  font-family: var(--font-heading);
  font-size: clamp(4.2rem, 9vw, 6.4rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.wx-hero-dec {
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.85;
}

.wx-hero-deg {
  font-size: 0.32em;
  font-weight: 500;
  vertical-align: top;
  margin-left: 6px;
  letter-spacing: 0;
  opacity: 0.85;
  position: relative;
  top: 0.35em;
}

.wx-hero-cond {
  margin-top: 6px;
  font-size: 1.25rem;
  font-weight: 600;
}

.wx-hero-feels,
.wx-hero-observed {
  margin-top: 14px;
  color: rgba(248, 250, 252, 0.88);
  font-size: 0.95rem;
}

.wx-hero-observed {
  margin-top: 4px;
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.72);
}

.wx-hero-stats {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.wx-hero-stats > div {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 0;
}

.wx-hero-stats dt {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.72);
}

.wx-hero-stats dd {
  margin-top: 2px;
  font-size: 1.3rem;
  font-weight: 600;
  white-space: nowrap;
}

.wx-hero-stats > div > span {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  color: rgba(248, 250, 252, 0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wx-hero-side {
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-self: stretch;
}

.wx-notes-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(248, 250, 252, 0.7);
}

.wx-synopsis {
  margin-top: 10px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #f8fafc;
}

.wx-notes {
  list-style: none;
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.wx-notes li {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(248, 250, 252, 0.88);
}

.wx-note-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.wx-notes [data-kind="rain"] .wx-note-dot { background: #38bdf8; }
.wx-notes [data-kind="dry"] .wx-note-dot { background: #a3a3a3; }
.wx-notes [data-kind="frost"] .wx-note-dot { background: #bae6fd; }
.wx-notes [data-kind="cold"] .wx-note-dot { background: #60a5fa; }
.wx-notes [data-kind="warm"] .wx-note-dot { background: #fb923c; }
.wx-notes [data-kind="wind"] .wx-note-dot { background: #5eead4; }
.wx-notes [data-kind="pressure"] .wx-note-dot { background: #c4b5fd; }
.wx-notes [data-kind="storm"] .wx-note-dot { background: #facc15; }
.wx-notes [data-kind="range"] .wx-note-dot { background: #f472b6; }

/* --------------------------------------------------------------------------
   Panels
   -------------------------------------------------------------------------- */
.wx-panel,
.wx-block {
  margin-top: 24px;
}

.wx-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  min-width: 0;
}

.wx-panel-head,
.wx-block-head {
  margin-bottom: 18px;
}

.wx-panel-head h2,
.wx-block-head h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wx-panel-sub {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.wx-panel-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wx-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
}

.wx-grid-2 > .wx-panel { margin-top: 24px; }

/* --------------------------------------------------------------------------
   Hourly strip
   -------------------------------------------------------------------------- */
.wx-hourly {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--wx-track) transparent;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
}

.wx-hourly:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 4px; border-radius: 12px; }

.wx-hour {
  flex: none;
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px;
  border-radius: 14px;
  scroll-snap-align: start;
  transition: background var(--transition-fast);
}

.wx-hour:hover { background: var(--bg-glass-active); }

.wx-hour.is-now {
  background: rgba(106, 67, 168, 0.1);
  box-shadow: inset 0 0 0 1px rgba(106, 67, 168, 0.35);
}

.wx-hour-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.wx-hour.is-now .wx-hour-time { color: var(--text-accent); }

.wx-hour-temp {
  font-size: 1.05rem;
  font-weight: 600;
  /* Nudges each temperature up or down so the row reads as a curve */
  transform: translateY(calc((50 - var(--lift, 50)) * 0.12px));
}

.wx-hour-pop,
.wx-day-pop {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wx-rain);
  font-variant-numeric: tabular-nums;
}

.wx-hour-pop.is-zero,
.wx-day-pop.is-zero {
  color: var(--text-muted);
  opacity: 0.55;
}

.wx-hour-wind {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.wx-arrow { color: var(--text-secondary); }

.wx-hour-day {
  flex: none;
  display: flex;
  align-items: stretch;
  padding: 0 4px;
}

.wx-hour-day span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--bg-glass-active);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Radar
   -------------------------------------------------------------------------- */
.wx-radar-panel { display: flex; flex-direction: column; }

.wx-radar {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wx-radar-map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  flex: 1;
  min-height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.wx-radar-map .leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #475569;
}

.wx-radar-map .leaflet-control-attribution a { color: #1e293b; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wx-radar-map .leaflet-control-attribution { background: rgba(15, 23, 42, 0.6); color: #cbd5e1; }
  :root:not([data-theme="light"]) .wx-radar-map .leaflet-control-attribution a { color: #e2e8f0; }
}

.wx-map-tip {
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font: 600 12px var(--font-body);
  box-shadow: var(--shadow-sm);
  padding: 4px 8px;
}

.wx-map-tip::before { display: none; }

.wx-radar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wx-radar-play {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--accent-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wx-radar-controls input[type="range"] {
  flex: 1;
  accent-color: var(--accent-blue);
  min-width: 0;
}

.wx-radar-time {
  flex: none;
  min-width: 112px;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.wx-radar-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* NEXRAD N0Q reflectivity ramp (approximate) */
.wx-dbz-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #04e9e7 0%, #019ff4 12%, #0300f4 22%, #02fd02 30%, #01c501 40%, #008e00 48%, #fdf802 56%, #e5bc00 64%, #fd9500 72%, #fd0000 80%, #d40000 86%, #bc0000 90%, #f800fd 95%, #9854c6 100%);
}

/* --------------------------------------------------------------------------
   10-day forecast
   -------------------------------------------------------------------------- */
.wx-daily {
  list-style: none;
  display: grid;
}

.wx-day {
  display: grid;
  grid-template-columns: 64px 38px 50px 40px minmax(60px, 1fr) 40px;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-top: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}

.wx-daily > li:first-child .wx-day { border-top: 0; }

.wx-day-name strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.wx-day-name small {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.wx-day-icon .wx-icon { width: 34px; height: 34px; }

.wx-day-lo {
  text-align: right;
  color: var(--text-muted);
  font-weight: 500;
}

.wx-day-hi { font-weight: 600; }

.wx-range {
  position: relative;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--wx-track);
}

.wx-range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--c1), var(--c2));
}

.wx-range-now {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 2px solid var(--wx-surface);
  transform: translate(-50%, -50%);
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */
.wx-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
}

.wx-tabs button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: 500 0.84rem var(--font-body);
  padding: 6px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.wx-tabs button:hover { color: var(--text-primary); }

.wx-tabs button[aria-selected="true"] {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Instrument tiles
   -------------------------------------------------------------------------- */
.wx-block-head { margin-top: 40px; }

.wx-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  grid-auto-flow: dense;
  gap: 16px;
}

.wx-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--wx-tile-bg);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  transition: border-color var(--transition-fast), transform var(--transition-normal);
}

.wx-tile:hover {
  border-color: var(--border-glow);
}

.wx-tile-wide { grid-column: span 2; }

.wx-tile-wind {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  column-gap: 28px;
  align-content: start;
}

.wx-tile-wind .wx-tile-title,
.wx-tile-wind .wx-foot { grid-column: 1 / -1; }
.wx-tile-wind .wx-rows { margin-top: 0; align-self: center; }
.wx-tile-wind .wx-compass { width: 140px; height: 140px; }

.wx-tile-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.wx-tile-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--text-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.wx-big {
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.wx-big-sm { font-size: 1.3rem; margin-top: 6px; }

.wx-sub {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.wx-trend-arrow {
  font-weight: 700;
  color: var(--text-primary);
}

.wx-foot {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.wx-rows {
  margin-top: 12px;
  display: grid;
}

.wx-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.86rem;
}

.wx-rows dt { color: var(--text-secondary); }

.wx-rows dd {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wx-rows dd small {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wx-na { color: var(--text-muted); }

.wx-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-glass-active);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.wx-badge > span { font-size: 0.7em; }
.wx-badge[data-status="good"] > span { color: var(--wx-good); }
.wx-badge[data-status="warning"] > span { color: var(--wx-warning); }
.wx-badge[data-status="serious"] > span { color: var(--wx-serious); }
.wx-badge[data-status="critical"] > span { color: var(--wx-critical); }
.wx-badge[data-status="extreme"] > span { color: var(--wx-extreme); }

.wx-meter,
.wx-uv-scale {
  position: relative;
  height: 8px;
  margin-top: 12px;
  border-radius: var(--radius-full);
  background: var(--wx-track);
  overflow: hidden;
}

.wx-meter span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--wx-s1);
}

.wx-uv-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  min-width: 8px;
}

.wx-uv-fill[data-status="good"] { background: var(--wx-good); }
.wx-uv-fill[data-status="warning"] { background: var(--wx-warning); }
.wx-uv-fill[data-status="serious"] { background: var(--wx-serious); }
.wx-uv-fill[data-status="critical"] { background: var(--wx-critical); }
.wx-uv-fill[data-status="extreme"] { background: var(--wx-extreme); }

.wx-spark {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 12px;
  overflow: visible;
}

/* Wind compass */
.wx-wind {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wx-compass {
  flex: none;
  width: 124px;
  height: 124px;
  overflow: visible;
}

.wx-cmp-ring { fill: none; stroke: var(--wx-track); stroke-width: 2; }
.wx-cmp-tick { stroke: var(--text-muted); stroke-width: 1; opacity: 0.5; }
.wx-cmp-major { stroke: var(--text-secondary); stroke-width: 2; }
.wx-cmp-label { fill: var(--text-secondary); font: 700 11px var(--font-body); text-anchor: middle; }
.wx-cmp-trail { fill: var(--wx-s1); opacity: 0.35; }
.wx-cmp-needle { fill: var(--wx-s2); stroke: var(--wx-surface); stroke-width: 2; stroke-linejoin: round; }

.wx-wind-readout { min-width: 0; }

/* Sun & moon */
.wx-sky {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
}

.wx-arc svg { width: 100%; height: auto; display: block; overflow: visible; }
.wx-arc-track { fill: none; stroke: var(--wx-track); stroke-width: 2; }
.wx-arc-done { fill: none; stroke: var(--wx-sun); stroke-width: 2.5; stroke-linecap: round; }
.wx-arc-horizon { stroke: var(--wx-axis); stroke-width: 1; }
.wx-arc-sun { fill: var(--wx-sun); stroke: var(--wx-surface); stroke-width: 2; filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.7)); }

.wx-arc-label {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.wx-sky-times {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-weight: 600;
  font-size: 1.05rem;
}

.wx-sky-times small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.wx-sky-times span:last-child { text-align: right; }

.wx-sky-moon {
  padding-left: 24px;
  border-left: 1px solid var(--border-subtle);
}

.wx-moon { width: 72px; height: 72px; display: block; }
.wx-moon-dark { fill: var(--wx-track); }
.wx-moon-lit { fill: var(--wx-moon); stroke: var(--wx-moon-stroke); stroke-width: 0.5; }

/* --------------------------------------------------------------------------
   Past 24 hours & almanac
   -------------------------------------------------------------------------- */
.wx-history-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.wx-chip {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--wx-chip-bg);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.wx-chip span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.wx-chip strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
}

.wx-chip small {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.wx-multiples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
}

.wx-mini {
  margin: 0;
  min-width: 0;
}

.wx-mini figcaption {
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.wx-periods {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.wx-period {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--wx-chip-bg);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.wx-period h4,
.wx-almanac-card h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
}

.wx-period .wx-rows { margin-top: 8px; }
.wx-period .wx-rows > div { font-size: 0.82rem; padding: 6px 0; }

.wx-almanac-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 28px;
}

.wx-almanac-card {
  min-width: 0;
}

.wx-almanac-grid + .wx-almanac-card {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.wx-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.wx-table th,
.wx-table td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.wx-table th:first-child { text-align: left; }

.wx-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.wx-table tbody th { font-weight: 600; }
.wx-table tr.is-today { background: rgba(106, 67, 168, 0.07); }
.wx-table small { color: var(--text-muted); font-weight: 400; }
.wx-table tfoot th, .wx-table tfoot td { color: var(--text-secondary); font-weight: 600; border-bottom: 0; }

.wx-records {
  list-style: none;
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.wx-records li {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--wx-chip-bg);
  border: 1px solid var(--border-subtle);
}

.wx-records span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wx-records strong {
  display: block;
  margin-top: 2px;
  font-size: 1.15rem;
  font-weight: 600;
}

.wx-records small { font-size: 0.75rem; color: var(--text-secondary); }

.wx-footnote {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Charts
   -------------------------------------------------------------------------- */
.wx-chart { position: relative; min-width: 0; }
.wx-chart-box { position: relative; }
.wx-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.wx-chart svg:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 4px; border-radius: 6px; }

.wx-grid { stroke: var(--wx-grid); stroke-width: 1; }
.wx-axis { stroke: var(--wx-axis); stroke-width: 1; }
.wx-band { fill: var(--wx-band); }
.wx-tick { fill: var(--text-muted); font: 500 11px var(--font-body); font-variant-numeric: tabular-nums; }
.wx-end-label { fill: var(--text-secondary); font: 600 11px var(--font-body); }
.wx-bar-label { fill: var(--text-secondary); font: 600 11px var(--font-body); }
.wx-hit { fill: transparent; cursor: crosshair; touch-action: pan-y; }
.wx-cross-line { stroke: var(--text-muted); stroke-width: 1; }

.wx-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wx-area { opacity: 0.1; }
.wx-dot { stroke: var(--wx-surface); stroke-width: 2; }
.wx-bar { transition: opacity var(--transition-fast); }
.wx-bar.is-hot { opacity: 0.75; }

.wx-line.s1 { stroke: var(--wx-s1); }
.wx-line.s2 { stroke: var(--wx-s2); }
.wx-line.s3 { stroke: var(--wx-s3); }
.wx-line.s4 { stroke: var(--wx-s4); }
.wx-area.s1, .wx-bar.s1, .wx-dot.s1 { fill: var(--wx-s1); }
.wx-area.s2, .wx-bar.s2, .wx-dot.s2 { fill: var(--wx-s2); }
.wx-area.s3, .wx-bar.s3, .wx-dot.s3 { fill: var(--wx-s3); }
.wx-area.s4, .wx-bar.s4, .wx-dot.s4 { fill: var(--wx-s4); }
.wx-key.s1 { background: var(--wx-s1); }
.wx-key.s2 { background: var(--wx-s2); }
.wx-key.s3 { background: var(--wx-s3); }
.wx-key.s4 { background: var(--wx-s4); }

.wx-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.wx-legend span { display: inline-flex; align-items: center; gap: 6px; }

.wx-key {
  display: inline-block;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  flex: none;
}

.wx-key.is-bar { width: 10px; height: 10px; border-radius: 2px; }

.wx-tip {
  position: absolute;
  z-index: 5;
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  font-size: 0.8rem;
}

.wx-tip-title {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.wx-tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.wx-tip-row strong {
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wx-tip-row span { color: var(--text-secondary); }

.wx-tip-extra {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.74rem;
}

.wx-table-toggle {
  margin-top: 6px;
  font-size: 0.78rem;
}

.wx-table-toggle summary {
  width: fit-content;
  cursor: pointer;
  color: var(--text-muted);
  list-style: none;
}

.wx-table-toggle summary::-webkit-details-marker { display: none; }
.wx-table-toggle summary::before { content: '▸ '; }
.wx-table-toggle[open] summary::before { content: '▾ '; }
.wx-table-toggle summary:hover { color: var(--text-secondary); }

.wx-table-wrap {
  max-height: 280px;
  overflow: auto;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.wx-table-wrap .wx-table { margin-top: 0; }

/* --------------------------------------------------------------------------
   Icons
   -------------------------------------------------------------------------- */
.wx-icon { width: 48px; height: 48px; display: block; overflow: visible; }
.wx-icon-sm { width: 34px; height: 34px; }

.wx-i-sun circle { fill: var(--wx-sun); }
.wx-i-rays line { stroke: var(--wx-sun); stroke-linecap: round; }
.wx-i-moon { fill: var(--wx-moon); stroke: var(--wx-moon-stroke); stroke-width: 1.2; }
.wx-i-cloud { fill: var(--wx-cloud); stroke: var(--wx-cloud-stroke); stroke-width: 1.5; }
.wx-i-cloud-back { fill: var(--wx-cloud-back); }
.wx-i-cloud-dark { fill: var(--wx-cloud-dark); }
.wx-i-rain line { stroke: var(--wx-rain); stroke-width: 3; stroke-linecap: round; }
.wx-i-snow line { stroke: var(--wx-snow); stroke-width: 2; stroke-linecap: round; }
.wx-i-bolt { fill: #facc15; stroke: #ca8a04; stroke-width: 1; stroke-linejoin: round; }
.wx-i-fog line { stroke: var(--text-muted); stroke-width: 3; stroke-linecap: round; }
.wx-i-wind path { fill: none; stroke: var(--text-secondary); stroke-width: 3; stroke-linecap: round; }

/* The hero sky is always deep, so icons there use their night-sky inks */
.wx-hero {
  --wx-cloud: #eef2f7;
  --wx-cloud-stroke: transparent;
  --wx-cloud-back: #a5b4c8;
  --wx-cloud-dark: #8291a8;
  --wx-moon: #f1f5f9;
  --wx-moon-stroke: transparent;
  --wx-sun: #fcd34d;
  --wx-rain: #7dd3fc;
  --wx-snow: #f0f9ff;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .wx-periods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wx-history-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .wx-hero { grid-template-columns: minmax(0, 1fr); }
  .wx-grid-2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wx-multiples, .wx-almanac-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .wx-hero { padding: 22px; border-radius: 20px; }
  .wx-hero-icon .wx-icon { width: 84px; height: 84px; }
  .wx-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wx-panel { padding: 18px; }
  .wx-tile-wide { grid-column: auto; }
  .wx-tile-wind { display: flex; }
  .wx-tile-wind .wx-rows { margin-top: 12px; align-self: stretch; }
  .wx-sky { grid-template-columns: minmax(0, 1fr); }
  .wx-sky-moon { padding-left: 0; border-left: 0; padding-top: 18px; border-top: 1px solid var(--border-subtle); }
  .wx-periods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wx-history-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wx-radar-map { min-height: 340px; }
  .wx-day { grid-template-columns: 52px 34px 46px 34px minmax(40px, 1fr) 34px; gap: 8px; }
}

@media (max-width: 480px) {
  .wx-hero-top { gap: 12px; }
  .wx-wind { flex-direction: column; align-items: flex-start; }
  .wx-periods { grid-template-columns: minmax(0, 1fr); }
  .wx-tabs { width: 100%; }
  .wx-tabs button { flex: 1; padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .wx-live[data-state="live"] .wx-live-dot { animation: none; }
  #wxRefresh.is-spinning svg { animation: none; }
}

/* Units inside dense rows stay legible */
.wx-rows .wx-u,
.wx-chip .wx-u { font-size: 0.82em; opacity: 0.8; }

/* ==========================================================================
   Avon News additions: controls, alerts, 7-day text, Lake Erie, discussion, METAR, base map
   ========================================================================== */
.wx-section .btn-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  color: var(--btn-ink);
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 3px 0 var(--btn-edge), 0 6px 14px rgba(29, 16, 48, 0.1);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.wx-section .btn-icon:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 0 var(--btn-edge); }
.wx-section .btn-icon.is-spinning svg { animation: wx-spin 0.9s linear infinite; }
@keyframes wx-spin { to { transform: rotate(360deg); } }
.wx-topbar { margin-bottom: 14px; }
.wx-topbar .wx-meta { margin: 0; }

/* site.css styles every <th> as a tinted column header; inside weather tables, row headers are plain labels */
.wx-section .wx-table th { background: none; }
.wx-section .wx-table tbody th,
.wx-section .wx-table tfoot th { font-size: inherit; letter-spacing: normal; text-transform: none; color: var(--text-primary); }
.wx-section .wx-table thead th { background: linear-gradient(180deg, var(--p50), var(--p100)); }
.wx-section .wx-table tbody tr:nth-child(even) > th { background: var(--surface-2); }
.wx-section .wx-table tbody tr:hover > th { background: var(--p50); }
.wx-section .wx-table tbody tr:last-child > th { border-bottom: 0; }

/* NWS alerts */
.wx-alerts { display: grid; gap: 12px; margin: 0 0 18px; }
.wx-alerts:empty { display: none; }
.wx-alerts-title { margin: 0; font: 700 0.8rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--error); }
.wx-alert {
  position: relative;
  overflow: hidden;
  padding: 16px 20px 14px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.wx-alert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--alert); }
.wx-alert-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.wx-alert-event {
  padding: 4px 11px;
  border-radius: 999px;
  font: 700 0.72rem/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--alert) 24%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--alert) 60%, transparent);
}
.wx-alert-sev { font-size: 0.8rem; color: var(--muted); }
.wx-alert h3 { margin: 0 0 6px; font-size: 1.2rem; }
.wx-alert-when { margin: 0 0 8px; font-size: 0.86rem; color: var(--muted); }
.wx-alert summary { cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--link); }
.wx-alert-text, .wx-alert-do { margin-top: 10px; font-size: 0.93rem; }
.wx-alert-text p, .wx-alert-do p { margin: 0 0 8px; }
.wx-alert-do { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); }
.wx-alert-do strong { display: block; margin-bottom: 4px; }
.wx-allclear {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ok);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-1);
}
.wx-allclear.is-unknown { color: var(--muted); }

/* 7-day rows open to the forecaster's text */
.wx-daily { padding: 0; margin: 0; }
.wx-daily > li { list-style: none; }
.wx-day-item > summary { list-style: none; cursor: pointer; border-radius: 10px; transition: background-color 0.15s ease; }
.wx-day-item > summary::-webkit-details-marker { display: none; }
.wx-day-item > summary:hover { background: var(--bg-glass); }
.wx-day-item[open] > summary { background: var(--bg-glass-active); }
.wx-day-text { padding: 8px 10px 12px; font-size: 0.9rem; color: var(--ink-soft); }
.wx-day-text p { margin: 0 0 6px; }

/* Almanac: the charts stack in the left column beside the date card */
.wx-almanac-col { display: grid; gap: 24px; align-content: start; min-width: 0; }
.wx-records { padding: 0; }

/* Normals on the almanac charts: dashed and quiet */
.wx-line.sn { stroke: var(--muted); stroke-dasharray: 5 4; stroke-width: 1.5; opacity: 0.85; }
.wx-line.sn.sn-hi { stroke: var(--wx-s2); opacity: 0.5; }
.wx-dot.sn { fill: var(--muted); }
.wx-key.sn { background: var(--muted); opacity: 0.7; }

/* Observing station: the raw METAR */
.wx-metar {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font: 500 0.78rem/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  color: #ece4f7;
  background: linear-gradient(180deg, var(--p800), var(--p950));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Lake Erie */
.wx-lake-alerts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wx-lake-flag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--alert) 25%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--alert) 60%, transparent);
}
.wx-lake-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 26px; margin-bottom: 20px; }
.wx-buoy-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.wx-buoy-head > div { padding: 12px 14px; border-radius: 12px; background: var(--wx-chip-bg); border: 1px solid var(--border-subtle); }
.wx-buoy-k { display: block; font: 700 0.7rem/1.4 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.wx-buoy-head strong { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.wx-buoy-head small { display: block; font-size: 0.76rem; color: var(--muted); }
.wx-buoy-time { margin: 10px 0 12px; font-size: 0.84rem; }
.wx-buoy-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wx-buoy-off { margin: 0; padding: 16px 18px; border-radius: 12px; background: var(--wx-chip-bg); border: 1px solid var(--border-subtle); }
.wx-lake-sub { margin: 0 0 2px; font: 700 1.05rem/1.3 var(--serif); }
.wx-lake-forecast > .wx-muted { margin: 0 0 6px; font-size: 0.82rem; }
.wx-nearshore { display: grid; gap: 8px; margin: 10px 0; }
.wx-nearshore > div { padding: 10px 12px; border-radius: 10px; background: var(--wx-chip-bg); border: 1px solid var(--border-subtle); }
.wx-nearshore dt { font-size: 0.84rem; font-weight: 700; }
.wx-nearshore dd { margin: 2px 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.wx-lake-wrap { overflow-x: auto; }
.wx-lake-table th small { display: block; font-size: 0.72rem; font-weight: 500; color: var(--muted); }
.wx-lake-table td small { color: var(--muted); }
.wx-lake-table tr.is-old { opacity: 0.55; }
.wx-lake-note { margin: 8px 0 0; font-size: 0.8rem; }

/* Forecaster's discussion */
.wx-disc { max-width: 80ch; }
.wx-disc-meta { margin: 0 0 10px; font-size: 0.85rem; color: var(--muted); }
.wx-disc-sec { padding: 10px 0; border-top: 1px solid var(--border-subtle); }
.wx-disc-sec > summary { display: flex; align-items: center; gap: 9px; list-style: none; cursor: pointer; font: 700 1.05rem/1.3 var(--serif); }
.wx-disc-sec > summary::-webkit-details-marker { display: none; }
.wx-disc-sec > summary::before { content: "▸"; color: var(--g500); transition: transform 0.15s ease; }
.wx-disc-sec[open] > summary::before { transform: rotate(90deg); }
.wx-disc-sec p { margin: 8px 0; line-height: 1.68; }
.wx-disc-sec h4 { margin: 14px 0 4px; font: 700 0.78rem/1.3 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--g600); }

/* OpenStreetMap base map: muted under the radar, darkened in dark mode */
.wx-basemap { filter: saturate(0.5) contrast(0.95); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wx-basemap { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.4); }
}

@media (max-width: 860px) {
  .wx-lake-grid { grid-template-columns: 1fr; }
  .wx-buoy-charts { grid-template-columns: 1fr; }
  .wx-buoy-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .wx-section .btn-icon.is-spinning svg { animation: none; }
}
