/* Riverwatch Ure V2 — authoritative shared presentation layer */
:root {
  --rw-ink: #11231b;
  --rw-muted: #607168;
  --rw-green: #285942;
  --rw-green-strong: #184332;
  --rw-green-soft: #eaf2ed;
  --rw-river: #27728a;
  --rw-gold: #b87825;
  --rw-canvas: #f4f6f2;
  --rw-paper: #fff;
  --rw-line: rgba(17,35,27,.11);
  --rw-radius-sm: 12px;
  --rw-radius: 20px;
  --rw-radius-lg: 30px;
  --rw-shadow: 0 18px 55px rgba(22,48,36,.08);
  --rw-shadow-soft: 0 8px 28px rgba(22,48,36,.055);
  --rw-content: 1180px;
}

html { scroll-behavior: smooth; background: var(--rw-canvas); }
body { margin: 0; color: var(--rw-ink); background: var(--rw-canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-rendering: optimizeLegibility; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 12% 0%, rgba(74,126,94,.08), transparent 28rem), linear-gradient(180deg,#f8faf7 0,#f2f5f1 42%,#eef2ee 100%); }
.page-shell { width: min(calc(100% - 32px), var(--rw-content)); margin: 16px auto 32px; overflow: visible; border: 1px solid rgba(17,35,27,.07); border-radius: 30px; background: rgba(255,255,255,.82); box-shadow: 0 28px 90px rgba(21,48,36,.1); backdrop-filter: blur(18px); }

/* Header */
.site-header { position: sticky; top: 10px; z-index: 1000; min-height: 72px; padding: 0 22px; border: 0; border-bottom: 1px solid var(--rw-line); border-radius: 30px 30px 0 0; background: rgba(255,255,255,.91); backdrop-filter: blur(20px) saturate(1.2); box-shadow: none; }
.brand-mark { width: 38px; height: 38px; color: var(--rw-green); background: var(--rw-green-soft); border: 1px solid rgba(40,89,66,.13); border-radius: 12px; }
.brand-name { font-size: .98rem; letter-spacing: -.02em; }
.brand-subtitle { color: var(--rw-muted); font-size: .69rem; letter-spacing: .02em; }
.site-nav { gap: 5px; }
.site-nav > a, .nav-more > summary { padding: 9px 13px; border-radius: 999px; color: #405349; font-size: .84rem; font-weight: 760; transition: color .18s ease,background .18s ease,transform .18s ease; }
.site-nav > a:hover, .nav-more > summary:hover { color: var(--rw-green-strong); background: var(--rw-green-soft); transform: translateY(-1px); }
.site-nav > a[aria-current="page"], .nav-more-active > summary { color: #fff; background: var(--rw-green-strong); box-shadow: 0 5px 16px rgba(24,67,50,.19); }
.nav-more-menu { min-width: 180px; padding: 7px; border: 1px solid var(--rw-line); border-radius: 16px; background: rgba(255,255,255,.98); box-shadow: var(--rw-shadow); }
.nav-more-menu a { border-radius: 10px; padding: 10px 12px; font-size: .84rem; }

/* Status */
.site-status-strip { min-height: 40px; padding: 0 24px; border: 0; border-bottom: 1px solid var(--rw-line); background: #f7f9f6; color: var(--rw-muted); font-size: .78rem; }
.site-status-label { color: var(--rw-green-strong); }

/* Heroes */
.hero, .page-hero { position: relative; min-height: clamp(340px,42vw,465px); margin: 0; padding: clamp(42px,7vw,84px) clamp(24px,7vw,78px); border-radius: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; background-position: center 56%; }
.hero::before, .page-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg,rgba(7,24,17,.82) 0%,rgba(7,24,17,.57) 48%,rgba(7,24,17,.13) 100%),linear-gradient(0deg,rgba(7,24,17,.25),transparent 50%); }
.hero > *, .page-hero > * { position: relative; z-index: 1; max-width: 760px; }
.hero h1, .page-hero h1 { margin: 8px 0 14px; max-width: 780px; color: #fff; font-size: clamp(2.35rem,6vw,5rem); line-height: .98; letter-spacing: -.055em; text-wrap: balance; }
.hero .lede, .page-hero .lede { max-width: 650px; margin: 0; color: rgba(255,255,255,.84); font-size: clamp(1rem,1.7vw,1.25rem); line-height: 1.55; font-weight: 520; }
.hero .eyebrow, .page-hero .eyebrow { color: #d6e8dc; }
.hero .actions { margin-top: 24px; }
.hero .actions a { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.13); color: #fff; backdrop-filter: blur(12px); }
.hero .actions a:first-child { background: #fff; color: var(--rw-green-strong); }
.jump-links { display: none !important; }

/* Type and spacing */
.eyebrow { margin: 0 0 7px; color: var(--rw-green); font-size: .72rem; font-weight: 820; letter-spacing: .13em; text-transform: uppercase; }
h2 { letter-spacing: -.035em; }
.helper-text { max-width: 690px; color: var(--rw-muted); font-weight: 470; line-height: 1.62; }
.section-heading { margin-bottom: 24px; }
.section-heading h2 { margin-top: 4px; font-size: clamp(1.55rem,3.1vw,2.45rem); line-height: 1.1; }
.split-heading { align-items: flex-start; }

/* Main surface rhythm */
.panel { margin: clamp(22px,4vw,42px) clamp(16px,4vw,44px); padding: clamp(24px,4.5vw,52px); border: 1px solid var(--rw-line); border-radius: var(--rw-radius-lg); background: rgba(255,255,255,.94); box-shadow: var(--rw-shadow-soft); }
.panel + .panel { margin-top: clamp(20px,3vw,34px); }
.count-pill, .confidence-pill, .condition-badge, .status { border: 0; border-radius: 999px; background: var(--rw-green-soft); color: var(--rw-green-strong); box-shadow: none; font-size: .74rem; letter-spacing: .02em; }
.actions a, .button, button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 0 18px; background: var(--rw-green-strong); color: #fff; font-weight: 760; text-decoration: none; box-shadow: 0 8px 22px rgba(24,67,50,.15); transition: transform .18s ease,box-shadow .18s ease,background .18s ease; }
.actions a:hover, .button:hover, button:hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(24,67,50,.21); }
:focus-visible { outline: 3px solid rgba(39,114,138,.33) !important; outline-offset: 3px; }

/* Shared cards */
.station-card, .weather-card, .weather-insight-card, .threshold-card, .chart-summary-card, .fly-card, .guide-card, .overflow-card, .preference-card { border: 1px solid var(--rw-line) !important; border-radius: var(--rw-radius) !important; background: #fff !important; box-shadow: none !important; transition: transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.station-card:hover, .fly-card:hover, .overflow-card:hover { transform: translateY(-3px); border-color: rgba(40,89,66,.24) !important; box-shadow: var(--rw-shadow-soft) !important; }

/* River data */
.station-grid { gap: 14px; }
.station-card { padding: 21px; }
.station-card h3 { font-size: 1.18rem; letter-spacing: -.02em; }
.station-card .station-river { color: var(--rw-green); letter-spacing: .09em; font-size: .69rem; }
.reading-list { border-top: 1px solid var(--rw-line); margin-top: 16px; padding-top: 12px; }
.reading-list > div { padding: 7px 0; }
.chart-panel { overflow: hidden; }
.chart-controls { align-items: flex-end; }
.station-select-label { gap: 7px; color: var(--rw-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.station-select-label select { min-height: 44px; border: 1px solid var(--rw-line); border-radius: 12px; background: #f8faf8; color: var(--rw-ink); padding: 0 34px 0 12px; }
.chart-summary-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin: 22px 0; border-block: 1px solid var(--rw-line); }
.chart-summary-card { padding: 18px 20px !important; border: 0 !important; border-right: 1px solid var(--rw-line) !important; border-radius: 0 !important; background: transparent !important; }
.chart-summary-card:last-child { display: none; }
.chart-summary-card:nth-last-child(2) { border-right: 0 !important; }
.chart-summary-card strong { font-size: clamp(1.15rem,2.4vw,1.65rem); }
.river-chart-wrap { border: 1px solid var(--rw-line); border-radius: 20px; background: linear-gradient(180deg,#fbfdfc,#f3f7f4); overflow: hidden; }
.threshold-grid { gap: 0; border-top: 1px solid var(--rw-line); }
.threshold-card { border: 0 !important; border-bottom: 1px solid var(--rw-line) !important; border-radius: 0 !important; padding: 19px 0 !important; }

/* Weather */
.weather-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; gap: 0 !important; border-block: 1px solid var(--rw-line); }
.weather-card { border: 0 !important; border-right: 1px solid var(--rw-line) !important; border-radius: 0 !important; padding: 21px !important; }
.weather-card:last-child { border-right: 0 !important; }
.weather-card strong { font-size: clamp(1.55rem,3vw,2.25rem) !important; letter-spacing: -.045em; }
.weather-card p { font-weight: 480 !important; color: var(--rw-muted) !important; }
.weather-insight-grid { gap: 14px !important; }
.weather-insight-card { padding: 23px !important; background: #f8faf8 !important; }
.weather-insight-card p { font-weight: 480 !important; }
.weather-note-list { display: none !important; }
.hourly-table-wrap { border: 1px solid var(--rw-line) !important; border-radius: 18px !important; box-shadow: none !important; }
.hourly-table th { background: #f5f8f5; color: var(--rw-muted); font-size: .7rem; }
.hourly-table th,.hourly-table td { border-color: var(--rw-line) !important; font-weight: 530 !important; }
.hourly-table tbody tr:hover td { background: #f6faf7; }

/* Fly guide */
.fly-guide-page { margin: clamp(22px,4vw,42px) clamp(16px,4vw,44px) clamp(34px,6vw,70px); }
.fly-recommendation { position: relative; overflow: hidden; padding: clamp(28px,5vw,58px); border: 0; border-radius: var(--rw-radius-lg); background: linear-gradient(135deg,var(--rw-green-strong),#2d674c); color: #fff; box-shadow: 0 22px 55px rgba(24,67,50,.19); }
.fly-recommendation::after { content: ""; position: absolute; width: 300px; height: 300px; right: -110px; bottom: -180px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 40px rgba(255,255,255,.025),0 0 0 80px rgba(255,255,255,.02); }
.fly-recommendation h2 { color: rgba(255,255,255,.72); font-size: .77rem; text-transform: uppercase; letter-spacing: .12em; }
.fly-primary-method { max-width: 720px; color: #fff !important; font-size: clamp(1.7rem,4vw,3.2rem) !important; line-height: 1.08 !important; letter-spacing: -.045em; }
.fly-recommendation-status { position: relative; z-index: 1; }
.fly-recommendation .confidence-pill { background: rgba(255,255,255,.13); color: #fff; }
.fly-recommendation .last-checked { color: rgba(255,255,255,.68); }
.fly-main-section { margin-top: clamp(30px,5vw,58px); padding: 0; border: 0; background: transparent; box-shadow: none; }
.fly-choice-grid { gap: 16px; }
.fly-card { overflow: hidden; padding: 0 !important; }
.fly-card > * { margin-inline: 20px; }
.fly-card img { width: 100%; margin: 0 0 18px !important; aspect-ratio: 4/3; object-fit: cover; }
.fly-compact-context { border-top: 1px solid var(--rw-line); padding-top: 34px; }
.fly-details { margin-top: 30px; border: 1px solid var(--rw-line); border-radius: 18px; background: #fff; overflow: hidden; }
.fly-details > summary { padding: 18px 22px; font-weight: 760; cursor: pointer; }
.fly-details-body { padding: 0 22px 24px; }

/* Map */
.map-panel { position: relative; margin-inline: 0; padding: 0; border-inline: 0; border-radius: 0; background: #e9f0eb; box-shadow: none; overflow: hidden; }
.map-panel > .section-heading { position: absolute; top: 22px; left: 22px; right: 22px; z-index: 500; pointer-events: none; }
.map-panel > .section-heading > div:first-child { display: none; }
.map-legend { pointer-events: auto; width: fit-content; margin-left: auto; padding: 10px 13px; border: 1px solid rgba(17,35,27,.1); border-radius: 14px; background: rgba(255,255,255,.93); box-shadow: var(--rw-shadow-soft); backdrop-filter: blur(14px); }
.map-legend span:nth-child(n+4) { display: none; }
.map-filter-panel { position: absolute; top: 80px; left: 22px; z-index: 500; max-width: 260px; padding: 8px; border: 1px solid rgba(17,35,27,.1); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--rw-shadow-soft); backdrop-filter: blur(14px); }
.map-filter-panel label { width: 100%; justify-content: flex-start; border: 0 !important; border-radius: 10px !important; background: transparent !important; font-size: .78rem !important; }
.map-filter-panel label:nth-child(n+4) { display: none; }
.map-panel .last-checked { position: absolute; left: 30px; bottom: 17px; z-index: 500; margin: 0; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.9); box-shadow: var(--rw-shadow-soft); }
.section-summary { display: none !important; }
.river-map-large { min-height: min(74vh,760px) !important; border: 0 !important; border-radius: 0 !important; }
.leaflet-control-zoom, .leaflet-control-attribution { border: 0 !important; box-shadow: var(--rw-shadow-soft) !important; }
.leaflet-popup-content-wrapper { border-radius: 14px !important; box-shadow: var(--rw-shadow) !important; }

/* Loading polish */
[aria-busy="true"] .fly-card-loading, [aria-busy="true"] [data-fishing-reason], [data-latest]:empty { position: relative; overflow: hidden; color: transparent !important; background: #e9eeea !important; border-radius: 8px; }
[aria-busy="true"] .fly-card-loading::after, [aria-busy="true"] [data-fishing-reason]::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent); animation: rw-shimmer 1.35s infinite; }
@keyframes rw-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Footer */
.site-footer { margin-top: 52px; border-top: 1px solid var(--rw-line); background: #132c21; color: rgba(255,255,255,.72); border-radius: 0 0 30px 30px; }
.site-footer a,.site-footer h2,.site-footer h3,.site-footer strong { color: #fff; }

@media (max-width: 900px) {
  .page-shell { width: min(calc(100% - 18px),var(--rw-content)); margin-top: 9px; border-radius: 22px; }
  .site-header { top: 5px; border-radius: 22px 22px 0 0; }
  .weather-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .weather-card:nth-child(2) { border-right: 0 !important; }
  .weather-card:nth-child(-n+2) { border-bottom: 1px solid var(--rw-line) !important; }
  .chart-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chart-summary-card:nth-child(2) { border-right: 0 !important; }
  .map-filter-panel { top: 72px; }
}
@media (max-width: 720px) {
  .page-shell { width: 100%; margin: 0; border: 0; border-radius: 0; }
  .site-header { top: 0; min-height: 64px; padding-inline: 15px; border-radius: 0; }
  .brand-subtitle { display: none; }
  .hero,.page-hero { min-height: 390px; padding: 42px 22px; background-position: center 55%; }
  .hero h1,.page-hero h1 { font-size: clamp(2.35rem,12vw,3.5rem); }
  .panel { margin: 16px 12px; padding: 24px 19px; border-radius: 22px; }
  .site-status-strip { padding-inline: 14px; }
  .site-status-time { display: none; }
  .weather-grid { grid-template-columns: 1fr !important; }
  .weather-card { border-right: 0 !important; border-bottom: 1px solid var(--rw-line) !important; }
  .weather-card:last-child { border-bottom: 0 !important; }
  .chart-summary-grid { grid-template-columns: 1fr 1fr; }
  .chart-summary-card { padding: 14px 10px !important; }
  .fly-guide-page { margin-inline: 12px; }
  .fly-recommendation { padding: 28px 22px; border-radius: 22px; }
  .fly-recommendation-status { margin-top: 22px; }
  .map-panel { margin: 14px 0 0; border-radius: 0; }
  .map-panel > .section-heading { top: 12px; left: 12px; right: 12px; }
  .map-legend { display: none; }
  .map-filter-panel { top: 12px; left: 12px; right: 12px; max-width: none; display: flex; flex-wrap: nowrap; overflow-x: auto; }
  .map-filter-panel label { width: auto; white-space: nowrap; }
  .map-panel .last-checked { left: 12px; bottom: 10px; }
  .river-map-large { min-height: 68vh !important; }
  .site-footer { border-radius: 0; }
}
