/* SportsBadger: site styles.
   The site's own colors stay quiet (chalk and turf) so team colors carry the identity. */

:root {
  --chalk: #EEF2EE;
  --surface: #FFFFFF;
  --ink: #142019;
  --muted: #59695F;
  --line: #CAD4CC;
  --turf: #24543A;
  --win: #24543A;
  --loss: #9B2C2C;
  --stripe-gap: 2px;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chalk: #0E1511; --surface: #151E19; --ink: #E4EBE6; --muted: #94A49A;
    --line: #29362E; --turf: #82C99D; --win: #82C99D; --loss: #F08A8A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --chalk: #0E1511; --surface: #151E19; --ink: #E4EBE6; --muted: #94A49A;
  --line: #29362E; --turf: #82C99D; --win: #82C99D; --loss: #F08A8A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font-body);
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 3px solid var(--turf); outline-offset: 2px; border-radius: 2px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- site header ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 56px; }
.wordmark {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font: 700 1.5rem/1 var(--font-display); letter-spacing: .01em;
}
.wordmark .badge { height: 26px; }
.wordmark.has-logo { padding-block: 6px; }
.wordmark .logo { display: block; height: 56px; width: auto; color: var(--ink); }
@media (max-width: 520px) { .wordmark .logo { height: 46px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-nav { display: flex; gap: 20px; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--turf); }

/* ---------- the badge: a team's colors as stripes ---------- */
.badge {
  display: inline-flex; gap: var(--stripe-gap); height: 40px; flex: none;
}
.badge i { display: block; width: 7px; border-radius: 1px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent); }
.badge i:first-child { width: 14px; }
.badge.sm { height: 22px; }
.badge.sm i { width: 4px; } .badge.sm i:first-child { width: 8px; }

/* ---------- page heading ---------- */
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- standings ---------- */
.conferences { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.conference > h2 { font-size: 2rem; padding-bottom: 8px; border-bottom: 3px solid var(--ink); }
.division { margin-top: 24px; }
.division h3 { font-size: 1.15rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.standings { width: 100%; border-collapse: collapse; }
.standings th {
  font: 600 .8rem/1 var(--font-body); color: var(--muted); text-align: right; padding: 6px 4px;
}
.standings th:first-child { text-align: left; }
.standings td { padding: 6px 4px; border-top: 1px solid var(--line); text-align: right; }
.standings td.team { text-align: left; width: 100%; }
.team-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.team-link .name { font: 600 1.25rem/1.1 var(--font-display); }
.team-link:hover .name { text-decoration: underline; text-underline-offset: 3px; }
.standings .wl { font: 700 1.25rem/1 var(--font-display); white-space: nowrap; }
.standings .diff { color: var(--muted); min-width: 3.2em; }
.pos { color: var(--win); } .neg { color: var(--loss); }

/* ---------- team header band ---------- */
.team-band { background: var(--band-bg); color: var(--band-fg); position: relative; overflow: hidden; }
.team-band .wrap { display: flex; gap: 28px; align-items: stretch; padding-block: 36px 32px; }
.team-band .badge { height: auto; min-height: 120px; }
.team-band .badge i { width: 12px; } .team-band .badge i:first-child { width: 12px; }
/* clean stripes on the band: square corners, no halo. A stripe that nearly
   matches the band color gets one crisp inset hairline so it doesn't vanish. */
.team-band .badge { gap: 3px; }
.team-band .badge i { border-radius: 0; box-shadow: none; }
.team-band .badge i.low { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--band-fg) 40%, transparent); }
.team-band .meta { color: color-mix(in srgb, var(--band-fg) 78%, var(--band-bg)); font-weight: 500; margin: 0; }
.team-band h1 { font-size: clamp(3rem, 9vw, 6.5rem); letter-spacing: -.01em; margin: 4px 0 10px; }
.team-band .record { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }
.team-band .record strong { font: 700 2.25rem/1 var(--font-display); }
.team-band select {
  font: inherit; color: var(--band-fg); background: transparent;
  border: 1px solid color-mix(in srgb, var(--band-fg) 45%, transparent); border-radius: 4px; padding: 4px 8px;
}
.team-band select option { color: #142019; }

/* animated hex-circuit banner (assets/sb-banner.js) */
.team-band .band-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.team-band.has-canvas .wrap { position: relative; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .team-band.has-canvas .wrap { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
  .team-band.has-canvas.is-revealed .wrap { opacity: 1; transform: none; }
}

/* ---------- team page sections ---------- */
.team-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; padding-block: 40px 56px; }
.team-body h2 { font-size: 1.75rem; margin-bottom: 12px; }
.section + .section { margin-top: 40px; }

.results { width: 100%; border-collapse: collapse; }
.results th { font: 600 .8rem/1 var(--font-body); color: var(--muted); text-align: left; padding: 6px 6px 6px 0; }
.results td { padding: 8px 6px 8px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.results .wk { color: var(--muted); width: 2.5em; }
.results .opp { display: flex; align-items: center; gap: 10px; }
.results .opp a { text-decoration: none; font-weight: 600; }
.results .opp a:hover { text-decoration: underline; }
.results .ha { color: var(--muted); width: 1.6em; display: inline-block; }
.results .res { text-align: right; white-space: nowrap; font: 600 1.1rem/1 var(--font-display); }
.results .res b { display: inline-block; width: 1.1em; }
.results .W b { color: var(--win); } .results .L b { color: var(--loss); }
.results .upcoming { color: var(--muted); font: 400 .95rem/1 var(--font-body); }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.stat { padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); }
.stat dt { color: var(--muted); font-size: .9rem; }
.stat dd { margin: 2px 0 0; font: 700 1.6rem/1.1 var(--font-display); }

.leaders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.leader h3 { font: 600 1rem/1.2 var(--font-body); color: var(--muted); margin-bottom: 6px; }
.leader ol { list-style: none; margin: 0; padding: 0; }
.leader li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.leader li:first-child .who { font-weight: 600; }
.leader .val { font: 700 1.3rem/1 var(--font-display); text-align: right; }
.leader .sub { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; }
.leader .none { color: var(--muted); padding: 6px 0; border-top: 1px solid var(--line); }

/* ---------- states + footer ---------- */
.notice { padding: 48px 0; color: var(--muted); }
.notice strong { color: var(--ink); display: block; font: 700 1.5rem/1.2 var(--font-display); margin-bottom: 4px; }
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 20px 0 32px; }
.site-foot p { margin: 4px 0; }
.site-foot a { color: var(--ink); }

@media (max-width: 860px) {
  .conferences, .team-body { grid-template-columns: 1fr; gap: 32px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .leaders { grid-template-columns: 1fr; }
  .team-band .wrap { gap: 18px; }
  .team-band .badge { min-height: 96px; }
  .team-link .name { font-size: 1.1rem; }
  .standings .diff { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .team-band .badge i { animation: stripe-in .5s cubic-bezier(.2,.7,.2,1) both; transform-origin: top; }
  .team-band .badge i:nth-child(2) { animation-delay: .06s; }
  .team-band .badge i:nth-child(3) { animation-delay: .12s; }
  .team-band .badge i:nth-child(4) { animation-delay: .18s; }
}
@keyframes stripe-in { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.sub-inline { color: var(--muted); font-size: .85rem; font-weight: 400; margin-left: 4px; }
/* keep names aligned when teams have 2, 3 or 4 colors */
.team-link .badge { width: 41px; }
.results .opp .badge.sm { width: 22px; }

/* ---------- game page (nfl/game.html) ---------- */
.game-head { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; }
.game-head::before {               /* away color | home color strip along the top */
  content: ""; display: block; height: 6px;
  background: linear-gradient(90deg, var(--away) 50%, var(--home) 50%);
}
.game-head .wrap { padding-block: 16px 24px; }
.gh-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; margin-bottom: 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; min-height: 32px; }
.back:hover { text-decoration: underline; }
.gh-stage { color: var(--muted); font-weight: 500; }
.gh-stage b { color: var(--ink); font: 700 1.05rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.gh-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 48px; align-items: center; }
.gh-teams { display: grid; gap: 12px; }
.gh-team { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.gh-team .badge { height: 52px; width: 33px; }
.gh-name { display: flex; flex-direction: column; min-width: 0; }
.gh-name a { font: 700 clamp(1.6rem, 4.5vw, 2.6rem)/1 var(--font-display); text-decoration: none; }
.gh-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gh-name span { color: var(--muted); font-size: .9rem; }
.gh-score { font: 700 clamp(2.6rem, 8vw, 4.5rem)/1 var(--font-display); min-width: 1.4em; text-align: right; }
.gh-team.lost .gh-name a, .gh-team.lost .gh-score { color: var(--muted); font-weight: 600; }
.gh-side { display: grid; gap: 12px; justify-items: end; }
.linescore { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.linescore th, .linescore td { padding: 4px 0; width: 2.4em; text-align: center; }
.linescore thead th { font: 600 .8rem/1 var(--font-body); color: var(--muted); }
.linescore tbody th { text-align: left; width: 3em; font-weight: 600; }
.linescore tbody tr + tr > * { border-top: 1px solid var(--line); }
.linescore .tot { font-weight: 700; }
.linescore tr.won th, .linescore tr.won .tot { font-weight: 700; }
.gh-facts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 14px; color: var(--muted); font-size: .9rem; max-width: 34em; text-align: right; }

.game-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 48px; padding-block: 32px 56px; align-items: start; }
.game-body h2 { font-size: 1.75rem; margin-bottom: 12px; }
.game-body .h-next { margin-top: 32px; }
.tabs { display: none; }
.pane-box { grid-column: 1 / -1; }

.scoring, .scoring ol { list-style: none; margin: 0; padding: 0; }
.scoring { border-top: 1px solid var(--line); }
.sq h3 { font: 600 .8rem/1 var(--font-body); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 10px 0 4px; }
.sp { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: start; }
.sp-bar { align-self: stretch; border-radius: 1px; }
.sp p { margin: 0; }
.sp-head { font-size: .95rem; }
.sp-desc { color: var(--muted); font-size: .9rem; }
.sp-try { white-space: nowrap; }
.sp-score { font: 700 1.25rem/1.2 var(--font-display); white-space: nowrap; }

.g-leaders { border-top: 1px solid var(--line); }
.gl { padding: 10px 0; border-bottom: 1px solid var(--line); }
.gl h3 { font: 600 .8rem/1 var(--font-body); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.gl p { margin: 2px 0; display: grid; grid-template-columns: 3em minmax(0, 1fr); }

.compare-key { display: flex; gap: 16px; font-weight: 600; font-size: .9rem; margin: -4px 0 10px; }
.compare-key span { display: inline-flex; align-items: center; gap: 6px; }
.compare-key i { width: 12px; height: 12px; border-radius: 2px; display: block; }
.compare { margin: 0; border-top: 1px solid var(--line); }
.cmp { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cmp dt { grid-column: 2; grid-row: 1; color: var(--muted); font-size: .9rem; text-align: center; }
.cmp dd { margin: 0; grid-row: 1; font: 700 1.2rem/1 var(--font-display); }
.cmp dd.a { grid-column: 1; } .cmp dd.h { grid-column: 3; text-align: right; }
.cmp-bar { grid-column: 1 / -1; display: flex; gap: 2px; height: 6px; }
.cmp-bar i { display: block; border-radius: 1px; } .cmp-bar i:last-child { flex: 1; }
.fine { color: var(--muted); font-size: .85rem; margin: 10px 0 0; }

.box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.box-head h2 { margin: 0; }
.box-toggle { display: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.box-toggle button {
  font: 700 .95rem/1 var(--font-body); min-width: 60px; min-height: 44px; border: 0; cursor: pointer;
  background: var(--surface); color: var(--ink);
}
.box-toggle button[aria-pressed="true"] { background: var(--chip); color: var(--chip-fg); }   /* the team's own color, readable text */
.box-teams { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; }
.box-name { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; margin: 12px 0 4px; }
.box-chip { width: 6px; height: 20px; border-radius: 1px; display: block; }
.box-scroll { overflow-x: auto; margin-top: 12px; }
.box { width: 100%; border-collapse: collapse; font-size: .95rem; }
.box caption { text-align: left; font: 600 .8rem/1 var(--font-body); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding-bottom: 6px; }
.box th, .box td { padding: 6px 0 6px 10px; text-align: right; white-space: nowrap; border-top: 1px solid var(--line); }
.box thead th { font: 600 .75rem/1 var(--font-body); color: var(--muted); border-top: 0; padding-bottom: 4px; }
.box tbody th { text-align: left; font-weight: 600; padding-left: 0; width: 100%; }
.box .pos { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: 6px; }

@media (max-width: 860px) {
  .gh-main { grid-template-columns: 1fr; }
  .gh-side { justify-items: stretch; }
  .linescore { width: 100%; }
  .gh-facts { justify-content: flex-start; text-align: left; max-width: none; }
  .game-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; }
  /* phones and tablets: one section at a time */
  .tabs {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px;
    background: color-mix(in srgb, var(--line) 55%, var(--chalk)); border-radius: 8px; margin-bottom: 20px;
  }
  .tabs button {
    font: 600 .95rem/1.1 var(--font-body); min-height: 44px; border: 0; border-radius: 6px; cursor: pointer;
    background: transparent; color: var(--muted);
  }
  .tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
  .game-body .pane { display: none; }
  .game-body[data-tab="summary"] .pane-summary,
  .game-body[data-tab="stats"] .pane-stats,
  .game-body[data-tab="box"] .pane-box { display: block; }
  .box-toggle { display: flex; }
  .box-teams { grid-template-columns: minmax(0, 1fr); }
  .box-name { display: none; }
  .game-body[data-box="away"] .box-team[data-side="home"],
  .game-body[data-box="home"] .box-team[data-side="away"] { display: none; }
}
@media (max-width: 520px) {
  .gh-team .badge { height: 44px; }
  .box th, .box td { padding-left: 8px; }
}
/* team page: scores link to the game page */
.results .game-link { text-decoration: none; display: inline-block; padding: 6px 0 6px 8px; margin: -6px 0; }
.results .game-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- game page: win probability, biggest plays, injuries ---------- */
.h-sub { font: 600 .8rem/1 var(--font-body); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin: 18px 0 6px; }
.wp { margin: 0; position: relative; }
.wp-chart { width: 100%; min-height: 190px; touch-action: pan-y; }
.wp-chart svg { display: block; overflow: visible; }
.wp-grid { stroke: var(--line); stroke-width: 1; }
.wp-mid { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.wp-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.wp-lab { font: 700 .85rem/1 var(--font-body); fill: var(--ink); }
.wp-axis { font: 500 .75rem/1 var(--font-body); fill: var(--muted); }
.wp-mark circle { fill: var(--ink); stroke: var(--chalk); stroke-width: 2; }
.wp-mark text { font: 700 .7rem/1 var(--font-body); fill: var(--chalk); text-anchor: middle; }
.wp-hover line { stroke: var(--muted); stroke-width: 1; }
.wp-hover circle { fill: var(--ink); stroke: var(--chalk); stroke-width: 2; }
.wp-hit { cursor: crosshair; }
.wp-tip {
  position: absolute; z-index: 2; max-width: min(320px, 100%); pointer-events: none;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; font-size: .85rem; box-shadow: 0 4px 14px rgb(0 0 0 / .12);
}
.wp-tip span { display: block; color: var(--muted); }

.big-plays { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.big-plays li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.big-plays p { margin: 0; }
.bp-num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--chalk); font: 700 .75rem/1 var(--font-body); margin-top: 1px;
}
.bp-head { font-size: .95rem; }

.game-upcoming { padding-block: 24px 56px; }
.game-upcoming h2 { font-size: 1.75rem; margin-bottom: 12px; }
.notice-inline { color: var(--muted); margin: 0 0 28px; }
.notice-inline strong { color: var(--ink); display: block; font: 700 1.5rem/1.2 var(--font-display); margin-bottom: 2px; }
.inj-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
.inj-team h3 { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; margin-bottom: 6px; }
.inj-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.inj-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.inj-who { font-weight: 600; }
.inj-who .pos { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: 4px; }
.inj-status { font-weight: 600; text-align: right; }
.inj-out { font-weight: 700; }
.inj-practice { font-weight: 400; color: var(--muted); font-size: .85rem; }
.inj-what { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; }
.inj-more { margin-top: 8px; }
.inj-more summary, .inj-final summary { cursor: pointer; color: var(--muted); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.inj-final { margin-top: 32px; }
.inj-final summary { list-style: none; color: var(--ink); gap: 10px; }
.inj-final summary::-webkit-details-marker { display: none; }
.inj-final summary::after { content: "Show"; font: 600 .85rem/1 var(--font-body); color: var(--muted); }
.inj-final[open] summary::after { content: "Hide"; }
.inj-final summary h2 { margin: 0; }
.inj-final .inj-teams { margin-top: 8px; grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) {
  .inj-teams { grid-template-columns: minmax(0, 1fr); }
}
.linescore abbr { text-decoration: none; }
.wp-lead { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; }
.wp-mark circle.wp-dot { fill: var(--ink); stroke: var(--chalk); stroke-width: 2; }
/* biggest plays: hovering a number, its spot on the line, or its list row lights up all three */
.wp-mark { cursor: pointer; }
.wp-lead, .wp-dot { pointer-events: none; }
.wp-mark .wp-num circle, .wp-mark .wp-dot, .wp-mark .wp-lead { transition: opacity .12s; }
.wp.has-active .wp-mark:not(.active) { opacity: .3; }
.wp-mark.active .wp-num circle { fill: var(--chalk); stroke: var(--ink); stroke-width: 2.5; }
.wp-mark.active .wp-num text { fill: var(--ink); }
.wp-mark.active .wp-dot { r: 6; }
.wp-mark.active .wp-lead { stroke: var(--ink); stroke-dasharray: none; stroke-width: 1.5; }
.wp-tip.is-big { border: 2px solid var(--ink); }
.wp-tip .tip-big {
  display: flex; align-items: center; gap: 6px; color: var(--ink); margin-bottom: 3px;
  font: 700 .72rem/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase;
}
.wp-tip .tip-big i {
  font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--chalk); font-size: .7rem;
}
.big-plays li { cursor: default; border-radius: 4px; transition: background .12s; }
.big-plays li:focus-visible { outline: 3px solid var(--turf); outline-offset: 2px; }
.big-plays li.active { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.big-plays li.active .bp-num { background: var(--chalk); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.big-plays li { padding-inline: 6px; margin-inline: -6px; }

/* =====================================================================
   Teams & Players, Player Card, Compare, Scores (added 2026-11-01)
   ===================================================================== */
:root { --offense: #2459A6; --defense: #A64A17; --rank-ink: #142019; --warn: #8A5A00; --warn-bg: #FFF1D6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --offense: #7FA8E8; --defense: #E59A6E; --rank-ink: #E4EBE6; --warn: #FFD27A; --warn-bg: #3A2D10; }
}
:root[data-theme="dark"] { --offense: #7FA8E8; --defense: #E59A6E; --rank-ink: #E4EBE6; --warn: #FFD27A; --warn-bg: #3A2D10; }

/* ---------- NFL menu (second header row, added by sb.js) ---------- */
.sub-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.sub-nav .wrap { display: flex; gap: 6px 26px; overflow-x: auto; scrollbar-width: none; }
.sub-nav .wrap::-webkit-scrollbar { display: none; }
.sub-nav a {
  flex: none; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap;
  padding: 12px 0 10px; border-bottom: 3px solid transparent; min-height: 44px; display: flex; align-items: center;
}
.sub-nav a:hover { color: var(--ink); }
.sub-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--turf); }

/* ---------- small shared pieces ---------- */
.badge.xs { height: 14px; vertical-align: -2px; }
.badge.xs i { width: 3px; } .badge.xs i:first-child { width: 6px; }
.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--av-bg); color: var(--av-fg); font: 700 1rem/1 var(--font-display); letter-spacing: .02em;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--av-ring);
}
.avatar.sm { width: 30px; height: 30px; font-size: .8rem; box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--av-ring); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.6rem; box-shadow: 0 0 0 3px var(--band-bg, var(--surface)), 0 0 0 6px var(--av-ring); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button {
  font: 600 .9rem/1 var(--font-body); border: 0; background: transparent; color: var(--muted);
  min-height: 38px; padding: 0 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--chalk); }
.seg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chips button {
  font: 600 .85rem/1 var(--font-body); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; min-height: 34px; padding: 0 12px; cursor: pointer;
}
.chips button small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.chips button[aria-pressed="true"] small { color: inherit; opacity: .75; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
  font: 600 .82rem/1.1 var(--font-body); background: color-mix(in srgb, var(--band-fg, var(--ink)) 14%, transparent);
}
.pill.strong { background: var(--band-fg, var(--ink)); color: var(--band-bg, var(--chalk)); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.inj { color: var(--loss); font-weight: 600; }

/* ---------- Teams & Players: header + toolbar ---------- */
.ex-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; padding: 20px 0 12px; }
.ex-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.ex-head p { margin: 4px 0 0; color: var(--muted); }
.ex-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; }
.ex-field { display: grid; gap: 4px; font: 600 .78rem/1 var(--font-body); color: var(--muted); }
.ex-field select, .ex-find input, .pc-controls select {
  font: 500 .95rem/1 var(--font-body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; min-height: 38px; padding: 0 10px;
}
.ex-find { position: relative; }
.ex-find input { width: 240px; padding-left: 12px; }
.find-list, .pick-list { list-style: none; margin: 0; padding: 4px; }
.find-list {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 320px; max-height: 360px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / .14);
}
.find-list li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; cursor: pointer; }
.find-list li.on, .find-list li:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.find-list li span { display: grid; } .find-list small { color: var(--muted); }
.find-list .none { color: var(--muted); cursor: default; }

/* ---------- summary strip ---------- */
.kpis { display: flex; align-items: stretch; gap: 14px; padding-bottom: 14px; }
.kpi-title { font-size: 1.35rem; align-self: center; min-width: 8ch; max-width: 14ch; }
.kpi-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; flex: 1; }
.kpi {
  flex: 0 0 auto; min-width: 150px; display: grid; gap: 1px; text-align: left; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}
button.kpi { cursor: pointer; } button.kpi:hover { border-color: var(--ink); }
.kpi-v { font: 700 1.6rem/1 var(--font-display); }
.kpi-l { font: 600 .72rem/1.2 var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kpi-s { font-size: .82rem; color: var(--muted); white-space: nowrap; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }

/* ---------- the tree (desktop) ---------- */
.tree-wrap { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tree-vp {
  height: max(520px, calc(100vh - 150px)); overflow: hidden; position: relative; cursor: grab; touch-action: none;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 0) 0 0 / 22px 22px,
    var(--chalk);
}
.tree-vp:active { cursor: grabbing; }
.tree-vp:focus-visible { outline: 3px solid var(--turf); outline-offset: -3px; }
.tree-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.tree-links { position: absolute; left: 0; top: 0; overflow: visible; }
.lk { fill: none; stroke: color-mix(in srgb, var(--ink) 35%, transparent); stroke-width: 1.5; }
.lk-offense { stroke: var(--offense); } .lk-defense { stroke: var(--defense); }
.lk.hl { stroke: var(--turf); stroke-width: 3; }
.tree-nodes { position: absolute; left: 0; top: 0; }
.nd {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 10px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .06); cursor: pointer; user-select: none;
  transition: transform .32s cubic-bezier(.2,.7,.2,1), opacity .25s, box-shadow .15s, border-color .15s;
}
@media (prefers-reduced-motion: reduce) { .nd { transition: none; } }
.nd:hover { box-shadow: 0 4px 14px rgb(0 0 0 / .1); }
.nd:focus-visible { outline: 3px solid var(--turf); outline-offset: 2px; }
.nd.sel { box-shadow: 0 0 0 2px var(--ink), 0 6px 18px rgb(0 0 0 / .12); }
.nd.hl { box-shadow: 0 0 0 3px var(--turf), 0 6px 18px rgb(0 0 0 / .14); }
.nd-main { display: grid; min-width: 0; flex: 1; gap: 2px; }
.nd-title { font: 700 1.12rem/1.05 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nd-sub { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nd-sub b { color: var(--ink); }
.nd-root, .nd-conf, .nd-div { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.nd-root { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.nd-root .nd-title { font-size: 1.6rem; } .nd-root .nd-sub { color: color-mix(in srgb, var(--chalk) 75%, transparent); }
.nd-conf .nd-title { font-size: 1.5rem; }
.nd-team { border-left-color: var(--team); }
.nd-team .badge { height: 40px; width: 31px; }
.nd-btns { display: grid; gap: 4px; }
.nd-cmp, .nd-go {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 700 .95rem/1 var(--font-body);
  cursor: pointer; text-decoration: none;
}
.nd-cmp:hover, .nd-go:hover { color: var(--ink); border-color: var(--ink); }
.nd-cmp[aria-pressed="true"] { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.nd-btns .nd-cmp, .nd-btns .nd-go { width: 26px; height: 26px; font-size: .85rem; }
.nd-unit.u-offense { border-left-color: var(--offense); } .nd-unit.u-defense { border-left-color: var(--defense); }
.nd-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; color: #fff; }
.u-offense .nd-ico { background: var(--offense); } .u-defense .nd-ico { background: var(--defense); }
.nd-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.u-offense .nd-ico svg, .u-defense .nd-ico svg { stroke: #fff; }
:root[data-theme="dark"] .nd-ico svg { stroke: #142019; }
.nd-posb {
  flex: none; min-width: 38px; height: 30px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--team) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--team) 40%, var(--line));
  font: 700 1rem/1 var(--font-display);
}
.nd-pos { border-left-color: var(--team); }
.nd-player { border-left-color: var(--team); padding-right: 8px; }
.nd-player .nd-title { font-size: 1.05rem; }
.nd-tag {
  position: absolute; top: -10px; right: 10px; color: #fff; border-radius: 999px; padding: 2px 8px;
  font: 700 .68rem/1.3 var(--font-body); letter-spacing: .03em;
}
.nd-tog {
  position: absolute; z-index: 2; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer;
  font: 700 .75rem/1 var(--font-body); display: grid; place-items: center;
}
.nd-tog[aria-label^="Collapse"] { background: var(--ink); color: var(--chalk); }
.is-h .nd-tog { right: -13px; top: 50%; transform: translateY(-50%); }
.is-v .nd-tog { bottom: -13px; left: 50%; transform: translateX(-50%); }
.nd-root .nd-tog { border-color: var(--chalk); }
/* layer pill on player cards: tinted by where he falls at his position, value always written out */
.lp { flex: none; min-width: 44px; text-align: center; padding: 4px 8px; border-radius: 999px; font: 700 .85rem/1 var(--font-body); }
.lp.t1 { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--muted); }
.lp.t2 { background: color-mix(in srgb, var(--turf) 16%, transparent); color: var(--ink); }
.lp.t3 { background: color-mix(in srgb, var(--turf) 38%, transparent); color: var(--ink); }
.lp.t4 { background: var(--turf); color: var(--chalk); }
.lp.none { color: var(--muted); background: transparent; border: 1px dashed var(--line); }
.tree-zoom { position: absolute; right: 16px; top: 16px; display: grid; gap: 6px; }
.tree-zoom button {
  min-width: 40px; height: 40px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: 700 1rem/1 var(--font-body); cursor: pointer; box-shadow: 0 1px 3px rgb(0 0 0 / .08);
}
.tree-zoom button[data-zoom="fit"], .tree-zoom button[data-zoom="reset"] { font-size: .78rem; }
.tree-hint { position: absolute; left: 16px; bottom: 10px; margin: 0; font-size: .8rem; color: var(--muted); pointer-events: none; }

/* ---------- phones: accordion ---------- */
.acc { display: none; padding-bottom: 32px; }
.acc-conf { font-size: 1.8rem; border-bottom: 3px solid var(--ink); padding: 18px 0 6px; }
.acc-div { font-size: 1.05rem; color: var(--muted); font-weight: 600; margin: 14px 0 4px; }
.acc-teams, .acc-players { list-style: none; margin: 0; padding: 0; }
.acc-team { border-top: 1px solid var(--line); }
.acc-team.open { border-left: 4px solid var(--team); margin-left: -4px; background: var(--surface); }
.acc-row { display: flex; align-items: center; gap: 8px; padding-right: 4px; }
.acc-open {
  flex: 1; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 4px 6px 8px;
  background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.acc-name { font: 600 1.2rem/1.1 var(--font-display); flex: 1; }
.acc-rec { font: 700 1.1rem/1 var(--font-display); white-space: nowrap; }
.acc-rec small { font: 500 .8rem/1 var(--font-body); margin-left: 4px; }
.chev { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: 0 6px 4px; transition: transform .2s; }
.open .chev { transform: rotate(-135deg); margin-bottom: -4px; }
.acc-body { padding: 4px 12px 16px; }
.acc-units { display: flex; margin: 6px 0 10px; }
.acc-units button { flex: 1; justify-content: center; min-height: 44px; }
.acc-units button.u-offense[aria-pressed="true"] { background: var(--offense); color: #fff; }
.acc-units button.u-defense[aria-pressed="true"] { background: var(--defense); color: #fff; }
.acc-grp { font: 600 .78rem/1 var(--font-body); color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin: 14px 0 4px; }
.acc-players li {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 4px; border-top: 1px solid var(--line); cursor: pointer;
}
.acc-players li.hl { background: color-mix(in srgb, var(--turf) 12%, transparent); }
.acc-players b { font-weight: 600; } .acc-players small { color: var(--muted); }
.acc-players .nd-cmp { width: 40px; height: 40px; }
.acc-link { display: inline-block; margin-top: 14px; font-weight: 600; }
.acc-none { color: var(--muted); }
@media (max-width: 899px) {
  .tree-wrap, .ex-layout { display: none; }
  .acc { display: block; }
  .ex-head { padding-top: 20px; }
  .ex-tools { width: 100%; }
  .ex-find { flex: 1 1 100%; } .ex-find input { width: 100%; min-height: 44px; }
  .find-list { width: 100%; }
  .ex-field { flex: 1; } .ex-field select { width: 100%; min-height: 44px; }
  .kpis { flex-direction: column; gap: 8px; }
  .kpi-title { max-width: none; }
  .kpi-row { margin-inline: -16px; padding-inline: 16px; }
  .kpi { min-width: 140px; }
}

/* ---------- compare tray + banner + quick pick ---------- */
.cmp-tray {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: #142019; color: #EEF2EE; box-shadow: 0 -6px 24px rgb(0 0 0 / .22);
}
.cmp-tray .wrap { display: flex; align-items: center; gap: 12px; }
.cmp-title { display: inline-flex; align-items: center; gap: 6px; font: 700 1.1rem/1 var(--font-display); color: #9FDCB5; white-space: nowrap; }
.cmp-ico { font-size: 1.1rem; }
.cmp-slots { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cmp-slot {
  flex: 0 1 auto; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 6px 6px 8px; min-width: 0;
  background: rgb(255 255 255 / .08); border-radius: 10px; color: inherit;
}
.cmp-slot .avatar { box-shadow: 0 0 0 1.5px #142019, 0 0 0 3px var(--av-ring); }
.cmp-letter { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 .72rem/1 var(--font-body); color: #fff; flex: none; }
.cmp-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14ch; }
.cmp-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: inherit; font-size: 1.3rem; cursor: pointer; opacity: .75; flex: none; }
.cmp-x:hover { opacity: 1; background: rgb(255 255 255 / .1); }
.cmp-slot.empty {
  border: 1.5px dashed rgb(255 255 255 / .4); background: none; font: 600 .95rem/1 var(--font-body);
  padding: 0 16px; cursor: pointer; white-space: nowrap;
}
.cmp-slot.empty:hover { border-color: #9FDCB5; }
.cmp-more { align-self: center; font-size: .85rem; opacity: .75; white-space: nowrap; }
.cmp-go { display: flex; align-items: center; gap: 8px; }
.cmp-clear { background: none; border: 0; color: inherit; opacity: .7; font: 600 .9rem/1 var(--font-body); cursor: pointer; min-height: 44px; padding: 0 6px; }
.cmp-btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
  background: #82C99D; color: #142019; font: 700 1rem/1 var(--font-body); text-decoration: none;
}
.cmp-btn.off { background: rgb(255 255 255 / .12); color: rgb(238 242 238 / .6); pointer-events: none; }
body.has-tray { padding-bottom: 76px; }
body.has-tray .site-foot { padding-bottom: 96px; }
.cmp-banner {
  position: fixed; z-index: 60; left: 50%; bottom: 92px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 10px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 30px rgb(0 0 0 / .2);
  font-weight: 600; transition: opacity .2s, transform .2s;
}
.cmp-banner.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.cmp-banner button { font: 700 .9rem/1 var(--font-body); min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.cmp-banner button:first-of-type { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
@media (max-width: 599px) {
  .cmp-tray .wrap { flex-wrap: wrap; gap: 8px; }
  .cmp-title { display: none; }
  .cmp-slots { flex: 1 1 100%; }
  .cmp-slot { flex: 1 1 0; }
  .cmp-go { flex: 1 1 100%; justify-content: space-between; }
  .cmp-btn { flex: 1; justify-content: center; }
  body.has-tray { padding-bottom: 132px; }
  .cmp-banner { bottom: 140px; }
}
.pick-sheet { position: fixed; inset: 0; z-index: 70; display: none; }
.pick-sheet.open { display: block; }
.pick-back { position: absolute; inset: 0; background: rgb(0 0 0 / .4); }
.pick-panel {
  position: absolute; left: 50%; top: 10vh; transform: translateX(-50%); width: min(480px, calc(100% - 24px)); max-height: 80vh;
  display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: 0 20px 50px rgb(0 0 0 / .3); overflow: hidden;
}
.pick-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; }
.pick-head h2 { font-size: 1.5rem; }
.x { width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 1.6rem; cursor: pointer; }
.pick-q { margin: 4px 16px 8px; font: 500 1rem/1 var(--font-body); min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--chalk); color: var(--ink); }
.pick-list { overflow: auto; padding: 0 8px 12px; }
.pick-list button {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; border: 0; border-radius: 8px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.pick-list button:hover, .pick-list button:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.pick-list span { display: grid; } .pick-list small { color: var(--muted); }
.pick-empty { color: var(--muted); padding: 16px 8px; }
@media (max-width: 599px) {
  .pick-panel { top: auto; bottom: 0; transform: translateX(-50%); width: 100%; max-height: 85vh; border-radius: 16px 16px 0 0; }
}

/* ---------- Player Card ---------- */
.pc { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.pc-back { position: absolute; inset: 0; background: rgb(0 0 0 / .35); opacity: 0; transition: opacity .2s; }
.pc-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); display: flex; flex-direction: column;
  background: var(--chalk); box-shadow: -10px 0 40px rgb(0 0 0 / .2); pointer-events: auto; outline: none;
  transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.7,.2,1); overflow: hidden;
}
.pc.in .pc-panel { transform: none; }
@media (min-width: 900px) { .pc-back { display: none; } body.pc-open.has-tray .pc-panel { bottom: 0; } }
@media (max-width: 899px) {
  .pc { pointer-events: auto; }
  .pc.in .pc-back { opacity: 1; }
  .pc-panel { top: auto; left: 0; right: 0; width: 100%; height: 90vh; border-radius: 16px 16px 0 0; transform: translateY(100%); }
  body.pc-open { overflow: hidden; }
}
.pc-head { position: relative; background: var(--band-bg); color: var(--band-fg); padding: 18px 18px 0; flex: none; }
.pc-grip { display: none; }
@media (max-width: 899px) { .pc-grip { display: block; width: 44px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--band-fg) 40%, transparent); margin: -8px auto 10px; } }
.pc-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 8px; border: 0; background: none; color: inherit; font-size: 1.7rem; cursor: pointer; }
.pc-close:hover { background: color-mix(in srgb, var(--band-fg) 14%, transparent); }
.pc-id { display: flex; align-items: center; gap: 16px; padding-right: 40px; }
.pc-id h2 { font-size: clamp(1.7rem, 5vw, 2.2rem); }
.pc-id p { margin: 2px 0 0; opacity: .85; font-size: .92rem; }
.pc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pc-act {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  font: 600 .88rem/1 var(--font-body); color: inherit; background: color-mix(in srgb, var(--band-fg) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--band-fg) 30%, transparent);
}
.pc-act:hover { background: color-mix(in srgb, var(--band-fg) 22%, transparent); }
.pc-act.primary { background: var(--band-fg); color: var(--band-bg); border-color: var(--band-fg); }
.pc-act.primary[aria-pressed="true"] { background: transparent; color: inherit; }
.pc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -18px; }
.pc-tabs button {
  min-height: 46px; border: 0; background: none; color: inherit; opacity: .78; cursor: pointer;
  font: 600 .95rem/1 var(--font-body); border-bottom: 3px solid transparent;
}
.pc-tabs button[aria-selected="true"] { opacity: 1; background: var(--chalk); color: var(--ink); border-radius: 10px 10px 0 0; border-bottom-color: var(--chalk); }
.pc-body { flex: 1; overflow: auto; padding: 14px 18px 24px; overscroll-behavior: contain; }
.pc-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; font-weight: 600; color: var(--muted); font-size: .85rem; }
.pc-controls label { display: inline-flex; align-items: center; gap: 6px; }
.pc-controls .seg button { min-height: 34px; padding: 0 10px; font-size: .82rem; }
.pc-loading, .pc-empty { padding: 32px 18px; color: var(--muted); }
.pc-loading strong, .pc-empty strong { display: block; color: var(--ink); font: 700 1.35rem/1.2 var(--font-display); margin-bottom: 4px; }
.pc-empty { padding: 20px 0; }
.pc-h { font-size: 1.45rem; margin: 2px 0 4px; }
.pc-h4 { font: 600 .78rem/1 var(--font-body); color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin: 10px 0 6px; }
.pc-credit { color: var(--muted); font-size: .75rem; margin: 18px 0 0; }
.pc-btn { font: 600 .95rem/1 var(--font-body); min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }

/* radar */
.rd-key { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0 0 4px; font-size: .8rem; color: var(--muted); }
.rd-key span::before { content: ""; display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--muted); vertical-align: middle; margin-right: 5px; }
.rd-key .k-edge::before { border-top-color: var(--ink); }
.rd-key .k-avg::before { border-top-style: dashed; }
.rd-key span:last-child::before { width: 5px; height: 5px; border: 0; border-radius: 50%; background: var(--muted); }
.radar { display: block; width: 100%; height: auto; max-width: 440px; margin: 0 auto; overflow: visible; }
.rd-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.rd-ring:nth-child(3) { stroke: color-mix(in srgb, var(--ink) 40%, transparent); }
.rd-avg { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 4 4; }
.rd-typical { fill: color-mix(in srgb, var(--muted) 10%, transparent); stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.rd-spoke { stroke: var(--line); stroke-width: 1; }
.rd-label text { font: 600 13px var(--font-body); fill: var(--ink); }
.rd-label .rd-pct { font: 700 14px var(--font-display); fill: var(--muted); }
.radar .rd-pt, .radar .rd-label, .radar .rd-spoke { transition: opacity .12s; }
.rd-has-on .rd-label:not(.on) { opacity: .35; }
.rd-has-on .rd-pt:not(.on) { opacity: .45; }
.rd-label.on text { fill: var(--turf); }
.rd-spoke.on { stroke: var(--ink); stroke-width: 1.75; }
.rd-pt.on > * { transform-box: fill-box; transform-origin: center; transform: scale(1.5); }
.pts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pts li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 4.6em; gap: 4px 10px; align-items: baseline;
  padding: 9px 6px; margin: 0 -6px; border-bottom: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.pts li.on { background: color-mix(in srgb, var(--turf) 12%, transparent); }
.pts li:focus-visible { outline: 3px solid var(--turf); outline-offset: -2px; }
.pt-name { font-weight: 600; } .pt-name small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.pt-val { font: 700 1.15rem/1 var(--font-display); text-align: right; }
.pt-rank { text-align: right; font-weight: 700; white-space: nowrap; } .pt-rank small { color: var(--muted); font-weight: 500; }
.pt-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 8%, transparent); position: relative; }
.pt-bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; border-left: 1px dashed var(--muted); }
.pt-bar i { display: block; height: 100%; border-radius: 3px; background: var(--turf); }

/* game by game + tables */
.gb-sum { margin: 0 0 6px; color: var(--muted); } .gb-sum b { color: var(--ink); font: 700 1.3rem/1 var(--font-display); }
.gb-scroll { overflow-x: auto; padding-bottom: 4px; }
.gb { display: block; overflow: visible; }
.gb text { font: 600 10px var(--font-body); text-anchor: middle; fill: var(--muted); }
.gb .gb-v { fill: var(--ink); font-weight: 700; }
.gb .gb-opp.W { fill: var(--win); } .gb .gb-opp.L { fill: var(--loss); }
.tbl-scroll { overflow-x: auto; margin-top: 12px; }
.pc-tbl { border-collapse: collapse; font-size: .85rem; white-space: nowrap; width: 100%; }
.pc-tbl th, .pc-tbl td { padding: 6px 0 6px 10px; text-align: right; border-top: 1px solid var(--line); }
.pc-tbl th:first-child, .pc-tbl td:first-child { padding-left: 0; text-align: left; }
.pc-tbl td:nth-child(2) { text-align: left; }
.pc-tbl thead th { color: var(--muted); font-weight: 600; font-size: .75rem; border-top: 0; }
.pc-tbl tr.cur td { font-weight: 700; }
.pc-tbl .res { text-decoration: none; font-weight: 600; } .pc-tbl .res.W { color: var(--win); } .pc-tbl .res.L { color: var(--loss); }

/* ---------- Compare page ---------- */
.cmp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; padding: 28px 0 16px; }
.cmp-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.cmp-head p { margin: 4px 0 0; color: var(--muted); }
.cmp-opts { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.cmp-cards { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.cmp-card {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 200px; flex: 0 1 260px; padding: 10px 40px 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--slot); border-radius: 10px;
}
.cmp-card b { display: block; font: 700 1.15rem/1.05 var(--font-display); }
.cmp-card small { color: var(--muted); }
.cmp-card .mk { width: 14px; height: 14px; flex: none; }
.cmp-card .x { position: absolute; top: 4px; right: 2px; width: 34px; height: 34px; font-size: 1.3rem; }
.cmp-card button.who { all: unset; cursor: pointer; display: grid; }
.cmp-card button.who:hover b { text-decoration: underline; }
.cmp-card.add { border: 1.5px dashed var(--line); border-top-width: 1.5px; background: none; justify-content: center; color: var(--muted); font-weight: 600; cursor: pointer; min-height: 64px; padding-right: 12px; font: 600 1rem/1 var(--font-body); }
.cmp-card.add:hover { border-color: var(--ink); color: var(--ink); }
.cmp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px 48px; padding-bottom: 48px; align-items: start; }
.cmp-body h2 { font-size: 1.6rem; margin-bottom: 4px; }
.cmp-body .radar { max-width: 480px; margin: 0; }
.cmp-tbl { width: 100%; border-collapse: collapse; }
.cmp-tbl th, .cmp-tbl td { padding: 9px 8px 9px 12px; border-top: 1px solid var(--line); text-align: right; vertical-align: baseline; }
.cmp-tbl th:first-child { padding-left: 0; text-align: left; font-weight: 600; }
.cmp-tbl th small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.cmp-tbl thead th { font: 700 .95rem/1.1 var(--font-display); border-top: 0; color: var(--ink); white-space: nowrap; }
.cmp-tbl thead th i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.cmp-tbl td { font: 600 1.05rem/1.1 var(--font-display); white-space: nowrap; }
.cmp-tbl td small { display: block; font: 500 .78rem/1.2 var(--font-body); color: var(--muted); }
.cmp-tbl td.best { color: var(--turf); font-weight: 700; background: color-mix(in srgb, var(--turf) 13%, transparent); box-shadow: inset 0 -2px 0 var(--turf); }
.cmp-tbl td.best small { color: var(--turf); }
.best-key { margin: 0 0 6px; font-size: .82rem; color: var(--muted); }
.best-key b { color: var(--turf); background: color-mix(in srgb, var(--turf) 13%, transparent); box-shadow: inset 0 -2px 0 var(--turf); padding: 0 4px; }
.cmp-tbl tbody tr[data-axis] { cursor: pointer; }
.cmp-tbl tbody tr.on { background: color-mix(in srgb, var(--turf) 12%, transparent); }
.cmp-sec { font: 600 .78rem/1 var(--font-body) !important; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; padding-top: 22px !important; border-top: 0 !important; }
.rk-bar { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.rk-bar i { display: block; height: 100%; border-radius: 2px; }
.cmp-empty { padding: 32px 0 64px; display: grid; gap: 18px; justify-items: start; max-width: 560px; }
.cmp-empty strong { font: 700 1.8rem/1.1 var(--font-display); }
.cmp-empty p { margin: 0; color: var(--muted); }
.cmp-empty .row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 700 1rem/1 var(--font-body); background: var(--ink); color: var(--chalk); border: 1px solid var(--ink); text-decoration: none;
}
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
@media (max-width: 860px) {
  .cmp-body { grid-template-columns: minmax(0, 1fr); }
  .cmp-card { flex: 1 1 calc(50% - 10px); min-width: 0; }
}
/* phone turned sideways: the wide, two-column layout */
@media (orientation: landscape) and (max-height: 500px) {
  .cmp-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; }
  .cmp-card { flex: 1 1 0; }
}

/* ---------- Scores ---------- */
.sc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; padding: 28px 0 12px; }
.sc-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.sc-weeks { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.sc-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; scroll-snap-type: x proximity; padding: 2px; }
.sc-strip::-webkit-scrollbar { display: none; }
.sc-strip button {
  flex: none; scroll-snap-align: center; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .9rem/1 var(--font-body); white-space: nowrap;
}
.sc-strip button[aria-current="true"] { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.sc-strip button.future { color: var(--muted); }
.sc-arrow { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-bottom: 48px; }
.sc-day { grid-column: 1 / -1; font: 600 .8rem/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 10px 0 -4px; }
.sc-game {
  display: grid; gap: 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.sc-game:hover { border-color: var(--ink); box-shadow: 0 4px 14px rgb(0 0 0 / .08); }
.sc-status { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); font-weight: 600; }
.sc-status .final { color: var(--ink); letter-spacing: .04em; text-transform: uppercase; }
.sc-team { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.sc-team .badge { height: 30px; width: 24px; }
.sc-team b { font: 700 1.3rem/1 var(--font-display); }
.sc-team small { color: var(--muted); margin-left: 6px; font-size: .8rem; }
.sc-score { font: 700 1.7rem/1 var(--font-display); min-width: 1.5em; text-align: right; }
.sc-team.lost b, .sc-team.lost .sc-score { color: var(--muted); font-weight: 600; }
.sc-meta { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
@media (max-width: 520px) { .sc-grid { grid-template-columns: 1fr; } .sc-arrow { display: none; } }
