/* ==========================================================================
   Politics for Sports Fans
   Pennant brand: felt-pennant red, scorebook blue, cream program paper.
   Typefaces are open source (SIL OFL): Alfa Slab One for display,
   Inter for text. All marks and icons are original.
   ========================================================================== */

/* ---------- Fonts (self-hosted, Latin subset) ---------- */
/* Alfa Slab One ships one weight. Display rules pin font-weight: 400 so
   browsers never fake a bold. */
@font-face {
  font-family: "Alfa Slab One";
  src: url("/assets/fonts/alfa-slab-one-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallback keeps text from jumping when Inter loads. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.49%;
  descent-override: 22.56%;
  line-gap-override: 0%;
  size-adjust: 107.06%;
}

/* ---------- Tokens ---------- */
:root {
  --font-display: "Alfa Slab One", Rockwell, "Roboto Slab", Georgia, serif;
  --font-serif: var(--font-display);
  --font-sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Light: cream program paper, ink rules. Text pairs pass 4.5:1. */
  --bg: #f4ecdb;
  --surface: #fffaf0;
  --text: #1d1b17;
  --text-muted: #5c5446;
  --border: #d8ccb0;
  --border-strong: #8f8270;
  --rule: #1d1b17;
  --accent: #a6261f;          /* pennant red */
  --on-accent: #fff8ec;
  --accent-2: #1b6aaf;        /* scorebook blue */
  --link: #1b6aaf;
  --focus: #1b6aaf;
  --button-bg: #1b6aaf;
  --button-text: #ffffff;
  --shadow: #1d1b17;          /* offset print shadow */

  /* Card tiles. Dots and the pennant mark sit on top in cream. */
  --tile-peach: #a6261f;
  --tile-cactus: #1b6aaf;
  --tile-heather: #1d1b17;
  --tile-oat: #b8892e;
  --tile-line: rgb(255 248 236 / 0.38);

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --gutter: 16px;
  --measure: 42rem;
  --header-h: 64px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #191613;
    --surface: #24201b;
    --text: #f4ecdb;
    --text-muted: #c4b9a2;
    --border: #3a342c;
    --border-strong: #7d7262;
    --rule: #d8ccb0;
    --accent: #ef7a6f;
    --on-accent: #191613;
    --accent-2: #7bb7f5;
    --link: #7bb7f5;
    --focus: #7fb2ee;
    --button-bg: #7bb7f5;
    --button-text: #191613;
    --shadow: #a6261f;
    --tile-peach: #8c2a23;
    --tile-cactus: #1f5a91;
    --tile-heather: #2e2924;
    --tile-oat: #7a6230;
    --tile-line: rgb(255 248 236 / 0.28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #191613;
  --surface: #24201b;
  --text: #f4ecdb;
  --text-muted: #c4b9a2;
  --border: #3a342c;
  --border-strong: #7d7262;
  --rule: #d8ccb0;
  --accent: #ef7a6f;
  --on-accent: #191613;
  --accent-2: #7bb7f5;
  --link: #7bb7f5;
  --focus: #7fb2ee;
  --button-bg: #7bb7f5;
  --button-text: #191613;
  --shadow: #a6261f;
  --tile-peach: #8c2a23;
  --tile-cactus: #1f5a91;
  --tile-heather: #2e2924;
  --tile-oat: #7a6230;
  --tile-line: rgb(255 248 236 / 0.28);
  color-scheme: dark;
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
[hidden] { display: none !important; }
li:has(> [hidden]) { display: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--button-bg); color: var(--button-text);
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(var(--measure) + var(--gutter) * 2); }

/* ---------- Buttons and chips ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--button-bg); border-radius: var(--radius-sm);
  background: var(--button-bg); color: var(--button-text);
  font: 500 0.9375rem/1.2 var(--font-sans);
  text-decoration: none; cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.button:hover { opacity: 0.88; }
.button--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.button--ghost:hover { opacity: 1; background: var(--surface); }

.chip {
  display: inline-flex; align-items: center;
  min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--text);
  font: 500 0.875rem/1.2 var(--font-sans);
  text-decoration: none; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.chip:hover { border-color: var(--border-strong); background: var(--surface); }
.chip[aria-current] { background: var(--button-bg); color: var(--button-text); border-color: var(--button-bg); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__mark { flex: none; }
.brand__name { font-family: var(--font-serif); font-size: 1.1875rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav ul { list-style: none; display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px;
  border-radius: var(--radius-sm); text-decoration: none; font-size: 0.9375rem; font-weight: 500; color: var(--text-muted);
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); background: var(--surface); }
.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: 4px;
  border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer;
}
.theme-toggle:hover { background: var(--surface); border-color: var(--border-strong); }
.icon--sun { display: none; }
:root[data-theme="dark"] .icon--sun { display: block; }
:root[data-theme="dark"] .icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon--sun { display: block; }
  :root:not([data-theme="light"]) .icon--moon { display: none; }
}
@media (max-width: 479px) {
  .brand__name { font-size: 1.0625rem; max-width: 9.5em; }
  .site-nav a { padding-inline: 8px; }
}

/* ---------- Page intro ---------- */
.page-intro { padding-block: 40px 32px; }
.page-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);
  line-height: 1.04; letter-spacing: -0.025em;
}
.page-subtitle { margin-top: 16px; max-width: 38rem; font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); color: var(--text-muted); }
.eyebrow { margin-bottom: 12px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.section-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); letter-spacing: -0.015em; margin: 56px 0 24px; }
.empty { padding: 32px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-muted); }
.empty a { color: var(--link); }

/* ---------- Listing (home, archive, category) ---------- */
.listing { display: grid; grid-template-areas: "intro" "rail" "main"; padding-bottom: 80px; }
.listing > .page-intro { grid-area: intro; }
.listing__main { grid-area: main; min-width: 0; padding-top: 32px; }
.rail { grid-area: rail; display: grid; gap: 24px; }
.rail__heading { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.rail .follow-card { display: none; }
@media (min-width: 1024px) {
  .listing { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "rail intro" "rail main"; grid-template-rows: auto 1fr; column-gap: 64px; }
  .listing__main { padding-top: 0; }
  .rail { align-self: start; position: sticky; top: calc(var(--header-h) + 40px); padding-top: 56px; }
  .rail .chips { flex-direction: column; align-items: flex-start; }
  .rail .follow-card { display: block; }
  .listing .page-intro { padding-top: 48px; }
}
.listing__main > .follow-card { margin-top: 56px; }

.follow-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.follow-card__title { font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem; line-height: 1.2; margin-bottom: 8px; }
.follow-card p { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 16px; }

.view-more { margin-top: 40px; display: flex; justify-content: center; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 48px; color: var(--text-muted); font-size: 0.9375rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-strong); }
@media (prefers-reduced-motion: no-preference) { .card:hover { transform: translateY(-2px); } }
.card:focus-within { border-color: var(--text); }
.card__meta { display: flex; justify-content: space-between; gap: 12px; padding: 2px 6px 0; font-size: 0.8125rem; color: var(--text-muted); }
.card__label { font-weight: 600; color: var(--text); }
.card__tile { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--tile-oat); }
.card__tile img, .card__tile picture { width: 100%; height: 100%; object-fit: cover; }
.card__field {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 17%, var(--tile-line) 17% calc(17% + 1.5px), transparent calc(17% + 1.5px)),
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1.5px), var(--tile-line) calc(10% - 1.5px) 10%);
}
.tile--peach { background: var(--tile-peach); }
.tile--cactus { background: var(--tile-cactus); }
.tile--heather { background: var(--tile-heather); }
.tile--oat { background: var(--tile-oat); }
.card__body { padding: 0 6px 6px; }
.card__title { font-family: var(--font-serif); font-weight: 400; font-size: 1.375rem; line-height: 1.22; letter-spacing: -0.01em; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__title a:focus-visible { outline: none; }
.card:hover .card__title a { text-decoration: underline; text-decoration-color: var(--border-strong); }
.card__summary { margin-top: 12px; color: var(--text-muted); }

.card--featured { padding: 16px; }
.card--featured .card__title { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.12; letter-spacing: -0.02em; }
@media (min-width: 800px) {
  .card--featured { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 32px; row-gap: 0; }
  .card--featured .card__tile { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: 4 / 3; }
  .card--featured .card__meta { grid-column: 2; padding-top: 12px; }
  .card--featured .card__body { grid-column: 2; align-self: end; padding: 24px 8px 12px; }
}

/* ---------- Article ---------- */
.breadcrumb { padding-top: 32px; font-size: 0.875rem; color: var(--text-muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--border-strong); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

.post__header { max-width: 60rem; padding-block: 24px 40px; }
.post__title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
  line-height: 1.06; letter-spacing: -0.025em;
}
.post__lede {
  margin-top: 20px; max-width: 46rem;
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem); line-height: 1.45; color: var(--text-muted);
}

.post__layout { display: grid; gap: 32px; padding-bottom: 72px; }
.post__aside { display: grid; gap: 24px; padding-block: 20px; border-block: 1px solid var(--border); }
.post__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px 24px; margin: 0; }
.post__facts dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.post__facts dd { margin: 4px 0 0; font-size: 0.9375rem; }
.post__facts a { text-decoration: none; }
.post__facts a:hover { text-decoration: underline; }
.aside-heading { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }

@media (min-width: 1024px) {
  .post__layout { grid-template-columns: 220px minmax(0, var(--measure)); justify-content: start; column-gap: 56px; }
  .post__main { grid-column: 2; grid-row: 1; }
  .post__aside {
    grid-column: 1; grid-row: 1; align-self: start;
    position: sticky; top: calc(var(--header-h) + 32px);
    display: flex; flex-direction: column; gap: 24px;
    max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    padding-block: 0; border: 0;
  }
  /* Rail order on wide screens: chapters, progress, share, then details. */
  .post__aside .toc { order: 1; }
  .post__aside .progress { order: 2; }
  .post__aside .share { order: 3; }
  .post__aside .post__facts { order: 4; }
  .post__facts { grid-template-columns: 1fr; gap: 0; }
  .post__facts > div { padding-block: 12px; border-top: 1px solid var(--border); }
  .progress, .share { padding-top: 16px; border-top: 1px solid var(--border); }
  .share__list { flex-direction: column; gap: 8px; }
}

.post__hero { margin: 0 0 40px; }
.post__hero img { width: 100%; border-radius: var(--radius-lg); }
.post__hero figcaption, .prose figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--text-muted); }
.post__syndication { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.9375rem; color: var(--text-muted); }
.post__syndication a { color: var(--link); }

.related { padding-block: 8px 96px; border-top: 1px solid var(--border); }

/* ---------- Prose (Markdown output) ---------- */
.prose { max-width: var(--measure); font-size: 1.125rem; line-height: 1.72; }
.prose > * + * { margin-top: 1.25em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.prose h2 { font-size: 1.875rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.4375rem; margin-top: 1.8em; }
.prose h4 { font-size: 1.1875rem; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose .header-anchor {
  position: relative; display: inline-flex; vertical-align: middle; margin-left: 0.3em; padding: 4px; border-radius: 6px;
  color: var(--text-muted); opacity: 0; transition: opacity 0.15s ease, color 0.15s ease;
}
.prose :is(h2, h3):hover .header-anchor, .prose .header-anchor:focus-visible, .prose .header-anchor.is-copied { opacity: 1; }
.prose .header-anchor:hover { color: var(--accent); background: var(--surface); }
.prose .header-anchor.is-copied::after {
  content: "Link copied"; position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%);
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0;
  background: var(--button-bg); color: var(--button-text);
}
/* No hover on touch screens, so keep the icon faintly visible. */
@media (hover: none) { .prose .header-anchor { opacity: 0.45; } }
.prose a { color: var(--link); }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--text-muted); }
.prose blockquote {
  margin-inline: 0; padding: 0.2em 0 0.2em 1.25em; border-left: 3px solid var(--accent);
  font-family: var(--font-serif); font-size: 1.3125rem; line-height: 1.5; font-style: italic;
}
.prose blockquote p + p { margin-top: 0.8em; }
.prose figure { margin-inline: 0; }
.prose img { border-radius: var(--radius); }
.prose hr { border: 0; height: 1px; background: var(--border); margin-block: 3em; }
.prose code { font-family: var(--font-mono); font-size: 0.875em; padding: 0.15em 0.35em; border-radius: 6px; background: var(--surface); }
.prose pre { overflow-x: auto; padding: 16px 20px; border-radius: var(--radius); background: var(--surface); font-size: 0.9375rem; line-height: 1.5; }
.prose pre code { padding: 0; background: none; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; border-bottom-color: var(--border-strong); }
.prose .note { padding: 16px 20px; border-radius: var(--radius); background: var(--surface); font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 56px 32px; font-size: 0.9375rem; background: var(--surface); }
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-footer__brand { grid-column: 1 / -1; }
.site-footer__tagline { margin-top: 12px; max-width: 22rem; color: var(--text-muted); }
.site-footer__heading { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer__legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.8125rem; color: var(--text-muted); }
@media (min-width: 800px) {
  .site-footer__grid { grid-template-columns: 2fr; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .site-footer__brand { grid-column: auto; }
}

/* ---------- Basic pages ---------- */
.page-basic .page-intro { padding-top: 56px; }
.page-basic .prose { padding-bottom: 96px; }
.page-basic main > .narrow > p .button { margin: 0 8px 8px 0; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .post__aside .share, .related, .skip-link, .rail { display: none !important; }
  body { background: #fff; color: #000; }
  .prose a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  .post__layout { display: block; }
}

/* ---------- Article rail: chapters, progress, share ---------- */
.toc__list, .toc__sub { list-style: none; margin: 0; padding: 0; }
.toc__list { border-left: 1px solid var(--border); }
.toc a {
  display: block; margin-left: -1px; padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  font-size: 0.875rem; line-height: 1.35; color: var(--text-muted); text-decoration: none;
}
.toc__sub a { padding-left: 28px; font-size: 0.8125rem; }
.toc a:hover { color: var(--text); }
.toc a[aria-current] { color: var(--text); font-weight: 600; border-left-color: var(--accent); }

.progress__bar { display: flex; align-items: center; gap: 10px; }
.progress__bar[hidden] { display: none; }
.progress__track { flex: 1; height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress__fill { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.progress__pct { min-width: 4ch; text-align: right; font-size: 0.75rem; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.progress__time { margin-top: 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }

.share__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.share__link {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 0.875rem; color: var(--text);
  text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px;
}
.share__link:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.share__link[hidden] { display: none; }

/* Small screens: the progress bar becomes a thin line across the top of the window. */
@media (max-width: 1023.98px) {
  .progress__bar { position: fixed; inset: 0 0 auto 0; z-index: 100; }
  .progress__track { height: 3px; border-radius: 0; background: transparent; }
  .progress__pct { display: none; }
  .progress__time { margin-top: 0; }
}

/* ---------- Explainers ---------- */
.prose { display: flow-root; }
.prose .explainer {
  padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface); font-size: 0.9375rem; line-height: 1.55;
}
.explainer__label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.explainer__term { margin-top: 2px; font-family: var(--font-serif); font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.explainer__body { margin-top: 6px; color: var(--text-muted); }
.explainer__body > * + * { margin-top: 0.6em; }

/* Three columns: chapters rail, article, explainers. Notes float into the right column. */
@media (min-width: 1280px) {
  .post__layout { --note-w: 260px; --note-gap: 48px; grid-template-columns: 220px minmax(0, var(--measure)) var(--note-w); column-gap: var(--note-gap); }
  .prose .explainer {
    float: right; clear: right; width: var(--note-w);
    margin: 0.35em calc(-1 * (var(--note-w) + var(--note-gap))) 1.25em 0;
    padding: 2px 0 2px 14px; border-left-width: 2px; border-radius: 0; background: none;
    font-size: 0.875rem;
  }
}

/* ---------- Predictions ---------- */
.predictions-record { font-size: 1.25rem; }
.prediction-event__meta { color: var(--text-muted); font-size: 1rem; }
.prose .predictions-table { display: table; }
.predictions-table td:nth-child(3) { font-variant-numeric: tabular-nums; }
.predictions-table sup { font-size: 0.7em; margin-left: 2px; }
.predictions-table sup a { text-decoration: none; }
.grade { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; border: 1px solid var(--border-strong); }
.grade--pending { color: var(--text-muted); }
.grade--hit { background: var(--tile-cactus); color: #141413; border-color: transparent; }
.grade--miss { background: var(--tile-peach); color: #141413; border-color: transparent; }
.predictions-notes { font-size: 0.9375rem; color: var(--text-muted); padding-left: 1.4em; }

/* ==========================================================================
   Pennant brand layer
   Restyles the layout above without changing its structure.
   ========================================================================== */
html { scroll-padding-top: calc(var(--header-h) + 32px); }

/* ---------- Display type ---------- */
.brand__name, .page-title, .post__title, .section-title, .card__title,
.follow-card__title, .prose h2, .explainer__term {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0;
}
.brand__name { font-size: 1.25rem; }
.page-title, .post__title { line-height: 1.06; }
.prose h2 { font-size: 1.75rem; line-height: 1.15; }
.prose h3, .prose h4 { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.3125rem; color: var(--accent); }
.post__lede { font-family: var(--font-sans); font-style: normal; }

/* Labels read like a game program: tracked caps in pennant red. */
.eyebrow, .rail__heading, .aside-heading, .explainer__label, .site-footer__heading {
  font-weight: 800; letter-spacing: 0.16em; color: var(--accent);
}

/* ---------- Halftone strips (pure CSS, no image requests) ---------- */
.site-header::before, .site-footer::before {
  content: ""; display: block; height: 10px;
  background-color: var(--strip, #a6261f);
  background-image: radial-gradient(rgb(255 248 236 / 0.45) 1.3px, transparent 1.5px);
  background-size: 7px 7px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--bg);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 3px solid var(--rule);
}
.site-nav a { min-height: 44px; color: var(--text); font-weight: 700; }
.site-nav a:hover { background: var(--surface); }
.site-nav a[aria-current] {
  background: none;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 3px; text-underline-offset: 0.4em;
}
.theme-toggle { width: 44px; height: 44px; border: 2px solid var(--rule); }
.theme-toggle:hover { border-color: var(--rule); }

/* ---------- Buttons and chips ---------- */
.button {
  border: 2px solid var(--rule); font-weight: 700;
  box-shadow: 3px 3px 0 var(--shadow);
}
.button:hover { opacity: 1; }
.button--ghost { background: var(--surface); color: var(--text); border-color: var(--rule); }
@media (prefers-reduced-motion: no-preference) {
  .button { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
}
.chip { border: 2px solid var(--border-strong); border-radius: var(--radius-sm); font-weight: 600; }
.chip:hover { border-color: var(--rule); }
.chip[aria-current] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- Cards ---------- */
.card { border: 2px solid var(--rule); background: var(--surface); }
.card:hover { border-color: var(--rule); box-shadow: 6px 6px 0 var(--accent); }
.card:focus-within { border-color: var(--rule); box-shadow: 6px 6px 0 var(--accent-2); }
.card__label {
  display: inline-block; padding: 3px 18px 3px 10px;
  background: var(--accent); color: var(--on-accent);
  font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 84% 50%, 100% 100%, 0 100%);
}
.card__meta { align-items: center; }
.card__tile { border: 2px solid var(--rule); border-radius: var(--radius-sm); }
.card__field { background: radial-gradient(var(--tile-line) 1.6px, transparent 1.8px) 0 0 / 10px 10px; }
.card__field::after {
  content: ""; position: absolute; inset: 0; opacity: 0.9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Crect x='2' y='0' width='5' height='60' rx='2' fill='%23fff8ec'/%3E%3Cpath d='M8 5 96 30 8 55Z' fill='none' stroke='%23fff8ec' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") center / 34% no-repeat;
}

/* ---------- Follow card as a ticket ---------- */
.follow-card { border: 2px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface); }
.follow-card::before {
  content: "Admit one"; content: "Admit one" / "";
  display: block; margin-bottom: 8px;
  font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent);
}
.follow-card p { padding-bottom: 16px; border-bottom: 2px dashed var(--border-strong); }

/* ---------- Article ---------- */
.breadcrumb a:hover { color: var(--accent); }
.toc a[aria-current] { border-left-color: var(--accent); border-left-width: 3px; }
.progress__track { height: 10px; border: 2px solid var(--rule); border-radius: 0; background: var(--surface); }
.progress__fill { background: var(--accent); }
@media (max-width: 1023.98px) {
  .progress__track { height: 4px; border: 0; background: transparent; }
}
.post__hero img { border: 2px solid var(--rule); border-radius: var(--radius-sm); }
.related { border-top: 3px solid var(--rule); }
.prose hr { height: 3px; background: var(--rule); }

.prose blockquote {
  margin-right: 6px; padding: 20px 24px;
  border: 2px solid var(--rule); border-radius: var(--radius-sm);
  background: var(--button-bg); color: var(--button-text);
  box-shadow: 6px 6px 0 var(--accent);
  font-family: var(--font-display); font-style: normal; font-size: 1.375rem; line-height: 1.35;
}
.prose blockquote a { color: inherit; }

.prose .explainer {
  border: 2px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface);
}
.explainer__body { color: var(--text); }
@media (min-width: 1280px) {
  .prose .explainer {
    padding: 14px 16px; border: 2px solid var(--rule); border-radius: var(--radius-sm);
    background: var(--surface);
  }
}

/* ---------- Footer: ink panel in both themes ---------- */
.site-footer {
  --bg: #16130f;
  --surface: #2a251f;
  --text: #f4ecdb;
  --text-muted: #c4b9a2;
  --border: #3a342c;
  --border-strong: #7d7262;
  --rule: #f4ecdb;
  --accent: #ef7a6f;
  --on-accent: #191613;
  --accent-2: #7bb7f5;
  --link: #7bb7f5;
  --focus: #7fb2ee;
  --strip: #1b6aaf;
  padding-top: 0; border-top: 0;
  background: var(--bg); color: var(--text);
}
.site-footer::before { margin-bottom: 48px; }

/* ---------- Predictions ---------- */
.grade { border-width: 2px; border-radius: var(--radius-sm); }
.grade--hit { background: #cfe0f1; color: #1d1b17; }
.grade--miss { background: #f3cdc8; color: #1d1b17; }

/* ---------- Small screens: nav gets its own row under the brand ---------- */
@media (max-width: 639.98px) {
  .site-header__inner { flex-wrap: wrap; row-gap: 0; padding-block: 8px 4px; }
  .site-nav { width: 100%; justify-content: space-between; margin-inline: -8px; }
  .site-nav ul { flex-wrap: wrap; gap: 0; }
  .brand__name { max-width: none; }
  html { scroll-padding-top: 140px; }
}
