/* Nourish — shared theme tokens, fonts, and reusable components.
   Re-skinned 3 Sep 2026 from Felix's navy to the Nourish Soil surface. Every
   value below is contrast-checked against Soil #3D3D35: Cream body 9.6:1,
   dim 6.0:1, faint 3.6:1, Honey accent 6.5:1.
   Loaded by every exhibit and the menu page so global tweaks (font, colors,
   sources modal styling) live in one place. */

@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3-VariableFont_wght.ttf') format('truetype-variations'),
       url('fonts/SourceSans3-VariableFont_wght.ttf') format('truetype');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3-Italic-VariableFont_wght.ttf') format('truetype-variations'),
       url('fonts/SourceSans3-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --nrsh-bg: #3D3D35;
  --nrsh-bg-elev: #47473E;
  --nrsh-bg-card: #45453C;
  --nrsh-bg-card-hover: #525247;
  --nrsh-text: #F5F0E3;
  --nrsh-text-dim: #C4BFB0;
  --nrsh-text-faint: #9A9488;
  --nrsh-rule: rgba(245,240,227,0.10);
  --nrsh-rule-strong: rgba(245,240,227,0.22);
  --nrsh-accent: #F2C06A;       /* primary accent  */
  --nrsh-accent-2: #F2C06A;     /* lighter blue  — used for "Chapters" labels etc. */
  --nrsh-accent-warm: #F2C06A;
  --nrsh-font: 'Source Sans 3', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Sources modal — shared component used by every exhibit footer button.
   Markup contract:
     <button class="nrsh-sources-btn" data-sources-trigger>Sources & Data</button>
     <div class="nrsh-sources-overlay" data-sources-panel role="dialog" aria-hidden="true" aria-label="Sources">
       <div class="nrsh-sources-content">
         <button class="nrsh-sources-close" data-sources-close aria-label="Close">&times;</button>
         <h2>Sources & Data</h2>
         ... reference content ...
       </div>
     </div>
   nrsh-sources.js wires the open/close behavior. */
.nrsh-sources-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--nrsh-rule);
  color: var(--nrsh-text-dim);
  font-family: var(--nrsh-font);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.nrsh-sources-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--nrsh-text);
  border-color: var(--nrsh-rule-strong);
}
.nrsh-sources-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3,8,18,0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.nrsh-sources-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.nrsh-sources-content {
  background: var(--nrsh-bg-elev);
  border: 1px solid var(--nrsh-rule-strong);
  border-radius: 14px;
  padding: 32px 36px;
  max-width: 720px;
  width: min(92vw, 720px);
  max-height: 84vh;
  overflow-y: auto;
  position: relative;
  font-family: var(--nrsh-font);
  color: var(--nrsh-text-dim);
  line-height: 1.65;
  font-size: 0.88rem;
}
.nrsh-sources-content h2 {
  font-family: var(--nrsh-font);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--nrsh-text);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.nrsh-sources-content h3 {
  font-family: var(--nrsh-font);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--nrsh-text);
  margin: 18px 0 6px;
}
.nrsh-sources-content p { margin: 0 0 10px; }
.nrsh-sources-content a { color: var(--nrsh-accent); text-decoration: none; }
.nrsh-sources-content a:hover { text-decoration: underline; }
.nrsh-sources-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--nrsh-text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.nrsh-sources-close:hover { color: var(--nrsh-text); }



/* Some people ask their operating system for less movement — usually because
   motion on screen makes them dizzy or sick. Honour it: the content arrives
   exactly the same, it just stops travelling to get there. Never disable the
   scripts that add visibility classes, only the transitions. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* =====================================================================
   4 Sep 2026 — the story column, the tour, and the pieces that replaced
   Felix's top bar. Shared by all eight exhibits. Every colour below is
   the same contrast-checked set as above; nothing new was introduced.
   ===================================================================== */

@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype-variations'),
       url('fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --nrsh-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  /* The four exhibit types keep their brand hue as identity, but on Soil the
     brand values fail contrast, so each type maps to the lightened relative
     that passes: Sea Glass 4.92:1, Harvest 3.60:1 (marks and large text only),
     Honey 6.53:1, Meadow 4.39:1. Set by [data-exhibit-type] on <html>. */
  --nrsh-type: #F2C06A;
}
html[data-exhibit-type="map"]      { --nrsh-type: #72BAB8; }
html[data-exhibit-type="chart"]    { --nrsh-type: #E07830; }
html[data-exhibit-type="timeline"] { --nrsh-type: #F2C06A; }
html[data-exhibit-type="model"]    { --nrsh-type: #6AB47A; }

/* Focus is always visible: Honey ring, offset so it never hides the edge. */
.nrsh-focusable:focus-visible,
.story-panel .beat:focus-visible,
.nrsh-tour button:focus-visible,
.nrsh-sources summary:focus-visible,
.nrsh-pin:focus-visible {
  outline: 2px solid #F2C06A;
  outline-offset: 3px;
}

/* The interactive parts of the drawings had none of this. A keyboard probe on 2026-09-09 found
   thirty elements that take focus and show nothing for it: the 21 timeline moments and the 9 farm
   zones, both `tabindex="0" role="button"` on an SVG <g>, plus the obesity year slider and the
   farm's system-rollover trigger. They were operable by keyboard and invisible while you did it,
   which is the worst of the three possible states — worse than not being focusable at all, because
   the reader cannot tell where they are.

   `outline` on an SVG <g> is honoured by current Chromium, Firefox and Safari, but it hugs the
   group's bounding box, which on the farm is a whole irregular field. The drop-shadow reads better
   there and degrades to nothing rather than to something wrong, so both are set. */
.moment:focus-visible,
.farm-zone:focus-visible,
.country:focus-visible,
[role="button"]:focus-visible,
.system-rollover-trigger:focus-visible {
  outline: 2px solid #F2C06A;
  outline-offset: 3px;
  filter: drop-shadow(0 0 3px #F2C06A) drop-shadow(0 0 1px #F2C06A);
}

/* Undernourishment's two view toggles carry their own correct-looking rule —
   `.view-btn:focus-visible { outline: 2px solid var(--nrsh-accent) }` — and the token resolves to
   #F2C06A on that element, yet the ring measures 1px in a dark olive under a real Tab press and
   0px under a scripted focus. Two measurements, neither matching the declaration, and I could not
   find what overrides it. A box-shadow ring is not subject to whatever that is, so the control is
   unmistakably focused either way. Worth someone's ten minutes later; not worth blocking on. */
.view-btn:focus-visible {
  box-shadow: 0 0 0 2px #F2C06A;
}

/* Range inputs take focus but the browser's own ring is suppressed by the custom track styling. */
input[type="range"]:focus-visible,
.time-slider:focus-visible {
  outline: 2px solid #F2C06A;
  outline-offset: 4px;
}

/* ---- Story column -------------------------------------------------- */
.story-panel {
  font-family: var(--nrsh-font);
  color: var(--nrsh-text);
  overflow-y: auto;
  scroll-behavior: smooth;
}
.story-header-photo {
  margin: 0 0 22px;
  background: transparent;
}
.story-header-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-header h2 {
  font-family: var(--nrsh-font);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--nrsh-text);
  margin: 0 0 6px;
}
.story-header .story-intro {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--nrsh-text-dim);
  margin: 0 0 22px;
}

.beats { display: flex; flex-direction: column; gap: 0; }
.beat {
  position: relative;
  padding: 26px 18px 30px;
  margin: 0 -18px;
  border-top: 1px solid var(--nrsh-rule);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  scroll-margin-top: 24px;
}
.beat:first-child { border-top: none; }
.beat:hover { background: rgba(245,240,227,0.03); }
.beat.active {
  background: var(--nrsh-bg-card);
  box-shadow: inset 3px 0 0 var(--nrsh-type);
}
.beat.active + .beat { border-top-color: transparent; }

.beat-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  margin: 0 0 16px;
  background: var(--nrsh-bg-elev);
}
.beat-label {
  font-size: 14px;                    /* site convention is 13px on Paper (Act, Nourish in Action); one step up on Soil — Kirk, 5 Sep */
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #F2C06A;                     /* Honey — the eyebrow colour inside Soil, 6.5:1 */
  margin: 0 0 10px;
}
.beat-title {
  /* Upright sans. The italics guideline allows one italic moment per band; a column
     of five to twenty-one italic titles is not that, and Kirk asked for the serif
     to leave the story column altogether (4 Sep). Playfair stays on the wrapper's
     hero and closing headline. */
  font-family: var(--nrsh-font);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--nrsh-text);
  margin: 0 0 12px;
}
.beat-label .nc { text-transform: none; }
.beat-text {
  /* 15px on a 1.7 line, Cream rather than the dimmed tone, and a measure
     capped near 70 characters — the reading-comfort case for light-on-dark
     prose at paragraph length. */
  font-size: 15px;
  line-height: 1.7;
  color: var(--nrsh-text);
  max-width: 70ch;
}
.beat-text p { margin: 0; }
.beat-text p + p { margin-top: 0.85em; }

.editorial-note {
  margin: 30px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--nrsh-rule);
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--nrsh-text-faint);
  max-width: 70ch;
}

/* ---- Sources & data, as a footer <details> in the story column -------- */
.nrsh-sources {
  margin: 14px 0 40px;
  border-top: 1px solid var(--nrsh-rule);
  font-family: var(--nrsh-font);
}
.nrsh-sources summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nrsh-text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nrsh-sources summary::-webkit-details-marker { display: none; }
.nrsh-sources summary::before {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s;
  margin-left: 2px;
}
.nrsh-sources[open] summary::before { transform: rotate(45deg); }
.nrsh-sources summary:hover { color: var(--nrsh-text); }
.nrsh-sources .nrsh-sources-content {
  /* reuse the modal's type rules without its box */
  background: none; border: none; border-radius: 0; padding: 0 0 8px;
  max-width: none; width: auto; max-height: none;
  font-size: 0.84rem;
}
.nrsh-sources .nrsh-sources-content h2 { display: none; }
.nrsh-sources .nrsh-sources-content h3 { margin: 14px 0 4px; font-size: 0.86rem; }
.nrsh-sources .nrsh-sources-content ul { padding-left: 18px; margin: 4px 0 8px; }
.nrsh-sources .nrsh-sources-content li { margin-bottom: 3px; }

/* ---- Year badge — replaces the top-bar readout, lives in the visual ---- */
.nrsh-year {
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--nrsh-font);
  font-weight: 200;                   /* numerics set extra-light at display size */
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #F2C06A;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 5;
}
.nrsh-year small {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nrsh-text-dim);
  margin-bottom: 6px;
}

/* ---- The tour --------------------------------------------------------- */
.nrsh-tour {
  /* standardised bottom-right, beside the story column (Kirk, 4 Sep) */
  position: absolute;
  right: 22px; bottom: 18px;
  z-index: 6;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--nrsh-font);
}
.nrsh-tour button {
  background: rgba(245,240,227,0.06);
  border: 1px solid var(--nrsh-rule-strong);
  color: var(--nrsh-text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.nrsh-tour button:hover { background: rgba(245,240,227,0.12); }
.nrsh-tour button[disabled] { opacity: 0.35; cursor: default; }
.nrsh-tour .nrsh-tour-start { padding-left: 12px; }
.nrsh-tour .nrsh-tour-start::before { content: "▸ "; color: var(--nrsh-type); }
.nrsh-tour .nrsh-tour-step {
  font-size: 0.78rem; color: var(--nrsh-text-dim); min-width: 4.5ch; text-align: center;
  font-variant-numeric: tabular-nums;
}
.nrsh-tour[data-state="idle"] .nrsh-tour-live { display: none; }
.nrsh-tour[data-state="on"] .nrsh-tour-start { display: none; }
.nrsh-tour-live { display: flex; align-items: center; gap: 8px; }

/* ---- Pinned countries (maps) ------------------------------------------ */
.nrsh-pins {
  position: absolute;
  top: 18px; left: 22px;
  z-index: 6;
  display: flex; flex-wrap: wrap; gap: 6px;
  max-width: 46%;
  font-family: var(--nrsh-font);
}
.nrsh-pin {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(61,61,53,0.88);
  border: 1px solid var(--nrsh-rule-strong);
  border-radius: 999px;
  padding: 5px 8px 5px 12px;
  font-size: 0.8rem;
  color: var(--nrsh-text);
  cursor: pointer;
}
.nrsh-pin b { font-weight: 600; color: #F2C06A; font-variant-numeric: tabular-nums; }
.nrsh-pin .x { color: var(--nrsh-text-faint); font-size: 0.9rem; line-height: 1; padding: 0 3px; }
.nrsh-pin:hover .x { color: var(--nrsh-text); }
.nrsh-pins-hint {
  font-size: 0.72rem; color: var(--nrsh-text-faint); align-self: center;
}

/* ---- Screen-reader-only live region ----------------------------------- */
.nrsh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 900px) {
  .nrsh-year { font-size: 30px; top: 12px; right: 14px; }
  .nrsh-tour { right: 12px; bottom: 12px; }
  .nrsh-pins { max-width: 60%; left: 12px; top: 12px; }
  .beat-title { font-size: 26px; }
}

/* A footer row under a chart: caption on the left, the tour on the right.
   Exhibits whose visual has a free bottom edge use this instead of the
   absolute default. */
.chart-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex: 0 0 auto; margin-top: 12px; }
.story-header-photo { overflow: visible; }
.story-header-photo picture { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; }
.story-header-photo .photo-credit, .beat .photo-credit { font-size: 10px; font-weight: 500; letter-spacing: 0.04em; color: var(--nrsh-text-dim); margin-top: 6px; }
.beat .photo-credit { margin: -8px 0 14px; line-height: 1.4; }
.chart-foot .chart-caption { margin: 0; }
.chart-foot .nrsh-tour { position: static; }

/* Every stroke on a choropleth holds its width through the chapter framing.
   The zoom is a transform on the whole map group, so it multiplies stroke widths along with
   everything else: at 4.5× the 1px hover outline renders at four and a half, the borders at one,
   the graticule at two. Kirk, 8 September: "when we're zoomed in to other maps, and the user
   rolls over a country, we're still seeing a clunky, too thick line."

   `vector-effect` is a different property from `stroke-width`, so each exhibit's own rules keep
   deciding how thick its strokes are — this only stops the frame from scaling them. One rule,
   three exhibits, nothing to remember per page. */
#mapContainer .country,
#mapContainer .coastline,
#mapContainer svg > g > path { vector-effect: non-scaling-stroke; }

/* Map states set by nourish-map.js
   `vector-effect: non-scaling-stroke` is the important word here. The chapter framing applies a
   zoom transform to the whole map group, which multiplies stroke widths with everything else —
   at 4.5× a 1.6px outline renders at seven pixels and the highlight reads as a marker pen. The
   stroke now holds its width whatever the frame is doing, so it can also be finer.

   Two layers make the edge alive without making it busy: a steady thin outline underneath, and
   a long dash travelling slowly around the border on top. The dash is a highlight, not a chase —
   twelve seconds for a lap, and it stops entirely for prefers-reduced-motion. */
.country.pinned { stroke: #F5F0E3 !important; stroke-width: 1.4px !important;
                  vector-effect: non-scaling-stroke; }
.country.hl     { stroke: #F2C06A !important; stroke-width: 1.4px !important;
                  vector-effect: non-scaling-stroke;
                  stroke-opacity: .8 !important; stroke-linejoin: round; }
.hl-edge { fill: none !important; pointer-events: none;
           stroke: #FFE0A0 !important; stroke-width: 2.2px !important;
           vector-effect: non-scaling-stroke; stroke-linecap: round;
           stroke-dasharray: 34 210; animation: nrsh-edge 9s linear infinite; }
@keyframes nrsh-edge { to { stroke-dashoffset: -244; } }
@media (prefers-reduced-motion: reduce) {
  .hl-edge { animation: none; stroke-dasharray: none; stroke-opacity: .9 !important; }
}
.nrsh-ratio { cursor: default; background: rgba(242,192,106,0.12); border-color: rgba(242,192,106,0.45); }


/* ---- 4 Sep review: hovers a step larger everywhere ---------------------- */
.tooltip, .tip, .mtip { font-size: 14.5px !important; line-height: 1.55 !important; }
.tooltip .tt-hover, .tooltip .tooltip-desc, .tooltip-desc, .tt-hover { font-size: 13.5px !important; line-height: 1.55 !important; }
.tooltip .tt-name, .tooltip-title { font-size: 15.5px !important; }

/* ---- the visual names itself ------------------------------------------- */
.viz-title { position: absolute; top: 18px; left: 22px; z-index: 5; pointer-events: none; font-family: var(--nrsh-font); }
.viz-title .viz-name { display: block; font-size: 17px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #F2C06A; }
.viz-title .viz-sub { display: block; font-size: 0.82rem; color: var(--nrsh-text-dim); margin-top: 4px; max-width: 46ch; }
.viz-title.static { position: static; margin: 0 0 14px; }
/* the pins sit under the title on the maps */
.nrsh-pins { top: 62px; }

/* ---- narration toggle in the tour ------------------------------------- */
.nrsh-tour .nrsh-tour-voice[aria-pressed="true"] { background: rgba(242,192,106,0.18); border-color: #F2C06A; color: #F2C06A; }

/* ---- phones: the visual stacks above the story column ----------------------
   Structure holds at 390px (no horizontal overflow), so this pass is about room:
   a taller visual, a compact tour, legends that stop covering the map. */
@media (max-width: 900px) {
  .nrsh-tour { gap: 6px; }
  .nrsh-tour button { padding: 6px 10px; font-size: 12px; letter-spacing: 0.03em; }
  .nrsh-tour .nrsh-tour-start { white-space: nowrap; }
  .chart-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .chart-foot .nrsh-tour { justify-content: flex-end; }
  .chart-caption { font-size: 12.5px !important; line-height: 1.45 !important; }
  .viz-title .viz-name { font-size: 14px; }
  .nrsh-year { font-size: 26px; top: 10px; right: 12px; }
  .nrsh-year small { font-size: 0.6rem; margin-bottom: 3px; }
  .beat { padding: 20px 14px 22px; margin: 0 -14px; }
  .beat-title { font-size: 17px; }
  .beat-text { font-size: 15px; }
}

/* On phones the page itself scrolls: visual first, then the story, one flow.
   A story column that scrolls inside a 45vh box inside a scrolling page is the
   kind of nested scrolling that makes small screens feel broken.

   8 Sep — and the visual is pinned to the top of that flow. Testing the staging on an iPhone for
   the first time showed the whole thing was invisible on a phone: the moment the tour started and
   scrolled the active chapter into view, the map or chart left the screen. It sat between 463 and
   3,193 pixels above the viewport across the eight exhibits. The tour ran, the narration played,
   the chart drew, and the reader saw nothing but text.

   `overflow: auto` on body was the reason `position: sticky` could not work: it makes body the
   sticky element's nearest scrolling ancestor, and body's scroll box is exactly as tall as its
   content, so it never scrolls and there is nothing to stick against. `visible` hands scrolling
   back to the viewport and serves the same one-flow intent. This cost an hour of staring at a
   sticky rule that was correctly applied and doing nothing.

   The cap matters as much as the pin: unpinned these visuals run 365–638px against a 664px
   viewport, and one that fills the screen leaves nowhere for the story to arrive.

   Food Environment's .viz-area is excluded — its "visual" is six stacked waffle cards nearly
   3,000px tall, which is not a thing you pin. It gets its own treatment in that page. */
@media (max-width: 900px) {
  html, body { overflow: visible !important; height: auto !important; }
  .main, .main-layout { display: block !important; height: auto !important; overflow: visible !important; }
  .story-panel { width: 100% !important; min-width: 0 !important; height: auto !important; overflow: visible !important; }
  .chart-area { height: auto !important; overflow: visible !important; }

  /* Food Environment: six waffle cards nearly 3,000px tall are not a thing you pin whole, so the
     pinned element is a window onto them. The page scrolls the active chapter's card into that
     window as the tour moves, which is the same promise as the other seven — the chapter's
     subject is on screen while the voice describes it — reached a different way. */
  .viz-area {
    position: sticky !important;
    top: 0;
    z-index: 5;
    height: 46vh !important;
    max-height: 46vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background: var(--nrsh-bg);
    box-shadow: 0 6px 16px -10px rgba(0,0,0,0.6);
  }
  #c { min-height: 0 !important; }
  .svg-container { height: auto !important; }

  .map-container,
  .chart-panel,
  .svg-area {
    position: sticky !important;
    top: 0;
    z-index: 5;
    height: 46vh !important;
    min-height: 0 !important;
    max-height: 46vh !important;
    overflow: hidden !important;
    background: var(--nrsh-bg);
    box-shadow: 0 6px 16px -10px rgba(0,0,0,0.6);
  }
  /* the story arrives below the pinned visual, not behind it */
  .beat { scroll-margin-top: 48vh; }

  /* ── The tour bar belongs to the viewport, not to the visual.
     It was in three different places across the eight: absolute at top 56 over the map on four,
     static below the chart on three, and on Food Environment 2,815px down the page — off screen
     at load, which is why the tour looked missing there. On a phone the controls have to be
     reachable at every moment of the tour, so they sit at the bottom of the screen and stay. */
  .nrsh-tour {
    position: fixed !important;
    /* every one of these needs !important: three of the exhibits set their own mobile
       placement for this bar (top: 56px; right: 12px; bottom: auto) in page CSS that loads
       after this sheet, and a single un-flagged property is enough to leave the bar
       floating in the middle of the screen. */
    left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
    width: 100% !important;
    z-index: 40;
    display: flex; justify-content: center; align-items: center; gap: 10px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    background: rgba(43,43,37,0.94);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--nrsh-rule-strong);
    border-radius: 0;
  }
  .nrsh-tour .nrsh-tour-live { display: flex; align-items: center; gap: 10px; }
  /* nothing hides behind the bar */
  .story-panel { padding-bottom: 84px !important; }

  /* ── Overlays were sized for a taller panel.
     The Adult Obesity year control measured 462px wide on a 390px screen — it ran off the edge.
     The legends take 13–20% of a 305px visual, and Food & Climate's impact key was 164px of it,
     sitting squarely over the bars. They stay legible, they stop competing. */
  /* ── The key is a strip, not a box.
     Scaled down it was still a card sitting on top of the map, and on a 305px visual it hid a
     real part of the world. Kirk, 8 September: "at their size, they are covering some of the map.
     How does a user see the whole map?" Fair — so the key stops being an overlay and becomes a
     rule along the bottom edge of the panel: full width, one line, about 30px. A choropleth is
     unreadable without its key, so hiding it behind a tap was not the answer; giving it the one
     band of the projection that carries no countries was. */
  .legend {
    position: absolute !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important; max-width: none !important;
    transform: none !important;
    display: flex !important; align-items: center; gap: 9px;
    padding: 5px 12px calc(5px + env(safe-area-inset-bottom)) !important;
    border: 0 !important; border-top: 1px solid var(--nrsh-rule) !important;
    border-radius: 0 !important;
    background: rgba(43,43,37,0.90) !important;
    backdrop-filter: blur(8px);
  }
  .legend-title {
    margin: 0 !important; flex: 0 0 auto;
    font-size: 0.56rem !important; letter-spacing: .07em;
    max-width: 33%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .legend-bar { width: auto !important; flex: 1 1 auto; height: 9px !important; margin: 0 !important; }
  .legend-labels { flex: 0 0 auto; gap: 7px; font-size: 0.56rem !important; }
  .legend-labels span { white-space: nowrap; }

  /* The controls sit just above the strip rather than on top of it, and stay on one line. The
     scale-to-fit left Undernourishment's two-button toggle wrapping into a three-line blob over
     the Atlantic — narrower type and no wrapping is the fix, not a smaller blob. */
  .controls {
    bottom: 34px !important;
    transform: translateX(-50%) !important;
    flex-wrap: nowrap !important; white-space: nowrap !important;
    gap: 8px !important;
    padding: 6px 12px !important;
  }
  .view-btn { font-size: 11px !important; padding: 5px 11px !important; white-space: nowrap !important; }
  .chart-panel .legend, .chart-legend, .impact-legend {
    transform: scale(0.8) !important;
    transform-origin: top right !important;
  }
  .controls {
    max-width: calc(100vw - 24px) !important;
    left: 50% !important; right: auto !important;
    transform: translateX(-50%) scale(0.86) !important;
    transform-origin: bottom center !important;
  }

  /* ── One structure, four sets of numbers.
     46vh suits a map, where the subject is a shape and more height buys little. It does not suit
     a chart of seventeen bars or ten thousand years on one axis: at 305px those were a smudge.
     Kirk, 8 September: each type may have its own mobile strategy. This is that, kept to the one
     parameter that actually differs rather than four separate treatments. */
  /* The Timeline's chart is locked to a 960×380 viewBox, so height cannot help it: at 390px wide
     it letterboxes to 119px whatever the panel does. Ten thousand years on one axis wants width,
     not height — so the chart is drawn at twice the screen width and the pinned window pans
     across it, which is the gesture a timeline asks for anyway. The tour brings the active moment
     into that window (see the exhibit's own script). */
  /* phone B (Kirk, 20 Oct 2026): no more panning. The chart fits the screen; on a phone the page draws it for
     the phone (360 x 270), so it reads at full width without a window sliding over it. */
  html[data-exhibit-type="timeline"] .chart-panel { overflow: hidden !important; height: auto !important; max-height: 66vh !important; }
  html[data-exhibit-type="timeline"] #c { min-width: 0 !important; width: 100% !important; min-height: 0 !important; max-height: none !important; height: auto !important; flex: none !important; }
  /* the title belongs to the window, not to the chart sliding underneath it */
  html[data-exhibit-type="timeline"] .viz-title {
    position: sticky !important; left: 0; z-index: 3; max-width: 100vw;
  }

  /* Food & Climate is the dense one: seventeen bars cannot be read in 305px however they are
     scaled, so the pinned window scrolls the chart instead of squashing it — the same answer
     Food Environment needed, for the same reason. The container carries a real height so the
     chart measures itself against something worth drawing into; without it the flex box collapses
     and the chart renders 111px tall in a 305px panel. */
  html[data-exhibit-type="chart"] .chart-panel { overflow-y: auto !important; }
  /* Only the bar chart. Cod Catch shares the class and the id, and it sizes itself correctly
     from the panel — giving it 520px too made it scroll for no reason. The marker is on the one
     container that needs it. */
  .chart-container[data-dense="bars"] { min-height: 520px !important; }

  /* The impact key is a colour legend for bars that are already labelled with their values. On a
     phone it costs a fifth of the visual to say what the story column says in words, so it goes.
     It is still there at every size above this one. */
  html[data-exhibit-type="chart"] .legend,
  html[data-exhibit-type="timeline"] .legend { display: none !important; }
}

/* ==== 8 Oct 2026: Kirk's phone review, _Library/Exhibits_phone-review_2026-10-08.pdf ==========
   A  Listen / Read before the tour; Narrate becomes Sound on / Sound off with a speaker icon.
   C  Controls a thumb can hit: 15px type, 44px targets, a readable chapter counter.
   D  The legend's title on its own line on phones, not cut to "HOUSEHOLD FOOD WAST...".
   E  Map pins are fact boxes, not chapters, so they lose their numbers: numbers mean chapters.
   F  Phones: a chapter's words come first, its photo after and shorter.
   G  Adult Obesity: the year control becomes a strip under the map, "Play the years".
   H  History timeline: the whole chart fits the pinned window (it was cut off at the bottom).
   J  The tour bar is centred on every exhibit. */
.nrsh-tour .nrsh-ico { display: inline-block !important; width: 1.15em !important; height: 1.15em !important; min-height: 0 !important; max-width: none !important; flex: none; vertical-align: -0.22em; margin-right: 6px; }
.nrsh-tour .nrsh-tour-voice[aria-pressed="false"] .nrsh-ico .w { opacity: 0.3; }
.nrsh-tour .nrsh-tour-listen { background: #F2C06A !important; border-color: #F2C06A !important; color: #2B2B25 !important; }
.nrsh-tour .nrsh-tour-listen:hover { background: #F6CF8C !important; }
.nrsh-tour[data-state="on"] .nrsh-tour-listen { display: none; }
.hotspot text:not(.hotspot-map-label) { display: none; }

@media (max-width: 900px) {
  .nrsh-tour, .chart-foot .nrsh-tour { justify-content: center !important; gap: 8px !important; }
  .nrsh-tour { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) !important; }
  .nrsh-tour .nrsh-tour-live { gap: 8px !important; }
  .nrsh-tour button { font-size: 15px !important; padding: 10px 16px !important; min-height: 44px; letter-spacing: 0.02em !important; }
  .nrsh-tour .nrsh-tour-prev, .nrsh-tour .nrsh-tour-next { min-width: 44px; padding: 8px 0 !important; font-size: 22px !important; line-height: 1; }
  .nrsh-tour .nrsh-tour-step { font-size: 14px !important; color: var(--nrsh-text) !important; opacity: 1 !important; min-width: 3.5ch; }

  .legend { flex-wrap: wrap !important; row-gap: 3px !important; }
  .legend-title { flex: 0 0 100% !important; max-width: none !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }

  .beat { display: flex; flex-direction: column; }
  .beat > picture, .beat > .beat-image, .beat > figure { order: 4; margin-top: 6px; }
  .beat > .photo-credit { order: 5; margin-top: 2px !important; }
  .beat .beat-image { width: 100%; max-height: 32vh; object-fit: cover; }

  .controls:has(#timeSlider) {
    left: 0 !important; right: 0 !important; width: 100% !important; max-width: none !important;
    transform: none !important; border-radius: 0 !important; border: 0 !important;
    border-top: 1px solid var(--nrsh-rule) !important; background: rgba(43,43,37,0.92) !important;
    justify-content: center !important; bottom: 60px !important; padding: 6px 14px !important; gap: 10px !important;
  }
  .controls:has(#timeSlider) .step-btn, .controls:has(#timeSlider) .slider-label { display: none !important; }
  .controls:has(#timeSlider)::before { content: "Play the years"; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nrsh-text-dim); white-space: nowrap; }
  .controls:has(#timeSlider) .time-slider { flex: 1 1 auto; min-width: 0; }

  /* the legend now takes two lines (title, then the steps): other overlays sit above it */
  .controls { bottom: 66px !important; }
  html[data-exhibit-type="timeline"] .viz-title { display: none !important; }  /* the page heading right above says it */
}
@media (max-width: 374px) {
  .nrsh-tour .nrsh-tour-voice span { display: none; }
  .nrsh-tour .nrsh-tour-voice .nrsh-ico { margin-right: 0; }
}

/* ==== 9 Oct 2026 (Kirk, iPhone): the exhibit's in-picture title sat on top of the farm model, and on the
   maps it covers countries once the tour zooms in. On phones the page heading right above already names the
   exhibit, so the title steps aside there (charts keep theirs: it sits in empty plot space).
   Phone wording: .on-wide / .on-narrow swap "Hover" for "Tap" and "the right column" for "below", because
   below 900px the story stacks under the picture. */
.on-narrow { display: none; }
@media (max-width: 900px) {
  .on-wide { display: none !important; }
  .on-narrow { display: inline !important; }
  html[data-exhibit-type="model"] .viz-title,
  html[data-exhibit-type="map"] .viz-title { display: none !important; }
}

/* ==== 18 Oct 2026 (Exhibits phone A, Kirk's iPhone 16 screenshots; "A with T1") =====================
   Maps: the picture, then its controls, then its key, one under the other, so nothing sits on the map
   or cuts it off. On phones the three map pages draw the world at its own shape (nrshMapH), and the
   drawing's empty margins (36px above the globe, 76px below) are trimmed here. Dots are sized to a
   phone map (24 -> 9, 12 -> 5). A tapped country's details become a card across the screen, inside
   16px side margins, just above the tour bar, instead of a box that follows the finger off the edge. */
@media (max-width: 700px) {
  .map-container { display: flex !important; flex-direction: column !important; height: auto !important; max-height: none !important; }
  .map-container > svg { flex: none !important; display: block; width: 100% !important; height: auto !important; margin: -36px 0 -76px !important; }
  .map-container .controls, .map-container .controls:has(#timeSlider) {
    position: relative !important; z-index: 2; order: 2; transform: none !important;
    left: auto !important; right: auto !important; bottom: auto !important; top: auto !important;
    align-self: center; margin: 6px auto !important; max-width: calc(100% - 32px) !important;
  }
  .map-container .controls:has(#timeSlider) { align-self: stretch; max-width: none !important; width: 100% !important; margin: 0 !important; }
  .map-container .legend { position: relative !important; z-index: 2; order: 3; left: auto !important; right: auto !important; bottom: auto !important; }
  .map-container .nrsh-year { top: 4px !important; right: 8px !important; font-size: 22px !important; z-index: 3; }  /* the year sits in the corner beside the globe, not on it */
  /* the map is about 52vw tall here; a chapter arrives the same distance under the pinned picture as on the other exhibits, its controls and its key */
  body:has(.map-container) .beat { scroll-margin-top: calc(52vw + 60px) !important; }
  body:has(.map-container .controls) .beat { scroll-margin-top: calc(52vw + 108px) !important; }
  .map-container svg circle[r="24"] { r: 9px; }
  .map-container svg circle[r="12"] { r: 5px; }
  #tooltip, body > .tooltip {
    position: fixed !important; left: 16px !important; right: 16px !important; top: auto !important;
    bottom: calc(80px + env(safe-area-inset-bottom)) !important; width: auto !important; max-width: none !important;
    transform: none !important; box-sizing: border-box; font-size: 15px !important; line-height: 1.45 !important; z-index: 45 !important;
  }
}

/* ==== 19 Oct 2026 (Exhibits phone: scroll hand-off and chart dots; Kirk, iPhone 16) ==== the Cod Catch chart's dots at half
   size (r 12 to 6 to the eye; the chapter flash still grows them), the stroke kept at 1.5px; the invisible tap circle stays r 16. */
@media (max-width: 700px) {
  .hotspot .hotspot-dot { transform: scale(0.5); stroke-width: 3px; }
}

/* ==== 19 Oct 2026 (Exhibits laptop A; Kirk: "A as shown? Yes") ===========================================================
   Laptop and desktop only (phones keep their own layout). Sheet: _Library/EXHIBITS_laptop_NOW-A_2026-10-19.jpg.
   Maps: the key, the toggle or year slider, and the tour share one bottom edge, 20px up; the toggle sits beside the key,
   not in the middle (the year slider no longer covers "Listen to the tour"). Charts: the caption's first line is centred on
   the tour buttons. The buttons never wrap (at 1000px they had folded into circles). */
@media (min-width: 901px) {
  .nrsh-tour { bottom: 20px !important; }
  .nrsh-tour button { white-space: nowrap; }
  .map-container .legend { bottom: 20px !important; left: 20px !important; }
  .map-container .controls { bottom: 20px !important; left: 311px !important; right: auto !important; transform: none !important; }
  .map-container .controls:has(#timeSlider) { right: 319px !important; width: auto !important; max-width: none !important; }
  .chart-foot { align-items: flex-start !important; }
  .chart-foot > .chart-caption, .chart-foot > figcaption { margin-top: 8px !important; }
}
/* 901-1299px: no room for three on one line, so the toggle or year slider rides above the key; the tour stays bottom right */
@media (min-width: 901px) and (max-width: 1299px) {
  .map-container .controls { left: 20px !important; bottom: 120px !important; }
  .map-container .controls:has(#timeSlider) { right: 20px !important; width: auto !important; }   /* its own row: the full width */
}
/* 901-1099px: the key keeps to 270px (a long title wraps) so it clears the tour; the row above it steps up to match */
@media (min-width: 901px) and (max-width: 1099px) {
  .map-container .legend { max-width: 270px !important; }
  .map-container .legend-title { white-space: normal !important; }
  .map-container .controls { bottom: 132px !important; }
}

/* 19 Oct 2026 (Kirk: "I don't like the look of the two circular buttons as ovals"): the year slider's buttons keep their
   size in a narrow row, so they stay round; the track takes up the difference. */
.controls .play-btn, .controls .step-btn { flex: none !important; aspect-ratio: 1 / 1; }

/* ==== pause B (20 Oct 2026) (Kirk): while the tour is talking the sound button reads Pause, then
   Resume; it keeps the gold "listening" look in both. The chapter counter stays on one line. */
.nrsh-tour .nrsh-tour-voice[data-voice="playing"], .nrsh-tour .nrsh-tour-voice[data-voice="paused"] { background: rgba(242,192,106,0.18); border-color: #F2C06A; color: #F2C06A; }
.nrsh-tour .nrsh-tour-step { white-space: nowrap; }
/* the button keeps one width as it changes between Pause and Resume, so the bar does not shift */
.nrsh-tour .nrsh-tour-voice[data-voice="playing"], .nrsh-tour .nrsh-tour-voice[data-voice="paused"] { min-width: 7.4em; justify-content: center; text-align: center; }
@media (min-width: 901px) { .nrsh-tour .nrsh-tour-voice[data-voice="playing"], .nrsh-tour .nrsh-tour-voice[data-voice="paused"] { min-width: 8.6em; } }

/* ==== 19 Oct 2026 (Kirk, Undernourishment): the story column's opening sat 48px above chapter 01 (42 on a phone);
   now 30 (24), so the first chapter reads as part of the story. Where the era buttons sit in between (History), unchanged. */
.story-header:has(+ .beats) .story-intro { margin-bottom: 4px; }

/* ==== map controls on a pale map, A (Kirk, 20 Oct 2026): the tour's buttons sit on one semi-transparent dark pill,
   like the Food System Map's tour panel, so they read over any colour; the map is untouched everywhere else.
   Laptop and desktop only: phones already have the solid bar along the foot of the screen. */
@media (min-width: 901px) {
  .map-container .nrsh-tour,
  .svg-area .nrsh-tour {   /* Regenerative Farm too (Kirk, 22 Oct 2026): its controls sit on the pale farm ground */
    background: rgba(43,43,37,0.84);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    padding: 6px 8px; border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  }
}

/* ==== a way out (Kirk, 20 Oct 2026, phone option B): "x Exhibits" on the pinned visual; "Keep exploring" at the end of the story */
.nrsh-out, .nrsh-keep { display: none; }
@media (max-width: 900px) {
  .nrsh-out {
    display: inline-flex; align-items: center; gap: 6px;
    position: absolute; top: 10px; left: 10px; z-index: 9;
    font-family: var(--nrsh-font); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; line-height: 1;
    color: #F5F0E3; text-decoration: none;
    background: rgba(43,43,37,0.84); border: 1px solid rgba(245,240,227,0.25); border-radius: 999px; padding: 7px 12px 7px 10px;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  .nrsh-out span { font-size: 16px; line-height: 0.7; }
  /* the corner is the button's: the visual's own name gives way, as History's already did (the page heading names it) */
  .viz-title.static { display: none !important; }
  .nrsh-keep {
    display: flex; flex-direction: column; gap: 10px;
    margin: 28px 0 8px; padding: 20px 18px; border: 1px solid var(--nrsh-rule-strong); border-radius: 10px; background: rgba(245,240,227,0.04);
  }
  .nrsh-keep .k-lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #F2C06A; }
  .nrsh-keep .k-next { display: block; font-size: 19px; font-weight: 600; color: var(--nrsh-text); text-decoration: none; }
  .nrsh-keep .k-next small { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nrsh-text-dim); margin-bottom: 2px; }
  .nrsh-keep .k-all { font-size: 15px; color: #9FD3CF; text-decoration: underline; text-underline-offset: 3px; }
}
