/* Donyatt Flood Watch. Colours are role tokens; dark mode is its own validated set, not an inversion.
   Chart series (validated with the dataviz palette checker): level = blue, rain = aqua.
   Status colours are reserved for Open / Caution / Avoid and always ship with an icon + label. */
:root {
  color-scheme: light;
  --page: #eef2f5;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --ink: #0b0b0b;
  --ink-2: #4b5560;
  --muted: #7b8590;
  --grid: #e3e7eb;
  --axis: #c3c9cf;
  --ring: rgba(11, 11, 11, 0.08);
  --brand-1: #0a2f47;
  --brand-2: #0f5a7d;
  --series-level: #2a78d6;
  --series-rain: #1baf7a;
  --st-open: #0ca30c;
  --st-caution: #fab219;
  --st-avoid: #d03b3b;
  --st-unknown: #6b7480;
  --on-open: #0b0b0b;
  --on-caution: #0b0b0b;
  --on-avoid: #ffffff;
  --on-unknown: #ffffff;
  --water-1: #5aa7e6;
  --water-2: #2a78d6;
  --shadow: 0 1px 2px rgba(16, 24, 32, 0.06), 0 8px 24px rgba(16, 24, 32, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0c1116;
    --surface: #151c23;
    --surface-2: #1b242d;
    --ink: #f3f6f8;
    --ink-2: #b9c3cc;
    --muted: #8a949e;
    --grid: #26313b;
    --axis: #3a4652;
    --ring: rgba(255, 255, 255, 0.08);
    --brand-1: #06202f;
    --brand-2: #0b4462;
    --series-level: #3987e5;
    --series-rain: #199e70;
    --water-1: #3987e5;
    --water-2: #1c5cab;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header with animated water ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, var(--brand-1), var(--brand-2));
  padding: 22px 16px 64px;
}
.hero-inner { max-width: 960px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.01em; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { flex: none; width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.hero p { margin: 4px 0 0; opacity: 0.85; }
.summary { margin-top: 14px; font-size: 1.15rem; font-weight: 650; display: flex; align-items: center; gap: 10px; min-height: 1.6em; }
.summary .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--st-unknown); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); flex: none; }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 56px; }
.waves svg { position: absolute; bottom: 0; width: 200%; height: 100%; }
.waves .w1 { fill: var(--page); opacity: 0.35; animation: drift 14s linear infinite; }
.waves .w2 { fill: var(--page); opacity: 0.6; animation: drift 9s linear infinite reverse; }
.waves .w3 { fill: var(--page); }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

main { max-width: 960px; margin: -36px auto 0; padding: 0 16px 40px; position: relative; z-index: 2; }

.advice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  border-left: 6px solid var(--st-avoid);
  padding: 14px 16px; margin: 0 0 16px; font-weight: 650;
}
.advice svg { flex: none; width: 24px; height: 24px; color: var(--st-avoid); margin-top: 1px; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }

/* ---------- Road cards ---------- */
.roads { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 16px; }
.road {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
  padding: 16px; position: relative; overflow: hidden;
  border-top: 5px solid var(--st);
  animation: rise 0.5s cubic-bezier(.2, .7, .2, 1) both;
}
.road:nth-child(2) { animation-delay: 80ms; }
.road:nth-child(3) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.road h2 { margin: 0; font-size: 1.08rem; }
.road .where { color: var(--muted); font-size: 0.85rem; margin: 2px 0 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--st); color: var(--on);
  font-weight: 800; letter-spacing: 0.04em; font-size: 1rem;
  padding: 6px 12px 6px 8px; border-radius: 999px; position: relative;
}
.chip svg { width: 20px; height: 20px; }
.s-avoid .chip::after {
  content: ""; position: absolute; inset: -4px; border-radius: 999px;
  border: 2px solid var(--st-avoid); animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.18); } }
.road .headline { margin: 12px 0 6px; font-weight: 650; }
.road ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 0.95rem; }
.road li { margin: 3px 0; }
.s-open { --st: var(--st-open); --on: var(--on-open); }
.s-caution { --st: var(--st-caution); --on: var(--on-caution); }
.s-avoid { --st: var(--st-avoid); --on: var(--on-avoid); }
.s-unknown { --st: var(--st-unknown); --on: var(--on-unknown); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; margin: 0 0 16px; }
.panel h2 { margin: 0; font-size: 1.05rem; }
.panel .sub { color: var(--muted); font-size: 0.88rem; margin: 2px 0 12px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 280px 1fr; } }

/* River gauge (animated water column) */
.gauge-wrap { display: flex; gap: 16px; align-items: stretch; }
.tank { width: 110px; flex: none; cursor: pointer; touch-action: manipulation; border-radius: 18px; -webkit-tap-highlight-color: transparent; }
.tank:focus-visible { outline: 2px solid var(--series-level); outline-offset: 3px; }
.tank svg { width: 100%; height: 260px; display: block; }
.reading { display: flex; flex-direction: column; justify-content: center; }
.figure { font-size: 3.2rem; font-weight: 750; line-height: 1; letter-spacing: -0.02em; }
.figure small { font-size: 1.2rem; font-weight: 650; color: var(--ink-2); margin-left: 2px; }
.trend { margin-top: 8px; font-weight: 650; color: var(--ink-2); }
.facts { margin: 12px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 0.9rem; }
.facts li { margin: 2px 0; }
.facts b { color: var(--ink); }

/* Range toggle */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  font: inherit; font-size: 0.88rem; font-weight: 650; color: var(--ink-2);
  background: none; border: 0; border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.linkbtn { font: inherit; font-size: 0.88rem; background: none; border: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; padding: 6px 4px; margin-left: auto; }

/* Charts */
.chart { position: relative; }
/* Stay up to date: Telegram channel and add to home screen. */
.stay-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 760px) { .stay-grid:has(> .stay-item:not([hidden]) + .stay-item:not([hidden])) { grid-template-columns: 1fr 1fr; } }
.stay-item { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-radius: 12px; padding: 14px; }
.stay-item[hidden] { display: none; }
.stay-item h3 { margin: 0 0 4px; font-size: 1rem; }
.stay-item p { margin: 0 0 8px; color: var(--ink-2); font-size: 0.93rem; }
.stay-item .meta { color: var(--muted); font-size: 0.85rem; }
.stay-list { margin: 0 0 8px; padding-left: 18px; color: var(--ink-2); font-size: 0.93rem; }
.stay-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.stay-icon img { width: 40px; height: 40px; display: block; }
.stay-icon.tg { background: #229ed9; color: #fff; }
.stay-icon.tg svg { width: 24px; height: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 650; font-size: 0.95rem; padding: 9px 16px; border-radius: 999px; border: 0; background: var(--brand-2); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }
.btn:focus-visible { outline: 3px solid var(--water-1); outline-offset: 2px; }
.tg-btn { background: #1d8cc4; }
.install-steps { font-size: 0.9rem; }
.share-ico { width: 18px; height: 18px; vertical-align: -3px; color: #1d8cc4; }
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  background: var(--surface); color: var(--ink); border-radius: 16px; padding: 12px 12px 12px 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); animation: banner-in 0.35s ease-out both;
}
.install-banner[hidden] { display: none; }
.install-banner img { flex: none; border-radius: 10px; }
.install-banner p { flex: 1; margin: 0; font-size: 0.9rem; line-height: 1.35; }
.install-banner p b { display: block; }
.install-banner p span { color: var(--muted); }
.install-banner .close { flex: none; }
@keyframes banner-in { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .install-banner { animation: none; } }
.forecast-summary { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 12px; font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.forecast-summary b { color: var(--ink-2); }
.forecast-summary .fc-title { width: 100%; color: var(--ink-2); font-weight: 650; }
.forecast-summary .fc-note { width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .label { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .title { fill: var(--ink-2); font-size: 12px; font-weight: 650; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .ref { stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .ref-normal { stroke: var(--st-caution); }
.chart .ref-flood { stroke: var(--st-avoid); }
.chart .ref-text { font-size: 11px; font-weight: 650; fill: var(--ink-2); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.chart .line { fill: none; stroke: var(--series-level); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-level); opacity: 0.1; }
.chart .bar { fill: var(--series-rain); }
.chart .bar-level { fill: var(--series-level); }
.chart .bar-level.over { fill: var(--series-level); }
.chart .bar.hot, .chart .bar-level.hot { opacity: 0.75; }
.chart .missing { fill: var(--grid); }
.chart .end-dot { fill: var(--series-level); stroke: var(--surface); stroke-width: 2; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; }
.chart .hover-dot { fill: var(--series-level); stroke: var(--surface); stroke-width: 2; }
.chart:focus-visible { outline: 2px solid var(--series-level); outline-offset: 4px; border-radius: 6px; }
.chart.loading svg { opacity: 0.45; transition: opacity 0.2s; }
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s cubic-bezier(.3, .7, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.grow { transform-box: fill-box; transform-origin: bottom; animation: grow 0.6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes grow { from { transform: scaleY(0); } }

.tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--surface); color: var(--ink); border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 12px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--ring);
  padding: 8px 10px; font-size: 0.85rem; min-width: 150px; opacity: 0; transition: opacity 0.12s;
}
.tooltip.show { opacity: 1; }
.tooltip .t { color: var(--muted); font-size: 0.78rem; margin-bottom: 4px; }
.tooltip .row { display: flex; align-items: center; gap: 8px; }
.tooltip .row b { font-size: 1rem; }
.tooltip .key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.tooltip .key.level { background: var(--series-level); }
.tooltip .key.rain { background: var(--series-rain); }
.tooltip .row span { color: var(--ink-2); }

table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--grid); }
table.data th { color: var(--ink-2); font-weight: 650; }
.table-wrap { max-height: 280px; overflow: auto; margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 12px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.stat .v { font-size: 1.5rem; font-weight: 750; line-height: 1.1; }
.stat .k { color: var(--ink-2); font-size: 0.8rem; }

.warnings p { margin: 4px 0; }
.problems { color: var(--ink); background: color-mix(in srgb, var(--st-caution) 22%, var(--surface)); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.error { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; font-weight: 650; }

footer { color: var(--muted); font-size: 0.82rem; max-width: 960px; margin: 0 auto; padding: 0 16px 40px; }
footer p { margin: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .draw { stroke-dashoffset: 0; }
}
@media (forced-colors: active) {
  .chip { border: 2px solid CanvasText; }
}

/* ---------- Driver reports ---------- */
.reports { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.reports-label { color: var(--muted); font-size: 0.8rem; margin-right: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font-size: 0.82rem; color: var(--ink); }
.pill-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--st-unknown); }
.k-clear .pill-dot { background: var(--st-open); }
.k-care .pill-dot { background: var(--st-caution); }
.k-do_not_attempt .pill-dot { background: var(--st-avoid); }
.report-btn {
  margin-top: 14px; width: 100%; font: inherit; font-weight: 650; font-size: 0.95rem;
  color: var(--ink); background: var(--surface-2); border: 1px solid var(--ring);
  border-radius: 10px; padding: 9px 12px; cursor: pointer;
}
.report-btn:hover { background: var(--grid); }
.sheet {
  width: min(460px, calc(100vw - 24px)); border: 0; border-radius: 18px; padding: 18px;
  background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.sheet::backdrop { background: rgba(5, 15, 25, 0.55); }
.sheet[open] { animation: rise 0.25s cubic-bezier(.2, .7, .2, 1); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0; }
.sheet h2 { margin: 0; font-size: 1.1rem; }
.close { font: inherit; font-size: 1.5rem; line-height: 1; background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 0 4px; }
.sheet-note { color: var(--ink-2); font-size: 0.9rem; margin: 6px 0 14px; }
.choices { display: grid; gap: 10px; }
.choice {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; text-align: left;
  font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--ring); border-radius: 12px; padding: 12px 14px; cursor: pointer;
}
.choice small { grid-column: 2; font-weight: 400; color: var(--ink-2); font-size: 0.85rem; }
.choice .pill-dot { width: 14px; height: 14px; grid-row: span 2; }
.choice:hover:not(:disabled) { border-color: var(--axis); }
.choice:disabled { opacity: 0.55; cursor: default; }
#turnstile-box { margin-top: 12px; min-height: 0; }
.report-msg { min-height: 1.4em; margin: 10px 0 0; font-weight: 600; }
.report-msg.ok { color: var(--ink); }
.report-msg.error { color: var(--st-avoid); }

/* ---------- Report photos ---------- */
.road-photo { display: block; margin-top: 12px; border-radius: 12px; overflow: hidden; position: relative; background: var(--surface-2); text-decoration: none; }
.road-photo img { display: block; width: 100%; height: 160px; object-fit: cover; }
.road-photo span { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 0.78rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.photo-field { margin-top: 12px; }
.photo-add {
  display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 650;
  border: 1px dashed var(--axis); border-radius: 12px; padding: 10px 12px; color: var(--ink);
}
.photo-add svg { width: 22px; height: 22px; flex: none; color: var(--ink-2); }
.photo-add small { font-weight: 400; color: var(--ink-2); }
.photo-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.photo-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }

/* ---------- Flood outlook & forecast ---------- */
.outlook-row { display: grid; gap: 8px; margin: 4px 0 6px; }
.outlook-main { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.outlook-band { font-size: 2rem; font-weight: 800; letter-spacing: -0.01em; }
.outlook-figures { display: flex; gap: 14px; color: var(--ink-2); flex-wrap: wrap; }
.outlook-figures b { color: var(--ink); font-size: 1.1rem; }
.meter { position: relative; height: 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--ring); overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 6px; background: var(--st-open); transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.meter-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--axis); }
.meter-scale { position: relative; height: 16px; font-size: 0.75rem; color: var(--muted); }
.meter-scale span { position: absolute; top: 0; }
.meter-scale span:first-child { left: 0; }
.b-elevated .meter-fill { background: var(--st-caution); }
.b-high .meter-fill { background: var(--st-avoid); }
.b-none .meter-fill { background: var(--st-unknown); }
.outlook { border-left: 6px solid var(--st-open); }
.outlook.b-elevated { border-left-color: var(--st-caution); }
.outlook.b-high { border-left-color: var(--st-avoid); }
.outlook.b-none { border-left-color: var(--st-unknown); }
.outlook details summary { cursor: pointer; color: var(--ink-2); }
.chart .future { fill: var(--surface-2); }
.chart .now-line { stroke: var(--ink-2); stroke-width: 1; }
.chart .bar-forecast { opacity: 0.45; }

/* ---------- Fluid touches ---------- */
.road { transition: border-color 0.8s ease, box-shadow 0.3s ease, transform 0.3s ease; }
.chip { transition: background-color 0.8s ease, color 0.8s ease; }
@media (hover: hover) {
  .road:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16, 24, 32, 0.08), 0 14px 32px rgba(16, 24, 32, 0.1); }
}
.road.changed { animation: status-glow 1.6s ease-out; }
@keyframes status-glow {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--st) 55%, transparent), var(--shadow); }
  100% { box-shadow: 0 0 0 16px transparent, var(--shadow); }
}
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.panel, .road { will-change: auto; }
.outlook .meter-fill { transition: width 1.2s cubic-bezier(.2, .7, .2, 1), background-color 0.8s ease; }
.seg button { transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.chart svg { transition: opacity 0.25s ease; }

/* ---------- Flood log (past floods table) ---------- */
.flood-log { margin-top: 12px; }
.log-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.log-controls .meta { margin: 0; }
table.floods { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.95rem; }
table.floods thead th {
  position: sticky; top: 0; z-index: 1; background: var(--surface);
  text-align: left; font-size: 0.78rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--axis);
}
table.floods thead th:last-child { width: 62%; }
table.floods tr.year th {
  text-align: left; padding: 18px 10px 6px; font-size: 1.05rem; font-weight: 750; color: var(--ink);
  border-bottom: 1px solid var(--grid);
}
table.floods tr.year:first-child th { padding-top: 8px; }
.year-count { margin-left: 10px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
table.floods tr.flood td { padding: 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.floods tr.flood { transition: background-color 0.2s ease; }
table.floods tr.flood:hover { background: var(--surface-2); }
.when .date { display: block; font-weight: 600; color: var(--ink); white-space: nowrap; }
@media (max-width: 400px) { table.floods { font-size: 0.9rem; } table.floods tr.flood td, table.floods tr.year th, table.floods thead th { padding-left: 6px; padding-right: 6px; } }
.tag {
  display: inline-block; margin-top: 4px; font-size: 0.75rem; font-weight: 650; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--ring); border-radius: 999px; padding: 1px 8px;
}
.tag-record { color: var(--ink); border-color: var(--series-level); }
.peak { white-space: nowrap; }
.peak-bar { position: relative; display: inline-block; vertical-align: middle; width: calc(100% - 64px); max-width: 260px; height: 8px; border-radius: 4px; background: var(--surface-2); }
.peak-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); opacity: 0.55; }
.peak-fill { display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--series-level); transform-origin: left; }
.peak-value { display: inline-block; width: 56px; margin-left: 8px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.show-more {
  display: block; width: 100%; margin-top: 10px; font: inherit; font-weight: 650; font-size: 0.92rem;
  color: var(--ink); background: var(--surface-2); border: 1px solid var(--ring); border-radius: 10px; padding: 9px 12px; cursor: pointer;
  transition: background-color 0.2s ease;
}
.show-more:hover { background: var(--grid); }
.chart .bar-level { transition: opacity 0.2s ease; }
@media (prefers-reduced-motion: no-preference) {
  table.floods tr.flood { animation: row-in 0.45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 30ms); }
  .peak-fill { animation: bar-in 0.7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 30ms + 120ms); }
}
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes bar-in { from { transform: scaleX(0); } }
.chart.focusing .bar-level { opacity: 0.3; }
.chart.focusing .bar-level.picked { opacity: 1; }

.tank-col { flex: none; }
.tank-hint { display: none; margin: 6px 0 0; width: 110px; text-align: center; font-size: 0.72rem; color: var(--muted); }
@media (pointer: coarse) and (prefers-reduced-motion: no-preference) { .tank-hint { display: block; } }
