/* ════════════════════════════════════════════════════════════════
   CITIES ANALYSIS — URBAN RESEARCH · Design System v3
   "Working papers": warm white, ink, one lab blue. Every visual is
   a numbered figure. Inter + IBM Plex Mono. Clarity over spectacle.
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;650&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

/* ── Tokens ────────────────────────────────────────────────────── */
:root {
  /* black, like Senseable City Lab — near-black ground, bone type */
  --paper:    #08080A;   /* page ground */
  --paper-2:  #131316;   /* raised / hover */
  --surface:  #0F0F12;   /* card surface (was white) */
  --ink:      #F3F1EA;   /* primary text */
  --ink-2:    #A8A69E;   /* secondary text */
  --ink-3:    #6A6963;   /* tertiary / faint */

  /* hairlines — translucent light on black */
  --line:     rgba(243, 241, 234, 0.12);
  --line-2:   rgba(243, 241, 234, 0.20);
  --line-soft:rgba(243, 241, 234, 0.06);

  /* lab blue — luminous on black */
  --blue:     #6E8BFF;
  --blue-soft:rgba(110, 139, 255, 0.16);

  /* study accents — luminous on black */
  --acc-green:  #3FE08C;
  --acc-heat:   #FF6A45;
  --acc-solar:  #F5B23C;
  --acc-cool:   #54C7EC;
  --acc-equity: #C75FE0;
  --acc-syria:  #C2453B;
  --acc-energy: #E0A43B;
  --acc-pulse:  #6FD3FF;
  --acc-traffic: #FF7A45;
  --acc-solar: #F2C14E;
  --acc-connect: #35B9A6;
  --acc-iso: #B98A5A;
  --acc-gulf: #EA7A5A;
  --accent:    var(--blue);

  /* legacy aliases (resolve inline styles in study pages) */
  --bone:      var(--ink);
  --muted:     var(--ink-2);
  --faint:     var(--ink-3);
  --brass:     var(--blue);
  --brass-hi:  var(--blue);
  --line-ink:  var(--line);
  --ink-text:  var(--ink);
  --ink-muted: var(--ink-2);
  --ink-faint: var(--ink-3);

  /* type */
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
  --serif: var(--sans);

  /* layout */
  --gutter: clamp(20px, 4.5vw, 84px);
  --nav-h: 60px;
  --measure: 640px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

::selection { background: var(--blue); color: #fff; }

/* ── Base ──────────────────────────────────────────────────────── */
body {
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 450;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' 1, 'cv11' 1;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }

.skip-link {
  position: fixed;
  top: -48px; left: 16px;
  z-index: 4000;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ── Type helpers ──────────────────────────────────────────────── */
.t-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.t-label--dim { color: var(--ink-3); }

.display {
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.0;
}

.rule { height: 1px; background: var(--line); border: none; }

.crosshair {
  position: relative;
  width: 11px; height: 11px;
  flex: none;
  color: var(--blue);
}
.crosshair::before, .crosshair::after {
  content: '';
  position: absolute;
  background: currentColor;
}
.crosshair::before { left: 5px; top: 0; width: 1px; height: 11px; }
.crosshair::after { top: 5px; left: 0; width: 11px; height: 1px; }

/* ── Header ────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1500;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-logo small {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--line-2);
}
.nav-right { display: flex; align-items: center; gap: 26px; }
.nav-link {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--blue); border-color: var(--blue); }

/* mobile menu */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.menu-toggle .burger { width: 22px; height: 9px; position: relative; }
.menu-toggle .burger::before, .menu-toggle .burger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.menu-toggle .burger::before { top: 0; }
.menu-toggle .burger::after { top: 8px; }
body.menu-open .menu-toggle .burger::before { top: 4px; transform: rotate(45deg); }
body.menu-open .menu-toggle .burger::after { top: 4px; transform: rotate(-45deg); }

.menu {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  z-index: 1400;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 28px;
  transform: translateY(-105%);
  visibility: hidden;
  transition: transform 0.45s var(--ease), visibility 0s 0.45s;
}
body.menu-open .menu {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.45s var(--ease), visibility 0s;
}
.menu-item { border-bottom: 1px solid var(--line-soft); }
.menu-item:last-child { border-bottom: none; }
.menu-item a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  font-size: 19px;
  font-weight: 550;
  letter-spacing: -0.015em;
  transition: color 0.2s;
}
.menu-item a:hover { color: var(--blue); }
.menu-item .idx {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-3);
}
.menu-item .where {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.menu-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Motion: reveals ───────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="line"] { transform: scaleX(0); transform-origin: left; }
[data-reveal="line"].is-in { transform: scaleX(1); }

[data-stagger] > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
[data-stagger].is-in > * { opacity: 1; transform: none; }
[data-stagger].is-in > *:nth-child(1) { transition-delay: 0.03s; }
[data-stagger].is-in > *:nth-child(2) { transition-delay: 0.09s; }
[data-stagger].is-in > *:nth-child(3) { transition-delay: 0.15s; }
[data-stagger].is-in > *:nth-child(4) { transition-delay: 0.21s; }
[data-stagger].is-in > *:nth-child(5) { transition-delay: 0.27s; }
[data-stagger].is-in > *:nth-child(6) { transition-delay: 0.33s; }
[data-stagger].is-in > *:nth-child(7) { transition-delay: 0.39s; }
[data-stagger].is-in > *:nth-child(8) { transition-delay: 0.45s; }

/* legacy line-mask markup → simple fade */
.line-mask { display: block; }
.line-mask > span {
  display: block;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.is-ready .line-mask > span { opacity: 1; transform: none; }
.line-mask:nth-child(2) > span { transition-delay: 0.07s; }
.line-mask:nth-child(3) > span { transition-delay: 0.14s; }

.page-fade {
  position: fixed;
  inset: 0;
  z-index: 2800;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
body.is-leaving .page-fade { opacity: 1; pointer-events: all; }

/* ── Figure system ─────────────────────────────────────────────── */
.fig {
  position: relative;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.fig-tick {
  position: absolute;
  width: 9px; height: 9px;
  color: var(--ink-3);
  pointer-events: none;
}
.fig-tick::before, .fig-tick::after {
  content: '';
  position: absolute;
  background: currentColor;
}
.fig-tick::before { left: 4px; top: 0; width: 1px; height: 9px; }
.fig-tick::after { top: 4px; left: 0; width: 9px; height: 1px; }
.fig-tick.tl { top: -5px; left: -5px; }
.fig-tick.tr { top: -5px; right: -5px; }
.fig-tick.bl { bottom: -5px; left: -5px; }
.fig-tick.br { bottom: -5px; right: -5px; }

.fig-cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 10px 2px 0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  color: var(--ink-2);
}
.fig-cap b { font-weight: 500; color: var(--ink); }
.fig-cap .src { color: var(--ink-3); text-align: right; flex: none; max-width: 38%; }

/* ── Buttons & text links ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn .arr { transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateY(2px); }

.tlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}
.tlink .arr { transition: transform 0.25s var(--ease); }
.tlink:hover .arr { transform: translateX(4px); }

/* ── Sections ──────────────────────────────────────────────────── */
.sect { padding: clamp(72px, 11vh, 130px) var(--gutter); position: relative; }
.sect--paper { background: var(--paper); }   /* legacy alias — flat now */
.sect--tint { background: var(--paper-2); }

.sect-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.sect-head h2 {
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin-top: 14px;
}
.sect-head h2 em { font-style: normal; color: var(--ink-3); }
.sect-head .side-note {
  max-width: 320px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
  padding-bottom: 6px;
}

/* numbered section head (plate-head keeps study pages working) */
.plate-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.plate-head .plate-no {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  flex: none;
}
.plate-head .rule { flex: 1; align-self: center; background: var(--line) !important; }
.plate-head .plate-city {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3) !important;
}

/* ════════════════════════════════════════════════════════════════
   HOMEPAGE
   ════════════════════════════════════════════════════════════════ */

/* full-screen contour hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) var(--gutter) clamp(30px, 5vh, 58px);
  overflow: hidden;
  isolation: isolate;
}
.hero-contours {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(80% 60% at 70% 30%, #0a0c12 0%, #050507 70%);
}
.hero-contours canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(130% 80% at 14% 92%, rgba(5,5,7,0.82), transparent 58%),
    linear-gradient(to top, rgba(5,5,7,0.94) 0%, rgba(5,5,7,0.4) 38%, rgba(5,5,7,0.08) 68%, rgba(5,5,7,0.45) 100%);
  pointer-events: none;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(18px, 3vh, 30px);
}
.hero h1 {
  font-size: clamp(50px, 9.2vw, 158px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.92;
  max-width: 14ch;
}
.hero h1 .it { color: var(--ink-3); }
.hero-sub {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px;
  align-items: end;
  margin-top: clamp(24px, 4vh, 44px);
}
.hero-sub p {
  max-width: var(--measure);
  font-size: clamp(15px, 1.2vw, 17.5px);
  line-height: 1.7;
  color: var(--ink-2);
}
.hero-sub p strong { color: var(--ink); font-weight: 550; }
.hero-readout {
  justify-self: end;
  text-align: right;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 2.2;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-readout b { color: var(--ink-2); font-weight: 500; }

/* instrument strip */
.readout-strip {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 var(--gutter);
}
.readout-strip > div {
  flex: 1 1 auto;
  padding: 12px 18px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.readout-strip > div:last-child { border-right: none; }
.readout-strip b { color: var(--ink-2); font-weight: 500; }

/* scroll cue */
.hero-cue {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(14px, 2vh, 22px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-cue .tick {
  width: 1px; height: 26px;
  background: var(--line-2);
  position: relative;
  overflow: hidden;
}
.hero-cue .tick::after {
  content: '';
  position: absolute;
  left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--ink);
  animation: cueDrop 2s var(--ease) 6;
}
@keyframes cueDrop { 0% { top: -100%; } 55%, 100% { top: 100%; } }

/* ── Research table ────────────────────────────────────────────── */
.index-rows { border-top: 1px solid var(--line); }
.index-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.45fr) minmax(0, 1fr) 150px 44px;
  align-items: center;
  gap: clamp(14px, 2.2vw, 36px);
  padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s;
}
.index-row:hover { background: var(--paper-2); }
.index-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  padding-left: 2px;
}
.index-title {
  font-size: clamp(20px, 2.5vw, 33px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  transition: color 0.2s;
}
.index-row:hover .index-title { color: var(--blue); }
.index-title .thin { font-weight: 450; color: var(--ink-3); }
.index-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 380px;
}
.index-meta {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.95;
  color: var(--ink-3);
  text-align: right;
}
.index-meta b {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--ink);
  font-weight: 500;
}
.index-meta b i {
  width: 8px; height: 8px;
  background: var(--row-acc, var(--blue));
  flex: none;
}
.index-arrow {
  justify-self: end;
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: var(--surface);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}
.index-row:hover .index-arrow {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: translateX(3px);
}

/* ── Numbers band ──────────────────────────────────────────────── */
.numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: var(--surface);
}
.numbers > div {
  padding: clamp(26px, 3.6vw, 46px) clamp(18px, 2.6vw, 38px);
  border-right: 1px solid var(--line);
}
.numbers > div:last-child { border-right: none; }
.num-big {
  font-size: clamp(30px, 3.8vw, 54px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.num-big sup {
  font-family: var(--mono);
  font-size: 0.32em;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.04em;
  margin-left: 4px;
}
.num-label {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.9;
}

/* ── Method / approach ─────────────────────────────────────────── */
.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5.5vw, 96px);
  align-items: start;
}
.approach-lede {
  font-size: clamp(20px, 2.1vw, 29px);
  font-weight: 550;
  letter-spacing: -0.025em;
  line-height: 1.3;
  max-width: 22ch;
}
.approach-lede em { font-style: normal; color: var(--ink-3); }
.approach-body p {
  color: var(--ink-2);
  margin-bottom: 16px;
  font-size: 15.5px;
  line-height: 1.75;
  max-width: var(--measure);
}
.approach-body strong { color: var(--ink); font-weight: 550; }

.method-steps { border-top: 1px solid var(--line); margin-top: 28px; }
.method-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.method-step .no {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--blue);
  padding-top: 3px;
}
.method-step h4 {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 5px;
}
.method-step p { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; max-width: 560px; }
.method-step .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.method-step .tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
}

/* ── Sources grid ──────────────────────────────────────────────── */
.sources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.source-cell { background: var(--surface); padding: 24px 22px; transition: background 0.2s; }
.source-cell:hover { background: var(--paper-2); }
.source-cell .s-name {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.source-cell .s-name span {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.source-cell p { font-size: 12.5px; color: var(--ink-2); line-height: 1.65; }

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(48px, 7vh, 84px) var(--gutter) 28px;
  background: var(--paper);
}
.footer-big {
  font-size: clamp(26px, 3.6vw, 52px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: clamp(36px, 6vh, 64px);
  max-width: 18ch;
}
.footer-big em { font-style: normal; color: var(--ink-3); }
.footer-big a { color: var(--blue); transition: opacity 0.2s; }
.footer-big a:hover { opacity: 0.75; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.footer-col h5 {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 13px;
}
.footer-col a, .footer-col span {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  padding: 3px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--blue); }
.footer-coords {
  margin-top: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer-coords a { border-bottom: 1px solid var(--line-2); padding-bottom: 1px; transition: color 0.2s, border-color 0.2s; }
.footer-coords a:hover { color: var(--blue); border-color: var(--blue); }

/* ── Homepage project wall (Senseable-style tiles) ─────────────── */
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 1.4vw, 18px);
}
.proj-tile {
  --t-acc: var(--blue);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(300px, 42vh, 460px);
  padding: clamp(22px, 2.4vw, 34px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  background: #060608;
}
.proj-tile:first-child, .proj-tile.is-wide { grid-column: 1 / -1; min-height: clamp(360px, 56vh, 600px); }
.proj-tile .wall {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.proj-tile .wall canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.proj-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(6,6,8,0.92) 0%, rgba(6,6,8,0.45) 40%, rgba(6,6,8,0.1) 75%, rgba(6,6,8,0.3) 100%);
  transition: opacity 0.5s var(--ease);
}
.proj-tile:hover::before { opacity: 0.82; }
.proj-tile .wall canvas { transition: transform 0.9s var(--ease); }
.proj-tile:hover .wall canvas { transform: scale(1.05); }
.proj-tile .pt-top {
  position: absolute;
  top: clamp(20px, 2.4vw, 32px); left: clamp(22px, 2.4vw, 34px); right: clamp(22px, 2.4vw, 34px);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.proj-tile .pt-num { color: var(--t-acc); }
.proj-tile .pt-where { display: flex; align-items: center; gap: 8px; }
.proj-tile .pt-where i { width: 7px; height: 7px; background: var(--t-acc); flex: none; }
.proj-tile h3 {
  font-size: clamp(26px, 3.4vw, 50px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 12px;
}
.proj-tile h3 .thin { font-weight: 450; color: var(--ink-2); }
.proj-tile p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 44ch;
  margin-bottom: 18px;
}
.proj-tile .pt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.proj-tile .pt-stat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.proj-tile .pt-stat span { color: var(--ink-3); }
.proj-tile .pt-go {
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  color: var(--ink);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.4s var(--ease);
  flex: none;
}
.proj-tile:hover .pt-go {
  background: var(--t-acc);
  border-color: var(--t-acc);
  color: #060608;
  transform: translateX(3px);
}
@media (max-width: 760px) {
  .proj-grid { grid-template-columns: 1fr; }
  .proj-tile, .proj-tile:first-child, .proj-tile.is-wide { grid-column: auto; min-height: clamp(300px, 50vh, 440px); }
}

/* ════════════════════════════════════════════════════════════════
   STUDY PAGES
   ════════════════════════════════════════════════════════════════ */

.study { --accent: var(--blue); }
.study--green  { --accent: var(--acc-green); }
.study--heat   { --accent: var(--acc-heat); }
.study--solar  { --accent: var(--acc-solar); }
.study--cool   { --accent: var(--acc-cool); }
.study--equity { --accent: var(--acc-equity); }
.study--syria  { --accent: var(--acc-syria); }
.study--energy { --accent: var(--acc-energy); }
.study--pulse  { --accent: var(--acc-pulse); }
.study--traffic { --accent: var(--acc-traffic); }
.study--solar-eu { --accent: var(--acc-solar); }
.study--connect { --accent: var(--acc-connect); }
.study--iso { --accent: var(--acc-iso); }
.study--gulf { --accent: var(--acc-gulf); }

/* ── Cover — full-bleed wallpaper hero ─────────────────────────── */
.cover {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) var(--gutter) clamp(36px, 6vh, 72px);
  overflow: hidden;
  isolation: isolate;
}
.cover-field, .cover-graticule, .cover-art { display: none; }
/* the wallpaper canvas/svg sits behind everything */
.cover-wall {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #060608;
}
.cover-wall canvas, .cover-wall svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* legibility scrim: darken bottom + left where the text sits */
.cover::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(6,6,8,0.96) 0%, rgba(6,6,8,0.7) 28%, rgba(6,6,8,0.15) 62%, rgba(6,6,8,0.45) 100%),
    linear-gradient(to right, rgba(6,6,8,0.7) 0%, rgba(6,6,8,0.1) 55%, transparent 100%);
  pointer-events: none;
}
.cover-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(18px, 3vh, 30px);
}
.cover-kicker .rule { width: 34px !important; background: var(--accent) !important; }
.cover-kicker .t-label { color: var(--ink-2); }
.cover h1 {
  font-size: clamp(38px, 6.2vw, 92px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.99;
  max-width: 14ch;
}
.cover h1 em { font-style: normal; color: var(--ink-3); }
.cover-standfirst {
  margin-top: clamp(22px, 3.5vh, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px;
  align-items: end;
}
.cover-standfirst p {
  max-width: var(--measure);
  font-size: clamp(15px, 1.2vw, 17.5px);
  line-height: 1.7;
  color: var(--ink-2);
}
.cover-standfirst p strong { color: var(--ink); font-weight: 550; }
.cover-hero-stat { justify-self: end; text-align: right; }
.cover-hero-stat .v {
  font-size: clamp(44px, 5.4vw, 84px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cover-hero-stat .v small {
  font-family: var(--mono);
  font-size: 0.3em;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-left: 4px;
}
.cover-hero-stat .k {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.9;
}
.cover-meta {
  margin-top: clamp(28px, 4.5vh, 48px);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 18px;
  align-items: center;
}
.cover-meta .cm {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.9;
}
.cover-meta .cm b { display: block; color: var(--ink); font-weight: 500; }

/* centred cover — headline and intro in the middle */
.cover-body { text-align: center; }
.cover-kicker { justify-content: center; }
.cover h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.cover-standfirst { grid-template-columns: 1fr; justify-items: center; }
.cover-standfirst p { margin-left: auto; margin-right: auto; }
.cover-hero-stat { justify-self: center; text-align: center; }
.cover-meta { text-align: left; }

/* ── Chapter rail ──────────────────────────────────────────────── */
.chapters {
  position: fixed;
  left: clamp(8px, 1.4vw, 24px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.chapters.is-on { opacity: 1; pointer-events: auto; }
.chapter-link { display: flex; align-items: center; gap: 9px; padding: 4px 0; }
.chapter-link i {
  width: 14px; height: 1px;
  background: var(--line-2);
  transition: width 0.25s var(--ease), background 0.25s;
}
.chapter-link span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.25s var(--ease), color 0.2s;
}
.chapters:hover .chapter-link span { opacity: 1; transform: none; }
.chapter-link.is-active i { width: 26px; background: var(--blue); }
.chapter-link.is-active span { color: var(--blue); opacity: 1; transform: none; }

/* ── Prose ─────────────────────────────────────────────────────── */
.prose-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 3.2vw, 40px);
  align-items: start;
  justify-items: center;
}
.prose-sticky { position: static; }
.prose-q {
  font-size: clamp(24px, 2.8vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 26ch;
  text-align: center;
  margin: 0 auto;
}
.prose-q em { font-style: normal; color: var(--accent); }
.prose-body p {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 18px;
  max-width: var(--measure);
}
.prose-body p strong { color: var(--ink); font-weight: 550; }
.prose-body a { color: var(--blue); border-bottom: 1px solid color-mix(in srgb, var(--blue) 35%, transparent); }
.prose-body a:hover { border-color: var(--blue); }
.footnote {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.9;
  color: var(--ink-3);
  max-width: var(--measure);
}

/* key-result callout */
/* staggered conclusion, after Senseable's Solar Cities */
.concl { padding: clamp(70px, 10vw, 130px) clamp(24px, 7vw, 110px); background: #f0f0ef; }
.concl p { max-width: 520px; font-size: clamp(19px, 2.1vw, 26px); line-height: 1.55; color: #2e3138; margin: 0; }
.concl p b { color: #191b1f; font-weight: 600; }
.concl .tick {
  display: block; width: 30px; height: 8px; background: var(--accent); border-radius: 2px;
  transform: rotate(-45deg); margin: clamp(48px, 7vw, 92px) auto;
}
.concl .right { margin-left: auto; }

.pull-stat {
  margin: 0 var(--gutter);
  padding: clamp(44px, 7vh, 76px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
  text-align: left;
}
.pull-stat .v {
  font-size: clamp(64px, 11vw, 168px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.pull-stat .v em { font-style: normal; color: var(--accent); }
.pull-stat .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 2;
  max-width: 380px;
}

/* ── Charts ────────────────────────────────────────────────────── */
.chart {
  border: 1px solid var(--line-2);
  background: var(--surface);
  padding: clamp(20px, 2.6vw, 32px);
  position: relative;
}
.chart-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
}
.chart-title h4 { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.chart-title span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: right;
  line-height: 1.7;
}
.bar-row {
  display: grid;
  grid-template-columns: 118px 1fr 58px;
  align-items: center;
  gap: 14px;
  padding: 7px 0;
}
.bar-row .b-name {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-row.is-hi .b-name { color: var(--ink); font-weight: 500; }
.bar-row .b-track { height: 16px; position: relative; background: var(--paper-2); }
.bar-row .b-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  background: var(--bar-c, var(--accent));
  opacity: 0.85;
  width: calc(var(--w) * 1%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.bar-row.is-hi .b-fill { opacity: 1; }
.is-in .bar-row .b-fill, .bar-row.is-in .b-fill { transform: scaleX(1); }
.bar-row .b-val {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bar-row.is-hi .b-val { color: var(--ink); font-weight: 500; }
.chart-note {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  line-height: 1.8;
  color: var(--ink-3);
}
.chart svg text { font-family: var(--mono); }

/* rank table */
.rank-shift { border-top: 1px solid var(--line); }
.rank-shift .rs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 84px 104px;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
}
.rank-shift .rs-head {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.rs-row .name { font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--ink); }
.rs-row .r { color: var(--ink-2); text-align: center; }
.rs-row .delta { text-align: right; font-weight: 500; }
.rs-row .delta.down { color: var(--acc-heat); }
.rs-row .delta.up { color: var(--acc-green); }
.rs-row .delta.flat { color: var(--ink-3); }

/* metric cells */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.metric-cell { background: var(--surface); padding: clamp(20px, 2.6vw, 34px) clamp(16px, 2vw, 28px); }
.metric-cell .m-v {
  font-size: clamp(26px, 3.2vw, 46px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.metric-cell .m-v sup {
  font-family: var(--mono);
  font-size: 0.32em;
  font-weight: 500;
  color: var(--accent);
  margin-left: 3px;
}
.metric-cell .m-k {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.9;
}

/* ── Map stage ─────────────────────────────────────────────────── */
.map-stage {
  position: relative;
  height: min(86svh, 820px);
  min-height: 520px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.map-stage .leaflet-container {
  position: absolute;
  inset: 0;
  background: var(--paper-2);
  font-family: var(--mono);
}
.map-frame-label {
  position: absolute;
  top: 16px; left: 20px;
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(10,10,13,0.82);
  border: 1px solid var(--line-2);
  padding: 8px 12px;
  pointer-events: none;
}
.map-frame-label i { width: 18px; height: 1px; background: var(--accent); }
.map-panel {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 700;
  width: 216px;
  background: rgba(10,10,13,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  padding: 14px 16px 12px;
}
.map-panel h5 {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.layer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}
.layer-toggle:last-of-type { border-bottom: none; }
.layer-toggle .sw {
  width: 12px; height: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  position: relative;
  flex: none;
  transition: background 0.15s, border-color 0.15s;
}
.layer-toggle .sw::after { content: none; }
.layer-toggle[aria-pressed="true"] .sw {
  background: var(--lay-c, var(--blue));
  border-color: var(--lay-c, var(--blue));
}
.layer-toggle .ln { font-size: 12px; font-weight: 500; color: var(--ink); flex: 1; }
.layer-toggle .ld {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.map-legend {
  position: absolute;
  bottom: 20px; left: 20px;
  z-index: 700;
  background: rgba(10,10,13,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  padding: 13px 15px 11px;
  min-width: 180px;
}
.map-legend h5 {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 9px;
}
.legend-gradient { height: 7px; margin-bottom: 6px; }
.legend-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-2);
}
.legend-rows { display: grid; gap: 5px; }
.legend-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-2);
}
.legend-row i { width: 16px; height: 8px; flex: none; }
.map-hint {
  position: absolute;
  bottom: 20px; right: 16px;
  z-index: 700;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: rgba(8,8,10,0.78);
  border: 1px solid var(--line-soft);
  padding: 6px 10px;
  pointer-events: none;
}
.leaflet-control-attribution {
  background: rgba(8,8,10,0.7) !important;
  color: var(--ink-3) !important;
  font-family: var(--mono) !important;
  font-size: 8px !important;
}
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-control-zoom { border: none !important; box-shadow: none !important; margin: 0 16px 56px 0 !important; }
.leaflet-control-zoom a {
  width: 32px !important;
  height: 32px !important;
  line-height: 30px !important;
  background: rgba(12,12,15,0.9) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-2) !important;
  font-size: 15px !important;
  font-family: var(--mono) !important;
  border-radius: 0 !important;
}
.leaflet-control-zoom a:hover { background: var(--accent) !important; color: var(--paper) !important; }
.leaflet-tooltip.atlas-tip {
  background: rgba(10,10,13,0.95);
  border: 1px solid var(--line-2);
  border-radius: 0;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 7px 11px;
}
.leaflet-tooltip.atlas-tip::before { display: none; }
.atlas-tip b { color: var(--accent); font-weight: 500; }
.atlas-tip .tt-name {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

/* spots grid (comfort) */
.spots-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.spot-cell {
  background: var(--surface);
  padding: 15px 14px;
  text-align: left;
  transition: background 0.2s;
}
.spot-cell:hover { background: var(--blue-soft); }
.spot-cell .sp-no {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 7px;
  font-weight: 500;
}
.spot-cell .sp-coord {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink);
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.spot-cell .sp-type {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sun-dial { display: grid; place-items: start; padding: 18px 0 0; }

/* ── Data appendix ─────────────────────────────────────────────── */
.dl-list { border-top: 1px solid var(--line); }
.dl-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1.3fr) 110px;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.dl-row:hover { background: var(--paper-2); }
.dl-row .dl-ic { color: var(--blue); font-family: var(--mono); font-size: 11px; }
.dl-row .dl-name { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.dl-row:hover .dl-name { color: var(--blue); }
.dl-row .dl-desc { font-size: 12.5px; color: var(--ink-2); }
.dl-row .dl-kind {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: right;
}
.citation {
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--blue);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 2;
  color: var(--ink-2);
  max-width: 860px;
}
.citation b { color: var(--ink); font-weight: 500; }

/* next study */
.next-study {
  display: block;
  margin: 0 var(--gutter);
  padding: clamp(44px, 7vh, 80px) 0;
  border-top: 1px solid var(--line);
}
.next-study .ns-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.next-study .ns-label i { width: 30px; height: 1px; background: var(--next-acc, var(--blue)); }
.next-study .ns-title {
  font-size: clamp(30px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  transition: color 0.25s;
}
.next-study:hover .ns-title { color: var(--blue); }
.next-study .ns-title em { font-style: normal; color: var(--ink-3); transition: color 0.25s; }
.next-study:hover .ns-title em { color: var(--blue); }
.next-study .ns-arrow { width: 40px; height: 40px; flex: none; transition: transform 0.3s var(--ease); }
.next-study:hover .ns-arrow { transform: translateX(10px); }
.next-study .ns-city {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Dark plates — green-bias cartography ──────────────────────── */
.plate-fig { margin: clamp(36px, 6vh, 64px) var(--gutter) 0; }
.fig--dark {
  background: #060807;
  border-color: #1A1D1B;
}
.fig--dark canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.plate-fig .fig { position: relative; height: clamp(380px, 62vh, 680px); overflow: hidden; }
.fig-inlabel {
  position: absolute;
  top: 12px; left: 14px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(235, 245, 238, 0.78);
  background: rgba(6, 8, 7, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 9px;
  pointer-events: none;
}
.fig-inlegend {
  position: absolute;
  bottom: 12px; left: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(235, 245, 238, 0.6);
  background: rgba(6, 8, 7, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 10px;
  pointer-events: none;
}
.fig-inlegend .grad { width: 72px; height: 6px; }

/* satellite vs street dual plate */
.fig-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #1A1D1B;
  border: 1px solid #1A1D1B;
  position: relative;
}
.fig-duo .duo-cell {
  position: relative;
  background: #060807;
  height: clamp(300px, 46vh, 540px);
  overflow: hidden;
}
.fig-duo canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
@media (max-width: 700px) {
  .fig-duo { grid-template-columns: 1fr; }
}

/* dark interactive map stage */
.map-stage--dark, .map-stage--dark .leaflet-container { background: #0B0E0C; }
.map-stage--dark { border-color: #1A1D1B; }
.map-stage--dark .map-frame-label,
.map-stage--dark .map-panel,
.map-stage--dark .map-legend,
.map-stage--dark .map-hint {
  background: rgba(8, 11, 9, 0.85);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(235, 245, 238, 0.85);
}
.map-stage--dark .map-panel h5,
.map-stage--dark .map-legend h5,
.map-stage--dark .layer-toggle .ld,
.map-stage--dark .map-hint { color: rgba(235, 245, 238, 0.45); }
.map-stage--dark .layer-toggle { border-color: rgba(255, 255, 255, 0.08); }
.map-stage--dark .layer-toggle .ln { color: rgba(240, 248, 242, 0.92); }
.map-stage--dark .layer-toggle .sw { background: transparent; border-color: rgba(255, 255, 255, 0.25); }
.map-stage--dark .layer-toggle[aria-pressed="true"] .sw {
  background: var(--lay-c, #00D26E);
  border-color: var(--lay-c, #00D26E);
}
.map-stage--dark .legend-ends { color: rgba(235, 245, 238, 0.6); }
.map-stage--dark .leaflet-control-zoom a {
  background: rgba(8, 11, 9, 0.88) !important;
  color: rgba(240, 248, 242, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}
.map-stage--dark .leaflet-control-zoom a:hover {
  background: #00D26E !important;
  color: #060807 !important;
}
.map-stage--dark .leaflet-control-attribution {
  background: rgba(8, 11, 9, 0.7) !important;
  color: rgba(235, 245, 238, 0.4) !important;
}
.map-stage--dark .leaflet-control-attribution a { color: rgba(235, 245, 238, 0.6) !important; }
.map-stage--dark .leaflet-tooltip.atlas-tip {
  background: rgba(8, 11, 9, 0.94);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(240, 248, 242, 0.92);
  box-shadow: none;
}
.map-stage--dark .atlas-tip b { color: #4FE99B; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .chapters { display: none; }
}
@media (max-width: 900px) {
  .nav-link { display: none; }
  .menu-toggle { display: flex; }
  .hero-sub, .cover-standfirst { grid-template-columns: 1fr; gap: 22px; }
  .hero-readout, .cover-hero-stat { justify-self: start; text-align: left; }
  .index-row { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .index-desc, .index-meta { display: none; }
  .index-arrow { width: 32px; height: 32px; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .numbers > div:nth-child(2n) { border-right: none; }
  .numbers > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .approach-grid, .prose-grid { grid-template-columns: 1fr; gap: 32px; }
  .prose-sticky { position: static; }
  .sources { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .cover-meta { grid-template-columns: 1fr 1fr; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .spots-grid { grid-template-columns: 1fr 1fr 1fr; }
  .dl-row { grid-template-columns: 20px 1fr 88px; }
  .dl-row .dl-desc { display: none; }
  .map-panel { width: 196px; }
  .sect-head { flex-direction: column; align-items: flex-start; }
  .pull-stat { flex-direction: column; align-items: flex-start; gap: 14px; }
  .readout-strip > div { flex: 1 1 50%; border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 560px) {
  .sources { grid-template-columns: 1fr; }
  .spots-grid { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 84px 1fr 50px; gap: 10px; }
  .rank-shift .rs-row { grid-template-columns: minmax(0, 1fr) 52px 52px 64px; gap: 8px; }
  .map-legend { left: 10px; bottom: 10px; padding: 10px 12px 8px; min-width: 140px; }
  .map-panel { top: 10px; right: 10px; }
  .map-hint { display: none; }
  .nav-logo small { display: none; }
}

/* ── Reduced motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  [data-reveal], [data-stagger] > * { opacity: 1 !important; transform: none !important; }
  .line-mask > span { opacity: 1 !important; transform: none !important; }
  .bar-row .b-fill { transform: scaleX(1) !important; }
}
