/* AFT Trading Bots: the Strategy Leaderboard. Loads after /style.css and ../bots.css and uses their tokens.
   Prefixed lb- and scoped to body.bx-lbpage. The names' lettering, the plan badges and the coming-soon tag are
   bots.css's own (bx-wm, bx-tier, bx-cs); only their size and wrapping are set here. Everything is drawn by
   leaderboard.js from the site's data files.
   The month buttons stay under the top bar, the current month first. Under 1100 px one month's board shows at a
   time; from 1100 px the boards stand in one row, the current month at the far left, and the row slides sideways
   to the older months. */

.bx-lbpage{padding-bottom:0;--lb-gold:#f7c948;--lb-silver:#cdd5e4;--lb-bronze:#d9925b}

/* the head, as the Strategy Library's */
.bx-lbpage .lb-head{padding:34px 0 24px;border-bottom:1px solid var(--line);background:var(--bg2)}
.lb-head h1{max-width:900px;margin-bottom:12px;font-size:clamp(30px,8.6vw,54px)}
.lb-head .bx-kicker a{color:inherit;padding:7px 0}
.lb-lead{max-width:760px;margin:0;color:var(--text);font-size:18px}
.lb-note{max-width:760px;margin:12px 0 0;color:var(--dim);font-size:14.5px}
@media(min-width:900px){.bx-lbpage .lb-head{padding:56px 0 36px}}

.bx-lbpage .lb-main{padding:0 0 56px}
.lb-status{margin:22px 0 0;color:var(--dim);font-size:15px}
.lb-status[hidden]{display:none}

/* the month buttons: one row under the top bar (64 px and its line), edge to edge on a phone, the current month
   first. With more months than fit, the row slides sideways under the finger. */
.lb-pick{position:sticky;top:65px;z-index:5;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(72px,1fr);gap:8px;
  margin:0 -20px;padding:10px 20px;border-bottom:1px solid var(--line);background:rgba(14,15,22,.94);
  overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.lb-pick::-webkit-scrollbar{display:none}
/* from 700 px a year of buttons fits the row, so nothing slides */
@media(min-width:700px){.lb-pick{grid-auto-columns:minmax(0,1fr)}}
.lb-pick[hidden]{display:none}
.lb-pb{min-width:0;min-height:44px;margin:0;padding:0 6px;border:1px solid var(--line2);border-radius:999px;background:transparent;
  color:var(--dim);font-family:var(--sans);font-size:15px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;
  -webkit-tap-highlight-color:transparent}
.lb-pb:hover{border-color:var(--dim);color:var(--bright)}
.lb-pb[aria-pressed="true"]{border-color:var(--bright);background:var(--bright);color:#0e0f16}
@media(max-width:359.98px){.lb-pb{font-size:13.5px}}

/* the boards */
.lb-boards{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:20px;margin-top:18px}
.lb-board{display:none;min-width:0;padding:16px 14px 4px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.lb-board.is-on{display:block}
/* the main board (the current month): a red top edge, drawn inside so the boards keep one floor */
.lb-board[data-main]{border-top-color:var(--red-brand);box-shadow:inset 0 1px 0 var(--red-brand)}
.bx-lbpage .lb-board[id]{scroll-margin-top:136px}

.lb-bh{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 16px}
.lb-bh h2{margin:0;font-size:23px;font-weight:700;line-height:1.1;letter-spacing:-.02em}
.lb-state{margin:0;padding:3px 10px;border:1px solid var(--line2);border-radius:999px;color:var(--dim);font-size:12px;font-weight:600;line-height:1.4;white-space:nowrap}
.lb-state[data-live]{border-color:rgba(225,25,30,.55);background:var(--red-tint);color:var(--red-soft)}
.lb-state[data-live]::before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:var(--red-edge);vertical-align:1px}
.lb-sub{flex:0 0 100%;margin:0;color:var(--dim);font-size:13.5px;line-height:1.4}
.lb-dot{color:var(--faint)}

/* the podium: second, first and third place, each on its step; the steps share one floor */
.lb-pod{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:end;margin:0;padding:0}
.lb-p{container-type:inline-size;min-width:0;margin:0;padding:0}
.lb-p[data-r="2"]{order:1}
.lb-p[data-r="1"]{order:2}
.lb-p[data-r="3"]{order:3}
.lb-plink{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;border-radius:10px;color:inherit;text-align:center;text-decoration:none}
.lb-plink:hover{text-decoration:none}
.lb-plink:hover .lb-ped{filter:brightness(1.25)}
.lb-crown{display:block;flex:none;margin-bottom:1px;fill:var(--lb-gold);stroke:var(--lb-gold);filter:drop-shadow(0 0 6px rgba(247,201,72,.55))}
/* a podium name may break between its words; its size follows its longest word (--w, set by leaderboard.js) so that
   word always fits its third of the board. The polish of a lit name is drawn once on each row of letters. */
.lb-pname.bx-wm{display:block;max-width:100%;white-space:normal;line-height:1.2;letter-spacing:.05em;
  font-size:clamp(8.5px,calc(92cqw / (var(--w,10) * .8)),15px)}
.lb-pname.bx-wm[data-lvl="plain"]{letter-spacing:-.01em;font-size:clamp(11px,calc(92cqw / (var(--w,10) * .6)),16px)}
.lb-pname.bx-wm[data-lvl="sheen"],.lb-pname.bx-wm[data-lvl="polished"]{background-size:100% 1.2em,100% 100%;background-position:0 0,0 0;background-repeat:repeat-y,no-repeat}
.lb-plink>.bx-cs{margin:0;font-size:10.5px;padding:0 6px}
.lb-pv{font-family:var(--sans);font-size:clamp(11.5px,13.4cqw,17px);font-weight:600;font-variant-numeric:tabular-nums;line-height:1.25;white-space:nowrap;color:var(--bright)}
.lb-pmeta{display:flex;flex-direction:column;align-items:center;max-width:100%;color:var(--dim);font-size:clamp(10px,11.4cqw,11.5px);line-height:1.4}
.lb-pmeta>span{white-space:nowrap}
@media(max-width:339.98px){.lb-pmeta>span{white-space:normal}}
.lb-ped{display:flex;align-items:flex-start;justify-content:center;width:100%;margin-top:4px;padding-top:7px;border-top:2px solid var(--m);border-radius:8px 8px 0 0;
  background:linear-gradient(180deg,var(--mt),rgba(255,255,255,0));color:var(--m);font-family:var(--display);font-size:22px;font-weight:800;line-height:1}
.lb-p[data-r="1"] .lb-ped{--m:var(--lb-gold);--mt:rgba(247,201,72,.22);height:66px;font-size:28px}
.lb-p[data-r="2"] .lb-ped{--m:var(--lb-silver);--mt:rgba(205,213,228,.17);height:46px}
.lb-p[data-r="3"] .lb-ped{--m:var(--lb-bronze);--mt:rgba(217,146,91,.2);height:32px}

/* the lines from fourth place down: place and move, name, what stands under it, the month's figure and its bar */
.lb-rows{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
/* a line is a container: its name takes a size that fits beside the figure on a narrow phone */
.lb-row{container-type:inline-size;margin:0;padding:0;border-bottom:1px solid var(--line)}
.lb-row:last-child{border-bottom:0}
.lb-link{display:grid;grid-template-columns:30px minmax(0,1fr) auto;grid-template-areas:"rk nm v" "rk meta meta" "rk bar bar";align-items:center;gap:3px 8px;
  padding:10px 2px 11px;color:inherit;text-decoration:none}
.lb-link.has-end{grid-template-areas:"rk nm v" "rk meta end" "rk bar bar"}
.lb-link:hover{text-decoration:none;background:rgba(255,255,255,.035)}
.lb-rk{grid-area:rk;display:flex;flex-direction:column;align-items:center;gap:3px;align-self:start;padding-top:1px}
.lb-rk b{font-family:var(--display);font-size:16px;font-weight:700;line-height:1.2;color:var(--bright);font-variant-numeric:tabular-nums}
.lb-mv{font-size:10.5px;font-weight:600;line-height:1;white-space:nowrap;color:var(--faint);font-variant-numeric:tabular-nums}
.lb-mv.is-up{color:var(--win)}
.lb-mv.is-down{color:var(--loss)}
.lb-nm{grid-area:nm;display:flex;min-width:0;max-width:100%}
.lb-nm>.bx-sname{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.lb-nm>.bx-nt{flex-wrap:wrap;gap:3px 8px}
.lb-nm .bx-cs{font-size:11px;padding:0 6px}
.lb-nm .bx-sname.bx-wm{font-size:clamp(10.5px,4.2cqw,14.5px);letter-spacing:.05em}
.lb-nm .bx-sname.bx-wm[data-lvl="plain"]{font-size:clamp(12px,4.6cqw,15px);letter-spacing:-.01em}
.lb-meta{grid-area:meta;display:flex;flex-wrap:wrap;align-items:center;gap:1px 8px;min-width:0;color:var(--dim);font-size:12px;line-height:1.4}
.lb-end{grid-area:end;justify-self:end;color:var(--dim);font-size:12px;line-height:1.4;white-space:nowrap}
.lb-meta .bx-tier{font-family:var(--sans);font-size:11px;font-weight:600;line-height:1.3;letter-spacing:0;padding:0 7px;white-space:nowrap}
.lb-v{grid-area:v;justify-self:end;align-self:start;font-family:var(--sans);font-size:15px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.3;white-space:nowrap;color:var(--bright)}
/* on the narrowest phones a five-figure amount leaves the longest name its room */
@media(max-width:339.98px){.lb-v{font-size:14px}}
.lb-bar{grid-area:bar;display:block;height:4px;margin-top:5px;border-radius:2px;background:rgba(255,255,255,.07);overflow:hidden}
.lb-bar i{display:block;height:100%;border-radius:2px}
.lb-bar i.is-pos{background:var(--win)}
.lb-bar i.is-neg{background:var(--loss)}
.lb-none{margin:0;padding:10px 2px 12px;border-top:1px solid var(--line);color:var(--dim);font-size:13px}

/* under the boards */
.lb-asof{margin:16px 0 0;color:var(--dim);font-size:14px}
.lb-read{max-width:760px;margin:34px 0 0}
.lb-read h2{margin:0 0 12px;font-size:24px;font-weight:700;letter-spacing:-.02em}
.lb-read ul{margin:0;padding:0 0 0 20px;color:var(--text);font-size:15.5px;line-height:1.55}
.lb-read li{margin:0 0 8px}
.lb-read li[hidden]{display:none}
.lb-go{display:flex;flex-wrap:wrap;gap:12px;margin:26px 0 0}
@media(max-width:559.98px){.lb-go .btn{flex:1 1 100%}}

@media(min-width:600px){
  .lb-board{padding:20px 20px 6px}
  .lb-pod{gap:12px}
}
/* from 1100 px: the boards in one row, the current month at the far left and three in view, with the edge of the
   next one showing; the row slides sideways to the older months, and a month button slides its board to the left */
@media(min-width:1100px){
  .lb-pick{margin:18px 0 0;padding:10px 0;grid-auto-columns:minmax(0,1fr);overflow:visible}
  /* three boards or fewer are all in view: no buttons needed */
  .lb-pick[data-n="1"],.lb-pick[data-n="2"],.lb-pick[data-n="3"]{display:none}
  .lb-pb{min-height:40px;font-size:14.5px}
  .lb-boards{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:calc((100% - 96px) / 3);align-items:start;margin-top:16px;padding-bottom:14px;
    overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:var(--line2) transparent}
  .lb-boards[data-n="3"]{grid-auto-columns:calc((100% - 40px) / 3)}
  .lb-boards[data-n="2"]{grid-auto-columns:calc((100% - 20px) / 2)}
  .lb-boards[data-n="1"]{grid-auto-columns:minmax(0,560px)}
  .lb-board{display:block;padding:18px 16px 4px;scroll-snap-align:start}
  /* in one row the podiums stand on one floor: the same room for each, whatever its names need */
  .lb-pod{gap:8px;min-height:222px}
  .bx-lbpage .lb-board[id]{scroll-margin-top:150px}
}
/* the narrowest rows: a little less of the next board showing and a little less padding, so a line keeps one row */
@media(min-width:1100px) and (max-width:1199.98px){
  .lb-boards{grid-auto-columns:calc((100% - 84px) / 3)}
  .lb-board{padding:18px 14px 4px}
}
@media(forced-colors:active){
  .lb-bar i{background:CanvasText}
  .lb-pb[aria-pressed="true"]{border-width:3px}
}
/* RoDD ranking (2026-11-26): the RoDD is the big figure with its small unit after it; the month's profit in dollars under it */
.lb-u{margin-left:4px;font-size:.62em;font-weight:600;letter-spacing:.04em;color:var(--dim)}
.lb-pusd{font-family:var(--sans);font-size:clamp(10.5px,12cqw,13px);font-weight:600;font-variant-numeric:tabular-nums;line-height:1.3;white-space:nowrap}
.lb-usd{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
