:root {
  color-scheme: light;
  --ink: #1b1d1a;
  --muted: #4a4d46;
  --faint: #9aa39f;
  --paper: #f4f1e8;
  --surface: #fffdf7;
  --line: #ded6c4;
  --line-soft: #e3dbc9;
  --charcoal: #14201f;
  --dark: #0b0f10;
  --teal: #0f7f7a;
  --teal-bright: #5fb6ad;
  --red: #c4291c;
  --coral: #e8634a;
  --gold: #c8912c;
  --violet: #6f5aa8;
  --green: #3f8f5c;
  --ctrl-r: #c4291c;
  --ctrl-d: #2b5fa3;
  --ctrl-x: #d97706;
  --shadow: 0 24px 64px rgba(27, 29, 26, 0.1);
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: var(--teal);
}

code {
  background: rgba(15, 127, 122, 0.1);
  border: 1px solid rgba(15, 127, 122, 0.18);
  border-radius: 4px;
  padding: 0.08rem 0.28rem;
  font-size: 0.92em;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-160%);
  background: var(--surface);
  color: var(--ink);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kicker {
  display: block;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12.5px;
  color: var(--teal);
}

/* ===================== HERO ===================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background: var(--dark);
  color: var(--paper);
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Full bleed. Wide screens crop the photo top and bottom; anchoring it
   high keeps the dome in frame and gives up the reflection instead. The
   type sits on the reflecting pool in the lower third. */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/hero-capitol.webp");
  background-size: cover;
  background-position: center 30%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background-color: rgba(8, 10, 11, 0.55);
  background-image: linear-gradient(to top, rgba(8, 10, 11, 0.6) 0%, rgba(8, 10, 11, 0) 55%);
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 2.2vw, 2rem);
  width: min(1280px, calc(100% - 32px));
  padding: 4rem 0 clamp(2.5rem, 9vh, 7rem);
  text-align: center;
}

.hero-inner h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(3.75rem, 11.4vw, 10.25rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* Moved by initSiteHeader() as the page scrolls. */
.hero-wordmark {
  display: inline-block;
  transform-origin: 0 0;
  will-change: transform;
}

/* Only while the wordmark glides into the logo does it ride above the header;
   otherwise the hero scrolls under the sticky header like everything else. */
.hero.has-morph .hero-wordmark {
  position: relative;
  z-index: 41;
}

.hero-tagline {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.1vw, 1.875rem);
  line-height: 1.35;
  color: #e4dfd2;
  text-wrap: balance;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 52px;
  margin-top: 0.5rem;
  padding: 0 28px;
  border: 1px solid var(--paper);
  color: var(--paper);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.hero-cta:hover {
  background: rgba(244, 241, 232, 0.12);
}

.hero-cta:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 4px;
}

/* ===================== SITE HEADER ===================== */
/* Rests just below the fold, rises as the page scrolls, then sticks to the
   top for the rest of the page. The hero wordmark lands in .site-logo. */

:root {
  --header-h: 64px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--dark);
  color: var(--paper);
  border-bottom: 1px solid rgba(244, 241, 232, 0.14);
  transition: transform 0.25s ease;
}

/* Small screens: tucked away while scrolling down (set by initSiteHeader). */
.site-header.is-tucked {
  transform: translateY(-100%);
}

.site-header-inner {
  width: min(1280px, calc(100% - 48px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

/* Same face, weight, leading and tracking as the hero wordmark, so the
   wordmark scales into it exactly. */
.site-logo {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 26px;
  line-height: 0.9;
  letter-spacing: -0.035em;
  /* The display cut the hero wordmark renders in at its size. */
  font-variation-settings: "opsz" 60;
  white-space: nowrap;
  color: var(--paper);
  text-decoration: none;
}

/* A 44px tap area without changing the box the wordmark scales into. */
.site-logo {
  position: relative;
}

.site-logo::after {
  content: "";
  position: absolute;
  inset: -12px -6px;
}

.site-header.has-morph:not(.is-docked) .site-logo {
  visibility: hidden;
}

.site-logo:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 6px;
}

.site-byline {
  margin: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(244, 241, 232, 0.22);
  font-size: 13px;
  line-height: 1.3;
  color: #a8a596;
  white-space: nowrap;
}

.site-byline strong {
  color: var(--paper);
  font-weight: 600;
}

/* ===================== PROJECT NAV ===================== */

.project-nav {
  display: flex;
  gap: 28px;
}

.project-nav a {
  padding: 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: #cdc8ba;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.project-nav a:hover {
  color: var(--paper);
}

.project-nav a[aria-current] {
  color: var(--paper);
  border-bottom-color: var(--teal-bright);
}

.project-nav a:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 5px;
}

@media (max-width: 1100px) {
  .site-byline-role {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 100px;
  }

  .site-header-inner {
    flex-wrap: wrap;
    width: calc(100% - 32px);
    min-height: 0;
    padding-top: 12px;
  }

  .site-logo {
    font-size: 22px;
  }

  .site-brand {
    gap: 14px;
  }

  .site-byline {
    padding-left: 14px;
    font-size: 12px;
  }

  /* A second row of full-height (44px) tap targets. */
  .project-nav {
    width: calc(100% + 32px);
    margin: 0 -16px;
    padding: 0 16px;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .project-nav a {
    padding: 13px 0 11px;
  }

  .project-nav::-webkit-scrollbar {
    display: none;
  }
}

/* Phones show the case-study link on the logo row, since four links don't fit
   one row; larger screens keep it in the nav. */
.site-case-link {
  display: none;
}

/* Phones: the logo row carries the brand (byline stacked under the logo) and
   the case-study link; the three section links fill the second row. */
@media (max-width: 520px) {
  .site-header-inner {
    column-gap: 12px;
  }

  .site-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .site-byline {
    padding-left: 0;
    border-left: none;
    font-size: 11.5px;
  }

  .site-case-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 13px;
    font-weight: 600;
    color: var(--teal-bright);
    text-decoration: none;
    white-space: nowrap;
  }

  .site-case-link:focus-visible {
    outline: 3px solid var(--teal-bright);
    outline-offset: 2px;
  }

  .project-nav {
    justify-content: space-between;
    gap: 16px;
  }

  .project-nav a[href="/case-study"] {
    display: none;
  }
}

#story,
#charts,
#compare,
#ask,
#method {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

/* ===================== LEDE: FUNNEL + OPS METRICS ===================== */

.lede-section {
  background: var(--paper);
  padding: clamp(3.2rem, 6vw, 5.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.lede-shell {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
}

.lede-shell h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0;
  max-width: 22ch;
}

.lede-shell > p {
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 66ch;
}

.lede-panel {
  margin-top: 34px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.funnel {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.funnel-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.funnel-label {
  width: 120px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.funnel-track {
  flex: 1;
  position: relative;
  background: #e7e0cf;
  border-radius: 7px;
  height: 48px;
  overflow: hidden;
}

.funnel-bar {
  height: 100%;
  width: 0;
  min-width: 6px;
  border-radius: 7px;
  transition: width 1100ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.funnel-bar.is-introduced {
  background: linear-gradient(90deg, #0f7f7a, #179a93);
  display: flex;
  align-items: center;
  padding-left: 16px;
  color: #fff;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 19px;
}

.funnel-bar.is-enacted {
  background: var(--red);
}

.funnel-value {
  position: absolute;
  left: 62px;
  top: 0;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.funnel-value .n {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

.funnel-value .pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7a7d73;
}

.funnel-caption {
  font-size: 13px;
  line-height: 1.5;
  color: #7a7d73;
  margin: 13px 0 0;
  max-width: 70ch;
}

.ops-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.ops-metric {
  background: var(--surface);
  padding: 22px 22px 4px 0;
}

.ops-metric + .ops-metric {
  padding-left: 22px;
}

.ops-metric-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.ops-metric-value {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(1.9rem, 2.8vw, 2.5rem);
  line-height: 0.95;
  margin-top: 10px;
  color: var(--ink);
}

.ops-metric-value .arrow {
  font-family: var(--font-mono);
  font-size: 0.5em;
  font-weight: 500;
  color: var(--faint);
}

.ops-metric-value .after {
  color: var(--red);
}

.ops-metric-value .unit {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #7a7d73;
  font-weight: 500;
}

.ops-metric-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.ops-compare-note {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ===================== JOURNEY ===================== */

.journey-section {
  background: var(--surface);
  padding: clamp(3.2rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}

.journey-shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.journey-shell h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 30px;
  text-wrap: balance;
}

.journey-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.journey-step {
  border-top: 2px solid var(--red);
  padding: 14px 0 0;
}

.journey-step.is-final {
  border-top-color: var(--teal);
}

.journey-step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.journey-step h3 {
  font-weight: 600;
  font-size: 15px;
  margin: 6px 0 0;
}

.journey-step.is-final h3 {
  color: var(--teal);
}

.journey-step p {
  font-size: 12.5px;
  color: #6b6f6a;
  line-height: 1.45;
  margin: 5px 0 0;
}

/* ===================== STORY (SCROLLYTELLING) ===================== */

.story-section {
  background: var(--paper);
  padding: 0 0 clamp(2rem, 4vw, 3rem);
}

/* Photo bands: a dimmed photo under a charcoal scrim and a tinted glow. Used
   by the chart story's chapter break and the closing section. */
.photo-band-bg,
.photo-band-scrim,
.photo-band-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.photo-band-bg {
  background-size: cover;
}

.photo-band-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
}

.photo-band-eyebrow .rule {
  flex: none;
  width: 34px;
  height: 1px;
  background: currentColor;
}

/* Chapter break ("The data in depth"): opens the chart story over the House
   chamber, with the same type and spacing as the original design. */
.story-intro {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
  color: #e4dfd2;
  padding: clamp(2.4rem, 5vw, 3.8rem) 0;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.story-intro-bg {
  background-image: url("assets/chapter-break-bg.jpg");
  background-position: 80% 38%;
  opacity: 0.55;
}

.story-intro .photo-band-scrim {
  background: linear-gradient(100deg, #14201f 0%, rgba(20, 32, 31, 0.94) 30%, rgba(20, 32, 31, 0.75) 58%, rgba(20, 32, 31, 0.55) 100%);
}

.story-intro .photo-band-glow {
  background: linear-gradient(135deg, rgba(15, 127, 122, 0.14), transparent 55%);
}

.story-intro-inner {
  position: relative;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.story-intro-label {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-bright);
}

.story-intro-title {
  margin: 0 0 16px;
  max-width: 16ch;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.8vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--surface);
}

.story-intro-sub {
  margin: 0;
  max-width: 52ch;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: #c4ccc8;
}

.story-grid {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.story-panel {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: calc(var(--header-h) + 2vh);
  height: calc(96vh - var(--header-h));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 2vw, 1.6rem);
}

.scene-kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 13.5px;
  color: var(--teal);
  margin: 0;
}

.scene-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.1;
  margin: 6px 0 0;
}

.scene-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.scene-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.scene-legend-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  flex: none;
}

.scene-legend-swatch.is-line {
  width: 24px;
  height: 2px;
  border-radius: 0;
}

.scene-legend-swatch.is-dashed {
  width: 24px;
  height: 2px;
  border-radius: 0;
  border-top: 2px dashed currentColor;
  background: none;
}

.story-chart {
  flex: 1;
  min-height: 0;
  margin-top: 10px;
  overflow: hidden;
}

.scene-note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--faint);
  margin: 6px 0 0;
}

.story-steps {
  grid-column: 1;
  grid-row: 1;
}

.story-step {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0.32;
  filter: saturate(0.6);
  transform: translateX(-4px);
  transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
}

.story-step:last-child {
  min-height: 50vh;
}

.story-step.is-active {
  opacity: 1;
  filter: none;
  transform: translateX(0);
}

.story-step-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  margin: 0 0 14px;
}

.story-step h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0;
}

.story-step p:not(.story-step-eyebrow) {
  font-size: clamp(1rem, 1.3vw, 1.13rem);
  line-height: 1.6;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 46ch;
}

/* Short desktop windows keep the sticky panel; tighten it so the chart fits
   inside instead of spilling past the panel. */
@media (min-width: 861px) and (max-height: 700px) {
  .story-panel {
    top: calc(var(--header-h) + 1.5vh);
    height: calc(97vh - var(--header-h));
    padding: 14px 18px;
  }

  .scene-kicker {
    font-size: 12px;
  }

  .scene-title {
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  }

  .scene-legend {
    margin-top: 6px;
    gap: 6px 12px;
  }

  .scene-legend-item {
    font-size: 12px;
  }

  .story-panel .story-chart {
    min-height: 200px;
  }

  .scene-note {
    margin-top: 4px;
    font-size: 12px;
  }

  .story-step h2 {
    font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  }
}

/* Stacked story (phones, small tablets, landscape phones; set by
   applyStoryLayout): no sticky panel; each step is its text followed by its own
   chart. */
.story-grid.is-stacked {
  display: block;
}

.story-grid.is-stacked .story-panel {
  display: none;
}

.story-grid.is-stacked .story-step,
.story-grid.is-stacked .story-step:last-child {
  min-height: 0;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  opacity: 1;
  filter: none;
  transform: none;
}

.story-grid.is-stacked .story-step:first-child {
  padding-top: 4px;
  border-top: none;
}

.story-grid.is-stacked .story-step p:not(.story-step-eyebrow) {
  max-width: 62ch;
}

.step-chart {
  margin: 22px 0 0;
  padding: 16px 14px 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(27, 29, 26, 0.06);
}

.step-chart-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--ink);
}

.step-chart .scene-legend {
  gap: 6px 14px;
}

.step-chart .scene-legend-item {
  font-size: 12px;
}

/* Fits a landscape phone's short screen; never shorter than 280px. */
.step-chart-plot {
  height: clamp(280px, min(78vw, 80vh), 380px);
  margin-top: 10px;
  overflow: hidden;
}

.step-chart .scene-note {
  font-size: 12.5px;
}

/* Chart rendering (shared by scrollytelling scenes, restyled to the new palette) */

.chart-shell,
.story-chart {
  min-height: 280px;
  width: 100%;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: visible;
}

.axis text,
.axis-label,
.bar-label,
.direct-label {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.axis path,
.axis line,
.grid line {
  stroke: var(--line-soft);
}

.grid path,
.axis path {
  display: none;
}

.average-line {
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-dasharray: 7 4;
}

.average-line.strong {
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-dasharray: 8 4;
}

.average-hit {
  cursor: pointer;
}

.control-average-line {
  stroke-width: 1.6;
  stroke-dasharray: 3 6;
  opacity: 0.72;
}

.tick-year {
  fill: var(--faint);
  font-size: 12.5px;
  font-weight: 500;
}

.axis-caption {
  fill: var(--faint);
  font-size: 11px;
}

.pace-label {
  fill: var(--red);
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0.85;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.pace-value {
  fill: var(--ink);
  font-size: 19px;
  font-weight: 800;
}

.pace-ghost {
  fill: var(--red);
  opacity: 0.22;
}

.focus-line {
  stroke: var(--green);
  stroke-width: 2.5;
  fill: none;
}

.axis-title {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

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

.annotation-note {
  fill: var(--muted);
  font-size: 11px;
}

.chart-legend text {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.legend-note {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.bar-label {
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.direct-label.ref {
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
  font-weight: 700;
}

.is-interactive {
  transition: opacity 120ms ease;
}

rect.is-interactive:hover,
rect.is-interactive:focus {
  opacity: 1;
  outline: none;
}

circle.is-interactive:hover,
circle.is-interactive:focus {
  stroke: var(--ink);
  stroke-width: 1.5;
  outline: none;
}

.chart-tip {
  position: fixed;
  z-index: 9999;
  max-width: 240px;
  padding: 9px 11px;
  background: var(--charcoal);
  color: var(--paper);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(20, 32, 31, 0.28);
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.4;
  pointer-events: none;
}

.chart-tip[hidden] {
  display: none;
}

.chart-tip b {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.chart-tip .tip-sub {
  display: block;
  color: #aeb6ad;
}

.chart-tip .tip-val {
  display: block;
  margin-top: 0.2rem;
  font-weight: 700;
  color: #e8917f;
}

.chart-tip .tip-note {
  display: block;
  margin-top: 0.15rem;
  color: #aeb6ad;
  font-size: 0.76rem;
}

/* ===================== FINDINGS ===================== */

.findings-section {
  background: var(--surface);
  padding: clamp(3.2rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.findings-shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.findings-shell h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 34px;
  max-width: 26ch;
}

.findings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.finding-card {
  background: var(--paper);
  padding: 32px 30px;
}

.finding-stat {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0;
}

.finding-stat.is-teal {
  color: var(--teal);
}

.finding-card p:not(.finding-stat) {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 16px 0 0;
}

/* ===================== ASK / CHAT ===================== */

.chat-section {
  background: var(--paper);
  padding: clamp(3.2rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}

.chat-shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.chat-shell h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 26px;
  max-width: 22ch;
}

.chat-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface);
  padding: 20px;
}

.chat-thread {
  display: none;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
  max-height: 360px;
  overflow-y: auto;
}

.chat-thread.has-messages {
  display: flex;
}

.chat-row {
  display: flex;
}

.chat-row.is-user {
  justify-content: flex-end;
}

.chat-row.is-assistant {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 80%;
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.chat-row.is-user .chat-bubble {
  background: var(--teal);
  color: #fff;
}

.chat-row.is-assistant .chat-bubble {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-soft);
}

.chat-bubble.is-thinking {
  color: var(--muted);
}

.chat-bubble.is-error {
  color: var(--red);
}

.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
}

.chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: chatTyping 1.1s infinite ease-in-out;
}

.chat-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chatTyping {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.chat-form {
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 13px 16px;
  border-radius: 9px;
  font: inherit;
  font-size: 15px;
}

.chat-input:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.chat-input:disabled {
  opacity: 0.6;
}

.chat-send {
  flex: none;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 0 24px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.12s ease;
}

.chat-send:hover {
  opacity: 0.9;
}

.chat-send:disabled {
  opacity: 0.55;
  cursor: default;
}

.chat-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chat-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.chat-chip:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.chat-disclaimer {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--faint);
  margin: 14px 0 0;
}

/* Rendered Markdown inside assistant bubbles */
.chat-bubble > :first-child {
  margin-top: 0;
}

.chat-bubble > :last-child {
  margin-bottom: 0;
}

.chat-bubble p {
  margin: 0 0 0.6rem;
}

.chat-bubble ul,
.chat-bubble ol {
  margin: 0 0 0.6rem;
  padding-left: 1.25rem;
}

.chat-bubble li {
  margin: 0.15rem 0;
}

.chat-bubble strong {
  font-weight: 750;
}

.chat-bubble code {
  background: rgba(27, 29, 26, 0.06);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  font-size: 0.92em;
}

.chat-bubble table {
  border-collapse: collapse;
  margin: 0.2rem 0 0.6rem;
  font-size: 0.92rem;
}

.chat-bubble th,
.chat-bubble td {
  border: 1px solid var(--line);
  padding: 0.3rem 0.6rem;
  text-align: left;
}

.chat-bubble th {
  background: rgba(15, 127, 122, 0.08);
  font-weight: 700;
}

.chat-bubble a {
  color: var(--teal);
}

/* ===================== CLOSING (THE BOTTOM LINE) ===================== */

.closing {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
  color: var(--surface);
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.closing-bg {
  background-image: url("assets/closing-whitehouse.jpg");
  background-position: center 42%;
  opacity: 0.22;
}

.closing .photo-band-scrim {
  background: linear-gradient(90deg, #14201f 0%, rgba(20, 32, 31, 0.82) 42%, rgba(20, 32, 31, 0.55) 100%);
}

.closing .photo-band-glow {
  background: linear-gradient(135deg, rgba(196, 41, 28, 0.14), transparent 62%);
}

.closing-inner {
  position: relative;
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
}

.closing-eyebrow {
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e8917f;
}

.closing-inner h2 {
  margin: 0 0 clamp(2rem, 4vw, 3.2rem);
  max-width: 19ch;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.8vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.punch-grid {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
  gap: 1rem clamp(1rem, 3vw, 2.2rem);
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.punch-stat-value {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(3.4rem, 9vw, 7.5rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
  color: var(--surface);
}

.punch-stat-value.is-coral {
  color: var(--coral);
}

.punch-stat-label {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #aeb6ad;
}

.punch-vs {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  color: #8a948e;
}

.closing-inner > p:not(.closing-eyebrow) {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.62;
  color: #c4ccc8;
}

/* ===================== EXPLORER ===================== */

.explorer-section {
  background: var(--surface);
  padding: clamp(3.2rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}

.explorer-shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.explorer-shell h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 20ch;
}

.explorer-shell > p {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 16px 0 0;
  max-width: 72ch;
}

.explorer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 26px 0 22px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.explorer-controls label {
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.explorer-controls label.side-b {
  color: var(--red);
}

.explorer-controls select {
  min-width: 240px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
}

.scorecard {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: clamp(1rem, 2vw, 1.6rem);
  box-shadow: 0 10px 34px rgba(27, 29, 26, 0.06);
}

.vs-head,
.vs-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 2fr;
  gap: 10px;
  align-items: center;
}

.vs-head {
  padding-bottom: 10px;
  border-bottom: 1px solid #ece3cf;
  margin-bottom: 6px;
}

.vs-side-label {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.vs-side-label.a {
  color: var(--teal);
}

.vs-side-label.b {
  color: var(--red);
}

.vs-side-label.gap {
  color: var(--faint);
  padding-left: 10px;
  text-align: left;
}

.vs-row {
  padding: 9px 0;
  border-bottom: 1px solid #f1ead8;
}

.vs-metric {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink);
}

.vs-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--faint);
}

.vs-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.vs-val {
  text-align: right;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14.5px;
}

.vs-cell.a .vs-val {
  color: var(--teal);
}

.vs-cell.b .vs-val {
  color: var(--red);
}

.vs-val.is-muted {
  font-weight: 500;
  color: var(--faint);
}

.vs-delta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
}

.vs-delta-track {
  position: relative;
  flex: 1;
  height: 12px;
  background: #efe8d6;
  border-radius: 6px;
}

.vs-delta-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  left: 50%;
  background: #cabd9f;
}

.vs-delta-bar {
  position: absolute;
  top: 0;
  bottom: 0;
}

.vs-delta-bar.right {
  left: 50%;
  border-radius: 0 6px 6px 0;
}

.vs-delta-bar.left {
  right: 50%;
  border-radius: 6px 0 0 6px;
}

.vs-delta.lead-a .vs-delta-bar {
  background: var(--teal);
}

.vs-delta.lead-b .vs-delta-bar {
  background: var(--red);
}

.vs-delta-val {
  min-width: 54px;
  text-align: right;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12.5px;
}

.vs-delta.lead-a .vs-delta-val {
  color: var(--teal);
}

.vs-delta.lead-b .vs-delta-val {
  color: var(--red);
}

.vs-delta.lead-tie .vs-delta-val,
.vs-delta-val.is-muted {
  color: var(--faint);
  font-weight: 500;
}

.scorecard-note {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.5;
}

/* ===================== SOURCES / FOOTER ===================== */

.sources {
  background: var(--charcoal);
  color: #c4ccc8;
  padding: clamp(3.2rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}

.sources-inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.sources a {
  color: var(--teal-bright);
}

.sources-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
}

.sources-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  color: var(--surface);
}

.sources-head p {
  margin: 0;
  font-size: 15px;
  color: var(--faint);
}

/* The inspection record: four counts read like a spec sheet. */
.inspection {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 0;
  border-top: 1px solid rgba(244, 241, 232, 0.18);
  border-bottom: 1px solid rgba(244, 241, 232, 0.18);
}

.inspection-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 24px 24px 28px;
  border-left: 1px solid rgba(244, 241, 232, 0.12);
}

.inspection-cell:first-child {
  padding-left: 0;
  border-left: none;
}

.inspection dt {
  order: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-bright);
}

.inspection dd {
  margin: 0;
}

.inspection-value {
  order: 0;
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--surface);
}

.inspection-source {
  order: 2;
  font-size: 13px;
  line-height: 1.5;
  color: var(--faint);
}

.method-notes {
  margin-top: 8px;
}

.method-notes summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-bright);
  list-style: none;
}

.method-notes summary::-webkit-details-marker {
  display: none;
}

.method-notes summary::after {
  content: "+";
  margin-left: 10px;
  font-size: 16px;
}

.method-notes[open] summary::after {
  content: "−";
}

.method-notes summary:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 4px;
}

.method-notes ul {
  max-width: 72ch;
  margin: 4px 0 0;
  padding-left: 1.1em;
}

.method-notes li {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.6;
}

/* Colophon: the brand and who built it. */
.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 28px;
  border-top: 1px solid rgba(244, 241, 232, 0.18);
}

.colophon p {
  margin: 0;
}

.colophon-logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 60;
  color: var(--surface);
}

.colophon-brand p + p {
  margin-top: 8px;
  color: var(--faint);
  font-size: 15px;
}

.colophon-brand .colophon-legal {
  margin-top: 16px;
  font-size: 13px;
}

.colophon-credit strong {
  color: var(--surface);
  font-weight: 600;
}

.colophon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.colophon-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(95, 182, 173, 0.5);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.colophon-links a:hover {
  background: rgba(95, 182, 173, 0.12);
}

.colophon-links a:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .inspection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspection-cell:nth-child(odd) {
    padding-left: 0;
    border-left: none;
  }

  .inspection-cell:nth-child(n + 3) {
    border-top: 1px solid rgba(244, 241, 232, 0.12);
  }

  .inspection-cell {
    padding: 20px 0 20px 18px;
  }

  .inspection-value {
    font-size: 1.5rem;
  }
}

.noscript {
  margin: 2rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

/* ===================== STATUS PAGE (unrelated, shares this file) ===================== */

.status-page {
  min-height: 100vh;
  background: var(--paper);
  padding: clamp(2rem, 6vw, 5rem) 0;
}

.status-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.status-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.status-heading h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.25rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.status-heading p,
.status-summary p,
.status-card p {
  color: var(--muted);
  line-height: 1.55;
}

.status-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-summary p {
  margin: 0.45rem 0 0;
}

.status-time {
  text-align: right;
  font-size: 0.9rem;
}

.status-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.58rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.status-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  min-height: 142px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1rem, 2vw, 1.25rem);
}

.status-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.status-card h2 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.status-card p {
  margin: 0.65rem 0 0;
}

.status-meta {
  font-size: 0.84rem;
  font-weight: 750;
}

.status-dot {
  width: 0.78rem;
  height: 0.78rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--muted);
}

.status-badge.is-ready,
.status-pill.is-ready {
  border-color: rgba(15, 127, 122, 0.3);
  background: rgba(15, 127, 122, 0.1);
  color: var(--teal);
}

.status-badge.is-failed,
.status-pill.is-failed {
  border-color: rgba(196, 41, 28, 0.3);
  background: rgba(196, 41, 28, 0.1);
  color: var(--red);
}

.status-badge.is-skipped,
.status-pill.is-skipped {
  border-color: rgba(200, 145, 44, 0.35);
  background: rgba(200, 145, 44, 0.12);
  color: #7a5413;
}

.status-badge.is-loading,
.status-pill.is-loading {
  border-color: rgba(90, 98, 112, 0.28);
  background: rgba(90, 98, 112, 0.1);
  color: var(--muted);
}

.status-dot.is-ready {
  background: var(--teal);
}

.status-dot.is-failed {
  background: var(--red);
}

.status-dot.is-skipped {
  background: var(--gold);
}

.status-dot.is-loading {
  background: var(--muted);
}

/* ===================== RESPONSIVE ===================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 860px) {
  .story-grid {
    display: block;
  }

  .journey-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .ops-metrics,
  .findings-grid {
    grid-template-columns: 1fr;
  }

  .ops-metric,
  .ops-metric + .ops-metric {
    padding: 16px 0 6px;
  }

  .funnel-row {
    gap: 10px;
  }

  .explorer-controls {
    grid-template-columns: 1fr;
  }

  .explorer-controls {
    display: grid;
  }

  .explorer-controls select {
    min-width: 0;
    width: 100%;
  }

  .vs-head,
  .vs-row {
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.4fr;
    gap: 6px;
  }

  .status-shell {
    width: min(100% - 28px, 680px);
  }

  .status-summary,
  .status-card-heading {
    display: grid;
  }

  .status-time {
    text-align: left;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .lede-panel {
    padding: 20px 16px;
  }

  /* Funnel: label above a full-width bar, so the shipped count never clips. */
  .funnel-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .funnel-label {
    width: auto;
  }

  .funnel-track {
    flex: none;
  }

  /* Comparison: the metric name gets its own line, then A | B | gap. */
  .vs-head,
  .vs-row {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
    column-gap: 10px;
    row-gap: 4px;
  }

  .vs-head > span:first-child {
    display: none;
  }

  .vs-metric {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
  }

  .vs-side-label,
  .vs-side-label.gap {
    padding-left: 0;
    text-align: left;
  }

  .vs-cell {
    justify-content: flex-start;
  }

  .vs-delta {
    padding-left: 0;
  }

  .vs-delta-val {
    min-width: 0;
    white-space: nowrap;
  }

  /* Small labels stay at a readable 12px or more on phones. */
  .funnel-label,
  .ops-metric-kicker,
  .vs-side-label,
  .vs-hint {
    font-size: 12px;
  }

  .scorecard-note {
    font-size: 13px;
  }
}
