:root {
  color-scheme: light;
  --ink: #212121;
  --muted: #767676;
  --line: #e1e1e1;
  --paper: #ffffff;
  --field: #ffffff;
  --red: #a80202;
  --red-dark: #7d0505;
  --soft-red: #f8f2f2;
  --black: #1f1f1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
}

a {
  color: inherit;
}

.site-header {
  background: var(--paper);
  border-bottom: 0;
}

.menu-header {
  background: #8b8a87 url("/assets/GreyBackground.png") center / cover;
}

.stadium-banner {
  border-top: 7px solid #4a2a25;
  margin: 0 auto;
  max-width: none;
  overflow: hidden;
}

.stadium-banner img {
  display: block;
  height: clamp(235px, 23.2vw, 345px);
  object-fit: cover;
  object-position: center 47%;
  width: 100%;
}

.header-inner {
  align-items: center;
  display: flex;
  gap: clamp(24px, 5vw, 72px);
  justify-content: center;
  margin: 0 auto;
  max-width: 1440px;
  padding: 33px clamp(24px, 5vw, 80px) 30px;
  position: relative;
}

.header-logo {
  display: block;
  height: 58px;
  left: clamp(24px, 7vw, 132px);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
}

.header-logo img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nav a {
  border: 1px solid transparent;
  color: var(--red);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 0 13px;
  text-decoration: none;
  text-transform: uppercase;
}

.nav a + a {
  border-left: 2px solid var(--black);
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--red);
}

.season-identity {
  margin: 0 auto;
  max-width: 1600px;
  padding: 0 clamp(24px, 5vw, 80px);
}

.rule {
  background: var(--red);
  height: 3px;
  width: 100%;
}

.season-identity-inner {
  align-items: center;
  display: grid;
  gap: clamp(28px, 6vw, 96px);
  grid-template-columns: 1fr auto 1fr;
  min-height: 230px;
  padding: 28px 8px;
}

.season-identity-inner.compact {
  min-height: 190px;
}

.season-number,
.season-year {
  color: #666666;
  font-size: clamp(42px, 5.2vw, 66px);
  font-weight: 800;
  line-height: 1;
}

.season-number {
  text-align: left;
}

.season-year {
  text-align: right;
}

.hero-banner {
  display: block;
  height: auto;
  max-width: min(420px, 34vw);
}

.season-toolbar {
  display: grid;
  gap: 27px 32px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 32px auto 0;
  max-width: 1600px;
  padding: 0 clamp(24px, 5vw, 80px);
}

.tool-button {
  align-items: center;
  background: #b60000;
  border: 1px solid #b60000;
  border-radius: 4px;
  color: #ffffff;
  display: flex;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  line-height: 1.25;
  min-height: 35px;
  padding: 7px 16px;
  text-align: center;
  text-decoration: none;
}

.tool-button:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: #ffffff;
}

.tool-button-image {
  gap: 9px;
}

.tool-button-image img {
  background: #ffffff;
  border-radius: 999px;
  height: 24px;
  object-fit: contain;
  padding: 2px;
  width: 22px;
}

.page-band {
  margin: 56px auto 68px;
  max-width: 1600px;
  padding: 0 clamp(24px, 5vw, 80px);
}

.section-heading {
  margin-bottom: 24px;
  text-align: center;
}

.section-kicker {
  color: #666666;
  font-size: 18px;
  font-weight: 800;
  margin: 12px 0 0;
  text-transform: uppercase;
}

h1 {
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 800;
  line-height: 0.9;
  margin: 0;
  text-transform: uppercase;
}

.status {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  margin-bottom: 14px;
  padding: 14px 16px;
  text-align: center;
}

.status:empty {
  display: none;
}

.stats-summary {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 28px;
}

.stats-summary div {
  border: 1px solid var(--line);
  padding: 18px;
  text-align: center;
}

.stats-summary span {
  color: var(--red);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.stats-summary strong {
  color: #4f4f4f;
  display: block;
  font-size: 36px;
  line-height: 1;
}

.stats-section {
  margin-top: 36px;
}

.stats-section h2 {
  color: var(--red);
  font-size: 24px;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.stats-table-wrap {
  border: 1px solid var(--line);
}

.stats-table {
  min-width: 1320px;
}

.stats-table td:first-child,
.stats-table th:first-child {
  min-width: 190px;
  position: sticky;
  left: 0;
  z-index: 1;
}

.stats-table th:first-child {
  background: #f4f4f4;
}

.stats-table td:first-child {
  background: #ffffff;
  font-weight: 700;
}

.standings-grid {
  display: grid;
  gap: 28px;
}

.division-table {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.division-title {
  align-items: center;
  background: var(--red);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
}

.division-title h2 {
  font-family: Oswald, Arial, sans-serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.division-title span {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 820px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  padding: 11px 12px;
  text-align: right;
  white-space: nowrap;
}

th {
  background: #f4f4f4;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
}

td:first-child,
th:first-child {
  text-align: left;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.team-name {
  color: var(--ink);
  font-weight: 800;
  text-transform: uppercase;
}

.team-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 34px;
}

.team-filters button {
  align-items: center;
  background: #ffffff;
  border: 2px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  gap: 8px;
  min-height: 38px;
  padding: 7px 18px;
  text-transform: uppercase;
}

.team-filters button[aria-pressed="true"],
.team-filters button:hover {
  background: var(--red);
  color: #ffffff;
}

.team-filters img {
  background: #ffffff;
  border-radius: 999px;
  height: 24px;
  object-fit: contain;
  padding: 2px;
  width: 24px;
}

.teams-board-wrap {
  background: linear-gradient(90deg, #ffffff 0 22%, #614443 22% 78%, #ffffff 78% 100%);
  min-height: 560px;
  padding: 0 clamp(20px, 6vw, 96px) 72px;
}

.league-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  margin: 0 auto;
  max-width: 1120px;
}

.league-column {
  background: #ffffff;
  border-left: 1px solid #d5d8dc;
  border-right: 1px solid #d5d8dc;
  min-width: 0;
}

.league-logo-panel {
  align-items: center;
  background: #5b3d3d url("/assets/BrickBackground.png") center / cover;
  display: flex;
  height: 320px;
  justify-content: center;
  padding: 22px;
}

.league-logo-panel img {
  display: block;
  height: auto;
  max-height: 275px;
  max-width: min(82%, 330px);
  object-fit: contain;
}

.team-accordion {
  border-top: 1px solid #d5d8dc;
}

.team-row {
  border-bottom: 1px solid #d5d8dc;
}

.team-row summary {
  align-items: center;
  color: #2e3238;
  cursor: pointer;
  display: flex;
  font-size: 16px;
  font-weight: 400;
  gap: 10px;
  justify-content: flex-start;
  list-style: none;
  min-height: 46px;
  padding: 9px 18px 9px 32px;
  text-transform: uppercase;
}

.team-row summary::-webkit-details-marker {
  display: none;
}

.team-row summary::before {
  color: #262a2e;
  content: "+";
  display: inline-block;
  font-size: 28px;
  font-weight: 800;
  line-height: 0.8;
  text-align: center;
  width: 22px;
}

.team-row[open] summary::before {
  content: "-";
}

.team-row summary:hover {
  color: var(--red);
}

.team-row-panel {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #d5d8dc;
  display: block;
  padding: 0;
}

.team-row-image-link {
  display: block;
  overflow: hidden;
}

.team-row-image-link:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

.team-row-panel img {
  display: block;
  aspect-ratio: 768 / 541;
  height: auto;
  object-fit: cover;
  transition: transform 160ms ease;
  width: 100%;
}

.team-row-image-link:hover img {
  transform: scale(1.025);
}

.team-row-panel strong {
  color: #5f5f5f;
  display: block;
  font-size: 13px;
  line-height: 1.35;
  padding: 14px 18px 16px;
  text-transform: uppercase;
}

.teams-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-card {
  background: #000000;
  border: 1px solid var(--line);
  color: #ffffff;
  display: block;
  min-height: 0;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.team-card img {
  aspect-ratio: 768 / 541;
  display: block;
  height: auto;
  object-fit: cover;
  transition: transform 180ms ease;
  width: 100%;
}

.team-card:hover img {
  transform: scale(1.035);
}

.team-card-overlay {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  left: 0;
  padding: 54px 16px 14px;
  position: absolute;
  right: 0;
}

.team-card-overlay strong {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.team-card-overlay em {
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  opacity: 0.86;
  text-transform: uppercase;
}

.team-wide-banner {
  background: #ffffff;
  border-top: 1px solid #d5d8dc;
  overflow: hidden;
}

.team-wide-banner img {
  display: block;
  height: clamp(92px, 15vw, 230px);
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.team-hero {
  background: #ffffff;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 34px clamp(24px, 5vw, 80px) 10px;
}

.team-hero-image {
  display: block;
  height: auto;
  max-height: none;
  max-width: min(100%, 760px);
  object-fit: contain;
  width: 100%;
}

.team-profile {
  margin: 42px auto 74px;
  max-width: 1600px;
  padding: 0 clamp(24px, 5vw, 80px);
}

.team-profile-header {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr auto;
  padding: 28px 8px;
}

.back-link {
  color: var(--red);
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  text-decoration: none;
  text-transform: uppercase;
}

#team-subtitle {
  color: #666666;
  font-size: 18px;
  font-weight: 700;
  margin: 12px 0 0;
  text-transform: uppercase;
}

.team-logo-wrap {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  display: flex;
  height: 160px;
  justify-content: center;
  padding: 10px;
  width: 210px;
}

.team-logo-wrap img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.team-meta {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.team-meta div {
  border: 1px solid var(--line);
  padding: 18px;
}

.team-meta span {
  color: var(--red);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.team-meta strong {
  color: #4f4f4f;
  display: block;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
}

.team-section {
  margin-top: 42px;
}

.team-section h2 {
  color: var(--red);
  font-size: 24px;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.team-section p {
  color: #666666;
  font-size: 16px;
  margin: 0;
}

.team-roster-gallery {
  display: grid;
  gap: 24px;
  margin-bottom: 18px;
}

.team-roster-gallery img {
  border: 1px solid var(--line);
  display: block;
  height: auto;
  width: 100%;
}

.team-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.team-nav-list a {
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.team-nav-list a[aria-current="page"],
.team-nav-list a:hover {
  background: var(--red);
  color: #ffffff;
}

.site-footer {
  background:
    linear-gradient(90deg, rgba(31,31,31,0.86), rgba(168,2,2,0.88)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 13px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  padding: 52px 24px;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .season-identity-inner {
    gap: 18px;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 0;
  }

  .season-number,
  .season-year {
    text-align: center;
  }

  .season-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .teams-board-wrap {
    background: #ffffff;
    padding-left: 20px;
    padding-right: 20px;
  }

  .league-board {
    grid-template-columns: 1fr;
  }

  .league-logo-panel {
    height: 240px;
  }

  .menu-header .header-inner {
    justify-content: flex-start;
    padding-left: 96px;
  }

  .header-logo {
    left: 24px;
  }

  .team-row-panel {
    grid-template-columns: 1fr;
  }

  .team-profile-header,
  .team-meta {
    grid-template-columns: 1fr;
  }

  .team-logo-wrap {
    justify-self: start;
  }

  .nav a,
  .tool-button {
    font-size: 13px;
  }

  .hero-banner {
    max-width: min(360px, 82vw);
  }
}

@media (max-width: 520px) {
  .menu-header .header-inner {
    align-items: center;
    flex-direction: column;
    gap: 18px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-logo {
    height: 54px;
    left: auto;
    position: static;
    top: auto;
    transform: none;
    width: 54px;
  }

  .season-toolbar {
    grid-template-columns: 1fr;
  }

  .teams-grid {
    grid-template-columns: 1fr;
  }
}
