@font-face { font-family: Noto; src: url(fonts/NotoSans-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Noto; src: url(fonts/NotoSans-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Noto; src: url(fonts/NotoSans-Black.ttf); font-weight: 900; font-display: swap; }

:root {
  color: #192e28;
  font-family: Noto, system-ui, sans-serif;
  background: #14211c;
  font-variant-numeric: tabular-nums;
  --paper: #f7f4ea;
  --ink: #192e28;
  --night: #172b25;
  --accent: #17675d;
  --accent-light: #9cd2ba;
  --muted: #52635a;
  --line: #d9d7c8;
  --peer: #b4ab99;
  --neighbor: #9aae9a;
  --reference: #64746e;
  --rust: #a3472d;
}

* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: .18em; }
button:focus-visible, a:focus-visible { outline: 3px solid #accc9a; outline-offset: 3px; }
#stage { position: fixed; width: 1920px; height: 1080px; transform-origin: 0 0; }
.slide { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 55px 86px 34px; gap: 28px; overflow: hidden; background: var(--paper);
  visibility: hidden; opacity: 0; transition: opacity .22s ease, visibility 0s .22s; }
.slide.active { visibility: visible; opacity: 1; z-index: 1; transition: opacity .22s ease; }
.chapter { color: var(--accent); font-size: 19px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, p, figure { margin: 0; }
h1 { font-size: 58px; font-weight: 900; line-height: 1.09; letter-spacing: -.037em; max-width: 1630px; margin-top: 8px; }
.subtitle { font-size: 27px; margin-top: 13px; line-height: 1.4; color: var(--muted); max-width: 1590px; }
.content { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; min-height: 0; min-width: 0; }
.content.split { grid-template-columns: minmax(0, 2.55fr) minmax(0, 1fr); gap: 63px; }
.content > * { min-width: 0; }
.slide footer { color: var(--muted); display: flex; justify-content: space-between; align-items: flex-end;
  column-gap: 32px; font-size: 17px; min-height: 24px; line-height: 1.35; }
.slide footer span:last-child { flex: none; }
.sources { display: flex; gap: 6px 21px; flex-wrap: wrap; }
.sidenotes { display: grid; gap: 36px; align-content: center; }
.metric { border-top: 2px solid var(--line); padding-top: 18px; }
.metric strong { display: block; color: var(--accent); font-size: 70px; line-height: 1.04; letter-spacing: -.05em; }
.metric strong.phrase { font-size: 46px; letter-spacing: -.035em; }
.metric p { font-size: 24px; line-height: 1.38; margin-top: 8px; }
.sidenotes.solo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 68px; max-width: 1500px; width: 100%; margin: auto; }
.solo .metric { padding-top: 35px; }
.solo .metric strong { font-size: 94px; }
.solo .metric p { font-size: 31px; }

.chart { display: grid; gap: 13px; padding: 10px 0; width: 100%; }
.bar-row { display: grid; grid-template-columns: minmax(220px, 27%) minmax(0, 1fr) 154px; gap: 21px; align-items: center;
  min-height: var(--row-height, 53px); font-size: 26px; }
.bar-row .label { line-height: 1.15; }
.bar-row strong { font-size: 28px; white-space: nowrap; }
.bar-row.focus .label, .bar-row.focus strong { color: var(--accent); font-weight: 900; }
.bar-track { height: 32px; position: relative; background: #eeebdf; }
.bar-track i { background: var(--peer); position: absolute; top: 0; bottom: 0; border-radius: 2px; width: var(--width); left: var(--left);
  transform: scaleX(0); transform-origin: var(--origin); transition: transform .55s ease-out var(--delay); }
.active .bar-track i, .preview .bar-track i, .print .bar-track i { transform: none; }
.bar-row.focus .bar-track i { background: var(--accent); }
.bar-row.neighbor .bar-track i { background: var(--neighbor); }
.bar-row.reference .bar-track i { background: var(--reference); }
.bar-row.alert .bar-track i { background: var(--rust); }
.bar-row.alert .label, .bar-row.alert strong { color: var(--rust); font-weight: 700; }
.bar-track .zero { position: absolute; bottom: -6px; top: -6px; width: 2px; background: #586c62; }

.rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 46px; width: 100%; align-content: center; }
.rank-item { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; border-top: 2px solid var(--line); padding-top: 14px; font-size: 26px; }
.rank-item .rank-label { color: var(--ink); line-height: 1.25; }
.rank-item strong { font-size: 36px; font-weight: 900; color: var(--muted); white-space: nowrap; }
.rank-item.top strong, .rank-item.top .rank-label { color: var(--accent); font-weight: 900; }
.rank-item.mid strong { color: var(--ink); }

.map, .timeline { width: 100%; height: 100%; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.map img, .timeline img { width: 100%; height: 100%; min-height: 0; object-fit: contain; display: block; }
.timeline { position: relative; background: #efeada; }
.timeline-controls { position: absolute; bottom: 24px; left: 24px; display: flex; gap: 14px; align-items: center; }
.timeline-controls output { font-weight: 900; font-size: 35px; color: white; background: var(--night); padding: 5px 14px; }
.timeline-controls button { font-size: 19px; color: var(--night); background: var(--paper); border: 1px solid var(--line); padding: 10px 16px; }
.legend { font-size: 20px; display: grid; gap: 10px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 12px; }
.legend i { display: block; flex: none; width: 35px; height: 8px; background-color: var(--swatch); }
.legend i.swatch { width: 22px; height: 22px; border-radius: 3px; border: 1px solid #00000018; }
.legend i.diamond { width: 14px; height: 14px; margin: 0 4px; transform: rotate(45deg); }
.legend i.dashed { height: 0; background: none; border-top: 4px dashed var(--swatch); }
.legend i.dotted { height: 0; background: none; border-top: 4px dotted var(--swatch); }

.cover { isolation: isolate; background: var(--night); color: var(--paper); }
.cover .cover-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cover::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #112c25fa 0%, #112c25ec 30%, #112c25ad 54%, #112c2514 91%); }
.cover .chapter { color: var(--accent-light); }
.cover .content { align-content: center; padding-bottom: 30px; }
.cover h1 { font-size: 165px; letter-spacing: -.072em; line-height: .99; }
.cover .subtitle { color: #e1eddf; max-width: 810px; font-size: 40px; margin-top: 26px; }
.cover footer { color: #d4e0d4; }
.close { background: var(--night); color: var(--paper); }
.close .chapter, .close .metric strong { color: var(--accent-light); }
.close .subtitle, .close footer { color: #d9e4d7; }
.close h1 { font-size: 87px; line-height: 1.08; max-width: 1430px; }
.close .metric { border-top-color: #4e675d; }
.summary-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.summary-list li { border-top: 2px solid var(--line); padding-top: 15px; font-size: 27px; line-height: 1.28; }
.summary-list strong { display: inline-block; color: var(--accent); min-width: 260px; font-size: 28px; }
.roadmap .summary-list strong { display: block; margin-bottom: 8px; font-size: 37px; }
.signature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 85px; }
.signature .whole { font-size: 185px; line-height: .95; color: var(--accent); font-weight: 900; letter-spacing: -.07em; }
.signature .whole span { font-size: .46em; color: var(--muted); letter-spacing: -.025em; }
.signature .whole-label { max-width: 700px; font-size: 34px; margin-top: 18px; line-height: 1.25; }
.signature .tiles { display: grid; grid-template-columns: repeat(11, 1fr); gap: 11px; padding-bottom: 22px; }
.signature .tiles i { aspect-ratio: 1; background: #ddd8c6; border-radius: 3px; }
.signature .tiles i.on { background: var(--accent); }

#controls { position: fixed; z-index: 5; bottom: 10px; right: 12px; display: flex; align-items: center;
  padding: 4px; gap: 3px; background: #172b25ef; color: white; border-radius: 5px; opacity: 0; transition: opacity .2s; }
#controls:hover, #controls:focus-within, body.controls-visible #controls { opacity: 1; }
#controls button { font-size: 15px; background: transparent; color: white; border: 0; border-radius: 3px; padding: 5px 9px; }
#controls button:hover { background: #425a4f; }
#position { font: 13px Noto, sans-serif; min-width: 50px; text-align: center; }
.preview #controls, .print #controls, .print .timeline-controls button { display: none; }
@media (pointer: coarse) { #controls { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; } }
@page { size: 20in 11.25in; margin: 0; }
@media print {
  html, body { background: white; overflow: visible; }
  #stage { position: static; transform: none !important; height: auto; }
  #controls, .timeline-controls button { display: none; }
  .slide { position: relative; width: 1920px; height: 1080px; page-break-after: always; break-inside: avoid;
    visibility: visible; opacity: 1; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .slide:last-child { page-break-after: auto; }
  .bar-track i { transform: none; }
}
