/* ─────────────────────────────────────────────────────────────
   HOME
   ───────────────────────────────────────────────────────────── */
.hero{
  padding: clamp(28px, 5vw, 64px) 0 clamp(28px, 4vw, 52px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.hero-eyebrow{ display: flex; gap: 14px; align-items: center; }
.hero-headline{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 108px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.hero-headline em{
  font-style: italic;
  color: var(--ink-2);
}
.hero-headline .accent { color: var(--accent); font-style: italic; }
.hero-deck{
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.32;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
  margin: 8px 0 0;
}
.hero-deck em { font-style: italic; }

.kpi-strip{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: clamp(8px, 1.5vw, 18px) 0 clamp(6px, 1vw, 12px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.kpi{
  padding: 12px 24px 12px 0;
  border-right: 1px solid var(--rule-soft);
  position: relative;
}
.kpi:last-child { border-right: 0; padding-right: 0; }
.kpi:not(:first-child) { padding-left: 24px; }
.kpi-num{
  font-family: var(--serif);
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: block;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.kpi-num .unit { font-size: 0.55em; color: var(--ink-3); margin-left: 4px; font-style: italic; }
.kpi-label{
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-top: 12px;
  display: block;
}

.nav-section{
  padding-bottom: clamp(24px, 4vw, 48px);
}
.section-head{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 36px;
  padding-top: clamp(24px, 3.5vw, 48px);
}
.section-head h2{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}
.section-head h2 em { font-style: italic; color: var(--ink-2); }
.section-head .meta{ color: var(--ink-3); max-width: 44ch; text-wrap: pretty; }

.nav-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--ink);
}
.nav-card{
  position: relative;
  padding: 0;
  background: var(--paper);
  text-align: left;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background var(--t-med) var(--ease);
  margin-right: 1px;
  overflow: hidden;
}
.nav-card:last-child{ margin-right: 0; }
.nav-card:hover{ background: var(--paper-2); }
.nav-card:focus-visible{ outline: 2px solid var(--accent-ring); outline-offset: -2px; }

.nav-card .ribbon{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
}
.nav-card .ribbon .sect{ display:flex; align-items:center; gap:10px; }
.nav-card .ribbon .num{
  display: inline-grid; place-items: center;
  width: 18px; height: 18px;
  border: 1px solid var(--ink);
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: 0;
}
.nav-card .ribbon .pages{ color: var(--ink-3); letter-spacing: 0.18em; }

.nav-card .photo{
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  border-bottom: 1px solid var(--ink);
  background:
    /* paper grain dot pattern */
    radial-gradient(rgba(58,46,30,0.10) 0.6px, transparent 1px) 0 0 / 4px 4px,
    /* warm vignette */
    radial-gradient(ellipse at 50% 30%, #f5eedf 0%, #e8dec6 70%, #d8caa8 100%);
  overflow: hidden;
  isolation: isolate;
}
.nav-card .photo::before{
  /* fold/crease shading running diagonally */
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(0,0,0,0.0) 60%, rgba(60,40,20,0.10) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.0) 70%, rgba(60,40,20,0.18) 100%);
  pointer-events: none;
  z-index: 3;
}
.nav-card .photo::after{
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(30,22,12,0.55) 0.55px, transparent 1.1px);
  background-size: 2.5px 2.5px;
  mix-blend-mode: multiply;
  opacity: 0.45;
  pointer-events: none;
  z-index: 4;
}
.nav-card .photo svg{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  color: #2a1f12;
  z-index: 2;
  transition: transform var(--t-slow) var(--ease);
}
.nav-card:hover .photo svg{ transform: scale(1.02); }

/* ─────────────────────────────────────────────────────────────
   MAP
   ───────────────────────────────────────────────────────────── */
.tab-head{
  padding: clamp(24px, 4vw, 48px) 0 clamp(20px, 3vw, 36px);
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.6fr);
  gap: 32px;
  align-items: end;
  border-bottom: 1px solid var(--rule-soft);
}
.tab-head h1{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.5vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
.tab-head h1 em { font-style: italic; color: var(--ink-2); }
.tab-head .deck{
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.4;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 72ch;
  margin: 0;
  justify-self: start;
  text-align: left;
}

#insights-head{
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 18px;
  padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px);
  border-bottom: none;
  position: relative;
}
#insights-head::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: clamp(80px, 12vw, 140px);
  height: 1px;
  background: var(--ink-3);
  opacity: 0.45;
}
#insights-head .tab-head__eyebrow{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-block;
  padding-bottom: 2px;
}
#insights-head h1{
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -0.025em;
  max-width: 16ch;
  text-align: center;
}
#insights-head .deck{
  justify-self: center;
  text-align: center;
  max-width: 56ch;
}

.map-layout{
  display: block;
  padding: 24px 0 0;
}
.controls{
  position: static;
  top: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
  padding: 22px 28px;
  margin-bottom: 24px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.controls > .control{ width: 100%; gap: 8px; }
.controls > #filter-reset{ align-self: flex-start; }
.controls > div[style]{
  width: 100%;
  border-top: none !important;
  padding-top: 0 !important;
}
.map-stage{
  position: relative;
}
.control{
  display: grid;
  gap: 10px;
}
.control-label{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
}
.control-label .val { color: var(--ink); font-feature-settings: "tnum" 1; }

/* Custom select */
.select-wrap{ position: relative; }
.select-wrap::after{
  content: "";
  position: absolute;
  right: 14px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: border-color var(--t-fast) var(--ease);
}
select,
.select-trigger{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 14px 36px 14px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.select-trigger:hover{
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.select-wrap:has(.select-trigger:hover)::after,
.select-wrap:has(.select-trigger[aria-expanded="true"])::after{
  border-color: var(--paper);
}
.select-trigger:focus,
.select-trigger[aria-expanded="true"]{
  outline: none;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.select-wrap:focus-within::after { border-color: var(--paper); }

/* Custom dropdown menu — scrollable with capped height */
.select-menu{
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 50;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--ink-3);
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.select-menu li{
  padding: 8px 12px;
  cursor: pointer;
  color: var(--ink-2);
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.select-menu li:hover,
.select-menu li[aria-selected="true"]{
  background: var(--paper-2);
  color: var(--ink);
}
.select-menu li[aria-selected="true"]{ font-weight: 500; }
.select-menu .select-opt-name{ flex: 1 1 auto; min-width: 0; }
.select-menu .select-opt-num{
  flex: 0 0 auto;
  color: var(--ink-3);
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: 0;
}
.select-wrap{ position: relative; }

/* Custom slider */
.slider-wrap{
  display: grid;
  gap: 10px;
}
input[type="range"]{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  height: 24px;
  margin: 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track{
  height: 2px;
  background: var(--rule);
  border-radius: 2px;
}
input[type="range"]::-moz-range-track{
  height: 2px;
  background: var(--rule);
  border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb{
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -8px;
  border: 3px solid var(--paper-2);
  box-shadow: 0 0 0 1px var(--accent);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
input[type="range"]::-moz-range-thumb{
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper-2);
  box-shadow: 0 0 0 1px var(--accent);
  transition: transform var(--t-fast) var(--ease);
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 0 0 1px var(--accent), 0 0 0 6px var(--accent-soft); }
input[type="range"]:focus { outline: none; }

.tick-row{
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  margin-top: -2px;
  padding: 0 2px;
}

/* Play button + dual-range row */
.range-row{
  display: flex;
  align-items: center;
  gap: 22px;
}
.range-row .range-wrap{ flex: 1 1 auto; min-width: 0; }
.range-play{
  flex: 0 0 auto;
  appearance: none;
  width: 42px;
  height: 42px;
  border-radius: 0;
  border: 1px solid var(--ink-3);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.range-play:hover{
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}
.range-play:focus-visible{ outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.range-play.is-playing{
  border-color: var(--accent);
  color: var(--paper);
  background: var(--accent);
}
.range-play.is-playing:hover{ background: var(--accent); border-color: var(--accent); color: var(--paper); }
.range-play svg{ width: 16px; height: 16px; }
.range-play .pause-icon{ display: none; }
.range-play.is-playing .play-icon{ display: none; }
.range-play.is-playing .pause-icon{ display: block; }

/* Dual-thumb range slider (used for the year filter) */
.range-wrap{
  position: relative;
  display: grid;
  gap: 10px;
  padding-top: 4px;
}
.range-wrap .range-track{
  position: relative;
  height: 24px;
}
.range-wrap .range-track::before{
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--rule);
  border-radius: 2px;
}
.range-wrap .range-fill{
  position: absolute;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--accent);
  border-radius: 2px;
  pointer-events: none;
}
.range-wrap input[type="range"]{
  position: absolute;
  left: 0; right: 0; top: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  pointer-events: none;
}
.range-wrap input[type="range"]::-webkit-slider-runnable-track{ background: transparent; }
.range-wrap input[type="range"]::-moz-range-track{ background: transparent; }
.range-wrap input[type="range"]::-webkit-slider-thumb{ pointer-events: auto; }
.range-wrap input[type="range"]::-moz-range-thumb{ pointer-events: auto; }

/* Reset button */
.btn-ghost{
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 0;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.btn-ghost:hover{ border-color: var(--ink); color: var(--ink); background: var(--paper); }
.btn-ghost:focus-visible{ outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.btn-ghost .x{
  width: 14px; height: 14px; position: relative;
}
.btn-ghost .x::before, .btn-ghost .x::after{
  content:""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 1px; background: currentColor;
}
.btn-ghost .x::before { transform: translate(-50%, -50%) rotate(45deg); }
.btn-ghost .x::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* Legend */
.legend{
  display: grid;
  gap: 8px;
}
.legend-bar{
  height: 8px;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--accent) 8%, var(--paper)),
    color-mix(in oklab, var(--accent) 35%, var(--paper)),
    color-mix(in oklab, var(--accent) 65%, var(--paper)),
    var(--accent)
  );
}
.legend-scale{
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Map slot */
.map-stage{
  position: relative;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  height: 90vh;
  overflow: hidden;
}
.map-stage::before{
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  opacity: 0.55;
  pointer-events: none;
}
#viz-map{
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
#viz-map .placeholder{
  display: grid;
  gap: 10px;
  text-align: center;
  z-index: 1;
}
#viz-map .placeholder span{ display: block; }
#viz-map .placeholder .title{ font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-2); text-transform: none; letter-spacing: -0.01em; }

/* Map corner badges (purely aesthetic, no data) */
.map-corner{
  position: absolute;
  top: 16px; left: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  z-index: 2;
}
.map-corner .live-dot{ width: 6px; height: 6px; }
.map-filter-summary{
  position: absolute;
  top: 16px; right: 56px;
  z-index: 2;
  padding: 15px 21px;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  border: 1px solid var(--rule);
  backdrop-filter: blur(4px);
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink);
  display: grid;
  gap: 9px;
  min-width: 270px;
  max-width: 420px;
}
.filter-summary-row{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
}
.map-filter-summary[hidden],
.filter-summary-row[hidden]{ display: none; }
.filter-summary-row .v{ text-align: right; }
.filter-reset-btn{
  appearance: none;
  border: none;
  background: transparent;
  padding: 2px;
  margin: 0;
  color: var(--ink-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 0;
  line-height: 0;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.filter-reset-btn svg{ width: 20px; height: 20px; }
.filter-reset-btn:hover{
  color: var(--accent);
  transform: scale(1.1);
}
.filter-reset-btn:focus-visible{
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
.filter-summary-row .k{
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.filter-summary-row .v{
  font-feature-settings: "tnum" 1, "lnum" 1;
  color: var(--ink);
  text-align: right;
}
.map-meta{
  position: absolute;
  bottom: 16px; right: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  z-index: 2;
}

/* Tooltip */
#map-tooltip{
  position: absolute;
  display: none;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.4;
  min-width: 180px;
  box-shadow: 0 12px 32px -12px rgba(0,0,0,0.25);
  z-index: 5;
  border-radius: 2px;
  transition: opacity var(--t-fast) var(--ease);
}
#map-tooltip .tt-area{
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
  color: var(--paper);
}
#map-tooltip .tt-row{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.78 0.01 70);
}
#map-tooltip .tt-row .v { color: var(--paper); }

/* ─────────────────────────────────────────────────────────────
   TRENDS
   ───────────────────────────────────────────────────────────── */
.charts{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 32px 0 clamp(64px, 9vw, 120px);
}
.chart-card{
  background: var(--paper);
  padding: 32px 32px 28px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  transition: background var(--t-med) var(--ease);
}
.chart-card:hover { background: var(--paper-2); }
.chart-card-head{ display: grid; gap: 6px; }
.chart-num{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.chart-title{
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.chart-title em{ font-style: italic; color: var(--ink-2); }
.chart-sub{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chart-slot{
  position: relative;
  min-height: 280px;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
  margin: 8px 0;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, var(--rule-soft) 39px 40px);
  background-size: 100% 40px;
  background-position: 0 0;
}
.chart-slot .slot-label{
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-4);
  background: var(--paper);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.chart-card:hover .chart-slot .slot-label { color: var(--ink-2); border-color: var(--ink-3); transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.chart-legend{
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.chart-legend .lg{ display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .sw{ width: 10px; height: 2px; background: var(--accent); display: inline-block; }
.chart-legend .sw.muted{ background: var(--ink-4); }

/* ─────────────────────────────────────────────────────────────
   INSIGHTS
   ───────────────────────────────────────────────────────────── */
.insights{
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
  margin: 32px 0 clamp(64px, 9vw, 120px);
}
.insight{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: stretch;
  padding: clamp(40px, 6vw, 72px) 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.insight:nth-child(even) .insight-text { order: 2; }
.insight:nth-child(even) .insight-viz  { order: 1; }

.insight-text{ display: grid; align-content: start; gap: 20px; }
.insight-tag{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink);
}
.insight-tag .dot { background: var(--accent); }
.insight h3{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.insight h3 em { font-style: italic; color: var(--ink-2); }
.insight p{
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0;
  text-wrap: pretty;
}
.insight .meta-row{
  display: flex; align-items: center; gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.insight .meta-row .sep{ width: 1px; height: 12px; background: var(--rule); }

.cta{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding-bottom: 6px;
  width: fit-content;
}
.cta::after{
  content: "";
  position: absolute;
  left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--ink);
  transform-origin: left;
  transition: background var(--t-med) var(--ease);
}
.cta .arr{
  display: inline-block;
  transition: transform var(--t-med) var(--ease);
}
.cta:hover { color: var(--accent); }
.cta:hover::after { background: var(--accent); }
.cta:hover .arr { transform: translateX(6px); }
.cta:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 4px; }

/* Insight viz block */
.insight-viz{
  position: relative;
  padding: 32px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  display: grid;
  gap: 20px;
  align-content: start;
  min-height: 380px;
}
.insight-viz .viz-label{
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  display: flex; justify-content: space-between;
}
.metric-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.metric{
  background: var(--paper);
  padding: 22px 20px;
  display: grid;
  gap: 10px;
}
.metric-name{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.metric-val{
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum" 1;
  color: var(--ink);
}
.metric-val.up   { color: var(--accent); }
.metric-val.down { color: var(--ink-2); font-style: italic; }
.metric-bar{
  height: 4px; background: var(--rule); position: relative; overflow: hidden;
}
.metric-bar > span{
  position: absolute; top: 0; bottom: 0;
  background: var(--accent);
  transform-origin: left;
  animation: bar-grow 800ms var(--ease) both;
}
.metric-bar.neg > span{ background: var(--ink-2); right: 50%; transform-origin: right; }
.metric-bar.pos > span{ left: 50%; }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Election timeline placeholder */
.tl{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.tl-col{
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 16px 0 12px;
  border-top: 1px dashed var(--rule);
}
.tl-bar{
  height: 0;
  background: var(--accent);
  animation: bar-up 700ms var(--ease) both;
}
.tl-bar.muted{ background: var(--ink-4); opacity: 0.5; }
@keyframes bar-up { from { height: 0; } }
.tl-label{ font-family: var(--mono); font-size: 10px; color: var(--ink-3); text-align: center; letter-spacing: 0.06em; }

/* Events scatter */
.scatter{
  position: relative;
  height: 220px;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
  background:
    repeating-linear-gradient(0deg, transparent 0 43px, var(--rule-soft) 43px 44px);
}
.scatter .pt{
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 var(--accent-ring);
  animation: pulse 3s var(--ease) infinite;
}
.scatter .pt.muted{ background: var(--ink-4); animation: none; opacity: 0.5; }
.scatter .pt-label{
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  transform: translate(12px, -50%);
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────
   Newspaper masthead — "The Chicago Ledger"
   ───────────────────────────────────────────────────────────── */
:root{
  --blood-1: #9b1b1b;
  --blood-2: #6b0a0a;
  --blood-3: #3d0303;
  --blood-hl: #c63232;
  --chi-blue: #418fde;
}

.masthead{
  position: relative;
  z-index: 4;
  border-bottom: 2px solid var(--ink);
  background:
    /* corner stains — only the very top corners look aged/dirty */
    radial-gradient(ellipse 360px 180px at 0% 0%,   rgba(120, 78, 30, 0.12), transparent 65%),
    radial-gradient(ellipse 360px 180px at 100% 0%, rgba(120, 78, 30, 0.10), transparent 65%),
    radial-gradient(ellipse 200px 100px at 6% 8%,   rgba(80, 40, 10, 0.05),  transparent 70%),
    radial-gradient(ellipse 220px 110px at 94% 10%, rgba(80, 40, 10, 0.04),  transparent 70%),
    /* softer, lighter fade from the very top → off-white */
    linear-gradient(to bottom,
      color-mix(in oklab, var(--paper-warm) 60%, var(--paper)) 0%,
      color-mix(in oklab, var(--paper-warm) 35%, var(--paper)) 45%,
      var(--paper) 100%);
  isolation: isolate;
}
.masthead::before{
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(58, 38, 18, 0.18) 0.55px, transparent 1.1px),
    radial-gradient(rgba(58, 38, 18, 0.10) 0.4px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply;
  /* grain fades out toward the bottom so the join with the page is invisible */
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 25%, transparent 95%);
          mask-image: linear-gradient(to bottom, black 0%, black 25%, transparent 95%);
  opacity: 0.55;
  z-index: 0;
}
.masthead::after{
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='9'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.10  0 0 0 0 0.04  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.45'/></svg>");
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 100%);
  opacity: 0.30;
  z-index: 0;
}
.masthead > * { position: relative; z-index: 1; }
.masthead-rule-top{
  border-bottom: 1px solid var(--ink);
  padding: 8px var(--gutter);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.masthead-rule-top .left, .masthead-rule-top .right{ display: flex; gap: 18px; align-items: center; }
.masthead-rule-top .pipe{ width: 1px; height: 10px; background: var(--ink); opacity: 0.4; }
.masthead-rule-top .live-dot{ width: 6px; height: 6px; }

.masthead-main{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter) 14px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 28px;
}
.chi-flag{
  display: grid;
  gap: 0;
  width: 100%;
  max-width: 220px;
  border: 1px solid var(--ink);
}
.chi-flag-row{
  display: flex;
  align-items: center;
  height: 18px;
  background: var(--paper);
}
.chi-flag-row.blue{ background: var(--chi-blue); height: 6px; }
.chi-flag-row.stars{
  height: auto;
  padding: 6px 12px;
  justify-content: space-around;
  gap: 6px;
}
.chi-star{
  width: 18px; height: 18px;
  background: var(--blood-1);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.chi-flag.right{ justify-self: end; }

.masthead-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
}
.masthead-title em{ font-style: italic; color: var(--blood-2); }
.masthead-sub{
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.masthead-sub .ornament{ width: 24px; height: 1px; background: var(--ink); opacity: 0.5; }

.compass{
  width: 56px; height: 56px;
  position: relative;
  margin: 0 auto;
  color: var(--ink);
}
.compass svg{ width: 100%; height: 100%; }

/* Sticky tab strip beneath masthead — clean off-white, matches the page */
.tab-strip{
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.tab-strip-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tab-strip .tabs{ flex: 1; justify-content: flex-start; }
.tab-strip .ed{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 10px;
}
.tab-strip .ed .live-dot{ width:6px; height:6px; }


/* ─────────────────────────────────────────────────────────────
   INSIGHTS — card grid + in-page detail views
   ───────────────────────────────────────────────────────────── */
.insights-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 32px 0 clamp(64px, 9vw, 120px);
}
@media (max-width: 960px){
  .insights-grid{ grid-template-columns: 1fr; }
}

.insight-card{
  appearance: none;
  -webkit-appearance: none;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 28px 28px 24px;
  text-align: left;
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  gap: 16px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: background var(--t-med) var(--ease), border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.insight-card:hover{
  background: var(--paper);
  border-color: var(--ink-3);
  transform: translateY(-2px);
}
.insight-card:focus-visible{
  outline: 2px solid var(--accent-ring);
  outline-offset: 4px;
}

.insight-card--feature{
  border-color: var(--ink);
  background: var(--paper);
}
.insight-card--feature .insight-card__tag{ color: var(--accent); }

/* Per-card accent — each card echoes the temperature of its header image
   via one variable that downstream rules consume. Apply subtly: eyebrow,
   divider rule, key figure, CTA hover. Cards keep the same layout and
   typographic system — only the accent hue shifts. */
.insight-card[data-insight="covid"]{
  --card-accent: oklch(0.48 0.030 240);
  --card-accent-soft: oklch(0.48 0.030 240 / 0.20);
}
.insight-card[data-insight="laquan"]{
  --card-accent: var(--accent);
  --card-accent-soft: var(--accent-soft);
}
.insight-card[data-insight="blizzards"]{
  --card-accent: oklch(0.46 0.150 245);
  --card-accent-soft: oklch(0.46 0.150 245 / 0.18);
}
.insight-card[data-insight] .insight-card__tag{ color: var(--card-accent); }
.insight-card[data-insight] .insight-card__statval{ color: var(--card-accent); }
.insight-card[data-insight] .insight-card__stat{ border-top-color: var(--card-accent-soft); }
.insight-card[data-insight]:hover .insight-card__cta{ color: var(--card-accent); }
.insight-card[data-insight]:focus-visible{
  outline-color: var(--card-accent);
}

/* Banner sits at the top of the card, edge-to-edge: negative margins
   undo the card's 28px-top / 28px-side padding so the image flushes the
   inside of the 1px border. A fixed 16/6 aspect-ratio guarantees all
   three banners crop to the same shape regardless of source dimensions. */
.insight-card__banner{
  display: block;
  margin: -28px -28px 4px;
  aspect-ratio: 16 / 6;
  overflow: hidden;
  background: var(--ink-4, var(--ink-3));
  border-bottom: 1px solid var(--rule);
}
.insight-card__banner img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.insight-card__tag{
  font-family: var(--mono);
  font-size: clamp(15px, 1.55vw, 21px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  line-height: 1.1;
}
.insight-card__title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.insight-card__teaser{
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}
.insight-card__stat{
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.insight-card__statval{
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.insight-card__statlabel{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.insight-card__cta{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.insight-card__cta .arr{ transition: transform var(--t-med) var(--ease); }
.insight-card:hover .insight-card__cta{ color: var(--accent); }
.insight-card:hover .insight-card__cta .arr{ transform: translateX(6px); }

/* ─────────── Detail view ─────────── */
.insight-detail{
  display: grid;
  gap: 36px;
  margin: 24px 0 clamp(64px, 9vw, 120px);
}
.insight-detail[hidden]{ display: none; }

.back-to-insights{
  width: fit-content;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
.back-to-insights:hover{ border-color: var(--ink); color: var(--accent); }
.back-to-insights:focus-visible{ outline: 2px solid var(--accent-ring); outline-offset: 4px; }

.insight-detail__head{ display: grid; gap: 18px; max-width: 78ch; }
.insight-detail__tag{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.insight-detail h2{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.insight-detail h2 em{ font-style: italic; color: var(--ink-2); }
.insight-detail__deck{
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}

.insight-chart{
  position: relative;
  min-height: 360px;
  padding: 28px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
}
.insight-chart svg{
  width: 100%;
  height: auto;
  display: block;
}
.chart-placeholder{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}

.beats{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  border-top: 1px solid var(--rule);
  padding-top: 32px;
}
@media (max-width: 760px){ .beats{ grid-template-columns: 1fr; } }

.beat{ display: grid; gap: 10px; }
.beat h4{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}
.beat p{
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}
.beat p em{ font-style: italic; color: var(--ink-2); }
.num-accent{ color: var(--accent); font-family: var(--mono); font-weight: 500; }

/* Stacked figure pair used by the Laquan detail (Chart A + Chart B). */
.insight-charts{ display: grid; gap: 32px; }
.insight-chartcard{
  margin: 0;
  display: grid;
  gap: 16px;
  padding: 24px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.insight-chartcard__head{ display: grid; gap: 6px; }
.insight-chartcard__kicker{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.insight-chartcard__title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.insight-chartcard__deck{
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  max-width: 64ch;
}
.insight-chartcard .insight-chart{
  background: var(--paper);
  min-height: 320px;
  padding: 18px 12px 14px;
}
.insight-chartcard__caption{
  display: flex;
  flex-wrap: wrap;
  gap: 24px 36px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.insight-chartcard__caption .cap{ display: grid; gap: 4px; }
.insight-chartcard__caption .cap .lbl{
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.insight-chartcard__caption .cap .val{
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.insight-chartcard__caption .cap .val.accent{ color: var(--accent); }

/* ─────────── Long-form article layout (Laquan detail) ─────────── */
/* Two-column magazine grid: main reading column + right-side editorial margin.
   Body chunks live in .insight-block (block-flow, so floated figures still wrap
   with their paragraphs). Margin chunks live in .insight-margin and hold one or
   more .insight-aside items. Charts, header, and timeline span both columns. */
.insight-article{
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(200px, 22vw, 260px);
  column-gap: clamp(32px, 4vw, 64px);
  row-gap: clamp(28px, 3.5vw, 44px);
}
.insight-article > .insight-article__head,
.insight-article > .insight-charts,
.insight-article > .insight-timeline-section,
.insight-article > .insight-section-title,
.insight-article > .back-to-insights{
  grid-column: 1 / -1;
}

/* Section intertitle — newspaper-style signpost between blocks.
   Top rule + short mono caps + small accent numeral. Spans both columns
   of the article grid so it reads across the full measure. */
.insight-section-title{
  margin: 12px 0 0;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.2;
}
.insight-section-title .num{
  color: var(--accent);
  margin-right: 14px;
  font-weight: 700;
}
.insight-article > .insight-block{ grid-column: 1; }
.insight-article > .insight-margin{ grid-column: 2; }
/* A block with no margin aside following it has no reason to sit in column 1
   leaving the right side blank — let it span both columns instead. */
.insight-article > .insight-block:not(:has(+ .insight-margin)){
  grid-column: 1 / -1;
}
.insight-article > .insight-block:not(:has(+ .insight-margin)) .insight-prose{
  max-width: 80ch;
}
.insight-article__head{
  border-bottom: 1px solid var(--rule);
  padding-bottom: 24px;
}

/* Block: block-flow container so figures can float and prose can wrap around. */
.insight-block{ display: block; }
.insight-block > * + *{ margin-top: 24px; }
.insight-block > .insight-figure + *{ margin-top: 16px; }
.insight-block::after{
  content: "";
  display: block;
  clear: both;
}

/* Margin: vertical stack of asides anchored to the top of its grid row. */
.insight-margin{
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-self: start;
  padding-top: 6px;
}

/* Generic aside — base look (newsroom rule + tight column).
   Variants override colour, font, and structure. */
.insight-aside{
  margin: 0;
  padding: 12px 0 0;
  border-top: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.aside-kicker{
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

/* Numbers aside: stat strip, one row per metric. Values come from data-laquan
   spans so they stay JSON-driven (same source as the body inline numbers). */
.insight-aside--numbers .aside-kicker{ margin-bottom: 4px; }
.insight-aside--numbers .aside-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dotted var(--rule);
}
.insight-aside--numbers .aside-row:last-child{ border-bottom: 0; }
.insight-aside--numbers .aside-lbl{
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.insight-aside--numbers .aside-val{
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

/* Definition aside: short prose gloss, serif. */
.insight-aside--definition p{
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
}

/* Pull-quote aside: accent rule, large italic serif. Marked aria-hidden in
   markup because the same sentence appears in the body. */
.insight-aside--quote{
  border-top-color: var(--accent);
}
.insight-aside--quote p{
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.25;
  color: var(--ink);
  font-style: italic;
  text-wrap: balance;
}

/* Mobile re-flow: no margin column. Each .insight-margin falls into the main
   reading column right after its block; asides become full-width inline notes. */
@media (max-width: 880px){
  .insight-article{
    display: block;
  }
  .insight-article > * + *{ margin-top: 28px; }
  .insight-margin{
    padding-top: 0;
    gap: 18px;
  }
  .insight-aside{
    padding: 16px 18px 18px;
    border: 1px solid var(--rule);
    border-top: 2px solid var(--ink);
    background: var(--paper-2);
  }
  .insight-aside--quote{
    border-top-color: var(--accent);
  }
}
.insight-article__byline{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

.insight-prose{
  font-family: var(--serif);
  font-size: clamp(19px, 1.55vw, 22px);
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
  max-width: 70ch;
  text-wrap: pretty;
}
.insight-prose em{ font-style: italic; color: var(--ink-2); }
.insight-prose--lede{
  font-size: clamp(22px, 1.95vw, 28px);
  line-height: 1.45;
  color: var(--ink);
}
.insight-prose--lede::first-letter{
  font-family: var(--serif);
  float: left;
  font-size: 4.4em;
  line-height: 0.86;
  padding: 6px 12px 0 0;
  color: var(--ink);
}

.insight-charts--single{ margin: 8px 0; }

/* Image slots — empty placeholders. Float to one side so body prose wraps beside
   them on wide screens. Collapse to full-width on narrow screens so they stay
   readable. Chart and timeline blocks clear the float (see below). */
.insight-figure{
  display: block;
  width: clamp(260px, 42%, 440px);
  margin: 6px 0 16px;
}
.insight-figure--left{
  float: left;
  margin-right: 32px;
  clear: left;
}
.insight-figure--right{
  float: right;
  margin-left: 32px;
  clear: right;
}
@media (max-width: 760px){
  .insight-figure,
  .insight-figure--left,
  .insight-figure--right{
    float: none;
    clear: both;
    width: 100%;
    margin: 18px 0;
  }
}

/* Break floats so charts, timeline, and the closing structure are not wrapped
   by a still-active figure float above. */
.insight-charts,
.insight-timeline-section,
.insight-article__head{
  clear: both;
}

.insight-figure__frame{
  position: relative;
  aspect-ratio: 3 / 2;
  background:
    repeating-linear-gradient(135deg,
      var(--paper-2) 0 8px,
      var(--paper-3) 8px 9px);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.insight-figure__frame--portrait{ aspect-ratio: 4 / 5; }
.insight-figure__placeholder{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.insight-figure__frame img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.insight-figure__caption{
  display: grid;
  gap: 8px;
  padding-bottom: 4px;
}
.insight-figure__cap-text{
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
  font-style: italic;
}
.insight-figure__credit{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.insight-figure__credit a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color var(--t-med) var(--ease);
}
.insight-figure__credit a:hover{ color: var(--ink); }

/* ─────────── Event timeline (third viz) ─────────── */
.insight-timeline-section{
  display: grid;
  gap: 18px;
  margin: 16px 0;
  padding: 28px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.insight-timeline-section__head{ display: grid; gap: 6px; max-width: 64ch; }

.insight-timeline{
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  position: relative;
}
/* The drawn axis — a 2px vertical rule the events attach to. The fill
   overlays it from the top down as the reader scrolls past each event,
   so the line itself shows reading progress. */
.insight-timeline__axis{
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--rule);
  pointer-events: none;
}
.insight-timeline__axis-fill{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  background: var(--accent);
  transition: height var(--t-med) var(--ease);
  transform-origin: top;
}
.insight-timeline__item{
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(150px, 180px) 1fr;
  gap: 10px 28px;
  padding: 16px 0;
  align-items: baseline;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}
.insight-timeline__item.is-revealed{ opacity: 1; transform: none; }
.insight-timeline__dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink-3);
  margin: 7px 0 0 5px;
  position: relative;
  z-index: 1;
  transition:
    background var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease);
}
/* Active dot — once the event's row has crossed the reading line, the
   dot fills with accent and a soft ring blooms around it. Quiet enough
   that it isn't a "completed checkbox", but unmistakable as a moved-past
   waypoint. */
.insight-timeline__item.is-active .insight-timeline__dot{
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.insight-timeline__date{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color var(--t-med) var(--ease);
}
.insight-timeline__item.is-active .insight-timeline__date{
  color: var(--accent);
}
.insight-timeline__body h5{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(19px, 1.5vw, 23px);
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.insight-timeline__body p{
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 60ch;
}
/* Per-event verified stat — small mono label below the body. Hidden until
   its parent item is revealed, then fades in with a short delay so it
   reads as a footnote landing after the event rather than a competing
   headline. Stats are facts about the event itself (counts, durations
   between verified dates), never anything that could imply causation
   with the arrest-rate line. */
.insight-timeline__stat{
  display: inline-block;
  margin-top: 10px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  background: var(--paper);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 480ms var(--ease) 160ms, transform 480ms var(--ease) 160ms,
              color var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.insight-timeline__item.is-revealed .insight-timeline__stat{
  opacity: 1;
  transform: none;
}
.insight-timeline__item.is-active .insight-timeline__stat{
  color: var(--accent);
  border-color: var(--accent);
}
@media (prefers-reduced-motion: reduce){
  .insight-timeline__stat{
    opacity: 1;
    transform: none;
    transition: none;
    color: var(--accent);
    border-color: var(--accent);
  }
}
@media (max-width: 640px){
  .insight-timeline__item{ grid-template-columns: 28px 1fr; gap: 6px 18px; }
  .insight-timeline__date{ grid-column: 2; margin-bottom: 2px; }
  .insight-timeline__body{ grid-column: 2; }
}
@media (prefers-reduced-motion: reduce){
  .insight-timeline__item{ opacity: 1; transform: none; transition: none; }
  .insight-timeline__item .insight-timeline__dot{
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
  }
  .insight-timeline__item .insight-timeline__date{ color: var(--accent); }
  .insight-timeline__axis-fill{ height: 100% !important; transition: none; }
}

/* ─────────── Chart A hover readout ─────────── */
.insight-chart__hover-guide{ pointer-events: none; }
.insight-chart__hover-dot{ pointer-events: none; }
.insight-chart__hover-readout{
  position: absolute;
  top: 12px;
  left: 12px;
  display: none;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink);
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}
.insight-chart__hover-readout.is-visible{ display: block; }
.insight-chart__hover-readout b{ font-weight: 600; }
.insight-chart__hover-readout .ro-row{ display: flex; justify-content: space-between; gap: 18px; }
.insight-chart__hover-readout .ro-row + .ro-row{ margin-top: 3px; }
.insight-chart__hover-readout .ro-lbl{ color: var(--ink-3); }
.insight-chart__hover-readout .ro-accent{ color: var(--accent); }

/* ─────────── Blizzards prototypes (review view; not the final layout) ─────────── */
.proto-stack{
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 24px;
}
.proto-card__head{
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
  margin-bottom: 8px;
}
.proto-tag{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.proto-card__head h3{
  font-family: var(--serif);
  font-size: 22px;
  margin: 0;
  color: var(--ink);
}
.proto-card__head p{
  font-size: 13px;
  color: var(--ink-2);
  max-width: 70ch;
  margin: 0;
}
.proto-mount{
  width: 100%;
  background: var(--paper-2, var(--paper));
  border: 1px solid var(--rule);
  padding: 12px 16px;
}
.proto-mount svg{ width: 100%; height: auto; display: block; }

/* ─────────── Blizzards chart palette (scoped) ───────────
   Cold/blue scale used by data marks inside blizzards charts only.
   These vars do NOT live on :root and never reach the card chrome,
   the editorial typography, or any other tab. Anything outside an
   ancestor with .bliz-charts keeps the site identity.
   Hues stay in the 235–255 range; lightness picked for AA contrast
   on the warm paper background. */
.bliz-charts{
  --bliz-1:        oklch(0.93 0.025 240);
  --bliz-2:        oklch(0.82 0.060 240);
  --bliz-3:        oklch(0.66 0.110 245);
  --bliz-4:        oklch(0.50 0.140 250);
  --bliz-5:        oklch(0.34 0.120 252);
  --bliz-accent:   oklch(0.46 0.150 245);
  --bliz-line:     oklch(0.40 0.110 248);
  --bliz-soft:     oklch(0.46 0.150 245 / 0.10);
}

.proto-controls{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.proto-btn{
  appearance: none;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  border-radius: 0;
  transition: background var(--t-fast) var(--ease);
}
.proto-btn:hover{ background: var(--paper-2); }
.proto-btn[aria-pressed="true"]{
  background: var(--bliz-accent);
  color: var(--paper);
  border-color: var(--bliz-accent);
}
.proto-progress{
  flex: 1 1 120px;
  height: 2px;
  background: var(--rule);
  position: relative;
  min-width: 80px;
}
.proto-progress__fill{
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--bliz-accent);
  transition: width 60ms linear;
}

/* Calendar heatmap tooltip */
.proto-tooltip{
  position: absolute;
  pointer-events: none;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink);
  z-index: 4;
  display: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.08);
}
.proto-tooltip.is-visible{ display: block; }
.proto-tooltip b{ font-weight: 600; }
.proto-tooltip .tt-row{ display: flex; justify-content: space-between; gap: 16px; }
.proto-tooltip .tt-lbl{ color: var(--ink-3); margin-right: 8px; }
.proto-tooltip .tt-delta{ font-weight: 600; }

.proto-mount{ position: relative; }

/* ─────────── Blizzards article — chart mount specifics ───────────
   The scatter chart has play/event controls above the SVG. Override the
   .insight-chart grid centering so the controls strip stacks on top of
   the SVG instead of being centered as a separate grid item. */
#insight-chart-bliz-scatter{
  display: block;
  padding: 14px 14px 8px;
  text-align: left;
}
#insight-chart-bliz-scatter [data-scatter-svg] svg{
  width: 100%;
  height: auto;
  display: block;
}

/* ─────────── Segmented control (proto controls) ───────────
   Both segments always fully visible, active = filled accent, inactive =
   filled paper with a contrasting border so it stands out against the
   .proto-mount paper-2 background. Min-width on each segment so labels
   never clip. No overflow:hidden on the wrapper. */
.proto-segmented{
  display: inline-flex;
  border: 1px solid var(--ink-3);
  border-radius: 2px;
  background: var(--paper);
}
.proto-segmented .proto-segmented__seg{
  appearance: none;
  border: none;
  padding: 7px 16px;
  min-width: 110px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.proto-segmented .proto-segmented__seg + .proto-segmented__seg{
  border-left: 1px solid var(--ink-3);
}
.proto-segmented .proto-segmented__seg[aria-pressed="true"]{
  background: var(--accent);
  color: var(--paper);
}
.proto-segmented .proto-segmented__seg[aria-pressed="false"]{
  background: var(--paper);
  color: var(--ink);
}
.proto-segmented .proto-segmented__seg:hover[aria-pressed="false"]{
  background: var(--paper-2);
}
.proto-segmented .proto-segmented__seg:focus-visible{
  outline: 2px solid var(--accent-ring);
  outline-offset: -2px;
}

/* ─────────── Sub-card (nested article-within-article) ───────────
   A visually distinct container for a side-topic that lives inside a
   main insight article. Uses the same two-column body/margin grid as
   .insight-article so child .insight-block / .insight-margin / .insight-charts
   elements behave the same way they do at top level. Has its own header
   block (eyebrow + title + deck) and a paper-2 background + framing
   border so it reads as "card inside card". */
.insight-article > .insight-subcard{
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(200px, 22vw, 260px);
  column-gap: clamp(32px, 4vw, 64px);
  row-gap: clamp(28px, 3.5vw, 44px);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: clamp(24px, 4vw, 48px);
  margin: clamp(8px, 1.5vw, 24px) 0;
}
.insight-subcard > .insight-subcard__head{
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insight-subcard__eyebrow{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.insight-subcard__title{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.insight-subcard__title em{
  font-style: italic;
  color: var(--ink-2);
}
.insight-subcard__deck{
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.4;
  color: var(--ink-2);
  margin: 4px 0 0;
  max-width: 56ch;
}
.insight-subcard > .insight-block{ grid-column: 1; }
.insight-subcard > .insight-margin{ grid-column: 2; }
.insight-subcard > .insight-charts{ grid-column: 1 / -1; }
.insight-subcard > .insight-block:not(:has(+ .insight-margin)){
  grid-column: 1 / -1;
}
@media (max-width: 880px){
  .insight-subcard{ grid-template-columns: 1fr; }
  .insight-subcard > .insight-block,
  .insight-subcard > .insight-margin{ grid-column: 1; }
}

/* ─────────── Callout (factual disclaimer inside prose) ───────────
   A visually distinct in-flow note tied to a paragraph of body text.
   Used here for the disclaimer that the data captures unrest, not the
   act of protesting. Stronger than a margin aside (sits in the reading
   column where it can't be missed) but not as heavy as a chart card. */
.insight-callout{
  border-left: 3px solid var(--accent);
  background: var(--paper);
  padding: 16px 20px;
  margin: 8px 0;
}
.callout-kicker{
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.insight-callout p{
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

/* ─────────── COVID card · chart mount sizing ───────────
   The COVID charts use the same controls+SVG (animated zoom, small
   multiples) or single-SVG (diverging bars) pattern as the blizzards
   scatter. The default .insight-chart `display: grid; place-items: center`
   doesn't propagate width:100% to wrapped SVGs, so they render small and
   top-anchored. Switch to block flow so the SVG fills the container width
   like Laquan and blizzards. */
#insight-chart-covid-floyd-zoom,
#insight-chart-covid-small-multiples,
#insight-chart-covid-comp-floyd{
  display: block;
  padding: 16px 14px 8px;
  text-align: left;
}
/* Stretch only the structural children (controls strip + svg wrapper) to
   full container width. Avoid `> *` because that also catches the
   .proto-tooltip div appended to the same root, blowing up its layout
   box and breaking its on-hover positioning. */
#insight-chart-covid-floyd-zoom > .proto-controls,
#insight-chart-covid-floyd-zoom > div:not(.proto-tooltip):not(.proto-controls),
#insight-chart-covid-small-multiples > .proto-controls,
#insight-chart-covid-small-multiples > div:not(.proto-tooltip):not(.proto-controls){
  width: 100%;
}
/* Belt-and-braces: the tooltip is the only floating node in these mounts
   and must keep its own sizing regardless of any layout rule above.
   `!important` defends against any other rule (cached or otherwise)
   stretching the box; `white-space: normal` lets long headers like
   "CRIMINAL DAMAGE · week of Mon May 25, 2020" wrap inside max-width
   instead of overflowing as a single nowrap line. */
#insight-chart-covid-floyd-zoom > .proto-tooltip,
#insight-chart-covid-small-multiples > .proto-tooltip{
  width: auto !important;
  max-width: 240px !important;
  min-width: 0 !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
}
#insight-chart-covid-floyd-zoom > .proto-tooltip b,
#insight-chart-covid-small-multiples > .proto-tooltip b{
  font-size: 11px !important;
  font-weight: 600;
}
#insight-chart-covid-floyd-zoom > .proto-tooltip .tt-row,
#insight-chart-covid-small-multiples > .proto-tooltip .tt-row{
  font-size: 11px !important;
}
#insight-chart-covid-floyd-zoom svg,
#insight-chart-covid-small-multiples svg,
#insight-chart-covid-comp-floyd svg{
  width: 100%;
  height: auto;
  display: block;
}

/* ─────────── COVID card · numbers-aside layout ───────────
   The default .aside-val is 18px mono + nowrap, tuned for short magnitudes
   like Laquan's "20.0%". COVID has longer values ("1,069 vs ~264" inline
   raw counts; "March 21, 2020 → May 1, 2020" date range) that overflow
   the 200-260px margin column at that size. Scope a slightly smaller
   value font + stacked variant for the date range so nothing collides. */
#insight-detail-covid .insight-aside--numbers .aside-row{ gap: 16px; }
#insight-detail-covid .insight-aside--numbers .aside-val{
  font-size: 14px;
  text-align: right;
}
/* Stacked variant: label on its own line, value on the next line below.
   Used for the lockdown window date range which is too wide for any inline
   layout in a 200px margin. */
.insight-aside--numbers .aside-row--stacked{
  display: block;
}
.insight-aside--numbers .aside-row--stacked .aside-lbl{
  display: block;
  margin-bottom: 4px;
}
.insight-aside--numbers .aside-row--stacked .aside-val{
  display: block;
  white-space: normal;
  text-align: left;
  font-size: 14px;
}
