/* basketball-data block (content/blocks/basketball_data.html) + the nested basketball pages
   (content/basketball/*.html — league, game, team). Neutral base: every colour is a --bbd-* token so a
   theme skin re-tokens instead of re-writing rules (malaysia-tiger: _tiger-pt-sports.scss).
   Never wider than its column; state classes never contain "live". */
.bbd {
  --bbd-ink: #1b2430; --bbd-muted: #5b6574; --bbd-surface: #fff; --bbd-surface-2: #f3f5f8;
  --bbd-border: #dfe4ea; --bbd-accent: #1f5fbf; --bbd-accent-ink: #fff; --bbd-on: #c62828;
  --bbd-hl: #fff6d6; --bbd-hl-border: #e0b400; --bbd-pre: #6b4e00; --bbd-pre-bg: #fff1c2; --bbd-radius: 12px;
  --bbd-font: inherit; --bbd-font-display: inherit;
  margin: 0 0 2rem; color: var(--bbd-ink); font-family: var(--bbd-font); max-width: 100%; min-width: 0;
}
.bbd *, .bbd *::before, .bbd *::after { box-sizing: border-box; }
.bbd-head { margin: 0 0 12px; }
.bbd-title { margin: 0 0 6px; font-family: var(--bbd-font-display); color: var(--bbd-ink); }
.bbd-intro { margin: 0 0 6px; }
.bbd-note { margin: 0; font-size: 14px; color: var(--bbd-muted); overflow-wrap: anywhere; }
.bbd-foot { margin-top: 8px; font-size: 13px; }
.bbd-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bbd-on); flex: none; }

.bbd-day {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 13px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; color: var(--bbd-muted);
}
.bbd-day-now { color: var(--bbd-on); }

.bbd-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--bbd-border); border-radius: var(--bbd-radius);
  background: var(--bbd-surface); overflow: hidden; }
.bbd-list > li::before { content: none !important; }
.bbd-g { margin: 0; padding: 0; }
.bbd-g + .bbd-g { border-top: 1px solid var(--bbd-border); }
.bbd-g__a {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 14px; min-height: 56px; color: inherit; text-decoration: none;
}
a.bbd-g__a:hover { background: var(--bbd-surface-2); }
a.bbd-g__a:focus-visible { outline: 3px solid var(--bbd-accent); outline-offset: -3px; }
.bbd-g__when { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; min-width: 0; }
.bbd-g__when time { font-weight: 800; font-size: 16px; color: var(--bbd-ink); }
.bbd-g__day { font-size: 12px; color: var(--bbd-muted); }
.bbd-st { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; color: var(--bbd-muted); }
.bbd-st-on { color: var(--bbd-on); }
.bbd-g__teams { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bbd-tm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bbd-tm__n { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.bbd-tm.is-win .bbd-tm__n, .bbd-tm.is-win .bbd-sc { font-weight: 800; }
.is-final .bbd-tm:not(.is-win) { color: var(--bbd-muted); }
.bbd-sc { margin-left: auto; padding-left: 8px; font-variant-numeric: tabular-nums; font-size: 16px; }
.bbd-lg { width: 22px; height: 22px; object-fit: contain; flex: none; }
.bbd-chip { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bbd-surface-2);
  border: 1px solid var(--bbd-border); font-size: 8px; font-weight: 800; color: var(--bbd-ink); overflow: hidden; }
.bbd-g__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--bbd-muted); }
.bbd-tag {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--bbd-border);
  font-size: 12px; font-weight: 700; color: var(--bbd-ink); background: var(--bbd-surface-2); white-space: nowrap;
}
.bbd-tag-pre { background: var(--bbd-pre-bg); border-color: var(--bbd-pre-bg); color: var(--bbd-pre); }

.bbd-past { margin-top: 14px; }

.bbd-tables { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.bbd-tbl-wrap { min-width: 0; }
.bbd-tbl-cap { margin: 0 0 6px; font-weight: 800; }
.bbd-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 15px; background: var(--bbd-surface); }
.bbd-tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--bbd-muted);
  padding: 8px 6px; border-bottom: 2px solid var(--bbd-border); }
.bbd-tbl td, .bbd-tbl tbody th { padding: 7px 6px; border-bottom: 1px solid var(--bbd-border); vertical-align: middle; }
.bbd-tbl abbr { text-decoration: none; }
.bbd-tbl .bbd-num { text-align: right; font-variant-numeric: tabular-nums; width: 44px; }
.bbd-tbl th:first-child.bbd-num, .bbd-tbl td:first-child.bbd-num { width: 36px; text-align: center; }
.bbd-tcell a, .bbd-tcell { color: inherit; }
.bbd-tcell a { display: flex; align-items: center; gap: 8px; min-width: 0; text-decoration: none; }
.bbd-tcell a:hover span { text-decoration: underline; }
.bbd-tcell > span:last-child, .bbd-tcell a span { overflow-wrap: anywhere; font-weight: 600; }
.bbd-tcell > .bbd-lg { vertical-align: middle; margin-right: 8px; }
.bbd-tcell .bbd-lg { width: 20px; height: 20px; }
.bbd-tbl tr.is-hl td { background: var(--bbd-hl); }
.bbd-tbl .is-hi { font-weight: 800; }

/* ── nested pages ── */
.bbp { margin: 0 auto 2rem; }
.bbp-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; color: var(--bbd-muted); }
.bbp-crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--bbd-muted); }
.bbp-crumbs a { color: inherit; }
.bbp-h1 { margin: 0 0 8px; font-family: var(--bbd-font-display); color: var(--bbd-ink); overflow-wrap: anywhere; }
.bbp-h2 { margin: 28px 0 8px; font-family: var(--bbd-font-display); color: var(--bbd-ink); }
.bbp-flag { margin: 10px 0 0; font-size: 14px; }
.bbp-teamhead { display: flex; align-items: center; gap: 16px; margin: 0 0 8px; }
.bbp-teamlogo { width: 64px; height: 64px; object-fit: contain; flex: none; font-size: 14px; }
.bbp-board { margin: 12px 0 0; padding: 16px; border: 1px solid var(--bbd-border); border-radius: var(--bbd-radius); background: var(--bbd-surface); }
.bbp-board__hd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; font-size: 13px; color: var(--bbd-muted); }
.bbp-board__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.bbp-board__tm { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.bbp-board__tm img { width: 56px; height: 56px; object-fit: contain; }
.bbp-board__tm a, .bbp-board__tm > span { font-weight: 800; color: var(--bbd-ink); overflow-wrap: anywhere; }
.bbp-board__tm small { color: var(--bbd-muted); font-variant-numeric: tabular-nums; }
.bbp-board__mid { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.bbp-board__sc { font-size: 34px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bbp-board__sc span { margin: 0 6px; color: var(--bbd-muted); }
.bbp-board__time { font-size: 28px; font-variant-numeric: tabular-nums; }
.bbp-board__mid small { font-size: 13px; color: var(--bbd-muted); }
.bbp-scroll { margin: 14px 0 0; overflow-x: auto; }
.bbp-lines { min-width: 320px; }
.bbp-lines th:first-child { width: auto; }
.bbp-facts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.bbp-facts li::before { content: none !important; }
.bbp-facts li { margin: 0; padding: 0; overflow-wrap: anywhere; }

@media (min-width: 900px) {
  .bbd-tables.is-multi { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .bbd-g__a { grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
  .bbd-g__meta { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .bbd-tbl { font-size: 14px; }
  .bbd-tbl .bbd-num { width: 34px; }
  .bbd-tbl .bbd-opt { display: none; }
  .bbp-board { padding: 12px; }
  .bbp-board__sc { font-size: 26px; }
  .bbp-board__time { font-size: 22px; }
  .bbp-board__tm img { width: 44px; height: 44px; }
}
