:root {
  --ink: #080808;
  --paper: #fff;
  --muted: #666;
  --line: #cfcfcf;
  --map: color-mix(in srgb, var(--ink) 6%, var(--paper));
  --map-missing: color-mix(in srgb, var(--ink) 18%, var(--paper));
  --map-1: color-mix(in srgb, var(--ink) 12%, var(--paper));
  --map-2: color-mix(in srgb, var(--ink) 30%, var(--paper));
  --map-3: color-mix(in srgb, var(--ink) 48%, var(--paper));
  --map-4: color-mix(in srgb, var(--ink) 68%, var(--paper));
  --map-5: color-mix(in srgb, var(--ink) 88%, var(--paper));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
a { color: inherit; text-underline-offset: .2em; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .8rem; z-index: 20; }

.masthead {
  min-height: 74px;
  display: flex;
  align-items: center;
  padding: 0 clamp(1.2rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  gap: 2.5rem;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.brand { font-weight: 900; letter-spacing: -.07em; font-size: 1.35rem; text-decoration: none; }
.masthead nav { display: flex; gap: 1.35rem; margin-left: auto; }
.masthead nav a { text-decoration: none; font-size: .78rem; font-weight: 750; }
.masthead nav a:hover, .masthead nav a:focus, .masthead nav a[aria-current="page"] { text-decoration: underline; }

.hero {
  min-height: 600px;
  padding: clamp(3rem, 6vw, 6rem) clamp(1.2rem, 7vw, 8rem) 2.5rem;
  background: var(--paper);
}
.eyebrow, .term, .status-tag {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .68rem;
  font-weight: 850;
}
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(4.4rem, 10vw, 9.5rem);
  line-height: .78;
  letter-spacing: -.065em;
  margin: 2rem 0;
}
.hero h1 em { color: var(--muted); font-weight: 400; }
.lede { font-family: Georgia, serif; font-size: clamp(1.2rem, 2.2vw, 1.85rem); max-width: 880px; line-height: 1.35; }
.hero-meta { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1000px; margin-top: 4rem; border-top: 1px solid var(--ink); }
.hero-meta div { padding: 1rem 1rem 0 0; }
.hero-meta strong, .hero-meta span { display: block; }
.hero-meta strong { font-size: 2rem; }
.hero-meta span { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.status-banner { padding: 1rem 7vw; background: var(--ink); color: var(--paper); font-weight: 700; }

.panel { padding: clamp(3rem, 6vw, 6rem) clamp(1.2rem, 7vw, 8rem); border-top: 1px solid var(--line); background: var(--paper); scroll-margin-top: 74px; }
.section-heading { display: grid; grid-template-columns: 1fr; align-items: end; gap: 2rem; margin-bottom: 2.25rem; }
.section-heading > div { display: flex; align-items: baseline; gap: 1.5rem; }
.number { font-size: .72rem; font-weight: 850; color: var(--muted); }
h2 { font-family: Georgia, serif; font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 400; letter-spacing: -.045em; line-height: .95; margin: 0; }
.section-heading p, article p { line-height: 1.6; color: var(--muted); margin: 0; }
h3 { margin: .7rem 0; }

.definition-grid, .research-grid {
  display: grid;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.definition-grid { grid-template-columns: repeat(3, 1fr); }
.definition-grid article, .research-grid article {
  padding: 1.5rem;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.research-grid h3 { font-family: Georgia, serif; font-size: 1.5rem; font-weight: 400; }
.source-line { color: var(--muted); font-size: .78rem; line-height: 1.5; margin: 1rem 0 0; }
.coverage-intro { margin: 0 0 1.5rem; }
.coverage-scope { display: block; margin-top: .25rem; }

.controls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.controls label { background: var(--paper); padding: .8rem 1rem; }
.controls select, .search-label input {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  margin-top: .45rem;
  color: var(--ink);
}
.metric-intro { margin: 0 0 1.25rem; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.metric-weights { display: block; margin-top: .2rem; }

.map-wrap { position: relative; background: var(--map); min-height: 420px; overflow: hidden; }
.map-wrap svg { display: block; width: 100%; height: auto; }
.country-shape { stroke: var(--paper); stroke-width: .5; vector-effect: non-scaling-stroke; transition: fill .2s, opacity .2s; cursor: pointer; }
.country-shape:hover, .country-shape:focus { stroke: var(--ink); stroke-width: 1.5; outline: none; }
.country-shape.selected { stroke: var(--ink); stroke-width: 2; }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); padding: .6rem .8rem; font-size: .78rem; box-shadow: 0 8px 30px #0003; }
.legend { position: absolute; bottom: 1rem; right: 1rem; display: flex; align-items: center; gap: .35rem; background: color-mix(in srgb, var(--paper) 90%, transparent); padding: .55rem; font-size: .62rem; text-transform: uppercase; }
.legend i { width: 20px; height: 9px; background: var(--map-1); }
.legend i:nth-of-type(2) { background: var(--map-2); }
.legend i:nth-of-type(3) { background: var(--map-3); }
.legend i:nth-of-type(4) { background: var(--map-4); }
.legend i:nth-of-type(5) { background: var(--map-5); }

.country-profile { border: 1px solid var(--line); min-height: 100px; }
.empty-state { padding: 2rem; color: var(--muted); }
.profile-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.25rem; padding: 1.15rem 2rem; align-items: center; }
.profile-metrics { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 1.1rem; align-items: start; }
.profile-head h3 { font-family: Georgia, serif; font-size: 2.6rem; font-weight: 400; margin: .15rem 0 0; }
.profile-identity small { display: block; white-space: nowrap; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.profile-stat strong, .profile-stat span { display: block; }
.profile-stat strong { font-size: 1.4rem; }
.profile-stat-primary strong { font-size: 1.9rem; }
.profile-stat span { font-size: .58rem; line-height: 1.25; text-transform: uppercase; font-weight: 750; margin-top: .2rem; }
.profile-label { padding: 1rem 1.3rem; border-top: 1px solid var(--line); }
.profile-label strong { display: block; }
.profile-gaps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.profile-gaps article { padding: 1.3rem; border-right: 1px solid var(--line); }
.profile-gaps article:last-child { border: 0; }
.profile-gaps b, .profile-gaps span, .gap-goal { display: block; }
.gap-goal { color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .06em; line-height: 1.3; margin-bottom: .55rem; text-transform: uppercase; }
.profile-gaps span { font-size: .78rem; color: var(--muted); margin-top: .5rem; line-height: 1.35; }
.all-series { border-top: 1px solid var(--ink); }
.all-series summary { cursor: pointer; padding: 1.2rem; font-weight: 800; }
.all-series table { min-width: 820px; }
.all-series th { color: var(--muted); }
.all-series th, .all-series td { border-color: var(--line); }
.all-series td:nth-child(2) { min-width: 330px; }
.all-series td strong, .all-series td small { display: block; }
.all-series td small { margin-top: .25rem; color: var(--muted); }
.all-series td:last-child { color: var(--ink); }

.dark-panel { background: var(--paper); color: var(--ink); }
.dark-panel .number, .inverse p, .dark-panel article p, .dark-panel .fine-print { color: var(--muted); }
.priority-summary { max-width: none; white-space: nowrap; margin: 0 0 1.75rem; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.weight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.weight-grid label { display: grid; grid-template-columns: 1fr auto; padding-top: .25rem; font-size: .74rem; }
.weight-grid output { color: var(--ink); margin-left: .5rem; }
.control-help { grid-column: 1 / -1; display: block; min-height: 2.2em; color: var(--muted); font-size: .72rem; text-transform: none; letter-spacing: 0; line-height: 1.3; margin-top: .35rem; }
input[type=range] { grid-column: 1 / -1; display: block; width: 100%; accent-color: var(--ink); margin-top: .6rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th { text-align: left; text-transform: uppercase; letter-spacing: .08em; font-size: .62rem; color: var(--muted); }
th, td { padding: 1rem .7rem; border-bottom: 1px solid var(--line); }
td:last-child { font-weight: 900; color: var(--ink); }
.fine-print { font-size: .72rem; line-height: 1.5; }

.search-label { display: block; max-width: 500px; border-bottom: 1px solid var(--ink); padding-bottom: .5rem; margin-bottom: 2rem; }
.series-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.series-card { padding: 1.3rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 260px; display: flex; flex-direction: column; }
.series-card .goal { font-size: .62rem; text-transform: uppercase; color: var(--muted); font-weight: 900; }
.series-card h3 { font-family: Georgia, serif; font-weight: 400; font-size: 1.12rem; margin: .8rem 0; }
.series-card p { font-size: .72rem; margin-bottom: 1rem; }
.coverage-bar { height: 7px; background: var(--paper); border: 1px solid var(--ink); margin-top: auto; }
.coverage-bar i { display: block; height: 100%; background: var(--ink); }
.coverage-label { font-size: .68rem; color: var(--muted); margin-top: .5rem; }
.breakdown-label { margin-top: .45rem; color: var(--muted); font-size: .64rem; line-height: 1.35; }
.series-card a { font-size: .7rem; margin-top: 1rem; }

.findings-intro { max-width: none; margin: -1rem 0 1.5rem; color: var(--muted); font-size: .86rem; line-height: 1.55; white-space: nowrap; }
.bar-chart { display: grid; gap: .85rem; margin-top: 1.5rem; }
.bar-row { display: grid; grid-template-columns: minmax(7.2rem, .8fr) minmax(8rem, 1.6fr) 3.5rem; gap: .8rem; align-items: center; font-size: .72rem; }
.bar-name { color: var(--muted); }
.bar-track { position: relative; height: 12px; border: 1px solid var(--ink); }
.bar-fill { display: block; height: 100%; background: var(--ink); }
.bar-interval { position: absolute; top: -4px; height: 18px; border-left: 2px solid var(--muted); border-right: 2px solid var(--muted); }
.bar-row > strong { text-align: right; }

.research-grid { grid-template-columns: repeat(3, 1fr); }
.research-grid article:first-child { background: var(--ink); color: var(--paper); }
.research-grid article:first-child p { color: color-mix(in srgb, var(--paper) 68%, var(--ink)); }
.sources { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.sources .term { grid-column: 1 / -1; padding: 1.2rem 0; }
.sources a { display: flex; justify-content: space-between; padding: 1rem; text-decoration: none; border: 1px solid var(--line); border-top: 0; }
.sources a:nth-of-type(even) { border-left: 0; }
.downloads { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 3rem; border-top: 1px solid; }
.downloads a { display: flex; justify-content: space-between; padding: 1rem 0; text-decoration: none; border-bottom: 1px solid; }
.downloads a:nth-child(odd) { margin-right: 2rem; }

footer { display: flex; gap: 2rem; align-items: center; padding: 2rem 7vw; background: var(--ink); color: var(--paper); font-size: .72rem; }
footer a { color: var(--paper); }
footer span:last-child { margin-left: auto; color: color-mix(in srgb, var(--paper) 68%, var(--ink)); }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f5f5f5;
    --paper: #050505;
    --muted: #a2a2a2;
    --line: #3b3b3b;
  }
}

@media (max-width: 1000px) {
  .masthead { gap: 1.5rem; }
  .masthead nav { gap: .8rem; }
  .profile-head { grid-template-columns: 1fr; gap: 1rem; }
  .weight-grid { grid-template-columns: repeat(2, 1fr); }
  .priority-summary { white-space: normal; }
  .findings-intro { white-space: normal; }
}

@media (max-width: 850px) {
  .masthead { flex-wrap: wrap; padding-top: .8rem; padding-bottom: .65rem; }
  .panel { scroll-margin-top: 112px; }
  .masthead nav { order: 3; width: 100%; overflow-x: auto; padding-top: .65rem; border-top: 1px solid var(--line); margin-left: 0; }
  .masthead nav a { white-space: nowrap; }
  .hero { min-height: 560px; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .section-heading, .controls, .weight-grid { grid-template-columns: 1fr; }
  .priority-summary { white-space: normal; }
  .definition-grid, .research-grid { grid-template-columns: 1fr; }
  .series-grid { grid-template-columns: 1fr 1fr; }
  .profile-head { grid-template-columns: 1fr; gap: 1rem; }
  .profile-gaps { grid-template-columns: 1fr; }
  .profile-gaps article { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .masthead { min-height: 62px; }
  .hero h1 { font-size: 12vw; }
  .hero-meta { margin-top: 3rem; }
  .series-grid, .sources, .downloads { grid-template-columns: 1fr; }
  .sources a:nth-of-type(even) { border-left: 1px solid var(--line); }
  .downloads a:nth-child(odd) { margin-right: 0; }
  .profile-head { grid-template-columns: 1fr; }
  .profile-identity small { white-space: normal; }
  .profile-metrics { grid-template-columns: repeat(2, 1fr); gap: .9rem 1rem; }
  .bar-row { grid-template-columns: minmax(6.5rem, .9fr) minmax(6rem, 1.4fr) 3rem; gap: .55rem; }
  .profile-stat-primary { grid-column: 1 / -1; }
  .map-wrap { min-height: 250px; }
  .legend { display: none; }
  footer { align-items: flex-start; flex-direction: column; }
  footer span:last-child { margin-left: 0; }
}


/* Multi-page research platform */
.page-hero {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.2rem, 7vw, 8rem) clamp(2.5rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  max-width: 1100px;
  margin: 1.1rem 0 1.25rem;
  font: 400 clamp(3.2rem, 7vw, 7rem)/.92 Georgia, "Times New Roman", serif;
  letter-spacing: -.055em;
}
.page-hero p { max-width: none; margin: .35rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.overview-hero { min-height: 570px; }
.catalogue-controls { display: grid; grid-template-columns: 2fr 1fr 1fr; border: 1px solid var(--ink); background: var(--ink); gap: 1px; }
.catalogue-controls label { padding: .8rem 1rem; background: var(--paper); }
.catalogue-controls input, .catalogue-controls select, .glossary-search input { display: block; width: 100%; margin-top: .45rem; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: .95rem; letter-spacing: 0; text-transform: none; }
.result-count { margin: 1rem 0; color: var(--muted); font-size: .78rem; }
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; }
.pagination button { border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: .75rem 1rem; font: inherit; font-weight: 750; cursor: pointer; }
.pagination button:hover:not(:disabled), .pagination button:focus { background: var(--ink); color: var(--paper); }
.pagination button:disabled { opacity: .35; cursor: default; }
.pagination span { color: var(--muted); font-size: .75rem; }
.method-grid, .component-grid, .snapshot-grid { display: grid; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.method-grid article, .component-grid article, .snapshot-grid article {
  padding: 1.4rem;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.method-link { margin: 1.2rem 0 0; font-size: .78rem; }
.method-summary { margin: 0 0 1.25rem; color: var(--muted); line-height: 1.55; }
.method-summary strong { color: var(--ink); }
.formula { padding: 1.5rem; background: var(--ink); color: var(--paper); }
.formula span, .formula strong { display: block; }
.formula span { font-size: .65rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.formula strong { margin-top: .7rem; font: 400 clamp(1rem, 1.9vw, 1.45rem)/1.25 Georgia, serif; white-space: nowrap; }
.component-grid { grid-template-columns: repeat(4, 1fr); }
.component-grid article > strong { font: 400 2.2rem/1 Georgia, serif; }
.component-grid h3, .method-grid h3 { margin: .8rem 0 .4rem; }
.component-grid p, .method-grid p { font-size: .78rem; }
.method-grid { grid-template-columns: repeat(2, 1fr); }
.method-grid article:last-child:nth-child(odd) { grid-column: 1 / -1; }
.glossary-search { display: block; max-width: 520px; margin-bottom: 1.5rem; border-bottom: 1px solid var(--ink); padding-bottom: .55rem; }
.glossary-list { border-top: 1px solid var(--line); }
.glossary-list article { display: grid; grid-template-columns: minmax(180px, .35fr) 1fr; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.glossary-list h3, .glossary-list p { margin: 0; }
.glossary-list h3 { font-size: .9rem; }
.glossary-list p { font-size: .8rem; }
.snapshot-grid { grid-template-columns: repeat(4, 1fr); }
.snapshot-grid strong, .snapshot-grid span { display: block; }
.snapshot-grid strong { font: 400 clamp(1.5rem, 3vw, 2.7rem)/1 Georgia, serif; text-transform: capitalize; }
.snapshot-grid span { margin-top: .65rem; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.link-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; gap: 1rem; min-height: 88px; padding: 1rem 1.2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; }
.link-list a:hover, .link-list a:focus { background: var(--ink); color: var(--paper); outline: 0; }
.link-list strong, .link-list small { display: block; }
.link-list small { margin-top: .35rem; color: var(--muted); line-height: 1.35; }
.link-list a:hover small, .link-list a:focus small { color: color-mix(in srgb, var(--paper) 68%, var(--ink)); }
.link-list b { white-space: nowrap; }
.priority-panel { background: var(--paper); }

@media (max-width: 1000px) {
  .component-grid, .snapshot-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 850px) {
  .catalogue-controls, .method-grid, .link-list { grid-template-columns: 1fr; }
  .overview-hero { min-height: 520px; }
}
@media (max-width: 520px) {
  .page-hero h1 { font-size: 12vw; }
  .glossary-list article { grid-template-columns: 1fr; gap: .4rem; }
}

@media (max-width: 700px) {
  .formula strong { white-space: normal; }
}

/* Data-first research graphics */
.research-viz {
  padding-top: clamp(2.5rem, 4vw, 4rem);
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
}
.research-viz .section-heading { margin-bottom: 1.5rem; }
.research-viz h3 {
  margin: 0 0 .35rem;
  font: 400 clamp(1.35rem, 2.2vw, 2rem)/1.15 Georgia, serif;
}
.research-viz article > p, .chart-intro {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}
.chart-controls {
  display: flex;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.chart-controls label {
  width: min(24rem, 100%);
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--ink);
}
.chart-controls select {
  width: 100%;
  margin-top: .35rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.chart-controls p { margin: 0 0 .5rem; color: var(--muted); font-size: .8rem; }
.chart-frame { width: 100%; overflow-x: auto; }
.chart-frame svg { display: block; width: 100%; min-width: 680px; height: auto; }
.chart-label, .chart-value, .axis-label {
  fill: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 12px;
}
.axis-label { fill: var(--muted); font-size: 10px; }
.axis-line, .axis-zero, .baseline { stroke: var(--line); stroke-width: 1; }
.axis-zero { stroke: var(--muted); stroke-dasharray: 3 4; }
.baseline { stroke: var(--ink); stroke-width: 1.5; }
.interval { stroke: var(--ink); stroke-width: 2; }
.estimate { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }
.country-dot { fill: var(--muted); opacity: .42; }
.rank-bar { fill: var(--ink); }
.influence-dot { fill: var(--muted); opacity: .75; }
.chart-data { border-top: 1px solid var(--line); margin-top: 1rem; }
.chart-data summary { cursor: pointer; padding: .8rem 0; font-size: .75rem; font-weight: 800; }
.chart-data table { min-width: 620px; }
.viz-stack { display: grid; gap: clamp(2.5rem, 5vw, 5rem); }
.viz-stack > article + article { padding-top: clamp(2rem, 4vw, 4rem); border-top: 1px solid var(--line); }

.matrix-wrap { overflow-x: auto; }
.heatmap { width: 100%; min-width: 680px; border-collapse: collapse; }
.heatmap th, .heatmap td { border: 1px solid var(--line); padding: .62rem .75rem; }
.heatmap thead th { font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.heatmap tbody th { min-width: 12rem; text-align: left; font-size: .72rem; }
.heatmap tbody th small { display: block; margin-top: .15rem; color: var(--muted); font-weight: 400; }
.heatmap td {
  min-width: 7rem;
  background: color-mix(in srgb, var(--ink) calc(var(--heat) * .72), var(--paper));
  color: var(--ink);
  text-align: right;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.heatmap td.high {
  color: var(--paper);
}
.breakdown-table { max-width: 760px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin: 0 0 1rem; font-size: .68rem; color: var(--muted); }
.chart-legend span { display: flex; align-items: center; gap: .35rem; }
.chart-legend i { width: 1rem; height: .6rem; border: 1px solid var(--line); }
.stack-chart { display: grid; gap: .8rem; }
.stack-row { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; align-items: center; font-size: .72rem; }
.stack-track { display: flex; height: 1.1rem; border: 1px solid var(--ink); overflow: hidden; }
.stack-track i { height: 100%; }
.status-0 { background: var(--ink); }
.status-1 { background: color-mix(in srgb, var(--ink) 72%, var(--paper)); }
.status-2 { background: color-mix(in srgb, var(--ink) 48%, var(--paper)); }
.status-3 { background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 2px, var(--muted) 2px, var(--muted) 4px); }
.status-4 { background: var(--paper); }

@media (max-width: 700px) {
  .chart-controls { display: block; }
  .chart-controls p { margin-top: .8rem; }
  .stack-row { grid-template-columns: 7.5rem 1fr; gap: .6rem; }
  .research-viz .section-heading { margin-bottom: 1rem; }
}

.indicator-list { border-top: 1px solid var(--ink); }
.indicator-row {
  display: grid;
  grid-template-columns: minmax(12rem, .32fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.indicator-row .goal { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.indicator-row > div:first-child strong { font: 400 1.5rem/1 Georgia, serif; }
.indicator-row h3 { margin: 0 0 .35rem; font-size: 1rem; }
.indicator-row p { font-size: .76rem; }
.indicator-row details { margin-top: .7rem; font-size: .72rem; }
.indicator-row summary { cursor: pointer; font-weight: 750; }
.indicator-row ul { margin: .65rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.indicator-row li + li { margin-top: .35rem; }
@media (max-width: 700px) {
  .indicator-row { grid-template-columns: 1fr; gap: .7rem; }
}

.country-series-tools {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.country-series-tools label { padding: .75rem 1rem; background: var(--paper); }
.country-series-tools input, .country-series-tools select {
  display: block;
  width: 100%;
  margin-top: .35rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .85rem;
  text-transform: none;
}
.all-series .result-count, .all-series .pagination { margin-left: 1rem; margin-right: 1rem; }
.all-series .pagination { margin-bottom: 1rem; }
@media (max-width: 700px) { .country-series-tools { grid-template-columns: 1fr; } }

.decomposition-chart > div { display: flex; min-width: 680px; height: 5rem; border: 1px solid var(--ink); }
.decomposition-chart i { position: relative; min-width: 2px; border-right: 1px solid var(--paper); }
.decomposition-chart i:last-child { border-right: 0; }
.decomposition-chart span { position: absolute; inset: 0; display: grid; place-content: center; padding: .4rem; color: var(--paper); font-size: .66rem; font-style: normal; text-align: center; }
.decomposition-chart b { display: block; margin-top: .15rem; font-size: .9rem; }
.variance-0 { background: color-mix(in srgb, var(--ink) 45%, var(--paper)); }
.variance-1 { background: var(--ink); }
.variance-2 { background: color-mix(in srgb, var(--ink) 70%, var(--paper)); }
.decomposition-chart ul { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin: .7rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .7rem; }
