/* GameOn — мэдээллийн сан (ArchivePage.jsx) */

@import url("board-wash.css");

.archive-page {
	--ink: #141821;
	--green: #17703d;
	--red: #c2211d;
	--mono: "IBM Plex Mono", ui-monospace, monospace;
	--display: "Oswald", sans-serif;
	--sans: "Manrope", system-ui, sans-serif;
	margin: 0;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: #efe7d0;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.archive-page *,
.archive-page *::before,
.archive-page *::after {
	box-sizing: border-box;
}

.archive-page a {
	color: inherit;
	text-decoration: none;
}

@keyframes tierSheen {
	0% {
		left: -40%;
		opacity: 0;
	}
	12% {
		opacity: 1;
	}
	55% {
		left: 120%;
		opacity: 0;
	}
	100% {
		left: 120%;
		opacity: 0;
	}
}

.ap-sheen {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: repeating-conic-gradient(
		from 0deg at 84% 120%,
		rgba(255, 255, 255, 0.035) 0deg 9deg,
		transparent 9deg 18deg
	);
}

.ap-sheen-beam {
	position: absolute;
	top: 0;
	height: 100%;
	left: -40%;
	width: 32%;
	pointer-events: none;
	background: linear-gradient(
		105deg,
		transparent,
		rgba(255, 255, 255, 0.14) 45%,
		rgba(255, 255, 255, 0.02) 60%,
		transparent
	);
	transform: skewX(-14deg);
	animation: tierSheen 5.5s ease-in-out infinite;
}

.ap-sheen-beam--short {
	height: 64px;
}

@media (prefers-reduced-motion: reduce) {
	.ap-sheen-beam {
		animation: none;
		display: none;
	}
}

/* ---------- header ---------- */

.ap-header {
	position: relative;
	overflow: hidden;
}

.ap-header-in {
	position: relative;
	z-index: 1;
	max-width: 1240px;
	margin: 0 auto;
	padding: 16px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.ap-mark {
	display: flex;
	flex-direction: column;
	line-height: 0.84;
	flex: none;
}

.ap-mark-row {
	display: flex;
	align-items: center;
	gap: 1px;
}

.ap-mark-letter,
.ap-mark-dart {
	font-family: var(--display);
	font-weight: 700;
	font-size: 26px;
	color: #ffffff;
}

.ap-mark-dart {
	letter-spacing: 0.08em;
	margin-top: 3px;
}

.ap-mark-o {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}

.ap-mark-bull {
	width: 36%;
	height: 36%;
	border-radius: 50%;
	background: #e0322e;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.ap-ad {
	flex: 1 1 420px;
	min-width: 260px;
	max-width: 760px;
	height: 52px;
	border: 1px dashed rgba(255, 255, 255, 0.22);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: rgba(255, 255, 255, 0.02);
}

.ap-ad-size {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	color: #9a927c;
}

.ap-ad-rule {
	width: 1px;
	height: 20px;
	background: rgba(255, 255, 255, 0.16);
}

.ap-ad-text {
	font-size: 12.5px;
	color: #b8b09a;
}

.ap-nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ap-nav a {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	color: #cfc9b6;
	padding: 10px 15px;
	border-radius: 8px;
}

.ap-nav a:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.06);
}

.ap-header-bar {
	height: 3px;
	background: linear-gradient(
		to right,
		#c2211d 0%,
		#c2211d 34%,
		#17703d 34%,
		#17703d 62%,
		rgba(255, 255, 255, 0.14) 62%
	);
}

/* ---------- intro ---------- */

.ap-intro {
	max-width: 1240px;
	margin: 0 auto;
	padding: clamp(30px, 5vw, 52px) 32px 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.ap-intro-copy {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 640px;
}

.ap-kicker {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.2em;
	color: var(--green);
}

.ap-intro h1 {
	margin: 0;
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(30px, 4.4vw, 50px);
	line-height: 1.02;
	text-transform: uppercase;
	color: var(--ink);
}

.ap-intro p {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: #5f5b4d;
	text-wrap: pretty;
}

.ap-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	background: #ffffff;
	border: 1px solid rgba(20, 24, 33, 0.14);
	border-radius: 4px 16px 4px 16px;
	padding: 14px 18px;
	max-width: 560px;
}

.ap-search-icon {
	display: flex;
	color: #6c6754;
	flex: none;
}

.ap-search input {
	border: 0;
	outline: none;
	background: transparent;
	font-family: var(--sans);
	font-size: 14px;
	color: var(--ink);
	width: 100%;
}

.ap-search input::placeholder {
	color: #6c6754;
}

.search-results {
	position: absolute;
	z-index: 20;
	top: calc(100% + 0.4rem);
	left: 0;
	right: 0;
	background: #ffffff;
	color: var(--ink);
	border: 1px solid rgba(20, 24, 33, 0.14);
	border-radius: 8px;
	max-height: 20rem;
	overflow-y: auto;
	box-shadow: 0 12px 28px rgba(20, 24, 33, 0.16);
}

.search-results:empty {
	display: none;
}

.sr-group {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #6c6754;
	padding: 0.5rem 0.85rem 0.25rem;
}

.sr-item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.5rem 0.85rem;
	color: var(--ink);
	text-decoration: none;
	font-size: 0.88rem;
	border: none;
	background: none;
	width: 100%;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
}

.sr-item:hover {
	background: rgba(23, 112, 61, 0.08);
}

.sr-item .rt {
	margin-left: auto;
	color: #6c6754;
	font-size: 0.76rem;
	white-space: nowrap;
}

/* ---------- main ---------- */

.ap-main {
	flex: 1 1 auto;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: clamp(26px, 4vw, 42px) 32px clamp(40px, 6vw, 72px);
	display: flex;
	flex-direction: column;
	gap: clamp(34px, 5vw, 58px);
}

.ap-band,
.ap-totals,
.ap-sec-head {
	position: relative;
	overflow: hidden;
	background: #16181a;
	border-radius: 6px 26px 6px 26px;
}

.ap-band-head,
.ap-sec-head {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 22px 26px 18px;
}

.ap-sec-head {
	padding: 18px 26px;
}

.ap-band-head h2,
.ap-sec-head h2,
.ap-totals-title {
	position: relative;
	margin: 0;
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(22px, 2.8vw, 30px);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #ffffff;
}

.ap-totals-title {
	font-size: 20px;
	letter-spacing: 0.04em;
	font-weight: 400;
}

.ap-sec-meta {
	position: relative;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	color: #cfc9b6;
}

.ap-sec-extra {
	color: #cfc9b6;
	font-weight: 400;
}

.ap-block {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* ---------- tiers ---------- */

.ap-tier-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1px;
	background: rgba(255, 255, 255, 0.09);
	border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.ap-tier {
	position: relative;
	overflow: hidden;
	background: #16181a;
	padding: 20px 22px 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	border: 0;
	text-align: left;
	color: inherit;
	font: inherit;
	cursor: default;
}

.ap-tier-bar {
	position: absolute;
	top: 0;
	left: 0;
	width: 46px;
	height: 4px;
	background: var(--accent, #e0322e);
}

.ap-tier-label {
	font-family: var(--mono);
	font-size: 9.5px;
	letter-spacing: 0.16em;
	color: #cfc9b6;
	text-transform: uppercase;
}

.ap-tier b {
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(34px, 4vw, 46px);
	line-height: 0.9;
	color: #ffffff;
	font-variant-numeric: tabular-nums;
}

.ap-tier .ex {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.08em;
	color: var(--sub, #cfc9b6);
}

/* ---------- totals (filled by JS, class on wrapper) ---------- */

.ap-totals-head {
	position: relative;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 22px 26px 0;
}

.ap-totals-hero {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1px;
	background: rgba(255, 255, 255, 0.09);
	margin-top: 20px;
}

.ap-totals-minor {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
	gap: 1px;
	background: rgba(255, 255, 255, 0.09);
	border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.ap-totals a:hover {
	opacity: 0.92;
}

/* ---------- grids ---------- */

.ap-feat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.ap-rec-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}

.ap-feat-grid > a,
.ap-rec-grid > a {
	display: block;
	min-width: 0;
	color: inherit;
}

.ap-feat-grid > a:hover,
.ap-rec-grid > a:hover {
	transform: translateY(-2px);
	transition: transform 150ms ease;
}

/* ---------- clubs records ---------- */

.ap-club-recs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}

.ap-club-nom {
	background: #ffffff;
	border: 1px solid rgba(20, 24, 33, 0.1);
	border-radius: 4px 20px 4px 20px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.ap-club-nom-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px 10px;
	border-bottom: 1px solid rgba(20, 24, 33, 0.08);
}

.ap-club-nom-label {
	font-family: var(--mono);
	font-size: 9.5px;
	letter-spacing: 0.12em;
	line-height: 1.5;
	color: #6c6754;
}

.ap-club-nom-badge {
	font-family: var(--mono);
	font-size: 9px;
	letter-spacing: 0.1em;
	padding: 4px 8px;
	border-radius: 999px;
	background: #16181a;
	color: #fff;
	flex: none;
}

.ap-club-podium {
	display: flex;
	flex-direction: column;
}

.ap-club-podium-row {
	display: grid;
	grid-template-columns: 22px 34px 1fr auto;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid rgba(20, 24, 33, 0.06);
	color: var(--ink);
}

.ap-club-podium-row:last-child {
	border-bottom: 0;
}

.ap-club-podium-row:hover {
	background: rgba(20, 24, 33, 0.03);
}

.ap-club-podium-rank {
	font-family: var(--display);
	font-size: 16px;
	color: #17703d;
	text-align: center;
}

.ap-club-podium-row:nth-child(1) .ap-club-podium-rank {
	color: #c2211d;
}

.ap-club-podium-val {
	font-family: var(--display);
	font-size: 18px;
	line-height: 1;
	text-align: right;
	font-variant-numeric: tabular-nums;
	max-width: 9rem;
}

.ap-club-podium-val small {
	display: block;
	font-family: var(--mono);
	font-size: 9px;
	letter-spacing: 0.06em;
	color: #6c6754;
	margin-top: 3px;
	font-weight: 400;
}

.ap-club-panel-foot {
	margin-top: 12px;
	text-align: center;
}

.ap-club-mark {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: var(--tint, #16181a);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--display);
	font-size: 15px;
	flex: none;
	overflow: hidden;
}

.ap-club-mark img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ap-club-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ap-club-name {
	font-weight: 700;
	font-size: 13.5px;
	line-height: 1.2;
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ap-club-meta {
	font-family: var(--mono);
	font-size: 9.5px;
	letter-spacing: 0.06em;
	color: #6c6754;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ap-club-more {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	padding: 12px 22px;
	border: 1px solid rgba(23, 112, 61, 0.45);
	border-radius: 999px;
	background: transparent;
	color: #17703d;
	cursor: pointer;
}

.ap-club-more:hover {
	background: rgba(23, 112, 61, 0.08);
}

/* ---------- footer ---------- */

.ap-foot {
	position: relative;
	overflow: hidden;
}

.ap-foot-in {
	position: relative;
	max-width: 1240px;
	margin: 0 auto;
	padding: 22px 32px;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.12em;
	color: #cfc9b6;
	text-align: center;
	text-transform: uppercase;
}

.ap-foot-in a {
	color: #f0d78a;
}

.ap-foot-in a:hover {
	color: #ffffff;
}

.muted {
	color: #6c6754;
	padding: 12px 4px;
}

@media (max-width: 720px) {
	.ap-header-in,
	.ap-intro,
	.ap-main,
	.ap-foot-in {
		padding-inline: 16px;
	}
}

/* ---------- УАШТ-ийн түүх (n01-ээс өмнөх) ---------- */

.hx-intro {
	margin: 0;
	max-width: 860px;
	color: var(--ink);
	font-size: 0.98rem;
	line-height: 1.55;
}

.hx-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 12px;
}

.hx-card {
	background: #fff;
	border: 1px solid rgba(20, 24, 33, 0.12);
	border-left: 3px solid var(--red);
	border-radius: 6px 22px 6px 22px;
	padding: 16px 18px 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--ink);
}

.hx-card header {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

.hx-year {
	font-family: var(--display);
	font-weight: 600;
	font-size: 28px;
	line-height: 1;
	color: var(--ink);
}

.hx-where {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.06em;
	color: #3d4452;
}

.hx-rows {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.hx-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.hx-rank {
	flex: none;
	min-width: 58px;
	text-align: center;
	font-family: var(--mono);
	font-size: 9.5px;
	font-weight: 600;
	letter-spacing: 0.12em;
	padding: 4px 6px;
	border-radius: 999px;
	color: var(--ink);
	background: #eceef1;
}

.hx-rank.r1 { background: #e3b23c; color: #141821; }
.hx-rank.r2 { background: #cfd4da; color: #141821; }
.hx-rank.r3 { background: #8a4b1c; color: #fff; }

.hx-name {
	display: flex;
	flex-direction: column;
	gap: 1px;
	font-weight: 600;
	line-height: 1.25;
	min-width: 0;
}

.hx-name a,
.hx-name span {
	color: var(--ink);
}

.hx-name a {
	text-decoration: underline;
	text-decoration-color: rgba(194, 33, 29, 0.45);
	text-underline-offset: 3px;
}

.hx-name a:hover {
	color: var(--red);
}

.hx-title {
	display: inline-block;
	width: max-content;
	font-family: var(--mono);
	font-size: 9.5px;
	letter-spacing: 0.1em;
	color: #fff;
	background: var(--red);
	border-radius: 3px;
	padding: 1px 5px;
}

.hx-name small {
	font-weight: 500;
	font-size: 0.8rem;
	color: #3d4452;
}

.hx-card footer {
	border-top: 1px solid rgba(20, 24, 33, 0.1);
	padding-top: 8px;
	font-size: 0.78rem;
	color: #3d4452;
	line-height: 1.4;
}

.hx-top50 {
	background: #fff;
	border: 1px solid rgba(20, 24, 33, 0.12);
	border-radius: 6px 22px 6px 22px;
	padding: 14px 18px;
	color: var(--ink);
}

.hx-top50 summary {
	cursor: pointer;
	font-family: var(--display);
	font-size: 18px;
	text-transform: uppercase;
	color: var(--ink);
}

.hx-top50 ol {
	margin: 12px 0 0;
	padding-left: 28px;
	columns: 3 240px;
	column-gap: 28px;
}

.hx-top50 li {
	break-inside: avoid;
	padding: 2px 0;
	font-weight: 600;
}

.hx-top50 li a,
.hx-top50 li span {
	color: var(--ink);
}

.hx-top50 li small {
	font-weight: 500;
	color: #3d4452;
}
