/* 4Baseball module styles. Every selector is bsb- prefixed so nothing collides with the host theme (app.css).
   Tokens mirror the live site: chrome #232F3E, accent #1abc9c, 12px radius, Inter.
   Surfaces and text read tokens; the colour modes (hybrid is these defaults, light is the same, dark is the block
   at the end of this file) repaint them through html[data-fs-theme]. New colour rules need a dark counterpart. */
:root{
  --bsb-chrome:#232F3E; --bsb-chrome-2:#1a2330; --bsb-ink:#0e1116; --bsb-muted:#5b6472; --bsb-line:#e3e7ee; --bsb-bg:#fafbfd; --bsb-card:#fff;
  --bsb-accent:#1abc9c; --bsb-accent-ink:#0b7a64; --bsb-link:#0b57d0; --bsb-live:#d92d20; --bsb-win:#0e1116; --bsb-warn-bg:#fff6dd; --bsb-warn:#8a5a00;
  --bsb-inset:#f5f7fa; --bsb-hover:#f8fafc; --bsb-chip:#eef1f6; --bsb-chip-ink:#3b4554; --bsb-text-2:#2b3442; --bsb-line-2:#cfd6e0; --bsb-line-3:#b8c1cf; --bsb-quote:#f3fbf9; --bsb-warn-line:#f2dca0;
  --bsb-win-ink:#0a7a3e; --bsb-loss-ink:#b42318; --bsb-out-bg:#fdecea; --bsb-q-bg:#fff6dd; --bsb-ok-bg:#e8f5ee; --bsb-wc-bg:#f3f8ff;
  --bsb-radius:12px; --bsb-radius-sm:8px; --bsb-shadow:0 1px 2px rgba(16,24,40,.05),0 6px 20px rgba(16,24,40,.06);
  --bsb-font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
.bsb-wrap{max-width:1240px;margin:0 auto;padding:0 16px}
.bsb-main{padding-top:20px;padding-bottom:48px;font-family:var(--bsb-font);color:var(--bsb-ink);line-height:1.5}
.bsb-main a{color:var(--bsb-link);text-decoration:none}.bsb-main a:hover{text-decoration:underline}
.bsb-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.bsb-skip{position:absolute;left:-999px;top:0;background:var(--bsb-card);color:var(--bsb-ink);padding:8px 12px;z-index:100}.bsb-skip:focus{left:8px;top:8px}

/* ---------- team marks ---------- */
.bsb-logo{object-fit:contain;flex:0 0 auto;vertical-align:middle}
.bsb-badge{--bsb-sz:24px;display:inline-grid;place-items:center;flex:0 0 auto;width:calc(var(--bsb-sz)*1.35);height:var(--bsb-sz);border-radius:5px;background:var(--bsb-c1,#334);color:#fff;
  font:800 calc(var(--bsb-sz)*.4)/1 var(--bsb-font);letter-spacing:.02em;box-shadow:inset 0 -3px 0 var(--bsb-c2,#fff3);text-shadow:0 1px 1px #0006;vertical-align:middle}
.bsb-teamlink{display:inline-flex;align-items:center;gap:8px;color:inherit!important;font-weight:600}
.bsb-rank{font-size:.75em;color:var(--bsb-muted);font-weight:700}

/* ---------- ticker ---------- */
.bsb-ticker{background:#10161f;color:#fff;font-family:var(--bsb-font)}
.bsb-ticker__tabs{display:flex;gap:6px;align-items:center;padding:8px 16px 0;max-width:1240px;margin:0 auto;overflow-x:auto;scrollbar-width:none}
.bsb-ticker__tab{background:#1c2633;color:#c6d0dc;border:0;border-radius:999px;padding:4px 12px;font:600 12px var(--bsb-font);cursor:pointer;white-space:nowrap;display:inline-flex;gap:6px;align-items:center}
.bsb-ticker__tab.is-active{background:var(--bsb-accent);color:#04241d}
.bsb-ticker__tab:focus-visible,.bsb-follow:focus-visible,.bsb-game:focus-visible{outline:2px solid #fff;outline-offset:2px}
.bsb-dot{width:7px;height:7px;border-radius:50%;background:var(--bsb-live);box-shadow:0 0 0 0 #d92d2088;animation:bsb-pulse 1.6s infinite}
.bsb-ticker__all{margin-left:auto;color:#9fe8d8;font-size:12px;font-weight:600;text-decoration:none;white-space:nowrap;padding-left:12px}
.bsb-ticker__strip{display:none;gap:8px;padding:8px 16px 10px;max-width:1240px;margin:0 auto;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#334 transparent}
.bsb-ticker__strip.is-active{display:flex}
.bsb-ticker__empty{color:#9fb0c3;font-size:13px;padding:10px 0}
@keyframes bsb-pulse{70%{box-shadow:0 0 0 7px #d92d2000}100%{box-shadow:0 0 0 0 #d92d2000}}

/* ---------- game card ---------- */
.bsb-game{display:block;text-decoration:none!important;color:inherit;font-family:var(--bsb-font)}
.bsb-game__row{display:flex;align-items:center;gap:8px;font-weight:500;opacity:.86}
.bsb-game__row.is-winner,.bsb-game.is-live .bsb-game__row,.bsb-game.is-pre .bsb-game__row{opacity:1}
.bsb-game__row.is-winner{font-weight:800}
.bsb-game__name{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bsb-game__score{font-variant-numeric:tabular-nums;font-weight:800;min-width:1.6em;text-align:right}
.bsb-game__score.bsb-flash{animation:bsb-flash 2.4s ease-out}
@keyframes bsb-flash{0%{background:var(--bsb-accent);color:#04241d;border-radius:4px}100%{background:transparent}}
.bsb-game__status{display:flex;flex-wrap:wrap;gap:4px 8px;font-size:11px;margin-top:4px}
.bsb-game__meta{opacity:.75}
.bsb-live{color:var(--bsb-live);font-weight:800;text-transform:uppercase;font-size:.92em;letter-spacing:.04em}
.bsb-live::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;margin-right:4px;vertical-align:1px}
.bsb-game--ticker{flex:0 0 auto;min-width:148px;max-width:200px;background:#1c2633;color:#fff;border-radius:var(--bsb-radius-sm);padding:7px 10px;font-size:13px;scroll-snap-align:start;border:1px solid transparent}
.bsb-game--ticker:hover{border-color:#3a4a5e}
.bsb-game--ticker .bsb-game__status{color:#9fb0c3}
.bsb-game--ticker .bsb-live{color:#ff7a6e}
.bsb-game--ticker.is-mine{border-color:var(--bsb-accent)}
.bsb-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px;margin:12px 0 24px}
.bsb-game--board{background:var(--bsb-card);border:1px solid var(--bsb-line);border-radius:var(--bsb-radius);padding:12px 14px;box-shadow:var(--bsb-shadow);font-size:15px;color:var(--bsb-ink)!important}
.bsb-game--board:hover{border-color:var(--bsb-line-3)}
.bsb-game--board .bsb-game__row{padding:3px 0}
.bsb-game--board .bsb-game__status{color:var(--bsb-muted);font-size:12px;border-top:1px solid var(--bsb-line);margin-top:8px;padding-top:8px}
.bsb-game--board.is-mine{box-shadow:0 0 0 2px var(--bsb-accent),var(--bsb-shadow)}
.bsb-dayhead{font-size:14px;text-transform:uppercase;letter-spacing:.06em;color:var(--bsb-muted);margin:22px 0 0}

/* ---------- sub navigation ---------- */
.bsb-subnav{background:var(--bsb-card);border-bottom:1px solid var(--bsb-line);font-family:var(--bsb-font);position:sticky;top:0;z-index:20}
.bsb-subnav__in{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;align-items:center}
.bsb-subnav a{padding:11px 11px;font-size:14px;font-weight:600;color:var(--bsb-text-2);text-decoration:none;white-space:nowrap;border-bottom:2px solid transparent}
.bsb-subnav a:hover{color:var(--bsb-ink);border-color:var(--bsb-line-2)}.bsb-subnav a.is-active{color:var(--bsb-accent-ink);border-color:var(--bsb-accent)}
.bsb-subnav__my{margin-left:auto;color:var(--bsb-accent-ink)!important}

/* ---------- layout + cards ---------- */
.bsb-h1{font-size:clamp(24px,3.2vw,32px);line-height:1.2;margin:4px 0 6px;letter-spacing:-.4px}
.bsb-h2{font-size:18px;margin:0 0 12px;letter-spacing:-.2px}
.bsb-lede{color:var(--bsb-muted);margin:0 0 18px;max-width:780px}
.bsb-crumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:0 0 10px;font-size:13px;color:var(--bsb-muted)}
.bsb-crumbs li+li::before{content:"›";margin-right:6px;opacity:.6}
.bsb-card{background:var(--bsb-card);border:1px solid var(--bsb-line);border-radius:var(--bsb-radius);box-shadow:var(--bsb-shadow);padding:16px 18px;margin:0 0 16px}
.bsb-grid{display:grid;gap:16px}.bsb-grid--2{grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr))}.bsb-grid--3{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))}
.bsb-cols{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start}
.bsb-home{display:grid;grid-template-columns:210px minmax(0,1fr) 320px;gap:20px;align-items:start}
@media(max-width:1080px){.bsb-home{grid-template-columns:minmax(0,1fr) 300px}.bsb-home__topics{display:none}}
@media(max-width:860px){.bsb-cols,.bsb-home{grid-template-columns:minmax(0,1fr)}}
.bsb-note{font-size:13px;color:var(--bsb-muted);margin:8px 0}
.bsb-note--warn{background:var(--bsb-warn-bg);color:var(--bsb-warn);padding:8px 12px;border-radius:var(--bsb-radius-sm);border:1px solid var(--bsb-warn-line)}
.bsb-source{font-size:12px;color:var(--bsb-muted);margin:18px 0 0}
.bsb-empty{text-align:center;padding:60px 0}
.bsb-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px;padding:0;list-style:none}
.bsb-chip,.bsb-chips a{display:inline-block;padding:5px 12px;border-radius:999px;border:1px solid var(--bsb-line);background:var(--bsb-card);font-size:13px;font-weight:600;color:var(--bsb-text-2)!important;text-decoration:none!important}
.bsb-chips a:hover{border-color:var(--bsb-line-3)}.bsb-chips a.is-active,.bsb-chip.is-active{background:var(--bsb-chrome);color:#fff!important;border-color:var(--bsb-chrome)}
.bsb-btn{display:inline-block;padding:7px 14px;border-radius:999px;border:1px solid var(--bsb-line);background:var(--bsb-card);font:600 13px var(--bsb-font);color:var(--bsb-text-2)!important;text-decoration:none!important;cursor:pointer}
.bsb-btn:hover{border-color:var(--bsb-line-3)}.bsb-btn--primary{background:var(--bsb-link);border-color:var(--bsb-link);color:#fff!important}
.bsb-kv{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;margin:0;font-size:14px}.bsb-kv dt{color:var(--bsb-muted)}.bsb-kv dd{margin:0;font-weight:600}
.bsb-stat{display:flex;flex-direction:column;gap:2px}.bsb-stat b{font-size:22px;letter-spacing:-.4px;font-variant-numeric:tabular-nums}.bsb-stat span{font-size:12px;color:var(--bsb-muted)}
.bsb-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:14px}

/* ---------- tables ---------- */
.bsb-tablewrap{overflow-x:auto;margin:0 0 16px;border:1px solid var(--bsb-line);border-radius:var(--bsb-radius);background:var(--bsb-card);box-shadow:var(--bsb-shadow)}
.bsb-table{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
.bsb-table caption{text-align:left;font-weight:800;padding:12px 14px 8px;font-size:15px}
.bsb-table th,.bsb-table td{padding:8px 12px;border-top:1px solid var(--bsb-line);text-align:left;white-space:nowrap}
.bsb-table thead th{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--bsb-muted);background:var(--bsb-inset);border-top:0;font-weight:700}
.bsb-table tbody th{font-weight:600}
.bsb-table .n{text-align:right}.bsb-table tbody tr:hover{background:var(--bsb-hover)}
.bsb-table--compact th,.bsb-table--compact td{padding:6px 10px}
.bsb-table [data-sort]{cursor:pointer;user-select:none}.bsb-table [data-sort]::after{content:" ↕";opacity:.35}
.bsb-table [aria-sort=ascending]::after{content:" ↑";opacity:1}.bsb-table [aria-sort=descending]::after{content:" ↓";opacity:1}
.bsb-w{color:var(--bsb-win-ink);font-weight:700}.bsb-l{color:var(--bsb-loss-ink);font-weight:700}.bsb-t{color:var(--bsb-muted);font-weight:700}
.bsb-tag{display:inline-block;font-size:11px;font-weight:700;padding:1px 7px;border-radius:999px;background:var(--bsb-chip);color:var(--bsb-chip-ink)}
.bsb-tag--out{background:var(--bsb-out-bg);color:var(--bsb-loss-ink)}.bsb-tag--q{background:var(--bsb-q-bg);color:var(--bsb-warn)}.bsb-tag--ok{background:var(--bsb-ok-bg);color:var(--bsb-win-ink)}

/* ---------- team / player hero ---------- */
.bsb-hero{border-radius:var(--bsb-radius);padding:22px;color:#fff;background:linear-gradient(120deg,var(--bsb-c1,#232F3E) 0%,color-mix(in srgb,var(--bsb-c1,#232F3E) 72%,#000) 100%);display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-bottom:16px;border-bottom:4px solid var(--bsb-c2,#1abc9c)}
.bsb-hero__mark{background:#fff;border-radius:12px;padding:8px;display:grid;place-items:center;flex:0 0 auto}
.bsb-hero h1{margin:0;font-size:clamp(22px,3vw,30px);letter-spacing:-.4px}
.bsb-hero p{margin:4px 0 0;opacity:.9;font-size:14px}
.bsb-hero__side{margin-left:auto;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.bsb-follow{background:#ffffff22;border:1px solid #ffffff55;color:#fff;border-radius:999px;padding:7px 14px;font:700 13px var(--bsb-font);cursor:pointer}
.bsb-follow[aria-pressed=true]{background:#fff;color:#111}.bsb-follow[aria-pressed=true] .bsb-follow__star{color:#e6a700}
.bsb-main .bsb-follow{background:var(--bsb-card);color:var(--bsb-text-2);border-color:var(--bsb-line)}
.bsb-hero .bsb-follow{background:#ffffff22;color:#fff;border-color:#ffffff55}.bsb-hero .bsb-follow[aria-pressed=true]{background:#fff;color:#111}
.bsb-tabs{display:flex;gap:4px;border-bottom:1px solid var(--bsb-line);margin:0 0 16px;overflow-x:auto}
.bsb-tabs a{padding:9px 12px;font-weight:600;font-size:14px;color:var(--bsb-text-2)!important;border-bottom:2px solid transparent;text-decoration:none!important;white-space:nowrap}
.bsb-tabs a:hover{border-color:var(--bsb-line-2)}

/* ---------- news / blog ---------- */
.bsb-news__list{list-style:none;padding:0;margin:0 0 12px}.bsb-news__list li{padding:8px 0;border-top:1px solid var(--bsb-line)}.bsb-news__list li:first-child{border:0}
.bsb-news__src{display:block;font-size:12px;color:var(--bsb-muted)}
.bsb-news__actions{display:flex;flex-wrap:wrap;gap:8px}
.bsb-posts{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:16px}
.bsb-post-card{background:var(--bsb-card);border:1px solid var(--bsb-line);border-radius:var(--bsb-radius);overflow:hidden;box-shadow:var(--bsb-shadow);display:flex;flex-direction:column}
.bsb-post-card__art{height:120px;background:linear-gradient(135deg,var(--bsb-chrome),#0b7a64);display:grid;place-items:center;color:#ffffffcc;font:800 13px var(--bsb-font);letter-spacing:.12em;text-transform:uppercase}
.bsb-post-card__body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px;flex:1}
.bsb-post-card h3{margin:0;font-size:17px;line-height:1.3}.bsb-post-card h3 a{color:var(--bsb-ink)!important}
.bsb-post-card p{margin:0;color:var(--bsb-muted);font-size:14px}
.bsb-meta{font-size:12px;color:var(--bsb-muted)}
.bsb-article{max-width:760px;font-size:17px;line-height:1.7}
.bsb-article h2{font-size:24px;margin:34px 0 10px;letter-spacing:-.3px}.bsb-article h3{font-size:19px;margin:26px 0 8px}
.bsb-article blockquote{border-left:4px solid var(--bsb-accent);margin:18px 0;padding:4px 16px;color:var(--bsb-text-2);background:var(--bsb-quote);border-radius:0 8px 8px 0}
.bsb-article table{border-collapse:collapse;width:100%;font-size:15px;margin:16px 0}.bsb-article th,.bsb-article td{border:1px solid var(--bsb-line);padding:7px 10px;text-align:left}.bsb-article th{background:var(--bsb-inset)}
.bsb-article code{background:var(--bsb-chip);padding:1px 5px;border-radius:4px;font-size:.9em}
.bsb-embed{margin:22px 0}

/* ---------- home ---------- */
.bsb-rail .bsb-card{padding:14px}
.bsb-rail h2{font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--bsb-muted);margin:0 0 10px}
.bsb-rail .bsb-tablewrap{box-shadow:none;margin:0;border:0}
.bsb-list{list-style:none;padding:0;margin:0;font-size:14px}.bsb-list li{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-top:1px solid var(--bsb-line)}.bsb-list li:first-child{border:0}
.bsb-topics{background:var(--bsb-chrome);color:#dfe7ef;border-radius:var(--bsb-radius);padding:12px;font-size:14px}
.bsb-topics h2{font-size:11px;letter-spacing:.1em;color:#9fb0c3;margin:0 0 8px}
.bsb-topics a{display:block;color:#dfe7ef!important;padding:6px 4px;border-top:1px solid #ffffff14;text-decoration:none!important}.bsb-topics a:hover{color:#fff!important;background:#ffffff0d}
.bsb-feeditem{padding:12px 0;border-top:1px solid var(--bsb-line)}.bsb-feeditem:first-of-type{border:0}
.bsb-feeditem a{font-weight:600;font-size:16px}
.bsb-hubgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.bsb-hubgrid a{display:flex;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--bsb-line);border-radius:var(--bsb-radius-sm);background:var(--bsb-card);color:var(--bsb-ink)!important;font-weight:600;font-size:14px;text-decoration:none!important}
.bsb-hubgrid a:hover{border-color:var(--bsb-line-3)}
.bsb-filter{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}
.bsb-filter input,.bsb-filter select{padding:8px 12px;border:1px solid var(--bsb-line);border-radius:999px;font:14px var(--bsb-font);background:var(--bsb-card);color:var(--bsb-ink);min-width:0}
.bsb-filter input{flex:1 1 220px}
@media (prefers-reduced-motion:reduce){.bsb-dot,.bsb-game__score.bsb-flash{animation:none}}

/* the hidden attribute must win over display:flex/grid on filtered rows */
.bsb-main [hidden]{display:none!important}

/* dark logos (Panthers, Falcons, Raiders...) need a light chip on the dark ticker */
.bsb-game--ticker .bsb-logo{background:#fff;border-radius:4px;padding:1px;box-sizing:border-box}
.bsb-game--ticker .bsb-game__status{flex-wrap:nowrap;white-space:nowrap;overflow:hidden}

/* Play hub tiles */
a.bsb-tile{display:block;text-decoration:none!important;color:var(--bsb-ink)!important;margin:0}a.bsb-tile:hover{border-color:var(--bsb-line-3)}
.bsb-tile b{display:block;font-size:17px;margin-bottom:4px}.bsb-tile span{font-size:14px;color:var(--bsb-muted)}

/* ============================================================================
   Baseball-specific components. Everything above is inherited from the shared
   sport-module stylesheet; everything below exists because baseball needs it.
   ============================================================================ */

/* --- R H E block on a scoreboard card --- */
.bsb-game__head{display:flex;justify-content:flex-end;gap:0;font-size:10px;letter-spacing:.08em;color:var(--bsb-muted,#5b6472)}
.bsb-game__head span{display:inline-block;width:18px;text-align:right}
.bsb-game--board .bsb-game__row{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:8px}
.bsb-game__rhe{display:inline-flex;gap:0;font-variant-numeric:tabular-nums;color:var(--bsb-muted,#5b6472);font-size:13px}
.bsb-game__rhe span{width:18px;text-align:right}
.bsb-game__score{font-variant-numeric:tabular-nums;font-weight:800;min-width:22px;text-align:right}

/* --- bases, count and outs while a game is in progress --- */
.bsb-situation{display:inline-flex;align-items:center;gap:6px;margin-left:8px;font-size:11px;color:var(--bsb-muted,#5b6472);vertical-align:middle}
.bsb-diamond{position:relative;display:inline-block;width:18px;height:18px;transform:rotate(45deg)}
.bsb-diamond i{position:absolute;width:7px;height:7px;border:1px solid currentColor;background:transparent;border-radius:1px}
.bsb-diamond i.is-on{background:#f4c430;border-color:#b98b00}
.bsb-diamond .bsb-b2{top:0;left:0}
.bsb-diamond .bsb-b1{bottom:0;left:0}
.bsb-diamond .bsb-b3{top:0;right:0}
.bsb-count{font-variant-numeric:tabular-nums;font-weight:700}
.bsb-off{font-weight:700;color:var(--bsb-warn);background:var(--bsb-q-bg);border-radius:999px;padding:1px 7px;font-size:11px}

/* --- the full line score --- */
.bsb-linescore{font-variant-numeric:tabular-nums}
.bsb-linescore th,.bsb-linescore td{text-align:center;padding:6px 8px;min-width:26px}
.bsb-linescore .bsb-ls__team{text-align:left;min-width:120px;white-space:nowrap}
.bsb-linescore .bsb-ls__team span{vertical-align:middle}
.bsb-linescore .bsb-ls__r{font-weight:800;border-left:2px solid var(--bsb-line,#e3e7ee)}
.bsb-linescore thead th{background:var(--bsb-inset);font-size:11px;color:var(--bsb-muted,#5b6472)}

/* --- scoring plays --- */
.bsb-scoring{list-style:none;margin:0;padding:0}
.bsb-scoring li{display:grid;grid-template-columns:72px 1fr auto;gap:10px;padding:8px 0;border-bottom:1px solid var(--bsb-line,#eef1f6);font-size:14.5px;align-items:baseline}
.bsb-scoring li:last-child{border-bottom:0}
.bsb-scoring__inn{font-size:12px;font-weight:700;color:var(--bsb-muted,#5b6472);white-space:nowrap}
.bsb-scoring__score{font-size:12px;color:var(--bsb-muted,#5b6472);white-space:nowrap;font-variant-numeric:tabular-nums}

/* --- box score --- */
.bsb-box th[scope=row]{font-weight:500;white-space:nowrap}
.bsb-box caption{text-align:left;font-weight:700;padding:10px 12px 6px;font-size:14px}
.bsb-boxnotes{font-size:13px;color:var(--bsb-muted,#5b6472);line-height:1.7;margin:4px 0 18px}

/* --- game header --- */
.bsb-gamehead{background:var(--bsb-card);border:1px solid var(--bsb-line,#e3e7ee);border-radius:12px;padding:16px 18px;margin:14px 0}
.bsb-gamehead__teams{display:grid;gap:8px}
.bsb-gamehead__team{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;font-size:17px}
.bsb-gamehead__team .bsb-meta{display:block;font-size:12px}
.bsb-gamehead__score{font-size:30px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1}
.bsb-gamehead__status{margin:12px 0 4px;font-weight:600}

/* --- date navigation --- */
.bsb-datenav{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0;padding:10px 12px;background:var(--bsb-card);border:1px solid var(--bsb-line,#e3e7ee);border-radius:12px}
.bsb-datenav__now{font-weight:700;flex:1 1 auto;text-align:center;min-width:160px}
.bsb-datenav__pick{display:flex;gap:6px;align-items:center}
.bsb-datenav__pick input{padding:6px 8px;border:1px solid var(--bsb-line,#e3e7ee);border-radius:8px;font:inherit;font-size:14px;background:var(--bsb-card);color:var(--bsb-ink)}

/* --- standings extras --- */
.bsb-table tr.is-wc{background:var(--bsb-wc-bg)}
.bsb-table tr.bsb-cutline td{text-align:center;font-size:11px;letter-spacing:.06em;color:var(--bsb-muted,#5b6472);background:var(--bsb-q-bg);padding:4px}
.bsb-clinch,.bsb-elim{font-size:10px;font-weight:800;margin-left:5px;padding:1px 5px;border-radius:4px;text-decoration:none;cursor:help}
.bsb-clinch{background:var(--bsb-ok-bg);color:var(--bsb-win-ink)}
.bsb-elim{background:var(--bsb-out-bg);color:var(--bsb-loss-ink)}
.bsb-seeds{list-style:none;margin:0;padding:0}
.bsb-seeds li{display:flex;gap:8px;align-items:center;padding:5px 0;border-bottom:1px solid var(--bsb-line)}
.bsb-seeds li:last-child{border-bottom:0}
.bsb-seed{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--bsb-chrome,#232F3E);color:#fff;font-size:12px;font-weight:800}
.bsb-list li.is-cut{border-bottom:2px solid #f4c430}

/* --- home page: both audiences above the fold --- */
.bsb-audiences{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 0 18px}
.bsb-aud{background:var(--bsb-card);border:1px solid var(--bsb-line,#e3e7ee);border-radius:12px;padding:14px 16px}
.bsb-aud__head{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit;font-size:18px}
.bsb-aud__icon{font-size:22px}
.bsb-aud p{margin:6px 0 10px;font-size:14px;color:var(--bsb-muted,#5b6472)}
.bsb-aud__links{display:flex;flex-wrap:wrap;gap:6px}
.bsb-aud__links a{font-size:13px;padding:3px 10px;border-radius:999px;background:var(--bsb-chip);text-decoration:none;color:var(--bsb-chip-ink)}
.bsb-aud__links a:hover{background:var(--bsb-accent,#1abc9c);color:#04241d}

/* --- head-to-head --- */
.bsb-h2h{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;text-align:center}
.bsb-h2h__side{display:grid;justify-items:center;gap:6px}
.bsb-h2h__w{font-size:34px;font-weight:800;font-variant-numeric:tabular-nums}

/* --- club and player headers --- */
.bsb-teamhead,.bsb-playerhead{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:10px 0 18px;padding-bottom:14px;border-bottom:3px solid var(--bsb-c1,var(--bsb-line,#e3e7ee))}
.bsb-teamhead h1,.bsb-playerhead h1{margin:0}
.bsb-teamhead .bsb-follow{margin-left:auto}
.bsb-res{font-weight:800}
.bsb-res--w{color:var(--bsb-win-ink)}
.bsb-res--l{color:var(--bsb-loss-ink)}
.bsb-tile--team{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;align-items:center}
.bsb-tile--team b{grid-column:2;margin:0}
.bsb-tile--team span{grid-column:2;font-size:13px;color:var(--bsb-muted,#5b6472)}

/* --- transactions --- */
.bsb-txlist{list-style:none;margin:0 0 18px;padding:0}
.bsb-txlist li{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline;padding:9px 0;border-bottom:1px solid var(--bsb-line);font-size:14.5px}
.bsb-tag{font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--bsb-chip);color:var(--bsb-chip-ink);white-space:nowrap}
.bsb-tag--ok{background:var(--bsb-ok-bg);color:var(--bsb-win-ink)}
.bsb-tag--bad{background:var(--bsb-out-bg);color:var(--bsb-loss-ink)}

/* --- the "we do not have this" block: honest, never invented data --- */
.bsb-unavailable{border-left:4px solid #d9a400;background:var(--bsb-q-bg)}

/* --- leaders --- */
.bsb-leaderbox .bsb-list li{padding:4px 0}
.bsb-leaderbox h3 .bsb-meta{font-size:10px;text-transform:uppercase;letter-spacing:.05em;margin-left:6px}
.bsb-proj{border-bottom:1px dotted currentColor;cursor:help}

/* --- tabs used by standings, leaders and rosters --- */
.bsb-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}
.bsb-tabs a,.bsb-tabs button{font:inherit;font-size:14px;padding:6px 14px;border-radius:999px;background:var(--bsb-chip);color:var(--bsb-chip-ink);text-decoration:none;border:0;cursor:pointer}
.bsb-tabs a.is-active,.bsb-tabs button.is-active{background:var(--bsb-chrome,#232F3E);color:#fff;font-weight:700}

/* --- the Play stat calculator --- */
.bsb-calcgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));gap:10px;margin-bottom:14px}
.bsb-calcgrid label{display:grid;gap:4px;font-size:13px;color:var(--bsb-muted,#5b6472)}
.bsb-calcgrid input{width:100%;min-width:0;box-sizing:border-box;padding:8px 10px;border:1px solid var(--bsb-line,#e3e7ee);border-radius:8px;font:inherit;font-variant-numeric:tabular-nums;background:var(--bsb-card);color:var(--bsb-ink)}
.bsb-calcgame{border:1px solid var(--bsb-line,#e3e7ee);border-radius:10px;padding:10px 12px;margin:0 0 14px}
.bsb-calcgame legend{font-size:12px;color:var(--bsb-muted,#5b6472);padding:0 6px}
.bsb-calcgame label{display:block;font-size:14px;padding:3px 0}
.bsb-calcout{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin:0}
.bsb-calcout>div{background:var(--bsb-inset);border-radius:10px;padding:10px 12px;text-align:center}
.bsb-calcout dt{font-size:12px;font-weight:800;letter-spacing:.04em}
.bsb-calcout dt span{display:block;font-weight:400;font-size:10.5px;color:var(--bsb-muted,#5b6472);letter-spacing:0}
.bsb-calcout dd{margin:4px 0 0;font-size:22px;font-weight:800;font-variant-numeric:tabular-nums}
.bsb-deflist dt{font-weight:800;margin-top:10px}
.bsb-deflist dd{margin:2px 0 0;color:var(--bsb-text-2);font-size:14.5px}

/* --- the printable scoresheet --- */
.bsb-sheet{background:#fff;color:#1b1f24;border:1px solid var(--bsb-line,#e3e7ee);border-radius:12px;padding:14px;overflow-x:auto}   /* paper: light in every colour mode */
.bsb-sheet__head{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:12px}
.bsb-sheet__head div{display:grid;gap:3px}
.bsb-sheet__head span{font-size:11px;color:var(--bsb-muted,#5b6472);text-transform:uppercase;letter-spacing:.05em}
.bsb-sheet__head i{display:block;border-bottom:1px solid #999;height:18px}
.bsb-sheet__grid{width:100%;border-collapse:collapse;font-size:12px}
.bsb-sheet__grid th,.bsb-sheet__grid td{border:1px solid #bbb;padding:0;height:30px;text-align:center}
.bsb-sheet__grid thead th{background:#f1f4f9;font-size:11px;height:22px}
.bsb-sheet__no{width:24px}
.bsb-sheet__name{width:150px;text-align:left !important;padding-left:5px !important}
.bsb-sheet__pos{width:38px}
.bsb-sheet__cell{position:relative;min-width:40px}
.bsb-sheet__diamond{position:absolute;top:6px;right:6px;bottom:6px;left:6px;border:1px solid #d8dde5;transform:rotate(45deg)}
.bsb-sheet__totals td,.bsb-sheet__totals th{background:#f7f9fc;font-weight:700}
.bsb-sheet__pitchers{margin-top:14px}
.bsb-sheet__key{margin-top:12px;font-size:11.5px;color:#3b4554;line-height:1.8}

@media print{
  .bsb-noprint,.bsb-ticker,.bsb-subnav,.bsb-crumbs,.bsb-source{display:none !important}
  body:has(.bsb-sheet) #search-header,body:has(.bsb-sheet) footer,body:has(.bsb-sheet) .offcanvas{display:none !important}
  .bsb-sheet{border:0;padding:0;overflow:visible}
  .bsb-sheet__grid{font-size:10px}
  .bsb-sheet__grid th,.bsb-sheet__grid td{height:26px}
  @page{size:landscape;margin:10mm}
}

/* --- responsive --- */
@media(max-width:860px){
  .bsb-audiences{grid-template-columns:1fr}
  .bsb-h2h{grid-template-columns:1fr;gap:8px}
  .bsb-sheet__head{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .bsb-datenav{justify-content:center}
  .bsb-datenav__pick{width:100%;justify-content:center}
  .bsb-gamehead__score{font-size:24px}
  .bsb-scoring li{grid-template-columns:1fr;gap:2px}
  .bsb-game__head span,.bsb-game__rhe span{width:16px}
}

/* ---------- inside the engine's page ---------- */
/* The engine lays the page out as a flex column and gives <main> flex:1; a flex item with auto side margins
   shrinks to its content, so the module's own column would collapse to the width of its widest block. */
main.bsb-main{width:100%;box-sizing:border-box;color:var(--bsb-ink)}
/* blocks the kit places inside the home feed's column */
.bsb-homeblock{margin:12px 0 16px;font-family:var(--bsb-font)}
.bsb-homeblock .bsb-ticker{border-radius:var(--bsb-radius);overflow:hidden;margin:0 0 12px}
.bsb-homeblock .bsb-ticker__tabs,.bsb-homeblock .bsb-ticker__strip{max-width:none}
.bsb-homeblock .bsb-card,.bsb-homeblock .bsb-aud{color:var(--bsb-ink)}
.bsb-glance .bsb-rail{column-width:270px;column-gap:14px}
.bsb-glance .bsb-rail .bsb-card{margin:0 0 14px;break-inside:avoid}
.bsb-home__blog{margin:0 0 16px}
.bsb-home__blog a{color:var(--bsb-link)}
.bsb-sectionhead{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.bsb-main .bsb-h1,.bsb-main .bsb-h2{color:var(--bsb-ink)}
.bsb-disclaimer{margin:28px 0 0;font-size:12px;color:var(--bsb-muted);max-width:900px}

/* ---------- dark mode ---------- */
/* The chrome (ticker, club heroes, badges) is already dark and stays as it is; the surfaces and the text flip.
   Values are the engine's own dark tokens (app.css section 14), with fallbacks so a missing token cannot paint white. */
html[data-fs-theme="dark"]{
  --bsb-ink:var(--fs-ink,#c6d0dc); --bsb-muted:var(--fs-ink-3,#8fa2b8); --bsb-line:var(--fs-line-3,#2a3542); --bsb-bg:var(--fs-page-bg,#10151c);
  --bsb-card:var(--fs-surface,#161d26); --bsb-link:var(--fs-link,#79b8ff); --bsb-accent-ink:#3fe0c0;
  --bsb-inset:var(--fs-surface-2,#1d2631); --bsb-hover:var(--fs-surface-3,#232e3c); --bsb-chip:#243040; --bsb-chip-ink:#c6d0dc; --bsb-text-2:var(--fs-ink-2,#b4bfcd);
  --bsb-line-2:var(--fs-line-2,#2f3c4c); --bsb-line-3:#3a4a5e; --bsb-quote:#14262a; --bsb-warn-bg:#3a2e12; --bsb-warn:#f2c46b; --bsb-warn-line:#5a4720;
  --bsb-win-ink:#4ade80; --bsb-loss-ink:#ff8a80; --bsb-out-bg:#3a1c1a; --bsb-q-bg:#3a2e12; --bsb-ok-bg:#12301f; --bsb-wc-bg:#14233a;
  --bsb-win:#e6edf5; --bsb-shadow:0 1px 2px rgba(0,0,0,.4),0 6px 20px rgba(0,0,0,.28);
}
html[data-fs-theme="dark"] .bsb-subnav a:hover{color:#fff}
html[data-fs-theme="dark"] .bsb-chips a.is-active,html[data-fs-theme="dark"] .bsb-chip.is-active,
html[data-fs-theme="dark"] .bsb-tabs a.is-active,html[data-fs-theme="dark"] .bsb-tabs button.is-active{background:var(--bsb-accent);color:#04241d!important;border-color:var(--bsb-accent)}
html[data-fs-theme="dark"] .bsb-btn--primary{background:#2f6fd6;border-color:#2f6fd6;color:#fff!important}
html[data-fs-theme="dark"] .bsb-game__score.bsb-flash{color:#04241d}
html[data-fs-theme="dark"] .bsb-article h2,html[data-fs-theme="dark"] .bsb-article h3{color:var(--fs-heading,#dde5ef)}
html[data-fs-theme="dark"] .bsb-post-card h3 a{color:var(--bsb-ink)!important}
html[data-fs-theme="dark"] .bsb-aud__links a:hover{color:#04241d}
html[data-fs-theme="dark"] .bsb-off{background:#3a2e12}
/* the printable scoresheet is paper in every mode: give it the light tokens back */
html[data-fs-theme="dark"] .bsb-sheet{--bsb-ink:#1b1f24;--bsb-muted:#5b6472;--bsb-line:#e3e7ee;--bsb-link:#0b57d0}
