/* STL Academy coaches app — design plan
   Layout: a fixed app bar, one 1180px column, cards only where a thing is an object (a game, a player, a KPI group).
   Numbers set in a condensed face so a card can carry five of them; body text in a quiet humanist sans. */
:root {
  --navy: #0C2340;          /* club ink */
  --red: #E0004D;           /* club accent — STL in charts, goals, nothing else */
  --bg: #F3F5F8;            /* cool page ground */
  --surface: #FFFFFF;
  --surface-2: #EEF1F5;     /* inset panels, chips */
  --line: #DDE3EA;
  --fg: #16233A;
  --fg-2: #52627A;
  --fg-3: #8C9AAE;
  --opp: #6B7A90;           /* opponent in charts */
  --tier-elite: #286EDC; --tier-strong: #169650; --tier-avg: #B7860B; --tier-poor: #E0004D;
  --tier-elite-bg: #DCE8FA; --tier-strong-bg: #D7F0E2; --tier-avg-bg: #FBEFC9; --tier-poor-bg: #FADAE4;
  --on: #169650; --close: #B7860B; --off: #E0004D;
  --heat: 12, 35, 64;       /* rgb for touch heat (navy, one hue light→dark) */
  --focus: #286EDC;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(12,35,64,.06), 0 4px 14px rgba(12,35,64,.05);
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --navy: #E9EEF6; --red: #FF4F86; --bg: #0E1420; --surface: #161E2D; --surface-2: #1F2939; --line: #2B3749;
  --fg: #E9EEF6; --fg-2: #AEBBD0; --fg-3: #7B8AA3; --opp: #94A3B8;
  --tier-elite: #6FA3F2; --tier-strong: #4CC585; --tier-avg: #E2B23A; --tier-poor: #FF6B99;
  --tier-elite-bg: #1C3157; --tier-strong-bg: #15392A; --tier-avg-bg: #3C3115; --tier-poor-bg: #47172B;
  --on: #4CC585; --close: #E2B23A; --off: #FF6B99; --heat: 150, 185, 235; --focus: #6FA3F2;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3); color-scheme: dark; } }
:root[data-theme="dark"] {
  --navy: #E9EEF6; --red: #FF4F86; --bg: #0E1420; --surface: #161E2D; --surface-2: #1F2939; --line: #2B3749;
  --fg: #E9EEF6; --fg-2: #AEBBD0; --fg-3: #7B8AA3; --opp: #94A3B8;
  --tier-elite: #6FA3F2; --tier-strong: #4CC585; --tier-avg: #E2B23A; --tier-poor: #FF6B99;
  --tier-elite-bg: #1C3157; --tier-strong-bg: #15392A; --tier-avg-bg: #3C3115; --tier-poor-bg: #47172B;
  --on: #4CC585; --close: #E2B23A; --off: #FF6B99; --heat: 150, 185, 235; --focus: #6FA3F2;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3); color-scheme: dark; }

html, body { background: var(--bg); color: var(--fg); }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.45; margin: 0; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; } h2 { font-size: 19px; font-weight: 700; } h3 { font-size: 15px; font-weight: 700; }
.eyebrow { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-3); }
.muted { color: var(--fg-2); } .faint { color: var(--fg-3); }
.small { font-size: 13px; }

/* app bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--navy); color: #fff; }
:root[data-theme="dark"] .bar, .bar { color: #fff; }
.bar-in { max-width: 1340px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 14px; }
.bar .brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .02em; color: #fff; }
.bar .brand img { height: 30px; width: 30px; object-fit: contain; }
.bar nav { display: flex; gap: 2px; margin-left: 10px; }
.bar nav a { padding: 6px 12px; border-radius: 7px; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: rgba(255,255,255,.72); }
.bar nav a.on, .bar nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.bar .me { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.75); }
.bar .me .signout { color: rgba(255,255,255,.7); font-size: 12px; text-decoration: none; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 3px 8px; margin-left: 4px; } .bar .me .signout:hover { color: #fff; border-color: rgba(255,255,255,.6); }
.bar .me .av { width: 30px; height: 30px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-weight: 700; color: #fff; font-family: var(--font-display); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bar { background: #0B1020; } }
:root[data-theme="dark"] .bar { background: #0B1020; }

.wrap { max-width: 1340px; margin: 0 auto; padding-block: 22px 60px; padding-inline: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card > .card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px 0; }
.card > .card-b { padding: 14px 18px 18px; }
.section { margin-top: 26px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }

/* chips & buttons */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-family: var(--font-display); font-weight: 600; font-size: 13px; cursor: pointer; color: var(--fg-2); white-space: nowrap; }
.chip:hover { border-color: var(--fg-3); color: var(--fg); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .chip.on { color: #0E1420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.on { color: #0E1420; } }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 14px; font-family: var(--font-display); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--fg); }
.btn:hover { border-color: var(--fg-3); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #0E1420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0E1420; } }
.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 2px 8px; font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .03em; }
.tag.elite { background: var(--tier-elite-bg); color: var(--tier-elite); }
.tag.strong { background: var(--tier-strong-bg); color: var(--tier-strong); }
.tag.average { background: var(--tier-avg-bg); color: var(--tier-avg); }
.tag.below { background: var(--tier-poor-bg); color: var(--tier-poor); }
.tag.neutral { background: var(--surface-2); color: var(--fg-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* game strip */
.strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.gchip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 12px; cursor: pointer; min-width: 128px; text-align: left; }
.gchip:hover { border-color: var(--fg-3); }
.gchip.on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.gchip .d { font-size: 11px; color: var(--fg-3); font-family: var(--font-display); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.gchip .gt { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); padding: 1px 6px; border-radius: 4px; background: var(--surface-2); }
.gchip .gt.flex { color: var(--tier-elite); } .gchip .gt.scrimmage { color: var(--tier-avg); } .gchip .gt.tournament { color: var(--tier-strong); }
.gchip .o { font-weight: 600; font-size: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.gchip .s { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin-top: 1px; display: flex; gap: 6px; align-items: center; }
.res { font-family: var(--font-display); font-weight: 700; font-size: 11px; width: 18px; height: 18px; border-radius: 4px; display: inline-grid; place-items: center; color: #fff; }
.res.W { background: var(--tier-strong); } .res.D { background: var(--fg-3); } .res.L { background: var(--tier-poor); }

/* score header */
.scorehead { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 18px; padding: 22px 24px; }
.scorehead .team { display: flex; align-items: center; gap: 14px; min-width: 0; }
.scorehead .team.left { flex-direction: row-reverse; justify-content: flex-start; text-align: right; }   /* packs toward the score: name, then crest */
.scorehead .team.right { flex-direction: row; justify-content: flex-start; text-align: left; }         /* crest, then name */
.scorehead .crestbox { flex: 0 0 60px; width: 60px; height: 60px; display: grid; place-items: center; }
.scorehead .team .crest { border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: var(--fg-2); }
.scorehead .team .n { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.1; }
.scorehead .team .sub { font-size: 12px; color: var(--fg-3); margin-top: 3px; }
.scorehead .mid { text-align: center; justify-self: center; }
.scorehead .score { font-family: var(--font-display); font-weight: 700; font-size: 56px; line-height: 1; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 14px; }
.scorehead .score .sep { color: var(--fg-3); font-weight: 400; }
.scorehead .meta { text-align: center; font-size: 12px; color: var(--fg-3); margin-top: 6px; white-space: nowrap; }
/* team comparison under the score: left value · label + split bar · right value, sides as in the score header */
.cmpgrid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; row-gap: 2px; border-top: 1px solid var(--line); padding: 12px 24px 16px; }
.cmp { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 12px; padding: 5px 0; }
.cmp .cv { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.cmp .cv:first-child { text-align: right; } .cmp .cv:last-child { text-align: left; }
.cmp .cv.win { color: var(--fg); }
.cmp .cv.win.opp { color: var(--opp-text, var(--fg)); } .cmp .cv.win.stl { color: var(--red); }
.cmp .cv small { font-size: 12px; font-weight: 600; color: var(--fg-3); }
.cmp .cl { font-size: 11.5px; text-align: center; color: var(--fg-2); font-family: var(--font-display); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.cmp .cb { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: var(--surface-2); margin-top: 4px; gap: 2px; }
.cmp .cb i { display: block; height: 100%; } .cmp .cb i.stl { background: var(--red); } .cmp .cb i.opp { background: var(--opp); opacity: var(--opp-alpha, .55); }

/* KPI board (mirrors the KPI card) */
.kcols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.kcol { display: grid; gap: 16px; }
.kg { background: var(--surface-2); border-radius: 16px; padding: 10px; display: grid; gap: 8px; }
.kg-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; }
.kg-h i { width: 4px; height: 18px; border-radius: 2px; background: var(--red); display: inline-block; }
.kg-h .ph { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); font-weight: 600; }
.kg-h .dot-sep { color: var(--fg-3); }
.kg-h h3 { font-size: 17px; }
.kr { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); display: grid; grid-template-columns: 186px 1fr 78px; align-items: center; gap: 12px; padding: 10px 14px; min-height: 92px; }
.kr .knm { font-weight: 600; font-size: 14.5px; color: var(--navy); line-height: 1.15; }
.kr .kv { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1; margin-top: 4px; }
.kr .kv small { font-size: 13px; font-weight: 600; color: var(--fg-3); margin-left: 4px; font-family: var(--font-body); }
.kr .chg { display: inline-block; margin-top: 5px; font-size: 11px; color: var(--fg-3); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.kr .chg i { font-style: normal; font-weight: 700; }
.kr .km { min-width: 0; }
/* KPI bars in HTML so labels never stretch */
.kb { position: relative; height: 64px; }
.kb .kb-track { position: absolute; left: 0; right: 0; top: 24px; height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.kb .kb-track i { position: absolute; top: 0; bottom: 0; display: block; }
.kb .kb-track .zone { right: 0; background: var(--tier-strong-bg); }
.kb .kb-track .fill { left: 0; border-radius: 7px; min-width: 14px; }
.kb .kb-track .stdline { width: 2px; margin-left: -1px; background: var(--navy); }
.kb .kb-std { position: absolute; top: 0; height: 20px; width: 0; }
.kb .kb-std span { position: absolute; left: 0; top: 0; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 600; color: var(--navy); }
.kb .kb-std::after { content: ""; position: absolute; left: -1px; top: 18px; width: 2px; height: 26px; background: var(--navy); }
.kb .kb-season { position: absolute; top: 40px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--navy); }
.kb.std .kref { position: absolute; left: 0; top: 47px; font-size: 11px; color: var(--fg-3); }
.kb.tiers .kb-track { top: 20px; }
.kb .band { height: 100%; }
.kb .kb-tick { position: absolute; top: 17px; width: 0; height: 20px; border-left: 1px solid var(--navy); box-shadow: -1px 0 0 var(--surface), 1px 0 0 var(--surface); }
.kb .kb-tick span { position: absolute; top: 22px; left: 0; transform: translateX(-50%); font-size: 10.5px; color: var(--fg-2); white-space: nowrap; }
.kb .kb-tick.lo span { top: 34px; }
.kb .kb-ring { position: absolute; top: 22px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--surface); border: 2px solid var(--navy); box-sizing: border-box; }
.kb .kb-mark { position: absolute; top: 13px; width: 10px; height: 28px; margin-left: -5px; border-radius: 4px; border: 2px solid var(--surface); box-sizing: border-box; }
.kr .kp { text-align: right; }
.kpill { display: inline-block; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 5px 10px; }
:root[data-theme="dark"] .kpill { color: #0E1420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kpill { color: #0E1420; } }
.klegend { margin-top: 10px; justify-content: flex-end; }
.legend .ring { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--navy); display: inline-block; }
.legend .mark { width: 6px; height: 14px; border-radius: 3px; background: var(--navy); display: inline-block; }
.legend .dotk { width: 10px; height: 10px; border-radius: 50%; background: var(--navy); display: inline-block; }
.legend .linek { width: 2px; height: 14px; background: var(--navy); display: inline-block; }

/* momentum */
.mom { padding: 14px 18px 10px; }
.mom svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--fg-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 8px; border-radius: 2px; display: inline-block; }

/* player cards */
.pgroup { margin-top: 18px; } .pgroup:first-child { margin-top: 0; }
.pgroup-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; } .pgroup-h h3 { font-size: 15px; } .pgroup-h .faint { font-size: 12px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pc { padding: 12px 14px 12px; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.pc:hover { border-color: var(--fg-3); transform: translateY(-1px); }
/* header: headshot · name over a position/tags row · minutes. Both rows have fixed heights so cards in a group start their stats at the same line */
.pc .top { display: flex; gap: 12px; align-items: center; height: 66px; }
.hs { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; object-position: center 20%; background: var(--navy); flex: 0 0 66px; border: 2px solid var(--surface-2); }
.hs.ph { display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.pc .who { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.pc .nm { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc .meta { display: flex; gap: 6px; align-items: center; height: 20px; font-size: 12px; color: var(--fg-2); }
.pc .meta .tag { font-size: 11px; padding: 1px 7px; line-height: 16px; }
.pc .ga { display: inline-flex; gap: 4px; margin-left: auto; }
.pc .mins { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; text-align: right; flex: 0 0 auto; align-self: center; }
.pc .mins small { display: block; font-size: 9.5px; font-weight: 700; color: var(--fg-3); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.kstats { margin-top: 10px; display: grid; gap: 3px; }
.ks { display: grid; grid-template-columns: minmax(0, 1fr) 40px 46px 58px; align-items: center; column-gap: 8px; font-size: 13px; padding: 1px 0; border-top: 1px solid var(--surface-2); }
.ks .s { text-align: right; color: var(--fg-3); font-size: 12px; font-weight: 600; }
.ks .g { text-align: right; color: var(--fg-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ks.kh { border-top: 0; font-family: var(--font-display); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; } .ks.kh span { text-align: right; } .ks.kh span:first-child { text-align: left; } .ks.kh span:last-child { text-align: center; }
.ks:first-child { border-top: 0; }
.ks .l { color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks .v { font-family: var(--font-display); font-weight: 700; font-size: 14px; text-align: center; white-space: nowrap; border-radius: 6px; padding: 2px 6px; justify-self: stretch; }
.ks .v.t4 { background: var(--tier-elite-bg); color: var(--tier-elite); } .ks .v.t3 { background: var(--tier-strong-bg); color: var(--tier-strong); } .ks .v.t2 { background: var(--tier-avg-bg); color: var(--tier-avg); } .ks .v.t1 { background: var(--tier-poor-bg); color: var(--tier-poor); } .ks .v.t0 { background: transparent; color: var(--fg-2); }
.ks .v small { font-size: 11px; font-weight: 600; color: var(--fg-3); font-family: var(--font-body); }
.pct { font-family: var(--font-display); font-weight: 700; font-size: 11px; border-radius: 5px; padding: 2px 0; text-align: center; }
.pct.t4 { background: var(--tier-elite-bg); color: var(--tier-elite); }
.pct.t3 { background: var(--tier-strong-bg); color: var(--tier-strong); }
.pct.t2 { background: var(--tier-avg-bg); color: var(--tier-avg); }
.pct.t1 { background: var(--tier-poor-bg); color: var(--tier-poor); }
.pct.t0 { background: var(--surface-2); color: var(--fg-3); }
.pc .note { font-size: 11px; color: var(--fg-3); margin-top: 8px; }

/* tables */
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-family: var(--font-display); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }

/* bars */
.bar-h { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; position: relative; }
.bar-h > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.bar-h > b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--fg-2); }
/* minutes bar split by source: own age group (solid), another academy age group (same colour, lighter), CITY2 (blue) */
.bar-h > i.seg { border-radius: 0; } .bar-h > i.seg.first { border-radius: 4px 0 0 4px; } .bar-h > i.seg.last { border-radius: 0 4px 4px 0; } .bar-h > i.seg.first.last { border-radius: 4px; }
.bar-h > i.seg.up { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 2px, transparent 2px 5px) !important; } .bar-h > i.seg.pro { background: var(--tier-elite) !important; }
.msplit { font-size: 12px; color: var(--fg-3); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; } .msplit i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; } .msplit i.up { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 2px, transparent 2px 5px) !important; } .msplit i.pro { background: var(--tier-elite); }

/* status */
.st { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .03em; }
.st.on { color: var(--on); } .st.close { color: var(--close); } .st.off { color: var(--off); } .st.na { color: var(--fg-3); }
.st .dot.on { background: var(--on); } .st .dot.close { background: var(--close); } .st .dot.off { background: var(--off); } .st .dot.na { background: var(--fg-3); }
.mcell { font-family: var(--font-display); font-weight: 700; text-align: center; border-radius: 6px; padding: 6px 4px; font-size: 14px; }
.mcell.on { background: var(--tier-strong-bg); color: var(--tier-strong); } .mcell.close { background: var(--tier-avg-bg); color: var(--tier-avg); } .mcell.off { background: var(--tier-poor-bg); color: var(--tier-poor); } .mcell.na { background: var(--surface-2); color: var(--fg-3); }
.mcell small { display: block; font-size: 10px; font-weight: 600; opacity: .8; }

/* pitch */
.pitch svg { width: 100%; height: auto; display: block; }
.pitch-lbl { font-size: 11px; color: var(--fg-3); display: flex; justify-content: space-between; margin-top: 4px; }

/* tooltip */
.tip { position: fixed; pointer-events: none; background: var(--fg); color: var(--bg); font-size: 12px; padding: 6px 9px; border-radius: 6px; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; z-index: 50; display: none; font-family: var(--font-display); font-weight: 600; }
.tip.show { display: block; }

.empty { padding: 28px; text-align: center; color: var(--fg-3); font-size: 14px; }
.hint { font-size: 12px; color: var(--fg-3); }
.mockbadge { font-size: 11px; color: var(--fg-3); border: 1px dashed var(--line); border-radius: 6px; padding: 3px 8px; }

@media (max-width: 760px) {
  .bar-in { padding: 0 14px; gap: 8px; } .bar nav a { padding: 6px 9px; font-size: 13px; } .bar .me span { display: none; }
  .wrap { padding-inline: 16px; padding-block: 16px 48px; }
  .bar .brand span { display: none; }
  .scorehead { grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 16px 12px; }
  .scorehead .team, .scorehead .team.left, .scorehead .team.right { flex-direction: column; justify-content: center; text-align: center; gap: 6px; }
  .scorehead .team img, .scorehead .team .crest { width: 44px; height: 44px; flex-basis: 44px; }
  .scorehead .score { font-size: 38px; gap: 8px; justify-content: center; }
  .scorehead .team .n { font-size: 15px; } .scorehead .team .sub { display: none; }
  .scorehead .meta { font-size: 11px; white-space: normal; }
  .cmpgrid { grid-template-columns: 1fr; padding: 10px 12px 12px; column-gap: 0; }
  .cmp { grid-template-columns: 52px 1fr 52px; } .cmp .cv { font-size: 17px; }
  .scorehead .mid { max-width: 44vw; } .scorehead .meta { line-height: 1.3; }
  .kcols { grid-template-columns: 1fr; } .kr { grid-template-columns: 1fr auto; grid-template-areas: "l p" "m m"; gap: 6px 10px; padding: 10px 12px; } .kr .kl { grid-area: l; } .kr .kp { grid-area: p; align-self: start; } .kr .km { grid-area: m; } .kr .kv { font-size: 28px; } .kr .knm { font-size: 14px; } .kr .chg { display: inline-block; }
  .kpi-row .v { font-size: 21px; }
  .pgrid { grid-template-columns: 1fr; }
  .pc { padding: 12px; } .pc .nm { font-size: 16px; } .pc .top { height: 56px; } .hs { width: 56px; height: 56px; flex-basis: 56px; }
  .teamline > div { padding: 10px 12px; } .teamline .v { font-size: 17px; }
  h1 { font-size: 22px; }
}
@media (max-width: 460px) { .pgrid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── player maps hover panel (team page) ── */
.ppop { position: fixed; z-index: 60; width: min(960px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 2px 6px rgba(12,35,64,.08), 0 18px 48px rgba(12,35,64,.18); padding: 14px 16px 12px; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease; }
.ppop.show { opacity: 1; pointer-events: auto; transform: none; }
.ppop-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.ppop-h .who { display: flex; gap: 10px; align-items: center; }
.ppop-h .who img, .ppop-h .who .hs { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.ppop-h .nm { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.1; }
.ppop-h .sub { font-size: 12px; color: var(--fg-2); margin-top: 2px; }
.pmaps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pm .pm-h { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg); border-left: 3px solid var(--red); padding-left: 8px; margin-bottom: 8px; line-height: 1.2; }
.pm .pm-h span { color: var(--fg-2); font-weight: 600; text-transform: none; letter-spacing: 0; }
.pm .legend { margin-top: 6px; gap: 6px 12px; font-size: 11px; }
.pm .hint { margin-top: 6px; }
@media (max-width: 900px) { .pmaps { grid-template-columns: 1fr; } }

.pitch.dark svg { border-radius: 6px; }

/* ── team page: formation + comparison ── */
.topline { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; min-height: 36px; }
.teamgrid { display: grid; grid-template-columns: minmax(380px, 470px) minmax(0, 1fr); gap: 16px; align-items: start; }
.formation .card-h h2, .compare .card-h h2 { font-size: 18px; }
.pitchwrap { position: relative; }
.pitchwrap .pitchp { width: 100%; height: auto; display: block; border-radius: 8px; }
.slots { position: absolute; inset: 0; }
.slot { position: absolute; transform: translate(-50%, -50%); width: 92px; background: none; border: 0; padding: 4px 2px; cursor: pointer; color: #fff; text-align: center; border-radius: 10px; transition: background .12s ease; font-family: var(--font-body); }
.slot:hover { background: rgba(255,255,255,.08); }
.slot.sel { background: rgba(255,255,255,.14); outline: 2px solid rgba(255,255,255,.7); color: #fff; border: 0; padding: 4px 2px; font: inherit; border-radius: 10px; }   /* the generic .sel (select boxes) must not restyle a selected slot */
.slot .pl { display: block; font-family: var(--font-display); font-weight: 700; font-size: 9.5px; letter-spacing: .08em; color: rgba(255,255,255,.55); margin-bottom: 3px; }
.slot .ring { width: 50px; height: 50px; border-radius: 50%; margin: 0 auto; padding: 2px; background: rgba(255,255,255,.35); }
.slot .ring .hs { width: 100%; height: 100%; border: 0; flex-basis: auto; font-size: 16px; }
.slot .ring.t4 { background: var(--tier-elite); } .slot .ring.t3 { background: var(--tier-strong); } .slot .ring.t2 { background: var(--tier-avg); } .slot .ring.t1 { background: var(--tier-poor); }
.slot .sn { font-family: var(--font-display); font-weight: 700; font-size: 13px; margin-top: 4px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.slot .sn .bw { font-size: 10px; margin-left: 3px; color: rgba(255,255,255,.7); }
.slot .sm { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 11px; color: rgba(255,255,255,.75); margin-top: 2px; }
.sc { font-family: var(--font-display); font-weight: 700; font-size: 11px; border-radius: 5px; padding: 0 5px; line-height: 16px; color: #fff; }
.sc.t4 { background: var(--tier-elite); } .sc.t3 { background: var(--tier-strong); } .sc.t2 { background: var(--tier-avg); } .sc.t1 { background: var(--tier-poor); } .sc.t0 { background: rgba(127,127,127,.35); }
.sc.big { font-size: 15px; line-height: 22px; padding: 0 8px; }
.slot .alt { font-size: 10px; color: rgba(255,255,255,.6); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmpwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmpt { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.cmpt th, .cmpt td { padding: 5px 8px; text-align: center; border-top: 1px solid var(--surface-2); vertical-align: middle; min-width: 92px; }
.cmpt th { border-top: 0; vertical-align: top; padding-bottom: 8px; }
.cmpt .thwrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cmpt .lbl { text-align: left; color: var(--fg-2); white-space: nowrap; min-width: 120px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.cmpt tr.meta td { background: var(--surface-2); }
.cmpt tr.meta .lbl { background: var(--surface-2); font-weight: 600; color: var(--fg); }
.cmpt .pcol { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 4px 6px; border-radius: 8px; width: 100%; box-sizing: border-box; }
.cmpt .pcol:hover { background: var(--surface-2); }
.cmpt .pcol .hs { width: 44px; height: 44px; flex-basis: 44px; }
.cmpt .pcol.ownside .hs { border-color: var(--red); }
.cmpt .pn { font-family: var(--font-display); font-weight: 700; font-size: 13px; line-height: 1.15; white-space: nowrap; }   /* one line, so every column's tags and button sit level */
.cmpt .pm { font-size: 11px; color: var(--fg-3); min-height: 14px; display: flex; gap: 4px; align-items: center; justify-content: center; }
.cmpt .pm:empty { min-height: 0; }
.cmpt .sidetag { font-size: 10px; padding: 0 5px; }
.cmpt .v { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 14px; border-radius: 6px; padding: 1px 8px; min-width: 52px; }
.cmpt .v.t4 { background: var(--tier-elite-bg); color: var(--tier-elite); } .cmpt .v.t3 { background: var(--tier-strong-bg); color: var(--tier-strong); } .cmpt .v.t2 { background: var(--tier-avg-bg); color: var(--tier-avg); } .cmpt .v.t1 { background: var(--tier-poor-bg); color: var(--tier-poor); } .cmpt .v.t0 { color: var(--fg-2); }
.cmpt td .hint { font-size: 10.5px; margin-top: 1px; }
.cmpt .sortlbl { cursor: pointer; border-radius: 4px; padding: 1px 4px; margin-left: -4px; }
.cmpt .sortlbl:hover { background: var(--surface-2); color: var(--fg); }
.cmpt .sortlbl.on { color: var(--fg); font-weight: 700; }
.cmpt .sortlbl .arrow { font-style: normal; font-size: 9px; color: var(--red); }
@media (max-width: 980px) { .teamgrid { grid-template-columns: minmax(0, 1fr); } .compare, .formation { min-width: 0; } .slot { width: 72px; } .slot .ring { width: 42px; height: 42px; } .slot .alt { display: none; } .slot .sn { font-size: 12px; } }
.xi-line { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-top: 10px; font-size: 13px; }
.xi-line .eyebrow { margin-right: 2px; }
.cmpt tr.sec td { background: var(--surface); border-top: 0; padding: 18px 0 4px; text-align: left; position: sticky; left: 0; z-index: 1; }
.cmpt tr.sec:first-of-type td { padding-top: 10px; }
.cmpt tr.sec .band { display: block; background: var(--surface-2); border-left: 3px solid var(--red); border-radius: 0 6px 6px 0; padding: 7px 10px; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg); }
.subsblk { margin-top: 12px; display: grid; gap: 6px; }
.subrow { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: start; padding: 8px 0 6px; border-top: 1px solid var(--surface-2); }
.submin { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--fg); padding-top: 6px; }
.subcols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.subp { display: flex; align-items: center; gap: 8px; padding: 3px 0; min-width: 0; }
.subp .hs { width: 32px; height: 32px; flex-basis: 32px; border-width: 1px; }
.subp .nm { font-weight: 600; font-size: 13px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subp.off { opacity: .75; }
.subp .arr { font-size: 10px; width: 10px; flex: 0 0 10px; } .subp .arr.on { color: var(--tier-strong); } .subp .arr.off { color: var(--tier-poor); }
@media (max-width: 460px) { .subcols { grid-template-columns: 1fr; } }
/* top five of the game: a quiet blue wash on the card */
.pc.top5 { background: #EEF4FD; border-color: #B9CFF0; }
.pc.top5:hover { border-color: #7FA6E6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pc.top5 { background: #1A2740; border-color: #31497A; } :root:not([data-theme="light"]) .pc.top5:hover { border-color: #5A7DC2; } }
:root[data-theme="dark"] .pc.top5 { background: #1A2740; border-color: #31497A; } :root[data-theme="dark"] .pc.top5:hover { border-color: #5A7DC2; }
.sel { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12px; }

/* ── analysis diagrams ── */
.vz-tabs { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 12px; align-items: center; }
.vz-group { display: inline-flex; align-items: center; gap: 10px; }
.vz-group .eyebrow { font-size: 10px; white-space: nowrap; }
.vz-tabs .chip { padding: 5px 11px; font-size: 13px; }
.vz-card { padding: 12px 16px 12px; }
.vz-ctls { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; padding-bottom: 12px; border-bottom: 1px solid var(--surface-2); margin-bottom: 14px; }
.vz-ctl { display: flex; flex-direction: column; gap: 3px; max-width: 100%; font-size: 10px; color: var(--fg-3); font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.vz-ctl select { max-width: 100%; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); border-radius: 8px; padding: 6px 28px 6px 10px; font: inherit; font-family: var(--font-body); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; min-width: 110px; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%), linear-gradient(135deg, var(--fg-3) 50%, transparent 50%); background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.vz-ctl select:hover { border-color: var(--fg-3); }
.vz-chk { flex-direction: row; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--fg-2); cursor: pointer; background: var(--surface); }
.vz-chk:hover { border-color: var(--fg-3); }
.vz-chk input { width: 14px; height: 14px; accent-color: var(--navy); margin: 0; }
.vz-dl { margin-left: auto; }
.vz-grid { display: grid; grid-template-columns: minmax(0, 460px); justify-content: center; gap: 22px; }
.vz-grid.two { grid-template-columns: repeat(2, minmax(0, 440px)); }
.vz-grid.wide { grid-template-columns: minmax(0, 1fr); }
.vz-fig { margin: 0; min-width: 0; }
.vz-fig figcaption { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.2; }
.vz-fig figcaption .hint { font-family: var(--font-body); font-weight: 400; }
.vz { width: 100%; height: auto; display: block; border-radius: 8px; }
.vz-chart { border: 1px solid var(--line); }
.vz-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.vz-legend { gap: 6px 14px; font-size: 12px; }
.vz-about summary { font-size: 12px; color: var(--fg-3); cursor: pointer; list-style: none; text-decoration: underline dotted; }
.vz-about summary::-webkit-details-marker { display: none; }
.vz-about[open] { flex-basis: 100%; }
.vz-about .hint { margin-top: 6px; max-width: 110ch; }
@media (max-width: 760px) { .vz-grid.two { grid-template-columns: 1fr; } .vz-ctls { gap: 8px 10px; } .vz-ctl select { min-width: 0; } .vz-dl { margin-left: 0; width: 100%; } .vz-tabs { gap: 8px 14px; } }
.vz-preview { position: fixed; inset: 0; z-index: 80; background: rgba(8,12,20,.72); display: none; align-items: center; justify-content: center; padding: 20px; }
.vz-preview.show { display: flex; }
.vz-preview-in { background: var(--surface); border-radius: var(--r); max-width: min(960px, 100%); max-height: 100%; overflow: auto; padding: 14px 16px 16px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.vz-preview-h { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.vz-preview-h .hint { flex: 1 1 260px; }
.vz-preview img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.vz-dot { cursor: pointer; }
.vz-dot:hover { stroke: #fff; stroke-width: .6; }

/* Team page: my eleven */
.formation .card-h.fh { display: block; }
.formation .fh-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.formation .card-h .hint a { color: var(--red); font-weight: 600; text-decoration: none; }
.formation .card-h .hint a:hover { text-decoration: underline; }
.modetabs .chip { padding: 5px 11px; font-size: 12px; }
.slot .rm { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; line-height: 18px; display: none; }
.slot:hover .rm { display: block; }
.slot .rm:hover { background: var(--red); }
.slot.open .ring { background: rgba(255,255,255,.18); border: 1.5px dashed rgba(255,255,255,.6); }
.slot.open .ring .hs.ph { background: transparent; color: rgba(255,255,255,.8); }
.pickbtn { margin-top: 2px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 5px 12px; min-width: 96px; font-family: var(--font-display); font-weight: 700; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.pickbtn:hover { border-color: var(--red); color: var(--red); }
.pickbtn.here { background: var(--navy); border-color: var(--navy); color: #fff; cursor: default; }
:root[data-theme="dark"] .pickbtn.here { color: #0E1420; }
.cmpt .pcol.placed .hs { opacity: .55; }

/* Team page: trends */
.tr-frame { padding: 12px 16px; display: grid; gap: 10px; margin-bottom: 12px; }
.tr-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tr-row .eyebrow { min-width: 110px; }
.tr-row .chip { padding: 5px 11px; font-size: 12.5px; }
.tr-dates input { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12.5px; }
.tr-n { margin-left: auto; }
.tr-chips { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: middle; }
.tchip { display: inline-block; border-radius: 999px; padding: 2px 9px; font-family: var(--font-display); font-weight: 700; font-size: 11.5px; background: var(--surface-2); color: var(--fg-2); }
.tchip.up { background: var(--tier-strong-bg); color: var(--tier-strong); } .tchip.down { background: var(--tier-poor-bg); color: var(--tier-poor); }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 4px 0 8px; }
.fb-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 6px; background: var(--surface); display: grid; gap: 4px; }
.fb-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fb-name { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--fg-2); letter-spacing: .02em; }
.fb-delta { font-family: var(--font-display); font-weight: 700; font-size: 12px; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.fb-delta.up { background: var(--tier-strong-bg); color: var(--tier-strong); } .fb-delta.down { background: var(--tier-poor-bg); color: var(--tier-poor); }
.fb-big { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.fb-sub { font-family: var(--font-body, inherit); font-weight: 400; font-size: 11.5px; color: var(--fg-3); }
.fb-spark { width: 100%; height: 64px; display: block; }

/* Form board: expand + detail overlay */
.fb-card { position: relative; }
.fb-open { position: absolute; top: 8px; right: 8px; display: none; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 3px 10px; font-family: var(--font-display); font-weight: 700; font-size: 11.5px; cursor: pointer; z-index: 1; }
.fb-card:hover .fb-open, .fb-open:focus { display: inline-block; }
.fb-open:hover { border-color: var(--red); color: var(--red); }
.fb-card:hover .fb-delta { visibility: hidden; }
.tr-modal { position: fixed; inset: 0; background: rgba(8, 12, 20, .55); display: grid; place-items: center; padding: 20px; z-index: 60; }
.tr-box { width: min(1120px, 100%); max-height: 92vh; overflow: auto; padding: 16px 18px 12px; }
.tr-box-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.tr-box-h h2 { font-size: 18px; }
.tr-box .vz-fig svg { width: 100%; height: auto; display: block; }

.vz-chart rect.vz-dot:hover { stroke: none; }   /* the per-game hover strips on trend charts stay invisible */

.vz-grid.wide .vz-fig.narrow { max-width: 440px; margin: 0 auto; }
