:root {
  color-scheme: light;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 56px;
  --page: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --panel: rgba(255, 255, 255, 0.92);
  --ink: #111111;
  --ink-2: #333333;
  --muted: #666666;
  --faint: #8a8a85;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.15);
  --pill: #f1f1f1;
  --accent: #7a2cff;
  --accent-soft: rgba(122, 44, 255, 0.09);
  --btn: #111111;
  --btn-ink: #ffffff;
  --btn-2: #444444;
  --btn-2-ink: #ffffff;
  --tip: #111111;
  --tip-ink: #ffffff;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.05);
  --radius: 10px;
  --radius-sm: 8px;
  --grid: #e6e5e0;
  --axis: #c3c2b7;
  --series-1: #7a2cff;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #2a78d6;
  --series-8: #e34948;
  --sev-0: #d6d5cf;
  --sev-1: #acaba7;
  --sev-2: #fa8f7e;
  --sev-3: #f05846;
  --sev-4: #c52d1f;
  --sev-5: #740f07;
  --seq-1: #eeecfe;
  --seq-2: #dad5fd;
  --seq-3: #c3bafc;
  --seq-4: #ab9afb;
  --seq-5: #9478fa;
  --seq-6: #7e49f8;
  --seq-7: #6817df;
  --seq-8: #500faf;
  --seq-9: #390782;
  --map-boundary: #4d4d49;
  --map-city: #77766f;
  --map-place: #1c5cab;
  --map-ring: #ffffff;
  --tiles: none;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #0f0f0e;
  --surface: #1a1a19;
  --surface-2: #222220;
  --panel: rgba(26, 26, 25, 0.92);
  --ink: #f0efec;
  --ink-2: #d9d8d2;
  --muted: #a8a7a0;
  --faint: #807f79;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.2);
  --pill: #2b2b29;
  --accent: #977bfd;
  --accent-soft: rgba(151, 123, 253, 0.16);
  --btn: #f0efec;
  --btn-ink: #111111;
  --btn-2: #3b3b38;
  --btn-2-ink: #f0efec;
  --tip: #f0efec;
  --tip-ink: #111111;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
  --grid: #2c2c2a;
  --axis: #45453f;
  --series-1: #977bfd;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #0ca30c;
  --series-7: #3987e5;
  --series-8: #e66767;
  --sev-0: #4a4945;
  --sev-1: #72716c;
  --sev-2: #a21b0f;
  --sev-3: #cc3526;
  --sev-4: #f75f4c;
  --sev-5: #fbb2a6;
  --seq-1: #340677;
  --seq-2: #4a0da4;
  --seq-3: #6215d3;
  --seq-4: #773bf1;
  --seq-5: #8a65f9;
  --seq-6: #9f89fa;
  --seq-7: #b7aafc;
  --seq-8: #d0cafd;
  --seq-9: #e7e4fe;
  --map-boundary: #c9c8c1;
  --map-city: #8f8e88;
  --map-place: #6da7ec;
  --map-ring: #0f0f0e;
  --tiles: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9)
    saturate(0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
  display: block;
}

main:focus {
  outline: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem);
}

h2 {
  font-size: clamp(1.35rem, 1.12rem + 0.9vw, 1.75rem);
}

h3 {
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: 0;
}

h4 {
  font-size: 0.95rem;
  line-height: 1.35;
  letter-spacing: 0;
}

p,
ul,
ol,
dl,
figure,
table {
  margin: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong {
  font-weight: 700;
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 3000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--btn);
  color: var(--btn-ink);
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus {
  top: 10px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.wrap--narrow {
  max-width: 800px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.8125rem;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  font-size: 1.14rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  background: var(--btn);
  color: var(--btn-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.05s ease,
    opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: translateY(1px);
}

.btn--ghost {
  background: var(--btn-2);
  color: var(--btn-2-ink);
}

.btn--accent {
  background: var(--accent);
  color: #ffffff;
}

html[data-theme="dark"] .btn--accent {
  color: #111111;
}

.btn--quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.btn--quiet:hover {
  background: var(--pill);
  opacity: 1;
}

.btn--small {
  padding: 6px 10px;
  font-size: 12px;
}

.btn--large {
  padding: 12px 18px;
  font-size: 15px;
}

.btn[aria-pressed="true"] {
  background: var(--btn-2);
  color: var(--btn-2-ink);
}

.linkish {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
}

.linkish:hover {
  text-decoration-thickness: 2px;
}

.linkish:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.row label {
  font-size: 12px;
  color: var(--ink-2);
}

.row input[type="range"] {
  flex: 1 1 140px;
  min-width: 100px;
  accent-color: var(--accent);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.select {
  appearance: none;
  padding: 6px 26px 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 55%,
    calc(100% - 9px) 55%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  font-size: 13px;
  line-height: 1.3;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--pill);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent;
  transition: background 0.12s ease;
}

.chip:hover {
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.chip[aria-pressed="true"] {
  background: var(--btn);
  color: var(--btn-ink);
}

.chip__count {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.tag {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 4px 6px 4px 10px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}

.tag__label {
  color: var(--muted);
}

.tag__text {
  font-weight: 600;
}

.tag__x {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--line-2);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.tag:hover .tag__x {
  background: var(--btn);
  color: var(--btn-ink);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.segmented__item {
  appearance: none;
  border: 0;
  border-radius: 6px;
  padding: 5px 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.segmented__item:hover {
  background: var(--pill);
}

.segmented__item[aria-pressed="true"] {
  background: var(--btn);
  color: var(--btn-ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--header-h);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-decoration: none;
}

.brand__mark {
  flex: none;
  width: 28px;
  height: 28px;
}

.brand__name span {
  white-space: nowrap;
}

.site-nav__list,
.site-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a,
.site-nav summary {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav summary:hover {
  background: var(--pill);
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.site-nav summary {
  list-style: none;
  cursor: pointer;
  padding-right: 24px;
  position: relative;
}

.site-nav summary::-webkit-details-marker {
  display: none;
}

.site-nav summary::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.site-nav details[open] summary::after {
  margin-top: -1px;
  transform: rotate(225deg);
}

.site-nav details.is-current > summary {
  color: var(--ink);
  font-weight: 700;
}

.site-nav__group {
  position: relative;
}

.site-nav__sub {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 250px;
  padding: 6px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.site-nav__sub a {
  white-space: normal;
}

.site-nav__sub a[aria-current="page"] {
  box-shadow: inset 2px 0 0 var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nav-toggle,
.theme-toggle {
  appearance: none;
  display: inline-grid;
  place-items: center;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--pill);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  padding: 0 12px;
}

.theme-toggle {
  width: 34px;
  padding: 0;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle .theme-toggle__moon,
html[data-theme="dark"] .theme-toggle .theme-toggle__sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-toggle__moon {
  display: block;
}

.site-footer {
  margin-top: 72px;
  padding: 44px 0 28px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  color: var(--ink-2);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.site-footer h2 {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer__brand p {
  margin-top: 10px;
  max-width: 40ch;
  color: var(--muted);
}

.site-footer__legal {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.site-footer__legal a {
  color: var(--muted);
  text-decoration: underline;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--faint);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.page-head {
  padding-top: 34px;
  padding-bottom: 22px;
}

.page-head h1 {
  margin-top: 12px;
  max-width: 22ch;
}

.page-head .lede {
  margin-top: 14px;
  max-width: 62ch;
}

.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.section {
  padding: 44px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section__head {
  display: grid;
  gap: 10px;
  max-width: 68ch;
  margin-bottom: 24px;
}

.prose {
  display: grid;
  gap: 16px;
  max-width: 68ch;
}

.prose h2 {
  margin-top: 22px;
}

.prose h3 {
  margin-top: 10px;
}

.prose ul:not([class]),
.prose ol:not([class]) {
  padding-left: 1.25em;
  display: grid;
  gap: 8px;
}

.prose li::marker {
  color: var(--faint);
}

.prose > :first-child {
  margin-top: 0;
}

.note {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  font-size: 0.95rem;
  color: var(--ink-2);
}

.note strong {
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat__label {
  font-size: 12.5px;
  color: var(--muted);
}

.stat__value {
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.stat__note {
  font-size: 12px;
  color: var(--muted);
}

.stat .spark {
  margin-top: 4px;
}

.spark__line {
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.spark__dot {
  fill: var(--accent);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
}

.card {
  display: grid;
  gap: 8px;
  align-content: start;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

a.card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.card__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.card__title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
}

.card__text {
  font-size: 0.93rem;
  color: var(--ink-2);
}

.card__more {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.atlas-map {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 300px;
  background: var(--surface-2);
  container-type: inline-size;
}

.atlas-map__stage {
  position: absolute;
  inset: 0;
}

.atlas-map__fallback,
.atlas-map noscript p {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.atlas-map__bar {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 820;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.atlas-map__layers {
  position: relative;
}

.atlas-map__layers summary {
  list-style: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.atlas-map__layers summary::-webkit-details-marker {
  display: none;
}

.atlas-map__layers[open] summary {
  background: var(--btn);
  color: var(--btn-ink);
}

.atlas-map__layers-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 8px;
  min-width: 170px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.atlas-map__legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 810;
  max-width: min(250px, calc(100% - 20px));
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-2);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.atlas-map__legend summary {
  position: relative;
  padding: 7px 28px 7px 11px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}

.atlas-map__legend summary::-webkit-details-marker {
  display: none;
}

.atlas-map__legend summary::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -1px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(225deg);
}

.atlas-map__legend[open] summary::after {
  margin-top: -5px;
  transform: rotate(45deg);
}

.atlas-map__legend-body {
  display: grid;
  gap: 6px;
  padding: 0 11px 10px;
}

.legend__title {
  font-weight: 700;
  color: var(--ink);
}

.legend__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

.legend__swatch {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend__swatch.is-dot {
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-2);
}

.legend__swatch.is-line {
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.legend__swatch.is-hatch {
  width: 14px;
  background: repeating-linear-gradient(
    135deg,
    var(--map-city) 0 1.5px,
    transparent 1.5px 4px
  );
  box-shadow: 0 0 0 1px var(--map-city);
}

.legend__swatch.is-outline {
  width: 14px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--map-place);
}

.legend__ramp {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.legend__ramp--chart {
  margin-top: 10px;
}

.legend__gradient {
  flex: 0 1 120px;
  min-width: 70px;
  height: 8px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--line);
}

.legend__note {
  font-size: 11px;
  color: var(--muted);
  white-space: normal;
}

.legend__extra {
  display: grid;
  gap: 2px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.atlas-map__status {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 810;
  max-width: calc(100% - 20px);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-2);
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.atlas-map__status strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.atlas-map__status-note {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--line-2);
  color: var(--muted);
}

@container (max-width: 640px) {
  .atlas-map__status {
    top: 52px;
    left: 10px;
    transform: none;
    white-space: normal;
    border-radius: var(--radius-sm);
  }

  .atlas-map__status-note {
    display: block;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

.atlas-map__hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 830;
  max-width: 80%;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--tip);
  color: var(--tip-ink);
  font-size: 13px;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.atlas-map.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 2000;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
}

html.has-expanded-map {
  overflow: hidden;
}

.atlas-canvas {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.atlas-place-label {
  display: grid;
  place-items: center;
  color: var(--map-place);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 0 2px var(--surface),
    0 0 2px var(--surface),
    0 0 3px var(--surface),
    0 0 4px var(--surface);
  pointer-events: none;
}

.leaflet-container {
  font-family: var(--font);
  font-size: 12px;
  background: var(--surface-2);
  color: var(--ink);
}

.leaflet-tile-pane {
  filter: var(--tiles);
}

.leaflet-container a {
  color: var(--ink-2);
}

.leaflet-bar {
  border: 0 !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-soft) !important;
  overflow: hidden;
}

.leaflet-bar a,
.leaflet-bar a:hover,
.atlas-tools__button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0 !important;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  text-indent: 0;
}

.leaflet-bar a:last-child,
.atlas-tools__button:last-child {
  border-bottom: 0;
}

.leaflet-bar a:hover,
.atlas-tools__button:hover {
  background: var(--pill);
}

.leaflet-bar a.leaflet-disabled {
  background: var(--surface);
  color: var(--faint);
}

.atlas-tools__button {
  appearance: none;
  padding: 0;
  cursor: pointer;
}

.atlas-tools__button[aria-pressed="true"] {
  background: var(--btn);
  color: var(--btn-ink);
}

.leaflet-control-attribution {
  padding: 2px 8px !important;
  border-radius: 6px 0 0 0;
  background: var(--panel) !important;
  color: var(--muted) !important;
  font-size: 11px;
  line-height: 1.5;
}

.leaflet-control-attribution a {
  color: var(--ink-2) !important;
}

.leaflet-control-scale-line {
  border-color: var(--muted) !important;
  background: var(--panel) !important;
  color: var(--ink-2) !important;
  text-shadow: none !important;
  font-size: 10px !important;
}

.atlas-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.atlas-popup .leaflet-popup-content {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.atlas-popup .leaflet-popup-tip {
  background: var(--surface);
  box-shadow: none;
}

.popup {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 420px);
  padding: 12px 14px 14px;
  overflow: auto;
}

.popup__close {
  appearance: none;
  justify-self: end;
  margin: -4px -6px -6px 0;
  border: 0;
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--pill);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
}

.popup__close:hover {
  background: var(--btn);
  color: var(--btn-ink);
}

.popup__title {
  font-size: 14px;
  line-height: 1.3;
}

.popup__mix {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.popup__list {
  display: grid;
  gap: 6px;
}

.record {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.record__head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  font-size: 12.5px;
  list-style: none;
  cursor: pointer;
}

.record__head::-webkit-details-marker {
  display: none;
}

.record__when {
  font-weight: 700;
  white-space: nowrap;
}

.record__what {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record__facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  padding: 4px 9px 10px;
  font-size: 12.5px;
}

.record__facts dt {
  color: var(--muted);
}

.record__facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.viz-tip {
  position: fixed;
  z-index: 3000;
  display: grid;
  gap: 2px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--tip);
  color: var(--tip-ink);
  font-size: 12px;
  line-height: 1.4;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.viz-tip__title {
  font-weight: 700;
  opacity: 0.8;
}

.viz-tip__row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.viz-tip__row strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.viz-tip__row span:last-child {
  opacity: 0.82;
}

.viz-tip__key {
  flex: none;
  align-self: center;
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.viz-tip__note {
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.66;
}

.chart {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}

.chart figcaption {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 4px 12px;
}

.chart__title {
  font-size: 1rem;
  line-height: 1.3;
}

.chart__sub {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 13px;
  color: var(--muted);
}

.chart__toggle {
  appearance: none;
  grid-column: 2;
  grid-row: 1;
  border: 0;
  border-radius: 6px;
  padding: 4px 9px;
  background: var(--pill);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.chart__toggle:hover {
  background: var(--btn);
  color: var(--btn-ink);
}

.chart__body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.chart__plot {
  min-width: 0;
}

.chart__plot .viz {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart__table {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.chart__note {
  font-size: 12.5px;
  color: var(--muted);
}

.viz__grid {
  stroke: var(--grid);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.viz__axis {
  stroke: var(--axis);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.viz__tick {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.viz__label {
  fill: var(--ink-2);
  font-size: 12px;
}

.viz__hit {
  fill: transparent;
  outline: none;
}

.viz__hit:hover {
  fill: var(--accent-soft);
}

.viz__hit:focus-visible {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 2;
}

.viz__column.is-dimmed path {
  opacity: 0.26;
}

.viz__column.is-partial path {
  opacity: 0.42;
}

.viz__line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.viz__line.is-partial {
  stroke-dasharray: 2 5;
}

.viz__dot {
  stroke-width: 2;
}

.viz__cross {
  stroke: var(--axis);
  stroke-width: 1;
  pointer-events: none;
}

.viz__cell {
  outline: none;
}

.viz__cell.is-dimmed {
  opacity: 0.28;
}

.viz__cell:hover,
.viz__cell:focus-visible {
  stroke: var(--ink);
  stroke-width: 2;
}

.bars {
  display: grid;
  gap: 2px;
  list-style: none;
  padding: 0;
  container-type: inline-size;
}

.bars__row {
  display: grid;
  grid-template-columns: minmax(110px, 36%) minmax(0, 1fr) minmax(52px, auto);
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.35;
  outline-offset: 0;
}

.bars__row[role="button"]:hover {
  background: var(--accent-soft);
}

.bars__label {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.bars__track {
  position: relative;
  display: block;
  height: 12px;
}

.bars__fill {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--series-1);
}

.bars__value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bars__row.is-selected .bars__label {
  color: var(--ink);
  font-weight: 700;
}

.bars__row.is-dimmed .bars__fill {
  opacity: 0.26;
}

.bars__mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--ink);
}

.bars__key {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.bars__mark--key {
  position: static;
  width: 2px;
  height: 14px;
  margin: 0;
}

.chart__plot > .btn {
  margin-top: 10px;
}

@container (max-width: 400px) {
  .bars__row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
  }

  .bars__label {
    grid-column: 1;
  }

  .bars__value {
    grid-column: 2;
    grid-row: 1;
  }

  .bars__track {
    grid-column: 1 / -1;
  }
}

.segbar {
  display: flex;
  gap: 2px;
  height: 28px;
}

.segbar__part {
  display: flex;
  align-items: center;
  min-width: 4px;
  flex-basis: 0;
  border-radius: 4px;
  overflow: visible;
  outline-offset: 2px;
}

.segbar__label {
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.4;
}

.data-table th,
.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 var(--line-2);
}

.data-table tbody th {
  font-weight: 600;
  color: var(--ink);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .is-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table--plain th[scope="row"] {
  width: 34%;
  color: var(--muted);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.table-scroll + .btn {
  margin-top: 10px;
}

.sortbtn {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sortbtn::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--line-2);
}

th[aria-sort="descending"] .sortbtn,
th[aria-sort="ascending"] .sortbtn {
  color: var(--ink);
}

th[aria-sort="descending"] .sortbtn::after {
  border-top-color: var(--accent);
}

th[aria-sort="ascending"] .sortbtn::after {
  border-top: 0;
  border-bottom: 5px solid var(--accent);
}

.ranked,
.records {
  display: grid;
  gap: 2px;
  list-style: none;
  padding: 0;
}

.ranked__row,
.records__row {
  appearance: none;
  display: grid;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
}

.ranked__row {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
}

.records__row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.ranked__row:hover,
.records__row:not(:disabled):hover {
  background: var(--accent-soft);
}

.records__row:disabled {
  cursor: default;
}

.ranked__rank {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pill);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ranked__main,
.records__main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ranked__name,
.records__where {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ranked__track {
  display: block;
  height: 6px;
}

.ranked__fill {
  display: block;
  height: 100%;
  border-radius: 0 3px 3px 0;
  background: var(--series-1);
}

.ranked__value {
  display: grid;
  justify-items: end;
  font-variant-numeric: tabular-nums;
}

.ranked__sub,
.records__meta {
  font-size: 12px;
  color: var(--muted);
}

.records__go {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.records__row:disabled .records__go {
  color: var(--faint);
  font-weight: 400;
}

.ranked + .muted,
.records + .muted {
  font-size: 13px;
}

.records ~ .btn {
  margin-top: 10px;
}

.search {
  position: relative;
}

.search__input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.3;
}

.search__input::placeholder {
  color: var(--faint);
}

.search__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 900;
  display: grid;
  gap: 2px;
  max-height: 320px;
  margin: 0;
  padding: 6px;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search__option {
  display: grid;
  gap: 1px;
  padding: 7px 9px;
  border-radius: 6px;
  cursor: pointer;
}

.search__option:hover,
.search__option.is-active {
  background: var(--accent-soft);
}

.search__name {
  font-size: 13.5px;
  font-weight: 600;
}

.search__meta {
  font-size: 12px;
  color: var(--muted);
}

.yearrange {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.yearrange__custom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.filtersum__count {
  font-size: 13.5px;
  color: var(--ink-2);
}

.filtersum__count strong {
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.filtersum__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.hero {
  position: relative;
  height: calc(100vh - var(--header-h));
  min-height: 640px;
  max-height: 940px;
  border-bottom: 1px solid var(--line);
}

.hero__map {
  position: absolute;
  inset: 0;
}

.hero__panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 840;
  display: grid;
  gap: 12px;
  width: min(400px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 18px 18px 16px;
  overflow: auto;
}

.hero__panel h1 {
  font-size: clamp(1.55rem, 1.2rem + 1.1vw, 2rem);
  line-height: 1.12;
}

.hero__panel .lede {
  font-size: 0.98rem;
  line-height: 1.5;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.hero__stats div {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--pill);
}

.hero__stats dt {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.hero__stats dd {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero__controls {
  display: grid;
  gap: 2px;
  font-size: 12px;
}

.hero__controls .row {
  margin: 4px 0;
}

.hero__controls .row label {
  flex: 0 0 44px;
}

.hero__scope {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 45%);
  grid-template-areas:
    "head console"
    "text console";
  grid-template-rows: auto 1fr;
  column-gap: 36px;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.story__head {
  grid-area: head;
  padding: 30px 0 26px;
}

.story__head h1 {
  margin-top: 12px;
  max-width: 24ch;
}

.story__head .lede {
  margin-top: 14px;
  max-width: 60ch;
}

.story__text {
  grid-area: text;
  display: grid;
  gap: 40px;
  min-width: 0;
  padding-bottom: 20px;
}

.story__section {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.story__section > p,
.story__section > ul,
.story__section > ol,
.story__section > h2,
.story__section > h3 {
  max-width: 66ch;
}

.story__section > ul:not([class]),
.story__section > ol:not([class]) {
  padding-left: 1.25em;
  display: grid;
  gap: 8px;
}

.story__section .cards {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.story__console {
  grid-area: console;
  position: sticky;
  top: calc(var(--header-h) + 12px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: calc(100vh - var(--header-h) - 24px);
  min-height: 480px;
  margin-top: 12px;
}

.console {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.console__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.console__label {
  flex: 0 0 auto;
  min-width: 52px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.story__map {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.keyfacts {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.keyfacts li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.keyfacts strong {
  min-width: 4.2ch;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.keyfacts span {
  font-size: 0.95rem;
  color: var(--ink-2);
}

.related {
  display: grid;
  gap: 14px;
}

.banner-map {
  height: clamp(280px, 42vh, 420px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.banner-map + .banner-caption,
.banner-caption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 48px;
  align-items: start;
}

.doc__body {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 72ch;
}

.doc__body h2 {
  margin-top: 26px;
}

.doc__body h3 {
  margin-top: 10px;
}

.doc__body ul:not([class]),
.doc__body ol:not([class]) {
  padding-left: 1.25em;
  display: grid;
  gap: 8px;
}

.doc__body > :first-child {
  margin-top: 0;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13.5px;
}

.toc h2 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.faq {
  display: grid;
  gap: 8px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.faq summary {
  position: relative;
  padding: 14px 44px 14px 16px;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(225deg);
}

.faq__answer {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  color: var(--ink-2);
}

.steps {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px 16px 14px 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-ink);
  font-size: 13px;
  font-weight: 700;
}

.sources {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.sources li {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.95rem;
}

.sources span {
  font-size: 13px;
  color: var(--muted);
}

.explorer {
  position: relative;
  height: calc(100vh - var(--header-h));
  min-height: 560px;
}

.explorer__map {
  position: absolute;
  inset: 0;
}

.explorer__side {
  position: absolute;
  top: 12px;
  bottom: 12px;
  z-index: 840;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(360px, calc(100% - 24px));
  padding: 0;
  overflow: hidden;
}

.explorer__side--filters {
  left: 12px;
}

.explorer__side--insight {
  right: 56px;
}

.explorer__side.is-collapsed {
  bottom: auto;
}

.explorer__side.is-collapsed .explorer__scroll {
  display: none;
}

.explorer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.explorer__side.is-collapsed .explorer__head {
  border-bottom: 0;
}

.explorer__head h1,
.explorer__head h2 {
  margin-right: auto;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0;
}

.explorer__scroll {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 12px 14px 16px;
  overflow: auto;
  overscroll-behavior: contain;
}

.explorer__block {
  display: grid;
  gap: 8px;
}

.explorer__block h2,
.explorer__block h3 {
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.explorer__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.explorer__stats div {
  display: grid;
  gap: 1px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--pill);
}

.explorer__stats dt {
  font-size: 11px;
  color: var(--muted);
}

.explorer__stats dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.facet {
  border-top: 1px solid var(--line);
}

.facet summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px 10px 0;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

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

.facet summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -5px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}

.facet[open] summary::after {
  margin-top: -1px;
  transform: rotate(225deg);
}

.facet__badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

html[data-theme="dark"] .facet__badge {
  color: #111111;
}

.facet__body {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
}

.facet__list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facet__option {
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 5px 6px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
}

.facet__option:hover {
  background: var(--accent-soft);
}

.facet__box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}

.facet__option[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
}

.facet__option[aria-pressed="true"] .facet__box {
  background: var(--accent);
  box-shadow: none;
}

.facet__meter {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--series-1);
  opacity: 0.55;
}

.facet__count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.facet__option.is-empty {
  color: var(--faint);
}

.explorer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.explorer__toast {
  font-size: 12px;
  color: var(--muted);
  min-height: 1.4em;
}

.notfound {
  display: grid;
  gap: 16px;
  justify-items: start;
  padding: 44px 0 36px;
}

.notfound__code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.filelist {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.filelist li {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr;
  gap: 4px 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}

.filelist li:last-child {
  border-bottom: 0;
}

.filelist code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.filelist span {
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--pill);
}

.filelist code {
  padding: 0;
  background: none;
}

.sitemap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.sitemap section {
  display: grid;
  gap: 12px;
  align-content: start;
}

.sitemap h2 {
  font-size: 1.15rem;
}

.sitemap ul {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.sitemap li {
  display: grid;
  gap: 2px;
}

.sitemap a {
  font-weight: 600;
}

.sitemap span {
  font-size: 13.5px;
  color: var(--muted);
}

html.has-data-error [data-chart] .chart__body::before,
html.has-data-error .atlas-map:empty::before {
  content: "The collision data could not be loaded. Reload the page to try again.";
  display: block;
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1100px) {
  .story {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "console"
      "text";
    grid-template-rows: auto;
    row-gap: 4px;
  }

  .story__head {
    padding-bottom: 14px;
  }

  .story__console {
    position: static;
    height: auto;
    min-height: 0;
    margin: 0 0 26px;
    grid-template-rows: auto auto;
  }

  .story__map {
    height: clamp(340px, 62vh, 560px);
  }

  .doc {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .toc {
    position: static;
    order: -1;
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-grid;
  }

  .js .site-nav {
    display: none;
  }

  .site-header.is-open .site-nav,
  html:not(.js) .site-nav {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: calc(100vh - var(--header-h));
    padding: 10px 14px 18px;
    overflow: auto;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  html:not(.js) .site-nav {
    position: static;
    max-height: none;
    box-shadow: none;
  }

  html:not(.js) .site-header__inner {
    flex-wrap: wrap;
  }

  html:not(.js) .nav-toggle {
    display: none;
  }

  .site-nav__list {
    display: grid;
    gap: 2px;
  }

  .site-nav a,
  .site-nav summary {
    padding: 10px 12px;
    font-size: 15px;
    white-space: normal;
  }

  .site-nav__sub {
    position: static;
    min-width: 0;
    padding: 0 0 6px 12px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .explorer {
    height: auto;
    min-height: 0;
    display: grid;
    gap: 12px;
    padding-bottom: 12px;
  }

  .explorer__map {
    position: relative;
    inset: auto;
    height: 62vh;
    min-height: 380px;
  }

  .explorer__side {
    position: static;
    width: auto;
    margin: 0 12px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line);
  }

  .explorer__scroll {
    overflow: visible;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15.5px;
  }

  .wrap {
    padding: 0 16px;
  }

  .story {
    padding: 0 16px;
  }

  .site-header__inner {
    padding: 0 14px;
    gap: 8px;
  }

  .brand {
    font-size: 14px;
  }

  .hero {
    display: grid;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .hero__map {
    position: relative;
    inset: auto;
    height: 56vh;
    min-height: 340px;
    order: 2;
  }

  .hero__panel {
    position: static;
    width: auto;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--surface);
    padding: 22px 16px 18px;
  }

  .section {
    padding: 34px 0;
  }

  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .filelist li {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart {
    padding: 14px 14px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .story__console,
  .hero__map,
  .banner-map,
  .chart__toggle,
  .skip-link {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .story {
    display: block;
  }

  .chart {
    break-inside: avoid;
  }
}

.mark-tile {
  fill: var(--ink);
}

.mark-road {
  fill: none;
  stroke: var(--surface);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.mark-glow {
  fill: var(--accent);
  opacity: 0.4;
}

.mark-spot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 1.5;
}

.player {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.player__label {
  min-width: 9ch;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stack {
  display: grid;
  gap: 14px;
}

.narrow {
  max-width: 540px;
}

.facet__list--grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
}

.facet__list--grid[data-columns="7"] {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.facet__list--grid .facet__option {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: 5px 2px 7px;
  background: var(--pill);
  font-size: 11.5px;
  text-align: center;
}

.facet__list--grid .facet__option[aria-pressed="true"] {
  background: var(--btn);
  color: var(--btn-ink);
}

.facet__list--grid .facet__meter {
  opacity: 0.9;
}

.facet__name {
  overflow-wrap: anywhere;
}

.chart--bare {
  padding: 0;
  border: 0;
  background: transparent;
}

.chart--bare .chart__title {
  font-size: 13px;
}

.explorer__help {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

@media (min-width: 961px) {
  .explorer .atlas-map__legend {
    left: 384px;
    bottom: 12px;
  }

  .explorer__side--insight {
    bottom: 40px;
  }

  .explorer .leaflet-bottom.leaflet-right {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
  }

  .explorer .leaflet-bottom.leaflet-right .leaflet-control {
    float: none;
  }
}

[data-map] noscript p,
[data-overview-map] noscript p {
  margin: 0;
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

figure[data-chart="columns"] .chart__plot {
  min-height: 230px;
}

figure[data-chart="lines"] .chart__plot {
  min-height: 240px;
}

figure[data-chart="matrix"] .chart__plot {
  min-height: 186px;
}

figure[data-chart="split"] .chart__plot {
  min-height: 28px;
}

figure[data-chart][data-height="150"] .chart__plot {
  min-height: 150px;
}

[data-filter-summary] {
  min-height: 25px;
}

html:not(.js) .chart__toggle,
html:not(.js) .console,
html:not(.js) .hero__controls,
html:not(.js) .explorer__scroll,
html:not(.js) .explorer__side--insight,
html:not(.js) [data-search],
html:not(.js) [data-preset] {
  display: none;
}
