/* cycle 79 BE: the Breakdown tab (breakdown.js; ops/BREAKDOWN_PLAY_SPEC.md 2). #bdView = the 13x13 grid's box (same width + height:
   nothing moves when the tab changes). Own file: style.css's tokens, no rule of style.css changed. */
#bMain.bdon #bGrid, #bMain.bdon #bGridNote, #bMain.bdon #bLegend { display: none; }
#bMain.bdon #modeSeg button.on { background: transparent; color: var(--muted); }
.bleft #bdView, .bleft #rgView { --w: max(440px, min(calc((100vh - var(--hdr-h) - var(--strip-h) - 124px) * 1.3), 57vw)); width: var(--w); height: calc((var(--w) - 28px) / 1.3 + 28px); }
.bdview { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.bdchart { position: relative; flex: 1 1 0; min-height: 160px; background: #0c0d0f; border-radius: 4px; padding: 2px; }
.bdbars { display: flex; align-items: flex-end; gap: 1px; height: 100%; user-select: none; }
.bdbar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.bdfill { display: flex; flex-direction: column-reverse; min-height: 0; }
.bdseg { flex: none; }
.bdnote { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.bdwt { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; padding: 0; border-radius: 4px; border: 2px solid #fff; background: rgba(255,255,255,.85); cursor: pointer; }
.bdwt.on { background: rgba(0,0,0,.35); }
.bdaxis { position: relative; flex: none; height: 30px; margin: 3px 2px 0; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bdaxis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; line-height: 1.2; }
.bdaxis span:first-child { transform: none; }
.bdaxis span:last-child { transform: translateX(-100%); }
.bdaxis small { display: block; font-size: 10px; letter-spacing: .5px; }
.bdrange { flex: none; display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 10px; margin: 4px 2px 2px; font-weight: 500; }
.bdrange .mixbar { margin: 0; }
.bdtree { flex: none; max-height: 50%; overflow: auto; }
.bdview.hastree .bdrange { display: none; }   /* (piece 4: CT's tree draws its own Range row) */
/* piece 5 (no jiggle): with the tree the chart / graph take a FIXED share of the view and the tree scrolls inside the rest -- no rect
   changes when a filter turns on / off, the node changes or tree rows expand */
.bdview.hastree .bdchart { flex: 0 0 52%; min-height: 0; }
.bdview.hastree .rggraph { flex: 0 0 45%; min-height: 0; }
.bdview.hastree .bdtree, .bdview.hastree .bdtree:empty { display: block; flex: 1 1 0; min-height: 0; max-height: none; overflow-y: auto; scrollbar-gutter: stable; }
.bdtree:empty { display: none; }
/* piece 2: the drag-selected equity interval (a fixed filter row: the chart never moves), the hand list in the hand detail's place */
.bdfilt { flex: none; height: 26px; display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 0 2px 4px; white-space: nowrap; overflow: hidden; }
.bdchip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel3); border: 1px solid var(--border); border-radius: 12px; padding: 1px 3px 1px 10px; color: var(--muted); }
.bdchip b, .bdcnt b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.bdx { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 9px; }
.bdx:hover { color: #fff; background: #3a3d45; }
.bdchart { cursor: crosshair; }
.bdbar.dim { opacity: .28; }
#bMain.bdon .detailpanel { display: none; }
.bdlist { flex: 1; min-height: 120px; display: flex; flex-direction: column; overflow: hidden; padding-top: 2px; }
.bdlscroll { flex: 1; min-height: 0; overflow-y: scroll; }
.bdlhead, .bdrow { display: grid; grid-template-columns: 76px minmax(70px, 1fr) 64px 72px 72px; align-items: center; column-gap: 10px; padding: 0 6px 0 2px; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bdlist.noevd .bdlhead, .bdlist.noevd .bdrow { grid-template-columns: 76px minmax(70px, 1fr) 64px 72px; }
.bdlhead { position: sticky; top: 0; z-index: 1; height: 28px; background: var(--panel); color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); }
.bdlhead span:nth-child(n+3), .bdrow > span:nth-child(n+3) { text-align: right; }
.bdlhead .sort { cursor: pointer; }
.bdlhead .sort:hover, .bdlhead .sorted { color: #fff; }
.bdlbody { position: relative; }
.bdrow { position: absolute; left: 0; right: 0; height: 24px; border-bottom: 1px solid #222428; }
.bdrow:hover { background: #1f2126; }
.bdrow .mixbar.mini { width: 100%; }
/* piece 3: the Ranges tab (eqgraph.js): the comparison header (fixed columns: player 0 left, player 1 right), EQ | EV + legend, graph */
.rgcmp { flex: none; display: grid; grid-template-columns: 76px minmax(0, 1fr) 62px 22px 62px minmax(0, 1fr); align-items: center; column-gap: 8px; grid-auto-rows: 22px; height: 92px; align-content: start; margin: 0 2px 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.rgcmp .rgl { color: var(--muted); }
.rgcmp .rgp { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 14px; }
.rgcmp .rgp[data-p="0"] { justify-content: flex-end; }
.rgcrown { width: 15px; height: 15px; color: var(--sel); flex: none; }
.rgcmp .rgb { position: relative; height: 8px; border-radius: 3px; background: #2e3036; overflow: hidden; }
.rgcmp .rgb i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; }
.rgcmp .rgb .rgmix { right: 0; }
.rgcmp .rgb:nth-child(6n+2) .rgfill { left: auto; right: 0; }
.rgcmp .rgv { text-align: right; font-weight: 600; }
.rgcmp .rgv:nth-child(6n+5) { text-align: left; }
.rgcmp .rgu { text-align: center; color: var(--muted); font-size: 11.5px; }
.rgctl { flex: none; height: 28px; display: flex; align-items: center; gap: 14px; margin: 0 2px 4px; }
.rglegend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rglg i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.rglg b { color: var(--text); font-variant-numeric: tabular-nums; }
.rggraph { position: relative; flex: 1 1 0; min-height: 140px; background: #0c0d0f; border-radius: 4px; overflow: hidden; }
.rggraph svg { display: block; }
.rggrid { stroke: #23252b; stroke-width: 1; }
.rgtick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.rgline { fill: none; stroke-width: 2; stroke-linejoin: round; }
.rgcross { stroke: #8a8f99; stroke-width: 1; pointer-events: none; }
.rgctl .spacer { flex: 1; }
.rgread { gap: 10px; font-variant-numeric: tabular-nums; }
.rgread span:first-child { min-width: 40px; text-align: right; }
/* cycle 80 BP piece 3: the PHONE (m.html, #mBrowse): the tab row under the action buttons, a tab's view in the chart's place (fixed
   heights: nothing moves between nodes), the hand list below in its own scroller; a horizontal touch-drag on the chart = the equity
   interval (pan-y: the page still scrolls) */
#mBrowse .mtabs { margin: 0 var(--pad) 6px; }
#mBrowse .mtabs button { min-height: 34px; padding: 4px 6px; font-size: 13.5px; }
#mBrowse.bdon #bGrid, #mBrowse.bdon #bDetail { display: none; }
#mBrowse .bdview { margin: 0 var(--pad); overflow: visible; }
#mBrowse .bdchart { flex: none; height: 54vw; max-height: 300px; min-height: 0; touch-action: pan-y; }
#mBrowse .rggraph { flex: none; height: 56vw; max-height: 310px; min-height: 0; }
#mBrowse .bdview .mixbar, #mBrowse .bdlist .mixbar { height: 9px; border-radius: 3px; background-color: #2e3036; margin: 0; }
#mBrowse .bdrange .mixbar { height: 12px; }
#mBrowse .bdrange { grid-template-columns: 56px minmax(0, 1fr); }
#mBrowse .bdfilt > .muted:first-child { display: none; }
#mBrowse .bdfilt .bdx { padding: 4px 9px; font-size: 18px; }
#mBrowse .bdlist { flex: none; height: 44dvh; min-height: 200px; margin: 8px var(--pad) 10px; padding: 0 2px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
#mBrowse .bdlhead, #mBrowse .bdrow { grid-template-columns: 62px minmax(40px, 1fr) 46px 52px 54px; column-gap: 6px; }
#mBrowse .bdlist.noevd .bdlhead, #mBrowse .bdlist.noevd .bdrow { grid-template-columns: 62px minmax(40px, 1fr) 46px 52px; }
#mBrowse .bdrow .cd { font-size: 12px; min-width: 1.55em; padding: 0 2px; margin-right: 1px; }
#mBrowse .rgctl .seg { flex: none; padding: 2px; border-radius: 7px; }
#mBrowse .rgctl .seg button { flex: none; min-height: 26px; padding: 2px 12px; font-size: 13px; }
#mBrowse .rgread { display: none; }
#mBrowse .rgcmp { grid-template-columns: 64px minmax(0, 1fr) 54px 18px 54px minmax(0, 1fr); column-gap: 6px; }
/* cycle 81 BP piece 4: PLO (desktop study page). The tab row sits at the right end of the PLO view's filter row (no extra row);
   a tab on (#bMain.plobd): the view takes the columns' place (the filter row keeps its height; its search / cards filter is not
   this view's filter -> greyed out and inert, breakdown.js sync), the hand list the strength summary's place in the right column;
   the pinned hand's panel stays */
.ploleft .plofiltrow > .plotabs { flex: 0 0 auto; margin-left: auto; align-self: flex-start; }
.ploleft .plotabs button { padding: 3px 9px; }
/* (a narrow window: the tab row takes the NOTE's room -- the note wraps to its 2 lines, plo.css -- not the filter's: with the
   search box's width given, the filter's flex base is its real one-line width, so its counter does not wrap to a second line and
   the search box keeps its 260 px = the columns' top is the same with and without the tab row) */
.ploleft .plofiltrow:has(> .plotabs:not([hidden])) .plo-search { width: 260px; }
#bMain.plobd #ploCols, #bMain.plobd #ploLeft .ploempty { display: none; }
#bMain.plobd #ploFilt { opacity: .35; }
body.plo .bleft #bdView, body.plo .bleft #rgView { width: auto; height: auto; flex: 1 1 0; min-height: 0; }
#bMain.plobd #ploSum { display: none; }
body.plo .bright > #bdList { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; column-gap: 0; padding: 2px 10px 6px; flex: 1 1 0; min-height: 0; }
body.plo #bdList .bdlhead, body.plo #bdList .bdrow { grid-template-columns: 64px minmax(50px, 1fr) 52px 58px 58px; column-gap: 8px; }
body.plo #bdList.noevd .bdlhead, body.plo #bdList.noevd .bdrow { grid-template-columns: 64px minmax(50px, 1fr) 52px 58px; }
body.plo #bdList .bdrow { cursor: pointer; }
/* (a PLO node without hand EVs, e.g. a river: no EV column) */
body.plo #bdList.noev .bdlhead, body.plo #bdList.noev .bdrow { grid-template-columns: 64px minmax(50px, 1fr) 52px 58px; }
body.plo #bdList.noev.noevd .bdlhead, body.plo #bdList.noev.noevd .bdrow { grid-template-columns: 64px minmax(50px, 1fr) 52px; }
.rgapx { color: var(--muted); font-size: 11.5px; }
