* {
  box-sizing: border-box;
}

:root {
  --bg: #edf2f4;
  --bg-soft: #f7f9f9;
  --card: rgba(255, 255, 255, 0.94);
  --text: #17202a;
  --muted: #5f6b73;
  --border: rgba(23, 32, 42, 0.12);
  --accent: #c4512c;
  --accent-dark: #8f2f1b;
  --accent-soft: rgba(196, 81, 44, 0.12);
  --heat-soft: #fff3df;
  --shadow: rgba(40, 55, 70, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(136, 178, 196, 0.18), transparent 30rem),
    linear-gradient(180deg, #fff8f0 0%, var(--bg-soft) 26%, var(--bg) 100%);
}

a {
  color: var(--accent-dark);
}

.writeup-link {
  position: fixed;
  top: 1.6rem;
  right: 2rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(143, 47, 27, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(40, 55, 70, 0.08);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.writeup-link:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(40, 55, 70, 0.12);
}

@media (max-width: 680px) {
  .writeup-link {
    top: 1rem;
    right: 1rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.65rem;
  }
}

.hero-section {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 4rem 8vw;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(196, 81, 44, 0.12), transparent 26rem),
    linear-gradient(180deg, #fff8f0 0%, #ffeadb 100%);
}

.hero-inner {
  max-width: 1050px;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-section h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.subtitle {
  max-width: 760px;
  margin: 1.6rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  line-height: 1.55;
}

.scroll-cue {
  margin-top: 4rem;
  color: #888;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.scrolly {
  display: grid;
  grid-template-columns: minmax(540px, 58%) minmax(360px, 42%);
  gap: 2rem;
  max-width: 1380px;
  margin: 0 auto;
  padding: 2rem 4vw 5rem;
  align-items: start;
}

.graphic {
  position: sticky;
  top: 1.25rem;
  height: calc(100vh - 2.5rem);
  align-self: start;
}

.sticky-viz {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  gap: 0.55rem;
  overflow: hidden;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(12px);
}

.viz-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.viz-title-block {
  min-width: 0;
}

.viz-header h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 1.45vw, 1.45rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

#chart-subtitle {
  max-width: 680px;
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.32;
}

.chart-wrap {
  position: relative;
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: stretch;
}

#main-chart {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
}

.map-year-overlay {
  position: absolute;
  top: 0.8rem;
  right: 1.1rem;
  z-index: 5;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.map-year-overlay.is-visible {
  opacity: 0.92;
}

.map-year-overlay.is-animating {
  transform: scale(1.02);
}

.state {
  stroke: #ffffff;
  stroke-width: 0.8;
  cursor: pointer;
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}

.state:hover {
  stroke: #17202a;
  stroke-width: 1.6;
}

.state.highlighted {
  stroke: rgba(23, 32, 42, 0.38);
  stroke-width: 1.1;
}

.state.selected {
  stroke: #17202a;
  stroke-width: 2.4;
}

.axis path,
.axis line {
  stroke: rgba(23, 32, 42, 0.22);
}

.axis text {
  fill: var(--muted);
  font-size: 11px;
}

.grid-line {
  stroke: rgba(23, 32, 42, 0.08);
  shape-rendering: crispEdges;
}

.line-label {
  font-size: 12px;
  font-weight: 800;
  fill: var(--text);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.placeholder-legend {
  min-width: 200px;
  padding: 0.38rem 0.6rem;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

#legend svg {
  display: block;
}

.legend-caption {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

#map-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 260px;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(23, 32, 42, 0.94);
  color: white;
  box-shadow: 0 12px 32px rgba(23, 32, 42, 0.28);
  pointer-events: none;
  font-size: 0.82rem;
  line-height: 1.35;
}

.tooltip h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: white;
}

.tooltip p {
  margin: 0.16rem 0;
  color: rgba(255, 255, 255, 0.86);
}

.tooltip strong {
  color: #ffd0ba;
}

.controls {
  display: none;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 270px;
}

body.explore-mode .controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(165px, 1fr));
  gap: 0.55rem 0.65rem;
  min-width: 410px;
  max-width: 440px;
  align-items: stretch;
}

body.explore-mode .controls label {
  display: grid;
  gap: 0.22rem;
  padding: 0.42rem 0.5rem;
  border: 1px solid rgba(196, 81, 44, 0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
}

body.explore-mode .controls label:nth-child(2) {
  align-content: start;
}

body.explore-mode .controls select,
body.explore-mode .controls input[type="range"] {
  max-width: none;
  width: 100%;
}

body.explore-mode .controls #year-label {
  display: inline-block;
  margin-left: 0.18rem;
  font-size: 0.96rem;
  font-weight: 900;
}

body.explore-mode .bubble-toggle-label .bubble-toggle-control {
  min-height: 38px;
}

.controls label {
  display: grid;
  gap: 0.18rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

select,
input[type="range"] {
  max-width: 170px;
}

select {
  padding: 0.34rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--text);
  font: inherit;
}

input[type="range"] {
  accent-color: var(--accent);
}

#year-label {
  color: var(--text);
  font-size: 0.82rem;
}

.story {
  min-height: 100vh;
}

.step {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4vh 1rem;
  opacity: 0.25;
  transform: translateY(0.45rem);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.step.is-active {
  opacity: 1;
  transform: translateY(0);
}

.step-number {
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.step h2 {
  max-width: 560px;
  margin: 0 0 0.9rem;
  color: var(--text);
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  line-height: 1.03;
  letter-spacing: -0.058em;
}

.step p:not(.step-number) {
  max-width: 510px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.08vw, 1.12rem);
  line-height: 1.65;
}

body.text-break-active .scrolly {
  display: block;
  max-width: none;
  padding: 0;
}

body.text-break-active .graphic {
  display: none;
}

body.text-break-active .story {
  width: 100%;
  min-height: 100vh;
}

body.text-break-active .story .step {
  visibility: hidden;
}

body.text-break-active .story .step.is-active.text-only-step {
  visibility: visible;
  min-height: 100vh;
  width: min(980px, 88vw);
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 1;
  transform: none;
}

body.text-break-active .step.is-active.text-only-step .step-number {
  margin-bottom: 1rem;
}

body.text-break-active .step.is-active.text-only-step h2 {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 1.02;
}

body.text-break-active .step.is-active.text-only-step p:not(.step-number) {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.7;
}

.text-break-svg-title {
  fill: var(--text);
  font-weight: 900;
  letter-spacing: -0.055em;
}

.text-break-svg-body {
  fill: var(--muted);
  font-weight: 500;
}

.impact-placeholder-box {
  fill: rgba(255, 255, 255, 0.88);
  stroke: rgba(143, 47, 27, 0.25);
  stroke-width: 2;
  stroke-dasharray: 7 6;
}

.sticky-viz.step-pulse {
  animation: softPulse 0.55s ease;
}

@keyframes softPulse {
  0% {
    box-shadow: 0 18px 48px var(--shadow);
    transform: scale(1);
  }

  45% {
    box-shadow: 0 22px 58px rgba(196, 81, 44, 0.2);
    transform: scale(1.004);
  }

  100% {
    box-shadow: 0 18px 48px var(--shadow);
    transform: scale(1);
  }
}

.detail-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 4rem 4vw 5rem;
}

.section-header {
  max-width: 820px;
  margin: 0 auto 1.8rem;
  text-align: center;
}

.section-header h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.1rem, 4.4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.section-header p {
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.state-picker-row {
  max-width: 420px;
  margin: -0.8rem auto 1.4rem;
  display: grid;
  gap: 0.4rem;
  text-align: left;
}

.state-picker-row label {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#state-picker {
  width: 100%;
  max-width: none;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(40, 55, 70, 0.08);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.selected-state-panel {
  min-height: 360px;
  padding: 1.35rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 20%, rgba(196, 81, 44, 0.12), transparent 18rem),
    white;
  border: 1px solid var(--border);
  box-shadow: 0 14px 38px var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.selected-state-panel h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: var(--text);
}

.selected-state-panel p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.snapshot-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.snapshot-metrics div {
  padding: 0.9rem;
  border-radius: 16px;
  background: var(--heat-soft);
  border: 1px solid rgba(196, 81, 44, 0.16);
}

.snapshot-metrics span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.snapshot-metrics strong {
  color: var(--accent-dark);
  font-size: 0.95rem;
}

.daily-card {
  padding: 1.35rem;
  border-radius: 22px;
  background: white;
  border: 1px solid var(--border);
  box-shadow: 0 14px 38px var(--shadow);
}

.daily-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.daily-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.stat-row strong {
  color: var(--accent-dark);
  text-align: right;
}

.monthly-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.38fr);
  gap: 1rem;
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
}

.monthly-panel h3 {
  margin: 0 0 0.7rem;
  font-size: 1.45rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.monthly-panel p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.monthly-chart-card {
  min-height: 260px;
  padding: 0.75rem;
  border-radius: 22px;
  background: white;
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(40, 55, 70, 0.08);
}

#monthly-chart {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: block;
}

.month-bar {
  fill: var(--accent);
  opacity: 0.82;
}

.month-bar:hover {
  opacity: 1;
}

.monthly-empty-text {
  fill: var(--muted);
  font-size: 14px;
  text-anchor: middle;
}

.closing {
  padding: 5rem 8vw 6rem;
  background: #17202a;
  color: white;
}

.closing .eyebrow {
  color: #ffb18f;
}

.closing h2 {
  max-width: 980px;
  margin: 0 0 1.2rem;
  font-size: clamp(2.2rem, 4.6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.closing p:not(.eyebrow) {
  max-width: 780px;
  color: #e8e8e8;
  font-size: 1.15rem;
  line-height: 1.6;
}

footer {
  padding: 2.4rem 8vw;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  background: #f7f9f9;
}

footer p {
  margin: 0;
}

@media (max-width: 1050px) {
  .scrolly,
  .detail-grid,
  .monthly-panel {
    grid-template-columns: 1fr;
  }

  .graphic {
    position: relative;
    top: auto;
    height: auto;
  }

  .sticky-viz {
    min-height: 620px;
  }

  .step {
    min-height: 72vh;
  }

  .selected-state-panel {
    min-height: 280px;
  }
}

@media (max-width: 680px) {
  .hero-section {
    padding: 3rem 1.2rem;
  }

  .hero-section h1 {
    font-size: clamp(2.4rem, 13vw, 4.2rem);
  }

  .scrolly,
  .detail-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .viz-header {
    display: block;
  }

  .controls {
    margin-top: 0.9rem;
    justify-content: flex-start;
  }

  body.explore-mode .controls {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
    max-width: 100%;
  }

  .sticky-viz {
    min-height: 560px;
    padding: 0.75rem;
    border-radius: 18px;
  }

  #main-chart {
    min-height: 360px;
  }

  .state-picker-row {
    margin-top: 0;
  }

  .snapshot-metrics {
    grid-template-columns: 1fr;
  }

  .monthly-chart-card {
    min-height: 240px;
  }
}

/* add summary for line plots */
.trend-summary {
  position: absolute;         
  top: 0.5rem;
  left: 0.5rem;
  z-index: 4;
  display: none;               
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: var(--heat-soft);
  border: 1px solid rgba(196, 81, 44, 0.18);
  box-shadow: 0 4px 12px rgba(40, 55, 70, 0.08);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.trend-summary.is-active {
  display: flex;             
}

.trend-summary.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.trend-summary.is-active.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.trend-summary-label {
  margin: 0 0 0.25rem;
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trend-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.trend-summary-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.3;
  white-space: nowrap;        
}

.trend-summary-row .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.trend-summary-row .name {
  color: var(--text);
  font-weight: 600;
}

.trend-summary-row .value {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}


.hover-line {
  stroke: rgba(23, 32, 42, 0.4);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.hover-dot {
  stroke: white;
  stroke-width: 2;
  pointer-events: none;
}

body.no-tooltip .tooltip {
  display: none !important;
}

body.no-tooltip:not(.explore-mode) .state {
  pointer-events: none;        
}

/* step8impact */
.impact-fill {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 0.5rem;
  box-sizing: border-box;
}
 
.impact-viz-content {
  width: 100%;
  height: 100%;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-sizing: border-box;
}
 
/* ---------- Rows container ---------- */
.impact-viz-rows {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.22rem;
  min-height: 0;
}

/* ---------- One row per impact ---------- */
.impact-viz-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.72rem;
  padding: 0.38rem 0;
  border-top: 1px solid var(--border);
}

.impact-viz-row:first-child {
  border-top: none;
  padding-top: 0.15rem;
}

.ivr-head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.12rem;
  flex-wrap: wrap;
}

.ivr-label {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: var(--muted);
  min-width: 100px;
}

.ivr-stat {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.ivr-unit {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.15rem;
}

.ivr-desc {
  margin: 0.1rem 0 0.18rem;
  font-size: 0.78rem;
  line-height: 1.32;
  color: var(--muted);
}

.ivr-cite {
  margin: 0;
  font-size: 0.64rem;
  font-style: italic;
  color: #a0a8ad;
}

/* ---------- Equity kicker ---------- */
.impact-viz-equity {
  flex: 0 0 auto;
  padding: 0.5rem 0.75rem;
  background: #fbf7f4;
  border-left: 3px solid var(--accent-dark);
  border-radius: 0 8px 8px 0;
}

.ive-tag {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: var(--accent-dark);
  margin-bottom: 0.22rem;
}

.impact-viz-equity p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text);
  font-weight: 500;
}





.writeup-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(196, 81, 44, 0.12), transparent 28rem),
    linear-gradient(180deg, #fff8f0 0%, var(--bg-soft) 35%, var(--bg) 100%);
}

.writeup-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 7rem 1.5rem 5rem;
}

.writeup-container h1 {
  margin: 0 0 2rem;
  color: var(--text);
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.writeup-container section {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 34px rgba(40, 55, 70, 0.08);
}

.writeup-container h2 {
  margin: 0 0 0.8rem;
  color: var(--text);
  font-size: 1.6rem;
  letter-spacing: -0.035em;
}

.writeup-container p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}
.line-annotation-label {
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.baseline-label {
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.tooltip .tooltip-muted {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.74rem;
}

/* Plot 01 polish: compact card + cleaner caption */
.trend-summary {
  top: 0.75rem;
  left: 0.85rem;
  width: min(310px, calc(100% - 1.7rem));
  padding: 0.62rem 0.78rem;
  border-radius: 16px;
  background: rgba(255, 247, 235, 0.92);
  border: 1px solid rgba(196, 81, 44, 0.16);
  box-shadow: 0 10px 24px rgba(40, 55, 70, 0.10);
  backdrop-filter: blur(8px);
}
.trend-summary-label {
  margin-bottom: 0.32rem;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
}
.trend-summary-rows {
  gap: 0.02rem;
}
.trend-summary-row {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  gap: 0.42rem;
  font-size: 0.75rem;
  line-height: 1.25;
}
.trend-summary-row .dot {
  width: 7px;
  height: 7px;
  align-self: center;
}
.trend-summary-row .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trend-summary-row .value {
  font-weight: 900;
  white-space: nowrap;
}

.line-caption {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 32, 42, 0.10);
  color: var(--muted);
  box-shadow: 0 6px 18px rgba(40,55,70,0.06);
}
.line-caption .legend-caption {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 700;
  color: #65717a;
}

.animated-exposure-legend {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  border-radius: 20px;
  padding: 0.62rem 0.82rem;
}

.animated-exposure-legend svg {
  width: 320px;
  max-width: 100%;
  height: 52px;
}

.animated-exposure-legend .legend-caption {
  font-size: 0.72rem;
}


/* Intro expectation gate */
body.intro-locked {
  overflow: hidden;
  height: 100vh;
  overscroll-behavior: none;
}

.hero-section {
  padding-top: 2.2rem;
  padding-bottom: 2rem;
}

.hero-inner {
  max-width: 1120px;
}

.hero-section h1 {
  font-size: clamp(2.65rem, 6.1vw, 5.45rem);
}

.hero-section .subtitle {
  margin-top: 1.05rem;
}

.expectation-intro {
  width: min(980px, 92vw);
  margin: 1.6rem auto 0;
  padding: 1rem;
  border: 1px solid rgba(143, 47, 27, 0.16);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 36px rgba(40, 55, 70, 0.10);
  backdrop-filter: blur(12px);
}

.expectation-prompt {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.expectation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.85rem;
}

.expectation-field {
  position: relative;
  display: grid;
  gap: 0.35rem;
  text-align: left;
}

.expectation-field span {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.expectation-field input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(23, 32, 42, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.expectation-field input:focus {
  border-color: rgba(196, 81, 44, 0.46);
  box-shadow: 0 0 0 4px rgba(196, 81, 44, 0.11);
}

.expectation-field input.is-invalid {
  border-color: rgba(143, 47, 27, 0.65);
  box-shadow: 0 0 0 4px rgba(196, 81, 44, 0.13);
}

.state-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 30;
  display: none;
  max-height: 15.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem;
  border: 1px solid rgba(23, 32, 42, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(40, 55, 70, 0.16);
}

.state-suggestions::-webkit-scrollbar {
  width: 8px;
}

.state-suggestions::-webkit-scrollbar-thumb {
  background: rgba(143, 47, 27, 0.28);
  border-radius: 999px;
}

.state-suggestions.is-open {
  display: grid;
  gap: 0.18rem;
}

.state-suggestion-item {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.state-suggestion-item:hover,
.state-suggestion-item:focus-visible {
  background: rgba(196, 81, 44, 0.10);
  outline: none;
}

.intro-form-note {
  min-height: 1.1rem;
  margin: 0.72rem 0 0;
  color: #7e878d;
  font-size: 0.88rem;
}

.intro-locked-cue {
  margin-top: 1.55rem;
}

body.intro-complete .intro-locked-cue {
  color: #888;
}

.expectation-result {
  min-height: 100vh;
  max-width: 1380px;
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 4rem) 4vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expectation-result[hidden] {
  display: none;
}

.expectation-result-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(380px, 0.92fr);
  gap: 1.2rem;
  align-items: stretch;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid rgba(143, 47, 27, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 46px rgba(40, 55, 70, 0.11);
}

.expectation-result-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(54vh, 520px);
}

.expectation-result-copy h2 {
  max-width: 780px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.03;
  letter-spacing: -0.058em;
}

.expectation-result-copy p:not(.eyebrow) {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.62;
}

.expectation-result-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.expectation-value-card {
  display: grid;
  align-content: center;
  min-height: 96px;
  padding: 0.85rem;
  border: 1px solid rgba(23, 32, 42, 0.10);
  border-radius: 20px;
  background: rgba(247, 249, 249, 0.86);
}

.expectation-value-card.is-closest {
  border-color: rgba(196, 81, 44, 0.35);
  background: rgba(255, 243, 223, 0.95);
  box-shadow: inset 0 0 0 1px rgba(196, 81, 44, 0.08);
}

.expectation-value-card span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.expectation-value-card strong {
  margin-top: 0.22rem;
  color: var(--text);
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.expectation-value-card small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

@media (max-width: 860px) {
  .expectation-form,
  .expectation-result-card,
  .expectation-result-values {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding-top: 4.5rem;
    padding-bottom: 3rem;
  }
}

/* State change expectation follow-up */
.state-change-result {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.2rem, 4vw, 4rem);
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 229, 205, 0.62), transparent 32%),
    linear-gradient(180deg, #fffaf5 0%, #f5efe7 100%);
}

.state-change-result[hidden] {
  display: none;
}

.state-change-card {
  width: min(1160px, 100%);
  min-height: min(760px, calc(100vh - 5rem));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1rem, 2.2vw, 1.8rem);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 1px solid rgba(23, 32, 42, 0.11);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.80);
  box-shadow: 0 28px 90px rgba(86, 55, 32, 0.12);
}

.state-change-copy {
  max-width: 980px;
}

.state-change-copy h2 {
  margin: 0.25rem 0 0.65rem;
  font-size: clamp(2rem, 4.6vw, 4.4rem);
  line-height: 0.97;
  letter-spacing: -0.06em;
  color: #17202a;
}

.state-change-copy p:not(.eyebrow) {
  max-width: 850px;
  margin: 0;
  color: #5f6b73;
  font-size: clamp(1rem, 1.55vw, 1.22rem);
  line-height: 1.55;
}

.state-change-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
  align-items: stretch;
}

.state-change-state-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 355px;
  padding: clamp(1.1rem, 2vw, 1.65rem);
  border-radius: 28px;
  border: 1px solid rgba(23, 32, 42, 0.10);
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.state-change-state-card.is-top {
  border-color: rgba(196, 81, 44, 0.34);
  box-shadow: inset 0 0 0 1px rgba(196, 81, 44, 0.14);
}

.state-change-state-card.is-selected {
  border-color: rgba(79, 143, 192, 0.30);
}

.state-change-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.state-change-card-header span {
  display: inline-flex;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  background: rgba(23, 32, 42, 0.07);
  color: #5f6b73;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.state-change-card-header h3 {
  margin: 0.45rem 0 0;
  color: #17202a;
  font-size: clamp(1.55rem, 3vw, 2.65rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.state-change-year-pill {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 0.55rem 0.7rem;
  border-radius: 18px;
  background: #17202a;
  color: #fffaf5;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 900;
}

.state-change-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 1.05rem;
}

.state-change-value-row strong {
  color: #c4512c;
  font-size: clamp(2.5rem, 5.2vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.state-change-value-row small {
  color: #5f6b73;
  font-weight: 800;
}

.state-change-tiles {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 7px;
  margin-top: 1.1rem;
}

.state-change-tiles span {
  aspect-ratio: 1;
  border-radius: 6px;
  background: #f0e8df;
  border: 1px solid rgba(23, 32, 42, 0.06);
  transition: background-color 220ms ease, opacity 220ms ease, transform 220ms ease;
}

.state-change-tiles span.is-filled {
  background: #c4512c;
  opacity: 0.88;
  transform: translateY(-1px);
}

.state-change-state-note {
  margin-top: 0.75rem;
  color: #6d767d;
  font-size: 0.88rem;
  line-height: 1.45;
}

.state-change-note {
  margin: 0;
  color: #7a858d;
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
}

@media (max-width: 860px) {
  .state-change-blocks {
    grid-template-columns: 1fr;
  }

  .state-change-card {
    min-height: auto;
  }
}

/* State-change follow-up: state-shape map cards */
.state-change-blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.9rem, 1.8vw, 1.35rem);
  align-items: stretch;
}

.state-change-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(23, 32, 42, 0.10);
}

.state-change-play-toggle {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  background: #17202a;
  color: #fffaf5;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  min-width: 92px;
}

.state-change-slider-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.42rem;
  flex: 1;
  min-width: 280px;
  color: #5f6b73;
  font-size: 0.9rem;
  font-weight: 900;
}

.state-change-slider-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.state-change-slider-label {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.state-change-year-output {
  min-width: 4.4rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(196, 81, 44, 0.12);
  color: #8f2f1b;
  font-size: 0.95rem;
  font-weight: 950;
  text-align: center;
}

.state-change-slider-wrap input[type="range"] {
  width: 100%;
  height: 0.55rem;
  accent-color: #c4512c;
  cursor: pointer;
}

.state-change-slider-wrap input[type="range"]:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.state-change-slider-ticks {
  display: flex;
  justify-content: space-between;
  color: #9a8b7a;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0 0.1rem;
}

.state-change-slider-help {
  color: #7a858d;
  font-size: 0.86rem;
  font-style: italic;
  white-space: nowrap;
}

.state-change-map-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
  align-items: stretch;
}

.state-change-state-card.state-shape-card {
  min-height: 430px;
  grid-template-rows: auto minmax(190px, 1fr) auto auto;
}

.state-shape-stage {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0.8rem 0 0.6rem;
  min-height: 205px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 40% 35%, rgba(255,255,255,0.90), transparent 35%),
    rgba(245, 239, 231, 0.72);
  border: 1px solid rgba(23, 32, 42, 0.08);
  overflow: hidden;
}

.state-shape-svg {
  width: 100%;
  height: 100%;
  min-height: 190px;
}

.state-shape-path {
  filter: drop-shadow(0 14px 22px rgba(86, 55, 32, 0.16));
  transition: fill 260ms ease;
}

.state-shape-card .state-change-value-row {
  margin-top: 0.35rem;
}

@media (max-width: 860px) {
  .state-change-map-cards {
    grid-template-columns: 1fr;
  }

  .state-change-controls {
    flex-wrap: wrap;
  }

  .state-change-slider-wrap {
    width: 100%;
    min-width: 0;
  }

  .state-change-slider-help {
    white-space: normal;
  }
}

/* Transition from personalized state check to national Plot 01 */
.us-transition {
  min-height: 62vh;
  display: grid;
  place-items: center;
  padding: clamp(3.2rem, 7vw, 6rem) 8vw;
  background:
    radial-gradient(circle at 50% 48%, rgba(196, 81, 44, 0.12), transparent 24rem),
    linear-gradient(180deg, #f5efe7 0%, #fff8f0 62%, rgba(247, 249, 249, 0.98) 100%);
  text-align: center;
}

.us-transition-inner {
  width: min(960px, 100%);
}

.us-transition h2 {
  margin: 0;
  color: #17202a;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.us-transition p:not(.eyebrow) {
  max-width: 760px;
  margin: 1.05rem auto 0;
  color: #5f6b73;
  font-size: clamp(1rem, 1.55vw, 1.28rem);
  line-height: 1.55;
}

.state-change-continue {
  justify-self: center;
  appearance: none;
  margin-top: 0.25rem;
  border: 0;
  border-radius: 999px;
  padding: 0.82rem 1.35rem;
  background: #17202a;
  color: #fffaf5;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(23, 32, 42, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.state-change-continue:hover,
.state-change-continue:focus-visible {
  transform: translateY(-1px);
  background: #243241;
  box-shadow: 0 18px 34px rgba(23, 32, 42, 0.20);
  outline: none;
}

@media (max-width: 860px) {
  .us-transition {
    min-height: 54vh;
    padding-inline: 1.4rem;
  }
}


/* Immersive intro/results refinement: reduce heavy card surfaces */
.expectation-result {
  max-width: none;
  padding: clamp(2rem, 5vh, 4rem) 7vw;
  background:
    radial-gradient(circle at 75% 20%, rgba(196, 81, 44, 0.10), transparent 30rem),
    linear-gradient(180deg, #ffeadb 0%, #fff8f0 56%, #f5efe7 100%);
}

.expectation-result-card {
  width: min(1260px, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  align-items: center;
}

.expectation-result-copy {
  min-height: auto;
  padding: clamp(1.25rem, 2.4vw, 2rem);
  border-radius: 28px;
  background: rgba(255, 248, 240, 0.58);
  border: 1px solid rgba(143, 47, 27, 0.12);
  backdrop-filter: blur(12px);
}

.expectation-result-values {
  align-content: center;
}

.expectation-value-card {
  background: rgba(255, 248, 240, 0.48);
  border-color: rgba(143, 47, 27, 0.10);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.expectation-value-card.is-closest {
  background: rgba(255, 234, 219, 0.66);
  border-color: rgba(196, 81, 44, 0.32);
}

.state-change-result {
  background:
    radial-gradient(circle at 22% 20%, rgba(196, 81, 44, 0.12), transparent 32rem),
    radial-gradient(circle at 82% 72%, rgba(136, 178, 196, 0.14), transparent 28rem),
    linear-gradient(180deg, #f5efe7 0%, #fff8f0 72%, #f7f9f9 100%);
}

.state-change-card {
  width: min(1240px, 100%);
  min-height: min(820px, calc(100vh - 4rem));
  padding: clamp(1rem, 2.4vw, 2rem) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.state-change-copy {
  max-width: 980px;
  padding: clamp(1.15rem, 2.2vw, 1.75rem);
  border-radius: 28px;
  background: rgba(255, 248, 240, 0.56);
  border: 1px solid rgba(143, 47, 27, 0.12);
  backdrop-filter: blur(12px);
}

.state-change-controls {
  justify-self: start;
  background: rgba(255, 248, 240, 0.54);
  border-color: rgba(143, 47, 27, 0.10);
  backdrop-filter: blur(10px);
}

.state-change-state-card.state-shape-card {
  background: rgba(255, 248, 240, 0.42);
  border-color: rgba(143, 47, 27, 0.10);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.state-shape-stage {
  background:
    radial-gradient(circle at 40% 35%, rgba(255,248,240,0.86), transparent 35%),
    rgba(245, 239, 231, 0.42);
}

.state-change-note {
  padding: 0.25rem 0.5rem;
}

.state-change-continue {
  display: none !important;
}

.us-transition {
  min-height: 58vh;
  background:
    radial-gradient(circle at 50% 48%, rgba(196, 81, 44, 0.12), transparent 24rem),
    linear-gradient(180deg, #fff8f0 0%, rgba(247, 249, 249, 0.98) 100%);
}

.us-transition-inner {
  width: min(980px, 100%);
}

.us-transition p:not(.eyebrow) {
  background: rgba(255, 248, 240, 0.52);
  border: 1px solid rgba(143, 47, 27, 0.10);
  border-radius: 999px;
  padding: 0.9rem 1.15rem;
  backdrop-filter: blur(10px);
}

/* Improved state-change playback slider */
.state-change-slider-wrap input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  height: 0.75rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(196,81,44,0.28), rgba(196,81,44,0.10));
  border: 1px solid rgba(143,47,27,0.16);
  padding: 0;
}

.state-change-slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #c4512c;
  border: 3px solid #fff8f0;
  box-shadow: 0 0.18rem 0.6rem rgba(143,47,27,0.28);
}

.state-change-slider-wrap input[type="range"]::-moz-range-thumb {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #c4512c;
  border: 3px solid #fff8f0;
  box-shadow: 0 0.18rem 0.6rem rgba(143,47,27,0.28);
}

.state-change-slider-wrap input[type="range"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.state-change-slider-wrap input[type="range"]:disabled::-webkit-slider-thumb {
  background: #9a8b7a;
}

.state-change-slider-wrap input[type="range"]:disabled::-moz-range-thumb {
  background: #9a8b7a;
}

/* Align the state-change year pill, slider thumb, and tick labels. */
.state-change-slider-wrap {
  position: relative;
  --state-year-progress-ratio: 0;
}

.state-change-slider-top {
  min-height: 1.6rem;
}

.state-change-year-output {
  position: absolute;
  top: 1.55rem;
  left: calc(0.575rem + (100% - 1.15rem) * var(--state-year-progress-ratio));
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

.state-change-slider-wrap input[type="range"] {
  width: calc(100% - 1.15rem);
  margin: 1.55rem 0.575rem 0;
  box-sizing: border-box;
}

.state-change-slider-ticks {
  width: calc(100% - 1.15rem);
  margin: 0.28rem 0.575rem 0;
  padding: 0;
}

/* Final fix: make the state-change slider, year pill, and tick labels share one real width. */
.state-change-controls {
  align-items: center;
}

.state-change-slider-wrap {
  flex: 1 1 560px;
  min-width: 420px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.38rem;
  position: relative;
  --state-year-progress-ratio: 0;
}

.state-change-slider-label {
  display: block;
  color: #5f6b73;
  font-size: 0.88rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.state-change-slider-body {
  position: relative;
  width: 100%;
  padding-top: 2.05rem;
}

.state-change-year-output {
  position: absolute;
  top: 0;
  left: calc(var(--state-year-progress-ratio) * 100%);
  transform: translateX(-50%);
  min-width: 4.4rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(196, 81, 44, 0.12);
  color: #8f2f1b;
  font-size: 0.95rem;
  font-weight: 950;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

.state-change-year-output:first-child {
  transform: translateX(0);
}

.state-change-slider-wrap input[type="range"] {
  display: block;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.state-change-slider-ticks {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0.45rem 0 0;
  padding: 0;
  color: #9a8b7a;
  font-size: 0.72rem;
  font-weight: 850;
}

.state-change-slider-ticks span {
  text-align: center;
}

.state-change-slider-ticks span:first-child {
  text-align: left;
}

.state-change-slider-ticks span:last-child {
  text-align: right;
}

.state-change-slider-help {
  color: #7a858d;
  font-size: 0.86rem;
  font-style: italic;
  white-space: normal;
}

@media (max-width: 760px) {
  .state-change-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .state-change-slider-wrap {
    min-width: 0;
    width: 100%;
  }
}

/* Slider alignment final override: remove global input max-width and align pill/ticks to the real range track. */
.state-change-slider-wrap input[type="range"] {
  max-width: none !important;
}

.state-change-slider-body {
  --state-thumb-size: 1.15rem;
  position: relative;
  width: 100%;
  padding-top: 2.15rem;
}

.state-change-slider-body .state-change-year-output {
  position: absolute;
  top: 0;
  left: calc((var(--state-thumb-size) / 2) + (100% - var(--state-thumb-size)) * var(--state-year-progress-ratio));
  transform: translateX(-50%);
  z-index: 3;
}

.state-change-slider-body .state-change-year-output:first-child {
  transform: translateX(-50%);
}

.state-change-slider-body input[type="range"] {
  display: block;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.state-change-slider-body .state-change-slider-ticks {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0.55rem 0 0;
  padding: 0 calc(var(--state-thumb-size) / 2);
  box-sizing: border-box;
}

.state-change-slider-body .state-change-slider-ticks span {
  text-align: center;
}

.state-change-slider-body .state-change-slider-ticks span:first-child,
.state-change-slider-body .state-change-slider-ticks span:last-child {
  text-align: center;
}

/* Place the active year beside the YEAR label instead of floating above the slider. */
.state-change-slider-top {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  min-height: 2rem;
}

.state-change-slider-top .state-change-slider-label {
  display: inline-flex !important;
  margin: 0 !important;
}

.state-change-slider-top .state-change-year-output {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  min-width: 4.2rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(196, 81, 44, 0.12);
  color: #8f2f1b;
  font-size: 0.95rem;
  font-weight: 950;
  text-align: center;
}

.state-change-slider-body {
  padding-top: 0 !important;
}

.state-change-slider-body .state-change-year-output {
  display: none !important;
}

/* Final slider alignment: tick labels use the same visual track width as the range input. */
.state-change-slider-wrap input[type="range"] {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
.state-change-slider-body {
  width: 100% !important;
  padding-top: 0 !important;
}
.state-change-slider-ticks,
.state-change-slider-body .state-change-slider-ticks {
  display: flex !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0.55rem 0 0 !important;
  box-sizing: border-box !important;
}
.state-change-slider-ticks span,
.state-change-slider-body .state-change-slider-ticks span {
  flex: 0 0 auto !important;
  text-align: center !important;
  transform: none !important;
}
.state-change-slider-ticks span:first-child,
.state-change-slider-body .state-change-slider-ticks span:first-child {
  text-align: left !important;
}
.state-change-slider-ticks span:last-child,
.state-change-slider-body .state-change-slider-ticks span:last-child {
  text-align: right !important;
}

/* Keep newly added explanation steps immersive instead of card-like. */
.state-temperature-small-multiples text,
.threshold-explanation-viz text {
  paint-order: stroke;
  stroke: rgba(250, 244, 236, 0.55);
  stroke-width: 2px;
  stroke-linejoin: round;
}
.temp-state-panel path {
  filter: drop-shadow(0 10px 18px rgba(42, 27, 18, 0.10));
}

/* Immersive layout pass: reduce PPT/card feel and let visuals live on the page. */
:root {
  --glass-bg: rgba(255, 248, 240, 0.48);
  --glass-bg-soft: rgba(255, 248, 240, 0.30);
  --glass-border: rgba(143, 47, 27, 0.10);
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(196, 81, 44, 0.10), transparent 34rem),
    radial-gradient(circle at 90% 36%, rgba(136, 178, 196, 0.16), transparent 30rem),
    linear-gradient(180deg, #fff8f0 0%, #f7f1ea 36%, #edf2f4 100%);
}

/* Main scrollytelling no longer sits inside a heavy card. */
.scrolly {
  max-width: none;
  width: 100%;
  grid-template-columns: minmax(560px, 61vw) minmax(340px, 39vw);
  gap: clamp(1rem, 2vw, 2rem);
  padding: 0 clamp(1.1rem, 3vw, 3rem) 5rem;
}

.graphic {
  top: 0;
  height: 100vh;
}

.sticky-viz {
  height: 100vh;
  padding: clamp(0.8rem, 1.4vw, 1.35rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  grid-template-rows: auto minmax(460px, 1fr) auto;
}

.viz-header,
.legend-row {
  width: fit-content;
  max-width: min(980px, 100%);
  padding: 0.82rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  box-shadow: none;
}

.viz-header {
  align-items: flex-start;
}

.chart-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

#main-chart {
  min-height: 520px;
}

.placeholder-legend,
.trend-summary,
.map-year-overlay {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.placeholder-legend {
  font-family: inherit;
  border-radius: 999px;
}

.trend-summary {
  border-radius: 22px;
}

.story {
  position: relative;
}

.step {
  min-height: 96vh;
  padding: 8vh 0 8vh clamp(0.4rem, 1vw, 1rem);
  opacity: 0.18;
}

.step.is-active {
  opacity: 1;
}

.step-number {
  width: fit-content;
  padding: 0.38rem 0.64rem;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.34);
  border: 1px solid rgba(143, 47, 27, 0.08);
  backdrop-filter: blur(8px);
}

.step h2 {
  max-width: 620px;
}

.step p:not(.step-number) {
  width: fit-content;
  max-width: 560px;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: var(--glass-bg-soft);
  border: 1px solid rgba(143, 47, 27, 0.08);
  backdrop-filter: blur(10px);
}

.step.is-active h2 {
  text-shadow: 0 1px 0 rgba(255, 248, 240, 0.42);
}

/* Intro and personalized sections: keep explanatory text translucent, not boxed like slides. */
.expectation-intro,
.expectation-result-copy,
.state-change-copy,
.us-transition p:not(.eyebrow) {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.expectation-intro {
  padding: 0.95rem 1rem;
}

.expectation-result-card,
.state-change-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.expectation-value-card {
  min-height: 86px;
  border: 0;
  border-left: 3px solid rgba(143, 47, 27, 0.16);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.expectation-value-card.is-closest {
  border-left-color: var(--accent);
  background: rgba(255, 234, 219, 0.36);
  border-radius: 16px;
}

.state-change-state-card.state-shape-card,
.state-shape-stage {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.state-change-map-cards {
  gap: clamp(0.5rem, 1vw, 1rem);
}

.state-change-controls {
  border-radius: 999px;
  background: var(--glass-bg);
  border-color: var(--glass-border);
}

.state-change-play-toggle {
  transition: transform 0.16s ease, background 0.16s ease;
}
.state-change-play-toggle:hover,
.state-change-play-toggle:focus-visible {
  transform: translateY(-1px);
  background: #243241;
}

/* Detail/explore area flatter and more web-like. */
.daily-card,
.monthly-chart-card,
.detail-card,
.explore-card {
  background: var(--glass-bg-soft) !important;
  border-color: var(--glass-border) !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px);
}

/* SVG labels should feel integrated, not boxed. */
.translation-card-viz > rect:first-child {
  opacity: 0.22;
}
.hotday-state-panel text,
.threshold-state-panel text,
.threshold-explanation-viz text,
.state-hotday-small-multiples text {
  paint-order: stroke;
  stroke: rgba(255, 248, 240, 0.62);
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
.hotday-state-panel .mini-state-shape,
.threshold-state-panel path,
.temp-state-panel path {
  filter: drop-shadow(0 12px 20px rgba(42, 27, 18, 0.11));
}

/* Keep controls interactive without dominating the page. */
.controls label,
select {
  background: rgba(255, 248, 240, 0.42);
  border-radius: 12px;
}
select {
  border-color: rgba(143, 47, 27, 0.12);
}
input[type="range"] {
  cursor: pointer;
}

@media (max-width: 980px) {
  .scrolly {
    display: block;
    padding: 0 1rem 4rem;
  }
  .graphic {
    position: sticky;
    top: 0;
    height: 62vh;
    z-index: 1;
  }
  .sticky-viz {
    height: 62vh;
    grid-template-rows: auto 1fr auto;
  }
  .story {
    position: relative;
    z-index: 2;
  }
  .step {
    min-height: 68vh;
  }
}

/* Final state-change slider tick alignment: tick labels line up with the thumb centers. */
.state-change-slider-body {
  --state-thumb-size: 1.15rem;
}
.state-change-slider-body .state-change-slider-ticks {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  width: 100% !important;
  padding: 0 calc(var(--state-thumb-size) / 2) !important;
  margin: 0.55rem 0 0 !important;
  box-sizing: border-box !important;
}
.state-change-slider-body .state-change-slider-ticks span,
.state-change-slider-body .state-change-slider-ticks span:first-child,
.state-change-slider-body .state-change-slider-ticks span:last-child {
  text-align: center !important;
  transform: none !important;
}

/* Final refinement: align state-change slider ticks to the actual range track. */
.state-change-slider-wrap input[type="range"] {
  width: 100% !important;
  max-width: none !important;
  display: block !important;
  margin: 0 !important;
}
.state-change-slider-body {
  position: relative !important;
  width: 100% !important;
  padding-top: 0 !important;
}
.state-change-slider-body .state-change-slider-ticks {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 1.15rem !important;
  padding: 0 !important;
  margin: 0.55rem 0 0 !important;
}
.state-change-slider-body .state-change-slider-ticks span {
  position: absolute !important;
  top: 0 !important;
  width: max-content !important;
  text-align: center !important;
  transform: translateX(-50%) !important;
  font-size: 0.72rem !important;
}
.state-change-slider-body .state-change-slider-ticks span:nth-child(1) { left: 0% !important; transform: translateX(0) !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(2) { left: 25% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(3) { left: 50% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(4) { left: 75% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(5) { left: 100% !important; transform: translateX(-100%) !important; }

/* Fine tune: lift Plot 01 legend/notes slightly to reduce crowding. */
.legend-row {
  transform: translateY(-0.45rem);
}

/* Precise state-change slider tick alignment: labels use the same usable track width as the thumb center. */
.state-change-slider-body {
  --state-slider-thumb: 1.15rem;
  position: relative;
}

.state-change-slider-body input[type="range"] {
  width: calc(100% - var(--state-slider-thumb)) !important;
  margin-left: calc(var(--state-slider-thumb) / 2) !important;
  margin-right: calc(var(--state-slider-thumb) / 2) !important;
}

.state-change-slider-body .state-change-slider-ticks {
  position: relative !important;
  display: block !important;
  width: calc(100% - var(--state-slider-thumb)) !important;
  height: 1.1rem !important;
  margin: 0.45rem calc(var(--state-slider-thumb) / 2) 0 !important;
  padding: 0 !important;
}

.state-change-slider-body .state-change-slider-ticks span {
  position: absolute !important;
  top: 0 !important;
  transform: translateX(-50%) !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.state-change-slider-body .state-change-slider-ticks span:nth-child(1) { left: 0% !important; transform: translateX(0) !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(2) { left: 25% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(3) { left: 50% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(4) { left: 75% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(5) { left: 100% !important; transform: translateX(-100%) !important; }

/* FINAL: center tick labels exactly under the state-change slider thumb positions. */
.state-change-slider-body {
  width: 100% !important;
  position: relative !important;
  overflow: visible !important;
  --state-slider-thumb: 18px;
}

.state-change-slider-body input#state-change-year-slider[type="range"] {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  display: block !important;
}

.state-change-slider-body .state-change-slider-ticks {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 1.25rem !important;
  margin: 0.52rem 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.state-change-slider-body .state-change-slider-ticks span {
  position: absolute !important;
  top: 0 !important;
  width: 3.2rem !important;
  margin-left: -1.6rem !important;
  text-align: center !important;
  transform: none !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

.state-change-slider-body .state-change-slider-ticks span:nth-child(1) { left: 0% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(2) { left: 25% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(3) { left: 50% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(4) { left: 75% !important; }
.state-change-slider-body .state-change-slider-ticks span:nth-child(5) { left: 100% !important; }

/* Robust custom state-change slider: no native range alignment drift. */
.state-change-slider-body {
  position: relative !important;
  width: 100% !important;
  overflow: visible !important;
  padding: 0.15rem 0 0 !important;
}

.state-change-custom-slider {
  --track-h: 0.62rem;
  --thumb: 1.18rem;
  position: relative;
  width: 100%;
  height: 1.35rem;
  cursor: pointer;
  touch-action: none;
  outline: none;
  margin: 0.05rem 0 0;
}

.state-change-custom-slider.is-disabled {
  cursor: default;
  opacity: 0.96;
}

.state-change-custom-track,
.state-change-custom-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: var(--track-h);
  transform: translateY(-50%);
  border-radius: 999px;
}

.state-change-custom-track {
  width: 100%;
  background: rgba(196, 81, 44, 0.18);
  border: 1px solid rgba(196, 81, 44, 0.18);
}

.state-change-custom-fill {
  width: calc(var(--state-year-progress-ratio, 0) * 100%);
  background: rgba(196, 81, 44, 0.35);
}

.state-change-custom-thumb {
  position: absolute;
  left: calc(var(--state-year-progress-ratio, 0) * 100%);
  top: 50%;
  width: var(--thumb);
  height: var(--thumb);
  border-radius: 999px;
  background: #c4512c;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(143, 47, 27, 0.28);
  transform: translate(-50%, -50%);
  transition: left 180ms ease;
}

.state-change-custom-slider:focus-visible .state-change-custom-thumb {
  box-shadow: 0 0 0 4px rgba(196, 81, 44, 0.18), 0 2px 10px rgba(143, 47, 27, 0.28);
}

.state-change-slider-body .state-change-slider-ticks {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 1.25rem !important;
  margin: 0.45rem 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.state-change-slider-body .state-change-slider-ticks button {
  position: absolute !important;
  top: 0 !important;
  width: 3.4rem !important;
  margin-left: -1.7rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #9a8b7f !important;
  font: inherit !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-align: center !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

.state-change-slider-body .state-change-slider-ticks button:nth-child(1) { left: 0% !important; }
.state-change-slider-body .state-change-slider-ticks button:nth-child(2) { left: 25% !important; }
.state-change-slider-body .state-change-slider-ticks button:nth-child(3) { left: 50% !important; }
.state-change-slider-body .state-change-slider-ticks button:nth-child(4) { left: 75% !important; }
.state-change-slider-body .state-change-slider-ticks button:nth-child(5) { left: 100% !important; }

.state-change-slider-body .state-change-slider-ticks button:hover,
.state-change-slider-body .state-change-slider-ticks button:focus-visible {
  color: #8f2f1b !important;
  outline: none;
}

/* Move the oval slider control group slightly to the right. */
.state-change-controls {
  transform: translateX(3rem) !important;
}

@media (max-width: 980px) {
  .state-change-controls {
    transform: none !important;
  }
}

/* Fix slider oval positioning: move by layout, not visual transform. */
.state-change-controls {
  transform: none !important;
  margin-left: 3rem !important;
  margin-right: auto !important;
}

@media (max-width: 980px) {
  .state-change-controls {
    transform: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Final placement fix: move the slider oval to the right using layout, while keeping 2100 inside the oval. */
.state-change-controls {
  transform: none !important;
  margin-left: clamp(5.5rem, 11vw, 8rem) !important;
  margin-right: auto !important;
  max-width: min(780px, calc(100vw - 3rem)) !important;
  padding: 0.85rem 2.35rem 0.9rem 1rem !important;
  box-sizing: border-box !important;
}

.state-change-slider-wrap {
  flex: 1 1 560px !important;
  min-width: 500px !important;
}

.state-change-slider-body {
  box-sizing: border-box !important;
  padding: 0.15rem 1.8rem 0 !important;
  overflow: visible !important;
}

.state-change-custom-slider,
.state-change-slider-body .state-change-slider-ticks {
  width: 100% !important;
}

@media (max-width: 980px) {
  .state-change-controls {
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0.85rem 1.35rem 0.9rem 1rem !important;
  }
  .state-change-slider-wrap {
    min-width: 0 !important;
  }
  .state-change-slider-body {
    padding-left: 1.2rem !important;
    padding-right: 1.2rem !important;
  }
}

/* Final slider-oval fix: do not shift it right; make the oval longer so 2100 stays inside. */
.state-change-controls {
  transform: none !important;
  width: min(900px, calc(100vw - 10rem)) !important;
  max-width: 900px !important;
  margin-left: 3rem !important;
  margin-right: auto !important;
  padding: 0.85rem 1.75rem 0.9rem 1rem !important;
  box-sizing: border-box !important;
}

.state-change-slider-wrap {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.state-change-slider-body {
  padding: 0.15rem 1.05rem 0 !important;
}

@media (max-width: 980px) {
  .state-change-controls {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0.85rem 1.25rem 0.9rem 1rem !important;
  }
}

/* Final state-change page layout: return slider position and fit the section into one viewport. */
.state-change-result {
  min-height: 100vh !important;
  padding: clamp(1.1rem, 2.2vw, 2rem) clamp(1.2rem, 4vw, 4rem) !important;
  display: grid !important;
  place-items: center !important;
}

.state-change-card {
  width: min(1180px, 100%) !important;
  min-height: auto !important;
  max-height: calc(100vh - 2.2rem) !important;
  display: grid !important;
  grid-template-rows: auto auto 1fr auto !important;
  gap: clamp(0.55rem, 1vw, 0.9rem) !important;
  padding: clamp(1rem, 1.8vw, 1.45rem) clamp(1.1rem, 2.4vw, 2rem) !important;
  overflow: hidden !important;
}

.state-change-copy {
  max-width: 1000px !important;
  padding: 0.65rem 0.85rem !important;
  border-radius: 22px !important;
}

.state-change-copy .eyebrow {
  margin-bottom: 0.4rem !important;
}

.state-change-copy h2 {
  margin: 0.1rem 0 0.45rem !important;
  font-size: clamp(2.35rem, 4.2vw, 4.25rem) !important;
  line-height: 0.96 !important;
}

.state-change-copy p:not(.eyebrow) {
  max-width: 880px !important;
  font-size: clamp(0.96rem, 1.35vw, 1.12rem) !important;
  line-height: 1.42 !important;
}

.state-change-blocks {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto 1fr !important;
  gap: clamp(0.55rem, 1vw, 0.85rem) !important;
  min-height: 0 !important;
}

.state-change-controls {
  width: min(760px, 100%) !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  transform: none !important;
  padding: 0.65rem 1.25rem 0.68rem 0.8rem !important;
  align-self: center !important;
  box-sizing: border-box !important;
}

.state-change-slider-wrap {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.state-change-slider-body {
  padding: 0.05rem 0.65rem 0 !important;
}

.state-change-map-cards {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(0.75rem, 1.3vw, 1.05rem) !important;
  align-items: stretch !important;
}

.state-change-state-card.state-shape-card {
  min-height: 0 !important;
  grid-template-rows: auto minmax(145px, 1fr) auto auto !important;
  padding: clamp(0.85rem, 1.4vw, 1.15rem) !important;
}

.state-change-card-header h3 {
  font-size: clamp(1.35rem, 2.4vw, 2.1rem) !important;
}

.state-change-card-header span {
  font-size: 0.64rem !important;
  padding: 0.28rem 0.52rem !important;
}

.state-change-year-pill {
  min-width: 58px !important;
  padding: 0.42rem 0.54rem !important;
  font-size: 0.95rem !important;
}

.state-shape-stage {
  min-height: 150px !important;
  margin: 0.45rem 0 0.35rem !important;
}

.state-shape-svg {
  min-height: 145px !important;
}

.state-change-value-row strong {
  font-size: clamp(2rem, 4.1vw, 3.6rem) !important;
}

.state-change-value-row small,
.state-change-state-note,
.state-change-note {
  font-size: 0.76rem !important;
  line-height: 1.28 !important;
}

.state-change-state-note {
  margin-top: 0.4rem !important;
}

.state-change-note {
  margin-top: 0.1rem !important;
}

@media (max-width: 900px), (max-height: 760px) {
  .state-change-card {
    max-height: none !important;
    overflow: visible !important;
  }
  .state-change-result {
    min-height: auto !important;
    padding-top: 1.2rem !important;
    padding-bottom: 1.2rem !important;
  }
  .state-change-map-cards {
    grid-template-columns: 1fr !important;
  }
  .state-change-controls {
    width: min(720px, 100%) !important;
  }
}

/* Final state-change control alignment: keep the oval left-aligned with the page content
   and keep the active year directly beside the YEAR label. */
.state-change-card .state-change-controls {
  width: min(900px, 100%) !important;
  max-width: 900px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  transform: none !important;
  align-self: start !important;
  justify-self: start !important;
  padding: 0.72rem 1.35rem 0.78rem 0.85rem !important;
}

.state-change-card .state-change-slider-top {
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 0.55rem !important;
  min-height: 1.6rem !important;
  margin-bottom: 0.2rem !important;
}

.state-change-card .state-change-slider-label {
  margin: 0 !important;
  letter-spacing: 0.08em !important;
}

.state-change-card #state-change-year-output,
.state-change-card .state-change-year-output {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  min-width: 4.25rem !important;
  padding: 0.26rem 0.72rem !important;
  text-align: center !important;
}

.state-change-card .state-change-slider-body {
  padding: 0.06rem 0.75rem 0 !important;
}

@media (max-width: 900px), (max-height: 760px) {
  .state-change-card .state-change-controls {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}




/* Hero factory-smoke background — toned down so it does not cover the title */
.hero-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, #fff8f0 0%, #f6e3d1 58%, #e9c7a3 100%);
}

.hero-emissions-bg {
  position: absolute;
  top: -2.5rem;
  left: -2px;
  right: -2px;
  bottom: -10rem;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  transform: scale(1.08);
  transform-origin: center top;
}

.hero-emissions-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-section h1,
.hero-section .subtitle,
.hero-section .eyebrow {
  position: relative;
  z-index: 3;
}

.expectation-intro {
  position: relative;
  z-index: 4;
  background: rgba(255, 248, 240, 0.82);
  backdrop-filter: blur(14px);
}

.hero-smoke-canopy,
.hero-plumes,
.hero-factory-silhouette {
  fill: #050606;
}

.hero-smoke-canopy {
  opacity: 0.88;
}

.hero-plumes {
  opacity: 0.78;
}

.hero-factory-silhouette {
  opacity: 0.95;
}

.hero-horizon-lines line {
  stroke: #050606;
  stroke-width: 3;
}

.hero-smoke-contours,
.hero-plume-contours {
  fill: none;
  stroke: rgba(255, 248, 240, 0.95);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.hero-plume-contours {
  stroke-width: 3.5;
  opacity: 0.75;
}

@media (max-width: 860px) {
  .hero-emissions-bg {
    top: -1.5rem;
    left: -2px;
    right: -2px;
    bottom: -7rem;
    opacity: 0.14;
    transform: scale(1.05);
  }
}

/* =========================================================
   FINAL HERO + INTRO DROPDOWN OVERRIDES
   Added after factory-smoke background refinement.
   ========================================================= */

/* Keep the factory/smoke SVG as a soft background layer. */
.hero-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, #fff8f0 0%, #f6e3d1 58%, #e9c7a3 100%);
}

.hero-emissions-bg {
  position: absolute;
  top: -2.5rem;
  left: -2px;
  right: -2px;
  bottom: -10rem;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  transform: scale(1.08);
  transform-origin: center top;
}

.hero-emissions-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-section h1,
.hero-section .subtitle,
.hero-section .eyebrow {
  position: relative;
  z-index: 3;
}

/* Slightly stronger text contrast now that the hero has a background illustration. */
.hero-section .eyebrow {
  color: #9a321e;
  text-shadow: 0 1px 10px rgba(255, 248, 240, 0.75);
}

.hero-section h1 {
  color: #14202c;
  text-shadow: 0 2px 18px rgba(255, 248, 240, 0.72);
}

.hero-section .subtitle {
  color: #53616c;
  text-shadow: 0 1px 10px rgba(255, 248, 240, 0.78);
}

.expectation-intro {
  position: relative;
  z-index: 4;
  overflow: visible;
  background: rgba(255, 248, 240, 0.88);
  border: 1px solid rgba(143, 47, 27, 0.10);
  box-shadow: 0 24px 70px rgba(80, 52, 35, 0.12);
  backdrop-filter: blur(16px);
}

.expectation-form,
.expectation-field {
  overflow: visible;
}

.expectation-prompt {
  color: #17202b;
}

.expectation-field span {
  color: #9a321e;
}

.intro-form-note {
  color: #68747b;
}

.intro-locked-cue,
.scroll-cue {
  color: rgba(70, 78, 84, 0.72);
  text-shadow: 0 1px 8px rgba(255, 248, 240, 0.65);
}

/* State suggestions dropdown with vertical scrollbar */
.state-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 1000;

  display: none;
  max-height: 230px;
  overflow-y: scroll;
  overflow-x: hidden;

  padding: 0.35rem;
  border: 1px solid rgba(143, 47, 27, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(40, 55, 70, 0.16);
  backdrop-filter: blur(12px);
}

.state-suggestions.is-open {
  display: block;
}

.state-suggestion-item {
  display: block;
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.state-suggestion-item:hover,
.state-suggestion-item:focus-visible {
  background: rgba(196, 81, 44, 0.10);
  color: var(--accent-dark);
  outline: none;
}

/* Visible scrollbar styling */
.state-suggestions::-webkit-scrollbar {
  width: 8px;
}

.state-suggestions::-webkit-scrollbar-track {
  background: rgba(244, 226, 209, 0.7);
  border-radius: 999px;
}

.state-suggestions::-webkit-scrollbar-thumb {
  background: rgba(143, 47, 27, 0.42);
  border-radius: 999px;
}

.state-suggestions::-webkit-scrollbar-thumb:hover {
  background: rgba(143, 47, 27, 0.65);
}

/* Firefox scrollbar */
.state-suggestions {
  scrollbar-width: thin;
  scrollbar-color: rgba(143, 47, 27, 0.5) rgba(244, 226, 209, 0.7);
}

/* Make sure dropdown is not clipped by parent containers */
.expectation-intro,
.expectation-form,
.expectation-field {
  overflow: visible;
}

.expectation-field {
  position: relative;
}


.state-suggestions {
  overscroll-behavior: contain;
  touch-action: pan-y;
}


/* Forecast check SVG sun decoration */
#expectation-result,
.expectation-result {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.forecast-svg-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.forecast-svg-decor svg {
  width: 100%;
  height: 100%;
  display: block;
}

#expectation-result > *:not(.forecast-svg-decor),
.expectation-result > *:not(.forecast-svg-decor) {
  position: relative;
  z-index: 1;
}

.forecast-sun-svg {
  opacity: 0.58;
  transform-origin: 1115px 155px;
  animation: forecastSunFloat 9s ease-in-out infinite alternate,
             forecastSunGlow 6s ease-in-out infinite;
}

.forecast-sun-ring-svg {
  fill: none;
  stroke: rgba(196, 81, 44, 0.11);
  stroke-width: 2.2;
  stroke-dasharray: 10 14;
  stroke-linecap: round;
  animation: forecastRingPulse 8s ease-in-out infinite;
}

.forecast-sun-ring-svg.ring-soft {
  stroke: rgba(196, 81, 44, 0.08);
  stroke-width: 1.8;
  stroke-dasharray: 8 18;
}

.forecast-sun-ring-svg.ring-softer {
  stroke: rgba(196, 81, 44, 0.05);
  stroke-width: 1.5;
  stroke-dasharray: 6 20;
}

.forecast-sun-ray-svg {
  stroke: rgba(196, 81, 44, 0.10);
  stroke-width: 2.5;
  stroke-linecap: round;
  animation: forecastRayPulse 7s ease-in-out infinite;
}

.forecast-heat-waves-svg {
  fill: none;
  stroke: rgba(196, 81, 44, 0.08);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.42;
  animation: forecastHeatDrift 8s ease-in-out infinite alternate;
}

.forecast-heat-dots-svg {
  fill: rgba(196, 81, 44, 0.16);
  animation: forecastDotFloat 7s ease-in-out infinite alternate;
}

.forecast-lower-glow-svg {
  opacity: 0.7;
}

@keyframes forecastSunFloat {
  from {
    transform: translateX(-860px) translateY(-78px) scale(0.94);
  }

  to {
    transform: translateX(-845px) translateY(-66px) scale(0.98);
  }
}

@keyframes forecastSunGlow {
  0% {
    opacity: 0.50;
    filter: brightness(0.98);
  }

  50% {
    opacity: 0.66;
    filter: brightness(1.05);
  }

  100% {
    opacity: 0.54;
    filter: brightness(1);
  }
}

@keyframes forecastRingPulse {
  0% {
    opacity: 0.45;
    transform: scale(0.985);
  }

  50% {
    opacity: 0.72;
    transform: scale(1.01);
  }

  100% {
    opacity: 0.5;
    transform: scale(0.992);
  }
}

@keyframes forecastRayPulse {
  0% {
    opacity: 0.30;
  }

  50% {
    opacity: 0.55;
  }

  100% {
    opacity: 0.34;
  }
}

@keyframes forecastHeatDrift {
  from {
    transform: translateY(0);
    opacity: 0.48;
  }

  to {
    transform: translateY(-12px);
    opacity: 0.76;
  }
}

@keyframes forecastDotFloat {
  from {
    transform: translateY(0);
    opacity: 0.10;
  }

  to {
    transform: translateY(-10px);
    opacity: 0.22;
  }
}

@media (max-width: 900px) {
  .forecast-sun-svg {
    opacity: 0.55;
    transform: translateX(80px) scale(0.82);
  }

  .forecast-heat-waves-svg,
  .forecast-heat-dots-svg {
    opacity: 0.35;
  }
}

/* =========================
   Expectation result - thermometer version
   ========================= */

.expectation-result-card {
  grid-template-columns: minmax(360px, 1.02fr) minmax(430px, 0.98fr);
  gap: 1.3rem;
}

.expectation-result-values {
  display: block;
}

.thermometer-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.35rem 0.2rem 0.4rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.thermometer-panel-heading {
  color: #5f7284;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.thermometer-wrap {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
}

.thermometer-figure {
  position: relative;
  height: 420px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.thermometer-scale-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #6a7c8f;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.thermometer-scale-top {
  top: 0;
}

.thermometer-scale-bottom {
  bottom: 0;
}

.thermometer-meter {
  position: relative;
  width: 120px;
  height: 100%;
}

.thermometer-track {
  position: absolute;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  width: 30px;
  height: 320px;
  border-radius: 999px;
  border: 2px solid rgba(196, 81, 44, 0.18);
  background: linear-gradient(
    180deg,
    rgba(246, 237, 226, 0.92) 0%,
    rgba(239, 226, 208, 0.96) 100%
  );
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.thermometer-projection-band {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(132, 177, 82, 0.25) 0%,
    rgba(240, 183, 60, 0.26) 52%,
    rgba(216, 107, 66, 0.26) 100%
  );
}

.thermometer-liquid {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  min-height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #ffd96a 0%,
    #ef9b42 55%,
    #cf5a36 100%
  );
}

.thermometer-bulb {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 78px;
  height: 78px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255, 243, 223, 0.98);
  border: 2px solid rgba(196, 81, 44, 0.18);
  box-shadow: 0 8px 20px rgba(40, 55, 70, 0.08);
}

.thermometer-bulb::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 36% 30%,
    #ffe18d 0%,
    #ef9b42 62%,
    #cf5a36 100%
  );
}

.thermometer-projection-tick {
  position: absolute;
  left: 50%;
  width: 44px;
  height: 2px;
  transform: translateX(-50%);
  background: rgba(23, 32, 42, 0.32);
  border-radius: 999px;
  z-index: 3;
}

.thermometer-projection-tick.is-closest {
  width: 52px;
  height: 3px;
  background: #c4512c;
}

.thermometer-user-marker {
  position: absolute;
  right: calc(50% + 20px);
  left: auto;
  transform: translateY(50%);
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0.55rem;
  z-index: 4;
}

.thermometer-user-line {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: #17202a;
}

.thermometer-user-bubble {
  min-width: 144px;
  padding: 0.55rem 0.7rem;
  border-radius: 16px;
  background: #fffdf8;
  border: 1px solid rgba(23, 32, 42, 0.10);
  box-shadow: 0 8px 20px rgba(40, 55, 70, 0.08);
  text-align: right;
}

.thermometer-user-bubble span {
  display: block;
  color: #6b7d90;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.thermometer-user-bubble strong {
  display: block;
  margin-top: 0.12rem;
  color: #17202a;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.thermometer-side {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.thermometer-you-card {
  padding: 0.15rem 0 0.4rem;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.thermometer-you-card span {
  display: block;
  color: #6b7d90;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.thermometer-you-card strong {
  display: block;
  margin-top: 0.22rem;
  color: #17202a;
  font-size: 1.9rem;
  letter-spacing: -0.05em;
}

.thermometer-you-card small {
  display: block;
  margin-top: 0.28rem;
  color: #708191;
  font-size: 0.82rem;
  line-height: 1.35;
}

.thermometer-range-note {
  color: #5c6e80;
  font-size: 0.92rem;
  line-height: 1.45;
}

.thermometer-range-note strong {
  color: #17202a;
}

.thermometer-legend {
  display: grid;
  gap: 0.7rem;
}

.thermometer-legend-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.62rem 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(23, 32, 42, 0.08);
}

.thermometer-legend-row.is-closest {
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 244, 230, 0.45);
  border: 1px solid rgba(196, 81, 44, 0.18);
}

.thermometer-legend-row:last-child {
  border-bottom: none;
}

.thermometer-swatch {
  width: 14px;
  height: 14px;
  margin-top: 0.18rem;
  border-radius: 50%;
}

.thermometer-swatch.swatch-ssp126 {
  background: #8ab454;
}

.thermometer-swatch.swatch-ssp245 {
  background: #efb23d;
}

.thermometer-swatch.swatch-ssp585 {
  background: #d86b42;
}

.thermometer-legend-copy strong {
  display: block;
  color: #17202a;
  font-size: 0.98rem;
  line-height: 1.2;
}

.thermometer-legend-copy small {
  display: block;
  margin-top: 0.12rem;
  color: #6d7f91;
  font-size: 0.82rem;
  line-height: 1.35;
}

.thermometer-summary {
  margin: 0;
  color: #5d7083;
  font-size: 0.94rem;
  line-height: 1.55;
}

.thermometer-summary strong {
  color: #17202a;
}

/* mobile */
@media (max-width: 980px) {
  .thermometer-wrap {
    grid-template-columns: 1fr;
  }

  .thermometer-figure {
    height: 360px;
  }

  .thermometer-meter {
    width: 150px;
  }

  .thermometer-user-bubble {
    min-width: 132px;
  }
}

@media (max-width: 860px) {
  .expectation-result-card {
    grid-template-columns: 1fr;
  }

  .thermometer-figure {
    height: 330px;
  }

  .thermometer-track {
    height: 250px;
  }

  .thermometer-user-marker {
    right: calc(50% + 14px);
    left: auto;
  }

  .thermometer-user-line {
    width: 18px;
  }

  .thermometer-user-bubble {
    padding: 0.5rem 0.62rem;
  }

  .thermometer-you-card strong {
    font-size: 1.7rem;
  }
}


/* State comparison diverging color legend */
.state-change-footer {
  width: min(980px, 88vw);
  margin: 1.2rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

.state-change-footer .state-change-note {
  margin: 0;
  width: auto;
  text-align: center;
}

.state-change-color-legend {
  display: grid;
  justify-items: center;
  gap: 0.38rem;
  color: #6a7580;
  font-size: 0.78rem;
  font-weight: 750;
}

.state-change-color-legend .legend-title {
  color: #5f6e7b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legend-scale-row {
  display: grid;
  grid-template-columns: auto 340px auto;
  gap: 0.65rem;
  align-items: center;
  white-space: nowrap;
}

.legend-gradient {
  width: 340px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #3b6ea8 0%,
    #d8e7f2 28%,
    #fff8f0 50%,
    #f2b18a 72%,
    #b3161b 100%
  );
  box-shadow: inset 0 0 0 1px rgba(23, 32, 42, 0.10);
}

.legend-midpoint {
  text-align: center;
  color: #7a8792;
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
}

@media (max-width: 760px) {
  .state-change-footer {
    align-items: flex-start;
    gap: 0.9rem;
  }

  .legend-scale-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .legend-gradient {
    width: 160px;
  }
}



/* =========================
   State comparison layout fix
   Keep two states side-by-side + prevent map clipping
   ========================= */

/* Make this section slightly more compact so the maps are not pushed into the footer */
.state-change-result {
  min-height: 100vh;
  padding-top: clamp(1.2rem, 2.2vh, 2.2rem);
  padding-bottom: clamp(1.4rem, 2.5vh, 2.4rem);
  overflow: visible;
}

.state-change-card {
  width: min(1120px, 88vw);
  margin-inline: auto;
  overflow: visible;
}

/* Reduce the top card height a little */
.state-change-copy {
  padding: clamp(1rem, 1.8vw, 1.35rem);
  margin-bottom: clamp(0.8rem, 1.6vh, 1.2rem);
}

.state-change-copy h2 {
  font-size: clamp(3rem, 5.8vw, 5.9rem);
  line-height: 0.98;
}

.state-change-copy p {
  max-width: 980px;
  font-size: clamp(1rem, 1.2vw, 1.22rem);
}

/* Make the slider a little more compact */
.state-change-controls {
  width: min(980px, 82vw);
  margin: 0 auto clamp(1.05rem, 2vh, 1.45rem);
  padding: clamp(0.75rem, 1.3vw, 1rem);
  overflow: visible;
}

/* Force the two state cards to stay left-right instead of stacking */
.state-change-map-cards {
  width: min(1040px, 88vw);
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: clamp(1.4rem, 5vw, 4.5rem);
  align-items: start;
  overflow: visible;
}

/* Make each card flexible and prevent internal clipping */
.state-change-state-card,
.state-shape-card {
  min-width: 0;
  overflow: visible;
}

/* Give map shapes enough vertical room */
.state-shape-stage {
  height: clamp(180px, 22vh, 245px);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.state-shape-svg {
  width: min(100%, 340px);
  height: 100%;
  overflow: visible;
  display: block;
}

/* Make the year pill stay near the state card, not too far outside */
.state-change-year-pill {
  transform: none;
}

/* Keep values visible below the shapes */
.state-change-value-row {
  margin-top: clamp(0.25rem, 0.8vh, 0.7rem);
}

/* Put the legend clearly below both state maps */
.state-change-footer {
  width: min(1040px, 88vw);
  margin: clamp(1rem, 2vh, 1.5rem) auto 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
  position: relative;
  z-index: 3;
}

/* Longer legend */
.legend-scale-row {
  display: grid;
  grid-template-columns: auto minmax(260px, 360px) auto;
  gap: 0.7rem;
  align-items: center;
  white-space: nowrap;
}

.legend-gradient {
  width: 100%;
  height: 12px;
  border-radius: 999px;
}

/* Important: override any earlier mobile rule that stacks the cards */
@media (max-width: 900px) {
  .state-change-map-cards {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 1.2rem;
  }

  .state-change-copy h2 {
    font-size: clamp(2.35rem, 8vw, 4.6rem);
  }

  .state-shape-stage {
    height: 175px;
    min-height: 175px;
  }

  .state-change-state-card h3 {
    font-size: clamp(1.4rem, 4vw, 2rem);
  }

  .legend-scale-row {
    grid-template-columns: auto minmax(200px, 280px) auto;
  }
}

@media (max-width: 620px) {
  .state-change-card {
    width: 94vw;
  }

  .state-change-map-cards {
    width: 94vw;
    gap: 0.8rem;
  }

  .state-shape-stage {
    height: 155px;
    min-height: 155px;
  }

  .state-change-value-row strong {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .state-change-state-note {
    display: none;
  }

  .legend-scale-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .legend-gradient {
    width: 240px;
  }
}
/* =========================================================
   FINAL FIX — state comparison layout
   Fixes map/value clipping and keeps the two state maps side-by-side.
   Add this at the very end of style.css.
   ========================================================= */

.state-change-result {
  min-height: 100vh !important;
  height: auto !important;
  padding: clamp(1.4rem, 3vh, 2.6rem) clamp(1.2rem, 4vw, 4rem) clamp(2rem, 4vh, 3rem) !important;
  display: block !important;
  overflow: visible !important;
}

.state-change-card {
  width: min(1180px, 90vw) !important;
  max-width: 1180px !important;
  min-height: auto !important;
  max-height: none !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(0.95rem, 1.8vh, 1.35rem) !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.state-change-copy {
  width: min(1000px, 100%) !important;
  max-width: 1000px !important;
  margin: 0 !important;
  padding: clamp(0.9rem, 1.6vw, 1.25rem) clamp(1rem, 2vw, 1.35rem) !important;
  border-radius: 24px !important;
}

.state-change-copy h2 {
  margin: 0.1rem 0 0.45rem !important;
  font-size: clamp(2.6rem, 4.8vw, 4.7rem) !important;
  line-height: 0.98 !important;
}

.state-change-copy p:not(.eyebrow) {
  max-width: 980px !important;
  font-size: clamp(0.98rem, 1.25vw, 1.12rem) !important;
  line-height: 1.45 !important;
}

.state-change-blocks {
  width: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(0.9rem, 1.7vh, 1.25rem) !important;
  overflow: visible !important;
}

.state-change-controls {
  width: min(900px, 100%) !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  padding: 0.72rem 1.35rem 0.78rem 0.85rem !important;
  align-self: center !important;
  justify-self: center !important;
  overflow: visible !important;
  transform: none !important;
}

.state-change-map-cards {
  width: min(1080px, 100%) !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: clamp(1.4rem, 5vw, 4.6rem) !important;
  align-items: start !important;
  overflow: visible !important;
}

.state-change-state-card,
.state-change-state-card.state-shape-card,
.state-shape-card {
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: clamp(0.9rem, 1.5vw, 1.2rem) !important;
  display: grid !important;
  grid-template-rows: auto clamp(210px, 26vh, 285px) auto auto !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.state-change-card-header {
  position: relative !important;
  z-index: 2 !important;
}

.state-change-card-header h3 {
  font-size: clamp(1.65rem, 2.7vw, 2.5rem) !important;
  line-height: 1 !important;
}

.state-change-year-pill {
  position: relative !important;
  z-index: 2 !important;
  min-width: 60px !important;
  padding: 0.42rem 0.58rem !important;
  font-size: 0.98rem !important;
  transform: none !important;
}

.state-shape-stage {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0.45rem 0 0.25rem !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.state-shape-svg {
  width: min(100%, 360px) !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 285px !important;
  display: block !important;
  overflow: visible !important;
}

.state-change-value-row {
  position: relative !important;
  z-index: 2 !important;
  margin: 0.15rem 0 0 !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 0.4rem !important;
}

.state-change-value-row strong {
  font-size: clamp(2.7rem, 5.3vw, 4.7rem) !important;
  line-height: 0.9 !important;
}

.state-change-value-row small {
  font-size: clamp(0.68rem, 1vw, 0.86rem) !important;
  white-space: nowrap !important;
}

.state-change-state-note {
  margin: 0.35rem 0 0 !important;
  font-size: 0.78rem !important;
  line-height: 1.28 !important;
}

.state-change-footer {
  width: min(1080px, 100%) !important;
  margin: clamp(1.25rem, 2vh, 1.8rem) auto 0 !important;
  display: grid !important;
  justify-items: center !important;
  gap: 0.55rem !important;
  text-align: center !important;
  position: relative !important;
  z-index: 5 !important;
  clear: both !important;
}

.state-change-footer .state-change-note {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.78rem !important;
  line-height: 1.25 !important;
}

.state-change-color-legend {
  justify-items: center !important;
}

.legend-scale-row {
  display: grid !important;
  grid-template-columns: auto minmax(300px, 420px) auto !important;
  gap: 0.7rem !important;
  align-items: center !important;
  white-space: nowrap !important;
}

.legend-gradient {
  width: 100% !important;
  height: 12px !important;
  border-radius: 999px !important;
}

.legend-midpoint {
  margin-top: 0.05rem !important;
}

/* Keep side-by-side even at browser zoom / narrower widths. */
@media (max-width: 900px), (max-height: 760px) {
  .state-change-result {
    min-height: auto !important;
    padding-top: 1.2rem !important;
    padding-bottom: 1.7rem !important;
    overflow: visible !important;
  }

  .state-change-card {
    width: min(1180px, 94vw) !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .state-change-copy h2 {
    font-size: clamp(2.25rem, 6vw, 4rem) !important;
  }

  .state-change-map-cards {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: clamp(0.9rem, 3vw, 2rem) !important;
  }

  .state-change-state-card,
  .state-change-state-card.state-shape-card {
    grid-template-rows: auto clamp(165px, 24vh, 235px) auto auto !important;
    padding: 0.75rem !important;
  }

  .state-shape-svg {
    max-height: 235px !important;
  }

  .state-change-value-row strong {
    font-size: clamp(2.1rem, 6vw, 3.5rem) !important;
  }

  .state-change-state-note {
    display: none !important;
  }

  .legend-scale-row {
    grid-template-columns: auto minmax(220px, 330px) auto !important;
  }
}

@media (max-width: 620px) {
  .state-change-card {
    width: 96vw !important;
  }

  .state-change-map-cards {
    width: 100% !important;
    gap: 0.65rem !important;
  }

  .state-change-card-header span {
    font-size: 0.55rem !important;
  }

  .state-change-card-header h3 {
    font-size: clamp(1.2rem, 5vw, 1.65rem) !important;
  }

  .state-change-state-card,
  .state-change-state-card.state-shape-card {
    grid-template-rows: auto 145px auto !important;
  }

  .state-change-state-note {
    display: none !important;
  }

  .legend-scale-row {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 0.35rem !important;
  }

  .legend-gradient {
    width: 250px !important;
  }
}

/* =========================================================
   CLEAN THERMOMETER FINAL OVERRIDES
   Use only one main liquid fill for user's expectation.
   Low / Medium / High projections are shown as colored ticks.
   ========================================================= */

/* Remove the added scale title that made the thermometer crowded. */
.thermometer-figure::before {
  content: none !important;
}

/* Make top/bottom numbers read as quiet axis labels. */
.thermometer-scale-label {
  color: rgba(95, 114, 132, 0.62) !important;
  font-size: 0.70rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.035em !important;
  z-index: 6 !important;
}

.thermometer-scale-label::after {
  content: none !important;
}

.thermometer-scale-top {
  top: 0.10rem !important;
}

.thermometer-scale-bottom {
  bottom: 0.12rem !important;
}

/* Clean neutral thermometer tube. */
.thermometer-track {
  left: 50% !important;
  bottom: 46px !important;
  transform: translateX(-50%) !important;
  width: 30px !important;
  border-radius: 999px !important;
  border: 2px solid rgba(225, 182, 155, 0.56) !important;
  background: rgba(255, 250, 245, 0.68) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35) !important;
  overflow: hidden !important;
}

/* Remove the second projection color block inside the tube. */
.thermometer-projection-band {
  opacity: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* One main liquid fill = user expectation. */
.thermometer-liquid {
  left: 7px !important;
  right: 7px !important;
  bottom: 5px !important;
  min-height: 9px !important;
  border-radius: 999px !important;
  opacity: 0.95 !important;
  background: linear-gradient(
    0deg,
    #ffd96a 0%,
    #f0a545 52%,
    #da6c3e 100%
  ) !important;
  box-shadow: 0 0 10px rgba(230, 142, 62, 0.18) !important;
}

/* Keep bulb as the same single user-expectation encoding. */
.thermometer-bulb {
  border: 2px solid rgba(225, 182, 155, 0.56) !important;
  background: rgba(255, 243, 223, 0.98) !important;
  box-shadow: 0 6px 18px rgba(240, 168, 70, 0.16) !important;
}

.thermometer-bulb::after {
  inset: 12px !important;
  background: radial-gradient(
    circle at 35% 30%,
    #ffd971 0%,
    #f0a846 55%,
    #da6d3f 100%
  ) !important;
}

/* Projection ticks: low lower, medium middle, high upper.
   Supports both possible JS class styles: tick-ssp126 and plain ordered ticks. */
.thermometer-projection-tick {
  width: 42px !important;
  height: 3px !important;
  border-radius: 999px !important;
  opacity: 0.95 !important;
  box-shadow: none !important;
  z-index: 5 !important;
}

.thermometer-projection-tick.tick-ssp126,
.thermometer-meter > .thermometer-projection-tick:nth-of-type(2) {
  background: #8ab454 !important;
}

.thermometer-projection-tick.tick-ssp245,
.thermometer-meter > .thermometer-projection-tick:nth-of-type(3) {
  background: #efb23d !important;
}

.thermometer-projection-tick.tick-ssp585,
.thermometer-meter > .thermometer-projection-tick:nth-of-type(4) {
  background: #d86b42 !important;
}

.thermometer-projection-tick.is-closest {
  width: 54px !important;
  height: 5px !important;
  opacity: 1 !important;
  box-shadow: 0 0 0 3px rgba(216, 107, 66, 0.10) !important;
}

/* Keep the user marker visually separate from scenario ticks. */
.thermometer-user-marker {
  z-index: 7 !important;
}

.thermometer-user-line {
  width: 28px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: #17202a !important;
}

.thermometer-user-bubble {
  background: rgba(255, 255, 255, 0.86) !important;
  border: 1px solid rgba(223, 214, 202, 0.95) !important;
  box-shadow: 0 8px 20px rgba(20, 27, 35, 0.06) !important;
}

/* Reduce visual crowding on the forecast comparison page. */
.thermometer-panel {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.thermometer-panel-heading {
  margin-bottom: 0.35rem !important;
}

.thermometer-summary {
  margin-top: 0.35rem !important;
  line-height: 1.55 !important;
}


/* =========================================================
   Transition page typography fix
   Fix crowded large headline spacing
   ========================================================= */

.us-transition h2,
.transition-panel h2,
section.us-transition h2 {
  max-width: 1120px !important;
  margin: 0 auto 1.25rem !important;
  font-size: clamp(4rem, 6.4vw, 6.6rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.055em !important;
  text-wrap: balance;
}

.us-transition p:not(.eyebrow),
.transition-panel p:not(.eyebrow),
section.us-transition p:not(.eyebrow) {
  max-width: 980px !important;
  margin: 0 auto !important;
  padding: 1rem 1.45rem !important;
  line-height: 1.6 !important;
}

.us-transition .eyebrow,
.transition-panel .eyebrow,
section.us-transition .eyebrow {
  margin-bottom: 0.9rem !important;
}

@media (max-width: 900px) {
  .us-transition h2,
  .transition-panel h2,
  section.us-transition h2 {
    font-size: clamp(3.1rem, 8vw, 5rem) !important;
    line-height: 1.14 !important;
    letter-spacing: -0.045em !important;
  }
}

/* =========================================================
   Plot 01 summary fix — keep the original card style, just smaller
   This restores the "Aligned baseline temperature" box as a compact
   floating card instead of a horizontal strip.
   ========================================================= */

.chart-wrap {
  position: relative !important;
  padding-top: 0 !important;
}

.trend-summary {
  position: absolute !important;
  top: 0.62rem !important;
  left: 0.72rem !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 8 !important;

  width: min(250px, calc(100% - 1.5rem)) !important;
  max-width: 250px !important;
  min-width: 0 !important;

  display: none !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.18rem !important;

  padding: 0.48rem 0.62rem !important;
  border-radius: 15px !important;
  background: rgba(255, 247, 235, 0.90) !important;
  border: 1px solid rgba(196, 81, 44, 0.14) !important;
  box-shadow: 0 8px 20px rgba(40, 55, 70, 0.08) !important;
  backdrop-filter: blur(8px) !important;

  opacity: 0 !important;
  transform: translateY(4px) !important;
  pointer-events: none !important;
}

.trend-summary.is-active {
  display: flex !important;
}

.trend-summary.is-visible,
.trend-summary.is-active.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.trend-summary-label {
  margin: 0 0 0.18rem !important;
  color: var(--accent-dark) !important;
  font-size: 0.62rem !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
  letter-spacing: 0.13em !important;
  text-transform: uppercase !important;
  white-space: normal !important;
}

.trend-summary-rows {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.06rem !important;
}

.trend-summary-row {
  display: grid !important;
  grid-template-columns: 8px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0.36rem !important;
  padding: 0 !important;
  font-size: 0.66rem !important;
  line-height: 1.18 !important;
  white-space: nowrap !important;
}

.trend-summary-row .dot {
  width: 6px !important;
  height: 6px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  align-self: center !important;
}

.trend-summary-row .name {
  color: var(--text) !important;
  font-weight: 750 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.trend-summary-row .value {
  color: inherit !important;
  font-weight: 950 !important;
  font-size: 0.66rem !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  .trend-summary {
    width: min(220px, calc(100% - 1.2rem)) !important;
    max-width: 220px !important;
    top: 0.5rem !important;
    left: 0.55rem !important;
    padding: 0.42rem 0.52rem !important;
  }

  .trend-summary-row {
    font-size: 0.62rem !important;
  }
}


.impact-viz-content--sources {
  width: min(1380px, 94vw);
  margin: 0 auto;
}

.impact-viz-main {
  display: grid;
  grid-template-columns: minmax(560px, 1.08fr) minmax(360px, 0.82fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
}

.impact-viz-left {
  min-width: 0;
}

.impact-viz-right {
  min-width: 0;
}

.impact-list-title {
  margin: 0.35rem 0 0.35rem;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--ink);
}

.impact-list-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.impact-right-title {
  margin: 1rem 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
  color: var(--ink);
}

.impact-right-copy {
  margin: 0 0 1.25rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(143, 47, 27, 0.12);
  border-radius: 1.25rem;
  background: rgba(255, 248, 240, 0.58);
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.impact-source-links {
  display: grid;
  gap: 0.85rem;
}

.impact-source-card {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(143, 47, 27, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(23, 32, 42, 0.045);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.impact-source-card:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 81, 44, 0.42);
  background: rgba(255, 248, 240, 0.92);
}

.impact-source-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--rust);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.impact-source-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.impact-source-card small {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .impact-viz-main {
    grid-template-columns: 1fr;
  }

  .impact-viz-right {
    margin-top: 1.5rem;
  }
}


/* =========================================================
   Impact step source cards on right story panel
   ========================================================= */

.step--impact-sources {
  padding-bottom: 2rem;
}

.step--impact-sources h2 {
  margin-bottom: 0.95rem;
}

.step--impact-sources > p {
  margin-bottom: 1.35rem;
}

.impact-source-links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.impact-source-card {
  display: block;
  padding: 0.95rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid rgba(143, 47, 27, 0.14);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(23, 32, 42, 0.045);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.impact-source-card:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 81, 44, 0.42);
  background: rgba(255, 248, 240, 0.94);
  box-shadow: 0 16px 38px rgba(23, 32, 42, 0.07);
}

.impact-source-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--rust);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.impact-source-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.2;
}

.impact-source-card small {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

/* Keep the impact left-side list compact and inside the chart area. */
.impact-fill--clean {
  width: 100%;
  height: 100%;
  display: block;
}

.impact-clean-content {
  width: min(780px, 92%);
  margin: 0 auto;
  padding: clamp(1rem, 2.4vh, 2rem) 0;
}

.impact-clean-rows {
  display: grid;
  gap: 0;
}

.impact-clean-rows .impact-viz-row {
  display: grid;
  grid-template-columns: 2.7rem 1fr;
  gap: 1.15rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(23, 32, 42, 0.11);
}

.impact-clean-rows .ivr-num {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
}

.impact-clean-rows .ivr-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.impact-clean-rows .ivr-label {
  min-width: 8.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.impact-clean-rows .ivr-stat {
  color: var(--ink);
  font-size: 1.28rem;
  font-weight: 900;
}

.impact-clean-rows .ivr-unit {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.impact-clean-rows .ivr-desc {
  margin: 0.38rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.impact-clean-rows .ivr-cite {
  margin: 0.38rem 0 0;
  color: rgba(95, 107, 115, 0.72);
  font-size: 0.78rem;
  font-style: italic;
}



/* =========================================================
   STEP 08 — impact page sizing fix
   Make both left impact list and right source cards smaller
   ========================================================= */


.impact-fill--clean {
  width: 100%;
  height: 100%;
  display: block;
}

.impact-clean-content {
  width: min(700px, 90%);
  margin: 0 auto;
  padding: 0.75rem 0 1.1rem;
}


.chart-wrap .title-block {
  max-width: 520px;
}

.chart-wrap .title-block .kicker {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}

.chart-wrap .title-block h3,
.chart-wrap .title-block h2 {
  font-size: clamp(1.7rem, 2.1vw, 2.35rem);
  line-height: 1.08;
  margin-bottom: 0.35rem;
}

.chart-wrap .title-block p {
  font-size: 0.96rem;
  line-height: 1.45;
}


.impact-clean-rows {
  display: grid;
  gap: 0;
}

.impact-clean-rows .impact-viz-row {
  display: grid;
  grid-template-columns: 2.35rem 1fr;
  gap: 0.95rem;
  padding: 0.82rem 0;
  border-bottom: 1px solid rgba(23, 32, 42, 0.11);
}

.impact-clean-rows .ivr-num {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
}

.impact-clean-rows .ivr-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.impact-clean-rows .ivr-label {
  min-width: 7.5rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.impact-clean-rows .ivr-stat {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.impact-clean-rows .ivr-unit {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.impact-clean-rows .ivr-desc {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 94%;
}

.impact-clean-rows .ivr-cite {
  margin: 0.28rem 0 0;
  color: rgba(95, 107, 115, 0.72);
  font-size: 0.74rem;
  line-height: 1.35;
  font-style: italic;
}


.impact-equity-callout {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-left: 3px solid rgba(143, 47, 27, 0.9);
  background: rgba(255, 248, 240, 0.72);
  border-radius: 0.8rem;
}

.impact-equity-title {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  font-weight: 900;
  color: var(--rust);
  margin-bottom: 0.45rem;
}

.impact-equity-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}


.impact-chip-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.95rem;
}

.impact-chip {
  padding: 0.58rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(143, 47, 27, 0.14);
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.impact-list-subtitle {
  font-size: 0.88rem;
  color: var(--muted);
}


.step--impact-sources {
  padding-bottom: 1.5rem;
}

.step--impact-sources .step-number {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.7rem;
}

.step--impact-sources h2 {
  font-size: clamp(2rem, 3.2vw, 3.05rem);
  line-height: 0.98;
  max-width: 520px;
  margin-bottom: 0.85rem;
}

.step--impact-sources > p {
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 530px;
  margin-bottom: 1rem;
}


.impact-source-links {
  display: grid;
  gap: 0.72rem;
  max-width: 560px;
}

.impact-source-card {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(143, 47, 27, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(23, 32, 42, 0.04);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.impact-source-card:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 81, 44, 0.35);
  background: rgba(255, 248, 240, 0.95);
  box-shadow: 0 14px 32px rgba(23, 32, 42, 0.06);
}

.impact-source-card span {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--rust);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.impact-source-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.2;
}

.impact-source-card small {
  display: block;
  margin-top: 0.24rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}


@media (min-width: 1400px) {
  .impact-clean-content {
    width: min(660px, 88%);
  }

  .step--impact-sources h2 {
    font-size: 2.75rem;
    max-width: 500px;
  }

  .impact-source-links {
    max-width: 520px;
  }
}


@media (max-width: 1280px) {
  .impact-clean-content {
    width: min(640px, 88%);
  }

  .impact-clean-rows .ivr-desc {
    max-width: 100%;
  }

  .step--impact-sources h2 {
    font-size: 2.45rem;
    max-width: 470px;
  }

  .impact-source-links {
    max-width: 500px;
  }
}


/* =========================================================
   Final Step 08 impact layout and source-card sizing overrides
   ========================================================= */

/* Keep the impact visualization inside the left chart area. */
.impact-fill,
.impact-fill--clean {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.impact-viz-content,
.impact-clean-content {
  width: min(660px, 90%) !important;
  height: 100% !important;
  margin: 0 auto !important;
  padding: clamp(0.45rem, 1.2vh, 0.9rem) 0 0.8rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: clamp(0.45rem, 1vh, 0.75rem) !important;
  box-sizing: border-box !important;
}

/* Compact the left-side title card for the impact step. */
.viz-header:has(+ .chart-wrap .impact-fill),
.viz-header:has(+ .chart-wrap .impact-fill--clean) {
  max-width: min(560px, 95%) !important;
  padding: 0.65rem 0.85rem !important;
  border-radius: 18px !important;
}

.viz-header:has(+ .chart-wrap .impact-fill) h2,
.viz-header:has(+ .chart-wrap .impact-fill--clean) h2 {
  font-size: clamp(1.05rem, 1.45vw, 1.55rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.045em !important;
}

.viz-header:has(+ .chart-wrap .impact-fill) #chart-subtitle,
.viz-header:has(+ .chart-wrap .impact-fill--clean) #chart-subtitle {
  font-size: 0.76rem !important;
  line-height: 1.25 !important;
  margin-top: 0.22rem !important;
}

/* Compact the four impact rows. */
.impact-viz-rows,
.impact-clean-rows {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 0 !important;
  min-height: 0 !important;
  flex: 0 1 auto !important;
}

.impact-viz-row,
.impact-clean-rows .impact-viz-row {
  display: grid !important;
  grid-template-columns: 2.05rem minmax(0, 1fr) !important;
  gap: 0.75rem !important;
  padding: clamp(0.45rem, 1vh, 0.72rem) 0 !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(23, 32, 42, 0.11) !important;
}

.impact-viz-row:first-child,
.impact-clean-rows .impact-viz-row:first-child {
  padding-top: 0 !important;
}

.impact-viz-row:last-child,
.impact-clean-rows .impact-viz-row:last-child {
  border-bottom: 0 !important;
}

.ivr-num,
.impact-clean-rows .ivr-num {
  color: var(--text) !important;
  font-size: 0.82rem !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
}

.ivr-head,
.impact-clean-rows .ivr-head {
  display: flex !important;
  align-items: baseline !important;
  gap: 0.72rem !important;
  margin: 0 0 0.18rem !important;
  flex-wrap: wrap !important;
}

.ivr-label,
.impact-clean-rows .ivr-label {
  min-width: 7.2rem !important;
  color: var(--muted) !important;
  font-size: 0.62rem !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
}

.ivr-stat,
.impact-clean-rows .ivr-stat {
  color: var(--text) !important;
  font-size: clamp(0.9rem, 1.25vw, 1.1rem) !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
}

.ivr-unit,
.impact-clean-rows .ivr-unit {
  color: var(--muted) !important;
  font-size: 0.64rem !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

.ivr-desc,
.impact-clean-rows .ivr-desc {
  max-width: 96% !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: clamp(0.72rem, 0.95vw, 0.84rem) !important;
  line-height: 1.38 !important;
}

.ivr-cite,
.impact-clean-rows .ivr-cite {
  margin: 0.18rem 0 0 !important;
  color: rgba(95, 107, 115, 0.72) !important;
  font-size: 0.64rem !important;
  line-height: 1.25 !important;
  font-style: italic !important;
}

.impact-viz-equity,
.impact-equity-callout {
  flex: 0 0 auto !important;
  margin-top: 0.45rem !important;
  padding: 0.62rem 0.8rem !important;
  border-left: 3px solid rgba(143, 47, 27, 0.9) !important;
  border-radius: 0 12px 12px 0 !important;
  background: rgba(255, 248, 240, 0.72) !important;
}

.ive-tag,
.impact-equity-title {
  display: block !important;
  margin: 0 0 0.28rem !important;
  color: var(--accent-dark) !important;
  font-size: 0.62rem !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
}

.impact-viz-equity p,
.impact-equity-body {
  margin: 0 !important;
  color: var(--text) !important;
  font-size: 0.72rem !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
}

.impact-chip-row {
  margin-top: 0.55rem !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.45rem !important;
}

.impact-chip {
  padding: 0.45rem 0.75rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(143, 47, 27, 0.14) !important;
  background: rgba(255, 255, 255, 0.62) !important;
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

/* Right-side source cards in the story column. */
.step--impact-sources {
  min-height: 96vh !important;
  justify-content: center !important;
  padding-top: 5vh !important;
  padding-bottom: 5vh !important;
}

.step--impact-sources .step-number {
  margin-bottom: 0.55rem !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.15em !important;
}

.step--impact-sources h2 {
  max-width: 500px !important;
  margin-bottom: 0.7rem !important;
  font-size: clamp(1.95rem, 3vw, 2.85rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.06em !important;
}

.step--impact-sources > p:not(.step-number) {
  max-width: 500px !important;
  width: auto !important;
  margin-bottom: 0.85rem !important;
  padding: 0.75rem 0.9rem !important;
  border-radius: 16px !important;
  font-size: 0.88rem !important;
  line-height: 1.45 !important;
}

.impact-source-links {
  display: grid !important;
  gap: 0.55rem !important;
  width: min(500px, 100%) !important;
  max-width: 500px !important;
  margin-top: 0.7rem !important;
}

.impact-source-card {
  display: block !important;
  padding: 0.68rem 0.82rem !important;
  border-radius: 0.82rem !important;
  border: 1px solid rgba(143, 47, 27, 0.12) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--text) !important;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(23, 32, 42, 0.035) !important;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease !important;
}

.impact-source-card:hover,
.impact-source-card:focus-visible {
  transform: translateY(-1px) !important;
  border-color: rgba(196, 81, 44, 0.36) !important;
  background: rgba(255, 248, 240, 0.94) !important;
  box-shadow: 0 12px 26px rgba(23, 32, 42, 0.055) !important;
  outline: none !important;
}

.impact-source-card span {
  display: block !important;
  margin-bottom: 0.2rem !important;
  color: var(--accent-dark) !important;
  font-size: 0.58rem !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
}

.impact-source-card strong {
  display: block !important;
  color: var(--text) !important;
  font-size: 0.86rem !important;
  line-height: 1.18 !important;
  font-weight: 900 !important;
}

.impact-source-card small {
  display: block !important;
  margin-top: 0.2rem !important;
  color: var(--muted) !important;
  font-size: 0.7rem !important;
  line-height: 1.25 !important;
}

/* White-to-red heat scale for summer 35C+ day maps. */
.hotday-legend-gradient,
.legend-gradient.hotday-legend-gradient,
#legend .hotday-legend-gradient,
.state-hotday-legend .legend-gradient {
  background: linear-gradient(90deg, #fffaf2 0%, #f9d29d 35%, #ef7f4f 70%, #990026 100%) !important;
}

@media (min-width: 1400px) {
  .impact-viz-content,
  .impact-clean-content {
    width: min(620px, 88%) !important;
  }

  .step--impact-sources h2 {
    font-size: 2.55rem !important;
    max-width: 460px !important;
  }

  .impact-source-links {
    max-width: 460px !important;
  }
}

@media (max-width: 1280px) {
  .impact-viz-content,
  .impact-clean-content {
    width: min(620px, 90%) !important;
  }

  .step--impact-sources h2 {
    font-size: 2.25rem !important;
    max-width: 440px !important;
  }

  .impact-source-links {
    max-width: 440px !important;
  }

  .impact-source-card {
    padding: 0.6rem 0.72rem !important;
  }
}

@media (max-height: 760px) {
  .viz-header:has(+ .chart-wrap .impact-fill),
  .viz-header:has(+ .chart-wrap .impact-fill--clean) {
    padding: 0.5rem 0.72rem !important;
  }

  .impact-viz-content,
  .impact-clean-content {
    justify-content: flex-start !important;
    padding-top: 0.25rem !important;
  }

  .impact-viz-row,
  .impact-clean-rows .impact-viz-row {
    padding: 0.38rem 0 !important;
  }

  .ivr-desc,
  .impact-clean-rows .ivr-desc {
    font-size: 0.7rem !important;
    line-height: 1.3 !important;
  }

  .ivr-cite,
  .impact-clean-rows .ivr-cite {
    font-size: 0.6rem !important;
  }

  .impact-source-links {
    gap: 0.45rem !important;
  }

  .impact-source-card {
    padding: 0.54rem 0.68rem !important;
  }
}

@media (max-width: 980px) {
  .impact-viz-content,
  .impact-clean-content {
    width: min(680px, 94%) !important;
    height: auto !important;
  }

  .step--impact-sources h2,
  .step--impact-sources > p:not(.step-number),
  .impact-source-links {
    max-width: 100% !important;
  }
}


/* Final Step 08 source-card design */
.impact-chip-row {
  display: none !important;
}

.step--impact-sources {
  min-height: 96vh !important;
  justify-content: center !important;
  padding-top: 4vh !important;
  padding-bottom: 4vh !important;
}

.step--impact-sources .step-number {
  width: fit-content !important;
  margin: 0 0 0.65rem !important;
  padding: 0.32rem 0.68rem !important;
  border: 1px solid rgba(143, 47, 27, 0.12) !important;
  border-radius: 999px !important;
  background: rgba(255, 248, 240, 0.68) !important;
  color: var(--accent-dark) !important;
  font-size: 0.66rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.16em !important;
}

.step--impact-sources h2 {
  max-width: 500px !important;
  margin: 0 0 0.8rem !important;
  font-size: clamp(2.05rem, 3vw, 3rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.06em !important;
}

.step--impact-sources .impact-source-intro {
  max-width: 500px !important;
  margin: 0 0 0.95rem !important;
  padding: 0.78rem 0.95rem !important;
  border: 1px solid rgba(143, 47, 27, 0.10) !important;
  border-radius: 16px !important;
  background: rgba(255, 248, 240, 0.56) !important;
  color: var(--muted) !important;
  font-size: 0.88rem !important;
  line-height: 1.45 !important;
}

.impact-source-links {
  display: grid !important;
  width: min(500px, 100%) !important;
  max-width: 500px !important;
  gap: 0.62rem !important;
  margin-top: 0 !important;
}

.impact-source-card {
  --source-color: #8f2f1b;
  --source-soft: rgba(143, 47, 27, 0.08);
  --source-logo: "SOURCE";
  position: relative !important;
  isolation: isolate !important;
  display: block !important;
  min-height: 4.75rem !important;
  padding: 0.68rem 7.4rem 0.68rem 0.86rem !important;
  overflow: hidden !important;
  border-radius: 1rem !important;
  border: 1px solid color-mix(in srgb, var(--source-color) 28%, transparent) !important;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.78) 62%, var(--source-soft) 100%) !important;
  color: var(--text) !important;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.045) !important;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease !important;
}

.impact-source-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 34%;
  z-index: -1;
  background:
    radial-gradient(circle at 70% 50%, color-mix(in srgb, var(--source-color) 20%, transparent), transparent 62%);
}

.impact-source-card::after {
  content: var(--source-logo);
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  max-width: 6.1rem;
  color: color-mix(in srgb, var(--source-color) 72%, white 12%);
  font-size: 1.05rem;
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-align: right;
  opacity: 0.34;
  pointer-events: none;
}

.impact-source-card:hover,
.impact-source-card:focus-visible {
  transform: translateY(-1px) !important;
  border-color: color-mix(in srgb, var(--source-color) 48%, transparent) !important;
  box-shadow: 0 14px 28px rgba(23, 32, 42, 0.075) !important;
  outline: none !important;
}

.impact-source-card span {
  display: block !important;
  margin-bottom: 0.22rem !important;
  color: var(--source-color) !important;
  font-size: 0.58rem !important;
  line-height: 1.2 !important;
  font-weight: 950 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
}

.impact-source-card strong {
  display: block !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
  line-height: 1.16 !important;
  font-weight: 950 !important;
}

.impact-source-card small {
  display: block !important;
  max-width: 100% !important;
  margin-top: 0.24rem !important;
  color: var(--muted) !important;
  font-size: 0.69rem !important;
  line-height: 1.25 !important;
}

.source-oneearth {
  --source-color: #007ca8;
  --source-soft: rgba(0, 124, 168, 0.11);
  --source-logo: "One\A Earth";
}

.source-aea {
  --source-color: #8f3342;
  --source-soft: rgba(143, 51, 66, 0.11);
  --source-logo: "AEA";
}

.source-eia {
  --source-color: #0076a8;
  --source-soft: rgba(0, 118, 168, 0.11);
  --source-logo: "eia";
}

.source-ucsd {
  --source-color: #182b49;
  --source-soft: rgba(24, 43, 73, 0.10);
  --source-logo: "UCSD\A Today";
}

.source-who {
  --source-color: #1d5fae;
  --source-soft: rgba(29, 95, 174, 0.11);
  --source-logo: "WHO";
}

.chart-wrap:has(.impact-fill--clean) + #legend,
.sticky-viz:has(.impact-fill--clean) #legend {
  display: none !important;
}

@media (max-width: 1280px) {
  .step--impact-sources h2 {
    max-width: 440px !important;
    font-size: 2.35rem !important;
  }

  .step--impact-sources .impact-source-intro,
  .impact-source-links {
    max-width: 440px !important;
  }

  .impact-source-card {
    padding-right: 6.4rem !important;
  }

  .impact-source-card::after {
    max-width: 5.2rem;
    font-size: 0.95rem;
  }
}

@media (max-height: 760px) {
  .impact-source-links {
    gap: 0.44rem !important;
  }

  .impact-source-card {
    min-height: 4.1rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .impact-source-card strong {
    font-size: 0.82rem !important;
  }

  .impact-source-card small {
    font-size: 0.64rem !important;
  }
}

@media (max-width: 980px) {
  .step--impact-sources h2,
  .step--impact-sources .impact-source-intro,
  .impact-source-links {
    max-width: 100% !important;
  }
}

/* =========================================================
   Final Step 08 impact layout refinement
   ========================================================= */

.chart-wrap:has(.impact-fill--clean) .legend-row,
.sticky-viz:has(.impact-fill--clean) .legend-row,
.chart-wrap:has(.impact-fill--clean) #map-note,
.sticky-viz:has(.impact-fill--clean) #map-note {
  display: none !important;
}

.impact-clean-content {
  width: min(840px, 94%) !important;
  padding: 0.9rem 0 1.25rem !important;
}

.impact-clean-rows .impact-viz-row {
  grid-template-columns: 2.6rem 1fr !important;
  gap: 1.15rem !important;
  padding: 0.92rem 0 !important;
}

.impact-clean-rows .ivr-num {
  font-size: 1.05rem !important;
}

.impact-clean-rows .ivr-label {
  min-width: 9.1rem !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.17em !important;
}

.impact-clean-rows .ivr-stat {
  font-size: 1.34rem !important;
  line-height: 1.05 !important;
}

.impact-clean-rows .ivr-unit {
  font-size: 0.82rem !important;
}

.impact-clean-rows .ivr-desc {
  max-width: 96% !important;
  font-size: 0.96rem !important;
  line-height: 1.46 !important;
}

.impact-clean-rows .ivr-cite {
  font-size: 0.78rem !important;
}

.impact-equity-callout {
  margin-top: 1.15rem !important;
  padding: 1.05rem 1.15rem !important;
}

.impact-equity-title {
  font-size: 0.82rem !important;
}

.impact-equity-body {
  font-size: 0.98rem !important;
  line-height: 1.5 !important;
}

.step--impact-sources {
  padding-top: 3.2vh !important;
  padding-bottom: 3.2vh !important;
}

.step--impact-sources h2 {
  max-width: 520px !important;
  font-size: clamp(2.35rem, 3.35vw, 3.25rem) !important;
}

.step--impact-sources .impact-source-intro {
  max-width: 520px !important;
}

.impact-source-links {
  width: min(520px, 100%) !important;
  max-width: 520px !important;
}

@media (max-width: 1280px) {
  .impact-clean-content {
    width: min(780px, 94%) !important;
  }

  .impact-clean-rows .ivr-desc {
    font-size: 0.92rem !important;
  }

  .step--impact-sources h2 {
    max-width: 470px !important;
    font-size: 2.55rem !important;
  }

  .step--impact-sources .impact-source-intro,
  .impact-source-links {
    max-width: 470px !important;
  }
}

@media (max-height: 760px) {
  .impact-clean-rows .impact-viz-row {
    padding: 0.72rem 0 !important;
  }

  .impact-clean-rows .ivr-desc {
    font-size: 0.86rem !important;
    line-height: 1.38 !important;
  }

  .impact-clean-rows .ivr-stat {
    font-size: 1.16rem !important;
  }

  .impact-equity-callout {
    padding: 0.85rem 1rem !important;
  }

  .impact-equity-body {
    font-size: 0.9rem !important;
  }
}


/* Step 08: combined impact view (common-knowledge + sourced examples) */
.impact-fill--dual {
  padding: 0.62rem;
}

.impact-dual {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.65rem;
  color: var(--text);
}

.impact-dual-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
  gap: 0.8rem;
  align-items: end;
  padding: 0.78rem 0.85rem;
  border: 1px solid rgba(143, 47, 27, 0.14);
  border-radius: 20px;
  background: rgba(255, 248, 240, 0.88);
}

.impact-dual-kicker {
  margin: 0 0 0.28rem;
  color: var(--accent-dark);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.impact-dual-head h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.impact-dual-head p:not(.impact-dual-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.38;
}

.impact-dual-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.68rem;
}

.impact-dual-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.48rem;
  padding: 0.7rem;
  border: 1px solid rgba(23, 32, 42, 0.10);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 24px rgba(40, 55, 70, 0.06);
}

.impact-section-head {
  display: grid;
  gap: 0.16rem;
}

.impact-section-kicker {
  color: var(--accent-dark);
  font-size: 0.6rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.impact-section-head h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.impact-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.34;
}

.impact-context-list,
.impact-source-list {
  min-height: 0;
  display: grid;
  gap: 0.42rem;
}

.impact-context-list {
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.impact-source-list {
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.impact-context-row,
.impact-source-row {
  min-height: 0;
  display: grid;
  gap: 0.48rem;
  padding: 0.48rem 0.52rem;
  border-radius: 16px;
  border: 1px solid rgba(23, 32, 42, 0.08);
  background: rgba(247, 249, 249, 0.78);
}

.impact-context-row {
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
}

.impact-context-num {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
  padding-top: 0.05rem;
}

.impact-context-body,
.impact-source-main {
  min-width: 0;
}

.impact-context-head,
.impact-source-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.impact-context-head span,
.impact-source-head span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.impact-context-head strong,
.impact-source-head strong {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.impact-context-head small,
.impact-source-head small {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 850;
}

.impact-context-desc,
.impact-source-desc {
  margin: 0.16rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.impact-context-cite,
.impact-source-cite {
  margin: 0.14rem 0 0;
  color: #8b959b;
  font-size: 0.58rem;
  font-style: italic;
  line-height: 1.22;
}

.impact-source-row {
  grid-template-columns: minmax(0, 1fr) minmax(138px, 0.52fr);
  align-items: stretch;
}

.impact-source-link {
  display: grid;
  align-content: center;
  gap: 0.08rem;
  padding: 0.45rem 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(196, 81, 44, 0.14);
  background: linear-gradient(90deg, rgba(255,255,255,0.96), rgba(196,81,44,0.08));
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.impact-source-link:hover,
.impact-source-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(196, 81, 44, 0.30);
  box-shadow: 0 10px 22px rgba(40, 55, 70, 0.10);
  outline: none;
}

.impact-source-link span {
  color: var(--accent-dark);
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.impact-source-link strong {
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.08;
}

.impact-source-link small {
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.18;
}

.impact-dual-note {
  padding: 0.62rem 0.8rem;
  border-radius: 18px;
  background: #fbf7f4;
  border-left: 3px solid var(--accent-dark);
}

.impact-dual-note span {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--accent-dark);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.impact-dual-note p {
  margin: 0;
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1.36;
}

@media (max-width: 1100px) {
  .impact-dual-grid,
  .impact-dual-head {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 860px) {
  .impact-fill--dual {
    padding: 0.52rem;
  }

  .impact-dual {
    gap: 0.52rem;
  }

  .impact-dual-head {
    padding: 0.68rem 0.75rem;
  }

  .impact-dual-panel {
    padding: 0.58rem;
  }

  .impact-context-row,
  .impact-source-row {
    padding: 0.42rem 0.46rem;
  }

  .impact-context-desc,
  .impact-source-desc {
    font-size: 0.65rem;
    line-height: 1.24;
  }

  .impact-context-cite,
  .impact-source-cite,
  .impact-source-link small {
    font-size: 0.55rem;
  }

  .impact-dual-note p {
    font-size: 0.68rem;
  }
}


/* Step 08 compact two-column impact layout */
.impact-fill--color-columns {
  padding: 0.62rem;
}

.impact-columns-viz {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.68rem;
  color: var(--text);
}

.impact-column {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.58rem;
  padding: 0.72rem;
  border-radius: 22px;
  border: 1px solid rgba(23, 32, 42, 0.10);
  box-shadow: 0 10px 28px rgba(40, 55, 70, 0.07);
  overflow: hidden;
}

.impact-column--context {
  background:
    linear-gradient(180deg, rgba(255, 246, 235, 0.98), rgba(255, 255, 255, 0.88));
  border-color: rgba(196, 81, 44, 0.20);
}

.impact-column--source {
  background:
    linear-gradient(180deg, rgba(235, 247, 252, 0.98), rgba(255, 255, 255, 0.88));
  border-color: rgba(79, 143, 192, 0.22);
}

.impact-column-head span {
  display: inline-flex;
  margin-bottom: 0.22rem;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.impact-column--context .impact-column-head span {
  color: #8f2f1b;
  background: rgba(196, 81, 44, 0.11);
}

.impact-column--source .impact-column-head span {
  color: #176f9f;
  background: rgba(79, 143, 192, 0.13);
}

.impact-column-head h3 {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.impact-column-head p {
  margin: 0.24rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.32;
}

.impact-column-list {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
}

.impact-mini-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.48rem;
  align-items: start;
  padding: 0.48rem 0.54rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.impact-mini-card--context {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(196, 81, 44, 0.15);
}

.impact-mini-card--source {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(79, 143, 192, 0.18);
}

.impact-mini-card--source:hover,
.impact-mini-card--source:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(79, 143, 192, 0.38);
  box-shadow: 0 9px 20px rgba(40, 55, 70, 0.10);
  outline: none;
}

.impact-mini-num {
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 950;
}

.impact-mini-card--context .impact-mini-num {
  color: #8f2f1b;
  background: rgba(196, 81, 44, 0.12);
}

.impact-mini-card--source .impact-mini-num {
  color: #176f9f;
  background: rgba(79, 143, 192, 0.13);
}

.impact-mini-copy {
  min-width: 0;
}

.impact-mini-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.impact-mini-top strong {
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.impact-mini-top em {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.1;
}

.impact-mini-card--context .impact-mini-top em {
  color: #8f2f1b;
}

.impact-mini-card--source .impact-mini-top em {
  color: #176f9f;
}

.impact-mini-top small {
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 850;
}

.impact-mini-copy p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.23;
}

.impact-mini-source {
  display: block;
  margin-top: 0.14rem;
  color: #74818a;
  font-size: 0.55rem;
  line-height: 1.16;
  font-style: italic;
}

.impact-columns-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.56rem 0.75rem;
  border-radius: 18px;
  background: rgba(255, 248, 240, 0.88);
  border-left: 3px solid var(--accent-dark);
}

.impact-columns-note strong {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.impact-columns-note span {
  color: var(--text);
  font-size: 0.68rem;
  line-height: 1.3;
}

@media (max-height: 780px) {
  .impact-fill--color-columns {
    padding: 0.45rem;
  }

  .impact-columns-viz {
    gap: 0.48rem;
  }

  .impact-column {
    padding: 0.56rem;
    gap: 0.42rem;
  }

  .impact-column-head p {
    display: none;
  }

  .impact-mini-card {
    padding: 0.38rem 0.44rem;
  }

  .impact-mini-copy p {
    font-size: 0.6rem;
    line-height: 1.16;
  }

  .impact-mini-source {
    font-size: 0.52rem;
  }

  .impact-columns-note {
    padding: 0.46rem 0.65rem;
  }
}

@media (max-width: 1050px) {
  .impact-columns-viz {
    grid-template-columns: 1fr;
  }
}


/* Step 08 full-page impact section: remove right-side scrolly text */
body.impact-fullpage-active .scrolly {
  display: block;
  max-width: 1280px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 1.35rem 4vw 2.25rem;
}

body.impact-fullpage-active .graphic {
  position: relative;
  top: auto;
  height: auto;
  min-height: calc(100vh - 3.6rem);
  width: 100%;
}

body.impact-fullpage-active .sticky-viz {
  min-height: calc(100vh - 3.6rem);
  height: auto;
  grid-template-rows: auto minmax(620px, 1fr) auto;
  padding: 0.8rem;
}

body.impact-fullpage-active .story {
  display: none;
}

body.impact-fullpage-active .viz-header {
  max-width: 760px;
}

body.impact-fullpage-active .viz-header h2 {
  font-size: clamp(1.35rem, 2.2vw, 2.05rem);
}

body.impact-fullpage-active #chart-subtitle {
  font-size: 0.92rem;
  line-height: 1.35;
}

body.impact-fullpage-active .impact-fill--color-columns {
  padding: 0.85rem 0.85rem 0.55rem;
}

body.impact-fullpage-active .impact-columns-viz {
  min-height: 600px;
  gap: 0.82rem;
}

body.impact-fullpage-active .impact-column {
  padding: 0.9rem;
  border-radius: 26px;
}

body.impact-fullpage-active .impact-column-head h3 {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

body.impact-fullpage-active .impact-column-head p {
  font-size: 0.78rem;
}

body.impact-fullpage-active .impact-mini-card {
  padding: 0.7rem 0.72rem;
  border-radius: 18px;
}

body.impact-fullpage-active .impact-mini-top strong {
  font-size: 0.9rem;
}

body.impact-fullpage-active .impact-mini-copy p {
  font-size: 0.72rem;
  line-height: 1.28;
}

body.impact-fullpage-active .impact-mini-source {
  font-size: 0.62rem;
}

body.impact-fullpage-active .impact-columns-note {
  padding: 0.68rem 0.85rem;
}

body.impact-fullpage-active .impact-columns-note span {
  font-size: 0.76rem;
}

@media (max-width: 1050px) {
  body.impact-fullpage-active .sticky-viz {
    min-height: auto;
  }

  body.impact-fullpage-active .impact-columns-viz {
    min-height: 0;
  }
}


/* Step 08 compact full-page refinements */
.impact-page-intro {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.72rem 0.88rem;
  border: 1px solid rgba(143, 47, 27, 0.14);
  border-radius: 22px;
  background: rgba(255, 248, 240, 0.9);
}

.impact-page-kicker {
  display: inline-flex;
  margin-bottom: 0.22rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(196, 81, 44, 0.10);
  color: var(--accent-dark);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.impact-page-intro h3 {
  margin: 0;
  font-size: clamp(1.18rem, 1.9vw, 1.85rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.impact-page-intro-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.38;
}

.impact-columns-viz--compact {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.impact-columns-viz--compact .impact-column {
  padding: 0.68rem;
  gap: 0.5rem;
}

.impact-columns-viz--compact .impact-column-head span {
  margin-bottom: 0.16rem;
}

.impact-columns-viz--compact .impact-column-head h3 {
  font-size: clamp(1.08rem, 1.65vw, 1.45rem);
}

.impact-columns-viz--compact .impact-column-head p {
  margin-top: 0.2rem;
  font-size: 0.68rem;
}

.impact-columns-viz--compact .impact-column-list {
  gap: 0.34rem;
}

.impact-columns-viz--compact .impact-mini-card {
  padding: 0.42rem 0.5rem;
  gap: 0.42rem;
}

.impact-columns-viz--compact .impact-mini-num {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.58rem;
}

.impact-columns-viz--compact .impact-mini-top strong {
  font-size: 0.72rem;
}

.impact-columns-viz--compact .impact-mini-top em {
  font-size: 0.58rem;
}

.impact-columns-viz--compact .impact-mini-top small {
  font-size: 0.5rem;
}

.impact-columns-viz--compact .impact-mini-copy p {
  margin-top: 0.12rem;
  font-size: 0.615rem;
  line-height: 1.22;
}

.impact-columns-viz--compact .impact-mini-source {
  margin-top: 0.12rem;
  font-size: 0.525rem;
}

.impact-columns-viz--compact .impact-columns-note {
  padding: 0.5rem 0.7rem;
}

.impact-columns-viz--compact .impact-columns-note strong {
  font-size: 0.55rem;
}

.impact-columns-viz--compact .impact-columns-note span {
  font-size: 0.65rem;
  line-height: 1.26;
}

body.impact-fullpage-active .scrolly {
  max-width: 1460px;
  padding: 0.8rem 1.2vw 1.2rem;
}

body.impact-fullpage-active .sticky-viz {
  min-height: calc(100vh - 1.2rem);
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0.42rem;
}

body.impact-fullpage-active .viz-header {
  max-width: 700px;
}

body.impact-fullpage-active .viz-header h2 {
  font-size: clamp(1.1rem, 2vw, 1.8rem);
}

body.impact-fullpage-active #chart-subtitle {
  font-size: 0.84rem;
  line-height: 1.28;
}

body.impact-fullpage-active .impact-fill--color-columns {
  padding: 0.45rem 0.45rem 0.2rem;
}

body.impact-fullpage-active .impact-columns-viz {
  min-height: 0;
}

body.impact-fullpage-active .impact-page-intro {
  padding: 0.62rem 0.74rem;
}

body.impact-fullpage-active .impact-page-intro h3 {
  font-size: clamp(1.08rem, 1.8vw, 1.55rem);
}

body.impact-fullpage-active .impact-page-intro-copy {
  font-size: 0.73rem;
}

body.impact-fullpage-active .impact-column {
  border-radius: 22px;
}

@media (max-width: 1050px) {
  .impact-page-intro,
  .impact-columns-viz {
    grid-template-columns: 1fr;
  }
}

/* Step 08 scroll-flow fix: keep the scrolly structure in place so entering 08 does not jump. */
body.impact-fullpage-active .scrolly {
  display: grid !important;
  grid-template-columns: minmax(540px, 58%) minmax(360px, 42%) !important;
  gap: 2rem !important;
  max-width: 1380px !important;
  margin: 0 auto !important;
  padding: 2rem 4vw 5rem !important;
  align-items: start !important;
  min-height: auto !important;
}

body.impact-fullpage-active .graphic {
  position: sticky !important;
  top: 1.25rem !important;
  height: calc(100vh - 2.5rem) !important;
  min-height: 0 !important;
  width: min(1380px, calc(100vw - 8vw)) !important;
  max-width: none !important;
  z-index: 20 !important;
  pointer-events: auto !important;
}

body.impact-fullpage-active .sticky-viz {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  padding: 0.6rem !important;
}

body.impact-fullpage-active .story {
  display: block !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

body.impact-fullpage-active .story .step {
  visibility: hidden !important;
}

body.impact-fullpage-active .story .step.is-active {
  visibility: hidden !important;
}

body.impact-fullpage-active .viz-header {
  max-width: 720px !important;
}

body.impact-fullpage-active .viz-header h2 {
  font-size: clamp(1.05rem, 1.8vw, 1.65rem) !important;
}

body.impact-fullpage-active #chart-subtitle {
  font-size: 0.82rem !important;
  line-height: 1.28 !important;
}

body.impact-fullpage-active .impact-fill--color-columns {
  padding: 0.5rem !important;
}

body.impact-fullpage-active .impact-columns-viz {
  min-height: 0 !important;
  gap: 0.56rem !important;
}

body.impact-fullpage-active .impact-page-intro {
  padding: 0.58rem 0.72rem !important;
}

body.impact-fullpage-active .impact-column {
  padding: 0.62rem !important;
  border-radius: 22px !important;
}

body.impact-fullpage-active .impact-mini-card {
  padding: 0.42rem 0.5rem !important;
}

body.impact-fullpage-active .impact-mini-copy p {
  font-size: 0.61rem !important;
  line-height: 1.22 !important;
}

@media (max-width: 1050px) {
  body.impact-fullpage-active .scrolly {
    grid-template-columns: 1fr !important;
  }

  body.impact-fullpage-active .graphic {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
  }

  body.impact-fullpage-active .story {
    display: none !important;
  }
}

/* Step 08 no-right-text fix: keep its scroll space, but never draw the right-column text.
   This prevents the faded 08 wording from appearing behind Step 09 while scrolling. */
.story .step[data-step="7"] {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.story .step[data-step="7"].is-active {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* Explore mode: distinguish hover preview from clicked selection. */
.state.hovered:not(.selected) {
  stroke: #4f8fc0;
  stroke-width: 2.1;
  stroke-dasharray: 4 2;
}

.state.selected {
  stroke: #17202a;
  stroke-width: 2.8;
  filter: drop-shadow(0 3px 4px rgba(23, 32, 42, 0.22));
}

.bubble-toggle-label {
  min-width: 150px;
}

.bubble-toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.05rem;
  padding: 0.34rem 0.58rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.bubble-toggle-control input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: #4f8fc0;
}

.explore-bubble-layer {
  pointer-events: all;
}

.explore-exposure-bubble {
  cursor: pointer;
  vector-effect: non-scaling-stroke;
  transition: fill-opacity 0.16s ease, stroke-width 0.16s ease;
}

.explore-exposure-bubble:hover {
  fill-opacity: 0.55;
  stroke-width: 2.2;
}

.explore-exposure-bubble.selected {
  fill: rgba(23, 32, 42, 0.18);
  stroke: #17202a;
  stroke-width: 2.6;
}

body.explore-mode .controls {
  align-items: end;
}


/* Step 09 explore highlight polish: solid bright yellow, no dashed outlines. */
.state.hovered:not(.selected) {
  stroke: #ffd43b !important;
  stroke-width: 3.2 !important;
  stroke-dasharray: none !important;
  filter: drop-shadow(0 0 5px rgba(255, 212, 59, 0.72));
}

.state.selected {
  stroke: #ffd43b !important;
  stroke-width: 4.2 !important;
  stroke-dasharray: none !important;
  filter: drop-shadow(0 0 7px rgba(255, 212, 59, 0.9));
}

.explore-exposure-bubble.selected {
  stroke: #ffd43b !important;
  stroke-width: 3.4 !important;
  fill: rgba(255, 212, 59, 0.42) !important;
  filter: drop-shadow(0 0 6px rgba(255, 212, 59, 0.85));
}

.explore-exposure-bubble:hover:not(.selected) {
  stroke: #ffd43b !important;
  stroke-width: 3 !important;
  fill-opacity: 0.58;
  filter: drop-shadow(0 0 5px rgba(255, 212, 59, 0.72));
}

.explore-combined-legend {
  min-width: min(560px, 100%);
  padding: 0.42rem 0.6rem;
}

.explore-combined-legend svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.explore-bubble-legend-item circle {
  vector-effect: non-scaling-stroke;
}


/* Step 09 overlap fix: make exposure bubbles readable but less blocking. */
.explore-bubble-layer {
  pointer-events: none !important;
}

.explore-exposure-bubble {
  pointer-events: none !important;
  cursor: default !important;
  mix-blend-mode: multiply;
  fill-opacity: 0.42;
}

.explore-exposure-bubble:hover,
.explore-exposure-bubble:hover:not(.selected) {
  fill-opacity: 0.42 !important;
  stroke-width: 0.95 !important;
  filter: none !important;
}

.explore-exposure-bubble.selected {
  fill: rgba(79, 143, 192, 0.22) !important;
  stroke: #ffd43b !important;
  stroke-width: 2.6 !important;
  filter: drop-shadow(0 0 5px rgba(255, 212, 59, 0.72));
}

.explore-combined-legend {
  min-width: min(520px, 100%) !important;
  padding: 0.28rem 0.46rem !important;
}

.explore-combined-legend svg {
  height: 56px !important;
}


/* Daily-life detail: compact layout after map click */
.detail-section {
  max-width: 1440px;
  padding: 2.2rem 4vw 3rem;
  scroll-margin-top: 0.8rem;
}

.detail-section .section-header {
  max-width: 980px;
  margin-bottom: 1.05rem;
}

.detail-section .section-header h2 {
  font-size: clamp(2rem, 3.6vw, 3.35rem);
  line-height: 0.98;
}

.detail-section .section-header p {
  max-width: 860px;
  margin-top: 0.62rem;
  font-size: 0.98rem;
  line-height: 1.42;
}

.detail-section .state-picker-row {
  max-width: 420px;
  margin: -0.25rem auto 1rem;
  gap: 0.28rem;
}

.detail-section #state-picker {
  padding: 0.58rem 0.78rem;
  border-radius: 13px;
}

.detail-section .detail-grid {
  grid-template-columns: minmax(0, 1.16fr) minmax(310px, 0.84fr);
  gap: 0.8rem;
}

.detail-section .selected-state-panel,
.detail-section .daily-card {
  min-height: 260px;
  padding: 1.05rem;
  border-radius: 20px;
}

.detail-section .selected-state-panel {
  justify-content: center;
}

.detail-section .selected-state-panel h3 {
  margin-bottom: 0.55rem;
  font-size: clamp(2rem, 3.1vw, 3.15rem);
}

.detail-section .selected-state-panel p:not(.eyebrow) {
  font-size: 0.96rem;
  line-height: 1.46;
}

.detail-section .snapshot-metrics {
  gap: 0.62rem;
  margin-top: 0.85rem;
}

.detail-section .snapshot-metrics div {
  padding: 0.68rem;
  border-radius: 14px;
}

.detail-section .snapshot-metrics span {
  font-size: 0.64rem;
}

.detail-section .snapshot-metrics strong {
  font-size: 0.88rem;
}

.detail-section .daily-card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.35rem;
}

.detail-section .daily-card p:not(.eyebrow) {
  margin-top: 0;
  font-size: 0.94rem;
  line-height: 1.45;
}

.detail-section .stat-row {
  padding: 0.62rem 0;
  font-size: 0.94rem;
}

.detail-section .monthly-panel {
  grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1.55fr);
  gap: 0.75rem;
  margin-top: 0.72rem;
  padding: 0.72rem;
  border-radius: 20px;
}

.detail-section .monthly-panel h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.detail-section .monthly-panel p:not(.eyebrow) {
  font-size: 0.92rem;
  line-height: 1.42;
}

.detail-section .monthly-chart-card {
  min-height: 215px;
  padding: 0.55rem;
  border-radius: 18px;
}

.detail-section #monthly-chart {
  min-height: 200px;
}

@media (max-width: 1050px) {
  .detail-section .detail-grid,
  .detail-section .monthly-panel {
    grid-template-columns: 1fr;
  }

  .detail-section .selected-state-panel,
  .detail-section .daily-card {
    min-height: auto;
  }
}


/* Explore map: make bubbles less obstructive and keep the legend visible */
body.explore-mode .sticky-viz {
  grid-template-rows: auto minmax(300px, 1fr) auto;
  gap: 0.34rem;
}

body.explore-mode .viz-header {
  gap: 0.9rem;
  align-items: flex-start;
}

body.explore-mode .viz-title-block {
  flex: 1 1 0;
  max-width: 470px;
}

body.explore-mode .viz-header h2 {
  font-size: clamp(1rem, 1.55vw, 1.45rem);
}

body.explore-mode #chart-subtitle {
  font-size: 0.74rem;
  line-height: 1.28;
}

body.explore-mode #main-chart {
  min-height: 340px;
}

body.explore-mode .placeholder-legend.explore-combined-legend {
  min-width: 500px;
  padding: 0.22rem 0.42rem;
}

body.explore-mode #map-note {
  font-size: 0.69rem;
  line-height: 1.25;
}

.explore-exposure-bubble {
  mix-blend-mode: multiply;
  vector-effect: non-scaling-stroke;
}

/* Daily-life detail: true one-screen compact dashboard after map click */
.detail-section {
  min-height: 100vh;
  max-width: 1500px;
  padding: 0.85rem 4vw 1.15rem;
  display: grid;
  grid-template-rows: auto auto minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 0.58rem;
  align-content: start;
  scroll-margin-top: 0;
}

.detail-section .section-header {
  max-width: 900px;
  margin: 0 auto;
}

.detail-section .section-header .eyebrow {
  margin-bottom: 0.2rem;
}

.detail-section .section-header h2 {
  font-size: clamp(2rem, 3.1vw, 3rem);
  line-height: 0.95;
}

.detail-section .section-header p {
  max-width: 820px;
  margin-top: 0.38rem;
  font-size: 0.9rem;
  line-height: 1.32;
}

.detail-section .state-picker-row {
  max-width: 360px;
  margin: 0.1rem auto 0;
  gap: 0.18rem;
}

.detail-section .state-picker-row label {
  font-size: 0.62rem;
}

.detail-section #state-picker {
  padding: 0.48rem 0.72rem;
  border-radius: 12px;
  font-size: 0.92rem;
}

.detail-section .detail-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 0.7rem;
  min-height: 0;
}

.detail-section .selected-state-panel,
.detail-section .daily-card {
  min-height: 0;
  padding: 0.85rem;
  border-radius: 18px;
}

.detail-section .selected-state-panel h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.65rem, 2.8vw, 2.55rem);
}

.detail-section .selected-state-panel p:not(.eyebrow) {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.36;
}

.detail-section .snapshot-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
  margin-top: 0.62rem;
}

.detail-section .snapshot-metrics div {
  padding: 0.52rem;
  border-radius: 12px;
}

.detail-section .snapshot-metrics span {
  font-size: 0.56rem;
}

.detail-section .snapshot-metrics strong {
  font-size: 0.78rem;
}

.detail-section .daily-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1.18rem;
}

.detail-section .daily-card p:not(.eyebrow) {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
  line-height: 1.36;
}

.detail-section .stat-row {
  padding: 0.45rem 0;
  font-size: 0.84rem;
}

.detail-section .monthly-panel {
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1.64fr);
  gap: 0.65rem;
  margin-top: 0;
  padding: 0.58rem;
  border-radius: 18px;
  min-height: 0;
}

.detail-section .monthly-panel h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.detail-section .monthly-panel p:not(.eyebrow) {
  font-size: 0.82rem;
  line-height: 1.34;
}

.detail-section .monthly-chart-card {
  min-height: 0;
  padding: 0.42rem;
  border-radius: 16px;
}

.detail-section #monthly-chart {
  min-height: 0;
  height: 100%;
}

@media (max-height: 850px) {
  .detail-section {
    padding-top: 0.55rem;
    padding-bottom: 0.8rem;
    gap: 0.44rem;
  }

  .detail-section .section-header h2 {
    font-size: clamp(1.8rem, 2.75vw, 2.45rem);
  }

  .detail-section .section-header p {
    font-size: 0.82rem;
  }

  .detail-section .selected-state-panel,
  .detail-section .daily-card {
    padding: 0.72rem;
  }

  .detail-section .monthly-chart-card {
    min-height: 165px;
  }
}


/* Step 09: bottom legend stays color-only; bubble-size legend is drawn inside the explore map SVG only. */
body.explore-mode .placeholder-legend.explore-color-legend {
  min-width: 320px;
  padding: 0.24rem 0.46rem;
}

body.explore-mode .placeholder-legend.explore-color-legend svg {
  width: 320px;
  height: 50px;
}

.explore-bubble-legend-in-map {
  pointer-events: none;
}


/* === Compact refinements for state-change comparison and explore mode === */
.state-change-result {
  padding: clamp(1.1rem, 2.4vw, 1.8rem) clamp(0.9rem, 2.5vw, 1.8rem) !important;
}

.state-change-card {
  width: min(1120px, 100%) !important;
  min-height: auto !important;
  gap: 0.65rem !important;
}

.state-change-copy {
  max-width: 860px !important;
  padding: 0.8rem 0.95rem !important;
}

.state-change-copy h2 {
  margin: 0.08rem 0 0.34rem !important;
  font-size: clamp(1.7rem, 3.15vw, 2.85rem) !important;
  line-height: 0.97 !important;
}

.state-change-copy p:not(.eyebrow) {
  max-width: 820px !important;
  font-size: clamp(0.9rem, 1.06vw, 1rem) !important;
  line-height: 1.38 !important;
}

.state-change-controls {
  padding: 0.5rem 0.72rem !important;
  gap: 0.75rem !important;
}

.state-change-play-toggle {
  min-width: 84px !important;
  padding: 0.62rem 1rem !important;
}

.state-change-slider-wrap {
  gap: 0.28rem !important;
}

.state-change-slider-help {
  font-size: 0.8rem !important;
}

.state-change-map-cards {
  gap: 0.72rem !important;
}

.state-change-state-card.state-shape-card {
  min-height: 318px !important;
  padding: 0.85rem 0.95rem 0.95rem !important;
  grid-template-rows: auto minmax(132px, 1fr) auto auto !important;
}

.state-change-card-header h3 {
  font-size: clamp(1.7rem, 2.4vw, 2.35rem) !important;
}

.state-change-year-pill {
  min-width: 62px !important;
  padding: 0.45rem 0.6rem !important;
  font-size: 1rem !important;
}

.state-shape-stage {
  min-height: 150px !important;
  margin: 0.25rem 0 0.22rem !important;
}

.state-shape-svg {
  min-height: 142px !important;
}

.state-shape-card .state-change-value-row {
  margin-top: 0.12rem !important;
}

.state-change-value-row strong {
  font-size: clamp(2.35rem, 3.8vw, 3.55rem) !important;
}

.state-change-state-note {
  margin-top: 0.3rem !important;
  font-size: 0.76rem !important;
  line-height: 1.28 !important;
}

.state-change-note {
  padding: 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.3 !important;
}

body.explore-mode .sticky-viz {
  grid-template-rows: auto minmax(275px, 1fr) auto !important;
  gap: 0.26rem !important;
}

body.explore-mode .viz-header {
  gap: 0.62rem !important;
}

body.explore-mode .viz-title-block {
  max-width: 330px !important;
}

body.explore-mode .viz-header h2 {
  font-size: clamp(0.98rem, 1.32vw, 1.22rem) !important;
  line-height: 1.08 !important;
}

body.explore-mode #chart-subtitle {
  font-size: 0.67rem !important;
  line-height: 1.22 !important;
}

body.explore-mode .controls {
  grid-template-columns: repeat(2, minmax(145px, 1fr)) !important;
  gap: 0.42rem 0.48rem !important;
  min-width: 365px !important;
  max-width: 390px !important;
}

body.explore-mode .controls label {
  padding: 0.32rem 0.42rem !important;
  border-radius: 14px !important;
}

body.explore-mode .controls select,
body.explore-mode .controls input[type="range"],
body.explore-mode .bubble-toggle-control {
  font-size: 0.9rem !important;
}

body.explore-mode #main-chart {
  min-height: 318px !important;
}

body.explore-mode .placeholder-legend.explore-combined-legend {
  padding: 0.16rem 0.34rem !important;
}

body.explore-mode #map-note {
  font-size: 0.64rem !important;
  line-height: 1.22 !important;
}

@media (max-width: 1050px) {
  body.explore-mode .controls {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}


body.explore-mode .controls select { font-size: 0.82rem !important; }


/* Metric wording fit: shorter labels plus safer select sizing */
body.explore-mode .controls select,
body.explore-mode #metric-select {
  font-size: 0.82rem !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis;
}

body.explore-mode .controls label:nth-child(3) {
  min-width: 0 !important;
}


/* =========================================================
   FINAL COMPACT OVERRIDES — state comparison + daily detail
   ========================================================= */
.state-change-result {
  min-height: auto !important;
  padding: clamp(1rem, 2.2vh, 1.6rem) clamp(1rem, 3vw, 2.2rem) clamp(1.2rem, 2.6vh, 1.9rem) !important;
}
.state-change-card {
  width: min(1100px, 92vw) !important;
  gap: 0.75rem !important;
}
.state-change-copy {
  width: min(980px, 100%) !important;
  padding: 0.75rem 0.95rem !important;
}
.state-change-copy h2 {
  margin: 0.05rem 0 0.3rem !important;
  font-size: clamp(1.8rem, 3.4vw, 3.4rem) !important;
  line-height: 0.98 !important;
}
.state-change-copy p:not(.eyebrow) {
  margin: 0.35rem 0 0 !important;
  font-size: clamp(0.9rem, 1.06vw, 0.98rem) !important;
  line-height: 1.36 !important;
}
.state-change-blocks { gap: 0.65rem !important; }
.state-change-controls {
  width: min(850px, 100%) !important;
  padding: 0.56rem 0.95rem 0.62rem 0.72rem !important;
  border-radius: 28px !important;
}
.state-change-card .state-change-slider-top { margin-bottom: 0.28rem !important; }
.state-change-card .state-change-slider-label { font-size: 0.68rem !important; }
.state-change-card #state-change-year-output,
.state-change-card .state-change-year-output {
  font-size: 0.93rem !important;
  padding: 0.18rem 0.66rem !important;
}
.state-change-slider-help { font-size: 0.7rem !important; margin-top: 0.2rem !important; }
.state-change-map-cards {
  width: min(1020px, 100%) !important;
  gap: clamp(0.9rem, 2vw, 1.8rem) !important;
}
.state-change-state-card,
.state-change-state-card.state-shape-card,
.state-shape-card {
  padding: 0.6rem 0.74rem !important;
  grid-template-rows: auto clamp(160px, 19vh, 208px) auto auto !important;
}
.state-change-card-header h3 { font-size: clamp(1.3rem, 1.9vw, 1.95rem) !important; }
.state-change-card-header span { font-size: 0.6rem !important; }
.state-shape-stage { margin: 0.22rem 0 0.08rem !important; }
.state-shape-svg { width: min(100%, 290px) !important; max-height: 205px !important; }
.state-change-year-pill { min-width: 52px !important; padding: 0.3rem 0.5rem !important; font-size: 0.88rem !important; }
.state-change-value-row { gap: 0.25rem !important; }
.state-change-value-row strong { font-size: clamp(1.95rem, 3.8vw, 3.1rem) !important; }
.state-change-value-row small { font-size: 0.72rem !important; }
.state-change-state-note { margin-top: 0.16rem !important; font-size: 0.71rem !important; line-height: 1.16 !important; }
.state-change-footer { margin-top: 0.72rem !important; gap: 0.35rem !important; }
.state-change-footer .state-change-note { font-size: 0.71rem !important; }
.state-change-color-legend .legend-title { font-size: 0.76rem !important; }
.legend-scale-row { grid-template-columns: auto minmax(230px, 340px) auto !important; gap: 0.45rem !important; }
.legend-gradient { height: 10px !important; }

.detail-section {
  max-width: 1230px !important;
  padding: 2rem 3vw 2.8rem !important;
}
.detail-section .section-header { max-width: 740px !important; margin-bottom: 0.9rem !important; }
.detail-section .section-header h2 { font-size: clamp(1.85rem, 3.4vw, 3rem) !important; }
.detail-section .section-header p { margin-top: 0.55rem !important; font-size: 0.95rem !important; line-height: 1.42 !important; }
.state-picker-row { max-width: 370px !important; margin: -0.3rem auto 0.9rem !important; gap: 0.28rem !important; }
#state-picker { padding: 0.62rem 0.8rem !important; }
.detail-grid { gap: 0.8rem !important; grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.78fr) !important; }
.selected-state-panel { min-height: 260px !important; padding: 0.95rem !important; border-radius: 20px !important; }
.selected-state-panel h3 { margin: 0 0 0.48rem !important; font-size: clamp(1.55rem, 3.1vw, 2.6rem) !important; }
.selected-state-panel p:not(.eyebrow) { margin: 0 !important; font-size: 0.96rem !important; line-height: 1.42 !important; }
.snapshot-metrics { margin-top: 0.82rem !important; gap: 0.62rem !important; }
.snapshot-metrics div { padding: 0.68rem !important; }
.snapshot-metrics span { font-size: 0.64rem !important; }
.snapshot-metrics strong { font-size: 0.88rem !important; }
.daily-card { padding: 0.95rem !important; border-radius: 20px !important; }
.daily-card h3 { margin: 0 0 0.42rem !important; font-size: 1.3rem !important; }
.daily-card p:not(.eyebrow) { margin: 0 0 0.16rem !important; font-size: 0.95rem !important; line-height: 1.42 !important; }
.stat-row { padding: 0.62rem 0 !important; font-size: 0.94rem !important; }
.monthly-panel {
  margin-top: 0.72rem !important;
  padding: 0.72rem !important;
  gap: 0.75rem !important;
  grid-template-columns: minmax(195px, 0.48fr) minmax(0, 1.52fr) !important;
}
.monthly-panel h3 { margin: 0 0 0.42rem !important; font-size: 1.12rem !important; }
.monthly-panel p:not(.eyebrow) { font-size: 0.93rem !important; line-height: 1.42 !important; }
.monthly-chart-card { min-height: 228px !important; padding: 0.52rem !important; border-radius: 18px !important; }
#monthly-chart { min-height: 216px !important; }
@media (max-width: 1000px) {
  .detail-grid,
  .monthly-panel { grid-template-columns: 1fr !important; }
  .selected-state-panel { min-height: auto !important; }
}


/* Final Step 08 full-screen layout: let the impact comparison use the whole viewport. */
body.impact-fullpage-active .scrolly {
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
  max-width: none !important;
  gap: 0 !important;
  padding: 0 clamp(1.1rem, 3vw, 3rem) 4rem !important;
  margin: 0 auto !important;
}

body.impact-fullpage-active .graphic {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100vh !important;
  min-height: 0 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
}

body.impact-fullpage-active .story {
  display: none !important;
}

body.impact-fullpage-active .sticky-viz {
  width: min(1540px, 100%) !important;
  height: 100vh !important;
  margin: 0 auto !important;
  padding: clamp(0.7rem, 1.2vw, 1rem) !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: clamp(0.45rem, 0.8vh, 0.7rem) !important;
  overflow: hidden !important;
}

body.impact-fullpage-active .viz-header {
  width: min(780px, 58vw) !important;
  max-width: 780px !important;
  padding: 0.7rem 0.9rem !important;
  border-radius: 22px !important;
}

body.impact-fullpage-active .viz-header h2 {
  font-size: clamp(1.18rem, 1.65vw, 1.55rem) !important;
  line-height: 1.05 !important;
}

body.impact-fullpage-active #chart-subtitle {
  max-width: 720px !important;
  font-size: clamp(0.74rem, 0.9vw, 0.86rem) !important;
  line-height: 1.22 !important;
}

body.impact-fullpage-active .chart-wrap {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.impact-fullpage-active .impact-fill--color-columns {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  display: block !important;
}

body.impact-fullpage-active .impact-columns-viz,
body.impact-fullpage-active .impact-columns-viz--compact {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: clamp(0.55rem, 1vw, 0.9rem) !important;
}

body.impact-fullpage-active .impact-page-intro {
  grid-column: 1 / -1 !important;
  padding: clamp(0.65rem, 1vw, 0.9rem) clamp(0.8rem, 1.2vw, 1.1rem) !important;
  border-radius: 24px !important;
  display: grid !important;
  grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1fr) !important;
  gap: clamp(1rem, 3vw, 4rem) !important;
  align-items: center !important;
}

body.impact-fullpage-active .impact-page-intro h3 {
  font-size: clamp(1.55rem, 2.6vw, 2.45rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.06em !important;
}

body.impact-fullpage-active .impact-page-intro-copy {
  font-size: clamp(0.86rem, 1.18vw, 1.12rem) !important;
  line-height: 1.42 !important;
  max-width: 680px !important;
}

body.impact-fullpage-active .impact-column {
  min-height: 0 !important;
  height: 100% !important;
  padding: clamp(0.72rem, 1.05vw, 1.05rem) !important;
  border-radius: 26px !important;
  overflow: hidden !important;
}

body.impact-fullpage-active .impact-column-head h3 {
  font-size: clamp(1.45rem, 2.15vw, 2.25rem) !important;
  line-height: 0.98 !important;
}

body.impact-fullpage-active .impact-column-head p {
  font-size: clamp(0.72rem, 0.92vw, 0.88rem) !important;
  line-height: 1.25 !important;
}

body.impact-fullpage-active .impact-column-list {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(0.38rem, 0.75vh, 0.58rem) !important;
}

body.impact-fullpage-active .impact-mini-card {
  min-height: 0 !important;
  height: 100% !important;
  padding: clamp(0.5rem, 0.82vw, 0.72rem) clamp(0.55rem, 0.95vw, 0.8rem) !important;
  gap: clamp(0.44rem, 0.7vw, 0.64rem) !important;
  border-radius: 20px !important;
}

body.impact-fullpage-active .impact-mini-num {
  width: clamp(1.45rem, 2vw, 1.75rem) !important;
  height: clamp(1.45rem, 2vw, 1.75rem) !important;
  font-size: clamp(0.58rem, 0.78vw, 0.72rem) !important;
  flex: 0 0 auto !important;
}

body.impact-fullpage-active .impact-mini-top strong {
  font-size: clamp(0.78rem, 1.12vw, 1rem) !important;
  line-height: 1.05 !important;
}

body.impact-fullpage-active .impact-mini-top em {
  font-size: clamp(0.62rem, 0.86vw, 0.78rem) !important;
}

body.impact-fullpage-active .impact-mini-copy p {
  font-size: clamp(0.65rem, 0.88vw, 0.82rem) !important;
  line-height: 1.24 !important;
  margin-top: 0.15rem !important;
}

body.impact-fullpage-active .impact-mini-source {
  font-size: clamp(0.56rem, 0.72vw, 0.68rem) !important;
  margin-top: 0.1rem !important;
}

body.impact-fullpage-active .impact-columns-note {
  grid-column: 1 / -1 !important;
  min-height: auto !important;
  padding: 0.62rem 0.9rem !important;
  border-radius: 22px !important;
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
}

body.impact-fullpage-active .impact-columns-note strong {
  font-size: clamp(0.65rem, 0.82vw, 0.76rem) !important;
  white-space: nowrap !important;
}

body.impact-fullpage-active .impact-columns-note span {
  font-size: clamp(0.68rem, 0.88vw, 0.8rem) !important;
  line-height: 1.22 !important;
}

body.impact-fullpage-active #legend {
  display: block !important;
  width: min(720px, 55vw) !important;
  padding: 0.58rem 0.85rem !important;
}

body.impact-fullpage-active #map-note {
  font-size: clamp(0.78rem, 0.9vw, 0.9rem) !important;
}

@media (max-width: 1050px) {
  body.impact-fullpage-active .impact-columns-viz,
  body.impact-fullpage-active .impact-columns-viz--compact,
  body.impact-fullpage-active .impact-page-intro {
    grid-template-columns: 1fr !important;
  }
}

/* BUGFIX: Step 07 -> 08 should not collapse the scroll story.
   Keep the right-column steps in the document flow (hidden, not display:none),
   while letting the Step 08 visualization span the full width. */
body.impact-fullpage-active .scrolly {
  display: grid !important;
  grid-template-columns: minmax(560px, 61vw) minmax(340px, 39vw) !important;
  gap: clamp(1rem, 2vw, 2rem) !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 clamp(1.1rem, 3vw, 3rem) 5rem !important;
  margin: 0 auto !important;
  align-items: start !important;
}

body.impact-fullpage-active .graphic {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100vh !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
}

body.impact-fullpage-active .story {
  display: block !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  z-index: 0 !important;
}

body.impact-fullpage-active .story .step,
body.impact-fullpage-active .story .step.is-active {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Step 08 spacing fix: remove the unused legend/footer row and give the two impact columns more vertical space. */
body.impact-fullpage-active .sticky-viz {
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: clamp(0.35rem, 0.55vh, 0.55rem) !important;
}

body.impact-fullpage-active .legend-row,
body.impact-fullpage-active #legend,
body.impact-fullpage-active #map-note {
  display: none !important;
}

body.impact-fullpage-active .viz-header {
  padding: 0.55rem 0.82rem !important;
}

body.impact-fullpage-active .impact-page-intro {
  padding: 0.55rem 0.82rem !important;
  min-height: 0 !important;
}

body.impact-fullpage-active .impact-page-intro h3 {
  font-size: clamp(1.35rem, 2.25vw, 2.15rem) !important;
}

body.impact-fullpage-active .impact-page-intro-copy {
  font-size: clamp(0.76rem, 1vw, 0.98rem) !important;
  line-height: 1.32 !important;
}

body.impact-fullpage-active .impact-column {
  padding: clamp(0.58rem, 0.85vw, 0.86rem) !important;
}

body.impact-fullpage-active .impact-column-head h3 {
  font-size: clamp(1.24rem, 1.86vw, 1.95rem) !important;
}

body.impact-fullpage-active .impact-column-head p {
  display: none !important;
}

body.impact-fullpage-active .impact-column-list {
  gap: clamp(0.24rem, 0.55vh, 0.42rem) !important;
}

body.impact-fullpage-active .impact-mini-card {
  padding: clamp(0.4rem, 0.66vw, 0.58rem) clamp(0.48rem, 0.8vw, 0.66rem) !important;
}

body.impact-fullpage-active .impact-mini-copy p {
  font-size: clamp(0.58rem, 0.76vw, 0.72rem) !important;
  line-height: 1.16 !important;
  margin-top: 0.1rem !important;
}

body.impact-fullpage-active .impact-mini-source {
  font-size: clamp(0.5rem, 0.66vw, 0.6rem) !important;
  line-height: 1.05 !important;
}

body.impact-fullpage-active .impact-columns-note {
  padding: 0.48rem 0.72rem !important;
  border-radius: 18px !important;
}

body.impact-fullpage-active .impact-columns-note span {
  font-size: clamp(0.58rem, 0.76vw, 0.7rem) !important;
}


/* Review pass: compact state-change follow-up so the full view fits better */
.state-change-result {
  min-height: auto !important;
  padding: clamp(1rem, 2.2vh, 1.65rem) clamp(1rem, 3vw, 2.2rem) clamp(1.1rem, 2.4vh, 1.8rem) !important;
}

.state-change-card {
  width: min(1110px, 94vw) !important;
  min-height: auto !important;
  gap: 0.7rem !important;
  padding: clamp(0.5rem, 1.4vw, 1.1rem) 0 !important;
}

.state-change-copy {
  max-width: 900px !important;
  padding: 0.72rem 0.95rem !important;
  border-radius: 24px !important;
}

.state-change-copy .eyebrow {
  margin-bottom: 0.22rem !important;
  font-size: 0.72rem !important;
}

.state-change-copy h2 {
  margin: 0 0 0.32rem !important;
  font-size: clamp(1.8rem, 3.45vw, 3.35rem) !important;
  line-height: 0.98 !important;
}

.state-change-copy p:not(.eyebrow) {
  max-width: 850px !important;
  font-size: clamp(0.86rem, 1.05vw, 0.98rem) !important;
  line-height: 1.32 !important;
}

.state-change-controls {
  width: min(930px, 100%) !important;
  padding: 0.52rem 0.82rem !important;
  border-radius: 26px !important;
  gap: 0.78rem !important;
}

.state-change-play-toggle {
  min-width: 78px !important;
  padding: 0.58rem 0.95rem !important;
  font-size: 0.82rem !important;
}

.state-change-slider-wrap {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  gap: 0.22rem !important;
}

.state-change-slider-body {
  padding-top: 1.55rem !important;
}

.state-change-year-output {
  min-width: 3.8rem !important;
  padding: 0.18rem 0.55rem !important;
  font-size: 0.82rem !important;
}

.state-change-slider-label {
  font-size: 0.68rem !important;
}

.state-change-slider-help {
  margin-top: 0.12rem !important;
  font-size: 0.68rem !important;
}

.state-change-map-cards {
  width: min(1030px, 100%) !important;
  gap: clamp(0.8rem, 2vw, 1.6rem) !important;
}

.state-change-state-card.state-shape-card,
.state-change-state-card,
.state-shape-card {
  min-height: 300px !important;
  padding: 0.62rem 0.75rem 0.72rem !important;
  grid-template-rows: auto minmax(135px, 1fr) auto auto !important;
}

.state-change-card-header span {
  padding: 0.25rem 0.52rem !important;
  font-size: 0.58rem !important;
}

.state-change-card-header h3 {
  margin-top: 0.32rem !important;
  font-size: clamp(1.25rem, 2.15vw, 2rem) !important;
}

.state-change-year-pill {
  min-width: 48px !important;
  padding: 0.28rem 0.45rem !important;
  border-radius: 14px !important;
  font-size: 0.82rem !important;
}

.state-shape-stage {
  min-height: 140px !important;
  margin: 0.16rem 0 0 !important;
}

.state-shape-svg {
  max-height: 175px !important;
}

.state-change-value-row {
  margin-top: 0.1rem !important;
}

.state-change-value-row strong {
  font-size: clamp(2rem, 4.2vw, 3.35rem) !important;
}

.state-change-value-row small {
  font-size: 0.72rem !important;
}

.state-change-state-note {
  margin-top: 0.12rem !important;
  font-size: 0.68rem !important;
  line-height: 1.18 !important;
}

.state-change-footer {
  margin-top: 0.55rem !important;
}

.state-change-note {
  font-size: 0.7rem !important;
  line-height: 1.22 !important;
}

.state-change-color-legend .legend-title {
  font-size: 0.75rem !important;
}

.legend-scale-row {
  grid-template-columns: auto minmax(220px, 340px) auto !important;
  gap: 0.45rem !important;
}

.legend-gradient {
  height: 9px !important;
}


/* =========================================================
   REVIEW PASS: Full-width story from Step 01 onward
   Right-side step text remains in the DOM only as scroll triggers.
   Big Picture header now carries the narrative guidance.
   ========================================================= */
#main-story.scrolly {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-areas: "stack" !important;
  gap: 0 !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 clamp(1rem, 3.2vw, 3.6rem) 5rem !important;
  align-items: start !important;
}

#main-story .graphic {
  grid-area: stack !important;
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  width: 100% !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}

#main-story .sticky-viz {
  height: 100vh !important;
  width: 100% !important;
  max-width: none !important;
  padding: clamp(0.75rem, 1.2vw, 1.15rem) 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: clamp(0.45rem, 0.9vh, 0.7rem) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

#main-story .viz-header {
  width: min(980px, 100%) !important;
  max-width: min(980px, 100%) !important;
  padding: clamp(0.72rem, 1vw, 1rem) clamp(0.9rem, 1.4vw, 1.2rem) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 22px !important;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: none !important;
  align-items: flex-start !important;
}

#main-story .viz-title-block {
  min-width: 0 !important;
  max-width: 760px !important;
}

#main-story .viz-header h2 {
  font-size: clamp(1.2rem, 2vw, 1.95rem) !important;
  line-height: 1.05 !important;
}

#main-story #chart-subtitle {
  max-width: 860px !important;
  font-size: clamp(0.78rem, 1.02vw, 0.98rem) !important;
  line-height: 1.35 !important;
}

#main-story .chart-wrap {
  width: 100% !important;
  min-height: 0 !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
}

#main-story #main-chart {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: calc(100vh - 205px) !important;
  display: block !important;
}

#main-story .legend-row {
  width: fit-content !important;
  max-width: min(980px, 100%) !important;
  padding: 0.62rem 0.9rem !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 22px !important;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: none !important;
}

#main-story .story {
  grid-area: stack !important;
  position: relative !important;
  z-index: 3 !important;
  min-height: calc(9 * 100vh) !important;
  width: 100% !important;
  pointer-events: none !important;
  opacity: 1 !important;
}

#main-story .story .step {
  min-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  visibility: hidden !important;
  opacity: 0 !important;
  transform: none !important;
  pointer-events: none !important;
}

#main-story .story .step * {
  display: none !important;
}

/* Disable older Step 08 split/fullpage special cases after the full-width refactor. */
body.impact-fullpage-active #main-story.scrolly,
body.impact-fullpage-active #main-story .graphic,
body.impact-fullpage-active #main-story .sticky-viz,
body.impact-fullpage-active #main-story .story,
body.impact-fullpage-active #main-story .story .step {
  all: revert-layer;
}

/* Re-apply the intended full-width stack even if old body classes are present. */
body.impact-fullpage-active #main-story.scrolly {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-areas: "stack" !important;
  max-width: none !important;
  width: 100% !important;
  padding: 0 clamp(1rem, 3.2vw, 3.6rem) 5rem !important;
}
body.impact-fullpage-active #main-story .graphic {
  grid-area: stack !important;
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  width: 100% !important;
  z-index: 2 !important;
}
body.impact-fullpage-active #main-story .sticky-viz {
  height: 100vh !important;
  width: 100% !important;
  padding: clamp(0.75rem, 1.2vw, 1.15rem) 0 !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}
body.impact-fullpage-active #main-story .story {
  grid-area: stack !important;
  position: relative !important;
  z-index: 3 !important;
  min-height: calc(9 * 100vh) !important;
  pointer-events: none !important;
}
body.impact-fullpage-active #main-story .story .step {
  min-height: 100vh !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

body.explore-mode #main-story .viz-header {
  width: min(1000px, 100%) !important;
  max-width: min(1000px, 100%) !important;
}

body.explore-mode #main-story .controls {
  align-self: start !important;
}

@media (max-width: 900px) {
  #main-story.scrolly {
    padding-inline: 1rem !important;
  }

  #main-story .viz-header {
    width: 100% !important;
    flex-direction: column !important;
  }

  body.explore-mode #main-story .controls {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* Review pass: state detail page cleanup */
.detail-section {
  max-width: 1540px;
  padding: 0.9rem 4vw 1.05rem;
  grid-template-rows: auto auto auto minmax(260px, 1fr);
  gap: 0.72rem;
}

.detail-section .section-header {
  max-width: 980px;
  text-align: center;
}

.detail-section .section-header h2 {
  font-size: clamp(2.15rem, 3.4vw, 3.35rem);
  line-height: 0.98;
}

.detail-section .section-header p {
  max-width: 860px;
  font-size: 0.98rem;
  line-height: 1.34;
  margin-left: auto;
  margin-right: auto;
}

.detail-section .state-picker-row {
  margin-top: -0.05rem;
  margin-bottom: 0.12rem;
}

.detail-section .detail-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  gap: 1rem;
  align-items: stretch;
}

.detail-section .selected-state-panel,
.detail-section .daily-card {
  padding: 1rem 1.05rem;
  min-height: 235px;
  height: 100%;
}

.detail-section .selected-state-panel h3 {
  font-size: clamp(1.85rem, 3vw, 3rem);
  margin-bottom: 0.42rem;
}

.detail-section .selected-state-panel p:not(.eyebrow) {
  max-width: 760px;
  font-size: 0.94rem;
  line-height: 1.38;
}

.detail-section .snapshot-metrics {
  margin-top: 0.85rem;
  gap: 0.65rem;
}

.detail-section .snapshot-metrics div {
  padding: 0.68rem 0.72rem;
}

.detail-section .snapshot-metrics span {
  font-size: 0.62rem;
}

.detail-section .snapshot-metrics strong {
  font-size: 0.88rem;
}

.detail-section .daily-card {
  display: flex;
  flex-direction: column;
}

.detail-section .daily-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.42rem;
}

.detail-section .daily-card p:not(.eyebrow) {
  font-size: 0.94rem;
  line-height: 1.38;
  margin-bottom: 0.55rem;
}

.detail-section .stat-row {
  padding: 0.52rem 0;
  font-size: 0.93rem;
}

.detail-section .monthly-panel {
  grid-template-columns: minmax(210px, 0.28fr) minmax(0, 1.72fr);
  gap: 1rem;
  padding: 0.72rem;
  align-items: stretch;
  margin-top: 0.15rem;
  min-height: 305px;
}

.detail-section .monthly-panel > div:first-child {
  align-self: stretch;
  padding: 0.55rem 0.25rem 0.55rem 0.35rem;
}

.detail-section .monthly-panel h3 {
  font-size: 1.16rem;
  line-height: 1.05;
  margin-bottom: 0.55rem;
}

.detail-section .monthly-panel p:not(.eyebrow) {
  font-size: 0.92rem;
  line-height: 1.42;
}

.detail-section .monthly-chart-card {
  min-height: 285px;
  padding: 0.58rem 0.7rem 0.45rem;
}

.detail-section #monthly-chart {
  height: 100%;
  min-height: 275px;
}

@media (max-height: 850px) {
  .detail-section {
    padding-top: 0.55rem;
    gap: 0.5rem;
    grid-template-rows: auto auto auto minmax(235px, 1fr);
  }
  .detail-section .section-header h2 {
    font-size: clamp(1.9rem, 2.8vw, 2.55rem);
  }
  .detail-section .section-header p {
    font-size: 0.86rem;
    line-height: 1.25;
  }
  .detail-section #state-picker {
    padding: 0.42rem 0.7rem;
  }
  .detail-section .selected-state-panel,
  .detail-section .daily-card {
    min-height: 190px;
    padding: 0.78rem 0.9rem;
  }
  .detail-section .selected-state-panel h3 {
    font-size: clamp(1.55rem, 2.35vw, 2.2rem);
  }
  .detail-section .selected-state-panel p:not(.eyebrow),
  .detail-section .daily-card p:not(.eyebrow) {
    font-size: 0.82rem;
    line-height: 1.28;
  }
  .detail-section .snapshot-metrics {
    margin-top: 0.55rem;
  }
  .detail-section .snapshot-metrics div {
    padding: 0.5rem 0.58rem;
  }
  .detail-section .daily-card h3 {
    font-size: 1.12rem;
  }
  .detail-section .stat-row {
    padding: 0.38rem 0;
    font-size: 0.82rem;
  }
  .detail-section .monthly-panel {
    min-height: 250px;
    gap: 0.78rem;
    padding: 0.58rem;
  }
  .detail-section .monthly-chart-card {
    min-height: 230px;
  }
  .detail-section #monthly-chart {
    min-height: 220px;
  }
}

@media (max-width: 980px) {
  .detail-section {
    display: block;
    padding-top: 1.25rem;
  }
  .detail-section .detail-grid,
  .detail-section .monthly-panel {
    grid-template-columns: 1fr;
  }
}


/* === Final small refinements based on current base === */
.explore-selected-bubble-halo {
  vector-effect: non-scaling-stroke;
  stroke: #ffd43b !important;
  stroke-width: 2.3px !important;
  fill: rgba(255, 212, 59, 0.08) !important;
  filter: drop-shadow(0 0 4px rgba(255, 212, 59, 0.72));
  mix-blend-mode: normal !important;
}

.explore-exposure-bubble.selected {
  stroke: #ffd43b !important;
  stroke-width: 2.15px !important;
  fill: rgba(255, 212, 59, 0.22) !important;
  filter: drop-shadow(0 0 4px rgba(255, 212, 59, 0.56)) !important;
  mix-blend-mode: normal !important;
}

.explore-bubble-legend-in-map .bubble-size-legend-card text {
  paint-order: stroke;
  stroke: rgba(255, 249, 244, 0.82);
  stroke-width: 2px;
}

.detail-section {
  padding-top: 0.85rem !important;
  gap: 0.58rem !important;
}
.detail-section .section-header { margin-bottom: 0.55rem !important; }
.detail-section .section-header h2 { font-size: clamp(1.72rem, 3vw, 2.62rem) !important; }
.detail-section .section-header p { font-size: 0.88rem !important; line-height: 1.3 !important; margin-top: 0.34rem !important; }
.detail-section .state-picker-row { margin-bottom: 0.55rem !important; }
.detail-section .selected-state-panel,
.detail-section .daily-card {
  min-height: 210px !important;
  padding: 0.82rem 0.92rem !important;
}
.detail-section .selected-state-panel h3 { font-size: clamp(1.55rem, 2.55vw, 2.28rem) !important; }
.detail-section .selected-state-panel p:not(.eyebrow),
.detail-section .daily-card p:not(.eyebrow) { font-size: 0.86rem !important; line-height: 1.3 !important; }
.detail-section .snapshot-metrics { margin-top: 0.58rem !important; gap: 0.5rem !important; }
.detail-section .snapshot-metrics div { padding: 0.52rem 0.6rem !important; }
.detail-section .daily-card h3 { font-size: 1.14rem !important; }
.detail-section .stat-row { padding: 0.39rem 0 !important; font-size: 0.84rem !important; }
.detail-section .monthly-panel {
  min-height: 250px !important;
  margin-top: 0.05rem !important;
  padding: 0.56rem !important;
  gap: 0.72rem !important;
}
.detail-section .monthly-chart-card { min-height: 228px !important; }
.detail-section #monthly-chart { min-height: 218px !important; }

/* Requested cleanup pass: remove decorative boxes/cards while preserving the visualizations. */
.source-offset-connector,
.source-offset-label {
  display: none !important;
}

.viz-header,
.legend-row,
.line-caption,
.placeholder-legend,
.us-transition p:not(.eyebrow),
.expectation-intro,
.expectation-result-copy,
.state-change-copy {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.viz-header {
  padding: 1.2rem 1.7rem 0 !important;
}

.viz-title-block .eyebrow {
  display: none !important;
}

.viz-header h2 {
  font-size: clamp(2.2rem, 4.6vw, 4.2rem) !important;
  max-width: 1120px !important;
}

#chart-subtitle {
  max-width: 900px !important;
  font-size: clamp(1rem, 1.35vw, 1.32rem) !important;
  line-height: 1.35 !important;
}

.legend-row {
  width: auto !important;
  padding: 0 1.7rem 1.2rem !important;
  transform: none !important;
}

.line-caption .legend-caption,
.legend-caption {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Remove month mini-card boxes but keep the thermometer and month contents. */
.month-calendar .month-card > rect:first-child {
  display: none !important;
}

/* Remove exposure comparison card surfaces. */
.exposure-focus-card > rect:first-child,
.exposure-selected-rank-panel > rect:first-child,
.exposure-selected-note > rect:first-child,
.exposure-selected-top-message > rect:first-child {
  display: none !important;
}

/* Remove U.S. exposure card/key/callout surfaces. */
.us-exposure-panel > rect:first-child,
.us-exposure-block-viz > g > rect:first-child {
  display: none !important;
}

/* Make main visualization use more canvas area. */
.sticky-viz {
  padding: 0 !important;
}

.chart-wrap {
  min-height: 0 !important;
}

#main-chart {
  min-height: 620px !important;
}

/* Hot-day comparison page refinements. */
.hotday-smallmultiple-controls text,
.hotday-smallmultiple-color-legend text,
.hotday-temp-trend-inset text {
  paint-order: stroke;
  stroke: rgba(255, 248, 240, 0.7);
  stroke-width: 2px;
  stroke-linejoin: round;
}

.hotday-temp-trend-inset .axis path,
.hotday-temp-trend-inset .axis line {
  stroke: rgba(23,32,42,0.22) !important;
}

.exposure-sun .sun-glyph {
  filter: drop-shadow(0 2px 4px rgba(143,47,27,0.10));
}

/* This pass: keep calendar month boxes, but keep other decorative cards removed. */
.month-calendar .month-card > rect:first-child {
  display: inline !important;
  fill: rgba(255,255,255,0.74) !important;
  stroke: rgba(23,32,42,0.12) !important;
  stroke-width: 1.1px !important;
}
.month-calendar .month-card:has(rect.month-day-block) > rect:first-child,
.month-calendar .month-card > rect:first-child[fill*="196"] {
  fill: rgba(196,81,44,0.075) !important;
  stroke: rgba(196,81,44,0.24) !important;
}

/* Make the active story visuals feel larger and less boxed. */
.sticky-viz {
  grid-template-rows: auto minmax(600px, 1fr) auto !important;
}
.viz-header,
.legend-row {
  border-radius: 0 !important;
}
.legend-row {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Keep exposure and U.S. exposure comparison frameless. */
.exposure-focus-card > rect:first-child,
.exposure-selected-rank-panel > rect:first-child,
.exposure-selected-note > rect:first-child,
.exposure-selected-top-message > rect:first-child,
.us-exposure-panel > rect:first-child,
.us-exposure-block-viz > g > rect:first-child {
  display: none !important;
}
.month-calendar .month-card.has-hotdays > rect:first-child {
  fill: rgba(196,81,44,0.075) !important;
  stroke: rgba(196,81,44,0.24) !important;
}
.month-calendar .month-card.is-empty > rect:first-child {
  fill: rgba(255,255,255,0.74) !important;
  stroke: rgba(23,32,42,0.12) !important;
}

/* Latest requested layout tweaks: exposure map, U.S. suns, and Explore controls. */
/* Explore controls: year slider takes the full first row; scenario/metric/bubbles sit below. */
body.explore-mode .viz-header {
  align-items: start !important;
  gap: 1.1rem !important;
}

body.explore-mode .controls {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) !important;
  grid-template-areas:
    "year year year"
    "scenario metric bubbles" !important;
  min-width: min(760px, 58vw) !important;
  max-width: min(820px, 60vw) !important;
  gap: 0.65rem !important;
  align-items: stretch !important;
}

body.explore-mode .controls label:nth-child(1) { grid-area: scenario !important; }
body.explore-mode .controls label:nth-child(2) { grid-area: year !important; }
body.explore-mode .controls label:nth-child(3) { grid-area: metric !important; }
body.explore-mode .controls label:nth-child(4) { grid-area: bubbles !important; }

body.explore-mode .controls label:nth-child(2) {
  grid-template-columns: auto 1fr !important;
  grid-template-rows: auto auto !important;
  column-gap: 0.8rem !important;
  align-items: center !important;
}

body.explore-mode .controls label:nth-child(2) input[type="range"] {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
}

body.explore-mode .controls select,
body.explore-mode .bubble-toggle-control {
  width: 100% !important;
  max-width: none !important;
}

/* Give the U.S. exposure sun grids a little breathing room from their labels. */
.exposure-sun-grid {
  transform-box: fill-box;
}

/* Keep the frameless U.S. comparison clean after the sun grid was resized. */
.us-exposure-panel > rect:first-child,
.us-exposure-block-viz > g > rect:first-child {
  display: none !important;
}

@media (max-width: 1100px) {
  body.explore-mode .controls {
    min-width: min(640px, 54vw) !important;
    max-width: min(680px, 56vw) !important;
    grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
  }
}

/* Final layout refinements requested in the latest round. */
/* Explore mode: keep the headline on top, then place the long year bar and the controls underneath, aligned to the right. */
body.explore-mode #main-story .viz-header {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: start !important;
  row-gap: 0.9rem !important;
}

body.explore-mode #main-story .viz-title-block {
  max-width: 760px !important;
}

body.explore-mode #main-story .viz-title-block h2 {
  margin-bottom: 0.3rem !important;
}

body.explore-mode #main-story .controls {
  justify-self: end !important;
  width: min(860px, 100%) !important;
  min-width: 0 !important;
  max-width: min(860px, 100%) !important;
  margin-left: auto !important;
}

@media (max-width: 1100px) {
  body.explore-mode #main-story .controls {
    justify-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Latest Explore polish: smaller header/controls, larger map area. */
body.explore-mode #main-story .viz-header {
  padding: 1.05rem 1.45rem !important;
  row-gap: 0.55rem !important;
  max-width: min(960px, 76vw) !important;
}

body.explore-mode #main-story .viz-title-block h2,
body.explore-mode .viz-header h2 {
  font-size: clamp(1.55rem, 2.05vw, 2.05rem) !important;
  line-height: 0.98 !important;
  margin-bottom: 0.22rem !important;
}

body.explore-mode #main-story .viz-title-block p,
body.explore-mode #chart-subtitle {
  font-size: clamp(0.82rem, 1vw, 0.98rem) !important;
  line-height: 1.25 !important;
  max-width: 760px !important;
}

body.explore-mode #main-story .controls {
  width: min(760px, 100%) !important;
  max-width: min(760px, 100%) !important;
  gap: 0.45rem !important;
}

body.explore-mode #main-story .controls label {
  padding: 0.55rem 0.65rem !important;
  border-radius: 14px !important;
  font-size: 0.68rem !important;
}

body.explore-mode #main-story .controls select,
body.explore-mode #main-story .bubble-toggle-control {
  min-height: 2.15rem !important;
  padding: 0.48rem 0.58rem !important;
  border-radius: 12px !important;
  font-size: 0.92rem !important;
}

body.explore-mode #main-story .controls label:nth-child(2) input[type="range"] {
  height: 1.2rem !important;
}

body.explore-mode #main-story .chart-wrap {
  margin-top: -0.25rem !important;
}



/* ============================================================
   IMPACT SCROLL — 画卷式 styles
   追加到 style.css 末尾。仅用项目已有 :root 变量。
   ============================================================ */

/* 外层：撑出滚动空间。sticky 框在内部固定 */
.impact-scroll {
  position: relative;
}

/* ---- sticky 大框（画卷本体）---- */
.impact-frame {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vh, 2.5rem) clamp(1rem, 4vw, 3rem);
  z-index: 1;
}

.impact-frame-inner {
  position: relative;
  width: min(880px, 92vw);
  height: min(560px, 78vh);
  padding: clamp(1.4rem, 3vw, 2.6rem);
  padding-left: clamp(2.2rem, 4vw, 3.4rem);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(40, 55, 70, 0.14);
  overflow: hidden;
}

/* 卷轴两端的木轴质感（上下渐隐边） */
.impact-frame-inner::before,
.impact-frame-inner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 56px;
  pointer-events: none;
  z-index: 3;
}
.impact-frame-inner::before {
  top: 0;
  background: linear-gradient(180deg, var(--glass-bg) 12%, transparent);
}
.impact-frame-inner::after {
  bottom: 0;
  background: linear-gradient(0deg, var(--glass-bg) 12%, transparent);
}

/* ---- 头部 ---- */
.impact-frame-head {
  position: absolute;
  top: clamp(1.1rem, 2.4vw, 1.8rem);
  left: clamp(2.2rem, 4vw, 3.4rem);
  right: clamp(1.4rem, 3vw, 2.6rem);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  z-index: 4;
}
.impact-frame-head .step-number {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.impact-frame-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ---- 进度卷轴 ---- */
.impact-rail {
  position: absolute;
  top: clamp(3.4rem, 6vw, 4.6rem);
  bottom: clamp(1.4rem, 3vw, 2.6rem);
  left: clamp(1.3rem, 2.6vw, 2rem);
  width: 3px;
  border-radius: 999px;
  background: rgba(143, 47, 27, 0.12);
  z-index: 4;
}
.impact-rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- 内容舞台：panel 绝对叠放 ---- */
.impact-stage {
  position: relative;
  height: 100%;
  display: grid;
  place-items: center;
}

.impact-panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  padding: clamp(2.4rem, 5vw, 3.4rem) 0.4rem clamp(1rem, 2vw, 1.6rem);
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.impact-panel.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* 已划过去的 panel 略微上移淡出 */
.impact-panel.is-past {
  opacity: 0;
  transform: translateY(-34px);
}

/* ---- 图标 ---- */
.impact-panel-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}
.impact-panel-icon svg {
  width: 116px;
  height: 92px;
  display: block;
}

/* ---- 文字 ---- */
.impact-panel-tag {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.impact-panel-copy h3 {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}
.impact-panel-copy h3 a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease, color 0.2s ease;
}
.impact-panel-copy h3 a:hover {
  color: var(--accent-dark);
  background-size: 100% 2px;
}
.impact-panel-copy h3 a::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.3em;
  font-size: 0.6em;
  vertical-align: 0.25em;
  color: var(--accent);
  opacity: 0.65;
}
.impact-panel-copy p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  line-height: 1.6;
}

/* ---- 滚动触发器：撑出滚动距离 ---- */
.impact-triggers {
  position: relative;
  margin-top: -100vh;   /* 让第一段与 sticky 框对齐 */
}
.impact-trigger {
  height: 100vh;
}

/* ---- 响应式 ---- */
@media (max-width: 680px) {
  .impact-frame-inner {
    height: min(620px, 82vh);
  }
  .impact-panel {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    align-content: center;
  }
  .impact-panel-icon {
    justify-content: flex-start;
  }
  .impact-panel-icon svg {
    width: 84px;
    height: 66px;
  }
}


/* ============================================================
   Text-box width fix
   The plot narration boxes should size with their column instead of
   being locked to a narrow fixed max-width.
   ============================================================ */
.scrolly {
  grid-template-columns: minmax(0, 1fr) minmax(420px, clamp(460px, 36vw, 720px));
  column-gap: clamp(1.25rem, 2.4vw, 3rem);
  align-items: stretch;
}

.story {
  width: 100%;
  max-width: none;
}

.step {
  width: 100%;
  padding-right: clamp(0.75rem, 1.8vw, 2rem);
}

.step h2,
.step p:not(.step-number) {
  width: 100%;
  max-width: min(100%, 680px);
  box-sizing: border-box;
}

.step p:not(.step-number) {
  width: min(100%, 680px);
}

.impact-panel-copy,
.impact-panel-copy p {
  width: 100%;
  max-width: min(100%, 720px);
  box-sizing: border-box;
}

@media (max-width: 1180px) {
  .scrolly {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 44vw);
    padding-inline: clamp(1rem, 2vw, 2rem);
  }

  .step h2,
  .step p:not(.step-number) {
    max-width: 100%;
  }
}

@media (max-width: 920px) {
  .scrolly {
    grid-template-columns: 1fr;
  }

  .story {
    max-width: min(720px, calc(100vw - 2rem));
    margin-inline: auto;
  }

  .step {
    padding-inline: 0;
  }
}

/* ============================================================
   Follow-up box-width fix
   The top title card and bottom legend/info card in the main
   story should not stay locked to an awkward fixed width.
   In story mode, let them size to their content, with sensible
   caps and wrapping. Explore mode keeps its larger control layout.
   ============================================================ */
body:not(.explore-mode) #main-story .viz-header {
  width: fit-content !important;
  max-width: min(58rem, 100%) !important;
  min-width: min(38rem, 100%) !important;
  justify-content: flex-start !important;
}

body:not(.explore-mode) #main-story .viz-title-block {
  max-width: min(52rem, 100%) !important;
}

body:not(.explore-mode) #main-story #chart-subtitle {
  max-width: min(50rem, 100%) !important;
}

body:not(.explore-mode) #main-story .legend-row {
  width: fit-content !important;
  max-width: min(60rem, 100%) !important;
  min-width: min(36rem, 100%) !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0.45rem !important;
}

body:not(.explore-mode) #main-story #map-note {
  max-width: min(48rem, 100%) !important;
  line-height: 1.45 !important;
}

@media (max-width: 920px) {
  body:not(.explore-mode) #main-story .viz-header,
  body:not(.explore-mode) #main-story .legend-row {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body:not(.explore-mode) #main-story .legend-row {
    gap: 0.55rem !important;
  }
}

/* ============================================================
   FINAL PAGE + BOX FIX
   After the impact section was moved out of the main scrolly, the
   old scroll height was still sized for extra pages. Keep exactly
   one scroll page per remaining main-story step, and make plot text
   boxes use the full plot width instead of an inherited fixed card.
   ============================================================ */
#main-story .story,
body.impact-fullpage-active #main-story .story,
body.impact-fullpage-active .story {
  min-height: calc(6 * 100vh) !important;
}

#main-story .story .step,
body.impact-fullpage-active #main-story .story .step {
  min-height: 100vh !important;
}

/* Main plot title/subtitle card: full plot width, text kept readable. */
#main-story .viz-header,
body:not(.explore-mode) #main-story .viz-header,
body.explore-mode #main-story .viz-header,
body.impact-fullpage-active #main-story .viz-header {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: clamp(1rem, 2vw, 2rem) !important;
}

#main-story .viz-title-block,
body:not(.explore-mode) #main-story .viz-title-block,
body.explore-mode #main-story .viz-title-block {
  width: auto !important;
  max-width: min(880px, 64vw) !important;
  min-width: 0 !important;
}

#main-story #chart-subtitle,
body:not(.explore-mode) #main-story #chart-subtitle,
body.explore-mode #main-story #chart-subtitle {
  width: 100% !important;
  max-width: 860px !important;
}

/* Main plot legend/note card: full plot width, no locked narrow card. */
#main-story .legend-row,
body:not(.explore-mode) #main-story .legend-row,
body.impact-fullpage-active #main-story .legend-row {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 0.75rem 1.1rem !important;
}

#main-story #legend {
  flex: 0 1 auto !important;
  min-width: min(360px, 100%) !important;
  max-width: min(560px, 100%) !important;
}

#main-story #map-note,
body:not(.explore-mode) #main-story #map-note,
body.impact-fullpage-active #main-story #map-note {
  flex: 1 1 420px !important;
  max-width: none !important;
  min-width: min(420px, 100%) !important;
  line-height: 1.45 !important;
}

/* Keep explore controls usable after the full-width header override. */
body.explore-mode #main-story .controls {
  flex: 0 1 min(860px, 56vw) !important;
  width: min(860px, 56vw) !important;
  max-width: min(860px, 56vw) !important;
  min-width: min(620px, 54vw) !important;
  margin-left: auto !important;
}

@media (max-width: 1100px) {
  #main-story .viz-header,
  body.explore-mode #main-story .viz-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    row-gap: 0.75rem !important;
  }

  #main-story .viz-title-block,
  body.explore-mode #main-story .viz-title-block {
    max-width: 100% !important;
  }

  body.explore-mode #main-story .controls {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
  }
}

@media (max-width: 720px) {
  #main-story .legend-row,
  body:not(.explore-mode) #main-story .legend-row,
  body.impact-fullpage-active #main-story .legend-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #main-story #legend,
  #main-story #map-note {
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* ============================================================
   FINAL FIX: Restore Explore as the last main-story plot step.
   The impact section now lives outside #main-story, so the story
   has 7 plot pages: 6 narrative pages + 1 explore page.
   ============================================================ */
#main-story .story,
body.impact-fullpage-active #main-story .story,
body.impact-fullpage-active .story {
  min-height: calc(7 * 100vh) !important;
}

/* Plot text/card boxes: do not lock them to the old narrow 980px card.
   Let the header and legend span the plot width while keeping text readable. */
#main-story .viz-header,
body:not(.explore-mode) #main-story .viz-header,
body.explore-mode #main-story .viz-header,
body.impact-fullpage-active #main-story .viz-header {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: clamp(0.7rem, 1vw, 1rem) clamp(0.9rem, 1.5vw, 1.35rem) !important;
  border-radius: 22px !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: clamp(1rem, 2vw, 2.25rem) !important;
}

#main-story .viz-title-block,
body:not(.explore-mode) #main-story .viz-title-block,
body.explore-mode #main-story .viz-title-block {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

#main-story #chart-subtitle,
body:not(.explore-mode) #main-story #chart-subtitle,
body.explore-mode #main-story #chart-subtitle {
  width: min(100%, 74rem) !important;
  max-width: none !important;
}

#main-story .legend-row,
body:not(.explore-mode) #main-story .legend-row,
body.explore-mode #main-story .legend-row,
body.impact-fullpage-active #main-story .legend-row {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0.65rem clamp(0.85rem, 1.4vw, 1.25rem) !important;
  border-radius: 22px !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 0.65rem 1.1rem !important;
}

#main-story #legend {
  flex: 0 1 auto !important;
  min-width: min(360px, 100%) !important;
  max-width: min(620px, 100%) !important;
}

#main-story #map-note,
body:not(.explore-mode) #main-story #map-note,
body.explore-mode #main-story #map-note,
body.impact-fullpage-active #main-story #map-note {
  flex: 1 1 34rem !important;
  width: auto !important;
  min-width: min(34rem, 100%) !important;
  max-width: none !important;
  line-height: 1.45 !important;
}

/* Explore controls: keep them visible and inside the header, but never let
   their min-width push the map/chart out of the page. */
body.explore-mode #main-story .controls {
  display: grid !important;
  flex: 0 1 min(860px, 48vw) !important;
  width: min(860px, 48vw) !important;
  max-width: min(860px, 48vw) !important;
  min-width: 0 !important;
  margin-left: auto !important;
  justify-self: end !important;
}

body.explore-mode #main-story #main-chart {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 1200px) {
  #main-story .viz-header,
  body.explore-mode #main-story .viz-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    row-gap: 0.75rem !important;
  }

  body.explore-mode #main-story .controls {
    width: 100% !important;
    max-width: 100% !important;
    justify-self: stretch !important;
  }
}

@media (max-width: 760px) {
  #main-story .legend-row,
  body:not(.explore-mode) #main-story .legend-row,
  body.explore-mode #main-story .legend-row,
  body.impact-fullpage-active #main-story .legend-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #main-story #legend,
  #main-story #map-note {
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* ============================================================
   HARD RESTORE: Explore plot visibility + page count
   Keep the last main-story step as a real map/explore page.
   Earlier fixes accidentally let old layout rules collapse the chart area.
   ============================================================ */
#main-story .story,
body.impact-fullpage-active #main-story .story,
body.impact-fullpage-active .story {
  min-height: calc(var(--main-story-pages, 7) * 100vh) !important;
}

#main-story .story .step {
  min-height: 100vh !important;
}

body.explore-mode #main-story.scrolly {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-areas: "stack" !important;
  width: 100% !important;
  max-width: none !important;
  padding-inline: clamp(1rem, 3vw, 3rem) !important;
}

body.explore-mode #main-story .graphic {
  grid-area: stack !important;
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  width: 100% !important;
  z-index: 2 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.explore-mode #main-story .sticky-viz {
  height: 100vh !important;
  width: 100% !important;
  min-height: 100vh !important;
  display: grid !important;
  grid-template-rows: auto minmax(460px, 1fr) auto !important;
  gap: clamp(0.45rem, 0.9vh, 0.75rem) !important;
  overflow: visible !important;
}

body.explore-mode #main-story .chart-wrap {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  min-height: min(58vh, 620px) !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.explore-mode #main-story #main-chart {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: min(58vh, 620px) !important;
  max-height: none !important;
}

body.explore-mode #main-story #main-chart .map-layer,
body.explore-mode #main-story #main-chart path.state {
  display: initial !important;
  visibility: visible !important;
  opacity: 1;
}

body.explore-mode #main-story .viz-header {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr) !important;
  gap: clamp(0.85rem, 1.8vw, 1.5rem) !important;
  align-items: start !important;
}

body.explore-mode #main-story .controls {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-areas:
    "year year year"
    "scenario metric bubbles" !important;
}

body.explore-mode #main-story .controls label,
body.explore-mode #main-story .controls select,
body.explore-mode #main-story .bubble-toggle-control {
  min-width: 0 !important;
}

body.explore-mode #main-story .legend-row {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
}

body.explore-mode.no-tooltip .tooltip {
  display: block !important;
}

@media (max-width: 1050px) {
  body.explore-mode #main-story .viz-header {
    grid-template-columns: 1fr !important;
  }
  body.explore-mode #main-story .controls {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "scenario"
      "year"
      "metric"
      "bubbles" !important;
  }
  body.explore-mode #main-story .sticky-viz {
    grid-template-rows: auto minmax(360px, 1fr) auto !important;
  }
}

/* ============================================================
   FINAL ORDER FIX: Impact scroll belongs between the U.S.
   comparison step and the final Explore step.
   Because the impact section is now inside #main-story .story,
   keep it visible/clickable while the story steps themselves remain
   invisible scroll triggers.
   ============================================================ */
#main-story #impact-scroll {
  position: relative !important;
  z-index: 4 !important;
  width: 100% !important;
  min-height: 500vh !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#main-story #impact-scroll,
#main-story #impact-scroll * {
  display: revert !important;
}

#main-story #impact-scroll .impact-frame {
  display: grid !important;
  z-index: 6 !important;
}

#main-story #impact-scroll .impact-frame-inner,
#main-story #impact-scroll .impact-stage,
#main-story #impact-scroll .impact-triggers,
#main-story #impact-scroll .impact-trigger {
  display: block !important;
}

#main-story #impact-scroll .impact-panel {
  display: grid !important;
}

#main-story #impact-scroll .impact-panel-icon,
#main-story #impact-scroll .impact-panel-copy,
#main-story #impact-scroll .impact-frame-head {
  display: flex !important;
}

#main-story #impact-scroll .impact-panel-copy {
  display: block !important;
}

/* Final non-explore text/card width fix. Avoid fixed 980px-style boxes. */
body:not(.explore-mode) #main-story .viz-header {
  justify-self: start !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: min(64rem, 100%) !important;
  display: flex !important;
}

body:not(.explore-mode) #main-story .viz-title-block {
  width: auto !important;
  min-width: 0 !important;
  max-width: min(56rem, calc(100vw - 7rem)) !important;
}

body:not(.explore-mode) #main-story .viz-title-block h2,
body:not(.explore-mode) #main-story #chart-subtitle {
  width: auto !important;
  max-width: min(56rem, calc(100vw - 7rem)) !important;
}

body:not(.explore-mode) #main-story .legend-row {
  justify-self: start !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: min(64rem, 100%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

body:not(.explore-mode) #main-story #legend,
body:not(.explore-mode) #main-story #map-note {
  min-width: 0 !important;
  max-width: min(56rem, calc(100vw - 7rem)) !important;
}

@media (max-width: 760px) {
  body:not(.explore-mode) #main-story .viz-header,
  body:not(.explore-mode) #main-story .legend-row {
    width: 100% !important;
    max-width: 100% !important;
  }

  body:not(.explore-mode) #main-story .viz-title-block,
  body:not(.explore-mode) #main-story .viz-title-block h2,
  body:not(.explore-mode) #main-story #chart-subtitle,
  body:not(.explore-mode) #main-story #legend,
  body:not(.explore-mode) #main-story #map-note {
    max-width: 100% !important;
  }
}

/* ============================================================
   IMPACT PAGE REDESIGN — no card, same visual language as the
   opening / transition pages. Keep the scroll-driven panels, but
   remove the framed card surface so the content feels like a full
   story page before Explore.
   ============================================================ */
#main-story #impact-scroll {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  min-height: 900vh !important;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 196, 92, 0.22), transparent 22rem),
    radial-gradient(circle at 18% 76%, rgba(196, 81, 44, 0.14), transparent 24rem),
    linear-gradient(180deg, #fff8f0 0%, #f6e3d1 58%, #edf2f4 100%) !important;
  overflow: clip !important;
}

#main-story #impact-scroll .impact-frame {
  position: sticky !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: grid !important;
  place-items: center !important;
  padding: clamp(3rem, 7vh, 5rem) clamp(1.25rem, 7vw, 7rem) !important;
  background: transparent !important;
}

#main-story #impact-scroll .impact-frame-inner {
  position: relative !important;
  width: min(1180px, 100%) !important;
  height: min(720px, 82vh) !important;
  padding: 0 !important;
  padding-left: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

#main-story #impact-scroll .impact-frame-inner::before,
#main-story #impact-scroll .impact-frame-inner::after {
  display: none !important;
}

#main-story #impact-scroll .impact-frame-head {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 8 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  gap: 1rem !important;
  pointer-events: none !important;
}

#main-story #impact-scroll .impact-frame-head .step-number,
#main-story #impact-scroll .impact-panel-tag {
  color: var(--accent-dark) !important;
  font-size: clamp(0.68rem, 0.9vw, 0.78rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}

#main-story #impact-scroll .impact-frame-hint {
  margin: 0 !important;
  color: rgba(95, 107, 115, 0.76) !important;
  font-size: clamp(0.62rem, 0.85vw, 0.72rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
}

#main-story #impact-scroll .impact-rail {
  top: auto !important;
  bottom: clamp(0.5rem, 1.2vh, 1rem) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: rgba(143, 47, 27, 0.14) !important;
  z-index: 8 !important;
}

#main-story #impact-scroll .impact-rail-fill {
  top: 0 !important;
  left: 0 !important;
  width: 0% !important;
  height: 100% !important;
  background: var(--accent) !important;
  border-radius: 999px !important;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#main-story #impact-scroll .impact-stage {
  position: relative !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
}

#main-story #impact-scroll .impact-panel {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(96px, 0.24fr) minmax(0, 0.76fr) !important;
  gap: clamp(1.3rem, 4vw, 4.5rem) !important;
  align-items: center !important;
  padding: clamp(2.5rem, 8vh, 5rem) 0 clamp(2rem, 7vh, 4.5rem) !important;
  background: transparent !important;
  opacity: 0 !important;
  transform: translateY(42px) scale(0.985) !important;
  transition: opacity 0.55s ease, transform 0.55s ease !important;
  pointer-events: none !important;
}

#main-story #impact-scroll .impact-panel.is-active {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

#main-story #impact-scroll .impact-panel.is-past {
  opacity: 0 !important;
  transform: translateY(-42px) scale(0.985) !important;
}

#main-story #impact-scroll .impact-panel-icon {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  opacity: 0.9 !important;
  filter: drop-shadow(0 18px 36px rgba(143, 47, 27, 0.12)) !important;
}

#main-story #impact-scroll .impact-panel-icon svg {
  width: clamp(92px, 12vw, 150px) !important;
  height: auto !important;
  min-height: 88px !important;
  display: block !important;
}

#main-story #impact-scroll .impact-panel-copy {
  display: block !important;
  width: min(840px, 100%) !important;
  max-width: 840px !important;
}

#main-story #impact-scroll .impact-panel-copy h3 {
  margin: 0 0 clamp(0.9rem, 2vh, 1.35rem) !important;
  color: #17202a !important;
  font-size: clamp(2.45rem, 5.7vw, 5.8rem) !important;
  line-height: 0.94 !important;
  letter-spacing: -0.075em !important;
  text-wrap: balance !important;
}

#main-story #impact-scroll .impact-panel-copy h3 a {
  color: inherit !important;
  text-decoration: none !important;
  background-image: none !important;
}

#main-story #impact-scroll .impact-panel-copy h3 a:hover {
  color: var(--accent-dark) !important;
}

#main-story #impact-scroll .impact-panel-copy h3 a::after {
  margin-left: 0.22em !important;
  color: rgba(196, 81, 44, 0.75) !important;
}

#main-story #impact-scroll .impact-panel-copy p {
  width: min(760px, 100%) !important;
  max-width: 760px !important;
  margin: 0 !important;
  color: #5f6b73 !important;
  font-size: clamp(1rem, 1.45vw, 1.28rem) !important;
  line-height: 1.6 !important;
}

#main-story #impact-scroll .impact-panel-copy p a {
  color: var(--accent-dark) !important;
  font-weight: 750 !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 0.2em !important;
}

#main-story #impact-scroll .impact-triggers {
  position: relative !important;
  margin-top: -100vh !important;
  z-index: 7 !important;
}

#main-story #impact-scroll .impact-trigger {
  height: 100vh !important;
}

@media (max-width: 780px) {
  #main-story #impact-scroll .impact-frame {
    padding: 5rem 1.25rem 3rem !important;
  }

  #main-story #impact-scroll .impact-frame-inner {
    height: min(760px, 84vh) !important;
  }

  #main-story #impact-scroll .impact-frame-head {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
  }

  #main-story #impact-scroll .impact-panel {
    grid-template-columns: 1fr !important;
    align-content: center !important;
    gap: 1.1rem !important;
    padding-top: 4.5rem !important;
  }

  #main-story #impact-scroll .impact-panel-icon {
    justify-content: flex-start !important;
  }

  #main-story #impact-scroll .impact-panel-copy h3 {
    font-size: clamp(2.15rem, 12vw, 3.7rem) !important;
  }
}

/* ============================================================
   DISPLAY ERROR REPAIR PASS
   Clean final overrides for the current structure:
   story steps 01-06, then full-page impact, then step 07 Explore.
   This avoids older accumulated CSS rules collapsing pages or hiding
   the Explore plot.
   ============================================================ */
#main-story.scrolly {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-areas: "stack" !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 clamp(1rem, 3vw, 3rem) 5rem !important;
  overflow: visible !important;
}

#main-story > .graphic {
  grid-area: stack !important;
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  width: 100% !important;
  z-index: 2 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#main-story .sticky-viz {
  height: 100vh !important;
  width: 100% !important;
  min-height: 100vh !important;
  max-width: none !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: clamp(0.45rem, 0.8vh, 0.75rem) !important;
  padding: clamp(0.75rem, 1.2vw, 1.15rem) 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#main-story .chart-wrap {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
}

#main-story #main-chart {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: calc(100vh - 210px) !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Top and bottom plot text boxes: full plot width, no awkward locked card width. */
#main-story .viz-header,
body:not(.explore-mode) #main-story .viz-header {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: clamp(0.72rem, 1vw, 1rem) clamp(0.9rem, 1.45vw, 1.25rem) !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: clamp(1rem, 2vw, 2.25rem) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 22px !important;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(12px) !important;
}

#main-story .viz-title-block,
body:not(.explore-mode) #main-story .viz-title-block {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

#main-story #chart-subtitle,
body:not(.explore-mode) #main-story #chart-subtitle {
  width: min(100%, 78rem) !important;
  max-width: none !important;
}

#main-story .legend-row,
body:not(.explore-mode) #main-story .legend-row {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0.62rem clamp(0.85rem, 1.4vw, 1.2rem) !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.65rem 1.1rem !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 22px !important;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(12px) !important;
}

#main-story #legend {
  flex: 0 1 auto !important;
  min-width: min(330px, 100%) !important;
  max-width: min(620px, 100%) !important;
}

#main-story #map-note {
  flex: 1 1 30rem !important;
  min-width: min(30rem, 100%) !important;
  max-width: none !important;
  width: auto !important;
  line-height: 1.45 !important;
}

/* Story triggers stay in the document flow. Their text is hidden because the
   active narration is carried by the plot header/subtitle. */
#main-story > .story {
  grid-area: stack !important;
  position: relative !important;
  z-index: 3 !important;
  width: 100% !important;
  min-height: auto !important;
  pointer-events: none !important;
  opacity: 1 !important;
}

#main-story > .story > .step {
  min-height: 100vh !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#main-story > .story > .step * {
  display: none !important;
}

/* Full-page Impact, placed between step 06 and Explore. */
#impact-scroll,
#main-story #impact-scroll {
  position: relative !important;
  z-index: 30 !important;
  width: 100vw !important;
  max-width: none !important;
  min-height: 900vh !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  pointer-events: auto !important;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 196, 92, 0.22), transparent 22rem),
    radial-gradient(circle at 18% 76%, rgba(196, 81, 44, 0.14), transparent 24rem),
    linear-gradient(180deg, #fff8f0 0%, #f6e3d1 58%, #edf2f4 100%) !important;
  overflow: hidden !important;
}

#impact-scroll .impact-frame,
#main-story #impact-scroll .impact-frame {
  position: sticky !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: grid !important;
  place-items: center !important;
  padding: clamp(3rem, 7vh, 5rem) clamp(1.25rem, 7vw, 7rem) !important;
  background: transparent !important;
}

#impact-scroll .impact-frame-inner,
#main-story #impact-scroll .impact-frame-inner {
  position: relative !important;
  width: min(1180px, 100%) !important;
  height: min(720px, 82vh) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

#impact-scroll .impact-frame-inner::before,
#impact-scroll .impact-frame-inner::after,
#main-story #impact-scroll .impact-frame-inner::before,
#main-story #impact-scroll .impact-frame-inner::after {
  display: none !important;
}

#impact-scroll .impact-frame-head,
#main-story #impact-scroll .impact-frame-head {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 8 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  gap: 1rem !important;
}

#impact-scroll .impact-rail,
#main-story #impact-scroll .impact-rail {
  position: absolute !important;
  top: auto !important;
  bottom: clamp(0.5rem, 1.2vh, 1rem) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 3px !important;
  background: rgba(143, 47, 27, 0.14) !important;
  border-radius: 999px !important;
  z-index: 8 !important;
}

#impact-scroll .impact-rail-fill,
#main-story #impact-scroll .impact-rail-fill {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 0% !important;
  height: 100% !important;
  background: var(--accent) !important;
  border-radius: 999px !important;
}

#impact-scroll .impact-stage,
#main-story #impact-scroll .impact-stage {
  position: relative !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
}

#impact-scroll .impact-panel,
#main-story #impact-scroll .impact-panel {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(96px, 0.24fr) minmax(0, 0.76fr) !important;
  gap: clamp(1.3rem, 4vw, 4.5rem) !important;
  align-items: center !important;
  padding: clamp(2.5rem, 8vh, 5rem) 0 clamp(2rem, 7vh, 4.5rem) !important;
  opacity: 0 !important;
  transform: translateY(42px) scale(0.985) !important;
  transition: opacity 0.55s ease, transform 0.55s ease !important;
  pointer-events: none !important;
}

#impact-scroll .impact-panel.is-active,
#main-story #impact-scroll .impact-panel.is-active {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

#impact-scroll .impact-panel.is-past,
#main-story #impact-scroll .impact-panel.is-past {
  opacity: 0 !important;
  transform: translateY(-42px) scale(0.985) !important;
}

#impact-scroll .impact-panel-icon,
#main-story #impact-scroll .impact-panel-icon {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  filter: drop-shadow(0 18px 36px rgba(143, 47, 27, 0.12)) !important;
}

#impact-scroll .impact-panel-icon svg,
#main-story #impact-scroll .impact-panel-icon svg {
  width: clamp(92px, 12vw, 150px) !important;
  height: auto !important;
  min-height: 88px !important;
  display: block !important;
}

#impact-scroll .impact-panel-copy,
#main-story #impact-scroll .impact-panel-copy {
  display: block !important;
  width: min(840px, 100%) !important;
  max-width: 840px !important;
}

#impact-scroll .impact-panel-copy h3,
#main-story #impact-scroll .impact-panel-copy h3 {
  margin: 0 0 clamp(0.9rem, 2vh, 1.35rem) !important;
  color: #17202a !important;
  font-size: clamp(2.45rem, 5.7vw, 5.8rem) !important;
  line-height: 0.94 !important;
  letter-spacing: -0.075em !important;
  text-wrap: balance !important;
}

#impact-scroll .impact-panel-copy p,
#main-story #impact-scroll .impact-panel-copy p {
  width: min(760px, 100%) !important;
  max-width: 760px !important;
  margin: 0 !important;
  color: #5f6b73 !important;
  font-size: clamp(1rem, 1.45vw, 1.28rem) !important;
  line-height: 1.6 !important;
}

#impact-scroll .impact-triggers,
#main-story #impact-scroll .impact-triggers {
  position: relative !important;
  margin-top: -100vh !important;
  z-index: 7 !important;
}

#impact-scroll .impact-trigger,
#main-story #impact-scroll .impact-trigger {
  height: 100vh !important;
}

/* Explore must come back after Impact as a full plot page. */
body.explore-mode #main-story > .graphic {
  z-index: 40 !important;
}

body.explore-mode #main-story .sticky-viz {
  grid-template-rows: auto minmax(460px, 1fr) auto !important;
}

body.explore-mode #main-story .viz-header {
  display: grid !important;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.12fr) !important;
  gap: clamp(0.85rem, 1.8vw, 1.5rem) !important;
}

body.explore-mode #main-story .controls {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-areas:
    "year year year"
    "scenario metric bubbles" !important;
}

body.explore-mode #main-story .chart-wrap,
body.explore-mode #main-story #main-chart {
  min-height: min(58vh, 620px) !important;
  max-height: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.explore-mode #main-story .chart-wrap {
  display: grid !important;
}

body.explore-mode #main-story #main-chart .map-layer,
body.explore-mode #main-story #main-chart path.state {
  display: initial !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 980px) {
  #main-story .viz-header,
  body.explore-mode #main-story .viz-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body.explore-mode #main-story .controls {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "scenario"
      "year"
      "metric"
      "bubbles" !important;
  }
}

@media (max-width: 780px) {
  #main-story .legend-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  #main-story #legend,
  #main-story #map-note {
    min-width: 0 !important;
    width: 100% !important;
  }
  #impact-scroll .impact-frame,
  #main-story #impact-scroll .impact-frame {
    padding: 5rem 1.25rem 3rem !important;
  }
  #impact-scroll .impact-panel,
  #main-story #impact-scroll .impact-panel {
    grid-template-columns: 1fr !important;
    align-content: center !important;
    gap: 1.1rem !important;
    padding-top: 4.5rem !important;
  }
  #impact-scroll .impact-panel-icon,
  #main-story #impact-scroll .impact-panel-icon {
    justify-content: flex-start !important;
  }
  #impact-scroll .impact-panel-copy h3,
  #main-story #impact-scroll .impact-panel-copy h3 {
    font-size: clamp(2.15rem, 12vw, 3.7rem) !important;
  }
}

/* ============================================================
   FINAL DISPLAY REPAIR v2
   Current intended scroll order:
   Step 01-06 main plot -> full-page impact -> Step 07 Explore.
   Keep impact inside the story flow, but make it behave like its own
   page and prevent the sticky plot from showing behind it.
   ============================================================ */
#main-story > .story {
  pointer-events: none !important;
}

#main-story > .story > .step {
  min-height: 100vh !important;
  display: block !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#main-story > .story > .step * {
  display: none !important;
}

#main-story #impact-scroll {
  pointer-events: auto !important;
  isolation: isolate !important;
}

body.impact-section-active #main-story > .graphic {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease !important;
}

body.impact-section-active:not(.explore-mode) #main-story #impact-scroll {
  z-index: 80 !important;
}

body.explore-mode #main-story > .graphic {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 90 !important;
}

/* Explore page: force the map/controls to use the full viewport plot area. */
body.explore-mode #main-story .sticky-viz {
  height: 100vh !important;
  min-height: 100vh !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}

body.explore-mode #main-story .chart-wrap {
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  place-items: stretch !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.explore-mode #main-story #main-chart {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 460px !important;
  max-height: calc(100vh - 220px) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.explore-mode #main-story .viz-header {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.1fr) !important;
  align-items: start !important;
  gap: clamp(0.8rem, 1.8vw, 1.5rem) !important;
}

body.explore-mode #main-story .controls {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-areas:
    "year year year"
    "scenario metric bubbles" !important;
}

body.explore-mode #main-story .controls label:nth-child(1) { grid-area: scenario !important; }
body.explore-mode #main-story .controls label:nth-child(2) { grid-area: year !important; }
body.explore-mode #main-story .controls label:nth-child(3) { grid-area: metric !important; }
body.explore-mode #main-story .controls label:nth-child(4) { grid-area: bubbles !important; }

/* Non-explore story mode: boxes span the plot width rather than locking to a narrow card. */
body:not(.explore-mode) #main-story .viz-header,
body:not(.explore-mode) #main-story .legend-row {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

body:not(.explore-mode) #main-story .viz-title-block,
body:not(.explore-mode) #main-story #chart-subtitle {
  max-width: min(78rem, 100%) !important;
}

@media (max-width: 1100px) {
  body.explore-mode #main-story .viz-header {
    grid-template-columns: 1fr !important;
  }
  body.explore-mode #main-story .controls {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "scenario"
      "year"
      "metric"
      "bubbles" !important;
  }
}

/* ============================================================
   HOTFIX: make the Impact section actually visible.
   Previous repair hid the sticky graphic as soon as the impact
   section slightly intersected the viewport, which could leave a
   blank page before the impact frame reached the viewport. Keep the
   main graphic below the impact layer instead of hiding it; the
   impact section has its own opaque full-page background.
   ============================================================ */
#main-story > .story {
  z-index: 120 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#main-story #impact-scroll {
  display: block !important;
  position: relative !important;
  z-index: 220 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  contain: none !important;
}

#main-story #impact-scroll .impact-frame {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 230 !important;
}

#main-story #impact-scroll .impact-frame-inner,
#main-story #impact-scroll .impact-stage,
#main-story #impact-scroll .impact-triggers,
#main-story #impact-scroll .impact-trigger {
  visibility: visible !important;
}

#main-story #impact-scroll .impact-frame-inner {
  display: block !important;
}

#main-story #impact-scroll .impact-stage {
  display: grid !important;
}

#main-story #impact-scroll .impact-panel {
  display: grid !important;
  visibility: visible !important;
}

#main-story #impact-scroll .impact-panel.is-active {
  opacity: 1 !important;
  visibility: visible !important;
}

#main-story #impact-scroll .impact-panel-copy,
#main-story #impact-scroll .impact-panel-copy h3,
#main-story #impact-scroll .impact-panel-copy p,
#main-story #impact-scroll .impact-panel-tag,
#main-story #impact-scroll .impact-frame-head,
#main-story #impact-scroll .impact-frame-hint,
#main-story #impact-scroll .impact-rail,
#main-story #impact-scroll .impact-rail-fill,
#main-story #impact-scroll .impact-panel-icon,
#main-story #impact-scroll .impact-panel-icon svg {
  visibility: visible !important;
}

/* Do not blank the plot while impact is approaching. The impact layer
   is above it and covers it with a full-screen background. */
body.impact-section-active:not(.explore-mode) #main-story > .graphic {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

body.impact-section-active:not(.explore-mode) #main-story #impact-scroll {
  z-index: 260 !important;
}

body.explore-mode #main-story > .graphic {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 300 !important;
}

/* ============================================================
   FINAL HOTFIX v3: Impact must render as real pages.
   The previous sticky/scrollama impact frame was too fragile inside
   the main-story overlay. Make the impact section a normal sequence
   of full-screen narrative pages, matching the opening/transition
   page style and requiring no sticky card to appear.
   ============================================================ */
#main-story #impact-scroll {
  display: block !important;
  position: relative !important;
  z-index: 500 !important;
  width: 100% !important;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  background: linear-gradient(180deg, #fff8f0 0%, #f7f9f9 46%, #edf2f4 100%) !important;
  isolation: isolate !important;
}

#main-story #impact-scroll .impact-frame {
  display: block !important;
  position: relative !important;
  top: auto !important;
  height: auto !important;
  min-height: auto !important;
  width: 100% !important;
  padding: 0 !important;
  z-index: 501 !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: transparent !important;
}

#main-story #impact-scroll .impact-frame-inner {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#main-story #impact-scroll .impact-frame-inner::before,
#main-story #impact-scroll .impact-frame-inner::after {
  display: none !important;
}

#main-story #impact-scroll .impact-frame-head {
  position: sticky !important;
  top: 1rem !important;
  left: auto !important;
  right: auto !important;
  width: min(1120px, calc(100% - 2rem)) !important;
  margin: 0 auto !important;
  padding: 1rem 0 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  z-index: 520 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

#main-story #impact-scroll .impact-stage {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#main-story #impact-scroll .impact-panel,
#main-story #impact-scroll .impact-panel.is-active,
#main-story #impact-scroll .impact-panel.is-past {
  display: grid !important;
  position: relative !important;
  inset: auto !important;
  min-height: 100vh !important;
  width: 100% !important;
  grid-template-columns: minmax(84px, 150px) minmax(0, 920px) !important;
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(1.2rem, 4vw, 4rem) !important;
  padding: clamp(5rem, 9vh, 7rem) clamp(1.25rem, 6vw, 5rem) clamp(4rem, 8vh, 6rem) !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  background:
    radial-gradient(circle at 82% 18%, rgba(196, 81, 44, 0.12), transparent 22rem),
    radial-gradient(circle at 14% 84%, rgba(136, 178, 196, 0.16), transparent 26rem),
    linear-gradient(180deg, rgba(255, 248, 240, 0.96) 0%, rgba(247, 249, 249, 0.96) 100%) !important;
}

#main-story #impact-scroll .impact-panel:nth-child(even) {
  background:
    radial-gradient(circle at 18% 22%, rgba(196, 81, 44, 0.10), transparent 24rem),
    radial-gradient(circle at 88% 78%, rgba(136, 178, 196, 0.14), transparent 26rem),
    linear-gradient(180deg, rgba(247, 249, 249, 0.97) 0%, rgba(237, 242, 244, 0.97) 100%) !important;
}

#main-story #impact-scroll .impact-panel-icon,
#main-story #impact-scroll .impact-panel-icon svg,
#main-story #impact-scroll .impact-panel-copy,
#main-story #impact-scroll .impact-panel-tag,
#main-story #impact-scroll .impact-panel-copy h3,
#main-story #impact-scroll .impact-panel-copy p,
#main-story #impact-scroll .impact-panel-copy a {
  display: revert !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#main-story #impact-scroll .impact-panel-icon {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

#main-story #impact-scroll .impact-panel-icon svg {
  display: block !important;
  width: clamp(86px, 10vw, 140px) !important;
  height: auto !important;
  overflow: visible !important;
}

#main-story #impact-scroll .impact-panel-copy {
  width: 100% !important;
  max-width: 920px !important;
}

#main-story #impact-scroll .impact-panel-copy h3 {
  margin: 0 0 1rem !important;
  color: var(--text) !important;
  font-size: clamp(2.4rem, 5.6vw, 5.8rem) !important;
  line-height: 0.95 !important;
  letter-spacing: -0.075em !important;
  text-wrap: balance !important;
}

#main-story #impact-scroll .impact-panel-copy p {
  width: min(760px, 100%) !important;
  max-width: 760px !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: clamp(1rem, 1.42vw, 1.28rem) !important;
  line-height: 1.62 !important;
}

#main-story #impact-scroll .impact-panel-tag,
#main-story #impact-scroll .impact-frame-head .step-number {
  color: var(--accent-dark) !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
}

#main-story #impact-scroll .impact-frame-hint {
  color: var(--muted) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  opacity: 0.72 !important;
}

#main-story #impact-scroll .impact-rail {
  position: sticky !important;
  top: calc(100vh - 1.4rem) !important;
  left: 0 !important;
  width: min(620px, calc(100% - 3rem)) !important;
  height: 4px !important;
  margin: 0 auto !important;
  z-index: 521 !important;
  background: rgba(143, 47, 27, 0.14) !important;
  border-radius: 999px !important;
}

#main-story #impact-scroll .impact-rail-fill {
  display: block !important;
  height: 100% !important;
  background: var(--accent) !important;
  border-radius: 999px !important;
}

#main-story #impact-scroll .impact-triggers,
#main-story #impact-scroll .impact-trigger {
  display: none !important;
}

/* Keep the sticky chart underneath the real impact pages and then restore it for Explore. */
body:not(.explore-mode) #main-story > .graphic {
  z-index: 2 !important;
}

body.explore-mode #main-story > .graphic {
  z-index: 700 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (max-width: 780px) {
  #main-story #impact-scroll .impact-panel,
  #main-story #impact-scroll .impact-panel.is-active,
  #main-story #impact-scroll .impact-panel.is-past {
    grid-template-columns: 1fr !important;
    align-content: center !important;
    gap: 1.1rem !important;
    padding-inline: 1.35rem !important;
  }

  #main-story #impact-scroll .impact-panel-icon {
    justify-content: flex-start !important;
  }

  #main-story #impact-scroll .impact-panel-copy h3 {
    font-size: clamp(2.15rem, 11vw, 3.9rem) !important;
  }
}

/* ============================================================
   SCROLL-BACK HOTFIX
   When scrolling upward from Explore into Impact, the body can still
   have .explore-mode from the last scrollama step. Force Impact to sit
   above the sticky plot whenever the impact section is actually visible.
   ============================================================ */
body.impact-section-active #main-story #impact-scroll {
  z-index: 1200 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.impact-section-active #main-story #impact-scroll .impact-panel,
body.impact-section-active #main-story #impact-scroll .impact-panel * {
  visibility: visible !important;
}

body.impact-section-active #main-story > .graphic,
body.impact-section-active.explore-mode #main-story > .graphic {
  z-index: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

body.impact-section-active #main-story .controls,
body.impact-section-active.explore-mode #main-story .controls {
  display: none !important;
}

body:not(.impact-section-active).explore-mode #main-story > .graphic {
  z-index: 700 !important;
  pointer-events: auto !important;
}

/* ============================================================
   IMPACT SPACING TWEAK
   Move the Impact header closer to the top and reduce the vertical
   distance between the impact pages.
   ============================================================ */
#main-story #impact-scroll .impact-frame-head {
  top: 0.2rem !important;
  padding-top: 0.35rem !important;
}

#main-story #impact-scroll .impact-panel,
#main-story #impact-scroll .impact-panel.is-active,
#main-story #impact-scroll .impact-panel.is-past {
  min-height: 76vh !important;
  align-items: start !important;
  padding-top: clamp(4.1rem, 8vh, 5.4rem) !important;
  padding-bottom: clamp(2.2rem, 5vh, 3.4rem) !important;
  gap: clamp(0.9rem, 2.6vw, 2.4rem) !important;
}

#main-story #impact-scroll .impact-panel-copy h3 {
  margin-bottom: 0.72rem !important;
}

#main-story #impact-scroll .impact-rail {
  top: calc(100vh - 0.95rem) !important;
}

@media (max-width: 780px) {
  #main-story #impact-scroll .impact-frame-head {
    top: 0.15rem !important;
    width: calc(100% - 1.4rem) !important;
  }

  #main-story #impact-scroll .impact-panel,
  #main-story #impact-scroll .impact-panel.is-active,
  #main-story #impact-scroll .impact-panel.is-past {
    min-height: 82vh !important;
    padding-top: 4.8rem !important;
    padding-bottom: 2.4rem !important;
  }
}

/* ============================================================
   IMPACT TEXT + BACKGROUND CONTINUITY FIX
   Make the impact pages feel like one continuous starting-style
   section instead of separate color cards, and tighten the copy
   spacing inside each impact page.
   ============================================================ */
#main-story #impact-scroll {
  background:
    radial-gradient(circle at 82% 10%, rgba(196, 81, 44, 0.10), transparent 24rem),
    radial-gradient(circle at 12% 64%, rgba(136, 178, 196, 0.14), transparent 30rem),
    linear-gradient(180deg, #fff8f0 0%, #f7f9f9 46%, #edf2f4 100%) !important;
  background-attachment: local !important;
}

#main-story #impact-scroll .impact-panel,
#main-story #impact-scroll .impact-panel.is-active,
#main-story #impact-scroll .impact-panel.is-past,
#main-story #impact-scroll .impact-panel:nth-child(even) {
  background: transparent !important;
  min-height: 70vh !important;
  padding-top: clamp(3.6rem, 7vh, 4.9rem) !important;
  padding-bottom: clamp(1.65rem, 3.6vh, 2.45rem) !important;
  gap: clamp(0.8rem, 2.1vw, 1.9rem) !important;
}

#main-story #impact-scroll .impact-panel-copy {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

#main-story #impact-scroll .impact-panel-tag {
  display: block !important;
  margin: 0 0 0.38rem !important;
  line-height: 1.1 !important;
}

#main-story #impact-scroll .impact-panel-copy h3 {
  margin: 0 0 0.45rem !important;
  line-height: 0.98 !important;
}

#main-story #impact-scroll .impact-panel-copy p {
  margin: 0 !important;
  line-height: 1.48 !important;
}

#main-story #impact-scroll .impact-panel-copy p a {
  display: inline !important;
}

#main-story #impact-scroll .impact-panel-icon {
  padding-top: 0.28rem !important;
}

@media (max-width: 780px) {
  #main-story #impact-scroll .impact-panel,
  #main-story #impact-scroll .impact-panel.is-active,
  #main-story #impact-scroll .impact-panel.is-past,
  #main-story #impact-scroll .impact-panel:nth-child(even) {
    min-height: 76vh !important;
    padding-top: 4.25rem !important;
    padding-bottom: 1.9rem !important;
    gap: 0.75rem !important;
  }

  #main-story #impact-scroll .impact-panel-tag {
    margin-bottom: 0.32rem !important;
  }

  #main-story #impact-scroll .impact-panel-copy h3 {
    margin-bottom: 0.42rem !important;
  }

  #main-story #impact-scroll .impact-panel-copy p {
    line-height: 1.45 !important;
  }
}

/* ============================================================
   FINAL IMPACT SPACING REQUEST
   Keep the Impact section title centered. Keep the title-to-first-
   item spacing as-is, but cut the spacing between later impact
   items roughly in half.
   ============================================================ */
#main-story #impact-scroll .impact-frame-head {
  justify-content: center !important;
  text-align: center !important;
  top: 0.2rem !important;
}

#main-story #impact-scroll .impact-frame-head .step-number {
  margin-inline: auto !important;
}

#main-story #impact-scroll .impact-frame-hint {
  position: absolute !important;
  right: 0 !important;
  top: 0.95rem !important;
}

/* Preserve the gap from the centered Impact title to the first panel. */
#main-story #impact-scroll .impact-panel:first-child {
  min-height: 70vh !important;
  padding-top: clamp(3.6rem, 7vh, 4.9rem) !important;
  padding-bottom: clamp(1.65rem, 3.6vh, 2.45rem) !important;
}

/* Compress all following impact panels so there is much less page-to-page blank space. */
#main-story #impact-scroll .impact-panel:not(:first-child),
#main-story #impact-scroll .impact-panel.is-active:not(:first-child),
#main-story #impact-scroll .impact-panel.is-past:not(:first-child),
#main-story #impact-scroll .impact-panel:nth-child(even):not(:first-child) {
  min-height: max(35vh, 340px) !important;
  padding-top: clamp(1.05rem, 2.7vh, 1.85rem) !important;
  padding-bottom: clamp(1.05rem, 2.7vh, 1.85rem) !important;
  align-items: center !important;
}

#main-story #impact-scroll .impact-panel:not(:first-child) .impact-panel-tag {
  margin-bottom: 0.19rem !important;
}

#main-story #impact-scroll .impact-panel:not(:first-child) .impact-panel-copy h3 {
  margin-bottom: 0.22rem !important;
}

#main-story #impact-scroll .impact-panel:not(:first-child) .impact-panel-copy p {
  line-height: 1.38 !important;
}

@media (max-width: 780px) {
  #main-story #impact-scroll .impact-frame-head {
    width: calc(100% - 1.4rem) !important;
  }

  #main-story #impact-scroll .impact-frame-hint {
    display: none !important;
  }

  #main-story #impact-scroll .impact-panel:first-child {
    min-height: 76vh !important;
    padding-top: 4.25rem !important;
    padding-bottom: 1.9rem !important;
  }

  #main-story #impact-scroll .impact-panel:not(:first-child),
  #main-story #impact-scroll .impact-panel.is-active:not(:first-child),
  #main-story #impact-scroll .impact-panel.is-past:not(:first-child),
  #main-story #impact-scroll .impact-panel:nth-child(even):not(:first-child) {
    min-height: max(42vh, 360px) !important;
    padding-top: 1.05rem !important;
    padding-bottom: 1.05rem !important;
  }
}

/* ============================================================
   IMPACT TITLE + SPACING + TYPE FIX
   Center the Impact section title in its own page area, reduce the
   oversized impact headings, and loosen the spacing after the first
   item by about 50% compared with the last compact version.
   ============================================================ */
#main-story #impact-scroll .impact-frame-head {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  min-height: clamp(280px, 44vh, 440px) !important;
  margin: 0 !important;
  padding: 0 clamp(1.25rem, 6vw, 5rem) !important;
  display: grid !important;
  place-items: center !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  pointer-events: none !important;
  z-index: 520 !important;
}

#main-story #impact-scroll .impact-frame-head .step-number {
  margin: 0 !important;
  color: var(--text) !important;
  font-size: clamp(3rem, 8vw, 6rem) !important;
  line-height: 0.95 !important;
  letter-spacing: -0.07em !important;
  text-transform: none !important;
  font-weight: 900 !important;
}

#main-story #impact-scroll .impact-frame-hint {
  display: none !important;
}

/* Keep the first impact item close to the centered Impact title. */
#main-story #impact-scroll .impact-panel:first-child,
#main-story #impact-scroll .impact-panel.is-active:first-child,
#main-story #impact-scroll .impact-panel.is-past:first-child {
  min-height: 58vh !important;
  padding-top: clamp(1.8rem, 4vh, 3rem) !important;
  padding-bottom: clamp(2.2rem, 5vh, 3.8rem) !important;
}

/* Increase spacing after the first item by roughly half from the last compact version. */
#main-story #impact-scroll .impact-panel:not(:first-child),
#main-story #impact-scroll .impact-panel.is-active:not(:first-child),
#main-story #impact-scroll .impact-panel.is-past:not(:first-child),
#main-story #impact-scroll .impact-panel:nth-child(even):not(:first-child) {
  min-height: max(52vh, 500px) !important;
  padding-top: clamp(1.55rem, 4vh, 2.8rem) !important;
  padding-bottom: clamp(1.55rem, 4vh, 2.8rem) !important;
  align-items: center !important;
}

/* Smaller, more readable impact typography. */
#main-story #impact-scroll .impact-panel-copy h3 {
  font-size: clamp(2.05rem, 4.35vw, 4.45rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.06em !important;
  margin-bottom: 0.42rem !important;
}

#main-story #impact-scroll .impact-panel-copy p {
  font-size: clamp(0.98rem, 1.2vw, 1.16rem) !important;
  line-height: 1.45 !important;
  max-width: 720px !important;
}

#main-story #impact-scroll .impact-panel-tag {
  font-size: 0.7rem !important;
  margin-bottom: 0.26rem !important;
}

@media (max-width: 780px) {
  #main-story #impact-scroll .impact-frame-head {
    min-height: clamp(240px, 38vh, 360px) !important;
    padding-inline: 1.35rem !important;
  }

  #main-story #impact-scroll .impact-frame-head .step-number {
    font-size: clamp(2.8rem, 15vw, 4.8rem) !important;
  }

  #main-story #impact-scroll .impact-panel:first-child,
  #main-story #impact-scroll .impact-panel.is-active:first-child,
  #main-story #impact-scroll .impact-panel.is-past:first-child {
    min-height: 62vh !important;
    padding-top: 1.4rem !important;
    padding-bottom: 2.2rem !important;
  }

  #main-story #impact-scroll .impact-panel:not(:first-child),
  #main-story #impact-scroll .impact-panel.is-active:not(:first-child),
  #main-story #impact-scroll .impact-panel.is-past:not(:first-child),
  #main-story #impact-scroll .impact-panel:nth-child(even):not(:first-child) {
    min-height: max(56vh, 430px) !important;
    padding-top: 1.35rem !important;
    padding-bottom: 1.35rem !important;
  }

  #main-story #impact-scroll .impact-panel-copy h3 {
    font-size: clamp(1.95rem, 9.5vw, 3.55rem) !important;
  }

  #main-story #impact-scroll .impact-panel-copy p {
    font-size: 0.98rem !important;
  }
}

/* ============================================================
   IMPACT HEADING / PARAGRAPH GAP FIX
   Move the paragraph down roughly one text row under the large title.
   ============================================================ */
#main-story #impact-scroll .impact-panel-copy h3 {
  margin-bottom: 0 !important;
}

#main-story #impact-scroll .impact-panel-copy p {
  margin-top: clamp(0.8rem, 1.35vw, 1.15rem) !important;
}

@media (max-width: 780px) {
  #main-story #impact-scroll .impact-panel-copy p {
    margin-top: 0.7rem !important;
  }
}

/* ============================================================
   BUBBLE PLOT REPLACEMENT FROM REFERENCE ZIP
   Match Plot 06 and Explore bubble styling/interaction.
   ============================================================ */
body.explore-mode .bubble-toggle-label {
  min-width: 0 !important;
}

body.explore-mode .bubble-toggle-control {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem !important;
  min-height: 2.25rem !important;
  padding: 0.32rem 0.54rem !important;
  border: 1px solid rgba(79, 143, 192, 0.22) !important;
  background: rgba(255, 255, 255, 0.82) !important;
}

body.explore-mode .bubble-toggle-control input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 2.3rem !important;
  height: 1.22rem !important;
  margin: 0 !important;
  border-radius: 999px;
  border: 1px solid rgba(95, 107, 115, 0.34);
  background: rgba(95, 107, 115, 0.20);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

body.explore-mode .bubble-toggle-control input::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.16rem;
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(23, 32, 42, 0.22);
  transform: translateY(-50%);
  transition: left 0.16s ease;
}

body.explore-mode .bubble-toggle-control input:checked {
  background: rgba(79, 143, 192, 0.80);
  border-color: rgba(79, 143, 192, 0.95);
}

body.explore-mode .bubble-toggle-control input:checked::after {
  left: 1.25rem;
}

body.explore-mode .bubble-toggle-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explore-bubble-layer {
  pointer-events: all !important;
}

.explore-exposure-bubble {
  pointer-events: all !important;
  cursor: pointer !important;
  vector-effect: non-scaling-stroke;
  fill: rgba(196,81,44,0.34) !important;
  stroke: rgba(143,47,27,0.78) !important;
  stroke-width: 1.3px !important;
  mix-blend-mode: normal !important;
  transition: fill 0.16s ease, stroke-width 0.16s ease, filter 0.16s ease;
}

.explore-exposure-bubble:hover,
.explore-exposure-bubble:hover:not(.selected) {
  fill: rgba(196,81,44,0.46) !important;
  stroke: #ffd43b !important;
  stroke-width: 2.8px !important;
  filter: drop-shadow(0 0 5px rgba(255,212,59,0.9)) !important;
}

.explore-exposure-bubble.selected {
  fill: rgba(255,212,59,0.42) !important;
  stroke: #ffd43b !important;
  stroke-width: 3.4px !important;
  filter: drop-shadow(0 0 5px rgba(255,212,59,0.9)) !important;
}

.explore-selected-bubble-halo {
  pointer-events: none !important;
  fill: rgba(255,212,59,0.12) !important;
  stroke: #ffd43b !important;
  stroke-width: 2.6px !important;
  filter: drop-shadow(0 0 5px rgba(255,212,59,0.75)) !important;
  mix-blend-mode: normal !important;
}


/* ============================================================
   FINAL BUBBLE / WRITEUP POLISH
   Keep Explore bubbles on by default, match the Plot 06 bubble-size
   reference card, move it right, and keep the Writeup button above
   the Explore control panel.
   ============================================================ */
.writeup-link {
  z-index: 99999 !important;
  top: 1rem !important;
  right: 1rem !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(143, 47, 27, 0.22) !important;
  box-shadow: 0 10px 28px rgba(40, 55, 70, 0.16) !important;
}

body.explore-mode .writeup-link {
  z-index: 99999 !important;
}

.explore-bubble-legend-in-map {
  pointer-events: none !important;
}

.explore-bubble-legend-in-map .bubble-size-legend-card text {
  paint-order: stroke !important;
  stroke: rgba(255,255,255,0.82) !important;
  stroke-width: 2px !important;
  stroke-linejoin: round !important;
}


/* Keep the final hot-day loop header compact so the chart does not visibly shrink. */
.sticky-viz.hotday-final-header .viz-header {
  gap: 0.72rem;
}

.sticky-viz.hotday-final-header .viz-title-block {
  min-width: 0;
}

#chart-title.hotday-final-title {
  font-size: clamp(0.98rem, 1.28vw, 1.28rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

#chart-subtitle.hotday-final-subtitle {
  max-width: 820px;
  margin-top: 0.22rem;
  font-size: 0.74rem;
  line-height: 1.24;
}

/* ============================================================
   Stable chart header height
   Keep title/subtitle wrapping from changing plot height.
   ============================================================ */
#main-story .sticky-viz {
  grid-template-rows: 104px minmax(360px, 1fr) auto !important;
}

#main-story .sticky-viz .viz-header {
  min-height: 104px !important;
  height: 104px !important;
  align-items: flex-start !important;
}

#main-story .sticky-viz .viz-title-block {
  min-width: 0;
  width: 100%;
}

#main-story #chart-title,
#main-story #chart-subtitle {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  #main-story .sticky-viz {
    grid-template-rows: 118px minmax(320px, 1fr) auto !important;
  }

  #main-story .sticky-viz .viz-header {
    min-height: 118px !important;
    height: 118px !important;
  }
}


/* Final targeted scenario-select fix: Explore controls must stay interactive even if the Impact section is partly in view. */
body.explore-mode #main-story .controls,
body.explore-mode #main-story .controls *,
body.explore-mode #scenario-select,
body.explore-mode #metric-select,
body.explore-mode #year-slider,
body.explore-mode #bubble-toggle {
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Explore controls should only float above the page when we are actually on
   Explore. If Impact is active during scroll-back, keep the controls hidden and
   let the Impact page receive pointer events. */
body.explore-mode.impact-section-active #main-story .controls {
  display: none !important;
  pointer-events: none !important;
}

body.explore-mode:not(.impact-section-active) #main-story #impact-scroll,
body.explore-mode:not(.impact-section-active) #main-story #impact-scroll * {
  pointer-events: none !important;
}

body.impact-section-active #main-story #impact-scroll,
body.impact-section-active #main-story #impact-scroll * {
  pointer-events: auto !important;
}

/* ============================================================
   FINAL FIX — Explore controls click-through after Impact
   Impact is a full-width scroll section. Some previous overrides could leave
   the Impact layer or .impact-section-active styles above the sticky Explore
   plot after scrolling down/up. These last rules make the ownership explicit:
   Explore mode = controls/map receive pointer events; Impact-only mode =
   Impact receives pointer events.
   ============================================================ */
body.explore-mode #main-story > .graphic {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 5000 !important;
  pointer-events: auto !important;
}

body.explore-mode #main-story .sticky-viz,
body.explore-mode #main-story .viz-header,
body.explore-mode #main-story .chart-wrap,
body.explore-mode #main-story #main-chart,
body.explore-mode #main-story .legend-row {
  pointer-events: auto !important;
}

body.explore-mode #main-story #map-controls,
body.explore-mode #main-story #map-controls *,
body.explore-mode #main-story .controls,
body.explore-mode #main-story .controls * {
  pointer-events: auto !important;
}

body.explore-mode #main-story .controls {
  display: grid !important;
  position: relative !important;
  z-index: 7000 !important;
}

body.explore-mode #main-story #scenario-select,
body.explore-mode #main-story #metric-select,
body.explore-mode #main-story #year-slider,
body.explore-mode #main-story #bubble-toggle {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 7100 !important;
}

/* Once the Explore article owns the viewport, the previous full-width Impact
   section must stop catching clicks, even if its sticky frame is still nearby
   in the DOM/stacking context. */
body.explore-mode #main-story #impact-scroll,
body.explore-mode #main-story #impact-scroll * {
  pointer-events: none !important;
}

body.explore-mode #main-story #impact-scroll {
  z-index: 0 !important;
}

/* During the real Impact section, keep the Explore plot underneath and inert. */
body.impact-section-active:not(.explore-mode) #main-story > .graphic {
  z-index: 1 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.impact-section-active:not(.explore-mode) #main-story #impact-scroll,
body.impact-section-active:not(.explore-mode) #main-story #impact-scroll * {
  pointer-events: auto !important;
}

body.impact-section-active:not(.explore-mode) #main-story #impact-scroll {
  z-index: 6000 !important;
}


/* ============================================================
   FINAL SELECT FIX v4 — Explore controls are the top interactive layer.
   Root conflict: #impact-scroll sits inside #main-story .story and several
   previous overrides gave the impact pages high z-index/pointer-events even
   after Explore became active. Also, changing layout on select pointerdown
   made the browser's native dropdown cancel. JS now avoids that; these CSS
   rules make the layer ownership explicit.
   ============================================================ */
body.explore-mode:not(.impact-section-active) #main-story > .graphic {
  z-index: 9999 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.explore-mode:not(.impact-section-active) #main-story .sticky-viz {
  position: relative !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
}

body.explore-mode:not(.impact-section-active) #main-story .viz-header {
  position: relative !important;
  z-index: 10020 !important;
  pointer-events: auto !important;
}

body.explore-mode:not(.impact-section-active) #main-story #map-controls,
body.explore-mode:not(.impact-section-active) #main-story #map-controls label {
  display: grid !important;
  position: relative !important;
  z-index: 10040 !important;
  pointer-events: auto !important;
  user-select: auto !important;
}

body.explore-mode:not(.impact-section-active) #scenario-select,
body.explore-mode:not(.impact-section-active) #metric-select,
body.explore-mode:not(.impact-section-active) #year-slider,
body.explore-mode:not(.impact-section-active) #bubble-toggle {
  position: relative !important;
  z-index: 10050 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  user-select: auto !important;
}

body.explore-mode:not(.impact-section-active) #main-story > .story {
  z-index: 1 !important;
  pointer-events: none !important;
}

body.explore-mode:not(.impact-section-active) #main-story #impact-scroll,
body.explore-mode:not(.impact-section-active) #main-story #impact-scroll *,
body.explore-mode:not(.impact-section-active) #main-story .impact-panel,
body.explore-mode:not(.impact-section-active) #main-story .impact-panel * {
  pointer-events: none !important;
}

body.explore-mode:not(.impact-section-active) #main-story #impact-scroll {
  z-index: 0 !important;
}

body.impact-section-active:not(.explore-mode) #main-story > .graphic {
  z-index: 1 !important;
  pointer-events: none !important;
}

body.impact-section-active:not(.explore-mode) #main-story > .story,
body.impact-section-active:not(.explore-mode) #main-story #impact-scroll {
  z-index: 999 !important;
  pointer-events: auto !important;
}

/* ============================================================
   SCROLL JUMP FIX — stable Impact <-> Explore handoff
   Keep scroll anchoring from choosing a changing sticky/control element as
   the anchor, and keep both sections in normal document flow. The JS now only
   toggles ownership classes once per animation frame; these CSS rules prevent
   the class handoff from changing layout height or causing a visible jump.
   ============================================================ */
#main-story,
#main-story > .graphic,
#main-story .sticky-viz,
#main-story .story,
#main-story .story .step,
#main-story #impact-scroll,
#main-story #impact-scroll *,
#main-story .step[data-step="6"] {
  overflow-anchor: none !important;
}

#main-story.scrolly {
  contain: layout paint !important;
}

#main-story #impact-scroll {
  contain: layout paint !important;
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
}

#main-story > .graphic {
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
}

/* Do not let Impact ownership hide or resize the sticky graphic; it only
   changes pointer ownership. Hiding the sticky layer during the handoff was
   the main source of the visual jump when scrolling up/down near Explore. */
body.impact-section-active #main-story > .graphic,
body.impact-section-active.explore-mode #main-story > .graphic,
body.impact-section-active:not(.explore-mode) #main-story > .graphic {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

body.impact-section-active #main-story .controls,
body.impact-section-active.explore-mode #main-story .controls {
  pointer-events: none !important;
}

body.explore-mode:not(.impact-section-active) #main-story > .graphic,
body.explore-mode:not(.impact-section-active) #main-story .sticky-viz {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Keep the Explore trigger as a stable 100vh landing page after Impact. */
#main-story .story > .step[data-step="6"] {
  min-height: 100vh !important;
  height: 100vh !important;
}


/* ============================================================
   HOVER LAYER HOTFIX
   Keep hover feedback and the tooltip above every sticky/impact/explore layer.
   The earlier Impact/Explore z-index fixes put several sections near 700-1200,
   while the tooltip was only z-index:1000, so it could appear underneath.
   ============================================================ */
html body #tooltip.tooltip,
body #tooltip.tooltip,
#tooltip.tooltip {
  position: fixed !important;
  z-index: 2147483647 !important;
  pointer-events: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateZ(0) !important;
  isolation: isolate !important;
}

#tooltip.tooltip[hidden] {
  display: none !important;
}

/* Hover/selected outlines should visually sit above the exposure overlay. */
body.explore-mode #main-story #main-chart .state.hovered,
body.explore-mode #main-story #main-chart path.state.hovered,
body.explore-mode #main-story #main-chart .state.selected,
body.explore-mode #main-story #main-chart path.state.selected {
  stroke: #ffd43b !important;
  stroke-dasharray: none !important;
  filter: drop-shadow(0 0 8px rgba(255, 212, 59, 0.92)) !important;
}

body.explore-mode #main-story #main-chart .state.hovered:not(.selected),
body.explore-mode #main-story #main-chart path.state.hovered:not(.selected) {
  stroke-width: 3.4 !important;
}

body.explore-mode #main-story #main-chart .state.selected,
body.explore-mode #main-story #main-chart path.state.selected {
  stroke-width: 4.4 !important;
}

/* Keep the translucent exposure layer from stealing hover priority over states. */
body.explore-mode #main-story #main-chart .explore-bubble-layer,
body.explore-mode #main-story #main-chart .explore-exposure-bubble {
  pointer-events: none !important;
}


/* ============================================================
   FINAL HANDOFF FIX: prevent previous plot / fallback flash
   Impact is a full-page section between the story plot and Explore. During
   Impact ownership, keep the sticky graphic in the layout but fade its content
   out immediately so the previous plot step does not appear behind the Impact
   frame during the scroll handoff. Explore restores it when its own step is
   reached. This avoids the earlier jump caused by display/height changes.
   ============================================================ */
body.impact-section-active:not(.explore-mode) #main-story > .graphic {
  opacity: 0 !important;
  visibility: visible !important;
  pointer-events: none !important;
  z-index: 0 !important;
  transition: opacity 0.08s linear !important;
}

body.impact-section-active:not(.explore-mode) #main-story .sticky-viz,
body.impact-section-active:not(.explore-mode) #main-story .viz-header,
body.impact-section-active:not(.explore-mode) #main-story .chart-wrap,
body.impact-section-active:not(.explore-mode) #main-story .legend-row {
  opacity: 0 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

body.impact-section-active:not(.explore-mode) #main-story #impact-scroll {
  z-index: 120 !important;
}

body.explore-mode:not(.impact-section-active) #main-story > .graphic,
body.explore-mode:not(.impact-section-active) #main-story .sticky-viz,
body.explore-mode:not(.impact-section-active) #main-story .viz-header,
body.explore-mode:not(.impact-section-active) #main-story .chart-wrap,
body.explore-mode:not(.impact-section-active) #main-story .legend-row {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ============================================================
   FINAL IMPACT SPACING TUNE
   Reduce the blank landing space above the Impact content by about half,
   while keeping a small breathing buffer after the last Impact panel before
   Explore begins. This preserves the earlier select / hover / handoff fixes.
   ============================================================ */
#main-story #impact-scroll .impact-frame-head {
  min-height: clamp(140px, 22vh, 220px) !important;
  padding-top: clamp(0.8rem, 2vh, 1.4rem) !important;
  padding-bottom: clamp(0.45rem, 1.4vh, 0.9rem) !important;
}

#main-story #impact-scroll .impact-frame-head .step-number {
  font-size: clamp(2.6rem, 7vw, 5.2rem) !important;
}

#main-story #impact-scroll .impact-panel:first-child,
#main-story #impact-scroll .impact-panel.is-active:first-child,
#main-story #impact-scroll .impact-panel.is-past:first-child {
  min-height: 54vh !important;
  padding-top: clamp(0.95rem, 2.3vh, 1.8rem) !important;
  padding-bottom: clamp(2.2rem, 4.8vh, 3.4rem) !important;
}

#main-story #impact-scroll .impact-panel:last-child,
#main-story #impact-scroll .impact-panel.is-active:last-child,
#main-story #impact-scroll .impact-panel.is-past:last-child {
  padding-bottom: clamp(4.6rem, 11vh, 7.5rem) !important;
}

#main-story #impact-scroll {
  padding-bottom: clamp(4rem, 12vh, 7rem) !important;
}

@media (max-width: 780px) {
  #main-story #impact-scroll .impact-frame-head {
    min-height: clamp(120px, 18vh, 180px) !important;
  }

  #main-story #impact-scroll .impact-panel:first-child,
  #main-story #impact-scroll .impact-panel.is-active:first-child,
  #main-story #impact-scroll .impact-panel.is-past:first-child {
    min-height: 56vh !important;
    padding-top: 0.9rem !important;
  }

  #main-story #impact-scroll {
    padding-bottom: clamp(3rem, 9vh, 5.5rem) !important;
  }
}

/* FINAL IMPACT BOTTOM BUFFER TUNE
   Keep the current top spacing, but double the breathing room after the
   Impact section before Explore begins. */
#main-story #impact-scroll .impact-panel:last-child,
#main-story #impact-scroll .impact-panel.is-active:last-child,
#main-story #impact-scroll .impact-panel.is-past:last-child {
  padding-bottom: clamp(9.2rem, 22vh, 15rem) !important;
}

#main-story #impact-scroll {
  padding-bottom: clamp(8rem, 24vh, 14rem) !important;
}

@media (max-width: 700px) {
  #main-story #impact-scroll {
    padding-bottom: clamp(6rem, 18vh, 11rem) !important;
  }
}

/* Remove the underline under the impact section title link. */
#main-story #impact-scroll .impact-panel-copy h3 a,
#impact-scroll .impact-panel-copy h3 a {
  text-decoration: none !important;
  text-decoration-line: none !important;
  background-image: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}


/* FINAL PATCH: keep Explore exposure bubbles visual-only so they do not block
   the underlying state hover/click interactions. The JS still raises the
   bubble layer for visibility, but pointer events pass through to states. */
.explore-bubble-layer,
.explore-exposure-bubble,
body.explore-mode #main-story #main-chart .explore-bubble-layer,
body.explore-mode #main-story #main-chart .explore-exposure-bubble {
  pointer-events: none !important;
}


/* Explore interaction fix: keep state shapes as the event target.
   Bubbles are visual only here, so hovering/clicking a state uses the
   same map-level interaction pattern as the exposure plot. */
body.explore-mode #main-story #main-chart path.state {
  pointer-events: all !important;
  cursor: pointer !important;
}
body.explore-mode #main-story #main-chart .explore-bubble-layer,
body.explore-mode #main-story #main-chart .explore-exposure-bubble,
body.explore-mode #main-story #main-chart .explore-selected-bubble-halo {
  pointer-events: none !important;
}

/* Final underline cleanup for Impact panel 01.
   Remove the underline from the explanatory sentence link too
   so both the title link and the 'A very hot summer day...' link
   match the clean screenshot treatment. */
#main-story #impact-scroll .impact-panel-copy p a,
#impact-scroll .impact-panel-copy p a {
  text-decoration: none !important;
  text-decoration-line: none !important;
  text-decoration-thickness: 0 !important;
  text-underline-offset: 0 !important;
  background-image: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}


/* Panel 01 title cleanup: render the heading as plain text so there is
   no residual wrapped-link underline/row under "Hot days × people = exposure". */
#main-story #impact-scroll .impact-title-arrow,
#impact-scroll .impact-title-arrow {
  display: inline-block !important;
  margin-left: 0.22em !important;
  font-size: 0.6em !important;
  vertical-align: 0.25em !important;
  color: rgba(196, 81, 44, 0.75) !important;
}

/* ============================================================
   FINAL STABLE HANDOFF PATCH — Impact -> Explore only
   This patch fixes the boundary where the last Impact text could remain
   visible over the Explore map. It does not use display:none, so the document
   height stays stable and the existing Explore controls/hover behavior remain
   unchanged.
   ============================================================ */
#main-story #impact-scroll {
  transition: opacity 140ms ease, visibility 140ms ease !important;
}

body.explore-mode #main-story #impact-scroll,
body.explore-mode #main-story #impact-scroll * {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.explore-mode #main-story #impact-scroll {
  z-index: 0 !important;
}

body.impact-section-active:not(.explore-mode) #main-story #impact-scroll,
body.impact-section-active:not(.explore-mode) #main-story #impact-scroll * {
  opacity: 1 !important;
  visibility: visible !important;
}

body.impact-section-active:not(.explore-mode) #main-story > .graphic,
body.impact-section-active:not(.explore-mode) #main-story .sticky-viz,
body.impact-section-active:not(.explore-mode) #main-story .viz-header,
body.impact-section-active:not(.explore-mode) #main-story .chart-wrap,
body.impact-section-active:not(.explore-mode) #main-story .legend-row {
  opacity: 0 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

body.explore-mode:not(.impact-section-active) #main-story > .graphic,
body.explore-mode:not(.impact-section-active) #main-story .sticky-viz,
body.explore-mode:not(.impact-section-active) #main-story .viz-header,
body.explore-mode:not(.impact-section-active) #main-story .chart-wrap,
body.explore-mode:not(.impact-section-active) #main-story .legend-row {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}


/* FINAL IMPACT UI WORDING PATCH
   - Remove the horizontal rail that crossed the 01 impact panel.
   - Add a small source-link hint under the big Impact title.
   - Keep panel links clickable while the header itself remains non-interactive. */
#main-story #impact-scroll .impact-rail,
#main-story #impact-scroll .impact-rail-fill,
#impact-scroll .impact-rail,
#impact-scroll .impact-rail-fill {
  display: none !important;
}

#main-story #impact-scroll .impact-frame-title,
#impact-scroll .impact-frame-title {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(0.35rem, 0.8vw, 0.65rem) !important;
}

#main-story #impact-scroll .impact-link-hint,
#impact-scroll .impact-link-hint {
  margin: 0 !important;
  max-width: min(760px, 86vw) !important;
  color: rgba(95, 107, 115, 0.82) !important;
  font-size: clamp(0.95rem, 1.45vw, 1.25rem) !important;
  line-height: 1.45 !important;
  letter-spacing: 0.01em !important;
  font-weight: 500 !important;
}

@media (max-width: 780px) {
  #main-story #impact-scroll .impact-link-hint,
  #impact-scroll .impact-link-hint {
    font-size: 0.92rem !important;
    max-width: 86vw !important;
  }
}


/* CURRENT VERSION TAKEAWAY BEFORE MAP PATCH
   Places the final takeaway after Impact and before the Explore map
   without changing the earlier project sections. */
#impact-scroll .impact-takeaway-panel {
  grid-template-columns: minmax(0, 1fr) !important;
  padding-inline: clamp(1.2rem, 4vw, 4rem) !important;
}

#impact-scroll .impact-takeaway-panel .impact-panel-icon {
  display: none !important;
}

#impact-scroll .impact-takeaway-panel .impact-panel-copy {
  max-width: min(1060px, 88vw) !important;
}

#impact-scroll .impact-takeaway-panel .impact-panel-tag {
  color: #ffb18f !important;
}

#impact-scroll .impact-takeaway-panel h3 {
  max-width: min(1040px, 88vw) !important;
  color: #ffffff !important;
  font-size: clamp(2.6rem, 5.8vw, 5.8rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.06em !important;
}

#impact-scroll .impact-takeaway-panel p {
  max-width: min(840px, 82vw) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: clamp(1.05rem, 1.45vw, 1.35rem) !important;
  line-height: 1.6 !important;
}

#impact-scroll .impact-takeaway-panel.is-active {
  background: #17202a !important;
  border-radius: 28px !important;
  box-shadow: 0 24px 70px rgba(23, 32, 42, 0.18) !important;
}


/* TAKEAWAY TWO-LINE TITLE PATCH */
#impact-scroll .impact-takeaway-panel .takeaway-two-line-title {
  max-width: min(1180px, 92vw) !important;
  font-size: clamp(2.15rem, 4.25vw, 4.9rem) !important;
  line-height: 1.08 !important;
}

#impact-scroll .impact-takeaway-panel .takeaway-two-line-title span {
  display: block;
  white-space: nowrap;
}

@media (max-width: 900px) {
  #impact-scroll .impact-takeaway-panel .takeaway-two-line-title span {
    white-space: normal;
  }
}


/* VIDEO LINK BUTTON PATCH
   Add a video button next to the existing writeup button. */
.video-link {
  position: fixed;
  top: 1.6rem;
  right: 8.55rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(143, 47, 27, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(40, 55, 70, 0.08);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.video-link:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(40, 55, 70, 0.12);
}

@media (max-width: 680px) {
  .video-link {
    top: 1rem;
    right: 7.1rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.65rem;
  }
}


/* VIDEO WRITEUP ALIGN PATCH
   Keep the Video and Writeup buttons exactly aligned. */
.video-link,
.writeup-link {
  top: 1.6rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.15rem !important;
  line-height: 1 !important;
}

@media (max-width: 680px) {
  .video-link,
  .writeup-link {
    top: 1rem !important;
    min-height: 1.95rem !important;
  }
}


/* TAKEAWAY ONE-LINE TITLE PATCH
   Remove the forced two-line styling from the final takeaway title. */
#impact-scroll .impact-takeaway-panel .takeaway-two-line-title,
#impact-scroll .impact-takeaway-panel h3 {
  white-space: normal !important;
}

#impact-scroll .impact-takeaway-panel .takeaway-two-line-title span {
  display: inline !important;
  white-space: normal !important;
}
