:root {
  color-scheme: light;
  --ink: #202d27;
  --green: #1f3a34;
  --paper: #fffef8;
  --stripe: #f3f2e9;
  --line: #c6c8bd;
  --muted: #60675e;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.4 Arial, Helvetica, sans-serif; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: #853a20; }
button, input, select { font: inherit; }
button, input, select { border: 1px solid #949b8e; border-radius: 0; background: #fff; color: var(--ink); }
input, select { min-width: 0; max-width: 100%; min-height: 30px; padding: 3px 5px; }
button { cursor: pointer; padding: 4px 12px; min-height: 30px; background: #ececdf; }
button:hover { background: #dedfcd; }
:focus-visible { outline: 2px solid #8c462d; outline-offset: 2px; }
[hidden] { display: none !important; }
.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; }
.skip-link { position: absolute; top: -60px; padding: 8px; background: white; z-index: 10; }
.skip-link:focus { top: 0; }

.site-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 24px; padding: 11px 20px 9px; border-top: 5px solid var(--green); border-bottom: 1px solid var(--green); }
.site-name { font: bold 24px/1.2 Georgia, "Times New Roman", serif; text-decoration: none; }
.site-header nav { display: flex; gap: 16px; }
.site-header [aria-current] { font-weight: bold; text-decoration-thickness: 2px; }
.manager-link { margin-left: auto; font-size: 12px; }
main { padding: 14px 20px 24px; }
.page-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; }
h1 { margin: 0; font: bold 23px/1.2 Georgia, "Times New Roman", serif; }
h1 span { font-weight: normal; }
h2 span { color: var(--muted); font: normal 13px/1.3 Arial, Helvetica, sans-serif; }
.section-nav, .view-nav { display: flex; gap: 14px; }
.section-nav a[aria-current], .view-nav a[aria-current] { color: var(--ink); font-weight: bold; text-decoration: none; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr); align-items: start; gap: 24px; }
.home-section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 7px; }
.home-section-heading a { font-size: 12px; }
.home-games { display: grid; gap: 20px; }
.standings-table { font-variant-numeric: tabular-nums; }
.standings-table .stats-entity { min-width: 130px; }
.home-game-list { border-top: 2px solid var(--green); border-bottom: 1px solid var(--line); }
.home-game { display: grid; grid-template-columns: 58px minmax(0, 1fr) 28px; gap: 10px; align-items: center; min-height: 56px; padding: 5px 8px; border-bottom: 1px solid #e2e2d7; color: var(--ink); text-decoration: none; }
.home-game:nth-child(even) { background: var(--stripe); }
.home-game:last-child { border-bottom: 0; }
.home-game:hover { background: #e6ecdf; color: var(--ink); }
.home-game-time { color: var(--muted); font-size: 11px; }
.home-game-teams, .home-game-scores { display: grid; gap: 2px; }
.home-game-scores { text-align: right; font-variant-numeric: tabular-nums; }
.home-game-empty { margin: 0; padding: 13px 8px; color: var(--muted); font-size: 13px; }

.stats-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; padding: 8px 0 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.stats-filters label { display: flex; flex-direction: column; gap: 3px; }
.minimum-games { width: 85px; }
.filter-panel { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.filter-panel > summary { cursor: pointer; padding: 7px 0; font-size: 13px; }
.filter-panel .stats-filters { margin: 0; border: 0; padding-top: 3px; }
.filter-actions { display: flex; align-items: center; gap: 12px; min-height: 30px; }
.table-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 6px; }
h2 { margin: 0; font: bold 18px/1.3 Georgia, "Times New Roman", serif; }
.view-nav { font-size: 13px; }
.stat-modes { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 8px; font-size: 13px; }
.stat-modes a { padding: 5px 0; }
.stat-modes a[aria-current] { color: var(--ink); font-weight: bold; text-decoration: none; }
.table-search { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; }
.table-search input { width: 150px; }
.result-count { font-size: 12px; color: var(--muted); }

.stats-scroll { max-width: 100%; overflow: auto; border-top: 2px solid var(--green); border-bottom: 1px solid var(--line); }
.stats-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.stats-table th, .stats-table td { white-space: nowrap; padding: 4px 8px; border-bottom: 1px solid #e2e2d7; }
.stats-table thead th { background: #e5e6d8; color: var(--ink); font-weight: bold; border-bottom: 1px solid #a5ac9c; }
.stats-table thead button { border: 0; background: transparent; color: inherit; padding: 3px 0; min-height: 28px; font-weight: inherit; text-decoration: underline; text-decoration-color: #9ba18f; }
.stats-table thead button:hover { text-decoration-color: var(--ink); }
.stats-table [aria-sort="ascending"] button::after { content: " ↑"; }
.stats-table [aria-sort="descending"] button::after { content: " ↓"; }
.stats-table tbody th { font-weight: normal; }
.stats-number { text-align: right; font-variant-numeric: tabular-nums; }
.stats-rank { width: 35px; text-align: right; color: var(--muted); }
.stats-entity { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--paper); border-right: 1px solid var(--line); }
.stats-table tbody tr:nth-child(even) > * { background: var(--stripe); }
.stats-table tbody tr:hover > * { background: #e6ecdf; }
.club-abbrev { margin-left: 7px; color: var(--muted); font-size: 11px; }
.stats-empty { text-align: left; height: 65px; color: var(--muted); white-space: normal !important; }
.table-note, .search-empty { color: var(--muted); font-size: 12px; margin: 6px 0 12px; }
.stats-definitions { border-top: 1px solid var(--line); padding-top: 7px; font-size: 12px; }
.stats-definitions summary { cursor: pointer; font-weight: bold; }
.stats-definitions dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 4px 20px; }
.stats-definitions dl > div { display: flex; gap: 8px; }
.stats-definitions dt { flex: 0 0 48px; font-weight: bold; }
.stats-definitions dd { margin: 0; }
.site-footer { display: flex; gap: 16px; padding: 8px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.back-link, .player-meta { margin: 0 0 10px; font-size: 13px; }
.detail-section { margin: 16px 0; }
.detail-section h2 { margin-bottom: 6px; }
.four-factors { max-width: 620px; }
.four-factors-table { table-layout: fixed; }
.four-factors .four-factors-table .stats-entity { width: 36%; min-width: 0; max-width: none; white-space: normal; }
.factor-definitions { color: var(--muted); font-size: 12px; margin-top: 5px; }
.factor-definitions summary { cursor: pointer; }
.factor-definitions p { margin: 5px 0; }
.boxscore-heading p { margin: 5px 0 12px; font-size: 13px; color: var(--muted); }
.stats-table tfoot > tr > * { border-top: 1px solid var(--line); background: #e5e6d8; font-weight: bold; }
.live-label, .is-live .score-status { color: #9b251a; }
.score-strip { border-top: 3px solid var(--green); padding: 0 20px; background: var(--stripe); }
.score-strip-content { display: flex; min-width: 0; font-size: 12px; }
.score-date { flex: 0 0 202px; align-self: center; padding: 6px 12px 6px 0; }
.score-date-nav { display: flex; align-items: center; justify-content: space-between; }
.score-date-nav a { padding: 0 8px; font-size: 22px; line-height: 28px; text-decoration: none; }
.score-date form { display: flex; gap: 4px; }
.score-date input { width: 140px; font-size: 12px; }
.score-date button { padding: 3px 6px; font-size: 12px; }
.score-games { display: flex; overflow: auto; flex: 1 1 0; min-width: 0; }
.score-game { flex: 0 0 126px; padding: 8px 14px; border-left: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.score-game:hover { background: #e5e6d8; color: var(--ink); }
.score-status { display: block; font-size: 10px; margin-bottom: 3px; white-space: nowrap; }
.score-clubs { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-variant-numeric: tabular-nums; }
.score-empty { align-self: center; margin: 8px 14px; color: var(--muted); }
.refresh-status { margin: 0; padding: 4px 20px; font-size: 12px; color: #9b251a; }

@media (max-width: 600px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .home-games { gap: 18px; }
  .score-strip { padding: 0 10px; }
  .score-date { flex-basis: 172px; padding-right: 8px; }
  .score-date input { width: 114px; min-height: 32px; }
  .score-date button { min-height: 32px; }
  .score-game { flex-basis: 106px; padding: 8px; }
  .score-date-nav a { line-height: 32px; }
  .site-header { padding: 10px; gap: 8px 16px; }
  .site-name { width: 100%; font-size: 23px; }
  .site-header a:not(.site-name) { display: inline-block; padding: 5px 0; }
  main { padding: 12px 10px 20px; }
  h1 { font-size: 20px; }
  .page-heading { gap: 8px; }
  .section-nav { width: 100%; }
  .section-nav a, .view-nav a { padding: 5px 0; }
  .stats-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; }
  .stats-filters label { min-width: 0; }
  .stats-filters input, .stats-filters select { width: 100%; min-height: 36px; font-size: 16px; }
  .filter-actions { grid-column: 1 / -1; }
  .filter-actions button { min-height: 36px; }
  .table-toolbar { gap: 4px 12px; }
  .table-toolbar h2 { width: 100%; }
  .view-nav { width: 100%; }
  .table-search { margin-left: 0; }
  .table-search input { font-size: 16px; min-height: 36px; }
  .result-count { margin-left: auto; }
  .stats-table { font-size: 12px; }
  .stats-table th, .stats-table td { padding: 4px 6px; }
  .stats-table thead button { min-height: 36px; }
  .stats-table .stats-entity { min-width: 140px; max-width: 185px; white-space: normal; }
  .stats-table .stats-rank { display: none; }
  .site-footer { padding: 8px 10px; }
}
