/* book.html (The Book): v2 add-on for the price markets (Blasts, Ladders, Races), the slip's long-shot caps and the
   My bets week/season toggle. Loads after assets/v2/tokens.css, ui.css and game.css, which style every other bk- class.
   Prefix: bk-. Both themes run through the v2 tokens; nothing here animates. */

/* tab bar: 8 tabs scroll sideways on phones, inside the column (never the page) */
.bk-tabs { max-width: 100%; scroll-padding-inline: var(--s2); }

/* folded "How it settles" text on each card */
.bk-rule { font-size: var(--fs-sm); line-height: 1.5; color: var(--text-muted); }
.bk-rule summary { cursor: pointer; padding: 6px 0; font-weight: 600; width: max-content; max-width: 100%; }
.bk-rule summary:hover { color: var(--text); }
.bk-rule summary:focus-visible, .bk-more summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bk-rule p { margin: 4px 0 0; }

/* ---------- Blasts ---------- */
.bk-today { margin-bottom: var(--s2); }
.bk-today .bk-h3 { margin-top: var(--s2); }
.bk-boardlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 6px; }
.bk-boardlist > li { min-width: 0; }
.bk-more { margin-top: var(--s3); border-top: 1px solid var(--line); }
.bk-more summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 700; font-size: var(--fs-lg); }
.bk-more summary::before { content: '+'; display: inline-block; width: 1.2em; font-weight: 700; }
.bk-more[open] summary::before { content: '\2212'; }
.bk-more summary::-webkit-details-marker { display: none; }
.bk-h4 { margin: var(--s2) 0 var(--s1); font-size: var(--fs-lg); font-weight: 700; }

/* ---------- Ladders: rungs downside left, upside right; ranges below ---------- */
.bk-rungs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 2px repeat(3, minmax(0, 1fr)); gap: 4px; align-items: stretch; }
.bk-rungs__h { grid-column: 1 / -1; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.bk-rungs__zero { background: var(--text-muted); border-radius: 1px; margin: 4px 0; }
.bk-rungs__gap { border: 1px dashed var(--line); border-radius: var(--radius); min-height: var(--tap); }
.bk-rungs__axis { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-muted); }
.bk-odd--rung { flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 6px 2px; text-align: center; min-width: 0; }
.bk-odd--rung .bk-odd__label { font-size: var(--fs-xs); font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.bk-odd--rung .bk-odd__price { font-size: 19px; }
.bk-rungs--range .bk-odd--rung .bk-odd__label { font-weight: 600; }

/* ---------- Races: dollar duels (columns set inline: name, to win, one per alt line) ---------- */
.bk-grid--duel .bk-grid__h { overflow-wrap: anywhere; }
.bk-grid--duel .bk-odd { padding: 6px 4px; }

/* ---------- slip: long-shot cap on a leg (dark panel) ---------- */
.bk-leg__cap { grid-column: 1 / -1; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #F2B84B; padding-right: var(--s0); }

/* ---------- My bets: This week / Season ---------- */
.bk-toggle { display: inline-flex; margin: 0 0 var(--s1); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.bk-toggle__btn { min-height: var(--tap); padding: 0 var(--s2); border: 0; background: transparent; color: var(--text-muted); font-family: var(--font-body); font-size: var(--fs-md); font-weight: 700; cursor: pointer; }
.bk-toggle__btn + .bk-toggle__btn { border-left: 1px solid var(--line); }
.bk-toggle__btn:hover { color: var(--text); }
.bk-toggle__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.bk-toggle__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

@media (max-width: 767px) {
  .bk-rungs { gap: 3px; }
  .bk-odd--rung { padding: 6px 1px; }
  .bk-odd--rung .bk-odd__price { font-size: 17px; }
  .bk-grid--duel { gap: 6px 4px; }
}
