:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --ink: #111619;
  --ink-2: #2c353d;
  --muted: #5a6672;
  --rule: #d9dee3;
  --us: #1f5fe0;
  --us-soft: #1f5fe022;
  --them: #c8102e;
  --them-soft: #c8102e1f;
  --good: #0a8a0a;
  --warn: #b97800;
  --warn-dot: #fab219;
  --question: #4b5563;
  --pitch: #0d1a2c;
  --pitch-line: #ffffff55;
  --line-gk: #0d2a66;
  --line-def: #1f5fe0;
  --line-mid: #5b8cf0;
  --line-fwd: #a4bff5;
  --shadow: 0 1px 2px #1116190d, 0 8px 24px -12px #11161926;
  --display: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* Light is the default whatever the device says; dark only when chosen with the toggle. */
:root[data-theme="dark"] {
  --bg: #0a0e13; --surface: #11171f; --surface-2: #151c25; --ink: #e8edf3; --ink-2: #c9d2dc;
  --muted: #93a0ae; --rule: #243040; --us: #5b8cf0; --us-soft: #5b8cf02e; --them: #e5485c; --them-soft: #e5485c29;
  --good: #3fc43f; --warn: #fab219; --question: #aab4bf; --pitch: #08121f;
  --line-gk: #c7d7fa; --line-def: #8fb0f5; --line-mid: #5b8cf0; --line-fwd: #2f5fc4;
  --shadow: 0 1px 2px #0006, 0 8px 24px -12px #000a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--body); font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; text-wrap: balance; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--us); outline-offset: 2px; }
.muted { color: var(--muted); }

.page { max-width: 1240px; margin: 0 auto; padding: 20px clamp(12px, 3vw, 32px) 48px; display: grid; gap: 18px; }

/* header */
.top { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 12px 28px; padding: 8px 0 4px; }
.brand { display: flex; align-items: center; gap: 10px; align-self: center; }
.wordmark { height: 30px; width: auto; }
:root[data-theme="dark"] .wordmark { filter: invert(1) hue-rotate(180deg); }
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* header toolbar */
.top-bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar { display: flex; align-items: center; gap: 8px; }
.toolbar select { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); font-weight: 600; max-width: 46vw; }
.tool-btn { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tool-btn:hover { border-color: var(--ink-2); }

/* boot: loading and sign-in */
.booting .page > :not(.top) { visibility: hidden; }
.booting .team-line, .booting .chips { visibility: hidden; }
.loading { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; color: var(--muted); pointer-events: none; }
.loading p { margin: 0; font-size: 15px; max-width: 34ch; }
.loading .teams-fallback { pointer-events: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--rule); border-top-color: var(--us); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gate { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(90% 60% at 50% 0%, var(--us-soft), transparent 70%), var(--bg); }
.gate-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 28px 26px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.gate-card .wordmark { height: 34px; justify-self: start; }
.gate-card h1 { font-size: 28px; text-transform: uppercase; letter-spacing: .02em; }
.gate-card p { margin: 0; color: var(--muted); font-size: 14px; }
.gate-card label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.gate-card input { font: inherit; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); }
.gate-card input:focus { outline: 2px solid var(--us); outline-offset: 0; border-color: var(--us); }
.gate-card button[type="submit"] { font: 600 15px var(--body); padding: 12px; border: 0; border-radius: 8px; background: var(--ink); color: var(--surface); cursor: pointer; }
.gate-card button[disabled] { opacity: .6; cursor: default; }
.gate-error { color: var(--them) !important; font-weight: 600; }
.gate-foot { font-size: 12.5px !important; }
.brand-sep { width: 1px; height: 22px; background: var(--rule); }
.brand-tag { font: 500 13px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.team-line h1 { font-size: clamp(34px, 5vw, 52px); line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
.team-line p { margin: 4px 0 0; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chip {
  border: 1px solid var(--rule); background: var(--surface); border-radius: 999px; padding: 6px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--us); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
@media (max-width: 760px) {
  .top { grid-template-columns: 1fr; }
  .chips { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .chip { flex: none; }
}

/* panels */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; min-width: 0; box-shadow: var(--shadow); }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.panel-head h2, .section-head h2 { font-size: 19px; letter-spacing: .03em; text-transform: uppercase; }
.hint, .caption { margin: 0; font-size: 12.5px; color: var(--muted); }
.caption { margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 18px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.key { font-weight: 600; white-space: nowrap; }
.key::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 4px 0 2px; vertical-align: 0; }
.key.us::before { background: var(--us); }
.key.them::before { background: var(--them); }

/* lens */
.lens-wrap { position: relative; }
#lens { display: block; width: 100%; height: 132px; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
@media (max-width: 600px) { #lens { height: 112px; } }
#lens:focus:not(:focus-visible) { outline: none; }
#lens .bar { transition: opacity .25s; }
#lens .dim { fill: var(--surface); opacity: .72; pointer-events: none; }
#lens .win { fill: none; stroke: var(--ink); stroke-width: 1.5; pointer-events: none; }
#lens .handle { fill: var(--ink); cursor: ew-resize; }
#lens .grip { stroke: var(--surface); stroke-width: 1.2; pointer-events: none; }
#lens .season-line { stroke: var(--rule); stroke-dasharray: 2 3; }
#lens .season-label { fill: var(--muted); font: 600 10.5px var(--body); letter-spacing: .06em; }
#lens .axis { stroke: var(--rule); }
#lens .hl { stroke: var(--ink); stroke-width: 2; }
#lens .sel-mark { fill: var(--ink); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.kpi { background: var(--surface); padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.kpi .label { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi .value { font: 500 clamp(26px, 3.4vw, 38px)/1.05 var(--display); }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.form { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.form b { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font: 600 11px var(--body); color: #fff; }
.form .W { background: var(--us); } .form .D { background: var(--muted); } .form .L { background: var(--them); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* insights */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin: 6px 2px 10px; }
.tone-key { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.tone-key li { display: flex; align-items: center; gap: 6px; }
.tone-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 11px/1 var(--body); font-style: normal; color: #fff; }
.tone-dot.good { background: var(--good); }
.tone-dot.watch { background: var(--warn-dot); color: #111619; }
.tone-dot.question { background: var(--question); color: var(--surface); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px 14px;
  display: grid; gap: 6px; align-content: start; box-shadow: var(--shadow); cursor: default;
  animation: rise .45s cubic-bezier(.2,.7,.2,1) both; transition: border-color .2s, transform .2s;
}
.card:hover, .card:focus-within { border-color: var(--ink-2); transform: translateY(-2px); }
.card-top { display: flex; align-items: center; gap: 8px; }
.card .kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: 20px; line-height: 1.15; letter-spacing: .01em; }
.card .figure { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card .figure strong { font: 500 30px/1 var(--display); }
.card.good .figure strong { color: var(--good); }
.card.watch .figure strong { color: var(--warn); }
.card .figure span { font-size: 12.5px; color: var(--muted); }
.card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.card .tone-label { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.card.good .tone-label { color: var(--good); } .card.watch .tone-label { color: var(--warn); } .card.question .tone-label { color: var(--question); }
@keyframes rise { from { opacity: .001; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* timing */
.timing { display: grid; grid-template-columns: repeat(var(--parts, 2), minmax(0, 1fr)); gap: 14px; }
.half-title { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.half-title b { color: var(--ink); font-weight: 600; letter-spacing: 0; }
.bins { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; height: 200px; position: relative; }
.bins::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--rule); pointer-events: none; }
.bin { display: grid; grid-template-rows: 1fr 1fr; cursor: pointer; }
.bin .up, .bin .down { position: relative; }
.bin .up i, .bin .down i {
  position: absolute; left: 12%; right: 12%; display: block; transition: height .55s cubic-bezier(.2,.7,.2,1);
}
.bin .up i { bottom: 1px; background: var(--us); border-radius: 4px 4px 0 0; }
.bin .down i { top: 1px; background: var(--them); border-radius: 0 0 4px 4px; }
.bin.added .up i { background: repeating-linear-gradient(135deg, var(--us) 0 3px, var(--us-soft) 3px 5px); }
.bin.added .down i { background: repeating-linear-gradient(135deg, var(--them) 0 3px, var(--them-soft) 3px 5px); }
.bin:hover .up i, .bin:hover .down i { filter: brightness(1.15); }
.bin-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-top: 4px; font-size: 10.5px; color: var(--muted); text-align: center; }

/* attack */
.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 10px; font-size: 13px; }
.funnel-row .track { height: 22px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.funnel-row .fill { height: 100%; background: var(--us); border-radius: 4px; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.funnel-row .fill.soft { background: var(--line-mid); }
.funnel-row .fill.pale { background: var(--line-fwd); }
.funnel-row .num { text-align: right; font-weight: 600; }
.ratio-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 6px; }
.ratio { border-top: 2px solid var(--ink); padding-top: 6px; }
.ratio strong { font: 500 24px/1.1 var(--display); display: block; }
.ratio span { font-size: 12px; color: var(--muted); }
.leaders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; margin-top: 12px; }
.leaders h4 { margin: 6px 0 2px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.leader { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; padding: 3px 0; border-bottom: 1px solid var(--rule); }
.leader b { font-weight: 600; }

/* squad */
.squad { display: grid; gap: 2px; }
.squad-head, .srow { display: grid; grid-template-columns: minmax(84px, 1.1fr) minmax(0, 2.2fr) 48px 44px 58px; align-items: center; gap: 10px; }
.squad-head { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 8px 6px; }
.squad-head span:nth-child(n+3) { text-align: right; }
.srow { padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; border: 1px solid transparent; background: none; text-align: left; width: 100%; }
.srow:hover { background: var(--surface-2); }
.srow[aria-pressed="true"] { border-color: var(--us); background: var(--us-soft); }
.srow.hl { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--ink); }
.srow .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .num { text-align: right; }
.share { display: grid; grid-template-columns: minmax(0, 1fr) 82px; align-items: center; gap: 8px; }
.share .track { position: relative; height: 14px; background: var(--surface-2); border-radius: 3px; }
.share i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--us); border-radius: 3px; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.share i.low { background: var(--muted); }
.share .fair { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); left: 66.6%; }
.share em { font: 500 12px/1 var(--body); font-style: normal; color: var(--muted); text-align: right; white-space: nowrap; }
@media (max-width: 480px) { .share { grid-template-columns: minmax(0, 1fr); } .share em { display: none; } }
.pm { font-weight: 600; text-align: right; }
.pm.pos { color: var(--us); } .pm.neg { color: var(--them); }
.squad-note { font-size: 12px; color: var(--muted); margin: 10px 8px 0; }
@media (max-width: 480px) {
  .squad-head, .srow { grid-template-columns: minmax(70px, 1fr) minmax(0, 1.6fr) 40px 50px; }
  .squad-head span:nth-child(4), .srow .starts { display: none; }
}

/* pitch */
.pitch-panel { display: grid; align-content: start; }
.pitch { position: relative; aspect-ratio: 68 / 105; max-height: 620px; width: 100%; margin: 0 auto; background:
  radial-gradient(120% 80% at 50% 50%, #12263f 0%, var(--pitch) 70%); border-radius: 8px; overflow: hidden; }
.pitch canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pitch-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pitch-lines * { fill: none; stroke: var(--pitch-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pos-labels { position: absolute; inset: 0; pointer-events: none; }
.pos-label { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; color: #e9f0ff; text-shadow: 0 1px 3px #000a; transition: left .5s, top .5s; }
.pos-label b { font: 600 10.5px/1.2 var(--body); letter-spacing: .04em; opacity: .75; }
.pos-label span { font: 500 15px/1.1 var(--display); }
.pos-label.top span { font-size: 19px; }
.attack-arrow { position: absolute; right: 10px; top: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #ffffff80; }
.linkish { justify-self: start; margin-top: 10px; background: none; border: 0; padding: 0; color: var(--us); font-weight: 600; cursor: pointer; }
@media (min-width: 901px) { .squad-grid .pitch { max-width: 380px; } }

/* strip */
.strip-head { align-items: center; }
.strip-controls { display: flex; gap: 6px; align-items: center; max-width: 100%; }
.strip-controls select { min-width: 0; max-width: 100%; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); }
.icon-btn { width: 34px; height: 34px; flex: none; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); font-size: 18px; line-height: 1; cursor: pointer; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.strip-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: 10px; }
.strip-summary .score { font: 500 30px/1 var(--display); }
.strip-summary .score .gf { color: var(--us); }
.strip-summary .score .ga { color: var(--them); }
.strip-summary .meta { font-size: 13px; color: var(--muted); }
.strip-wrap { overflow-x: auto; }
#strip { display: block; width: 100%; }
#strip text { font-family: var(--body); }
#strip .tick { fill: var(--muted); font-size: 10.5px; }
#strip .grid { stroke: var(--rule); }
#strip .part-bg { fill: var(--surface-2); }
#strip .row-label { fill: var(--ink-2); font-size: 11.5px; }
#strip .lane-label { fill: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; }
#strip .ev { cursor: default; }
#strip .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s cubic-bezier(.3,.6,.2,1) forwards; }
#strip .pop { transform-box: fill-box; transform-origin: center; animation: pop .45s cubic-bezier(.2,.9,.3,1.4) both; }
#strip .grow { transform-box: fill-box; transform-origin: left center; animation: grow .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* reading drill-down drawer */
.card { cursor: pointer; }
.card .more-hint { font-size: 12px; font-weight: 600; color: var(--us); margin-top: 2px; }
.drawer-scrim { position: fixed; inset: 0; background: #11161955; z-index: 30; animation: fade .2s both; }
.drawer { position: fixed; z-index: 31; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface); border-left: 1px solid var(--rule);
  box-shadow: -12px 0 40px #1116192a; overflow-y: auto; padding: 22px 22px 32px; animation: slide-in .28s cubic-bezier(.2,.7,.2,1) both; }
@media (max-width: 600px) {
  .drawer { top: auto; left: 0; width: 100%; max-height: 88vh; border-left: 0; border-top: 1px solid var(--rule); border-radius: 16px 16px 0 0; animation-name: slide-up; }
}
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.drawer-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); font-size: 20px; cursor: pointer; }
.drawer h2 { font-size: 26px; line-height: 1.1; margin: 8px 40px 6px 0; }
.drawer .figure { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.drawer .figure strong { font: 500 34px/1 var(--display); }
.drawer.good .figure strong { color: var(--good); } .drawer.watch .figure strong { color: var(--warn); }
.drawer .figure span { color: var(--muted); font-size: 13px; }
.drawer p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.drawer h3 { font: 600 11.5px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.why { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); }
.ev-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 44px; gap: 4px 10px; align-items: center; padding: 8px 6px; border-top: 1px solid var(--rule); cursor: pointer; border-radius: 6px; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; font-size: 13.5px; }
.ev-row:hover { background: var(--surface-2); }
.ev-row .d { color: var(--muted); font-size: 12.5px; }
.ev-row .s { text-align: right; font-weight: 700; }
.ev-row .s.W { color: var(--us); } .ev-row .s.L { color: var(--them); }
.ev-row svg { grid-column: 2 / 4; width: 100%; height: 18px; display: block; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn { font: 600 13.5px var(--body); padding: 9px 14px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--surface); cursor: pointer; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.player-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.drawer .card-top { display: flex; align-items: center; gap: 8px; }
.drawer .kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.drawer .tone-label { margin-left: auto; margin-right: 44px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.drawer.good .tone-label { color: var(--good); } .drawer.watch .tone-label { color: var(--warn); } .drawer.question .tone-label { color: var(--question); }

/* awards */
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.award { text-align: left; background: var(--surface-2); border: 1px solid transparent; border-radius: 10px; padding: 12px 14px; cursor: pointer; display: grid; gap: 3px; align-content: start; transition: border-color .2s, transform .2s; }
.award:hover, .award:focus-visible { border-color: var(--ink-2); transform: translateY(-2px); }
.award .aw-name { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.award .aw-winner { font: 500 22px/1.15 var(--display); color: var(--ink); }
.award .aw-value { font-size: 12.5px; color: var(--ink-2); }
.award .aw-next { font-size: 12px; color: var(--muted); }
.award::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--us); margin-bottom: 4px; }
.bd-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* development report */
.report { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--bg); padding: 16px 12px 40px; }
.report-open { overflow: hidden; }
.report-toolbar { max-width: 820px; margin: 0 auto 12px; display: flex; gap: 8px; justify-content: flex-end; }
.report-page { max-width: 820px; margin: 0 auto; background: #fff; color: #111619; border: 1px solid var(--rule); border-radius: 10px; padding: 34px 38px; display: grid; gap: 20px; font-size: 13.5px; }
.rp-head { display: flex; gap: 18px; align-items: center; border-bottom: 2px solid #111619; padding-bottom: 14px; }
.rp-logo { height: 44px; }
.rp-kicker { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #5a6672; }
.rp-head h1 { font-size: 34px; text-transform: uppercase; line-height: 1; margin: 2px 0 4px; }
.rp-head p { margin: 0; color: #5a6672; }
.rp-numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: #d9dee3; border: 1px solid #d9dee3; border-radius: 8px; overflow: hidden; }
.rp-numbers div { background: #fff; padding: 8px 12px; display: grid; }
.rp-numbers span { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #5a6672; }
.rp-numbers strong { font: 500 20px/1.2 var(--display); }
.rp-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; }
.report-page h3 { font: 700 11.5px/1.2 var(--body); letter-spacing: .09em; text-transform: uppercase; color: #1f5fe0; margin: 0 0 8px; }
.report-page section + section { margin-top: 16px; }
.report-page ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.rp-note { color: #5a6672; font-size: 12.5px; margin: 0 0 6px; }
.rp-award { background: #eef3fd; border-radius: 6px; padding: 8px 10px; margin: 0 0 8px; }
.rp-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rp-table th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #5a6672; border-bottom: 1px solid #d9dee3; padding: 4px 6px; }
.rp-table td { border-bottom: 1px solid #eef0f2; padding: 4px 6px; }
.rp-matches td:nth-child(n+3), .rp-matches th:nth-child(n+3) { text-align: right; }
.rp-arrow.up { color: #1f5fe0; } .rp-arrow.down { color: #c8102e; }
.rp-pitch { width: 100%; max-width: 260px; display: block; margin: 0 auto; }
.rp-grass { fill: #f3f6f4; stroke: #c5cdd4; stroke-width: .5; }
.rp-line { fill: none; stroke: #c5cdd4; stroke-width: .4; }
.rp-dot { fill: #1f5fe0; fill-opacity: .82; }
.rp-pos { font: 700 2.6px var(--body); fill: #fff; text-anchor: middle; }
.rp-min { font: 500 2.6px var(--body); fill: #fff; text-anchor: middle; }
.report textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid #d9dee3; border-radius: 8px; resize: vertical; color: #111619; background: #fff; }
.rp-notes-print { display: none; white-space: pre-wrap; }
.rp-foot { color: #5a6672; font-size: 11.5px; border-top: 1px solid #d9dee3; padding-top: 10px; }
@media (max-width: 700px) {
  .report-page { padding: 20px 16px; }
  .rp-cols { grid-template-columns: 1fr; }
  .rp-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-matches { font-size: 12px; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  body > *:not(#report) { display: none !important; }
  .report { position: static; overflow: visible; background: #fff; padding: 0; }
  .report-toolbar, .report textarea { display: none !important; }
  .rp-notes-print { display: block; min-height: 2em; }
  .report-page { border: 0; padding: 0; max-width: none; }
  .rp-matches tr { break-inside: avoid; }
}

/* filter bar */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.f-group { display: flex; align-items: center; gap: 8px; }
.f-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.filters select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); font-size: 13px; font-weight: 600; max-width: 180px; }
.filters select:disabled { opacity: .45; }
.set-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--us-soft); color: var(--ink); border: 1px solid var(--us); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 12.5px; font-weight: 600; }
.set-chip button { border: 0; background: none; font-size: 16px; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 0 4px; }
.filter-note { margin-top: 10px; color: var(--ink-2); font-weight: 500; }
.no-results .page > :not(.top):not(.lens-panel) { display: none; }
@media (max-width: 600px) { .f-group { flex-wrap: wrap; } .filters select { max-width: 46vw; } }

/* venue filter */
.venue { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; flex: none; }
.venue button { border: 0; background: var(--surface); padding: 6px 11px; font-size: 13px; font-weight: 600; cursor: pointer; }
.venue button + button { border-left: 1px solid var(--rule); }
.venue button span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.venue button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.venue button[aria-pressed="true"] span { color: inherit; opacity: .7; }
.venue button:disabled { opacity: .4; cursor: default; }
#lens .off { opacity: .18; }

/* home vs away */
.ha-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.ha-side { display: grid; gap: 2px; padding: 10px 14px; background: var(--surface-2); border-radius: 8px; }
.ha-side:last-child { text-align: right; justify-items: end; }
.ha-side .label { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ha-side strong { font: 500 28px/1.1 var(--display); }
.ha-side em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.ha-head, .ha-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) 58px minmax(0, 1fr) minmax(0, 1fr) 58px; gap: 8px; align-items: center; }
.ha-head { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; }
.ha-head span:nth-child(2) { text-align: right; }
.ha-row { padding: 5px 0; border-top: 1px solid var(--rule); font-size: 13.5px; }
.ha-label { color: var(--ink-2); }
.ha-val { text-align: right; font-weight: 500; color: var(--muted); }
.ha-val.away { text-align: left; }
.ha-val.win { color: var(--ink); font-weight: 700; }
.ha-bar { height: 12px; position: relative; }
.ha-bar i { position: absolute; top: 0; bottom: 0; background: var(--rule); transition: width .55s cubic-bezier(.2,.7,.2,1); }
.ha-bar.home i { right: 0; border-radius: 3px 0 0 3px; }
.ha-bar.away i { left: 0; border-radius: 0 3px 3px 0; }
.ha-bar.win i { background: var(--us); }
@media (max-width: 600px) {
  .ha-head { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 48px; }
  .ha-head span:first-child { display: none; }
  .ha-row { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 48px; row-gap: 3px; }
  .ha-label { grid-column: 1 / -1; font-size: 12.5px; }
  .ha-side strong { font-size: 22px; }
}

/* breakdown */
.bd-head { align-items: center; }
.bd-head select { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); font-weight: 600; max-width: 100%; }
.bd-profile { display: grid; grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
@media (max-width: 1000px) { .bd-profile { grid-template-columns: repeat(var(--n-mid, 4), minmax(0, 1fr)); } }
@media (max-width: 520px) { .bd-profile { grid-template-columns: repeat(var(--n-small, 2), minmax(0, 1fr)); } }
.bd-profile div { background: var(--surface); padding: 9px 12px; display: grid; gap: 1px; }
.bd-profile span { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.bd-profile strong { font: 500 22px/1.1 var(--display); }
.bd-profile em { font-style: normal; font-size: 12px; color: var(--muted); }
.stat-chips { justify-content: flex-start; margin-bottom: 12px; }
.chip:disabled { opacity: .4; cursor: default; }
.bd-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.bd-summary div { border-top: 2px solid var(--rule); padding-top: 6px; }
.bd-summary div.peak { border-top-color: var(--accent-now, var(--us)); }
.bd-summary strong { font: 500 24px/1.1 var(--display); display: block; }
.bd-summary span { font-size: 12.5px; color: var(--muted); }
.bd-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 22px; }
@media (max-width: 900px) { .bd-grid { grid-template-columns: 1fr; } }
.sub-h { font: 600 11.5px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.bd-pos { display: grid; gap: 3px; }
.bd-line { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin: 8px 0 2px; }
.bd-line:first-child { margin-top: 0; }
.pos-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 36px 72px; gap: 8px; align-items: center; font-size: 13px; }
.pos-row b { font-weight: 600; }
.pos-row .track { height: 12px; background: var(--surface-2); border-radius: 3px; position: relative; overflow: hidden; }
.pos-row .track i { position: absolute; inset: 0 auto 0 0; background: var(--bar, var(--us)); border-radius: 3px; transition: width .55s cubic-bezier(.2,.7,.2,1); }
.pos-row .num { text-align: right; font-weight: 600; }
.pos-row .rate { text-align: right; color: var(--muted); font-size: 12px; }
.heat-wrap { overflow-x: auto; }
#heat { display: block; width: 100%; }
#heat text { font-family: var(--body); }
#heat .tick { fill: var(--muted); font-size: 10.5px; }
#heat .row-label { fill: var(--ink-2); font-size: 11px; }
#heat .cell { transition: fill .35s; }
#heat .cell:hover { stroke: var(--ink); stroke-width: 1.5; }
#heat .total { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
#heat .lane-label { fill: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; }
.more { margin: 12px 2px 0; }
.breakdown .cards { margin-top: 4px; }

.coverage { font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; padding: 0 4px; }
.coverage b { color: var(--ink-2); font-weight: 600; }

.tooltip {
  position: fixed; z-index: 10; pointer-events: none; max-width: 260px; background: var(--ink); color: var(--surface);
  padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.4; box-shadow: 0 8px 24px #0004;
}
.tooltip b { font-weight: 700; }
.tooltip .t-sub { opacity: .75; }

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

/* lineup lab overlay */
.lab-view { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--bg); padding: 16px 12px 40px; }
.lab-page { max-width: 1180px; margin: 0 auto; display: grid; gap: 18px; }
.lab-body { display: grid; gap: 18px; }
.lab-toolbar { max-width: 1180px; justify-content: space-between; align-items: center; }
.lab-head h1 { font-size: clamp(30px, 4vw, 42px); text-transform: uppercase; line-height: 1; margin: 2px 0 4px; }
.lab-head p { margin: 0; font-size: 13px; }

.lab-view .lab { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
    @media (max-width: 900px) { .lab { grid-template-columns: 1fr; } }
.lab-view .lab-pitch { position: relative; aspect-ratio: 68 / 80; max-width: 420px; margin: 0 auto; background: radial-gradient(120% 80% at 50% 50%, #1a3a2a 0%, #10261b 75%); border-radius: 10px; overflow: hidden; }
.lab-view .lab-pitch svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-view .lab-pitch svg * { fill: none; stroke: #ffffff40; stroke-width: 1; vector-effect: non-scaling-stroke; }
.lab-view .slot { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 3px; cursor: pointer; border: 0; background: none; padding: 0; }
.lab-view .slot .shirt { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #111619; display: grid; place-items: center; font: 600 13px var(--body); box-shadow: 0 2px 8px #0006; border: 3px solid transparent; transition: transform .2s, border-color .2s; }
.lab-view .slot.changed .shirt { background: #fff1c7; }
.lab-view .slot .nm { color: #fff; font: 600 12px var(--body); text-shadow: 0 1px 3px #000; white-space: nowrap; }
.lab-view .slot.sel .shirt, .bench-chip.sel { border-color: #fab219; transform: scale(1.08); }
.lab-view .bench-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.lab-view .bench { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-view .bench-chip { border: 2px solid var(--rule); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; cursor: pointer; }
.lab-view .howto { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.lab-view .reset { margin-top: 12px; }
.lab-view .reset[aria-pressed="true"] { opacity: .6; cursor: default; }
.lab-view .reset[aria-pressed="false"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.lab-view .lab-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.lab-view .lab-toolbar { flex-wrap: wrap; gap: 10px; }
.lab-view .lab-filter .chips { justify-content: flex-start; }
.lab-view .f-group { display: flex; align-items: center; gap: 6px; }
.lab-view .answer { border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; display: grid; gap: 8px; background: var(--surface); }
.lab-view .answer + .answer { margin-top: 12px; }
.lab-view .answer .top { display: flex; align-items: center; gap: 8px; }
.lab-view .answer .tone-label { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lab-view .answer.good .tone-label { color: var(--good); } .answer.watch .tone-label { color: var(--warn); } .answer.question .tone-label { color: var(--question); }
.lab-view .answer .kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lab-view .answer h3 { font: 500 21px/1.2 var(--display); margin: 0; }
.lab-view .answer p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.lab-view details { font-size: 13px; color: var(--ink-2); }
.lab-view summary { cursor: pointer; color: var(--us); font-weight: 600; font-size: 13px; }
.lab-view details[open] summary { margin-bottom: 8px; }
.lab-view .why-box { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; }
.lab-view .why-box table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.lab-view .why-box td { padding: 3px 6px; border-bottom: 1px solid var(--rule); }
.lab-view .why-box td:last-child { text-align: right; }
.lab-view .bar { height: 10px; border-radius: 3px; background: var(--us); display: block; }
.lab-view .qs { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
  
.lab-btn { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.lab-btn:hover { border-color: var(--us); }
@media (max-width: 520px) { .toolbar { flex-wrap: wrap; justify-content: flex-end; } }

/* lineup lab: availability, plan, lists, map */
.lab-view .avail { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-view .avail .caption { flex-basis: 100%; }
.lab-view .avail-chip { border: 1px solid var(--rule); background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: line-through; }
.lab-view .avail-chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--ink-2); text-decoration: none; }
.lab-view .avail-chip[aria-pressed="true"]::before { content: "✓ "; color: var(--good); }
.lab-view .plain-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.lab-view .lab-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .lab-view .lab-2 { grid-template-columns: 1fr; } }
.lab-view .map-head { margin-top: 16px; }
.lab-view .matrix { overflow-x: auto; }
.lab-view .matrix table { border-collapse: separate; border-spacing: 2px; font-size: 11.5px; }
.lab-view .matrix th { font-weight: 600; color: var(--ink-2); padding: 2px 4px; white-space: nowrap; text-align: right; }
.lab-view .matrix th.col { writing-mode: vertical-rl; transform: rotate(180deg); height: 74px; text-align: left; }
.lab-view .matrix th.on { color: var(--us); }
.lab-view .matrix td { width: 34px; height: 26px; text-align: center; border-radius: 4px; font-variant-numeric: tabular-nums; }
.lab-view .matrix td.na { background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, var(--surface) 3px 6px); }
.lab-view .matrix td.self { background: none; }
.lab-view .matrix td.hl { outline: 2px solid #111619; outline-offset: -1px; }
.lab-view .lineup-modes { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.lab-view .lineup-modes .tool-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
}

/* the same match bar inside the lab */
.lens { display: block; width: 100%; height: 132px; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.lens:focus:not(:focus-visible) { outline: none; }
.lens .bar { transition: opacity .25s; }
.lens .dim { fill: var(--surface); opacity: .72; pointer-events: none; }
.lens .win { fill: none; stroke: var(--ink); stroke-width: 1.5; pointer-events: none; }
.lens .handle { fill: var(--ink); cursor: ew-resize; }
.lens .grip { stroke: var(--surface); stroke-width: 1.2; pointer-events: none; }
.lens .season-line { stroke: var(--rule); stroke-dasharray: 2 3; }
.lens .season-label { fill: var(--muted); font: 600 10.5px var(--body); letter-spacing: .06em; }
.lens .axis { stroke: var(--rule); }
.lens .hl { stroke: var(--ink); stroke-width: 2; }
.lens .sel-mark { fill: var(--ink); }
.lens .off { opacity: .18; }
.lens { display: block; width: 100%; height: 110px; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.lab-view .lens-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; }
.lab-view .lens-panel .caption { margin-top: 6px; }
