:root {
  --ink: #10211d;
  --muted: #6e7d77;
  --paper: #f4f1e8;
  --card: #fffdf7;
  --green-950: #062c25;
  --green-900: #083b31;
  --green-700: #0e7058;
  --green-500: #27a87d;
  --lime: #d8ff62;
  --gold: #e4b347;
  --line: #dcded6;
  --shadow: 0 18px 50px rgba(24, 48, 40, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(216, 255, 98, 0.11), transparent 25rem),
    var(--paper);
  font-family: "DM Sans", sans-serif;
}

button {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(3, 38, 31, 0.97), rgba(8, 75, 59, 0.92)),
    repeating-linear-gradient(90deg, transparent 0 90px, rgba(255,255,255,.02) 90px 180px);
}

.hero::after {
  position: absolute;
  right: -12%;
  bottom: -170px;
  width: 650px;
  height: 650px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 75px rgba(255, 255, 255, 0.025),
    0 0 0 150px rgba(255, 255, 255, 0.02);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(5px);
}

.hero__glow--one {
  top: -160px;
  right: 20%;
  width: 380px;
  height: 380px;
  background: rgba(31, 183, 131, 0.22);
}

.hero__glow--two {
  bottom: -180px;
  left: -100px;
  width: 360px;
  height: 360px;
  background: rgba(216, 255, 98, 0.08);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 55px 0 70px;
}

.eyebrow,
.update-strip,
.legend,
.segmented,
.footer .shell {
  display: flex;
  align-items: center;
}

.eyebrow {
  gap: 9px;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 99px;
  color: #d9f5e9;
  background: rgba(255,255,255,.06);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(216, 255, 98, 0.12);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 9px rgba(216, 255, 98, 0); }
}

.hero__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 35px;
}

.kicker,
.section-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker {
  color: #91d9c2;
}

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

h1,
h2 {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(58px, 9vw, 112px);
  line-height: 0.9;
  letter-spacing: -0.035em;
}

h1 span {
  color: var(--lime);
}

.ball-mark {
  display: grid;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  place-items: center;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 50%;
  color: var(--lime);
  background: repeating-radial-gradient(circle, transparent 0 14px, rgba(255,255,255,.06) 15px 16px);
  font-family: "Oswald", sans-serif;
  font-size: 40px;
  font-weight: 700;
  transform: rotate(8deg);
}

.hero__lede {
  max-width: 570px;
  margin: 24px 0 30px;
  color: #d3e6df;
  font-size: 18px;
}

.update-strip {
  justify-content: space-between;
  max-width: 560px;
  padding-top: 17px;
  border-top: 1px solid rgba(255,255,255,.14);
  color: #9fc4b7;
  font-size: 13px;
}

.text-button {
  border: 0;
  color: var(--lime);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.text-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.main {
  position: relative;
  z-index: 2;
  margin-top: -42px;
  padding-bottom: 80px;
}

.scoreboard-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.stat-card {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  justify-content: center;
  padding: 25px 30px;
  border-right: 1px solid var(--line);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card--accent {
  color: #fff;
  background: var(--green-700);
}

.stat-card__label,
.stat-card span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stat-card--accent span {
  color: #bfe7d8;
}

.stat-card strong {
  margin: 4px 0;
  font-family: "Oswald", sans-serif;
  font-size: 44px;
  line-height: 1;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 32px 0 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.tab,
.segmented button {
  border: 0;
  cursor: pointer;
}

.tab {
  padding: 11px 18px;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.tab.is-active {
  color: #fff;
  background: var(--green-900);
}

.panel {
  display: none;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(31px, 5vw, 48px);
  line-height: 1;
}

.section-kicker {
  color: var(--green-700);
}

.legend {
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend__dot--gold { background: var(--gold); }
.legend__dot--live { background: var(--green-500); }

.leaderboard-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 8px 30px rgba(27, 49, 41, 0.06);
}

.leaderboard-head,
.leaderboard-row {
  display: grid;
  grid-template-columns: 65px minmax(220px, 1.8fr) repeat(3, minmax(90px, .7fr)) minmax(90px, .7fr);
  align-items: center;
}

.leaderboard-head {
  min-height: 48px;
  padding: 0 25px;
  color: #85918d;
  background: #eff0eb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.leaderboard-row {
  position: relative;
  width: 100%;
  min-height: 78px;
  padding: 10px 25px;
  border: 0;
  border-bottom: 1px solid #e6e7e1;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.leaderboard-row:hover {
  z-index: 1;
  background: #f4f8f4;
}

.leaderboard-row.podium {
  background: linear-gradient(90deg, rgba(228, 179, 71, .11), transparent 45%);
}

.leaderboard-row.podium--1 {
  border-left: 4px solid var(--gold);
  padding-left: 21px;
}

.rank {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: "Oswald", sans-serif;
}

.rank b {
  font-size: 25px;
}

.rank small {
  color: var(--muted);
}

.entrant {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.entrant > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.entrant strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
}

.entrant small,
.metric small,
.total small {
  color: var(--muted);
  font-size: 11px;
}

.avatar,
.team-badge {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #dffff4;
  background: var(--green-900);
  font-size: 11px;
  font-weight: 800;
}

.avatar {
  width: 38px;
  height: 38px;
}

.avatar--large {
  width: 58px;
  height: 58px;
  font-size: 16px;
}

.live-pill {
  margin-left: auto;
  padding: 4px 6px;
  border-radius: 4px;
  color: #07543f;
  background: #c9f8e7;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.metric,
.total {
  font-weight: 700;
  text-align: center;
}

.metric small,
.total small {
  display: none;
}

.total {
  color: var(--green-700);
  font-family: "Oswald", sans-serif;
  font-size: 27px;
}

.row-arrow {
  display: none;
}

.table-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.segmented {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e9e9e2;
}

.segmented button {
  padding: 7px 11px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.segmented button.is-active {
  color: var(--green-900);
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.match-grid,
.rules-grid,
.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.picks-intro {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.picks-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(27, 49, 41, 0.05);
}

.picks-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 15px 17px;
  color: #fff;
  background: var(--green-900);
}

.picks-card__header .avatar {
  color: var(--green-900);
  background: var(--lime);
}

.picks-card__header h3 {
  margin: 0 0 4px;
  font-family: "Oswald", sans-serif;
  font-size: 21px;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.champion-pick {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #b9d8ce;
  font-size: 10px;
}

.champion-pick strong {
  color: #fff;
}

.picks-card__body {
  padding: 5px 17px 13px;
}

.picks-row {
  padding: 12px 0 9px;
  border-bottom: 1px solid var(--line);
}

.picks-row:last-child {
  border-bottom: 0;
}

.picks-row__label {
  display: block;
  margin-bottom: 8px;
  color: var(--green-700);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.picks-row__teams {
  display: grid;
  gap: 7px;
}

.original-pick {
  display: grid;
  grid-template-columns: 25px 28px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 25px;
}

.original-pick__rank {
  color: var(--muted);
  font-family: "Oswald", sans-serif;
  font-size: 13px;
}

.original-pick strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-flag {
  display: block;
  width: 28px;
  height: 20px;
  border: 1px solid rgba(16, 33, 29, .13);
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.country-flag--small {
  width: 19px;
  height: 13px;
  border-color: rgba(255, 255, 255, .25);
}

.match-card,
.rule-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.match-card {
  padding: 18px;
}

.match-card.is-live {
  border-color: var(--green-500);
  box-shadow: inset 0 3px 0 var(--green-500);
}

.match-card__top,
.team-line {
  display: flex;
  align-items: center;
}

.match-card__top {
  justify-content: space-between;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status--live {
  color: var(--green-700);
}

.team-line {
  gap: 10px;
  min-height: 39px;
}

.team-line span:nth-child(2) {
  flex: 1;
  font-weight: 600;
}

.team-line b {
  font-family: "Oswald", sans-serif;
  font-size: 23px;
}

.team-badge {
  width: 28px;
  height: 28px;
  color: var(--green-900);
  background: #dfe9e4;
  font-size: 9px;
}

.shootout-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.rule-card {
  min-height: 195px;
  padding: 25px;
}

.rule-card__number {
  display: inline-grid;
  width: 55px;
  height: 55px;
  place-items: center;
  margin-bottom: 23px;
  border-radius: 14px;
  color: var(--lime);
  background: var(--green-900);
  font-family: "Oswald", sans-serif;
  font-size: 24px;
}

.rule-card h3 {
  margin-bottom: 7px;
  font-family: "Oswald", sans-serif;
  font-size: 20px;
  text-transform: uppercase;
}

.rule-card p,
.fine-print {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.fine-print {
  margin-top: 14px;
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
  border-radius: 5px;
  background: #fff9e8;
}

.loading-row,
.empty-state {
  grid-column: 1 / -1;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.footer {
  color: #a8c3ba;
  background: var(--green-950);
}

.footer .shell {
  justify-content: space-between;
  gap: 20px;
  min-height: 90px;
  font-size: 12px;
}

.entry-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 34px);
  padding: 30px;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
}

.entry-dialog::backdrop {
  background: rgba(4, 27, 22, .75);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 17px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 30px;
  cursor: pointer;
}

.dialog-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 30px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 34px;
}

.dialog-heading p:last-child {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dialog-total {
  display: grid;
  margin-left: auto;
  color: var(--green-700);
  font-family: "Oswald", sans-serif;
  font-size: 40px;
  line-height: .9;
  text-align: right;
}

.dialog-total small {
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.dialog-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 25px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}

.dialog-breakdown span {
  display: grid;
  gap: 4px;
  padding: 15px;
  background: #f6f5ef;
}

.dialog-breakdown small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.dialog-breakdown b {
  font-family: "Oswald", sans-serif;
  font-size: 24px;
}

.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.tier-block h4 {
  margin: 0 0 7px;
  color: var(--green-700);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pick-line {
  display: grid;
  grid-template-columns: 32px 28px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 55px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.pick-line.is-live {
  color: var(--green-700);
}

.pick-rank {
  color: var(--muted);
  font-family: "Oswald", sans-serif;
}

.pick-line__team {
  display: grid;
}

.pick-line small {
  color: var(--muted);
  font-size: 10px;
}

.pick-line > b {
  font-size: 13px;
}

@media (max-width: 850px) {
  .match-grid,
  .rules-grid,
  .picks-grid {
    grid-template-columns: 1fr 1fr;
  }

  .leaderboard-head {
    display: none;
  }

  .leaderboard-row {
    grid-template-columns: 42px minmax(150px, 1fr) repeat(3, 65px) 72px 10px;
    padding-inline: 16px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    min-height: 390px;
  }

  .hero__content {
    padding-top: 35px;
  }

  .hero__title-row {
    align-items: flex-end;
    margin-top: 44px;
  }

  h1 {
    font-size: 61px;
  }

  .ball-mark {
    width: 72px;
    height: 72px;
    font-size: 27px;
  }

  .hero__lede {
    font-size: 15px;
  }

  .main {
    margin-top: -34px;
  }

  .scoreboard-summary {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    min-height: 112px;
    padding: 18px;
  }

  .stat-card:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .stat-card strong {
    font-size: 34px;
  }

  .tabs {
    position: sticky;
    z-index: 5;
    top: 0;
    margin-inline: -12px;
    padding: 10px 12px;
    border-bottom: 0;
    background: rgba(244, 241, 232, .94);
    backdrop-filter: blur(10px);
  }

  .tab {
    flex: 1;
    padding-inline: 8px;
    font-size: 13px;
  }

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

  .legend {
    display: none;
  }

  .leaderboard-card {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .leaderboard {
    display: grid;
    gap: 9px;
  }

  .leaderboard-row,
  .leaderboard-row.podium--1 {
    grid-template-columns: 35px 1fr 54px 15px;
    grid-template-rows: auto auto;
    gap: 4px 8px;
    min-height: 83px;
    padding: 12px;
    border: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
  }

  .leaderboard-row.podium--1 {
    border-left: 5px solid var(--gold);
  }

  .rank {
    grid-row: 1 / 3;
  }

  .entrant {
    grid-column: 2;
  }

  .entrant .avatar {
    display: none;
  }

  .entrant small {
    font-size: 9px;
  }

  .live-pill {
    position: absolute;
    top: 7px;
    right: 7px;
  }

  .metric {
    grid-row: 2;
    color: var(--muted);
    font-size: 11px;
    text-align: left;
  }

  .metric:nth-of-type(3) {
    grid-column: 2;
  }

  .metric:nth-of-type(4) {
    grid-column: 2;
    margin-left: 70px;
  }

  .metric:nth-of-type(5) {
    display: none;
  }

  .metric small {
    display: inline;
    margin-right: 3px;
  }

  .total {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    font-size: 30px;
  }

  .total small {
    display: block;
    font-family: "DM Sans", sans-serif;
    font-size: 8px;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .row-arrow {
    display: block;
    grid-column: 4;
    grid-row: 1 / 3;
    align-self: center;
    color: #9fa9a5;
    font-size: 24px;
  }

  .match-grid,
  .rules-grid,
  .picks-grid,
  .tier-grid {
    grid-template-columns: 1fr;
  }

  .picks-intro {
    max-width: none;
    text-align: left;
  }

  .rule-card {
    min-height: 0;
  }

  .entry-dialog {
    padding: 24px 18px;
  }

  .dialog-heading {
    align-items: flex-start;
  }

  .dialog-heading .avatar {
    display: none;
  }

  .dialog-total {
    font-size: 32px;
  }

  .dialog-breakdown {
    grid-template-columns: 1fr 1fr;
  }

  .footer .shell {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}
