:root {
  color-scheme: light;
  --paper: #f6f2e8;
  --paper-card: #fbf8f1;
  --paper-deep: #f1ebdd;
  --ink: #1a2a3a;
  --body-ink: #2a3644;
  --muted: #5b6570;
  --accent: #c73e3a;
  --accent-text: #b53330;
  --accent-dark: #a9302d;
  --line: rgba(26, 42, 58, .42);
  --line-soft: rgba(26, 42, 58, .2);
  --container: 1120px;
  --container-narrow: 780px;
  --gutter: 1.5rem;
  --space-section: clamp(4rem, 8vw, 6rem);
  --font-heading: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-body: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  --font-numeric: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  font-family: var(--font-body);
}

* { box-sizing: border-box; border-radius: 0; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--body-ink); line-height: 1.8; }
a { color: inherit; }
button, summary { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.site-header-shell {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 4px double var(--ink);
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  min-height: 76px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; font: 800 1.35rem/1 var(--font-heading); }
.brand-mark { display: block; width: 2.65rem; height: 1.9rem; object-fit: contain; }
.desktop-nav { display: flex; gap: 1.6rem; }
.desktop-nav a, .mobile-nav nav a {
  position: relative;
  color: var(--body-ink);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  transition: color 160ms ease;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -.45rem;
  left: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 160ms ease;
}
.desktop-nav a:hover, .desktop-nav a[aria-current="page"], .mobile-nav nav a:hover, .mobile-nav nav a[aria-current="page"] { color: var(--ink); }
.desktop-nav a:hover::after, .desktop-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.mobile-nav { display: none; position: relative; }
.mobile-nav summary { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; list-style: none; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 22px; height: 2px; background: var(--accent); transition: transform 160ms ease; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.mobile-nav[open] .menu-icon { background: transparent; }
.mobile-nav[open] .menu-icon::before { top: 0; transform: rotate(45deg); }
.mobile-nav[open] .menu-icon::after { top: 0; transform: rotate(-45deg); }
.mobile-nav nav {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  display: grid;
  width: min(78vw, 280px);
  padding: .65rem;
  background: var(--paper-card);
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(26, 42, 58, .14);
}
.mobile-nav nav a { padding: .8rem 1rem; }
.mobile-nav nav a[aria-current="page"] { border-left: 3px solid var(--accent); background: var(--paper-deep); }
.edition-bar {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: .45rem var(--gutter);
  border-bottom: 1px solid var(--line-soft);
}
.edition-bar p { margin: 0; color: var(--muted); text-align: right; font-size: .76rem; font-weight: 700; font-variant-numeric: tabular-nums; }

main { overflow: hidden; }
.hero, .principles, .featured-article, .stats-callout, .page-hero, .wide, footer {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.hero, .principles, .featured-article, .stats-callout, .page-hero, .prose, .article-detail { padding-block: var(--space-section); }
.hero { position: relative; min-height: 64vh; display: flex; flex-direction: column; justify-content: center; border-bottom: 2px solid var(--ink); }
.hero h1 { max-width: 100%; font-size: clamp(3rem, 7.2vw, 6rem); }
.eyebrow, .section-label { margin-bottom: .65rem; color: var(--accent-text); letter-spacing: .08em; font-weight: 800; font-size: .78rem; }
h1, h2, h3 { color: var(--ink); font-family: var(--font-heading); font-weight: 800; }
h1 { margin: .7rem 0 1.5rem; font-size: clamp(3rem, 9vw, 7rem); line-height: 1.08; letter-spacing: -.035em; }
h1 strong { color: var(--accent); }
.lead { max-width: 680px; color: var(--body-ink); font-size: 1.08rem; }
.notice { width: fit-content; margin-top: 1.5rem; padding: .65rem 1rem; border: 1px solid var(--ink); background: var(--paper-card); color: var(--body-ink); font-size: .9rem; }
.hero-recovery { display: grid; width: fit-content; margin: .25rem 0 1.6rem; padding: 1rem 1.25rem; border-block: 2px solid var(--ink); color: var(--ink); text-decoration: none; transition: background-color 160ms ease; }
.hero-recovery:hover { background: var(--paper-deep); }
.hero-recovery span { font-weight: 800; }
.hero-recovery strong { margin-block: .2rem; color: var(--accent-text); font: 800 clamp(2.5rem, 6vw, 4.4rem)/1 var(--font-heading); font-variant-numeric: tabular-nums; }
.hero-recovery small { color: var(--muted); font-size: .76rem; }
.hero-story { max-width: 880px; }

.principles { border-bottom: 2px solid var(--ink); }
h2 { margin: .4rem 0 2.2rem; padding-bottom: .45rem; border-bottom: 2px solid var(--ink); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.3; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--ink); }
.card-grid article { min-height: 250px; padding: 2rem; background: var(--paper-card); border-right: 1px solid var(--line); }
.card-grid article:last-child { border-right: 0; }
.card-grid article > span { color: var(--accent); font: 800 .85rem/1 var(--font-numeric); }
.card-grid h3 { margin-top: 3.5rem; font-size: 1.35rem; }
.card-grid p, .stats-callout p, .featured-article p { color: var(--body-ink); }

.featured-article { display: block; border-bottom: 2px solid var(--ink); }
.featured-article > div:first-child { max-width: 820px; }
.stats-callout { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4rem; background: var(--paper-deep); border-bottom: 2px solid var(--ink); }

.button, .button-ghost {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-top: 1rem;
  padding: .75rem 1.2rem;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid var(--accent);
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.button { color: #fff; background: var(--accent); }
.button::after { content: "→"; transition: transform 160ms ease; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button:hover::after { transform: translateX(4px); }
.button-ghost { color: var(--ink); background: transparent; border-color: var(--ink); }
.button-ghost:hover { background: var(--paper-deep); }

.stat-highlight { display: flex; flex-direction: column; min-width: 220px; padding: 2rem; border-left: 3px solid var(--accent); }
.stat-highlight strong { color: var(--accent); font: 800 2.6rem/1 var(--font-numeric); font-variant-numeric: tabular-nums; }
.stat-highlight span { margin-top: .6rem; color: var(--body-ink); }

.page-hero.compact { min-height: auto; border-bottom: 2px solid var(--ink); }
.page-hero h1, .prose h1 { margin: .7rem 0 1.5rem; font-size: clamp(2.8rem, 7vw, 5.7rem); line-height: 1.1; letter-spacing: -.035em; }
.page-hero .eyebrow a { color: var(--accent-text); }
.data-section { padding-block: var(--space-section); border-bottom: 2px solid var(--ink); }
.data-section.inset { padding: 3rem; border: 1px solid var(--ink); background: var(--paper-card); }
.section-heading { display: grid; grid-template-columns: 1fr minmax(240px, 420px); gap: 3rem; align-items: end; }
.section-heading p { color: var(--body-ink); }
.section-heading .section-label { color: var(--accent-text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--ink); background: var(--paper-card); }
table { width: 100%; border-collapse: collapse; min-width: 700px; background: var(--paper-card); color: var(--ink); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }
th, td { padding: .82rem 1rem; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; font-weight: 700; letter-spacing: -.015em; }
th:first-child, td:first-child, tbody th { text-align: left; }
thead th { border-bottom: 2px solid var(--ink); color: var(--body-ink); font-size: .76rem; letter-spacing: .02em; }
tbody tr { transition: transform 160ms ease, background-color 160ms ease; }
tbody tr:hover { background: var(--paper-deep); }
tbody a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
td small { color: var(--muted); font-weight: 500; }
.linked-row { position: relative; }
.linked-row:hover { transform: translateY(-2px); }
.linked-row:hover > :first-child { border-left-color: var(--accent); }
.linked-row > :first-child { border-left: 3px solid transparent; transition: border-color 160ms ease; }
.linked-row .row-link::after { content: ""; position: absolute; inset: 0; cursor: pointer; }
.rank-top > :first-child { border-left-color: var(--accent); }
.rank-1 { background: #f7e8e2; }
.rank-2 { background: #f9ece6; }
.rank-3 { background: #fbf0eb; }
.rank { color: var(--accent); font-weight: 800; }
.source-note { margin-top: 1rem; color: var(--muted); font-size: .8rem; }
.bar { display: inline-block; vertical-align: middle; width: 100px; height: 5px; margin-right: .7rem; background: rgba(26, 42, 58, .13); }
.bar span { display: block; height: 100%; background: var(--accent); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding-block: 0 var(--space-section); border-bottom: 2px solid var(--ink); }
.metric-grid article { display: flex; flex-direction: column; padding: 1.6rem; background: var(--paper-card); border: 1px solid var(--ink); border-right: 0; }
.metric-grid article:last-child { border-right: 1px solid var(--ink); }
.metric-grid span, .metric-grid small { color: var(--body-ink); }
.metric-grid strong { margin: .45rem 0; color: var(--accent); font: 800 2rem/1.3 var(--font-numeric); font-variant-numeric: tabular-nums; }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-block: 0 var(--space-section); border-bottom: 2px solid var(--ink); }
.method-list { margin: 0; padding: 0; list-style: none; }
.method-list li { display: grid; grid-template-columns: 6rem 1fr 4rem 4rem; align-items: center; gap: .7rem; padding: .55rem 0; color: var(--ink); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }
.method-list .bar { width: 100%; }
.method-list small { color: var(--muted); text-align: right; }
.definition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.definition-grid div { padding: 1rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.definition-grid dt { color: var(--body-ink); font-size: .8rem; }
.definition-grid dd { margin: .4rem 0 0; color: var(--accent); font: 800 1.35rem/1.4 var(--font-numeric); font-variant-numeric: tabular-nums; }

.prose, .article-detail { width: 100%; max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--gutter); }
.prose h1, .article-header h1 { padding-bottom: .75rem; border-bottom: 2px solid var(--ink); }
.prose h2 { margin: 3.5rem 0 1rem; padding-bottom: .35rem; border-bottom: 1px solid var(--ink); font-size: 1.6rem; }
.prose p, .prose li { color: var(--body-ink); }
.prose .eyebrow { color: var(--accent-text); }
.prose a { color: var(--ink); text-underline-offset: .18em; }
.article-list { display: grid; gap: 1rem; padding-block: 0 var(--space-section); }
.article-card { display: block; padding: 2.2rem; color: inherit; text-decoration: none; border: 1px solid var(--ink); background: var(--paper-card); cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease; }
.article-card:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--paper-deep); }
.article-card h2 { margin: .8rem 0 1rem; padding-bottom: .65rem; border-bottom: 2px solid var(--ink); font-size: clamp(1.5rem, 3vw, 2.2rem); }
.article-card p:not(.article-meta) { color: var(--body-ink); }
.article-meta { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; color: var(--muted); font: 700 .8rem/1.6 var(--font-numeric); font-variant-numeric: tabular-nums; }
.article-meta span { color: var(--accent-text); font-weight: 800; }
.article-updated { color: var(--muted); font: 700 .8rem/1.6 var(--font-numeric); font-variant-numeric: tabular-nums; }
.article-header { padding-bottom: 3rem; border-bottom: 1px solid var(--ink); }
.article-header .eyebrow a { color: var(--accent-text); }
.article-header h1 { font-size: clamp(2.5rem, 6.5vw, 5rem); }
.article-body { width: 100%; padding-top: 1rem; }
.article-body h2 { margin: 4rem 0 1.2rem; padding-bottom: .4rem; border-bottom: 2px solid var(--ink); font-size: clamp(1.55rem, 3vw, 2.1rem); }
.article-body p { margin: 1.5rem 0; color: var(--body-ink); }
.article-body strong { color: var(--ink); }
.article-body .table-wrap { margin: 1.8rem 0 2.5rem; }
.article-body table { min-width: 560px; }
.article-body hr { margin: 4rem 0 2rem; border: 0; border-top: 2px solid var(--ink); }
.article-back { margin-top: 2rem; }
.today-board, .archive-board, .archive-callout {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-section) var(--gutter);
  border-bottom: 2px solid var(--ink);
}
.today-hero { border-bottom: 2px solid var(--ink); }
.today-hero.compact { padding-block: clamp(2rem, 5vw, 3.5rem); }
.today-hero.compact h1 { margin-block: .35rem .8rem; font-size: clamp(2.6rem, 6vw, 4.8rem); }
.today-hero.compact .lead { margin-block: 0; }
.today-hero.compact .prediction-warning { margin-top: 1rem; }
.today-hero.compact .responsible-note { margin-bottom: 0; }
.prediction-warning { max-width: 820px; margin-top: 1.5rem; padding: 1rem 1.2rem; border: 2px solid var(--ink); background: var(--paper-card); color: var(--body-ink); }
.prediction-warning strong { display: block; margin-bottom: .25rem; color: var(--ink); font-family: var(--font-heading); }
.method-note { max-width: 900px; margin-top: 1rem; padding: 1rem 1.2rem; border-left: 4px solid var(--accent); background: var(--paper-deep); color: var(--body-ink); font-size: .86rem; }
.method-note strong { display: block; margin-bottom: .3rem; color: var(--ink); font-family: var(--font-heading); }
.method-note p { margin: 0; }
.method-note p + p { margin-top: .45rem; }
.responsible-note { max-width: 820px; color: var(--body-ink); font-size: .86rem; }
.responsible-note a { color: var(--ink); text-underline-offset: .2em; }
.data-updated, .today-summary, .results-summary { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.today-summary { margin: -1rem 0 1.4rem; padding: .75rem 0; border-bottom: 1px solid var(--ink); font-weight: 700; }
.results-summary { color: var(--ink); font-weight: 800; }
.result-delay-note { margin: -1rem 0 1.4rem; color: var(--muted); font-size: .72rem; }
.today-races { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.loading-message { grid-column: 1 / -1; padding: 2rem; border: 1px solid var(--ink); background: var(--paper-card); }
.race-card { min-width: 0; padding: 1.3rem; border: 1px solid var(--ink); border-left: 4px solid var(--ink); background: var(--paper-card); }
.race-card.status-judged { border-left-color: var(--accent); }
.race-card.status-waiting { border-left-color: #7b6c54; }
.race-card-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding-bottom: .65rem; border-bottom: 2px solid var(--ink); }
.race-card-header h3 { margin: 0; font-size: 1.7rem; }
.race-venue { margin: 0; color: var(--body-ink); font-weight: 800; }
.status-label { padding: .2rem .45rem; border: 1px solid currentColor; color: var(--body-ink); font-size: .72rem; font-weight: 800; }
.status-judged .status-label { color: var(--accent-text); }
.race-note { color: var(--body-ink); font-size: .86rem; }
.race-timing { padding: .55rem 0; border-block: 1px solid var(--line-soft); color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.top-pair { margin: .8rem 0; color: var(--body-ink); font-size: .86rem; }
.top-pair strong { margin-left: .4rem; color: var(--accent); font: 800 1.45rem/1 var(--font-numeric); font-variant-numeric: tabular-nums; }
.top-pair.ev-soft { padding: .35rem .5rem; background: #f5efe1; border-bottom: 2px solid var(--accent); }
.top-pair.ev-strong { padding: .35rem .5rem; background: #f5ddd7; border-bottom: 3px solid var(--accent); }
.pair-details { margin-top: 1rem; border-top: 1px solid var(--ink); }
.pair-details summary { padding: .75rem 0; color: var(--ink); cursor: pointer; font-weight: 800; }
.pair-details summary:hover { color: var(--accent-text); }
.table-scroll { overflow-x: auto; }
.pair-table { min-width: 430px; font-size: .8rem; }
.pair-table th, .pair-table td { padding: .48rem .6rem; }
.pair-table .selected-pair > *:first-child { border-left: 3px solid var(--accent); }
.pair-table .selected-pair { background: #f7e8e2; }
.result-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1rem 0; border-block: 1px solid var(--ink); }
.result-strip div { padding: .65rem; border-right: 1px solid var(--line); }
.result-strip div:last-child { border-right: 0; }
.result-strip dt { color: var(--muted); font-size: .7rem; }
.result-strip dd { margin: .25rem 0 0; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.result-pending { color: var(--muted); font-size: .8rem; }
.archive-page { width: 100%; }
.archive-summary-table { min-width: 620px; }
.archive-summary-table time { font-weight: 800; }
.archive-summary-table strong { color: var(--accent-text); }
.archive-summary-table td small { display: block; }
.profit-positive { color: var(--accent-text) !important; font-weight: 800; }
.profit-negative { color: var(--ink) !important; font-weight: 800; }
.archive-day-hero h1 { margin-bottom: 1rem; font-size: clamp(2.5rem, 6vw, 4.8rem); }
.archive-day-summary { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 860px; margin: 1.5rem 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.archive-day-summary div { padding: .85rem 1rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.archive-day-summary dt { color: var(--muted); font-size: .72rem; }
.archive-day-summary dd { margin: .3rem 0 0; color: var(--ink); font: 800 1.45rem/1.2 var(--font-numeric); font-variant-numeric: tabular-nums; }
.archive-day-summary small { color: var(--muted); font-size: .66rem; }
.compact-archive-board { padding-top: 2.2rem; }
.archive-table-heading { display: grid; grid-template-columns: 1fr minmax(260px, 420px); align-items: end; gap: 2rem; }
.archive-table-heading h2 { margin: .2rem 0 1rem; font-size: clamp(1.8rem, 3vw, 2.7rem); }
.archive-table-heading > p { color: var(--body-ink); }
.archive-venue-jump { margin-bottom: 1rem; }
.archive-ev-legend { margin: 0 0 2rem; }
.archive-venue-tables { display: grid; gap: 2rem; }
.archive-venue-section { scroll-margin-top: 155px; }
.archive-race-table { width: 100%; min-width: 0; table-layout: fixed; border-inline: 1px solid var(--ink); font-size: .78rem; }
.archive-race-table th, .archive-race-table td { height: 40px; padding: .42rem .5rem; overflow: hidden; text-overflow: ellipsis; }
.archive-race-table thead th:nth-child(1) { width: 9%; }
.archive-race-table thead th:nth-child(2) { width: 19%; }
.archive-race-table thead th:nth-child(3) { width: 18%; }
.archive-race-table thead th:nth-child(4) { width: 17%; }
.archive-race-table thead th:nth-child(5) { width: 20%; }
.archive-race-table thead th:nth-child(6) { width: 17%; }
.archive-race-table tbody tr[data-status] > :first-child { border-left: 4px solid transparent; }
.archive-race-table tbody tr.is-hit { background: #f7e8e2; }
.archive-race-table tbody tr.is-hit > :first-child { border-left-color: var(--accent); }
.archive-candidate { color: var(--ink); font-weight: 800; }
.archive-candidate.ev-soft { background: #f5efe1; text-decoration: underline 2px var(--accent); text-underline-offset: .2rem; }
.archive-candidate.ev-strong { background: #f5ddd7; color: var(--accent-text); text-decoration: underline 3px var(--accent); text-underline-offset: .2rem; }
.miss-label { color: var(--muted); font-size: .68rem; }
.archive-detail-row > td { height: auto; padding: 0; border-bottom: 2px solid var(--ink); white-space: normal; }
.archive-detail-row:hover { background: transparent; }
.archive-race-details > summary { padding: .55rem .75rem; background: var(--paper-card); color: var(--ink); cursor: pointer; font-weight: 800; }
.archive-race-details > summary:hover, .archive-race-details[open] > summary { background: var(--paper-deep); color: var(--accent-text); }
.archive-detail-content { padding: .75rem; background: var(--paper-card); }
.archive-detail-content .explanation-panel { margin-top: 0; }
.archive-detail-content .compact-pair-table { border: 1px solid var(--ink); }

/* Results: all-period performance and uncertainty */
.results-hero { border-bottom: 2px solid var(--ink); }
.results-board {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-section) var(--gutter);
  border-bottom: 2px solid var(--ink);
}
.results-board.inset { margin-block: var(--space-section); border: 1px solid var(--ink); background: var(--paper-card); }
.results-cohort-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.results-cohort { padding: 1.35rem; border: 1px solid var(--ink); background: var(--paper-card); }
.results-cohort.primary { border-top: 5px solid var(--accent); }
.results-card-heading { display: flex; align-items: start; justify-content: space-between; gap: .8rem; border-bottom: 2px solid var(--ink); }
.results-card-heading h3 { margin: 0 0 .65rem; }
.reference-badge { display: inline-block; flex: 0 0 auto; padding: .15rem .35rem; border: 1px solid var(--accent); color: var(--accent-text); font-size: .68rem; font-weight: 800; }
.results-cohort > p { color: var(--body-ink); font-size: .82rem; }
.results-metrics { display: grid; grid-template-columns: repeat(2, 1fr); margin: 1rem 0 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.results-metrics div { padding: .75rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.results-metrics dt { color: var(--muted); font-size: .7rem; }
.results-metrics dd { margin: .25rem 0; color: var(--ink); font: 800 1.35rem/1.2 var(--font-numeric); font-variant-numeric: tabular-nums; }
.results-metrics small { color: var(--muted); font-size: .66rem; }
.recovery-gap { display: flex; justify-content: space-between; gap: 1rem; margin: .8rem 0 .2rem; padding-top: .6rem; border-top: 1px solid var(--line-soft); }
.recovery-gap strong { color: var(--accent-text); font-variant-numeric: tabular-nums; }
.hit-ci { margin: .2rem 0 0; color: var(--muted) !important; font-size: .68rem !important; }
.results-method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.results-method-grid article { padding: 1.2rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.results-method-grid h3 { margin-top: 0; font-size: 1.15rem; }
.results-method-grid p { margin-bottom: 0; color: var(--body-ink); font-size: .84rem; }
.results-rationale .results-method-grid { grid-template-columns: 1fr; }
.results-table { min-width: 960px; }
.results-table .published-row { background: #f7e8e2; }
.results-table td, .results-table th { font-variant-numeric: tabular-nums; }
.results-board .source-note a { color: var(--ink); text-underline-offset: .18em; }

/* Today: dense venue-by-venue racing form */
.today-board { padding-top: 2.2rem; }
.deadline-heading, .today-table-heading { display: grid; grid-template-columns: 1fr minmax(260px, 420px); align-items: end; gap: 2rem; }
.deadline-heading h2, .today-table-heading h2 { margin: .2rem 0 1rem; font-size: clamp(1.8rem, 3vw, 2.7rem); }
.deadline-caption { color: var(--muted); font-size: .82rem; }
.closing-soon { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--ink); background: var(--paper-card); }
.closing-race { display: flex; min-width: 0; flex-direction: column; gap: .25rem; padding: .85rem; border-right: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.closing-race:last-child { border-right: 0; }
.closing-race:hover { background: var(--paper-deep); }
.closing-identity { font-weight: 800; }
.closing-minutes { color: var(--accent-text); font: 800 1.2rem/1.2 var(--font-numeric); }
.closing-candidate { overflow: hidden; color: var(--body-ink); font-size: .7rem; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.closing-empty { grid-column: 1 / -1; margin: 0; padding: 1rem; color: var(--body-ink); }
.venue-jump { position: sticky; z-index: 8; top: 72px; display: flex; gap: .4rem; overflow-x: auto; margin: 1.2rem 0 2rem; padding: .65rem; border-block: 4px double var(--ink); background: var(--paper); scrollbar-width: thin; }
.venue-chip { flex: 0 0 auto; padding: .4rem .65rem; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-size: .78rem; font-weight: 800; }
.venue-chip:hover, .venue-chip[aria-current="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.today-status-line { align-self: end; padding-bottom: 1rem; text-align: right; }
.today-status-line p { margin: .2rem 0; }
.today-status-line .today-summary { padding: 0; border: 0; }
.venue-tables { display: grid; gap: 2rem; }
.venue-section { scroll-margin-top: 155px; }
.venue-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0; padding: .45rem .7rem; border-block: 2px solid var(--ink); font-size: 1.35rem; }
.venue-count { color: var(--muted); font: 700 .72rem/1 var(--font-numeric); }
.venue-race-table { width: 100%; min-width: 0; table-layout: fixed; border-inline: 1px solid var(--ink); font-size: .78rem; }
.venue-race-table th, .venue-race-table td { height: 40px; padding: .42rem .5rem; overflow: hidden; text-overflow: ellipsis; }
.venue-race-table thead th:nth-child(1) { width: 8%; }
.venue-race-table thead th:nth-child(2) { width: 12%; }
.venue-race-table thead th:nth-child(3) { width: 12%; }
.venue-race-table thead th:nth-child(4) { width: 15%; }
.venue-race-table thead th:nth-child(5) { width: 14%; }
.venue-race-table thead th:nth-child(6) { width: 22%; }
.venue-race-table thead th:nth-child(7) { width: 17%; }
.venue-race-table tbody tr[data-status] > :first-child { border-left: 4px solid transparent; }
.venue-race-table tbody tr.is-actionable { background: #f7e8e2; }
.venue-race-table tbody tr.is-actionable > :first-child { border-left-color: var(--accent); }
.venue-race-table tbody tr.is-hit { background: #f7e8e2; }
.venue-race-table tbody tr.is-hit > :first-child { border-left-color: var(--accent); }
.venue-race-table tbody tr.is-expired { background: var(--paper-deep); color: var(--muted); }
.venue-race-table tbody tr.is-hit.is-expired { background: #f7e8e2; color: var(--ink); }
.race-number-cell, .candidate-cell, .ev-cell { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.is-actionable .candidate-cell, .is-actionable .ev-cell { color: var(--accent-text); }
.candidate-cell.ev-soft { background: #f5efe1; text-decoration: underline 2px var(--accent); text-underline-offset: .2rem; }
.candidate-cell.ev-strong { background: #f5ddd7; color: var(--accent-text); text-decoration: underline 3px var(--accent); text-underline-offset: .2rem; }
.result-cell { white-space: normal; }
.result-pair { display: block; color: var(--ink); font-weight: 800; }
.result-payout { display: block; color: var(--muted); font-size: .65rem; }
.hit-badge { display: inline-block; margin-top: .15rem; padding: .08rem .3rem; border: 1px solid var(--accent); color: var(--accent-text); font-size: .62rem; }
.row-detail-toggle { min-width: 3.8rem; padding: .3rem .45rem; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-weight: 800; }
.row-detail-toggle:hover, .row-detail-toggle[aria-expanded="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.race-detail-row > td { height: auto; padding: .75rem; background: var(--paper-card); border-bottom: 2px solid var(--ink); white-space: normal; }
.detail-timing { margin: 0 0 .55rem; color: var(--muted); font-size: .72rem; }
.explanation-panel { margin: .65rem 0 .9rem; padding: .8rem; border: 1px solid var(--ink); background: var(--paper-deep); color: var(--ink); }
.explanation-title { margin: 0 0 .65rem; font-size: 1rem; }
.explanation-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-block: 1px solid var(--line); }
.explanation-metrics div { padding: .5rem; border-right: 1px solid var(--line-soft); }
.explanation-metrics div:last-child { border-right: 0; }
.explanation-metrics dt { color: var(--muted); font-size: .67rem; }
.explanation-metrics dd { margin: .15rem 0 0; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.factor-heading { margin: .7rem 0 .35rem; font-size: .72rem; font-weight: 800; }
.explanation-factors { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.explanation-factors li { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem .45rem; border-left: 3px solid var(--ink); background: var(--paper-card); font-size: .72rem; }
.explanation-factors li[data-direction="up"] { border-left-color: var(--accent); }
.factor-direction { flex: 0 0 auto; color: var(--body-ink); }
.explanation-factors li[data-direction="up"] .factor-direction { color: var(--accent-text); }
.explanation-disclaimer, .explanation-unavailable { margin: .65rem 0 0; color: var(--muted); font-size: .68rem; }
.explanation-load-note { margin: .3rem 0 0; color: var(--muted); font-size: .65rem; }
.ev-legend { margin: .65rem 0; padding: .6rem .7rem; border-left: 3px solid var(--accent); background: var(--paper-deep); }
.ev-legend p { margin: 0; }
.ev-legend-keys { display: flex; flex-wrap: wrap; gap: .35rem; }
.ev-key { padding: .15rem .4rem; border: 1px solid var(--line); font-size: .65rem; font-weight: 800; }
.ev-key.ev-soft { background: #f5efe1; }
.ev-key.ev-strong { background: #f5ddd7; border-color: var(--accent); color: var(--accent-text); }
.ev-legend-note { margin-top: .4rem !important; color: var(--muted); font-size: .65rem; }
.pair-table-wrap { width: 100%; overflow: hidden; }
.compact-pair-table { width: 100%; min-width: 0; table-layout: fixed; font-size: .75rem; }
.compact-pair-table th, .compact-pair-table td { padding: .38rem .5rem; }
.compact-pair-table th:nth-child(1) { width: 15%; }
.compact-pair-table th:nth-child(2) { width: 41%; }
.compact-pair-table th:nth-child(3) { width: 25%; }
.compact-pair-table th:nth-child(4) { width: 19%; }
.probability-cell { display: grid; grid-template-columns: 3.8rem 1fr; align-items: center; gap: .5rem; }
.probability-value { text-align: right; }
.probability-track { display: block; height: 5px; background: rgba(26, 42, 58, .13); }
.probability-bar { display: block; height: 100%; background: var(--ink); }
.selected-pair .probability-bar { background: var(--accent); }
.pair-table tr.ev-soft { background: #f5efe1; box-shadow: inset 0 -2px var(--accent); }
.pair-table tr.ev-strong { background: #f5ddd7; box-shadow: inset 0 -3px var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
footer { padding-block: 3rem; border-top: 4px double var(--ink); color: var(--muted); font-size: .8rem; }

@media (max-width: 720px) {
  .desktop-nav { display: none; }
  .mobile-nav { display: block; }
  .hero { min-height: auto; }
  .card-grid, .stats-callout, .featured-article, .section-heading, .split-section, .results-cohort-grid, .results-method-grid, .archive-table-heading { grid-template-columns: 1fr; }
  .card-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .card-grid article:last-child { border-bottom: 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .today-races { grid-template-columns: 1fr; }
  .deadline-heading, .today-table-heading { grid-template-columns: 1fr; gap: 0; }
  .today-status-line { text-align: left; }
  .closing-soon { display: flex; overflow-x: auto; }
  .closing-race { flex: 0 0 min(64vw, 230px); }
  .venue-jump { top: 67px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .metric-grid article { border-right: 1px solid var(--ink); border-bottom: 0; }
  .metric-grid article:last-child { border-bottom: 1px solid var(--ink); }
  .stat-highlight { min-width: 0; }
  .data-section.inset { padding: 2rem 1.25rem; }
  .results-board.inset { margin-block: 0; border-inline: 0; }
  .archive-day-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 460px) {
  :root { --gutter: 1.1rem; }
  h1 { font-size: clamp(2.7rem, 14vw, 4rem); }
  .hero-recovery { width: 100%; }
  .article-card { padding: 1.5rem; }
  .method-list { grid-template-columns: 4.5rem 1fr 3.5rem; }
  .method-list small { display: none; }
  .definition-grid { grid-template-columns: 1fr; }
  .result-strip { grid-template-columns: 1fr; }
  .results-metrics { grid-template-columns: 1fr; }
  .archive-day-summary { grid-template-columns: 1fr; }
  .result-strip div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .result-strip div:last-child { border-bottom: 0; }
  .today-hero.compact { padding-block: 2rem; }
  .today-hero.compact h1 { font-size: clamp(2.6rem, 13vw, 3.8rem); }
  .today-board { padding-top: 1.6rem; }
  .venue-tables { gap: 1.6rem; }
  .venue-section { scroll-margin-top: 145px; }
  .venue-race-table { font-size: .7rem; }
  .venue-race-table th, .venue-race-table td { height: 38px; padding: .35rem .18rem; letter-spacing: -.03em; }
  .venue-race-table thead th:nth-child(1) { width: 10%; }
  .venue-race-table thead th:nth-child(2) { width: 13%; }
  .venue-race-table thead th:nth-child(3) { width: 12%; }
  .venue-race-table thead th:nth-child(4) { width: 15%; }
  .venue-race-table thead th:nth-child(5) { width: 13%; }
  .venue-race-table thead th:nth-child(6) { width: 21%; }
  .venue-race-table thead th:nth-child(7) { width: 16%; }
  .hit-badge { padding-inline: .15rem; }
  .row-detail-toggle { min-width: 0; padding-inline: .25rem; }
  .race-detail-row > td { padding: .55rem .35rem; }
  .explanation-panel { padding: .6rem .45rem; }
  .explanation-metrics div { padding: .4rem .25rem; }
  .compact-pair-table { font-size: .68rem; }
  .compact-pair-table th, .compact-pair-table td { padding: .34rem .2rem; }
  .probability-cell { grid-template-columns: 2.9rem 1fr; gap: .25rem; }
  .archive-race-table { font-size: .68rem; }
  .archive-race-table th, .archive-race-table td { height: 38px; padding: .35rem .2rem; letter-spacing: -.035em; }
  .archive-race-details > summary { padding-inline: .5rem; }
  .archive-detail-content { padding: .55rem .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .button:hover::after, .article-card:hover, .linked-row:hover { transform: none; }
}
