:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6f5;
  --text: #13161b;
  --muted: #4a5260;
  --border: #e1e5e3;
  --brand: #0b6e4f;
  --brand-ink: #ffffff;
  --brand-dark: #08261c;
  --up: #0f8a4b;
  --down: #c62828;
  --q: #a86a00;
  --qb: #7a3fc2; --rb: #0b7a75; --wr: #1f5fbf; --te: #b35c00;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1115;
    --surface: #1a1f27;
    --surface-2: #252b35;
    --text: #e8ebf0;
    --muted: #b0b8c5;
    --border: #343c48;
    --brand: #2fbf8a;
    --brand-ink: #06150f;
    --brand-dark: #0a1f17;
    --up: #3ccf7d; --down: #ff6b6b; --q: #f2c14e;
    --qb: #b48cf0; --rb: #4fd1c5; --wr: #6aa5ff; --te: #f0a050;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
img { max-width: 100%; }
main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; min-height: 60vh; }
h1, h2, h3 { line-height: 1.2; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- Header (shared) ---------- */
.site-header { background: var(--brand-dark); color: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: #2fbf8a; color: #06150f; font-weight: 900; font-size: 19px;
}
.brand-name { font-weight: 900; font-size: 21px; letter-spacing: .2px; white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 6px 12px; border-radius: 8px; color: #c9d4ce; font-weight: 600; }
.nav a:hover { color: #fff; background: rgb(255 255 255 / .08); }
.nav a[aria-current="page"] { color: #fff; background: rgb(255 255 255 / .14); }
.header-week { margin-left: auto; color: #9fb3aa; font-size: 13px; white-space: nowrap; }

/* ---------- Footer (shared) ---------- */
.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 36px; border-top: 1px solid var(--border); }

/* ---------- Building blocks ---------- */
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 20px; }
.section-head a { color: var(--brand); font-weight: 600; text-decoration: none; font-size: 14px; }
.section-head a:hover { text-decoration: underline; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.muted { color: var(--muted); }
.notice { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--down); border-radius: var(--radius); padding: 16px; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

.pos {
  display: inline-block; min-width: 30px; text-align: center; padding: 1px 6px; border-radius: 5px;
  font-size: 11px; font-weight: 800; color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, transparent);
}
.pos-QB { --pc: var(--qb); } .pos-RB { --pc: var(--rb); } .pos-WR { --pc: var(--wr); } .pos-TE { --pc: var(--te); }
.inj { display: inline-block; vertical-align: middle; padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 800; }
.inj-q { color: var(--q); background: color-mix(in srgb, var(--q) 18%, transparent); }
.inj-d, .inj-out { color: var(--down); background: color-mix(in srgb, var(--down) 15%, transparent); }
.spread.fav { color: var(--up); } .spread.dog { color: var(--down); }

.headshot { border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.headshot.sm { width: 36px; height: 36px; }
.headshot.md { width: 64px; height: 64px; }
.headshot.lg { width: 120px; height: 120px; }
.headshot.placeholder { display: grid; place-items: center; color: var(--muted); font-weight: 800; }

/* ---------- Home ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand-dark), #0b4d38);
  color: #fff; border-radius: 16px; padding: 36px 28px; position: relative; overflow: hidden;
}
.hero::after {
  content: "M"; position: absolute; right: -10px; bottom: -70px; font-size: 260px; font-weight: 900;
  color: rgb(255 255 255 / .06); line-height: 1;
}
.hero h1 { margin: 0 0 6px; font-size: 40px; font-weight: 900; letter-spacing: .5px; }
.hero p { margin: 0; color: #c9d4ce; font-size: 17px; max-width: 520px; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; position: relative; z-index: 1; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; padding: 9px 16px; border-radius: 999px;
  background: #2fbf8a; color: #06150f;
}
.btn.ghost { background: rgb(255 255 255 / .1); color: #fff; }
.btn:hover { filter: brightness(1.08); }

.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.player-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 12px; position: relative; transition: border-color .15s, transform .15s;
}
.player-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.player-card .rank-num { position: absolute; top: 10px; left: 12px; font-weight: 900; color: var(--muted); }
.player-card .name { font-weight: 700; }
.player-card .meta { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.player-card .pts { font-size: 22px; font-weight: 800; }
.player-card .pts small { font-size: 12px; color: var(--muted); font-weight: 600; }

.pos-leaders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .pos-leaders { grid-template-columns: 1fr; } }
.leader-list { list-style: none; margin: 0; padding: 0; }
.leader-list li { border-top: 1px solid var(--border); }
.leader-list li:first-child { border-top: 0; }
.leader-list a { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; }
.leader-list a:hover .lname { text-decoration: underline; }
.leader-list .lrank { width: 18px; color: var(--muted); font-weight: 700; font-size: 13px; }
.leader-list .lname { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-list .lteam { color: var(--muted); font-size: 12px; }
.leader-list .lpts { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Games ---------- */
.schedule { display: flex; flex-direction: column; gap: 22px; }
.slot-head { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.slot-games { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sched-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: center;
  padding: 12px 16px; text-decoration: none; border-top: 1px solid var(--border);
}
.sched-row:first-child { border-top: 0; }
.sched-row:hover { background: var(--surface-2); }
.sr-matchup { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.sr-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sr-team.home { justify-content: flex-end; text-align: right; }
.sr-name { display: flex; flex-direction: column; font-weight: 800; font-size: 17px; line-height: 1.2; min-width: 0; }
.sr-name small { font-size: 12px; font-weight: 600; color: var(--muted); }
.sr-score { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 32px; }
.sr-team.away .sr-score { margin-left: auto; }
.sr-team.home .sr-score { margin-right: auto; }
.sr-team.lost .sr-name, .sr-team.lost .sr-score { color: var(--muted); font-weight: 600; }
.sr-at { color: var(--muted); font-weight: 700; }
.sr-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sr-line { display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.sr-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.sr-res { font-size: 12px; color: var(--muted); font-weight: 600; }
@media (max-width: 700px) {
  .sched-row { grid-template-columns: 1fr; gap: 8px; }
  .sr-name { font-size: 15px; }
  .sr-score { font-size: 20px; }
  .sr-lines { grid-template-columns: 1fr 1fr; padding-top: 6px; border-top: 1px dashed var(--border); }
  .sr-line { flex-direction: row; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
}
.week-picker { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.week-picker button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  min-width: 40px; padding: 5px 10px; border-radius: 8px; cursor: pointer;
}
.week-picker button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* ---------- Players table ---------- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 0; font-size: 28px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.tab[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.search {
  flex: 1 1 200px; min-width: 0; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit;
}
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th {
  text-align: right; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted);
  background: var(--surface-2); padding: 9px 10px; white-space: nowrap;
}
.data-table th button { all: unset; cursor: pointer; }
.data-table th button:hover, .data-table th[aria-sort] button { color: var(--text); }
.data-table td { padding: 8px 10px; border-top: 1px solid var(--border); text-align: right; white-space: nowrap; }
.data-table .l { text-align: left; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .pcell { display: flex; align-items: center; gap: 10px; }
.data-table .pcell a { font-weight: 600; text-decoration: none; }
.data-table .pcell a:hover { text-decoration: underline; }
.data-table .strong { font-weight: 700; }
.more { display: block; margin: 14px auto 0; }
.btn-plain {
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
}

/* ---------- Player page ---------- */
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back:hover { color: var(--text); }
.profile-head {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--pc);
  border-radius: var(--radius); padding: 22px;
}
.profile-head h1 { margin: 0 0 6px; font-size: 30px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); }
.profile-rank { margin-left: auto; text-align: right; }
.profile-rank strong { display: block; font-size: 38px; line-height: 1; }
.profile-rank span { color: var(--muted); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.grid .wide { grid-column: 1 / -1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.tile { background: var(--surface-2); border-radius: 9px; padding: 10px 12px; }
.tile strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12px; }
.tile.accent { background: color-mix(in srgb, var(--brand) 15%, var(--surface)); }
.tile.accent strong { color: var(--brand); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 18px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar .fill { width: 100%; max-width: 44px; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar .v { font-size: 11px; font-weight: 700; margin-bottom: 3px; }
.bar .w { font-size: 11px; color: var(--muted); margin-top: 4px; }

@media (max-width: 640px) {
  .header-week { display: none; }
  .header-inner { gap: 12px; }
  .brand-name { font-size: 18px; }
  .nav a { padding: 6px 8px; }
  .hero { padding: 28px 20px; }
  .hero h1 { font-size: 32px; }
  .profile-rank { margin-left: 0; text-align: left; width: 100%; }
  .hide-sm { display: none; }
  .top-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .player-card { padding: 14px 8px; }
  .player-card .pts { font-size: 18px; }
}
.tile strong span { font-size: inherit; color: inherit; }
.tile strong .spread.fav { color: var(--up); }
.tile strong .spread.dog { color: var(--down); }

/* ---------- Header dropdown ---------- */
.nav { align-items: center; }
.nav-drop { position: relative; }
.nav-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; z-index: 20;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 30px rgb(0 0 0 / .25); padding: 6px; display: none;
}
.nav-drop::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; } /* hover bridge */
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { display: block; }
.nav-menu a { display: flex; gap: 10px; align-items: baseline; color: var(--text); padding: 8px 10px; border-radius: 8px; }
.nav-menu a:hover { background: var(--surface-2); color: var(--text); }
.nav-menu strong { width: 34px; }
.nav-menu span { color: var(--muted); font-size: 13px; font-weight: 500; }

/* ---------- Scoring dropdowns ---------- */
.scoring { display: flex; gap: 10px; flex-wrap: wrap; }
.scoring label, .week-select { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.scoring select, .week-select select {
  font: inherit; font-weight: 700; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
.week-select { font-size: 15px; }
.week-select select { font-size: 17px; padding: 9px 14px; min-width: 200px; }
.sub-head { margin: 4px 0 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h3 { margin: 0; }

/* ---------- Rankings ---------- */
.tabs-bar { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.pos-tab {
  border: 0; background: none; color: var(--muted); font: inherit; font-weight: 800; font-size: 16px;
  padding: 10px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.pos-tab:hover { color: var(--text); }
.pos-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.rank-table td { padding: 10px; }
.rank-table .rank { font-weight: 800; width: 44px; }
.pcell .pmeta { color: var(--muted); font-size: 12px; }
.data-table .opp { font-weight: 700; }
.bye { color: var(--muted); font-weight: 800; font-size: 12px; letter-spacing: .5px; }
.data-table .hl { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.data-table th.hl { color: var(--text); }
tr.unqualified td { opacity: .55; }
.legend { color: var(--muted); font-size: 12px; margin: 10px 2px 0; }
.team-mark { font-size: 11px; letter-spacing: .3px; }

/* ---------- Player page ---------- */
.profile-main { min-width: 0; }
.profile-note { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.profile-note strong { color: var(--text); }
.table-wrap.flat { border: 0; }
.win { color: var(--up); font-weight: 700; }
.loss { color: var(--down); font-weight: 700; }

/* ---------- Bigger, easier-to-read game cards ---------- */
.games-grid.big { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.games-grid.big .game-card { padding: 18px 20px; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.games-grid.big .game-card .when { font-size: 13px; font-weight: 600; color: var(--text); opacity: .75; }
.games-grid.big .game-row { padding: 6px 0; }
.games-grid.big .game-row .team { font-size: 20px; }
.games-grid.big .game-row .num { font-size: 16px; min-width: 52px; }
.games-grid.big .game-row .score { font-size: 22px; }
.games-grid.big .game-cols span:not(:first-child) { min-width: 52px; }
.games-grid.big .game-foot { font-size: 13px; }
.game-row.winner .team, .game-row.winner .score { color: var(--text); }
.game-card.final .game-row:not(.winner) .score { color: var(--muted); }
.badge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; vertical-align: middle; }
.badge.cover { color: var(--up); background: color-mix(in srgb, var(--up) 15%, transparent); }
.ou-over { color: var(--up); } .ou-under { color: var(--down); } .ou-push { color: var(--muted); }
.game-foot .stadium { text-align: right; }
.recap {
  display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px;
}
@media (max-width: 900px) { .games-grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .games-grid.big { grid-template-columns: 1fr; }
  .brand-name { font-size: 16px; }
  .nav-menu { left: auto; right: -60px; }
  .pos-tab { padding: 10px 11px; font-size: 15px; }
  .rank-table .pcell .headshot { display: none; }
  .rank-table td, .rank-table th { padding-left: 6px; padding-right: 6px; }
  .rank-table { font-size: 14px; }
  .rank-table .pcell { gap: 0; }
  .rank-table .rank { width: 30px; }
  .rank-table .pcell a { white-space: normal; }
  .rank-table th { font-size: 11px; letter-spacing: 0; }
}

/* ---------- Team badges ---------- */
.team-badge {
  display: inline-grid; place-items: center; flex: none; border-radius: 10px; font-weight: 900; letter-spacing: .3px;
  background: var(--tc); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); text-shadow: 0 1px 1px rgb(0 0 0 / .35);
}
.team-badge.sm { width: 26px; height: 26px; font-size: 9px; border-radius: 6px; vertical-align: middle; }
.team-badge.md { width: 40px; height: 40px; font-size: 12px; }
.team-badge.xl { width: 76px; height: 76px; font-size: 22px; border-radius: 18px; }
.team-logo { flex: none; object-fit: contain; vertical-align: middle; }
.team-logo.sm { width: 26px; height: 26px; }
.team-logo.md { width: 40px; height: 40px; }
.team-logo.xl { width: 76px; height: 76px; }
.feature .team-logo { background: #fff; border-radius: 18px; padding: 8px; box-sizing: content-box; }

/* ---------- Shared bits ---------- */
a.game-card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.game-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.small { font-size: 12px; }
.small-link { color: var(--brand); font-weight: 600; font-size: 13px; text-decoration: none; }
.small-link:hover { text-decoration: underline; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill.ok { color: var(--up); background: color-mix(in srgb, var(--up) 14%, transparent); }
.pill.bad { color: var(--down); background: color-mix(in srgb, var(--down) 14%, transparent); }
.pos-num { color: var(--up); font-weight: 700; }
.neg-num { color: var(--down); font-weight: 700; }
.data-table.compact td { padding: 7px 8px; }
.data-table.compact th { padding: 7px 8px; }
.click-row { cursor: pointer; }
.note-card { border-left: 4px solid var(--brand); }
.note-card p { margin: 0; font-size: 16px; }
.mingus-note { color: var(--text); font-style: italic; }
.team-link { font-weight: 700; text-decoration: none; }
.team-link:hover, .profile-note a:hover { text-decoration: underline; }
.profile-note a { color: var(--brand); font-weight: 600; text-decoration: none; }

/* ---------- Head-to-head ---------- */
.h2h {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.h2h-team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; text-align: center; }
.h2h-team:hover .h2h-name { text-decoration: underline; }
.h2h-name { font-size: 22px; font-weight: 800; }
.h2h-score { font-size: 40px; font-weight: 900; color: var(--muted); line-height: 1; }
.h2h-score.won { color: var(--text); }
.h2h-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.h2h-mid strong { font-size: 26px; }
.h2h-week { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); }
.trend-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.trend-row div { background: var(--surface-2); border-radius: 9px; padding: 8px 10px; }
.trend-row strong { display: block; font-size: 18px; }
.trend-row span { color: var(--muted); font-size: 11px; }
.dvp-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.dvp-row.stacked { grid-template-columns: repeat(5, 1fr); }
.dvp { border-radius: 9px; padding: 8px 10px; background: var(--surface-2); border-top: 3px solid var(--mc, var(--border)); }
.dvp strong { display: block; font-size: 18px; color: var(--mc); }
.dvp span { display: block; font-size: 11px; color: var(--muted); }
.dvp .dvp-pos { font-weight: 800; color: var(--text); font-size: 12px; }
.great { --mc: var(--up); } .good { --mc: #7cc46a; } .meh { --mc: var(--q); } .tough { --mc: var(--down); }
.edge-list { display: flex; flex-direction: column; gap: 8px; }
.edge {
  display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 10px; border-radius: 10px;
  background: var(--surface-2); border-left: 4px solid var(--mc, var(--border));
}
.edge:hover { filter: brightness(1.07); }
.edge-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.edge-name { font-weight: 700; }
.edge-tag { font-size: 12px; font-weight: 700; color: var(--mc); }
.edge-note { font-size: 13px; font-style: italic; }

/* ---------- Team page ---------- */
.team-head {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--tc); border-radius: var(--radius); padding: 22px;
}
.team-head h1 { margin: 0 0 4px; font-size: 30px; }
.team-head p { margin: 0; }
.team-stats { margin-left: auto; display: flex; gap: 12px; }
.team-stats div { background: var(--surface-2); border-radius: 9px; padding: 10px 14px; text-align: center; }
.team-stats strong { display: block; font-size: 22px; }
.team-stats span { color: var(--muted); font-size: 12px; }
.opp-cell { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* ---------- Player database ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 18px; }
.team-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 12px; font-weight: 600;
}
.team-grid a:hover { border-color: var(--brand); }
.filter {
  font: inherit; font-weight: 600; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px;
}

/* ---------- Home ---------- */
.feature {
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; text-decoration: none; color: #fff;
  border-radius: 18px; padding: 30px 20px; position: relative; overflow: hidden;
  background: linear-gradient(110deg, color-mix(in srgb, var(--ta) 85%, #000) 0%, #0b1712 50%, color-mix(in srgb, var(--th) 85%, #000) 100%);
}
.feature:hover .btn { filter: brightness(1.1); }
.feature-eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #9ff0cf; }
.feature-teams { display: flex; align-items: center; gap: 28px; }
.feature-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.feature-side strong { font-size: 26px; font-weight: 900; }
.feature-side span { font-size: 14px; color: #d6e2dc; }
.feature-side .spread.fav { color: #6ff0a8; } .feature-side .spread.dog { color: #ff9b9b; }
.feature-at { font-size: 30px; font-weight: 900; opacity: .6; }
.feature-meta { color: #c9d4ce; font-size: 14px; }
.feature-note { max-width: 620px; font-style: italic; color: #e8efe9; }
.feature .team-badge { box-shadow: 0 0 0 3px rgb(255 255 255 / .85); }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; position: sticky; top: 76px; }
.list-card { padding: 6px 12px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; text-decoration: none; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }
.list-row:hover strong { text-decoration: underline; }
.list-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.list-main .muted { font-size: 12px; }
.side-card h3 { margin-bottom: 8px; }
.side-card .list-row { padding: 8px 0; }
.game-line { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; }
.gl-teams { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.gl-time { font-size: 13px; }
.gl-line { font-size: 13px; font-weight: 600; text-align: right; }
.articles { display: flex; flex-direction: column; gap: 10px; }
.article summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.article summary::-webkit-details-marker { display: none; }
.article summary strong { font-size: 18px; }
.article p { margin: 12px 0 0; }
.article-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--brand); }
.mini-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; margin-bottom: 6px; }
.mini-tabs button { flex: 1; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 800; padding: 5px 0; border-radius: 999px; cursor: pointer; }
.mini-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .2); }
.top5 { list-style: none; margin: 0; padding: 0; }
.top5 a { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); text-decoration: none; }
.top5 li:first-child a { border-top: 0; }
.top5 a:hover strong { text-decoration: underline; }

@media (max-width: 900px) {
  .home-grid, .two-col { grid-template-columns: 1fr; }
  .home-side { position: static; margin-top: 0; }
}
@media (max-width: 600px) {
  .h2h { padding: 16px 8px; gap: 6px; }
  .h2h-name { font-size: 16px; }
  .team-badge.xl { width: 56px; height: 56px; font-size: 16px; border-radius: 14px; }
  .team-logo.xl { width: 56px; height: 56px; }
  .h2h-score { font-size: 30px; }
  .trend-row, .dvp-row, .dvp-row.stacked { grid-template-columns: repeat(2, 1fr); }
  .feature-teams { gap: 14px; }
  .feature-side strong { font-size: 18px; }
  .team-stats { margin-left: 0; }
  .game-line { grid-template-columns: 1fr auto; }
  .gl-time { display: none; }
  .nav a { font-size: 13px; padding: 6px 6px; }
}

.nav .ns { display: none; }
@media (max-width: 760px) {
  .nav .nl { display: none; }
  .nav .ns { display: inline; }
}
/* "Mingus Football" is short enough to keep on phones; the nav scrolls sideways after it. */
@media (max-width: 420px) {
  .header-inner { gap: 12px; }
  .brand { gap: 7px; }
  .brand-mark { width: 30px; height: 30px; font-size: 17px; }
  .brand-name { font-size: 16px; }
}
@media (max-width: 600px) {
  .tile strong { font-size: 17px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.edge-proj { color: var(--text); }
.mchip { display: inline-block; min-width: 42px; text-align: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800;
  color: var(--mc); background: color-mix(in srgb, var(--mc) 15%, transparent); }
.top-legend { margin: -4px 2px 10px; }
.rank-table .opp a { text-decoration: none; }
.rank-table .opp a:hover { text-decoration: underline; }
.head-scoring { margin-top: 10px; }
.head-scoring .scoring { justify-content: flex-end; }
.trend-row { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .head-scoring .scoring { justify-content: flex-start; } }
@media (max-width: 600px) { .trend-row { grid-template-columns: repeat(2, 1fr); } }
.db-table { font-size: 14px; }
.db-table th { font-size: 11px; letter-spacing: .2px; }
.db-table td, .db-table th { padding-left: 7px; padding-right: 7px; }

/* ---------- Analytics: chart builder ---------- */
.cb { --q-tr: var(--up); --q-tl: var(--wr); --q-br: var(--down); --q-bl: var(--muted); }
.cb-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; align-items: end; }
.cb-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; min-width: 0; }
.cb-field select, .cb-field input {
  font: inherit; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; min-width: 0; width: 100%;
}
.cb-axis { display: flex; gap: 6px; align-items: center; }
.cb-swap { flex: none; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; }
.cb-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.cb-weeks { display: flex; gap: 6px; align-items: center; }
.cb-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.chip-btn {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.chip-btn:hover { border-color: var(--brand); }
.chip-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.cb-r { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; align-items: center; margin-top: 14px; }
.cb-rnum { font-size: 44px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.cb-rnum small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; }
.cb-meter { position: relative; height: 10px; border-radius: 999px; margin: 6px 0 4px;
  background: linear-gradient(90deg, var(--down) 0%, color-mix(in srgb, var(--down) 30%, var(--surface-2)) 35%, var(--surface-2) 50%, color-mix(in srgb, var(--up) 30%, var(--surface-2)) 65%, var(--up) 100%); }
.cb-meter i { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--text); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.cb-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 600; }
.cb-verdict { margin: 0; font-size: 15px; }
.cb-verdict strong { display: inline-block; padding: 1px 8px; border-radius: 6px; margin-right: 6px; color: var(--vc); background: color-mix(in srgb, var(--vc) 15%, transparent); }
.cb-warn { margin: 6px 0 0; font-size: 13px; color: var(--q); font-weight: 600; }
.cb-chart { overflow-x: auto; margin: 10px -6px 0; }
.cb-chart svg { display: block; width: 100%; height: auto; font-family: inherit; }
.cb-chart .dot { cursor: pointer; }
.cb-chart .dot:hover .ring, .cb-chart .dot:focus .ring { stroke-width: 4; }
.cb-chart .dot:focus { outline: none; }
.cb-chart .dim { opacity: .14; }
.cb-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.cb-tip { position: fixed; z-index: 20; pointer-events: none; background: var(--text); color: var(--bg); border-radius: 8px; padding: 8px 11px; font-size: 13px; line-height: 1.45; max-width: 260px; font-variant-numeric: tabular-nums; }
.cb-tip b { display: block; font-size: 15px; }
.cb-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.cb-out ol { margin: 0; padding: 0; list-style: none; }
.cb-out li a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); text-decoration: none; }
.cb-out li:first-child a { border-top: 0; }
.cb-out li a:hover span:first-child { text-decoration: underline; }
.cb-out .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-out .up { color: var(--up); } .cb-out .down { color: var(--down); }
.cb-explain summary { cursor: pointer; font-weight: 700; }
.cb-explain p, .cb-explain ul { max-width: 68ch; }
.cb-explain ul { padding-left: 20px; }
.cb-explain li { margin: 4px 0; }
.cb .pos-tab .ns { display: none; }
@media (max-width: 600px) {
  .cb .pos-tab .nl { display: none; }
  .cb .pos-tab .ns { display: inline; }
  .cb-out { grid-template-columns: 1fr; }
  .cb-r { grid-template-columns: 1fr; }
}

/* ---------- Home: injury report dropdown ---------- */
.injury-drop { padding: 0; }
.injury-drop summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.injury-drop summary::-webkit-details-marker { display: none; }
.injury-sum { display: flex; flex-direction: column; gap: 2px; }
.injury-sum strong { font-size: 20px; }
.injury-toggle::after { content: "Show ▾"; font-size: 14px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.injury-drop[open] .injury-toggle::after { content: "Hide ▴"; }
.injury-drop[open] summary { border-bottom: 1px solid var(--border); }
.injury-drop .list-card { padding: 6px 12px; }

/* ---------- Rankings: past weeks ---------- */
.rank-head-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.rank-head-controls .week-select { font-size: 13px; font-weight: 600; }
.rank-head-controls .week-select select { font-size: 15px; padding: 6px 10px; min-width: 0; }
.beat { color: var(--up); font-weight: 700; }
.missed { color: var(--down); font-weight: 700; }

/* ---------- Usage trends ---------- */
.trend-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.movers { list-style: none; margin: 0; padding: 0; }
.movers li a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 44px; column-gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--border); text-decoration: none; }
.movers li:first-child a { border-top: 0; }
.movers li a:hover strong { text-decoration: underline; }
.mv-main { display: flex; flex-direction: column; min-width: 0; }
.mv-main strong { line-height: 1.25; }
.mv-main .muted { font-size: 12px; }
/* label | before | → | after, with the weeks as the first row so each number sits under its weeks */
.mv-grid { display: grid; grid-template-columns: auto 5.5ch auto 5.5ch; column-gap: 6px; row-gap: 1px; align-items: baseline;
  font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); }
.mv-grid b { color: var(--text); }
.mv-wk { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.mv-k { font-size: 12px; text-align: left; padding-right: 4px; }
.mv-arrow { font-size: 12px; }
.mv-d { font-size: 15px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.mv-warn { grid-column: 2 / -1; margin-top: 4px; }
/* Phones: name on its own line, the week grid and change underneath. */
@media (max-width: 480px) {
  .movers li a { grid-template-columns: minmax(0, 1fr) 44px; row-gap: 6px; }
  .movers .headshot { display: none; }
  .mv-main { grid-column: 1 / -1; }
  .mv-grid { justify-self: start; }
  .mv-warn { grid-column: 1 / -1; }
}
.spark { display: block; overflow: visible; }
.spark path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--brand); }
.spark-mid { stroke: var(--border); stroke-dasharray: 2 3; }
.trend-table th button { all: unset; cursor: pointer; }
@media (max-width: 700px) { .trend-lists { grid-template-columns: 1fr; } }
.abbr-tabs .pos-tab .ns { display: none; }
@media (max-width: 600px) {
  .abbr-tabs .pos-tab .nl { display: none; }
  .abbr-tabs .pos-tab .ns { display: inline; }
}
.nav a { white-space: nowrap; }
@media (max-width: 480px) {
  .nav { gap: 0; }
  .nav .caret { display: none; }
}
.mv-warn, .warn { color: var(--q); font-weight: 700; }
.mv-warn { font-size: 12px; }

/* ---------- Position colors for kickers and defenses ---------- */
:root { --k: #6b7280; --dst: #8a6d3b; }
@media (prefers-color-scheme: dark) { :root { --k: #b8c0cc; --dst: #d9b77a; } }
.pos-K { --pc: var(--k); } .pos-DST { --pc: var(--dst); }

/* ---------- Player cells: long names wrap instead of running into the next column ---------- */
.data-table .pcell .headshot, .data-table .pcell .inj { flex-shrink: 0; }
.data-table .pcell a { min-width: 0; }
@media (max-width: 600px) {
  .data-table .pcell { gap: 8px; }
  .data-table .pcell a { white-space: normal; line-height: 1.25; }
}

/* ---------- Header: never wider than the screen ---------- */
@media (max-width: 420px) {
  .header-inner { gap: 8px; }
  .nav { overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 5px; font-size: 13px; }
}

/* ---------- Team schedule on phones ---------- */
.sched-when { display: inline-flex; flex-direction: column; line-height: 1.2; }
.sched-when small { font-size: 12px; }
@media (max-width: 600px) {
  .team-sched .opp-name { display: none; }
  .team-sched td, .team-sched th { padding-left: 6px; padding-right: 6px; }
}

/* ---------- Matchup page after the game ---------- */
.notice.soft { border-left-color: var(--brand); margin-bottom: 14px; }
.box-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .box-grid { grid-template-columns: 1fr; } }
.team-compare .c { text-align: center; }
.team-compare td { font-size: 15px; }
.team-compare td.better { font-weight: 800; color: var(--up); }
.box-tabs { margin-bottom: 4px; }
.box-tabs .pos-tab { font-size: 15px; padding: 8px 12px; }
.box-title { margin: 14px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.box-title .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.box-table td:first-child { width: 40%; }
.box-table a { font-weight: 600; text-decoration: none; }
.box-table a:hover { text-decoration: underline; }

/* Grid children may shrink below their content, so wide tables scroll inside their card instead of widening the page. */
.two-col > *, .grid > *, .box-grid > * { min-width: 0; }

/* "(5th)" league ranks after a stat */
.rank-tag { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
:is(.tile, .trend-row, .team-stats) strong .rank-tag { font-size: 12px; font-weight: 700; color: var(--muted); }
:is(.tile, .trend-row, .team-stats) strong .rank-tag.top { color: var(--brand); }
.rank-tag.top { color: var(--brand); }
.trend-row strong span:not(.rank-tag) { font-size: inherit; }
.trend-row strong .pos-num { color: var(--up); } .trend-row strong .neg-num { color: var(--down); }
.rank-tag.top.bad, :is(.tile, .trend-row, .team-stats) strong .rank-tag.top.bad { color: var(--down); }
.data-table th.has-help { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.log-help { margin: 10px 2px 0; line-height: 1.5; }

/* ---------- Player page: stat tiles link to the database ---------- */
.tile-link { display: block; position: relative; text-decoration: none; color: inherit; border: 1px solid transparent; transition: border-color .15s; }
.tile-link::after { content: "›"; position: absolute; top: 6px; right: 10px; font-size: 18px; font-weight: 700; color: var(--muted); }
.tile-link:hover, .tile-link:focus-visible { border-color: var(--brand); }
.data-table tr.hl-row td { background: color-mix(in srgb, var(--brand) 16%, transparent); }
.data-table tr.hl-row td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
/* Database: the player column stays put while the stats scroll sideways; the sorted column is tinted. */
.db-table th:first-child, .db-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.db-table th:first-child { background: var(--surface-2); }
.db-table tr.hl-row td:first-child { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); }
.db-table th.sorted { color: var(--text); }
.db-table td.sorted { font-weight: 700; background: color-mix(in srgb, var(--brand) 8%, transparent); }
@media (max-width: 600px) {
  .db-table .pcell .headshot, .db-table .pmeta { display: none; }
  .db-table td:first-child { max-width: 140px; white-space: normal; }
}
/* ---------- Player page: this week ---------- */
.week-card { display: flex; flex-direction: column; gap: 14px; }
.wk-top { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.wk-game { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wk-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); }
.wk-opp { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; text-decoration: none; }
.wk-opp:hover { text-decoration: underline; }
.wk-pts { display: flex; gap: 8px; }
.wk-pts > div { display: flex; flex-direction: column; align-items: flex-end; padding: 6px 14px; border-radius: 10px; background: var(--surface-2); min-width: 86px; }
.wk-pts span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.wk-pts strong { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wk-pts .beat strong { color: var(--up); }
.wk-pts .missed strong { color: var(--down); }
.wk-pts .pending strong { color: var(--muted); }
.wk-table td, .wk-table th { white-space: nowrap; }
.wk-table .wk-proj td { color: var(--muted); }
.wk-table .wk-proj td.hl { color: var(--text); }
.wk-table td.beat { color: var(--up); }
.wk-table td.missed { color: var(--down); }
.wk-bye { margin: 0; font-size: 18px; font-weight: 700; }
.wk-lines { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 480px) {
  .wk-opp { font-size: 19px; }
  .wk-pts { width: 100%; }
  .wk-pts > div { flex: 1; align-items: flex-start; }
  .wk-lines { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .wk-lines .tile { padding: 8px; }
  .wk-table { font-size: 13px; }
  .wk-table th, .wk-table td { padding: 7px 6px; }
  .wk-table th { font-size: 10px; letter-spacing: 0; }
}
/* Narrow phones: tighter header so all five links fit next to the logo. */
@media (max-width: 420px) {
  .header-inner { gap: 8px; padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .brand-mark { width: 30px; height: 30px; font-size: 17px; }
  .nav a { font-size: 12.5px; padding: 6px 5px; }
}
@media (max-width: 370px) {
  .nav a { font-size: 12px; padding: 6px 4px; letter-spacing: -.1px; }
}
@media (max-width: 340px) { .brand { display: none; } }

/* ---------- Team page: week preview and position splits ---------- */
.pv-matchup { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 2px; }
.pv-team { display: flex; align-items: center; gap: 10px; font-size: 20px; text-decoration: none; }
a.pv-team:hover strong { text-decoration: underline; }
.pv-at { color: var(--muted); font-weight: 800; }
.pv-when { text-align: center; margin: 0 0 12px; }
.pv-lines { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pv-plans { margin-top: 16px; gap: 20px; }
.pv-side { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.plan-head { margin: 12px 0 4px; font-size: 14px; }
.plan-head.ok { color: var(--up); } .plan-head.bad { color: var(--down); }
.plan { margin: 0; padding: 0; list-style: none; }
.plan li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.35; }
.plan li:first-child { border-top: 0; }
.plan li .pos { flex: none; }
.helped { display: flex; flex-wrap: wrap; gap: 6px; }
.helped-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; }
.helped-chip:hover { border-color: var(--brand); }
.split-tabs { margin: 8px 0 10px; width: fit-content; }
.split-rows { display: flex; flex-direction: column; }
.split-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 52px; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); }
.split-row:first-child { border-top: 0; }
.split-row strong { font-variant-numeric: tabular-nums; text-align: right; }
.split-row strong small { font-weight: 500; color: var(--muted); margin-left: 1px; }
.split-row .mchip { justify-self: end; }
@media (max-width: 600px) {
  .pv-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-team { font-size: 17px; }
}

/* Phones: six header links don't all fit, so the links scroll sideways (the current page is scrolled into view). */
@media (max-width: 480px) {
  .nav { overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .header-week { display: none; }
}

/* ---------- Teams page ---------- */
.divisions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.div-card { padding: 12px 14px; }
.div-card h3 { margin-bottom: 4px; }
.div-team { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); text-decoration: none; }
.div-team:first-of-type { border-top: 0; }
.div-team:hover strong { text-decoration: underline; }
.div-name { display: flex; flex-direction: column; min-width: 0; }
.div-rec { font-weight: 800; font-variant-numeric: tabular-nums; }
.pb-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 10px 0 12px; }
.pb-table td { white-space: nowrap; }
.mchip.mini { min-width: 34px; padding: 1px 5px; font-size: 10.5px; margin-left: 4px; }
@media (max-width: 1000px) { .divisions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .divisions { grid-template-columns: 1fr; } }
.mchip.neutral { --mc: var(--muted); }
.has-help { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.box-head { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.box-table td .pos { margin-left: 4px; }
.box-table td.l { white-space: nowrap; }
.box-table th:first-child, .box-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.box-table th:first-child { background: var(--surface-2); }
@media (max-width: 600px) { .box-table td .pos, .box-table td .inj { display: none; } }
.split-key { margin: -2px 0 4px; font-size: 12px; color: var(--muted); text-align: right; }
/* Teams table: plain numbers; the sorted column and the rank are colored by matchup. */
.pb-table .pb-rk { width: 34px; font-weight: 800; color: var(--mc, var(--muted)); font-variant-numeric: tabular-nums; }
.pb-table td.sorted { font-weight: 800; color: var(--mc, var(--text)); }
.pb-table th:nth-child(-n+2), .pb-table td:nth-child(-n+2) { position: sticky; z-index: 1; background: var(--surface); }
.pb-table th:nth-child(-n+2) { background: var(--surface-2); }
.pb-table th:first-child, .pb-table td:first-child { left: 0; width: 38px; min-width: 38px; max-width: 38px; }
.pb-table th:nth-child(2), .pb-table td:nth-child(2) { left: 38px; }
.pb-table { font-size: 14px; }
.pb-table th { font-size: 11px; letter-spacing: .2px; }
.pv-cta { display: block; text-align: center; margin-top: 12px; }

/* ---------- Start/Sit ---------- */
.ss-pick { display: flex; flex-direction: column; gap: 8px; }
.ss-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.ss-search { position: relative; }
.ss-search .search { width: 100%; }
.ss-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .14); padding: 4px; }
.ss-hit { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; color: var(--text); font: inherit; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.ss-hit:hover, .ss-hit:focus-visible { background: var(--surface-2); }
.ss-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ss-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-weight: 600; font-size: 14px; }
.ss-chip button { border: 0; background: var(--surface-2); color: var(--muted); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; }
.ss-chip button:hover { color: var(--down); }
.ss-verdict { display: flex; gap: 16px; align-items: center; margin-top: 14px; border-left: 6px solid var(--vc); }
.ss-verdict.clear { --vc: var(--up); } .ss-verdict.lean { --vc: #7cc46a; } .ss-verdict.toss { --vc: var(--q); }
.ss-verdict h2 { margin: 0 0 4px; font-size: 26px; }
.ss-verdict p { margin: 0 0 4px; }
.ss-v-label { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; color: var(--vc); }
.ss-wrap { margin-top: 14px; }
.ss-table th.l { white-space: nowrap; font-size: 12px; position: sticky; left: 0; z-index: 1; background: var(--surface-2); }
.ss-table tbody th.l { background: var(--surface); color: var(--text); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.ss-table td { text-align: center; position: relative; min-width: 120px; }
.ss-table td small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.ss-table td.ss-win { background: color-mix(in srgb, var(--up) 10%, transparent); font-weight: 800; }
.ss-check { position: absolute; top: 4px; right: 6px; color: var(--up); font-size: 12px; font-weight: 900; }
.ss-table th.ss-col { text-align: center; text-transform: none; letter-spacing: 0; vertical-align: top; padding: 10px 8px; }
.ss-col a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text); font-size: 15px; }
.ss-col > span { display: block; margin-top: 3px; font-weight: 600; }
.ss-wins { font-size: 11px; color: var(--up); font-weight: 800; }
.ss-reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.ss-why { margin: 0 0 8px; padding: 0; list-style: none; }
.ss-why li { padding: 5px 0 5px 18px; position: relative; font-size: 14px; border-top: 1px solid var(--border); }
.ss-why li:first-child { border-top: 0; }
.ss-why li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.ss-why li.good::before { background: var(--up); } .ss-why li.bad::before { background: var(--down); } .ss-why li.warn::before { background: var(--q); }
.ss-method { margin-top: 14px; max-width: 75ch; }
@media (max-width: 600px) {
  .ss-verdict { align-items: flex-start; }
  .ss-verdict h2 { font-size: 21px; }
  .ss-table td { min-width: 0; padding-left: 4px; padding-right: 4px; font-size: 14px; }
  .ss-table tbody th.l { font-size: 12px; white-space: normal; width: 84px; min-width: 84px; padding-left: 6px; padding-right: 4px; }
  .ss-table th.ss-col { min-width: 118px; padding: 8px 4px; }
  .ss-check { right: 3px; }
}

/* ---------- Player page: Next Gen Stats ---------- */
.ngs-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 28px; }
.ngs-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.ngs-row > span:first-child small { font-size: 11.5px; color: var(--muted); line-height: 1.3; margin-top: 1px; }
.ngs-row > span:first-child a { color: var(--text); text-decoration: underline dotted color-mix(in srgb, var(--muted) 60%, transparent); text-underline-offset: 3px; }
.ngs-row > span:first-child a:hover { color: var(--brand); }
a.mchip { text-decoration: none; }

/* ---------- Next Gen Stats leaderboards ---------- */
.nav-menu.wide { min-width: 260px; }
.nav-menu.wide strong { width: auto; white-space: nowrap; }
.ngs-about { margin: 14px 0 10px; }
.ngs-about h2 { margin: 0 0 4px; font-size: 20px; }
.ngs-about p { margin: 0 0 4px; }
.ngs-table th button { display: inline-block; white-space: normal; min-width: 64px; }
.nav-menu.right { left: auto; right: 0; }
.ngs-pick { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-top: 12px; }
.ngs-pick .cb-field { min-width: 220px; }
.ngs-list { display: none; list-style: none; margin: 0; padding: 0; }
.ngs-list li { border-bottom: 1px solid var(--border); }
.ngs-list li a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 4px; color: var(--text); text-decoration: none; }
.ngs-list li.hl { background: color-mix(in srgb, var(--brand) 16%, transparent); box-shadow: inset 4px 0 0 var(--brand); }
.nl-rk { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--mc, var(--muted)); text-align: center; }
.nl-name { display: flex; flex-direction: column; min-width: 0; }
.nl-name strong { font-size: 15px; }
.nl-name small { color: var(--muted); font-size: 12px; }
.nl-val { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.nl-val small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 1px; }
@media (max-width: 600px) {
  .ngs-list { display: block; }
  .ngs-wide { display: none; }
  .ngs-pick .cb-field { min-width: 0; flex: 1 1 100%; }
}
