:root {
  color-scheme: dark;
  --bg: #0b1421;
  --surface: #121f31;
  --surface-raised: #18283e;
  --surface-soft: #101b2b;
  --text: #edf3fb;
  --muted: #bdcadd;
  --subtle: #8fa4bd;
  --border: #2a405a;
  --accent: #8bc8ff;
  --accent-strong: #60adf3;
  --accent-ink: #071a2c;
  --champ: #ffd36f;
  --rel: #ff9b9b;
  --bubble: #ffd08a;
  --safe: #8fe0bb;
  --focus: #ffda75;
  --shadow: 0 16px 44px rgb(0 0 0 / 22%);
  --table-header: #1b2c43;
  --table-hover: rgb(139 200 255 / 5%);
  --heat-0: #132236;
  --heat-1: #16283d;
  --heat-2: #192c43;
  --heat-3: #1b314a;
  --heat-4: #1d3651;
  --heat-5: #203b59;
  --heat-6: #224364;
  --heat-7: #254a6e;
  --heat-8: #285278;
  --heat-9: #2c5b83;
  --badge-match-bg: #133f32;
  --badge-match-text: #a2ecc7;
  --badge-mismatch-bg: #522a32;
  --badge-mismatch-text: #ffc1c1;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-raised: #eef3f8;
  --surface-soft: #f8fafc;
  --text: #142438;
  --muted: #465c74;
  --subtle: #5a6f86;
  --border: #c7d3df;
  --accent: #145fa5;
  --accent-strong: #0e4f8c;
  --accent-ink: #ffffff;
  --champ: #785000;
  --rel: #9c2529;
  --bubble: #805000;
  --safe: #17613e;
  --focus: #8b5700;
  --shadow: 0 14px 36px rgb(24 48 76 / 10%);
  --table-header: #e8eff6;
  --table-hover: rgb(20 95 165 / 5%);
  --heat-0: #f3f7fb;
  --heat-1: #edf4fa;
  --heat-2: #e8f2fa;
  --heat-3: #e2effa;
  --heat-4: #dcecf9;
  --heat-5: #d7eafa;
  --heat-6: #d2e8fa;
  --heat-7: #cce5f9;
  --heat-8: #c4e1f8;
  --heat-9: #badcf6;
  --badge-match-bg: #d9f3e5;
  --badge-match-text: #155a39;
  --badge-mismatch-bg: #fae1e1;
  --badge-mismatch-text: #842326;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-raised: #eef3f8;
    --surface-soft: #f8fafc;
    --text: #142438;
    --muted: #465c74;
    --subtle: #5a6f86;
    --border: #c7d3df;
    --accent: #145fa5;
    --accent-strong: #0e4f8c;
    --accent-ink: #ffffff;
    --champ: #785000;
    --rel: #9c2529;
    --bubble: #805000;
    --safe: #17613e;
    --focus: #8b5700;
    --shadow: 0 14px 36px rgb(24 48 76 / 10%);
    --table-header: #e8eff6;
    --table-hover: rgb(20 95 165 / 5%);
    --heat-0: #f3f7fb;
    --heat-1: #edf4fa;
    --heat-2: #e8f2fa;
    --heat-3: #e2effa;
    --heat-4: #dcecf9;
    --heat-5: #d7eafa;
    --heat-6: #d2e8fa;
    --heat-7: #cce5f9;
    --heat-8: #c4e1f8;
    --heat-9: #badcf6;
    --badge-match-bg: #d9f3e5;
    --badge-match-text: #155a39;
    --badge-mismatch-bg: #fae1e1;
    --badge-mismatch-text: #842326;
  }
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--bg); }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 430;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--accent-strong); }
button { color: inherit; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { color: var(--accent-ink); background: var(--accent); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: .65rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 750;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.top-anchor { position: absolute; width: 1px; height: 1px; overflow: hidden; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 2vw, 1.5rem);
  width: min(100% - 2rem, 1420px);
  min-height: 68px;
  margin-inline: auto;
}
.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.025em;
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--accent-strong);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.08rem;
  line-height: 1;
  font-weight: 950;
}
.brand-name { white-space: nowrap; }
.brand-name > span { color: var(--muted); font-weight: 610; }
.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(.35rem, 1vw, 1rem);
  margin-inline: auto;
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .4rem .72rem;
  border-radius: 9px;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: var(--surface-raised);
  color: var(--text);
}
.primary-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }
.theme-toggle, .menu-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 40px;
  padding: .45rem .76rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: .89rem;
  font-weight: 720;
  cursor: pointer;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--accent); background: var(--surface-raised); }
.theme-symbol { color: var(--champ); font-size: 1.08rem; }
.menu-toggle { display: none; }
.menu-icon { display: grid; gap: 3px; }
.menu-icon i { display: block; width: 15px; height: 2px; border-radius: 2px; background: currentColor; }

.site-main {
  width: min(100% - 2rem, 1360px);
  min-height: calc(100vh - 205px);
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5.5rem);
}
.report-content { min-width: 0; }
.report-content h1,
.report-content h2,
.report-content h3,
.report-content h4,
.report-content h5,
.report-content h6,
.page-intro > h1,
.not-found-page > h1 {
  position: relative;
  max-width: 26ch;
  color: var(--text);
  line-height: 1.17;
  letter-spacing: -.035em;
  font-weight: 800;
  scroll-margin-top: 96px;
}
.report-content h1, .page-intro > h1, .not-found-page > h1 {
  margin: 0 0 1.45rem;
  font-size: clamp(2.15rem, 5.2vw, 4.1rem);
}
.report-content h2 {
  margin: clamp(2.5rem, 5vw, 4rem) 0 1.15rem;
  padding-top: .2rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}
.report-content h3 { margin: 2.3rem 0 .9rem; font-size: clamp(1.25rem, 2vw, 1.55rem); }
.report-content h4 { margin: 2rem 0 .8rem; font-size: clamp(1.08rem, 1.7vw, 1.28rem); }
.report-content p,
.report-content ul,
.report-content ol,
.not-found-page > p {
  max-width: 75ch;
}
.report-content p { margin: .7rem 0 1.1rem; }
.report-content > p:first-of-type { margin-top: .2rem; }
.report-content ul, .report-content ol { padding-left: 1.35rem; }
.report-content li { padding-left: .18rem; margin-block: .42rem; }
.report-content li::marker { color: var(--accent); }
.report-content li p { margin-block: .35rem; }
.report-content strong { color: var(--text); font-weight: 760; }
.report-content em { color: inherit; }
.report-content hr {
  height: 1px;
  margin: 2rem 0;
  border: 0;
  background: var(--border);
}
.report-content blockquote {
  max-width: 75ch;
  margin: 1.25rem 0;
  padding: .3rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.anchored-heading { scroll-margin-top: 92px; }
.heading-anchor {
  display: inline-block;
  margin-left: .44em;
  color: var(--accent);
  font-size: .72em;
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
  vertical-align: .14em;
  transition: opacity .15s ease;
}
.anchored-heading:hover .heading-anchor,
.heading-anchor:focus-visible { opacity: 1; }

.overview-page { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.intro-content h1 { max-width: 21ch; margin-bottom: 1.5rem; }
.intro-content > p { max-width: 78ch; font-size: 1.06rem; }
.intro-content > p strong:first-child { color: var(--accent); }
.executive-content > h2:first-child { margin-top: .2rem; }
.executive-content > h3 { margin-top: 2rem; }
.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  margin-block: .25rem .75rem;
}
.stat-card {
  min-width: 0;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(155deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow);
}
.stat-card .stat-value {
  margin: 0 0 .2rem;
  color: var(--accent);
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  line-height: 1.2;
}
.stat-card h2 { margin: 0; color: var(--muted); font-size: .87rem; line-height: 1.4; letter-spacing: 0; font-weight: 650; }

.table-wrap {
  position: relative;
  max-width: 100%;
  margin: 1.1rem 0 1.6rem;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 7px 22px rgb(0 0 0 / 8%);
  overscroll-behavior-x: contain;
  scrollbar-color: var(--subtle) var(--surface-raised);
  scrollbar-width: thin;
}
.table-wrap:focus-visible { outline-offset: 2px; }
.gfm-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
  font-size: .93rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.gfm-table th,
.gfm-table td {
  min-width: 4.2rem;
  padding: .62rem .78rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.gfm-table tr > :last-child { border-right: 0; }
.gfm-table tbody tr:last-child > * { border-bottom: 0; }
.gfm-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--table-header);
  color: var(--text);
  font-size: .83rem;
  font-weight: 780;
  white-space: nowrap;
}
.gfm-table td { background: var(--surface); }
.gfm-table tbody tr:hover td { background-color: var(--table-hover); }
.gfm-table .align-right { text-align: right; font-variant-numeric: tabular-nums; }
.gfm-table .align-center { text-align: center; }
.gfm-table .align-left { text-align: left; }
.gfm-table--headline, .table--headline { width: 100%; }
.table--headline { min-width: 1020px; }
.table--headline td, .table--headline th { white-space: normal; }
.table--headline th { white-space: nowrap; }
.table--headline th:nth-child(1), .table--headline td:nth-child(1) { min-width: 5rem; }
.table--headline th:nth-child(2), .table--headline td:nth-child(2) { min-width: 6rem; }
.table--headline th:nth-child(3), .table--headline td:nth-child(3),
.table--headline th:nth-child(4), .table--headline td:nth-child(4) { min-width: 12.5rem; }
.table--headline th:nth-child(5), .table--headline td:nth-child(5) { min-width: 5.25rem; }
.table--headline th:nth-child(6), .table--headline td:nth-child(6),
.table--headline th:nth-child(7), .table--headline td:nth-child(7) { min-width: 17rem; }
.headline-champion-link { color: inherit; font-weight: 780; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .16rem .48rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 790;
  white-space: nowrap;
}
.result-badge--match { background: var(--badge-match-bg); color: var(--badge-match-text); }
.result-badge--mismatch { background: var(--badge-mismatch-bg); color: var(--badge-mismatch-text); }
.table--comparison { min-width: 900px; }
.table--comparison .status-cell { min-width: 12rem; font-weight: 720; }
.table--comparison tbody tr.row--champ td { background-color: color-mix(in srgb, var(--champ) 6%, var(--surface)); }
.table--comparison tbody tr.row--rel td { background-color: color-mix(in srgb, var(--rel) 7%, var(--surface)); }
.table--comparison tbody tr.row--bubble td { background-color: color-mix(in srgb, var(--bubble) 7%, var(--surface)); }
.table--comparison .status--champ { color: var(--champ); }
.table--comparison .status--rel { color: var(--rel); }
.table--comparison .status--bubble { color: var(--bubble); }
.table--comparison .status--safe { color: var(--safe); }
.table--weekly {
  min-width: 1120px;
  font-size: .78rem;
  line-height: 1.35;
}
.table--weekly th, .table--weekly td { min-width: 3.36rem; padding: .45rem .45rem; text-align: right; white-space: nowrap; }
.table--weekly th:first-child, .table--weekly td:first-child {
  position: sticky;
  z-index: 3;
  left: 0;
  min-width: 12.6rem;
  text-align: left;
  background: var(--table-header);
  box-shadow: 2px 0 0 var(--border);
}
.table--weekly td:first-child { background: var(--surface); font-weight: 700; }
.table--weekly tbody tr:hover td:first-child { background: var(--surface-raised); }
.table--weekly th:first-child { z-index: 5; }
.table--weekly td.week-score { color: var(--text); }
.table--weekly td.h0 { background: var(--heat-0); }
.table--weekly td.h1 { background: var(--heat-1); }
.table--weekly td.h2 { background: var(--heat-2); }
.table--weekly td.h3 { background: var(--heat-3); }
.table--weekly td.h4 { background: var(--heat-4); }
.table--weekly td.h5 { background: var(--heat-5); }
.table--weekly td.h6 { background: var(--heat-6); }
.table--weekly td.h7 { background: var(--heat-7); }
.table--weekly td.h8 { background: var(--heat-8); }
.table--weekly td.h9 { background: var(--heat-9); }
.table--weekly tbody tr:hover td.week-score { box-shadow: inset 0 0 0 999px var(--table-hover); }
.constructed-mark {
  display: inline-block;
  min-width: .85em;
  margin-left: .05em;
  padding-inline: .12em;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 17%, var(--surface));
  color: var(--accent);
  font-size: .84em;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}
.table--weekly td.constructed-cell { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent); }

.code-scroll {
  max-width: 100%;
  margin: 1.15rem 0 1.6rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  overscroll-behavior-x: contain;
  scrollbar-color: var(--subtle) var(--surface-raised);
  scrollbar-width: thin;
}
.ascii-table, .plain-code {
  display: block;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: .82rem 1rem;
  overflow: visible;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .79rem;
  line-height: 1.52;
  tab-size: 4;
  white-space: pre;
  font-variant-numeric: tabular-nums;
}
.plain-code { color: var(--accent); }
.ascii-table code, .plain-code code { font: inherit; }
.ln {
  display: block;
  min-height: 1.52em;
  padding-left: .55rem;
  border-left: 2px solid transparent;
  white-space: pre;
}
.ln--champ { border-left-color: var(--champ); background: color-mix(in srgb, var(--champ) 9%, transparent); color: var(--champ); }
.ln--rel { border-left-color: var(--rel); background: color-mix(in srgb, var(--rel) 8%, transparent); color: var(--rel); }
.ln--bubble { border-left-color: var(--bubble); background: color-mix(in srgb, var(--bubble) 8%, transparent); color: var(--bubble); }
.ol-marker {
  display: inline-block;
  min-width: 1.55em;
  margin-left: -1.55em;
  padding-right: .18em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
ol { list-style: none; }

.page-intro { margin-bottom: 1.8rem; }
.page-intro > h1 { margin-bottom: .8rem; }
.page-intro .source-section-title h2 {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 680;
  letter-spacing: -.02em;
}
.page-lede { max-width: 68ch; margin: .8rem 0 0; color: var(--muted); }
.eyebrow {
  margin: 0 0 .65rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.league-browser { margin-top: 2rem; }
.filter-panel {
  display: grid;
  gap: .9rem;
  margin-bottom: 1.1rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.filter-heading { margin: 0; font-size: .95rem; font-weight: 780; }
.filter-group { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem .85rem; }
.filter-label { min-width: 5.3rem; padding-top: .35rem; color: var(--muted); font-size: .82rem; font-weight: 760; }
.filter-options { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chip {
  min-height: 34px;
  padding: .27rem .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .81rem;
  font-weight: 720;
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--accent); color: var(--text); }
.filter-chip[aria-pressed="true"] { border-color: var(--accent-strong); background: var(--accent); color: var(--accent-ink); }
.filter-empty { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; }
.noscript-note { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }
.league-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  align-items: stretch;
}
.league-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.league-card:hover { transform: translateY(-2px); border-color: var(--accent-strong); box-shadow: var(--shadow); }
.league-card[hidden] { display: none; }
.league-card-link {
  display: flex;
  height: 100%;
  min-height: 270px;
  flex-direction: column;
  padding: 1rem 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.league-card-link:hover { color: var(--text); }
.league-card-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.season-year { color: var(--accent); font-size: 1.3rem; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.league-card h2 { margin: .45rem 0 .85rem; font-size: 1.17rem; line-height: 1.25; letter-spacing: -.02em; }
.card-caption { margin: .35rem 0 .08rem; color: var(--muted); font-size: .74rem; font-weight: 730; letter-spacing: .035em; text-transform: uppercase; }
.card-champion { margin: 0; color: var(--champ); font-size: .97rem; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.card-relegated { margin: .18rem 0 .9rem; color: var(--text); font-size: .87rem; line-height: 1.5; overflow-wrap: anywhere; }
.card-link-label { display: flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: .45rem; color: var(--accent); font-size: .83rem; font-weight: 780; }
.result-badge > span { font-size: .76em; }

.league-page {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  column-gap: clamp(1.4rem, 4vw, 3.5rem);
  row-gap: 2rem;
  align-items: start;
}
.league-report { grid-column: 2; grid-row: 1; min-width: 0; }
.league-toc { grid-column: 1; grid-row: 1; min-width: 0; }
.toc-desktop {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 115px);
  overflow-y: auto;
  padding: 1rem .9rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  scrollbar-width: thin;
}
.toc-title { margin: 0 0 .55rem; color: var(--text); font-size: .82rem; font-weight: 820; }
.toc-desktop ul, .toc-mobile ul { margin: 0; padding: 0; list-style: none; }
.toc-desktop li, .toc-mobile li { margin: .1rem 0; padding: 0; }
.toc-desktop a, .toc-mobile a {
  display: block;
  padding: .34rem .48rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
  text-decoration: none;
}
.toc-desktop a:hover, .toc-mobile a:hover,
.toc-desktop a[aria-current="location"] { background: var(--surface-raised); color: var(--text); }
.toc-desktop a[aria-current="location"] { box-shadow: inset 3px 0 var(--accent); }
.toc-mobile { display: none; }
.league-prev-next {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.league-prev-next a, .league-prev-next .nav-placeholder {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 48%;
  padding: .55rem .72rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--accent);
  font-size: .87rem;
  font-weight: 720;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.league-prev-next a:last-child { margin-left: auto; text-align: right; }
.league-prev-next a:hover { border-color: var(--accent); background: var(--surface); }
.nav-placeholder { visibility: hidden; }

.not-found-page {
  display: flex;
  min-height: 54vh;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: 2rem;
}
.not-found-page > h1 { max-width: 18ch; }
.not-found-page > p { color: var(--muted); }
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: .7rem;
  padding: .58rem .92rem;
  border: 1px solid var(--accent-strong);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 780;
  text-decoration: none;
}
.button-link:hover { background: var(--accent-strong); color: var(--accent-ink); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface-soft); }
.footer-inner { width: min(100% - 2rem, 1360px); margin-inline: auto; padding: 1.3rem 0 1.6rem; }
.footer-label { margin: 0 0 .45rem; color: var(--muted); font-size: .78rem; font-weight: 760; letter-spacing: .025em; }
.report-closing { color: var(--muted); font-size: .77rem; line-height: 1.6; }
.report-closing p { max-width: 95ch; margin: 0; }
.report-closing code { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 1100px) {
  .league-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .league-page { grid-template-columns: minmax(165px, 205px) minmax(0, 1fr); column-gap: 1.4rem; }
  .primary-nav { gap: .1rem; }
  .primary-nav a { padding-inline: .55rem; }
}

@media (max-width: 820px) {
  .header-inner { width: min(100% - 1.5rem, 1420px); min-height: 62px; }
  .primary-nav { gap: .05rem; }
  .primary-nav a { padding-inline: .43rem; font-size: .85rem; }
  .league-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .league-page { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; }
  .league-toc, .league-report, .league-prev-next { grid-column: 1; grid-row: auto; }
  .toc-desktop { display: none; }
  .toc-mobile {
    display: block;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
  }
  .toc-mobile summary {
    padding: .65rem .85rem;
    color: var(--text);
    font-size: .88rem;
    font-weight: 780;
    cursor: pointer;
  }
  .toc-mobile nav { padding: 0 .6rem .65rem; }
  .toc-mobile ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem .4rem; }
  .quick-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .header-inner { gap: .55rem; }
  .brand { margin-right: auto; }
  .theme-toggle { min-height: 38px; padding-inline: .58rem; }
  .menu-toggle { display: inline-flex; min-height: 38px; padding-inline: .58rem; }
  html.js .primary-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    z-index: 25;
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    padding: .65rem;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 13px 13px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  html.js .primary-nav.is-open { display: flex; }
  html.js .primary-nav a { min-height: 42px; padding-inline: .7rem; }
  html:not(.js) .primary-nav { flex-wrap: wrap; justify-content: center; }
  html:not(.js) .menu-toggle { display: none; }
  .table--headline { min-width: 920px; table-layout: fixed; }
  .table--headline th:nth-child(6), .table--headline td:nth-child(6),
  .table--headline th:nth-child(7), .table--headline td:nth-child(7) { min-width: 13rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-inner { width: calc(100% - 1.15rem); min-height: 58px; }
  .brand { gap: .45rem; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .brand-name { font-size: .93rem; }
  .theme-toggle, .menu-toggle { gap: .25rem; font-size: .78rem; }
  .theme-symbol { font-size: .95rem; }
  .site-main { width: calc(100% - 1.25rem); padding-top: 1.65rem; }
  .footer-inner { width: calc(100% - 1.25rem); }
  .intro-content h1 { font-size: clamp(2rem, 9vw, 2.85rem); }
  .intro-content > p { font-size: 1rem; }
  .report-content h2 { margin-top: 2.3rem; }
  .quick-stats { gap: .55rem; }
  .stat-card { padding: .78rem .72rem .85rem; border-radius: 12px; }
  .stat-card .stat-value { font-size: 1.45rem; }
  .stat-card h2 { font-size: .77rem; }
  .league-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .league-card-link { min-height: 0; padding: .88rem .9rem; }
  .league-card h2 { margin: .3rem 0 .6rem; }
  .card-caption { margin-top: .27rem; }
  .filter-panel { gap: .75rem; padding: .8rem; }
  .filter-group { gap: .25rem .6rem; }
  .filter-label { min-width: 4.4rem; padding-top: .32rem; }
  .filter-chip { min-height: 32px; padding-inline: .55rem; font-size: .77rem; }
  .toc-mobile ul { grid-template-columns: minmax(0, 1fr); }
  .gfm-table { font-size: .84rem; }
  .gfm-table th, .gfm-table td { padding: .52rem .6rem; }
  .table--weekly { font-size: .72rem; }
  .table--weekly th, .table--weekly td { min-width: 3.2rem; padding: .42rem .37rem; }
  .table--weekly th:first-child, .table--weekly td:first-child { min-width: 11.7rem; }
  .ascii-table, .plain-code { padding: .72rem .75rem; font-size: .73rem; }
  .league-prev-next { gap: .4rem; }
  .league-prev-next a, .league-prev-next .nav-placeholder { padding: .45rem .5rem; font-size: .76rem; }
  .heading-anchor { opacity: .65; }
}

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

@media print {
  :root, :root[data-theme="light"], :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-soft: #ffffff;
    --text: #000000;
    --muted: #242424;
    --subtle: #444444;
    --border: #888888;
    --accent: #000000;
    --accent-strong: #000000;
    --champ: #000000;
    --rel: #000000;
    --bubble: #000000;
    --safe: #000000;
    --table-header: #eeeeee;
    --badge-match-bg: #ffffff;
    --badge-match-text: #000000;
    --badge-mismatch-bg: #ffffff;
    --badge-mismatch-text: #000000;
    --heat-0: #ffffff;
    --heat-1: #ffffff;
    --heat-2: #ffffff;
    --heat-3: #ffffff;
    --heat-4: #f8f8f8;
    --heat-5: #f8f8f8;
    --heat-6: #f2f2f2;
    --heat-7: #f2f2f2;
    --heat-8: #eeeeee;
    --heat-9: #eeeeee;
  }
  body { min-width: 0; overflow: visible; background: #fff; color: #000; font-size: 10pt; }
  .site-header, .skip-link, .theme-toggle, .menu-toggle, .primary-nav, .league-toc,
  .league-prev-next, .filter-panel, .heading-anchor, .footer-label { display: none !important; }
  .site-main, .footer-inner { width: 100%; max-width: none; padding: .5rem 0; }
  .table-wrap, .code-scroll { max-width: 100%; overflow: visible; box-shadow: none; break-inside: avoid; }
  .gfm-table { width: 100%; min-width: 0; font-size: 6.4pt; table-layout: fixed; }
  .gfm-table th, .gfm-table td { min-width: 0 !important; padding: 2px 3px; overflow-wrap: anywhere; }
  .gfm-table th { position: static; }
  .table--weekly { min-width: 0; font-size: 5.1pt; }
  .table--weekly th, .table--weekly td { min-width: 0; padding: 1px; }
  .table--weekly th:first-child, .table--weekly td:first-child { position: static; min-width: 0; box-shadow: none; }
  .ascii-table, .plain-code { width: 100%; min-width: 0; padding: 3px; font-size: 5.2pt; white-space: pre-wrap; overflow-wrap: anywhere; }
  .ln { white-space: pre-wrap; }
  tr, .stat-card { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .quick-stats { grid-template-columns: repeat(4, 1fr); }
  .site-footer { border-top: 1px solid #888; }
}
