:root {
  --ui-bg: #f3f5f2;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f7f9f6;
  --ui-ink: #11251c;
  --ui-muted: #5d6d64;
  --ui-line: rgba(17, 37, 28, 0.11);
  --ui-brand: #285d43;
  --ui-brand-dark: #173d2b;
  --ui-accent: #c88742;
  --ui-radius-sm: 10px;
  --ui-radius-md: 16px;
  --ui-radius-lg: 24px;
  --ui-shadow-sm: 0 6px 18px rgba(18, 43, 31, 0.06);
  --ui-shadow-md: 0 18px 48px rgba(18, 43, 31, 0.09);
  --ui-shadow-lg: 0 30px 80px rgba(10, 30, 21, 0.16);
}

html { background: var(--ui-bg); }
body {
  background:
    radial-gradient(circle at 10% -5%, rgba(54, 111, 78, .10), transparent 30rem),
    linear-gradient(180deg, #f8faf7 0%, var(--ui-bg) 32rem);
  color: var(--ui-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.page-shell,
.home-shell {
  width: min(1200px, calc(100% - 40px));
  padding-bottom: 64px;
}

.site-header {
  min-height: 76px;
  margin: 0 0 18px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--ui-line);
  background: rgba(248, 250, 247, .86);
  backdrop-filter: blur(18px) saturate(1.2);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(145deg, #347453, var(--ui-brand-dark));
  box-shadow: 0 8px 24px rgba(26, 73, 49, .22);
}
.brand-name { font-size: 1.03rem; font-weight: 760; letter-spacing: -.025em; }
.brand-subtitle { color: #708078; font-size: .72rem; }

.site-nav { align-items: center; gap: 4px; }
.site-nav a,
.nav-more > summary {
  border-radius: 10px;
  padding: 9px 12px;
  color: #53645b;
  font-size: .87rem;
  font-weight: 650;
  letter-spacing: -.01em;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
.site-nav a:hover,
.nav-more > summary:hover { background: rgba(40, 93, 67, .08); color: var(--ui-brand-dark); }
.site-nav a[aria-current='page'] {
  background: var(--ui-brand-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(23, 61, 43, .16);
}
.nav-more-menu {
  border-color: var(--ui-line);
  border-radius: 14px;
  box-shadow: var(--ui-shadow-md);
}

.site-status-strip {
  min-height: 44px;
  margin-bottom: 22px;
  padding-inline: 15px;
  border: 1px solid var(--ui-line);
  border-radius: 13px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--ui-shadow-sm);
  backdrop-filter: blur(12px);
}
.site-status-copy { color: var(--ui-muted); }

.hero,
.panel,
.fly-recommendation,
.fly-main-section,
.fly-details {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: rgba(255,255,255,.94);
  box-shadow: var(--ui-shadow-md);
}

.home-shell .hero-compact,
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 28px;
  box-shadow: var(--ui-shadow-lg);
}
.home-shell .hero-compact::after,
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.12));
  pointer-events: none;
}
.home-shell .hero-compact h1,
.page-hero h1 {
  max-width: 760px;
  margin-bottom: 16px;
  color: #fff;
  font-size: clamp(2.45rem, 5vw, 4.9rem);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: .98;
  text-wrap: balance;
  text-shadow: 0 8px 28px rgba(0,0,0,.34);
}
.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 4rem); }
.home-shell .hero-compact .lede,
.page-hero .lede {
  max-width: 650px;
  color: rgba(255,255,255,.88);
  font-size: 1.05rem;
  line-height: 1.62;
}
.hero .eyebrow,
.page-hero .eyebrow {
  margin-bottom: 12px;
  color: rgba(255,255,255,.78);
  font-size: .72rem;
  font-weight: 760;
  letter-spacing: .14em;
}

h1, h2, h3 { color: var(--ui-ink); }
h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  font-weight: 740;
  letter-spacing: -.035em;
  line-height: 1.12;
  text-wrap: balance;
}
h3 { font-weight: 700; letter-spacing: -.022em; }
.eyebrow {
  color: var(--ui-brand);
  font-size: .7rem;
  font-weight: 760;
  letter-spacing: .14em;
}
.lede, .helper-text { color: var(--ui-muted); }
.helper-text { max-width: 700px; font-size: .94rem; line-height: 1.62; }

.panel {
  margin-top: 22px;
  padding: clamp(22px, 3vw, 34px);
}
.section-heading { margin-bottom: 20px; }
.split-heading { gap: 22px; }

.condition-panel {
  gap: 26px;
  border-top: 3px solid var(--ui-brand);
}
.condition-panel::before { display: none; }
.condition-reason {
  max-width: 700px;
  color: #2f4339;
  font-size: 1rem;
  font-weight: 520;
}
.condition-badge,
.confidence-pill,
.count-pill {
  border: 1px solid transparent;
  padding: 7px 11px;
  font-size: .76rem;
  font-weight: 720;
  letter-spacing: .01em;
}

.condition-metrics,
.guide-grid,
.reason-grid {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.metric-card,
.condition-metrics > div,
.condition-metrics > a,
.guide-card,
.reason-item {
  background: transparent;
}
.metric-card {
  border-color: var(--ui-line);
  border-radius: 14px;
  padding: 16px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(40,93,67,.25);
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}
.metric-label { color: #718078; font-size: .72rem; font-weight: 680; letter-spacing: .03em; text-transform: uppercase; }
.metric-value { color: var(--ui-ink); font-size: 1rem; font-weight: 720; }
.card-action-hint { color: var(--ui-brand); font-size: .72rem; }

.decision-grid { gap: 14px; }
.decision-card,
.weather-card,
.weather-insight-card,
.station-card,
.overflow-card,
.chart-summary-card,
.fly-card,
.note-card {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}
.decision-card,
.weather-card,
.weather-insight-card,
.station-card,
.overflow-card,
.fly-card { padding: 18px; }
.decision-card h3,
.weather-card strong,
.weather-insight-card strong,
.station-card h3,
.overflow-card h3 { color: var(--ui-ink); }
.decision-card p,
.weather-card p,
.weather-insight-card p,
.station-card p,
.overflow-card p { color: var(--ui-muted); font-weight: 450; }

.fly-guide-page { gap: 20px; }
.fly-recommendation,
.fly-main-section,
.fly-details { padding: clamp(20px, 3vw, 30px); }
.fly-recommendation { border-top: 3px solid var(--ui-brand); }
.fly-primary-method { color: #263d32; font-size: 1.05rem; line-height: 1.55; }
.fly-choice-grid { gap: 14px; }
.fly-card { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.fly-card:hover { transform: translateY(-3px); border-color: rgba(40,93,67,.24); box-shadow: var(--ui-shadow-md); }
.fly-rank { background: var(--ui-brand-dark); color: #fff; box-shadow: none; }
.fly-card-meta span { border: 1px solid var(--ui-line); background: var(--ui-surface-soft); color: #4f6258; }
.fly-card-reason { color: var(--ui-brand); }

.station-grid { gap: 14px; }
.station-card,
.overflow-card { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.station-card:hover,
.overflow-card:hover { transform: translateY(-2px); border-color: rgba(40,93,67,.22); box-shadow: var(--ui-shadow-md); }
.reading-list { border-top-color: var(--ui-line); }
.reading-list dt { color: #748179; font-size: .74rem; }
.reading-list dd { color: var(--ui-ink); font-weight: 700; }

.chart-panel { overflow: hidden; }
.chart-summary-grid { gap: 10px; }
.chart-summary-card { padding: 15px; box-shadow: none; }
.chart-summary-card span { color: #748179; font-size: .7rem; letter-spacing: .08em; }
.chart-summary-card strong { color: var(--ui-ink); font-size: 1.15rem; }
.river-chart-wrap,
.hourly-table-wrap {
  border-color: var(--ui-line);
  border-radius: var(--ui-radius-md);
  box-shadow: none;
}

.map-panel { padding: 22px; }
.river-map {
  border: 1px solid var(--ui-line);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.map-filter-panel label {
  border-color: var(--ui-line);
  border-radius: 10px;
  background: var(--ui-surface-soft);
  font-size: .8rem;
  font-weight: 680;
}
.map-legend { color: var(--ui-muted); font-size: .8rem; font-weight: 620; }

.actions a,
.hero-actions a,
.map-pill,
.preference-actions button {
  min-height: 42px;
  border-radius: 11px;
  padding: 10px 15px;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.actions a:hover,
.hero-actions a:hover,
.map-pill:hover,
.preference-actions button:hover { transform: translateY(-2px); }

.status-transparency,
.fly-details {
  border: 1px solid var(--ui-line);
  background: var(--ui-surface-soft);
  box-shadow: none;
}
.transparency-header,
.fly-details summary { color: var(--ui-ink); font-weight: 700; }

footer,
.site-footer {
  margin-top: 38px;
  border-top: 1px solid var(--ui-line);
  color: var(--ui-muted);
}

:focus-visible {
  outline: 3px solid rgba(45, 112, 78, .28);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .page-shell, .home-shell { width: min(100% - 28px, 1200px); }
  .condition-panel { grid-template-columns: 1fr; }
  .condition-panel .condition-metrics { grid-column: 1; grid-row: auto; }
}

@media (max-width: 720px) {
  .site-header { min-height: 66px; }
  .home-shell .hero-compact,
  .page-hero { border-radius: 20px; }
  .home-shell .hero-compact h1,
  .page-hero h1 { font-size: clamp(2.05rem, 10vw, 3.1rem); }
  .panel,
  .fly-recommendation,
  .fly-main-section,
  .fly-details { border-radius: 18px; padding: 19px; }
  .decision-card,
  .weather-card,
  .weather-insight-card,
  .station-card,
  .overflow-card,
  .fly-card { border-radius: 14px; }
}
