:root {
  --ink: #112d2a;
  --muted: #61706b;
  --paper: #f3f4ee;
  --card: #fbfcf7;
  --line: #d8ded4;
  --lime: #c8f168;
  --lime-dark: #9ec63f;
  --coral: #ff745e;
  --teal: #2f756c;
  --blue: #5874e8;
  --gold: #e8b44f;
  --lavender: #a889d8;
  --shadow: 0 18px 60px rgba(22, 45, 41, 0.10);
  font-family: "DM Sans", 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; min-width: 320px; background: var(--paper); }
button, select, input { font: inherit; }
button, select { color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 244, 238, 0.92);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: Manrope, sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -0.03em; }
.brand small { font-size: 9px; letter-spacing: .12em; color: var(--muted); border: 1px solid var(--line); padding: 3px 5px; border-radius: 4px; }
.brand-mark { width: 25px; height: 25px; border-radius: 50%; border: 1.5px solid var(--ink); display: flex; align-items: end; justify-content: center; gap: 2px; padding-bottom: 5px; }
.brand-mark i { display: block; width: 3px; border-radius: 4px; background: var(--ink); }
.brand-mark i:nth-child(1) { height: 6px; } .brand-mark i:nth-child(2) { height: 11px; } .brand-mark i:nth-child(3) { height: 8px; }
.header-nav { justify-self: center; display: flex; align-items: center; gap: 4px; background: #e7eae2; padding: 4px; border-radius: 999px; }
.nav-link { border: 0; background: transparent; padding: 9px 14px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; }
.nav-link:hover, .nav-link.active { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(22,45,41,.06); }
.primary-button, .secondary-button { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 700; transition: .2s ease; }
.primary-button { justify-self: end; background: var(--ink); color: white; box-shadow: 0 6px 14px rgba(17,45,42,.18); }
.primary-button:hover { background: #1c4742; transform: translateY(-1px); }
.secondary-button { background: #e8ebe4; color: var(--ink); }

main { max-width: 1480px; margin: 0 auto; padding: 0 clamp(16px, 3.8vw, 56px) 60px; }
.intro { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: clamp(30px, 8vw, 120px); padding: clamp(52px, 8vw, 96px) 0 44px; align-items: end; }
.eyebrow, .kicker { margin: 0 0 16px; text-transform: uppercase; font-size: 11px; letter-spacing: .15em; font-weight: 800; color: var(--teal); }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 24px; height: 2px; background: var(--coral); display: inline-block; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { font: 800 clamp(40px, 5.6vw, 76px)/.99 Manrope, sans-serif; letter-spacing: -.065em; margin: 0; max-width: 990px; }
h1 em { color: var(--teal); font-style: normal; }
.intro-aside > p { color: var(--muted); font-size: 16px; line-height: 1.65; margin: 0 0 24px; }
.dataset-notice { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; }
.notice-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(232,180,79,.16); }
.dataset-notice div { display: flex; flex-direction: column; gap: 3px; }
.dataset-notice strong { font-size: 13px; } .dataset-notice small { color: var(--muted); }

.explorer-shell { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 22px; overflow: hidden; }
.track-strip { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); background: #ecefe7; }
.track-tab { min-height: 84px; padding: 16px 14px; border: 0; border-right: 1px solid var(--line); background: transparent; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; transition: .2s ease; }
.track-tab:last-child { border-right: 0; }
.track-tab:hover { background: rgba(255,255,255,.48); }
.track-tab.active { background: var(--card); box-shadow: inset 0 4px 0 var(--track-color, var(--lime-dark)); }
.track-number { font: 700 10px/1 Manrope, sans-serif; color: var(--track-color, var(--teal)); }
.track-name { font: 700 12px/1.25 Manrope, sans-serif; letter-spacing: -.02em; }

.control-deck { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; padding: 26px 30px 20px; }
.metric-control { display: grid; grid-template-columns: auto minmax(220px, 430px) auto; gap: 12px; align-items: center; }
.metric-control > label { font-size: 12px; color: var(--muted); font-weight: 600; }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; right: 0; top: 50%; transform: translateY(-52%); pointer-events: none; color: var(--teal); }
.metric-control select { width: 100%; appearance: none; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 7px 28px 7px 0; font: 700 22px/1.2 Manrope, sans-serif; letter-spacing: -.03em; outline: none; }
.info-button { border: 1px solid var(--line); background: transparent; border-radius: 50%; width: 28px; height: 28px; color: var(--muted); font: 700 12px Georgia, serif; }
.filter-row { display: flex; gap: 10px; }
.filter-control { border-left: 1px solid var(--line); padding-left: 16px; min-width: 140px; display: flex; flex-direction: column; gap: 4px; }
.filter-control span { color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 700; letter-spacing: .08em; }
.filter-control select { border: 0; padding: 0; background: transparent; font-size: 13px; font-weight: 700; outline: none; }
.selection-row { min-height: 58px; margin: 0 30px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.selection-label { font-size: 12px; color: var(--muted); white-space: nowrap; }.selection-label span { color: var(--ink); font-weight: 800; }
.country-chips { display: flex; gap: 7px; flex: 1; flex-wrap: wrap; }
.country-chip { display: flex; align-items: center; gap: 7px; background: #ecf0e8; border-radius: 999px; padding: 6px 8px 6px 10px; font-size: 12px; font-weight: 600; }
.country-chip button { border: 0; padding: 0; background: transparent; color: #7e8b86; font-size: 15px; line-height: 1; }
.text-button, .source-link { border: 0; background: transparent; padding: 0; color: var(--teal); font-size: 12px; font-weight: 800; }
.text-button:hover, .source-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.view-panel { border-top: 1px solid var(--line); }
.comparison-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; border-bottom: 1px solid var(--line); }
.chart-panel { padding: 32px 30px 22px; border-right: 1px solid var(--line); min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.panel-heading .kicker { margin-bottom: 7px; }
.panel-heading h2 { margin: 0; font: 800 25px/1.15 Manrope, sans-serif; letter-spacing: -.04em; }
.year-control { text-align: right; display: flex; flex-direction: column; gap: 3px; }
.year-control span { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.year-control strong { font: 700 13px Manrope, sans-serif; }
.bar-chart { display: flex; flex-direction: column; gap: 19px; padding: 34px 0 30px; }
.bar-row { display: grid; grid-template-columns: 145px minmax(100px, 1fr) 106px; gap: 16px; align-items: center; }
.bar-country { min-width: 0; }
.bar-country button { border: 0; background: transparent; padding: 0; font-weight: 700; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-country small { display: block; color: var(--muted); margin-top: 3px; font-size: 10px; }
.bar-track { height: 14px; background: #e7ebe3; border-radius: 3px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; width: 0; border-radius: 3px; background: var(--track-color, var(--teal)); transition: width .65s cubic-bezier(.2,.8,.2,1); position: relative; }
.bar-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25)); }
.bar-value { font: 800 14px Manrope, sans-serif; text-align: right; letter-spacing: -.02em; }
.bar-value small { display: block; font: 600 9px DM Sans, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.empty-state { border: 1px dashed var(--line); border-radius: 12px; padding: 30px; color: var(--muted); text-align: center; }
.chart-footer { border-top: 1px solid var(--line); padding-top: 16px; display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.chart-footer p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; max-width: 620px; }
.insight-panel { background: var(--ink); color: white; padding: 30px 26px; display: flex; flex-direction: column; }
.insight-topline { display: flex; justify-content: space-between; gap: 12px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #9eb3ac; }
.insight-topline span:last-child { color: var(--lime); }
.insight-number { font: 700 12px Manrope, sans-serif; color: var(--coral); margin: 36px 0 12px; }
.insight-panel h3 { font: 800 25px/1.12 Manrope, sans-serif; letter-spacing: -.04em; margin: 0 0 14px; }
.insight-panel > p:not(.insight-number) { color: #bdd0c9; font-size: 13px; line-height: 1.55; margin: 0; }
.insight-rule { height: 1px; background: rgba(255,255,255,.16); margin: auto 0 18px; min-height: 1px; }
.ghost-button { border: 0; background: transparent; color: white; padding: 0; text-align: left; font-weight: 700; font-size: 12px; display: flex; justify-content: space-between; }
.matrix-panel { padding: 26px 30px 30px; }
.matrix-heading { align-items: end; margin-bottom: 17px; }
.matrix-heading p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th { text-align: left; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid #e7eae4; font-size: 12px; }
tbody tr { transition: background .15s; } tbody tr:hover { background: #f3f5ef; }
.country-cell button { border: 0; background: transparent; padding: 0; font-weight: 800; display: flex; gap: 9px; align-items: center; }
.value-cell { font: 800 13px Manrope, sans-serif; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-official { color: #27705f; background: #dcefe8; }.status-estimated { color: #8b5e18; background: #f8e9c5; }.status-provisional { color: #4d61a8; background: #e4e9fb; }.status-projected { color: #84558d; background: #f0e0f2; }
.source-cell { color: var(--muted); }.open-cell button { border: 1px solid var(--line); background: transparent; width: 27px; height: 27px; border-radius: 50%; }

.topic-layout { display: grid; grid-template-columns: 1.35fr .65fr; border-bottom: 1px solid var(--line); }
.topic-hero, .topic-method { padding: 38px 30px; }
.topic-hero { background: linear-gradient(125deg, #e6eed8 0%, #f9faf5 80%); border-right: 1px solid var(--line); }
.topic-hero h2 { font: 800 clamp(34px, 5vw, 58px)/1 Manrope, sans-serif; letter-spacing: -.06em; margin: 0 0 18px; }
.topic-hero > p:not(.kicker), .topic-method > p:not(.kicker) { color: var(--muted); line-height: 1.65; max-width: 690px; }
.topic-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.meta-chip { border: 1px solid #cdd7c5; background: rgba(255,255,255,.55); border-radius: 999px; padding: 8px 11px; font-size: 11px; font-weight: 700; }
.topic-method h3 { font: 800 24px/1.15 Manrope, sans-serif; letter-spacing: -.04em; margin: 0 0 12px; }
.distribution-panel { padding: 30px; }
.quality-score { border-radius: 999px; background: #e3f0dd; color: #32654f; padding: 8px 12px; font-size: 10px; font-weight: 800; }
.distribution-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 24px; }
.distribution-card { background: #eff1eb; border: 1px solid #e0e4dc; border-radius: 12px; padding: 17px; min-height: 145px; }
.distribution-card .flag { font-size: 21px; }.distribution-card h4 { margin: 18px 0 6px; font: 800 13px Manrope, sans-serif; }.distribution-card strong { display: block; font: 800 20px Manrope, sans-serif; letter-spacing: -.04em; }.distribution-card small { color: var(--muted); font-size: 10px; }

footer { max-width: 1480px; margin: 0 auto; padding: 22px clamp(16px, 3.8vw, 56px) 34px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line); }
footer p { margin: 0; }

.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; background: rgba(8, 23, 21, .55); backdrop-filter: blur(6px); z-index: 50; }
.modal-backdrop { display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--card); width: min(600px, 100%); border-radius: 18px; box-shadow: 0 30px 100px rgba(0,0,0,.32); overflow: hidden; }
.modal-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 26px 26px 18px; }.modal-header h2, .drawer-head h2 { margin: 0; font: 800 26px Manrope, sans-serif; letter-spacing: -.04em; }.modal-header .kicker, .drawer-head .kicker { margin-bottom: 6px; }
.icon-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 22px; line-height: 1; }
.search-box { margin: 0 26px; height: 46px; border: 1px solid var(--line); background: white; border-radius: 10px; display: flex; align-items: center; gap: 10px; padding: 0 13px; }
.search-box input { width: 100%; border: 0; outline: none; background: transparent; }.search-box span { color: var(--muted); font-size: 22px; }
.picker-summary { display: flex; justify-content: space-between; padding: 16px 26px 10px; color: var(--muted); font-size: 10px; font-weight: 700; }
.country-list { max-height: 330px; overflow-y: auto; padding: 0 16px 10px; }
.country-option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 10px; border-bottom: 1px solid #e8ebe5; border-radius: 8px; cursor: pointer; }
.country-option:hover { background: #eff2eb; }.country-option .flag { font-size: 22px; }.country-option strong { display: block; font-size: 13px; }.country-option small { color: var(--muted); font-size: 10px; }.country-option input { width: 18px; height: 18px; accent-color: var(--ink); }
.modal-footer { border-top: 1px solid var(--line); padding: 16px 26px; display: flex; justify-content: space-between; }.modal-footer .primary-button { justify-self: auto; }

.side-drawer { display: block; position: fixed; right: 0; top: 0; height: 100%; width: min(560px, 96vw); background: var(--card); z-index: 60; box-shadow: -24px 0 80px rgba(0,0,0,.2); overflow-y: auto; animation: drawerIn .28s ease-out; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: .2; } to { transform: translateX(0); opacity: 1; } }
.drawer-head { position: sticky; top: 0; z-index: 2; background: rgba(251,252,247,.95); backdrop-filter: blur(12px); padding: 24px 26px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; }
.country-identity { padding: 30px 26px; background: var(--ink); color: white; }.country-identity .flag { font-size: 42px; }.country-identity h2 { font: 800 42px/1 Manrope, sans-serif; letter-spacing: -.06em; margin: 18px 0 8px; }.country-identity .country-meta { color: #a8bbb5; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }.country-identity p { color: #c3d1cd; line-height: 1.6; font-size: 13px; margin: 20px 0 0; }
.signal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }.signal-card { padding: 19px 18px; background: var(--card); }.signal-card small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; font-weight: 800; letter-spacing: .08em; }.signal-card strong { display: block; font: 800 18px Manrope, sans-serif; margin: 11px 0 5px; }.signal-card span { color: var(--muted); font-size: 10px; }
.membership-block, .drawer-note { padding: 24px 26px; border-bottom: 1px solid var(--line); }.membership-block h3, .drawer-note h3 { margin: 0 0 14px; font: 800 16px Manrope, sans-serif; }.membership-chips { display: flex; flex-wrap: wrap; gap: 7px; }.membership-chip { background: #e9ede4; border-radius: 7px; padding: 7px 9px; font-size: 10px; font-weight: 800; }.drawer-note p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.method-drawer { width: min(620px, 96vw); }
.method-intro { padding: 26px; background: #edf1e7; border-bottom: 1px solid var(--line); }.method-intro p { color: var(--muted); line-height: 1.6; font-size: 13px; margin: 0; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 22px 26px; border-bottom: 1px solid var(--line); }.legend-item { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }.legend-item p { margin: 8px 0 0; font-size: 10px; line-height: 1.45; color: var(--muted); }
.source-register { padding: 8px 26px 30px; }.source-item { padding: 18px 0; border-bottom: 1px solid var(--line); }.source-item h3 { margin: 0 0 6px; font: 800 15px Manrope, sans-serif; }.source-item p { color: var(--muted); font-size: 11px; line-height: 1.55; }.source-item a { color: var(--teal); font-size: 11px; font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80; background: var(--ink); color: white; border-radius: 999px; padding: 11px 16px; font-size: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.22); }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }.header-nav { display: none; }
  .intro { grid-template-columns: 1fr; gap: 26px; }.intro-aside { max-width: 650px; }
  .track-strip { grid-template-columns: repeat(3, 1fr); }.track-tab:nth-child(3) { border-right: 0; }.track-tab:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .control-deck { grid-template-columns: 1fr; }.filter-row { justify-content: flex-start; }.comparison-grid { grid-template-columns: 1fr; }.chart-panel { border-right: 0; }.insight-panel { min-height: 300px; }.distribution-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-header { height: 66px; padding: 0 16px; }.site-header .primary-button { font-size: 0; width: 40px; height: 40px; padding: 0; border-radius: 50%; }.site-header .primary-button span { font-size: 18px; }.brand small { display: none; }
  main { padding-inline: 10px; }.intro { padding: 42px 8px 30px; }.intro-aside > p { font-size: 14px; } h1 { font-size: 40px; }
  .explorer-shell { border-radius: 15px; }.track-strip { display: flex; overflow-x: auto; scrollbar-width: none; }.track-tab { min-width: 132px; border-bottom: 0 !important; }
  .control-deck { padding: 22px 18px 14px; gap: 20px; }.metric-control { grid-template-columns: 1fr auto; }.metric-control > label { grid-column: 1 / -1; }.metric-control select { font-size: 19px; }.filter-row { display: grid; grid-template-columns: 1fr 1fr; }.filter-control { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; min-width: 0; }
  .selection-row { margin: 0 18px; padding: 12px 0; align-items: flex-start; flex-wrap: wrap; }.country-chips { order: 3; width: 100%; flex-basis: 100%; }.text-button { margin-left: auto; }
  .chart-panel, .matrix-panel, .topic-hero, .topic-method, .distribution-panel { padding: 24px 18px; }.bar-row { grid-template-columns: 92px minmax(70px,1fr) 82px; gap: 9px; }.bar-country button { font-size: 11px; }.bar-value { font-size: 11px; }.chart-footer { flex-direction: column; }.panel-heading { gap: 10px; }.year-control { display: none; }
  .topic-layout { grid-template-columns: 1fr; }.topic-hero { border-right: 0; border-bottom: 1px solid var(--line); }.distribution-grid { grid-template-columns: 1fr 1fr; }.matrix-heading p:last-child { display: none; }
  footer { flex-direction: column; }.signal-grid { grid-template-columns: 1fr; }.legend { grid-template-columns: 1fr; }
}

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

.reading-notes{margin:18px 0;padding:18px 20px;border:1px solid #d9e2e8;border-radius:12px;background:#f5f9fc;color:#283b49;line-height:1.6}.reading-notes h3{margin:0 0 9px;font-size:16px}.reading-notes p{margin:8px 0;font-size:14px}.reading-notes summary{cursor:pointer;font-weight:600}.reading-notes p:last-child{margin-bottom:0}

/* One comparison, two equivalent presentations. */
[hidden] { display: none !important; }
.visualization-toggle { display:flex; gap:4px; padding:4px; background:#eef1eb; border-radius:10px; width:fit-content; margin-top:20px; }
.visualization-toggle button { border:0; background:transparent; color:var(--muted); border-radius:7px; padding:10px 20px; min-height:44px; cursor:pointer; font:inherit; font-weight:700; }
.visualization-toggle button[aria-pressed="true"] { background:var(--ink); color:white; }
.visualization-toggle button:focus-visible { outline:3px solid var(--track-color); outline-offset:2px; }
.dataset-attribution { border-top:1px solid var(--line); padding:14px 0; font-size:11px; color:var(--muted); overflow-wrap:anywhere; }
.dataset-attribution p { margin:0 0 6px; }
.dataset-attribution a,.observation-provenance a { color:inherit; text-decoration:underline; }
.observation-provenance { display:block; font-size:10px; line-height:1.5; font-weight:400; color:var(--muted); overflow-wrap:anywhere; margin-top:5px; }
.comparison-table { margin:24px 0; }
.comparison-table table { min-width:0; table-layout:fixed; }
.comparison-table th:first-child { width:40%; }
.comparison-table td,.comparison-table th { overflow-wrap:anywhere; }
.comparison-table .country-cell button { white-space:normal; text-align:left; }
.bar-country button { white-space:normal; text-align:left; overflow:visible; }
@media (max-width:640px) {
  .comparison-table td,.comparison-table th { padding:12px 5px; font-size:10px; }
  .comparison-table .country-cell button { font-size:11px; }
  .comparison-table .status-pill { white-space:normal; padding:3px 5px; }
  .bar-country small { line-height:1.5; }
  .comparison-table th:first-child { width:36%; }
}

/* Compact country rows; evidence lives below the visualization. */
.comparison-controls { display:flex; flex-wrap:wrap; gap:12px; margin-top:22px; }
.comparison-controls label { display:flex; flex:1 1 140px; flex-direction:column; gap:6px; font-size:11px; font-weight:700; }
.comparison-controls input,.comparison-controls select { width:100%; min-width:0; min-height:44px; padding:9px; border:1px solid var(--line); border-radius:7px; background:white; font:inherit; }
.comparison-help { font-size:11px; color:var(--muted); line-height:1.5; }
#barChart { max-height:none; overflow:visible; gap:8px; padding:22px 0; }
.bar-row { height:44px; grid-template-columns:minmax(145px,30%) minmax(0,1fr) 110px; gap:14px; }
.bar-country { min-width:0; }
.bar-country a { display:block; color:var(--ink); font-weight:700; font-size:12px; text-decoration:none; line-height:18px; max-height:36px; overflow:hidden; }
.bar-country a:hover,.country-cell a:hover { text-decoration:underline; }
.bar-value { font-size:12px; overflow-wrap:anywhere; }
.country-cell a { color:var(--ink); text-decoration:none; font-weight:700; }
.negative-bar { opacity:.65; background-image:repeating-linear-gradient(135deg,transparent,transparent 4px,#ffffff55 4px,#ffffff55 6px); }
.dataset-attribution details { margin-top:12px; }
.dataset-attribution summary { cursor:pointer; font-weight:700; padding:10px 0; }
.source-exception { padding:12px 0; border-top:1px solid var(--line); }
.source-exception p { line-height:1.6; }
@media(max-width:640px) {
 .bar-row { grid-template-columns:minmax(100px,38%) minmax(0,1fr) 82px; gap:8px; height:44px; }
 .bar-country a { font-size:11px; }
 .bar-value { font-size:10px; }
 .bar-value small { font-size:8px; }
 .comparison-controls label:first-child { flex-basis:100%; }
 .comparison-table th:first-child { width:30%; }
}

/* Keep the evidence panel stable while comparison results scroll. */
.comparison-grid { grid-template-columns:minmax(0,1fr) minmax(300px,360px); height:clamp(620px,82dvh,900px); align-items:stretch; }
.chart-panel { display:flex; flex-direction:column; min-height:0; }
.chart-panel > .panel-heading,.comparison-controls,.comparison-help,.visualization-toggle { flex-shrink:0; }
.comparison-scroll { flex:1; min-height:0; overflow:auto; margin-top:16px; scrollbar-gutter:stable; padding-right:8px; }
.comparison-scroll:focus-visible,.insight-evidence:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.comparison-scroll #barChart { padding-top:6px; }
.comparison-scroll .comparison-table { margin-top:0; overflow:visible; }
.comparison-scroll thead th { position:sticky; top:0; z-index:1; background:var(--card); }
.insight-panel { min-height:0; overflow:hidden; }
.insight-number { margin-top:20px; }
.insight-evidence { flex:1; min-height:0; overflow:auto; margin-top:22px; padding-right:8px; scrollbar-gutter:stable; }
.insight-panel h3.evidence-heading { font-size:15px; letter-spacing:0; margin-bottom:12px; }
.insight-panel .dataset-attribution { color:#d1e2dc; border-color:#ffffff30; font-size:12px; line-height:1.6; }
.insight-panel .dataset-attribution a { color:#d7ed9e; }
.insight-panel .source-exception,.insight-panel .chart-footer { border-color:#ffffff30; }
.insight-panel .chart-footer { display:block; padding-top:14px; }
.insight-panel .chart-footer p { color:#c5d8cf; line-height:1.65; }
.insight-panel .reading-notes { background:#ffffff08; color:#d1e2dc; border-color:#ffffff30; padding:14px; margin:18px 0; }
.insight-panel .reading-notes h3 { font-size:15px; line-height:1.3; letter-spacing:0; }
.insight-panel .reading-notes p { font-size:12px; }
.insight-panel .source-link { color:#d7ed9e; }
.insight-rule { margin:18px 0; flex-shrink:0; }
.insight-panel > .ghost-button { flex-shrink:0; min-height:32px; align-items:center; }
@media(max-width:980px) {
 .comparison-grid { grid-template-columns:1fr; height:auto; }
 .chart-panel { min-height:0; }
 .comparison-scroll { flex:none; max-height:65dvh; min-height:180px; margin-top:16px; }
 .insight-panel { min-height:0; overflow:visible; }
 .insight-evidence { flex:none; overflow:visible; padding-right:0; }
}

/* Give desktop comparisons room for roughly fifteen rows. */
@media(min-width:981px) {
 .comparison-grid { height:auto; }
 .chart-panel .comparison-scroll { flex:0 0 720px; height:720px; max-height:none; }
 .comparison-scroll #barChart { gap:6px; padding-bottom:6px; }
 .comparison-scroll .bar-row { height:40px; flex-shrink:0; }
 .comparison-scroll .comparison-table td { height:44px; padding-top:10px; padding-bottom:10px; }
}

.latest-observation { font-size:12px; font-weight:700; color:var(--teal); margin:12px 0 0; flex-shrink:0; }

/* Keep long indicator names, controls and observations inside their panels. */
.control-deck { grid-template-columns:minmax(0,1fr) auto; }
.metric-control { min-width:0; grid-template-columns:auto minmax(0,1fr) 28px; }
.select-wrap,.filter-row,.filter-control { min-width:0; }
.metric-control select { min-width:0; max-width:100%; font-size:clamp(16px,1.5vw,22px); text-overflow:ellipsis; }
.filter-control select { width:100%; max-width:100%; }
.explorer-shell .explorer-actions { margin:18px 30px 12px; }
.explorer-shell #visibleCountryCount { margin:0 30px 14px; line-height:1.6; overflow-wrap:anywhere; }
.explorer-actions > label { min-width:0; flex-wrap:wrap; }
.explorer-actions select { max-width:100%; min-width:0; }
.comparison-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.comparison-controls label { min-width:0; }
.panel-heading > div:first-child { min-width:0; }
.panel-heading h2,.insight-panel h3 { overflow-wrap:anywhere; }
.year-control { flex-shrink:0; max-width:35%; overflow-wrap:anywhere; }
.bar-row { grid-template-columns:minmax(140px,30%) minmax(0,1fr) 140px; }
.bar-value { min-width:0; white-space:nowrap; font-variant-numeric:tabular-nums; font-size:11px; line-height:1.2; }
.bar-value small { white-space:normal; overflow-wrap:anywhere; text-transform:none; letter-spacing:0; font-size:10px; line-height:1.2; margin-top:3px; }
.insight-panel,.insight-evidence,.dataset-attribution,.chart-footer,.reading-notes { min-width:0; }
.insight-panel p,.insight-panel a,.insight-panel summary { overflow-wrap:anywhere; }
@media(min-width:1400px) {
 .comparison-controls { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(max-width:980px) {
 .control-deck { grid-template-columns:minmax(0,1fr); }
 .filter-row { flex-wrap:wrap; }
 .filter-control { flex:1 1 140px; }
}
@media(max-width:640px) {
 .metric-control { grid-template-columns:minmax(0,1fr) 28px; }
 .metric-control > label { grid-column:1 / -1; }
 .explorer-shell .explorer-actions { margin:16px 18px 12px; }
 .explorer-shell #visibleCountryCount { margin:0 18px 14px; }
 .explorer-actions > label { margin-left:0; flex-basis:100%; }
 .bar-row { grid-template-columns:minmax(86px,34%) minmax(0,1fr) 96px; gap:6px; height:48px; }
 .bar-value { font-size:10px; }
 .bar-value small { font-size:9px; }
 .comparison-controls { gap:10px; }
 .comparison-table table { table-layout:auto; }
 .comparison-table td,.comparison-table th { overflow-wrap:anywhere; }
}

.bar-number { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bar-value small { max-height:2.4em; overflow:hidden; }

.economy-entry { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px; margin:0 0 24px; border:1px solid var(--line); border-radius:16px; background:var(--card); }
.economy-entry h2 { margin:4px 0 8px; font-size:24px; }
.economy-entry p { font-size:13px; line-height:1.5; margin-bottom:0; }
.economy-entry-controls { display:grid; gap:8px; flex:0 1 280px; min-width:0; }
.economy-entry-controls label { font-size:12px; font-weight:700; }
.economy-entry-controls select,.economy-entry-controls button,.economy-group select { min-height:44px; max-width:100%; border:1px solid var(--line); border-radius:8px; padding:8px; background:var(--card); }
.economy-entry-controls button { background:var(--ink); color:white; font-weight:700; }
.country-economy { margin:24px 0; border-top:1px solid var(--line); padding-top:20px; }
.economy-group { margin:22px 0; }
.economy-group h4 { font-size:17px; margin:0 0 12px; }
.economy-group label { display:flex; flex-wrap:wrap; gap:12px; align-items:center; font-size:12px; }
.economy-note,.economy-source { font-size:12px; color:var(--muted); line-height:1.65; overflow-wrap:anywhere; }
.economy-table-wrap { overflow-x:auto; }
.economy-table { min-width:0; table-layout:fixed; }
.economy-table th,.economy-table td { padding:12px 5px; font-size:11px; overflow-wrap:anywhere; vertical-align:top; }
.economy-table th:first-child { width:46%; }
.economy-table th a { color:var(--teal); font-size:12px; text-transform:none; letter-spacing:0; }
.economy-table small { display:block; font-weight:400; margin-top:6px; color:var(--muted); }
.economy-bar { display:block; height:5px; margin-top:8px; background:#e7ebe3; border-radius:3px; overflow:hidden; }
.economy-bar span { display:block; height:100%; background:var(--teal); }
.economy-source summary { cursor:pointer; font-weight:700; color:var(--ink); }
@media(max-width:640px) { .economy-entry { flex-direction:column; align-items:stretch; padding:18px; }.economy-entry-controls { flex:auto; }.economy-table th:first-child { width:42%; } }
