:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-raised: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --border-strong: rgba(11, 11, 11, 0.18);
  --wash: rgba(11, 11, 11, 0.045);
  --wash-strong: rgba(11, 11, 11, 0.08);
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-wash: rgba(42, 120, 214, 0.1);
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --s6: #008300;
  --s7: #4a3aa7;
  --s8: #e34948;
  --other: #b3b1a8;
  --context: #d3d1c9;
  --div-neg: #2a78d6;
  --div-pos: #e34948;
  --div-mid: #f0efec;
  --seq-lo: #eef3fa;
  --seq-hi: #5598e7;
  --green-lo: #eff5ee;
  --green-hi: #5fbf8f;
  --orange-lo: #fdf0e8;
  --orange-hi: #eb6834;
  --band-pre: rgba(11, 11, 11, 0.035);
  --band-post: rgba(42, 120, 214, 0.08);
  --map-water: #f3f5f6;
  --map-land: #f6f5f1;
  --map-stroke: #fcfcfb;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px rgba(11, 11, 11, 0.05);
  --shadow-pop: 0 2px 6px rgba(11, 11, 11, 0.08), 0 16px 40px rgba(11, 11, 11, 0.14);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
canvas {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 2px;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-size: 15px;
}

.stage-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.stage-nav::-webkit-scrollbar {
  display: none;
}

.stage-nav button {
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.stage-nav button:hover {
  background: var(--wash);
  color: var(--ink);
}

.stage-nav button.is-active {
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
}

.stage-nav button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero {
  padding-block: 56px 64px;
  background:
    radial-gradient(1200px 400px at 85% -10%, var(--accent-wash), transparent 70%),
    var(--page);
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  max-width: 26ch;
  margin: 0 0 18px;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.lede {
  max-width: 70ch;
  margin: 0 0 32px;
  color: var(--ink-2);
  font-size: 1.08rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 16px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.stat:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.stat-label {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 550;
}

.stat-value {
  font-size: 2rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.stat-delta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
}

.stat-arrow {
  font-size: 11px;
  color: var(--ink);
}

.stat-spark {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: 6px;
}

.stat-stage {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--ink-2);
  font-size: 14px;
  list-style: none;
}

.counts strong {
  color: var(--ink);
  font-weight: 650;
}

.lifecycle {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

/* the track runs from the centre of the first dot to the centre of the last, so it never overshoots the row;
   a dot is 36px wide at the start of its column, and a column is (100% - five 10px gaps) / 6 */
.lifecycle::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 18px;
  right: calc((100% - 50px) / 6 - 18px);
  height: 2px;
  background: var(--grid);
}

.step {
  position: relative;
  z-index: 1;
  counter-increment: step;
}

.step-button {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  height: 100%;
  padding: 0 6px 8px 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.step-button:hover .step-name {
  text-decoration: underline;
}

.step-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* the chosen stage keeps its dot filled and its text at full strength; the others step back */
.step-button[aria-selected="false"] {
  opacity: .62;
}

.step-button[aria-selected="true"] .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.step-button[aria-selected="true"] .step-name {
  color: var(--accent);
}

.step-dot {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--axis);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
}

.step.is-before .step-dot {
  border-color: var(--div-pos);
  color: var(--ink);
}

.step.is-after .step-dot {
  border-color: var(--div-neg);
  color: var(--ink);
}

.step-dot::after {
  content: counter(step);
}

.step-name {
  font-size: 14px;
  font-weight: 650;
}

.step-text {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}

.step-dir {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.stage-panel {
  margin-top: 26px;
}

.stage-panel[hidden] {
  display: none;
}

.stage-panel > .wrap {
  width: auto;
  max-width: none;
  padding-inline: 0;
}

.band {
  padding-block: 40px 64px;
}

.section-head {
  max-width: 880px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-head h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.section-head p {
  margin: 0;
  color: var(--ink-2);
}

.section-head.sub {
  margin-top: 40px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 22px;
  margin: 0 0 16px;
}

.controls:empty {
  display: none;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.control-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--wash);
  border-radius: 10px;
}

.segmented button {
  padding: 5px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-checked="true"] {
  background: var(--surface-raised);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.segmented.small button {
  padding: 3px 9px;
  font-size: 12.5px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--ink-2);
}

.chip[aria-pressed="true"] {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--ink);
}

.chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--c, var(--other));
}

.chip[aria-pressed="false"] .chip-dot {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--c, var(--other));
}

.select,
.text-input {
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  font-size: 14px;
}

.select {
  padding-right: 28px;
  max-width: 100%;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
}

.switch input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 34px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: var(--axis);
  cursor: pointer;
  transition: background 0.15s;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}

.switch input:checked {
  background: var(--accent);
}

.switch input:checked::after {
  transform: translateX(14px);
}

.search {
  position: relative;
  min-width: 240px;
}

.search input {
  width: 100%;
  padding-left: 32px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.search-list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 320px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
}

.search-list li {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
}

.search-list li[aria-selected="true"],
.search-list li:hover {
  background: var(--wash-strong);
}

.search-main {
  font-size: 14px;
}

.search-sub {
  color: var(--muted);
  font-size: 12px;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-2.wide-left {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.grid-2.wide-right {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  min-width: 0;
  margin: 0;
  padding: 18px 18px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

figure.card {
  margin: 0 0 16px;
}

.grid-2 > figure.card,
.grid-3 > figure.card {
  margin: 0;
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.chart-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
}

.chart-sub {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}

.chart-sub:empty {
  display: none;
}

.chart-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex: none;
  max-width: 60%;
}

.tool-btn,
.btn-small {
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}

.tool-btn:hover,
.btn-small:hover {
  color: var(--ink);
  border-color: var(--ink-2);
}

.tool-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: var(--accent-ink);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 0 0 6px -6px;
}

.chart-legend:empty {
  display: none;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
}

span.legend-item {
  cursor: default;
}

button.legend-item:hover {
  background: var(--wash);
  color: var(--ink);
}

.legend-item[aria-pressed="false"] {
  opacity: 0.45;
}

.legend-item[aria-pressed="false"] .legend-swatch {
  filter: grayscale(1);
}

.legend-swatch {
  flex: none;
  display: inline-block;
  background: var(--c);
}

.legend-rect {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.legend-line {
  width: 16px;
  height: 2px;
  border-radius: 2px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.legend-ring {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--c);
}

.legend-band {
  width: 16px;
  height: 10px;
  border-radius: 2px;
  opacity: 0.5;
}

.legend-reset {
  padding: 2px 8px;
  border: 0;
  background: transparent;
  color: var(--accent-ink);
  font-size: 12.5px;
  cursor: pointer;
}

.chart-body {
  position: relative;
  width: 100%;
}

.chart-svg {
  display: block;
  overflow: visible;
  font-family: var(--font);
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}

.chart-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chart-note:empty {
  display: none;
}

.chart-table {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table caption {
  padding: 8px 10px;
  color: var(--ink-2);
  font-size: 12.5px;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--grid);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-raised);
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

.data-table th button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 600;
  cursor: pointer;
}

.data-table td.num,
.data-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--wash);
}

.axis text,
.tick-label {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.axis .domain {
  display: none;
}

.axis .tick line {
  stroke: var(--grid);
  shape-rendering: crispEdges;
}

.axis.no-grid .tick line {
  stroke: var(--axis);
}

.baseline {
  stroke: var(--axis);
  shape-rendering: crispEdges;
}

.axis-title {
  fill: var(--ink-2);
  font-size: 11.5px;
}

.label {
  fill: var(--ink-2);
  font-size: 11.5px;
}

.label-strong {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.label-muted {
  fill: var(--muted);
  font-size: 11px;
}

.halo {
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.crosshair {
  stroke: var(--ink-2);
  stroke-width: 1;
  pointer-events: none;
  shape-rendering: crispEdges;
}

.band-label {
  fill: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mark {
  transition: opacity 0.12s;
}

.is-dim {
  opacity: 0.25;
}

.hit {
  fill: transparent;
  cursor: crosshair;
}

.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  min-width: 170px;
  max-width: 320px;
  padding: 10px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.4;
  pointer-events: none;
}

.tt-title {
  font-size: 13px;
  font-weight: 650;
}

.tt-sub {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.tt-rows {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 3px 8px;
  margin-top: 7px;
}

.tt-row {
  display: contents;
}

.tt-key {
  display: inline-block;
  width: 12px;
  height: 2px;
  border-radius: 2px;
}

.tt-key-dot {
  width: 8px;
  height: 8px;
  margin-inline: 2px;
  border-radius: 999px;
}

.tt-key-none {
  background: transparent;
}

.tt-value {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.tt-label {
  color: var(--ink-2);
}

.tt-row.is-focus .tt-value,
.tt-row.is-focus .tt-label {
  color: var(--ink);
  font-weight: 700;
}

.tt-row.is-muted .tt-value,
.tt-row.is-muted .tt-label {
  color: var(--muted);
  font-weight: 400;
}

.tt-note {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--grid);
  color: var(--muted);
  font-size: 11.5px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

.map-card {
  position: relative;
  padding: 10px;
}

.map-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: var(--map-water);
  touch-action: none;
}

.map-stage svg,
.map-stage canvas {
  position: absolute;
  inset: 0;
  display: block;
}

.map-stage canvas,
.map-overlay {
  pointer-events: none;
}

.map-base {
  cursor: grab;
}

.map-base:active {
  cursor: grabbing;
}

.state-path {
  stroke: var(--map-stroke);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: fill 0.2s;
}

.state-path.is-hover {
  stroke: var(--ink-2);
  stroke-width: 1.5;
}

.state-path.is-selected {
  stroke: var(--ink);
  stroke-width: 2;
}

.inset-frame {
  fill: none;
  stroke: var(--axis);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.map-label {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 650;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.map-label.state {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.map-focus-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
}

.map-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 2px 2px 10px;
}

.map-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.map-hint {
  color: var(--muted);
  font-size: 12.5px;
}

.map-zoom {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
}

.map-zoom button {
  width: 32px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.map-zoom button + button {
  border-left: 1px solid var(--border);
}

.map-zoom button:hover {
  background: var(--wash-strong);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 12px 6px 4px;
}

.legend-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.legend-title {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
}

.legend-bins {
  display: flex;
  align-items: flex-start;
}

.legend-bin {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 48px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.2;
  text-align: center;
}

.legend-bin span:first-child {
  display: block;
  height: 10px;
  margin-inline: 1px;
  border-radius: 2px;
  background: var(--c);
}

.legend-sizes svg {
  display: block;
  overflow: visible;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--ink-2);
  font-size: 12px;
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-card {
  max-height: 760px;
  overflow-y: auto;
}

.detail-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.detail-sub {
  margin: 2px 0 12px;
  color: var(--ink-2);
  font-size: 13px;
}

.detail-big {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin: 10px 0 12px;
}

.detail-big div {
  display: flex;
  flex-direction: column;
}

.detail-big strong {
  font-size: 22px;
  font-weight: 650;
  line-height: 1.15;
}

.detail-big span {
  color: var(--ink-2);
  font-size: 12px;
}

.detail-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  border-bottom: 1px solid var(--grid);
}

.detail-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  width: 100%;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.detail-list button:hover {
  background: var(--wash);
}

.detail-list .dl-name {
  overflow: hidden;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-list .dl-value {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.detail-list .dl-sub {
  color: var(--muted);
  font-size: 12px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-bars {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 8px;
  margin: 6px 0 4px;
  font-size: 12.5px;
}

.mini-bars .mb-track {
  height: 8px;
  border-radius: 4px;
  background: var(--wash-strong);
  overflow: hidden;
}

.mini-bars .mb-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--c, var(--s1));
}

.mini-bars .mb-label {
  color: var(--ink-2);
}

.mini-bars .mb-value {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.spec-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
}

.spec-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  padding: 7px 8px;
  border-radius: 9px;
  cursor: pointer;
}

.spec-option:hover {
  background: var(--wash);
}

.spec-option.is-checked {
  background: var(--accent-wash);
}

.spec-option input {
  margin: 0;
  accent-color: var(--accent);
}

.spec-name {
  font-size: 13.5px;
  line-height: 1.3;
}

.spec-meta {
  grid-column: 2;
  color: var(--muted);
  font-size: 11.5px;
}

.spec-value {
  grid-row: 1 / span 2;
  grid-column: 3;
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.spec-gauge {
  grid-column: 2 / span 2;
  position: relative;
  height: 5px;
  margin-top: 3px;
  border-radius: 3px;
  background: var(--wash-strong);
}

.spec-gauge i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
  background: var(--s1);
}

.spec-gauge b {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 1px;
  background: var(--ink);
}

.synthesis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.synth-card {
  padding: 14px 14px 10px;
}

.synth-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.synth-letter {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.synth-readout {
  min-height: 20px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.synth-card .select {
  width: 100%;
  min-height: 30px;
  margin: 6px 0 2px;
  font-size: 13px;
}

.synth-summary {
  margin-top: 16px;
}

.dir {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.dir i {
  font-style: normal;
  font-size: 10px;
}

.tools-grid {
  align-items: start;
}

.tool-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.tool-card > p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin-bottom: 14px;
}

.form-grid .control.full {
  grid-column: 1 / -1;
}

.form-grid .select,
.form-grid .text-input {
  width: 100%;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.range-value {
  min-width: 2ch;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.result {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 26px;
  margin: 4px 0 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--wash);
}

.result-main {
  display: flex;
  flex-direction: column;
}

.result-main strong {
  font-size: 2.2rem;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.result-main span,
.result-side span {
  color: var(--ink-2);
  font-size: 13px;
}

.result-side {
  display: flex;
  flex-direction: column;
}

.result-side strong {
  font-size: 1.1rem;
  font-weight: 650;
}

.tool-sub {
  margin: 14px 0 4px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-chart svg {
  display: block;
  overflow: visible;
}

.kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 4px 14px;
  margin: 8px 0 0;
  font-size: 13px;
}

.kv .kv-head {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kv .kv-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kv .kv-label {
  color: var(--ink-2);
}

.prose h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.prose h4 {
  margin: 16px 0 4px;
  font-size: 14px;
}

.prose p,
.prose li {
  color: var(--ink-2);
  font-size: 14px;
}

.prose p {
  margin: 0 0 10px;
}

.prose ul {
  margin: 0;
  padding-left: 18px;
}

.prose li {
  margin-bottom: 6px;
}

.loading {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--muted);
  font-size: 13px;
}

.error-box {
  padding: 12px 14px;
  border: 1px solid var(--div-pos);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lifecycle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 22px;
  }

  /* the row wraps below this width, so a line across it would join steps that are no longer side by side */
  .lifecycle::before,
  .lifecycle.reveal-ready::after {
    display: none;
  }

  .map-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-card {
    max-height: none;
  }

  .synthesis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .grid-2,
  .grid-2.wide-left,
  .grid-2.wide-right,
  .grid-3,
  .synthesis-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-row {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-block: 8px;
  }

  .stage-nav {
    margin-left: 0;
    width: 100%;
    padding-bottom: 2px;
  }

  .band {
    padding-block: 44px;
  }

  .chart-head {
    flex-direction: column;
  }

  .chart-tools {
    justify-content: flex-start;
    max-width: 100%;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .wrap {
    padding-inline: 16px;
  }

  .stat-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .lifecycle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search {
    min-width: 0;
    width: 100%;
  }

  .controls {
    gap: 10px 14px;
  }

  .card {
    padding: 14px 12px 12px;
  }

  .synth-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .legend-swatch,
  .chip-dot,
  .tt-key {
    forced-color-adjust: none;
  }
}

.map-focus-ring.is-hover {
  stroke: var(--ink-2);
  stroke-width: 1.5;
}

.synth-card .chart-sub {
  min-height: 34px;
  margin: 6px 0 2px;
}

.grid-2,
.grid-3 {
  align-items: start;
}

.fig-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: 1px;
  white-space: nowrap;
}

.grow-y,
.grow-down,
.grow-x,
.grow-left,
.pop {
  transform-box: fill-box;
}

.grow-y {
  transform-origin: 50% 100%;
}

.grow-down {
  transform-origin: 50% 0%;
}

.grow-x {
  transform-origin: 0% 50%;
}

.grow-left {
  transform-origin: 100% 50%;
}

.pop {
  transform-origin: 50% 50%;
}

.tool-card > p.chart-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.legend-scale {
  position: relative;
  padding-bottom: 16px;
}

.legend-swatches {
  display: flex;
  gap: 2px;
}

.legend-swatches span {
  width: 36px;
  height: 10px;
  border-radius: 2px;
  background: var(--c);
}

.legend-edges span {
  position: absolute;
  top: 14px;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

.legend-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.play-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

.play-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #ffffff;
}

.report-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.report-control .control-label {
  margin-right: 2px;
}

.map-year {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  pointer-events: none;
}

.map-year strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.synth-body {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.synth-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  min-height: 18px;
  margin: 4px 0 2px;
  color: var(--ink-2);
  font-size: 11.5px;
}

.synth-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.synth-change {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.step {
  opacity: 1;
}

.reveal-ready .step {
  opacity: 0;
  transform: translateY(10px);
}

.reveal-ready.is-revealed .step {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-ready.is-revealed .step:nth-child(2) { transition-delay: 0.08s; }
.reveal-ready.is-revealed .step:nth-child(3) { transition-delay: 0.16s; }
.reveal-ready.is-revealed .step:nth-child(4) { transition-delay: 0.24s; }
.reveal-ready.is-revealed .step:nth-child(5) { transition-delay: 0.32s; }
.reveal-ready.is-revealed .step:nth-child(6) { transition-delay: 0.4s; }

/* the coloured progress line covers the same span as the track and grows from the first dot */
.lifecycle.reveal-ready::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 18px;
  right: calc((100% - 50px) / 6 - 18px);
  height: 2px;
  background: linear-gradient(90deg, var(--div-pos) 0%, var(--div-pos) 72%, var(--div-neg) 86%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.4s cubic-bezier(.2, .75, .25, 1) 0.2s;
}

.lifecycle.reveal-ready.is-revealed::after {
  transform: scaleX(1);
}

.stat {
  animation: none;
}

.stat-row.reveal-ready .stat {
  opacity: 0;
  transform: translateY(12px);
}

.stat-row.reveal-ready.is-revealed .stat {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.15s;
}

.stat-row.reveal-ready.is-revealed .stat:nth-child(2) { transition-delay: 0.06s; }
.stat-row.reveal-ready.is-revealed .stat:nth-child(3) { transition-delay: 0.12s; }
.stat-row.reveal-ready.is-revealed .stat:nth-child(4) { transition-delay: 0.18s; }
.stat-row.reveal-ready.is-revealed .stat:nth-child(5) { transition-delay: 0.24s; }
.stat-row.reveal-ready.is-revealed .stat:nth-child(6) { transition-delay: 0.3s; }

@media (max-width: 1080px) {
  .lifecycle.reveal-ready::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready .step,
  .stat-row.reveal-ready .stat {
    opacity: 1 !important;
    transform: none !important;
  }
}
.map-states { margin-top: 16px !important; }
