/* Home page "Top Authors" box: podium for the top 3, list for 4-10.
   Narrow boxes (<560px, e.g. phones) switch to the compact layout via a container query. */

.taBox {
	container: topauthors / inline-size;
	background: #161B1D;
	border: 1px solid #232B33;
	border-radius: 14px;
	padding: 16px;
	color: #E6EDF3;
	font-size: 14px;
	overflow: hidden;
}

.taBox a { color: #E6EDF3; text-decoration: none; }
.taBox a:hover { color: #B8D86B; }

.taHead {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.taIcon {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: rgba(184,216,107,.12);
	color: #B8D86B;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	flex-shrink: 0;
}

.taHead h2 {
	margin: 0;
	font-size: 21px;
	font-weight: 700;
	color: #E6EDF3;
}

.taSub { font-size: 13px; color: #8B97A6; }

.taBox .taAll {
	margin-left: auto;
	font-size: 14px;
	font-weight: 600;
	color: #B8D86B;
	display: flex;
	align-items: center;
	gap: 5px;
}

.taAll i { font-size: 11px; }

/* Podium */

.taPodium {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 14px;
}

.taCard {
	background: #1F262C;
	border: 1px solid #2E3740;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.taCard:hover { border-color: #4A5A3A; }

.taCardThumb {
	position: relative;
	display: block;
	aspect-ratio: 2 / 1;
	background: #0E1116;
}

.taCardThumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.taCardNoMap {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #2E3740;
	font-size: 26px;
}

.taMedal {
	position: absolute;
	top: 8px;
	left: 8px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	color: #1B1F14;
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 2px #161B1D;
}

.taMedal1 { background: #F5C451; }
.taMedal2 { background: #C9D1D9; }
.taMedal3 { background: #D9955F; }

.taCardMap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 4px 8px;
	background: rgba(14,17,22,.82);
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #C9D1D9;
}

.taCardMapName {
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.taCardMapDl {
	flex-shrink: 0;
	color: #E6EDF3;
	font-variant-numeric: tabular-nums;
}

.taCardMapDl i, .taCardShort i { font-size: 10px; margin-right: 3px; }

.taCardBody {
	padding: 10px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.taCardName {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

.taCardName a {
	font-weight: 700;
	font-size: 16px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.taFlag {
	width: 20px;
	height: 13px;
	border-radius: 2px;
	object-fit: cover;
	flex-shrink: 0;
}

.taCardXp {
	font-size: 13px;
	color: #8B97A6;
	font-variant-numeric: tabular-nums;
}

.taCardXp b { color: #F5C451; font-weight: 600; }
.taCardXp i, .taXp i { margin-right: 4px; }

.taCardStats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
	border-top: 1px solid #2E3740;
	padding-top: 8px;
}

.taCardStats div { display: flex; flex-direction: column; line-height: 1.25; }
.taCardStats b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.taCardStats span { font-size: 11.5px; color: #8B97A6; }

.taCardShort { display: none; font-size: 12px; color: #8B97A6; font-variant-numeric: tabular-nums; }

/* List (ranks 4-10) */

.taRow {
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr) 50px 76px 52px 120px;
	gap: 10px;
	align-items: center;
	height: 48px;
	padding: 0 8px;
	border-bottom: 1px solid #1F262C;
	border-radius: 8px;
}

.taRow:last-child { border-bottom: none; }
.taRow:not(.taRowHead):hover { background: #1C2328; }

.taRowHead {
	height: auto;
	padding-bottom: 6px;
	border-bottom-color: #232B33;
	border-radius: 0;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .6px;
	text-transform: uppercase;
	font-variant-ligatures: none;
	color: #8B97A6;
}

.taRank {
	text-align: center;
	font-weight: 700;
	font-size: 15px;
	color: #8B97A6;
}

.taAuthor {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.taAuthorText {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.25;
}

.taAuthorText a {
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.taXp {
	font-size: 12px;
	color: #8B97A6;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.taXpMaps { display: none; }

.taNum {
	text-align: right;
	font-size: 14px;
	color: #C9D1D9;
	font-variant-numeric: tabular-nums;
}

.taDl { font-weight: 600; color: #E6EDF3; }
.taDl i { display: none; }

.taThumbs {
	display: flex;
	gap: 4px;
	justify-content: flex-end;
}

.taThumbs a {
	display: block;
	width: 36px;
	height: 26px;
	border-radius: 5px;
	overflow: hidden;
	background: #0E1116;
	flex-shrink: 0;
}

.taThumbs a:hover { outline: 1px solid rgba(184,216,107,.6); }

.taThumbs img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Compact layout */

@container topauthors (max-width: 560px) {
	.taSub { display: none; }
	.taPodium { gap: 8px; }
	.taMedal { top: 5px; left: 5px; width: 22px; height: 22px; font-size: 12px; }
	.taCardMap { display: none; }
	.taCardBody { padding: 7px 8px 9px; gap: 4px; }
	.taCardName { gap: 5px; }
	.taCardName a { font-size: 14px; }
	.taCard .taFlag { width: 16px; height: 11px; }
	.taCardXp { font-size: 12px; }
	.taCardXp span { display: none; }
	.taCardStats { display: none; }
	.taCardShort { display: block; }

	.taRowHead { display: none; }
	.taRow { grid-template-columns: 24px minmax(0, 1fr) auto 44px; height: 52px; padding: 0 4px; }
	.taMaps, .taLikes { display: none; }
	.taXpMaps { display: inline; }
	.taDl i { display: inline; font-size: 11px; color: #8B97A6; margin-right: 4px; }
	.taThumbs a { width: 44px; height: 28px; }
	.taThumbs a:not(:first-child) { display: none; }
}

@container topauthors (max-width: 380px) {
	.taCardXp b { font-size: 11px; }
	.taCardShort .taShortMaps { display: none; }
}
