*{box-sizing:border-box}body{margin:0;background:#f3f5f8;color:#18283b;font:16px/1.5 system-ui,-apple-system,sans-serif}main{max-width:1200px;margin:auto;padding:28px 20px 70px}header{padding:28px 32px;background:#142d49;color:white;border-radius:16px}h1{margin:0;font-size:clamp(1.5rem,4vw,2.5rem)}h2{font-size:1.25rem;margin:32px 0 14px}.eyebrow{letter-spacing:.1em;text-transform:uppercase;font-size:.8rem;color:#bbd8f5}.switch{display:flex;gap:10px;margin:24px 0}.switch button{padding:11px 18px;border:1px solid #a9b8c9;background:white;border-radius:8px;cursor:pointer;font-weight:600}.switch button[aria-pressed=true]{background:#142d49;color:white}.table-scroll{overflow-x:auto;background:white;border-radius:12px;box-shadow:0 3px 15px #1d344414}table{border-collapse:collapse;width:100%;min-width:750px}th,td{text-align:left;padding:12px 14px;border-bottom:1px solid #e6eaf0}th{background:#e6edf5;font-size:.8rem;text-transform:uppercase;letter-spacing:.03em}tr:nth-child(even){background:#f8fafc}tr:hover{background:#eef5ff}.score{font-weight:800;white-space:nowrap}.fixture-home{color:#1558a6;font-weight:650}.fixture-other{color:#111111;font-weight:650}.won{color:#187243;font-weight:700}.lost{color:#a52b37;font-weight:700}.drawn{color:#675a31;font-weight:700}a{color:#125b9c;font-weight:600}.muted{color:#9ca8b4}section{margin-bottom:36px}[hidden]{display:none!important}@media(max-width:650px){main{padding:12px}header{padding:20px}td,th{padding:9px 10px}}
/* Keep every result on one line; scroll the table when space is limited. */
.table-scroll table{width:100%;min-width:max-content}
.table-scroll th,.table-scroll td{white-space:nowrap}
.season-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0;padding:14px 18px;background:#fff;border:1px solid #dce3ec;border-radius:12px}
.season-step{display:inline-block;text-decoration:none;border:1px solid #bac8d8;padding:10px 13px;border-radius:8px;white-space:nowrap}
.season-step:hover{background:#eaf2fb}.season-pickers{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}
.season-pickers label{font-size:.8rem;font-weight:700;color:#45556b;display:flex;flex-direction:column;gap:3px}
.season-pickers select{padding:8px 24px 8px 10px;border:1px solid #b7c5d5;border-radius:7px;background:white;color:#18283b;font:inherit;min-width:125px}
.archive-layout{display:grid;grid-template-columns:185px minmax(0,1fr);gap:22px;align-items:start}
.decade-sidebar{background:#f2eadc;border:1px solid #ded2bc;border-radius:12px;padding:14px}
.decade-sidebar h2{font-size:1rem;margin:0 0 12px;color:#3e3a33}
#decade-season-links{display:flex;flex-direction:column;gap:3px}
#decade-season-links a{display:block;text-decoration:none;color:#3d434c;font-weight:600;padding:7px 10px;border-radius:6px}
#decade-season-links a:hover{background:#e6d9c4}
#decade-season-links a[aria-current=page]{background:#173c65;color:white}
.archive-content{min-width:0}.archive-content .switch{margin-top:0}
@media(max-width:800px){.archive-layout{grid-template-columns:1fr}.decade-sidebar{order:2}.archive-content{order:1}#decade-season-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}}
@media(max-width:620px){.season-navigation{flex-wrap:wrap;justify-content:center}.season-pickers{order:-1;width:100%}.season-step{flex:1;text-align:center}}
/* v1.11: reclaim space from the decade sidebar for the results table. */
@media(min-width:801px){
  main{max-width:1500px}
  .archive-layout{grid-template-columns:140px minmax(0,1fr);gap:12px}
  .decade-sidebar{padding:12px 8px}
  .decade-sidebar h2{font-size:.88rem;line-height:1.25;margin:0 0 10px}
  #decade-season-links a{padding:6px 7px;font-size:.92rem;white-space:nowrap}
}

/* v1.12: compact desktop table cells to fit long historical competition names. */
@media(min-width:801px){
  .archive-content .table-scroll th,
  .archive-content .table-scroll td{padding-left:7px;padding-right:7px}
  .archive-content .table-scroll th:first-child,
  .archive-content .table-scroll td:first-child{padding-left:10px}
  .archive-content .table-scroll th:last-child,
  .archive-content .table-scroll td:last-child{padding-right:10px}
  .archive-content .table-scroll{max-width:100%}
}

/* v1.13: one season picker and expandable decade navigation. */
#decade-season-links{display:flex;flex-direction:column;gap:4px}
.decade-group{min-width:0}
.decade-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:3px;border:0;border-radius:6px;background:transparent;color:#3e3a33;font:inherit;font-size:.86rem;font-weight:750;text-align:left;padding:8px 6px;cursor:pointer}
.decade-toggle:hover,.decade-toggle[aria-expanded=true]{background:#e6d9c4}
.decade-arrow{font-size:.9rem}
.decade-items{display:flex;flex-direction:column;gap:2px;padding-left:5px}
.decade-items[hidden]{display:none}
#decade-season-links .decade-items a{padding:5px 6px;font-size:.88rem}
@media(max-width:800px){#decade-season-links{display:flex;flex-direction:column}.decade-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(90px,1fr))}}


/* Ice hockey league standings: reserve space for team names and distribute
   GP through PTS evenly, with headers and values centred together. */
.archive-content .table-scroll table.standings-hockey {
  table-layout: fixed;
  width: 100%;
  min-width: 850px;
}
.archive-content .table-scroll table.standings-hockey th:nth-child(1),
.archive-content .table-scroll table.standings-hockey td:nth-child(1) { width: 7%; }
.archive-content .table-scroll table.standings-hockey th:nth-child(2),
.archive-content .table-scroll table.standings-hockey td:nth-child(2) { width: 31%; }
.archive-content .table-scroll table.standings-hockey th:nth-child(n+3),
.archive-content .table-scroll table.standings-hockey td:nth-child(n+3) {
  width: 6.8889%;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.season-standings{margin-top:48px;border-top:2px solid #d8e0e9;padding-top:12px}
.season-standings h2{margin:22px 0 14px}
.season-standings h3{font-size:1.05rem;margin:24px 0 10px;color:#253c55}
.season-standings .standings-section{margin-bottom:38px}
.standings-table th,.standings-table td{padding:9px 12px}
.standings-table .club-highlight{background:#e6f0fb;font-weight:700}

/* Phone-first results: desktop layout is unchanged. */
.mobile-table-options{display:none}
@media(max-width:650px){
  html{-webkit-text-size-adjust:100%}
  main{padding:10px 8px 45px}
  header{padding:16px 18px}
  header h1{font-size:1.25rem;line-height:1.25}
  .season-navigation{margin:12px 0;padding:10px;gap:6px}
  .season-step{font-size:.8rem;padding:8px 5px;white-space:normal}
  .switch{gap:6px;margin:14px 0}
  .switch button{padding:9px 10px;font-size:.78rem}
  .archive-content h2{font-size:1.05rem;margin:18px 0 10px}
  .mobile-table-options{display:flex;gap:6px;margin:8px 0 10px}
  .mobile-table-options button{border:1px solid #a9b8c9;background:#fff;color:#142d49;border-radius:7px;padding:7px 10px;font-size:.78rem;font-weight:650}
  .mobile-table-options button[aria-pressed=true]{background:#142d49;color:#fff}
  .archive-content .table-scroll table.results-table{table-layout:fixed;width:100%;min-width:0;font-size:clamp(8px,2.35vw,11px)}
  .archive-content .table-scroll table.results-table colgroup{display:none}
  .archive-content .table-scroll table.results-table th,
  .archive-content .table-scroll table.results-table td{padding:7px 2px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.25}
  .archive-content .table-scroll table.results-table th{font-size:.85em;letter-spacing:0}
  .archive-content .table-scroll table.results-table th:nth-child(1),
  .archive-content .table-scroll table.results-table td:nth-child(1){width:12%}
  .archive-content .table-scroll table.results-table th:nth-child(2),
  .archive-content .table-scroll table.results-table td:nth-child(2){width:24%}
  .archive-content .table-scroll table.results-table th:nth-child(3),
  .archive-content .table-scroll table.results-table td:nth-child(3){width:8%}
  .archive-content .table-scroll table.results-table th:nth-child(4),
  .archive-content .table-scroll table.results-table td:nth-child(4){width:10%}
  .archive-content .table-scroll table.results-table th:nth-child(5),
  .archive-content .table-scroll table.results-table td:nth-child(5){width:8%}
  .archive-content .table-scroll table.results-table th:nth-child(6),
  .archive-content .table-scroll table.results-table td:nth-child(6){width:18%}
  .archive-content .table-scroll table.results-table th:nth-child(7),
  .archive-content .table-scroll table.results-table td:nth-child(7){width:11%}
  .archive-content .table-scroll table.results-table th:nth-child(8),
  .archive-content .table-scroll table.results-table td:nth-child(8){width:9%}
  .archive-content .table-scroll table.results-table td.match-date{font-size:0}
  .archive-content .table-scroll table.results-table td.match-date::after{content:attr(data-short-date);font-size:9px}
  body.mobile-table-scroll .archive-content .table-scroll table.results-table{min-width:920px;width:100%;font-size:13px}
  body.mobile-table-scroll .archive-content .table-scroll table.results-table colgroup{display:table-column-group}
  body.mobile-table-scroll .archive-content .table-scroll table.results-table th,
  body.mobile-table-scroll .archive-content .table-scroll table.results-table td{white-space:nowrap;overflow:visible;overflow-wrap:normal;padding:9px 7px;font-size:inherit}
  body.mobile-table-scroll .archive-content .table-scroll table.results-table td.match-date{font-size:13px}
  body.mobile-table-scroll .archive-content .table-scroll table.results-table td.match-date::after{display:none}
  .archive-content .table-scroll table.standings-hockey{min-width:760px}
}

.standings-switch{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 16px}
.standings-switch button{border:1px solid #a9b8c9;background:#fff;color:#18283b;
  border-radius:8px;padding:8px 17px;font:inherit;font-weight:650;cursor:pointer}
.standings-switch button[aria-pressed="true"]{background:#142d49;color:#fff;border-color:#142d49}
.standings-switch button:focus-visible{outline:3px solid #4e9ef5;outline-offset:2px}

.opposition-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:10px 0 24px}
.opposition-controls button{padding:9px 16px;border:1px solid #a9b8c9;background:#fff;border-radius:8px;cursor:pointer;font:inherit;font-weight:650}
.opposition-controls button[aria-pressed=true]{background:#142d49;color:#fff}
.opposition-controls label{display:flex;align-items:center;gap:8px;font-weight:650}
.opposition-controls select{font:inherit;padding:8px;border:1px solid #a9b8c9;border-radius:8px;max-width:100%}
.opponent-section h3{font-size:1.08rem;margin:26px 0 10px}
.opponent-count{font-weight:400;color:#5e7185;font-size:.88rem}
@media(max-width:650px){.switch{flex-wrap:wrap}.opposition-controls label{width:100%}}

/* v1.20: consistent column positions across independently rendered results tables.
   Standings tables deliberately keep their existing automatic sizing. */
.archive-content .table-scroll table.results-table {
  table-layout: fixed;
  width: 100%;
  min-width: 1050px;
}
.archive-content .table-scroll table.results-table th,
.archive-content .table-scroll table.results-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1100px) {
  .archive-content .table-scroll table.results-table { min-width: 1050px; }
}

/* v1.20: keep archive action text on one line in its wider column. */
.archive-content .table-scroll table.results-table td:last-child a { white-space: nowrap; }

html.mobile-zoom-layout .archive-content .table-scroll table.results-table td:nth-child(2) {
  white-space:normal; overflow:visible; text-overflow:clip;
}
html.mobile-zoom-layout .season-player-stats table { min-width:1100px; table-layout:auto; }
html.mobile-zoom-layout .season-player-stats th:first-child,
html.mobile-zoom-layout .season-player-stats td:first-child {
  min-width:205px; white-space:nowrap; overflow:visible; text-overflow:clip;
}
html.mobile-zoom-layout .standings-table { min-width:900px; }
html.mobile-zoom-layout .mobile-table-options { display:none!important; }
