/* Season 2 visual system â€” replace the existing style.css with this file */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy: #0b1629;
  --navy-2: #132542;
  --red: #d9424e;
  --red-dark: #a92535;
  --gold: #e6b856;
  --ink: #172033;
  --muted: #687287;
  --line: #dfe4ec;
  --surface: #ffffff;
  --surface-alt: #f5f7fb;
  --page: #edf1f6;
  --shadow-sm: 0 2px 8px rgba(11, 22, 41, .06);
  --shadow-md: 0 12px 32px rgba(11, 22, 41, .12);
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  transition: background-color .25s ease, color .25s ease;
}

.background-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .035;
  pointer-events: none;
  background-image: url('./resources/navLogo.png');
  background-repeat: repeat;
  background-position: top left;
}

a { color: inherit; }
h1, h2, h3 { font-family: 'Barlow Condensed', Arial, sans-serif; letter-spacing: .02em; }
h1 {
  margin: 30px 16px 22px;
  color: var(--navy);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: .95;
  text-transform: uppercase;
}
h2 { color: var(--navy); font-size: 1.8rem; }
h3 { color: var(--navy); }
p { color: var(--muted); }

/* Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px clamp(16px, 4vw, 54px);
  background: linear-gradient(110deg, var(--navy), var(--navy-2));
  border-bottom: 3px solid var(--red);
  box-shadow: 0 3px 14px rgba(11, 22, 41, .22);
}
.nav-logo { flex: 0 0 auto; }
.nav-logo img { display: block; width: 70px; height: 58px; object-fit: contain; }
.nav-links { display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: 6px; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 7px;
  color: #f7f9fc;
  font-size: .83rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { background: rgba(255,255,255,.12); color: #fff; transform: translateY(-1px); }

/* Shared surfaces */
table, .news-section, .calendar, .events, .standings-table, .team-card, .latest-results, .standings, .news-article {
  background: var(--surface);
  border: 1px solid rgba(180, 190, 204, .55);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
table { width: min(90%, 1200px); margin: 0 auto 20px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--navy); color: #fff; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
td { color: var(--ink); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .16s ease; }
tbody tr:hover { background: #f7f9fc; }

/* Home page columns */
.main-sections {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto 32px;
  padding: 0 20px;
}
.latest-results, .standings { width: 24%; min-width: 240px; height: 65vh; padding: 18px; text-align: left; }
.news-section { width: 52%; height: 65vh; margin: 0; padding: 24px; overflow-y: auto; text-align: left; }
.standings { display: flex; flex-direction: column; }
.standings-body { flex: 1; overflow-y: auto; }
.latest-results h2, .standings h2, .news-section h2 { margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--red); color: var(--navy); font-size: 1.6rem; text-align: left; }
.latest-results ul, .standings ol { margin: 0; padding-left: 20px; }
.news-item { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item h3 { margin: 0 0 5px; font-size: 1.35rem; }
.news-item p { margin: 0; }
.latest-result-card { padding: 10px 0; border-bottom: 1px solid var(--line); }
.latest-result-card .team-row { display: flex; align-items: center; gap: 7px; }
.latest-result-card .team-logo { width: 26px; height: 26px; margin: 0; }
.latest-result-card .team-name { flex: 1; margin: 0; font-family: 'Inter', Arial, sans-serif; font-size: .85rem; }
.latest-result-card .score { min-width: 22px; font-size: 1.2rem; text-align: right; }
.overtime-text, .overtime { color: var(--muted); font-size: .75rem; text-align: right; }
.small-standings-row { margin-bottom: 18px; }

/* Schedule and calendar */
.schedule-container { display: flex; align-items: flex-start; justify-content: center; gap: 24px; max-width: 1400px; margin: 0 auto; padding: 0 20px 32px; }
.calendar, .events { width: min(100%, 550px); max-height: 65vh; margin: 0; padding: 22px; overflow-y: auto; text-align: left; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.calendar-header button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-alt); color: var(--navy); cursor: pointer; transition: .2s ease; }
.calendar-header button:hover { border-color: var(--red); background: var(--red); color: #fff; }
.month-year { width: auto; color: var(--navy); font-weight: 700; }
.days, .dates { display: grid; grid-template-columns: repeat(7, 1fr); }
.days { margin-top: 14px; }
.day { padding: 7px 0; color: var(--muted); font-size: .72rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.dates { gap: 5px; }
.date { display: grid; width: 38px; height: 38px; place-items: center; margin: auto; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; font-size: .86rem; font-weight: 600; transition: .2s ease; }
.date:hover { background: #e8edf5; }
.date.active { background: var(--navy); color: #fff; box-shadow: 0 4px 10px rgba(11,22,41,.25); }
.date.inactive { color: #b5bdca; }
.date.has-event::after { width: 5px; height: 5px; bottom: 3px; background: var(--red); }
.events h1 { margin: 0 0 16px; font-size: 2rem; text-align: left; }
.event-card { margin: 12px 0; padding: 16px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius-sm); background: var(--surface-alt); box-shadow: none; transition: transform .2s ease, box-shadow .2s ease; }
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.event-card h3, .event-title { margin: 0; color: var(--navy); font-size: 1.25rem; }
.event-meta { margin: 5px 0 0; color: var(--muted); font-size: .86rem; }

/* Games */
.game-card { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-alt); text-align: left; transition: transform .2s ease, box-shadow .2s ease; }
.game-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.game-card.upcoming { border-left: 4px solid var(--gold); }
.team-row { display: flex; align-items: center; gap: 12px; }
.team-game-logo { width: 38px; height: 38px; object-fit: contain; }
.team-game-name { flex: 1; color: var(--navy); font-family: 'Barlow Condensed', Arial, sans-serif; font-size: 1.5rem; font-weight: 700; }
.score { color: var(--navy); font-family: 'Barlow Condensed', Arial, sans-serif; font-size: 1.8rem; font-weight: 800; }
.score.winner { color: var(--red); }
.game-card.upcoming .score { color: #9aa4b4; }
.overtime-row { display: flex; justify-content: flex-end; color: var(--muted); font-size: .78rem; }

/* Standings and stats */
.standings-table { width: min(90%, 1400px); max-height: 70vh; margin: 0 auto 20px; overflow: auto; border-radius: var(--radius); }
.standings-header, .standings-row { display: grid; grid-template-columns: 2.5fr repeat(9, 1fr); min-width: 850px; }
.stats-header { display: grid; grid-template-columns: 2fr 3fr repeat(8, 1fr); min-width: 980px; }
.standings-header, .stats-header { position: sticky; top: 0; z-index: 2; }
.standings-stat { position: relative; padding: 12px 8px; background: var(--navy); color: #fff; cursor: pointer; font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.standings-stat:hover, .standings-stat.sorted { color: var(--gold); }
.standings-stat.sorted::after { content: ''; position: absolute; top: 50%; right: 5px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(-20%); }
.standings-stat.sorted.asc::after { border-top-color: transparent; border-bottom-color: currentColor; transform: translateY(-70%); }
.standings-team, .standings-data { padding: 11px 8px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; text-align: center; }
.standings-team { color: var(--navy); font-weight: 700; }
.sort-btn { border: 0; background: none; color: inherit; cursor: pointer; }
.legend.compact { max-width: 90%; margin: 10px auto 20px; color: var(--muted); font-size: .76rem; }
.stats-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 16px auto 26px; }
.filter-group { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
.filter-group select { min-width: 175px; padding: 10px 34px 10px 12px; border: 1px solid #cbd3df; border-radius: 7px; outline: none; background-color: #fff; color: var(--ink); font: inherit; cursor: pointer; transition: .2s ease; }
.filter-group select:hover { border-color: var(--navy); }
.filter-group select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,66,78,.16); }

/* Team pages */
.team-card { max-width: 960px; margin: 20px auto; padding: clamp(18px, 4vw, 30px); text-align: left; }
.team-header { display: flex; align-items: center; gap: 16px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.team-logo { width: 64px; height: 64px; object-fit: contain; }
.team-name { margin: 0; color: var(--navy); font-size: 2rem; }
.team-description { margin: 10px 0 22px; color: var(--muted); }
.team-section { margin-bottom: 24px; }
.team-section h3 { margin-bottom: 9px; color: var(--red); }
.team-section table { width: 100%; box-shadow: none; }
.mini-wrapper { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.mini-table { width: 100%; margin: 0; border: 0; border-radius: 0; }
.mini-table th { position: sticky; top: 0; }
.mini-table td, .mini-table th { padding: 9px 12px; }

/* News */
.news-page-content { display: flex; flex-direction: column; gap: 22px; max-width: 960px; margin: 0 auto; padding: 0 20px 36px; }
.news-article { padding: clamp(20px, 4vw, 32px); margin: 0; text-align: left; }
.news-header { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.news-header h2, .news-article h2 { flex: 1; margin: 0; color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.5rem); text-align: left; }
.news-article h3 { color: var(--red); font-family: 'Inter', Arial, sans-serif; font-size: 1rem; line-height: 1.55; }
.news-article p { line-height: 1.7; }
.news-image { width: min(45%, 420px); height: auto; border-radius: var(--radius-sm); object-fit: cover; }
.read-more { display: inline-flex; align-items: center; min-height: 40px; margin-top: 10px; padding: 8px 15px; border-radius: 7px; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; transition: .2s ease; }
.read-more:hover { background: var(--red); transform: translateY(-1px); }
.quote-article { border-left: 4px solid var(--gold); font-style: italic; text-align: center; }

/* Playoffs */
.bracket-container { max-width: 100%; margin: 0 auto; padding: 0 24px 36px; overflow-x: auto; }
.bracket { display: flex; width: max-content; min-width: 100%; gap: 72px; justify-content: center; }
.round { display: flex; flex-direction: column; justify-content: center; gap: 52px; min-width: 230px; }
.round h2 { margin: 0 0 6px; padding-bottom: 9px; border-bottom: 2px solid var(--red); color: var(--navy); font-size: 1.4rem; }
.playoffmatch { position: relative; min-width: 220px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); }
.playoffteam { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; color: var(--ink); text-align: left; }
.playoffteam + .playoffteam { border-top: 1px solid var(--line); }
.playoffteam.winner { background: #fff4f4; color: var(--red-dark); font-weight: 700; }
.playoffmatch span { display: block; margin: 6px 0; color: var(--muted); font-size: .72rem; text-align: center; }
.note { margin-top: 6px; color: var(--muted); font-size: .72rem; font-style: italic; }
.playoffmatch::after { position: absolute; top: 50%; right: -36px; width: 36px; height: 2px; background: #aeb8c7; content: ''; }
.round:last-child .playoffmatch::after { display: none; }

/* Modal and controls */
.modal { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(4, 11, 23, .68); backdrop-filter: blur(3px); }
.modal-content { width: min(90%, 640px); max-height: 90vh; overflow: auto; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-md); }
.game-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 3px solid var(--red); border-radius: var(--radius) var(--radius) 0 0; background: var(--navy); color: #fff; text-align: left; }
.game-table { width: calc(100% - 32px); margin: 16px; box-shadow: none; }
.hidden { display: none !important; }
.close-button { border: 0; background: transparent; color: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.mode-toggle { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--navy); box-shadow: var(--shadow-md); cursor: pointer; font-size: 1.1rem; transition: .2s ease; }
.mode-toggle:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }

/* Dark mode */
body.dark-mode {
  --page: #09111f;
  --surface: #111d30;
  --surface-alt: #17243a;
  --navy: #f3f7fc;
  --navy-2: #1a2b46;
  --ink: #edf3fb;
  --muted: #aebbd0;
  --line: #2b3b54;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .22);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .35);
}
body.dark-mode nav { background: linear-gradient(110deg, #07101e, #142847); }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode .team-name, body.dark-mode .team-game-name { color: var(--ink); }
body.dark-mode th, body.dark-mode .standings-stat { background: #07101e; }
body.dark-mode tbody tr:hover { background: #1a2a42; }
body.dark-mode .date:hover { background: #2b3e5b; }
body.dark-mode .date.active { background: var(--red); color: #fff; }
body.dark-mode .event-card, body.dark-mode .game-card { background: #17243a; }
body.dark-mode .playoffteam.winner { background: rgba(217,66,78,.16); color: #ff8791; }
body.dark-mode .mode-toggle { background: #17243a; color: var(--ink); border-color: var(--line); }
body.dark-mode .mode-toggle:hover { background: var(--red); color: #fff; }

@media (max-width: 1000px) {
  .main-sections { flex-wrap: wrap; }
  .news-section { order: -1; width: 100%; height: auto; max-height: 65vh; }
  .latest-results, .standings { width: calc(50% - 10px); }
  .schedule-container { flex-direction: column; align-items: center; }
  .calendar, .events { width: min(100%, 700px); }
}

@media (max-width: 700px) {
  nav { gap: 10px; padding: 8px 12px; align-items: flex-start; }
  .nav-logo img { width: 48px; height: 44px; }
  .nav-links { flex-wrap: wrap; justify-content: flex-start; gap: 2px; }
  .nav-links a { min-height: 32px; padding: 5px 8px; font-size: .66rem; }
  h1 { margin-top: 24px; }
  .main-sections, .schedule-container { padding-inline: 12px; }
  .latest-results, .standings, .news-section { width: 100%; min-width: 0; }
  .latest-results, .standings { height: auto; max-height: 55vh; }
  .calendar, .events { padding: 16px; }
  .team-row { gap: 8px; }
  .team-game-name { font-size: 1.25rem; }
  .score { font-size: 1.5rem; }
  .news-header { align-items: flex-start; flex-direction: column; }
  .news-image { width: 100%; }
  .team-header { align-items: flex-start; }
  .bracket-container { padding-inline: 14px; }
}

@media (max-width: 420px) {
  .date { width: 33px; height: 33px; font-size: .78rem; }
  .day { font-size: .62rem; }
  .team-game-logo { width: 30px; height: 30px; }
  .mode-toggle { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

/* Dark mode controls */
body.dark-mode .calendar-header button,
body.dark-mode .mode-toggle,
body.dark-mode .read-more {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

body.dark-mode .calendar-header button:hover,
body.dark-mode .mode-toggle:hover,
body.dark-mode .read-more:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: #fff;
}

/* Dark mode stats filters */
body.dark-mode .filter-group {
  color: var(--muted);
}

body.dark-mode .filter-group select {
  background-color: var(--red);
  color: #fff;
  border-color: var(--red);
}

body.dark-mode .filter-group select:hover {
  background-color: var(--red-dark);
  border-color: var(--red-dark);
}

body.dark-mode .filter-group select:focus {
  background-color: var(--red-dark);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(230, 184, 86, .22);
}

/* Dropdown choices: browser support varies, but this helps in most browsers */
body.dark-mode .filter-group select option {
  background: #17243a;
  color: #fff;
}

.nav-links a.nav-current {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.home-page {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 0 12px 28px;
}

.home-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 4px 16px;
  text-align: left;
}

.home-header h1 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--navy);
  font-size: 2.2rem;
  line-height: 1;
}

.home-header-rule {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, var(--red), transparent);
}

.home-mobile-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 0 4px 14px;
}

.home-mobile-links a {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--navy);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.home-mobile-links a:active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.home-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  padding: 0 4px;
}

.home-dashboard .home-panel {
  width: 100%;
  min-width: 0;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 16px;
  overflow: visible;
  text-align: left;
}

.home-dashboard .news-section {
  order: -1;
}

.home-dashboard .latest-results,
.home-dashboard .standings {
  max-height: 430px;
  overflow: hidden;
}

.home-dashboard .latest-results-body,
.home-dashboard .standings-body {
  overflow-y: auto;
}

.home-dashboard .standings-body {
  flex: 1;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
}

.home-dashboard .panel-heading h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--navy);
  font-size: 1.55rem;
  line-height: 1;
}

.panel-heading a {
  color: var(--red-dark);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.panel-heading a:hover {
  color: var(--red);
  text-decoration: underline;
}

.home-dashboard .news-item {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.home-dashboard .news-item a {
  display: block;
  text-decoration: none;
}

.home-dashboard .news-item h3 {
  margin: 0;
  color: var(--ink);
  font-family: 'Inter', Arial, sans-serif;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.35;
}

.home-dashboard .news-item h3::before {
  content: '›';
  display: inline-block;
  margin-right: 8px;
  color: var(--red);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: .7;
}

.home-dashboard .news-item:hover h3 {
  color: var(--red-dark);
}

.home-dashboard .news-quote-item {
  border-bottom: 0;
}

.home-dashboard .news-quote-item p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  font-style: italic;
}

/* Desktop: results | news | standings */
@media (min-width: 1001px) {
  .home-page {
    padding: 0 20px 36px;
  }

  .home-header {
    margin: 30px 0 20px;
  }

  .home-header h1 {
    font-size: 3rem;
  }

  .home-mobile-links {
    display: none;
  }

  .home-dashboard {
    grid-template-columns: minmax(240px, 1fr) minmax(380px, 2.15fr) minmax(240px, 1fr);
    gap: 20px;
    padding: 0;
  }

  .home-dashboard .home-panel {
    height: 65vh;
    max-height: 680px;
  }

  .home-dashboard .news-section {
    order: 0;
    overflow-y: auto;
  }
}

/* Dark mode additions */
body.dark-mode .nav-links a.nav-current {
  background: rgba(255, 255, 255, .14);
}

body.dark-mode .home-header h1,
body.dark-mode .home-dashboard .panel-heading h2,
body.dark-mode .home-dashboard .news-item h3 {
  color: var(--ink);
}

body.dark-mode .home-mobile-links a {
  background: var(--surface-alt);
  border-color: var(--line);
  color: var(--ink);
}

body.dark-mode .home-mobile-links a:active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

body.dark-mode .panel-heading a,
body.dark-mode .home-dashboard .news-item:hover h3 {
  color: #ff8791;
}

.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;
}

.home-feed {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 18px 12px 34px;
}

.home-results,
.home-news,
.home-standings {
  margin-bottom: 28px;
}

.feed-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 10px;
}

.feed-section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.55rem;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}

.feed-section-heading a {
  color: var(--red-dark);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.feed-section-heading a:hover {
  color: var(--red);
  text-decoration: underline;
}

/* A horizontal score strip on phones */
.home-results-track {
  display: flex;
  width: calc(100% + 24px);
  gap: 10px;
  margin: 0 -12px;
  padding: 2px 12px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.home-results-track > * {
  flex: 0 0 min(82vw, 310px);
}

.home-results-track .latest-result-card,
.home-results-track .game-card {
  height: 100%;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.home-results-track .latest-result-card .team-row {
  min-width: 230px;
}

.home-results-track .latest-result-card .team-name {
  color: var(--ink);
}

.home-results-track .latest-result-card .score {
  color: var(--navy);
}

.home-results-track .latest-result-card .score.winner {
  color: var(--red);
}

/* News becomes a stacked card feed */
.home-news-list {
  display: grid;
  gap: 12px;
}

.home-news-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.home-news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-news-card a {
  display: block;
  min-height: 118px;
  padding: 18px;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.news-card-kicker {
  margin: 0 0 7px;
  color: var(--red);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-news-card h3 {
  margin: 0;
  color: var(--navy);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.35;
}

.news-card-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
}

.home-news-card:hover .news-card-link {
  color: var(--red-dark);
}

.home-news-quote {
  border-left: 4px solid var(--gold);
}

.home-news-quote a {
  min-height: auto;
}

.home-news-quote p {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-style: italic;
}

/* Standings stays below the complete news feed */
.home-standings {
  padding: 16px;
  border: 1px solid rgba(180, 190, 204, .55);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.home-standings .feed-section-heading {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
}

.home-standings .standings-body {
  max-height: 420px;
  overflow-y: auto;
}

@media (min-width: 701px) {
  .home-feed {
    padding: 28px 20px 42px;
  }

  .home-results-track {
    width: 100%;
    margin: 0;
    padding-inline: 0;
  }

  .home-results-track > * {
    flex-basis: 280px;
  }

  .home-news-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-news-quote {
    grid-column: 1 / -1;
  }
}

/* Dark mode */
body.dark-mode .feed-section-heading h2,
body.dark-mode .home-news-card h3,
body.dark-mode .home-news-quote p,
body.dark-mode .home-results-track .latest-result-card .team-name,
body.dark-mode .home-results-track .latest-result-card .score {
  color: var(--ink);
}

body.dark-mode .feed-section-heading a,
body.dark-mode .home-news-card:hover .news-card-link {
  color: #ff8791;
}

body.dark-mode .home-results-track .latest-result-card,
body.dark-mode .home-results-track .game-card,
body.dark-mode .home-news-card,
body.dark-mode .home-standings {
  background: var(--surface);
  border-color: var(--line);
}

/* Compact score strip directly below the navigation */
.home-results {
  margin-top: 4px;
  margin-bottom: 24px;
}

.home-results-track {
  padding-top: 0;
  padding-bottom: 8px;
}

.home-results-track > * {
  flex-basis: min(72vw, 255px);
}

/* More compact result cards */
.home-results-track .latest-result-card,
.home-results-track .game-card {
  padding: 10px 11px;
  border-radius: 8px;
}

.home-results-track .latest-result-card .team-row {
  min-width: 0;
  gap: 6px;
}

.home-results-track .latest-result-card .team-logo {
  width: 24px;
  height: 24px;
}

.home-results-track .latest-result-card .team-name {
  font-size: .82rem;
}

.home-results-track .latest-result-card .score {
  font-size: 1.05rem;
  line-height: 1;
}

.home-results-track .overtime-text,
.home-results-track .overtime-row {
  margin-top: 3px;
  font-size: .68rem;
}

/* Keep all six nav links on one line on phones */
@media (max-width: 700px) {
  nav {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 7px 9px;
  }

  .nav-logo {
    flex: 0 0 42px;
  }

  .nav-logo img {
    width: 42px;
    height: 40px;
  }

  .nav-links {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0;
    min-width: 0;
  }

  .nav-links a {
    min-width: 0;
    min-height: 38px;
    padding: 5px 4px;
    font-size: .58rem;
    letter-spacing: .02em;
    white-space: nowrap;
  }
}

/* Very narrow phones */
@media (max-width: 380px) {
  nav {
    gap: 3px;
    padding-inline: 6px;
  }

  .nav-logo {
    flex-basis: 35px;
  }

  .nav-logo img {
    width: 35px;
    height: 35px;
  }

  .nav-links a {
    padding-inline: 2px;
    font-size: .52rem;
    letter-spacing: 0;
  }
}

.news-feed {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 18px 12px 36px;
}

.news-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 4px 14px;
}

.news-page-header h1 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--navy);
  font-size: 2.2rem;
  line-height: 1;
  text-align: left;
}

.news-page-header > div {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, var(--red), transparent);
}

.news-feed .news-page-content {
  gap: 14px;
  margin: 0;
  padding: 0;
}

.news-feed .news-article {
  padding: 19px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.news-feed .news-article h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: clamp(1.55rem, 6vw, 2rem);
  line-height: 1;
}

.news-feed .news-article p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.65;
}

.news-feed .news-article p:last-of-type {
  margin-bottom: 0;
}

.news-feed .news-image {
  display: block;
  width: 100%;
  max-width: none;
  margin: 2px 0 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.news-feed .news-article h3 {
  margin: 18px 0 12px;
  padding: 13px 15px;
  border-left: 3px solid var(--red);
  border-radius: 0 7px 7px 0;
  background: var(--surface-alt);
  color: var(--navy);
  font-family: 'Inter', Arial, sans-serif;
  font-size: .92rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.6;
}

.news-feed blockquote {
  margin: 16px 0;
  padding: 13px 15px;
  border-left: 3px solid var(--gold);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: .86rem;
  font-style: italic;
  line-height: 1.65;
  text-align: left;
}

.news-feed .draft-list {
  margin: 14px 0 16px;
  padding: 12px 12px 12px 34px;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.85;
  text-align: left;
}

.news-feed .draft-list li::marker {
  color: var(--red);
  font-weight: 800;
}

.news-feed .read-more {
  margin-top: 4px;
}

.news-feed .quote-article {
  padding: 22px 20px;
  border-left: 4px solid var(--gold);
  text-align: center;
}

.news-feed .quote-article p {
  margin: 0;
  color: var(--navy);
  font-family: 'Barlow Condensed', Arial, sans-serif;
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.25;
}

@media (min-width: 701px) {
  .news-feed {
    padding: 28px 20px 42px;
  }

  .news-page-header {
    margin-bottom: 20px;
  }

  .news-page-header h1 {
    font-size: 3rem;
  }

  .news-feed .news-article {
    padding: 28px 30px;
  }

  .news-feed .news-image {
    width: min(100%, 580px);
  }
}

/* Dark mode */
body.dark-mode .news-page-header h1,
body.dark-mode .news-feed .news-article h2,
body.dark-mode .news-feed .news-article h3,
body.dark-mode .news-feed .quote-article p {
  color: var(--ink);
}

body.dark-mode .news-feed .news-article h3,
body.dark-mode .news-feed blockquote,
body.dark-mode .news-feed .draft-list {
  background: var(--surface-alt);
}

body.dark-mode .news-feed .draft-list {
  color: var(--ink);
}

.schedule-page {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 18px 12px 36px;
}

.schedule-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 4px 14px;
}

.schedule-page-header h1 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--navy);
  font-size: 2.2rem;
  line-height: 1;
  text-align: left;
}

.schedule-page-header > div {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, var(--red), transparent);
}

.schedule-page .schedule-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.schedule-page .calendar,
.schedule-page .events {
  width: 100%;
  max-height: none;
  margin: 0;
  padding: 16px;
  overflow: visible;
  text-align: left;
}

.schedule-page .calendar-header {
  padding: 0 0 13px;
}

.schedule-page .calendar-header button {
  width: 34px;
  height: 34px;
}

.schedule-page .month-year {
  color: var(--navy);
  font-family: 'Barlow Condensed', Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.schedule-page .days {
  margin-top: 12px;
}

.schedule-page .day {
  padding: 6px 0;
  font-size: .64rem;
}

.schedule-page .dates {
  gap: 3px;
}

.schedule-page .date {
  width: 35px;
  height: 35px;
  font-size: .8rem;
}

/* The events panel is a natural scrolling feed rather than a second fixed-height box */
.schedule-page .events {
  min-height: 170px;
}

.schedule-page .events h1 {
  margin: 0 0 13px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
  color: var(--navy);
  font-size: 1.55rem;
  line-height: 1;
  text-transform: uppercase;
}

.schedule-page .event-card {
  margin: 10px 0;
  padding: 14px;
}

.schedule-page .event-card:first-of-type {
  margin-top: 0;
}

.schedule-page .event-title,
.schedule-page .event-card h3 {
  font-size: 1.15rem;
}

.schedule-page .game-card {
  margin-bottom: 10px;
  padding: 13px;
}

.schedule-page .team-game-logo {
  width: 34px;
  height: 34px;
}

.schedule-page .team-game-name {
  font-size: 1.3rem;
}

.schedule-page .score {
  font-size: 1.55rem;
}

.schedule-page .modal {
  padding: 14px;
}

.schedule-page .modal-content {
  width: 100%;
}

@media (min-width: 701px) {
  .schedule-page {
    padding: 28px 20px 42px;
  }

  .schedule-page-header {
    margin-bottom: 20px;
  }

  .schedule-page-header h1 {
    font-size: 3rem;
  }

  .schedule-page .schedule-container {
    grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
    align-items: start;
    gap: 20px;
  }

  .schedule-page .calendar,
  .schedule-page .events {
    padding: 22px;
  }

  .schedule-page .events {
    max-height: 65vh;
    overflow-y: auto;
  }

  .schedule-page .date {
    width: 39px;
    height: 39px;
  }
}

/* Dark mode */
body.dark-mode .schedule-page-header h1,
body.dark-mode .schedule-page .month-year,
body.dark-mode .schedule-page .events h1 {
  color: var(--ink);
}

.standings-page {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 18px 12px 36px;
}

.standings-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 4px 14px;
}

.standings-page-header h1 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--navy);
  font-size: 2.2rem;
  line-height: 1;
  text-align: left;
}

.standings-page-header > div {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, var(--red), transparent);
}

.standings-page .standings-filter-bar {
  justify-content: flex-start;
  margin: 0 4px 14px;
}

.standings-page .filter-group select {
  min-width: min(100%, 270px);
}

.standings-page .standings-table {
  width: 100%;
  max-height: none;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.standings-page .standings-header,
.standings-page .standings-body {
  min-width: 790px;
}

.standings-page .standings-header,
.standings-page .standings-row {
  grid-template-columns: minmax(190px, 2.5fr) repeat(9, minmax(60px, 1fr));
}

.standings-page .standings-stat {
  padding: 12px 7px;
  font-size: .7rem;
}

.standings-page .standings-team,
.standings-page .standings-data {
  padding: 11px 7px;
  font-size: .84rem;
}

/* Keep the team name visible while users scroll horizontal stats on mobile */
.standings-page .standings-header > :first-child,
.standings-page .standings-row > :first-child {
  position: sticky;
  left: 0;
}

.standings-page .standings-header > :first-child {
  z-index: 4;
  background: var(--navy);
}

.standings-page .standings-row > :first-child {
  z-index: 1;
  background: var(--surface);
  box-shadow: 4px 0 7px rgba(11, 22, 41, .08);
}

.standings-page .standings-row:hover > :first-child {
  background: #f7f9fc;
}

.standings-legend {
  width: 100%;
  max-width: none;
  margin: 12px 0 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.55;
  text-align: left;
}

.standings-legend summary {
  color: var(--navy);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.standings-legend p {
  margin: 8px 0 0;
  color: var(--muted);
}

@media (min-width: 701px) {
  .standings-page {
    padding: 28px 20px 42px;
  }

  .standings-page-header {
    margin-bottom: 20px;
  }

  .standings-page-header h1 {
    font-size: 3rem;
  }

  .standings-page .standings-table {
    max-height: 70vh;
    overflow-y: auto;
  }
}

/* Dark mode */
body.dark-mode .standings-page-header h1,
body.dark-mode .standings-legend summary {
  color: var(--ink);
}

body.dark-mode .standings-legend,
body.dark-mode .standings-page .standings-row > :first-child {
  background: var(--surface);
  border-color: var(--line);
}

body.dark-mode .standings-page .standings-header > :first-child {
  background: #07101e;
}

body.dark-mode .standings-page .standings-row:hover > :first-child {
  background: #1a2a42;
}

.stats-page {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 18px 12px 36px;
}

.stats-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 4px 14px;
}

.stats-page-header h1 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--navy);
  font-size: 2.2rem;
  line-height: 1;
  text-align: left;
}

.stats-page-header > div {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, var(--red), transparent);
}

.stats-page .stats-filter-bar {
  justify-content: flex-start;
  gap: 10px;
  margin: 0 4px 14px;
}

.stats-page .filter-group {
  flex: 1 1 145px;
}

.stats-page .filter-group select {
  width: 100%;
  min-width: 0;
}

.stats-page .stats-table {
  width: 100%;
  max-height: none;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.stats-page .stats-header,
.stats-page .stats-body {
  min-width: 900px;
}

.stats-page .stats-header,
.stats-page .stats-row {
  grid-template-columns: minmax(155px, 2fr) minmax(145px, 1.7fr) repeat(8, minmax(65px, 1fr));
}

.stats-page .standings-stat {
  padding: 12px 7px;
  font-size: .7rem;
}

.stats-page .stats-data,
.stats-page .stats-name,
.stats-page .stats-team {
  padding: 11px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: .84rem;
  font-weight: 600;
  text-align: center;
}

/* Supports stat rows using the existing standings cell classes, too */
.stats-page .standings-data,
.stats-page .standings-team {
  padding: 11px 7px;
  font-size: .84rem;
}

/* Preserve player identity as horizontal stat columns are swiped */
.stats-page .stats-header > :first-child,
.stats-page .stats-row > :first-child {
  position: sticky;
  left: 0;
}

.stats-page .stats-header > :first-child {
  z-index: 4;
  background: var(--navy);
}

.stats-page .stats-row > :first-child {
  z-index: 1;
  background: var(--surface);
  box-shadow: 4px 0 7px rgba(11, 22, 41, .08);
}

.stats-page .stats-row:hover > :first-child {
  background: #f7f9fc;
}

.stats-legend {
  width: 100%;
  max-width: none;
  margin: 12px 0 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.55;
  text-align: left;
}

.stats-legend summary {
  color: var(--navy);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.stats-legend p {
  margin: 8px 0 0;
  color: var(--muted);
}

@media (min-width: 701px) {
  .stats-page {
    padding: 28px 20px 42px;
  }

  .stats-page-header {
    margin-bottom: 20px;
  }

  .stats-page-header h1 {
    font-size: 3rem;
  }

  .stats-page .stats-filter-bar {
    gap: 16px;
  }

  .stats-page .filter-group {
    flex: 0 1 230px;
  }

  .stats-page .stats-table {
    max-height: 70vh;
    overflow-y: auto;
  }

}

/* Dark mode */
body.dark-mode .stats-page-header h1,
body.dark-mode .stats-legend summary {
  color: var(--ink);
}

body.dark-mode .stats-legend,
body.dark-mode .stats-page .stats-row > :first-child {
  background: var(--surface);
  border-color: var(--line);
}

body.dark-mode .stats-page .stats-header > :first-child {
  background: #07101e;
}

body.dark-mode .stats-page .stats-row:hover > :first-child {
  background: #1a2a42;
}

.teams-page {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 18px 12px 36px;
}

.teams-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 4px 14px;
}

.teams-page-header h1 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--navy);
  font-size: 2.2rem;
  line-height: 1;
  text-align: left;
}

.teams-page-header > div {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, var(--red), transparent);
}

.teams-page .team-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.teams-page .team-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.teams-page .team-header {
  gap: 13px;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.teams-page .team-logo {
  width: 54px;
  height: 54px;
}

.teams-page .team-name {
  font-size: 1.65rem;
  line-height: 1;
}

.teams-page .team-description {
  margin: 8px 0 18px;
  font-size: .9rem;
  line-height: 1.6;
}

.teams-page .team-section {
  margin-bottom: 20px;
}

.teams-page .team-section:last-child {
  margin-bottom: 0;
}

.teams-page .team-section h3 {
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--red);
  color: var(--navy);
  font-size: 1.22rem;
  line-height: 1;
}

.teams-page .mini-wrapper {
  max-height: 260px;
  border-color: var(--line);
}

.teams-page .mini-table {
  min-width: 500px;
}

.teams-page .mini-table th,
.teams-page .mini-table td {
  padding: 9px 10px;
  font-size: .8rem;
}

.teams-page .mini-table th {
  background: var(--navy);
  color: #fff;
}

@media (min-width: 701px) {
  .teams-page {
    padding: 28px 20px 42px;
  }

  .teams-page-header {
    margin-bottom: 20px;
  }

  .teams-page-header h1 {
    font-size: 3rem;
  }

  .teams-page .team-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .teams-page .team-card {
    padding: 24px;
  }

  .teams-page .team-logo {
    width: 62px;
    height: 62px;
  }

  .teams-page .team-name {
    font-size: 1.9rem;
  }
}

/* Dark mode */
body.dark-mode .teams-page-header h1,
body.dark-mode .teams-page .team-name,
body.dark-mode .teams-page .team-section h3 {
  color: var(--ink);
}

body.dark-mode .teams-page .mini-table th {
  background: #07101e;
}

/* Prevent team cards from widening beyond the phone viewport */
.teams-page,
.teams-page .team-main,
.teams-page .team-card,
.teams-page .team-section,
.teams-page .mini-wrapper {
  min-width: 0;
  max-width: 100%;
}

.teams-page .team-card {
  overflow: hidden;
}

.teams-page .mini-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.teams-page .mini-table {
  width: 100%;
  min-width: 500px;
}

/* Slightly narrower phone spacing */
@media (max-width: 700px) {
  .teams-page {
    padding-inline: 8px;
  }

  .teams-page .team-card {
    padding: 14px;
  }

  .teams-page .team-section {
    min-width: 0;
  }
}

/* Reliable horizontal table scrolling */
.standings-page .standings-table,
.stats-page .stats-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

/* Standings: keep the table wider than a phone */
.standings-page .standings-header,
.standings-page .standings-body,
.standings-page .standings-row {
  min-width: 850px;
}

.standings-page .standings-header,
.standings-page .standings-row {
  grid-template-columns: 220px repeat(9, 70px);
}

/* Stats: keep the table wider than a phone */
.stats-page .stats-header,
.stats-page .stats-body,
.stats-page .stats-row {
  min-width: 970px;
}

.stats-page .stats-header,
.stats-page .stats-row {
  grid-template-columns: 175px 155px repeat(8, 80px);
}

/* Do not let the page itself become horizontally scrollable */
.standings-page,
.stats-page {
  min-width: 0;
  overflow-x: hidden;
}

/* Make sure the sticky first column stays above the other cells */
.standings-page .standings-header > :first-child,
.stats-page .stats-header > :first-child {
  z-index: 5;
}

.standings-page .standings-row > :first-child,
.stats-page .stats-row > :first-child {
  z-index: 2;
}

/* Make the outer table the only scroll container */
.standings-page .standings-body,
.stats-page .stats-body {
  overflow: visible;
  flex: none;
}

/* Keep the first data column fixed while swiping horizontally */

/* Standings: first cell is the team name */
.standings-page .standings-row > :first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--surface);
  box-shadow: 4px 0 8px rgba(11, 22, 41, .12);
}

/* Stats: first cell is the player name */
.stats-page .standings-row > :first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--surface);
  box-shadow: 4px 0 8px rgba(11, 22, 41, .12);
}

/* Preserve the proper sticky-cell background during row hover */
.standings-page .standings-row:hover > :first-child,
.stats-page .standings-row:hover > :first-child {
  background: #f7f9fc;
}

/* Dark mode sticky data cells */
body.dark-mode .standings-page .standings-row > :first-child,
body.dark-mode .stats-page .standings-row > :first-child {
  background: var(--surface);
  box-shadow: 4px 0 8px rgba(0, 0, 0, .32);
}

body.dark-mode .standings-page .standings-row:hover > :first-child,
body.dark-mode .stats-page .standings-row:hover > :first-child {
  background: #1a2a42;
}

/* Dark mode: match the game modal header to the modal body */
body.dark-mode .game-modal-header {
  background: var(--surface);
  color: var(--ink);
}

/* Calendar dates with scheduled events */
.date.has-event {
  background: rgba(217, 66, 78, .12);
  color: var(--red-dark);
  font-weight: 800;
}

.date.has-event::after {
  bottom: 4px;
  width: 6px;
  height: 6px;
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(217, 66, 78, .16);
}

.date.has-event:hover {
  background: rgba(217, 66, 78, .22);
}

.date.active.has-event {
  background: var(--navy);
  color: #fff;
}

.date.active.has-event::after {
  background: var(--gold);
  box-shadow: none;
}

/* Dark mode event dates */
body.dark-mode .date.has-event {
  background: rgba(217, 66, 78, .25);
  color: #ff9aa3;
}

body.dark-mode .date.active.has-event {
  background: var(--red);
  color: #fff;
}

body.dark-mode .date.active.has-event::after {
  background: var(--gold);
}

.stats-empty-state {
  margin: 0;
  padding: 24px 16px;
  color: var(--muted);
  text-align: center;
}

body.dark-mode .stats-empty-state {
  color: var(--muted);
}

.home-results-track {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.home-results-track > * {
  scroll-snap-align: none;
}