:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5f6875;
  --line: #d9dee6;
  --paper: #f7f8f4;
  --surface: #ffffff;
  --accent: #c1121f;
  --accent-2: #0f766e;
  --gold: #c89122;
  --navy: #172554;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 82vh;
  overflow: hidden;
  color: white;
  display: grid;
  grid-template-rows: auto 1fr;
}

.hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 10, 18, 0.82), rgba(5, 10, 18, 0.22)),
    url("assets/hero.jpg");
  background-position: center 46%;
  background-size: cover;
}

.nav,
.hero__content {
  position: relative;
  z-index: 1;
}

.nav {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav strong {
  font-size: 0.98rem;
}

.nav div {
  display: flex;
  gap: 18px;
  font-size: 0.92rem;
  font-weight: 700;
}

.hero__content {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  align-self: end;
  padding: 0 0 88px;
}

.hero__content p,
.section__heading p,
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero__content h1 {
  width: min(720px, 100%);
  margin: 0 0 16px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero__content span {
  display: block;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.14rem;
  line-height: 1.65;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.leader-card small,
.games span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section {
  padding: 34px 0 74px;
}

.section__heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

h2 {
  margin: 0;
  max-width: 640px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0 18px;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

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

.leader-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.leader-grid.is-standings {
  grid-template-columns: 1fr;
}

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

.leader-grid.is-schedule {
  grid-template-columns: 1fr;
}

.leader-grid.is-projections {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.leader-grid.is-upload {
  grid-template-columns: 1fr;
}

.leader-card {
  min-width: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.leader-card header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.leader-card h3 {
  margin: 0;
  font-size: 1rem;
}

.leader-card small {
  color: var(--accent-2);
}

.leader-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.leader-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 16px;
  border-bottom: 1px solid #edf0f3;
}

.leader-list li:last-child {
  border-bottom: 0;
}

.rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
}

.player {
  min-width: 0;
}

.player strong,
.player span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.value {
  font-weight: 800;
  color: var(--accent);
}

.standings-card {
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.standings-table th,
.standings-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f3;
  text-align: left;
}

.standings-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.standings-table tr:last-child td {
  border-bottom: 0;
}

.standings-table td:first-child {
  width: 62px;
  color: var(--navy);
  font-weight: 800;
}

.standings-table td:nth-child(2) {
  font-weight: 800;
}

.standings-table td:not(:nth-child(2)) {
  white-space: nowrap;
}

.diff-positive {
  color: var(--accent-2);
  font-weight: 800;
}

.diff-negative {
  color: var(--accent);
  font-weight: 800;
}

.diff-even {
  color: var(--muted);
  font-weight: 800;
}

.section--split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.section--quiet {
  padding-bottom: 96px;
}

.team-browser {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.team-list,
.roster-panel,
.player-stats {
  min-width: 0;
}

.team-list {
  display: grid;
  gap: 8px;
}

.team-button,
.player-button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.team-button {
  padding: 0 14px;
}

.team-button.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

.roster-panel {
  display: grid;
  gap: 14px;
}

.roster-card,
.player-stats {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.roster-card header,
.player-stats header {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.roster-card h3,
.player-stats h3 {
  margin: 0;
  font-size: 1.05rem;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #edf0f3;
}

.player-button {
  border: 0;
  border-radius: 0;
  padding: 14px 16px;
}

.player-button.is-active {
  background: #f1f5f9;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #edf0f3;
}

.stat-grid div {
  min-width: 0;
  background: white;
  padding: 16px;
}

.stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 1.25rem;
}

.schedule-browser {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.week-list {
  display: grid;
  gap: 8px;
}

.week-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
}

.week-button.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

.games-panel {
  display: grid;
  gap: 12px;
}

.bye-week {
  background: var(--navy);
  border-radius: 8px;
  color: white;
  font-weight: 800;
  padding: 14px 18px;
}

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.game-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.game-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.08rem;
}

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

.score-editor {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.score-editor input {
  width: 74px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-align: center;
}

.score-editor button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-2);
  color: white;
  font: inherit;
  font-weight: 800;
  padding: 0 14px;
  cursor: pointer;
}

.result-text {
  color: var(--navy);
  font-weight: 800;
}

.upload-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.upload-card header {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.upload-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.upload-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.upload-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.upload-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.upload-form input,
.upload-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  text-transform: none;
}

.upload-form input {
  padding: 12px;
}

.upload-form textarea {
  min-height: 220px;
  padding: 14px;
  resize: vertical;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 16px;
}

.upload-actions button[type="button"] {
  background: #e5e7eb;
  color: var(--ink);
}

.upload-status {
  min-height: 24px;
  color: var(--accent-2);
  font-weight: 800;
}

.csv-example {
  display: block;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  padding: 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

.projection-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.projection-card header {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.projection-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.projection-card p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.mvp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mvp-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf0f3;
}

.mvp-list li:last-child {
  border-bottom: 0;
}

.projection-score {
  color: var(--accent);
  font-weight: 800;
}

.winner-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.winner-team {
  display: grid;
  gap: 8px;
}

.winner-team strong {
  font-size: 2rem;
  line-height: 1;
}

.winner-record {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #edf0f3;
}

.winner-record div {
  background: white;
  padding: 14px;
}

.winner-record span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.winner-record strong {
  display: block;
  margin-top: 6px;
  font-size: 1.3rem;
}

@media (max-width: 880px) {
  .leader-grid,
  .leader-grid.is-projections,
  .section--split,
  .team-browser,
  .schedule-browser,
  .game-card {
    grid-template-columns: 1fr;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 76vh;
  }

  .roster-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .score-editor {
    justify-content: flex-start;
  }
}
