/* ===========================================================================
   NFL Hub. Dark base; team pages re-theme through --team / --team-alt, which the
   server guarantees are visible on this background (lib/colors.js).

   Sizing is rem-based off a fluid root, so the layout scales from a phone up to a
   3840px display without stranding content in a narrow column.
   =========================================================================== */

/* Pixel font for the Gamecast end zones (Pixelify Sans, SIL Open Font License). */
@font-face {
  font-family: 'Pixelify Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/pixelify-sans-700.woff2') format('woff2');
}

/* Barlow for text, Barlow Condensed for headings and scores: the squared-off look of
   sports graphics, with clear numerals. Self-hosted, Latin subset (SIL Open Font License). */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/barlow-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/barlow-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/barlow-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/barlow-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/barlow-800.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: italic; font-weight: 800; font-display: swap; src: url('/fonts/barlow-condensed-800-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/barlow-condensed-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/barlow-condensed-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/barlow-condensed-800.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --bg: #0c0d12;
  --bg-2: #13151d;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #eef0f5;
  --muted: #a3a9b8;
  --dim: #6f7687;
  --good: #3ddc97;
  --bad: #ff6b7d;
  --warn: #ffc857;

  /* Site accent; team and player pages override these two. */
  --team: #7aa2ff;
  --team-alt: #7aa2ff;
  --team-primary: #1d2a4d;
  /* Team pages set this to the team's main colour (lib/colors.js glowColor). */
  --team-glow: #7aa2ff;

  --radius: 14px;
  --radius-sm: 9px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: clamp(14px, 0.38vw + 9.5px, 20px); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 10% -10%, color-mix(in srgb, var(--team-primary) 45%, transparent), transparent 65%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
  background-attachment: fixed;
  color: var(--text);
  font: 1rem/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: min(2900px, 100%); margin: 0 auto; padding-inline: max(1rem, 2.5vw); }

h1 { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; margin: 0; letter-spacing: 0; line-height: 1.1; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin: 0 0 0.6rem; letter-spacing: 0.005em; }
h3 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--team); margin: 1.6rem 0 0.6rem; font-weight: 700;
}
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(12, 13, 18, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.6rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
/* The mark: the Gamecast's pixel football in flight, its streaks in the team's colour. */
.logo-mark { width: 3.4rem; height: auto; flex: none; filter: drop-shadow(0 0 0.45rem color-mix(in srgb, var(--team-glow) 40%, transparent)); transition: filter .25s; }
.logo-tile { fill: #171a26; stroke: color-mix(in srgb, var(--team-glow) 65%, #2a2f42); stroke-width: 0.7; }
.logo-streak { fill: var(--team-glow); transition: fill .25s; }
.brand:hover .logo-mark { filter: drop-shadow(0 0 0.7rem color-mix(in srgb, var(--team-glow) 70%, transparent)); }
.wordmark { display: flex; align-items: baseline; font-size: 1.35rem; line-height: 1; white-space: nowrap; }
.wm-light { font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.wm-bold { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 1.12em; margin-left: 0.06em; color: var(--team); letter-spacing: 0.01em; }
.site-nav { display: flex; gap: 0.25rem; }
.site-nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.92rem;
  padding: 0.45rem 0.85rem; border-radius: 99px; transition: color .15s, background .15s;
}
/* Hover glows in the current team's main colour (the site blue elsewhere). */
.site-nav a { transition: color .15s, background .2s, box-shadow .2s; }
.site-nav a:hover, .site-nav a:focus-visible {
  color: #fff; outline: none;
  background: color-mix(in srgb, var(--team-glow) 30%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--team-glow) 70%, transparent), 0 0 1.1rem 0.15rem color-mix(in srgb, var(--team-glow) 55%, transparent);
}
.site-nav a.active { color: var(--text); background: var(--surface-2); }

main { padding-block: 1.5rem 2rem; }

/* --------------------------------------------------------- page heading */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head p { margin: 0.3rem 0 0; color: var(--muted); }

.week-picker { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.btn {
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text);
  border-radius: 99px; padding: 0.45rem 0.95rem; font: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem;
}
.btn:hover:not([aria-disabled="true"]) { border-color: var(--team); }
.btn[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }
.btn.current { border-color: var(--team); color: var(--team); }
select.btn { appearance: none; padding-right: 1.2rem; }

.pills { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.pill {
  text-decoration: none; font-size: 0.85rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 99px; padding: 0.3rem 0.85rem;
}
.pill.active, .pill:hover { color: var(--text); border-color: var(--team); }

/* ------------------------------------------------------------ game cards */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(27rem, 100%), 1fr));
  gap: 1rem;
}

.game {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius); border: 1px solid var(--border-2);
  min-height: 17rem; display: flex; flex-direction: column;
  background: linear-gradient(135deg, var(--away-color, #222), var(--home-color, #333));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
/* The stadium photo sits under a gradient so text stays legible on bright day shots. */
.game-photo {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02); transition: transform .6s ease;
}
.game:hover .game-photo { transform: scale(1.06); }
.game::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 9, 13, 0.35) 0%, rgba(8, 9, 13, 0.62) 45%, rgba(8, 9, 13, 0.94) 100%);
}
/* Each side's colour in a split accent bar across the top. */
.game::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--away-accent) 0 50%, var(--home-accent) 50% 100%);
}

.game-top {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1rem 0; font-size: 0.8rem; font-weight: 600; color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.status-badge {
  padding: 0.15rem 0.6rem; border-radius: 99px; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase; background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.status-badge.live { background: #d7263d; border-color: transparent; animation: pulse 1.6s infinite; }
.status-badge.final { background: rgba(255, 255, 255, 0.12); }
@keyframes pulse { 50% { opacity: 0.65; } }

.matchup { margin-top: auto; padding: 0 1rem 0.6rem; display: grid; gap: 0.35rem; }
.side {
  display: grid; grid-template-columns: 2.6rem 1fr auto; align-items: center; gap: 0.7rem;
  text-decoration: none;
}
.side img { width: 2.6rem; height: 2.6rem; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.side-name { font-weight: 750; font-size: 1.12rem; letter-spacing: -0.01em; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }
.side-rec { font-size: 0.78rem; color: rgba(255, 255, 255, 0.7); font-weight: 600; }
.side-score { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }
.side.lost .side-name, .side.lost .side-score { opacity: 0.55; }
.side:hover .side-name { text-decoration: underline; text-underline-offset: 3px; }

.game-foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 0.8rem; flex-wrap: wrap;
  padding: 0.7rem 1rem 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28); backdrop-filter: blur(6px);
}
.venue { font-size: 0.8rem; color: rgba(255, 255, 255, 0.78); line-height: 1.35; }
.venue strong { display: block; color: #fff; font-size: 0.86rem; }

.wx { display: flex; align-items: center; gap: 0.55rem; text-align: right; }
.wx-icon { font-size: 1.9rem; line-height: 1; }
.wx-temp { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.wx-detail { font-size: 0.74rem; color: rgba(255, 255, 255, 0.78); line-height: 1.3; }
.wx-kind { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.55); font-weight: 700; }
.chip {
  display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 0.08rem 0.5rem; border-radius: 99px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); white-space: nowrap;
}
.chip.warn { background: rgba(255, 200, 87, 0.18); border-color: rgba(255, 200, 87, 0.45); color: var(--warn); }
.chip.bad { background: rgba(255, 107, 125, 0.18); border-color: rgba(255, 107, 125, 0.45); color: var(--bad); }
.chip.good { background: rgba(61, 220, 151, 0.15); border-color: rgba(61, 220, 151, 0.4); color: var(--good); }

.byes { margin-top: 1.5rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
.byes a { display: inline-flex; align-items: center; gap: 0.3rem; text-decoration: none; padding: 0.2rem 0.55rem 0.2rem 0.3rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); }
.byes img { width: 1.4rem; height: 1.4rem; }

/* --------------------------------------------------------------- teams */
.divisions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 1rem; }
.division { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem; }
.division h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.6rem; }
.team-link {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.65rem; margin-bottom: 0.3rem;
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 650;
  border-left: 4px solid var(--c); background: linear-gradient(90deg, color-mix(in srgb, var(--p) 40%, transparent), transparent);
  transition: background .15s;
}
.team-link:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--p) 70%, transparent), transparent); }
.team-link img { width: 2.2rem; height: 2.2rem; object-fit: contain; }

/* ------------------------------------------------------- team / player hero */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.25rem;
  background: linear-gradient(120deg, var(--team-primary), color-mix(in srgb, var(--team-primary) 30%, #000) 70%);
  border: 1px solid var(--border-2);
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
}
.hero::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 8px;
  background: var(--team-alt);
}
.hero-logo { width: 6rem; height: 6rem; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5)); }
.hero-headshot {
  width: 9rem; height: 9rem; border-radius: 50%; object-fit: cover; object-position: top;
  background: rgba(0, 0, 0, 0.25); border: 3px solid var(--team);
}
.hero-text { flex: 1; min-width: min(16rem, 100%); }
.hero-text .kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: rgba(255, 255, 255, 0.72); } /* not --team: the hero is filled with the team colour, so a same-hue accent vanishes on red teams */
.hero-text p { margin: 0.35rem 0 0; color: rgba(255, 255, 255, 0.82); }
.hero-badge { width: 3rem; height: 3rem; object-fit: contain; }

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(30rem, 100%), 1fr)); gap: 1.25rem; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; min-width: 0; }

/* -------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th {
  text-align: left; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--dim); font-weight: 700; padding: 0.45rem 0.55rem; border-bottom: 1px solid var(--border-2); white-space: nowrap;
}
/* Tables scroll sideways on narrow screens, so cells never wrap ("W 36-31" breaking
   onto two lines made phone rows twice as tall). */
td { padding: 0.5rem 0.55rem; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
tbody tr:hover { background: var(--surface); }
tr.clickable { cursor: pointer; }
tr td.wk { text-align: left; font-weight: 800; font-size: 1.1em; font-variant-numeric: tabular-nums; color: var(--text); }
tr.clickable:hover td { background: var(--surface-2); }
.box-link { margin-left: 0.8em; font-size: 0.82em; font-weight: 700; color: var(--team, var(--accent)); text-decoration: none; opacity: 0.85; white-space: nowrap; }
tr.clickable:hover .box-link { opacity: 1; text-decoration: underline; }
tr.upcoming td { color: var(--muted); }
tr.this-week td { background: color-mix(in srgb, var(--team) 10%, transparent); }
.result-W { color: var(--good); font-weight: 800; }
.result-L { color: var(--bad); font-weight: 800; }
.result-T { color: var(--warn); font-weight: 800; }

.opp { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; white-space: nowrap; }
.opp img { width: 1.5rem; height: 1.5rem; object-fit: contain; }

.player-cell { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 12rem; }
.player-cell img, .player-cell .ph {
  width: 2.3rem; height: 2.3rem; border-radius: 50%; object-fit: cover; object-position: top;
  background: var(--surface-2); flex: none;
}
.player-cell .ph { display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.player-cell strong { font-weight: 650; }
.player-cell:hover strong { color: var(--team); }

.ppr { font-weight: 800; color: var(--team); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- projection */
.projection {
  border-radius: var(--radius); padding: 1.1rem 1.2rem;
  background: linear-gradient(140deg, color-mix(in srgb, var(--team-primary) 55%, transparent), var(--surface));
  border: 1px solid color-mix(in srgb, var(--team) 40%, transparent);
}
.proj-row { display: flex; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.proj-big { font-size: 3.4rem; font-weight: 850; line-height: 1; color: var(--team); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.proj-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); font-weight: 700; margin-bottom: 0.3rem; }
.proj-actual { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.statline { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 0.9rem; }
.statline div { min-width: 4.5rem; }
.statline b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.statline span { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.parts { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.8rem; }

.bio { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(9rem, 100%), 1fr)); gap: 0.7rem; }
.bio div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.55rem 0.7rem; }
.bio span { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); font-weight: 700; }
.bio b { font-weight: 650; }

.news { list-style: none; padding: 0; margin: 0; }
.news li { padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.news li:last-child { border-bottom: 0; }
.news a { text-decoration: none; }
.news a:hover { color: var(--team); }

/* --------------------------------------------------------------- states */
.loading, .empty, .error-box { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.error-box { color: var(--bad); }
.skeleton { background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); min-height: 17rem; }
@keyframes shimmer { to { background-position: -200% 0; } }

.note { font-size: 0.82rem; color: var(--muted); margin-top: 0.7rem; }

/* --------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 1.5rem 2.5rem; color: var(--dim); font-size: 0.84rem; }
.site-footer p { max-width: 62rem; margin: 0 0 0.5rem; }
.site-footer a { color: var(--muted); }
.fine { font-size: 0.76rem; }

@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .hero { padding: 1.1rem; }
  .hero-logo { width: 4.2rem; height: 4.2rem; }
  .hero-headshot { width: 6rem; height: 6rem; }
  .proj-big { font-size: 2.7rem; }
  .side-score { font-size: 1.4rem; }
  .site-nav a { padding: 0.4rem 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===========================================================================
   Game page: scoreboard, live field, box score.
   =========================================================================== */

.game { cursor: pointer; }
.game:focus-visible { outline: 2px solid var(--team); outline-offset: 3px; }
.game-cta { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }

.gh {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius);
  border: 1px solid var(--border-2); margin-bottom: 1.1rem; padding: 1.3rem 1.4rem 1.1rem;
  background: linear-gradient(135deg, var(--away-color), var(--home-color));
}
.gh .game-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.photo-credit {
  position: absolute; right: 0.7rem; bottom: 0.2rem; z-index: 1; max-width: 60%;
  font-size: 0.62rem; color: rgba(255,255,255,0.55); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.photo-credit:hover { color: #fff; text-decoration: underline; }
.gh::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,9,13,0.55), rgba(8,9,13,0.9)); }
.gh-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.gh-team { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; min-width: 0; }
.gh-team.home { flex-direction: row-reverse; text-align: right; }
.gh-team img { width: 4.2rem; height: 4.2rem; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.6)); }
.gh-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.gh-rec { font-size: 0.8rem; color: rgba(255,255,255,0.7); font-weight: 600; }
.gh-score { font-size: 3rem; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1; min-width: 2ch; }
.gh-team.lost .gh-score, .gh-team.lost .gh-name { opacity: 0.55; }
.poss-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--warn); margin: 0 0.35rem; box-shadow: 0 0 8px var(--warn); }
.gh-mid { text-align: center; }
.gh-status { font-size: 1.05rem; font-weight: 800; }
.gh-sub { font-size: 0.8rem; color: rgba(255,255,255,0.75); margin-top: 0.2rem; }
.gh-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

.gh-mid .linescore { margin: 0.7rem auto 0; font-size: 1.15rem; }
.gh-mid .linescore th, .gh-mid .linescore td { padding: 0.45rem 1rem; min-width: 2.6rem; }
.gh-mid .linescore th { font-size: 0.8rem; }
.gh-mid .linescore td.total { font-size: 1.3rem; }
.linescore { width: auto; border-collapse: collapse; font-size: 0.82rem; background: rgba(10,11,16,0.82); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(6px); border-radius: var(--radius-sm); overflow: hidden; }
.linescore th, .linescore td { padding: 0.3rem 0.65rem; text-align: center; border: 0; }
.linescore td:first-child, .linescore th:first-child { text-align: left; font-weight: 700; }
.linescore td.total { font-weight: 850; }

.wp { margin-top: 0.8rem; }
.wp-bar { display: flex; height: 0.45rem; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,0.1); }
.wp-bar div { transition: width .6s ease; }
.wp-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: rgba(255,255,255,0.75); margin-top: 0.25rem; font-weight: 600; }

/* ---------------------------------------------------------------- field */
.gamecast { padding: 0.9rem; }
.gc-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.gc-head h2 { margin: 0; }
.live-pill { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; color: #fff; background: #d7263d; padding: 0.15rem 0.6rem; border-radius: 99px; }
.live-pill::before { content: ''; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }

.field-wrap { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: #1e5a2b; aspect-ratio: 1200 / 533; max-width: 1500px; margin-inline: auto; }
.field-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.field-banner {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(0.6); opacity: 0;
  font-size: clamp(1.3rem, 4vw, 3.4rem); font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; padding: 0.2em 0.7em; border-radius: 0.3em; pointer-events: none; white-space: nowrap;
  text-shadow: 0 3px 12px rgba(0,0,0,0.6); transition: transform .35s cubic-bezier(.2,1.6,.4,1), opacity .25s;
}
.field-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Scoring takeover: fills the field in the scoring team's colours. */
.score-takeover {
  position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none;
  display: flex; flex-direction: column; justify-content: center; gap: 2%;
  background: var(--to-a); color: var(--to-ink);
  animation: to-in .45s cubic-bezier(.2,.9,.3,1) both;
}
.score-takeover.out { animation: to-out .45s ease-in both; }
.to-stripes {
  position: absolute; inset: -20%;
  background: repeating-linear-gradient(-55deg, var(--to-a) 0 2.2rem, color-mix(in srgb, var(--to-b) 55%, var(--to-a)) 2.2rem 3.2rem);
  opacity: 0.55; animation: to-stripes 1.2s linear infinite;
}
.to-row { position: relative; overflow: hidden; white-space: nowrap; }
.to-track > * { margin-right: 0.35em; }
.to-track { display: inline-flex; align-items: center; width: max-content; animation: to-marquee 16.7s linear infinite; }
.to-row.r2 .to-track { animation-direction: reverse; animation-duration: 20s; }
.to-word {
  font-family: var(--font-display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(2rem, 9.5vw, 8.5rem); line-height: 1; letter-spacing: 0.02em;
  -webkit-text-stroke: 0.04em var(--to-b); paint-order: stroke fill;
  text-shadow: 0.06em 0.06em 0 rgba(0,0,0,0.35);
}
.to-row.r2 .to-word { font-size: clamp(1.2rem, 5vw, 4.4rem); opacity: 0.85; }
.to-logo { height: clamp(2rem, 8vw, 7rem); width: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4)); }
.to-row.r2 .to-logo { height: clamp(1.2rem, 4.2vw, 3.6rem); }
.to-team {
  position: relative; align-self: center; padding: 0.2em 1em;
  background: var(--to-b); color: var(--to-a);
  font-weight: 900; letter-spacing: 0.3em; font-size: clamp(0.7rem, 1.8vw, 1.5rem);
  transform: skewX(-12deg); animation: to-pop .5s .25s cubic-bezier(.2,1.6,.4,1) both;
}
@keyframes to-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes to-out { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
@keyframes to-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes to-stripes { from { transform: translateX(0); } to { transform: translateX(3.9rem); } }
@keyframes to-pop { from { transform: skewX(-12deg) scale(0.4); opacity: 0; } to { transform: skewX(-12deg) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .score-takeover, .score-takeover.out, .to-track, .to-stripes, .to-team { animation: none; }
}

.play-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: center;
  margin-top: 0.7rem; padding: 0.7rem 0.9rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--pc, var(--team));
  min-height: 3.6rem;
}
.play-card img { width: 2.4rem; height: 2.4rem; object-fit: contain; }
.pc-dd { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pc-text { font-size: 0.9rem; line-height: 1.35; }
.pc-result { font-weight: 850; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.gc-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; align-items: center; }
.gc-controls .note { margin: 0; }

/* ----------------------------------------------------------------- tabs */
.tabs-bar { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 1.1rem 0 0.8rem; }

/* --------------------------------------------------------- play by play */
.drive { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.6rem; overflow: hidden; }
.drive > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.7rem; align-items: center;
  padding: 0.6rem 0.8rem; background: var(--surface); border-left: 4px solid var(--dc);
}
.drive > summary::-webkit-details-marker { display: none; }
.drive > summary img { width: 2rem; height: 2rem; object-fit: contain; }
.drive-res { font-weight: 800; font-size: 0.82rem; }
.drive-res.score { color: var(--good); }
.drive-desc { font-size: 0.78rem; color: var(--muted); }
.play-row {
  display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 0.7rem; align-items: start; width: 100%;
  padding: 0.5rem 0.8rem; border: 0; border-top: 1px solid var(--border); background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.play-row:hover, .play-row.playing { background: color-mix(in srgb, var(--team) 12%, transparent); }
.play-row.static { cursor: default; }
.play-row.static:hover { background: none; }
.pr-clock { font-size: 0.75rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.pr-dd { font-size: 0.72rem; color: var(--muted); font-weight: 700; display: block; }
.pr-text { font-size: 0.86rem; line-height: 1.4; }
.pr-badge { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1rem 0.45rem; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.pr-badge.td { background: var(--good); color: #062; }
.pr-badge.to { background: var(--bad); color: #300; }

.stat-compare { max-width: 52rem; }
.stat-compare td:nth-child(2), .stat-compare td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.box-team-head { display: flex; align-items: center; gap: 0.5rem; margin: 1.2rem 0 0.4rem; }
.box-team-head img { width: 1.8rem; height: 1.8rem; }

@media (max-width: 640px) {
  /* A stacked score bug: one full-width row per team, score at the far right, so the
     two scores sit one above the other instead of side by side in the middle. Status,
     network and the quarter-by-quarter scoreboard follow underneath. */
  .gh { padding-top: 3.1rem; }
  .gh-row { grid-template-columns: 1fr; grid-template-areas: "away" "home" "mid"; gap: 0; }
  .gh-team.away { grid-area: away; border-radius: var(--radius-sm) var(--radius-sm) 0 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .gh-team.home { grid-area: home; border-radius: 0 0 var(--radius-sm) var(--radius-sm); flex-direction: row; text-align: left; }
  .gh-mid { grid-area: mid; margin-top: 0.9rem; }
  .gh-team { gap: 0.75rem; padding: 0.55rem 0.9rem; background: rgba(10, 11, 16, 0.72); backdrop-filter: blur(6px); }
  .gh-team img { width: 2.4rem; height: 2.4rem; }
  .gh-name { font-size: 1.05rem; }
  .gh-score { margin-left: auto; font-size: 2.3rem; text-align: right; min-width: 2.5ch; }
  .gh-mid .linescore { font-size: 1rem; }
  .gh-mid .linescore th, .gh-mid .linescore td { padding: 0.35rem 0.6rem; min-width: 0; }
  .play-card { grid-template-columns: auto 1fr; }
  .pc-result { grid-column: 1 / -1; }
}

/* ------------------------------------------------------- scoring summary */
.score-head { display: flex; justify-content: space-between; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); font-weight: 700; padding: 0 0.2rem 0.5rem; border-bottom: 1px solid var(--border-2); }
.score-list { list-style: none; margin: 0; padding: 0; }
.score-row {
  display: grid; grid-template-columns: 7.5rem 1fr auto; gap: 0.9rem; align-items: center;
  padding: 0.65rem 0.2rem 0.65rem 0.6rem; border-bottom: 1px solid var(--border); border-left: 3px solid var(--sc);
}
.score-row:last-child { border-bottom: 0; }
.score-who { display: flex; align-items: center; gap: 0.55rem; }
.score-who img { width: 2rem; height: 2rem; object-fit: contain; flex: none; }
.score-who strong { display: block; font-size: 0.85rem; }
.score-who span { display: block; font-size: 0.74rem; white-space: nowrap; }
.score-text { font-size: 0.9rem; line-height: 1.4; min-width: 0; }
.score-tally { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 640px) {
  /* Logo + time on their own line above the play, score pinned right. */
  .score-row { grid-template-columns: 1fr auto; grid-template-areas: "who tally" "text text"; row-gap: 0.35rem; }
  .score-who { grid-area: who; }
  .score-tally { grid-area: tally; }
  .score-text { grid-area: text; }
}

/* ---------------------------------------------------- quarter dividers */
/* Opens each quarter in play-by-play and scoring. */
.period-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; flex-wrap: wrap;
  margin: 1.2rem 0 0.55rem; padding: 0.5rem 0.8rem; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-2), transparent);
  border-left: 4px solid var(--team);
}
.period-head:first-child, .score-head + .period-head { margin-top: 0.6rem; }
.ph-name { font-size: 0.95rem; font-weight: 850; letter-spacing: 0.02em; text-transform: uppercase; }
.ph-detail { font-size: 0.82rem; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }
.period-head.live { border-left-color: #d7263d; }
.period-head.live .ph-detail { color: #ff8a98; }
.period-empty { margin: 0 0 0.4rem; padding: 0.3rem 0.8rem; font-size: 0.85rem; color: var(--dim); font-style: italic; }

/* ESPN's own break markers ("END QUARTER 1", halftime) inside a drive. */
.period-break {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem; flex-wrap: wrap;
  padding: 0.55rem 0.8rem; border-top: 1px solid var(--border);
  background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 8px, transparent 8px, transparent 16px);
  font-size: 0.78rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text);
}
.period-break .pb-score { color: var(--muted); font-weight: 700; letter-spacing: 0.02em; text-transform: none; font-variant-numeric: tabular-nums; }
.period-break.minor { background: none; color: var(--warn); font-size: 0.7rem; padding: 0.35rem 0.8rem; }

/* Score shown on a drive header when the drive changed the score. */
.drive-tally { display: inline-flex; align-items: baseline; gap: 0.35rem; white-space: nowrap; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.drive-tally b { font-size: 1.05rem; font-weight: 850; }
.drive-tally .dt-flat { color: var(--muted); }
.drive-tally .dt-up { color: var(--good); }
.drive-tally .dt-sep { color: var(--dim); }
.drive-tally.quiet { opacity: 0.7; }
.drive-tally.quiet b { font-size: 0.95rem; font-weight: 700; }

/* ------------------------------------------------------ box score sub-tabs */
.subtabs {
  display: flex; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 0.9rem; padding: 0.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 99px; width: fit-content; max-width: 100%;
}
.subtab {
  display: inline-flex; align-items: center; gap: 0.45rem; border: 0; background: none; color: var(--muted);
  font: inherit; font-size: 0.88rem; font-weight: 700; padding: 0.4rem 0.95rem; border-radius: 99px; cursor: pointer;
  transition: background .15s, color .15s;
}
.subtab img { width: 1.4rem; height: 1.4rem; object-fit: contain; }
.subtab:hover { color: var(--text); }
.subtab.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-2); }

/* One team's player stats: categories side by side on wide screens. */
.box-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(30rem, 100%), 1fr)); gap: 1rem; align-items: start; }
.box-cat h3 { margin-top: 0; color: var(--bc); }

/* ---------------------------------------------------------------- highlights */
.watch-btn {
  display: inline-flex; align-items: center; gap: 0.4em; margin-top: 0.35rem;
  padding: 0.28rem 0.7rem 0.28rem 0.5rem; border-radius: 999px; border: 0; cursor: pointer;
  background: #e11d2e; color: #fff; font: inherit; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(225, 29, 46, 0.35);
}
.watch-btn:hover { background: #f02a3b; }
.watch-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.watch-icon { font-size: 0.7em; }
.score-text .watch-btn, .pc-text + .watch-btn { display: flex; width: fit-content; }
.pr-watch { padding: 0 0.8rem 0.6rem 6rem; } /* lines up with the play text */

.highlights h2 { margin-bottom: 0.7rem; }
.hl-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 19rem); gap: 0.8rem; overflow-x: auto; padding-bottom: 0.4rem; scroll-snap-type: x mandatory; }
.hl-card {
  display: flex; flex-direction: column; gap: 0.3rem; text-align: left; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; cursor: pointer; scroll-snap-align: start; min-width: 0;
}
.hl-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.hl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.hl-card:hover .hl-thumb img { transform: scale(1.04); }
.hl-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center;
  background: rgba(225, 29, 46, 0.92); color: #fff; font-size: 1rem; padding-left: 0.15rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.hl-dur { position: absolute; right: 0.4rem; bottom: 0.4rem; padding: 0.05rem 0.4rem; border-radius: 0.3rem; background: rgba(0,0,0,0.75); font-size: 0.72rem; font-weight: 700; }
.hl-tag { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hl-title { font-size: 0.88rem; font-weight: 700; line-height: 1.3; }
.hl-card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: var(--radius-sm); }

.modal-open { overflow: hidden; }
/* While a clip plays, nothing else is drawn: on a 4K screen, blurring or repainting the
   page behind the video costs enough to make 60fps clips drop frames. */
.modal-open > :not(.clip-modal) { visibility: hidden; }
.clip-modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: #050608; animation: clip-fade .2s ease-out;
}
.clip-box { position: relative; width: min(100%, 1400px, calc((100vh - 9rem) * 16 / 9)); }
.clip-box video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm); }
.clip-caption { display: flex; justify-content: space-between; gap: 1rem; padding-top: 0.6rem; font-size: 0.95rem; }
.clip-close {
  position: absolute; top: -2.6rem; right: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: #fff; font-size: 1rem; cursor: pointer;
}
.clip-close:hover { background: rgba(255,255,255,0.18); }
@keyframes clip-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
  .pr-watch { padding-left: 0.9rem; }
  .clip-caption { flex-direction: column; gap: 0.2rem; }
}

/* ===========================================================================
   Search, standings, my team.
   =========================================================================== */

.site-search { position: relative; flex: 1 1 14rem; max-width: 26rem; order: 0; }
.site-search input {
  width: 100%; padding: 0.5rem 0.95rem 0.5rem 2.2rem; border-radius: 99px;
  border: 1px solid var(--border-2); background: var(--surface) no-repeat 0.8rem 50% / 0.95rem
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0ad' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  color: var(--text); font: inherit; font-size: 0.9rem;
}
.site-search input::placeholder { color: var(--muted); }
.site-search input:focus { outline: none; border-color: var(--team); background-color: var(--surface-2); }
.search-results {
  position: absolute; top: calc(100% + 0.4rem); left: 0; right: 0; z-index: 30;
  max-height: min(70vh, 30rem); overflow-y: auto; padding: 0.35rem;
  background: #161821; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.sr-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.6rem; border-radius: 0.5rem; text-decoration: none; color: inherit; }
.sr-item:hover, .sr-item.active { background: var(--surface-2); }
.sr-item div { display: flex; flex-direction: column; min-width: 0; }
.sr-item strong { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-item .dim { font-size: 0.76rem; }
.sr-pic { width: 2.3rem; height: 2.3rem; flex: none; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.sr-pic.logo { object-fit: contain; background: none; border-radius: 0; }
.sr-empty { padding: 0.8rem; color: var(--muted); font-size: 0.88rem; }

.nav-fav { display: inline-flex; align-items: center; gap: 0.35rem; }
.nav-fav img { width: 1.3rem; height: 1.3rem; object-fit: contain; }
.hero-actions { position: relative; z-index: 1; margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.fav-btn, .share-btn { background: rgba(0,0,0,0.25); border-color: rgba(255,255,255,0.3); }
.fav-btn[aria-pressed="true"] { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.6); }

.game.mine { outline: 2px solid var(--team); outline-offset: 2px; }
tr.mine td { background: color-mix(in srgb, var(--team) 14%, transparent); }

.standings { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: 1.1rem; align-items: start; }
/* Two divisions side by side only when each still gets room for all twelve columns. */
.st-divs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(44rem, 100%), 1fr)); gap: 1.1rem; }
.st-div th, .st-div td { white-space: nowrap; padding-inline: 0.6rem; }
.st-div td.st-team { padding-right: 1.4rem; }
.st-div h2 { margin-bottom: 0.5rem; }
.st-div .opp { white-space: nowrap; }
.st-div td.pos { color: var(--good); }
.st-div td.neg { color: var(--bad); }
.st-picture { position: sticky; top: 5rem; }
.seed-list { list-style: none; margin: 0; padding: 0; }
.seed-list li {
  display: grid; grid-template-columns: 1.8rem 1fr auto auto; align-items: center; gap: 0.55rem;
  padding: 0.45rem 0.35rem; border-top: 1px solid var(--border);
}
.seed-list li:first-child { border-top: 0; }
.seed-list li.mine { background: color-mix(in srgb, var(--team) 14%, transparent); border-radius: 0.4rem; }
.seed-list a { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 700; min-width: 0; }
.seed-list a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seed-list img { width: 1.6rem; height: 1.6rem; object-fit: contain; flex: none; }
.seed { font-weight: 900; font-size: 1.05rem; text-align: center; color: var(--muted); }
.seed-rec { font-variant-numeric: tabular-nums; font-size: 0.88rem; }
.seed-tag { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0.12rem 0.45rem; border: 1px solid var(--border-2); border-radius: 99px; }
.seed-tag.bye { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, transparent); }
.hunt-label { margin: 0.9rem 0 0.2rem; padding-top: 0.6rem; border-top: 2px dashed var(--border-2); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.seed-list.hunt li { opacity: 0.8; }

@media (max-width: 900px) {
  .standings { grid-template-columns: 1fr; }
  .st-picture { position: static; }
}
@media (max-width: 640px) {
  /* Brand and search on one row, the nav scrolling sideways underneath. */
  .header-inner { gap: 0.5rem 0.75rem; padding-block: 0.45rem; }
  .logo-mark { width: 2.8rem; }
  .wordmark { font-size: 1.1rem; }
  .site-search { flex: 1 1 0; max-width: none; }
  .site-nav { order: 2; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; }
  .st-div .opt { display: none; }
  .st-div th, .st-div td { padding-inline: 0.4rem; }
  .st-div td.st-team { padding-right: 0.8rem; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; }
  .hero-actions { margin-left: 0; }
}

/* ------------------------------------------------------ live fantasy points */
.live-dot {
  display: inline-block; flex: none; width: 0.5rem; height: 0.5rem; margin-right: 0.45rem; border-radius: 50%;
  background: #ff3b4e; animation: live-pulse 1.6s ease-in-out infinite; vertical-align: middle;
}
/* The dot itself pulses; a spreading ring would spill over the numbers beside it. */
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }
.live-note { display: flex; align-items: center; color: var(--text) !important; font-weight: 600; }
.ppr.actual { color: var(--text); }
.ppr.actual.beat { color: var(--good); }
.ppr.actual.miss { color: var(--bad); }
td.small { font-size: 0.78rem; white-space: nowrap; }
/* The live dot stays on the same line as the points, never wrapped over them. */
td.actual-cell { white-space: nowrap; }

.leaders { margin-bottom: 1.1rem; }
.leader-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 0.2rem 1.2rem; }
.leader-list li { display: grid; grid-template-columns: 1.4rem 2rem 1fr auto; align-items: center; gap: 0.6rem; padding: 0.5rem 0.2rem; border-top: 1px solid var(--border); }
.leader-rank { font-weight: 900; color: var(--muted); text-align: center; }
.leader-logo { width: 2rem; height: 2rem; object-fit: contain; }
.leader-who { display: flex; flex-direction: column; min-width: 0; }
.leader-who a { font-weight: 800; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-who .dim { font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-pts { display: flex; flex-direction: column; align-items: flex-end; }
.leader-pts strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.leader-pts .dim { font-size: 0.7rem; }
.leader-pts strong { display: inline-flex; align-items: center; }

.share-btn span { font-weight: 900; }
.gh-share { position: absolute; top: 0.7rem; right: 0.7rem; z-index: 2; padding: 0.3rem 0.75rem; font-size: 0.78rem; }
.toast {
  position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); z-index: 120;
  transform: translate(-50%, 1rem); opacity: 0; transition: transform .2s, opacity .2s;
  max-width: calc(100% - 2rem); padding: 0.6rem 1rem; border-radius: 99px; overflow-wrap: anywhere;
  background: #eef0f5; color: #0c0d12; font-weight: 700; font-size: 0.9rem; box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 640px) { .gh-share { top: 0.5rem; right: 0.5rem; } }

/* Betting line on upcoming game cards */
.odds-line {
  position: relative; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; align-items: center;
  margin: 0 1rem 0.55rem; padding: 0.35rem 0.7rem; border-radius: 0.5rem; width: fit-content;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem; font-variant-numeric: tabular-nums;
}
.odds-line .dim { color: rgba(255, 255, 255, 0.6); }


/* Scores and big numbers in the condensed face, like a broadcast score bug. */
.side-score, .gh-score, .proj-big, .score-tally, .drive-tally b, .leader-pts strong, .seed,
.linescore td, .linescore th, .gh-status, .status-badge, .brand, .hero h1, .ph-title, .to-team {
  font-family: var(--font-display);
}
@media (min-width: 641px) {
  .side-score { font-size: 1.95rem; }
  .gh-score { font-size: 3.4rem; }
}
.linescore td.total { font-weight: 800; }

/* ------------------------------------------------------------------ accounts */
.account { position: relative; }
.account-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.95rem; border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--team-glow) 60%, var(--border-2)); background: color-mix(in srgb, var(--team-glow) 14%, transparent);
  color: var(--text); font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background .2s, box-shadow .2s;
}
.account-btn:hover, .account-btn:focus-visible {
  outline: none; background: color-mix(in srgb, var(--team-glow) 30%, transparent);
  box-shadow: 0 0 1rem 0.1rem color-mix(in srgb, var(--team-glow) 45%, transparent);
}
.avatar {
  display: grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-left: -0.45rem; border-radius: 50%;
  background: var(--team-glow); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 0.95rem;
}
.account-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 40; min-width: 15rem; padding: 0.4rem;
  background: #161821; border: 1px solid var(--border-2); border-radius: var(--radius-sm); box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.menu-head { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.55rem 0.7rem 0.65rem; border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; }
.menu-head .dim { font-size: 0.8rem; }
.menu-item {
  display: block; width: 100%; text-align: left; padding: 0.55rem 0.7rem; border: 0; border-radius: 0.45rem;
  background: none; color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--bad); }

.auth-modal .auth-box {
  position: relative; width: min(100%, 27rem); padding: 1.6rem 1.5rem 1.2rem; border-radius: var(--radius);
  background: #14161f; border: 1px solid var(--border-2); box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  display: flex; flex-direction: column; gap: 0.8rem;
}
.auth-box h2 { margin: 0; font-size: 1.6rem; }
.auth-box > p { margin: 0; }
.auth-box .clip-close { top: 0.8rem; right: 0.8rem; }
.btn-primary {
  justify-content: center; padding: 0.7rem 1rem; font-size: 1rem; font-weight: 700;
  background: var(--team-glow); border-color: transparent; color: #fff;
  box-shadow: 0 0 1.2rem color-mix(in srgb, var(--team-glow) 45%, transparent);
}
.btn-primary:hover { filter: brightness(1.12); }
.auth-divider { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-2); }
.auth-create { display: flex; gap: 0.5rem; }
.auth-create input {
  flex: 1; min-width: 0; padding: 0.55rem 0.85rem; border-radius: 99px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font: inherit;
}
.auth-create input:focus { outline: none; border-color: var(--team-glow); }
.auth-status { margin: 0; min-height: 1.2em; font-size: 0.88rem; color: var(--muted); }
.auth-status.error { color: var(--bad); }
.auth-box button:disabled, .auth-box input:disabled { opacity: 0.55; cursor: wait; }

@media (max-width: 640px) {
  /* Brand, search and the account button share the top row; the nav scrolls below. */
  .account { order: 1; }
  .account-name { display: none; }
  .account-btn { padding: 0.35rem 0.7rem; font-size: 0.82rem; }
  .account-btn .avatar { margin: 0 -0.25rem; }
}

/* ------------------------------------------------------------ text pages */
.text-page { max-width: 46rem; margin: 0 auto; padding-bottom: 2rem; line-height: 1.65; }
.text-page h1 { margin-bottom: 0.6rem; }
.text-page h2 { margin: 2rem 0 0.5rem; }
.text-page .lead { font-size: 1.15rem; color: var(--text); }
.text-page p, .text-page li { color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.text-page ul { padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.text-page a { color: var(--team); }

/* ------------------------------------------------------------------- pick'em */
.pickem { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); gap: 1.1rem; align-items: start; }
.pickem-side { display: grid; gap: 1.1rem; position: sticky; top: 5rem; }
.pick-summary { display: flex; gap: 2rem; padding: 0.2rem 0.2rem 0.9rem; border-bottom: 1px solid var(--border); margin-bottom: 0.4rem; }
.pick-summary div { display: flex; flex-direction: column; }
.pick-summary strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.pick-summary .dim { font-size: 0.8rem; }
.pick-signin { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.3rem 0.2rem 1rem; border-bottom: 1px solid var(--border); margin-bottom: 0.4rem; }
.pick-signin p { margin: 0; flex: 1 1 16rem; }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-row { padding: 0.8rem 0.2rem; border-top: 1px solid var(--border); }
.pick-row:first-child { border-top: 0; }
.pick-when { display: flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 0.45rem; }
.pick-game-link { margin-left: auto; font-size: 0.75rem; color: var(--muted); text-decoration: none; }
.pick-game-link:hover { color: var(--text); text-decoration: underline; }
.pick-sides { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.5rem; }
.pick-at { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.pick-team {
  position: relative; display: flex; align-items: center; gap: 0.6rem; min-width: 0; padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.pick-team img { width: 2.2rem; height: 2.2rem; object-fit: contain; flex: none; }
.pick-name { display: flex; flex-direction: column; min-width: 0; }
.pick-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-name .dim { font-size: 0.75rem; }
.pick-score { margin-left: auto; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; }
.pick-team:hover:not(:disabled) { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, transparent); }
.pick-team.chosen { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 28%, transparent); box-shadow: 0 0 0.9rem color-mix(in srgb, var(--pc) 35%, transparent); }
.pick-team:disabled { cursor: default; }
.pick-row.locked .pick-team:not(.chosen) { opacity: 0.6; }
.pick-team.won .pick-name strong { color: #fff; }
.pick-team.right { border-color: var(--good); box-shadow: 0 0 0.8rem color-mix(in srgb, var(--good) 35%, transparent); }
.pick-team.wrong { border-color: var(--bad); }
.pick-mark { position: absolute; top: -0.5rem; right: -0.4rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 900; color: #0c0d12; }
.pick-team.right .pick-mark { background: var(--good); }
.pick-team.wrong .pick-mark { background: var(--bad); }

.board { list-style: none; margin: 0; padding: 0; }
.board li { display: grid; grid-template-columns: 2rem 1fr auto 3rem; gap: 0.5rem; align-items: center; padding: 0.45rem 0.3rem; border-top: 1px solid var(--border); }
.board li:first-child { border-top: 0; }
.board li.me { background: color-mix(in srgb, var(--team) 14%, transparent); border-radius: 0.4rem; }
.board-rank { font-family: var(--font-display); font-weight: 800; color: var(--muted); text-align: center; }
.board-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-rec { font-family: var(--font-display); font-weight: 700; }
.board-pct { text-align: right; font-size: 0.82rem; }
.leaderboard .subtabs { margin-bottom: 0.6rem; flex-wrap: wrap; }
.leagues { display: grid; gap: 0.7rem; }
.leagues h2 { margin: 0; }
.league { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.league > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.league .dim { font-size: 0.78rem; }
.league-actions { display: flex; gap: 0.35rem; flex: none; }
.league-actions .btn { padding: 0.3rem 0.7rem; font-size: 0.78rem; }
.btn.ghost { background: none; }
.join-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
  padding: 1rem 1.2rem; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--team-glow) 60%, transparent);
  background: color-mix(in srgb, var(--team-glow) 16%, var(--bg-2));
}
.join-banner > div { display: flex; flex-direction: column; }
@media (max-width: 900px) {
  .pickem { grid-template-columns: 1fr; }
  .pickem-side { position: static; }
}
@media (max-width: 640px) {
  .pick-team { padding: 0.5rem; gap: 0.45rem; }
  .pick-team img { width: 1.8rem; height: 1.8rem; }
  .pick-name .dim { display: none; }
  .pick-score { font-size: 1.2rem; }
}

/* ------------------------------------------------------------- phone tab bar */
.tabbar { display: none; }
@media (max-width: 640px) {
  .site-nav { display: none; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 0.35rem 0.3rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background: rgba(12, 13, 18, 0.92); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.35rem 0.2rem;
    border-radius: 0.6rem; color: var(--muted); text-decoration: none; font-size: 0.68rem; font-weight: 700;
  }
  .tabbar svg { width: 1.45rem; height: 1.45rem; }
  .tabbar a.active { color: var(--text); background: color-mix(in srgb, var(--team-glow) 22%, transparent); }
  .tabbar a.active svg { color: var(--team-glow); filter: drop-shadow(0 0 0.35rem color-mix(in srgb, var(--team-glow) 60%, transparent)); }
  /* Room for the bar under the last of the page, and toasts above it. */
  body { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
}

/* ------------------------------------------------------------ welcome panel */
.home-intro:empty { display: none; }
.home-intro { margin-bottom: 1.1rem; }
.welcome { position: relative; border-color: color-mix(in srgb, var(--team-glow) 45%, var(--border-2)); background: linear-gradient(135deg, color-mix(in srgb, var(--team-glow) 14%, var(--surface)), var(--surface)); }
.welcome h2 { font-size: 1.7rem; margin: 0 2rem 0.3rem 0; }
.welcome > p { margin: 0 0 0.9rem; }
.welcome-close { position: absolute; top: 0.8rem; right: 0.8rem; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--border-2); background: none; color: var(--muted); cursor: pointer; }
.welcome-close:hover { color: var(--text); }
.welcome-features { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 0.8rem; }
.welcome-features li { display: flex; gap: 0.6rem; align-items: flex-start; }
.welcome-features li > div { display: flex; flex-direction: column; }
.welcome-features .dim { font-size: 0.85rem; }
.wf-icon { font-size: 1.4rem; line-height: 1.2; }
.welcome-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* --------------------------------------------------------------- my team */
.my-team { border-color: color-mix(in srgb, var(--mt) 50%, var(--border-2)); background: linear-gradient(120deg, color-mix(in srgb, var(--mt-bg) 55%, var(--surface)) 0%, var(--surface) 55%); }
.mt-head { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; margin-bottom: 1rem; }
.mt-head img { width: 3.6rem; height: 3.6rem; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.5)); }
.mt-head > div { display: flex; flex-direction: column; }
.mt-head strong { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.mt-kicker { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt); }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1rem 1.4rem; }
.mt-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.mt-game { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.mt-game img { width: 2.2rem; height: 2.2rem; object-fit: contain; }
.mt-game > div, .mt-pickem { display: flex; flex-direction: column; }
.mt-game .dim, .mt-pickem .dim { font-size: 0.8rem; }
.mt-countdown { margin-top: 0.45rem; display: inline-flex; align-items: center; padding: 0.2rem 0.65rem; border-radius: 99px; font-weight: 800; font-size: 0.82rem; background: color-mix(in srgb, var(--mt) 22%, transparent); border: 1px solid color-mix(in srgb, var(--mt) 50%, transparent); }
.mt-countdown.live { background: rgba(215, 38, 61, 0.25); border-color: rgba(255, 59, 78, 0.6); }
.mt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.mt-list li { display: flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; }
.mt-list a { text-decoration: none; font-weight: 700; }
.mt-list .chip, .mt-list .ppr { margin-left: auto; }
.mt-pickem { text-decoration: none; }
.mt-pickem strong { font-family: var(--font-display); font-size: 1.8rem; line-height: 1; }
