:root {
  --ink: #16150f;
  --ink-soft: #4a4740;
  --paper: #faf8f3;
  --rule: #ddd7c9;
  --accent: #8a2b1e;
  --accent-soft: #f0e6e2;
  --measure-wide: 60rem;
  --measure: 38rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece8df;
    --ink-soft: #a7a194;
    --paper: #15140f;
    --rule: #34312a;
    --accent: #e3836f;
    --accent-soft: #2a211e;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.62;
}

.wrap {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* masthead */

.masthead {
  border-bottom: 2px solid var(--ink);
  margin-bottom: 3rem;
}

.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 2rem;
  padding-top: 1.4rem;
  padding-bottom: 1.1rem;
}

.wordmark {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.masthead nav a {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.masthead nav a:hover { color: var(--accent); }
.masthead nav a.here { color: var(--ink); border-bottom-color: var(--accent); }

/* typography */

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
  max-width: 22ch;
  font-weight: 700;
}

.standfirst {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46rem;
  margin: 0 0 2.6rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--rule);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 3.4rem 0 1rem;
  max-width: 28ch;
  font-weight: 700;
}

h2::before {
  content: "";
  display: block;
  width: 3.5rem;
  border-top: 3px solid var(--accent);
  margin-bottom: 1.1rem;
}

h3 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 2.2rem 0 0.7rem;
  font-weight: 700;
}

p, ul, ol { max-width: var(--measure); }

p { margin: 0 0 1.15rem; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration: none; }

ul, ol { padding-left: 1.2rem; margin: 0 0 1.3rem; }
li { margin-bottom: 0.45rem; }

strong { font-weight: 700; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

/* components */

.lede p:first-of-type {
  font-size: 1.1rem;
}

.note {
  border-left: 3px solid var(--rule);
  padding: 0.2rem 0 0.2rem 1.2rem;
  margin: 1.8rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: var(--measure);
}

.sources {
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  max-width: var(--measure);
}

.sources h2 {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
}

.sources h2::before { display: none; }
.sources ol { padding-left: 1.1rem; }
.sources li { margin-bottom: 0.5rem; line-height: 1.45; }

.table-scroll { overflow-x: auto; margin: 2rem 0 2.4rem; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 42rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.88rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}

thead th {
  border-bottom: 2px solid var(--ink);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cards {
  display: grid;
  gap: 0;
  margin: 2.4rem 0 1rem;
  max-width: 52rem;
}

.card {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}

.card:last-child { border-bottom: 1px solid var(--rule); }

.card h3 { margin-top: 0; }
.card p { margin-bottom: 0.6rem; }

.card .more {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

/* footer */

.colophon {
  margin-top: 5rem;
  border-top: 2px solid var(--ink);
  padding: 2.2rem 0 3.5rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.colophon p { max-width: 40rem; margin-bottom: 0.5rem; }

.colophon .kicker {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.colophon .fine { font-size: 0.82rem; }

@media (max-width: 640px) {
  body { font-size: 18px; }
  .wrap { padding: 0 1rem; }
  .masthead { margin-bottom: 2rem; }
  .masthead nav { gap: 1rem; }
  table { min-width: 34rem; }
}
