/* L2 Valkyria - /stats section (body.stats-page scoped).
   The account panel's visual language (css/account-page.css): solid near-black panels with a gold
   hairline, square corners, micro uppercase gold labels, one gold. Every component on the six stats
   tabs is built from the tokens below - change a colour here, not in a component. */

body.stats-page {
	--stats-panel: #12100e;
	--stats-field: #0d0b0a;
	--stats-border: rgba(188, 142, 49, 0.28);
	--stats-border-soft: rgba(188, 142, 49, 0.14);
	--stats-gold: #c5a059;
	--stats-gold-bright: #e0bc72;
	--stats-gold-dim: rgba(197, 160, 89, 0.62);
	--stats-wash: rgba(197, 160, 89, 0.06);
	--stats-text: #e8dfd0;
	--stats-text-muted: #a89e8e;
	--stats-text-dim: #8a8070;
	--stats-green: #3ecf7a;
	--stats-red: #c45c5c;
	--stats-track: rgba(255, 255, 255, 0.05);
}

body.stats-page a.stats-highlight-card,
body.stats-page a.stats-page__tab {
	text-decoration: none;
}

body.stats-page .stats-page__body {
	padding-top: 40px;
	padding-bottom: 56px;
}

/* ---------- Toolbar: tab rail + headline numbers ---------- */
body.stats-page .stats-page-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 14px 24px;
	margin-bottom: 18px;
}

body.stats-page .stats-page-toolbar__nav {
	flex: 1 1 420px;
	min-width: 0;
}

/* One line on every screen: a phone scrolls the rail sideways instead of wrapping it into rows. */
body.stats-page .stats-page__tabs {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--stats-border-soft);
}

body.stats-page .stats-page__tabs::-webkit-scrollbar {
	display: none;
}

body.stats-page .stats-page__tab {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	padding: 11px 14px;
	margin-bottom: -1px;
	border-bottom: 2px solid transparent;
	color: rgba(232, 223, 208, 0.62);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color 0.15s ease, border-color 0.15s ease;
}

body.stats-page .stats-page__tab:first-child {
	padding-left: 2px;
}

body.stats-page .stats-page__tab:hover {
	color: #f3ead8;
	border-bottom-color: rgba(240, 236, 228, 0.3);
}

body.stats-page .stats-page__tab--active,
body.stats-page .stats-page__tab--active:hover {
	color: var(--stats-gold-bright);
	border-bottom-color: var(--stats-gold);
}

body.stats-page .stats-page__tab:focus-visible {
	outline: 1px solid var(--stats-gold-bright);
	outline-offset: -1px;
}

body.stats-page .stats-page-toolbar__summary {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	flex: 0 1 420px;
}

body.stats-page .stats-inline-stat {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	padding: 9px 12px;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
	border-left: 2px solid var(--stats-gold);
}

body.stats-page .stats-inline-stat__label {
	color: var(--stats-text-dim);
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

body.stats-page .stats-inline-stat__value {
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-page-intro {
	margin: 0 0 28px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--stats-text-muted);
}

/* ---------- Sections and panels ---------- */
body.stats-page .stats-block {
	margin-bottom: 32px;
}

body.stats-page .stats-block:last-of-type {
	margin-bottom: 0;
}

/* Section title: gold micro label running into a hairline. */
body.stats-page .stats-section-heading {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	color: var(--stats-gold-dim);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

body.stats-page .stats-section-heading::after {
	content: '';
	flex: 1 1 auto;
	height: 1px;
	background: var(--stats-border-soft);
}

body.stats-page .stats-panel,
body.stats-page .stats-lb-panel,
body.stats-page .stats-meta-card {
	min-width: 0;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
}

body.stats-page .stats-panel,
body.stats-page .stats-lb-panel {
	padding: 16px 18px;
}

/* Panel title: the account panel's diamond-marked heading over a hairline. */
body.stats-page .stats-panel-heading {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 12px;
	padding-bottom: 11px;
	border-bottom: 1px solid var(--stats-border-soft);
	color: var(--stats-gold);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

body.stats-page .stats-panel-heading::before {
	content: '';
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	background: var(--stats-gold);
	transform: rotate(45deg);
}

body.stats-page .stats-panel-heading__aside {
	margin-left: auto;
	color: var(--stats-text-dim);
	font-size: 10px;
	letter-spacing: 0.08em;
}

body.stats-page .stats-block-note,
body.stats-page .stats-chart-empty,
body.stats-page .stats-lb-empty {
	margin: 12px 0 0;
	color: var(--stats-text-dim);
	font-size: 12.5px;
	line-height: 1.45;
}

body.stats-page .stats-updated {
	margin: 32px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--stats-border-soft);
	color: var(--stats-text-dim);
	font-size: 12px;
	letter-spacing: 0.04em;
	text-align: center;
}

/* ---------- Headline tiles (castles, clans, clan halls, raid bosses) ---------- */
body.stats-page .stats-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

body.stats-page .stats-meta-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 14px;
	border-left: 2px solid var(--stats-gold);
}

body.stats-page .stats-meta-card__label {
	color: var(--stats-text-dim);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

body.stats-page .stats-meta-card__value {
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-meta-card__value--alive {
	color: var(--stats-green);
}

body.stats-page .stats-meta-card__value--dead {
	color: var(--stats-red);
}

/* ---------- Overview: highlights ---------- */
body.stats-page .stats-highlights {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

body.stats-page a.stats-highlight-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding: 14px 16px;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
	border-top: 2px solid var(--stats-gold);
	color: inherit;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

body.stats-page a.stats-highlight-card:hover {
	border-color: var(--stats-border);
	border-top-color: var(--stats-gold-bright);
	background-color: #161310;
}

body.stats-page .stats-highlight-card__label {
	color: var(--stats-gold-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

body.stats-page .stats-highlight-card__value {
	overflow: hidden;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.stats-page .stats-highlight-card__meta {
	color: var(--stats-gold);
	font-size: 12.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-highlight-card__empty {
	color: var(--stats-text-dim);
	font-size: 14px;
	font-weight: 400;
}

/* ---------- Overview: population bars ----------
   One series per panel, so one colour (the theme gold) and no legend: the panel title names it.
   Bars are 8px with a 4px rounded data end, square at the baseline (dataviz mark spec). */
body.stats-page .stats-pop-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	align-items: start;
}

body.stats-page .stats-pop-grid__wide {
	grid-column: 1 / -1;
}

body.stats-page .stats-bars {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.stats-page .stats-bars__row {
	display: grid;
	grid-template-columns: minmax(96px, 30%) minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 5px 4px;
	margin: 0 -4px;
}

body.stats-page .stats-bars__row:hover {
	background: var(--stats-wash);
}

body.stats-page .stats-bars__label {
	overflow: hidden;
	color: var(--stats-text);
	font-size: 13px;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.stats-page .stats-bars__track {
	height: 8px;
	background: var(--stats-track);
}

body.stats-page .stats-bars__fill {
	display: block;
	height: 100%;
	min-width: 2px;
	background: var(--stats-gold);
	border-radius: 0 4px 4px 0;
}

body.stats-page .stats-bars__row--muted .stats-bars__fill {
	background: #6b6560;
}

body.stats-page .stats-bars__value {
	min-width: 76px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

body.stats-page .stats-bars__share {
	margin-left: 6px;
	color: var(--stats-text-dim);
	font-size: 11px;
	font-weight: 400;
}

body.stats-page .stats-bars__more {
	margin-top: 6px;
}

body.stats-page .stats-bars__more > summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 0;
	color: var(--stats-gold);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
}

body.stats-page .stats-bars__more > summary::-webkit-details-marker {
	display: none;
}

body.stats-page .stats-bars__more > summary::after {
	content: '';
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

body.stats-page .stats-bars__more[open] > summary {
	display: none;
}

/* ---------- Board switcher (Rankings, Clans) ----------
   One board at a time; without script every board shows, one under the other. */
body.stats-page .stats-boards__tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	margin-bottom: 12px;
	overflow-x: auto;
	scrollbar-width: none;
}

body.stats-page .stats-boards__tabs::-webkit-scrollbar {
	display: none;
}

body.stats-page .stats-boards__tab {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	padding: 0 12px;
	background: transparent;
	border: 1px solid var(--stats-border-soft);
	color: rgba(232, 223, 208, 0.7);
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

body.stats-page .stats-boards__tab:hover {
	color: #f3ead8;
	border-color: var(--stats-border);
}

body.stats-page .stats-boards__tab.is-active {
	color: var(--stats-gold-bright);
	border-color: var(--stats-gold);
	background: var(--stats-wash);
}

body.stats-page .stats-boards__tab:focus-visible {
	outline: 1px solid var(--stats-gold-bright);
	outline-offset: 2px;
}

body.stats-page .stats-boards__count {
	color: var(--stats-text-dim);
	font-weight: 600;
}

body.stats-page .stats-boards .stats-lb-panel + .stats-lb-panel {
	margin-top: 10px;
}

/* ---------- Leaderboard tables ---------- */
body.stats-page .stats-lb-wrap {
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(188, 142, 49, 0.45) transparent;
}

body.stats-page .stats-lb {
	width: 100%;
	border-collapse: collapse;
	color: var(--stats-text);
	font-size: 13px;
}

body.stats-page .stats-lb thead th {
	padding: 9px 10px;
	background: rgba(197, 160, 89, 0.05);
	border-bottom: 1px solid var(--stats-border);
	color: var(--stats-gold-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}

body.stats-page .stats-lb thead th.stats-lb-th-rank {
	width: 56px;
	text-align: center;
}

body.stats-page .stats-lb thead th.stats-lb-th-value {
	text-align: right;
}

body.stats-page .stats-lb tbody td {
	padding: 9px 10px;
	border-bottom: 1px solid var(--stats-border-soft);
	vertical-align: middle;
}

body.stats-page .stats-lb tbody tr:last-child td {
	border-bottom: 0;
}

body.stats-page .stats-lb tbody tr:nth-child(even) td {
	background: rgba(255, 255, 255, 0.012);
}

body.stats-page .stats-lb tbody tr:hover td {
	background: var(--stats-wash);
}

body.stats-page .stats-lb tbody td.stats-lb-col-rank {
	text-align: center;
}

body.stats-page .stats-lb-name {
	color: #fff;
	font-weight: 600;
}

body.stats-page .stats-lb-sub {
	display: none;
}

body.stats-page .stats-lb-class {
	color: var(--stats-text-muted);
	white-space: nowrap;
}

body.stats-page .stats-lb tbody td.stats-lb-value-col {
	color: var(--stats-gold-bright);
	font-weight: 600;
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

body.stats-page .stats-lb-rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 22px;
	padding: 0 4px;
	color: var(--stats-text-muted);
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-lb-rank--1,
body.stats-page .stats-lb-rank--2,
body.stats-page .stats-lb-rank--3 {
	border: 1px solid currentColor;
}

body.stats-page .stats-lb-rank--1 {
	color: var(--stats-gold-bright);
	background: rgba(224, 188, 114, 0.1);
}

body.stats-page .stats-lb-rank--2 {
	color: #d4d0c8;
	background: rgba(212, 208, 200, 0.07);
}

body.stats-page .stats-lb-rank--3 {
	color: #c98a55;
	background: rgba(201, 138, 85, 0.08);
}

body.stats-page td.stats-lb-empty {
	padding: 24px 10px;
	text-align: center;
}

body.stats-page .stats-lb-muted {
	color: var(--stats-text-dim);
}

/* ---------- Castles ---------- */
body.stats-page .stats-castle-empty {
	margin: 0;
	padding: 24px 16px;
	text-align: center;
}

body.stats-page .stats-castle-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

body.stats-page .stats-castle-card {
	display: flex;
	align-items: stretch;
	min-width: 0;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
	border-top: 2px solid var(--stats-gold);
}

body.stats-page .stats-castle-card__banner {
	flex: 0 0 64px;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 12px;
	background: var(--stats-field);
	border-right: 1px solid var(--stats-border-soft);
}

body.stats-page .stats-castle-card__banner img {
	display: block;
	width: 48px;
	height: auto;
	max-height: 104px;
	object-fit: contain;
}

body.stats-page .stats-castle-card__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 12px 14px;
}

body.stats-page .stats-castle-card__name {
	margin: 0;
	color: var(--stats-gold-bright);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
}

body.stats-page .stats-castle-card__owner {
	margin: 4px 0 0;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}

body.stats-page .stats-castle-card__owner--empty {
	color: var(--stats-text-dim);
	font-weight: 400;
}

body.stats-page .stats-castle-card__sides {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

body.stats-page .stats-castle-side__label,
body.stats-page .stats-castle-card__label {
	margin: 0 0 4px;
	color: var(--stats-text-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

body.stats-page .stats-castle-side__value {
	margin: 0;
	color: var(--stats-text);
	font-size: 13px;
	line-height: 1.45;
}

body.stats-page .stats-castle-clan {
	color: #fff;
	font-weight: 600;
}

body.stats-page .stats-castle-clan-sep {
	color: var(--stats-text-dim);
}

body.stats-page .stats-castle-card__siege {
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid var(--stats-border-soft);
}

body.stats-page .stats-castle-card__schedule {
	margin: 0 0 8px;
	color: var(--stats-gold);
	font-size: 12px;
	font-weight: 600;
}

body.stats-page .stats-castle-card__schedule-icon {
	margin-right: 4px;
}

body.stats-page .stats-castle-card__progress {
	margin-bottom: 6px;
}

body.stats-page .stats-castle-card__progress-track,
body.stats-page .stats-clanhall-card__progress-track {
	height: 4px;
	overflow: hidden;
	background: var(--stats-track);
}

body.stats-page .stats-castle-card__progress-fill,
body.stats-page .stats-clanhall-card__progress-fill {
	width: 0;
	height: 100%;
	background: var(--stats-gold);
	transition: width 0.35s ease;
}

body.stats-page .stats-castle-card__countdown {
	margin: 0 0 2px;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-countdown--live {
	color: var(--stats-red);
	animation: stats-countdown-pulse 1.4s ease-in-out infinite;
}

@keyframes stats-countdown-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
	body.stats-page .stats-countdown--live {
		animation: none;
	}
}

body.stats-page .stats-castle-card__datetime {
	margin: 0;
	color: var(--stats-text-dim);
	font-size: 12px;
}

/* ---------- Clan halls ---------- */
body.stats-page .stats-clanhall-empty {
	margin: 0;
	padding: 24px 16px;
	text-align: center;
}

body.stats-page .stats-clanhall-board {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 12px;
	align-items: start;
}

body.stats-page .stats-clanhall-location {
	min-width: 0;
}

body.stats-page .stats-clanhall-location__title {
	margin: 0 0 8px;
	padding: 7px 10px;
	background: rgba(197, 160, 89, 0.05);
	border: 1px solid var(--stats-border-soft);
	color: var(--stats-gold-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-align: center;
	text-transform: uppercase;
}

body.stats-page .stats-clanhall-stack {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

body.stats-page .stats-clanhall-card {
	min-width: 0;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
	border-left: 2px solid #6b6560;
}

body.stats-page .stats-clanhall-card--auction {
	border-left-color: var(--stats-gold-bright);
}

body.stats-page .stats-clanhall-card--lease {
	border-left-color: #c98a55;
}

body.stats-page .stats-clanhall-card--occupied {
	border-left-color: var(--stats-green);
}

body.stats-page .stats-clanhall-card__body {
	display: flex;
	flex-direction: column;
	padding: 12px 12px 11px;
}

body.stats-page .stats-clanhall-card__title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

body.stats-page .stats-clanhall-card__name {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: var(--stats-gold-bright);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
}

body.stats-page .stats-clanhall-card__grade {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 20px;
	padding: 0 6px;
	border: 1px solid var(--stats-gold);
	color: var(--stats-gold-bright);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
}

body.stats-page .stats-clanhall-card__owner {
	margin: 6px 0 0;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

body.stats-page .stats-clanhall-card__owner--empty {
	color: var(--stats-text-dim);
	font-weight: 400;
}

body.stats-page .stats-clanhall-card__sale {
	margin: 4px 0 0;
	color: var(--stats-text-dim);
	font-size: 11.5px;
	line-height: 1.35;
}

body.stats-page .stats-clanhall-card__footer {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--stats-border-soft);
}

body.stats-page .stats-clanhall-card__meta-label {
	margin: 0;
	color: var(--stats-text-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

body.stats-page .stats-clanhall-card__meta-value {
	display: block;
	margin-top: 4px;
	color: var(--stats-text);
	font-size: 12.5px;
	line-height: 1.4;
}

body.stats-page .stats-clanhall-card__bidders {
	margin: 0 0 4px;
}

body.stats-page .stats-clanhall-card__time-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

body.stats-page .stats-clanhall-card__countdown,
body.stats-page .stats-clanhall-card__status-value {
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-clanhall-card__datetime {
	flex: 0 0 auto;
	color: var(--stats-text-dim);
	font-size: 11px;
	line-height: 1.2;
	text-align: right;
}

body.stats-page .stats-clanhall-card__progress {
	margin-top: 2px;
}

body.stats-page .stats-clanhall-card__progress-fill--static {
	width: 100%;
	opacity: 0.5;
}

body.stats-page .stats-clanhall-card--occupied .stats-clanhall-card__progress-fill--static {
	background: var(--stats-green);
}

body.stats-page .stats-clanhall-card--vacant .stats-clanhall-card__progress-fill--static {
	background: #6b6560;
}

/* ---------- Raid bosses: epic bosses, tier rail, list + map ---------- */
body.stats-page .stats-rb-panel {
	scroll-margin-top: 20px;
}

body.stats-page .stats-epics {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 10px;
}

body.stats-page .stats-epic {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding: 12px 14px;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
	border-left: 2px solid var(--stats-green);
}

body.stats-page .stats-epic--dead {
	border-left-color: var(--stats-red);
}

body.stats-page .stats-epic__name {
	margin: 0;
	overflow: hidden;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.stats-page .stats-epic__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	color: var(--stats-text-dim);
	font-size: 12px;
}

body.stats-page .stats-epic--locked {
	border-left-color: #6b6560;
}

body.stats-page .stats-epic--locked .stats-epic__name {
	color: var(--stats-text-muted);
}

body.stats-page .stats-epic__respawn {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 2px 8px;
	margin: 0;
	color: var(--stats-text);
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-epic__respawn--muted {
	color: var(--stats-text-dim);
	font-size: 12px;
}

body.stats-page .stats-epic__in {
	color: #d98080;
	font-size: 11.5px;
	font-weight: 600;
}

/* ---------- Olympiad: heroes, class leaders, hall of fame ---------- */
body.stats-page .stats-heroes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 10px;
}

body.stats-page .stats-hero {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	padding: 12px 14px;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
	border-top: 2px solid var(--stats-gold);
}

body.stats-page .stats-hero__class {
	overflow: hidden;
	color: var(--stats-gold-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

body.stats-page .stats-hero__name {
	margin: 0;
	overflow: hidden;
	color: var(--stats-gold-bright);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.stats-page .stats-hero__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
	color: var(--stats-text-dim);
	font-size: 12px;
}

body.stats-page .stats-hero__clan {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.stats-page .stats-hero__count {
	flex: 0 0 auto;
	color: var(--stats-gold);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-empty-note {
	margin: 0;
	padding: 18px 16px;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
	color: var(--stats-text-muted);
	font-size: 13px;
	line-height: 1.5;
}

body.stats-page .stats-oly-mark {
	display: inline-block;
	margin-left: 8px;
	padding: 0 6px;
	border: 1px solid currentColor;
	color: var(--stats-green);
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 16px;
	text-transform: uppercase;
	vertical-align: 2px;
}

body.stats-page .stats-rb-split {
	display: grid;
	grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

body.stats-page .stats-rb-split__list,
body.stats-page .stats-rb-split__map {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

body.stats-page .stats-rb-split__body {
	display: flex;
	flex-direction: column;
	height: min(72vh, 640px);
	min-height: 420px;
}

body.stats-page .stats-rb-split__body--map {
	position: relative;
}

body.stats-page .stats-section-heading--compact {
	margin-bottom: 10px;
}

body.stats-page .stats-rb-split .stats-rb-map {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: 300px;
	overflow: hidden;
	background: var(--stats-field);
	border: 1px solid var(--stats-border-soft);
}

body.stats-page .stats-rb-map .leaflet-control-zoom {
	overflow: hidden;
	border: 1px solid var(--stats-border);
	box-shadow: none;
}

body.stats-page .stats-rb-map .leaflet-control-zoom a {
	width: 32px;
	height: 32px;
	line-height: 32px;
	background: var(--stats-panel);
	border-bottom: 1px solid var(--stats-border-soft);
	color: var(--stats-gold);
}

body.stats-page .stats-rb-map .leaflet-control-zoom a:hover {
	background: #1a1612;
	color: var(--stats-gold-bright);
}

body.stats-page .stats-rb-map .leaflet-control-zoom a:last-child {
	border-bottom: 0;
}

body.stats-page .stats-rb-legend {
	position: absolute;
	top: 10px;
	left: 50px;
	z-index: 1000;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin: 0;
	padding: 5px 10px;
	background: rgba(18, 16, 14, 0.9);
	border: 1px solid var(--stats-border-soft);
	color: var(--stats-text-muted);
	font-size: 11px;
	pointer-events: none;
}

body.stats-page .stats-rb-legend__item::before {
	content: '';
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-right: 6px;
	border-radius: 50%;
	vertical-align: middle;
}

body.stats-page .stats-rb-legend__item--alive::before {
	background: var(--stats-green);
}

body.stats-page .stats-rb-legend__item--dead::before {
	background: var(--stats-red);
}

body.stats-page .stats-rb-legend__item--locked::before {
	background: #a8a29a;
}

/* Map markers: a status dot with a dark ring, so it reads on light and dark parts of the map. */
body.stats-page .stats-rb-pin {
	box-sizing: border-box;
	border: 2px solid rgba(8, 7, 6, 0.85);
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 1px 4px rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

body.stats-page .stats-rb-pin--alive {
	background: var(--stats-green);
}

body.stats-page .stats-rb-pin--dead {
	background: var(--stats-red);
}

body.stats-page .stats-rb-pin--locked {
	background: #a8a29a;
}

body.stats-page .stats-rb-pin--epic {
	border-color: var(--stats-gold-bright);
	box-shadow: 0 0 0 2px rgba(8, 7, 6, 0.85), 0 1px 6px rgba(0, 0, 0, 0.7);
}

body.stats-page .stats-rb-popup-status--alive {
	color: #1f8a4c;
	font-weight: 700;
}

body.stats-page .stats-rb-popup-status--dead {
	color: #a23b3b;
	font-weight: 700;
}

body.stats-page .stats-rb-popup-status--locked {
	color: #6b6560;
	font-weight: 700;
}

body.stats-page .stats-rb-status {
	display: inline-flex;
	align-items: center;
	padding: 1px 7px;
	border: 1px solid currentColor;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

body.stats-page .stats-rb-status--alive {
	color: var(--stats-green);
	background: rgba(62, 207, 122, 0.08);
}

body.stats-page .stats-rb-status--dead {
	color: #d98080;
	background: rgba(196, 92, 92, 0.1);
}

body.stats-page .stats-rb-status--locked {
	color: #a8a29a;
	background: rgba(168, 162, 154, 0.08);
}

body.stats-page .stats-rb-empty {
	padding: 24px 12px;
	color: var(--stats-text-dim);
	text-align: center;
}

body.stats-page .stats-rb-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
}

body.stats-page .stats-rb-toolbar__summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

body.stats-page .stats-rb-tier-nav {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: nowrap;
	gap: 6px;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

body.stats-page .stats-rb-tier-nav::-webkit-scrollbar {
	display: none;
}

body.stats-page .stats-rb-tier-nav__tab {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	padding: 0 12px;
	border: 1px solid var(--stats-border-soft);
	color: rgba(232, 223, 208, 0.7);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

body.stats-page .stats-rb-tier-nav__tab:hover {
	color: #f3ead8;
	border-color: var(--stats-border);
	text-decoration: none;
}

body.stats-page .stats-rb-tier-nav__tab--active,
body.stats-page .stats-rb-tier-nav__tab--active:hover {
	color: var(--stats-gold-bright);
	border-color: var(--stats-gold);
	background: var(--stats-wash);
}

body.stats-page .stats-rb-tier-nav__count {
	color: var(--stats-text-dim);
	font-weight: 600;
}

body.stats-page .stats-rb-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 9px;
	border: 1px solid var(--stats-border-soft);
	color: var(--stats-text-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

body.stats-page .stats-rb-chip strong {
	color: var(--stats-text);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-rb-chip--alive strong {
	color: var(--stats-green);
}

body.stats-page .stats-rb-chip--dead strong {
	color: #d98080;
}

body.stats-page .stats-rb-list-wrap {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
	scrollbar-width: thin;
	scrollbar-color: rgba(188, 142, 49, 0.45) transparent;
}

body.stats-page .stats-rb-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.stats-page .stats-rb-list__item {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding: 9px 12px;
	border-bottom: 1px solid var(--stats-border-soft);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

body.stats-page .stats-rb-list__item:hover,
body.stats-page .stats-rb-list__item:focus-visible {
	background: var(--stats-wash);
	outline: none;
}

body.stats-page .stats-rb-list__item:last-child {
	border-bottom: 0;
}

body.stats-page .stats-rb-list__main {
	display: flex;
	flex: 1 1 auto;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
}

body.stats-page .stats-rb-list__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	color: var(--stats-text);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.stats-page .stats-rb-list__meta {
	flex: 0 0 auto;
	color: var(--stats-text-dim);
	font-size: 11.5px;
	white-space: nowrap;
}

body.stats-page .stats-rb-list__side {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

body.stats-page .stats-rb-list__respawn {
	color: var(--stats-text-dim);
	font-size: 11px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

body.stats-page .stats-rb-pagination {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	min-width: 0;
	margin-top: 10px;
}

body.stats-page .stats-rb-pagination__pages {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

body.stats-page .stats-rb-pagination__pages::-webkit-scrollbar {
	display: none;
}

body.stats-page .stats-rb-pagination__btn,
body.stats-page .stats-rb-pagination__page {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 6px;
	background: var(--stats-panel);
	border: 1px solid var(--stats-border-soft);
	color: var(--stats-text);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}

body.stats-page a.stats-rb-pagination__btn:hover,
body.stats-page a.stats-rb-pagination__page:hover {
	color: #fff;
	border-color: var(--stats-border);
	text-decoration: none;
}

body.stats-page .stats-rb-pagination__page--active {
	color: var(--stats-gold-bright);
	border-color: var(--stats-gold);
	background: var(--stats-wash);
}

body.stats-page .stats-rb-pagination__btn--disabled {
	opacity: 0.4;
	cursor: default;
}

body.stats-page .stats-rb-pagination__icon {
	display: block;
	width: 10px;
	height: 10px;
	background: url("../img/ui/svg/arrow.svg") no-repeat center;
	background-size: contain;
}

body.stats-page .stats-rb-pagination__btn--prev .stats-rb-pagination__icon {
	transform: scaleX(-1);
}

body.stats-page .stats-rb-pagination__ellipsis {
	padding: 0 2px;
	color: var(--stats-text-dim);
}

/* ---------- Tablet ---------- */
@media (max-width: 991.98px) {
	body.stats-page .stats-castle-grid {
		grid-template-columns: 1fr;
	}

	body.stats-page .stats-rb-split {
		grid-template-columns: 1fr;
	}

	body.stats-page .stats-rb-split__body {
		height: auto;
		min-height: 0;
	}

	body.stats-page .stats-rb-split .stats-rb-map {
		height: min(52vh, 460px);
		min-height: 300px;
	}

	body.stats-page .stats-rb-list-wrap {
		max-height: 380px;
	}
}

/* ---------- Phone ---------- */
@media (max-width: 767.98px) {
	body.stats-page .stats-page__body {
		padding-top: 20px;
		padding-bottom: 40px;
	}

	body.stats-page .stats-page-toolbar__summary {
		flex-basis: 100%;
	}

	body.stats-page .stats-highlights,
	body.stats-page .stats-pop-grid {
		grid-template-columns: 1fr;
	}

	/* Stacked highlights stay short: the name and its number share one line. */
	body.stats-page a.stats-highlight-card {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: baseline;
		gap: 4px 12px;
		padding: 11px 14px;
	}

	body.stats-page .stats-highlight-card__label {
		grid-column: 1 / -1;
	}

	body.stats-page .stats-highlight-card__value {
		font-size: 16px;
	}

	body.stats-page .stats-highlight-card__empty {
		grid-column: 1 / -1;
	}

	body.stats-page .stats-clanhall-board {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 575.98px) {
	body.stats-page .stats-panel,
	body.stats-page .stats-lb-panel {
		padding: 14px 12px;
	}

	body.stats-page .stats-inline-stat {
		padding: 8px 10px;
	}

	body.stats-page .stats-inline-stat__value {
		font-size: 18px;
	}

	body.stats-page .stats-meta-card {
		padding: 10px 10px;
	}

	body.stats-page .stats-meta-card__value {
		font-size: 20px;
	}

	body.stats-page .stats-bars__row {
		grid-template-columns: minmax(84px, 34%) minmax(0, 1fr) auto;
		gap: 10px;
	}

	body.stats-page .stats-bars__value {
		min-width: 64px;
	}

	/* A phone has no room for six columns: each row becomes rank | name (class - clan under it) |
	   value. The class, clan and level columns fold into the name's second line. */
	body.stats-page .stats-lb thead {
		display: none;
	}

	body.stats-page .stats-lb,
	body.stats-page .stats-lb tbody {
		display: block;
	}

	body.stats-page .stats-lb tbody tr {
		display: grid;
		grid-template-columns: 34px minmax(0, 1fr) auto;
		align-items: center;
		gap: 10px;
		padding: 9px 2px;
		border-bottom: 1px solid var(--stats-border-soft);
	}

	body.stats-page .stats-lb tbody tr:last-child {
		border-bottom: 0;
	}

	body.stats-page .stats-lb tbody td {
		padding: 0;
		border: 0;
		background: transparent !important;
	}

	body.stats-page .stats-lb tbody td.stats-lb-hide-sm {
		display: none;
	}

	body.stats-page .stats-lb tbody td.stats-lb-empty {
		grid-column: 1 / -1;
		padding: 18px 0;
	}

	/* Epic and hero cards two to a row: twelve epics one under the other is a long scroll. */
	body.stats-page .stats-epics,
	body.stats-page .stats-heroes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	body.stats-page .stats-epic,
	body.stats-page .stats-hero {
		gap: 5px;
		padding: 10px 11px;
	}

	body.stats-page .stats-epic__name,
	body.stats-page .stats-hero__name {
		font-size: 13.5px;
	}

	body.stats-page .stats-epic__meta {
		flex-wrap: wrap;
		gap: 4px 8px;
	}

	body.stats-page .stats-epic__respawn {
		font-size: 11.5px;
	}

	/* Class leaders have no rank column: the class folds into the line under the name. */
	body.stats-page .stats-lb--oly tbody tr {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	body.stats-page .stats-lb-name {
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	body.stats-page .stats-lb-sub {
		display: block;
		overflow: hidden;
		margin-top: 2px;
		color: var(--stats-text-dim);
		font-size: 11.5px;
		font-weight: 400;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	body.stats-page .stats-castle-card__banner {
		flex-basis: 52px;
	}

	body.stats-page .stats-castle-card__banner img {
		width: 40px;
	}

	body.stats-page .stats-rb-toolbar__summary {
		margin-left: 0;
	}

	body.stats-page .stats-rb-legend {
		left: 46px;
		right: 8px;
	}
}

/* ---------- Player profile (/stats/player/<name>) ---------- */
/* Names on the boards open the profile: white like the rest of the name cell, gold on hover. */
body.stats-page a.stats-lb-player {
	color: inherit;
	text-decoration: none;
}

body.stats-page a.stats-lb-player:hover,
body.stats-page a.stats-lb-player:focus-visible {
	color: var(--stats-gold-bright);
	text-decoration: none;
}

body.stats-page .stats-player__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--stats-border-soft);
}

body.stats-page .stats-player__icon {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border: 1px solid var(--stats-border);
	background: var(--stats-field);
}

body.stats-page .stats-player__id {
	min-width: 0;
}

body.stats-page .stats-player__name {
	margin: 0;
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

body.stats-page .stats-player__title {
	margin: 2px 0 0;
	color: var(--stats-gold);
	font-size: 13px;
	font-style: italic;
}

body.stats-page .stats-player__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

/* Square tags; the country shows its ISO code in a small box, as on the account Log-in history. */
body.stats-page .stats-player__tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 8px;
	border: 1px solid var(--stats-border-soft);
	color: var(--stats-text-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.6;
	text-transform: uppercase;
}

body.stats-page .stats-player__tag--country b {
	padding: 0 4px;
	border: 1px solid var(--stats-border);
	color: var(--stats-gold-bright);
	font-family: Consolas, Monaco, monospace;
	font-size: 10.5px;
	letter-spacing: 0;
}

body.stats-page .stats-player__tag--online {
	border-color: rgba(62, 207, 122, 0.45);
	color: var(--stats-green);
}

body.stats-page .stats-player__tag--gold {
	border-color: var(--stats-border);
	color: var(--stats-gold-bright);
}

body.stats-page .stats-player__facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px 18px;
	margin: 14px 0 0;
}

body.stats-page .stats-player__facts dt {
	margin: 0 0 3px;
	color: var(--stats-text-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

body.stats-page .stats-player__facts dd {
	margin: 0;
	color: var(--stats-text);
	font-size: 14px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

body.stats-page .stats-player__muted {
	color: var(--stats-text-dim);
	font-weight: 400;
}

body.stats-page .stats-player__combat {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.stats-page .stats-player__note {
	color: var(--stats-text-dim);
	font-size: 11px;
	letter-spacing: 0.04em;
}

body.stats-page a.stats-player__back {
	display: inline-flex;
	align-items: center;
	margin-top: 14px;
	padding: 7px 14px;
	border: 1px solid var(--stats-border);
	color: var(--stats-gold);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-decoration: none;
	text-transform: uppercase;
}

body.stats-page a.stats-player__back:hover {
	border-color: var(--stats-gold);
	background: var(--stats-wash);
	color: var(--stats-gold-bright);
}

@media (max-width: 991.98px) {
	body.stats-page .stats-player__combat {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 575.98px) {
	body.stats-page .stats-player__facts,
	body.stats-page .stats-player__combat {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.stats-page .stats-player__name {
		font-size: 19px;
	}
}

/* ---------- Clans: This week board (Knight's Epaulettes, includes/helpers/clan_week.php) ---------- */
/* Under the title: the payout countdown (an inline-stat box) beside what the top 3 win. */
body.stats-page .stats-clan-week {
	display: flex;
	align-items: stretch;
	gap: 14px;
	margin: 0 0 12px;
}

body.stats-page .stats-clan-week__clock {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 3px;
	min-width: 190px;
	padding: 9px 12px;
	background: var(--stats-field);
	border: 1px solid var(--stats-border-soft);
	border-left: 2px solid var(--stats-gold);
}

body.stats-page .stats-clan-week__label {
	color: var(--stats-text-dim);
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

body.stats-page .stats-clan-week__countdown {
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

body.stats-page .stats-clan-week__when {
	color: var(--stats-text-dim);
	font-size: 11px;
	line-height: 1.35;
}

body.stats-page .stats-clan-week__prize {
	align-self: center;
	margin: 0;
	color: var(--stats-text-muted);
	font-size: 13px;
	line-height: 1.5;
}

/* Under the table: last week's top 3. */
body.stats-page .stats-clan-week-last {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--stats-border-soft);
}

body.stats-page .stats-clan-week-last__label {
	color: var(--stats-gold-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

body.stats-page .stats-clan-week-last__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.stats-page .stats-clan-week-last__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

body.stats-page .stats-clan-week-last__name {
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}

body.stats-page .stats-clan-week-last__value {
	color: var(--stats-gold-bright);
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
	body.stats-page .stats-clan-week {
		flex-direction: column;
		gap: 10px;
	}

	body.stats-page .stats-clan-week__clock {
		min-width: 0;
	}

	body.stats-page .stats-clan-week-last__list {
		flex-direction: column;
		gap: 6px;
	}
}

/* ---------- Clans: Clan wars board (clan_week_stats_wars_html) ---------- */
body.stats-page .stats-clan-wars__vs {
	margin: 0 4px;
	color: var(--stats-text-dim);
	font-size: 10.5px;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

body.stats-page .stats-clan-wars__lead {
	color: var(--stats-gold-bright);
	font-weight: 600;
}

body.stats-page .stats-clan-wars__open {
	color: var(--stats-text-dim);
}
