/*
 * The reading pages.
 *
 * Deliberately separate from the app's stylesheet and deliberately plain HTML.
 * These exist to be *read* — by a person who wants to know how a 1962 season
 * is compared to a 2026 one, and by a crawler that will not run JavaScript to
 * find out. Putting them behind the React bundle would defeat both.
 *
 * Self-contained, so it cannot break when the app's build hashes change. It
 * shares the fonts and the tokens, and nothing else.
 */

@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display-variable.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Narrow";
  src: url("/fonts/archivo-narrow-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --surface-obsidian: #0b0c10;
  --surface-card: #14181e;
  --color-brass: #d4af37;
  --color-jade: #2a9d8f;
  --text-primary: #f8f9fa;
  --text-secondary: #95a5a6;
  --line-hairline: #2a3439;
  --line-hairline-lit: #3e4c54;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(44rem 34rem at 76% 4%, rgb(212 175 55 / 0.09) 0%, transparent 58%),
    var(--surface-obsidian);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: Inter, system-ui, sans-serif;
  /* Just under 1.125rem: long-form prose on a dark background wants a touch
     more size than interface copy, and a touch more line height. */
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  /* ~68 characters. Wider than this and the eye loses the line return on a
     dark background, which is where long reading actually falls apart. */
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* --- the masthead, and the way back --- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-hairline);
}

.wordmark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--color-brass); }

.label {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* --- headings --- */

h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0;
}

.standfirst {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 1.25rem 0 0;
}

.rule {
  width: 11rem;
  height: 1px;
  margin: 2rem 0;
  background: linear-gradient(90deg, var(--color-brass), rgb(212 175 55 / 0));
}

h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.25rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 2rem 0 0.25rem;
  color: var(--text-primary);
}

p { margin: 1rem 0; }

a { color: var(--color-brass); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text-primary); }

strong { color: var(--text-primary); font-weight: 600; }

ul, ol { padding-left: 1.25rem; }
li { margin: 0.5rem 0; }

/* --- the data voice, same as the board --- */

.data, table, .fig {
  font-family: "Archivo Narrow", "Arial Narrow", sans-serif;
  font-variant-numeric: tabular-nums;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--line-hairline);
  vertical-align: top;
}
th {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom-color: var(--line-hairline-lit);
}
td.num, th.num { text-align: right; padding-right: 0; color: var(--color-brass); }

/* Wide tables scroll inside themselves rather than pushing the page sideways. */
.scroller { overflow-x: auto; }

/* --- an aside, for the reasoning behind a number --- */

.note {
  margin: 1.75rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--surface-card);
  border-left: 2px solid var(--color-brass);
  border-radius: 2px;
  font-size: 1rem;
}
.note p { margin: 0.5rem 0; }
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

/* --- the call back into the game --- */

.cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--color-brass);
  color: var(--surface-obsidian);
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  min-height: 44px;
}
.cta:hover { color: var(--surface-obsidian); filter: brightness(1.08); }

.end {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-hairline);
}

.also {
  margin-top: 2.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.also a { display: inline-block; margin-right: 1.25rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
