:root {
  --crimson: #9E1B32;
  --crimson-dark: #651020;
  --ink: #171316;
  --muted: #6f6268;
  --line: #e7dde1;
  --paper: #fffafa;
  --white: #ffffff;
  --gold: #c9a227;
  --soft: #f6eef1;
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

.app-header {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  background: var(--crimson-dark);
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(58, 6, 23, 0.92), rgba(58, 6, 23, 0.62), rgba(58, 6, 23, 0.24)),
    url("https://rolltide.com/images/2026/7/6/251004_MFB_walkofChampions__KG2611.JPG");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.header-content {
  position: relative;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 34px 18px 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 12px;
  font-size: 3.9rem;
  line-height: 0.95;
}

.lede {
  max-width: 600px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.04rem;
}

.app-shell {
  width: min(100%, 1040px);
  margin: -34px auto 48px;
  padding: 0 14px;
  position: relative;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 40px rgba(33, 15, 22, 0.12);
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.tab.is-active {
  background: var(--crimson);
  color: var(--white);
}

.tab-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.8rem;
}

select,
input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

select {
  width: min(48vw, 220px);
  padding: 0 12px;
}

.search-box {
  display: block;
  margin-bottom: 12px;
}

.search-box input {
  width: 100%;
  padding: 0 14px;
}

.next-game,
.game-card,
.player-card,
.notes-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(33, 15, 22, 0.07);
}

.next-game {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px;
  border-left: 5px solid var(--gold);
}

.next-game h3 {
  margin-bottom: 4px;
  font-size: 1.25rem;
}

.next-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.next-game p {
  margin: 0;
  color: var(--muted);
}

.next-game .countdown {
  margin-bottom: 4px;
  color: var(--crimson);
  font-weight: 900;
}

.season-record {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(33, 15, 22, 0.07);
}

.season-record[hidden] {
  display: none;
}

.season-record strong {
  font-size: 1.05rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--soft);
  color: var(--crimson-dark);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.schedule-list,
.roster-list {
  display: grid;
  gap: 10px;
}

.postseason-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(33, 15, 22, 0.07);
}

.postseason-panel summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--crimson);
  font-weight: 900;
}

.postseason-content {
  border-top: 1px solid var(--line);
  padding: 0 16px 16px;
}

.postseason-content p {
  margin: 12px 0 0;
  color: var(--muted);
}

.game-card {
  padding: 14px;
}

.game-card summary {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.game-card summary::-webkit-details-marker {
  display: none;
}

.game-card.is-final {
  border-left: 5px solid var(--crimson);
}

.final-score {
  color: var(--crimson);
  font-weight: 900;
}

.game-summary {
  display: grid;
  min-width: 0;
  color: var(--muted);
}

.game-title-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
}

.game-name {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}

.helmet-frame {
  display: grid;
  place-items: center;
  width: 58px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  background: #f8f4f5;
}

.helmet-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.helmet-frame-large {
  width: 90px;
  height: 64px;
}

.date-block {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--crimson);
  color: var(--white);
  text-align: center;
  font-weight: 900;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.game-card[open] .expand-icon,
.player-card[open] .expand-icon {
  transform: rotate(180deg);
}

.player-card {
  padding: 12px;
}

.player-card summary {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.player-card summary::-webkit-details-marker {
  display: none;
}

.player-summary {
  display: grid;
  min-width: 0;
}

.player-name {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}

.expand-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  color: var(--crimson);
  transition: transform 0.18s ease;
}

.expand-icon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
}

.game-detail,
.player-detail {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-grid strong {
  color: var(--ink);
}

.bio-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--crimson);
  font-weight: 900;
}

.jersey {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--ink);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 950;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.notes-grid article {
  padding: 16px;
}

.notes-grid a {
  display: block;
  margin-top: 8px;
  color: var(--crimson);
  font-weight: 800;
}

.source-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 0 14px 28px;
}

.site-footer p {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 0.78rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (min-width: 760px) {
  .schedule-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roster-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .app-header {
    min-height: 0;
  }

  .header-content {
    padding: 34px 18px 38px;
  }

  .lede {
    line-height: 1.55;
  }

  h1 {
    font-size: 2.15rem;
  }

  .hero-media {
    background-position: 60% center;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  select {
    width: 100%;
  }

  .next-game {
    grid-template-columns: auto 1fr;
  }

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