@import url("variables.css?v=20260704-perf1");

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-accent);
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

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

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

a:hover { color: var(--color-primary-light); }

:focus-visible {
  outline: 3px solid var(--color-sky);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus { top: 1rem; }

.container-narrow { max-width: var(--reading-width); margin: 0 auto; }
.container-wide { max-width: var(--content-width); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: box-shadow var(--transition);
}

[data-theme="dark"] .site-header {
  background: rgba(13, 27, 42, 0.92);
}

.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-navy);
  white-space: nowrap;
}

[data-theme="dark"] .logo { color: var(--color-text); }

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

.nav-desktop { display: none; }

@media (min-width: 992px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex: 1;
    justify-content: center;
    min-width: 0;
  }
}

.nav-link {
  padding: 0.5rem 0.625rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

@media (min-width: 1200px) {
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
  }
}

.nav-caret { font-size: 0.625rem; opacity: 0.7; margin-left: 0.125rem; }

.nav-link:hover, .nav-link.active {
  background: var(--color-frost);
  color: var(--color-primary);
}

.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 1001;
}

[data-theme="dark"] .nav-dropdown-menu { background: #152535; }

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Calculators mega menu */
.nav-mega { position: static; }

@media (min-width: 992px) {
  .site-header .container-wide { position: relative; }
}

.nav-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 5rem);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 1001;
  margin-top: 0.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .nav-mega-menu { background: #152535; }

.nav-mega:hover .nav-mega-menu,
.nav-mega:focus-within .nav-mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-mega-inner {
  padding: 1.25rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.nav-mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 1.25rem;
  overflow-y: auto;
  max-height: min(420px, 62vh);
  padding-right: 0.25rem;
}

@media (min-width: 1200px) {
  .nav-mega-grid { grid-template-columns: repeat(4, 1fr); }
}

.nav-mega-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--color-border);
}

.nav-mega-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-mega-list li { margin-bottom: 0.25rem; }

.nav-mega-list a {
  display: block;
  padding: 0.3125rem 0;
  font-size: 0.8125rem;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.35;
  transition: color var(--transition);
}

.nav-mega-list a:hover {
  color: var(--color-primary);
}

.nav-mega-footer {
  margin-top: 0.75rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  flex-shrink: 0;
}

.nav-mega-all {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-primary);
  text-decoration: none;
}

.nav-mega-all:hover { text-decoration: underline; }

.logo-text { white-space: nowrap; }

@media (max-width: 1199px) {
  .logo-text { font-size: 1rem; }
  .header-search { width: 140px; }
  .header-search:focus { width: 160px; }
}

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

.header-search-wrap { display: none; }

@media (min-width: 768px) {
  .header-search-wrap { display: block; }
}

.header-search {
  width: 180px;
  padding: 0.5rem 0.875rem 0.5rem 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.875rem;
  background: var(--color-frost) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235a6b7d' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 0.75rem center;
  transition: border-color var(--transition), width var(--transition);
}

.header-search:focus {
  outline: none;
  border-color: var(--color-primary);
  width: 220px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--color-frost); border-color: var(--color-primary); }

.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--gradient-winter);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn-primary-custom:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: transparent;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-outline-custom:hover {
  background: var(--color-primary);
  color: #fff;
}

.mobile-toggle { display: flex; }

@media (min-width: 992px) { .mobile-toggle { display: none; } }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 40, 64, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.mobile-nav.open { opacity: 1; visibility: visible; }

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--color-accent);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform var(--transition);
  overflow-y: auto;
}

.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }

.mobile-nav-link {
  display: block;
  padding: 0.875rem 0;
  color: var(--color-text);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
}

.mobile-calc-details { border-bottom: 1px solid var(--color-border); }

.mobile-calc-summary {
  list-style: none;
  cursor: pointer;
  border-bottom: none;
}

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

.mobile-calc-panel {
  padding: 0 0 0.75rem 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.mobile-calc-group { margin-bottom: 0.75rem; }

.mobile-calc-cat {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.mobile-nav-sublink {
  padding: 0.5rem 0 0.5rem 0.75rem !important;
  font-size: 0.875rem;
  font-weight: 400;
  border-bottom: none !important;
}

/* Hero */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  background: var(--gradient-hero);
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

#snow-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-content { position: relative; z-index: 2; }

.hero.hero-compact {
  padding: 1.25rem 0 1.5rem;
}

.hero.hero-compact .hero-badge,
.hero.hero-compact .hero-subtitle,
.hero.hero-compact .trust-row {
  display: none !important;
}

.hero.hero-compact h1 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin-bottom: 1rem;
}

.hero.hero-compact .hero-search-card {
  max-width: 100%;
}

.hero.hero-has-results .col-lg-7 {
  flex: 0 0 100%;
  max-width: 100%;
}

.hero.hero-has-results .col-lg-5 {
  display: none !important;
}

.hero-results-slot {
  margin-top: 1rem;
  width: 100%;
  text-align: left;
}

.hero-results-slot .weather-forecast-app.result-card {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.15rem;
  max-height: none;
  overflow: visible;
  backdrop-filter: none;
}

.hero-results-slot .weather-app-header {
  margin-bottom: 0.75rem;
}

.hero-results-slot .weather-app-header h2 {
  font-size: 1.25rem;
  color: var(--color-navy);
}

.hero-results-slot .weather-app-kicker {
  font-size: 0.7rem;
}

.hero-results-slot .weather-app-location {
  font-size: 0.8rem;
}

.hero-results-slot .daily-tabs {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  overflow-x: auto;
}

.hero-results-slot .daily-tab {
  min-width: 0;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.4rem;
  gap: 0.2rem;
  flex-wrap: wrap;
  background: var(--color-primary-dark);
}

.hero-results-slot .daily-tab.active {
  background: var(--gradient-winter);
}

.hero-results-slot .daily-tab span:first-child,
.hero-results-slot .daily-tab small {
  font-size: 0.68rem;
}

.hero-results-slot .daily-tab strong {
  font-size: 0.82rem;
}

.hero-results-slot .weather-app-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 0.75rem;
  align-items: stretch;
}

.hero-results-slot .current-weather-card,
.hero-results-slot .hourly-forecast-card,
.hero-results-slot .snow-prediction-card {
  border-radius: var(--radius-md);
  background: var(--color-accent);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem;
  margin-top: 0;
}

.hero-results-slot .current-card-sky {
  min-height: 88px;
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  background: var(--gradient-winter);
}

.hero-results-slot .current-card-sky::before,
.hero-results-slot .current-card-sky::after {
  display: none;
}

.hero-results-slot .current-weather-icon {
  font-size: 2rem;
}

.hero-results-slot .current-weather-time {
  font-size: 0.68rem;
}

.hero-results-slot .current-weather-main {
  padding-top: 0.55rem;
  gap: 0.35rem;
}

.hero-results-slot .current-temp {
  font-size: 1.85rem;
  color: var(--color-navy);
}

.hero-results-slot .current-condition,
.hero-results-slot .current-feels,
.hero-results-slot .weather-stat-tiles span,
.hero-results-slot .hourly-time,
.hero-results-slot .hourly-pop,
.hero-results-slot .hourly-card small {
  font-size: 0.65rem;
}

.hero-results-slot .current-feels strong {
  font-size: 0.95rem;
}

.hero-results-slot .weather-stat-tiles {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.hero-results-slot .weather-stat-tiles div {
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.3rem;
  background: var(--color-frost);
}

.hero-results-slot .weather-stat-tiles strong {
  font-size: 0.75rem;
}

.hero-results-slot .forecast-card-title {
  margin-bottom: 0.45rem;
}

.hero-results-slot .forecast-card-title h3 {
  font-size: 0.88rem;
}

.hero-results-slot .forecast-card-title span {
  font-size: 0.62rem;
}

.hero-results-slot .hourly-chart {
  height: 72px;
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--color-frost);
  border-color: var(--color-border);
  color: var(--color-primary);
}

.hero-results-slot .hourly-cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.3rem;
  overflow-x: auto;
}

.hero-results-slot .hourly-card {
  min-width: 0;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.2rem;
  background: var(--color-frost);
}

.hero-results-slot .hourly-icon {
  font-size: 0.85rem;
  margin: 0.1rem 0;
}

.hero-results-slot .hourly-card strong {
  font-size: 0.82rem;
}

.hero-results-slot .prediction-summary {
  gap: 0.35rem;
}

.hero-results-slot .weather-forecast-app .result-percentage {
  font-size: 1.75rem;
  color: var(--color-navy);
}

.hero-results-slot .result-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.hero-results-slot .result-metric {
  padding: 0.45rem 0.3rem;
  background: var(--color-frost);
  border-radius: var(--radius-sm);
}

.hero-results-slot .result-metric-value {
  font-size: 0.9rem;
}

.hero-results-slot .result-metric-label {
  font-size: 0.58rem;
}

.hero-results-slot .ai-explanation,
.hero-results-slot .snow-prediction-card > p,
.hero-results-slot .weather-alerts {
  display: none;
}

@media (max-width: 991.98px) {
  .hero-results-slot .weather-app-grid {
    grid-template-columns: 1fr;
  }

  .hero-results-slot .daily-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-results-slot .hourly-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .hero-results-slot .daily-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-results-slot .hourly-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.92;
  max-width: 640px;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

/* Classic reference-style hero calculator */
.hero-classic-calc {
  margin-top: 0.5rem;
  max-width: 720px;
}

.classic-calc-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.classic-calc-blue {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.15rem 1rem;
  box-shadow: var(--shadow-lg);
}

.classic-calc-stage {
  position: relative;
  min-height: 10.5rem;
}

.hero-calc-inputs,
.classic-calc-results {
  width: 100%;
}

.classic-calc-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.classic-calc-main label,
.classic-calc-side-field label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.classic-calc-input {
  width: 100%;
  max-width: 220px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
  font-size: 0.95rem;
  background: #fff;
  color: var(--color-text);
}

.classic-calc-input-sm {
  max-width: 72px;
}

.classic-calc-select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.45rem;
  font-size: 0.9rem;
  background: #fff;
  color: var(--color-text);
}

.classic-calc-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.classic-calc-geo {
  display: inline-block;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.classic-calc-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.65rem;
}

.classic-calc-geo:hover:not(:disabled) {
  color: var(--color-primary-light);
}

.classic-calc-geo:disabled {
  opacity: 0.7;
  cursor: wait;
}

.classic-calc-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.classic-calc-btn {
  min-width: 120px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.45rem 1.35rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.classic-calc-btn:hover:not(:disabled) {
  background: var(--color-primary-light);
}

.classic-calc-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.classic-calc-results {
  margin: 0;
  padding: 0;
  border: none;
}

.classic-prediction-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0 0 0.5rem;
}

.classic-prediction-table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(135deg, var(--color-secondary-light) 0%, var(--color-secondary) 100%);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.classic-prediction-table td {
  border: 1px solid var(--color-primary);
  padding: 0.45rem 0.55rem;
  vertical-align: middle;
  color: var(--color-text);
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.35);
}

.classic-pred-date {
  width: 34%;
  font-weight: 600;
  line-height: 1.35;
}

.classic-pred-chance {
  width: 28%;
  position: relative;
  font-weight: 700;
}

.classic-pred-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--color-success);
}

.classic-pred-chance strong {
  display: block;
  padding-left: 0.75rem;
}

.classic-pred-msg {
  font-style: italic;
}

.classic-prediction-meta {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.35;
}

.classic-prediction-time {
  text-decoration: underline;
}

.classic-prediction-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
}

.classic-back-btn {
  border: 0;
  background: none;
  color: var(--color-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.classic-back-btn:hover {
  color: var(--color-primary-light);
}

.classic-refresh-btn {
  border: 0;
  background: none;
  color: var(--color-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.hero-search-card {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  color: var(--color-text);
}

.hero-search-form { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-search-input {
  flex: 1 1 200px;
  padding: 0.875rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.hero-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.hero-examples {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-examples button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.125rem 0.375rem;
  font-size: inherit;
  text-decoration: underline;
}

@media (max-width: 575.98px) {
  .hero {
    padding: 1.35rem 0 1.25rem;
    min-height: auto;
  }

  #snow-canvas {
    opacity: 0.45;
  }

  .hero-badge {
    font-size: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0.3rem 0.75rem;
  }

  .hero h1 {
    font-size: 2rem;
    margin-bottom: 0.6rem;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.45;
    margin-bottom: 0.85rem;
  }

  .classic-calc-grid {
    grid-template-columns: 1fr;
  }

  .classic-calc-input {
    max-width: 100%;
  }

  .classic-prediction-title {
    font-size: 1.15rem;
  }

  .classic-prediction-table td {
    font-size: 0.82rem;
    padding: 0.5rem;
  }

  .hero-search-card {
    border-radius: 1rem;
    padding: 1rem;
    max-width: none;
  }

  .hero-search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .hero-search-input,
  .hero-search-form .btn-outline-custom,
  .hero-search-form .btn-primary-custom {
    width: 100%;
    justify-content: center;
  }

  .hero-search-input {
    min-width: 0;
    padding: 0.8rem 0.9rem;
  }

  .hero-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
    margin-top: 0.8rem;
  }

  .hero-examples button {
    padding-left: 0;
  }

  .trust-row {
    display: none;
  }

  .hero.hero-compact {
    padding: 0.75rem 0;
  }

  .hero.hero-compact h1 {
    display: none;
  }
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.trust-item strong { font-weight: 700; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--color-frost); }
[data-theme="dark"] .section-alt { background: #152535; }

.section-header { text-align: center; margin-bottom: 2.5rem; }

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .section-header h2 { color: var(--color-text); }

.section-header p {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card-winter {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  height: auto;
}

a.card-winter.h-100,
.card-winter.h-100 {
  height: 100%;
}

.card-winter:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-frost);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  color: var(--color-primary);
}

/* Weather dashboard */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.weather-stat {
  text-align: center;
  padding: 1.25rem 1rem;
}

.weather-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.2;
}

[data-theme="dark"] .weather-stat-value { color: var(--color-text); }

.weather-stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Results */
.result-card {
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.result-card.risk-low { background: linear-gradient(135deg, #2d8a5e, #3cb371); }
.result-card.risk-moderate { background: linear-gradient(135deg, #c98a1a, #e6a817); }
.result-card.risk-high { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.result-card.risk-extreme { background: linear-gradient(135deg, #8e1a1a, #c0392b); }

.result-percentage {
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.result-metric {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.result-metric-value { font-size: 1.5rem; font-weight: 700; }
.result-metric-label { font-size: 0.75rem; opacity: 0.9; margin-top: 0.25rem; }

.ai-explanation {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.ai-explanation ul {
  margin: 0;
  padding-left: 1.25rem;
}

.ai-explanation li { margin-bottom: 0.5rem; }

/* Weather app style result view */
.weather-app-section {
  background:
    radial-gradient(circle at top left, rgba(74, 159, 212, 0.18), transparent 34rem),
    linear-gradient(180deg, #eef7fb 0%, #f8fbff 100%);
}

[data-theme="dark"] .weather-app-section {
  background: linear-gradient(180deg, #10263a 0%, #0d1b2a 100%);
}

.weather-forecast-app.result-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  color: var(--color-text);
  padding: clamp(1rem, 2vw, 1.5rem);
}

[data-theme="dark"] .weather-forecast-app.result-card {
  background: rgba(19, 40, 59, 0.82);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}

.weather-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.weather-app-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-navy);
}

[data-theme="dark"] .weather-app-header h2 { color: #fff; }

.weather-app-kicker {
  display: block;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weather-app-location {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-align: right;
}

.daily-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.daily-tab {
  min-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 1rem;
  background: rgba(15, 61, 92, 0.72);
  color: #fff;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 12px 30px rgba(15, 61, 92, 0.14);
}

.daily-tab.active {
  background: var(--gradient-winter);
  box-shadow: var(--shadow-md);
}

.daily-tab span:first-child,
.daily-tab small {
  opacity: 0.86;
  font-size: 0.86rem;
}

.daily-tab strong {
  font-size: 1.08rem;
  line-height: 1;
}

.weather-app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem;
}

@media (max-width: 991.98px) {
  .weather-app-grid {
    grid-template-columns: 1fr;
  }
}

.current-weather-card,
.hourly-forecast-card,
.snow-prediction-card {
  border-radius: var(--radius-md);
  background: var(--color-accent);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .current-weather-card,
[data-theme="dark"] .hourly-forecast-card,
[data-theme="dark"] .snow-prediction-card {
  background: rgba(25, 49, 70, 0.86);
  border-color: rgba(255, 255, 255, 0.1);
}

.current-weather-card { padding: 1rem; }

.current-card-sky {
  min-height: 220px;
  border-radius: 1rem;
  background:
    linear-gradient(160deg, rgba(15, 61, 92, 0.35), rgba(15, 61, 92, 0.82)),
    radial-gradient(circle at 25% 22%, rgba(255, 255, 255, 0.82) 0 10%, transparent 11%),
    linear-gradient(135deg, #82bfd8, #244b69);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
}

.current-card-sky::before,
.current-card-sky::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 68px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  filter: blur(2px);
}

.current-card-sky::before { left: -38px; top: 44px; }
.current-card-sky::after { right: -45px; top: 85px; opacity: 0.72; }

.current-weather-icon {
  position: relative;
  z-index: 1;
  font-size: 4rem;
  line-height: 1;
}

.current-weather-time {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 0.88rem;
}

.current-weather-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 1rem 0 0.25rem;
}

.current-temp {
  display: block;
  color: var(--color-navy);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
}

[data-theme="dark"] .current-temp { color: #fff; }

.current-condition {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-weight: 700;
}

.current-feels {
  color: var(--color-text-muted);
  text-align: right;
}

.current-feels strong {
  display: block;
  color: var(--color-navy);
  font-size: 1.35rem;
}

[data-theme="dark"] .current-feels strong { color: #fff; }

.weather-stat-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.weather-stat-tiles div {
  border-radius: 0.9rem;
  background: var(--color-frost);
  padding: 0.75rem;
  text-align: center;
}

[data-theme="dark"] .weather-stat-tiles div { background: rgba(255, 255, 255, 0.07); }

.weather-stat-tiles span,
.hourly-time,
.hourly-pop,
.hourly-card small {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.weather-stat-tiles strong {
  color: var(--color-navy);
  font-size: 0.98rem;
}

[data-theme="dark"] .weather-stat-tiles strong { color: #fff; }

.hourly-forecast-card {
  padding: 1rem;
  min-width: 0;
}

.forecast-card-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.forecast-card-title h3 {
  margin: 0;
  color: var(--color-navy);
  font-size: 1.15rem;
  font-weight: 800;
}

[data-theme="dark"] .forecast-card-title h3 { color: #fff; }

.forecast-card-title span {
  color: var(--color-text-muted);
  font-size: 0.86rem;
}

.hourly-chart {
  height: 190px;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  background: var(--color-frost);
  color: var(--color-primary);
  padding: 1rem;
}

[data-theme="dark"] .hourly-chart {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.09);
}

.hourly-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hourly-cards {
  display: grid;
  grid-template-columns: repeat(9, minmax(76px, 1fr));
  gap: 0.45rem;
  margin-top: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.hourly-card {
  min-width: 76px;
  border-radius: 0.85rem;
  background: var(--color-frost);
  padding: 0.75rem 0.45rem;
  text-align: center;
}

[data-theme="dark"] .hourly-card { background: rgba(255, 255, 255, 0.07); }

.hourly-icon {
  display: block;
  font-size: 1.25rem;
  margin: 0.3rem 0;
}

.hourly-card strong {
  display: block;
  color: var(--color-navy);
  font-size: 1.35rem;
  line-height: 1.1;
}

[data-theme="dark"] .hourly-card strong { color: #fff; }

.snow-prediction-card {
  margin-top: 0;
  padding: 1.1rem;
}

.prediction-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.prediction-status { text-align: right; }

.weather-forecast-app .result-percentage {
  color: var(--color-navy);
  font-size: clamp(2.6rem, 6vw, 4rem);
}

[data-theme="dark"] .weather-forecast-app .result-percentage { color: #fff; }

.weather-forecast-app .result-metric,
.weather-forecast-app .ai-explanation {
  background: rgba(26, 95, 138, 0.08);
  color: var(--color-text);
}

[data-theme="dark"] .weather-forecast-app .result-metric,
[data-theme="dark"] .weather-forecast-app .ai-explanation {
  background: rgba(255, 255, 255, 0.07);
}

.weather-alerts:empty { display: none; }

@media (max-width: 991.98px) {
  .weather-app-grid { grid-template-columns: 1fr; }
  .daily-tabs { grid-template-columns: repeat(7, 120px); }
  .hourly-cards { grid-template-columns: repeat(9, 82px); }
}

@media (max-width: 575.98px) {
  .section {
    padding: 1.5rem 0;
  }

  .weather-app-section {
    padding-top: 1rem;
  }

  .weather-forecast-app.result-card {
    border-radius: 1rem;
    padding: 0.85rem;
  }

  .weather-app-header,
  .prediction-summary,
  .current-weather-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .weather-app-header {
    margin-bottom: 0.75rem;
  }

  .weather-app-header h2 {
    font-size: 1.45rem;
  }

  .weather-app-location {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .weather-app-location,
  .current-feels,
  .prediction-status {
    text-align: left;
  }

  .daily-tabs {
    grid-template-columns: repeat(7, 96px);
    gap: 0.5rem;
    margin-left: -0.1rem;
    margin-right: -0.1rem;
    padding: 0 0.1rem 0.35rem;
    scrollbar-width: thin;
  }

  .daily-tab {
    min-width: 96px;
    border-radius: 0.8rem;
    gap: 0.28rem;
    padding: 0.55rem 0.5rem;
  }

  .daily-tab span:first-child,
  .daily-tab small {
    font-size: 0.75rem;
  }

  .daily-tab strong {
    font-size: 0.95rem;
  }

  .current-weather-card,
  .hourly-forecast-card,
  .snow-prediction-card {
    border-radius: 1rem;
  }

  .current-weather-card,
  .hourly-forecast-card {
    padding: 0.8rem;
  }

  .current-card-sky {
    min-height: 120px;
    padding: 0.8rem;
  }

  .current-card-sky::before,
  .current-card-sky::after {
    width: 145px;
    height: 50px;
  }

  .current-weather-icon {
    font-size: 2.9rem;
  }

  .current-weather-time {
    font-size: 0.75rem;
  }

  .current-weather-main {
    padding-top: 0.75rem;
  }

  .current-temp {
    font-size: 2.55rem;
  }

  .current-feels strong {
    display: inline;
    font-size: 1.05rem;
  }

  .weather-stat-tiles {
    gap: 0.5rem;
  }

  .weather-stat-tiles div {
    border-radius: 0.75rem;
    padding: 0.58rem 0.45rem;
  }

  .forecast-card-title h3 {
    font-size: 1rem;
  }

  .forecast-card-title span {
    font-size: 0.75rem;
  }

  .hourly-chart {
    height: 115px;
    padding: 0.75rem;
  }

  .hourly-cards {
    grid-template-columns: repeat(9, 62px);
    gap: 0.4rem;
    padding-bottom: 0.45rem;
    scrollbar-width: thin;
  }

  .hourly-card {
    min-width: 62px;
    border-radius: 0.75rem;
    padding: 0.55rem 0.35rem;
  }

  .hourly-time,
  .hourly-pop,
  .hourly-card small {
    font-size: 0.65rem;
  }

  .hourly-icon {
    font-size: 1.05rem;
    margin: 0.18rem 0;
  }

  .hourly-card strong {
    font-size: 1.05rem;
  }

  .snow-prediction-card {
    margin-top: 0.8rem;
    padding: 0.9rem;
  }

  .weather-forecast-app .result-percentage {
    font-size: 2.35rem;
  }

  .weather-forecast-app .result-metric,
  .weather-forecast-app .ai-explanation {
    padding: 0.8rem;
  }
}

@media (max-width: 359.98px) {
  .weather-stat-tiles { grid-template-columns: 1fr; }
  .daily-tabs { grid-template-columns: repeat(7, 108px); }
  .hourly-cards { grid-template-columns: repeat(9, 78px); }
}

/* Forecast tables */
.forecast-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

.forecast-table th,
.forecast-table td {
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.forecast-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.forecast-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Calculator & inner pages hero */
.calc-hero {
  padding: 3rem 0;
  background: var(--gradient-hero);
  color: #fff;
  text-align: center;
}

.calc-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.calc-hero .lead,
.calc-hero p.lead,
.calc-hero > .container-wide > p,
.calc-hero .container-wide > p.lead {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .calc-hero .text-nowrap-md {
    white-space: nowrap;
    max-width: none;
  }
}

.calc-hero nav[aria-label="Breadcrumb"] {
  text-align: left;
}

.calc-hero .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  width: auto;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0;
}

.calc-hero .breadcrumb-item {
  display: flex;
  align-items: center;
}

.calc-form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .calc-form-card { background: #152535; }

.calc-form-stage {
  position: relative;
  min-height: 0;
}

#calc-loading:not(.d-none) {
  padding: 2rem 1rem;
}

.calc-form-inputs.is-hidden {
  display: none !important;
}

.calc-form-card.has-calc-results .calc-form-stage {
  min-height: 0;
}

.calc-result-panel {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 0;
  display: none;
}

.calc-result-panel.visible { display: block; animation: fadeIn 0.4s ease; }

/* Calculator pages: clean readable result card */
.calc-form-card .calc-result-panel.result-card {
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  padding: 0;
}

[data-theme="dark"] .calc-form-card .calc-result-panel.result-card {
  background: #1a2b3c;
  color: var(--color-text);
  border-color: var(--color-border);
}

.calc-form-card .calc-result-panel.result-card.risk-low { border-top-color: var(--color-sky); }
.calc-form-card .calc-result-panel.result-card.risk-moderate { border-top-color: var(--color-primary); }
.calc-form-card .calc-result-panel.result-card.risk-high { border-top-color: var(--color-primary-dark); }
.calc-form-card .calc-result-panel.result-card.risk-extreme { border-top-color: var(--color-navy); }

.calc-form-card .calc-result-panel .ai-explanation {
  background: var(--color-accent);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.calc-form-card .calc-result-panel .result-metric {
  background: var(--color-accent);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.calc-form-card .calc-result-panel .result-metric-value {
  color: var(--color-primary-dark);
}

[data-theme="dark"] .calc-form-card .calc-result-panel .result-metric-value {
  color: var(--color-sky);
}

.calc-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.calc-form-card .calc-result-panel.risk-high .calc-result-footer,
.calc-form-card .calc-result-panel.risk-extreme .calc-result-footer {
  border-top-color: var(--color-border);
}

.calc-back-btn,
.calc-refresh-btn {
  border: 0;
  background: none;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.calc-back-btn:hover,
.calc-refresh-btn:hover {
  color: var(--color-primary-light);
}

/* Calculator result layout */
.calc-form-card.has-calc-results {
  padding: 1.5rem;
}

.calc-form-card.has-calc-results > h2 {
  display: none;
}

.calc-form-card .calc-result-panel.visible {
  padding: 1rem 1.15rem 0.85rem;
}

.calc-result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--color-border);
}

.calc-result-meta-loc #result-location-name {
  color: var(--color-navy);
  font-weight: 600;
}

[data-theme="dark"] .calc-result-meta-loc #result-location-name {
  color: var(--color-text);
}

.calc-result-meta-time {
  color: var(--color-text-muted);
  white-space: nowrap;
}

.calc-result-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

@media (min-width: 576px) {
  .calc-result-main {
    grid-template-columns: minmax(6.5rem, auto) 1fr;
    align-items: start;
    gap: 1rem 1.25rem;
  }
}

.calc-result-hero {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.calc-result-score-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  line-height: 1;
}

.calc-form-card .calc-result-panel .result-percentage {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  color: var(--color-primary-dark);
}

[data-theme="dark"] .calc-form-card .calc-result-panel .result-percentage {
  color: var(--color-sky);
}

.calc-form-card .calc-result-panel #result-unit {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
}

.calc-form-card .calc-result-panel #result-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.calc-form-card .calc-result-panel .ai-explanation {
  padding: 0.7rem 0.85rem;
  margin-top: 0;
  border-radius: var(--radius-sm);
}

.calc-form-card .calc-result-panel .ai-explanation strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-navy);
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .calc-form-card .calc-result-panel .ai-explanation strong {
  color: var(--color-text);
}

.calc-form-card .calc-result-panel .ai-explanation ul {
  padding-left: 1.1rem;
  margin: 0 !important;
}

.calc-form-card .calc-result-panel .ai-explanation li {
  margin-bottom: 0.3rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-text);
}

.calc-form-card .calc-result-panel .ai-explanation li:last-child {
  margin-bottom: 0;
}

.calc-form-card .calc-result-panel .result-metric {
  padding: 0.55rem 0.65rem;
}

.calc-form-card .calc-result-panel .result-metric-value {
  font-size: 1.2rem;
  font-weight: 700;
}

.calc-form-card .calc-result-panel .result-metric-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
  opacity: 1;
}

.calc-form-card .calc-result-panel #result-extra {
  margin-top: 0.5rem !important;
  --bs-gutter-y: 0.5rem;
  --bs-gutter-x: 0.5rem;
}

.calc-form-card .calc-result-panel #result-road {
  margin-top: 0 !important;
  font-size: 0.875rem;
}

.calc-form-card .calc-result-panel .calc-result-footer {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--color-border);
}

.calc-sidebar {
  align-self: start;
}

.calc-sidebar .card-winter {
  height: auto;
}

#related-calculators {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

#related-calculators .card-winter {
  height: auto;
  min-height: 0;
}

.calc-related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  clear: both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--color-frost) 25%, #fff 50%, var(--color-frost) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text { height: 1rem; margin-bottom: 0.5rem; }
.skeleton-title { height: 2rem; width: 60%; margin-bottom: 1rem; }

/* Footer */
.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.85);
  padding: 4rem 0 2rem;
}

.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-heading {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-brand-title:hover .footer-brand-name {
  color: rgba(255,255,255,0.9);
}

.footer-brand-name {
  margin-bottom: 0;
  line-height: 1.2;
}

.footer-logo-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.footer-brand-desc {
  font-size: 0.875rem;
  opacity: 0.75;
  margin: 0;
  line-height: 1.55;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { font-size: 0.875rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.125rem 1.25rem;
  background: var(--color-accent);
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  padding: 0 1.25rem 1.125rem;
  max-height: 500px;
}

/* Blog cards */
.blog-card-img {
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  width: 100%;
}

.blog-card-body { padding: 1.25rem; }

.blog-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

/* Alerts */
.alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.alert-warning { background: #fef3cd; color: #856404; }
.alert-danger { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }

/* Road conditions */
.road-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
}

.road-dry { background: #d4edda; color: #155724; }
.road-wet { background: #cce5ff; color: #004085; }
.road-snow { background: #e2e3e5; color: #383d41; }
.road-slushy { background: #d6d8db; color: #1b1e21; }
.road-icy { background: #b8daff; color: #004085; }
.road-black-ice { background: #2c3e50; color: #fff; }
.road-dangerous { background: #f5c6cb; color: #721c24; }
.road-very-dangerous { background: #721c24; color: #fff; }

/* Utilities */
.text-muted-custom { color: var(--color-text-muted); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.fade-in { animation: fadeIn 0.5s ease; }

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Blog */
.blog-article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 992px) {
  .blog-article-layout {
    grid-template-columns: 220px minmax(0, 1fr) 260px;
  }
}

.blog-article-layout > aside {
  align-self: start;
}

.blog-article-layout > article {
  min-width: 0;
}

.blog-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}

.blog-article-layout aside .card-winter,
#comments-section.card-winter,
#related-posts .card-winter {
  height: auto;
}

.blog-toc-card {
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  background: var(--color-frost);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.875rem;
}

.blog-toc-list { margin: 0; padding-left: 1.25rem; }
.blog-toc-list .toc-h3 { margin-left: 0.75rem; font-size: 0.8125rem; }
.blog-toc-list a { color: var(--color-text-muted); text-decoration: none; }
.blog-toc-list a:hover { color: var(--color-primary); }

.blog-article-body { max-width: var(--reading-width); }
.blog-article-body h2 { font-size: 1.375rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.75rem; color: var(--color-navy); }
[data-theme="dark"] .blog-article-body h2 { color: var(--color-text); }
.blog-article-body h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.blog-article-body p { margin-bottom: 1rem; }
.blog-article-body ul, .blog-article-body ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.blog-article-body li { margin-bottom: 0.375rem; }

.blog-featured-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.blog-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.blog-publish-date {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .blog-publish-date {
    margin-left: 0;
    width: 100%;
  }
}

.blog-author { display: flex; align-items: center; gap: 0.75rem; }
.blog-author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient-winter); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem;
}

.share-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-accent);
  color: var(--color-text); transition: all var(--transition); cursor: pointer;
  text-decoration: none;
}
.share-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.blog-nav-link {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--transition);
  height: auto;
  min-height: 0;
}

.blog-nav-link:hover { border-color: var(--color-primary); background: var(--color-frost); color: var(--color-primary); }

.blog-nav-direction {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.blog-nav-title {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.45;
}

#blog-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 575px) {
  #blog-prev-next { grid-template-columns: 1fr; }
}

#related-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

#related-posts .card-winter {
  height: auto;
  min-height: 0;
}

.blog-related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  clear: both;
}

.blog-cta {
  background: var(--gradient-winter); color: #fff;
  border-radius: var(--radius-lg); padding: 2rem; text-align: center; margin-top: 2rem;
}
.blog-cta h3 { color: #fff; margin-bottom: 0.75rem; }
.blog-cta p { opacity: 0.9; margin-bottom: 1.25rem; }
.blog-cta .blog-cta-note {
  font-size: 0.875rem;
  opacity: 0.95;
  line-height: 1.5;
}
.blog-cta .blog-cta-note a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-cta .blog-cta-note a:hover {
  opacity: 0.9;
}

.blog-article-layout > article .faq-list {
  margin-top: 2rem;
}

/* Instant search dropdown */
.instant-search-wrap { position: relative; }
.instant-search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1001;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  margin-top: 0.25rem; max-height: 360px; overflow-y: auto;
}
[data-theme="dark"] .instant-search-dropdown { background: #152535; }
.search-group-label {
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--color-text-muted);
  padding: 0.5rem 1rem 0.25rem;
}
.search-result-item {
  display: block; padding: 0.625rem 1rem; color: var(--color-text);
  text-decoration: none; font-size: 0.875rem; transition: background var(--transition);
}
.search-result-item:hover, .search-result-item.active { background: var(--color-frost); color: var(--color-primary); }
.search-result-item mark { background: #fef3cd; padding: 0 2px; border-radius: 2px; }
.search-empty { padding: 1rem; font-size: 0.875rem; }

/* Location autocomplete */
.location-autocomplete-wrap {
  position: relative;
  width: 100%;
}

.classic-calc-main .location-autocomplete-wrap {
  max-width: 220px;
}

.location-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1002;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
}

[data-theme="dark"] .location-autocomplete-dropdown {
  background: #152535;
  border-color: var(--color-border);
}

.location-autocomplete-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

.location-autocomplete-item:last-child {
  border-bottom: 0;
}

.location-autocomplete-item:hover,
.location-autocomplete-item.active {
  background: var(--color-frost);
}

.location-autocomplete-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.location-autocomplete-sublabel {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.1rem;
  line-height: 1.35;
}

.location-autocomplete-label mark {
  background: #dbeafe;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.location-autocomplete-empty {
  padding: 0.75rem 0.85rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Newsletter */
.newsletter-section {
  background: var(--color-navy); color: #fff;
  padding: 3rem 0; margin-top: 2rem;
}
.newsletter-form .form-control {
  border-radius: 999px 0 0 999px; border: none; padding: 0.75rem 1.25rem;
}
.newsletter-form .btn {
  border-radius: 0 999px 999px 0; padding: 0.75rem 1.5rem;
  background: var(--color-sky); border: none; font-weight: 600;
}
.newsletter-success { color: #fff; }

/* Error pages */
.error-page { min-height: 60vh; display: flex; align-items: center; }

/* Final mobile overrides */
@media (max-width: 575.98px) {
  .hero {
    padding: 1.25rem 0 !important;
  }

  .hero h1 {
    font-size: 2rem !important;
    margin-bottom: 0.6rem !important;
  }

  .hero-subtitle {
    font-size: 0.98rem !important;
    line-height: 1.45 !important;
    margin-bottom: 1rem !important;
  }

  .hero-search-card {
    padding: 1rem !important;
    border-radius: 1rem !important;
  }

  .hero-search-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .hero-search-input,
  .hero-search-form .btn-outline-custom,
  .hero-search-form .btn-primary-custom {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  .hero .trust-row {
    display: none !important;
  }

  .hero.hero-compact {
    padding: 0.75rem 0 !important;
  }

  .hero.hero-compact h1 {
    display: none !important;
  }

  .hero.hero-compact .hero-examples {
    display: none !important;
  }

  #results-section {
    padding: 1rem 0 1.5rem !important;
  }

  .weather-forecast-app.result-card {
    padding: 0.85rem !important;
    border-radius: 1rem !important;
  }

  .weather-app-header h2 {
    font-size: 1.45rem !important;
  }

  .daily-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
  }

  .daily-tab {
    min-width: 0 !important;
    padding: 0.55rem 0.5rem !important;
  }

  .current-card-sky {
    min-height: 120px !important;
  }

  .current-weather-icon {
    font-size: 2.9rem !important;
  }

  .current-temp {
    font-size: 2.55rem !important;
  }

  .hourly-chart {
    height: 115px !important;
  }

  .hourly-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
  }

  .hourly-card {
    min-width: 0 !important;
  }

  .calc-hero {
    padding: 1.5rem 0 !important;
  }

  .calc-hero h1 {
    font-size: 1.65rem !important;
    line-height: 1.2 !important;
  }

  .calc-hero .lead {
    font-size: 0.95rem !important;
  }

  .calc-form-card {
    padding: 1rem !important;
  }

  .calc-result-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .calc-result-meta-time {
    white-space: normal;
  }

  #related-calculators {
    grid-template-columns: 1fr;
  }

  .classic-calc-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .classic-calc-btn {
    width: 100%;
  }
}

/* Print */
@media print {
  .site-header, .site-footer, #snow-canvas, .btn-icon, .mobile-toggle { display: none !important; }
  .hero { background: #fff; color: #000; padding: 1rem 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
