@font-face {
  font-family: Space Grotesk;
  src: url("../../fonts/SpaceGrotesk-VF-wght.woff2") format("woff2"),
       url("../../fonts/SpaceGrotesk-VF-wght.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff8e8;
  --card: #fffdf6;
  --ink: #070707;
  --muted: #4a4540;
  --rule: #d4cec1;
  --yellow: #ffd43b;
  --red: #ff4b32;
  --green: #68d391;
  --year: #245745;
  --wash: #deeadf;
  --price: #882a1b;
  --range-ink: #7e4300;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #212121;
  --card: #2a2a2a;
  --ink: #fff8e8;
  --muted: #d6d0c7;
  --rule: #5f5a51;
  --year: #aff0c7;
  --wash: #254435;
  --price: #ffad99;
  --range-ink: #ffe7a6;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 20px/1.5 "Space Grotesk", system-ui, sans-serif; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #126abd; outline-offset: 3px; }
button, summary { font: inherit; cursor: pointer; }

.wrap { width: min(100%, 1232px); margin-inline: auto; padding: 24px clamp(16px, 4vw, 48px) 42px; }
.top { display: flex; gap: 18px; justify-content: space-between; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--rule); }
.top > a { width: min(415px, 49%); }
.mark { display: block; width: 100%; height: auto; }
nav, footer { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
nav a, footer a { font-size: 16px; font-weight: 700; }
.theme { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--card); color: var(--ink); }
.theme-icon { width: 19px; height: 19px; display: block; }

.article-head { margin: clamp(34px, 6vw, 74px) 0 25px; max-width: 820px; }
h1 { font-size: clamp(54px, 9vw, 122px); font-weight: 700; letter-spacing: -.08em; line-height: .92; }
.standfirst { margin-top: 14px; font-size: clamp(24px, 3vw, 36px); line-height: 1.15; letter-spacing: -.035em; }
.prose { max-width: 725px; }
.prose p { margin-bottom: 16px; text-wrap: pretty; }
.opening { margin-bottom: 32px; }
.prose a { font-size: 17px; }
.sections { margin-top: 42px; }
.sections h2 { font-size: clamp(30px, 4vw, 45px); line-height: 1.05; letter-spacing: -.045em; margin-bottom: 14px; }
.ending { margin-top: 31px; padding: 24px 20px; background: var(--wash); border-left: 5px solid var(--green); }
.ending p:last-child { margin-bottom: 0; }

.timeline { background: var(--card); border: 1px solid var(--rule); }
.timeline-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 10px; padding: 20px 20px 8px; }
.timeline-head h2 { font-size: clamp(23px, 3vw, 34px); line-height: 1.05; letter-spacing: -.04em; }
.timeline-head p, figcaption { font-size: 16px; color: var(--muted); }
.timeline-head p { margin-top: 5px; }
.timeline-head .now-key { color: var(--year); font-weight: 700; font-size: 20px; }
.timeline-nav { display: flex; gap: 8px; padding: 4px 20px 10px; }
.timeline-nav[hidden] { display: none; }
.timeline-nav button { padding: 5px 10px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font-size: 16px; font-weight: 700; }
.timeline-nav button:hover { border-color: var(--ink); }
.timeline-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: var(--year) var(--card); }
.timeline-scroll:focus-visible { outline-offset: -3px; }
.chart { --name-width: 180px; min-width: 1020px; padding: 12px 20px 16px; }
.plot { position: relative; }
.price-grid, .price-plot, .year-axis, .year-guides { margin-left: var(--name-width); }
.year-guides { position: absolute; inset: 0; pointer-events: none; isolation: isolate; }
.guide { position: absolute; inset-block: 0; left: var(--x); width: 1px; background: var(--rule); }
.now-marker { position: absolute; inset-block: 0; left: var(--x); width: 3px; background: var(--year); }
.now-marker::before { position: absolute; inset: 0 -7px 0 -6px; content: ""; background: var(--wash); z-index: -1; }
.price-plot { position: relative; height: 236px; }
.price-lines { position: absolute; inset: 0; pointer-events: none; }
.price-line { position: absolute; top: var(--y); left: 0; right: 0; border-top: 1px solid var(--rule); }
.price-line b { position: absolute; right: calc(100% + 8px); transform: translateY(-52%); color: var(--muted); font-size: 16px; font-weight: 400; white-space: nowrap; }
.price-marker { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; transform: translate(-50%, -50%); background: var(--red); border: 1px solid var(--card); outline: 1px solid var(--price); }
.price-marker.contract { background: var(--card); outline: 2px solid var(--red); }
.price-marker.bound { transform: translate(-50%, -50%) rotate(45deg); }
.price-label { position: absolute; top: var(--label-y); left: calc(var(--x) + var(--dx)); transform: translateX(-50%); padding-inline: 4px; background: var(--card); color: var(--price); font-size: 20px; font-weight: 700; line-height: 1.08; text-align: center; white-space: nowrap; }
.price-label span { display: block; padding-top: 2px; color: var(--muted); font-size: 16px; font-weight: 500; }
.price-leader { position: absolute; left: var(--x); top: var(--from); height: var(--distance); width: 1px; background: var(--price); opacity: .56; }
.year-axis { position: relative; height: 36px; border-top: 1px solid var(--ink); }
.year-tick { position: absolute; left: var(--x); top: 5px; transform: translateX(-50%); color: var(--muted); font-size: 16px; }
.year-tick:first-child { transform: none; }
.year-tick:last-child { transform: translateX(-100%); }
.year-tick.current { color: var(--year); font-weight: 700; }
.media-row { position: relative; display: grid; grid-template-columns: var(--name-width) 1fr; min-height: 43px; border-top: 1px solid var(--rule); }
.medium { align-self: center; position: sticky; left: 0; width: max-content; max-width: var(--name-width); padding-right: 8px; z-index: 1; background: var(--card); font-size: 16px; font-weight: 700; }
.track { position: relative; }
.media-bar, .media-start { position: absolute; top: 81%; left: var(--x); transform: translateY(-50%); }
.media-start { width: 5px; height: 5px; transform: translate(-50%, -50%); background: var(--year); }
.media-bar { width: var(--width); height: 5px; background: var(--year); }
.media-bar.estimated { background: var(--yellow); height: 7px; }
.media-bar.range { height: 9px; border: 1px solid var(--range-ink); background: repeating-linear-gradient(120deg, var(--range-ink) 0 1px, var(--yellow) 1px 4px); }
.media-bar.dashed { height: 0; border-top: 2px dashed var(--year); background: transparent; }
.media-bar.off-chart::after { content: ""; position: absolute; left: 100%; top: 50%; transform: translateY(-50%); border: 5px solid transparent; border-left-color: var(--year); }
.media-caption { position: absolute; top: 2px; line-height: 1.16; left: var(--x); white-space: nowrap; color: var(--year); font-size: 16px; font-weight: 700; }
.media-caption.left { transform: translateX(-100%); }

figcaption { padding: 13px 20px; border-block: 1px solid var(--rule); }
.chart-data { padding: 13px 20px 18px; }
.chart-data summary { font-weight: 700; }
.chart-data h3 { font-size: 24px; line-height: 1.2; margin: 17px 0 8px; }
.chart-data p, .chart-data li, td, th { font-size: 17px; }
.chart-data ul { padding-left: 22px; margin: 7px 0 0; }
.chart-data li + li { margin-top: 6px; }
table { border-collapse: collapse; width: 100%; max-width: 820px; margin-bottom: 10px; }
th, td { padding: 6px 10px 6px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
td:last-child { white-space: nowrap; }
footer { border-top: 1px solid var(--rule); margin-top: 44px; padding-top: 17px; justify-content: space-between; }

@media (max-width: 520px) {
  .top { gap: 10px; padding-bottom: 16px; }
  .top > a { width: min(200px, 48%); }
  nav { gap: 8px; }
  .theme { width: 38px; height: 38px; }
  .timeline-head, .timeline-nav, figcaption, .chart-data { padding-inline: 12px; }
  table, th, td { font-size: 16px; }
}

.medium, .media-caption, .year-tick { font-size: 20px; }

.mobile-duration { display: none; }
@media (max-width: 600px) {
  .media-row { min-height: 54px; }
  .medium { min-width: 164px; padding: 4px 7px 5px 0; }
  .media-caption { display: none; }
  .mobile-duration { display: block; font-size: 16px; font-weight: 400; color: var(--muted); line-height: 1.16; }
  .media-bar, .media-start { top: 60%; }
}
