:root {
  color-scheme: dark;
  --ink: #f7f9fc;
  --muted: #91a0b6;
  --panel: rgba(13, 27, 45, .86);
  --panel-2: rgba(18, 35, 57, .94);
  --line: rgba(151, 169, 196, .16);
  --orange: #ff7a1a;
  --orange-soft: #ffad66;
  --blue: #6dd6ff;
  --bg: #07111f;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(38, 132, 190, .26), transparent 32rem),
    linear-gradient(150deg, #07111f 0%, #081522 45%, #050b13 100%);
  font-family: Inter, system-ui, sans-serif;
}

.stadium-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}

main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 32px; position: relative; }

.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { color: var(--orange-soft); font: 700 .8rem/1 Inter, sans-serif; letter-spacing: .18em; margin: 0 0 8px; }
h1, h2 { font-family: "Barlow Condensed", Impact, sans-serif; text-transform: uppercase; letter-spacing: .02em; }
h1 { font-size: clamp(2.7rem, 7vw, 5.3rem); line-height: .86; margin: 0; }

.live-status { display: flex; align-items: center; gap: 12px; min-width: 168px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(6, 15, 27, .72); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.live-status div { display: grid; gap: 3px; }
.live-status strong { font-size: .88rem; }
.live-status span:last-child { color: var(--muted); font-size: .72rem; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #55df8b; box-shadow: 0 0 0 5px rgba(85,223,139,.12); flex: none; }
.live-status.error .pulse { background: #fbbf24; box-shadow: 0 0 0 5px rgba(251,191,36,.12); }

.leaderboard { margin-top: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 12px; }
.section-heading h2 { font-size: 1.5rem; margin: 0; }
.section-heading span { color: var(--muted); font-size: .78rem; }
.standings-list { display: grid; gap: 10px; }

.entry { display: grid; grid-template-columns: 48px minmax(170px, 1.1fr) minmax(360px, 2.5fr) 168px; align-items: center; min-height: 84px; padding: 0 20px 0 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 8px 26px rgba(0,0,0,.14); transition: transform .2s ease, border-color .2s ease; animation: rise .38s both; }
.entry:hover { transform: translateY(-2px); border-color: rgba(109,214,255,.3); }
.entry.leader { background: linear-gradient(100deg, rgba(97, 47, 15, .5), var(--panel-2) 36%); border-color: rgba(255,122,26,.45); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.rank { color: var(--muted); font: 700 1.25rem/1 "Barlow Condensed", sans-serif; text-align: center; }
.leader .rank { color: var(--orange-soft); }
.owners { min-width: 0; padding: 0 14px; }
.owners-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.owners-title strong { min-width: 0; }
.owners strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 1.25rem/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.owners span { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; }
.teams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.team-chip { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.035); }
.team-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: white; background: var(--team-color, #36516e); font: 800 .7rem/1 Inter, sans-serif; letter-spacing: -.02em; }
.team-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; font-weight: 600; }
.team-record { color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.wins { display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.wins strong { color: var(--orange); font: 800 1.6rem/1 "Barlow Condensed", sans-serif; font-variant-numeric: tabular-nums; }
.wins strong.zero-wins { font-family: system-ui, sans-serif; font-size: 1.5rem; line-height: 1; }
.wins span { color: var(--muted); font-size: .875rem; line-height: 1.2; letter-spacing: .01em; }

footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 4px 0 34px; color: #687990; font-size: .72rem; text-align: center; }

@media (max-width: 820px) {
  main { width: min(100% - 24px, 680px); padding-top: 28px; }
  .topbar { align-items: center; }
  .entry { grid-template-columns: 38px minmax(0, 1fr); padding: 15px 14px 15px 8px; }
  .teams { grid-column: 2 / -1; margin-top: 13px; }
  .wins { grid-column: 2 / -1; margin-top: 12px; }
}

@media (max-width: 560px) {
  .topbar { align-items: flex-start; }
  h1 { font-size: 3.25rem; max-width: 230px; }
  .live-status { min-width: 0; padding: 10px; }
  .live-status strong { font-size: .76rem; }
  .live-status span:last-child { max-width: 85px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .section-heading span { display: none; }
  .entry { grid-template-columns: 34px minmax(0,1fr); border-radius: 14px; }
  .owners { padding-left: 9px; }
  .owners strong { font-size: 1.12rem; }
  .teams { grid-template-columns: 1fr; gap: 6px; }
  .team-chip { grid-template-columns: 29px 1fr auto; padding: 7px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Compact standings first; NFL records expand only on request. */
main { width: min(900px, calc(100% - 24px)); padding-top: 20px; }
.topbar { align-items: center; margin-bottom: 20px; gap: 12px; }
h1 { font-size: clamp(1.65rem, 5vw, 2.5rem); line-height: 1; max-width: none; }
.eyebrow { font-size: .75rem; margin-bottom: 4px; }
.live-status { padding: 8px 10px; min-width: 0; }
.section-heading span { display: block; font-size: .875rem; }
.standings-list { display: block; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.standings-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .875rem; }
.standings-table th, .standings-table td { border-bottom: 1px solid var(--line); }
.standings-table thead th { padding: 10px 8px; text-align: left; color: var(--muted); font-weight: 500; background: rgba(255,255,255,.035); }
.standings-table .place-column { width: 48px; text-align: center; }
.standings-table .number-column { width: 92px; text-align: center; }
.standings-row { cursor: pointer; }
.standings-row:hover { background: rgba(255,255,255,.035); }
.standings-row.leader { background: rgba(249,115,22,.08); }
.standings-row .rank { font-size: 1rem; }
.standings-row th { text-align: left; font-weight: 600; }
.team-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 6px; border: 0; padding: 11px 8px; min-height: 44px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.team-toggle span:first-child { overflow-wrap: anywhere; }
.pool-team { display: grid; gap: 4px; min-width: 0; }
.pool-team-name { overflow-wrap: anywhere; }
.pool-logos { display: flex; align-items: center; gap: 6px; }
.pool-logo { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; }
.pool-logo img { width: 24px; height: 24px; object-fit: contain; }
.team-detail-logo { width: 30px; height: 30px; object-fit: contain; }
.team-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; border-radius: 5px; }
.chevron { color: var(--muted); flex: none; transition: transform .15s; }
.team-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.total-cell, .weekly-cell { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.total-cell { color: var(--orange); }
.detail-row[hidden] { display: none; }
.detail-row td { padding: 12px; background: rgba(0,0,0,.15); }
.detail-row .teams { margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-row .team-name, .detail-row .team-record { font-size: .875rem; }
.detail-row .wins { margin-top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 560px) {
  .standings-table .place-column { width: 40px; }
  .standings-table .number-column { width: 64px; }
  .section-heading span { font-size: .875rem; }
  .detail-row .teams { grid-template-columns: 1fr; }
  .live-status strong { font-size: .875rem; }
  .team-toggle { padding-inline: 5px; }
}
