/* CSS Reset and Font Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* --- Theme foundation ---
     --fg-rgb is the single "ink" the theme pivots on: an RGB triple (no alpha) used by every
     text color and translucent glass veil/border below via rgba(var(--fg-rgb), <alpha>). Dark
     mode = white ink over dark surfaces; the light-mode block flips it to a dark ink over light
     surfaces, so one swap re-tones the whole UI while each element keeps its own alpha.
     The opaque surfaces that can't be derived from a veil (page bg, solid panels, scrim,
     gradient) are listed as their own tokens and overridden per theme. */
  --fg-rgb: 255, 255, 255;
  --bg-page: #0f1123;            /* solid page background (system bars + body base) */
  --bg-gradient: linear-gradient(135deg, #0f1123 0%, #171833 50%, #0d0e1b 100%);
  --surface-solid: #14152b;      /* opaque raised panel: sticky table headers, <option> lists */
  --surface-solid-raised: #1a1b30; /* opaque map placeholder behind the Leaflet canvas */
  --scrim: rgba(8, 9, 20, 0.6);  /* dim layer behind the location modal */

  /* Color Palette (Aesthetic HSL) */
  --accent-blue: hsl(210, 100%, 65%);
  --accent-blue-bright: hsl(205, 100%, 80%);
  /* Section / box titles: the label blue (--accent-blue-bright), a touch darker */
  --accent-blue-title: hsl(205, 100%, 72%);
  --accent-violet: hsl(270, 95%, 70%);
  --accent-amber: hsl(35, 100%, 60%);

  --text-primary: rgba(var(--fg-rgb), 0.95);
  --text-title: rgba(var(--fg-rgb), 0.85);   /* section / box headers — brighter than secondary for contrast */
  --text-secondary: rgba(var(--fg-rgb), 0.6);
  --text-muted: rgba(var(--fg-rgb), 0.4);

  --glass-bg: rgba(var(--fg-rgb), 0.03);
  --glass-border: rgba(var(--fg-rgb), 0.08);
  --glass-glow: rgba(var(--fg-rgb), 0.04);

  /* Beaufort sailing-suitability colors (light theme darkens these for contrast). */
  --beaufort-light: #94a3b8;
  --beaufort-ideal: #34d399;
  --beaufort-caution: #fb8c00;
  --beaufort-danger: #f87171;
  /* Cover gradient that fades the edge of horizontally-scrolling tables (mobile). */
  --scroll-cover: #11122440;
  /* Weather-art cloud tints for the heavier sky states (light theme darkens them to stay visible). */
  --cloud-mid: rgba(230, 230, 255, 0.25);
  --cloud-heavy: rgba(180, 185, 210, 0.3);
  --cloud-rain: rgba(200, 205, 225, 0.3);

  --font-family: 'Outfit', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius-lg: 24px;
  --border-radius-md: 12px;

  /* Type scale — 6 steps on a ~1.25 ratio, anchored on 16px body text.
     Use these tokens everywhere instead of ad-hoc font-size values:
       --fs-caption    fine print / uppercase labels      12px
       --fs-small      dense / secondary text             14px
       --fs-body       default reading text (regular)     16px
       --fs-header-sm  small header / section title       20px
       --fs-header-lg  large header / card + page title   26px
       --fs-display    hero numbers (temp, Beaufort)      30px
     (The tide-chart SVG text is sized in viewBox units, not these tokens.) */
  --fs-caption: 0.75rem;
  --fs-small: 0.875rem;
  --fs-body: 1rem;
  --fs-header-sm: 1.25rem;
  --fs-header-lg: 1.6rem;
  --fs-display: 1.9rem;
  /* SVG-space companion to --fs-body: the tide chart's viewBox scales down ~0.59x,
     so 27px in viewBox units renders at ~1rem (regular) on screen. */
  --fs-tide-regular: 27px;
}

/* --- Light theme ---
   Dark is the default (the :root values above). Light mode only re-points the theme
   foundation tokens: --fg-rgb flips to a dark ink (so every text color + glass veil/border
   re-tones at its existing alpha), the opaque surfaces get light values, and the accent blues
   /amber are darkened for contrast on a light background. Everything else flows automatically.

   Two triggers, same values (keep the two blocks in sync):
     1. OS prefers light AND the user hasn't forced dark  → @media block below
     2. The user explicitly chose light (data-theme="light") → the rule after it
   Forcing dark (data-theme="dark") matches neither, so the :root dark defaults stand even on a
   light OS. "Auto" is the absence of data-theme (or data-theme="auto"), which the media query
   honors. The shared --light-theme custom set keeps the two blocks identical. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --fg-rgb: 18, 24, 46;
    --bg-page: #eef1f8;
    --bg-gradient: linear-gradient(135deg, #f6f8fd 0%, #e9eef8 50%, #eef1f8 100%);
    --surface-solid: #dfe6f2;
    --surface-solid-raised: #d7deec;
    --scrim: rgba(18, 24, 46, 0.35);
    --text-secondary: rgba(var(--fg-rgb), 0.66);
    --text-muted: rgba(var(--fg-rgb), 0.5);
    --accent-blue: hsl(212, 88%, 48%);
    --accent-blue-bright: hsl(208, 85%, 42%);
    --accent-blue-title: hsl(208, 82%, 40%);
    --accent-amber: hsl(30, 92%, 42%);
    --accent-violet: hsl(268, 72%, 56%);
    --beaufort-light: #5b6b82;
    --beaufort-ideal: #0f9d6b;
    --beaufort-caution: #d97706;
    --beaufort-danger: #dc2626;
    --scroll-cover: rgba(120, 130, 160, 0.28);
  --cloud-mid: rgba(95, 105, 135, 0.34);
  --cloud-heavy: rgba(80, 90, 120, 0.42);
  --cloud-rain: rgba(85, 95, 125, 0.4);
    --cloud-mid: rgba(95, 105, 135, 0.34);
    --cloud-heavy: rgba(80, 90, 120, 0.42);
    --cloud-rain: rgba(85, 95, 125, 0.4);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --fg-rgb: 18, 24, 46;
  --bg-page: #eef1f8;
  --bg-gradient: linear-gradient(135deg, #f6f8fd 0%, #e9eef8 50%, #eef1f8 100%);
  --surface-solid: #dfe6f2;
  --surface-solid-raised: #d7deec;
  --scrim: rgba(18, 24, 46, 0.35);
  --text-secondary: rgba(var(--fg-rgb), 0.66);
  --text-muted: rgba(var(--fg-rgb), 0.5);
  --accent-blue: hsl(212, 88%, 48%);
  --accent-blue-bright: hsl(208, 85%, 42%);
  --accent-blue-title: hsl(208, 82%, 40%);
  --accent-amber: hsl(30, 92%, 42%);
  --accent-violet: hsl(268, 72%, 56%);
  --beaufort-light: #5b6b82;
  --beaufort-ideal: #0f9d6b;
  --beaufort-caution: #d97706;
  --beaufort-danger: #dc2626;
  --scroll-cover: rgba(120, 130, 160, 0.28);
}

/* Declare the app dark so the OS paints the PWA system bars (incl. the Android bottom
   navigation bar) in dark mode rather than defaulting to white. The solid background-color
   then gives Chrome a color to tint that bar to, matching the top status bar (#0f1123).
   color-scheme is overridden to light by the theme blocks above when light is active. */
html {
  color-scheme: dark;
  background-color: var(--bg-page);
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  background: var(--bg-gradient);
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Background Ambient Glow Orbs */
.glass-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  mix-blend-mode: screen;
}

.orb-1 {
  top: -10%;
  right: 15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
  animation: orbFloat 18s ease-in-out infinite alternate;
}

.orb-2 {
  bottom: 10%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
  animation: orbFloat 24s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(5%, 10%) scale(1.1);
  }
  100% {
    transform: translate(-5%, -5%) scale(0.95);
  }
}

/* Main Application Layout */
.app-container {
  width: 90%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 0;
}

/* Header Styles — a self-contained glass bar that frames the page (bookending the
   glass footer panel). Scrolls with the page like the rest of the content. */
.app-header {
  display: grid;
  /* Wordmark left, location centered; trailing 1fr spacer keeps it balanced
     now that the connection status has moved to the footer. */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  /* Gap 30% wider than the previous 10px */
  gap: 13px;
  padding: 12px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: var(--fs-header-sm);
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(80, 160, 255, 0.35));
  animation: logoPulse 4s ease-in-out infinite;
}

/* Light theme uses a dedicated SVG mark. Overriding `content` swaps the rendered image of the
   existing <img src="logo.png"> with no markup change (so it applies to every page's header),
   while the src stays the dark-mode fallback. Mirrors the palette's two triggers — see the
   light-theme block near the top. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-icon {
    content: url("logo-light.svg");
  }
}
:root[data-theme="light"] .logo-icon {
  content: url("logo-light.svg");
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(80, 160, 255, 0.25)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 10px rgba(80, 160, 255, 0.5)); }
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: relative;
}

.status-dot.green {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-dot.orange {
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.status-dot.red {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.status-text {
  color: var(--text-secondary);
  font-weight: 500;
}

/* View Tabs (Now / Hourly) */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Row holding the view tabs (centered) and the refresh button (aligned to the box's right edge).
   1fr · auto · 1fr keeps the tab pill dead-center while the refresh sits at the far right. */
.tab-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.tab-row .view-tabs {
  grid-column: 2;
  justify-self: center;
}

.tab-row .refresh-btn {
  grid-column: 3;
  justify-self: end;
}

.view-tabs {
  display: flex;
  gap: 6px;
  align-self: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.view-tab {
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: var(--fs-header-sm);
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 24px;
  border-radius: 18px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.view-tab:hover {
  color: var(--text-primary);
}

.view-tab.active {
  background: rgba(var(--fg-rgb), 0.08);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Hour-by-hour table */
.hourly-table-section {
  border-top: 1px solid rgba(var(--fg-rgb), 0.08);
  padding-top: 24px;
}

.hourly-table-wrap {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: thin;
}

.hourly-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body);
}

.hourly-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-solid);
  color: var(--accent-blue-title);
  font-size: var(--fs-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: right;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(var(--fg-rgb), 0.1);
  white-space: nowrap;
}

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

.hourly-table tbody td {
  padding: 9px 6px;
  text-align: right;
  white-space: nowrap;
  color: var(--text-primary);
}

.hourly-table tbody tr:nth-child(odd) td {
  background: rgba(var(--fg-rgb), 0.02);
}

.hourly-empty-row td {
  color: var(--text-muted);
  text-align: left !important;
}

.hr-time {
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left !important;
}

.hr-temp {
  font-weight: 700;
}

.hr-rain {
  color: var(--accent-blue);
  font-weight: 600;
}

.hr-gust {
  color: var(--accent-amber);
  font-weight: 600;
}

.hr-swell {
  color: var(--text-secondary);
}

/* Inline wind/swell direction arrow (rotated to the bearing, ~20% taller than the text) */
.dir-arrow {
  display: inline-block;
  color: var(--accent-blue);
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1;
  transform-origin: center;
}

/* Weather Card Glassmorphism */
.weather-dashboard-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.weather-dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-violet));
}

.weather-dashboard-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--fg-rgb), 0.15);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5), 
              0 0 40px rgba(96, 165, 250, 0.05);
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.location-title {
  font-size: var(--fs-header-lg);
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Read-only map preview of the selected location, centered in the Now box. Click opens picker. */
.location-map-preview {
  width: 240px;
  height: 149px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: var(--transition-smooth);
  background: rgba(var(--fg-rgb), 0.03);
}

.location-map-preview:hover {
  border-color: rgba(var(--fg-rgb), 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 24px rgba(96, 165, 250, 0.08);
}

/* The Leaflet canvas inside shouldn't grab the pointer — clicks open the picker. */
.location-map-preview .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--surface-solid-raised);
  cursor: pointer;
}

/* Header location (middle column, between the wordmark and the status chip) */
.header-location {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  line-height: 1.25;
}

/* Header location button (opens the picker modal) */
.location-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--fg-rgb), 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.location-button:hover {
  background: rgba(var(--fg-rgb), 0.1);
  border-color: rgba(var(--fg-rgb), 0.2);
}

.location-pin-icon {
  width: 15px;
  height: 15px;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.logo-location {
  font-size: var(--fs-header-lg);
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.logo-grid {
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.logo-grid a {
  color: var(--text-secondary);
  text-decoration: none;
}

.logo-grid a:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

/* --- Location picker modal --- */
.location-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.location-modal[hidden] {
  display: none;
}

.location-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.location-modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-gradient);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.location-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.location-modal-title {
  font-size: var(--fs-header-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.location-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: var(--fs-header-lg);
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  transition: var(--transition-smooth);
}

.location-modal-close:hover {
  color: var(--text-primary);
}

.location-modal-hint {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.location-map {
  width: 100%;
  height: 280px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.location-pick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
}

.location-candidate {
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.location-name-input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(var(--fg-rgb), 0.05);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--fs-small);
}

.location-name-input::placeholder {
  color: var(--text-muted);
}

.location-save-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-violet));
  color: #fff;
  font-weight: 600;
  font-size: var(--fs-small);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.location-save-btn:hover {
  filter: brightness(1.1);
}

.location-saved-title {
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.location-saved-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.saved-location {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.saved-location-select {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(var(--fg-rgb), 0.03);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.saved-location-select:hover {
  background: rgba(var(--fg-rgb), 0.08);
}

.saved-location.is-active .saved-location-select {
  border-color: var(--accent-blue);
  background: rgba(80, 160, 255, 0.12);
}

.saved-location-name {
  font-weight: 600;
  font-size: var(--fs-body);
}

.saved-location-coords {
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

.saved-location-delete {
  width: 36px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(var(--fg-rgb), 0.03);
  color: var(--text-secondary);
  font-size: var(--fs-header-sm);
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.saved-location-delete:hover {
  background: rgba(255, 80, 80, 0.18);
  color: #fff;
}

/* Segmented unit/text-size switches (used on the Settings page). */
.unit-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(var(--fg-rgb), 0.03);
  border: 1px solid rgba(var(--fg-rgb), 0.06);
  border-radius: 16px;
  padding: 2px;
}

.unit-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 3px 8px;
  border-radius: 12px;
  line-height: 1.2;
}

.unit-btn:hover {
  color: var(--text-primary);
}

.unit-btn.active {
  background: var(--accent-blue);
  color: #fff;
}

.location-sub {
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.refresh-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.refresh-btn:hover {
  background: rgba(var(--fg-rgb), 0.1);
  color: var(--accent-blue);
  transform: rotate(30deg);
}

.refresh-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.6s ease;
}

.refresh-btn.loading .refresh-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Card Body */
.card-body {
  /* Holds the full-width tabbed map area (Windy / location preview). The segmented control sits
     at the bottom of this box; the equal whitespace below (here) and above it (.now-map gap)
     centers it between the map and the Coastal Waters Forecast title. */
  margin-bottom: 16px;
}

/* Forecast row: Coastal Waters Forecast (3/4) beside the Beaufort + temperature hero column
   (1/4), sitting below the map. */
.now-forecast-row {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 8px;
}

/* Right cell: Beaufort force stacked above the temperature + sun/moon icon. */
.now-hero-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Box: sun/moon icon with the temperature stacked beneath it. Styled to mirror the
   Beaufort box above it (same glass card treatment). */
.weather-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(var(--fg-rgb), 0.03);
  border: 1px solid rgba(var(--fg-rgb), 0.06);
  border-radius: var(--border-radius-md);
  padding: 14px 20px;
  text-align: center;
}

/* Tabbed map area spans the full card width; tabs sit below the map box. */
.card-body .now-map {
  min-width: 0;
}

.now-map {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Body holds both views stacked; only the active one is shown (swapped by the dots below). */
.now-map-body {
  position: relative;
  min-height: 180px;
}

.now-map-view[hidden] {
  display: none;
}

/* Segmented divider below the map box: two short bars that together read as a thin divider,
   the active view's segment highlighted. Each button keeps a roomy invisible hit area; the
   visible bar is a small ::before so the row stays very short vertically. */
.now-map-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.now-map-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.now-map-tab::before {
  content: "";
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(var(--fg-rgb), 0.15);
  transition: var(--transition-smooth);
}

.now-map-tab:hover::before {
  background: rgba(var(--fg-rgb), 0.35);
}

.now-map-tab.active::before {
  background: #60a5fa;
}

/* Hidden segment (e.g. PredictWind outside Monterey) — display:flex above would otherwise show it. */
.now-map-tab[hidden] {
  display: none;
}

/* Each view fills the body. The embed iframes (Windy, PredictWind) get the same rounded card
   treatment as the location preview; the preview's own fixed 240×149 size is overridden here so
   it stretches. The element+class selector stays below .now-map-view[hidden] in specificity, so
   the hidden view still collapses (no stacking). */
iframe.now-map-view {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.now-map .location-map-preview {
  width: 100%;
  height: 100%;
  min-height: 180px;
}


/* Custom CSS Weather Art */
.weather-visual {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.weather-art {
  position: relative;
  width: 90px;
  height: 90px;
}

.dynamic-sun {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #ffe066 0%, #f59e0b 100%);
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
  animation: sunGlow 4s ease-in-out infinite alternate;
}

@keyframes sunGlow {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(245, 158, 11, 0.6); }
  100% { transform: scale(1.1); box-shadow: 0 0 35px rgba(245, 158, 11, 0.9); }
}

/* Moon (shown at night instead of the sun) */
.dynamic-moon {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: none; /* shown only when .weather-art.is-night */
  background:
    radial-gradient(circle at 62% 30%, rgba(150, 160, 200, 0.45) 0 4px, transparent 5px),
    radial-gradient(circle at 40% 64%, rgba(150, 160, 200, 0.4) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 62%, rgba(150, 160, 200, 0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 35% 35%, #f4f6ff 0%, #d6dcf0 70%, #c2c9e6 100%);
  box-shadow: 0 0 22px rgba(214, 220, 240, 0.5), inset -6px -6px 12px rgba(140, 150, 195, 0.45);
  animation: moonGlow 5s ease-in-out infinite alternate;
}

@keyframes moonGlow {
  0% { box-shadow: 0 0 16px rgba(214, 220, 240, 0.4), inset -6px -6px 12px rgba(140, 150, 195, 0.45); }
  100% { box-shadow: 0 0 28px rgba(214, 220, 240, 0.7), inset -6px -6px 12px rgba(140, 150, 195, 0.45); }
}

.dynamic-cloud {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 55px;
  height: 22px;
  background: rgba(var(--fg-rgb), 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
  border: 1px solid rgba(var(--fg-rgb), 0.2);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  animation: cloudDrift 6s ease-in-out infinite alternate;
}

.dynamic-cloud::before, .dynamic-cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
  border-top: 1px solid rgba(var(--fg-rgb), 0.2);
}

.dynamic-cloud::before {
  width: 25px;
  height: 25px;
  top: -12px;
  left: 10px;
}

.dynamic-cloud::after {
  width: 32px;
  height: 32px;
  top: -18px;
  right: 8px;
}

@keyframes cloudDrift {
  0% { transform: translateX(-4px); }
  100% { transform: translateX(8px); }
}

/* Rain (overlay shown when precipitation is likely) */
.dynamic-rain {
  position: absolute;
  bottom: 2px;
  right: 12px;
  width: 52px;
  height: 26px;
  display: none; /* shown only when .weather-art.is-rainy */
}

.dynamic-rain span {
  position: absolute;
  top: 0;
  width: 2px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(to bottom, rgba(130, 180, 255, 0.1), rgba(130, 180, 255, 0.85));
  animation: rainFall 0.9s linear infinite;
}

.dynamic-rain span:nth-child(1) { left: 10px; animation-delay: 0s; }
.dynamic-rain span:nth-child(2) { left: 24px; animation-delay: 0.3s; }
.dynamic-rain span:nth-child(3) { left: 38px; animation-delay: 0.6s; }

@keyframes rainFall {
  0% { transform: translateY(-4px); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(18px); opacity: 0; }
}

/* Weather Art Sky Cover States */

/* Clear Sky: Hide cloud, center sun and make it larger */
.weather-art.clear-sky .dynamic-cloud {
  opacity: 0;
  transform: scale(0.5) translateY(20px);
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.weather-art.clear-sky .dynamic-sun {
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Partly Cloudy: Default, sun and drifting cloud visible */
.weather-art.partly-cloudy .dynamic-cloud {
  opacity: 1;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.weather-art.partly-cloudy .dynamic-sun {
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mostly Cloudy: Cloud moves to cover more of the sun */
.weather-art.mostly-cloudy .dynamic-cloud {
  bottom: 15px;
  right: 18px;
  background: var(--cloud-mid);
  border-color: rgba(var(--fg-rgb), 0.25);
  transform: scale(1.1);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.weather-art.mostly-cloudy .dynamic-sun {
  top: 10px;
  left: 10px;
  opacity: 0.85;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Overcast: Dim sun heavily, center cloud, make it darker/gray */
.weather-art.overcast .dynamic-cloud {
  bottom: 25px;
  right: 15px;
  width: 65px;
  height: 26px;
  background: var(--cloud-heavy);
  border-color: rgba(var(--fg-rgb), 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: scale(1.2);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.weather-art.overcast .dynamic-cloud::before {
  width: 30px;
  height: 30px;
  top: -15px;
}
.weather-art.overcast .dynamic-cloud::after {
  width: 38px;
  height: 38px;
  top: -22px;
}
.weather-art.overcast .dynamic-sun {
  top: 8px;
  left: 8px;
  opacity: 0.2;
  transform: scale(0.8);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Night: swap the sun for the moon */
.weather-art.is-night .dynamic-sun {
  display: none;
}
.weather-art.is-night .dynamic-moon {
  display: block;
}

/* Rainy: show the rain and make sure a cloud is present to rain from */
.weather-art.is-rainy .dynamic-rain {
  display: block;
}
.weather-art.is-rainy .dynamic-cloud {
  opacity: 1;
  bottom: 18px;
  right: 14px;
  background: var(--cloud-rain);
  transform: scale(1.1);
}

/* Weather Readings */
.weather-reading {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.temp-container {
  display: flex;
  align-items: flex-start;
  margin-bottom: 4px;
}

.temp-value {
  font-size: var(--fs-display); /* matches .beaufort-force so temp + Beaufort read as equals */
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, rgba(var(--fg-rgb), 1) 30%, rgba(var(--fg-rgb), 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.temp-unit {
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--accent-blue);
  margin-top: 1px;
  margin-left: 2px;
}

/* Marine Conditions Section */
.marine-section {
  border-top: 1px solid rgba(var(--fg-rgb), 0.08);
  padding-top: 24px;
  margin-bottom: 24px;
}

.marine-title {
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-blue-title);
  margin-bottom: 16px;
}

.marine-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Now panel current-conditions grid: marine (left) and tides (right) aligned row by row,
   so the wider card fits everything horizontally. Paired rows share a height
   (align-items: stretch) — Next Tide matches the Wind box, the chart matches Waves.
   DOM order is mobile-first; explicit placement builds the 2-D layout on wider screens. */
.now-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto auto;
  column-gap: 28px;
  row-gap: 14px;
  align-items: stretch;
  border-top: 1px solid rgba(var(--fg-rgb), 0.08);
  padding-top: 24px;
  margin-bottom: 24px;
}

.now-grid .marine-title {
  margin-bottom: 0;
  align-self: end;
}

.nm-title   { grid-column: 1; grid-row: 1; }
.nm-wind    { grid-column: 1; grid-row: 2; }
.nm-waves   { grid-column: 1; grid-row: 3; }
.nt-title    { grid-column: 2; grid-row: 1; }
.nt-chart    { grid-column: 2; grid-row: 2; }  /* tides beside the Wind box */
.nt-pressure { grid-column: 2; grid-row: 3; }  /* pressure beside the Waves box */

/* Secondary conditions below both columns: a simple 3-column, 2-row grid that flows in
   DOM order — top row rain · cloud · water temp, bottom row humidity · dewpoint · fog. */
.now-secondary {
  grid-column: 1 / -1;
  grid-row: 4;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 6px;
}

/* Tides cell: holds the hi/lo chart (or, on phones at larger text, a table). */
.nt-chart {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Hint shown in the tide box when the active station has no chart curve (pick another above). */
.tide-nochart {
  max-width: 320px;
  margin: 0 auto;
  padding: 12px;
  color: var(--accent-amber);
  font-size: var(--fs-small);
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 760px) {
  .now-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }
  .now-grid > * {
    grid-column: 1;
    grid-row: auto;
  }
  .now-grid .marine-title {
    margin-top: 8px;
  }
  /* Single-column order: Marine (Wind, Waves) → Tides (chart + Pressure) → secondary
     conditions. The metrics grid is last in DOM but pushed past Tides here so the
     tides + pressure sit in the middle on phones; the tiles flow in a simple 2-up grid. */
  .now-secondary {
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    grid-template-rows: none;
    order: 1;
  }
  /* Pressure is its own box now; on phones keep it compact like the other tiles. */
  .marine-item-pressure {
    align-items: flex-start;
  }

  /* --- Tab bar + refresh: keep Now/Hourly/Daily + refresh on one row at phone widths,
     with comfortable (~44px) tap targets. --- */
  .view-tabs {
    gap: 4px;
    padding: 3px;
  }
  .view-tab {
    padding: 10px 16px;
    font-size: var(--fs-body);
  }
  .refresh-btn {
    width: 44px;
    height: 44px;
  }

  /* --- Hourly/Daily tables: pin the time/day column, momentum-scroll the rest,
     tighten cells, and hint that the table scrolls sideways. --- */
  .hourly-table-wrap {
    -webkit-overflow-scrolling: touch;
    /* Soft right/left shadows that appear only when there's more to scroll
       (cover gradients are local-attached; shadows are scroll-attached). */
    background:
      linear-gradient(to right, var(--scroll-cover) 0, transparent 24px) 0 0 / 24px 100% no-repeat local,
      linear-gradient(to left, var(--scroll-cover) 0, transparent 24px) 100% 0 / 24px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.35), transparent) 0 0 / 14px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.35), transparent) 100% 0 / 14px 100% no-repeat scroll;
  }
  .hourly-table tbody td,
  .hourly-table tbody th {
    padding: 7px 5px;
    font-size: var(--fs-small);
  }
  .hourly-table thead th {
    padding: 7px 5px;
    font-size: var(--fs-small);
  }
  /* Sticky first column (time / day). Solid background masks the cells scrolling
     beneath it; matches the sticky header colour for a consistent pinned band.
     The `tr` raises specificity to (0,2,3) so this solid fill beats the zebra rule
     `.hourly-table tbody tr:nth-child(odd) td` — otherwise odd-row day cells fall back
     to the near-transparent stripe and the scrolling text bleeds through. */
  .hourly-table thead th:first-child,
  .hourly-table tbody tr td:first-child,
  .hourly-table tbody tr th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface-solid);
  }
  .hourly-table thead th:first-child {
    z-index: 2;
  }

  /* --- Touch targets for the in-title dropdowns (wind/tide/marine station pickers). --- */
  .tides-station-select {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .location-button {
    padding: 8px 14px;
  }

  /* Map-view dots: keep the small visual dot but give it a taller tap area. */
  .now-map-tab {
    height: 40px;
  }

  /* --- Daily Coastal Waters Forecast: on phones the three narrow prose columns
     (Day | Daytime | Night) are too cramped, so stack them into rows per day — a day
     heading, then a sun-marked Day block and a moon-marked Night block — giving the
     worded text full width. Desktop keeps the 3-column table (this is phone-only). */
  .cwf-table thead {
    display: none;
  }
  .cwf-table,
  .cwf-table tbody,
  .cwf-table tr,
  .cwf-table td {
    display: block;
    width: auto;
  }
  /* Stronger separator between days. */
  .cwf-table tbody tr {
    border-top: 2px solid rgba(var(--fg-rgb), 0.14);
    padding-top: 14px;
    margin-top: 14px;
  }
  .cwf-table tbody tr:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
  }
  /* Day heading row. Also neutralizes the inherited data-table styling on this first-column
     cell: the sticky #14152b background and the zebra `tr:nth-child(odd) td` stripe both
     target it, leaving day headings alternating dark/light. The `tbody tr td.cwf-day`
     selector matches the zebra rule's specificity and, coming later in source, wins — so all
     day headings render transparent (the lighter look). */
  .cwf-table tbody tr td.cwf-day {
    position: static;
    background: none;
    width: auto;
    padding: 0;
    margin-bottom: 6px;
    font-size: var(--fs-header-sm);
  }
  /* Each Day / Night forecast becomes a full-width block, styled like the top synopsis
     summary (.marine-synopsis): glass background, left accent border, rounded, padded.
     `td.cwf-forecast` outranks the later desktop `width: 50%` rule (see note above). */
  .cwf-table td.cwf-forecast {
    width: auto;
    margin-top: 8px;
    padding: 10px 14px;
    border-left: 3px solid var(--accent-amber);
    border-radius: 6px;
    background: var(--glass-bg);
  }
  /* Day / Night period labels before each block. Column order is fixed:
     2nd cell = Daytime, 3rd cell = Night. Both use amber for easy scanning. */
  .cwf-table td.cwf-forecast::before {
    display: block;
    font-size: var(--fs-caption);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 6px;
    color: var(--accent-amber);
  }
  .cwf-table td.cwf-forecast:nth-child(2)::before {
    content: "Day";
  }
  .cwf-table td.cwf-forecast:nth-child(3)::before {
    content: "Night";
  }
  /* Let the worded forecast fill the full block width instead of the desktop 75ch
     measure, which otherwise left the right side empty and wrapped text early. */
  .cwf-table .now-marine-period-list {
    max-width: none;
  }
  /* Hide absent period blocks (e.g. a leading Tonight has no Daytime). */
  .cwf-table td.cwf-none {
    display: none;
  }
  /* Drop the data-table scroll-shadow background for this full-width prose table. */
  .cwf-table-wrap {
    background: none;
  }
}

/* Beaufort headline hero — the primary sailing indicator, shown inline in the
   top row alongside the sky art and temperature. */
.beaufort-hero {
  background: rgba(var(--fg-rgb), 0.03);
  border: 1px solid rgba(var(--fg-rgb), 0.06);
  border-radius: var(--border-radius-md);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.beaufort-hero-label {
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-blue-title);
}

.beaufort-hero-val {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-primary);
}

.beaufort-force {
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.05;
}

.beaufort-name {
  font-size: var(--fs-body);
  font-weight: 600;
}

/* Few-word sailing-impact note under the force, e.g. "Reef down; hard work". */
.beaufort-hero-sail {
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-title);
  max-width: 16ch;
  text-wrap: balance;
}
.beaufort-hero-sail:empty {
  display: none;
}

/* Combined wind / waves boxes (title header + stacked metric lines + compass) */
.marine-box {
  background: rgba(var(--fg-rgb), 0.02);
  border: 1px solid rgba(var(--fg-rgb), 0.05);
  padding: 14px 16px;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-smooth);
}

.marine-box:hover {
  background: rgba(var(--fg-rgb), 0.05);
  border-color: rgba(var(--fg-rgb), 0.1);
}

.marine-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-blue);
}

.marine-box-title {
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-blue-title);
}

.marine-box-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  /* Wrap at large text sizes so the compass drops below the data instead of
     being pushed past the card edge (the data column stays flex:1 on line 1). */
  flex-wrap: wrap;
}

.marine-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.marine-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.marine-line-label {
  font-size: var(--fs-body);
  color: var(--accent-blue-bright);
  white-space: nowrap;
}

/* Wind tile: Measured (NDBC) vs Forecast (NWS) shown as a Property | Measured | Forecast table,
   with a station selector + map link below. */
.wind-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* The Measured/Forecast table has no-wrap cells; at large text sizes let it
   scroll within its own column rather than overflow the card. */
.wind-block .wind-table {
  display: block;
  overflow-x: auto;
  scrollbar-width: thin;
}

.wind-table {
  width: 100%;
  border-collapse: collapse;
}

.wind-table th,
.wind-table td {
  text-align: left;
  padding: 3px 8px 3px 0;
  white-space: nowrap;
}

.wind-table thead th {
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-blue-title);
  border-bottom: 1px solid var(--glass-border);
}

.wind-table tbody th {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--accent-blue-bright);
}

.wind-table tbody td {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-primary);
}

.marine-station {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  line-height: 1.25;
}

/* Station name links to a map pin; amber ties it to the amber wind marker on the mini-map. */
.wind-station-link {
  color: #f59e0b;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.wind-station-link:hover {
  color: #fbbf24;
}

.marine-item {
  background: rgba(var(--fg-rgb), 0.02);
  border: 1px solid rgba(var(--fg-rgb), 0.05);
  padding: 14px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}

.marine-item:hover {
  background: rgba(var(--fg-rgb), 0.05);
  border-color: rgba(var(--fg-rgb), 0.1);
  transform: translateY(-2px);
}

.marine-icon-wrapper {
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.marine-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
}

.marine-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.marine-label {
  font-size: var(--fs-caption);
  color: var(--accent-blue-title);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.marine-val {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-primary);
}

/* Pressure tile: the value carries an inline 3-hour tendency, and a sparkline sits below it.
   As a tall two-row box, let the info column fill the height and pin the chart to the bottom,
   with the icon kept at the top so it lines up with the label. */
.marine-item-pressure {
  align-items: stretch;
}

.marine-item-pressure .marine-icon-wrapper {
  align-self: flex-start;
  margin-top: 2px;
}

.marine-item-pressure .marine-info {
  flex: 1;
}

.marine-item-pressure .pressure-spark {
  margin-top: auto; /* push the chart to the bottom of the tall box */
  max-width: none; /* use the full width of the wider pressure box */
}

.marine-item-pressure .pressure-spark-svg {
  height: 44px; /* taller chart now that the box spans two rows */
}

.pressure-trend {
  font-size: var(--fs-caption);
  font-weight: 700;
  white-space: nowrap;
}

/* "Steady" is the no-news state — render it as plain body text, not the bold caption the
   rising/falling/rapid states use, so it reads quietly but stays clearly legible. */
.pressure-steady {
  color: var(--text-primary);
  font-size: var(--fs-body);
  font-weight: 400;
}
.pressure-rising  { color: var(--accent-blue-bright); }
.pressure-falling { color: var(--accent-amber); }

/* Rapid change (>1.6 hPa/3h) is the actionable case — a front moving in. Make it shout. */
.pressure-rapid {
  color: hsl(8, 100%, 68%);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pressure-spark {
  margin-top: 4px;
  width: 100%;
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Window-length label at the oldest (left) end of the sparkline, e.g. "6h". */
.pressure-spark-label {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Net-change label at the "now" (right) end of the sparkline, mirroring the window label.
   Colored by direction (compound selectors keep these from being overridden). */
.pressure-spark-delta {
  font-size: var(--fs-body);
  font-weight: 700;
  flex-shrink: 0;
}
.pressure-spark-delta.is-up   { color: var(--accent-blue-bright); }
.pressure-spark-delta.is-down { color: var(--accent-amber); }
.pressure-spark-delta.is-flat { color: var(--text-primary); }

.pressure-spark-svg {
  flex: 1;
  min-width: 0;
  height: 26px;
  display: block;
  overflow: visible;
}

.pressure-spark-line {
  fill: none;
  stroke: var(--accent-blue);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.pressure-spark-dot {
  fill: var(--accent-blue-bright);
}

/* Compass Instrument Wrapper */
.wind-compass {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(var(--fg-rgb), 0.08);
  background: rgba(var(--fg-rgb), 0.02);
  position: relative;
  display: none; /* Hidden by default until we have a wind direction angle */
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.compass-dir {
  position: absolute;
  font-size: 7px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  user-select: none;
}

.compass-n { top: 3px; }
.compass-e { right: 4px; }
.compass-s { bottom: 3px; }
.compass-w { left: 4px; }

.wind-arrow-icon {
  width: 24px; /* Twice as long! */
  height: 24px;
  color: var(--accent-blue);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  transform: rotate(0deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* On phones the 48px compass dial crowds the Wind/Waves data and pushes the Measured/Forecast
   columns into a horizontal scroll. Drop the dial chrome + N/E/S/W labels and keep just the
   direction arrow, giving the data table the reclaimed width. The arrow still rotates to the
   bearing (JS sets its transform). */
@media (max-width: 480px) {
  .wind-compass {
    width: auto;
    height: auto;
    border: 0;
    background: none;
    box-shadow: none;
  }
  .wind-compass .compass-dir {
    display: none;
  }
  .marine-box-body {
    gap: 10px;
  }
}

/* Beaufort force color states, keyed to small-boat sailing suitability.
   Applies to both the Now-panel value and the Hourly/Daily table cells. Tokenized so the
   light theme can darken them — the dark-theme greens/reds are too pale to read on a light bg. */
.beaufort-light   { color: var(--beaufort-light); }   /* force 0-1: too little wind */
.beaufort-ideal   { color: var(--beaufort-ideal); }   /* force 2-4: best for small boats */
.beaufort-caution { color: var(--beaufort-caution); } /* force 5-6: experienced crew only */
.beaufort-danger  { color: var(--beaufort-danger); }  /* force 7+: gale and above */

/* Tides & water temperature (NOAA CO-OPS) */
.tides-station {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  text-transform: none;
  letter-spacing: normal;
  vertical-align: middle;
}

/* Tide-station dropdown: switch the station that drives the tides. */
.tides-station-select {
  font-family: inherit;
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: none;
  color: var(--text-secondary);
  background-color: rgba(var(--fg-rgb), 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 3px 22px 3px 8px;
  max-width: 220px;
  cursor: pointer;
  transition: var(--transition-smooth);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2399a0b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}

.tides-station-select:hover {
  color: var(--text-primary);
  border-color: rgba(var(--fg-rgb), 0.2);
}

.tides-station-select option {
  background: var(--surface-solid);
  color: var(--text-primary);
}

.tides-datum {
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* Tide level line chart (inline SVG built in renderTideChart) */
.tide-chart {
  background: rgba(var(--fg-rgb), 0.02);
  border: 1px solid rgba(var(--fg-rgb), 0.06);
  border-radius: var(--border-radius-md);
  padding: 8px 4px;
}

.tide-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Tide hi/lo table (renderTideTable) — the phone, large-text alternative to the SVG
   chart. One tide per row (4x1), each row: High/Low · time · level. */
.tide-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 4px;
}

.tide-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  background: rgba(var(--fg-rgb), 0.03);
  border: 1px solid rgba(var(--fg-rgb), 0.06);
  border-left-width: 3px;
}

.tide-cell-high {
  border-left-color: var(--accent-blue);
}

.tide-cell-low {
  border-left-color: var(--accent-amber);
}

.tide-cell-type {
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tide-cell-high .tide-cell-type {
  color: var(--accent-blue-bright);
}

.tide-cell-low .tide-cell-type {
  color: var(--accent-amber);
}

.tide-cell-time {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.tide-cell-level {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-primary);
}

.tide-area {
  fill: url(#tideFill);
}

.tide-line {
  fill: none;
  stroke: var(--accent-blue);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.tide-marker {
  stroke: rgba(15, 17, 35, 0.9);
  stroke-width: 1.5;
}

.tide-marker-high {
  fill: var(--accent-blue);
}

.tide-marker-low {
  fill: var(--accent-amber);
}

/* "Now" guide line + dot */
.tide-now-line {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.tide-now-dot {
  fill: var(--text-primary);
  stroke: var(--accent-blue);
  stroke-width: 2;
}

/* Tide-chart text that reads at regular body size. Grouped so the shared size lives
   in one place; each class below adds only its own fill / weight / anchor. */
.tide-chart-val,
.tide-chart-time,
.tide-day-label,
.tide-hour-label {
  font-size: var(--fs-tide-regular);
}

/* Hi/Lo water-level value */
.tide-chart-val {
  fill: var(--text-primary);
  font-weight: 600;
  text-anchor: middle;
}

.tide-chart-time {
  fill: var(--accent-blue-bright);
  text-anchor: middle;
}

/* MLLW chart-datum reference line */
.tide-datum {
  stroke: rgba(var(--fg-rgb), 0.12);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

/* Top axis row: baseline, matching 12 AM / 12 PM hour ticks, and centered day labels */
.tide-axis-base {
  stroke: rgba(var(--fg-rgb), 0.14);
  stroke-width: 1;
}

.tide-hour-tick {
  stroke: rgba(var(--fg-rgb), 0.32);
  stroke-width: 1.5;
}

.tide-hour-label {
  fill: var(--text-muted);
  font-weight: 500;
}

.tide-day-label {
  fill: var(--text-primary);
  font-weight: 600;
}

.tide-chart-axis {
  fill: var(--text-muted);
  font-size: 16px;
  text-anchor: end;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Active Marine Advisories Banner */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alerts-container:not(:empty) {
  margin-bottom: 4px;
}

.alert-banner {
  --alert-accent: var(--accent-amber);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(var(--fg-rgb), 0.12);
  background: #000;
  border-left: 4px solid var(--alert-accent);
  padding: 12px 16px;
  overflow: hidden;
}

/* Severity color coding — the accent drives both the left border and the title;
   background stays black for contrast */
.alert-banner.alert-extreme,
.alert-banner.alert-severe {
  --alert-accent: #ef4444;
}
.alert-banner.alert-moderate {
  --alert-accent: #f59e0b;
}
.alert-banner.alert-minor {
  --alert-accent: #facc15;
}

.alert-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.alert-summary::-webkit-details-marker {
  display: none;
}

.alert-summary::after {
  content: '▾';
  color: #fff;
  font-size: var(--fs-body);
  transition: transform 0.3s ease;
}

.alert-banner[open] .alert-summary::after {
  transform: rotate(180deg);
}

.alert-event {
  color: var(--alert-accent);
  font-size: var(--fs-header-sm);
  flex: 1;
}

.alert-ends {
  color: #fff;
  font-size: var(--fs-body);
  font-weight: 500;
  white-space: nowrap;
}

.alert-headline {
  color: #fff;
  font-size: var(--fs-body);
  margin-top: 8px;
  line-height: 1.4;
}

.alert-desc {
  /* Alert banners stay dark (#000) in both themes for urgency, so this text stays white
     rather than flipping with --fg-rgb. */
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-body);
  margin-top: 8px;
  line-height: 1.5;
  white-space: normal;
}

/* Card Footer and Meta */
.card-footer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px 32px;
}

.meta-row {
  display: flex;
  gap: 6px;
  font-size: var(--fs-small);
}

.meta-row.border-top {
  border-top: 1px solid rgba(var(--fg-rgb), 0.08);
  padding-top: 12px;
  margin-top: 4px;
}

.meta-label {
  color: var(--text-secondary);
}

.meta-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* Footer Section */
/* Footer — a glass panel mirroring the header bar, bookending the page content. */
.app-footer {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 24px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.footer-update {
  color: var(--text-muted);
}

.footer-update span {
  color: var(--text-secondary);
  font-weight: 500;
}

.app-footer a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.app-footer a:hover {
  text-decoration: underline;
  color: var(--text-primary);
}

/* Footer columns (Data | Maps | Status | More), each a small stacked list. A single
   row of 4 on desktop; collapses to a 2x2 grid on phones (see the mobile query).
   The grid is centered as a group. */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: center;
  align-items: start;
  gap: 22px 44px;
  text-align: left;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.footer-col-title {
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-blue-title);
  margin-bottom: 2px;
}

.version-tag {
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Thin rule between the footer columns and the copyright line. */
.footer-divider {
  width: 100%;
  max-width: 680px;
  height: 0;
  border: 0;
  border-top: 1px solid rgba(var(--fg-rgb), 0.08);
  margin: 6px 0;
}

.footer-copyright {
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  /* Reclaim horizontal space: use nearly the full width with small side padding,
     and trim the card padding so tiles/tables get more room before scrolling. */
  .app-container {
    width: 100%;
    padding: 16px 10px;
    gap: 16px;
  }
  .weather-dashboard-card {
    padding: 16px;
  }
  .temp-value {
    font-size: var(--fs-display);
  }
  .location-title {
    font-size: var(--fs-header-sm);
  }
  /* Header: shrink the wordmark + location and tighten the grid so wordmark · location · ?
     all fit one row without clipping on a phone. */
  .app-header {
    gap: 8px;
    padding: 10px 12px;
  }
  .logo-icon {
    width: 26px;
    height: 26px;
  }
  /* Hide the wordmark on phones — the icon alone carries the brand, leaving more
     room for the location + help in the header. */
  .logo-title {
    display: none;
  }
  .logo-location {
    font-size: var(--fs-header-sm);
  }
  /* Footer links collapse from one row of 4 to a 2x2 grid on phones. */
  .footer-columns {
    grid-template-columns: repeat(2, auto);
  }
  /* Stack the forecast row: Coastal Waters Forecast above the Beaufort + temperature column. */
  .now-forecast-row {
    grid-template-columns: 1fr;
  }
  .card-body .now-map-body {
    height: 220px;
  }
  .marine-grid {
    grid-template-columns: 1fr;
  }
  /* Location picker modal: trim padding and shorten the map so the name field + Save
     stay reachable without the modal fighting the map for scroll. */
  .location-modal {
    padding: 12px;
  }
  .location-modal-card {
    padding: 16px;
  }
  .location-map {
    height: 220px;
  }
  .location-modal-close {
    padding: 4px 10px;
  }
  .help-glossary dt {
    margin-top: 12px;
  }
}

/* --- Help / about page (help.html) --- */

/* Header "?" affordance on the dashboard — sits in the trailing 1fr header column. */
/* Trailing header controls (settings gear + help) in the third grid column. */
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-link,
.header-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.header-icon-link svg {
  width: 16px;
  height: 16px;
}

/* Theme toggle is a <button> wearing .header-icon-link — reset the native button box so it
   matches the anchor icons beside it. */
.theme-toggle {
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.help-link:hover,
.header-icon-link:hover {
  color: var(--text-primary);
  border-color: rgba(var(--fg-rgb), 0.15);
}

/* "Back to dashboard" link in the help-page header (trailing 1fr column). */
.help-back {
  justify-self: end;
  color: var(--accent-blue);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.help-back:hover {
  color: var(--text-primary);
}

/* Reading-friendly cards: keep the glass look but drop the hover lift so a page
   full of stacked cards stays calm, and give text comfortable spacing. */
.help-card {
  display: block;
}

.help-card:hover {
  transform: none;
  border-color: var(--glass-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.help-card + .help-card {
  margin-top: 24px;
}

.help-page-title {
  font-size: var(--fs-header-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.help-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 70ch;
}

.help-card p + p {
  margin-top: 12px;
}

.help-lede {
  color: var(--text-primary) !important;
  font-size: var(--fs-body);
}

.help-subhead {
  margin-top: 24px;
}

.help-note {
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--text-muted) !important;
}

.help-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(var(--fg-rgb), 0.06);
  color: var(--text-primary);
}

.help-card abbr {
  text-decoration: underline dotted;
  cursor: help;
}

/* Glossary: term + description rows. */
.help-glossary {
  margin: 0;
}

.help-glossary dt {
  color: var(--text-title);
  font-weight: 600;
  margin-top: 16px;
}

.help-glossary dt:first-child {
  margin-top: 0;
}

.help-glossary dd {
  margin: 4px 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 70ch;
}

.help-glossary dd strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Settings page: Units + Text size, grouped into labeled sections of rows. --- */
.settings-section + .settings-section {
  margin-top: 28px;
}

.settings-hint {
  margin: 6px 0 12px;
  font-size: var(--fs-small);
  color: var(--text-secondary) !important;
  line-height: 1.5;
  max-width: 60ch;
}

/* A setting: label on the left, its segmented control on the right. */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.settings-row + .settings-row {
  border-top: 1px solid rgba(var(--fg-rgb), 0.06);
}

.settings-row-label {
  color: var(--text-primary);
  font-weight: 500;
}

/* Text-size control: each button shows an "A" growing left-to-right to preview the steps. */
.text-size-toggle .unit-btn {
  line-height: 1;
}
.text-size-toggle .unit-btn:nth-child(1) { font-size: 0.85rem; }
.text-size-toggle .unit-btn:nth-child(2) { font-size: 1rem; }
.text-size-toggle .unit-btn:nth-child(3) { font-size: 1.2rem; }
.text-size-toggle .unit-btn:nth-child(4) { font-size: 1.45rem; }

/* Theme picker (Settings): each option pairs its word with its own icon, so the header
   toggle's sun/moon glyphs are self-explanatory. */
.theme-select-toggle .unit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.theme-select-toggle .unit-btn svg {
  width: 1.05em;
  height: 1.05em;
}

/* --- Coastal Waters Forecast (worded) shared styles --- */

/* Forecaster's overview paragraph, shown above the period breakdown on the Now + Daily tabs. */
.marine-synopsis {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent-blue);
  border-radius: 6px;
  background: var(--glass-bg);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 75ch;
}

.marine-empty {
  margin: 0;
  color: var(--text-muted);
}

/* Coastal Waters Forecast summary on the Now tab — the 3/4 cell of .now-forecast-row (the row
   itself carries the top-border separator from the map above). */
.now-marine-forecast {
  min-width: 0;
}

.now-marine-forecast .marine-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* The synopsis reuses .marine-synopsis (border-left accent block). The current period below it: */
.now-marine-current {
  margin-top: 4px;
}

.now-marine-period-label {
  display: block;
  color: var(--accent-blue-title);
  font-weight: 600;
  font-size: var(--fs-small);
  text-transform: capitalize;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.now-marine-period-list {
  margin: 0;
  padding-left: 1.2em;
  list-style: none;
  max-width: 75ch;
}

.now-marine-period-list li {
  position: relative;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 2px 0;
}

/* Custom bullet in the accent blue, hung in the left padding. */
.now-marine-period-list li::before {
  content: "";
  position: absolute;
  left: -1em;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.now-marine-period-list li.marine-empty::before {
  display: none;
}

/* Coastal Waters Forecast multi-day outlook on the Daily tab, below the data table. */
.daily-marine-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(var(--fg-rgb), 0.08);
}

.daily-marine-section .marine-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* Forecast table: reuses .hourly-table structure (sticky header, zebra) but holds wrapping
   prose, so left-align and top-align the cells instead of the data table's right/nowrap. */
.cwf-table tbody td,
.cwf-table thead th {
  text-align: left;
  white-space: normal;
  vertical-align: top;
}

.cwf-table .cwf-day {
  color: var(--accent-blue-title);
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
  width: 1%; /* shrink the Day column to its content; Forecast takes the rest */
  padding-right: 16px;
}

.cwf-table .cwf-forecast {
  color: var(--text-secondary);
  line-height: 1.5;
  width: 50%; /* split the remaining width evenly between Daytime and Night */
  padding-right: 16px;
}

.cwf-table .cwf-none {
  color: var(--text-muted);
  text-align: center;
}

/* This table shows in full — no inner scroll (overrides .hourly-table-wrap). */
.cwf-table-wrap {
  max-height: none;
  overflow: visible;
}
