/* The site's design tokens. Tokens prefixed --map-, --ramp-, --c-, --city- and --fit- are read by map.js for the canvas
   and charts. Diverging ramps: two hues and a neutral midpoint that differs from the map background.
   (Chosen 2026-11-13 from the prototype's style tuner: Hanken Grotesk, slight corners, "mist" background.) */
@font-face {
  font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/hanken-grotesk-latin-wght-normal.woff2) format('woff2-variations'), url(fonts/hanken-grotesk-latin-wght-normal.woff2) format('woff2');
}
:root {
  --surface: #edf2f6; --panel: rgba(248,250,252,0.94); --ink: #0b0b0b; --ink-2: #52514e; --ink-3: #8a8984;
  --rule: #d1dae3; --rule-strong: 1px solid #d1dae3; --accent: #2a78d6; --hover: #e0e7ee;
  --chip-on-bg: #e7eefa; --chip-on-ink: #184f95; --chip-on-shadow: none;
  --radius: 0.25rem; --radius-sm: 0.1875rem; --chip-radius: 0.1875rem; --bar-radius: 1px; --play-radius: 0.375rem;
  --panel-border: 1px solid #d1dae3; --panel-shadow: none;
  --font: 'Hanken Grotesk', system-ui, sans-serif;
  --font-ui: var(--font); --font-display: var(--font); --font-sub: inherit; --sub-style: normal;
  --font-label: var(--font); --font-num: var(--font); --font-num-small: var(--font);
  --font-lead: inherit; --lead-size: 0.8125rem; --num-weight: 700; --title-size: 0.9375rem; --title-weight: 700; --title-track: -0.01em; --h2-size: 1.25rem;
  --play-bg: #0b0b0b; --play-ink: #fff; --slider: #0b0b0b;
  --side-w: 26rem; --side-bg: #f8fafc; --side-shadow: -0.375rem 0 1.5rem rgba(11,11,11,0.06);
  --tile-bg: #e1e8ef; --tile-rule: 0; --row-on: #e7eefa; --grid: #e0e7ee; --kb: #1c5cab; --kr: #b8282b;
  --tip-bg: #0b0b0b; --tip-ink: #fff; --fit-left-px: 16.75rem;

  --map-bg: #edf2f6; --map-bg-rgb: 237,242,246; --map-ink: #0b0b0b; --map-ink-rgb: 11,11,11; --map-missing: #c6d0da; --map-state-alpha: 0.62;
  --ramp-temp: #0d366b, #2a78d6, #86b6ef, #dbe2e9, #f2a28f, #e34948, #8e1b1f;
  --ramp-precip: #5c3a12, #b0752f, #e2c08f, #dbe2e9, #86b6ef, #2a78d6, #0d366b;
  --ramp-nice: #40004b, #9970ab, #c2a5cf, #dbe2e9, #a6dba0, #5aae61, #00441b;
  --c-cool: #2a78d6; --c-warm: #e34948; --c-cool-light: #86b6ef; --c-warm-light: #f2a28f; --c-axis: #b9b7b0; --c-spark: #a9a8a2; --c-mid: #c9c7c0;
  --city-font: var(--font); --city-case: none; --city-size: 12;
  --fit-left: 268; --fit-top: 16; --fit-bottom: 116; --fit-right: 12;
}

/* ---------- layout ---------- */
/* Base layout, written only against the design tokens above. */
* { box-sizing: border-box; }
/* Everything is sized in rem, so this one value scales the whole interface: the base 16px on phones and small
   windows, growing with the window to 1.5× (24px) on large monitors; the height term keeps short laptop screens from overflowing. */
html { font-size: clamp(16px, min(8px + 0.833vw, 2.4vh), 24px); }
@media (max-width: 720px) { html { font-size: 16px; } }
html, body { margin: 0; height: 100%; background: var(--surface); color: var(--ink);
  font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
body { font-size: 0.8125rem; }
#map { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#mapBase { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; transform-origin: 0 0; will-change: transform; }
#map:active { cursor: grabbing; }

.panel { position: fixed; background: var(--panel); backdrop-filter: blur(0.375rem);
  border: var(--panel-border); border-radius: var(--radius); box-shadow: var(--panel-shadow); }

#menu { top: 1rem; left: 1rem; padding: 0.875rem 1rem 0.75rem; width: 14.75rem; z-index: 3; }
#menu h1 { font-family: var(--font-display); font-size: var(--title-size); font-weight: var(--title-weight); margin: 0 0 2px; letter-spacing: var(--title-track); }
#menu .sub { color: var(--ink-2); margin: 0 0 0.75rem; line-height: 1.35; font-family: var(--font-sub); font-style: var(--sub-style); }
.group { margin: 0.625rem 0 0; }
.group-label { font-family: var(--font-label); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 0.25rem; }
.opts { display: flex; flex-direction: column; gap: 1px; }
.opts.row { flex-direction: row; gap: 0.25rem; flex-wrap: wrap; }
#side .msub { font-family: var(--font-label); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 0.625rem 0 2px; }
#side .mrows > .msub:first-child { margin-top: 0; }
#side .mrow.nodata { cursor: default; color: var(--ink-3); }
#side .mrow.nodata .mv { font-style: italic; }
.opts.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.1875rem; margin-bottom: 0.375rem; padding-bottom: 0.4375rem; border-bottom: 1px solid var(--rule); }
.opts.cats .opt { text-align: center; border: 1px solid var(--rule); padding: 0.25rem 0.25rem; font-size: 0.95em; }
.opts.cats .opt[aria-pressed="true"] { border-color: transparent; }
#menu { max-height: calc(100vh - 2rem); overflow-y: auto; box-sizing: border-box; scrollbar-width: thin; }
@media (max-height: 1000px) and (min-width: 901px) { #menu .sub { display: none; } #menu .group { margin-top: 0.5rem; } }
.opt { all: unset; cursor: pointer; padding: 0.25rem 0.5rem; border-radius: var(--chip-radius); color: var(--ink-2); line-height: 1.3; }
.opt:hover { background: var(--hover); color: var(--ink); }
.opt[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-ink); font-weight: 600; box-shadow: var(--chip-on-shadow); }
.opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* search (menu and sidebar) */
.search { position: relative; display: flex; gap: 0.25rem; margin: 0 0 0.25rem; }
.search[hidden] { display: none; }
.search input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--chip-radius); padding: 0.375rem 0.5rem; }
.search input::placeholder { color: var(--ink-3); }
.search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.locate { all: unset; cursor: pointer; width: 1.875rem; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--rule); border-radius: var(--chip-radius); }
.locate:hover { background: var(--hover); color: var(--ink); }
.locate:focus-visible { outline: 2px solid var(--accent); }
.locate svg { width: 0.9375rem; height: 0.9375rem; }
.results { position: absolute; top: calc(100% + 0.25rem); left: 0; right: 0; z-index: 10; margin: 0; padding: 0.25rem; list-style: none; background: var(--side-bg, var(--panel)); border: 1px solid var(--rule); border-radius: var(--radius-sm, 0.375rem); box-shadow: var(--panel-shadow); max-height: 20rem; overflow-y: auto; }
.results li { padding: 0.375rem 0.5rem; border-radius: var(--chip-radius); cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.results li span { color: var(--ink-2); font-size: 0.75rem; }
.results li[aria-selected="true"], .results li:hover { background: var(--hover); }
.results li.msg { color: var(--ink-2); cursor: default; background: none; }
.qmsg { color: var(--ink-2); font-size: 0.75rem; margin: 0.25rem 0 0; }
/* compare */
#side .cmp { display: flex; gap: 0.375rem; margin: 0.625rem 0 2px; }
#side .cmp .search { flex: 1; margin: 0; }
#side .btn.sm { padding: 0.3125rem 0.625rem; font-size: 0.75rem; }
#side .vs { color: var(--ink-3); font-weight: 400; }
#side .cchart { width: 100%; height: auto; display: block; }
#side .cchart text { font-size: 10px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
#side .keys { display: flex; gap: 0.875rem; flex-wrap: wrap; margin-bottom: 0; }
#side .key { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--ink); }
#side .key i { display: inline-block; width: 1.125rem; height: 0; border-top: 0.1563rem solid var(--map-ink); }
#side .key i.kb2 { border-top: 0.1563rem dashed var(--c-cool); }
#side .chead, #side .crow { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; align-items: start; }
#side .chead { font-size: 0.6875rem; font-weight: 600; color: var(--ink-3); padding: 0 0.5rem 0.25rem; }
#side .crow { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; padding: 0.4375rem 0.5rem; border-radius: var(--chip-radius); border-top: 1px solid var(--rule); }
#side .crow:hover { background: var(--hover); }
#side .crow.on { background: var(--row-on); }
#side .crow:focus-visible { outline: 2px solid var(--accent); }
#side .crow .ml, #side .crow .cv, #side .crow .mc, #side .crow .mv { grid-area: auto; text-align: left; white-space: normal; }
#side .crow .ml { font-weight: 500; }
#side .cv { display: flex; flex-direction: column; gap: 2px; }
#side .cv .mc { display: flex; align-items: center; gap: 0.375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
#side .cv .mc i { width: 0.5625rem; height: 0.5625rem; border-radius: 2px; display: inline-block; flex: none; }
#side .cv .mv { color: var(--ink-2); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.seo { max-width: 42.5rem; margin: 2.5rem auto; padding: 0 1rem; }

#hero { display: none; }

#timebar { left: 50%; transform: translateX(-50%); bottom: 1rem; width: min(40rem, calc(100% - 2rem)); z-index: 3;
  padding: 0.625rem 1rem 0.5rem; display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.875rem; align-items: center; }
#play { all: unset; cursor: pointer; width: 2.125rem; height: 2.125rem; border-radius: var(--play-radius); background: var(--play-bg);
  color: var(--play-ink); display: grid; place-items: center; grid-row: span 2; }
#play:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#play svg { width: 0.875rem; height: 0.875rem; }
#yearline { display: flex; align-items: baseline; gap: 0.625rem; }
#year { white-space: nowrap; }
#year { font-family: var(--font-num); font-size: 1.75rem; font-weight: var(--num-weight); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
#yearnote { color: var(--ink-2); }
#natchart { width: 100%; height: 3.375rem; display: block; }
#slider { width: 100%; margin: 0; accent-color: var(--slider); }
.slider-wrap { grid-column: 2; }

#legend { left: 1rem; bottom: 1rem; padding: 0.625rem 0.75rem; width: 14.75rem; z-index: 3; }
#legend .t { font-weight: 600; margin-bottom: 0.375rem; }
#legend canvas { width: 100%; height: 0.625rem; display: block; border-radius: var(--bar-radius); }
#legend .ticks { display: flex; justify-content: space-between; color: var(--ink-2); margin-top: 0.25rem; font-variant-numeric: tabular-nums; font-family: var(--font-num-small); }
#legend .ends { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 0.6875rem; margin-top: 2px; }
.hatchkey { display: flex; align-items: flex-start; gap: 0.4375rem; width: 100%; margin-top: 0.4375rem; padding: 0; border: 0; background: none;
  color: var(--ink-2); font: inherit; font-size: 0.6875rem; line-height: 1.35; text-align: left; cursor: pointer; }
.nsm { color: var(--ink-3); font-weight: 600; margin-left: 1px; }
.hatchkey[hidden] { display: none; }
.hatchkey i, #side .mc i.ns { background-image: repeating-linear-gradient(-45deg, rgba(var(--map-ink-rgb),0.55) 0 1px, transparent 1px 0.25rem); }
.hatchkey i { flex: none; width: 1rem; height: 0.75rem; border-radius: 2px; margin-top: 1px; border: 1px solid rgba(var(--map-ink-rgb),0.25); }
.hatchkey[aria-pressed="false"] i { background-image: none; }
.hatchkey[aria-pressed="false"] span { text-decoration: line-through; color: var(--ink-3); }
.hatchkey:hover span { color: var(--ink); }
#legend .note { color: var(--ink-2); font-size: 0.6875rem; line-height: 1.35; margin-top: 0.375rem; }

#side { top: 0; right: 0; bottom: 0; width: var(--side-w); border-radius: 0; border: 0; border-left: var(--panel-border); background: var(--side-bg);
  box-shadow: var(--side-shadow); overflow-y: auto; display: none; z-index: 6; overscroll-behavior: contain; backdrop-filter: none; }
#side.show { display: block; }
#sideBody { padding: 1.125rem 1.5rem 1.75rem; }
#side .sh { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; position: sticky; top: -1.125rem;
  background: var(--side-bg); padding: 1.125rem 0 0.625rem; margin-top: -1.125rem; z-index: 1; border-bottom: var(--rule-strong); }
#side h2 { font-family: var(--font-display); font-size: var(--h2-size); margin: 0; font-weight: var(--title-weight); letter-spacing: var(--title-track); line-height: 1.1; }
#side .st { color: var(--ink-2); margin-top: 0.1875rem; line-height: 1.35; }
#side .close { all: unset; cursor: pointer; color: var(--ink-2); font-size: 1.375rem; line-height: 1; padding: 2px 0.375rem; border-radius: var(--chip-radius); }
#side .close:hover { background: var(--hover); }
#side section { padding: 1rem 0 0.25rem; border-bottom: 1px solid var(--rule); }
#side section.foot { border-bottom: 0; }
#side h3 { font-family: var(--font-label); font-size: 0.7188rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 0 0 0.5rem; }
#side .h3s { text-transform: none; letter-spacing: 0; font-weight: 500; float: right; }
#side .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
#side .tile { background: var(--tile-bg); border-radius: var(--radius-sm); padding: 0.625rem; border-top: var(--tile-rule); }
#side .tv { font-family: var(--font-num); font-size: 1.3125rem; font-weight: var(--num-weight); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#side .tl { color: var(--ink-2); font-size: 0.75rem; line-height: 1.3; margin-top: 2px; }
#side .mrows { display: flex; flex-direction: column; }
#side .mrow { all: unset; cursor: pointer; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l c" "v s";
  gap: 1px 0.625rem; padding: 0.4375rem 0.5rem; border-radius: var(--chip-radius); align-items: center; }
#side .mrow:hover { background: var(--hover); }
#side .mrow.on { background: var(--row-on); }
#side .mrow:focus-visible { outline: 2px solid var(--accent); }
#side .ml { grid-area: l; font-weight: 500; }
#side .mv { grid-area: v; color: var(--ink-2); font-size: 0.75rem; font-variant-numeric: tabular-nums; font-family: var(--font-num-small); }
#side .mv .per { color: var(--ink-3); }
#side .mc { grid-area: c; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; font-family: var(--font-num-small); }
#side .mc i { display: inline-block; width: 0.5625rem; height: 0.5625rem; border-radius: var(--bar-radius); margin-right: 0.375rem; vertical-align: 0; }
#side .ms { grid-area: s; justify-self: end; }
#side .lead { margin: 0 0 0.5rem; line-height: 1.45; font-family: var(--font-lead); font-size: var(--lead-size); }
#side .twin { margin: 0.5rem 0 0.25rem; line-height: 1.5; }
#side .lnk { all: unset; cursor: pointer; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
#side .lnk:hover { text-decoration-thickness: 2px; }
#side .lnk:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#side .cap { color: var(--ink-2); font-size: 0.75rem; line-height: 1.45; margin: 0.375rem 0 0.625rem; }
#side .muted, #side .loading { color: var(--ink-3); }
#side svg { display: block; width: 100%; height: auto; }
#side svg .ax { font-size: 10px; fill: var(--ink-3); font-family: var(--font-num-small); }
#side svg .grid { stroke: var(--grid); }
#side .kb, #side .kr { font-weight: 600; }
#side .kb { color: var(--kb); } #side .kr { color: var(--kr); }
#side .seg, .pctl .seg { display: inline-flex; background: var(--hover); border-radius: var(--chip-radius); padding: 2px; margin-bottom: 0.5rem; }
#side .seg button, .pctl .seg button { all: unset; cursor: pointer; padding: 0.1875rem 0.625rem; border-radius: var(--chip-radius); font-size: 0.75rem; color: var(--ink-2); }
#side .seg button[aria-pressed="true"], .pctl .seg button[aria-pressed="true"] { background: var(--side-bg); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
#side .rec { display: grid; grid-template-columns: auto 1fr; gap: 0.375rem 0.875rem; margin: 0 0 0.625rem; }
#side .rec dt { color: var(--ink-2); } #side .rec dd { margin: 0; font-variant-numeric: tabular-nums; }
#side .btn { all: unset; cursor: pointer; border: 1px solid var(--rule); border-radius: var(--chip-radius); padding: 0.4375rem 0.75rem; font-weight: 500; }
#side .btn:hover { background: var(--hover); }
body.side-open #zoomctl { right: calc(var(--side-w) + 1rem); top: 1rem; bottom: auto; }
@media (min-width: 901px) { body.side-open #timebar { left: var(--fit-left-px); right: calc(var(--side-w) + 1rem); width: min(40rem, calc(100% - var(--fit-left-px) - var(--side-w) - 1rem)); margin: 0 auto; transform: none; } }

#tip { position: fixed; pointer-events: none; background: var(--tip-bg); color: var(--tip-ink); padding: 0.3125rem 0.5rem;
  border-radius: var(--chip-radius); font-size: 0.75rem; white-space: nowrap; display: none; z-index: 7; }
#tip b { font-weight: 600; }
#zoomctl { right: 1rem; bottom: 1rem; display: flex; flex-direction: column; overflow: hidden; z-index: 3; }
#zoomctl button { all: unset; cursor: pointer; width: 2.125rem; height: 2rem; display: grid; place-items: center;
  font-size: 1.125rem; color: var(--ink); border-bottom: 1px solid var(--rule); }
#zoomctl button:last-child { border-bottom: 0; }
#zoomctl button:hover { background: var(--hover); }
#zoomctl button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#loading { position: fixed; inset: 0; display: grid; place-items: center; color: var(--ink-2); }


/* phones: the measure button replaces the open menu (map.js setMenu) */
.mtoggle { display: none; }
@media (max-width: 720px) {
  .mtoggle { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%;
    cursor: pointer; margin: 0.25rem 0 0.25rem; padding: 0.4375rem 0.625rem; border-radius: var(--chip-radius);
    background: var(--chip-on-bg); color: var(--chip-on-ink); font-weight: 600; }
  .mtoggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mtoggle svg { width: 0.75rem; height: 0.75rem; flex: none; transition: transform 0.15s; }
  .mtoggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  body.menu-open .mtoggle svg { transform: rotate(180deg); }
  #controls { display: none; }
  body.menu-open #controls { display: block; }
  body.menu-open #menu { z-index: 8; max-height: calc(100vh - 1rem); max-height: calc(100dvh - 1rem); box-shadow: 0 0.5rem 1.5rem rgba(11,11,11,0.12); }
  #menu .sub { display: none; }
  #legend .ends { display: none; }
  body.side-open #legend, body.side-open #timebar { display: none; }
  #menu { width: auto; top: 0.5rem; left: 0.5rem; right: 0.5rem; padding: 0.5rem 0.625rem 0.375rem; }
  #menu h1 { font-size: 0.9375rem; }
  #menu .sub, .group-label, #unitGroup { display: none; }
  .group { margin-top: 0.25rem; }
  .opts, .opts.row { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .opts.cats { display: flex; margin-bottom: 0.1875rem; padding-bottom: 0.25rem; }
  .opts.cats .opt { flex: none; }
  .opt { white-space: nowrap; padding: 0.25rem 0.5rem; }
  #legend { display: block; left: 0.5rem; right: 0.5rem; width: auto; top: 6.375rem; bottom: auto; padding: 0.375rem 0.625rem; }
  #year { white-space: nowrap; font-size: 1.25rem; }
  #yearline { flex-wrap: wrap; gap: 0 0.5rem; }
  #legend .t { font-size: 0.75rem; margin-bottom: 0.25rem; }
  #timebar { bottom: 0.5rem; width: calc(100% - 1rem); padding: 0.5rem 0.75rem 0.375rem; gap: 2px 0.625rem; }
  #yearnote { font-size: 0.75rem; }
  #natchart { height: 2.5rem; }
  #side { top: auto; left: 0; width: auto; height: 58vh; border-left: 0; border-top: var(--panel-border); border-radius: 0.875rem 0.875rem 0 0; box-shadow: 0 -0.375rem 1.5rem rgba(11,11,11,0.1); }
  #sideBody { padding: 0.875rem 1rem 1.5rem; }
  #side .sh { top: -0.875rem; margin-top: -0.875rem; padding-top: 0.875rem; }
  #zoomctl { display: none; }
}

/* ---------- text pages (about, 404) ---------- */
body.page { height: auto; min-height: 100%; font-size: 0.9375rem; line-height: 1.6; }
.doc { max-width: 42.5rem; margin: 0 auto; padding: 2rem 1rem 4rem; }
.doc .crumb { font-weight: 600; margin: 0 0 1.75rem; }
.doc a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 2px; }
.doc a:hover { text-decoration-thickness: 2px; }
.doc h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.375rem; }
.doc .lede { color: var(--ink-2); margin: 0 0 1.75rem; }
.doc h2 { font-size: 1.125rem; margin: 2rem 0 0.375rem; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin: 0.25rem 0; }
.doc .small { color: var(--ink-2); font-size: 0.8125rem; }
.brand { position: relative; }
#menu .about { position: absolute; top: 1px; right: 0; font-size: 0.75rem; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 2px; }
#menu .about:hover { color: var(--ink); text-decoration-color: var(--accent); }
#menu .about:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- projections ---------- */
body.future #slider { display: none; }
#side .pkey { display: flex; flex-wrap: wrap; gap: 0.25rem 0.875rem; color: var(--ink-2); font-size: 0.75rem; margin: 0.25rem 0 0.375rem; }
#side .pkey i { display: inline-block; width: 0.75rem; height: 0.375rem; border-radius: 1px; margin-right: 0.3125rem; vertical-align: 0.1rem; }

/* ---------- phones: compact header, legend and time bar; county details in a half-height sheet ---------- */
.qbtn, .grab, .hshort { display: none; }
@media (max-width: 720px) {
  /* title row, then [measure button][search][locate]; tapping search opens the box over that row (map.js) */
  #menu { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.25rem; padding: 0.375rem 0.5rem; }
  #menu .brand, #qmsg, #controls { grid-column: 1 / -1; }
  #menu h1 { margin-bottom: 0.25rem; }
  .mtoggle { grid-column: 1; grid-row: 2; margin: 0; }
  .search { grid-column: 2; grid-row: 2; margin: 0; }
  .search .qbtn { display: grid; }
  .search input { display: none; }
  .search.open { grid-column: 1 / -1; }
  .search.open input { display: block; }
  .search.open .qbtn, body.q-open .mtoggle { display: none; }
  body.menu-open #controls { margin-top: 0.25rem; }
  /* legend: the hatching note shortened to a few words */
  #legendHatchTxt { display: none; }
  .hshort { display: inline; }
  .hatchkey { margin-top: 0.3125rem; align-items: center; }
  /* time bar: play, year and slider in one row */
  #timebar { grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 0 0.625rem; padding: 0.375rem 0.625rem; }
  #play { grid-row: auto; width: 2rem; height: 2rem; }
  #yearnote, #natchart { display: none; }
  .slider-wrap { grid-column: 3; }
  /* county sheet: half the screen with the map above it; scrolling it (or the handle) opens it to nearly full height */
  body.side-open #menu { display: none; }
  #side { height: 45vh; transition: height 0.2s ease; }
  body.sheet-full #side { height: 88vh; }
  .grab { all: unset; display: block; position: sticky; top: 0; z-index: 3; width: 100%; height: 1.375rem; cursor: pointer; background: var(--side-bg); }
  .grab span { display: block; width: 2.5rem; height: 0.25rem; border-radius: 2px; background: var(--rule); margin: 0.5rem auto 0; }
  .grab:focus-visible span { background: var(--accent); }
  #sideBody { padding-top: 0; }
  #side .sh { top: 1.375rem; margin-top: 0; padding-top: 0.25rem; }
}

/* projections view: scenario and period switches replace the play button and slider */
.pctl { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin-top: 0.25rem; }
.pctl[hidden] { display: none; }
.pctl .seg { margin-bottom: 0; }
#yearline { grid-column: 2; }
body.future #play { display: none; }
body.future #timebar { grid-template-columns: 0 1fr; column-gap: 0; }
#legend .lsub { color: var(--ink-2); font-size: 0.75rem; line-height: 1.35; margin: -0.25rem 0 0.375rem; }
#legend .lsub[hidden] { display: none; }
#side .ms .rng { color: var(--ink-3); font-size: 0.6875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  body.future #yearline { display: none; }
  body.future .slider-wrap { grid-column: 1 / -1; }
  .pctl { margin-top: 0; justify-content: space-between; }
}
