@font-face {
  font-family: "Space Grotesk";
  src: url("space-grotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@property --share {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

:root {
  color-scheme: dark;
  --page: #0a1114;
  --panel: #0e181c;
  --panel-deep: #0b1418;
  --line: #223236;
  --text: #edf6f0;
  --muted: #9aada9;
  --soft: #bad0c6;
  --clean: #a5f6b0;
  --renewables: #79dbab;
  --nuclear: #c2a9fa;
  --none: #253035;
  --radius: 17px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 280px;
  color: var(--text);
  background:
    radial-gradient(ellipse 760px 440px at 82% 4%, #132620 0%, transparent 80%),
    var(--page);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--clean);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.container {
  width: min(100% - 2 * clamp(18px, 4vw, 64px), 1392px);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--clean);
  color: var(--page);
}

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

.site-header {
  border-bottom: 1px solid #20312f;
  background: #0a1114b8;
}

.header-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.065em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--clean);
  border-radius: 8px;
  box-shadow: 0 0 22px #89ed9b25;
}

.brand-mark span, .ring-bolt {
  width: 15px;
  height: 20px;
  background: #142821;
  clip-path: polygon(60% 0, 0 58%, 42% 58%, 29% 100%, 100% 37%, 56% 37%);
}

.brand-dot { color: var(--clean); }

.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  color: var(--soft);
  font-size: 14px;
}

.site-nav a:hover, .method-sources a:hover { color: var(--clean); }

.source-chip, .world-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  gap: 8px;
  border: 1px solid #324642;
  border-radius: 8px;
  background: #14211e;
  color: var(--soft);
  font-size: 13px;
  padding: 8px 11px;
  transition: border-color 160ms, background 160ms, color 160ms;
}

.source-chip span, .world-button span, .method-sources a span { color: var(--clean); }
.source-chip:hover, .world-button:hover:not(:disabled) {
  border-color: #658974;
  background: #1b3026;
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 394px);
  align-items: center;
  gap: clamp(25px, 4.2vw, 72px);
  padding: 43px 0 33px;
}

.hero-intro, .world-card, .atlas-grid { animation: arrive 620ms ease-out both; }
.world-card { animation-delay: 80ms; }
.atlas-grid { animation-delay: 120ms; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a3c6b3;
  text-transform: uppercase;
  letter-spacing: 0.155em;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 11px 1px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clean);
  box-shadow: 0 0 0 4px #a5f6b01a, 0 0 13px #a5f6b077;
}

.hero h1 {
  margin: 0;
  font-size: clamp(43px, 5.3vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.085em;
  text-wrap: balance;
}

.hero h1 span { color: var(--clean); }

.hero-description {
  margin: 17px 0 0;
  max-width: 55ch;
  color: var(--soft);
  line-height: 1.55;
  font-size: clamp(14px, 1.25vw, 17px);
}

.world-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 17px;
  min-height: 141px;
  padding: 17px 19px;
  border: 1px solid #2c473b;
  border-radius: var(--radius);
  background: linear-gradient(118deg, #1b3329, #10221f 65%, #11201e);
  box-shadow: 0 12px 40px #03060535;
  font-variant-numeric: tabular-nums;
}

.world-label {
  font-size: 12px;
  color: #c0d8c9;
  font-weight: 600;
  white-space: nowrap;
}

.world-number {
  color: var(--clean);
  font-size: clamp(43px, 4.15vw, 63px);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 1.13;
  white-space: nowrap;
}

.number-unit { font-size: 0.53em; margin-left: 2px; letter-spacing: -0.04em; }

.world-change {
  width: fit-content;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 5px;
  color: #c0eecb;
  background: #253f31;
  font-size: 11px;
  white-space: nowrap;
}

.world-change:empty { visibility: hidden; }
.world-change.decline { background: #38312a; color: #f2c8a1; }

.world-secondary {
  align-self: end;
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.world-secondary canvas {
  display: block;
  width: 100%;
  height: 33px;
}

.world-secondary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  white-space: nowrap;
}

.world-secondary > div > span { color: #bdd0c6; }
.world-secondary strong { font-weight: 600; }

.swatch {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: 1px;
  background: var(--swatch);
}

.renewable { --swatch: var(--renewables); }
.nuclear { --swatch: var(--nuclear); }

.atlas-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(295px, 330px);
  align-items: stretch;
  gap: 16px;
}

.map-card, .detail-card {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 36px #03070835;
}

.map-card { display: flex; flex-direction: column; }

.map-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 16px 19px 13px;
}

h2, h3 { margin: 0; }

.map-heading h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.042em;
}

.map-heading p {
  color: var(--muted);
  margin: 3px 0 0;
  font-size: 13px;
}

.map-actions { display: flex; align-items: center; gap: 8px; }
.country-picker { position: relative; }

.country-picker input, .year-control select {
  height: 38px;
  width: 100%;
  border: 1px solid #304145;
  border-radius: 8px;
  background: #0b1418;
  color: var(--text);
  font-size: 13px;
}

.country-picker input {
  width: clamp(150px, 15vw, 212px);
  min-width: 0;
  padding: 0 10px 0 33px;
}

.country-picker input::placeholder { color: var(--muted); opacity: 1; }

.search-icon {
  position: absolute;
  left: 13px;
  top: 12px;
  z-index: 1;
  width: 11px;
  height: 11px;
  color: #a4b9b1;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 1.5px;
  background: currentColor;
  top: 8px;
  left: 7px;
  transform: rotate(45deg);
  transform-origin: left;
}

.country-options {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  width: max(100%, 230px);
  max-height: 284px;
  overflow: auto;
  overscroll-behavior: contain;
  list-style: none;
  margin: 0;
  padding: 4px;
  border: 1px solid #3f5850;
  border-radius: 10px;
  color: var(--text);
  background: #132222;
  box-shadow: 0 16px 32px #0008;
}

.country-options li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  min-height: 39px;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.country-options li small { color: var(--muted); white-space: nowrap; }
.country-options li[aria-selected="true"], .country-options li:hover { background: #263c31; }
.country-options li.empty-result { cursor: default; color: var(--muted); }

.year-control { position: relative; }

.year-control::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 12px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border: solid #a5bab1;
  border-width: 0 1.5px 1.5px 0;
  pointer-events: none;
}

.year-control select {
  appearance: none;
  min-width: 77px;
  padding: 0 26px 0 10px;
  font-variant-numeric: tabular-nums;
}

.metric-tabs {
  display: flex;
  gap: 5px;
  padding: 0 19px 12px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #3e5b50 transparent;
}

.metric-tabs button {
  flex: none;
  min-height: 34px;
  padding: 5px clamp(7px, 0.75vw, 13px);
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transition: background 160ms, color 160ms;
}

.metric-tabs button:focus-visible { outline-offset: -2px; }
.metric-tabs button:hover { color: var(--text); background: #1a292a; }

.metric-tabs button[aria-pressed="true"] {
  border-color: #3e614c;
  background: #22392c;
  color: #ccffd1;
}

.map-view {
  position: relative;
  isolation: isolate;
  flex: 1 0 auto;
  min-height: 337px;
  aspect-ratio: 2.36;
  overflow: hidden;
  border-block: 1px solid #213237;
  background:
    radial-gradient(circle at center, #537b7131 0.7px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(ellipse at 54% 43%, #162c2a 0%, #101e24 54%, #0a141a 100%);
}

#map {
  position: absolute;
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

#map.has-target { cursor: pointer; }
#map.can-pan { cursor: grab; touch-action: none; }
#map.is-panning { cursor: grabbing; }

.map-message {
  position: absolute;
  inset: 36% 15px auto;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
}

.map-legend {
  --palette: #82e6a9;
  --low-color: #234338;
  position: absolute;
  z-index: 1;
  bottom: 11px;
  left: 14px;
  width: min(206px, calc(100% - 75px));
  padding: 8px 10px 7px;
  border: 1px solid #324645;
  border-radius: 9px;
  background: #0b171cde;
  box-shadow: 0 3px 12px #070f1450;
  pointer-events: none;
}

.legend-meta, .legend-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  line-height: 1.2;
}

.legend-meta { color: #d2ded7; }
.legend-meta span:last-child { white-space: nowrap; color: var(--muted); }
.legend-meta i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; background: var(--none); }
.legend-gradient {
  height: 5px;
  margin: 7px 0 5px;
  border-radius: 5px;
  background: linear-gradient(to right, var(--low-color), var(--palette));
  transition: background 240ms ease;
}

.legend-labels { color: var(--muted); font-variant-numeric: tabular-nums; }

.map-controls {
  display: grid;
  position: absolute;
  bottom: 11px;
  right: 14px;
  z-index: 1;
  border: 1px solid #324645;
  border-radius: 8px;
  background: #0b171cec;
}

.map-controls button {
  display: grid;
  place-items: center;
  width: 33px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #def1e6;
  font-size: 20px;
}

.map-controls button + button { border-top: 1px solid #273c3b; }
.map-controls button:hover:not(:disabled) { color: var(--clean); background: #263b30; }
.map-controls button:disabled { color: #738984; }

.reset-icon {
  position: relative;
  width: 11px;
  height: 11px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.reset-icon::before, .reset-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.reset-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.map-tooltip, .map-label {
  position: absolute;
  z-index: 2;
  display: grid;
  align-items: center;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  border: 1px solid #547665;
  border-radius: 7px;
  background: #112320f2;
  color: var(--text);
  box-shadow: 0 7px 14px #050e1380;
  pointer-events: none;
  font-size: 12px;
}

.map-tooltip strong { font-size: 13px; }
.map-tooltip span { color: var(--soft); }
.map-label {
  display: flex;
  gap: 9px;
  padding: 4px 7px;
  color: #dcefe4;
  font-size: 11px;
  white-space: nowrap;
}

.map-label strong { color: var(--clean); font-weight: 600; }

.timeline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 20px 13px;
}

.play-button {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #3e614c;
  border-radius: 8px;
  background: #22392c;
  color: #c5fbc9;
}

.play-button:hover:not(:disabled) { background: #30503a; }

.play-button span {
  width: 10px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateX(1px);
}

.play-button.is-playing span {
  clip-path: none;
  background: linear-gradient(90deg, currentColor 0 33%, transparent 33% 66%, currentColor 66%);
  transform: none;
}

.year-track {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: space-between;
  gap: 5px;
}

.year-track::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 0;
  top: 6px;
  height: 1px;
  background: #35494a;
}

.year-track button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 38px;
  border: 0;
  padding: 2px 2px 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.year-track button::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid #4e6862;
  border-radius: 50%;
  background: var(--panel);
  transition: background 180ms, border-color 180ms, box-shadow 180ms;
}

.year-track button:hover, .year-track button[aria-pressed="true"] { color: #d8f8df; }
.year-track button:hover::before, .year-track button[aria-pressed="true"]::before { border-color: var(--clean); }
.year-track button[aria-pressed="true"]::before {
  background: var(--clean);
  box-shadow: 0 0 0 4px #a5f6b01f, 0 0 11px #a5f6b066;
}

.detail-card {
  padding: 17px 18px 14px;
  background: linear-gradient(164deg, #142420, #101a1e 44%, #0e181c 78%);
  scroll-margin-top: 15px;
}

.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.area-title-group { min-width: 0; }

.area-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.area-meta span + span {
  padding-left: 7px;
  border-left: 1px solid #546e65;
  letter-spacing: 0.07em;
}

.detail-heading h2 {
  overflow-wrap: anywhere;
  font-size: clamp(24px, 2.75vw, 33px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.world-button { padding: 6px 8px; font-size: 12px; }
.world-button:disabled { opacity: 0.55; }

.detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-number {
  color: var(--clean);
  font-weight: 700;
  font-size: clamp(41px, 4vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.09em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.detail-metric { margin-top: 3px; color: var(--muted); font-size: 13px; }

.detail-ring {
  --share: 0%;
  flex: 0 0 66px;
  height: 66px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(var(--clean) var(--share), #263b38 var(--share));
  transition: --share 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 100%;
  background: #12201e;
}

.ring-bolt { position: relative; background: #a5f6b0a8; width: 12px; height: 16px; }

.mix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 11px;
}

.mix-header h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.denominator {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid #263a3a;
  border-radius: 7px;
  background: #0b1517;
}

.denominator button {
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  white-space: nowrap;
}

.denominator button[aria-pressed="true"] { color: #daf4e1; background: #2b4037; }
.denominator button:hover:not([aria-pressed="true"]) { color: var(--text); }

.mix-rows { display: grid; gap: 10px; }

.mix-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  align-items: center;
  font-size: 13px;
}

.mix-name { color: #cad9d0; }
.mix-value, .detail-footer strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.mix-value.missing { color: var(--muted); }

.mix-track {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 4px;
  background: #26373a;
}

.mix-fill {
  height: 100%;
  width: var(--bar-share, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--swatch), #143035 36%), var(--swatch));
  transition: width 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-footer {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.detail-footer div { display: flex; justify-content: space-between; gap: 6px; }
.detail-footer strong { color: #dcece4; white-space: nowrap; }

.empty-detail {
  margin: 22px 0 0;
  padding: 15px;
  border: 1px solid #30423f;
  border-radius: 9px;
  background: #111d21;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.5;
}

.comparison { padding: 42px 0 46px; }
#atlas, #comparison, #method { scroll-margin-top: 15px; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading h2, .method h2 {
  font-size: clamp(23px, 2.55vw, 34px);
  letter-spacing: -0.05em;
}

.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }

.comparison-year {
  padding: 6px 11px;
  border-radius: 7px;
  border: 1px solid #304740;
  color: #bcd6c9;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.comparison-year:empty { visibility: hidden; }

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 570px;
  border-spacing: 0;
  background: var(--panel-deep);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

th, td { padding: 9px 16px; text-align: right; }
thead th {
  background: #152325;
  color: #b8cdc4;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

thead th:first-child, tbody th { text-align: left; }
thead th span { color: var(--muted); }
tbody td, tbody th { border-top: 1px solid #1e3033; }
tbody th { font-weight: 500; }

tbody tr:hover, tbody tr.is-selected { background: #15251f; }

.table-country {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 2px 0;
  border: 0;
  border-radius: 3px;
  color: inherit;
  background: transparent;
}

.table-country:hover { color: var(--clean); }
.table-country span { color: #8baba0; font-size: 11px; }

.table-share {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.table-share strong { min-width: 48px; color: #c6f4d2; font-weight: 600; }
.table-track { width: clamp(30px, 7vw, 92px); height: 4px; border-radius: 6px; background: #273a37; }
.table-track span { display: block; width: var(--bar-share); height: 100%; border-radius: inherit; background: #81d5a0; }

.site-footer { border-top: 1px solid #263833; background: #0c1517; }

.method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(22px, 7vw, 95px);
  padding: 27px 0 32px;
}

.method h2 { font-size: 22px; }
.method p, .method-sources { color: var(--muted); font-size: 13px; line-height: 1.6; }
.method p { max-width: 76ch; margin: 8px 0 0; }

.method-sources {
  align-self: start;
  display: grid;
  gap: 3px;
  padding-top: 5px;
}

.method-sources a { color: var(--soft); }
.method-sources span:empty { display: none; }

@media (max-width: 980px) {
  .atlas-grid { grid-template-columns: minmax(0, 1fr) 285px; gap: 11px; }
  .map-header { padding-inline: 13px; }
  .map-heading h2 { font-size: 19px; }
  .metric-tabs { padding-inline: 13px; gap: 1px; }
  .detail-card { padding-inline: 14px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  .world-card { padding-inline: 15px; gap: 12px; }
}

@media (max-width: 795px) {
  .atlas-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .map-view { min-height: 300px; }
  .detail-card { padding-inline: 18px; }
  .detail-heading h2 { font-size: 30px; }
  .detail-number { font-size: 52px; }
  .mix-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
  .hero { gap: 17px; }
  .site-nav { gap: 17px; font-size: 13px; }
  .header-inner { gap: 13px; }
}

@media (max-width: 590px) {
  .header-inner { min-height: 56px; }
  .brand { font-size: 23px; }
  .brand-mark { width: 28px; height: 28px; }
  .site-nav { display: none; }
  .source-chip { font-size: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 27px 0 20px; }
  .hero h1 { text-wrap: initial; }
  .hero-description { margin-top: 11px; }
  .world-card { min-height: 118px; padding: 12px 14px; }
  .world-number { font-size: 50px; }
  .world-secondary canvas { max-width: 148px; justify-self: end; }
  .map-header { flex-wrap: wrap; gap: 10px; padding: 13px 12px 9px; }
  .map-actions { width: 100%; }
  .country-picker { flex: 1; }
  .country-picker input { width: 100%; }
  .country-options { left: 0; right: auto; max-width: calc(100vw - 60px); }
  .metric-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    padding: 0 10px 9px;
  }
  .metric-tabs button {
    min-height: 35px;
    padding-inline: 3px;
    font-size: 12px;
    line-height: 1.15;
    white-space: normal;
  }
  .map-view { min-height: 0; aspect-ratio: 1.65; }
  .map-legend { left: 8px; bottom: 8px; width: 165px; padding: 6px 8px; }
  .map-controls { right: 8px; bottom: 8px; }
  .map-controls button { width: 33px; height: 32px; }
  .map-label { padding: 3px 5px; font-size: 10px; }
  .timeline { padding-inline: 11px; gap: 10px; }
  .year-track button { min-width: 31px; font-size: 11px; }
  .comparison { padding: 28px 0 30px; }
  .section-heading { align-items: flex-start; }
  .section-heading p { line-height: 1.45; }
  table { min-width: 290px; font-size: 12px; }
  th, td { padding: 8px 6px; }
  th:first-child { padding-left: 9px; }
  th:last-child, td:last-child { padding-right: 9px; }
  thead th { font-size: 10px; line-height: 1.2; white-space: normal; }
  .table-country span, .table-track { display: none; }
  .table-share strong { min-width: auto; }
  .method { grid-template-columns: minmax(0, 1fr); gap: 13px; }
}

@media (max-width: 345px) {
  .hero h1 { font-size: 38px; }
  .world-card { gap: 9px; }
  .world-secondary, .mix-row { font-size: 12px; }
  .year-track { gap: 0; }
  .year-track button { min-width: 28px; }
  .map-label { display: none; }
}

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