/* Oddsprey v2 scores board. Markup: templates/v2/dashboard.html and v2/_board_*.html.

   Three widths. Phone (< 760): one column, a match is time, two stacked teams, the score, the
   split probability bar and the tips; odds and stakes live in the opened panel. Tablet (760 to
   1023): the 1 X 2 chances come back as numbers. Desktop (1024 up): stake and odds columns too. */

.bd { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-4); }
/* Every column in here holds a scroller (the carousel, the filter row). min-width 0 keeps their
   content from widening the page on a phone. */
.bd > *, #board-w-board > *, #board-w-wins > * { min-width: 0; }
.bd h2, .bd h3, .bd h4 { letter-spacing: -.01em; }
.bd .card { padding: var(--s-4); }
.bd-error { padding: var(--s-4); color: var(--muted); }
.bd-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.bd-x { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; text-decoration: none !important; }
.bd-x:hover { color: var(--text); background: var(--surface-2); }

/* ── offer and track strips ─────────────────────────────────────────────── */
.bd-offer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line); border-radius: var(--r); font-size: var(--fs-sm); color: var(--muted); }
.bd-offer b { color: var(--text); }
.bd-offer code { font-family: var(--font-mono); color: var(--text); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.bd-offer-text { flex: 1 1 260px; }
.bd-offer-link { font-weight: 600; }

.v2 .bd-track { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); min-height: 44px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--muted);
  font-size: var(--fs-sm); text-decoration: none !important; overflow: hidden; }
.bd-track:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.bd-track b { color: var(--text); font-variant-numeric: tabular-nums; }
.bd-track b.is-up { color: var(--accent); }
.bd-track b.is-down { color: var(--loss); }
.bd-track-lead { flex: none; font-weight: 600; color: var(--text); }
.bd-track-rot { position: relative; flex: 1; min-width: 0; height: 22px; overflow: hidden; }
.bd-track-slide { position: absolute; inset: 0; display: flex; align-items: center; gap: var(--s-3); white-space: nowrap;
  opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.bd-track-slide.on { opacity: 1; transform: none; }
.bd-track-per { color: var(--text); font-weight: 600; }
.bd-track-thin { color: var(--warn); }
.bd-track-more { flex: none; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 600; }
@media (max-width: 759px) {
  .bd-track-lead, .bd-track-sub, .bd-track-thin, .bd-track-more-txt { display: none; }
  .bd-track-slide { gap: var(--s-2); }
}

/* ── banners, welcome, yesterday's results ─────────────────────────────── */
.bd-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-radius: var(--r); background: var(--accent-soft); font-size: 14px; }
.bd-banner.is-ended { background: var(--warn-soft); }
.bd-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.bd-banner form { margin: 0; }
#board-w-wins { display: flex; flex-direction: column; gap: var(--s-3); }
#board-w-wins:empty { display: none; }

.bd-welcome { position: relative; display: grid; gap: var(--s-3); }
.bd-welcome h2 { font-size: var(--fs-lg); padding-right: 40px; }
.bd-welcome > .bd-x { position: absolute; top: var(--s-2); right: var(--s-2); }
.bd-demo { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s-2); background: var(--bg); }
.bd-demo-lbl { font-size: var(--fs-xs); color: var(--muted); padding: 0 var(--s-2) var(--s-1); }
.bd-demo-row { display: flex; align-items: center; gap: var(--s-2); padding: 6px var(--s-2); border-radius: var(--r-sm); font-size: 14px; }
.bd-demo-row.is-pinned { background: var(--accent-soft); }
.bd-demo-star { color: var(--warn); }
.bd-demo-star.is-off { color: var(--muted); }
.bd-demo-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.bd-demo-teams { flex: 1; min-width: 0; }
.bd-welcome-form { display: grid; gap: var(--s-4); }
.bd-field { display: grid; gap: var(--s-1); font-weight: 600; font-size: 14px; }
.bd-field-sub { font-weight: 400; font-size: var(--fs-xs); color: var(--muted); }
.bd input[type="text"], .bd input[type="search"], .bd input[type="number"], .bd select {
  font: 400 14px var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-sm); min-height: 40px; padding: 0 var(--s-3); }
.bd input:focus-visible, .bd select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bd-theme-choice { display: flex; gap: var(--s-2); }

/* club-picker.js builds these */
.bd .club-picker { position: relative; width: 100%; }
.bd .club-picker input { width: 100%; }
.bd .club-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bd .club-chips:not(:empty) { margin-bottom: var(--s-2); }
.bd .club-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.bd .club-chip-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1;
  padding: 0 6px; min-width: 28px; min-height: 28px; border-radius: var(--r-pill); }
.bd .club-chip-x:hover { color: var(--loss); }
.bd .club-list { position: absolute; z-index: 25; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px;
  list-style: none; max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); }
.bd .club-list li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.bd .club-list li.on { background: var(--accent-soft); }
.bd .club-name { font-size: 14px; font-weight: 600; }
.bd .club-list li.chosen .club-name, .bd .club-tick { color: var(--accent); }
.bd .club-meta { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }

.bd-wins { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.bd-wins-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.bd-wins-head h2 { font-size: var(--fs-md); }
.bd-wins-nav { display: flex; gap: var(--s-1); }
.bd-wins-track { display: flex; gap: var(--s-3); overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; }
.bd-wins-track::-webkit-scrollbar { display: none; }
.bd-win { flex: 0 0 calc(50% - var(--s-3) / 2); scroll-snap-align: start; display: grid; gap: var(--s-2);
  padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.bd-win-teams { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.bd-win-team { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.bd-win-bet { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s-2); font-size: var(--fs-sm); }
.bd-win-odds { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 759px) { .bd-win { flex-basis: 86%; } }
@media (min-width: 1024px) { .bd-win { flex-basis: calc(33.333% - var(--s-3) * 2 / 3); } }

/* ── the sticky date bar and filters ────────────────────────────────────── */
.bd-nav { position: sticky; top: var(--header-h); z-index: 20; margin: 0 calc(-1 * var(--s-4)); padding: var(--s-2) var(--s-4);
  background: var(--header-glass); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
@media (min-width: 760px) { .bd-nav { margin: 0 calc(-1 * var(--s-6)); padding: var(--s-2) var(--s-6); } }
.bd-date { display: flex; align-items: center; gap: var(--s-2); }
.bd-day-label { font-size: var(--fs-md); flex: 1; text-align: center; min-width: 0; }
.bd-arrow { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none !important; }
.bd-arrow:hover { background: var(--surface-2); }
.bd-arrow.is-off, .bd-arrow:disabled { opacity: .35; cursor: default; }
.bd-cal { position: relative; }
.cal-pop { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; width: 280px; max-width: calc(100vw - 32px);
  padding: var(--s-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-2); }
.cal-month { font-weight: 700; font-size: 14px; }
.cal-nav { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: transparent;
  color: var(--text); font-size: 18px; cursor: pointer; }
.cal-nav[disabled] { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.cal-day { min-height: 36px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text);
  font: 500 13px var(--font); font-variant-numeric: tabular-nums; cursor: pointer; }
.cal-day:hover:not([disabled]) { background: var(--surface-2); }
.cal-day[disabled] { color: var(--muted); opacity: .45; cursor: default; }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; }
.cal-day.is-current { background: var(--accent-fill); color: var(--accent-ink); font-weight: 700; }

.bd-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.bd-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s-3);
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--text);
  font: 600 var(--fs-sm) var(--font); cursor: pointer; white-space: nowrap; }
.bd-chip:hover { background: var(--surface-2); }
.bd-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent); }
.bd-chip-icon { width: 36px; padding: 0; justify-content: center; }
.bd-chip-icon[data-dir="asc"] svg { transform: scaleY(-1); }
.bd-search { flex: 1 1 180px; min-width: 0; }
.bd-search input { width: 100%; min-height: 36px; border-radius: var(--r-pill); }
.bd-sort { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--muted); }
.bd-sort select { min-height: 36px; border-radius: var(--r-pill); }
.bd-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--loss); flex: none;
  box-shadow: 0 0 0 0 var(--loss); animation: bd-pulse 1.6s var(--ease) infinite; }
@keyframes bd-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--loss) 60%, transparent); }
  100% { box-shadow: 0 0 0 6px transparent; } }
@media (max-width: 759px) {
  /* One scrolling line on a phone, so the sticky bar stays two rows tall. */
  .bd-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-4); }
  .bd-filters::-webkit-scrollbar { display: none; }
  .bd-sort-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bd-search { flex: 0 0 170px; }
}

/* ── day P/L ────────────────────────────────────────────────────────────── */
.bd-pnl { padding: var(--s-3) var(--s-4); border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.bd-pnl.is-down { background: linear-gradient(90deg, var(--loss-soft), transparent 70%); }
.bd-pnl.is-wait { background: var(--surface); }
.bd-pnl-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-4); font-size: 14px; color: var(--muted); }
.bd-pnl-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.bd-pnl-lead { font-weight: 600; color: var(--text); }
.bd-pnl-net { font-size: var(--fs-lg); color: var(--accent) !important; }
.bd-pnl.is-down .bd-pnl-net { color: var(--loss) !important; }
.bd-pnl.is-wait .bd-pnl-net { color: var(--text) !important; font-size: 15px; }
.bd-pnl-more { margin-left: auto; font-weight: 600; }
.bd-pnl-note { margin-top: var(--s-1); font-size: var(--fs-xs); color: var(--muted); }

/* ── the board ──────────────────────────────────────────────────────────── */
.bd-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.bd-lg { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.bd-lg-head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); min-height: 40px;
  font-size: var(--fs-sm); font-weight: 600; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.bd-lg-logo { width: 18px; height: 18px; object-fit: contain; }
.bd-lg-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-lg-country { color: var(--muted); font-weight: 500; }
.bd-lg-fav { color: var(--warn); }
.bd-list { list-style: none; margin: 0; padding: 0; }
.bd-flat { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.bd-m + .bd-m { border-top: 1px solid var(--line); }
.bd-m[hidden], .bd-lg[hidden], .bd-wins[hidden], .bd-chip[hidden] { display: none; }
.bd-none { padding: var(--s-6); text-align: center; color: var(--muted); }

/* One row. Grid areas decouple the reading order (time, teams, score) from the columns. */
.bd-row { display: grid; align-items: center; column-gap: var(--s-3); row-gap: 6px; padding: var(--s-2) var(--s-3);
  grid-template-columns: 46px minmax(0, 1fr) auto 36px;
  grid-template-areas: "time teams score info" "time pbar pbar ." "time tips tips tips"; }
.bd-time { grid-area: time; align-self: start; padding-top: 3px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column; color: var(--muted); }
.bd-ko { color: var(--text); font-weight: 600; }
.bd-ko-date { font-size: 11px; }
.bd-ft { font-weight: 700; font-size: var(--fs-xs); color: var(--muted); }
.bd-off { color: var(--muted); font-size: var(--fs-xs); }
.bd-live { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--loss); font-size: var(--fs-sm); }
.bd-teams { grid-area: teams; display: grid; gap: 2px; min-width: 0; }
.bd-team { display: flex; align-items: center; gap: var(--s-2); min-width: 0; font-size: 14px; font-weight: 500; line-height: 1.35; }
.bd-name { min-width: 0; overflow-wrap: anywhere; }
.bd .bd-team .crest { width: 22px; height: 22px; flex: none; font-size: 8px; }
.bd .bd-team .crest img { width: 18px; height: 18px; }
.bd-comp { font-size: var(--fs-xs); color: var(--muted); }
.bd-writeup { display: inline-flex; align-items: center; gap: 4px; width: max-content; margin-top: 2px;
  font-size: var(--fs-xs); font-weight: 600; }
.bd-score { grid-area: score; display: flex; align-items: center; gap: var(--s-2); justify-self: end; }
.bd-goals { display: grid; gap: 2px; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.bd-goals b { line-height: 1.35; }
.bd-goals.is-live b { color: var(--loss); }
.bd-pl { font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; padding: 1px 6px; border-radius: 6px; }
.bd-pl.is-win { color: var(--accent); background: var(--accent-soft); }
.bd-pl.is-lose { color: var(--loss); background: var(--loss-soft); }
.bd .profit-fixed.pos { color: var(--accent); }
.bd .profit-fixed.neg { color: var(--loss); }
.ft-ind { display: inline-block; width: 3px; height: 13px; border-radius: 2px; vertical-align: -2px; }
.ft-ind-win { background: var(--text); opacity: .75; }
.ft-ind-lose { background: var(--muted); opacity: .4; }

.bd-chance { grid-area: chance; display: none; }
.bd-pbar { grid-area: pbar; min-width: 0; }
.bd-pbar .pbar-compact { max-width: 260px; }
.bd-p { text-align: center; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; padding: 3px 0; border-radius: 6px; color: var(--muted); }
.bd-p.is-mid { background: var(--accent-soft); color: var(--text); }
.bd-p.is-hi { background: color-mix(in srgb, var(--accent-fill) 32%, transparent); color: var(--text); font-weight: 600; }
/* Thin history drops the tint and goes to the muted token. Not opacity: that blends toward
   whatever is behind it, and .55 of an already muted colour falls under AA in both themes. */
.bd-chance.is-thin .bd-p { background: none; color: var(--muted); font-weight: 400; }
.bd-flag { color: var(--warn); margin-left: 1px; }

.bd-tips { grid-area: tips; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.bd-tip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--text); font-size: var(--fs-xs); font-weight: 600; line-height: 20px;
  font-variant-numeric: tabular-nums; max-width: 100%; }
.bd-tip.is-won { box-shadow: inset 0 0 0 1px var(--accent); }
.bd-tip.is-won::after { content: "\2713"; color: var(--accent); }
.bd-tip.is-lost { background: var(--loss-soft); }
.bd-tip.is-lost::after { content: "\2715"; color: var(--loss); }
.bd-tip.is-void { background: var(--surface-2); color: var(--muted); }
.bd-tip-abbr { display: none; }
.bd-tip-full { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-tip-odd { color: var(--muted); font-weight: 500; }
.bd-lock { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--warn-soft); color: var(--warn) !important; font-size: var(--fs-xs); font-weight: 600; line-height: 20px; }
/* The subscribe link on every locked row. The pill is 24px tall, so on touch an invisible
   ::after grows the hit box to 44px without moving the layout. */
@media (pointer: coarse) {
  .bd-lock { position: relative; }
  .bd-lock::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 100%; height: 100%; min-width: 44px; min-height: 44px; }
}
.bd-no-tip { display: none; }
.odds-move { font-size: 11px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.odds-move.down { color: var(--loss); }
.odds-move.up { color: var(--accent); }

.bd-stake { grid-area: stake; display: none; }
.bd-odds { grid-area: odds; display: none; }
.bd-ln, .bd-o { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.bd-o { text-align: center; }

.bd-info-btn { grid-area: info; align-self: start; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; }
.bd-info-btn:hover { background: var(--surface-2); color: var(--text); }
.bd-info-btn svg { transition: transform .2s var(--ease); }
.bd-info-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.bd-m.is-open { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }

.fav-star { flex: none; border: 0; background: none; padding: 2px 4px; margin-left: -2px; color: var(--muted);
  font-size: 13px; line-height: 1; cursor: pointer; opacity: .55; border-radius: 6px; }
.fav-star:hover, .fav-star:focus-visible { opacity: 1; color: var(--warn); }
.fav-star.on { color: var(--warn); opacity: 1; }
.fav-star.busy { opacity: .4; pointer-events: none; }
@keyframes bd-fav-pop { 45% { transform: scale(1.5); } }
.fav-star.pop { animation: bd-fav-pop .28s ease-out; }
.fav-toast { position: fixed; left: 50%; bottom: calc(var(--s-6) + var(--tabbar-h)); transform: translateX(-50%); z-index: 50;
  padding: var(--s-2) var(--s-4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.fav-toast.show { opacity: 1; pointer-events: auto; }
@media (min-width: 760px) { .fav-toast { bottom: var(--s-6); } }

/* ── the opened panel ───────────────────────────────────────────────────── */
.bd-info { display: grid; gap: var(--s-3); padding: var(--s-2) var(--s-3) var(--s-4) calc(46px + var(--s-3) * 2);
  font-size: 14px; }
.bd-info[hidden] { display: none; }
.bd-info p + p { margin-top: var(--s-1); }
.bd-info-title { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: var(--s-1); }
.bd-res { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.bd-res-box { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bd-res-box span { font-size: var(--fs-xs); color: var(--muted); }
.bd-info-odds { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-6); margin: 0; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.bd-info-odds div { display: flex; gap: var(--s-2); }
.bd-info-odds dt { color: var(--muted); }
.bd-info-odds dd { margin: 0; }
.bd-why { display: grid; gap: var(--s-2); }
.bd-why-row { display: grid; gap: var(--s-1); padding: var(--s-2) 0; border-top: 1px solid var(--line); }
.bd-why-nums { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.bd-why-nums span { display: grid; }
.bd-why-nums b { font-variant-numeric: tabular-nums; }
.bd-why-nums i { font-style: normal; font-size: var(--fs-xs); color: var(--muted); }
.bd-why-nums .is-pos b { color: var(--accent); }
.bd-why-nums .is-neg b { color: var(--loss); }
.bd-why-basis { font-size: var(--fs-sm); }
.bd-analyst p { font-size: 14px; }
.bd-cap { padding-top: var(--s-3); border-top: 1px dashed var(--line); font-size: var(--fs-sm); }
.bd-cap .is-ok { color: var(--accent); }
.bd-cap-list { margin: var(--s-1) 0 0; padding: 0; list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px var(--s-4); color: var(--muted); }

/* Price movement chart, server drawn. The dashed rule is the price we called it at. */
.move-panel { display: grid; gap: var(--s-2); }
.move-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); font-size: var(--fs-sm); }
.move-text { flex: 1 1 220px; min-width: 0; }
.move-chart { flex: 0 0 auto; width: 132px; height: 34px; }
.move-line { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.move-base { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; opacity: .5; }
.move-dot { stroke: var(--surface); stroke-width: 1.5; }
.move-row.down strong { color: var(--loss); }
.move-row.up strong { color: var(--accent); }
.move-row.down .move-line { stroke: var(--loss); }
.move-row.down .move-fill { fill: var(--loss); opacity: .14; }
.move-row.down .move-dot { fill: var(--loss); }
.move-row.up .move-line { stroke: var(--accent); }
.move-row.up .move-fill { fill: var(--accent); opacity: .14; }
.move-row.up .move-dot { fill: var(--accent); }

.bd-key { font-size: var(--fs-xs); color: var(--muted); }
.bd-key .ft-ind { margin: 0 3px 0 0; }
.bd-head { display: none; }

/* ── loading ────────────────────────────────────────────────────────────── */
.bd-loading .bd-preview { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.bd-preview .bd-comp { margin-top: 2px; }
.bd-skel { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.bd-skel span { height: 56px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: bd-shimmer 1.4s linear infinite; }
@keyframes bd-shimmer { to { background-position: -200% 0; } }

/* ── teaser and settle ──────────────────────────────────────────────────── */
.bd-teaser p { max-width: 70ch; }
.bd-settle { display: grid; gap: var(--s-3); }
.bd-settle .card-head { margin: 0; align-items: center; }
.bd-note { color: var(--accent); font-weight: 600; }
.bd-log { max-height: 240px; overflow: auto; margin: 0; padding: var(--s-3); border-radius: var(--r-sm); background: var(--bg);
  border: 1px solid var(--line); font: 12px/1.5 var(--font-mono); white-space: pre-wrap; }
.bd-scroll { overflow-x: auto; }
.bd-settle-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.bd-settle-table th { text-align: left; font-weight: 500; font-size: var(--fs-xs); color: var(--muted); padding: var(--s-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.bd-settle-table td { padding: var(--s-2); border-bottom: 1px solid var(--line); vertical-align: middle; }
.bd-settle-table .num { text-align: right; }
.bd-settle-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.bd-score-in { display: inline-flex; align-items: center; gap: 4px; }
.bd-score-lbl { font-size: var(--fs-xs); font-weight: 600; width: 22px; }
.bd .bd-settle-form input[type="number"] { width: 52px; padding: 0 6px; text-align: center; }
.bd .bd-mtype { margin-left: 4px; }

/* ── tablet and up: numbers instead of the split bar ────────────────────── */
@media (min-width: 760px) {
  .bd-row { grid-template-columns: 52px minmax(0, 1fr) 150px minmax(120px, .8fr) 72px 32px;
    grid-template-areas: "time teams chance tips score info"; min-height: 56px; }
  .bd-time { align-self: center; padding-top: 0; }
  .bd-pbar { display: none; }
  .bd-chance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .bd-no-tip { display: inline; color: var(--muted); }
  .bd-no-tip::before { content: "\2013"; }
  .bd-info-btn { align-self: center; }
  .bd-head { display: grid; column-gap: var(--s-3); padding: 0 var(--s-3);
    grid-template-columns: 52px minmax(0, 1fr) 150px minmax(120px, .8fr) 72px 32px;
    grid-template-areas: "time teams chance tips score ."; font-size: var(--fs-xs); color: var(--muted); }
  .bd-h-time { grid-area: time; } .bd-h-teams { grid-area: teams; } .bd-h-tips { grid-area: tips; }
  .bd-h-score { grid-area: score; text-align: right; }
  .bd-h-chance, .bd-h-odds { grid-template-columns: repeat(3, 1fr); gap: 4px; text-align: center; }
  .bd-h-chance { grid-area: chance; display: grid; }
  .bd-h-odds { grid-area: odds; display: none; }
  .bd-h-stake { grid-area: stake; display: none; }
  .bd-info { padding-left: calc(52px + var(--s-3) * 2); }
}

/* ── desktop: stake and odds columns ────────────────────────────────────── */
@media (min-width: 1024px) {
  .bd-row, .bd-head {
    grid-template-columns: 52px minmax(0, 1fr) 140px minmax(150px, .9fr) 76px 138px 72px 32px;
    grid-template-areas: "time teams chance tips stake odds score info"; }
  .bd-head { grid-template-areas: "time teams chance tips stake odds score ."; }
  .bd-stake { display: grid; gap: 2px; text-align: right; }
  .bd-odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .bd-h-stake { display: block; text-align: right; }
  .bd-h-odds { display: grid; }
  .bd-info-odds { display: none; }
}

/* ── phone: the abbreviated tip once the match is over keeps the row short ── */
@media (max-width: 759px) {
  .bd-m.is-settled .bd-tip-full { display: none; }
  .bd-m.is-settled .bd-tip-abbr { display: inline; }
  .bd-info { padding-left: var(--s-3); }
  .bd-teaser .bd-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bd-live-dot, .bd-skel span { animation: none; }
  .bd-track-slide { transition: none; }
}
