/*
 * Leader Board frontend.
 *
 * All colours come from --lb-* tokens, which default to the Pulse Garage
 * theme palette (--pg-*). Admin colour overrides (Leader Board > Settings)
 * are printed inline and redefine these tokens.
 */

.rwd-lb-board,
.rwd-lb-myaccount {
	--lb-accent: var(--pg-lime, #b8ff34);
	--lb-accent-hover: var(--pg-lime-hover, #d0ff72);
	--lb-on-accent: var(--pg-on-lime, #101506);
	--lb-surface: var(--pg-graphite, #111518);
	--lb-surface-2: var(--pg-charcoal, #161b1e);
	--lb-bg: var(--pg-black, #090b0c);
	--lb-text: var(--pg-text, #f5f5ef);
	--lb-muted: var(--pg-muted, #a7afb1);
	--lb-border: var(--pg-border, rgba(255, 255, 255, 0.14));
	--lb-line: var(--pg-line, #2c3438);
	--lb-gold: #f5c542;
	--lb-silver: #c9d1d6;
	--lb-bronze: #cd8a4f;
	--lb-down: #ff6b5b;
	--lb-radius: var(--pg-radius, 8px);
	--lb-radius-sm: var(--pg-radius-sm, 6px);
	--lb-shadow: var(--pg-shadow, 0 16px 45px rgba(0, 0, 0, 0.35));
	--lb-font-display: var(--pg-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
	--lb-font-body: var(--pg-font-body, "Inter", system-ui, sans-serif);
	color: var(--lb-text);
	font-family: var(--lb-font-body);
}

.rwd-lb-board {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 2rem 0 0;
	padding: clamp(16px, 3vw, 28px);
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	background: var(--lb-surface);
	box-shadow: var(--lb-shadow);
	overflow: hidden;
}

.rwd-lb-board *,
.rwd-lb-myaccount * {
	box-sizing: border-box;
}

/* ---------- Headings ---------- */

.rwd-lb-board h2,
.rwd-lb-board h3,
.rwd-lb-board h4 {
	margin: 0;
	color: var(--lb-text);
	font-family: var(--lb-font-display);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.rwd-lb-board h2 {
	font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.rwd-lb-board h3 {
	font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

.rwd-lb-board p {
	margin: 0;
	color: var(--lb-muted);
	line-height: 1.55;
}

.rwd-lb-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	margin-bottom: 10px;
	padding: 5px 10px;
	border: 1px solid var(--lb-border);
	border-radius: 999px;
	background: var(--lb-surface-2);
	color: var(--lb-accent);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.rwd-lb-live-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--lb-accent);
	box-shadow: 0 0 0 0 var(--lb-accent);
	animation: rwd-lb-pulse 1.8s ease-out infinite;
}

@keyframes rwd-lb-pulse {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lb-accent) 60%, transparent); }
	100% { box-shadow: 0 0 0 10px transparent; }
}

/* ---------- Hero + countdown ---------- */

.rwd-lb-hero {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}

.rwd-lb-hero__copy {
	display: flex;
	flex: 1 1 320px;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.rwd-lb-countdown-wrap {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rwd-lb-countdown-title {
	color: var(--lb-muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.rwd-lb-countdown {
	display: inline-flex;
	gap: 6px;
}

.rwd-lb-countdown-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 58px;
	padding: 8px 6px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius-sm);
	background: var(--lb-surface-2);
}

.rwd-lb-countdown-value {
	color: var(--lb-text);
	font-family: var(--lb-font-display);
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.rwd-lb-countdown-label {
	margin-top: 3px;
	color: var(--lb-muted);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* ---------- Points rules strip ---------- */

.rwd-lb-rules {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rwd-lb-rules li {
	margin: 0;
	padding: 6px 12px;
	border: 1px solid var(--lb-border);
	border-radius: 999px;
	background: var(--lb-surface-2);
	color: var(--lb-muted);
	font-size: 0.8rem;
}

.rwd-lb-rules li:first-child {
	border-color: var(--lb-accent);
	background: var(--lb-accent);
	color: var(--lb-on-accent);
}

.rwd-lb-rules strong {
	color: inherit;
}

/* ---------- Movers ticker ---------- */

.rwd-lb-ticker {
	display: flex;
	align-items: stretch;
	overflow: hidden;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius-sm);
	background: var(--lb-surface-2);
}

.rwd-lb-ticker__label {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	padding: 8px 12px;
	background: var(--lb-accent);
	color: var(--lb-on-accent);
	font-family: var(--lb-font-display);
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.rwd-lb-ticker__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}

.rwd-lb-ticker__track {
	display: flex;
	gap: 32px;
	width: max-content;
	margin: 0;
	padding: 8px 16px;
	list-style: none;
}

.rwd-lb-ticker__track.is-looping {
	animation: rwd-lb-marquee 28s linear infinite;
}

.rwd-lb-ticker:hover .rwd-lb-ticker__track {
	animation-play-state: paused;
}

.rwd-lb-ticker__track li {
	margin: 0;
	color: var(--lb-text);
	font-size: 0.85rem;
	white-space: nowrap;
}

.rwd-lb-ticker__track li::before {
	content: "\25B2";
	margin-right: 8px;
	color: var(--lb-accent);
	font-size: 0.7em;
}

@keyframes rwd-lb-marquee {
	to { transform: translateX(-50%); }
}

/* ---------- Race track ---------- */
/* Each lane is a slim progress rail: the token rides the end of a filled
   trail. --lb-from / --lb-to (0-1 fractions of the leader's points) are set
   on the track; JS adds .is-go to run from "from" to "to". */

.rwd-lb-race {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	background:
		radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--lb-accent) 7%, transparent), transparent 55%),
		var(--lb-bg);
}

.rwd-lb-race__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: var(--lb-muted);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.rwd-lb-race__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.rwd-lb-race__lanes {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	justify-content: space-around;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rwd-lb-lane {
	--lb-lane-color: var(--lb-muted);
	display: grid;
	grid-template-columns: 22px 118px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	min-height: 40px;
	margin: 0;
}

.rwd-lb-lane--1 { --lb-lane-color: var(--lb-gold); }
.rwd-lb-lane--2 { --lb-lane-color: var(--lb-silver); }
.rwd-lb-lane--3 { --lb-lane-color: var(--lb-bronze); }
.rwd-lb-lane.is-viewer { --lb-lane-color: var(--lb-accent); }

.rwd-lb-lane__pos {
	color: var(--lb-muted);
	font-family: var(--lb-font-display);
	font-size: 1.15rem;
	font-weight: 800;
	text-align: center;
}

.rwd-lb-lane--1 .rwd-lb-lane__pos,
.rwd-lb-lane--2 .rwd-lb-lane__pos,
.rwd-lb-lane--3 .rwd-lb-lane__pos,
.rwd-lb-lane.is-viewer .rwd-lb-lane__pos {
	color: var(--lb-lane-color);
}

.rwd-lb-racer__label {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.15;
}

.rwd-lb-racer__name {
	overflow: hidden;
	color: var(--lb-text);
	font-size: 0.82rem;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rwd-lb-racer__pts {
	color: var(--lb-muted);
	font-size: 0.72rem;
	font-variant-numeric: tabular-nums;
}

.rwd-lb-racer__pts b {
	color: var(--lb-accent);
}

.rwd-lb-lane__track {
	--lb-token: 28px;
	position: relative;
	height: 6px;
	margin-right: 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.07);
}

/* Small chequered finish flag at the end of each rail. */
.rwd-lb-lane__track::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -14px;
	width: 10px;
	height: 14px;
	border-radius: 1px;
	background: repeating-conic-gradient(var(--lb-text) 0 25%, transparent 0 50%) 0 0 / 5px 5px;
	opacity: 0.45;
	transform: translateY(-50%);
}

.rwd-lb-lane__fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: calc(var(--lb-token) / 2 + (100% - var(--lb-token)) * var(--lb-from, 0));
	overflow: hidden;
	border-radius: inherit;
	background: linear-gradient(90deg, transparent, var(--lb-lane-color));
	transition: width 2s cubic-bezier(0.22, 1, 0.36, 1);
}

.rwd-lb-racer {
	position: absolute;
	top: 50%;
	left: calc((100% - var(--lb-token)) * var(--lb-from, 0));
	display: flex;
	transform: translateY(-50%);
	transition: left 2s cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 1;
}

.rwd-lb-lane__track.is-go .rwd-lb-racer {
	left: calc((100% - var(--lb-token)) * var(--lb-to, 0));
}

.rwd-lb-lane__track.is-go .rwd-lb-lane__fill {
	width: calc(var(--lb-token) / 2 + (100% - var(--lb-token)) * var(--lb-to, 0));
}

.rwd-lb-race.no-anim .rwd-lb-racer,
.rwd-lb-race.no-anim .rwd-lb-lane__fill {
	transition: none;
}

/* A light sweep along the trails, only while the race is running. */
.rwd-lb-race.is-running:not(.is-finished) .rwd-lb-lane__fill::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent 35%, rgba(255, 255, 255, 0.6) 50%, transparent 65%) 0 0 / 200% 100%;
	animation: rwd-lb-shine 0.9s linear infinite;
}

@keyframes rwd-lb-shine {
	from { background-position: 150% 0; }
	to { background-position: -50% 0; }
}

.rwd-lb-racer__token {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--lb-token);
	height: var(--lb-token);
	border: 2px solid var(--lb-bg);
	border-radius: 50%;
	background: var(--lb-lane-color);
	color: var(--lb-bg);
	font-family: var(--lb-font-display);
	font-size: 0.8rem;
	font-weight: 800;
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--lb-lane-color) 35%, transparent), 0 4px 12px rgba(0, 0, 0, 0.5);
}

.rwd-lb-lane.is-viewer .rwd-lb-racer__token {
	color: var(--lb-on-accent);
}

.rwd-lb-race.is-running:not(.is-finished) .rwd-lb-lane__track.is-go .rwd-lb-racer__token {
	animation: rwd-lb-bob 0.32s ease-in-out infinite alternate;
}

@keyframes rwd-lb-bob {
	from { transform: translateY(-2px) rotate(-5deg); }
	to { transform: translateY(1px) rotate(5deg); }
}

/* Leader pulses a few times at the finish, then rests (no endless animation). */
.rwd-lb-race.is-finished .rwd-lb-lane--1 .rwd-lb-racer__token {
	animation: rwd-lb-glow 1.6s ease-in-out 3;
}

@keyframes rwd-lb-glow {
	50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--lb-gold) 25%, transparent), 0 0 18px color-mix(in srgb, var(--lb-gold) 55%, transparent); }
}

.rwd-lb-racer__crown {
	position: absolute;
	top: -13px;
	left: 50%;
	width: 14px;
	height: 14px;
	color: var(--lb-gold);
	transform: translateX(-50%);
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

/* Scoped under .rwd-lb-board so theme button styles don't inflate it. */
.rwd-lb-board .rwd-lb-replay {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	min-height: 0;
	height: auto;
	margin: 0;
	padding: 4px 10px;
	border: 1px solid var(--lb-border);
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var(--lb-muted);
	font: inherit;
	line-height: 1.4;
	cursor: pointer;
}

.rwd-lb-replay svg {
	width: 12px;
	height: 12px;
}

.rwd-lb-board .rwd-lb-replay:hover,
.rwd-lb-board .rwd-lb-replay:focus-visible {
	border-color: var(--lb-accent);
	color: var(--lb-accent);
	outline: none;
}

@media (max-width: 767px) {
	.rwd-lb-race {
		padding: 12px 10px;
	}

	.rwd-lb-lane {
		grid-template-columns: 18px 84px minmax(0, 1fr);
		gap: 8px;
	}

	.rwd-lb-lane__track {
		--lb-token: 24px;
	}

	.rwd-lb-racer__token {
		font-size: 0.7rem;
	}
}

/* ---------- Tables ---------- */

.rwd-lb-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	background: var(--lb-surface-2);
}

.rwd-lb-board .rwd-lb-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	color: var(--lb-text);
	font-size: 0.92rem;
}

.rwd-lb-board .rwd-lb-table thead th {
	padding: 12px 14px;
	border: 0;
	border-bottom: 1px solid var(--lb-line);
	background: var(--lb-bg);
	color: var(--lb-muted);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-align: left;
	text-transform: uppercase;
}

.rwd-lb-board .rwd-lb-table tbody td {
	padding: 12px 14px;
	border: 0;
	border-bottom: 1px solid var(--lb-line);
	background: transparent;
	color: var(--lb-text);
	vertical-align: middle;
}

.rwd-lb-board .rwd-lb-table th:last-child,
.rwd-lb-board .rwd-lb-table td:last-child {
	text-align: right;
}

.rwd-lb-board .rwd-lb-table tbody tr:last-child td {
	border-bottom: 0;
}

.rwd-lb-row {
	transition: background-color 0.2s ease;
}

.rwd-lb-row:hover {
	background: rgba(255, 255, 255, 0.03);
}

.rwd-lb-row.is-top-three {
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 60%);
}

.rwd-lb-row.is-current-user {
	background: color-mix(in srgb, var(--lb-accent) 10%, transparent);
	box-shadow: inset 3px 0 0 var(--lb-accent);
}

.rwd-lb-user-cell {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}

.rwd-lb-user-name {
	font-weight: 700;
}

.rwd-lb-you {
	margin-left: 4px;
	padding: 2px 6px;
	border-radius: 999px;
	background: var(--lb-accent);
	color: var(--lb-on-accent);
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	vertical-align: middle;
}

.rwd-lb-rank-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 6px;
	border: 1px solid var(--lb-border);
	border-radius: 50%;
	background: var(--lb-surface);
	color: var(--lb-text);
	font-family: var(--lb-font-display);
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1;
}

.rwd-lb-rank-1 { border-color: transparent; background: var(--lb-gold); color: #16130a; }
.rwd-lb-rank-2 { border-color: transparent; background: var(--lb-silver); color: #121517; }
.rwd-lb-rank-3 { border-color: transparent; background: var(--lb-bronze); color: #1a0f07; }

.rwd-lb-move {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 7px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 800;
	line-height: 1.4;
}

.rwd-lb-move.is-up {
	background: color-mix(in srgb, var(--lb-accent) 16%, transparent);
	color: var(--lb-accent);
}

.rwd-lb-move.is-down {
	background: color-mix(in srgb, var(--lb-down) 16%, transparent);
	color: var(--lb-down);
}

.rwd-lb-move.is-new {
	background: var(--lb-accent);
	color: var(--lb-on-accent);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rwd-lb-move.is-same {
	color: var(--lb-muted);
}

.rwd-lb-prize-tag {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	max-width: 100%;
	padding: 4px 10px;
	border: 1px solid color-mix(in srgb, var(--lb-accent) 35%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--lb-accent) 10%, transparent);
	color: var(--lb-accent);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.35;
}

.rwd-lb-no-prize {
	color: var(--lb-muted);
}

.rwd-lb-spent {
	color: var(--lb-text);
	font-family: var(--lb-font-display);
	font-size: 1.2rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

/* ---------- Viewer standing ---------- */

.rwd-lb-standing {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	padding: 16px 18px;
	border: 1px dashed var(--lb-accent);
	border-radius: var(--lb-radius);
	background: color-mix(in srgb, var(--lb-accent) 6%, var(--lb-surface-2));
}

.rwd-lb-standing.is-in-top {
	border-style: solid;
}

.rwd-lb-standing--guest a {
	color: var(--lb-accent);
	font-weight: 800;
}

.rwd-lb-standing__main {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}

.rwd-lb-standing__label {
	flex-basis: 100%;
	color: var(--lb-muted);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.rwd-lb-standing__rank {
	color: var(--lb-accent);
	font-family: var(--lb-font-display);
	font-size: 2.6rem;
	font-weight: 800;
	line-height: 1;
}

.rwd-lb-standing__of {
	color: var(--lb-muted);
	font-size: 0.85rem;
}

.rwd-lb-standing__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 28px;
}

.rwd-lb-standing__stats > div {
	display: flex;
	flex-direction: column;
}

.rwd-lb-standing__value {
	color: var(--lb-text);
	font-family: var(--lb-font-display);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.rwd-lb-standing__value--prize {
	color: var(--lb-accent);
	font-size: 1.15rem;
}

.rwd-lb-standing__hint {
	color: var(--lb-muted);
	font-size: 0.75rem;
}

/* ---------- Prize list ---------- */

.rwd-lb-reward-box,
.rwd-lb-user-standing,
.rwd-lb-guest-message {
	padding: 14px 16px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	background: var(--lb-surface-2);
}

details.rwd-lb-reward-box > summary {
	cursor: pointer;
	color: var(--lb-text);
	font-family: var(--lb-font-display);
	font-size: 1.2rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	list-style-position: inside;
}

details.rwd-lb-reward-box > summary::marker {
	color: var(--lb-accent);
}

.rwd-lb-reward-copy {
	margin-top: 4px;
}

.rwd-lb-reward-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.rwd-lb-reward-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius-sm);
	background: var(--lb-surface);
}

.rwd-lb-reward-list li span {
	color: var(--lb-muted);
	font-size: 0.85rem;
}

.rwd-lb-reward-list li strong {
	color: var(--lb-accent);
	text-align: right;
}

.rwd-lb-spend-reward-group {
	margin-top: 14px;
}

.rwd-lb-board .rwd-lb-spend-reward-group h4 {
	color: var(--lb-muted);
	font-size: 0.9rem;
}

/* ---------- Product board heading (legacy markup) ---------- */

.rwd-lb-heading {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rwd-lb-heading-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.rwd-lb-month-label {
	color: var(--lb-muted);
	font-weight: 700;
}

/* ---------- Misc ---------- */

.rwd-lb-empty {
	padding: 16px;
	border: 1px dashed var(--lb-border);
	border-radius: var(--lb-radius);
	background: var(--lb-surface-2);
	color: var(--lb-muted);
	text-align: center;
}

.rwd-lb-guest-message a {
	color: var(--lb-accent);
	font-weight: 800;
}

.rwd-lb-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.rwd-lb-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius-sm);
	background: var(--lb-surface-2);
	color: var(--lb-text);
	font-weight: 700;
	text-decoration: none;
}

.rwd-lb-pagination .page-numbers.current,
.rwd-lb-pagination .page-numbers:hover,
.rwd-lb-pagination .page-numbers:focus-visible {
	border-color: var(--lb-accent);
	background: var(--lb-accent);
	color: var(--lb-on-accent);
	outline: none;
}

.rwd-lb-table-link {
	color: inherit;
	font-weight: 700;
	text-decoration: none;
}

.rwd-lb-table-link:hover,
.rwd-lb-table-link:focus-visible {
	color: var(--lb-accent);
	text-decoration: underline;
}

/* ---------- My Account ---------- */

.rwd-lb-myaccount {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 56rem;
	margin: 0 auto;
}

.rwd-lb-myaccount .rwd-lb-heading {
	align-items: center;
	text-align: center;
}

.rwd-lb-myaccount .rwd-lb-heading h2 {
	margin: 0;
	color: var(--lb-text);
	font-family: var(--lb-font-display);
	font-size: 2rem;
	font-weight: 800;
	text-transform: uppercase;
}

.woocommerce-account .woocommerce-MyAccount-content .rwd-lb-myaccount p,
.rwd-lb-myaccount .rwd-lb-heading p,
.rwd-lb-section-copy {
	margin: 0;
	color: var(--lb-muted);
	font-size: 0.875rem;
}

.rwd-lb-heading-icon,
.rwd-lb-section-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	border-radius: var(--lb-radius-sm);
	background: color-mix(in srgb, var(--lb-accent) 12%, transparent);
	color: var(--lb-accent);
}

.rwd-lb-heading-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 10px;
	border-radius: 50%;
}

.rwd-lb-section-icon {
	width: 36px;
	height: 36px;
}

.rwd-lb-heading-icon svg { width: 28px; height: 28px; }
.rwd-lb-section-icon svg { width: 20px; height: 20px; }

.rwd-lb-section {
	padding: 22px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	background: var(--lb-surface);
}

.rwd-lb-section-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--lb-line);
}

.rwd-lb-section-heading-copy {
	display: flex;
	align-items: center;
	min-height: 36px;
}

.woocommerce-account .rwd-lb-myaccount .rwd-lb-section-title,
.rwd-lb-section-title {
	margin: 0 !important;
	color: var(--lb-text);
	font-family: var(--lb-font-display);
	font-size: 1.3rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1;
	text-transform: uppercase;
}

.rwd-lb-tabset {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.rwd-lb-tab-nav {
	display: flex;
	gap: 4px;
	padding: 4px;
	border-radius: var(--lb-radius-sm);
	background: var(--lb-surface-2);
}

.rwd-lb-tab-button {
	display: inline-flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	border: 0;
	border-radius: var(--lb-radius-sm);
	background: transparent;
	color: var(--lb-muted);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.rwd-lb-tab-button:hover,
.rwd-lb-tab-button:focus-visible {
	color: var(--lb-text);
	outline: none;
}

.rwd-lb-tab-button.is-active {
	background: var(--lb-accent);
	color: var(--lb-on-accent);
}

.rwd-lb-tab-panel[hidden] {
	display: none !important;
}

.rwd-lb-summary-card {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-top: 18px;
}

.rwd-lb-summary-item {
	padding: 18px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	background: var(--lb-surface-2);
}

.rwd-lb-summary-item.is-accent {
	border-color: color-mix(in srgb, var(--lb-accent) 40%, transparent);
	background: color-mix(in srgb, var(--lb-accent) 6%, var(--lb-surface-2));
}

.rwd-lb-summary-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.rwd-lb-summary-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--lb-radius-sm);
	background: var(--lb-surface);
	color: var(--lb-muted);
}

.rwd-lb-summary-item.is-accent .rwd-lb-summary-icon {
	background: color-mix(in srgb, var(--lb-accent) 12%, transparent);
	color: var(--lb-accent);
}

.rwd-lb-summary-icon svg {
	width: 19px;
	height: 19px;
}

.rwd-lb-summary-label {
	color: var(--lb-muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rwd-lb-summary-value {
	display: block;
	margin-top: 8px;
	color: var(--lb-text);
	font-family: var(--lb-font-display);
	font-size: 1.7rem;
	font-weight: 800;
	line-height: 1.05;
}

.rwd-lb-summary-item.is-accent .rwd-lb-summary-value {
	color: var(--lb-accent);
}

.rwd-lb-summary-meta {
	display: block;
	margin-top: 6px;
	color: var(--lb-muted);
	font-size: 0.72rem;
	line-height: 1.35;
}

.rwd-lb-entry-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 18px;
}

.rwd-lb-entry-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	background: var(--lb-surface-2);
	transition: border-color 0.2s ease;
}

.rwd-lb-entry-row:hover {
	border-color: color-mix(in srgb, var(--lb-accent) 45%, transparent);
}

.rwd-lb-entry-left,
.rwd-lb-entry-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rwd-lb-entry-right {
	flex: 0 0 auto;
}

.rwd-lb-entry-name {
	color: var(--lb-text);
	font-weight: 600;
	text-decoration: none;
}

.rwd-lb-entry-name:hover,
.rwd-lb-entry-name:focus-visible {
	color: var(--lb-accent);
	text-decoration: underline;
}

.rwd-lb-entry-spent {
	color: var(--lb-accent);
	font-family: var(--lb-font-display);
	font-size: 1.2rem;
	font-weight: 800;
	white-space: nowrap;
}

.rwd-lb-entry-chevron {
	display: inline-flex;
	color: var(--lb-muted);
	text-decoration: none;
}

.rwd-lb-entry-chevron svg {
	width: 16px;
	height: 16px;
}

.rwd-lb-entry-chevron:hover,
.rwd-lb-entry-chevron:focus-visible {
	color: var(--lb-accent);
}

.rwd-lb-myaccount .rwd-lb-table-wrap {
	margin-top: 18px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	background: var(--lb-surface-2);
}

.rwd-lb-myaccount .rwd-lb-table {
	width: 100%;
	margin: 0;
	border: 0 !important;
	border-collapse: collapse;
	background: transparent;
}

.rwd-lb-myaccount .rwd-lb-table thead th {
	padding: 12px 14px;
	border-bottom: 1px solid var(--lb-line);
	background: var(--lb-bg);
	color: var(--lb-muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rwd-lb-myaccount .rwd-lb-table tbody td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--lb-line);
	background: transparent;
	color: var(--lb-text);
}

.rwd-lb-myaccount .rwd-lb-table tbody td:nth-child(3),
.rwd-lb-myaccount .rwd-lb-table tbody td:nth-child(4) {
	color: var(--lb-accent);
	font-weight: 600;
}

.rwd-lb-status-pill {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--lb-accent) 12%, transparent);
	color: var(--lb-accent);
	font-size: 0.75rem;
	font-weight: 600;
}

.rwd-lb-myaccount .rwd-lb-empty {
	text-align: left;
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
	.rwd-lb-hero {
		align-items: stretch;
	}

	.rwd-lb-countdown {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
	}

	.rwd-lb-countdown-item {
		min-width: 0;
	}

	.rwd-lb-board .rwd-lb-table thead th,
	.rwd-lb-board .rwd-lb-table tbody td {
		padding: 10px 8px;
	}

	.rwd-lb-table--monthly .rwd-lb-prize-tag {
		font-size: 0.7rem;
	}

	.rwd-lb-standing__rank {
		font-size: 2.1rem;
	}

	.rwd-lb-section {
		padding: 16px;
	}

	.rwd-lb-tab-nav {
		overflow-x: auto;
	}

	.rwd-lb-tab-button {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	.rwd-lb-summary-card {
		grid-template-columns: 1fr;
	}

	.rwd-lb-entry-row {
		flex-direction: column;
		align-items: stretch;
	}

	.rwd-lb-entry-right {
		justify-content: space-between;
	}

	.rwd-lb-myaccount .rwd-lb-table {
		min-width: 640px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rwd-lb-racer,
	.rwd-lb-lane__fill {
		transition: none;
	}

	.rwd-lb-live-dot,
	.rwd-lb-ticker__track.is-looping,
	.rwd-lb-racer__token,
	.rwd-lb-lane__fill::after {
		animation: none !important;
	}
}

/* ---------- Home teaser ---------- */
/* Both columns stretch to the taller one; the race spreads its lanes and the
   panel pins its button to the bottom, so neither side leaves a gap. */

.rwd-lb-board.rwd-lb-teaser {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
	align-items: stretch;
	gap: 16px;
	margin: 0;
	padding: 16px;
}

.rwd-lb-teaser__race {
	display: flex;
	min-width: 0;
}

.rwd-lb-teaser__race > .rwd-lb-race,
.rwd-lb-teaser__race > .rwd-lb-empty {
	flex: 1 1 auto;
	margin: 0;
}

.rwd-lb-teaser__panel {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--lb-border);
	border-radius: var(--lb-radius);
	background: var(--lb-surface-2);
}

.rwd-lb-teaser__panel .rwd-lb-kicker {
	margin: 0;
	padding: 4px 9px;
	font-size: 0.66rem;
}

.rwd-lb-teaser__leader {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

/* Display fonts draw outside a tight line box, so no overflow clipping here:
   long names wrap onto a second line instead of being cut. */
.rwd-lb-teaser__leader strong {
	display: block;
	margin: 0;
	padding: 2px 0 0;
	color: var(--lb-gold);
	font-family: var(--lb-font-display);
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.2;
	overflow-wrap: anywhere;
	text-transform: uppercase;
}

.rwd-lb-teaser__leader span:last-child {
	color: var(--lb-muted);
	font-size: 0.78rem;
}

.rwd-lb-teaser .rwd-lb-countdown-wrap {
	gap: 4px;
}

.rwd-lb-teaser .rwd-lb-countdown {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
}

.rwd-lb-teaser .rwd-lb-countdown-item {
	min-width: 0;
	padding: 5px 4px;
}

.rwd-lb-teaser .rwd-lb-countdown-value {
	font-size: 1.2rem;
}

.rwd-lb-teaser .rwd-lb-countdown-label {
	font-size: 0.56rem;
}

.rwd-lb-teaser .rwd-lb-standing__label {
	font-size: 0.64rem;
}

.rwd-lb-board .rwd-lb-teaser__you {
	font-size: 0.82rem;
	line-height: 1.4;
}

.rwd-lb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: auto;
	padding: 10px 16px;
	border-radius: var(--lb-radius-sm);
	background: var(--lb-accent);
	color: var(--lb-on-accent);
	font-weight: 800;
	text-decoration: none;
}

.rwd-lb-btn:hover,
.rwd-lb-btn:focus-visible {
	background: var(--lb-accent-hover);
	color: var(--lb-on-accent);
}

@media (max-width: 900px) {
	.rwd-lb-board.rwd-lb-teaser {
		grid-template-columns: 1fr;
		padding: 12px;
	}
}
