/* Psst. Tokens and rules come from DESIGN.md. */
:root {
  --ink: #141210;
  --paper: #FAF7EE;
  --hivis: #FFD400;
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: #4A463F;
  --rule: var(--ink);
  --display: "Archivo", "Arial Black", sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --measure: 62ch;
  --gap-section: 40px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: var(--ink); --fg: var(--paper); --muted: #C9C3B4; --rule: var(--paper); }
}
@media (min-width: 720px) { :root { --gap-section: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.125rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: calc(var(--measure) + 32px); margin: 0 auto; padding: 0 16px; }

/* Header: the wordmark is the only navigation the site needs. */
.site-header { padding-top: 20px; padding-bottom: 8px; }
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 900 1.75rem/1 var(--display); letter-spacing: -0.02em;
  color: var(--fg); text-decoration: none;
}

h1, h2, h3 { font-family: var(--display); font-weight: 900; word-spacing: 0.06em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.2rem + 4.6vw, 3.6rem); line-height: 1.04; }
h2 { font-size: clamp(1.3rem, 1rem + 1vw, 1.65rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.lede { font-size: 1.25rem; color: var(--muted); }

/* The highlighter pass. On ink it becomes a full block so ink letters stay visible. */
mark {
  color: var(--ink);
  background: linear-gradient(transparent 30%, var(--hivis) 30%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 0.04em;
}
@media (prefers-color-scheme: dark) {
  mark { background: var(--hivis); padding: 0 0.12em; }
}

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }

main > section { padding: var(--gap-section) 0; border-top: 2px solid var(--rule); }
main > section:first-child { border-top: 0; padding-top: 24px; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }

/* Source tag: every fact carries its citation and the date it was checked. */
.tag {
  display: inline-flex; align-items: center; min-height: 44px;
  border: 1.5px solid currentColor; padding: 4px 10px;
  font: 500 0.875rem/1.3 var(--body); text-decoration: none; color: var(--fg);
}
a.tag:hover { background: var(--fg); color: var(--bg); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.kicker { font-weight: 700; font-size: 0.95rem; color: var(--muted); }

/* Where to watch: plain words, no brand logos. */
.channels { list-style: none; margin: 0; padding: 0; }
.channels li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; min-height: 52px; border-top: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); }
.channels a, .channels .soon-handle { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.soon { font-size: 0.875rem; font-weight: 500; color: var(--muted); }

.tip-card h3 a { text-decoration: none; }
.tip-card h3 a:hover { text-decoration: underline; }

ol.upcoming { margin: 0; padding-left: 1.4em; }
ol.upcoming li + li { margin-top: 8px; }

/* Numbers table on the tip page. */
.numbers { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.numbers th, .numbers td { text-align: left; padding: 10px 8px 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); }
.numbers th { font-weight: 700; }
.numbers td:last-child, .numbers th:last-child { text-align: right; padding-right: 0; }

.notice {
  margin: 0; padding: 16px; border: 2px solid var(--fg);
  font-weight: 700; font-size: 1rem;
}

.sources { margin: 0; padding-left: 1.2em; }
.sources li + li { margin-top: 8px; }

.site-footer { padding-bottom: 48px; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap > :first-child { border-top: 2px solid var(--rule); padding-top: 24px; }
.site-footer p + p { margin-top: 8px; }
