/* ============================================================
   Lowick Hedry — "Who decides now"
   The National Scheme of Delegation and the new politics of
   planning committees across London.

   Editorial HTML publication stylesheet.
   Tokens mirror references/lowick-hedry.css and
   01. Design System/colors_and_type.css.

   Structure
   1. Tokens + themes
   2. Base + typography
   3. Layout: page frame, editorial grid, slides
   4. Navigation (top bar, index dialog, contents)
   5. Components (stats, dots, timeline, diagram, table, people)
   6. Responsive
   7. Motion + accessibility
   ============================================================ */

/* Fonts (Fraunces + Rethink Sans) are linked from <head> via Google Fonts. */

/* ------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------ */
:root {
  /* Brand palette (official) */
  --off-white:   #FAFAFA;
  --anchor:      #0A2C4A;
  --anchor-deep: #051A2E;
  --whisper:     #C8D8EC;
  --whisper-60:  #DCE6F3;
  --whisper-20:  #ECF2F8;
  --civic:       #4F719C;
  --civic-deep:  #3D5A7E;
  --signal:      #D84011;
  --signal-deep: #B83209;
  --signal-tint: #FBE0D6;
  --highlight:   #F6FFB0;
  --ink:         #0A2C4A;
  --ink-soft:    #1F3E5C;
  --graphite:    #4F719C;
  --stone:       #8A9FB7;
  --night:       #111E30;
  --night-card:  #16263C;
  --night-line:  rgba(255,255,255,0.12);
  --night-line-soft: rgba(255,255,255,0.08);
  --moss:        #1cd735;
  --ochre:       #f38423;
  --reform:      #12B6CF;

  /* Type */
  --font-display: "Fraunces", "Source Serif Pro", "Georgia", serif;
  --font-sans:    "Rethink Sans", "Inter", "Helvetica Neue", system-ui, sans-serif;

  /* Fluid type scale — body ≈16px at 1440px, 15px on phones */
  --fs-body:      clamp(15px, 14.65px + 0.094vw, 17px);
  /* Nothing is set below 14px except eyebrows and the uppercase labels that work as
     eyebrows (client rule, 29 Oct 2026). */
  --fs-body-sm:   clamp(14px, 13.5px + 0.1vw, 15px);
  --fs-caption:   14px;
  --fs-eyebrow:   12px;
  --fs-lead:      clamp(18px, 16.5px + 0.35vw, 22px);
  --fs-h4:        clamp(18px, 17px + 0.25vw, 21px);
  --fs-h3:        clamp(26px, 22px + 1.1vw, 40px);
  --fs-h2:        clamp(34px, 26px + 2.2vw, 60px);
  --fs-display:   clamp(44px, 30px + 4vw, 96px);
  --fs-stat:      clamp(40px, 30px + 2.4vw, 64px);
  --fs-pull:      clamp(22px, 19px + 1vw, 34px);

  --lh-body: 1.5;
  --baseline: calc(var(--fs-body) * var(--lh-body));   /* ≈24px desktop */

  /* Spacing (4/8 grid) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Editorial grid */
  --page-max:  1600px;
  --page-pad:  clamp(20px, 5vw, 72px);
  --gutter:    clamp(20px, 2vw, 32px);
  --measure:   66ch;
  --nav-h:     64px;

  /* Radii — buttons rectangular, cards 10px, chips pill */
  --r-card: 10px;
  --r-sm:   6px;
  --r-button: 0;
  --r-tag:  999px;

  /* Motion */
  --ease-out:   cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-inout: cubic-bezier(0.45, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;
  --dur-reveal: 640ms;

  /* Semantic — light theme */
  --bg:            var(--off-white);
  --bg-elev:       var(--whisper-20);
  --bg-card:       #FFFFFF;
  --fg1:           var(--ink);
  --fg2:           var(--ink-soft);
  --fg3:           var(--civic);
  --fg-muted:      var(--stone);
  --border:        var(--whisper-60);
  --border-strong: var(--whisper);
  --accent:        var(--signal);
  --link:          var(--anchor);
  --mark:          var(--signal);       /* pull-quote marks, rules */
  --map-fill:      var(--whisper);
  --slide-whisper: var(--whisper);      /* flat Whisper Blue slide ground */
  --slide-rule: color-mix(in srgb, var(--civic) 60%, transparent);   /* running head/foot rules on light slides */
  --role-fg: var(--civic);
  --solid-card-bg: var(--anchor);
  --stat-card-bg: var(--whisper-60);
  --solid-card-fg: var(--off-white);
  --region-card-bg: var(--civic);      /* contents: the four region cards, same in both themes */
  --region-card-fg: var(--off-white);
  /* Contents hover (client, 10 Nov 2026): region cards darken from Civic to Anchor,
     the other cards take a Whisper wash. */
  --region-card-hover: var(--anchor);
  --toc-card-hover-bg: var(--whisper-20);
  --chip-bg:       var(--whisper-20);
  --chip-fg:       var(--anchor);
  /* At-a-glance accordion (mobile only) — head band, its map, its +/- toggle */
  --glance-head-bg:   var(--whisper);
  --glance-head-fg:   var(--fg1);
  --glance-head-map:  var(--civic);
  --glance-toggle-bg: var(--bg);
  --glance-toggle-fg: var(--fg2);
  --nav-bg:        rgba(250, 250, 250, 0.84);
  --focus:         var(--signal);
  --selection-bg:  var(--signal);
  --selection-fg:  #fff;
  --dot-off:       var(--whisper-60);
  --placeholder:   var(--whisper-20);
  --shadow:        0 18px 48px -24px rgba(10,44,74,0.28);

  color-scheme: light;
}

/* Dark theme — explicit choice, or any on-dark composition */
:root[data-theme="dark"],
.on-dark {
  --bg:            var(--night);
  --bg-elev:       #172A44;
  --bg-card:       var(--night-card);
  --fg1:           var(--off-white);
  --fg2:           var(--whisper-60);
  --fg3:           var(--whisper);
  --fg-muted:      #8AA0BA;
  --border:        var(--night-line);
  --border-strong: rgba(255,255,255,0.24);
  --accent:        var(--highlight);
  --link:          var(--off-white);
  --mark:          var(--highlight);
  --map-fill:      var(--whisper);
  --slide-whisper: var(--night);
  --slide-rule: var(--border);
  --role-fg: var(--accent);
  --solid-card-bg: var(--civic-deep);
  --region-card-hover: var(--civic-deep);
  --toc-card-hover-bg: var(--ink-soft);
  --stat-card-bg: var(--bg-elev);
  --solid-card-fg: var(--off-white);
  --chip-bg:       rgba(255,255,255,0.10);
  --chip-fg:       var(--whisper);
  --glance-head-bg:   var(--civic);
  --glance-head-fg:   var(--off-white);
  --glance-head-map:  var(--whisper);
  --glance-toggle-bg: var(--whisper);
  --glance-toggle-fg: var(--anchor);
  --nav-bg:        rgba(17, 30, 48, 0.78);
  --focus:         var(--highlight);
  --selection-bg:  var(--highlight);
  --selection-fg:  var(--anchor);
  --dot-off:       rgba(255,255,255,0.16);
  --placeholder:   rgba(255,255,255,0.06);
  --shadow:        0 24px 56px -28px rgba(0,0,0,0.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            var(--night);
    --bg-elev:       #172A44;
    --bg-card:       var(--night-card);
    --fg1:           var(--off-white);
    --fg2:           var(--whisper-60);
    --fg3:           var(--whisper);
    --fg-muted:      #8AA0BA;
    --border:        var(--night-line);
    --border-strong: rgba(255,255,255,0.24);
    --accent:        var(--highlight);
    --link:          var(--off-white);
    --mark:          var(--highlight);
    --map-fill:      var(--whisper);
    --slide-whisper: var(--night);
    --slide-rule: var(--border);
    --role-fg: var(--accent);
    --solid-card-bg: var(--civic-deep);
    --region-card-hover: var(--civic-deep);
    --toc-card-hover-bg: var(--ink-soft);
    --stat-card-bg: var(--bg-elev);
    --solid-card-fg: var(--off-white);
    --chip-bg:       rgba(255,255,255,0.10);
    --chip-fg:       var(--whisper);
    --glance-head-bg:   var(--civic);
    --glance-head-fg:   var(--off-white);
    --glance-head-map:  var(--whisper);
    --glance-toggle-bg: var(--whisper);
    --glance-toggle-fg: var(--anchor);
    --nav-bg:        rgba(17, 30, 48, 0.78);
    --focus:         var(--highlight);
    --selection-bg:  var(--highlight);
    --selection-fg:  var(--anchor);
    --dot-off:       rgba(255,255,255,0.16);
    --placeholder:   rgba(255,255,255,0.06);
    --shadow:        0 24px 56px -28px rgba(0,0,0,0.6);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------
   2. Base + typography
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg1);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
  counter-reset: slide;
}
html.index-open { overflow: hidden; }   /* scroll lock while the Index is open; root-level so the reading position is kept */
/* Deck mode (set by the script on screens where the viewport rule applies):
   the reader moves section by section with the header arrows or the index, so
   the browser's own smooth scrolling and the scrollbar affordance step aside. */
html.deck { scroll-behavior: auto; scrollbar-width: none; overscroll-behavior: none; }
html.deck::-webkit-scrollbar { width: 0; height: 0; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
::selection { background: var(--selection-bg); color: var(--selection-fg); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--fg1);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-display); line-height: 1.0; letter-spacing: -0.015em; font-variation-settings: "opsz" 144, "SOFT" 20, "WONK" 0; }
h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -0.012em; font-variation-settings: "opsz" 96, "SOFT" 12, "WONK" 0; }
h3 { font-size: var(--fs-h3); line-height: 1.14; letter-spacing: -0.008em; font-variation-settings: "opsz" 48, "SOFT" 6, "WONK" 0; }
h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--fg1);
  margin: 0 0 var(--s-3);
}
.display { font-size: var(--fs-display); line-height: 1.0; letter-spacing: -0.02em; font-variation-settings: "opsz" 144, "SOFT" 24, "WONK" 0; }
h1 em, h2 em, .display em { font-style: italic; font-weight: 400; }

p { margin: 0 0 var(--baseline); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; }
.lead {
  font-family: var(--font-sans);
  font-size: var(--fs-lead);
  line-height: 1.42;
  color: var(--fg2);
  max-width: 56ch;
}
.small { font-size: var(--fs-body-sm); }
.muted { color: var(--fg3); }

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); transition: color var(--dur-base) var(--ease-out), text-decoration-color var(--dur-base) var(--ease-out); }
a:hover { text-decoration-color: currentColor; color: var(--accent); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg3);
  margin: 0 0 var(--s-4);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1.35;
}
.dot { color: var(--mark); }
.on-dark .dot { color: var(--highlight); }

/* Pull quote — Fraunces italic, marks in brand accent */
.pullquote {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: var(--fs-pull);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--fg1);
  margin: 0;
  text-wrap: balance;
  font-variation-settings: "opsz" 72, "SOFT" 30, "WONK" 1;
}
.pullquote::before { content: "\201C"; color: var(--mark); margin-right: 0.04em; }
.pullquote::after  { content: "\201D"; color: var(--mark); }
.pullquote-wrap { padding-left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--anchor); color: #fff; padding: 12px 16px;
  font: 600 14px/1 var(--font-sans); text-decoration: none;
}
.skip-link:focus { left: 16px; top: 16px; outline: 2px solid var(--highlight); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

/* ------------------------------------------------------------
   3. Layout — page frame, editorial grid, slides
   ------------------------------------------------------------ */
.frame {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* Anchor targets land below the fixed bar via html { scroll-padding-top } (no extra scroll-margin, to avoid a double offset) */

.slide {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-block: clamp(84px, 11vh, 136px) clamp(24px, 3.5vh, 40px);   /* room under the fixed bar; the foot sits tighter to the edge */
  counter-increment: slide;
  overflow: hidden;              /* gradients + decorative maps never cause horizontal scroll */
  background: var(--bg);
  color: var(--fg1);
  /* On desktop every slide fills the viewport; anything longer than that simply
     grows, since this is a floor and not a fixed height. */
  min-height: 100vh;
  min-height: 100svh;
}
.slide--fill { min-height: 100vh; min-height: 100svh; }
.slide > .frame {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  z-index: 1;
}

/* Running head / foot (echoing the InDesign master pages) */
.slide-head, .slide-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg3);
  line-height: 1.35;
}
.slide-head { padding-bottom: var(--s-3); border-bottom: 1px solid var(--border); margin-bottom: clamp(28px, 5vh, 56px); }
.slide-foot { padding-top: var(--s-3); border-top: 1px solid var(--border); margin-top: clamp(32px, 6vh, 72px); }
/* On light grounds the running rules are Civic Blue; dark slides keep the soft
   white hairline, and in dark mode --slide-rule falls back to --border. */
.slide:not(.on-dark) .slide-head { border-bottom-color: var(--slide-rule); }
.slide:not(.on-dark) .slide-foot { border-top-color: var(--slide-rule); }
.slide-head .kicker { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.slide-head .kicker .mini-map { width: 22px; height: 22px; flex: 0 0 auto; color: var(--map-fill); }
.slide-head .kicker .num { color: var(--mark); }
.slide-head .section-label { text-align: right; }
/* Authority openers swap the running label for a link back to their region divider, and the region dividers for one back to the contents (29 Oct 2026). */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px;
  color: inherit; text-decoration: none;
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.back-link:hover, .back-link:focus-visible { color: var(--fg1); border-color: var(--fg1); }
.on-dark .back-link:hover, .on-dark .back-link:focus-visible { color: var(--highlight); border-color: var(--highlight); }
.back-link .arrow-glyph { flex: 0 0 auto; }
.slide-foot .num::after { content: counter(slide, decimal-leading-zero); }
.slide-foot .num { font-variant-numeric: tabular-nums; }

.slide-body { min-width: 0; }
.slide--fill .slide-body { align-self: center; }   /* openers sit optically centred; slides still grow with content */
.slide-title { margin-bottom: clamp(20px, 3vh, 32px); max-width: 22ch; }
.slide-title.wide { max-width: 30ch; }
/* A title set on its own grid row: the row gap gives the space beneath it. */
.grid > .slide-title { margin-bottom: 0; }

/* 12-column editorial grid */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(28px, 4vh, 48px);
  align-items: start;
}
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: 1 / -1; }
.col-aside { grid-column: 9 / -1; }   /* right-hand aside column, leaves a gutter column free */

/* Multi-column text flow. Text runs on from one column to the next, and the
   columns are balanced, so the first is never shorter than the second, nor the
   second than the third (client rule, 29 Oct 2026). A paragraph may cross a
   column break; a heading stays with the text that follows it. */
.flow { column-gap: var(--gutter); hyphens: auto; -webkit-hyphens: auto; orphans: 2; widows: 2; column-fill: balance; }
.flow--3 { column-count: 3; }
.flow--2 { column-count: 2; }
.flow--1 { column-count: 1; max-width: var(--measure); }
.flow > * { break-inside: auto; -webkit-column-break-inside: auto; page-break-inside: auto; }
.flow h3, .flow h4 { break-after: avoid; -webkit-column-break-after: avoid; }
/* .flow--balance is now the default behaviour; the class stays on the markup. */
/* A paragraph set by hand to open the third column (Richmond upon Thames, client
   29 Oct 2026); only while the flow has its three columns. */
.flow--3 > .col-break { break-before: column; -webkit-column-break-before: always; }
.flow--fill { orphans: 1; widows: 1; }
/* A short paragraph kept whole in the first column, the second left empty (opener
   intros of Chorley, Fylde, Preston, Ribble Valley and Wyre; client, 10 Nov 2026). */
.flow--whole > p { break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; }
/* Flows with lines moved by hand (data-flow-lines, app.js 5b) move them one at a time;
   app.js marks them .is-moved only at the widths where a move applies (10 Nov 2026). */
.flow.is-moved { orphans: 1; widows: 1; }
.flow p { margin: 0 0 var(--baseline); }
.flow p:last-child { margin-bottom: 0; }
.flow .flow-block { margin-bottom: var(--baseline); }
/* Cards, stats, quotes, case blocks and figures set inside a text flow: they
   keep their own rhythm and are never split across a column break, even where
   the flow otherwise lets paragraphs run over one. */
.flow > .card, .flow > .stat, .flow > .cases, .flow > .pullquote-wrap, .flow > .figure, .flow > .committees {
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  margin-bottom: var(--baseline);
}
.flow > .card:last-child, .flow > .stat:last-child, .flow > .cases:last-child,
.flow > .pullquote-wrap:last-child, .flow > .figure:last-child { margin-bottom: 0; }
.flow .flow-block:last-child { margin-bottom: 0; }
.flow .flow-block h4 { margin-bottom: var(--s-2); }
.flow-block > p:last-child { margin-bottom: 0; }
.flow p, .prose p { color: var(--fg2); }
.on-dark .flow p, .on-dark .prose p { color: var(--whisper-60); }
.flow--1 p, .prose p { max-width: var(--measure); }

/* Gradients — the official Lowick Hedry dark + light gradients (CSS reproduction) */
.grad-dark { background: var(--night); color: var(--whisper-20); }
.grad-dark::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 86% 54% at 92% 14%, rgba(54,121,210,0.95) 0%, rgba(53,122,212,0.78) 26%, rgba(31,65,109,0.26) 52%, transparent 72%),
    radial-gradient(ellipse 78% 44% at 2% 96%, rgba(52,117,204,0.88) 0%, rgba(52,119,208,0.58) 34%, rgba(33,71,122,0.22) 58%, transparent 78%),
    radial-gradient(ellipse 72% 58% at 12% 50%, rgba(33,71,122,0.50) 0%, rgba(25,51,87,0.32) 46%, transparent 72%),
    radial-gradient(ellipse 78% 64% at 90% 86%, rgba(19,33,51,0.94) 0%, rgba(19,37,60,0.70) 46%, transparent 74%),
    linear-gradient(158deg, #111E30 0%, #152640 22%, #193357 45%, #13253C 69%, #111E30 100%);
}
.grad-dark.grad-flip::before { transform: scaleX(-1); }
/* A flat Whisper Blue ground — used where a slide should read as a panel rather
   than a gradient. Dark mode falls back to the standard night ground. */
.slide--whisper { background: var(--slide-whisper); }
.grad-light { background: var(--off-white); }
.grad-light::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 42% 34% at 92% 92%, rgba(184,204,230,0.34) 0%, rgba(220,230,243,0.20) 42%, transparent 72%),
    radial-gradient(ellipse 82% 42% at 94% 2%, rgba(92,143,211,0.34) 0%, rgba(124,164,216,0.27) 28%, rgba(187,206,232,0.18) 55%, transparent 76%),
    radial-gradient(ellipse 78% 50% at 0% 50%, rgba(103,147,205,0.30) 0%, rgba(139,173,217,0.22) 31%, rgba(196,212,233,0.16) 58%, transparent 80%),
    radial-gradient(ellipse 84% 48% at 36% 24%, rgba(236,242,248,0.92) 0%, rgba(219,229,242,0.38) 45%, transparent 74%),
    radial-gradient(ellipse 70% 46% at 82% 58%, rgba(255,255,255,0.96) 0%, rgba(250,250,250,0.78) 40%, transparent 70%),
    radial-gradient(ellipse 92% 62% at 76% 94%, rgba(255,255,255,1) 0%, rgba(250,250,250,0.82) 50%, transparent 76%),
    linear-gradient(160deg, #E8EFF8 0%, #EEF3F8 29%, #DEE9F5 50%, #F7F9FB 72%, #FAFAFA 100%);
}
/* In dark mode a "light gradient" slide becomes a quiet dark wash */
:root[data-theme="dark"] .grad-light { background: var(--night); }
:root[data-theme="dark"] .grad-light::before {
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(54,121,210,0.28) 0%, rgba(31,65,109,0.12) 40%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(52,117,204,0.20) 0%, transparent 70%),
    linear-gradient(160deg, #111E30 0%, #14243B 50%, #111E30 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grad-light { background: var(--night); }
  :root:not([data-theme="light"]) .grad-light::before {
    background:
      radial-gradient(ellipse 70% 50% at 100% 0%, rgba(54,121,210,0.28) 0%, rgba(31,65,109,0.12) 40%, transparent 70%),
      radial-gradient(ellipse 60% 40% at 0% 100%, rgba(52,117,204,0.20) 0%, transparent 70%),
      linear-gradient(160deg, #111E30 0%, #14243B 50%, #111E30 100%);
  }
}

/* ---- Cover ---- */
.slide--cover { padding-top: calc(var(--nav-h) + clamp(32px, 6vh, 72px)); }
.slide--cover > .frame { grid-template-rows: auto 1fr auto; }
.cover-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-5); }
.cover-top .brand-mark { width: clamp(150px, 16vw, 230px); color: var(--off-white); }
.cover-main { align-self: center; padding-block: clamp(40px, 8vh, 96px); }
/* "Who decides now." is an h2 and the subtitle the page's h1 (client, 21 Sept 2026);
   each keeps the look it had, so the display sizing is set by class, not element. */
.cover-main .title { color: var(--off-white); max-width: 12ch; font-size: var(--fs-display); line-height: 1.0; letter-spacing: -0.015em; font-variation-settings: "opsz" 144, "SOFT" 20, "WONK" 0; }
.cover-main .title .dot { color: var(--highlight); }
.cover-main .subtitle {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 17px + 1vw, 32px);
  line-height: 1.25;
  letter-spacing: 0;
  font-variation-settings: "opsz" 32, "SOFT" 0, "WONK" 0;
  color: var(--whisper);
  max-width: 45ch;   /* 39.1ch + 15% */
  margin: clamp(20px, 3vh, 32px) 0 0;
  text-wrap: balance;
}
/* Same button as "Get in touch" on How we can help, keeping the nudging arrow. */
.cover-cue { margin-top: var(--s-6); }
.cover-cue svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--highlight); }
.cover-cue:hover svg, .cover-cue:focus-visible svg { color: currentColor; }   /* the arrow follows the filled state */
/* England map — a watermark behind the cover, not a picture: low opacity plus a
   left-edge fade so the title and logo always sit on clean gradient. The map is
   portrait, so it is fitted by height inside the box; box and map are centred on
   the page, and the fade still runs across the whole box. */
.cover-map {
  position: absolute; top: 50%; left: 50%; width: min(66vw, 980px); height: 94%; z-index: 0;
  object-fit: contain; object-position: center;
  transform: translate(-50%, -50%);
  opacity: 0.14;
  filter: saturate(0.4);
  -webkit-mask-image: linear-gradient(to right, transparent 4%, rgba(0,0,0,0.45) 32%, #000 66%);
  mask-image: linear-gradient(to right, transparent 4%, rgba(0,0,0,0.45) 32%, #000 66%);
  pointer-events: none;
}
/* On the publication's cover (not the access page) the map sits 30 per cent of its
   box width right of centre. */
.slide--cover .cover-map { transform: translate(-20%, -50%); }

/* ---- Contents ---- */
.toc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.toc-card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--s-4);
  padding: clamp(24px, 2.6vw, 40px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-card);
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
a.toc-card:hover, a.toc-card:focus-visible { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); color: inherit; background-color: var(--toc-card-hover-bg); }
.toc-card .g { font: 600 var(--fs-eyebrow)/1.3 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); margin-bottom: var(--s-3); }
.toc-card .t {
  font: 600 clamp(20px, 17px + 0.6vw, 26px)/1.2 var(--font-sans); letter-spacing: -0.005em;
  color: var(--fg1); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.toc-card .t .arrow { color: var(--accent); flex: 0 0 auto; font: 500 var(--fs-h4)/1 var(--font-sans); margin-top: 0.15em; }
.toc-card .d { margin: auto 0 0; font-size: var(--fs-body); line-height: 1.45; color: var(--fg2); max-width: 36ch; }
.toc-card--3 { grid-column: span 4; }
/* The four regions on Civic Blue (client, 29 Oct 2026), so the way into the
   authorities reads apart from the chapters. */
.toc-card--region { background: var(--region-card-bg); border-color: transparent; color: var(--region-card-fg); }
.toc-card--region .t, .toc-card--region .d { color: var(--region-card-fg); }
.toc-card--region .t .arrow { color: var(--highlight); }
a.toc-card--region:hover, a.toc-card--region:focus-visible { border-color: transparent; color: var(--region-card-fg); background-color: var(--region-card-hover); }
/* On a wide screen the contents fills the slide: the two rows share the height
   between the title and the running foot. */
#contents .slide-body { align-self: stretch; display: flex; flex-direction: column; grid-row: 2; }
/* The contents has no running head, so body and foot are placed on the frame's
   second and third rows: the foot then sits where it does on every other slide. */
#contents .slide-foot { grid-row: 3; }
#contents .toc { flex: 1 1 auto; grid-template-rows: repeat(3, minmax(0, 1fr)); }
/* Overview, At a glance and How we can help share the first row (39 Get in touch hidden,
   client, 15 Oct 2026); the six regions follow, three to a row, each card leading to its
   divider, which lists the region's authorities (Carmen, 29 Oct 2026; six regions,
   10 Nov 2026). */
.toc-card--left, .toc-card--right { grid-row: 1; }
.toc-card--left.toc-card--r1 { grid-column: 1 / span 4; }
.toc-card--left.toc-card--r2 { grid-column: 5 / span 4; }
.toc-card--right.toc-card--r1 { grid-column: 9 / span 4; }
.toc-card--region { grid-column: span 4; grid-row: auto; }
.toc-card .arrow::after, .arrow-glyph::after { content: "\2197"; }

/* ---- Chapter opener composition ---- */
.opener { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: clamp(24px, 4vh, 40px); align-items: center; }
.opener-copy { grid-column: 1 / span 7; min-width: 0; }
/* The borough silhouette is a watermark, not a picture: it sits behind the copy at
   the same weight as the cover's London map, as tall as the slide's content area
   (so the vertical padding is kept) and flush to the right page margin. Body copy
   is allowed to run over it. */
.opener-map {
  position: absolute; top: 0; bottom: 0; right: var(--page-pad);
  aspect-ratio: 1; width: auto; max-width: none;
  z-index: -1; color: var(--map-fill);
  opacity: 0.14;
  filter: saturate(0.4);
  pointer-events: none;
}
.opener-map svg { width: 100%; height: 100%; }
.opener-copy .eyebrow { color: var(--fg3); }
.opener-copy h2 { max-width: 14ch; margin-bottom: clamp(20px, 3vh, 32px); }
/* A name set on exactly two lines, broken by hand (South Cambridgeshire, client 29 Oct 2026). */
.opener-copy h2.opener-title--2 { max-width: none; }
.opener-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 clamp(24px, 4vh, 40px); padding: 0; list-style: none; }
.opener-meta li { display: inline-flex; align-items: center; gap: 8px; font: 500 var(--fs-caption)/1.3 var(--font-sans); padding: 6px 12px; border-radius: var(--r-tag); background: var(--chip-bg); color: var(--chip-fg); }
.opener-intro h4 { color: var(--fg3); font-size: var(--fs-eyebrow); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; margin-bottom: var(--s-3); }
/* A lead set in a column (Overview, p. 3) keeps its words whole: at the lead size a
   column holds too few words per line for hyphenation to read well. */
.flow > .lead { -webkit-hyphens: manual; hyphens: manual; }
/* Three columns of the same measure the two-column intros use: three tracks of
   (100% - gutter) / 2 plus two gutters comes to 150% of the copy column plus
   half a gutter, so the block runs wider than the seven columns it sits in. */
.opener-intro--wide .flow { width: calc(150% + var(--gutter) / 2); max-width: none; }
/* Who holds what (Greater Manchester and Liverpool City Region openers): the docx
   callout as a list of roles in the last four columns, over the silhouette. Role in
   the caption size, holder beneath it, hairlines between, as in the contents lists. */
.opener-roles { grid-column: 9 / -1; min-width: 0; align-self: center; }
.opener-roles .eyebrow { margin-bottom: var(--s-3); }
.roles { margin: 0; display: grid; }
.roles > div { padding: 9px 0; border-top: 1px solid var(--border); }
.roles > div:last-child { border-bottom: 1px solid var(--border); }
.roles dt { font: 500 var(--fs-caption)/1.35 var(--font-sans); color: var(--fg3); margin-bottom: 2px; }
.roles dd { margin: 0; font: 600 var(--fs-body-sm)/1.35 var(--font-sans); color: var(--fg1); }
/* Headshots beside each named holder: built 29 Oct 2026, withdrawn the same day because
   the councils' photographs are not licensed for reuse (amends/fotos-derechos.md). The
   styles stay, inert, scoped to .roles--faces; tools/headshots/headshots.py "on" puts back
   the markup, the class and the images exactly as they were published. A small round
   photo in the row's left margin; two holders in one row overlap; a row with no one named
   or no photo shows the dashed placeholder of the team portraits. */
.roles--faces > div { position: relative; padding-left: 54px; }
.roles--faces > div.has-2 { padding-left: 74px; }
.roles--faces .faces { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: flex; }
.roles--faces .face { display: block; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--placeholder); flex: 0 0 auto; }
.roles--faces .face + .face { margin-left: -20px; box-shadow: 0 0 0 2px var(--bg); }
.roles--faces .face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.roles--faces .face--none { background: none; border: 1px dashed var(--border-strong); }

/* ---- Region dividers (29 Oct 2026) ----
   One per region before its authorities: the region's name, its authorities with their
   political control, and the region drawn whole from the ONS boundaries. Each authority
   on the map is a link to its chapter; the list and the map light up together (app.js, 9). */
.divider-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-6); align-items: center; }
.divider-copy { grid-column: 1 / span 6; min-width: 0; }
.divider-map { grid-column: 7 / -1; min-width: 0; }
/* London's 33 names at 18px need eight columns to stay on one line each. */
.divider--long .divider-copy { grid-column: 1 / span 8; }
.divider--long .divider-map { grid-column: 9 / -1; }
.divider-copy h2 { margin-bottom: clamp(20px, 3vh, 32px); }
.divider-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 0 var(--s-5); }
.divider--long .divider-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.divider-list li { display: flex; }
.divider-list a {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font: 600 18px/1.3 var(--font-sans); color: var(--fg1); text-decoration: none;   /* 18px, client 29 Oct 2026 */
  transition: color var(--dur-base) var(--ease-out);
}
.divider--long .divider-list a { padding: 5px 0; }
.divider-list .n {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(15px, 1.15vw, 20px); line-height: 1;
  color: var(--fg3); min-width: 2.4ch; font-variation-settings: "opsz" 72, "SOFT" 20;
}
.divider-list .nm { min-width: 0; }
/* Cheshire and Warrington and Lancashire carry a short text below the list (docx, 9 Nov 2026). */
.divider-intro { margin-top: clamp(20px, 3vh, 32px); color: var(--fg2); }
.divider-intro p { max-width: 62ch; }
.divider-intro.flow p { max-width: none; }
/* Lancashire: fifteen names and two paragraphs beside a tall, narrow county, so the copy
   takes eight columns and the list rows are set tighter, as London's are. */
.divider--lancs .divider-copy { grid-column: 1 / span 8; }
.divider--lancs .divider-map { grid-column: 9 / -1; }
.divider--lancs .divider-list a { padding: 5px 0; }
.divider-list a:hover, .divider-list a:focus-visible, .divider-list a.is-hot { color: var(--accent); }
.divider-map svg { display: block; width: 100%; height: auto; max-height: calc(100svh - var(--nav-h) - 200px); margin-inline: auto; overflow: visible; }
.divider-map path {
  fill: color-mix(in srgb, var(--map-fill) 20%, transparent);
  stroke: color-mix(in srgb, var(--map-fill) 55%, transparent); stroke-width: 1.2; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: fill var(--dur-base) var(--ease-out);
}
.divider-map a:hover path, .divider-map a:focus-visible path, .divider-map a.is-hot path { fill: var(--accent); }
.divider-map a:focus-visible { outline: none; }
.divider-map a:focus-visible path { stroke: var(--fg1); stroke-width: 2; }

/* ---- Text + aside compositions ---- */
.aside { display: grid; gap: var(--s-4); align-content: start; }
.aside--sticky { position: sticky; top: calc(var(--nav-h) + 24px); }
/* Cards set in a row after the text, across the page (Wandsworth, client 10 Nov 2026).
   Below 1180px the .aside rule in section 6 lets them wrap. */
.aside--row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); align-items: stretch; }
/* Tighter padding and a smaller gap above the row, so the slide fits 1440 × 900. */
.aside--row .card { --card-pad: clamp(18px, 1.4vw, 22px); }
.grid:has(> .aside--row) { row-gap: var(--s-4); }

/* Three-section composition (short boroughs) */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.trio--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trio > div { min-width: 0; padding-top: var(--s-4); border-top: 1px solid var(--border-strong); }
/* Variant without the rule above each heading. */
.trio--plain > div { padding-top: 0; border-top: 0; }
/* Section headings inside a trio read exactly like a slide title (the Camden
   treatment): the base h3 display style, with the same space beneath. */
.trio h3 { margin-bottom: clamp(20px, 3vh, 32px); }
.trio p { color: var(--fg2); hyphens: auto; }
.on-dark .trio p { color: var(--whisper-60); }

/* ------------------------------------------------------------
   4. Navigation
   ------------------------------------------------------------ */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  color: var(--fg1);
  transition: background var(--dur-base) var(--ease-out);
}
.topnav.topnav--on-dark {
  --bg: var(--night); --fg1: var(--off-white); --fg3: var(--whisper); --border: var(--night-line);
  --border-strong: rgba(255,255,255,0.24); --nav-bg: rgba(17, 30, 48, 0.55); --focus: var(--highlight);
  background: var(--nav-bg); color: var(--fg1);
}
.topnav .frame { height: 100%; display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.topnav .brand { display: inline-flex; align-items: center; color: var(--fg1); text-decoration: none; flex: 0 0 auto; }
.topnav .brand svg { height: 22px; width: auto; }
.nav-current { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.nav-current .k { font: 600 var(--fs-eyebrow)/1.2 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); }
.nav-current .t { font: 500 var(--fs-body-sm)/1.25 var(--font-sans); color: var(--fg1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: transparent; transform-origin: left; }
.nav-progress > i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 120ms linear; }
.nav-controls { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.nav-btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; min-width: 40px; padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-button);
  background: transparent;
  color: var(--fg1);
  font: 600 14px/1 var(--font-sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.nav-btn:hover { background: var(--fg1); color: var(--bg); border-color: var(--fg1); }
.nav-btn[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }
.nav-btn svg { width: 16px; height: 16px; }
.nav-btn--index { padding: 0 14px; }
.nav-btn .label { display: inline; }
/* First-visit tip: a speech bubble under the controls, its tail on the ‹ ›
   arrows (--tip-x, measured by app.js, is the tail's distance from the bubble's
   right edge). Inverted against the bar, so it reads on the dark cover and on
   light pages alike; it beats gently, in the rhythm of the slide 06 map pins. */
.nav-tip {
  --tip-x: 216px;
  position: absolute; top: calc(100% + 14px);
  right: calc((100% - min(100%, 1600px)) / 2 + var(--page-pad));   /* the frame's right edge */
  width: min(330px, calc(100vw - 2 * var(--page-pad)));
  display: flex; align-items: flex-end; gap: var(--s-4);
  padding: 16px 16px 16px 20px;
  border-radius: var(--r-card);
  background: var(--fg1); color: var(--bg);
  box-shadow: var(--shadow);
  transform-origin: calc(100% - var(--tip-x)) 0;
  animation: tip-in 360ms var(--ease-out) both, tip-beat 2.4s ease-in-out 600ms infinite;
  transition: opacity var(--dur-base) var(--ease-out);
}
.nav-tip[hidden] { display: none; }
.nav-tip::before {
  content: ""; position: absolute; top: -6px; right: calc(var(--tip-x) - 6px);
  width: 12px; height: 12px; background: inherit; transform: rotate(45deg);
}
.nav-tip p { margin: 0; flex: 1 1 auto; font: 500 var(--fs-body-sm)/1.45 var(--font-sans); color: inherit; }
.nav-tip__ok {
  appearance: none; flex: 0 0 auto;
  height: 34px; padding: 0 16px;
  border: 1px solid currentColor; border-radius: var(--r-button);
  background: transparent; color: inherit;
  font: 600 14px/1 var(--font-sans); letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.nav-tip__ok:hover { background: var(--bg); color: var(--fg1); border-color: var(--bg); }
.nav-tip__ok:focus-visible { outline: 2px solid var(--bg); outline-offset: 2px; }
.nav-tip.is-leaving { opacity: 0; animation: none; }
.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-button);
  background: transparent;
  color: var(--fg1);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.theme-toggle__track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  width: 56px;
  height: 28px;
  background: transparent;
}
.theme-toggle__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 26px;
  height: 24px;
  color: var(--fg3);
  transition: color var(--dur-base) var(--ease-out);
}
.theme-toggle__icon svg {
  width: 15px;
  height: 15px;
}
.theme-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 24px;
  border-radius: 0;
  background: var(--highlight);
  box-shadow: none;
  transition: transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.theme-toggle:hover {
  background: color-mix(in srgb, var(--highlight) 14%, transparent);
}
.theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
:root[data-theme="light"] .theme-toggle__icon--light,
:root:not([data-theme]) .theme-toggle__icon--light { color: var(--anchor); }
:root[data-theme="dark"] .theme-toggle__icon--dark { color: var(--anchor); }
:root[data-theme="dark"] .theme-toggle__thumb { transform: translateX(26px); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle__icon--light { color: var(--fg3); }
  :root:not([data-theme]) .theme-toggle__icon--dark { color: var(--anchor); }
  :root:not([data-theme]) .theme-toggle__thumb { transform: translateX(26px); }
}

/* Index dialog */
.index-dialog {
  border: 0; padding: 0; margin: 0;
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  background: transparent; color: var(--fg1);
}
.index-dialog::backdrop { background: rgba(5, 16, 30, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.index-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  width: min(100%, 720px);
  background: var(--bg);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 3vw, 40px);
  box-shadow: -30px 0 80px -30px rgba(0,0,0,0.5);
}
.index-panel > * { flex: 0 0 auto; }   /* nothing is compressed when the list overflows */
.index-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); margin-bottom: var(--s-6); }
.index-head h2 { font-size: var(--fs-h3); }
.index-close { width: 44px; height: 44px; padding: 0; }
.index-group { margin-bottom: var(--s-6); }
.index-group:last-of-type { margin-bottom: 0; }
.index-group .eyebrow { margin-bottom: var(--s-3); }
/* Closing line, set like the panel's own title, with the address in Signal. */
.index-outro {
  margin: auto 0 0;                     /* pinned to the foot of the panel */
  padding-top: var(--s-6);
  font-family: var(--font-display); font-weight: 500; font-size: calc(var(--fs-h3) * 0.8);
  line-height: 1.14; letter-spacing: -0.008em; color: var(--fg1);
}
.index-outro a { color: var(--accent); text-decoration: none; }
.index-outro a:hover, .index-outro a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.index-list li { border-bottom: 1px solid var(--border); }
.index-list a {
  display: grid; grid-template-columns: 3ch 1fr auto; align-items: center; gap: 14px;
  padding: 12px 4px; text-decoration: none; color: var(--fg1);
  font: 500 var(--fs-body)/1.3 var(--font-sans);
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.index-list a:hover, .index-list a:focus-visible { color: var(--accent); }
.index-list a[aria-current="true"] { color: var(--accent); }
.index-list .n { font: 600 14px/1 var(--font-sans); letter-spacing: 0.1em; color: var(--fg3); }
.index-list .arrow { color: var(--fg3); }
.index-list .arrow::after { content: "\2197"; }
.index-boroughs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
/* Greater Cambridge has two entries: auto-fit drops the empty third track so the pair
   shares the full width, and still stacks to one column when the panel is narrow. */
.index-boroughs--pair { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* Every authority card in the index is as tall as the tallest. Within a list, equal
   rows (1fr) do it on their own; across the London and Greater Cambridge lists,
   app.js measures the tallest card and sets --index-card-h on the dialog. */
.index-boroughs { grid-auto-rows: 1fr; }
.index-boroughs li { display: flex; }
.index-boroughs a {
  flex: 1; min-height: var(--index-card-h, 0);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-card);
  text-decoration: none; color: var(--fg1); font: 500 var(--fs-body-sm)/1.25 var(--font-sans);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.index-boroughs a:hover, .index-boroughs a:focus-visible, .index-boroughs a[aria-current="true"] { border-color: var(--border-strong); background: var(--bg-elev); color: var(--accent); }
.index-boroughs .mini-map { width: 34px; height: 34px; color: var(--map-fill); flex: 0 0 auto; }
.index-boroughs .n { font-size: 14px; letter-spacing: 0.1em; color: var(--fg3); display: block; margin-bottom: 2px; }

/* Prev / next chapter links at the end of each chapter (scroll-friendly) */
.chapter-nav { display: flex; justify-content: space-between; gap: var(--s-4); }
.chapter-nav a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 var(--fs-body-sm)/1.2 var(--font-sans); color: var(--fg1); border-bottom: 1.5px solid var(--mark); padding-bottom: 4px; }
.chapter-nav a:hover { color: var(--accent); }

/* ------------------------------------------------------------
   5. Components
   ------------------------------------------------------------ */
.card {
  --card-pad: clamp(18px, 2vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-card);
  padding: var(--card-pad);
}
.card--tint { background: var(--bg-elev); border-color: transparent; }
.card.card--solid { background: var(--solid-card-bg); border-color: transparent; }
/* Icon sits in the card's top-right corner, inside the existing padding. */
/* Icon shares the first row with the date and sits top-right, inside the padding.
   Scoped to the solid card: on a plain stat card the second track would take width
   from whatever lands in it (the dot legend, say) and squeeze the figure. */
.card--solid.stat { grid-template-columns: minmax(0, 1fr) auto; }
.card .card-icon { width: 26px; height: 26px; grid-column: 2; grid-row: 1; justify-self: end; align-self: start; margin-top: 4px; color: inherit; }
.card--solid.stat .figure { grid-column: 1; grid-row: 1; }
.card--solid.stat .label { grid-column: 1 / -1; }
.on-dark .card { background: rgba(255,255,255,0.05); border-color: var(--night-line); }
/* Card icons (6 Oct 2026): a brand icon from the Lowick Hedry iconset, used as
   the guidelines use icons, "subtle bullets or positional markers" that never
   compete with the copy. One icon per idea, reused wherever the idea recurs, in
   the mark colour (Signal; Highlight in dark), like the eyebrow's own rule.
   On a titled card it sits inline before the eyebrow, centred on its first line,
   so a title that wraps hangs clear of it. */
.eyebrow--icon { align-items: flex-start; }
.eyebrow-icon { flex: none; width: 20px; height: 20px; margin-top: calc((1.35em - 20px) / 2); color: var(--mark); }
.compare caption .eyebrow-icon { display: inline-block; vertical-align: middle; margin: 0 12px 0 0; }   /* a caption is not a flex box, and svg is block by default */
/* A stat card has no eyebrow: its icon keeps the top-right corner, out of the
   flow, and the figure stops short of it. */
.card--marked { position: relative; }
.card-marker { position: absolute; top: calc(var(--card-pad) - 4px); right: var(--card-pad); width: 24px; height: 24px; color: var(--mark); pointer-events: none; }
.card--marked > .figure { padding-right: 36px; }

/* Stat — big numerical figure */
.stat { display: grid; gap: 6px; align-content: start; }
.stat .figure {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-stat);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--fg1);
  font-variation-settings: "opsz" 144, "SOFT" 20;
}
.stat .figure .dot { color: var(--mark); }
.stat .figure small { font-size: 0.42em; letter-spacing: 0; font-weight: 500; margin-left: 0.15em; }
.stat .label { font: 500 var(--fs-body-sm)/1.4 var(--font-sans); color: var(--fg2); max-width: 30ch; }
/* Figure and label side by side rather than stacked (desktop only). */
.stat--row { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-4); align-items: center; }
.stat--row .figure { white-space: nowrap; }
.stat .label strong { color: var(--fg1); }
/* Civic card — stated after .stat so it wins over the default figure/label colours. */
.card--solid .figure, .card--solid .label, .card--solid .label strong, .card--solid .card-icon { color: var(--solid-card-fg); }
/* Stacked layout: the label sits clear of the date. */
.card--solid .label { margin-top: var(--s-4); }
.card--solid .figure .dot { color: var(--mark); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-4); }
.stat-row .stat { padding: var(--s-4) 0 0; border-top: 2px solid var(--mark); }
/* Card variant: no rule on top, a tinted ground and the standard card corner. */
.stat-row--cards .stat { padding: clamp(18px, 2vw, 28px); border-top: 0; border-radius: var(--r-card); background: var(--stat-card-bg); }
/* Stacked variant: one tile a row, figure beside label, and the labels lined up
   on one edge (each tile is a subgrid of the row's two tracks). Three tiles take
   the height two side by side plus a wrapped third would not (Tower Hamlets,
   6 Oct 2026). Doubled class so the breakpoints' .stat-row columns don't apply. */
.stat-row.stat-row--stack { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-4); }
.stat-row--stack > .stat { grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }
.stat-row--stack .figure { white-space: nowrap; }

/* Dot grid — committee members, applications */
.dots { display: grid; grid-template-columns: repeat(var(--cols, 10), minmax(0, 1fr)); gap: clamp(4px, 0.5vw, 8px); max-width: 360px; margin-top: var(--s-4); }
.dots i { display: block; aspect-ratio: 1; border-radius: 50%; background: var(--dot-off); transform: scale(0.8); transition: background var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 18ms); }
.dots i.on { background: var(--accent); transform: scale(1); }
.dots i.off { opacity: 0.55; }
.dots.in i { transform: scale(1); }
.dots-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: var(--s-3); font: 500 var(--fs-caption)/1.3 var(--font-sans); color: var(--fg3); }
.dots-legend span { display: inline-flex; align-items: center; gap: 8px; }
.dots-legend b { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--dot-off); }
.dots-legend b.on { background: var(--accent); }

/* Bar — caseload split */
.bar { display: grid; gap: 10px; }
.bar .track { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--dot-off); }
.bar .seg { height: 100%; transform-origin: left; transform: scaleX(0); transition: transform 900ms var(--ease-out); }
.bar.in .seg { transform: scaleX(1); }
.bar .seg--a { background: var(--accent); }
.bar .seg--b { background: var(--civic); }
.on-dark .bar .seg--b { background: var(--whisper); }
.bar .keys { display: flex; flex-wrap: wrap; gap: 6px 20px; font: 500 var(--fs-caption)/1.35 var(--font-sans); color: var(--fg2); }
.bar .keys span { display: inline-flex; align-items: center; gap: 8px; }
.bar .keys b { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* Before-and-after table (Kensington and Chelsea, client 5 Oct 2026). The three
   committees are the columns; each row's label sits above its values as a
   row-group heading, so the values get the full width of the aside instead of
   sharing it with a label column. The committee now in force carries the mark. */
.card--compare { grid-column: 1 / -1; }   /* full width where the aside goes to two tracks */
.compare { width: 100%; border-collapse: collapse; table-layout: fixed; font: 500 var(--fs-caption)/1.35 var(--font-sans); color: var(--fg2); }
.compare caption { display: table-caption; text-align: left; margin: 0 0 var(--s-4); }
.compare thead th { text-align: left; vertical-align: bottom; padding: 0 10px 10px 0; font: 600 var(--fs-caption)/1.3 var(--font-sans); color: var(--fg1); border-bottom: 2px solid var(--border-strong); }
.compare thead th small { display: block; font-size: inherit; font-weight: 500; color: var(--fg3); }
.compare thead th.is-after { border-bottom-color: var(--mark); }
.compare tbody th { text-align: left; padding: 12px 0 4px; font: 600 var(--fs-eyebrow)/1.2 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); }
.compare td { vertical-align: top; padding: 0 10px 12px 0; border-bottom: 1px solid var(--border); }
.compare tbody:last-child td { border-bottom: 0; padding-bottom: 0; }
.compare td.is-after { color: var(--fg1); font-weight: 600; }
.compare .is-figure td { font: 500 22px/1.1 var(--font-display); color: var(--fg1); font-variant-numeric: tabular-nums; }

/* Date tag at the head of a paragraph older than the copy around it (the June
   Lead Member position in Kensington and Chelsea, client 5 Oct 2026). */
.dateline { display: inline-block; margin-right: 8px; padding: 3px 9px; border-radius: var(--r-tag); background: var(--chip-bg); color: var(--chip-fg); font: 600 var(--fs-eyebrow)/1.4 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; vertical-align: 0.1em; }

/* Committee diagram (Southwark / Greenwich / Tower Hamlets structures) */
.committees { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-3); }
.committee { border: 1px solid var(--border-strong); border-radius: var(--r-card); padding: var(--s-4); display: grid; gap: 6px; align-content: start; }
/* Portrait thumbnail: a step tighter than the card's own 10px corner. */
.committee .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 30%; border-radius: 6px; background: var(--bg-elev); margin-bottom: var(--s-2); }
.committee .name { font: 600 var(--fs-body-sm)/1.3 var(--font-sans); color: var(--fg1); }
.committee .note { font: 500 var(--fs-caption)/1.35 var(--font-sans); color: var(--fg3); }
.committee .seats { display: flex; gap: 4px; margin-top: 4px; }
.committee .seats i { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.committee .party { white-space: normal; align-items: flex-start; font-size: var(--fs-body-sm); line-height: 1.35; }
.committee .party i { margin-top: 5px; }
.aside .committees { grid-template-columns: 1fr; }
.aside .committees--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Timeline — vertical rail, flows into 2 columns on desktop */
.timeline { list-style: none; margin: 0; padding: 0; column-gap: clamp(32px, 4vw, 64px); }
.timeline--2 { column-count: 2; }
.timeline li { break-inside: avoid; -webkit-column-break-inside: avoid; position: relative; padding: 0 0 var(--s-5) 28px; border-left: 1.5px solid var(--border-strong); }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline li.key::before { background: var(--accent); }
.timeline li.key .when { color: var(--accent); }
.timeline .when { display: block; font: 600 var(--fs-body-sm)/1.3 var(--font-sans); color: var(--fg1); }
.timeline .what { display: block; font-size: var(--fs-body-sm); color: var(--fg2); margin-top: 2px; }
.timeline .who { display: inline-block; font: 600 var(--fs-eyebrow)/1 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); margin-bottom: 4px; }
.timeline--inline li { padding-bottom: var(--s-4); }

/* Gateway diagram */
.gate { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.35fr) auto minmax(0, 1.1fr); gap: var(--s-3); align-items: stretch; }
.gate .node { position: relative; border: 1px solid var(--border-strong); border-radius: var(--r-card); padding: var(--s-4); background: var(--bg-card); display: grid; gap: 6px; align-content: start; min-width: 0; }
.on-dark .gate .node { background: rgba(255,255,255,0.05); }
.gate .node .k { font: 600 var(--fs-eyebrow)/1.2 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); }
.gate .node .v { font: 600 var(--fs-body-sm)/1.35 var(--font-sans); color: var(--fg1); }
.gate .node .s { font: 400 var(--fs-caption)/1.4 var(--font-sans); color: var(--fg2); }
.gate .node--in { background: var(--anchor); border-color: var(--anchor); }
.gate .node--in .k { color: var(--whisper); }
.gate .node--in .v { color: var(--off-white); }
.gate .node--in .s { color: var(--whisper-60); }
.gate .node--out { border-color: var(--accent); }
.gate .node--out .k { color: var(--accent); }
.gate .link { display: flex; align-items: center; justify-content: center; color: var(--fg3); font-size: 22px; line-height: 1; }
.gate .link::after { content: "\2192"; }
.gate .r1 { grid-row: 1; } .gate .r2 { grid-row: 2; } .gate .r3 { grid-row: 3; }
.gate .c1 { grid-column: 1; } .gate .c2 { grid-column: 2; } .gate .c3 { grid-column: 3; } .gate .c4 { grid-column: 4; } .gate .c5 { grid-column: 5; }
.gate .r1.c3 { grid-column: 3 / -1; }
.gate .link { min-width: 22px; }
.gate .stack { display: grid; gap: var(--s-3); }
.gate .lbl { font: 600 var(--fs-eyebrow)/1.2 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); text-align: center; }
/* What Schedule 2 includes (client, 28 Sept 2026). Since 15 Oct 2026 the panel is a box
   of its own in Whisper, the brand's light blue, reached from the Schedule 2 node by a
   down arrow in the diagram's third row. It sits outside the role="img" diagram, so the
   list stays readable by assistive technology. */
.gate .link--down { min-height: 22px; }
.gate .link--down::after { content: "\2193"; }
.gate-includes { margin-top: var(--s-3); padding: var(--s-4); background: var(--whisper); border: 1px solid var(--whisper); border-radius: var(--r-card); }
.gate-includes .k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* the node above names it on desktop */
.gate-includes .v { margin: 0 0 var(--s-3); font: 600 var(--fs-body-sm)/1.35 var(--font-sans); color: var(--anchor); }
.gate-includes ul { list-style: none; margin: 0; padding: 0; column-count: 2; column-gap: var(--s-5); }
.gate-includes li { position: relative; padding-left: 16px; margin-bottom: var(--s-2); break-inside: avoid; -webkit-column-break-inside: avoid; font: 400 var(--fs-caption)/1.4 var(--font-sans); color: var(--ink-soft); }
.gate-includes li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--civic); }

/* Numbered list of points */
.points { list-style: none; margin: 0; padding: 0; counter-reset: point; display: grid; gap: var(--s-4); }
.points li { counter-increment: point; display: grid; grid-template-columns: 2.4em 1fr; gap: var(--s-3); color: var(--fg2); hyphens: auto; }
.on-dark .points li { color: var(--whisper-60); }
.points li::before { content: counter(point, decimal-leading-zero); font-family: var(--font-display); font-size: 1.35em; line-height: 1.05; color: var(--mark); font-variant-numeric: tabular-nums; }
.points li strong { color: var(--fg1); }
.points--cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.points--cards li { grid-template-columns: 1fr; gap: var(--s-2); padding: var(--s-4) 0 0; border-top: 2px solid var(--mark); align-content: start; }
.points--cards li::before { font-size: var(--fs-h3); }
/* At most two cards a row: each track is at least half the row less one gap, so a
   third never fits; below about 500px the 240px floor still drops it to one
   (Tower Hamlets, 6 Oct 2026: four long points read as 2 × 2, not 3 + 1). */
.points--2 { grid-template-columns: repeat(auto-fit, minmax(max(240px, calc(50% - var(--s-4))), 1fr)); }

/* At-a-glance table */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.glance { width: 100%; border-collapse: collapse; font-size: var(--fs-body-sm); line-height: 1.4; table-layout: fixed; }
/* Column widths (20 / 17 / 25 / 38): Political control is the narrowest of the
   four; Headline change takes the most. */
.glance th:nth-child(1), .glance td:nth-child(1) { width: 20%; }
/* Political control never goes below the width of its longest word
   ("administration") plus the dot, so nothing is ever broken mid-word. */
.glance th:nth-child(2), .glance td:nth-child(2) { width: max(17%, 11em); }
.glance th:nth-child(3), .glance td:nth-child(3) { width: 25%; }
.glance th:nth-child(4), .glance td:nth-child(4) { width: 38%; }
/* The party label wraps to as many lines as it needs, breaking only between
   words, with the coloured dot held on the first line. A block-level flex box
   (not inline-flex) so it takes the cell's width instead of its max-content. */
.glance .party { display: flex; white-space: normal; align-items: start; min-width: 0; overflow-wrap: normal; hyphens: none; }
.glance .party i { margin-top: 0.32em; }
.glance caption { text-align: left; font: 600 var(--fs-eyebrow)/1.4 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); padding-bottom: var(--s-3); }
.glance th, .glance td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--border); color: var(--fg2); overflow-wrap: break-word; }
.glance thead th { font: 600 var(--fs-eyebrow)/1.4 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); border-bottom: 1.5px solid var(--border-strong); }
.glance tbody th { font: 600 var(--fs-body)/1.3 var(--font-sans); color: var(--fg1); }
.glance tbody th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.glance tbody th a:hover { color: var(--accent); }
.glance tbody th .mini-map { width: 26px; height: 26px; color: var(--map-fill); flex: 0 0 auto; }
.glance td:last-child { padding-right: 0; }
.glance tbody tr:hover { background: color-mix(in srgb, var(--bg-elev) 60%, transparent); }
/* Region header rows (29 Oct 2026): Greater London, Greater Manchester, Liverpool City
   Region, Greater Cambridge, each opening its own tbody and linking to its divider. The
   name in Fraunces on a Whisper band (client, 29 Oct 2026); the gap above the band is a
   transparent stop in its background, since a table row takes no margin. */
.glance .glance-group th {
  padding: calc(var(--s-6) + 12px) 16px 12px;
  background: linear-gradient(transparent var(--s-6), var(--glance-head-bg) 0);
  font: 400 var(--fs-h4)/1.2 var(--font-display); letter-spacing: 0; text-transform: none;
  font-variation-settings: "opsz" 48, "SOFT" 6, "WONK" 0;
  color: var(--glance-head-fg); border-bottom: 0;
}
.glance tbody:first-of-type .glance-group th { padding-top: 12px; background: var(--glance-head-bg); }
.glance .glance-group a { color: inherit; text-decoration: none; }
.glance tbody tr.glance-group:hover { background: none; }
/* Every row is a way into its chapter (client, 29 Oct 2026): app.js (5) passes a click
   anywhere on a row to the row's link and marks the table .is-linked. */
.glance.is-linked tbody tr { cursor: pointer; }
.glance.is-linked tbody tr:hover th a, .glance .glance-group a:hover, .glance .glance-group a:focus-visible { color: var(--accent); }
.glance-group-title { margin: var(--s-6) 0 var(--s-2); font: 400 var(--fs-h4)/1.2 var(--font-display); font-variation-settings: "opsz" 48, "SOFT" 6, "WONK" 0; color: var(--fg1); }
.glance-group-title a { color: inherit; text-decoration: none; }
.glance-group-title a:hover, .glance-group-title a:focus-visible { color: var(--accent); }
.glance-group-title:first-child { margin-top: 0; }
.glance-accordion { display: none; width: 100%; border-top: 1.5px solid var(--border-strong); }
.glance-item { border-bottom: 1px solid var(--border); }
.glance-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: var(--s-4);
  padding: 16px 0;
  cursor: pointer;
  color: var(--fg1);
}
.glance-item summary::-webkit-details-marker { display: none; }
.glance-item summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  font: 500 18px/1 var(--font-sans);
  color: var(--fg2);
}
.glance-item[open] summary::after { content: "-"; }
.glance-item summary:hover .glance-title,
.glance-item summary:focus-visible .glance-title { color: var(--accent); }
.glance-item summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.glance-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font: 600 var(--fs-body)/1.3 var(--font-sans);
}
.glance-title .mini-map { width: 26px; height: 26px; color: var(--map-fill); flex: 0 0 auto; }
.glance-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
  padding: 0 0 var(--s-5) 36px;
  color: var(--fg2);
  font-size: var(--fs-body-sm);
  line-height: 1.4;
}
.glance-panel p { margin: 0; }
.glance-label {
  display: block;
  margin-bottom: 3px;
  font: 600 var(--fs-eyebrow)/1.3 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg3);
}
.glance-wide { grid-column: span 2; }
.glance-link {
  align-self: end;
  justify-self: start;
  color: var(--fg1);
  text-decoration: none;
  font: 600 var(--fs-body-sm)/1.2 var(--font-sans);
  border-bottom: 1.5px solid var(--mark);
  padding-bottom: 4px;
}
.glance-link:hover { color: var(--accent); }

/* Party chip — the colour lives in --party so the same classes drive the dot,
   the seat bar segments and the seat bar keys. */
.party { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--fg1); font-weight: 500; }
.party i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: var(--party, var(--stone)); }
.party--lab { --party: var(--signal); }
.party--green { --party: var(--moss); }
.on-dark .party--green { --party: #7FA46A; }
.party--con { --party: var(--civic); }
.on-dark .party--con { --party: #7FA0CB; }
.party--ind { --party: var(--stone); }
.party--ld { --party: var(--ochre); }
.party--reform { --party: var(--reform); }
.party--aspire { --party: var(--anchor); }
.party--aspire i { outline: 1.5px solid var(--stone); outline-offset: -1.5px; }
.on-dark .party--aspire { --party: var(--off-white); }
.party--green-ld i { background: conic-gradient(var(--moss) 0 50%, var(--ochre) 50% 100%); }
/* No overall control, minority administrations and mayoralties without a council
   majority: a ring in the leading party's colour rather than a filled dot. */
.party--noc i { background: transparent; box-shadow: inset 0 0 0 2.5px var(--party, var(--stone)); }

/* Seat composition — council seats by party on one track, with the majority line */
.seats-bar { display: grid; gap: var(--s-3); margin: 0 0 clamp(24px, 4vh, 40px); max-width: 640px; }
.seats-bar .track { position: relative; display: flex; gap: 2px; height: 12px; border-radius: 3px; background: var(--dot-off); }
.seats-bar .seg { flex: 1 1 0; min-width: 0; height: 100%; border-radius: 2px; background: var(--party, var(--stone)); }
.seats-bar .majority { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--fg1); }
.seats-bar .keys { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 var(--fs-caption)/1.35 var(--font-sans); color: var(--fg2); }
.seats-bar .keys span { display: inline-flex; align-items: center; gap: 8px; }
.seats-bar .keys b { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: var(--party, var(--stone)); }
.seats-bar .keys .total { color: var(--fg1); font-weight: 600; }
/* Seat numbers not yet supplied: an empty dashed track and a note in the key. */
.party--vacant { --party: transparent; }   /* an empty seat: the track shows through, outlined */
.seats-bar .seg.party--vacant { box-shadow: inset 0 0 0 1px var(--border-strong); }
.seats-bar .keys b.party--vacant { box-shadow: inset 0 0 0 1.5px var(--fg3); }
.seats-bar--placeholder .track { background: transparent; border: 1px dashed var(--border-strong); }
.seats-bar--placeholder .keys .total { color: var(--fg3); font-weight: 500; }

/* England map behind the closing Overview slide: the file is already Whisper
   Blue, drawn at full strength on the right with a fade so the copy stays clean. */
.slide--england .slide-body { align-self: center; }   /* copy and map both sit on the vertical centre */
/* Intro across both copy columns, the rest in two beneath it (Carmen, 16 Nov 2026). */
.lead--span { max-width: none; }
.slide--england .slide-map {
  /* Centred on the content area (between the running head and foot), not on the
     slide box: the slide's top padding is far deeper than its bottom one, so a box
     centre would sit visibly low. Top/bottom are the slide paddings plus the head
     and foot heights; with both edges fixed, auto margins centre the image. */
  position: absolute; top: calc(clamp(84px, 11vh, 136px) + 60px); bottom: calc(clamp(24px, 3.5vh, 40px) + 66px);
  right: var(--page-pad); width: min(58vw, 900px); max-height: calc(100% - clamp(84px, 11vh, 136px) - clamp(24px, 3.5vh, 40px) - 126px); height: 100%; z-index: 0;
  margin-block: auto;
  transform: translateX(-8%);   /* then brought a little towards the copy (a fifth until 29 Oct 2026, when the copy widened to seven columns) */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 28%, #000 60%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 28%, #000 60%);
  pointer-events: none;
}
/* The map is drawn inside an inline SVG so the pins share its coordinates;
   xMaxYMid meet does what object-fit: contain + right center did on the img. */
.slide--england .slide-map svg { display: block; width: 100%; height: 100%; }
.slide--england .slide-map image { opacity: 0.3; }
/* The four regions the note covers, in full Whisper Blue over the fainter country,
   each named beside its pin (29 Oct 2026). */
.map-region { fill: var(--whisper); }
.map-label {
  font: 600 22px var(--font-sans); letter-spacing: 0.01em; fill: var(--fg1);
  paint-order: stroke; stroke: var(--bg); stroke-width: 6px; stroke-linejoin: round;
}
/* The four regions: a Signal red dot with a halo, pulsing together. */
.map-pin circle { fill: var(--signal); transform-box: fill-box; transform-origin: center; }
.map-pin-dot  { animation: pin-beat 2.4s ease-in-out infinite; }
.map-pin-halo { opacity: 0; animation: pin-halo 2.4s ease-out infinite; }

/* Image placeholder + figure */
.figure { margin: 0; }
.figure img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-card); }
.figure figcaption { margin-top: var(--s-2); font: 500 var(--fs-caption)/1.4 var(--font-sans); color: var(--fg3); }
.placeholder {
  position: relative;
  display: grid; place-items: center;
  width: 100%; aspect-ratio: var(--ar, 4 / 3);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-card);
  background:
    linear-gradient(135deg, transparent 0 49.6%, var(--border) 49.6% 50.4%, transparent 50.4%),
    linear-gradient(45deg, transparent 0 49.6%, var(--border) 49.6% 50.4%, transparent 50.4%),
    var(--placeholder);
  color: var(--fg3);
  font: 600 var(--fs-eyebrow)/1.4 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; text-align: center;
  padding: var(--s-4);
  overflow: hidden;
}
.placeholder span { background: var(--bg); padding: 6px 10px; border-radius: 3px; }

/* People (Get in touch) */
/* Three people per row at most, however wide the screen: each track is at least
   a third of the row, and never narrower than 300px (or the container). */
/* Title beside the lead paragraph, then the team in rows of three that hang from the
   top with generous air between them (six people since 15 Oct 2026: two rows). */
.contact-head { margin-bottom: clamp(32px, 5vh, 56px); align-items: start; }
.contact-head .slide-title { margin-bottom: 0; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(32px, 6vh, 64px) var(--gutter); align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(max(min(100%, 300px), (100% - 2 * var(--gutter)) / 3), 1fr));
}
/* The portrait takes whatever the card leaves after a 248px text column (room for an
   email address on one line), between 112px and 220px wide. The longest address
   may break after its @ at laptop widths (a <wbr> in the markup). */
.person { display: grid; grid-template-columns: clamp(112px, 100% - 264px, 220px) minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.person .portrait { aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--bg-elev); }
.person .portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.person .name { font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 18px + 0.5vw, 24px); line-height: 1.15; color: var(--fg1); margin: 0 0 4px; }
.person .role { font: 600 var(--fs-caption)/1.3 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--role-fg); margin: 0 0 var(--s-2); }
.person .areas { font-size: var(--fs-body-sm); color: var(--fg2); margin: 0 0 var(--s-2); }
.person .email { font-size: var(--fs-body-sm); word-break: break-word; }
/* No photograph yet: a dashed frame in the portrait's place. */
.portrait--placeholder { display: grid; place-items: center; border: 1px dashed var(--border-strong); font: 600 var(--fs-eyebrow)/1.3 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); text-align: center; padding: 8px; }

/* Case cards (Camden schemes) */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); }
.case { display: grid; gap: 8px; padding-top: var(--s-4); border-top: 2px solid var(--mark); }
.case .where { font: 600 var(--fs-eyebrow)/1.3 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg3); }
.case .what { font: 600 var(--fs-body)/1.3 var(--font-sans); color: var(--fg1); }
.case .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 500 var(--fs-caption)/1.35 var(--font-sans); color: var(--fg2); margin: 0; padding: 0; list-style: none; }
.case .facts li { display: inline-flex; align-items: center; gap: 6px; }
/* Each fact is carried by a line icon rather than a bullet. */
.case .facts li { align-items: center; gap: 8px; }
.case .facts .ico { width: 25px; height: 25px; flex: 0 0 auto; color: var(--mark); }

/* Team photo band */
/* Portrait logo standing in for a photograph on "How we can help". */
.brand-portrait { width: 100%; max-width: 285px; height: auto; margin-inline: auto; }
/* How we can help closes the publication: no running head or foot, so the body
   is the frame's only row; the office contact details sit under the copy. */
#how-we-can-help .slide > .frame { grid-template-rows: 1fr; }
.contact-line { list-style: none; margin: var(--s-6) 0 0; padding: var(--s-4) 0 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); font: 600 var(--fs-body-sm)/1.4 var(--font-sans); }
.contact-line a { color: var(--fg1); text-decoration: none; border-bottom: 1px solid transparent; transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out); }
.contact-line a:hover, .contact-line a:focus-visible { color: var(--accent); border-bottom-color: currentColor; }

/* Buttons (rectangular) */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border: 1.5px solid transparent; border-radius: var(--r-button); font: 600 15px/1 var(--font-sans); text-decoration: none; cursor: pointer; transition: all var(--dur-base) var(--ease-out); }
.btn-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-on-dark:hover { background: #fff; color: var(--anchor); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--fg1); border-color: var(--fg1); }
.btn-ghost:hover { background: var(--fg1); color: var(--bg); }
.btn .arrow::after { content: "\2197"; }

/* Footer */
/* The site footer closes the last chapter (How we can help since 15 Oct 2026, when
   Get in touch was hidden), so the chapter — not the slide — holds the full-viewport
   floor and the footer sits inside it. The #get-in-touch rules stay for its return. */
#how-we-can-help { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
#how-we-can-help > .slide { min-height: 0; flex: 1 1 auto; }
#get-in-touch { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
#get-in-touch > .slide { min-height: 0; flex: 1 1 auto; }
#get-in-touch > .slide > .frame { grid-template-rows: 1fr; }
#get-in-touch .slide-body { display: flex; flex-direction: column; }
/* No running head on this slide, so the title needs clearing the fixed bar itself. */
#get-in-touch > .slide { padding-top: calc(var(--nav-h) + clamp(28px, 4.5vh, 56px)); padding-bottom: clamp(20px, 3vh, 32px); }
.site-footer { background: var(--anchor); color: var(--whisper-60); padding-block: var(--s-6); }
.site-footer .frame { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-5); }
.site-footer .brand-mark { width: 150px; color: var(--off-white); }
.site-footer .meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font: 500 var(--fs-caption)/1.4 var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--whisper); }
.site-footer a { color: var(--off-white); text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover { border-bottom-color: var(--highlight); color: var(--off-white); }
/* Studio credit (6 Nov 2026): sentence case, not the uppercase meta line. */
.site-footer .credit { font: 400 14px/1.4 var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--whisper-60); }

/* Hyphenation on long English text */
.flow, .prose, .trio, .points, .glance { -webkit-hyphenate-limit-chars: 8 4 4; hyphenate-limit-chars: 8 4 4; }

/* ------------------------------------------------------------
   6. Responsive — breakpoints chosen by measure and composition
   ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .flow--3 { column-count: 2; }
  .flow--3 > .col-break { break-before: auto; -webkit-column-break-before: auto; }
  .opener-intro--wide .flow { width: 100%; }
  .col-8, .col-7 { grid-column: span 12; }
  .col-4, .col-5, .col-aside { grid-column: span 12; }
  .aside--sticky { position: static; }
  .aside { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  /* The stat card turns horizontal, except the Overview solid card keeps copy full-width. */
  .col-aside .card.stat { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-6); align-items: center; }
  .col-aside .card.stat .label { max-width: 46ch; }
  .col-aside .card--solid.stat { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .col-aside .card--solid.stat .figure { grid-column: 1; grid-row: 1; }
  .col-aside .card--solid.stat .label { grid-column: 1 / -1; grid-row: 2; margin-top: var(--s-4); max-width: none; }
  .col-aside .card--solid.stat .card-icon { grid-column: 2; grid-row: 1; align-self: start; margin: 4px 0 0; }
  .figure .placeholder { max-width: 640px; }
  .toc-card, .toc-card--3, .toc-card--left, .toc-card--right { grid-column: span 6; }
  .toc-card--left, .toc-card--right { grid-row: auto; }
  .toc-card--left.toc-card--r1, .toc-card--left.toc-card--r2, .toc-card--right.toc-card--r1, .toc-card--right.toc-card--r2 { grid-column: span 6; }
  .toc-card--region { grid-row: auto; }
  .toc-card--right.toc-card--r1 { grid-column: 1 / -1; }   /* third card of the first row takes its own row */
  .opener-copy { grid-column: 1 / span 8; }
}

@media (max-width: 900px) {
  .nav-tip { display: none; }   /* no deck mode, so no arrow-key steps to explain */
  /* Below desktop no slide is held to the viewport: each one is as tall as its
     own content — except the cover, which still fills the screen. */
  .slide, .slide--fill, #get-in-touch, #how-we-can-help { min-height: 0; }
  #contents .toc { grid-template-rows: none; }
  .slide--cover { min-height: 100vh; min-height: 100svh; }
  /* No running foot on small screens: the slide number and the publication line
     are page furniture that only earns its space on a wide screen. */
  .slide-foot { display: none; }
  .back-link { display: none; }   /* the index panel covers this move on small screens */
  /* One kicker per chapter: with no slide furniture to separate them, the slides
     of a chapter read as one continuous stretch, so the chapter is announced once. */
  .chapter .slide ~ .slide .slide-head .kicker { display: none; }
  /* A continuation page repeats its section title on desktop, like a running
     title; read as one stretch, the numbered list simply carries on. */
  .slide--cont .slide-title { display: none; }
  .slide--england .slide-map { display: none; }
  .glance-table { display: none; }
  .glance-accordion { display: grid; gap: var(--s-3); border-top: 0; }
  .glance-item { border-bottom: 0; }
  .glance-item summary {
    background: var(--glance-head-bg);
    color: var(--glance-head-fg);
    border-radius: var(--r-card);
    padding: 14px 16px;
  }
  .glance-item summary .mini-map { color: var(--glance-head-map); }
  .glance-item summary::after {
    background: var(--glance-toggle-bg);
    color: var(--glance-toggle-fg);
    border-color: transparent;
  }
  .glance-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: var(--s-4);
    margin-top: var(--s-2);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background: var(--bg-card);
  }
  .glance-party { grid-column: 1 / -1; }
  .glance-wide { grid-column: 1 / -1; }
  .stat--row { grid-template-columns: 1fr; }
  .col-6 { grid-column: span 12; }
  #how-we-can-help .col-5 { display: none; }
  #how-we-can-help .col-7 { grid-column: 1 / -1; }
  .trio { grid-template-columns: 1fr; }
  .trio:not(.trio--plain) > div { border-top: 1px solid var(--border-strong); }
  .committees--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide--gateway .slide-title { margin-bottom: var(--s-4); }
  .gate { display: none; }
  /* The diagram goes, its Schedule 2 list stays: after the points, as a card of its own. */
  .slide--gateway .gate-wrap { order: 1; }
  .gate-includes { margin-top: 0; border-radius: var(--r-card); }
  .gate-includes .k { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin: 0 0 6px; font: 600 var(--fs-eyebrow)/1.2 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--civic-deep); }
  .trio--2 { grid-template-columns: 1fr; }
  .timeline--2 { column-count: 1; }
  .opener { grid-template-columns: 1fr; }
  .opener-copy { grid-column: 1 / -1; }
  .opener-roles { grid-column: 1 / -1; }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
  .roles > div:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--border); }
  /* Dividers: the list carries the region; the map, which needs a wide screen to be
     read and clicked, goes, as the opener watermark does. */
  .divider-body { grid-template-columns: 1fr; }
  .divider-copy, .divider--long .divider-copy, .divider--lancs .divider-copy { grid-column: 1 / -1; }
  .divider-map { display: none; }
  .divider--long .divider-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Once the opener stacks to one column the borough silhouette no longer sits
     beside the copy but straight behind it, so the watermark is dropped: the
     mini map in the running head still names the borough. */
  .opener-map { display: none; }
  .cover-map, .slide--cover .cover-map { width: 100vw; transform: translate(-50%, -50%); }   /* England whole and centred, Cornwall included; the fade covers the copy */
}

@media (max-width: 760px) {
  :root { --nav-h: 56px; }
  .flow--3, .flow--2, .gate-includes ul { column-count: 1; }
  .roles, .divider-list, .divider--long .divider-list { grid-template-columns: 1fr; }
  .roles > div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .slide { padding-block: clamp(40px, 6vh, 56px) clamp(28px, 4vh, 40px); }
  .slide.slide--cover { padding-top: calc(var(--nav-h) + 28px); }
  .topnav .brand svg { height: 18px; }
  .nav-controls { gap: 6px; }
  .nav-btn { height: 38px; min-width: 38px; padding: 0 8px; }
  .slide-head { margin-bottom: clamp(20px, 4vh, 32px); }
  .slide-head .section-label { display: none; }   /* including the back link: the index covers that move on a phone */
  .chapter .slide ~ .slide .slide-head { display: none; }   /* nothing left in it at this width */
  .slide-foot { margin-top: clamp(24px, 5vh, 40px); }
  .slide-title { max-width: none; }
  .toc-card, .toc-card--3, .toc-card--left, .toc-card--right, .toc-card--region { grid-column: 1 / -1; min-height: 0; }
  .toc-card .n { font-size: 36px; }
  .toc-card .t { padding-top: var(--s-4); }
  .nav-btn .label { display: none; }
  .nav-btn--index { padding: 0 10px; }
  .nav-current .k { display: none; }
  .people { row-gap: var(--s-6); }
  .person { grid-template-columns: 88px minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dots { max-width: 100%; }
  .chapter-nav { flex-direction: column; align-items: flex-start; }
  .index-panel { width: 100%; border-left: 0; }
  .cover-top .brand-mark { width: 132px; }
  .cover-main .title { font-size: clamp(40px, 12vw, 64px); }
}

@media (max-width: 480px) {
  .topnav .brand { display: none; }   /* the wordmark lives on the cover and footer; the bar keeps the chapter label */
}

@media (max-width: 420px) {
  .stat-row { grid-template-columns: 1fr; }
  .glance-item summary { gap: var(--s-3); }
  .glance-panel { grid-template-columns: 1fr; padding: var(--s-4); }
  .person { grid-template-columns: 76px minmax(0, 1fr); }
}

/* ------------------------------------------------------------
   7. Motion + accessibility
   ------------------------------------------------------------ */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); will-change: opacity, transform; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 90ms; }
.js .reveal.d2 { transition-delay: 180ms; }
.js .reveal.d3 { transition-delay: 270ms; }

/* Cover entrance — the title lands word by word, then the subtitle fades, then
   the cue. It runs once on load: the cover is always the first thing in view,
   so it needs no observer. Without JS nothing is hidden in the first place. */
.js .cover-main .title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.32em);
  animation: cover-word 900ms var(--ease-out) forwards;
  will-change: opacity, transform;
}
.js .cover-main .title .w:nth-child(2) { animation-delay: 150ms; }
.js .cover-main .title .w:nth-child(3) { animation-delay: 300ms; }
.js .cover-main .subtitle  { opacity: 0; animation: cover-fade 950ms var(--ease-out) 700ms forwards; }
.js .cover-main .cover-cue { opacity: 0; animation: cover-fade 800ms var(--ease-out) 1050ms forwards; }
/* Once the cue has settled the arrow keeps nudging downwards, quietly */
.js .cover-cue svg { animation: cue-nudge 3.2s var(--ease-inout) 1950ms infinite; }

@keyframes cover-word { to { opacity: 1; transform: none; } }
@keyframes cover-fade { to { opacity: 1; } }
@keyframes cue-nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* The cover gradient breathes: it grows a little, lifts a little, and settles
   back where it started. `alternate` plays the same curve in reverse, so the
   return is as slow as the rise and the loop never snaps. It rests at scale
   1.01 rather than 1 so the lift can never expose an edge — the layer stays
   inset: 0, and the gradient keeps the composition it was designed with.
   Transform only: the five gradients rasterise once and the loop is composited. */
.js .slide--cover.grad-dark::before {
  animation: cover-float 20s var(--ease-inout) infinite alternate;
  will-change: transform;
}

@keyframes cover-float {
  from { transform: scale(1.01)  translate3d(0, 0, 0); }
  to   { transform: scale(1.055) translate3d(0, -0.8%, 0); }
}

@keyframes tip-in {
  from { opacity: 0; translate: 0 -6px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes tip-beat {
  0%, 100% { scale: 1; }
  20%      { scale: 1.03; }
}
@keyframes pin-beat {
  0%, 100% { transform: scale(1); }
  20%      { transform: scale(1.15); }
}
@keyframes pin-halo {
  0%   { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.6); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map-pin-dot, .map-pin-halo { animation: none; }   /* the dots stay, still */
  .nav-tip { animation: none; transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .cover-main .title .w, .js .cover-main .subtitle, .js .cover-main .cover-cue, .js .cover-cue svg { opacity: 1; transform: none; animation: none; }
  .js .slide--cover.grad-dark::before { animation: none; transform: none; }
  .dots i, .bar .seg { transition: none; transform: none; }
  .bar .seg { transform: scaleX(1); }
  .topnav, .toc-card, .nav-btn, .theme-toggle, a, .btn { transition: none; }
}

@media print {
  .topnav, .index-dialog, .cover-cue, .chapter-nav, .skip-link, .nav-tip { display: none !important; }
  .slide { min-height: 0; break-after: page; padding: 24px 0; }
  .slide--cover, .grad-dark { background: #fff !important; color: #000; }
  .grad-dark::before, .grad-light::before { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  .js .cover-main .title .w, .js .cover-main .subtitle { opacity: 1; transform: none; animation: none; }
  a { color: inherit; text-decoration: none; }
}
