/* ScoreProb team and league Stats sections (st-v1). Uses the .ld tokens of sp-league-detail.css. */
.st { --st-y: #c99a06; --st-mk: var(--ink); }
html[data-theme="dark"] .st { --st-y: #e2b33c; }
.st h3 { margin: 0; font-size: 14.5px; font-weight: 800; line-height: 1.3; }
:where(.st) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: inherit; cursor: pointer; }
.st button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.st-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.st-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.st-kick { display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.st-src { padding: 0 18px 16px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.st-head { align-items: flex-start; }
.st-head-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-ctl { display: flex; flex-wrap: wrap; gap: 8px; }
.st-comps { flex-wrap: wrap; }
.st-comp-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.st-comp-line img { width: 20px; height: 20px; object-fit: contain; }
.st-comp-line a { font-weight: 700; color: var(--ink); }
.st-comp-line a:hover { text-decoration: underline; }

/* ---- key figures ---- */
.st-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.st-kpi { display: flex; flex-direction: column; gap: 5px; padding: 12px 12px 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); min-width: 0; }
.st-kpi:hover { border-color: var(--accent); }
.st-kpi[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.st-l { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-v { font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-n { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.st-bar { position: relative; height: 6px; border-radius: 3px; background: var(--track); margin: 2px 0; }
.st-bar i { display: block; height: 6px; border-radius: 3px; background: var(--accent); }
.st-bar u, .st-split u { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--st-mk); opacity: .75; }

/* ---- boxes ---- */
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.st-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); min-width: 0; }
.st-wide { grid-column: 1 / -1; }
.st-h3b { margin-top: 6px; }

/* columns (rounds, goal totals, minutes) */
.st-cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 4px; align-items: end; }
.st-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0; }
.st-col > b { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.st-col > i { display: block; width: 70%; max-width: 34px; border-radius: 4px 4px 0 0; background: var(--accent); }
.st-col > i.st-y { background: var(--st-y); }
.st-col > span:last-child { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
button.st-col:hover > i { filter: brightness(1.12); }
.st-cols-s .st-col > span:last-child { font-size: 10px; }
.st-stk { display: flex; flex-direction: column; gap: 2px; width: 70%; max-width: 34px; }
.st-stk i { display: block; }
.st-stk i:first-child { border-radius: 4px 4px 0 0; }
.st-h { background: var(--accent); }
.st-a { background: var(--away); }
.st-prs { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 80%; max-width: 40px; height: 90px; }
.st-prs i { display: block; width: calc(50% - 1px); border-radius: 3px 3px 0 0; }
.st-prs u { position: absolute; left: -2px; right: -2px; height: 2px; background: var(--st-mk); opacity: .7; }
.st-pv { display: flex; gap: 6px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.st-pv-g { color: var(--muted); }
.st-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.st-legend i.st-mk { height: 2px; width: 12px; background: var(--st-mk); opacity: .7; }

/* goal lines */
.st-line { display: grid; width: 100%; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.st-st-r, .st-kpi, .st-ha-c, .st-col { width: 100%; }
.st-line-l { color: var(--ink); font-weight: 600; white-space: nowrap; }
.st-split { position: relative; height: 10px; border-radius: 5px; background: var(--track); }
.st-split i { display: block; height: 10px; border-radius: 5px; background: var(--accent); }
.st-line-v { font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
.st-line-v b { color: var(--ink); font-size: 13px; }
.st-line:hover .st-split i { filter: brightness(1.12); }

/* half-time to full-time grid */
.st-mx { display: flex; flex-direction: column; gap: 5px; }
.st-mx-r { display: grid; grid-template-columns: 104px repeat(3, minmax(0, 1fr)); gap: 5px; align-items: center; }
.st-mx-c { text-align: center; font-size: 11.5px; color: var(--muted); }
.st-mx-rh { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.st-mx-v { padding: 10px 2px; border-radius: 8px; text-align: center !important; background: color-mix(in srgb, var(--accent) calc(var(--a) * 100%), transparent); }
.st-mx-v b { font-size: 17px; font-variant-numeric: tabular-nums; }
.st-mx-v:hover { outline: 1px solid var(--accent); }

/* score chips */
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; }
.st-chip b { font-variant-numeric: tabular-nums; }
.st-chip span { font-size: 11.5px; color: var(--muted); }
.st-chip:hover { border-color: var(--accent); }

/* facts list */
.st-dl { display: flex; flex-direction: column; }
.st-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.st-dl > div:last-child { border-bottom: 0; }
.st-dl dt { color: var(--muted); }
.st-dl dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.st-dl dd i { font-weight: 400; color: var(--muted); }
.st-lk { color: var(--accent-deep) !important; text-decoration: underline dotted; text-underline-offset: 3px; }

/* home and away, half-time states */
.st-ha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-ha-c { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: 12.5px; color: var(--muted); }
.st-ha-c b { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.st-ha-c:hover { outline: 1px solid var(--accent); }
.st-st { display: flex; flex-direction: column; }
.st-st-r { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1.2fr); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.st-st-r:last-child { border-bottom: 0; }
.st-st-r b { font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.st-st-r:hover > span:first-child { text-decoration: underline; }
.st-wdl { color: var(--muted); font-size: 12.5px; }

/* scorers */
.st-pl li { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.st-pl-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.st-pl-v b { font-size: 15px; font-variant-numeric: tabular-nums; }
.st-pl-v i { font-size: 11.5px; color: var(--muted); }
.st-pl-a { font-size: 12px; color: var(--muted); text-align: right; }
.st-more > summary { list-style: none; cursor: pointer; padding: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--accent); }
.st-more > summary::-webkit-details-marker { display: none; }
.st-more[open] > summary { display: none; }

/* every team */
.st-board { padding-bottom: 8px; }
.st-tw { overflow-x: auto; margin: 0 -14px; }
.st-t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.st-t th, .st-t td { padding: 0 8px; height: 38px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.st-t thead th { height: 34px; background: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.st-t thead button { text-transform: inherit; letter-spacing: inherit; font-weight: inherit; color: inherit; white-space: nowrap; }
.st-t thead th[aria-sort] button::after { content: " ▾"; }
.st-t thead th[aria-sort="ascending"] button::after { content: " ▴"; }
.st-t thead th[aria-sort] { color: var(--ink); }
.st-t thead button:hover { color: var(--ink); }
.st-t .st-tc { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 150px; max-width: 210px; padding-left: 14px; }
.st-t thead .st-tc { background: var(--soft); }
.st-t tbody tr:hover td, .st-t tbody tr:hover th { background: var(--soft); }
.st-t td:last-child, .st-t th:last-child { padding-right: 14px; }
.st-b { font-weight: 800; }
.st-cell { color: var(--accent-deep) !important; text-decoration: underline dotted; text-underline-offset: 3px; text-align: right !important; }

/* against our numbers */
.st-vs-h { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.st-ver { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--hit); }
.st-vs-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 2px; }
.st-vs-r { display: grid; grid-template-columns: 128px minmax(0, 1fr) minmax(0, 1fr) 130px; align-items: center; font-size: 12.5px; padding: 3px 0; }
.st-vs-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-vs-n a:hover { text-decoration: underline; }
.st-vs-neg { display: flex; justify-content: flex-end; height: 12px; border-right: 1px solid var(--line); margin-left: 6px; }
.st-vs-pos { margin-right: 10px; }
.st-vs-neg i { display: block; height: 12px; border-radius: 3px 0 0 3px; background: var(--away); }
.st-vs-pos i { display: block; height: 12px; border-radius: 0 3px 3px 0; background: var(--accent); }
.st-vs-d { text-align: right; white-space: nowrap; }
.st-vs-d i { color: var(--muted); font-size: 11.5px; }
.st-vs-big { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.st-vs-big > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px; background: var(--soft); }
.st-vs-big b { font-size: 19px; font-variant-numeric: tabular-nums; }
.st-vs-big span { font-size: 11.5px; color: var(--muted); line-height: 1.3; }

/* matches behind a figure */
.st-list { border: 1px solid var(--accent); border-radius: 12px; overflow: hidden; scroll-margin-top: calc(var(--hdr) + var(--bar) + 14px); }
.st-list-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--accent-soft); }
.st-list-h b { font-size: 14px; }
.st-list-n { font-size: 12.5px; color: var(--muted); }
.st-clear { font-size: 12.5px !important; font-weight: 700 !important; color: var(--accent-deep) !important; white-space: nowrap; }
.st-rows { max-height: 420px; overflow-y: auto; }
.st-rows li { display: grid; grid-template-columns: 92px minmax(0, 1fr) 52px minmax(0, 1fr) 62px; gap: 8px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13px; position: relative; }
.st-rows li a.st-ml { position: absolute; inset: 0; }
.st-rows li:hover { background: var(--soft); }
.st-r-d { font-size: 12px; color: var(--muted); white-space: nowrap; }
.st-r-h, .st-r-a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.st-r-h { text-align: right; }
.st-r-s { text-align: center; padding: 2px 6px; border-radius: 6px; background: var(--soft); font-weight: 800; font-variant-numeric: tabular-nums; }
.st-r-ht { font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.st-r-me { color: var(--accent-deep); }
.st-rows .st-empty { display: block; color: var(--muted); }

/* the league page row below stats has two cards */
.ld-three.st-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1180px) {
  .st-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-vs-rows { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .st-grid { grid-template-columns: minmax(0, 1fr); }
  .ld-three.st-three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .st-body { padding: 0 14px 14px; gap: 12px; }
  .st-src { padding: 0 14px 14px; }
  .st-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .st-kpi { padding: 10px; }
  .st-v { font-size: 19px; }
  .st-box { padding: 12px; }
  .st-tw { margin: 0 -12px; }
  .st-t .st-tc { min-width: 128px; max-width: 150px; padding-left: 12px; }
  .st-mx-r { grid-template-columns: 84px repeat(3, minmax(0, 1fr)); }
  .st-vs-r { grid-template-columns: 104px minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .st-vs-d i { display: none; }
  .st-vs-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-rows li { grid-template-columns: 62px minmax(0, 1fr) 46px minmax(0, 1fr); }
  .st-r-ht { grid-column: 2 / -1; text-align: center; margin-top: -4px; }
  .st-pl li { grid-template-columns: minmax(0, 1fr) auto 76px; }
  .st-line { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px; }
}
