/* Dark is the default theme; [data-theme="light"] overrides it. */
:root {
  color-scheme: dark;
  --page: #14171d;
  --surface: #1c2028;
  --raised: #2a2f39;
  --ink: #f2f3f5;
  --ink-2: #b4b9c4;
  --ink-3: #8f95a1;
  --grid: #2a2f39;
  --axis: #3f4552;
  --wash: rgba(255, 255, 255, 0.07);
  --focus: #6da7ec;
  --accent: #e5352b;
  --s0: #7d828d;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --s5: #d55181;
  --s6: #008300;
  --s7: #9085e9;
  --s8: #e66767;
  --tint: 42%;
  --tint-hover: 60%;
  --plane: var(--page);
  --gutter: 58px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f3f4f6;
  --surface: #ffffff;
  --raised: #e6e8ec;
  --ink: #12151c;
  --ink-2: #4c525e;
  --ink-3: #636a76;
  --grid: #e4e6ea;
  --axis: #c6cad2;
  --wash: rgba(18, 21, 28, 0.06);
  --focus: #256abf;
  --accent: #da291c;
  --s0: #8f939b;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --s6: #008300;
  --s7: #6250d6;
  --s8: #e34948;
  --tint: 30%;
  --tint-hover: 46%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
[hidden] { display: none !important; }

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

.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 32px;
}
.page {
  display: grid;
  gap: 24px;
  padding-block: 28px 56px;
  /* Lets wide children shrink instead of forcing horizontal page scroll. */
  grid-template-columns: minmax(0, 1fr);
}

.phone-only { display: none; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }

/* The two pages: large equal tabs, the first thing on the page. */
.site-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: var(--raised);
  border-radius: 14px;
}
.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: none;
}
.site-nav a:hover { background: var(--axis); }
.site-nav a[aria-current="page"],
.site-nav a[aria-current="page"]:hover { background: #da291c; color: #ffffff; }
.site-nav svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.flag { width: 1.15em; height: 1.15em; flex: none; }
.intro { margin-top: 6px; max-width: 110ch; color: var(--ink-2); }
.source-short { margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.segmented {
  display: inline-flex;
  flex: none;
  padding: 3px;
  background: var(--raised);
  border-radius: 10px;
}
.segmented button {
  border: 0;
  background: none;
  min-width: 40px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--page); }

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--raised);
  border-radius: 10px;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.icon-btn:hover:not(:disabled) { background: var(--axis); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }
.icon-btn svg { width: 15px; height: 15px; fill: currentColor; }
#themeToggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.measure-switch { justify-self: start; max-width: 100%; }
.measure-switch button { padding: 0 14px; min-height: 40px; }

/* Headline figure: the page's one loud element. It sits directly on the year bars. */
.hero { padding-top: 12px; }
.hero-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--ink-2);
  font-size: 18px;
  font-weight: 500;
}
.hero-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.14em;
  margin-top: 2px;
}
.hero-num {
  font-size: clamp(72px, 7.6vw, 108px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero-unit {
  font-size: clamp(22px, 3.2vw, 42px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  padding-left: 0.2em;
}
.hero-sentence {
  margin-top: 10px;
  max-width: 60ch;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
}
.hero-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 20px; margin-top: 8px; }
.text-link {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.text-link:hover { text-decoration-thickness: 2px; }
.hero-meta {
  color: var(--ink-2);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
}
.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--raised);
  color: var(--ink);
  white-space: nowrap;
}
.badge.plan { background: none; box-shadow: inset 0 0 0 1px var(--axis); color: var(--ink-2); }

/* Year picker */
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 10px;
}
.stepper { display: flex; gap: 4px; }
.step-year { display: none; }
.legend {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  color: var(--ink-2);
}
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { --c: var(--ink-3); width: 12px; height: 12px; border-radius: 3px; }
.swatch.actual { background: color-mix(in srgb, var(--c) 75%, var(--plane)); }
.swatch.plan { background: color-mix(in srgb, var(--c) 35%, var(--plane)); }

.plot-wrap { position: relative; height: 150px; }
.grid { position: absolute; inset: 0; pointer-events: none; }
.grid-line {
  position: absolute;
  left: var(--gutter);
  right: 0;
  border-top: 1px solid var(--grid);
}
.grid-line.base { border-color: var(--axis); }
.grid-line span {
  position: absolute;
  right: 100%;
  margin-right: 6px;
  top: -9px;
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bars {
  position: absolute;
  inset: 0 0 0 var(--gutter);
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  border-radius: 4px;
}
.bar-col {
  position: relative;
  flex: 1 1 0;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 1px;
}
.bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--c) 75%, var(--plane));
  transition: height 0.3s ease;
}
.bar-col.plan .bar { background: color-mix(in srgb, var(--c) 35%, var(--plane)); }
.bar-col:hover .bar { background: color-mix(in srgb, var(--c) 95%, var(--plane)); }
.bar-col.on .bar { background: var(--c-strong, var(--c)); }
.year-flag {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.ticks {
  position: relative;
  height: 20px;
  margin: 4px 0 0 var(--gutter);
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.ticks span { position: absolute; transform: translateX(-50%); }

/* Main area: the chart is raised on a panel; the list stays on the page as a plain table. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 4px;
}
.map-card {
  position: sticky;
  top: 16px;
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border-radius: 16px;
}
.list-card { min-width: 0; padding-top: 20px; }
.map-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  min-height: 42px;
  margin-bottom: 10px;
}
h2 { font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 4px 14px 4px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: var(--page);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.back:hover { background: var(--ink-2); }
.back svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back-list { width: 100%; margin-top: 14px; }

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chart-type button { display: inline-flex; align-items: center; gap: 6px; }
.chart-type svg { width: 15px; height: 15px; flex: none; }
.map-hint { min-height: 20px; margin-bottom: 8px; }

/* Charts in the main panel */
.chart-svg { display: block; overflow: visible; font-family: inherit; }
.chart-svg text { fill: var(--ink); }
.chart-svg .axis-text { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.grid-rule { stroke: var(--grid); }
.axis-line { stroke: var(--axis); }
.plan-band { fill: var(--wash); }
.plan-veil { fill: var(--surface); opacity: 0.32; }
.year-rule { stroke: var(--ink-2); }
.chart-svg .year-rule-text { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cross { stroke: var(--ink-3); pointer-events: none; }
.plot-hit { fill: transparent; cursor: pointer; touch-action: pan-y; }

.map:not(.is-boxes).has-focus [data-id]:not(.hl) { opacity: 0.22; }

.slice {
  fill: var(--c);
  stroke: var(--surface);
  stroke-width: 2;
  cursor: pointer;
  outline: none;
  transition: opacity 0.12s;
}
.slice:focus-visible { stroke: var(--focus); stroke-width: 3; }
.chart-svg .pie-total { font-size: 22px; font-weight: 700; pointer-events: none; }
.chart-svg .pie-sub { fill: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; pointer-events: none; }
.chart-svg .pie-pct { font-size: 12px; font-weight: 600; pointer-events: none; }
.chart-svg .pie-label { font-size: 12.5px; pointer-events: none; }
.chart-svg .pie-label-pct { font-weight: 700; }
.leader { fill: none; stroke: var(--axis); pointer-events: none; }

.series {
  fill: none;
  stroke: var(--c);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  pointer-events: none;
  transition: opacity 0.12s;
}
.series.hl { stroke-width: 3; }
.series.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-line 0.7s ease-out forwards; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
.series-dot { fill: var(--c); stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.chart-svg .end-label { fill: var(--ink-2); font-size: 12px; pointer-events: none; }

.chart-svg .band-label { font-size: 12px; font-weight: 600; pointer-events: none; }
.band {
  fill: color-mix(in srgb, var(--c) 58%, var(--surface));
  stroke: var(--surface);
  stroke-width: 1;
  pointer-events: none;
  transition: opacity 0.12s;
}
.reveal { animation: reveal-left 0.6s ease-out; }
@keyframes reveal-left { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.tip-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 6px; align-items: baseline; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tip-row i { width: 9px; height: 9px; border-radius: 2px; }
.tip-row.near { color: var(--ink); font-weight: 700; }

.map { position: relative; height: clamp(420px, 64vh, 640px); overflow: hidden; border-radius: 8px; }
.tile {
  position: absolute;
  border: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--c) var(--tint), var(--surface));
  transition: left 0.3s ease, top 0.3s ease, width 0.3s ease, height 0.3s ease, background-color 0.12s;
}
.tile:hover { background: color-mix(in srgb, var(--c) var(--tint-hover), var(--surface)); }
.tile.on { box-shadow: inset 0 0 0 3px var(--c); background: color-mix(in srgb, var(--c) var(--tint-hover), var(--surface)); }
.tile:focus-visible { outline-offset: -3px; }
.tile-in {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 10px 12px;
  min-width: 0;
}
.tile svg { width: 22px; height: 22px; flex: none; margin-bottom: 4px; }
.tile .t-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.22;
  flex: none;
  hyphens: auto;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lines, 3);
  overflow: hidden;
}
.tile .t-pct { flex: none; margin-top: auto; font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.tile .t-val { flex: none; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tile.xl .t-name { font-size: 18px; }
.tile.xl .t-pct { font-size: 38px; letter-spacing: -0.02em; }
.tile.md .tile-in { padding: 6px 8px; }
.tile.md .t-name { font-size: 12.5px; --lines: 2; }
.tile.md .t-pct { font-size: 14px; }
.tile.sm .tile-in { padding: 4px; align-items: center; justify-content: center; }
.tile.sm .t-pct { margin: 0; font-size: 12px; font-weight: 600; }
.tile.sm svg { margin: 0; width: 18px; height: 18px; }

/* List and tax amount */
.amount { padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.amount label { display: block; font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.amount h2 + p { margin-top: 4px; }
.amount-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 6px;
}
.prefix { font-weight: 600; color: var(--ink-2); }
#amount {
  width: 104px;
  height: 38px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--axis);
  border-radius: 8px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chips { display: flex; gap: 4px; }
.chips button {
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--raised);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.chips button:hover { background: var(--axis); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--page); font-weight: 600; }

.list { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 6px;
  border: 0;
  border-bottom: 1px solid var(--grid);
  background: none;
  text-align: left;
}
.row:hover, .row.hl { background: var(--wash); }
.row.on { background: var(--wash); box-shadow: inset 0 0 0 1px var(--axis); }
/* At the top level a row opens its category, so it carries a chevron. */
.row { position: relative; }
.row:not(.plain) { padding-right: 22px; }
.row:not(.plain)::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-top: 2px solid var(--ink-3);
  border-right: 2px solid var(--ink-3);
  transform: rotate(45deg);
}
.row.plain { grid-template-columns: minmax(0, 1fr) auto; }
.row.plain .row-icon { display: none; }
.row-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--c) var(--tint-hover), var(--plane));
}
.row-icon svg { width: 18px; height: 18px; }
.row-main { min-width: 0; }
.row-top {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tooltip .tip-top { margin-bottom: 4px; }
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 6px 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--axis);
}
.list-head > span:last-child { text-align: right; }
.list-head b { display: block; color: var(--ink); font-weight: 600; }
.list-head small { display: block; font-size: 12px; }
.row-name { display: block; font-size: 14px; font-weight: 500; line-height: 1.25; hyphens: auto; overflow-wrap: anywhere; }
.row-track { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--wash); overflow: hidden; }
.row-fill { display: block; height: 100%; border-radius: 2px; background: var(--c); transition: width 0.3s ease; }
.row-nums { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-amt { display: block; font-weight: 700; font-size: 15px; }
.pair { display: flex; justify-content: flex-end; gap: 10px; font-size: 12px; color: var(--ink-2); font-weight: 400; }
.list-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.list-total > span:last-child { text-align: right; }

/* Trends: a full-width band set like a text to read, with no boxes inside it. */
.trends-band { --plane: var(--surface); background: var(--surface); padding-block: 56px 64px; }
.trends-title { font-size: clamp(30px, 4.6vw, 56px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
.trends-intro { margin-top: 12px; max-width: 62ch; font-size: 18px; color: var(--ink-2); }
.trends h3 { margin: 44px 0 4px; font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.trends-text { max-width: 72ch; margin-top: 4px; }

.measures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
  margin-top: 18px;
}
.measures-four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.measures-four .measure-value { font-size: clamp(40px, 4.6vw, 64px); }
.measure { padding-top: 10px; border-top: 2px solid var(--ink); }
.measure-label { font-size: 14px; font-weight: 600; }
.measure-value { margin-top: 4px; font-size: clamp(44px, 6vw, 76px); font-weight: 700; line-height: 1.05; letter-spacing: -0.04em; }
.measure-detail { margin-top: 4px; font-size: 14px; color: var(--ink-2); max-width: 34ch; }

.share-table { margin-top: 18px; }
.share-head, .share-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(120px, 2fr) 62px 62px 86px 70px;
  column-gap: 12px;
  align-items: center;
}
.share-head { padding: 0 6px 8px; font-size: 13px; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.share-key { --c: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; position: relative; }
.share-key .share-dot { position: static; transform: none; flex: none; }
.share-key .share-dot.to { margin-left: 8px; box-shadow: none; }
.share-row {
  width: 100%;
  min-height: 44px;
  padding: 4px 6px;
  border: 0;
  border-bottom: 1px solid var(--grid);
  background: none;
  text-align: left;
}
.share-row:hover { background: var(--wash); }
.share-name { font-size: 14px; font-weight: 500; line-height: 1.25; }
.share-plot { position: relative; height: 14px; display: block; margin: 0 7px; }
.share-link { position: absolute; top: 6px; height: 2px; background: var(--c); }
.share-dot {
  position: absolute;
  top: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 2px solid var(--c);
  display: inline-block;
}
.share-dot.from { background: var(--plane); }
.share-dot.to { background: var(--c); box-shadow: 0 0 0 2px var(--plane); }
.share-num { text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.share-num.strong { font-weight: 700; }
.share-head .share-num { font-size: 13px; white-space: normal; }

.trends-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}
.trends-limits { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; max-width: 72ch; color: var(--ink-2); }

/* Notes and source */
.notes { color: var(--ink-2); font-size: 14px; padding-block: 40px 56px; }
.notes h2 { font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.notes ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; max-width: 80ch; }
.source-full { color: var(--ink); font-weight: 600; }

/* Tooltip */
.tooltip {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  max-width: 300px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--raised);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  pointer-events: none;
}
.tooltip b { display: block; font-size: 14px; line-height: 1.25; margin-bottom: 2px; }
.tooltip > span { display: block; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tooltip em { display: block; margin-top: 4px; font-style: normal; color: var(--ink-3); font-size: 12px; }

@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .map-card { position: static; }
  .map { height: 420px; }
}

/* On wide screens the headline and year bars share a row, so the chart is visible straight away. */
@media (min-width: 1000px) {
  .hero-row {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 40px;
    align-items: end;
  }
  .hero { padding-top: 0; }
  .hero-unit { font-size: clamp(20px, 2vw, 28px); }
  .plot-wrap { height: 150px; }
  .timeline-head { margin-bottom: 6px; }
  .page { gap: 18px; padding-top: 20px; }
}
@media (max-width: 999px) {
  .hero-row { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .measures-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .measures:not(.measures-four), .trends-columns { grid-template-columns: minmax(0, 1fr); }
  .share-head, .share-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 4px;
    padding: 10px 2px;
  }
  .share-head > span:first-child { display: none; }
  .share-head .share-key { grid-column: 1 / -1; }
  .share-name { grid-column: 1 / -1; }
  .share-plot { grid-column: 1 / -1; }
}

/* Phones: the chart comes quickly, and the year control is always in reach. */
@media (max-width: 600px) {
  :root { --gutter: 46px; }
  body { padding-bottom: 76px; }
  .wide-only { display: none; }
  .phone-only { display: inline; }
  .site-nav { padding: 4px; gap: 4px; border-radius: 12px; }
  .site-nav a { min-height: 46px; padding: 6px; font-size: 14px; }
  .site-nav svg { display: none; }
  .wrap { padding-inline: 16px; }
  .page { padding-block: 12px 28px; gap: 12px; }
  .top { flex-direction: column; gap: 8px; }
  h1 { font-size: 20px; gap: 10px; }
  .about { display: none; }
  .about.open { display: block; }
  .top-actions { width: 100%; }
  .top-actions .text-link { order: 3; margin-left: auto; margin-top: 0; font-size: 14px; }
  .top-actions .segmented button { min-width: 36px; min-height: 36px; padding: 0 6px; }
  .top-actions .icon-btn { width: 42px; height: 42px; }
  .hero { padding-top: 0; }
  .hero-label { font-size: 15px; gap: 2px 8px; }
  .hero-num { font-size: 60px; }
  .hero-unit { font-size: 20px; }
  .hero-sentence { margin-top: 6px; font-size: 16px; }
  .hero-foot { margin-top: 4px; font-size: 14px; }
  .hero-meta, .text-link { font-size: 14px; }
  .hero-row { gap: 10px; }
  .timeline-head { margin-bottom: 2px; }
  .stepper {
    position: fixed;
    z-index: 6;
    left: 50%;
    bottom: calc(10px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    align-items: center;
    padding: 4px;
    background: var(--raised);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  }
  .stepper .icon-btn { width: 44px; height: 44px; background: none; }
  .row-top { white-space: normal; }
  .step-year { display: block; min-width: 54px; font-size: 18px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
  .split { gap: 16px; }
  .map { height: 360px; }
  .share-head, .share-row { row-gap: 2px; padding: 6px 2px; }
  .share-row { min-height: 0; }
  .map-card { margin-inline: -8px; padding: 14px 12px; }
  .measure-switch { display: flex; width: 100%; }
  .measure-switch button { flex: 1 1 0; min-width: 0; padding: 0 2px; font-size: 13px; }
  .chart-controls { width: 100%; }
  .chart-controls .segmented { display: flex; width: 100%; }
  .chart-controls .segmented button { flex: 1 1 0; min-width: 0; justify-content: center; }
  .chart-type button { flex-direction: column; gap: 2px; min-height: 48px; font-size: 12.5px; padding: 4px 2px; }
  .map-hint { min-height: 0; }
  #yearHint { display: none; }
  .legend { margin-left: 0; }
  .plot-wrap { height: 92px; }
  .bar-col { padding: 0; }
  .bar { border-radius: 1px 1px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .series.draw { stroke-dashoffset: 0; }
}

@media (forced-colors: active) {
  .tile, .row, .bar { border: 1px solid CanvasText; }
  .row-fill { background: CanvasText; }
}
