:root {
  --bg: #f3f7fb;
  --bg2: #e6f0f9;
  --card: #ffffff;
  --ink: #0d1b2a;
  --muted: #56677a;
  --line: #d9e3ee;
  --brand: #0b5fa5;
  --brand2: #1e90e0;
  --water1: #3aa5f0;
  --water2: #0b5fa5;
  --deep: #083b6b;
  --up: #11804a;
  --down: #c2410c;
  --low: #fde8d7;
  --low-ink: #9a3412;
  --high: #dcecff;
  --high-ink: #0b4f8a;
  --ok: #dff5ea;
  --ok-ink: #116b40;
  --none: #edf1f5;
  --none-ink: #4c5a68;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .05), 0 10px 30px rgba(13, 27, 42, .08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06121d;
    --bg2: #0a1d2e;
    --card: #0e2132;
    --ink: #e3eef8;
    --muted: #93a8bc;
    --line: #1c3349;
    --brand: #5cb5ff;
    --brand2: #8fd0ff;
    --water1: #3aa5f0;
    --water2: #135c9c;
    --deep: #03111d;
    --up: #5fd39a;
    --down: #ff9a62;
    --low: #3a2112;
    --low-ink: #ffb68a;
    --high: #10304f;
    --high-ink: #9fd0ff;
    --ok: #0f3324;
    --ok-ink: #8de3b6;
    --none: #18293a;
    --none-ink: #b0c0cf;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 2px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

header.site { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--card) 80%, transparent); backdrop-filter: saturate(1.7) blur(14px); -webkit-backdrop-filter: saturate(1.7) blur(14px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 780; color: var(--ink); text-decoration: none; font-size: 18px; letter-spacing: -.01em; }
.logo img { width: 30px; height: 30px; border-radius: 8px; }
nav.site { display: flex; gap: 2px; }
nav.site a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: 10px; }
nav.site a:hover { background: var(--bg2); color: var(--ink); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 22px 0 10px;
  background: radial-gradient(110% 80% at 90% -10%, color-mix(in srgb, var(--water1) 22%, transparent) 0%, transparent 60%), linear-gradient(180deg, var(--bg2), var(--bg)); }
.hero h1 { font-size: clamp(30px, 6.2vw, 48px); line-height: 1.06; letter-spacing: -.03em; margin: 6px 0 12px; }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 40ch; }
.hero.home { padding: 44px 0 0; }
.hero.home h1 { max-width: 16ch; }
.hl { background: linear-gradient(90deg, var(--water1), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sea { height: 90px; margin-top: 18px; }
.sea svg { width: 100%; height: 100%; display: block; }
.sea .s1 { fill: color-mix(in srgb, var(--water1) 35%, transparent); animation: sway 9s ease-in-out infinite alternate; }
.sea .s2 { fill: color-mix(in srgb, var(--water2) 45%, transparent); animation: sway 7s ease-in-out infinite alternate-reverse; }
@keyframes sway { from { transform: translateX(-30px); } to { transform: translateX(30px); } }

main { padding: 18px 0 64px; }
h1 { font-size: 34px; line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: 23px; line-height: 1.25; margin: 40px 0 12px; letter-spacing: -.015em; }
h2.h { margin: 0 0 6px; font-size: 20px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0; }
.crumbs a { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.meta { font-size: 14px; color: var(--muted); margin: 6px 0; overflow-wrap: anywhere; }

/* Search */
.search { position: relative; padding: 6px; margin: 18px 0 0; max-width: 560px; }
.search input { font: inherit; font-size: 18px; width: 100%; border: 0; background: transparent; color: var(--ink); padding: 12px 14px 12px 44px; outline: none; }
.search::before { content: ""; position: absolute; left: 20px; top: 50%; width: 16px; height: 16px; margin-top: -10px; border: 2.5px solid var(--muted); border-radius: 50%; }
.search::after { content: ""; position: absolute; left: 34px; top: 50%; width: 8px; height: 2.5px; margin-top: 5px; background: var(--muted); transform: rotate(45deg); border-radius: 2px; }
.search:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent), var(--shadow); }
.results { list-style: none; margin: 4px 0 0; padding: 4px; border-top: 1px solid var(--line); max-height: 340px; overflow: auto; }
.results a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.results a span { color: var(--muted); font-size: 14px; }
.results a:hover, .results a[aria-selected="true"] { background: var(--bg2); }

/* Lake now-card */
.lakehero { padding-bottom: 4px; }
.now { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: center; padding: 20px; }
@media (max-width: 520px) { .now { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 16px; } }
.level { margin: 6px 0 0; line-height: 1; display: flex; align-items: baseline; gap: 6px; }
.level .num { font-size: clamp(44px, 11vw, 68px); font-weight: 820; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.level .unit { font-size: 22px; font-weight: 700; color: var(--muted); }
.stale { color: var(--down); }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 680; margin: 0; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.tone-low { --t-bg: var(--low); --t-ink: var(--low-ink); }
.tone-high { --t-bg: var(--high); --t-ink: var(--high-ink); }
.tone-full, .tone-normal { --t-bg: var(--ok); --t-ink: var(--ok-ink); }
.tone-none { --t-bg: var(--none); --t-ink: var(--none-ink); }
.badge, .tag { background: var(--t-bg); color: var(--t-ink); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 680; text-transform: capitalize; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 14px; }
.chip { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 8px 11px; }
.chip span { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.chip strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.chip.up strong { color: var(--up); }
.chip.down strong { color: var(--down); }

/* Gauge */
.gauge { height: 100%; min-height: 180px; }
.tank { position: relative; height: 100%; min-height: 180px; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, var(--bg2), color-mix(in srgb, var(--bg2) 60%, var(--line))); border: 1px solid var(--line); }
.water { position: absolute; left: 0; right: 0; bottom: 0; height: var(--fill); background: linear-gradient(180deg, var(--water1), var(--water2) 70%, var(--deep)); transition: height 1.6s cubic-bezier(.2, .8, .2, 1); }
.js .gauge:not(.in) .water { height: 0; }
.wave { position: absolute; left: 0; width: 200%; height: 18px; top: -16px; }
.wave path { fill: var(--water1); }
.w1 { animation: drift 5s linear infinite; opacity: .9; }
.w2 { animation: drift 8s linear infinite reverse; opacity: .5; top: -12px; }
.w2 path { fill: color-mix(in srgb, var(--water1) 60%, white); }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.poolmark { position: absolute; left: 0; right: 0; z-index: 2; border-top: 2px dashed color-mix(in srgb, var(--ink) 45%, transparent); }
.poolmark span { position: absolute; right: 6px; bottom: 3px; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Answer */
.answer { margin-top: 8px; border-left: 5px solid var(--brand); }
.answer p { margin: 0; }

/* Chart */
.chartcard { margin: 18px 0 0; padding: 16px 12px 10px; }
.chartcard figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 0 6px 8px; font-size: 15px; }
.legend { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.legend i { display: inline-block; width: 16px; height: 4px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.lg-line { background: var(--brand); }
.lg-band { background: color-mix(in srgb, var(--water1) 30%, transparent); height: 10px !important; }
.lg-pool { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }
.chartwrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .band { fill: color-mix(in srgb, var(--water1) 18%, transparent); }
.chart .pool { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .poolt { fill: var(--muted); font-size: 12px; font-weight: 650; }
.chart .g0 { stop-color: var(--water1); stop-opacity: .35; }
.chart .g1 { stop-color: var(--water1); stop-opacity: 0; }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.js .chart .line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .chartcard.in .line { animation: draw 1.8s cubic-bezier(.3, .7, .2, 1) forwards; }
.js .chart .area, .js .chart .dot { opacity: 0; }
.js .chartcard.in .area { animation: fade .8s ease forwards .9s; }
.js .chartcard.in .dot { animation: fade .3s ease forwards 1.6s; }
.chart .dot { fill: var(--brand); stroke: var(--card); stroke-width: 3; }
.chart .hl { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hd { fill: var(--brand); stroke: var(--card); stroke-width: 2; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 13px; padding: 5px 9px; border-radius: 9px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Years */
.years { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.yr { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.yr span { display: block; font-size: 12px; color: var(--muted); }
.yr strong { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.yr em { font-style: normal; font-size: 13px; font-weight: 650; }

/* Tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]::after { content: " ↕"; opacity: .4; }
td a { text-decoration: none; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 15px; }
dl.facts dd { margin: 0; }
@media (max-width: 520px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 8px; } }

/* Lake cards and lists */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.lakecard { display: grid; gap: 2px; text-decoration: none; color: var(--ink); height: 100%; position: relative; overflow: hidden; transition: transform .25s, border-color .25s; }
.lakecard::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--t-ink); opacity: .55; }
.lakecard:hover { transform: translateY(-3px); border-color: var(--brand); }
.lakecard strong { font-size: 17px; }
.lakecard .where { color: var(--muted); font-size: 13px; }
.lakecard .lvl { font-size: 22px; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.lakecard .lvl em { font-style: normal; font-size: 13px; font-weight: 650; margin-left: 6px; }
.lakecard .vd { font-size: 13px; color: var(--t-ink); font-weight: 650; }
.states { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.states a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.states a:hover { border-color: var(--brand); transform: translateY(-2px); }
.states span { color: var(--muted); font-size: 13px; }
.steps { padding-left: 20px; }
.steps li { margin: 8px 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 650; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 14px; color: var(--muted); }

/* Reveal on scroll */
.js .rv { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 48px; color: var(--muted); font-size: 14px; }
footer.site a { color: var(--muted); }
footer .links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .chart .line { stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .chart .area, .js .chart .dot, .js .rv { opacity: 1; transform: none; }
  .js .gauge:not(.in) .water { height: var(--fill); }
}
.chart [hidden] { display: none; }
