Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

33.3 KB
Raw Blame
/* Trader Leaderboard — provable pump.fun track records.
   Built entirely on the canonical design tokens (public/tokens.css via nav.css).
   Glass-on-near-black, golden-ratio spacing, dark/light via tokens. */

.lb-shell {
	max-width: 1180px;
	margin: 0 auto;
	padding: var(--space-xl) var(--space-md) var(--space-2xl);
	position: relative;
	z-index: 1;
}

/* Ambient field canvas — decorative, pointer-inert, paused under reduced motion. */
#lb-field {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	pointer-events: none;
	opacity: 0.5;
}

/* ---- Hero ---- */
.lb-hero {
	text-align: center;
	margin-bottom: var(--space-xl);
}
.lb-kicker {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-dim);
	padding: var(--space-3xs) var(--space-sm);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-pill);
	background: var(--surface-glass);
	backdrop-filter: blur(var(--blur-sm));
}
.lb-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--success);
	box-shadow: 0 0 0 0 var(--success);
	animation: lb-pulse 2.4s var(--ease-out) infinite;
}
@keyframes lb-pulse {
	0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
	70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
	100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.lb-hero-cta { margin: var(--space-sm) 0 0; display: flex; justify-content: center; }
.lb-title {
	font-family: var(--font-display);
	font-weight: var(--weight-bold);
	font-size: var(--text-3xl);
	line-height: var(--leading-tight);
	margin: var(--space-sm) 0 var(--space-xs);
	letter-spacing: -0.02em;
}
.lb-sub {
	max-width: 60ch;
	margin: 0 auto;
	color: var(--ink-dim);
	font-size: var(--text-md);
	line-height: var(--leading-normal);
}
.lb-sub strong { color: var(--ink-bright); font-weight: var(--weight-semibold); }

/* Six live stats read as one balanced bar (6-up → 3-up → 2-up) — never the
   lopsided 4+2 the old 4-column grid produced with six cells. */
.lb-summary {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: var(--space-xs);
	margin: var(--space-lg) auto 0;
	max-width: 1080px;
}
.lb-summary-cell {
	border: 1px solid var(--stroke);
	background: var(--surface-1);
	border-radius: var(--radius-md);
	padding: var(--space-sm) var(--space-xs);
	text-align: center;
	min-width: 0;
	transition: border-color var(--duration-fast) var(--ease-standard),
		background var(--duration-fast) var(--ease-standard);
}
.lb-summary-cell:hover { border-color: var(--stroke-strong); background: var(--surface-2); }
.lb-summary-cell dt {
	font-size: var(--text-2xs);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ink-faint);
	margin-bottom: var(--space-3xs);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lb-summary-cell dd {
	margin: 0;
	font-family: var(--font-display);
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
	font-variant-numeric: tabular-nums;
	line-height: 1.15;
}

/* ---- Controls ---- */
.lb-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	margin-bottom: var(--space-sm);
}
.lb-control-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-sm);
}
.lb-seg {
	display: inline-flex;
	padding: 3px;
	gap: 2px;
	border: 1px solid var(--stroke);
	border-radius: var(--radius-pill);
	background: var(--surface-1);
}
.lb-seg-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--ink-dim);
	font-family: var(--font-body);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
	padding: var(--space-2xs) var(--space-md);
	border-radius: var(--radius-pill);
	cursor: pointer;
	transition: color var(--duration-fast) var(--ease-standard),
		background var(--duration-fast) var(--ease-standard);
}
.lb-seg-sm .lb-seg-btn { padding: var(--space-2xs) var(--space-sm); }
.lb-seg-btn:hover { color: var(--ink-bright); }
.lb-seg-btn.is-active {
	background: var(--accent);
	/* This page loads tokens.css but not buttons.css/style.css, so --btn-primary-fg
	   is undefined in dark mode; the #0a0a0a fallback keeps active-tab ink legible on
	   the white accent. Light theme sets --btn-primary-fg:#fff (tokens.css) → white ink. */
	color: var(--btn-primary-fg, #0a0a0a);
	font-weight: var(--weight-semibold);
	box-shadow: var(--shadow-1);
}
.lb-select-wrap { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.lb-select-label {
	font-size: var(--text-2xs);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink-faint);
}
.lb-select {
	appearance: none;
	border: 1px solid var(--stroke);
	background: var(--surface-1);
	color: var(--ink-bright);
	font-family: var(--font-body);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
	padding: var(--space-2xs) var(--space-lg) var(--space-2xs) var(--space-sm);
	border-radius: var(--radius-control);
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23888' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right var(--space-sm) center;
}
.lb-toggle { display: inline-flex; align-items: center; gap: var(--space-2xs); cursor: pointer; user-select: none; }
.lb-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.lb-toggle-track {
	width: 34px;
	height: 20px;
	border-radius: var(--radius-pill);
	background: var(--surface-3);
	border: 1px solid var(--stroke);
	position: relative;
	transition: background var(--duration-fast) var(--ease-standard);
}
.lb-toggle-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--ink-dim);
	transition: transform var(--duration-fast) var(--ease-emphasized),
		background var(--duration-fast) var(--ease-standard);
}
.lb-toggle input:checked + .lb-toggle-track { background: color-mix(in srgb, var(--success) 30%, transparent); }
.lb-toggle input:checked + .lb-toggle-track .lb-toggle-thumb { transform: translateX(14px); background: var(--success); }
.lb-toggle-text { font-size: var(--text-xs); color: var(--ink-dim); font-weight: var(--weight-medium); }
.lb-toggle input:focus-visible + .lb-toggle-track {
	outline: var(--focus-ring-width) solid var(--focus-ring-color);
	outline-offset: var(--focus-ring-offset);
}

/* ---- How-to disclosure ---- */
.lb-howto {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: var(--space-2xs);
	background: transparent;
	border: 0;
	color: var(--ink-faint);
	font-family: var(--font-body);
	font-size: var(--text-xs);
	padding: var(--space-2xs) 0;
	cursor: pointer;
	margin-bottom: var(--space-xs);
	transition: color var(--duration-fast) var(--ease-standard);
}
.lb-howto:hover { color: var(--ink-bright); }
.lb-howto:focus-visible {
	outline: var(--focus-ring-width) solid var(--focus-ring-color);
	outline-offset: var(--focus-ring-offset);
	border-radius: var(--radius-sm);
}
.lb-howto-chev { transition: transform var(--duration-fast) var(--ease-standard); }
.lb-howto[aria-expanded='true'] .lb-howto-chev { transform: rotate(180deg); }
.lb-howto-body {
	border: 1px solid var(--stroke);
	background: var(--surface-1);
	border-radius: var(--radius-md);
	padding: var(--space-md);
	margin-bottom: var(--space-md);
}
.lb-howto-body p { margin: 0; color: var(--ink-dim); font-size: var(--text-sm); line-height: var(--leading-normal); }
.lb-howto-body strong { color: var(--ink-bright); font-weight: var(--weight-semibold); }

/* ---- Board ---- */
.lb-board {
	border: 1px solid var(--stroke);
	border-radius: var(--radius-card);
	background: var(--surface-1);
	overflow: hidden;
}
.lb-board[aria-busy='true'] .lb-rows { opacity: 0.5; }
.lb-board-head,
.lb-row {
	display: grid;
	grid-template-columns: 36px minmax(0, 2.4fr) 0.9fr 1.2fr 0.9fr 0.8fr 0.8fr 0.7fr 96px;
	align-items: center;
	gap: var(--space-xs);
	padding: var(--space-sm) var(--space-md);
}
.lb-board-head {
	font-size: var(--text-2xs);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink-faint);
	border-bottom: 1px solid var(--stroke);
	background: var(--surface-2);
}
.lb-col-num { text-align: right; font-variant-numeric: tabular-nums; }
.lb-col-act { text-align: right; }

/* Live top-trader fallback: a leaner 6-column grid (no Score / ROI / Max DD —
   those are ours to compute for agents, not scraped for external wallets). */
.lb-board.is-live .lb-board-head,
.lb-board.is-live .lb-row {
	grid-template-columns: 36px minmax(0, 2.4fr) 1.2fr 0.9fr 0.8fr 96px;
}

/* Contextual banner shown above the board while the live fallback is on screen. */
.lb-live-banner {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 12px;
	padding: 9px 13px;
	border: 1px solid color-mix(in srgb, var(--accent, #8c9bff) 32%, var(--line, var(--stroke)));
	background: color-mix(in srgb, var(--accent, #8c9bff) 8%, transparent);
	border-radius: var(--r, 10px);
	font-size: var(--text-xs);
	line-height: 1.4;
	color: var(--ink-dim, #b8b8c4);
	animation: lb-stale-in 0.2s ease both;
}
.lb-live-banner strong { color: var(--ink-bright, #fff); font-weight: 600; }
.lb-live-banner a { color: var(--accent, #8c9bff); text-decoration: none; font-weight: 600; }
.lb-live-banner a:hover { text-decoration: underline; }
.lb-live-banner-text { min-width: 0; }

/* The verified toggle is meaningless for external wallets — dim it in live mode. */
.lb-toggle.is-disabled { opacity: 0.4; pointer-events: none; }

.lb-rows { display: flex; flex-direction: column; }
.lb-row {
	border-bottom: 1px solid var(--hairline);
	text-decoration: none;
	color: inherit;
	position: relative;
	transition: background var(--duration-fast) var(--ease-standard);
	animation: lb-row-in var(--duration-base) var(--ease-out) both;
}
.lb-row:last-child { border-bottom: 0; }
/* On refresh/sort we FLIP rows to their new rank (src/ui-juice.js) — suppress the
   per-row entrance animation so standings settle in place instead of re-flashing. */
.lb-rows--reflow .lb-row { animation: none; }
.lb-row:hover { background: var(--surface-2); }
.lb-row:focus-visible {
	outline: var(--focus-ring-width) solid var(--focus-ring-color);
	outline-offset: calc(-1 * var(--focus-ring-width));
}
@keyframes lb-row-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.lb-rank {
	font-family: var(--font-display);
	font-size: var(--text-md);
	font-weight: var(--weight-bold);
	color: var(--ink-faint);
	font-variant-numeric: tabular-nums;
}
.lb-row[data-top='1'] .lb-rank { color: #fcd34d; }
.lb-row[data-top='2'] .lb-rank { color: #d4d4d8; }
.lb-row[data-top='3'] .lb-rank { color: #d8a06a; }

.lb-trader { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.lb-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--stroke);
	background: var(--surface-3);
	flex-shrink: 0;
}
.lb-trader-meta { min-width: 0; display: block; }
.lb-trader-name {
	display: flex;
	align-items: center;
	gap: var(--space-2xs);
	min-width: 0;
	font-weight: var(--weight-semibold);
	font-size: var(--text-sm);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* The name text truncates independently of the trailing verified badge (the badge
   must never be pushed off — a flex text node alone can't ellipsis). */
.lb-trader-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-verified {
	display: inline-flex;
	align-items: center;
	color: var(--success);
	flex-shrink: 0;
}
.lb-verified svg { width: 14px; height: 14px; }
.lb-trader-sub {
	display: block;
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	color: var(--ink-faint);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lb-copiers { color: var(--success); }

/* ---- Signature coin — "what they made it on" (leaderboard rows + profile) ---- */
.sig-coin {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	font-family: var(--font-mono);
	font-variant-numeric: tabular-nums;
	max-width: 100%;
	min-width: 0;
}
.sig-coin-lead { color: var(--ink-faint); }
.sig-coin-sym {
	font-weight: var(--weight-semibold);
	color: var(--ink-bright);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 12ch;
}
.sig-coin.lb-pos .sig-coin-pnl { color: var(--success); }
.sig-coin.lb-neg .sig-coin-pnl { color: var(--danger); }
.sig-coin.lb-muted .sig-coin-pnl { color: var(--ink-faint); }

/* ---- Most Profitable Trader spotlight ---- */
.lb-spotlight { margin: 0 0 var(--space-lg); }
.lb-spot-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid color-mix(in srgb, #fcd34d 26%, var(--stroke));
	border-radius: var(--radius-lg, 16px);
	background:
		radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, #fcd34d 12%, transparent), transparent 60%),
		var(--surface-1, var(--surface-2));
	padding: var(--space-sm) var(--space-md) var(--space-md);
	position: relative;
	overflow: hidden;
	transition: border-color var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
	animation: lb-row-in var(--duration-base) var(--ease-out) both;
}
.lb-spot-card:hover { border-color: color-mix(in srgb, #fcd34d 55%, var(--stroke)); transform: translateY(-1px); }
.lb-spot-card:focus-visible {
	outline: var(--focus-ring-width) solid var(--focus-ring-color);
	outline-offset: 2px;
}
.lb-spot-tag {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fcd34d;
	margin-bottom: var(--space-sm);
}
.lb-spot-crown { font-size: 1.05em; line-height: 1; }
.lb-spot-body {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	min-width: 0;
}
.lb-spot-av {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid color-mix(in srgb, #fcd34d 40%, var(--stroke));
	background: var(--surface-3);
	flex-shrink: 0;
}
.lb-spot-main { min-width: 0; flex: 1; }
.lb-spot-name {
	display: flex;
	align-items: center;
	gap: var(--space-2xs);
	font-family: var(--font-display);
	font-weight: var(--weight-bold);
	font-size: var(--text-lg);
	min-width: 0;
}
.lb-spot-name .lb-verified svg { width: 16px; height: 16px; }
.lb-spot-coin {
	margin-top: 3px;
	font-size: var(--text-xs);
	display: flex;
	align-items: baseline;
	gap: 5px;
	min-width: 0;
}
.lb-spot-coin-lead { color: var(--ink-dim); font-family: var(--font-mono); font-size: var(--text-2xs); }
.lb-spot-pnl { text-align: right; flex-shrink: 0; }
.lb-spot-pnl-val {
	font-family: var(--font-display);
	font-weight: var(--weight-bold);
	font-size: var(--text-xl);
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}
.lb-spot-pnl-sub { font-size: var(--text-2xs); color: var(--ink-faint); font-family: var(--font-mono); margin-top: 2px; }
.lb-spot-cta {
	flex-shrink: 0;
	font-size: var(--text-2xs);
	font-weight: var(--weight-semibold);
	color: var(--ink-dim);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-pill);
	padding: var(--space-3xs) var(--space-sm);
	white-space: nowrap;
}
.lb-spot-card:hover .lb-spot-cta { color: var(--ink-bright); border-color: var(--stroke-strong); }
@media (max-width: 640px) {
	.lb-spot-cta { display: none; }
	.lb-spot-pnl-val { font-size: var(--text-lg); }
	.lb-spot-av { width: 46px; height: 46px; }
}

.lb-score {
	display: inline-flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 1px;
	font-family: var(--font-display);
	font-weight: var(--weight-bold);
	font-size: var(--text-lg);
	font-variant-numeric: tabular-nums;
}
/* Score meter: a full-width track under the number with a fill proportional to the
   0–100 Trader Score, so the bar reads as a gauge instead of a stray underline. */
.lb-score-track {
	display: block;
	height: 3px;
	border-radius: var(--radius-pill);
	margin-top: 4px;
	background: var(--surface-3);
	overflow: hidden;
}
.lb-score-bar {
	display: block;
	height: 100%;
	border-radius: var(--radius-pill);
	background: linear-gradient(90deg, var(--ink-faint), var(--accent));
	transition: width var(--duration-base) var(--ease-emphasized);
}

.lb-num { font-variant-numeric: tabular-nums; text-align: right; font-size: var(--text-sm); }
.lb-num .lb-sub-num { display: block; font-size: var(--text-2xs); color: var(--ink-faint); }
.lb-pos { color: var(--success); }
.lb-neg { color: var(--danger); }
.lb-muted { color: var(--ink-faint); }

/* ---- P&L sparkline (per-row realized-equity trend) ---- */
/* The P&L cell pairs the headline number with a tiny cumulative-equity curve, so
   two traders with the same total read differently when one ground it out and the
   other spiked once. The SVG sits above the numbers on wide rows and tucks inline
   when the column is tight. */
.lb-pnl-cell { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.lb-pnl-nums { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.lb-spark { display: inline-block; width: 68px; height: 22px; line-height: 0; color: var(--ink-faint); }
.lb-spark svg { display: block; overflow: visible; }
.lb-spark.is-up { color: var(--success); }
.lb-spark.is-down { color: var(--danger); }
.lb-spark--empty { display: inline-flex; align-items: center; }
.lb-spark-flat {
	display: block; width: 68px; height: 1px; border-radius: var(--radius-pill);
	background: repeating-linear-gradient(90deg, var(--stroke) 0 3px, transparent 3px 6px);
	opacity: 0.5;
}
/* End-dot pulse marks the latest point — the row's "live" tell. Motion-gated. */
.lb-spark-dot { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
	.lb-spark-dot { animation: lb-spark-pulse 2.4s var(--ease-standard) infinite; }
}
@keyframes lb-spark-pulse { 0%, 100% { opacity: 1; r: 1.9px; } 50% { opacity: 0.55; r: 2.6px; } }

/* Win/loss distribution micro-bar under the win-rate % — green wins vs red losses. */
.lb-wl {
	display: block; height: 3px; margin-top: 4px; border-radius: var(--radius-pill);
	background: var(--danger); overflow: hidden;
}
.lb-wl-win { display: block; height: 100%; background: var(--success); border-radius: var(--radius-pill); }
.lb-winrate { position: relative; }

@media (max-width: 640px) {
	/* On narrow rows the sparkline would crowd the number — keep the number, drop the chart. */
	.lb-spark, .lb-spark--empty { display: none; }
	.lb-pnl-cell { gap: 0; }
}

.lb-view {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
	font-size: var(--text-2xs);
	font-weight: var(--weight-semibold);
	color: var(--ink-dim);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-pill);
	padding: var(--space-3xs) var(--space-sm);
	white-space: nowrap;
	transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.lb-row:hover .lb-view { color: var(--ink-bright); border-color: var(--stroke-strong); }

/* Skeleton rows */
.lb-skeleton { pointer-events: none; }
.lb-skeleton .lb-sk {
	height: 12px;
	border-radius: var(--radius-sm);
	background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
	background-size: 400% 100%;
	animation: lb-shimmer 1.4s ease infinite;
}
.lb-skeleton .lb-avatar { background: var(--surface-3); }
@keyframes lb-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---- State (empty / error) ---- */
.lb-state { text-align: center; padding: var(--space-2xl) var(--space-md); color: var(--ink-dim); }
.lb-state:empty { display: none; }
.lb-state-title { font-family: var(--font-display); font-size: var(--text-lg); color: var(--ink-bright); margin-bottom: var(--space-2xs); }
.lb-state p { margin: 0 auto var(--space-md); max-width: 44ch; font-size: var(--text-sm); }

/* ---- Ticker ---- */
.lb-ticker-wrap { margin-top: var(--space-xl); }
.lb-ticker-title {
	font-size: var(--text-2xs);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink-faint);
	margin: 0 0 var(--space-sm);
}
.lb-ticker { display: flex; gap: var(--space-sm); overflow-x: auto; padding-bottom: var(--space-2xs); scrollbar-width: thin; }
.lb-tick {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 160px;
	border: 1px solid var(--stroke);
	border-radius: var(--radius-md);
	background: var(--surface-1);
	padding: var(--space-sm);
	text-decoration: none;
	color: inherit;
	transition: border-color var(--duration-fast) var(--ease-standard);
}
.lb-tick:hover { border-color: var(--stroke-strong); }
.lb-tick-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2xs); }
.lb-tick-sym { font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.lb-tick-pnl { font-variant-numeric: tabular-nums; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.lb-tick-meta { font-size: var(--text-2xs); color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- CTA ---- */
.lb-cta { margin-top: var(--space-2xl); }
.lb-cta-inner {
	border: 1px solid var(--stroke);
	border-radius: var(--radius-card);
	background: var(--surface-1);
	padding: var(--space-xl);
	text-align: center;
}
.lb-cta-inner h2 { font-family: var(--font-display); font-size: var(--text-xl); margin: 0 0 var(--space-2xs); }
.lb-cta-inner p { color: var(--ink-dim); max-width: 52ch; margin: 0 auto var(--space-md); font-size: var(--text-sm); }
.lb-cta-row { display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap; }
.lb-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
	padding: var(--space-2xs) var(--space-lg);
	border-radius: var(--radius-control);
	border: 1px solid var(--stroke);
	background: var(--surface-2);
	color: var(--ink-bright);
	text-decoration: none;
	cursor: pointer;
	transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.lb-btn:hover { transform: translateY(-1px); border-color: var(--stroke-strong); }
.lb-btn:active { transform: translateY(0); }
/* Fallback ink for the white-fill primary CTA — see note on .lb-seg-btn.is-active. */
.lb-btn-primary { background: var(--accent); color: var(--btn-primary-fg, #0a0a0a); border-color: transparent; }
.lb-btn-primary:hover { border-color: transparent; }
.lb-btn:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: var(--focus-ring-offset); }

/* ---- Oracle Conviction Rankings ---- */
.lb-oracle-section {
	margin: var(--space-2xl) 0 var(--space-xl);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--surface-1);
}
.lb-oracle-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	padding: var(--space-lg) var(--space-lg) 0;
}
.lb-oracle-title-row {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}
.lb-oracle-icon {
	font-size: 20px;
	color: var(--accent);
}
.lb-oracle-title {
	font-size: var(--text-lg);
	font-weight: 700;
	letter-spacing: -0.01em;
}
.lb-oracle-badge {
	font-size: 10.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ink-dim);
	padding: 3px 9px;
	border-radius: var(--radius-pill);
	background: var(--surface-2);
	border: 1px solid var(--stroke);
}
.lb-oracle-link {
	font-size: 13px;
	color: var(--accent);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}
.lb-oracle-link:hover { text-decoration: underline; }
.lb-oracle-sub {
	font-size: 13px;
	color: var(--ink-dim);
	padding: var(--space-xs) var(--space-lg) var(--space-md);
	line-height: 1.5;
}
.lb-oracle-board-wrap {
	border-top: 1px solid var(--stroke);
}
.lb-oracle-board-head {
	display: grid;
	grid-template-columns: 36px minmax(0, 2.4fr) 0.9fr 0.8fr 1.1fr 0.8fr 104px;
	align-items: center;
	gap: var(--space-xs);
	padding: var(--space-sm) var(--space-md);
	font-size: var(--text-2xs);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink-faint);
	background: var(--surface-2);
	border-bottom: 1px solid var(--stroke);
}
.lb-oracle-rows { display: flex; flex-direction: column; }
.lb-oracle-row {
	display: grid;
	grid-template-columns: 36px minmax(0, 2.4fr) 0.9fr 0.8fr 1.1fr 0.8fr 104px;
	align-items: center;
	gap: var(--space-xs);
	padding: var(--space-sm) var(--space-md);
	border-bottom: 1px solid var(--hairline);
	color: inherit;
	transition: background var(--duration-fast) var(--ease-standard);
}
.lb-oracle-trader-link { text-decoration: none; color: inherit; display: flex; align-items: center; gap: var(--space-2xs); min-width: 0; }
.lb-oracle-row:last-child { border-bottom: 0; }
.lb-oracle-row:hover { background: var(--surface-2); }
.lb-oracle-row .lb-rank { color: var(--ink-faint); font: 600 13px/1 var(--font-mono); }
.lb-oracle-row[data-rank='1'] .lb-rank { color: #fcd34d; }
.lb-oracle-row[data-rank='2'] .lb-rank { color: #d4d4d8; }
.lb-oracle-row[data-rank='3'] .lb-rank { color: #d8a06a; }
.lb-oracle-row .lb-col-num { text-align: right; font-variant-numeric: tabular-nums; font: 600 13.5px/1 var(--font-mono); }
/* W/L record reads as a quiet secondary stat, not another bold number. */
.lb-oracle-row .lb-oracle-record { font-weight: 500; font-size: var(--text-sm); color: var(--ink-dim); }
/* Single primary action per row (the agent name already links to the profile). */
.lb-oracle-act { text-align: right; }
.lb-oracle-copy { font-size: var(--text-2xs); font-weight: var(--weight-semibold); padding: var(--space-2xs) var(--space-sm); white-space: nowrap; }
.lb-oracle-empty {
	padding: var(--space-xl) var(--space-md);
	text-align: center;
	color: var(--ink-dim);
	font-size: 13px;
}
.lb-oracle-empty a { color: var(--accent); }
.lb-oracle-sk {
	display: block;
	height: 44px;
	border-bottom: 1px solid var(--hairline);
	background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-1) 37%, var(--surface-2) 63%);
	background-size: 400% 100%;
	animation: lb-shimmer 1.4s infinite;
}

/* ---- Responsive ---- */
/* The action pill's word ("Track record" / "Account") collapses to a bare arrow on
   narrow screens so it never clips inside the tight action column. */
.lb-view-full { display: inline; }

@media (max-width: 880px) {
	.lb-hide-md { display: none !important; }
	.lb-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.lb-board-head,
	.lb-row { grid-template-columns: 30px minmax(0, 2.2fr) 0.9fr 1.1fr 0.9fr 0.8fr 0.8fr 88px; }
	.lb-board.is-live .lb-board-head,
	.lb-board.is-live .lb-row { grid-template-columns: 30px minmax(0, 2.2fr) 1.1fr 0.9fr 0.8fr 88px; }
	.lb-oracle-board-head,
	.lb-oracle-row { grid-template-columns: 30px minmax(0, 2.2fr) 0.9fr 0.8fr 1.1fr 0.8fr 100px; }
}
@media (max-width: 620px) {
	.lb-shell { padding: var(--space-lg) var(--space-sm) var(--space-xl); }
	.lb-title { font-size: var(--text-2xl); }
	.lb-summary { grid-template-columns: repeat(2, 1fr); }
	.lb-hide-sm, .lb-winrate { display: none !important; }

	/* Controls stack: full-width time window on its own row, then rank-by (select
	   grows to fill), then verified + network sharing the last row. No cramped wrap. */
	.lb-controls { flex-direction: column; align-items: stretch; gap: var(--space-sm); }
	#lb-window { width: 100%; }
	#lb-window .lb-seg-btn { flex: 1 1 0; text-align: center; padding-left: var(--space-2xs); padding-right: var(--space-2xs); }
	.lb-control-group { width: 100%; justify-content: space-between; row-gap: var(--space-sm); }
	.lb-select-wrap { flex: 1 1 100%; justify-content: space-between; }
	.lb-select { flex: 1 1 auto; min-width: 0; }

	.lb-board-head,
	.lb-row { grid-template-columns: 26px minmax(0, 1.7fr) 0.72fr 1fr 44px; }
	/* Win-rate column is hidden below 620px, so the live grid drops to 5 columns. */
	.lb-board.is-live .lb-board-head,
	.lb-board.is-live .lb-row { grid-template-columns: 26px minmax(0, 1.7fr) 1fr 0.8fr 44px; }
	.lb-board-head, .lb-row { padding-left: var(--space-sm); padding-right: var(--space-sm); }
	.lb-avatar { width: 32px; height: 32px; }
	.lb-score { font-size: var(--text-md); }
	/* Collapse the action pill to an arrow-only chip so it fits the narrow column. */
	.lb-view-full { display: none; }
	.lb-view { padding: var(--space-3xs) var(--space-xs); gap: 0; }

	.lb-oracle-board-head,
	.lb-oracle-row { grid-template-columns: 26px minmax(0, 1.7fr) 0.9fr 84px; }
	.lb-oracle-head { flex-direction: column; align-items: flex-start; gap: var(--space-xs); padding-bottom: var(--space-xs); }

	/* Full-width, stacked CTA buttons — larger, thumb-friendly tap targets. */
	.lb-cta-inner { padding: var(--space-lg); }
	.lb-cta-row { flex-direction: column; align-items: stretch; }
	.lb-cta-row .lb-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	#lb-field { display: none; }
	.lb-live-dot, .lb-row, .lb-skeleton .lb-sk { animation: none !important; }
	.lb-btn:hover { transform: none; }
}

/* ── Interactive states (QB-07) ────────────────────────────────────────────
   The period select and the toggle beside it set cursor: pointer with no
   hover. The toggle's track already had its transition; it never had a
   resting hover, which is the part that tells you the track is the target. */
.lb-select {
	transition:
		border-color var(--duration-fast) var(--ease-standard),
		background var(--duration-fast) var(--ease-standard);
}

.lb-select:hover {
	border-color: var(--stroke-strong);
	background: var(--surface-2);
}

.lb-toggle:hover .lb-toggle-track {
	background: var(--stroke-strong);
	border-color: var(--stroke-strong);
}

/* ── Board tabs: Trading | Earned ──────────────────────────────────────────
   Elements belong to one board via .lb-trading-only / .lb-earned-only; the
   body's data-lb-tab (set before first paint, then by src/leaderboard.js)
   decides which set shows. Without it the trading board is the default. */
body[data-lb-tab='earned'] .lb-trading-only { display: none !important; }
body:not([data-lb-tab='earned']) .lb-earned-only { display: none !important; }
.lb-title .lb-earned-only,
.lb-title .lb-trading-only { display: inline; }

.lb-tabs {
	display: flex;
	justify-content: center;
	margin: 0 0 var(--space-lg);
}
.lb-tabs .lb-seg-btn {
	font-size: var(--text-sm);
	padding: var(--space-xs) var(--space-lg);
}
.lb-seg-btn:focus-visible {
	outline: var(--focus-ring-width) solid var(--focus-ring-color);
	outline-offset: 2px;
}
.lb-seg-btn:active { transform: translateY(1px); }

/* ── Earned board ─────────────────────────────────────────────────────────── */
.lbe-summary {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0 auto var(--space-md);
	max-width: 760px;
}
.lbe-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-xs) var(--space-md);
	margin: 0 0 var(--space-sm);
	font-size: var(--text-xs);
	color: var(--ink-dim);
}
.lbe-meta.is-stale .lbe-meta-line { color: var(--warn); }
.lbe-how summary {
	cursor: pointer;
	color: var(--ink-dim);
	border-radius: var(--radius-sm, 6px);
	transition: color var(--duration-fast) var(--ease-standard);
}
.lbe-how summary:hover { color: var(--ink-bright); }
.lbe-how summary:focus-visible {
	outline: var(--focus-ring-width) solid var(--focus-ring-color);
	outline-offset: 2px;
}
.lbe-how p {
	margin: var(--space-xs) 0 0;
	max-width: 72ch;
	line-height: 1.5;
	color: var(--ink-dim);
}

.lbe-board .lb-board-head,
.lbe-board .lb-row {
	grid-template-columns: 36px minmax(0, 2.4fr) 1.1fr 1fr 1fr 0.6fr 96px;
}
.lbe-board.is-all .lb-board-head,
.lbe-board.is-all .lb-row {
	grid-template-columns: 36px minmax(0, 2.4fr) 1.1fr 1fr 1fr 96px;
}
.lbe-board.is-all .lbe-move-cell { display: none; }
.lbe-total { font-weight: var(--weight-semibold); color: var(--ink-bright); }
.lbe-coin {
	font-family: var(--font-mono, ui-monospace, monospace);
	font-size: var(--text-2xs);
	padding: 1px var(--space-2xs);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-pill);
	color: var(--ink-dim);
}
.lbe-move { font-size: var(--text-xs); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.lbe-move-new {
	padding: 1px var(--space-2xs);
	border-radius: var(--radius-pill);
	background: color-mix(in srgb, var(--accent) 16%, transparent);
	color: var(--ink-bright);
}
.lbe-state-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-sm);
	margin-top: var(--space-sm);
}
.lbe-more {
	display: flex;
	margin: var(--space-md) auto 0;
}
.lbe-more[hidden] { display: none; }
.lb-earned .lb-cta { margin-top: var(--space-xl); }

@media (max-width: 880px) {
	.lbe-board .lb-board-head,
	.lbe-board .lb-row { grid-template-columns: 30px minmax(0, 2.2fr) 1.1fr 1fr 1fr 88px; }
	.lbe-board.is-all .lb-board-head,
	.lbe-board.is-all .lb-row { grid-template-columns: 30px minmax(0, 2.2fr) 1.1fr 1fr 1fr 88px; }
}
@media (max-width: 620px) {
	.lbe-summary { grid-template-columns: repeat(2, 1fr); }
	.lbe-board .lb-board-head,
	.lbe-board .lb-row,
	.lbe-board.is-all .lb-board-head,
	.lbe-board.is-all .lb-row { grid-template-columns: 26px minmax(0, 1.7fr) 1fr 44px; }
	.lb-tabs .lb-seg { width: 100%; }
	.lb-tabs .lb-seg-btn { flex: 1 1 0; text-align: center; }
}
/* With the trading filters hidden, the window switcher centres under the tabs. */
body[data-lb-tab='earned'] .lb-controls { justify-content: center; }