/* Blue Springs Weather - Main Stylesheet */
/* Professional, accessible, SEO-friendly, dark-mode ready */

:root {
  /* Light theme (default) */
  --bg-primary: #f4f7fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8eef6;
  --bg-card: #ffffff;
  --text-primary: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --accent: #0b5cab;
  --accent-hover: #094a8c;
  --accent-light: #e6f0fa;
  --danger: #c53030;
  --warning: #d69e2e;
  --success: #276749;
  --border: #d1d9e6;
  --shadow: 0 4px 16px rgba(26, 35, 50, 0.08);
  --shadow-lg: 0 10px 30px rgba(26, 35, 50, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --header-bg: #0b3d6e;
  --header-text: #ffffff;
  --ticker-bg: #0b3d6e;
  --ticker-text: #f0f7ff;
  --alert-bg: #fff5f5;
  --alert-border: #fc8181;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --bg-primary: #0f1419;
  --bg-secondary: #1a2332;
  --bg-tertiary: #243044;
  --bg-card: #1a2332;
  --text-primary: #e8eef6;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
  --accent: #3b9eff;
  --accent-hover: #63b3ed;
  --accent-light: #1a365d;
  --danger: #fc8181;
  --warning: #f6e05e;
  --success: #68d391;
  --border: #2d3748;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
  --header-bg: #0a1929;
  --header-text: #e8eef6;
  --ticker-bg: #0a1929;
  --ticker-text: #bee3f8;
  --alert-bg: #2d1a1a;
  --alert-border: #c53030;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ========== HEADER ========== */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--header-text);
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--header-text); opacity: 0.95; }
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-main a {
  color: rgba(255,255,255,0.88);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-main a:hover,
.nav-main a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: background var(--transition);
}
.theme-toggle:hover { background: rgba(255,255,255,0.2); }

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ========== TICKER ========== */
.news-ticker {
  background: var(--ticker-bg);
  color: var(--ticker-text);
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  height: 36px;
  display: flex;
  align-items: center;
  position: relative;
}
.ticker-label {
  background: #c53030;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0 0.75rem;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 2;
}
.ticker-track {
  display: inline-flex;
  animation: ticker-scroll linear infinite;
  padding-left: 100%;
}
.ticker-track span {
  padding: 0 2.5rem;
  font-size: 0.88rem;
  font-weight: 500;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ========== BANNER SLOT ========== */
.banner-slot {
  max-width: 1280px;
  margin: 1rem auto 0;
  padding: 0 1.25rem;
}
.banner-slot:empty { display: none; }
.banner-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.banner-content img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
}
.banner-content a { display: block; }
.banner-html {
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.95rem;
}

/* ========== LAYOUT ========== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .main-grid { grid-template-columns: 1fr; }

  .site-header {
    position: sticky;
    top: 0;
  }

  .header-inner {
    position: relative;
    flex-wrap: nowrap;
  }

  .nav-main {
    display: none;
  }

  .nav-main.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    left: 0;
    right: 0;

    /* Keep the menu below the public header/ticker area and inside the
       visible browser viewport. dvh follows mobile Safari's dynamic UI. */
    top: var(--public-mobile-menu-top, 110px);
    height: calc(100dvh - var(--public-mobile-menu-top, 110px));
    max-height: calc(100dvh - var(--public-mobile-menu-top, 110px));

    background: var(--header-bg);
    padding: 0.75rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 1200;
  }

  /* Fallback for browsers without dynamic viewport units. */
  @supports not (height: 100dvh) {
    .nav-main.open {
      height: calc(100vh - var(--public-mobile-menu-top, 110px));
      max-height: calc(100vh - var(--public-mobile-menu-top, 110px));
    }
  }

  .nav-main.open a,
  .nav-main.open button,
  .nav-main.open .public-login-link {
    flex: 0 0 auto;
  }

  .nav-main.open a {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    min-height: 48px;
  }

  .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }

  body.public-menu-open {
    overflow: hidden;
    touch-action: none;
  }
}

/* ========== CARDS ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.card-header h2, .card-header h3 {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.card-body { padding: 1.15rem; }

/* ========== ALERT WIDGET ========== */
.alert-widget {
  border: 2px solid var(--alert-border);
  background: var(--alert-bg);
}
.alert-widget .card-header {
  background: linear-gradient(90deg, #c53030, #9b2c2c);
  color: #fff;
  border-bottom: none;
}
.alert-widget .card-header h2 { color: #fff; }
.alert-list { list-style: none; }
.alert-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.alert-item:last-child { border-bottom: none; }
.alert-event {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.alert-event.tornado-emergency { color: #c53030; font-size: 1.05rem; }
.alert-event.tornado-warning { color: #c53030; }
.alert-event.severe-warning { color: #dd6b20; }
.alert-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.alert-headline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.no-alerts {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
}
.no-alerts .icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.6; }

/* ========== CURRENT CONDITIONS / SPACE WEATHER ========== */
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 0.75rem;
}
.condition-box {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  text-align: center;
}
.condition-box .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.condition-box .value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.condition-box .unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.space-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-top: 0.85rem;
}
.space-status .indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(39, 103, 73, 0.25);
}
.space-status .indicator.active {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.3);
  animation: pulse 1.5s infinite;
}
.space-status .indicator.severe {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.3);
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.space-status .text { font-size: 0.9rem; }
.space-status .text strong { display: block; margin-bottom: 0.15rem; }

/* ========== SPACE WEATHER GALLERY ========== */
.space-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}
.space-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.65rem 0 0.85rem;
  line-height: 1.45;
}
.space-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.space-metric {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  padding: 0.55rem 0.65rem;
  min-width: 0;
}
.space-metric .sm-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.space-metric .sm-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.25;
  white-space: normal;
}
.space-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.space-shot {
  margin: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.space-shot a {
  display: block;
  background: #000;
}
.space-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  vertical-align: middle;
}
.space-shot figcaption {
  padding: 0.5rem 0.65rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.35;
}
.space-shot figcaption strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.82rem;
  color: var(--text-primary);
}
.space-shot figcaption span {
  color: var(--text-muted);
}
.space-gallery-loading {
  grid-column: 1 / -1;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.space-credits {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.space-credits a {
  color: var(--accent, #3b82f6);
}
@media (max-width: 720px) {
  .space-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .space-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }
  .space-shot figcaption {
    padding: 0.4rem 0.5rem 0.5rem;
    font-size: 0.72rem;
  }
  .space-shot figcaption strong { font-size: 0.76rem; }
}
@media (max-width: 420px) {
  .space-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .space-gallery {
    grid-template-columns: 1fr;
  }
  .space-shot img {
    max-height: 70vw;
    margin: 0 auto;
  }
}
@media (min-width: 900px) {
  .space-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .space-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .space-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ========== EARTHQUAKES ========== */
.quake-list { list-style: none; }
.quake-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.quake-item:last-child { border-bottom: none; }
.mag {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
  background: #48bb78;
}
.mag.m3 { background: #ecc94b; color: #1a202c; }
.mag.m4 { background: #ed8936; }
.mag.m5 { background: #e53e3e; }
.mag.m6 { background: #9b2c2c; }
.quake-info { flex: 1; min-width: 0; }
.quake-place { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quake-meta { font-size: 0.78rem; color: var(--text-muted); }

/* ========== ARTICLES / FORECASTS ========== */
.article-card {
  padding: 1.15rem;
  border-bottom: 1px solid var(--border);
}
.article-card:last-child { border-bottom: none; }
.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}
.article-card h3 a { color: var(--text-primary); }
.article-card h3 a:hover { color: var(--accent); }
.article-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}
.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== SIDEBAR ========== */
.sidebar .card { margin-bottom: 1.25rem; }
.sidebar .card:last-child { margin-bottom: 0; }

/* ========== FOOTER ========== */
.site-footer {
  margin-top: 3rem;
  background: var(--header-bg);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.footer-brand p { font-size: 0.88rem; line-height: 1.55; max-width: 360px; }
.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ========== UTILITIES ========== */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
}
.badge.severe { background: #fed7d7; color: #c53030; }
[data-theme="dark"] .badge.severe { background: #742a2a; color: #fc8181; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.82rem; }
.loading {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

/* ========== PAGE: ARTICLE SINGLE ========== */
.article-full {
  max-width: 760px;
  margin: 0 auto;
}
.article-full h1 {
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.article-full .meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}
.article-full .content {
  font-size: 1.05rem;
  line-height: 1.7;
}
.article-full .content p { margin-bottom: 1.1rem; }
.article-full .content h2 { font-size: 1.35rem; margin: 1.75rem 0 0.75rem; }
.article-full .content ul { margin: 0 0 1.1rem 1.25rem; }

/* ========== ADMIN shared (light overrides) ========== */
.admin-body { background: #f0f4f8; }
[data-theme="dark"] .admin-body { background: #0f1419; }


/* Latest observation widget — responsive CSS grid */
.obs-widget-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
}

.obs-widget-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.obs-widget-date {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.obs-widget-time {
  font-weight: 600;
  justify-self: end;
}

/* Fluid stat grid: 2 → 3 → 6 columns */
.obs-widget-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
}

@media (min-width: 380px) {
  .obs-widget-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 640px) {
  .obs-widget-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

.obs-stat {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: center;
  justify-items: center;
  gap: 0.15rem;
  min-width: 0;
  background: var(--bg-secondary, var(--bg-tertiary, rgba(0,0,0,.04)));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.4rem;
  text-align: center;
}

.obs-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.2;
}

.obs-stat-value {
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  word-break: break-word;
}

@media (max-width: 379px) {
  .obs-widget-meta {
    grid-template-columns: 1fr;
  }
  .obs-widget-time {
    justify-self: start;
  }
}

.ticker-track a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ticker-track a:hover { opacity: 0.9; }
.footer-brand-body p, .footer-col-body p { margin: 0 0 0.5rem; }
.footer-col-body ul { list-style: none; padding: 0; margin: 0; }
.footer-col-body a { color: inherit; }


/* Floating site chatbot */
.bsw-chatbot {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9990;
  font-family: inherit;
}
.bsw-chatbot-toggle {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  border: 2px solid rgba(11, 61, 110, 0.35);
  cursor: pointer;
  background: #ffffff;
  color: #0b3d6e;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s ease,
              border-color 0.25s ease,
              background-color 0.25s ease;
  animation: bsw-chatbot-idle 3.2s ease-in-out infinite;
}
.bsw-chatbot-toggle:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 10px 28px rgba(11, 61, 110, 0.35), 0 0 0 6px rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  animation: none;
}
.bsw-chatbot-toggle:active {
  transform: translateY(-1px) scale(0.96);
  transition-duration: 0.12s;
}
.bsw-chatbot-robot {
  width: 2.15rem;
  height: 2.15rem;
  display: block;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bsw-chatbot-toggle:hover .bsw-chatbot-robot {
  transform: rotate(-8deg) scale(1.08);
  animation: bsw-chatbot-wiggle 0.55s ease;
}
[data-theme="dark"] .bsw-chatbot-toggle {
  background: #0f172a;
  border-color: rgba(56, 189, 248, 0.45);
}
[data-theme="dark"] .bsw-chatbot-toggle:hover {
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.35), 0 0 0 6px rgba(56, 189, 248, 0.15);
  border-color: #7dd3fc;
  background: #1e293b;
}
@keyframes bsw-chatbot-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes bsw-chatbot-wiggle {
  0% { transform: rotate(0) scale(1); }
  25% { transform: rotate(10deg) scale(1.1); }
  50% { transform: rotate(-10deg) scale(1.08); }
  75% { transform: rotate(6deg) scale(1.1); }
  100% { transform: rotate(-8deg) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .bsw-chatbot-toggle,
  .bsw-chatbot-robot {
    animation: none !important;
    transition: none !important;
  }
  .bsw-chatbot-toggle:hover {
    transform: none;
  }
}
.bsw-chatbot-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: 4.1rem;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(520px, 70vh);
  background: var(--bg-card, #fff);
  color: var(--text, #111);
  border: 1px solid var(--border, #ddd);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  flex-direction: column;
  overflow: hidden;
}
.bsw-chatbot.is-open .bsw-chatbot-panel { display: flex; }
.bsw-chatbot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #0b3d6e;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}
.bsw-chatbot-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.bsw-chatbot-log {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 220px;
  max-height: 340px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.bsw-chatbot-msg {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  max-width: 95%;
  white-space: pre-wrap;
  word-break: break-word;
}
.bsw-chatbot-msg--bot {
  align-self: flex-start;
  background: var(--bg-muted, #f1f5f9);
}
.bsw-chatbot-msg--user {
  align-self: flex-end;
  background: #0b3d6e;
  color: #fff;
}
.bsw-chatbot-thinking { opacity: 0.7; font-style: italic; }
.bsw-chatbot-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem;
  border-top: 1px solid var(--border, #ddd);
}
.bsw-chatbot-input {
  flex: 1;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border, #ccc);
  border-radius: 8px;
  font: inherit;
}
.bsw-chatbot-send {
  padding: 0.5rem 0.85rem;
  border: none;
  border-radius: 8px;
  background: #0b3d6e;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
.bsw-chatbot-note {
  font-size: 0.68rem;
  color: var(--text-muted, #666);
  padding: 0 0.75rem 0.5rem;
}


/* Homepage layout polish */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}
@media (min-width: 960px) {
  .main-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
    gap: 1.5rem;
    align-items: start;
  }
}
.primary,
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.primary > .card,
.sidebar > .card {
  margin-top: 0 !important; /* override inline leftovers */
}
.card-header h2,
.card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.card-action {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent, #0b3d6e);
  white-space: nowrap;
}
.card-action:hover { text-decoration: underline; }
.card-conditions .conditions-grid {
  margin: 0;
}
.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}
.resource-list li {
  margin: 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.resource-list li:last-child { border-bottom: none; }
.resource-list a {
  display: block;
  padding: 0.55rem 0;
  text-decoration: none;
  color: inherit;
}
.resource-list a:hover {
  color: var(--accent, #0b3d6e);
}
.nav-main a.nav-admin {
  opacity: 0.75;
  font-size: 0.92em;
}
.site-header .nav-main {
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
}
.sidebar .card-body {
  font-size: 0.92rem;
}
/* Reduce visual noise on mobile nav */
@media (max-width: 720px) {
  .nav-main a.nav-admin { display: none; }
}


/* === Responsive: phone / tablet / desktop ===
   Phone:  max-width 639px
   Tablet: 640px – 1023px
   Desktop: 1024px+
*/
:root {
  --page-pad: 1.25rem;
}
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
  box-sizing: border-box;
}

/* Desktop default (1024+) */
@media (min-width: 1024px) {
  :root { --page-pad: 1.5rem; }
  .main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 1.5rem;
    align-items: start;
  }
  .nav-main {
    display: flex;
    flex-wrap: wrap;
    max-width: min(720px, 58vw);
  }
  .nav-main a {
    font-size: 0.88rem;
    padding: 0.4rem 0.65rem;
  }
  .menu-toggle { display: none !important; }
  .conditions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-inner {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 1.5rem;
  }
  .bsw-chatbot {
    right: 1.25rem;
    bottom: 1.25rem;
  }
}

/* Tablet (640–1023) */
@media (min-width: 640px) and (max-width: 1023px) {
  :root { --page-pad: 1.15rem; }
  .main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
  /* On tablet: nav can wrap or use hamburger if crowded — use collapsible */
  .header-inner {
    flex-wrap: wrap;
  }
  .nav-main {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    order: 5;
    padding: 0.35rem 0 0.5rem;
  }
  .nav-main.open {
    display: flex;
  }
  .nav-main a {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
  }
  .menu-toggle {
    display: block !important;
  }
  .conditions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .card-header h2,
  .card-header h3 {
    font-size: 1.02rem;
  }
  .bsw-chatbot-panel {
    width: min(380px, calc(100vw - 2rem));
  }
}

/* Phone (<640) */
@media (max-width: 639px) {
  :root { --page-pad: 0.85rem; }
  .header-inner {
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
  }
  .logo {
    font-size: 0.98rem;
    gap: 0.45rem;
  }
  .logo-icon {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
  .logo span:not(.logo-icon) {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-main {
    display: none;
    width: 100%;
    flex-direction: column;
    order: 10;
    background: rgba(0,0,0,0.12);
    margin: 0.25rem -0.15rem 0;
    padding: 0.4rem;
    border-radius: 10px;
  }
  .nav-main.open {
    display: flex;
  }
  .nav-main a {
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .menu-toggle {
    display: block !important;
    min-width: 44px;
    min-height: 44px;
  }
  .main-grid {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    padding-top: 0.85rem;
    padding-bottom: 5.5rem; /* room for floating chatbot */
  }
  .conditions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }
  .condition-box {
    padding: 0.7rem 0.5rem;
  }
  .condition-box .value {
    font-size: 1.15rem;
  }
  .card {
    border-radius: 12px;
  }
  .card-header {
    padding: 0.75rem 0.9rem;
  }
  .card-body {
    padding: 0.85rem 0.9rem;
  }
  .card-header h2,
  .card-header h3 {
    font-size: 0.98rem;
  }
  .news-ticker {
    height: 32px;
  }
  .ticker-track span {
    font-size: 0.8rem;
    padding: 0 1.5rem;
  }
  .footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    font-size: 0.78rem;
  }
  .obs-widget-grid,
  .obs-stats {
    grid-template-columns: 1fr 1fr !important;
  }
  .bsw-chatbot {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .bsw-chatbot-panel {
    width: calc(100vw - 1.5rem);
    max-height: min(70vh, 480px);
    right: 0;
  }
  .site-footer {
    padding-bottom: 1rem;
  }
  /* Touch-friendly forms/buttons on public pages */
  .btn {
    min-height: 44px;
  }
}

/* Very small phones */
@media (max-width: 379px) {
  .conditions-grid {
    grid-template-columns: 1fr 1fr;
  }
  .logo span:not(.logo-icon) {
    max-width: 36vw;
  }
}

/* Large desktop */
@media (min-width: 1280px) {
  .conditions-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Print: hide chrome */
@media print {
  .site-header .nav-main,
  .menu-toggle,
  .theme-toggle,
  .bsw-chatbot,
  .news-ticker {
    display: none !important;
  }
}


/* Mobile nav panel */
.menu-toggle {
  display: none;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
}
.menu-toggle.is-open {
  background: rgba(255,255,255,0.22);
}
.menu-toggle .menu-icon-close { display: none; }
.menu-toggle.is-open .menu-icon-bars { display: none; }
.menu-toggle.is-open .menu-icon-close { display: inline; }

@media (max-width: 1023px) {
  .menu-toggle {
    display: inline-flex !important;
  }
  .header-inner {
    position: relative;
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }
  .header-actions {
    margin-left: auto;
  }
  .nav-main {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    order: 20;
    flex-basis: 100%;
    max-width: none !important;
    gap: 0.2rem;
    margin: 0.35rem 0 0.15rem;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  }
  .nav-main.open {
    display: flex !important;
  }
  .nav-main a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    color: #fff;
  }
  .nav-main a:hover,
  .nav-main a:focus,
  .nav-main a.active {
    background: rgba(255,255,255,0.16);
    color: #fff;
  }
  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 639px) {
  .logo span:not(.logo-icon) {
    font-size: 0.95rem;
  }
  .nav-main a {
    min-height: 52px;
    font-size: 1.05rem;
  }
}


/* Per-visitor widget layout (local only) */
.widget-layout-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0.75rem 0 0.25rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-tertiary, rgba(0,0,0,0.04));
  border-radius: 8px;
}
.widget-layout-hint { flex: 1; min-width: 180px; }
.widget-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.widget-header h2,
.widget-header h3 {
  flex: 1;
  min-width: 8rem;
}
.widget-drag {
  cursor: grab;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.25rem 0.35rem;
  line-height: 1;
  border-radius: 4px;
}
.widget-drag:active { cursor: grabbing; }
.widget-drag:hover { background: rgba(0,0,0,0.06); color: var(--text-primary); }
.widget-accordion {
  border: 1px solid var(--border, #ddd);
  background: var(--bg-primary, #fff);
  color: var(--text-secondary);
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
}
.widget-accordion:hover { border-color: var(--accent, #0b3d6e); }
.widget-card.is-collapsed .widget-body { display: none !important; }
.widget-card.is-dragging {
  opacity: 0.55;
  outline: 2px dashed var(--accent, #0b3d6e);
}
.widget-card.drag-over {
  box-shadow: 0 0 0 2px var(--accent, #38bdf8);
}
.widget-move {
  display: none;
  gap: 0.2rem;
}
.widget-move button {
  border: 1px solid var(--border, #ddd);
  background: var(--bg-primary);
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.65rem;
  color: var(--text-muted);
}
@media (max-width: 1023px) {
  .widget-move { display: inline-flex; }
  .widget-drag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .widget-card { transition: none; }
}


.space-shot.img-failed img {
  opacity: 0.35;
  object-fit: contain;
  background: repeating-linear-gradient(45deg, #222, #222 8px, #2a2a2a 8px, #2a2a2a 16px);
}
.space-shot.img-failed figcaption span::after {
  content: " (temporarily unavailable)";
}

/* Authenticated public-menu logoff control */
.public-logoff-form { display: inline-flex; margin: 0; padding: 0; }
.public-logoff-button {
  appearance: none; border: 0; background: transparent; color: inherit;
  font: inherit; font-weight: 500; cursor: pointer; padding: 0;
}
.public-logoff-button:hover, .public-logoff-button:focus-visible { color: var(--accent); text-decoration: underline; }
.nav-main .public-logoff-form { align-items: center; }
@media (max-width: 768px) {
  .nav-main .public-logoff-form, .nav-main .public-logoff-button { width: 100%; }
  .nav-main .public-logoff-button { text-align: left; padding: 0.7rem 0; }
}

/* Storm Spotter public activation banner */
.spotter-activation-alert {
  color: #fff;
  position: relative;
  z-index: 1200;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.spotter-activation-alert.spotter-status-not_needed {
  background: linear-gradient(90deg, #0d5f32, #16844a, #0d5f32);
  border-bottom: 3px solid #083d21;
  box-shadow: 0 3px 10px rgba(8, 61, 33, .28);
}
.spotter-activation-alert.spotter-status-standby {
  background: linear-gradient(90deg, #d39b00, #ffd23f, #d39b00);
  color: #1f1a00;
  border-bottom: 3px solid #8b6500;
  box-shadow: 0 3px 10px rgba(139, 101, 0, .25);
}
.spotter-activation-alert.spotter-status-activate {
  background: linear-gradient(90deg, #86000d, #c4122f, #86000d);
  border-bottom: 3px solid #5b0008;
  box-shadow: 0 3px 10px rgba(85, 0, 10, .28);
}
.spotter-activation-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .7rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.spotter-activation-title {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .85rem;
}
.spotter-activation-status {
  font-size: 1.05rem;
  font-weight: 800;
}
@media (max-width: 560px) {
  .spotter-activation-inner { flex-direction: column; gap: .15rem; }
}

/* Storm Spotter v2 */
.spotter-activation-alert { width:100%; }
.spotter-activation-inner { min-height:64px; }
.spotter-activation-icon { width:40px;height:40px;border:2px solid currentColor;border-radius:50%;display:grid;place-items:center;font-size:1.35rem;font-weight:900;flex:0 0 auto;box-shadow:0 2px 8px rgba(0,0,0,.18); }
.spotter-activation-copy { display:flex;align-items:center;justify-content:center;gap:.8rem;flex-wrap:wrap; }
.spotter-activation-note { width:100%;font-size:.9rem;font-weight:600; }
.spotter-activation-meta { width:100%;opacity:.88;font-size:.74rem; }
@media(max-width:560px){.spotter-activation-copy{gap:.2rem;flex-direction:column}.spotter-activation-inner{padding:.55rem .8rem}.spotter-activation-icon{width:34px;height:34px}}

/* Active alert detail enhancements */
.alert-time {
  margin: 0.3rem 0 0.45rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.alert-summary {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.alert-source-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.65rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--link-color, #2563eb);
  text-decoration: none;
}
.alert-source-link:hover,
.alert-source-link:focus-visible {
  text-decoration: underline;
}

/* Forecast readability in both themes. */
.forecast-temp-card {
  padding: 0.55rem;
  border-radius: 8px;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.forecast-temp-high { background: rgba(220, 38, 38, 0.10); }
.forecast-temp-low { background: rgba(37, 99, 235, 0.10); }
.forecast-content {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.forecast-content :where(p, li, span, div, strong, em, b, i, h1, h2, h3, h4, h5, h6) {
  color: inherit !important;
  background-color: transparent !important;
}
.forecast-content a { color: var(--accent) !important; }
.forecast-author {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}
[data-theme="dark"] .forecast-temp-high {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.35);
}
[data-theme="dark"] .forecast-temp-low {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.35);
}
[data-theme="dark"] .forecast-content { color: var(--text-primary); }

/* Responsive pointer-based widget rearranging */
.widget-drag {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  min-width: 2.25rem;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.widget-layout-dragging,
.widget-layout-dragging body {
  overflow-x: hidden;
  overscroll-behavior: none;
}
.widget-drag-ghost {
  position: fixed !important;
  inset: 0 auto auto 0;
  z-index: 100000;
  margin: 0 !important;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 18px 50px rgba(0,0,0,.32);
  transform-origin: top left;
  overflow: hidden;
}
.widget-drop-placeholder {
  width: 100%;
  min-height: 72px;
  border: 2px dashed var(--accent, #38bdf8);
  border-radius: 10px;
  background: rgba(56,189,248,.10);
  background: color-mix(in srgb, var(--accent, #38bdf8) 12%, transparent);
  box-sizing: border-box;
}
.widget-card.is-dragging {
  opacity: 0;
}
.widget-move button:disabled {
  opacity: .35;
  cursor: not-allowed;
}
@media (max-width: 1023px) {
  .widget-drag { display: inline-flex; }
  .widget-move { display: inline-flex; }
  .widget-layout-hint::after { content: " Touch and drag works on this screen."; }
}
@media (min-width: 1024px) {
  .widget-move { display: none; }
}



/* Public donation widget */
.donation-widget .card-header{align-items:center}
.donation-message{margin:0 0 .9rem;line-height:1.55;color:var(--text-secondary)}
.donation-options{display:grid;grid-template-columns:1fr;gap:.55rem}
.donation-option{
  display:flex;align-items:center;justify-content:space-between;gap:.75rem;
  min-height:46px;padding:.72rem .85rem;border:1px solid var(--border-color);
  border-radius:10px;background:var(--surface-2,rgba(127,127,127,.06));
  color:var(--text-color);text-decoration:none;font-weight:650;
  transition:transform .15s ease,border-color .15s ease,background .15s ease;
}
.donation-option:hover,.donation-option:focus-visible{
  transform:translateY(-1px);border-color:var(--accent,#2f80ed);
  background:color-mix(in srgb,var(--accent,#2f80ed) 9%,var(--surface,#fff));
  outline:none;
}
.donation-option-arrow{font-size:1.05rem;color:var(--text-muted)}
.donation-security-note{margin:.8rem 0 0;font-size:.76rem;line-height:1.45;color:var(--text-muted)}
[data-theme="dark"] .donation-option{background:rgba(255,255,255,.045);color:var(--text-color)}
[data-theme="dark"] .donation-option:hover,[data-theme="dark"] .donation-option:focus-visible{background:rgba(255,255,255,.085)}
@media (min-width:640px) and (max-width:1023px){
  .donation-options{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:639px){
  .donation-option{min-height:50px;padding:.82rem .9rem}
}


/* Facebook and Messenger public share controls */
.fb-share-bar{
  display:flex;align-items:center;justify-content:center;gap:.55rem;
  flex-wrap:wrap;margin:1rem auto;padding:0 .75rem;
}
.fb-share-bar .btn{min-height:42px;display:inline-flex;align-items:center;gap:.45rem}
.fb-share-bar [data-fb-share] span[aria-hidden="true"]{
  display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;
  font-weight:800;font-family:Arial,sans-serif;
}
.fb-share-status{flex-basis:100%;min-height:1em;text-align:center;font-size:.76rem;color:var(--text-muted)}
[data-theme="dark"] .fb-share-bar .btn{color:var(--text-color)}
@media(max-width:639px){
  .fb-share-bar{display:grid;grid-template-columns:1fr;max-width:420px}
  .fb-share-bar .btn{width:100%;justify-content:center;min-height:48px}
  .fb-share-status{grid-column:1}
}


/* Active NWS alert event emphasis */
.alert-event.heat-alert{
  border-color:#d97706;
  background:rgba(217,119,6,.12);
}
.alert-event.watch-alert{
  border-color:#ca8a04;
  background:rgba(202,138,4,.10);
}
.alert-event.advisory-alert{
  border-color:#7c3aed;
  background:rgba(124,58,237,.10);
}
.alert-event.statement-alert{
  border-color:var(--border-color);
  background:var(--bg-secondary,rgba(127,127,127,.08));
}
[data-theme="dark"] .alert-event.heat-alert{background:rgba(245,158,11,.18)}
[data-theme="dark"] .alert-event.watch-alert{background:rgba(234,179,8,.16)}
[data-theme="dark"] .alert-event.advisory-alert{background:rgba(139,92,246,.18)}


/* Consistent public-page return navigation */
.public-back-home-wrap{
  width:min(1180px,calc(100% - 2rem));
  margin:.85rem auto 0;
  position:relative;
  z-index:5;
}
.public-back-home{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  min-height:42px;
  padding:.55rem .85rem;
  border:1px solid var(--border-color,var(--border,#cbd5e1));
  border-radius:999px;
  background:var(--bg-card,var(--bg-secondary,#fff));
  color:var(--text-primary,#172033);
  font-weight:650;
  text-decoration:none;
  box-shadow:0 2px 10px rgba(15,23,42,.08);
}
.public-back-home:hover,
.public-back-home:focus-visible{
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow:0 4px 14px rgba(15,23,42,.14);
}
.public-back-home:focus-visible{
  outline:3px solid rgba(37,99,235,.35);
  outline-offset:2px;
}
@media(max-width:640px){
  .public-back-home-wrap{width:calc(100% - 1.2rem);margin:.65rem auto 0}
  .public-back-home{min-height:44px;padding:.58rem .8rem;font-size:.92rem}
}


/* =========================================================
   Public navigation — desktop / tablet / mobile
   ========================================================= */

/* Desktop: keep full menu visible, allow graceful wrapping if needed. */
@media (min-width: 1200px) {
  .header-inner {
    flex-wrap: nowrap;
    align-items: center;
  }

  .logo {
    flex: 0 0 auto;
  }

  .nav-main {
    display: flex;
    flex: 1 1 auto;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
    min-width: 0;
  }

  .nav-main a,
  .public-login-link,
  .public-logoff-button {
    white-space: nowrap;
    font-size: 0.88rem;
    padding: 0.42rem 0.68rem;
  }

  .header-actions {
    flex: 0 0 auto;
  }

  .menu-toggle {
    display: none !important;
  }
}

/* Smaller desktop / landscape tablet:
   use the hamburger menu before the links become cramped. */
@media (min-width: 961px) and (max-width: 1199px) {
  .header-inner {
    flex-wrap: nowrap;
  }

  .logo {
    flex: 1 1 auto;
    min-width: 0;
  }

  .logo span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-main {
    display: none;
  }

  .menu-toggle {
    display: grid !important;
    place-items: center;
  }

  .nav-main.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--public-mobile-menu-top, 76px);
    height: calc(100dvh - var(--public-mobile-menu-top, 76px));
    max-height: calc(100dvh - var(--public-mobile-menu-top, 76px));
    padding: 0.75rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    background: var(--header-bg);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-lg);
    z-index: 1200;
  }

  .nav-main.open a,
  .nav-main.open .public-login-link,
  .nav-main.open .public-logoff-button {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 1rem;
    text-align: left;
    flex: 0 0 auto;
  }

  .nav-main.open .public-logoff-form {
    width: 100%;
  }
}

/* Tablet portrait / mobile: compact header and independently scrolling menu. */
@media (max-width: 960px) {
  .site-header {
    width: 100%;
  }

  .header-inner {
    width: 100%;
    max-width: none;
    padding: 0.65rem 0.8rem;
    gap: 0.55rem;
  }

  .logo {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1rem;
  }

  .logo-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
  }

  .logo span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 0.45rem;
  }

  .theme-toggle,
  .menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .nav-main.open {
    width: 100%;
    padding-left: max(0.85rem, env(safe-area-inset-left));
    padding-right: max(0.85rem, env(safe-area-inset-right));
  }
}

/* Narrow phones: reduce brand text slightly, retain 44px touch targets. */
@media (max-width: 430px) {
  .header-inner {
    padding: 0.58rem 0.65rem;
  }

  .logo {
    gap: 0.5rem;
    font-size: 0.94rem;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .nav-main.open a,
  .nav-main.open .public-login-link,
  .nav-main.open .public-logoff-button {
    font-size: 1rem;
    min-height: 50px;
    padding: 0.82rem 0.95rem;
  }
}

/* Very narrow devices: keep controls usable without hiding menu access. */
@media (max-width: 350px) {
  .logo span:last-child {
    max-width: 150px;
  }

  .header-actions {
    gap: 0.3rem;
  }
}


/* Uploaded public branding logo */
.logo-icon.logo-icon-uploaded{
  background:transparent;
  width:auto;
  min-width:36px;
  max-width:150px;
  height:44px;
  border-radius:0;
  overflow:visible;
}
.logo-icon.logo-icon-uploaded img{
  display:block;
  width:auto;
  height:100%;
  max-width:150px;
  object-fit:contain;
}
@media(max-width:960px){
  .logo-icon.logo-icon-uploaded{
    height:40px;
    max-width:120px;
  }
  .logo-icon.logo-icon-uploaded img{max-width:120px}
}
@media(max-width:430px){
  .logo-icon.logo-icon-uploaded{
    height:36px;
    max-width:100px;
  }
  .logo-icon.logo-icon-uploaded img{max-width:100px}
}

/* Public ticker positioned below the banner instead of inside the sticky header. */
body > .news-ticker,
.banner-slot + .news-ticker {
  position: relative;
  top: auto;
  z-index: 20;
  width: 100%;
  margin-top: 0.75rem;
  box-shadow: var(--shadow);
}

/* If there is no enabled banner, keep sensible spacing below the header. */
.site-header + .news-ticker {
  margin-top: 0;
}

@media (max-width: 960px) {
  body > .news-ticker,
  .banner-slot + .news-ticker {
    margin-top: 0.5rem;
  }
}


/* 2026-09 homepage cleanup: simpler public hierarchy and navigation */
.homepage-clean .home-intro {
  margin: 1.25rem 0 1rem;
  padding: 1.1rem 1.2rem;
}
.home-kicker {
  margin: 0 0 .3rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.home-intro h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.1;
}
.home-intro-text {
  max-width: 760px;
  margin: .55rem 0 .8rem;
  color: var(--text-muted);
}
.home-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.home-quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: .45rem .72rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  text-decoration: none;
  font-weight: 600;
}
.home-main-grid { align-items: start; }
.home-sidebar .card { margin-bottom: 1rem; }
.explore-links {
  display: grid;
  gap: .55rem;
}
.explore-links a {
  display: grid;
  gap: .1rem;
  padding: .7rem .75rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  text-decoration: none;
}
.explore-links a span {
  color: var(--text-muted);
  font-size: .82rem;
}
.compact-resource-links {
  display: grid;
  gap: .5rem;
}
.local-service-area {
  max-width: 1100px;
  margin: 1rem auto 2rem;
  padding: 0 1rem;
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.6;
}
.local-service-area h2 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: .35rem;
}
.nav-more {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-more > summary {
  cursor: pointer;
  list-style: none;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after {
  content: " ▾";
  font-size: .72em;
}
.nav-more-menu {
  position: absolute;
  z-index: 1000;
  top: calc(100% + .5rem);
  right: 0;
  min-width: 230px;
  padding: .45rem;
  border: 1px solid var(--border);
  border-radius: .7rem;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.nav-more-menu a {
  display: block;
  padding: .55rem .65rem;
  border-radius: .45rem;
  white-space: nowrap;
}
@media (max-width: 1199px) {
  /* The public nav uses the hamburger through 1199px. Keep More as an
     in-flow accordion throughout that same range so opening it cannot move
     the summary off-screen or place the submenu over the logged-in controls. */
  .nav-main.open .nav-more {
    display: block;
    width: 100%;
    flex: 0 0 auto;
    position: static;
  }
  .nav-main.open .nav-more > summary {
    display: block;
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: .8rem 1rem;
    cursor: pointer;
    color: inherit;
    font: inherit;
    font-weight: 500;
    line-height: 1.4;
  }
  .nav-main.open .nav-more[open] > summary {
    display: block;
    visibility: visible;
  }
  .nav-main.open .nav-more-menu {
    position: static;
    width: auto;
    min-width: 0;
    margin: 0 0 .45rem .75rem;
    padding: .15rem 0 .15rem .65rem;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .nav-main.open .nav-more-menu a {
    white-space: normal;
    width: 100%;
    box-sizing: border-box;
  }
}


/* Footer Facebook/Messenger share buttons: dark-mode contrast fix */
html[data-theme="dark"] .fb-share-btn,
html[data-theme="dark"] .fb-messenger-btn,
body.dark-mode .fb-share-btn,
body.dark-mode .fb-messenger-btn,
[data-theme="dark"] .fb-share-btn,
[data-theme="dark"] .fb-messenger-btn {
  background: var(--surface, #172536) !important;
  color: var(--text, #f4f7fb) !important;
  border-color: var(--border, #33465b) !important;
}
html[data-theme="dark"] .fb-share-btn *,
html[data-theme="dark"] .fb-messenger-btn *,
body.dark-mode .fb-share-btn *,
body.dark-mode .fb-messenger-btn *,
[data-theme="dark"] .fb-share-btn *,
[data-theme="dark"] .fb-messenger-btn * {
  color: inherit !important;
}


/* Correct dark-mode contrast for actual Facebook/Messenger footer controls */
[data-theme="dark"] .fb-share-bar .btn,
html[data-theme="dark"] .fb-share-bar .btn {
  background: #172536 !important;
  color: #f4f7fb !important;
  border-color: #40536a !important;
}
[data-theme="dark"] .fb-share-bar .btn span,
[data-theme="dark"] .fb-share-bar .btn svg,
[data-theme="dark"] .fb-share-bar .btn i,
html[data-theme="dark"] .fb-share-bar .btn span,
html[data-theme="dark"] .fb-share-bar .btn svg,
html[data-theme="dark"] .fb-share-bar .btn i {
  color: #f4f7fb !important;
  fill: currentColor;
}
[data-theme="dark"] .fb-share-bar .btn:hover,
[data-theme="dark"] .fb-share-bar .btn:focus-visible,
html[data-theme="dark"] .fb-share-bar .btn:hover,
html[data-theme="dark"] .fb-share-bar .btn:focus-visible {
  background: #22364c !important;
  color: #ffffff !important;
  border-color: #60758e !important;
}


/* iOS/mobile public navigation: keep the More accordion and its children visible. */
@media (max-width: 1199px) {
  .nav-main.open details.nav-more {
    display: block !important;
    width: 100% !important;
    position: static !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }

  .nav-main.open details.nav-more > summary {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 48px;
    box-sizing: border-box;
    padding: .8rem 1rem !important;
    color: inherit !important;
    cursor: pointer;
  }

  /* Native details content must be hidden only while closed. */
  .nav-main.open details.nav-more:not([open]) > .nav-more-menu {
    display: none !important;
  }

  /* Safari can otherwise lose the nested dropdown after details opens. */
  .nav-main.open details.nav-more[open] > .nav-more-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: calc(100% - .75rem) !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 0 .45rem .75rem !important;
    padding: .15rem 0 .15rem .65rem !important;
    border: 0 !important;
    border-left: 2px solid var(--border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .nav-main.open details.nav-more[open] > .nav-more-menu > a {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 46px;
    box-sizing: border-box;
    padding: .7rem .85rem !important;
    white-space: normal !important;
    color: inherit !important;
  }
}


/* Home More menu: explicit control replaces native <details> for reliable iPhone/Safari behavior. */
.nav-more-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: .42rem .68rem;
  white-space: nowrap;
}
.nav-more-toggle::after {
  content: " ▾";
  font-size: .72em;
}
.nav-more-toggle.is-open::after {
  content: " ▴";
}
.nav-more-menu[hidden] {
  display: none !important;
}

@media (max-width: 1199px) {
  .nav-main.open .nav-more {
    display: block !important;
    width: 100% !important;
    position: static !important;
    flex: 0 0 auto !important;
  }
  .nav-main.open .nav-more-toggle {
    display: block !important;
    width: 100% !important;
    min-height: 48px;
    box-sizing: border-box;
    padding: .8rem 1rem !important;
    text-align: left;
  }
  .nav-main.open .nav-more-menu:not([hidden]) {
    display: block !important;
    position: static !important;
    width: calc(100% - .75rem) !important;
    margin: 0 0 .45rem .75rem !important;
    padding: .15rem 0 .15rem .65rem !important;
    border: 0 !important;
    border-left: 2px solid var(--border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .nav-main.open .nav-more-menu:not([hidden]) > a {
    display: block !important;
    width: 100% !important;
    min-height: 46px;
    box-sizing: border-box;
    padding: .7rem .85rem !important;
    white-space: normal !important;
  }
}


/* Final mobile public-menu fix: show More links directly in the hamburger menu.
   This avoids Safari/details/JS state and keeps all logged-in menu items reachable. */
.nav-more-label {
  font: inherit;
  font-weight: 500;
  color: inherit;
  padding: .42rem .68rem;
  white-space: nowrap;
}

@media (min-width: 1200px) {
  .nav-more-label::after { content: " ▾"; font-size: .72em; }
  .nav-more-menu { display: block; }
}

@media (max-width: 1199px) {
  .nav-main.open .nav-more {
    display: block !important;
    position: static !important;
    width: 100% !important;
    flex: 0 0 auto !important;
  }
  .nav-main.open .nav-more-label {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 48px;
    box-sizing: border-box;
    padding: .8rem 1rem !important;
    font-size: 1rem;
  }
  .nav-main.open .nav-more-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: calc(100% - .75rem) !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 0 .45rem .75rem !important;
    padding: .15rem 0 .15rem .65rem !important;
    border: 0 !important;
    border-left: 2px solid var(--border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }
  .nav-main.open .nav-more-menu > a {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 46px;
    box-sizing: border-box;
    padding: .7rem .85rem !important;
    white-space: normal !important;
    color: inherit !important;
  }
}


/* Home public navigation hard fix:
   desktop keeps the More dropdown; mobile/hamburger renders More links directly. */
.nav-more-mobile { display: none; }

.nav-more-desktop {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-more-desktop .nav-more-label::after {
  content: " ▾";
  font-size: .72em;
}
.nav-more-desktop .nav-more-menu {
  display: none;
  position: absolute;
  z-index: 1300;
  top: calc(100% + .4rem);
  right: 0;
  min-width: 230px;
  padding: .45rem;
  border: 1px solid var(--border);
  border-radius: .7rem;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.nav-more-desktop:hover .nav-more-menu,
.nav-more-desktop:focus-within .nav-more-menu {
  display: block;
}
.nav-more-desktop .nav-more-menu a {
  display: block;
  padding: .55rem .65rem;
  white-space: nowrap;
}

@media (max-width: 1199px) {
  .nav-main.open .nav-more-desktop {
    display: none !important;
  }

  .nav-main.open .nav-more-mobile {
    display: block !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .nav-main.open .nav-more-mobile-title {
    display: block !important;
    width: 100% !important;
    min-height: 48px;
    box-sizing: border-box;
    padding: .8rem 1rem !important;
    color: inherit !important;
    font-size: 1rem;
    font-weight: 600;
  }

  .nav-main.open .nav-more-mobile > a {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 48px;
    box-sizing: border-box;
    padding: .8rem 1.6rem !important;
    color: inherit !important;
    white-space: normal !important;
  }
}

@media (min-width: 1200px) {
  .nav-more-desktop { display: inline-flex !important; }
  .nav-more-mobile { display: none !important; }
}


/* ===== Shared public-page polish ===== */
.nav-more-desktop .nav-more-label.active {
  color: var(--accent);
}
.nav-more-desktop .nav-more-menu a.active,
.nav-more-mobile > a.active {
  font-weight: 700;
}

.footer-default-links {
  display: grid;
  gap: .42rem;
}
.footer-default-links a {
  color: inherit;
  text-decoration: none;
}
.footer-default-links a:hover,
.footer-default-links a:focus-visible {
  text-decoration: underline;
}
.footer-default-links .public-logoff-form {
  margin: 0;
}
.footer-default-links .public-logoff-button {
  padding: 0;
  min-height: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.footer-default-links .public-logoff-button:hover,
.footer-default-links .public-logoff-button:focus-visible {
  text-decoration: underline;
}

.back-to-top {
  position: fixed;
  z-index: 1400;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-footer {
  margin-top: 2.5rem;
}
.site-footer .footer-inner {
  gap: 1.5rem;
}
.site-footer a,
.site-footer button {
  min-height: 38px;
}

@media (max-width: 1199px) {
  .header-inner {
    min-height: 64px;
  }
  .nav-main.open {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .nav-main.open > a,
  .nav-main.open .nav-more-mobile > a,
  .nav-main.open .public-login-link,
  .nav-main.open .public-logoff-button {
    min-height: 48px;
  }
}

@media (max-width: 900px) {
  .container {
    width: min(100% - 1.5rem, 1180px);
  }
  .main-grid,
  .home-main-grid,
  .eq-layout {
    grid-template-columns: 1fr !important;
  }
  .card {
    min-width: 0;
  }
  .card-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .card-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .site-footer .footer-inner {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 639px) {
  .container {
    width: min(100% - 1rem, 1180px);
  }
  .site-header .header-inner {
    padding-left: .75rem;
    padding-right: .75rem;
  }
  .logo span {
    font-size: .96rem;
  }
  .card {
    border-radius: 12px;
  }
  .card-header {
    padding: .85rem .9rem;
  }
  .card-body {
    padding: .9rem;
  }
  .site-footer {
    margin-top: 1.5rem;
  }
  .site-footer .footer-inner {
    grid-template-columns: 1fr;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .footer-bottom {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


/* Current conditions unavailable state */
.conditions-grid > .conditions-unavailable {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  padding: 2rem 1rem;
}


/* Homepage latest 3-day forecast */
.home-three-day-forecast{overflow:hidden}
.home-three-day-forecast .widget-header{align-items:flex-start}
.home-three-day-subtitle{margin:.3rem 0 0;font-size:.82rem;color:var(--text-muted);font-weight:400}
.home-three-day-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}
.home-three-day-day{min-width:0;padding:1rem;border:1px solid var(--border-color,var(--border));border-radius:12px;background:var(--bg-tertiary)}
.home-three-day-day h3{margin:0;font-size:1.05rem}
.home-three-day-day time{display:block;margin-top:.15rem;font-size:.78rem;color:var(--text-muted)}
.home-three-day-sky{min-height:2.4em;margin:.8rem 0;font-weight:700;line-height:1.2}
.home-three-day-temps{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
.home-three-day-temps span{display:flex;flex-direction:column;gap:.1rem;padding:.55rem .65rem;border-radius:9px;background:var(--bg-primary)}
.home-three-day-temps small{font-size:.68rem;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted)}
.home-three-day-temps strong{font-size:1.15rem}
.home-three-day-high strong{color:#e05245}
.home-three-day-low strong{color:#4b8fe2}
.home-three-day-image-wrap{margin:1rem 0 0;text-align:center}
.home-three-day-image{display:block;width:min(100%,580px);height:auto;margin:0 auto;border-radius:12px;border:1px solid var(--border-color,var(--border))}
.home-three-day-updated{margin:.75rem 0 0;font-size:.75rem;color:var(--text-muted);text-align:center}
@media(max-width:720px){
  .home-three-day-grid{grid-template-columns:1fr}
  .home-three-day-sky{min-height:0}
}
