/* Leaderboards: the board strip and kind chips, a podium where #1 takes two thirds, the table with a bar for the
   board's number, the field and the champions, and a docked "your place" bar. Built on the site tokens (site.css). */
.lb { width: min(100% - 32px, 1320px); margin: 0 auto; padding: 28px 0 72px; display: grid; gap: 22px; }
.lb > * { min-width: 0; }

.lb-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.lb-top__text { display: grid; gap: 10px; min-width: 0; }
.lb-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--gold); font: 700 .85rem/1 var(--font-label); letter-spacing: .16em; text-transform: uppercase; }
.lb-eyebrow .icon { width: 18px; height: 18px; }
.lb-eyebrow span { color: var(--ink-2); }
.lb-title { margin: 0; color: var(--ink); font: 400 clamp(3rem, 9vw, 6rem)/.86 var(--font-display); letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere; text-wrap: balance; }
.lb-title em { font-style: normal; color: var(--blight); }
.lb-meta { margin: 0; color: var(--ink-3); font: 600 .85rem/1.35 var(--font-label); letter-spacing: .12em; text-transform: uppercase; }
.lb-meta b { color: var(--ink); font-weight: 700; }

.lb-top__side { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.lb-find { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); text-decoration: none; font: 700 .85rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.lb-find .icon { width: 16px; height: 16px; }
.lb-find:hover { text-decoration: underline; }
.lb-seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-deep); border: 1px solid var(--line-soft); border-radius: 6px; }
.lb-seg a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; color: var(--ink-2); text-decoration: none;
    border-radius: 4px; font: 700 .82rem/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase;
    transition: color .2s ease-out, background-color .2s ease-out;
}
.lb-seg a:hover { color: var(--ink); }
.lb-seg a[aria-current="true"] { color: var(--gold-ink); background: var(--gold); }

/* The strip: every board the owner shows. The line is an inset shadow so the strip never grows a vertical scrollbar. */
.lb-strip { position: relative; overflow: auto hidden; box-shadow: inset 0 -1px 0 var(--line-soft); scrollbar-width: thin; }
.lb-strip ul { display: flex; gap: 2px; width: max-content; margin: 0; padding: 0; list-style: none; }
.lb-strip a {
    display: block; padding: 15px 14px 12px; color: var(--ink-2); text-decoration: none; white-space: nowrap;
    border-bottom: 3px solid transparent; font: 700 .95rem/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase;
    transition: color .2s ease-out, border-color .2s ease-out;
}
.lb-strip a:hover { color: var(--ink); }
.lb-strip a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

/* Kinds: every number in the board's families is a board of its own. */
.lb-kinds { position: relative; display: flex; gap: 8px; margin-top: -8px; padding-bottom: 6px; overflow-x: auto; scrollbar-width: thin; }
.lb-kinds a {
    flex: none; padding: 8px 12px; color: var(--ink-2); text-decoration: none; background: var(--panel);
    border: 1px solid var(--line-soft); border-radius: 999px; font: 600 .9rem/1 var(--font-label); letter-spacing: .04em;
    transition: border-color .2s ease-out, color .2s ease-out;
}
.lb-kinds a:hover { color: var(--ink); border-color: var(--line); }
.lb-kinds a[aria-current="page"] { color: var(--ink); background: var(--blight-soft); border-color: var(--blight); }

.lb-hidden-note { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink-2); font-weight: 600; }
.lb-hidden-note .icon { flex: none; width: 18px; height: 18px; color: var(--ember); }
.lb-none { margin: 0; color: var(--ink-2); line-height: 1.5; }

.lb-board { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.lb-main, .lb-rail { display: grid; gap: 18px; min-width: 0; }

/* The podium. #1's numeral is outlined and runs large behind the slab; #2 and #3 show the gap to the place above. */
.lb-podium { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.lb-slab {
    position: relative; overflow: hidden; display: grid; align-content: end; gap: 10px; min-height: 330px; padding: 26px 28px;
    border: 1px solid var(--line); border-radius: 6px;
    background: radial-gradient(120% 90% at 100% 100%, oklch(0.87 0.2 128 / .16), transparent 60%), linear-gradient(160deg, var(--panel-2), var(--bg-deep));
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}
.lb-slab__numeral { position: absolute; right: 22px; top: -18px; font: 400 clamp(11rem, 19vw, 16rem)/.8 var(--font-display); color: transparent; -webkit-text-stroke: 2px oklch(0.8 0.135 78 / .55); pointer-events: none; }
.lb-slab__who { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; }
.lb-slab__who > div { min-width: 0; }
.lb-avatar {
    display: grid; place-items: center; flex: none; width: 58px; height: 58px; color: var(--gold); background: var(--bg-deep);
    border: 2px solid var(--gold); border-radius: 6px; font: 400 1.7rem/1 var(--font-display);
}
.lb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.lb-chip { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font: 700 .7rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; vertical-align: middle; }
.lb-chip--vip { color: var(--gold-ink); background: var(--gold); }
.lb-chip--on { color: var(--blight); background: var(--blight-soft); }
.lb-chip--you { margin-left: 10px; color: var(--bg-deep); background: var(--blight); }
/* The title a player wears (from their badges), in its group's colour. */
.lb-chip--title { margin-left: 10px; color: var(--tone); background: color-mix(in oklch, var(--tone) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--tone) 55%, transparent); }
.lb-slab__name { margin: 0; font: 400 clamp(2rem, 4.6vw, 3.2rem)/.95 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.lb-slab__name a, .lb-runner__name a { color: var(--ink); text-decoration: none; }
.lb-slab__name a:hover, .lb-runner__name a:hover { color: var(--gold); }
.lb-slab__score { position: relative; margin: 6px 0 0; color: var(--gold); font: 400 clamp(4.2rem, 10vw, 7.2rem)/.85 var(--font-display); letter-spacing: .01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lb-slab__score small { margin-left: 10px; color: var(--ink-2); font: 700 1rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.lb-slab__facts { position: relative; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--line-soft); }
.lb-slab__facts li { color: var(--ink-3); font: 600 .82rem/1 var(--font-label); letter-spacing: .1em; text-transform: uppercase; }
.lb-slab__facts b { margin-left: 4px; color: var(--ink); font-size: 1.05rem; letter-spacing: .02em; }
.lb-slab__facts .lb-lead b { color: var(--blight); }

.lb-runners { display: grid; gap: 14px; }
.lb-runner {
    --c: var(--ink-2);
    position: relative; overflow: hidden; display: grid; gap: 6px; padding: 18px 20px;
    background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px;
}
.lb-runner--2 { --c: oklch(0.82 0.01 95); }
.lb-runner--3 { --c: oklch(0.66 0.09 55); }
.lb-runner__numeral { position: absolute; right: -6px; top: -18px; font: 400 8.5rem/.8 var(--font-display); color: transparent; -webkit-text-stroke: 1.5px var(--c); opacity: .6; pointer-events: none; }
.lb-runner__name { position: relative; margin: 0; font: 400 1.6rem/1 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.lb-runner__score { position: relative; margin: 0; color: var(--c); font: 400 2.4rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.lb-runner__gap { position: relative; margin: 0; color: var(--ink-3); font: 600 .82rem/1.2 var(--font-label); letter-spacing: .1em; text-transform: uppercase; }

/* The table, #4 to #100. */
.lb-table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px; }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th, .lb-table td { padding: 11px 14px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.lb-table thead th { color: var(--ink-3); font: 700 .72rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.lb-table tbody tr:last-child > * { border-bottom: 0; }
.lb-table tbody tr:hover { background: oklch(1 0 0 / .025); }
.lb-table td.lb-place { width: 3.5rem; color: var(--ink-3); font: 400 1.25rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.lb-name a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.lb-name a:hover { color: var(--gold); }
.lb-mini { display: grid; place-items: center; width: 28px; height: 28px; color: var(--gold); border: 1px solid var(--line); border-radius: 4px; font: 400 .9rem/1 var(--font-display); }
.lb-metric { width: 40%; }
.lb-bar { display: flex; align-items: center; gap: 10px; }
.lb-bar i { display: block; height: 8px; border-radius: 2px; background: linear-gradient(90deg, oklch(0.8 0.135 78 / .5), var(--gold)); }
.lb-bar b { font: 700 1.05rem/1 var(--font-label); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.lb-table td.lb-dim { color: var(--ink-3); font: 600 .95rem/1 var(--font-label); font-variant-numeric: tabular-nums; }
.lb-row--mine > * { background: var(--blight-soft); }

/* The rail. */
.lb-card { padding: 18px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px; }
.lb-card__title { margin: 0 0 12px; font: 400 1.35rem/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; }
.lb-card__note { margin: 0; color: var(--ink-3); font-size: .9rem; line-height: 1.45; }
.lb-field { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 6px; height: 124px; margin-bottom: 10px; }
.lb-field__slice { display: grid; align-content: end; gap: 4px; height: 100%; text-align: center; }
.lb-field__slice i { display: block; border-radius: 3px 3px 0 0; background: oklch(1 0 0 / .1); }
.lb-field__slice.is-mine i { background: var(--blight); }
.lb-field__slice small { color: var(--ink-3); font: 600 .7rem/1 var(--font-label); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.lb-champs { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lb-champs a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding-bottom: 10px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.lb-champs li:last-child a { padding-bottom: 0; border-bottom: 0; }
.lb-champs span { color: var(--ink-3); font: 700 .72rem/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; }
.lb-champs b { overflow-wrap: anywhere; font: 400 1.1rem/1.1 var(--font-display); text-transform: uppercase; }
.lb-champs em { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--gold); font: 700 1.1rem/1 var(--font-label); font-style: normal; font-variant-numeric: tabular-nums; }
.lb-champs a:hover b { color: var(--gold); }

.lb-me { color: var(--ink-2); }
.lb-me p { margin: 0; }
.lb-me a { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 700; text-decoration: none; }
.lb-me a:hover { text-decoration: underline; }
.lb-me .icon { width: 18px; height: 18px; }

/* Docked: where you stand, always in view (above the staff bar when there is one). */
body:has(.lb-dock) { padding-bottom: 72px; }
body.has-owner-bar:has(.lb-dock) { padding-bottom: 132px; }
.lb-dock {
    position: fixed; z-index: calc(var(--z-header) + 1); inset: auto 0 0 0; padding-bottom: env(safe-area-inset-bottom, 0px);
    background: oklch(0.12 0.01 95 / .97); border-top: 1px solid var(--blight); box-shadow: 0 -12px 32px oklch(0 0 0 / .45);
}
body.has-owner-bar .lb-dock { bottom: 52px; }
.lb-dock__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; width: min(100% - 32px, 1320px); min-height: 60px; margin: 0 auto; padding: 8px 0; }
.lb-dock__rank { color: var(--blight); font: 400 2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.lb-dock__text { flex: 1 1 240px; margin: 0; color: var(--ink-2); }
.lb-dock__text b { color: var(--ink); }
.lb-dock__jump { padding: 10px 14px; color: var(--ink); text-decoration: none; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; font: 700 .8rem/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; }
.lb-dock__jump:hover { border-color: var(--gold); color: var(--gold); }
#my-row { scroll-margin-block: 120px 160px; }

@media (max-width: 1020px) {
    .lb-board { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
    .lb-podium { grid-template-columns: minmax(0, 1fr); }
    .lb-slab { min-height: 260px; padding: 20px; }
    .lb-table th, .lb-table td { padding: 11px 8px; }
    .lb-table .lb-dim { display: none; }
    .lb-metric { width: auto; }
    .lb-bar i { max-width: 90px; }
    .lb-dock__rank { font-size: 1.6rem; }
    .lb-dock__jump { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .lb-seg a, .lb-strip a, .lb-kinds a { transition: none; }
}
