:root {
  --ground: #F1F4F6;
  --surface: #FFFFFF;
  --surface-sunk: #E7ECEF;
  --ink: #141B21;
  --ink-soft: #3D4C57;
  --muted: #63737F;
  --rule: #D3DBE0;
  --rule-strong: #B3BFC7;
  --accent: #1F6C93;
  --effect: #0B6E5F;
  --held: #6E7E8A;
  --flag: #9E4A2A;
  --shadow: 0 1px 2px rgba(20, 27, 33, .06), 0 8px 24px -12px rgba(20, 27, 33, .18);

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0D1317;
    --surface: #141C22;
    --surface-sunk: #1B242B;
    --ink: #DEE6EB;
    --ink-soft: #B2C0C9;
    --muted: #8595A1;
    --rule: #26333B;
    --rule-strong: #38474F;
    --accent: #55A9CE;
    --effect: #45B49B;
    --held: #7C8C98;
    --flag: #D2794E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .7);
  }
}

:root[data-theme="dark"] {
  --ground: #0D1317;
  --surface: #141C22;
  --surface-sunk: #1B242B;
  --ink: #DEE6EB;
  --ink-soft: #B2C0C9;
  --muted: #8595A1;
  --rule: #26333B;
  --rule-strong: #38474F;
  --accent: #55A9CE;
  --effect: #45B49B;
  --held: #7C8C98;
  --flag: #D2794E;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

.wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.1rem, 4vw, 2rem) 6rem;
  display: flex;
  flex-direction: column;
  gap: 3.25rem;
}

.measure { max-width: 34rem; }

header { display: flex; flex-direction: column; gap: 1.1rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
}
.eyebrow b { color: var(--accent); font-weight: 500; }

h1 {
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

.standfirst {
  font-size: 1.16rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 38rem;
}

section { display: flex; flex-direction: column; gap: 1.1rem; }

h2 {
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -.011em;
  margin: 0;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule-strong);
}
h3 { font-size: 1.05rem; font-weight: 600; margin: 0; }
p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 1rem; }

code, .m { font-family: var(--mono); font-size: .84em; }
code { background: var(--surface-sunk); padding: .1em .34em; border-radius: 2px; }

a { color: var(--accent); }
a:focus-visible, .card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.scroll { overflow-x: auto; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  background: var(--surface);
  font-family: var(--mono);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}
caption {
  caption-side: top;
  text-align: left;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .6rem;
}
th, td {
  border: 1px solid var(--rule);
  padding: .7rem .8rem;
  text-align: left;
  vertical-align: top;
}
thead th {
  background: var(--surface-sunk);
  font-weight: 600;
  color: var(--ink-soft);
  font-size: .7rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
tbody th { background: var(--surface-sunk); font-weight: 600; }

.hit { color: var(--effect); }
.null { color: var(--held); }

footer {
  border-top: 1px solid var(--rule-strong);
  padding-top: 1.2rem;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.9;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
