:root {
  color-scheme: light;
  --navy: #12213b;
  --navy-2: #1b2d4d;
  --ink: #12213b;
  --ink-2: #47536a;
  --muted: #5b6579;
  --bg: #fff;
  --soft: #f4f6f9;
  --rule: #dde2ea;
  --coral: #e0706f;
  --coral-ink: #b4403f;
  --series-1: #2f5f9e;
  --series-2: #6a9ee8;
  --series-3: #e0706f;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--sans); min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; padding-bottom: 72px; }
a { color: var(--series-1); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; text-wrap: balance; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }
.kicker {
  display: block; font-size: 13px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}

/* Header and footer */
.site-header { background: var(--navy); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .18em; font-size: 15px; white-space: nowrap; }
.brand:hover { color: #fff; }
.logo { display: block; flex: none; }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a { color: #d7deea; text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-header nav a:hover { color: #fff; }
.site-header nav a[aria-current] { color: #fff; border-bottom-color: var(--coral); }
.nav-x { display: flex; }
.site-footer { background: var(--navy); color: #d7deea; font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 22px; }
.site-footer .wrap > span { display: flex; align-items: center; gap: 12px; }
.site-footer a { color: #fff; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* Home hero, after the X banner */
.hero { background: var(--navy); color: #fff; padding: 0 8px 8px; }
.hero-frame { border: 1px solid rgba(255, 255, 255, .22); border-radius: 2px; overflow: hidden; }
.hero .wrap { position: relative; padding-block: 64px 60px; text-align: center; }
.hero-ring { position: absolute; left: 50%; top: 50%; width: 300px; transform: translate(-50%, -50%); pointer-events: none; }
.hero-ring circle { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1; }
.hero h1 { position: relative; font-size: clamp(27px, 6vw, 54px); font-weight: 600; letter-spacing: .14em; margin-right: -.14em; }
.hero h1::after { content: ""; display: block; width: 200px; height: 1px; margin: 16px auto 0; background: rgba(255, 255, 255, .75); }
.hero p { position: relative; margin: 16px 0 0; color: #d7deea; font-size: clamp(16px, 2.4vw, 19px); }

/* Stats */
.stats-section { padding-top: 40px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; border-block: 1px solid var(--rule); }
.stats.six { grid-template-columns: repeat(6, 1fr); margin-top: 24px; }
.stat { padding: 18px 16px 18px 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--rule); }
.stat b { display: block; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.3; }

/* Report cards */
.report-card { display: block; margin-top: 28px; padding: 20px 22px; background: var(--navy); color: #fff; border-radius: 6px; text-decoration: none; }
a.report-card:hover { color: #fff; background: var(--navy-2); }
.report-card strong { display: block; font-size: 22px; line-height: 1.25; }
.report-card span:not(.kicker):not(.tag) { display: block; color: #d7deea; margin-top: 2px; }
.report-card .kicker { color: #aeb9cc; margin-bottom: 6px; }
.report-list { list-style: none; margin: 28px 0 0; padding: 0; }
.report-list li { margin: 0; }
.report-list .report-card { margin-top: 12px; }
.report-list .upcoming { background: var(--soft); color: var(--ink); }
.report-list .upcoming span:not(.tag) { color: var(--muted); }
.tag { display: inline-block; margin-top: 8px; padding: 1px 8px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 3px; font-size: 13px; font-weight: 600; }
.draft-banner { background: var(--coral); color: var(--navy); text-align: center; font-weight: 600; padding: 8px 16px; font-size: 15px; }

/* Layout */
.page-head { padding-top: 44px; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); }
.lead { font-size: clamp(18px, 2.4vw, 21px); line-height: 1.45; color: var(--ink-2); margin: 12px 0 0; max-width: 680px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; margin-top: 40px; align-items: start; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.section-head h2 { font-size: 22px; }
.section-head a { font-size: 15px; font-weight: 600; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 16px; }

/* Game rows */
.game-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.game-list.compact { margin-top: 0; }
.game-row {
  display: grid; grid-template-columns: minmax(150px, 1.2fr) 88px 1fr 1fr 100px;
  gap: 4px 16px; align-items: baseline; padding: 14px 4px; border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
}
.game-row:hover { background: var(--soft); color: var(--ink); }
.game-title { font-weight: 700; font-size: 18px; }
.game-result { font-weight: 600; font-variant-numeric: tabular-nums; }
.game-stat { color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.game-date { color: var(--muted); font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.compact .game-row { grid-template-columns: 1fr auto; }
.compact .game-hd { display: none; }
.compact .game-title { grid-area: 1 / 1; }
.compact .game-result { grid-area: 1 / 2; text-align: right; }
.compact .game-stat { grid-area: 2 / 1; }
.compact .game-date { grid-area: 2 / 2; }

/* Charts */
.chart { margin: 32px 0 0; min-width: 0; }
.home-grid .chart { margin-top: 0; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.chart-head h3 { font-size: 19px; }
.chart-head small { color: var(--muted); font-size: 14px; }
.chart-note { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; }
.c1 { background: var(--series-1); color: #fff; }
.c2 { background: var(--series-2); color: var(--navy); }
.c3 { background: var(--series-3); color: var(--navy); }
.bar-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 118px; align-items: center; gap: 10px; padding: 7px 0; border-radius: 4px; }
.bar-row:hover { background: var(--soft); }
.bar-label { font-size: 14px; font-weight: 600; line-height: 1.15; }
.bar-label small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.bar-track { display: block; }
.bar { display: flex; gap: 2px; height: 26px; min-width: 6px; }
.seg { display: flex; align-items: center; justify-content: center; min-width: 3px; flex-basis: 0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.bar-end { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; line-height: 1.2; }

/* Rink */
.rink { display: block; width: 100%; height: auto; background: var(--navy); border-radius: 8px; font-family: var(--sans); }
figure.rink-wrap { margin-inline: 0; }
.prose > figure.rink-wrap:not(.chart) { margin-block: 16px 0; }
.rink-frame { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 2; }
.rink-grid { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 2; stroke-dasharray: 7 7; }
.rink-line { fill: none; stroke: rgba(255, 255, 255, .78); stroke-width: 2; }
.rink-dot { fill: var(--coral); }
.rink-crease { fill: #4a6288; stroke: #fff; stroke-width: 2; }
.rink-hd { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .78); stroke-width: 2.5; stroke-dasharray: 12 8; }
.rink-goal { stroke: var(--coral); stroke-width: 3; }
.rink-net { fill: #dfe5ee; }
.rink-net-label { fill: var(--navy); font-size: 19px; font-weight: 700; letter-spacing: .06em; }
.rink-hd-label { fill: #c5d3e8; font-size: 22px; font-weight: 700; }
.rink-handle { fill: #aeb9cc; font-size: 20px; }
/* Only the zones take the pointer, so rink lines drawn over them can't block hover. */
.rink > :not(.zone) { pointer-events: none; }
.zone { cursor: default; outline: none; }
.zone-fill { fill: #fff; transition: fill-opacity .15s; }
.zone:hover .zone-fill, .zone:focus .zone-fill { stroke: #fff; stroke-width: 3; }
.zone:focus-visible .zone-fill { stroke: var(--coral); stroke-width: 4; }
.zone-code { fill: #d7deea; font-size: 28px; font-weight: 600; letter-spacing: .06em; pointer-events: none; }
.zone-num { fill: #fff; font-size: 58px; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none; }
figure:not(.chart) .zone-code { fill: #fff; font-size: 32px; }
.toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.toggle button { font: 600 14px/1 var(--sans); padding: 8px 10px; background: #fff; color: var(--ink-2); border: 0; cursor: pointer; }
.toggle button + button { border-left: 1px solid var(--rule); }
.toggle button:hover { background: var(--soft); }
.toggle button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* Tables */
.table-scroll { overflow-x: auto; border-top: 1px solid var(--ink); }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 2px; }
.num { text-align: right; }
th button { all: unset; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
th button:hover { color: var(--ink); }
th button:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
th[aria-sort="ascending"] button::after { content: " ↑"; }
th[aria-sort="descending"] button::after { content: " ↓"; }
tbody tr:hover { background: var(--soft); }

/* Game page */
.back { display: inline-block; margin-bottom: 18px; font-size: 15px; font-weight: 600; text-decoration: none; }
.page-head .kicker + h1 { margin-top: 8px; }
.result { color: var(--coral-ink); white-space: nowrap; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 32px; align-items: start; margin-top: 32px; }
.game-grid .chart { margin-top: 0; }
.post { border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: 14px; line-height: 1.25; }
.post-head b { display: block; color: var(--ink); font-size: 16px; }
.post p { margin: 0 0 10px; font-size: 16px; line-height: 1.4; }
.post a { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 600; font-size: 15px; text-decoration: none; }
.pager { display: flex; justify-content: space-between; margin-top: 32px; font-weight: 600; }
.pager a { text-decoration: none; }

/* Reports and long text */
.report h1 { margin-top: 8px; }
.meta { color: var(--muted); margin: 8px 0 0; }
.note { margin-top: 24px; padding: 14px 16px; background: var(--soft); border-left: 3px solid var(--coral); font-size: 15px; line-height: 1.45; }
.prose { margin-top: 28px; }
.report .prose > p, .report .prose > ul { font: 400 19px/1.6 var(--serif); }
.prose p { margin: 16px 0 0; }
.prose h2 { font-size: 27px; margin-top: 40px; }
.prose h3 { font-size: 21px; margin-top: 28px; }
.prose .chart-head h3 { font-size: 19px; margin-top: 0; }
.prose ul { padding-left: 22px; margin: 16px 0 0; }
.prose li + li { margin-top: 8px; }
.defs { margin: 16px 0 0; display: grid; grid-template-columns: 190px 1fr; gap: 0; }
.defs dt, .defs dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.defs dt { font-weight: 600; padding-right: 16px; }

/* Tooltip */
.tip {
  position: fixed; z-index: 20; pointer-events: none; max-width: 240px;
  background: #fff; color: var(--ink); border: 1px solid var(--rule); border-radius: 6px;
  padding: 8px 10px; font-size: 14px; line-height: 1.35; box-shadow: 0 4px 16px rgba(18, 33, 59, .18);
}
.tip b { display: block; }
.tip span { display: block; color: var(--ink-2); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .home-grid, .game-grid, .two-up { grid-template-columns: minmax(0, 1fr); }
  .stats.six { grid-template-columns: repeat(3, 1fr); }
  .stats.six .stat:nth-child(4) { padding-left: 0; border-left: 0; }
  .stats.six .stat:nth-child(n + 4) { border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { min-height: 60px; gap: 8px; }
  .brand span { display: none; }
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: 14px; }
  .hero .wrap { padding-block: 44px 40px; }
  .hero-ring { width: 220px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .stats.six { grid-template-columns: repeat(2, 1fr); }
  .stats.six .stat:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
  .stats.six .stat:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .game-row { grid-template-columns: 1fr auto; }
  .game-hd { display: none; }
  .game-title { grid-area: 1 / 1; }
  .game-result { grid-area: 1 / 2; text-align: right; }
  .game-stat { grid-area: 2 / 1; }
  .game-date { grid-area: 2 / 2; }
  .bar-row { grid-template-columns: 62px minmax(0, 1fr) 76px; gap: 8px; }
  .defs { grid-template-columns: 1fr; }
  .defs dt { padding-bottom: 0; border-bottom: 0; }
  .defs dd { padding-top: 2px; }
  .toggle button { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .zone-fill { transition: none; } }
