:root {
	color-scheme: light;
	--page: #e9ebe3;
	--raised: #fff;      /* buttons, the chosen tab */
	--well: #ecebe3;     /* the trough the tabs sit in */
	--shadow: rgb(31 42 51 / 0.14);
	--key-edge: rgb(0 0 0 / 0.12);
	--dry: #f3e4cb;
	--live: #2f9e5b;    /* the dot of "now" (OV-60) */
	--label: #2c3848;
	--label-2: #55616b;
	--halo: #fff;
	--dam: #a3a39a;
	--roof-bars: #cbbda4;
	/* The map's colours: viewer.js reads these, and the keys in the panel use them too. */
	--m-ground: #e9ebe3;
	--m-shade: #5a5648;
	--m-light: #ffffff;
	--m-shade-accent: #8a8572;
	--m-side: #393d43;        /* the sides of the block the map stands on (a fifth darker than at first, OV-36) */
	--m-side-foot: #8d949d;   /* the faint line along their foot */
	--m-relief-key: #c9c6b8;
	--m-sub-home: #7fb0d8;
	--m-sub: #9aa6b2;
	--m-outline: #3d4a5c;
	--m-parking: #c9cacb;
	--m-path: #a8997c;
	--m-service: #bfc1c3;
	--m-track: #bcae95;
	--m-street: #a9acb0;
	--m-main: #8f9296;
	--m-boundary: #5b5f66;
	--m-parcel: #8a5a2b;
	--m-pick: #c2410c;        /* the parcel whose water report is open (OV-62) */
	--m-water: #8ec1e6;
	--m-water-edge: #4f8fbf;
	--m-lake: #60a6da;
	--m-lake-full: #8ec1e6;
	--m-lake-bed: #b39d72;    /* Lake Casitas's bed left dry, out to the full lake's edge */
	--m-flood: #2f7cf0;       /* where the flood model has water standing */
	--m-flood-deep: #0a3fa8;  /* and where over half a metre deep */
	--m-zone: #c2410c;        /* FEMA's 1% flood zone */
	--m-zone-02: #e0a43a;     /* and its 0.2% zone */
	--m-lake-rise: #1560c4;   /* the arrow on a lake that is filling */
	--m-lake-fall: #b5823c;   /* and on one that is draining */
	--m-ephemeral: #b7791f;
	--m-other: #6f8fa8;
	--m-intermittent: #2a9d8f;
	--m-perennial: #1f6fb5;
	--m-computed: #a23b9e;
	--m-gage: #1f2a33;
	--m-spring: #1f6fb5;
	--m-point-edge: #ffffff;
	--m-building: #d8cdbb;
	--m-building-flat: #b9a88d; /* an outline beyond the city limits: no height, so no shading to set it off */
	--m-building-edge: #7a6a52;
	/* What covers the ground (the vegetation layer) */
	--v-forest: #6f9a63;
	--v-shrub: #b9bf8c;
	--v-grass: #e3dba1;
	--v-farm: #d9a95c;
	--v-wetland: #7fb8a8;
	--v-bare: #cfc6b4;
	--v-built: #d3d0cc;
	--v-water: #a9cdea;
	/* soils, by how readily they take in water: pale sand for fast, dark clay for very slowly */
	--s-a: #f1e4a8;
	--s-b: #dcbf74;
	--s-c: #bd8a4f;
	--s-d: #8a5638;
	--s-wet: #79a79d;
	--s-none: #c6c7c9;
	/* rock, from the youngest (river sand and gravel) to the oldest */
	--g-0: #f4ee8c;
	--g-1: #e3b872;
	--g-2: #a8693f;
	--g-3: #4d1f1a;
	/* mean yearly rain, from the driest ground to the wettest */
	--p-0: #f0c98a;
	--p-1: #d3e08c;
	--p-2: #5ba890;
	--p-3: #6a5fb5;
	/* greenness, from bare or dry ground to lush growth */
	--n-0: #b3946a;
	--n-1: #dcd08e;
	--n-2: #8dbb69;
	--n-3: #2c7d3b;
	--m-trace: #ee4a1f;       /* the route of a clicked stream's water */
	--m-fire: #d4472a;        /* a fire's outline */
	--m-road-edge: #7c8085;   /* the thin line along each side of a street */
	--m-rain-gage: #1d5a94;   /* a rain gage */
	--m-canal: #0d8a96;       /* the diversion canal */
	--m-works: #5b4636;       /* a dam, a diversion */
	--m-water-name: #1d5a94;  /* a stream's name */
	--dryness: #c98b3c;       /* the bars of the dryness chart */
	--m-trace-edge: #ffffff;
	--surface: #fbfaf6;
	--ink: #1f2a33;
	--ink-2: #55616b;
	--ink-3: #87919a;
	--rule: #dedbd0;
	--accent: #b4532a;
	--rain: #4b86c2;
	--flow: #1f6fb5;
	--wells: #7a5a2b;
	--lake: #60a6da;
	--gap: #efede5;
	--hatch: #d3cfc2;      /* the lines of the hatching where a chart has no reading */
	--track: #dedbd0;      /* a slider's rail */
	--thumb: #ffffff;      /* the year slider's handle */
	--thumb-edge: #b9b6ab;
	--pill-ink: #8a5a12;   /* "provisional" */
	--pill-bg: #f8ecd2;
	--pill-edge: #e5c78c;
	--error: #b0322a;      /* a sign-in that did not work */
	/* Where the lake's water went */
	--to-customers: #b4532a;
	--to-evaporation: #e2b866;
	--to-river: #2a9d8f;
	--to-lost: #a7a9a0;
	--to-spill: #1f6fb5;
	--to-stored: #a9cfee;
	--years-h: 320px; /* the year strip's height; kept current by viewer.js */
	font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--ink);
}
/* Dark: the same names with night-time values. viewer.js sets data-theme. */
:root[data-theme="dark"] {
	color-scheme: dark;
	--page: #15191e;
	--raised: #2b333b;
	--well: #12161a;
	--shadow: rgb(0 0 0 / 0.5);
	--key-edge: rgb(255 255 255 / 0.16);
	--dry: #4a3b24;
	--live: #4cc27a;
	--label: #e3e9f0;
	--label-2: #a9b3bc;
	--halo: #0f1215;
	--dam: #7d8086;
	--roof-bars: #8b8478;
	--m-ground: #15191e;
	--m-shade: #000000;
	--m-light: #65707d;
	--m-shade-accent: #0a0c0f;
	--m-side: #2f363e;
	--m-side-foot: #6a7684;
	--m-relief-key: #3d444c;
	--m-sub-home: #3f7fb8;
	--m-sub: #5a6673;
	--m-outline: #a9b8ca;
	--m-parking: #2a2f35;
	--m-path: #7d735f;
	--m-service: #353b42;
	--m-track: #50493b;
	--m-street: #444b53;
	--m-main: #5c646e;
	--m-boundary: #b3bac3;
	--m-parcel: #e2b77f;
	--m-pick: #ff8a4c;
	--m-water: #2c6a9c;
	--m-water-edge: #5fa3d8;
	--m-lake: #3f8fd0;
	--m-lake-full: #5d93c0;
	--m-lake-bed: #a68f63;
	--m-flood: #4b9bff;
	--m-flood-deep: #1d5fd6;
	--m-zone: #f0874a;
	--m-zone-02: #f2c463;
	--m-lake-rise: #3f9cff;
	--m-lake-fall: #c2955a;
	--m-ephemeral: #e0a64e;
	--m-other: #7f9fb8;
	--m-intermittent: #3cc4b3;
	--m-perennial: #4da6f2;
	--m-computed: #d76fd2;
	--m-gage: #eef1f4;
	--m-spring: #4da6f2;
	--m-point-edge: #15191e;
	--m-building: #8b8478;
	--m-building-flat: #a39a8b;
	--m-building-edge: #d6cdbd;
	--v-forest: #2f5a3a;
	--v-shrub: #474d33;
	--v-grass: #6a6438;
	--v-farm: #7a5a2a;
	--v-wetland: #2f6156;
	--v-bare: #55504a;
	--v-built: #3a3d42;
	--v-water: #23527a;
	--s-a: #8d8350;
	--s-b: #856a35;
	--s-c: #6f4a2a;
	--s-d: #4a2c1e;
	--s-wet: #2f6159;
	--s-none: #45484d;
	--g-0: #a09a4e;
	--g-1: #96703f;
	--g-2: #6e432c;
	--g-3: #3a1a1a;
	--p-0: #7a5a2a;
	--p-1: #5f6a2e;
	--p-2: #2f6f62;
	--p-3: #5046a0;
	--n-0: #5c4a30;
	--n-1: #706a3a;
	--n-2: #47722f;
	--n-3: #1e5c2a;
	--m-trace: #ff6a3d;
	--m-fire: #ff7a4d;
	--m-road-edge: #252a30;
	--m-rain-gage: #8cc3f2;
	--m-canal: #4fd0dc;
	--m-works: #e0c9b0;
	--m-water-name: #8cc3f2;
	--dryness: #e0a64e;
	--m-trace-edge: #0f1215;
	--surface: #1d2329;
	--ink: #e8ecef;
	--ink-2: #a9b3bc;
	--ink-3: #7b8690;
	--rule: #353d46;
	--accent: #e07a4d;
	--rain: #6aa5e0;
	--flow: #4da6f2;
	--wells: #c9a36a;
	--lake: #5aa5de;
	--gap: #262d34;
	--hatch: #3b444d;
	--track: #39424b;
	--thumb: #dde5ee;
	--thumb-edge: #dde5ee;
	--pill-ink: #e3a94f;
	--pill-bg: rgb(227 169 79 / 0.12);
	--pill-edge: rgb(227 169 79 / 0.4);
	--error: #ef7b6e;
	--to-customers: #e07a4d;
	--to-river: #3cc4b3;
	--to-lost: #6f757b;
	--to-spill: #4da6f2;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--page); }
#map { position: fixed; inset: 0; transition: opacity 0.6s ease; }
/* Hidden until its first whole picture (viewer.js); the year strip until its charts are drawn */
#map.waiting { opacity: 0; }
#years.waiting { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { #map { transition: none; } }
/* The block's sides, drawn over the map and under its labels */
.blockSides { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
[hidden] { display: none !important; }

#loading {
	position: fixed; top: 38%; left: 50%; transform: translate(-50%, -50%); z-index: 5;
	display: flex; align-items: center; gap: 10px; padding: 12px 18px; width: max-content; max-width: calc(100% - 32px);
	background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
	box-shadow: 0 2px 12px var(--shadow); font-weight: 600; transition: opacity 0.4s;
}
#loading.done { opacity: 0; pointer-events: none; }
#loading.failed .spinner { display: none; }
.spinner {
	flex: none; width: 16px; height: 16px; border-radius: 50%;
	border: 2px solid var(--rule); border-top-color: var(--accent); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

#panel, #years, #panelToggle {
	position: fixed; background: var(--surface); border: 1px solid var(--rule);
	border-radius: 10px; box-shadow: 0 2px 12px var(--shadow);
}
/* On a wide screen the panel and the year strip are drawn at 85% of their size, words and
   all, as if the browser were zoomed out; the map is not (OV-46). --rail-zoom is read by
   the panel's height below. A phone's sheet keeps its full size. */
:root { --rail-zoom: 0.85; }
#panel, #years { zoom: var(--rail-zoom); }
#panel {
	top: 12px; left: 12px; width: 404px; max-height: calc(100% - (var(--years-h) + 50px) / var(--rail-zoom)); /* --years-h is in screen pixels; lengths here are scaled */
	overflow: auto; overscroll-behavior: contain; padding: 16px 20px;
	--col: 68px; /* where a row's words start: past its box and its key */
	scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
/* The panel's name, its buttons and its two tabs stay put while the rest scrolls under them. */
.panelTop { position: sticky; top: -16px; z-index: 1; margin: -16px -20px 0; padding: 16px 20px 0; background: var(--surface); } /* top: the panel's own padding, which a sticky box is held clear of */
#panelToggle { display: none; top: 12px; left: 12px; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--ink); z-index: 3; }
.grip { display: none; }
#panelClose { display: grid; }
/* Put away on a wide screen (OV-33): the panel goes and its button stands in its place. */
.railHidden #panel { display: none; }
.railHidden #panelToggle { display: block; }
.headButtons { flex: none; display: flex; gap: 6px; }
#theme { display: grid; }
#theme svg { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#theme .sun, #theme[aria-pressed="true"] .moon { display: none; }
#theme[aria-pressed="true"] .sun { display: inline; }

.panelHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
h1 { margin: 0 0 12px; font-size: 22px; line-height: 1.1; letter-spacing: -0.01em; }
h1 span { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; margin-top: 3px; }
button { font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layers / About: two words, the chosen one underlined, on a rule across the panel */
.tabRow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.tabs { display: flex; gap: 22px; }
/* US or Metric (OV-84), at the right of the tabs' rule */
.seg.unitsSeg { flex: none; margin: 0 0 6px; padding: 2px; }
.seg.unitsSeg button { flex: none; padding: 3px 9px; font-size: 12px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 6px 0 8px; background: none; color: var(--ink-2); font-weight: 600; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.views { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.views .viewsLabel { color: var(--ink-2); font-size: 13px; margin-right: 2px; }
#panel .views button { padding: 6px 9px; border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.views button, #yearsToggle, #play, #panelClose, #theme {
	border: 1px solid var(--rule); background: var(--raised); color: var(--ink); border-radius: 6px; padding: 5px 9px;
}
.views button:hover, #yearsToggle:hover, #play:hover, #panelClose:hover, #theme:hover { border-color: var(--ink-3); }
#panel #theme, #panel #panelClose { width: 36px; height: 36px; padding: 0; border-radius: 8px; place-items: center; }
#theme svg, #panelClose svg { width: 16px; height: 16px; }
/* A section: its name in small capitals, a rule running on from it */
fieldset { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
legend { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
legend::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
fieldset label { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; cursor: pointer; }
fieldset input[type="checkbox"], fieldset input[type="radio"] { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ink); }
.what { min-width: 0; font-weight: 650; }
.what small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--ink-2); }
/* Each layer's words on one line; the "i" beside its name opens the rest (OV-52) */
.layer, .streams { position: relative; }
.layer > label > .what, .streams > .what { padding-right: 28px; }
#paneLayers .what small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
#paneLayers .open .what small { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.info { position: absolute; top: 8px; right: 0; width: 20px; height: 20px; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: var(--raised); color: var(--ink-2); font: italic 700 12px/18px Georgia, "Times New Roman", serif; text-align: center; }
.info:hover { color: var(--ink); border-color: var(--ink-3); }
.open > .info { background: var(--ink); border-color: var(--ink); color: var(--surface); }
/* Streams: a heading with no box of its own; its three kinds are full rows under it (OV-55) */
.streams { padding: 8px 0 0 var(--col); }
.streams > .what { display: block; }
/* A switch that belongs to the row above it (the hollows, under the flow paths) */
fieldset label.sub { margin-left: 28px; padding-top: 0; }
/* Ground relief: a switch of its own after the one-at-a-time colours */
fieldset label.apart { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--rule); }
.layer:has(> label.apart) > .info { top: 18px; }
.layer:has(> label.sub) > .info { top: 0; }
.key { flex: none; width: 28px; height: 12px; display: inline-block; margin-top: 4px; }
.key.box { background: var(--c); border-radius: 3px; border: 1px solid var(--key-edge); }
.key.line { height: 0; border-top: 2px solid var(--c); margin-top: 9px; }
.key.line.thick { border-top-width: 4px; margin-top: 8px; }
.key.dash { height: 0; border-top: 2px dashed var(--c); margin-top: 9px; }
.key.dot { width: 12px; margin: 4px 8px 0; border-radius: 50%; background: color-mix(in srgb, var(--c) 35%, transparent); border: 2px solid var(--c); }
.key.flowKey {
	height: 4px; border-radius: 2px; margin-top: 8px;
	background: repeating-linear-gradient(90deg, var(--m-perennial) 0 6px, #dcebf8 6px 10px);
	background-size: 10px 4px; animation: flowKey 0.8s linear infinite;
}
@keyframes flowKey { to { background-position: 10px 0; } }
@media (prefers-reduced-motion: reduce) { .key.flowKey { animation: none; } }
/* A box set in under a layer, for a choice that goes with it */
.card { margin: 2px 0 10px var(--col); padding: 12px; border: 1px solid var(--rule); border-radius: 10px; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); font-size: 13px; }
.card > b { display: block; font-size: 13.5px; }
.card > p { margin: 2px 0 0; line-height: 1.4; color: var(--ink-2); }
/* The lakes' arrows: the switch beside the title */
.card.cue { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
.card.cue > p, .card.cue > .cueNow { grid-column: 1 / -1; }
.card.cue > .seg { margin: 0; }
.card.cue > .seg button { flex: none; padding: 3px 10px; }
.seg { display: flex; gap: 2px; margin: 10px 0; padding: 3px; border-radius: 8px; background: var(--well); }
.seg button { flex: 1; border: 0; border-radius: 6px; padding: 5px 8px; background: none; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }
/* The flooding's storm: sliders under their labels */
.card .slide { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 8px 0 2px; font-size: 13px; color: var(--ink-2); }
.card .slide output { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card input[type="range"] { display: block; width: 100%; margin: 0; accent-color: var(--m-flood); }
.card input[type="range"]:disabled { opacity: 0.55; }
.card .slide select { font: inherit; font-size: 13px; color: var(--ink); background: var(--raised); border: 1px solid var(--rule); border-radius: 6px; padding: 2px 4px; }
.card .floodLive { margin: 10px 0 0; color: var(--ink-2); line-height: 1.4; }
.card .floodAlerts { margin: 6px 0 0; padding-left: 18px; line-height: 1.4; }
.card #floodNow { margin: 10px 0 6px; color: var(--ink); font-weight: 600; }
.cueLine { display: flex; gap: 8px; margin-top: 4px; line-height: 1.4; }
.cueLine i { flex: none; width: 12px; font-style: normal; font-weight: 700; text-align: center; color: var(--ink-3); }
.cueLine i.up { color: var(--m-lake-rise); }
.cueLine i.down { color: var(--m-lake-fall); }
.note { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
fieldset > .note:first-of-type { margin: 0 0 4px; }
fieldset > .note.under { margin: 0 0 8px var(--col); } /* a note that belongs to the row above it */
/* Lakes filling or draining: its key in the panel, and what it says now */
.card .cueNow { margin: 0; }
.cueNow .up { color: var(--m-lake-rise); font-weight: 600; }
.cueNow .down { color: var(--m-lake-fall); font-weight: 600; }
/* An arrow on a lake: up for filling, down for draining, a bar for holding level */
.lakeMark {
	display: flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; border-radius: 12px; pointer-events: none;
	font: 700 13px/1 system-ui, sans-serif; color: #fff; background: var(--ink-3); box-shadow: 0 1px 4px var(--shadow); white-space: nowrap;
}
.lakeMark svg { width: 15px; height: 15px; fill: #fff; }
.lakeMark.up { background: var(--m-lake-rise); }
.lakeMark.down { background: var(--m-lake-fall); }
.lakeMark.down svg { transform: rotate(180deg); }
.lakeMark.small { padding: 3px; }
/* The kinds of ground cover, each with a square of its colour */
/* A bar of the shares, then a line for each kind with its share at the right */
.coverKey { margin: 0 0 10px var(--col); font-size: 13px; color: var(--ink-2); }
.coverKey .stack { display: flex; gap: 1px; height: 6px; margin-bottom: 8px; border-radius: 3px; overflow: hidden; }
.coverKey .stack i { background: var(--c); min-width: 1px; }
.coverKey .row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.coverKey .row .sw { flex: none; width: 9px; height: 9px; margin: 0; }
.coverKey .row b { margin-left: auto; padding-left: 8px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* How many buildings stand at each roof height */
#heights { margin: 0 0 8px var(--col); }
#heights svg { display: block; width: 100%; height: auto; }
#heights figcaption { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--ink-2); font-variant-numeric: tabular-nums; }
#heights figcaption b { color: var(--ink); }
#heights .tick { fill: var(--ink-3); font-size: 9px; }
#heights .roofBar { fill: var(--roof-bars); }

/* Real Estate, by subscription (OV-61): what it includes, the sign-in, asking about one */
legend .tag { order: 2; padding: 1px 7px; border: 1px solid var(--pill-edge); border-radius: 999px; background: var(--pill-bg); color: var(--pill-ink); font-size: 10px; letter-spacing: 0.06em; }
legend::after { order: 3; }
.card.included { margin: 4px 0 14px; }
.card.included ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--ink-2); line-height: 1.4; }
.card.included .calc { margin: 10px 0 0; font-size: 12px; font-style: italic; color: var(--ink-2); }
.card.included li b { display: block; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.signIn { display: grid; gap: 8px; margin: 0; font-size: 13px; }
.signIn > b { font-size: 13.5px; }
.signIn label { display: grid; gap: 3px; padding: 0; color: var(--ink-2); font-size: 12px; cursor: default; }
.signIn input { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--raised); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 9px; }
.signIn input:hover { border-color: var(--ink-3); }
.signInError { margin: 0; color: var(--error); font-size: 12.5px; line-height: 1.4; }
.signInFoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.signInFoot small, .ask small { color: var(--ink-3); font-size: 12px; }
#signInButton { border: 1px solid var(--ink); border-radius: 6px; padding: 6px 14px; background: var(--ink); color: var(--surface); font-weight: 600; font-size: 13px; }
#signInButton:disabled { opacity: 0.6; cursor: progress; }
.ask { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ask a { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
#signOut { border: 1px solid var(--rule); border-radius: 6px; background: var(--raised); color: var(--ink); font-weight: 600; }
#signOut:hover { border-color: var(--ink-3); }
.who { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin: 2px 0 4px; font-size: 13px; color: var(--ink-2); }
.who b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
#signOut { padding: 3px 9px; font-size: 12px; }
/* A parcel's water report (OV-62) and finding a parcel by its number */
.findParcel { display: grid; gap: 4px; margin: 8px 0 4px; font-size: 13px; }
.findParcel label { padding: 0; color: var(--ink-2); font-size: 12px; cursor: default; }
.findRow { display: flex; gap: 6px; }
.findRow input { flex: 1; min-width: 0; font: inherit; font-size: 14px; color: var(--ink); background: var(--raised); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 9px; }
#findButton, .report .close, .report .more { border: 1px solid var(--rule); border-radius: 6px; background: var(--raised); color: var(--ink); font-size: 13px; font-weight: 600; padding: 5px 12px; }
#findButton:hover, .report .close:hover, .report .more:hover { border-color: var(--ink-3); }
.findMsg { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.4; }
.filesMsg { margin: 0 0 6px; color: var(--error); font-size: 12.5px; line-height: 1.4; }
.reportHint { margin: 4px 0 6px; }
/* the report itself, in a popup of its own on the map (OV-62 revision), or on a phone in a card along the bottom */
.report { display: grid; gap: 9px; font-size: 12.5px; line-height: 1.4; color: var(--ink); }
.maplibregl-popup.reportPop { --popup-bg: color-mix(in srgb, var(--surface) 94%, transparent); z-index: 2; } /* nearly solid: a long read (owner, 2026-11-24) */
.maplibregl-popup.reportPop .maplibregl-popup-content { padding: 0; text-shadow: none; box-shadow: 0 6px 24px var(--shadow); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.reportPop .report { padding: 12px 14px; max-height: min(62vh, 560px); overflow: auto; scrollbar-width: thin; }
.report p b { display: inline; } /* the map's popups set every b on its own line */
.report .details { display: grid; gap: 9px; }
.report .details[hidden], .report .fine[hidden] { display: none; }
.parcelSheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; max-height: min(58dvh, 100% - 120px); overflow: auto; background: var(--surface); border: 1px solid var(--rule); border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 20px var(--shadow); padding: 12px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.parcelSheet[hidden] { display: none; }
.report .head { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: start; }
.report .head > span { grid-column: 1; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.report .head > b { display: block; grid-column: 1; font-size: 14.5px; }
.report .head > small { grid-column: 1; color: var(--ink-2); font-size: 12.5px; }
.report .close { grid-column: 2; grid-row: 1 / span 3; width: 26px; height: 26px; padding: 0; font-size: 15px; line-height: 1; }
.report .sum { margin: 0; padding: 9px 11px; border-radius: 8px; background: color-mix(in srgb, var(--m-flood) 12%, var(--surface)); color: var(--ink); line-height: 1.45; }
.report .sec { display: grid; gap: 3px; }
.report .sec > b { display: block; font-size: 13px; }
.report .sec p { margin: 0; color: var(--ink-2); line-height: 1.45; }
.report .sec p b { color: var(--ink); font-weight: 650; }
.report table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.report th { text-align: left; font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 3px 4px 3px 0; border-bottom: 1px solid var(--rule); }
.report td { padding: 4px 4px 4px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); vertical-align: top; }
.report td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.report tr.now td { color: var(--ink); background: color-mix(in srgb, var(--m-flood) 9%, transparent); }
.report .more { justify-self: start; padding: 3px 10px; font-size: 12px; }
.report .fine { margin: 0; padding-top: 8px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 11.5px; line-height: 1.45; }

#paneAbout { font-size: 13px; }
#paneAbout p { margin: 0 0 8px; }
#paneAbout h2 { margin: 12px 0 4px; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
#paneAbout ul { margin: 0; padding-left: 16px; color: var(--ink-2); }
#paneAbout li { margin-bottom: 4px; }
#credits { font-size: 12px; }
/* Who made the map, and how to reach him (OV-53) */
#paneAbout .maker { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
#paneAbout .maker b { font-size: 13.5px; }
#paneAbout .maker span { color: var(--ink-2); }
#paneAbout a { color: inherit; }
#rights { font-size: 12px; color: var(--ink-2); }
#rights p { margin: 0 0 6px; }
#credit .madeBy a { font-weight: 600; }

#panelClose, #theme { flex: none; place-items: center; width: 30px; height: 30px; padding: 0; }
#panelClose svg, #theme svg { width: 14px; height: 14px; }
#panelClose svg { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.sw { display: inline-block; width: 8px; height: 8px; margin-right: 3px; border-radius: 2px; background: var(--c); }

/* ---- The year strip and its charts, to the owner's four mockups ("Bottom tool bar polish").
   Each chart is a row of three columns: its name, figure and words (--lead), the chart, and
   the labels of its scale (--tail). The period row and the axis keep the same columns. */
#years {
	left: 12px; right: 12px; bottom: 26px; padding: 10px 16px 4px;
	--lead: 300px; --tail: 78px; --gutter: 16px; --pad: 7px; --plot-h: 42px; /* --tail: room for "highest month" (OV-84) */
	/* On a short screen the charts scroll inside the strip rather than run off the top */
	max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
.yearRow { display: flex; align-items: center; gap: 10px 12px; }
/* Now (OV-60): with "Current rain" chosen, the strip gives the live readings in place of the year:
   the year's controls and the charts with nothing live (the water table, the lake's account,
   dryness) step aside. */
.nowOnly { display: none; }
#years.now .nowOnly { display: flex; }
#years.now p.nowOnly { display: block; }
#years.now :is(#play, .speedBox, .divider, .yearRow > .yearLabel, .yearSlide, .periodRow, .axis, .chart[data-series="wells"], .chart[data-series="uses"], .chart[data-series="dry"]) { display: none; }
.nowTag { flex: none; align-items: center; gap: 10px; }
.liveDot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 22%, transparent); }
.nowTag output { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nowNote { flex: 1 1 160px; min-width: 0; margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
/* Live, the fifth view (owner, 2026-11-23: "Build A"): past a thin rule after Day. While it is
   chosen the four views stay, led by the year they go back to; the time of the latest reading
   leads the row, with a round arrow to read again now. A first read dims the charts; when nothing
   could be read, a message stands in for them. */
.res .sep { flex: none; width: 1px; margin: 6px 3px; background: var(--rule); }
.res .liveSeg { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.liveSeg .liveDot { width: 8px; height: 8px; box-shadow: none; }
.liveSeg[aria-pressed="false"] .liveDot { opacity: 0.6; }
.liveSeg[aria-pressed="true"] .liveDot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 28%, transparent); }
.res .resYear { flex: none; align-self: center; padding: 0 7px 0 9px; font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
#years.now .nowTag { gap: 8px; }
.nowTag output.muted { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.readNow { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--raised); color: var(--ink-2); }
.readNow:hover { border-color: var(--ink-3); color: var(--ink); }
.readNow:disabled { opacity: 0.5; cursor: default; }
.readNow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nowTag .spin { display: none; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule); border-top-color: var(--live); }
#years.reading .nowTag .spin { display: block; }
#years.dim #charts { opacity: 0.35; }
#years.nolive #charts { display: none; }
.nowNote .narrow { display: none; }
.nowMsg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 8px 0 10px; padding: 12px 14px; border: 1px dashed var(--rule); border-radius: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.nowMsg[hidden] { display: none; }
.nowMsg p { flex: 1 1 320px; margin: 0; }
.nowMsg b { color: var(--ink); font-weight: 650; }
#nowRetry { flex: none; height: 32px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--raised); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; }
#nowRetry:hover { border-color: var(--ink-3); }
@media (prefers-reduced-motion: no-preference) {
	.nowTag .spin { animation: spin 0.9s linear infinite; }
	#years.now .liveSeg .liveDot { animation: liveBeat 2s ease-in-out infinite; }
}
@keyframes liveBeat { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--live) 0%, transparent); } }
.cardLive { display: flex; gap: 8px; align-items: baseline; margin: 2px 0 4px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.cardLive[hidden] { display: none; }
.cardLive .liveDot { flex: none; width: 8px; height: 8px; box-shadow: none; transform: translateY(1px); }
.cardLive b { color: var(--ink); font-weight: 650; }
.nowChips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: var(--plot-h); }
.nowChips span { display: inline-flex; gap: 5px; align-items: baseline; padding: 3px 8px; border-radius: 999px; background: var(--well); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.nowChips b { color: var(--ink); font-variant-numeric: tabular-nums; }
.nowChips span.unit { background: none; padding: 0 2px; font-size: 11.5px; color: var(--ink-3); }
.nowWhy { margin: 5px 0 0; font-size: 12px; line-height: 1.4; color: var(--ink-2); }
.nowWhy b { font-weight: 650; color: var(--ink); }
.nowChips span.none { background: none; padding: 0; }
/* A reading in use that is its gage's resting value, not a measured low flow (OV-87): dashed and paler */
.nowChips span.rest { padding: 2px 7px; background: none; border: 1px dashed var(--ink-3); }
.nowChips span.rest b { color: var(--ink-2); }
#play { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 8px; }
#play svg { width: 14px; height: 14px; fill: var(--accent); }
#play .pauseIcon, #play[aria-pressed="true"] .playIcon { display: none; }
#play[aria-pressed="true"] .pauseIcon { display: inline; }
/* The pace: the browser's own box, drawn plain, with a chevron of the page's own */
.speedBox { flex: none; position: relative; display: flex; }
.speedBox::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border: solid var(--ink-2); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
#speed { -webkit-appearance: none; appearance: none; height: 34px; padding: 0 30px 0 12px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--raised); border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; }
#speed:hover { border-color: var(--ink-3); }
.divider { flex: none; width: 1px; height: 26px; background: var(--rule); }
.yearLabel { flex: none; display: flex; align-items: baseline; gap: 8px; cursor: default; }
.yearLabel span { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
#yearOut { min-width: 4ch; font-size: 26px; line-height: 1; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
/* The year is a water year, and the label says which months (OV-90): the owner took 2025's rain for the calendar year's */
label.yearLabel { align-items: center; }
.yearWords { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.yearWords small { font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.yearSlide { flex: 1 1 160px; min-width: 0; display: flex; align-items: center; gap: 10px; }
.yearEnd { flex: none; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
#year { flex: 1; min-width: 0; }
/* The two sliders: a rail, orange up to the handle on the year's; an orange handle on the period's */
#years input[type="range"] { -webkit-appearance: none; appearance: none; height: 22px; margin: 0; background: none; cursor: pointer; --f: 0; --fill: var(--accent); }
#years #period { --fill: var(--track); }
#years input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--fill) calc(9px + (100% - 18px) * var(--f)), var(--track) 0); }
#years input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--track); }
#years input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--fill); }
#years input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--thumb); border: 1px solid var(--thumb-edge); box-shadow: 0 1px 3px var(--shadow); }
#years input[type="range"]::-moz-range-thumb { box-sizing: border-box; width: 18px; height: 18px; border-radius: 50%; background: var(--thumb); border: 1px solid var(--thumb-edge); box-shadow: 0 1px 3px var(--shadow); }
#years #period::-webkit-slider-thumb { background: var(--accent); border-color: var(--accent); }
#years #period::-moz-range-thumb { background: var(--accent); border-color: var(--accent); }
/* Year, Month, Week, Day: a switch like the panel's, the chosen one raised */
.res { flex: none; display: flex; gap: 2px; padding: 3px; background: var(--well); border-radius: 10px; }
.res button { border: 0; background: none; color: var(--ink-2); border-radius: 7px; padding: 6px 15px; font-weight: 600; font-size: 13.5px; }
.res button:hover { color: var(--ink); }
.res button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }
#yearsToggle { flex: none; display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px 0 13px; border-radius: 8px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
#yearsToggle::before { content: ""; width: 6px; height: 6px; margin-top: -4px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
#yearsToggle[aria-expanded="false"]::before { margin-top: 3px; transform: rotate(-135deg); }
/* The period: ‹ its name ›, and its slider over the charts */
.periodRow { display: grid; grid-template-columns: var(--lead) minmax(0, 1fr) var(--tail); column-gap: var(--gutter); align-items: center; margin-top: 10px; }
.periodNav { display: flex; align-items: center; gap: 10px; min-width: 0; }
.periodNav button { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--raised); color: var(--ink); }
.periodNav button:hover { border-color: var(--ink-3); }
.periodNav button:disabled { opacity: 0.4; cursor: default; }
.periodNav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* A width for each view's longest name, so › does not move as the name changes */
.periodNav label { flex: none; width: var(--name-w, 9.6em); min-width: 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.periodRow[data-res="month"] { --name-w: 8.4em; }
.periodRow[data-res="week"] { --name-w: 12.6em; }
#period { width: 100%; min-width: 0; }
#charts { margin-top: 10px; }
.chart { position: relative; display: grid; grid-template-columns: var(--lead) minmax(0, 1fr) var(--tail); column-gap: var(--gutter); }
.chart::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--rule); }
.lead { min-width: 0; padding: var(--pad) 0; }
.chart .head { display: flex; align-items: baseline; gap: 8px; line-height: 20px; }
.chart .head b { flex: 1; min-width: 0; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart .head svg.dam { flex: none; width: 30px; height: 15px; align-self: center; }
.chart .figure { flex: none; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart .figure.none { font-weight: 400; color: var(--ink-3); }
.chart .value { margin-top: 2px; font-size: 12.5px; line-height: 17px; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.chart .value:empty { display: none; }.pill { display: inline-block; margin-right: 2px; padding: 0 6px; border: 1px solid var(--pill-edge); border-radius: 4px; background: var(--pill-bg); color: var(--pill-ink); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; line-height: 15px; text-transform: uppercase; vertical-align: 1px; }
.trend.up { color: var(--m-lake-rise); }
.trend.down { color: var(--m-lake-fall); }
.keys { display: flex; flex-wrap: wrap; gap: 1px 12px; margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.keys:empty { display: none; }
.keys > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.keys i { flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--c); }
.keys i.line { width: 14px; height: 2px; border-radius: 1px; }
.keys > span.plain { white-space: normal; } /* the gage a chart is read at: words alone, free to wrap */
.keys i.hatch { background: repeating-linear-gradient(-45deg, var(--hatch) 0 1.2px, var(--gap) 1.2px 3.6px); box-shadow: inset 0 0 0 1px var(--rule); }
.plot { position: relative; min-width: 0; padding: var(--pad) 0; }
.plot > svg { display: block; width: 100%; height: var(--plot-h); cursor: pointer; touch-action: none; }
/* The water table and the lake's account have two lines of words and a key: their charts take the room */
.chart[data-series="wells"], .chart[data-series="uses"] { --plot-h: 60px; }
/* The year or period chosen: a band down the charts, edged in orange; a day is a line */
.plot > .band { position: absolute; top: 0; bottom: 0; left: var(--band-l, -10px); width: var(--band-w, 0); pointer-events: none;
	background: color-mix(in srgb, var(--accent) 12%, transparent); border: solid color-mix(in srgb, var(--accent) 80%, transparent); border-width: 0 1px; }
.thinBand .plot > .band { background: var(--accent); border: 0; }
.chart.noBand .band { display: none; }
/* In a finer view: a box of words in place of a chart, or the lake's year as one bar */
.plot > .note { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 16px; min-height: min(var(--plot-h), 46px); padding: 4px 12px; border: 1px dashed color-mix(in srgb, var(--ink-3) 55%, transparent); border-radius: 6px; font-size: 13px; color: var(--ink-2); text-align: center; }
.plot > .shares { display: flex; height: min(var(--plot-h), 46px); border-radius: 6px; overflow: hidden; }
.shares > span { flex: none; display: flex; align-items: center; min-width: 0; overflow: hidden; box-shadow: inset 2px 0 var(--surface); }
.shares > span:first-child { box-shadow: none; }
.shares > span > span { flex: none; padding: 0 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
/* The scale's labels at the right, each beside its height */
.scale { position: relative; min-width: 0; font-size: 11.5px; line-height: 1.2; color: var(--ink-2); }
.scale span { position: absolute; left: 0; transform: translateY(-50%); white-space: nowrap; font-variant-numeric: tabular-nums; }
.scale span.above { transform: translateY(-100%); }
.scale span.below { transform: none; }
.axis { position: relative; height: 24px; margin: 0 calc(var(--tail) + var(--gutter)) 0 calc(var(--lead) + var(--gutter)); font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.axis::before { content: ""; position: absolute; top: 0; height: 1px; left: calc(-1 * (var(--lead) + var(--gutter))); right: calc(-1 * (var(--tail) + var(--gutter))); background: var(--rule); }
.axis span { position: absolute; top: 6px; transform: translateX(-50%); }
/* On a wide screen too, each chart's name, words, key and figure are one line over a chart that
   runs the strip's width (OV-94): nothing wraps, so every row keeps one height as the years play.
   The rules above that set a left column (--lead) are what a wide screen had before. */
@media (min-width: 700.01px) and (min-height: 560.01px) {
	.chart, .chart[data-series="wells"], .chart[data-series="uses"] { grid-template-columns: minmax(0, 1fr) var(--tail); --plot-h: 36px; }
	.chart[data-series="wells"], .chart[data-series="uses"] { --plot-h: 48px; }
	.lead { grid-column: 1 / -1; display: flex; align-items: baseline; column-gap: 14px; padding-bottom: 0; white-space: nowrap; }
	.plot { padding-top: 3px; }
	.plot > .note { box-sizing: border-box; height: min(var(--plot-h), 46px); min-height: 0; margin: 0; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
	.chart .head { display: contents; }
	.chart .head b { flex: none; order: 1; }
	.chart .value, .chart .value:empty { order: 2; flex: 0 1 auto; min-width: 0; margin: 0; display: block; white-space: nowrap; text-overflow: ellipsis; }
	.chart .keys { order: 3; flex: none; flex-wrap: nowrap; gap: 0 12px; margin: 0; }
	.chart .head svg.dam { order: 4; margin-left: auto; }
	.chart .figure { order: 5; margin-left: auto; }
	.chart .head svg.dam + .figure { margin-left: 0; }
	.axis { margin-left: 0; }
	.axis::before { left: 0; }
	/* The period's name and arrows over its slider, which runs the charts' width */
	.periodRow { grid-template-columns: minmax(0, 1fr) var(--tail); row-gap: 4px; }
	.periodNav { grid-column: 1 / -1; }
}
/* Too narrow for the key on the title's line: it takes a row of its own, always there */
@media (min-width: 700.01px) and (max-width: 1000px) and (min-height: 560.01px) {
	.lead { flex-wrap: wrap; }
	.chart .value, .chart .value:empty { flex: 1 1 0; }
	.chart .keys { order: 6; flex: 1 0 100%; }
	.chart:is([data-series="flow"], [data-series="wells"], [data-series="uses"]) .keys { display: flex; min-height: 16px; }
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hatchBack { fill: var(--gap); }
.hatchLine { stroke: var(--hatch); stroke-width: 1.4; }
svg .gap { fill: url(#hatch); }
svg .dry { fill: var(--dry); }
svg .track { fill: var(--gap); }
svg .mean { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
svg .gapText { fill: var(--ink-3); font-size: 10px; }
svg .readText { fill: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; } /* a water table reading, beside its line */
svg .base { stroke: var(--rule); stroke-width: 1; }

#credit { position: fixed; right: 12px; bottom: 6px; font-size: 11px; color: var(--ink-2); }
#credit a { color: inherit; }
.maplibregl-ctrl-top-right { top: 4px; right: 4px; }
.subLabel {
	font: 600 12px/1.2 system-ui, sans-serif; color: var(--label); text-align: center; pointer-events: none;
	text-shadow: 0 0 3px var(--halo), 0 0 3px var(--halo), 0 0 3px var(--halo); white-space: nowrap;
}
.subLabel small { display: block; font-weight: 500; color: var(--label-2); }
/* The info window is a little over half see-through, with what is behind it slightly
   blurred (OV-26: 50% and blurred at first, then 75% and sharp, which the owner found "too
   transparent": "Bump opacity by 20%. Add slight blur."). Its words keep a thin halo of the
   page's colour. A browser without color-mix keeps it solid. */
.maplibregl-popup { --popup-bg: var(--surface); }
@supports (background: color-mix(in srgb, red 50%, transparent)) {
	.maplibregl-popup { --popup-bg: color-mix(in srgb, var(--surface) 45%, transparent); }
	.maplibregl-popup-content { text-shadow: 0 0 2px var(--surface), 0 0 2px var(--surface), 0 0 3px var(--surface); box-shadow: none; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
}
.maplibregl-popup-content { font: 13px/1.35 system-ui, sans-serif; color: var(--ink); background: var(--popup-bg); padding: 10px 12px; border-radius: 8px; }
.maplibregl-popup-anchor-top .maplibregl-popup-tip, .maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--popup-bg); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--popup-bg); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--popup-bg); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--popup-bg); }
.maplibregl-ctrl-group button.tilt { font: 700 12px/1 system-ui, sans-serif; color: var(--ink); }
.maplibregl-ctrl-group button.tilt[aria-pressed="true"] { color: var(--accent); }
.maplibregl-ctrl-group button.fit { display: grid; place-items: center; }
.maplibregl-ctrl-group button.fit svg { width: 15px; height: 15px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* The map's own buttons and scale bar, in the dark. */
:root[data-theme="dark"] .maplibregl-ctrl-group { background: var(--surface); }
:root[data-theme="dark"] .maplibregl-ctrl-group button + button { border-top-color: var(--rule); }
:root[data-theme="dark"] .maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: invert(1); }
:root[data-theme="dark"] .maplibregl-ctrl-scale { background: rgb(29 35 41 / 0.75); border-color: var(--ink-2); color: var(--ink-2); }
.maplibregl-popup-content b { display: block; }
/* The info window's × (OV-64): it closes the window and clears the route, as Escape does. */
.maplibregl-popup-close-button { top: 3px; right: 3px; width: 26px; height: 26px; padding: 0; border-radius: 6px; font: 18px/1 system-ui, sans-serif; color: var(--ink-2); }
.maplibregl-popup-close-button:hover { color: var(--ink); background-color: color-mix(in srgb, var(--ink) 10%, transparent); }
.maplibregl-popup-close-button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.maplibregl-popup-content > b:first-child { margin-right: 22px; }
.maplibregl-popup-content span { color: var(--ink-2); }
.maplibregl-popup-content .more { display: block; margin-top: 5px; }
.maplibregl-popup-content .more i { display: inline-block; width: 14px; height: 4px; margin-right: 5px; border-radius: 2px; vertical-align: middle; background: var(--m-trace); }
.noscript { position: fixed; inset: 40% 0 auto; text-align: center; }

/* Phones, upright or on their side (a short screen): the panel is a sheet that slides up
   from the bottom, over the year strip, and leaves the top of the map in view.
   Keep the condition in step with narrow() in viewer.js. */
@media (max-width: 700px), (max-height: 560px) {
	:root { --rail-zoom: 1; }
	#panelToggle { display: block; }
	.railHidden #panel { display: block; } /* a phone's sheet is put away its own way */
	#panel {
		top: auto; left: 0; right: 0; bottom: 0; width: auto; z-index: 4;
		max-height: min(72dvh, 100% - 70px); padding: 6px 16px calc(14px + env(safe-area-inset-bottom));
		border-radius: 16px 16px 0 0; border-bottom: 0; box-shadow: 0 -4px 20px var(--shadow);
		transform: translateY(105%); visibility: hidden; transition: transform 0.25s ease, visibility 0s 0.25s;
	}
	#panel.open { transform: none; visibility: visible; transition: transform 0.25s ease; }
	.panelTop { top: -6px; margin: -6px -16px 0; padding: 6px 16px 0; }
	.grip { display: block; width: 36px; height: 4px; margin: 2px auto 8px; border-radius: 2px; background: var(--rule); }
	#panelClose { display: grid; }
	h1 { font-size: 20px; }
	fieldset label { padding: 6px 0; }
	/* The year strip: play, pace, the year and the charts' button on one line, the slider under
	   them, then the four views. A chart's name, words and figure share one line over it. */
	#years { left: 8px; right: 8px; bottom: 44px; padding: 8px 10px 2px; --tail: 64px; --gutter: 8px; --pad: 4px; --plot-h: 30px; } /* room for a credit of three lines */
	.yearRow { flex-wrap: wrap; gap: 8px; }
	.divider { display: none; }
	#play { width: 32px; height: 32px; }
	#speed { height: 32px; padding: 0 26px 0 10px; font-size: 13px; }
	.speedBox::after { right: 10px; }
	#yearsToggle { margin-left: auto; height: 32px; padding: 0 11px; gap: 7px; font-size: 13px; }
	.yearSlide { order: 1; flex: 1 0 100%; }
	.res { order: 2; flex: 1 0 100%; }
	.res button { flex: 1; padding: 5px 4px; font-size: 13px; }
	.res .liveSeg { gap: 5px; }
	.res .sep { margin: 5px 1px; }
	.res .resYear { padding: 0 3px 0 6px; font-size: 11.5px; }
	#years.now .nowNote { order: 3; flex-basis: 100%; font-size: 12px; }
	.nowNote .wide { display: none; }
	.nowNote .narrow { display: inline; }
	.nowMsg { font-size: 12.5px; }
	.periodRow { grid-template-columns: minmax(0, 1fr); row-gap: 4px; margin-top: 8px; }
	.periodNav label { flex: 1; width: auto; font-size: 14px; }
	#charts { margin-top: 6px; }
	.chart, .chart[data-series="wells"], .chart[data-series="uses"] { --plot-h: 30px; grid-template-columns: minmax(0, 1fr) var(--tail); }
	.lead { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; padding-bottom: 0; }
	.chart .head { display: contents; }
	.chart .head b { flex: none; order: 1; font-size: 13px; }
	.chart .value { order: 2; flex: 1 1 0; min-width: 0; margin: 0; display: block; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
	.chart .head svg.dam { order: 3; }
	.chart .figure { order: 4; margin-left: auto; font-size: 14px; }
	.keys { order: 5; flex: 1 0 100%; margin-top: 0; gap: 0 10px; font-size: 11px; line-height: 15px; }
	.pill { padding: 0 4px; font-size: 9.5px; line-height: 13px; }
	.scale { font-size: 10px; }
	.axis { height: 20px; margin-left: 0; font-size: 10.5px; }
	.axis::before { left: 0; }
	.axis span { top: 4px; }
	.plot > .note { gap: 2px 10px; padding: 4px 8px; font-size: 12px; }
	.shares > span > span { padding: 0 6px; font-size: 11.5px; }
	#credit { left: 8px; right: 8px; bottom: 4px; font-size: 10px; line-height: 1.25; text-align: right; }
}
/* On a phone, and on a wide screen under 900 px where the slider has little room, there is none
   for "Water year" beside the number: the year stands over its months (OV-90) */
@media (max-width: 900px), (max-height: 560px) {
	label.yearLabel { flex-direction: column; align-items: flex-start; gap: 1px; }
	.yearWords { display: contents; }
	.yearWords > span { display: none; }
	.yearWords small { order: 1; font-size: 10.5px; }
	#yearOut { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	#panel, #panel.open { transition: none; }
}
