:root {
  color-scheme: light;
  --plane: #f5f1e7;
  --surface: #fbf9f4;
  --ink: #17140f;
  --ink-2: #57514a;
  --muted: #857e72;
  --grid: #e6e0d2;
  --axis: #c9c1b1;
  --hairline: rgba(23, 20, 15, 0.12);
  --accent: #0e7c57;
  --accent-wash: rgba(14, 124, 87, 0.12);
  --gold: #b8860b;
  --blue: #2a78d6;
  --baseline: #857e72;
  --dead: #b9b1a2;
  --life-dead: #a59c8b;
  --tip-bg: #17140f;
  --tip-ink: #fbf9f4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --plane: #0f0e0c;
    --surface: #161512;
    --ink: #f1ede4;
    --ink-2: #c6c0b3;
    --muted: #8f887c;
    --grid: #2a2823;
    --axis: #3d3a33;
    --hairline: rgba(255, 255, 255, 0.12);
    --accent: #22a878;
    --accent-wash: rgba(34, 168, 120, 0.16);
    --gold: #c98500;
    --blue: #3987e5;
    --baseline: #8f887c;
    --dead: #4a463e;
  --life-dead: #7d766a;
    --tip-bg: #f1ede4;
    --tip-ink: #161512;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --plane: #0f0e0c;
  --surface: #161512;
  --ink: #f1ede4;
  --ink-2: #c6c0b3;
  --muted: #8f887c;
  --grid: #2a2823;
  --axis: #3d3a33;
  --hairline: rgba(255, 255, 255, 0.12);
  --accent: #22a878;
  --accent-wash: rgba(34, 168, 120, 0.16);
  --gold: #c98500;
  --blue: #3987e5;
  --baseline: #8f887c;
  --dead: #4a463e;
  --life-dead: #7d766a;
  --tip-bg: #f1ede4;
  --tip-ink: #161512;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: color-mix(in srgb, var(--plane) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: 13px;
}

.brand {
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand span {
  color: var(--accent);
}

.topbar nav {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar nav a {
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.topbar nav a:hover {
  color: var(--ink);
}

.theme-btn {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}

.guilloche {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.guilloche path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.6;
  opacity: 0.28;
}

.guilloche path.g2 {
  stroke: var(--gold);
  opacity: 0.3;
}

.hero-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 96px 24px 56px;
}

.kicker {
  margin: 0 0 22px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  max-width: 17em;
  font-size: clamp(38px, 6.4vw, 78px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.02em;
}

h1 .num {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent);
  white-space: nowrap;
}

.deck {
  max-width: 34em;
  margin: 28px 0 0;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.5;
  color: var(--ink-2);
}

.range-note {
  margin: 14px 0 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 56px 0 0;
  border-top: 1px solid var(--ink);
}

.kpi {
  padding: 18px 18px 4px 0;
  font-family: var(--sans);
}

.kpi + .kpi {
  padding-left: 18px;
  border-left: 1px solid var(--hairline);
}

.kpi .v {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.kpi .l {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-2);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

section {
  padding-top: 84px;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

h2 {
  margin: 0 0 18px;
  max-width: 20em;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.015em;
}

h3 {
  margin: 34px 0 8px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 650;
}

.prose {
  max-width: 36em;
}

.prose p {
  margin: 0 0 18px;
}

.prose b,
.prose strong {
  font-family: var(--sans);
  font-size: 0.92em;
  font-weight: 650;
}

.findings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.finding {
  padding-top: 16px;
  border-top: 2px solid var(--accent);
}

.finding .big {
  font-family: var(--sans);
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.finding p {
  margin: 8px 0 0;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

figure {
  margin: 30px 0 0;
  padding: 24px 24px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}

.fig-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 12px;
}

.fig-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
}

.fig-sub {
  margin: 4px 0 0;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-2);
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  background: var(--plane);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--sans);
}

.seg button {
  padding: 6px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--plane);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 2px 0 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.key-line {
  width: 22px;
  height: 0;
  border-top: 2.5px solid var(--accent);
}

.key-line.dash {
  border-top: 2.5px dashed var(--baseline);
}

.key-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.key-dot.gold {
  background: var(--gold);
}

.key-dot.off {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--dead);
}

.key-dot.base {
  background: var(--baseline);
}

.key-bar {
  width: 12px;
  height: 12px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}

.chart {
  position: relative;
  width: 100%;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart canvas {
  display: block;
  width: 100%;
}

svg text {
  font-family: var(--sans);
  fill: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

svg text.lab {
  fill: var(--ink-2);
  font-size: 12.5px;
}

svg text.strong {
  fill: var(--ink);
  font-weight: 650;
  font-size: 13px;
}

svg .gridline {
  stroke: var(--grid);
  stroke-width: 1;
}

svg .axisline {
  stroke: var(--axis);
  stroke-width: 1;
}

.readout {
  margin: 12px 0 0;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.readout b {
  color: var(--ink);
  font-weight: 650;
}

.fig-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.fig-foot .note {
  max-width: 46em;
}

.linkbtn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--axis);
  text-underline-offset: 3px;
  cursor: pointer;
}

.linkbtn:hover {
  color: var(--accent);
}

.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

td.wrap {
  white-space: normal;
  min-width: 13em;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

th.sortable {
  cursor: pointer;
}

th.sortable:hover {
  color: var(--ink);
}

td.num,
th.num {
  text-align: right;
  padding-right: 16px;
}

.player {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin: 6px 0 16px;
  font-family: var(--sans);
}

.play {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: var(--plane);
  font-size: 15px;
  cursor: pointer;
}

.player input[type="range"] {
  flex: 1 1 240px;
  accent-color: var(--accent);
}

.yearbig {
  flex: none;
  min-width: 2.6em;
  font-size: 40px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dots {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(auto-fill, minmax(15px, 1fr));
}

.dot {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  transition: background-color 0.25s, box-shadow 0.25s;
}

.dot.extra {
  background: var(--gold);
}

.dot.off {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--dead);
}

.dot:hover,
.dot:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.meter {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  align-items: center;
  gap: 8px 12px;
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-2);
}

.meter .track {
  height: 10px;
  border-radius: 5px;
  background: var(--grid);
  overflow: hidden;
}

.meter .fill {
  height: 100%;
  border-radius: 5px;
  background: var(--accent);
  transition: width 0.25s;
}

.meter .fill.base {
  background: var(--baseline);
}

.meter b {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.card {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}

.card h3 {
  margin-top: 0;
}

.rank-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 14.5px;
}

.rank-list li {
  display: grid;
  grid-template-columns: 1fr max-content;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--hairline);
}

.rank-list small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
}

.rank-list .age {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.caveats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 36px;
  margin-top: 24px;
}

.caveats div {
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}

.caveats h3 {
  margin: 0 0 6px;
}

.caveats p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.search {
  width: min(100%, 420px);
  padding: 10px 14px;
  border: 1px solid var(--axis);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
}

.explorer-meta {
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}

.pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--ink-2);
}

.pill.alive {
  border-color: var(--accent);
  color: var(--accent);
}

#tip {
  position: fixed;
  z-index: 50;
  max-width: 280px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--tip-bg);
  color: var(--tip-ink);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

#tip.on {
  opacity: 1;
}

#tip .t {
  font-weight: 650;
  font-size: 13px;
}

#tip .r {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

#tip .r b {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

#tip .k {
  display: inline-block;
  width: 12px;
  margin-right: 6px;
  vertical-align: middle;
  border-top: 2.5px solid var(--accent);
}

#tip .k.base {
  border-top-style: dashed;
  border-top-color: var(--baseline);
}

footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  border-top: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 860px) {
  body {
    font-size: 17.5px;
  }

  .topbar nav {
    display: none;
  }

  .hero-inner {
    padding: 64px 16px 40px;
  }

  main {
    padding: 0 16px 72px;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi + .kpi {
    padding-left: 0;
    border-left: 0;
  }

  .kpi {
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 14px;
  }

  .findings,
  .two,
  .caveats {
    grid-template-columns: 1fr;
  }

  figure {
    padding: 18px 14px 14px;
    border-radius: 12px;
  }

  section {
    padding-top: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .dot,
  .meter .fill {
    transition: none;
  }
}
