/* Public scores pages (scores.html) and downloaded scorecards. Light by default, dark when
   the viewer chose Dark in Account settings (html[data-theme=dark]). Brand colour: Apex blue #2E7BFF (brand kit). */
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Medium.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-SemiBold.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Bold.woff') format('woff'); font-weight: 700 900; font-display: swap; }

:root {
  --bg: #ffffff; --card: #ffffff; --ink: #0a0a0a; --muted: #737373; --line: #e5e5e5; --soft: #f5f5f5;
  --brand: #2e7bff; --brand-2: #1f66e0; --brand-soft: #e8f0ff; --good: #12804a; --good-soft: #e3f6ec; --bad: #c0392b; --bad-soft: #fdecea;
  --gold: #b7791f; --gold-soft: #fff4dc; --live: #e0245e;
  /* Recent results bubbles (v2.52.0), white bold text on each */
  --chip-sport: #475569; --chip-cricket: #15803d; --chip-netball: #7c3aed; --chip-soccer: #c2410c; --chip-comp: #1f66e0; --chip-court: #0f172a;
  --r-ctl: 6px; --r-card: 12px; --ctl-h: 36px;
  color-scheme: light;
}
/* Dark: shadcn zinc surfaces shared with the dashboard */
html[data-theme=dark] {
  --bg: #0a0a0a; --card: #171717; --ink: #fafafa; --muted: #a3a3a3; --line: rgba(255, 255, 255, .1); --soft: #262626;
  --brand: #2e7bff; --brand-2: #8fb6ff; --brand-soft: #12244f; --good: #4cd38a; --good-soft: #13301f; --bad: #ff7a6b; --bad-soft: #3a1c1a;
  --gold: #f0c060; --gold-soft: #3a2e12; --live: #ff5c8a;
  --chip-sport: #475569; --chip-cricket: #15803d; --chip-netball: #7c3aed; --chip-soccer: #c2410c; --chip-comp: #2e6be0; --chip-court: #3f4a5c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* Always keep room for the scroll bar so the page never jumps sideways when a table makes it taller or shorter (v2.48.4) */
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 'Inter', system-ui, -apple-system, Segoe UI, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-weight: 400; }
.sx-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.sx-brand { font-weight: 700; letter-spacing: 2px; color: var(--ink); display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sx-brand .mk { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand); color: #fff; letter-spacing: 0; }
.sx-main { max-width: 1180px; margin: 0 auto; padding: 16px; }
/* Statistics tables have 19 columns: give them the width of a 1920 screen so they never scroll sideways on a desktop.
   Keyed on the stats tab too, so the page keeps one width while loading or with no division ticked and the filters never move */
.sx-main:has(.sx-statwrap, .sx-tabs[data-tab="stats"]) { max-width: 1600px; }
.sx-foot { text-align: center; padding: 24px 16px 40px; font-size: 13px; }

.sx-head { margin: 8px 0 16px; }
.sx-head h1 { font-size: clamp(22px, 4vw, 32px); margin: 4px 0; line-height: 1.15; }
/* Team logo or letters (scorecard-view.js teamBadge, v2.51.0) */
.team-badge { display: inline-grid; place-items: center; flex: none; width: var(--tb, 32px); height: var(--tb, 32px); border-radius: calc(var(--tb, 32px) * .22); overflow: hidden; vertical-align: middle; background: var(--brand-soft); color: var(--brand-2); border: 1px solid var(--line); font-weight: 700; line-height: 1; font-size: calc(var(--tb, 32px) * .42); letter-spacing: -.02em; }
.team-badge.tb-3 { font-size: calc(var(--tb, 32px) * .32); }
.team-badge.tb-4 { font-size: calc(var(--tb, 32px) * .26); }
.team-badge img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 8%; box-sizing: border-box; }
/* Team photo and description (scores-team.js, v2.50.0) */
.tp-name { display: flex; align-items: center; gap: 14px; margin: 4px 0; }
.tp-name h1 { margin: 0; }
.tp-about { margin: 12px 0 0; max-width: 68ch; line-height: 1.5; }
.tp-photo { display: block; max-width: 100%; max-height: 420px; margin: 16px 0 0; border-radius: 16px; border: 1px solid var(--line); background: var(--soft); }
.sx-crumbs { display: flex; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.pill { display: inline-block; vertical-align: middle; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); letter-spacing: .3px; }
.pill.live { background: var(--live); color: #fff; animation: pulse 2s infinite; }
.pill.final { background: var(--brand-soft); color: var(--brand-2); }
@keyframes pulse { 50% { opacity: .65; } }

.sx-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; margin-bottom: 16px; }
.sx-spawtz { display: block; width: 100%; height: 480px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; }
.sx-card h3 { margin: 0 0 12px; font-size: 17px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sx-card h3 .muted { font-size: 13px; }
.sx-h2 { font-size: 20px; margin: 24px 0 12px; }
.sx-empty { text-align: center; padding: 40px 16px; }
.sx-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sx-legend { font-size: 12.5px; margin: 10px 0 0; }
/* Moments sit below the scoresheet (Dave 2026-11-09) */
.sx-legend + .sx-card { margin-top: 24px; }

/* Score summary */
.sx-score { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sx-score th, .sx-score td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.sx-score thead th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.sx-score tbody th { text-align: left; font-size: clamp(16px, 2.6vw, 22px); }
.sx-score td { font-size: clamp(16px, 2.6vw, 22px); font-weight: 600; }
.sx-score td.won { color: var(--good); background: var(--good-soft); border-radius: 8px; }
.sx-score td.tot { font-size: clamp(22px, 4vw, 34px); font-weight: 700; white-space: nowrap; }
.sx-score td.tot small { font-size: 13px; color: var(--muted); font-weight: 400; }
.sx-score td.pts { color: var(--brand-2); font-weight: 700; }
.sx-score tr.win th::after { content: ' ✓'; color: var(--good); }
.sx-so tr.win td b::after { content: ' ✓'; color: var(--good); }
.sx-so td.tot { font-weight: 700; }
.sx-so-balls span { display: inline-block; min-width: 1.6em; text-align: center; }
.sx-result { font-size: 17px; font-weight: 600; margin: 12px 0 0; }
.sx-pom { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--gold-soft); color: var(--ink); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sx-pom span { color: var(--gold); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .6px; }
.sx-pom b { font-size: 18px; }

/* Tables */
.sx-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 16px; }
.sx-players .sx-card { margin-bottom: 0; }
.sx-players { margin-bottom: 16px; }
/* Scorecard team tables fit their box: names wrap, tighter cells (Dave 2026-10-21: no scrollbars) */
.sx-players .sx-table th, .sx-players .sx-table td { padding: 8px 5px; }
.sx-players .sx-table th:first-child, .sx-players .sx-table td:first-child { padding-left: 8px; }
.sx-players .sx-table td.l { white-space: normal; min-width: 7em; }
@media (max-width: 560px) {
  .sx-players .sx-card { padding: 12px 8px; }
  .sx-players .sx-table { font-size: 12px; letter-spacing: -.2px; }
  .sx-players .sx-table thead th { font-size: 11px; letter-spacing: 0; }
  .sx-players .sx-table th, .sx-players .sx-table td { padding: 7px 2px; }
  .sx-players .sx-table th:first-child, .sx-players .sx-table td:first-child { padding-left: 4px; }
  .sx-players .sx-table td.l { min-width: 4.5em; }
}
.sx-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.sx-table th, .sx-table td { padding: 8px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sx-table .l { text-align: left; }
.sx-table thead th { position: sticky; top: 0; background: var(--card); font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .4px; user-select: none; }
.sx-table thead th[data-key] { cursor: pointer; }
.sx-table thead th[data-key]:hover { color: var(--ink); }
.sx-table thead th.sorted { color: var(--brand-2); }
.sx-table thead th.sorted.desc::after { content: ' ▼'; font-size: 9px; }
.sx-table thead th.sorted.asc::after { content: ' ▲'; font-size: 9px; }
.sx-table tbody tr:nth-child(even) { background: var(--soft); }
.sx-table tbody tr:hover { background: var(--brand-soft); }
.sx-table tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
.sx-table td.c { font-weight: 700; }
.sx-table td.pos { color: var(--good); }
.sx-table td.neg { color: var(--bad); }
.sx-table td.pts { font-weight: 700; color: var(--brand-2); }
.sx-table .star { color: var(--gold); }
.sx-stats td:first-child, .sx-stats th:first-child { position: sticky; left: 0; background: inherit; }
/* The Player heading stays put with its column: opaque, and above the headings and cells scrolling under it */
.sx-stats thead th { z-index: 2; }
.sx-stats thead th:first-child { background: var(--card); z-index: 3; }
.sx-stats tbody td:first-child { z-index: 1; }
.sx-stats tbody tr { background: var(--card); }
.sx-stats tbody tr:nth-child(even) { background: var(--soft); }
.sx-statwrap { max-height: 75vh; }
.sx-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.sx-filters input, .sx-filters select { font: inherit; padding: 0 12px; border-radius: var(--r-ctl); min-height: var(--ctl-h); border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.sx-filters input[type=search] { flex: 1 1 200px; }
.sx-filters .sx-tick { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.sx-filters .sx-tick input { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--brand); }
.sx-stats .tm-m { display: none; }
/* Column picker (v1.95.0): a Columns button in the filters, its list drops below it */
.sx-filters { position: relative; }   /* the column list spans the filters row, under it */
.sx-cols summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px 0 12px; min-height: var(--ctl-h); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); color: var(--ink); font-size: 14px; cursor: pointer; user-select: none; }  /* 9px: the chevron has 3px of its own space */
.sx-cols summary::-webkit-details-marker { display: none; }
.sx-cols summary .ic { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.sx-cols[open] summary { border-color: var(--brand); }
.sx-cols[open] summary .ic { transform: rotate(180deg); }
.sx-colpop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 4px; padding: 8px; max-height: 60vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 8px 24px rgba(16, 24, 40, .14); }
.sx-filters .sx-colpop .sx-tick { padding: 6px 8px; white-space: normal; font-size: 13.5px; border-radius: var(--r-ctl); color: var(--ink); }
.sx-colpop .sx-tick:hover { background: var(--soft); }
.sx-colpop .sx-tick b { min-width: 32px; font-weight: 600; }
.sx-colpop .sx-tick input { min-height: 0; flex: none; }
@media (prefers-reduced-motion: reduce) { .sx-cols summary .ic { transition: none; } }

/* Moments */
.sx-moments { list-style: none; margin: 0; padding: 0; }
.sx-moments li { display: grid; grid-template-columns: 30px 120px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.sx-moments li:last-child { border-bottom: 0; }
.sx-moments .ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); font-size: 13px; font-weight: 700; }
.sx-moments .ic .mi { width: 16px; height: 16px; }
.sx-moments .m-seven .ic, .sx-moments .m-five .ic { background: var(--gold-soft); color: var(--gold); }
.sx-moments .m-wicket .ic, .sx-moments .m-run_out .ic { background: var(--bad-soft); }
.sx-moments .m-drs .ic { background: var(--brand-soft); }
.sx-moments .m-innings, .sx-moments .m-pair { color: var(--muted); }
.sx-moments .m-innings .what { font-weight: 700; color: var(--ink); }
.sx-moments .when { font-size: 12.5px; color: var(--muted); }
.sx-moments .watch { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--brand); color: #fff; white-space: nowrap; }
.sx-moments .watch:hover { text-decoration: none; filter: brightness(1.1); }
@media (max-width: 560px) { .sx-moments li { grid-template-columns: 30px 1fr auto; } .sx-moments .when { grid-column: 2; grid-row: 2; } }

/* Scoresheet */
.sx-sheet { border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13.5px; margin-bottom: 14px; min-width: 100%; }
.sx-sheet th, .sx-sheet td { border: 1px solid var(--line); padding: 5px 4px; text-align: center; min-width: 30px; }
.sx-sheet .l { text-align: left; min-width: 150px; padding: 5px 8px; white-space: nowrap; }
.sx-sheet thead th { background: var(--soft); font-size: 12px; font-weight: 600; }
/* Thicker lines box each skin (table), each over (header, first ball), the Runs column and the header row */
.sx-sheet { border: 2px solid var(--muted); }
.sx-sheet thead th { border-bottom: 2px solid var(--muted); }
.sx-sheet .ov, .sx-sheet td.o1, .sx-sheet .bt { border-left: 2px solid var(--muted); }
/* Over header: two equal halves, over number and bowler centred on the left (the name wraps to a third line), wickets/runs centred on the right */
.sx-sheet th.ov > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; width: 0; min-width: 100%; }   /* width 0: the balls, not the bowler name, size the over */
.sx-sheet thead small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.sx-sheet th.ov small { overflow-wrap: anywhere; line-height: 1.25; }
.sx-sheet th.ov .fig { font-size: 13px; font-weight: 700; color: var(--ink); }
.sx-sheet td.ball { font-weight: 600; padding-top: 6px; padding-bottom: 4px; }   /* Inter digits otherwise sit 1px high in the cell */
/* Ball highlights, the same everywhere (scorecard, Scoring sheet, Scoreboard Summary, OBS, Scoreboard Plus; Dave 2026-11-04):
   jackpot yellow, wicket red, wide or no ball green, 7 or more gold, solid with white text (dark on yellow). Keep the four stylesheets in step. */
:root { --hl-jk: #f2c14e; --hl-jk-ink: #241a00; --hl-out: #e02424; --hl-ex: #16a34a; --hl-7: #b7791f; --hl-ink: #ffffff; }
.sx-sheet td.out { background: var(--hl-out); color: var(--hl-ink); }
.sx-sheet td.extra { background: var(--hl-ex); color: var(--hl-ink); }
/* Skin penalty runs shaded red so they stand out (Dave, 2026-11-02) */
.sx-sheet thead small.pen { display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: 6px; background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.sx-sheet td.big { background: var(--hl-7); color: var(--hl-ink); }
.sx-sheet td.jk { background: var(--hl-jk); color: var(--hl-jk-ink); font-weight: 800; }
/* Balls that go to the livestream: highlights are plain links, a DRS ball gets the animated rainbow border (Dave, 2026-10-28) */
.sx-sheet .hl-cell, .sx-sheet .drs-cell { display: block; color: inherit; text-decoration: none; }
.sx-sheet .hl-cell:hover { text-decoration: underline; }
@property --drs-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.sx-sheet .drs-cell { position: relative; padding: 4px 3px 2px; border-radius: 6px; }
.sx-sheet .drs-cell::before { content: ''; position: absolute; inset: -1px; padding: 2px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--drs-angle), #ff2d55, #ff9500, #ffd60a, #30d158, #0a84ff, #bf5af2, #ff2d55);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: drs-spin 3s linear infinite; }
.sx-sheet .drs-cell small { display: block; font-size: 9px; font-weight: 800; letter-spacing: .08em; line-height: 1.1; }
@keyframes drs-spin { to { --drs-angle: 360deg; } }
.sx-watch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sx-watch .watch { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: var(--brand); color: #fff; white-space: nowrap; }
.sx-watch .watch.live { background: var(--live); }
.sx-watch .watch:hover { text-decoration: none; filter: brightness(1.1); }
.sx-sheet .bt { font-weight: 700; min-width: 48px; }
.sx-sheet thead th.skin { color: var(--ink); font-size: 15px; font-weight: 700; background: var(--brand-soft); }

/* Games list */
.sx-games { list-style: none; margin: 0; padding: 0; }
.sx-games a { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); color: var(--ink); }
.sx-games a:hover { background: var(--soft); text-decoration: none; }
.sx-games .h, .sx-games .a { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sx-games .t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.sx-games .h .t { justify-content: flex-end; text-align: right; }
.sx-games .n { min-width: 0; overflow-wrap: break-word; }
.sx-games .t.w { font-weight: 700; }
/* Runs bigger than the names so they stand out (some team names hold numbers); winner bold, loser regular */
.sx-games .t { align-items: baseline; gap: 16px; }
.sx-games .t b { font-size: 20px; line-height: 1; font-weight: 400; font-variant-numeric: tabular-nums; }
.sx-games .t.w b { font-weight: 700; }
.sx-games .d, .sx-games .s { flex: none; font-size: 13px; white-space: nowrap; }
.sx-games .d, .sx-games .v { color: var(--muted); } .sx-games .v { white-space: nowrap; min-width: 3.5em; text-align: center; }
.sx-games .s { color: var(--brand-2); }
@media (max-width: 560px) { .sx-games a, .sx-games .h, .sx-games .a { gap: 6px; } .sx-games .d, .sx-games .s { font-size: 12px; } .sx-games .t { flex-direction: column; align-items: flex-start; gap: 0; } .sx-games .h .t { align-items: flex-end; } .sx-games .t b { order: -1; } .sx-games .wd { display: none; } }

/* Live now and recent results on a venue page (scores-venue.js nowHtml): one tile a game, details and
   status on top, then a line per team with its runs; as many tiles a row as fit */
/* Live now and recent results tiles (scores-venue.js nowHtml, v2.52.0): coloured bubbles for sport, competition and
   court; each team row in its team colour (Scoreboard colours, any '#rrggbb' sets --tc/--on inline), won skins filled */
.rt { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr)); gap: 14px; }
.rt > li > a { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; color: var(--ink); }
.rt > li > a:hover { text-decoration: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.rt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 12px 14px 10px; }
.rt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; line-height: 1; color: #fff; background: var(--chip-sport); white-space: nowrap; }
.rt-chip[data-sport=indoor_cricket] { background: var(--chip-cricket); }
.rt-chip[data-sport=indoor_netball] { background: var(--chip-netball); }
.rt-chip[data-sport=indoor_soccer] { background: var(--chip-soccer); }
.rt-chip.rt-comp { background: var(--chip-comp); white-space: normal; height: auto; min-height: 24px; padding: 4px 10px; border-radius: 12px; }
.rt-chip.rt-court { background: var(--chip-court); }
.rt-when { font-size: 13px; color: var(--muted); white-space: nowrap; line-height: 24px; }
.rt-rows { display: grid; align-content: center; }
.rt-row { --tc: var(--brand); --on: #fff; display: grid; grid-template-columns: 6px 32px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 14px 7px 0; }
.rt-row.win { background: color-mix(in srgb, var(--tc) 12%, transparent); }
.rt-bar { align-self: stretch; background: var(--tc); border-radius: 0 4px 4px 0; }
.rt-name { font-weight: 600; line-height: 1.2; min-width: min-content; }
.rt-skins { display: flex; gap: 4px; }
.rt-skins > span { display: grid; place-items: center; width: 34px; height: 30px; border-radius: var(--r-ctl); background: var(--soft); color: var(--muted); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.rt-skins > span.w { background: var(--tc); color: var(--on); font-weight: 800; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
html[data-theme=dark] .rt-skins > span.w, html[data-theme=dark] .rt-bar { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.rt-tot { min-width: 48px; text-align: right; font-size: 22px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.rt-row:not(.win) .rt-tot { color: var(--muted); font-weight: 600; }
.rt-res { padding: 10px 14px 12px; border-top: 1px solid var(--line); margin-top: 6px; font-size: 14px; font-weight: 600; }
.rt-res b { color: var(--brand-2); }
/* Team colours as on the Scoreboard Summary (dashboard style.css .sc-board) */
.rt [data-c=blue] { --tc: #2563eb; --on: #fff; } .rt [data-c=white] { --tc: #e2e8f0; --on: #0f172a; } .rt [data-c=red] { --tc: #dc2626; --on: #fff; }
.rt [data-c=orange] { --tc: #f59e0b; --on: #111; } .rt [data-c=green] { --tc: #22c55e; --on: #052e16; } .rt [data-c=purple] { --tc: #7c3aed; --on: #fff; }
.rt [data-c=yellow] { --tc: #facc15; --on: #111; }
@media (max-width: 480px) {
  .rt-skins { gap: 3px; } .rt-skins > span { width: 29px; }
  .rt-row { gap: 8px; } .rt-name { font-size: 14px; }
  .rt-top { flex-direction: column; gap: 6px; } .rt-when { line-height: 1.3; }
}
.sx-day { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sx-card h3 + .sx-day { margin-top: 0; }
.sx-none { margin: 0; }
.sx-card h3 .pill { align-self: center; }

@media print {
  .sx-bar, .sx-crumbs, .sx-moments .watch, .sx-watch, .sx-filters { display: none; }
  body { background: #fff; color: #000; }
  .sx-card { box-shadow: none; break-inside: avoid; }
}

/* Venues, scope bar, tabs and statistics (scores-venue.js) */
.sx-list { list-style: none; margin: 0; padding: 0; }
.sx-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.sx-list li:last-child { border-bottom: 0; }
.sx-list li > a, .sx-list li > span:first-child { display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.sx-list li > a:hover { text-decoration: none; color: var(--brand-2); }
.sx-list .muted { font-size: 13px; }
.sx-gap { margin: -4px 0 8px; }
.sx-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.sx-tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sx-tabs a:hover { color: var(--ink); text-decoration: none; }
.sx-tabs a.on { color: var(--brand-2); border-bottom-color: var(--brand); }
.sx-scope { display: grid; gap: 10px; }
.sx-scope-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sx-season-row { margin-bottom: 10px; }
.sx-season-row label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sx-season-row select { font: inherit; color: var(--ink); padding: 0 10px; min-height: var(--ctl-h); border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--card); }
.sx-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; cursor: pointer; user-select: none; }
.sx-chip input { position: absolute; opacity: 0; pointer-events: none; }
.sx-chip:hover { border-color: var(--brand); }
.sx-chip:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Picked chips and buttons keep their font weight: bold text is wider and pushed every chip after it sideways (v2.48.4) */
.sx-chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-2); }
.sx-chip.comp { font-weight: 600; }
.sx-chip.comp::before { content: ''; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid currentColor; display: inline-block; }
.sx-chip.comp.on::before { background: currentColor; box-shadow: inset 0 0 0 2px var(--brand-soft); }
.sx-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.sx-seg button { font: inherit; font-size: 14px; padding: 8px 12px; border: 0; background: var(--card); color: var(--muted); cursor: pointer; }
.sx-seg button + button { border-left: 1px solid var(--line); }
.sx-seg button.on { background: var(--brand-soft); color: var(--brand-2); }
/* sport tabs on a player page (v2.29.0) are links, styled as the buttons */
.sx-seg a { font-size: 14px; padding: 8px 12px; background: var(--card); color: var(--muted); text-decoration: none; }
.sx-seg a + a { border-left: 1px solid var(--line); }
.sx-seg a.on { background: var(--brand-soft); color: var(--brand-2); }
.sx-unalloc td { border-top: 1px solid var(--line); }
.sx-leaders { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sx-leader { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sx-leader span { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.sx-leader b { font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sx-leader small { font-size: 13px; overflow-wrap: break-word; }   /* names wrap, never cut short with ... */
.sx-leader.award { position: relative; background: var(--brand-soft); border-color: transparent; }
.sx-leader.award > span, .sx-leader.award > b { padding-right: 36px; }   /* room for the icon beside the title and figure only */
.sx-awards { margin-bottom: 10px; }
.sx-award { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 30px; line-height: 1; }
.sx-award svg { display: block; }
.sx-credit { margin: -4px 0 12px; font-size: 11px; }
.sx-credit a { color: inherit; }
.sx-card > .sx-credit:last-child { margin-bottom: 0; }
.sx-more { margin-top: 12px; }
.sx-more summary { cursor: pointer; color: var(--brand-2); font-weight: 600; padding: 4px 0; }
.sx-stats tbody td.l:first-child b { font-weight: 600; }
/* Player pages and links to them */
a.pl { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.pl:hover { color: var(--brand-2); text-decoration-color: currentColor; }
.sx-res { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 12px; font-weight: 700; margin-right: 4px; background: var(--soft); color: var(--muted); }
.sx-res.win { background: var(--good-soft); color: var(--good); }
.sx-res.loss { background: var(--bad-soft); color: var(--bad); }
.sx-table small.sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.sx-log td { white-space: nowrap; }
/* Player page (v2.22.0): games scroll inside their card, about 10 rows high (header stays on top);
   Career by competition wraps names and teams so the figures fit without sideways scrolling, and each
   competition opens to its seasons */
.pl-games .sx-wrap { max-height: 590px; overflow-y: auto; overscroll-behavior: contain; }
.pl-career td.l { white-space: normal; min-width: 8em; }
.pl-career tbody tr:nth-child(even) { background: none; }
.pl-career tbody + tbody .pl-comp td { border-top: 1px solid var(--line); }
.pl-name { display: flex; align-items: flex-start; gap: 6px; }
.pl-open { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin: -2px 0 -2px -4px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.pl-open:hover { background: var(--soft); color: var(--ink); }
.pl-open .ic { width: 16px; height: 16px; transition: transform .15s; }
.pl-open[aria-expanded="true"] .ic { transform: rotate(180deg); }
.pl-career .pl-seasons tr { background: var(--soft); }
.pl-seasons td { font-size: 13px; }
.pl-seasons td:first-child { padding-left: 34px; }
@media (prefers-reduced-motion: reduce) { .pl-open .ic { transition: none; } }
/* Upcoming fixtures: team names wrap so the table fits a phone without scrolling */
.sx-fx td.l { white-space: normal; }
.sx-fx td:first-child { white-space: nowrap; }
@media (max-width: 700px) { .sx-fx th, .sx-fx td { padding: 8px 4px; } }
.sx-seasons { flex-wrap: wrap; }
.sx-tiles { grid-template-columns: repeat(4, 1fr); }
.sx-mini { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.sx-mini .sx-leader b { font-size: 20px; }
.sx-note { margin: -4px 0 12px; }
.sx-junior.hi { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.sx-junior { scroll-margin-top: 72px; }
/* Team page (scores-team.js) */
.sx-records { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
@media (max-width: 560px) {
  .sx-filters label, .sx-filters select { flex: 1 1 auto; }
  .sx-leaders { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .sx-leader { scroll-snap-align: start; }
  .sx-leader b { font-size: 22px; }
  .sx-stats .tm { display: none; }
  .sx-tiles { grid-template-columns: repeat(2, 1fr); grid-auto-flow: row; overflow: visible; }
  .sx-records { grid-template-columns: 1fr; grid-auto-flow: row; overflow: visible; }
  .sx-stats .tm-m { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
}
@media print { .sx-tabs, .sx-scope, .sx-seg { display: none; } }

/* Landing page (v1.89.0, Dave 2026-11-11): the Apex Arena banner (scores.html .sx-hero, shown on html.sx-home)
   in the navy of the arena sign-in panel, then a card per centre: banner, logo, about line, contact details
   (scores-venue.js showHome). The venue page opens with the same banner and details (.sx-venue).
   Navy stays navy in dark mode, like the sign-in panel. */
:root, html[data-theme=dark] { --navy-1: #1e3a9a; --navy-2: #0b1450; --navy-3: #0a1a3f; --on-navy: #dbe6ff; --on-navy-2: #a9bbe6; --ring: rgba(46, 123, 255, .35); }
.sx-hero, .sx-banner { background: radial-gradient(120% 90% at 85% 0%, rgba(46, 123, 255, .35), transparent 60%), linear-gradient(160deg, var(--navy-1) 0%, var(--navy-2) 55%, var(--navy-3) 100%); }
.sx-hero { display: none; position: relative; overflow: hidden; color: #fff; }
.sx-home .sx-hero { display: block; }
/* Faint court lines, as on the sign-in panel */
.sx-hero::before, .sx-banner::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 48px 48px, linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 75%); }
.sx-hero-in { position: relative; max-width: 1180px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.sx-hero-logo { display: block; width: min(520px, 86%); height: auto; }
.sx-hero-pitch { margin: 0; font-size: clamp(16px, 2.2vw, 20px); line-height: 1.45; font-weight: 500; color: var(--on-navy); max-width: 40ch; }
.sx-hero-stats { margin: 0; font-size: 14px; font-weight: 500; color: var(--on-navy-2); font-variant-numeric: tabular-nums; }
.sx-hero-stats:empty { display: none; }
.sx-home .sx-head { margin-top: 24px; }

.sx-centres { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-bottom: 16px; }
.sx-centre, .sx-venue { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.sx-centre { transition: border-color .2s, box-shadow .2s, transform .2s; }
.sx-centre:hover { border-color: var(--brand); box-shadow: 0 12px 24px -16px var(--ring); transform: translateY(-2px); }
.sx-centre:has(.sx-go:focus-visible) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.sx-banner { position: relative; aspect-ratio: 16 / 5; overflow: hidden; }
.sx-banner img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.sx-centre-body { display: flex; flex-direction: column; gap: 8px; padding: 0 20px 20px; flex: 1; }
.sx-logo { position: relative; display: grid; place-items: center; width: 80px; height: 80px; margin-top: -40px; padding: 8px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .15); }
.sx-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.sx-logo b { font-size: 24px; line-height: 1; color: var(--brand-2); }
.sx-centre h2 { margin: 4px 0 0; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.sx-go { color: var(--ink); outline: none; }
.sx-go:hover { text-decoration: none; }
/* The whole card opens the centre; the contact links sit above it */
.sx-go::after { content: ''; position: absolute; inset: 0; }
.sx-centre-sub { font-size: 13px; }
.sx-about { margin: 0; font-size: 14px; }
.sx-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.sx-info li { display: flex; gap: 8px; align-items: flex-start; }
.sx-info .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.sx-info a { position: relative; z-index: 1; overflow-wrap: anywhere; }
.sx-cta { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--brand-2); }
.sx-cta .ic { width: 16px; height: 16px; transition: transform .2s; }
.sx-centre:hover .sx-cta .ic { transform: translateX(4px); }
.sx-venue { margin: 8px 0 16px; }
/* Ladder, fixtures and statistics lead with the operator's logo, which opens its scores page (v2.55.0) */
.sx-op-head { display: flex; align-items: center; gap: 16px; }
.sx-op-logo { flex: none; }
.sx-op-logo .sx-logo { margin-top: 0; width: 72px; height: 72px; box-shadow: none; transition: border-color .2s; }
.sx-op-logo:hover .sx-logo { border-color: var(--brand); }
.sx-op-logo:focus-visible { outline: none; }
.sx-op-logo:focus-visible .sx-logo { box-shadow: 0 0 0 3px var(--ring); }
.sx-venue .sx-banner { aspect-ratio: 5 / 1; }
.sx-venue h1 { margin: 4px 0 0; font-size: clamp(22px, 4vw, 32px); line-height: 1.15; letter-spacing: -.01em; }
.sx-venue .sx-info { display: flex; flex-wrap: wrap; gap: 4px 24px; }
@media (max-width: 560px) {
  .sx-venue .sx-banner { aspect-ratio: 16 / 5; }
  .sx-logo { width: 64px; height: 64px; margin-top: -32px; }
  .sx-op-logo .sx-logo { width: 56px; height: 56px; margin-top: 0; }
  .sx-centre-body { padding: 0 16px 16px; }
}
@media (prefers-reduced-motion: reduce) { .sx-centre, .sx-cta .ic { transition: none; } .sx-centre:hover { transform: none; } }
@media print { .sx-hero, .sx-banner { display: none; } }

/* shadcn/ui layer (preview): cards with a hairline and soft shadow, rounded-md controls */
.sx-card, .card { box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.sx-bar { background: var(--card); }

/* Player profile header (scores-player.js profileHead, v2.11.0) */
.pf-crumbs { margin-top: 8px; }
.pf-head { display: grid; grid-template-columns: 128px 1fr; column-gap: 24px; align-items: start; margin: 8px 0 20px; }
.pf-head.no-photo { grid-template-columns: 1fr; }
.pf-photo { grid-row: span 3; width: 128px; height: 128px; border-radius: 16px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-id { align-self: center; min-width: 0; }
.pf-head h1 { font-size: clamp(22px, 4vw, 32px); margin: 4px 0 2px; line-height: 1.15; }
.pf-nick { font-size: 16px; color: var(--muted); margin-bottom: 6px; }
.pf-top { display: flex; align-items: flex-start; line-height: 1.35; gap: 8px; font-weight: 600; color: var(--brand-2); font-size: 15px; margin-bottom: 4px; }
.pf-top .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.pf-about { margin: 12px 0 0; max-width: 68ch; line-height: 1.5; }
.pf-head:not(.no-photo) .pf-about, .pf-head:not(.no-photo) .pf-mile { grid-column: 2; }
.pf-mile { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pf-mile .pill { background: var(--brand-soft); color: var(--brand-2); }
.pf-hon { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pf-h { border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 12px; padding: 12px 14px; }
.pf-h b { display: block; font-size: 15px; }
.pf-h span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.pf-h .lvl { font-size: 12px; font-weight: 600; letter-spacing: .3px; color: var(--brand-2); margin: 0 0 4px; }
@media (max-width: 640px) {
  .pf-head { grid-template-columns: 88px 1fr; column-gap: 16px; }
  .pf-photo { grid-row: auto; width: 88px; height: 88px; border-radius: 12px; }
  .pf-head:not(.no-photo) .pf-about, .pf-head:not(.no-photo) .pf-mile { grid-column: 1 / -1; }
  .pf-top { font-size: 14px; }
}
