:root {
  --site-bg: #f3efe7;
  --site-fg: #102a3e;
  --site-ink: #081c2c;
  --site-primary: #173f5f;
  --site-secondary: #27698c;
  --site-accent: #087fa6;
  --site-card: #faf8f3;
  --site-muted: #5b6b77;
  --site-border: rgba(16, 42, 62, 0.16);
  --site-border-strong: rgba(16, 42, 62, 0.42);
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Newsreader", ui-serif, Georgia, serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", monospace;
  --header-height: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--site-fg);
  background: var(--site-bg);
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01", "ss03";
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(8, 127, 166, 0.24); }

a { color: inherit; }
button, select { font: inherit; }

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: 3px;
  background: #43b6d4;
  transform: scaleX(0);
  transform-origin: left;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: white;
  background: var(--site-ink);
  transform: translateY(-180%);
}

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

.section-shell {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--site-secondary);
  font: 500 0.72rem/1.5 var(--font-mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow-light { color: rgba(255, 255, 255, 0.64); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 28, 44, 0.96);
  backdrop-filter: blur(16px);
}

.site-nav {
  width: min(1440px, 100%);
  height: 100%;
  margin: auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand-cluster, .brand, .site-nav nav { display: flex; align-items: center; }
.brand-cluster { gap: 1rem; min-width: 0; }
.brand { min-height: 44px; text-decoration: none; }
.brand img { width: auto; height: 24px; max-width: 46vw; filter: brightness(0) invert(1); }
.brand-divider { width: 1px; height: 1.5rem; background: rgba(255, 255, 255, 0.24); }
.brand-labs { font: 500 0.75rem var(--font-mono); letter-spacing: 0.08em; text-decoration: none; text-transform: uppercase; }
.site-nav nav { gap: 1.8rem; }
.site-nav nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}
.site-nav nav a:hover, .site-nav nav a[aria-current="page"] { color: white; }
.site-nav nav a[aria-current="page"] { box-shadow: inset 0 -2px #43b6d4; }

/* Labs index */
.labs-hero {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  color: white;
  background: var(--site-ink);
}

.labs-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1440px, 100%);
  min-height: calc(100svh - var(--header-height));
  margin: auto;
  padding: clamp(5rem, 10vh, 8rem) 2.5rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4rem;
}

.labs-hero-copy { max-width: 70rem; }
.labs-hero h1 {
  max-width: 66rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 8.6vw, 8.6rem);
  font-weight: 400;
  letter-spacing: -0.052em;
  line-height: 0.88;
  text-wrap: balance;
}
.labs-hero-copy > p:not(.eyebrow) {
  max-width: 48rem;
  margin: 2rem 0 2.25rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(1rem, 1.6vw, 1.24rem);
  line-height: 1.65;
}
.button-light {
  min-height: 3rem;
  padding: 0.8rem 1.3rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--site-ink);
  border-radius: 999px;
  background: white;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}
.button-light span { transition: transform 160ms ease; }
.button-light:hover span { transform: translateX(0.25rem); }
.labs-hero-index { padding-bottom: 0.5rem; text-align: right; }
.labs-hero-index span { display: block; color: rgba(255, 255, 255, 0.5); font: 0.68rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.labs-hero-index strong { display: block; margin-top: 0.25rem; font-family: var(--font-display); font-size: clamp(7rem, 14vw, 14rem); font-weight: 400; letter-spacing: -0.08em; line-height: 0.78; }
.labs-hero-field { position: absolute; inset: 0; opacity: 0.62; }
.labs-hero-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 74% 44%, rgba(67, 182, 212, 0.16), transparent 36%);
}
.labs-hero-field span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #43b6d4;
  box-shadow: 0 0 0 5px rgba(67, 182, 212, 0.06);
}
.labs-hero-field span:nth-child(8n + 1) { left: 68%; top: 18%; }
.labs-hero-field span:nth-child(8n + 2) { left: 76%; top: 31%; }
.labs-hero-field span:nth-child(8n + 3) { left: 84%; top: 47%; }
.labs-hero-field span:nth-child(8n + 4) { left: 63%; top: 63%; }
.labs-hero-field span:nth-child(8n + 5) { left: 91%; top: 72%; }
.labs-hero-field span:nth-child(8n + 6) { left: 58%; top: 37%; }
.labs-hero-field span:nth-child(8n + 7) { left: 72%; top: 82%; }
.labs-hero-field span:nth-child(8n) { left: 95%; top: 23%; }
.labs-hero-field span:nth-child(3n) { transform: translate(17px, 36px); }
.labs-hero-field span:nth-child(4n) { transform: translate(-28px, 68px); }
.labs-hero-field span:nth-child(5n) { transform: translate(44px, -22px); }

.lab-index { padding-block: clamp(5rem, 9vw, 9rem); }
.section-heading { margin-bottom: 4rem; display: grid; grid-template-columns: 0.65fr 1.5fr; gap: 3rem; }
.section-heading h2 { max-width: 780px; margin: 0; font-family: var(--font-display); font-size: clamp(2.8rem, 5.5vw, 5.4rem); font-weight: 400; letter-spacing: -0.045em; line-height: 0.96; }
.section-heading-compact { grid-template-columns: 1.3fr 0.7fr; align-items: end; margin-bottom: 2.5rem; }
.section-heading-compact h2 { font-size: clamp(2.2rem, 4vw, 4rem); }
.section-heading-compact > p { max-width: 32rem; margin: 0; color: var(--site-muted); line-height: 1.65; }
.lab-row { padding: 2rem 0; display: grid; grid-template-columns: 0.6fr 1.25fr 2.1fr auto; align-items: baseline; gap: 2rem; border-block: 1px solid var(--site-fg); text-decoration: none; }
.lab-number { font: 0.72rem var(--font-mono); }
.lab-name { font-family: var(--font-display); font-size: clamp(2rem, 3.3vw, 3.4rem); }
.lab-description { color: var(--site-muted); line-height: 1.65; }
.lab-arrow { font-size: 1.7rem; transition: transform 160ms ease; }
.lab-row:hover .lab-arrow { transform: translate(0.25rem, -0.25rem); }

/* Houston Signal product workspace */
.signal-header {
  padding-block: 2.75rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(34rem, 0.8fr);
  align-items: end;
  gap: 4rem;
}
.signal-header h1 { margin: 0; font-family: var(--font-display); font-size: clamp(3.8rem, 6vw, 6rem); font-weight: 400; letter-spacing: -0.055em; line-height: 0.88; }
.signal-deck { max-width: 40rem; margin: 1rem 0 0; color: var(--site-muted); font-size: 0.95rem; line-height: 1.6; }
.signal-freshness { min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.signal-freshness div { padding: 1rem 0; border-top: 1px solid var(--site-border-strong); }
.signal-freshness dt, .signal-freshness dd { margin: 0; }
.signal-freshness dt { margin-bottom: 0.5rem; color: var(--site-muted); font: 0.66rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.signal-freshness dd { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; font-weight: 600; }

.product-tabs {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  border-block: 1px solid var(--site-border);
  background: rgba(243, 239, 231, 0.94);
  backdrop-filter: blur(14px);
  scroll-margin-top: var(--header-height);
}
.product-tabs .section-shell { display: flex; gap: 2.4rem; }
.product-tabs button { min-height: 3.6rem; padding: 0; border: 0; color: var(--site-muted); background: transparent; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.product-tabs button[aria-selected="true"] { color: var(--site-fg); box-shadow: inset 0 -3px var(--site-accent); }
.product-tabs button:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 3px; }
.product-workspace { min-height: 70vh; }
.tab-panel[hidden] { display: none; }

.metric-band { padding-block: 1.5rem 0; }
.metric-band dl { margin-block: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.metric-band dl > div { min-width: 0; min-height: 10.5rem; padding: 1.35rem; display: flex; flex-direction: column; border: 1px solid var(--site-border); background: var(--site-card); }
.metric-band dt { color: var(--site-muted); font: 0.66rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.metric-band dd { margin: auto 0 0.75rem; font-family: var(--font-display); font-size: clamp(2.4rem, 4vw, 4.1rem); letter-spacing: -0.05em; line-height: 0.9; }
.metric-band dd span { font-family: var(--font-sans); font-size: 0.32em; letter-spacing: 0; }
.metric-band .metric-compact { font-size: clamp(2.2rem, 3.5vw, 3.7rem); }
.metric-band small { color: var(--site-muted); font-size: 0.7rem; line-height: 1.4; }

.hfd-overview { margin-block: 1rem; padding: clamp(1.5rem, 4vw, 3.5rem); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(3rem, 8vw, 7rem); color: white; background: var(--site-ink); }
.hfd-overview .eyebrow { color: rgba(255, 255, 255, 0.5); }
.hfd-summary h2 { margin: 0 0 2.5rem; font-family: var(--font-display); font-size: clamp(2.8rem, 5vw, 5rem); font-weight: 400; letter-spacing: -0.05em; line-height: 0.95; }
.hfd-summary dl { margin: 0; }
.hfd-summary dl > div { padding: 0.85rem 0; display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.hfd-summary dt { color: rgba(255, 255, 255, 0.56); font: 0.68rem var(--font-mono); }
.hfd-summary dd { margin: 0; font-size: 0.78rem; text-align: right; }
.hfd-warning { margin: 1.5rem 0 0; color: rgba(255, 255, 255, 0.56); font-size: 0.72rem; line-height: 1.6; }
.hfd-types .ranked-list { border-top-color: rgba(255, 255, 255, 0.3); }
.hfd-types .ranked-list li { border-bottom-color: rgba(255, 255, 255, 0.16); }
.hfd-types .ranked-list span { color: rgba(255, 255, 255, 0.5); }
.hfd-types .ranked-list i { background: #e77a4e; }

.trend-section { margin-block: 1rem; padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--site-border); background: var(--site-card); }
.trend-section .section-heading-compact h2 { font-size: clamp(2rem, 3.2vw, 3rem); }
.coverage-note { max-width: 58rem; margin: -0.5rem 0 1.5rem; padding-left: 0.9rem; color: var(--site-muted); border-left: 3px solid var(--site-accent); font-size: 0.76rem; line-height: 1.6; }
.trend-legend { margin: 0 0 1.25rem; display: flex; justify-content: flex-end; gap: 1.5rem; color: var(--site-muted); font: 0.7rem var(--font-mono); }
.trend-legend span { display: flex; align-items: center; gap: 0.45rem; }
.trend-legend i { width: 1.5rem; height: 2px; display: block; }
.legend-request { background: var(--site-accent); }
.legend-closed { background: var(--site-muted); }
.trend-chart { min-height: 340px; border-top: 1px solid var(--site-border-strong); }
.trend-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend-grid { stroke: var(--site-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-axis-label { fill: var(--site-muted); font: 10px var(--font-mono); }
.trend-area { fill: rgba(8, 127, 166, 0.1); }
.trend-line-request, .trend-line-closed { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trend-line-request { stroke: var(--site-accent); stroke-width: 3; }
.trend-line-closed { stroke: var(--site-muted); stroke-width: 1.8; stroke-dasharray: 4 5; }
.trend-point { fill: var(--site-accent); stroke: var(--site-bg); stroke-width: 2; vector-effect: non-scaling-stroke; }

.breakdown-grid { padding-bottom: clamp(4rem, 8vw, 7rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.breakdown-section { padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--site-border); background: var(--site-card); }
.breakdown-heading { min-height: 10rem; padding-bottom: 2rem; }
.breakdown-heading h2 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 3vw, 3rem); font-weight: 400; letter-spacing: -0.04em; }
.breakdown-heading > p:last-child { color: var(--site-muted); }
.ranked-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--site-border-strong); }
.ranked-list li { padding: 1rem 0 0.85rem; border-bottom: 1px solid var(--site-border); }
.ranked-list li > div { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: baseline; gap: 0.75rem; }
.ranked-list span { color: var(--site-muted); font: 0.68rem var(--font-mono); }
.ranked-list strong { overflow: hidden; font-size: 0.88rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ranked-list b { font: 500 0.72rem var(--font-mono); }
.ranked-list i { width: var(--bar-size); height: 3px; margin-top: 0.75rem; display: block; background: var(--site-accent); transform-origin: left; animation: bar-grow 700ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.ranked-list-districts i { background: var(--site-secondary); }
.ranked-list .empty-row { color: var(--site-muted); }

/* Map */
.pipeline-intro { padding-block: clamp(4rem, 7vw, 7rem) 3rem; display: grid; grid-template-columns: 1.2fr 0.8fr; align-items: end; gap: 5rem; }
.pipeline-intro h2 { max-width: 48rem; margin: 0; font-family: var(--font-display); font-size: clamp(2.4rem, 4vw, 4.2rem); font-weight: 400; letter-spacing: -0.045em; line-height: 0.98; }
.pipeline-intro > p { max-width: 34rem; margin: 0; color: var(--site-muted); line-height: 1.65; }
.map-filters { padding: 1.25rem 0; display: grid; grid-template-columns: 0.7fr 1fr 0.8fr 1.35fr auto; align-items: end; gap: 1rem; border-top: 1px solid var(--site-border-strong); }
.map-filters label { color: var(--site-muted); font: 0.65rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.map-filters select { width: 100%; min-height: 2.75rem; margin-top: 0.45rem; padding: 0 2.2rem 0 0.7rem; color: var(--site-fg); border: 1px solid var(--site-border-strong); border-radius: 0; background: var(--site-card); font-family: var(--font-sans); font-size: 0.8rem; text-transform: none; }
.map-filters button { min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--site-fg); color: var(--site-fg); background: transparent; font-size: 0.76rem; font-weight: 700; cursor: pointer; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; min-height: 680px; border-block: 1px solid var(--site-border-strong); background: var(--site-ink); }
.request-map { z-index: 1; min-height: 680px; background: #dce2df; }
.map-context { padding: 2rem 1.5rem; color: white; border-left: 1px solid rgba(255, 255, 255, 0.16); }
.map-context .eyebrow { color: rgba(255, 255, 255, 0.5); }
.map-context > strong { display: block; font-family: var(--font-display); font-size: 3.2rem; font-weight: 400; letter-spacing: -0.04em; }
.map-context > p:not(.eyebrow) { color: rgba(255, 255, 255, 0.62); font-size: 0.78rem; line-height: 1.6; }
.map-key { margin-top: 2rem; padding-top: 1.25rem; display: grid; gap: 0.8rem; border-top: 1px solid rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.74); font: 0.7rem var(--font-mono); }
.map-key span { display: flex; align-items: center; gap: 0.6rem; }
.map-key i { width: 0.65rem; height: 0.65rem; border-radius: 50%; }
.map-key-open { background: #e77a4e; }
.map-key-closed { background: #1787a8; }
.map-key-cluster { background: #173f5f; border: 2px solid rgba(255, 255, 255, 0.6); }
.leaflet-container { font-family: var(--font-sans); }
.leaflet-control-attribution { font-size: 9px; }
.leaflet-popup-content-wrapper { border-radius: 0; box-shadow: 0 12px 40px rgba(8, 28, 44, 0.24); }
.leaflet-popup-content { min-width: 190px; margin: 1rem; }
.map-popup { display: grid; gap: 0.5rem; }
.map-popup strong { color: var(--site-ink); font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
.map-popup span { color: var(--site-muted); font-size: 0.72rem; line-height: 1.45; }
.request-cluster {
  display: grid;
  place-items: center;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: var(--site-primary);
}
.request-cluster span { font: 600 0.7rem var(--font-sans); }

/* Pipeline */
.source-status { padding-bottom: 4rem; }
.source-status .section-heading { margin-bottom: 1.5rem; }
.pipeline-metrics { padding-block: 0 4rem; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--site-border-strong); }
.pipeline-metrics > div { min-width: 0; padding: 1.5rem 1.5rem 1.5rem 0; border-bottom: 1px solid var(--site-border); }
.pipeline-metrics > div + div { padding-left: 1.5rem; border-left: 1px solid var(--site-border); }
.pipeline-metrics span, .pipeline-metrics small { display: block; color: var(--site-muted); }
.pipeline-metrics span { font: 0.65rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.pipeline-metrics strong { min-height: 4.5rem; display: flex; align-items: center; gap: 0.65rem; font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 4.3rem); font-weight: 400; letter-spacing: -0.05em; }
.pipeline-metrics small { font-size: 0.72rem; line-height: 1.5; }
.pipeline-flow { padding-block: 3rem 7rem; }
.pipeline-flow ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; border-block: 1px solid var(--site-fg); }
.pipeline-flow li { position: relative; min-height: 11rem; padding: 1.5rem; display: flex; flex-direction: column; }
.pipeline-flow li + li { border-left: 1px solid var(--site-border-strong); }
.pipeline-flow li:not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: 0; z-index: 2; width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid var(--site-border-strong); border-radius: 50%; background: var(--site-bg); transform: translate(50%, -50%); }
.pipeline-flow li span { color: var(--site-muted); font: 0.66rem var(--font-mono); }
.pipeline-flow li strong { margin-top: auto; font-family: var(--font-display); font-size: 1.7rem; font-weight: 400; }
.pipeline-flow li small { margin-top: 0.4rem; color: var(--site-muted); line-height: 1.4; }
.platform-detail { padding-bottom: 7rem; display: grid; grid-template-columns: 1fr 1fr; gap: 7vw; }
.status-list { margin: 0; }
.status-list > div { padding: 1rem 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; border-top: 1px solid var(--site-border); }
.status-list dt { color: var(--site-muted); font: 0.68rem var(--font-mono); }
.status-list dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-size: 0.82rem; }
code { font: 0.68rem/1.5 var(--font-mono); }
.run-history { padding-bottom: 8rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
th, td { padding: 1rem 1.1rem 1rem 0; border-bottom: 1px solid var(--site-border); text-align: left; white-space: nowrap; }
th { color: var(--site-muted); font: 0.64rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.table-status { display: inline-flex; align-items: center; gap: 0.4rem; }
.table-status::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #d49c33; }
.table-status-succeeded::before { background: #3e9c69; }
.table-status-failed::before { background: #be4e44; }
.status-dot { width: 0.62rem; height: 0.62rem; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: #d49c33; }
.status-succeeded { background: #3e9c69; }
.status-failed { background: #be4e44; }

/* Footer */
.site-footer { color: white; background: var(--site-ink); }
.site-footer-inner { width: min(1180px, calc(100% - 3rem)); margin: auto; padding-block: 4rem 2rem; display: grid; grid-template-columns: 1.4fr 0.7fr 1.4fr; gap: 4rem; }
.footer-brand img { width: auto; height: 24px; max-width: 100%; filter: brightness(0) invert(1); }
.footer-brand p, .disclaimer { color: rgba(255, 255, 255, 0.56); font-size: 0.76rem; line-height: 1.6; }
.site-footer nav { display: grid; align-content: start; gap: 0.8rem; }
.site-footer nav a { color: rgba(255, 255, 255, 0.76); font-size: 0.78rem; text-decoration: none; }
.disclaimer { margin: 0; }

.motion-enter { animation: fade-up 620ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.motion-delay { animation-delay: 100ms; }

@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@supports (animation-timeline: scroll()) {
  .scroll-progress { animation: scroll-progress linear; animation-timeline: scroll(); }
  .reveal { animation: fade-up linear both; animation-timeline: view(); animation-range: entry 5% cover 25%; }
}
@keyframes scroll-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 960px) {
  .labs-hero-inner { grid-template-columns: 1fr; }
  .labs-hero-index { display: none; }
  .signal-header, .pipeline-intro, .section-heading, .section-heading-compact { grid-template-columns: 1fr; gap: 2rem; }
  .metric-band dl, .pipeline-metrics { grid-template-columns: repeat(2, 1fr); }
  .hfd-overview, .breakdown-grid, .platform-detail { grid-template-columns: 1fr; }
  .breakdown-heading { min-height: 0; }
  .map-filters { grid-template-columns: repeat(2, 1fr); }
  .map-layout { grid-template-columns: 1fr; }
  .map-context { border-top: 1px solid rgba(255, 255, 255, 0.16); border-left: 0; }
  .pipeline-flow ol { grid-template-columns: repeat(2, 1fr); }
  .pipeline-flow li:nth-child(3) { border-left: 0; border-top: 1px solid var(--site-border-strong); }
  .pipeline-flow li:nth-child(4) { border-top: 1px solid var(--site-border-strong); }
  .pipeline-flow li:nth-child(2)::after { display: none; }
}

@media (max-width: 700px) {
  :root { --header-height: 68px; }
  .section-shell { width: min(100% - 2rem, 1180px); }
  .site-nav { padding-inline: 1rem; }
  .brand img { height: 18px; max-width: 42vw; }
  .brand-divider, .brand-labs, .nav-optional { display: none !important; }
  .site-nav nav { gap: 1rem; }
  .site-nav nav a { font-size: 0.72rem; }
  .labs-hero-inner { padding: 4.5rem 1rem 2rem; }
  .labs-hero h1 { font-size: clamp(3.5rem, 17vw, 5.7rem); }
  .lab-row { grid-template-columns: 0.55fr 1fr auto; gap: 1rem; }
  .lab-description { grid-column: 2 / 4; }
  .signal-header { padding-block: 2.25rem 1.5rem; }
  .signal-header h1 { font-size: 3.6rem; }
  .signal-freshness { width: 100%; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
  .signal-freshness dd { font-size: 0.76rem; }
  .product-tabs .section-shell { gap: 1.7rem; }
  .metric-band dl { gap: 0.75rem; }
  .metric-band dl > div { min-height: 9.5rem; padding: 1.2rem; }
  .metric-band dd { font-size: clamp(2.3rem, 12vw, 3.6rem); }
  .trend-chart { min-height: 230px; }
  .pipeline-intro { padding-top: 3.5rem; }
  .map-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-filters button { grid-column: 1 / -1; }
  .request-map { min-height: 70svh; }
  .pipeline-metrics { grid-template-columns: 1fr 1fr; }
  .pipeline-metrics > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .pipeline-flow ol { grid-template-columns: 1fr; }
  .pipeline-flow li + li { border-top: 1px solid var(--site-border-strong); border-left: 0; }
  .pipeline-flow li::after { display: none; }
  .status-list > div { grid-template-columns: 1fr; }
  .status-list dd { text-align: left; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 390px) {
  .site-nav nav { gap: 0.7rem; }
  .site-nav nav a { font-size: 0.68rem; }
  .metric-band dl { grid-template-columns: 1fr; }
  .pipeline-metrics { grid-template-columns: 1fr; }
  .pipeline-metrics > div + div { padding-left: 0; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-progress { display: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
