/* Mistworld — Lineage II inspired theme: dark stone, aged gold, cold mist. */

:root {
	--bg: #07090d;
	--bg-raised: #0d1118;
	--panel: rgba(16, 20, 28, 0.88);
	--panel-solid: #111620;
	--panel-hover: #161c28;
	--line: rgba(203, 168, 95, 0.28);
	--line-strong: rgba(203, 168, 95, 0.55);
	--gold: #cba85f;
	--gold-bright: #f0d48a;
	--gold-dim: #8a6d3b;
	--mist: #9fc2d6;
	--mist-dim: #5f7f92;
	--text: #ddd6c6;
	--text-bright: #f3eee2;
	--muted: #8e897d;
	--green: #7cc480;
	--red: #d0614f;
	--amber: #e0a94e;
	--radius: 4px;
	--shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
	--font-display: "Cinzel Decorative", "Cormorant SC", Georgia, serif;
	--font-heading: "Cormorant SC", "Cormorant Garamond", Georgia, serif;
	--font-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
	--wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(1200px 600px at 15% -10%, rgba(95, 127, 146, 0.12), transparent 60%),
		radial-gradient(900px 500px at 100% 0%, rgba(203, 168, 95, 0.06), transparent 60%),
		var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--gold-bright); text-decoration: none; transition: color .15s; }
a:hover { color: #fff3cf; }

img { max-width: 100%; display: block; }

code { font-family: Consolas, "Courier New", monospace; font-size: .9em; padding: 1px 6px; border-radius: 3px; background: rgba(159, 194, 214, .1); color: var(--mist); }

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text-bright); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; letter-spacing: .02em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.center { text-align: center; margin-inline: auto; }
p.center:last-child { margin-bottom: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top status bar ---------- */
.topbar {
	background: #05070a;
	border-bottom: 1px solid rgba(203, 168, 95, 0.15);
	font-size: .85rem;
	color: var(--muted);
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; justify-content: space-between; padding: 7px 0; }
.topbar-group { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.topbar strong { color: var(--text); font-weight: 500; }

.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 3px; overflow: hidden; margin-left: 4px; }
.lang-switch a { padding: 2px 11px; font-size: .85rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.lang-switch a + a { border-left: 1px solid var(--line-strong); }
.lang-switch a:hover { color: var(--gold-bright); }
.lang-switch a.active { background: rgba(203, 168, 95, .18); color: var(--gold-bright); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 8px rgba(124, 196, 128, .8); }
.dot.off { background: var(--red); box-shadow: 0 0 8px rgba(208, 97, 79, .6); }

/* ---------- header / navigation ---------- */
.site-header {
	position: sticky; top: 0; z-index: 20;
	background: linear-gradient(180deg, rgba(10, 13, 19, .97), rgba(10, 13, 19, .9));
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--line);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--text-bright); flex-shrink: 0; }
.brand img { width: 34px; height: 40px; }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: .08em; background: linear-gradient(180deg, #f6e3a6, #cba85f 55%, #8a6d3b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand:hover { color: var(--text-bright); }

.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
	position: relative;
	font-family: var(--font-heading);
	font-size: 1.12rem;
	font-weight: 600;
	color: var(--text);
	padding: 8px 14px;
	letter-spacing: .03em;
	white-space: nowrap;
}
.nav a::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1px;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
	transform: scaleX(0); transition: transform .2s;
}
.nav a:hover, .nav a.active { color: var(--gold-bright); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.header-actions form { margin: 0; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--gold); border-radius: var(--radius); padding: 7px 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; margin: 4px 0; }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; letter-spacing: .05em;
	padding: 10px 22px;
	border-radius: var(--radius);
	border: 1px solid var(--gold);
	color: #1a1309;
	background: linear-gradient(180deg, #f3dc9c 0%, #cba85f 48%, #9c7a3f 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 14px rgba(203, 168, 95, .25);
	cursor: pointer;
	transition: filter .15s, transform .15s, box-shadow .15s;
	text-align: center;
	line-height: 1.2;
}
.btn:hover { filter: brightness(1.08); color: #1a1309; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 20px rgba(203, 168, 95, .35); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: rgba(203, 168, 95, .06); color: var(--gold-bright); box-shadow: none; border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(203, 168, 95, .14); color: #fff3cf; box-shadow: none; }
.btn-small { padding: 6px 14px; font-size: .95rem; }
.btn-large { padding: 14px 30px; font-size: 1.2rem; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; filter: grayscale(.6); }
.btn-link { background: none; border: none; color: var(--muted); padding: 0; font: inherit; cursor: pointer; }
.btn-link:hover { color: var(--gold-bright); }

/* ---------- hero ---------- */
.hero {
	position: relative;
	min-height: min(78vh, 700px);
	display: flex; align-items: center;
	overflow: hidden;
	background: url("../img/hero.svg") center bottom / cover no-repeat, var(--bg);
	border-bottom: 1px solid var(--line);
}
.hero::before, .hero::after {
	content: ""; position: absolute; left: -20%; right: -20%; height: 180px; pointer-events: none;
	background: radial-gradient(50% 50% at 50% 50%, rgba(200, 218, 228, .16), transparent 70%);
	filter: blur(8px);
	animation: drift 38s linear infinite alternate;
}
.hero::before { bottom: 18%; }
.hero::after { bottom: 4%; animation-duration: 52s; animation-direction: alternate-reverse; opacity: .8; }
@keyframes drift { from { transform: translateX(-8%); } to { transform: translateX(8%); } }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after { animation: none; } }

.hero-content { position: relative; z-index: 1; padding: 70px 0 90px; max-width: 640px; }
.hero-emblem { width: 92px; margin-bottom: 18px; filter: drop-shadow(0 8px 24px rgba(0,0,0,.6)); }
.hero-title {
	font-family: var(--font-display);
	font-size: clamp(2.8rem, 8vw, 5.4rem);
	line-height: 1;
	margin: 0 0 12px;
	letter-spacing: .06em;
	background: linear-gradient(180deg, #fff1c4 0%, #e3c27a 45%, #9a7535 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .7));
}
.hero-slogan { font-family: var(--font-heading); font-size: clamp(1.3rem, 2.6vw, 1.75rem); color: var(--mist); margin-bottom: 18px; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.hero-text { font-size: 1.1rem; color: var(--text); max-width: 540px; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 28px; }
.badge {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
	padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 30px;
	color: var(--gold-bright); background: rgba(7, 9, 13, .6);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- page heading (inner pages) ---------- */
.page-head {
	position: relative;
	padding: 56px 0 40px;
	background:
		linear-gradient(180deg, rgba(7, 9, 13, .3), var(--bg)),
		url("../img/hero.svg") center 70% / cover no-repeat;
	border-bottom: 1px solid var(--line);
	text-align: center;
}
.page-head h1 { margin-bottom: 10px; text-shadow: 0 3px 18px rgba(0,0,0,.8); }
.page-head p { color: var(--mist); margin: 0 auto; max-width: 640px; font-size: 1.1rem; }

.ornament { height: 24px; background: url("../img/ornament.svg") center / contain no-repeat; margin: 14px auto; max-width: 400px; }

/* ---------- sections & panels ---------- */
.section { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 34px; }
.section-title h2 { margin-bottom: 4px; }
.section-title p { color: var(--muted); margin: 0; }

.panel {
	position: relative;
	background: linear-gradient(180deg, rgba(22, 27, 37, .92), rgba(13, 17, 24, .92));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 24px;
}
.panel::before {
	/* gilded corners */
	content: ""; position: absolute; inset: -1px; pointer-events: none; border-radius: var(--radius);
	background:
		linear-gradient(var(--gold), var(--gold)) top left / 18px 2px no-repeat,
		linear-gradient(var(--gold), var(--gold)) top left / 2px 18px no-repeat,
		linear-gradient(var(--gold), var(--gold)) top right / 18px 2px no-repeat,
		linear-gradient(var(--gold), var(--gold)) top right / 2px 18px no-repeat,
		linear-gradient(var(--gold), var(--gold)) bottom left / 18px 2px no-repeat,
		linear-gradient(var(--gold), var(--gold)) bottom left / 2px 18px no-repeat,
		linear-gradient(var(--gold), var(--gold)) bottom right / 18px 2px no-repeat,
		linear-gradient(var(--gold), var(--gold)) bottom right / 2px 18px no-repeat;
	opacity: .8;
}
.panel-title {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	font-family: var(--font-heading); font-size: 1.35rem; color: var(--gold-bright);
	margin: -4px 0 16px; padding-bottom: 10px;
	border-bottom: 1px solid var(--line);
}
.panel-title small { font-family: var(--font-body); font-size: .85rem; color: var(--muted); font-weight: 400; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }

/* ---------- stat counters ---------- */
.counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.counter {
	text-align: center;
	padding: 20px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: radial-gradient(120% 120% at 50% 0%, rgba(203, 168, 95, .1), rgba(13, 17, 24, .9) 60%);
}
.counter-value { font-family: var(--font-heading); font-size: 2.3rem; font-weight: 700; color: var(--gold-bright); line-height: 1.1; }
.counter-label { color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.counter.live .counter-value { color: var(--green); }

.strip { margin-top: -48px; position: relative; z-index: 2; }

/* ---------- rates ---------- */
.rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.rate {
	text-align: center; padding: 14px 8px;
	border: 1px solid var(--line); border-radius: var(--radius);
	background: rgba(7, 9, 13, .5);
}
.rate-value { font-family: var(--font-heading); font-size: 1.9rem; font-weight: 700; color: var(--gold-bright); line-height: 1.1; }
.rate-label { color: var(--muted); font-size: .9rem; }

/* ---------- news ---------- */
.news-item { padding: 20px 0; border-bottom: 1px solid rgba(203, 168, 95, .14); }
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: 0; padding-bottom: 0; }
.news-meta { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
.tag { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; padding: 2px 9px; border-radius: 2px; background: rgba(159, 194, 214, .12); color: var(--mist); border: 1px solid rgba(159, 194, 214, .3); }
.news-item h3 { margin-bottom: 6px; }
.news-item p { margin: 0; color: var(--text); }
.news-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.news-list li { position: relative; padding-left: 20px; color: var(--text); line-height: 1.5; }
.news-list li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 6px rgba(203, 168, 95, .5); }

/* ---------- features ---------- */
.feature { text-align: center; padding: 28px 22px; }
.feature-icon { width: 54px; height: 54px; margin: 0 auto 14px; color: var(--gold); }
.feature h3 { color: var(--gold-bright); margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th { font-family: var(--font-heading); font-size: 1.02rem; color: var(--gold); font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid rgba(203, 168, 95, .1); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(203, 168, 95, .05); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.rank { width: 38px; color: var(--muted); font-family: var(--font-heading); font-weight: 700; }
tr:nth-child(1) td.rank { color: #f3d27a; }
tr:nth-child(2) td.rank { color: #cfd6dc; }
tr:nth-child(3) td.rank { color: #d39a62; }
.name { color: var(--text-bright); font-weight: 500; }
.sub { color: var(--muted); font-size: .88rem; }
.empty { color: var(--muted); text-align: center; padding: 18px 0; margin: 0; }

/* ---------- small elements ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; white-space: nowrap; }
.status.alive, .status.online { color: var(--green); }
.status.dead, .status.offline, .status.banned { color: var(--red); }
.status.unknown { color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(203, 168, 95, .1); }
.list li:last-child { border-bottom: 0; }

.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: .95rem; }
.bar { height: 10px; background: rgba(255, 255, 255, .05); border-radius: 5px; overflow: hidden; border: 1px solid rgba(203, 168, 95, .15); }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); border-radius: 5px; }
.bar-row .num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.castles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.castle { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: rgba(7, 9, 13, .45); }
.castle h4 { font-size: 1.25rem; margin-bottom: 6px; color: var(--gold-bright); }
.castle .owner { color: var(--text-bright); }
.castle .owner.none { color: var(--muted); font-style: italic; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs button {
	font-family: var(--font-heading); font-weight: 600; font-size: 1.02rem;
	padding: 6px 14px; border-radius: var(--radius);
	border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
}
.tabs button[aria-pressed="true"], .tabs button:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(203, 168, 95, .08); }
.js [data-tab-panel][hidden] { display: none; }

/* ---------- files ---------- */
.file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid rgba(203, 168, 95, .12); }
.file:last-child { border-bottom: 0; padding-bottom: 0; }
.file:first-child { padding-top: 0; }
.file h3 { margin-bottom: 4px; font-size: 1.3rem; }
.file p { margin: 0 0 6px; color: var(--muted); }
.file-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; color: var(--mist); }
.file-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 170px; }
.mirrors { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; font-size: .88rem; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { position: relative; padding-left: 74px; min-height: 56px; }
/* the number and the rotated diamond behind it are separate layers, so the digit stays upright */
.step::before {
	counter-increment: step; content: counter(step);
	position: absolute; left: 0; top: 0; width: 54px; height: 54px; z-index: 1;
	display: grid; place-items: center;
	font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; color: var(--gold-bright);
	font-variant-numeric: lining-nums;
}
.step::after {
	content: ""; position: absolute; left: 0; top: 0; width: 54px; height: 54px;
	border: 1px solid var(--gold); transform: rotate(45deg) scale(.82);
	background: rgba(203, 168, 95, .08);
}
.step h3 { margin-bottom: 4px; }
.step p { margin: 0 0 8px; color: var(--text); }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid rgba(203, 168, 95, .14); padding: 4px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 12px 30px 12px 0; position: relative; font-family: var(--font-heading); font-size: 1.2rem; color: var(--text-bright); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; color: var(--gold); font-size: 1.5rem; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text); margin: 0 0 14px; }

/* ---------- forms ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .label { font-size: .92rem; color: var(--gold); letter-spacing: .03em; }
.field small { color: var(--muted); font-size: .85rem; }
input[type=text], input[type=password], input[type=email], input[type=number] {
	width: 100%;
	font: inherit; font-size: 1rem;
	color: var(--text-bright);
	background: rgba(4, 6, 9, .75);
	border: 1px solid rgba(203, 168, 95, .3);
	border-radius: var(--radius);
	padding: 10px 12px;
	transition: border-color .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(203, 168, 95, .15); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.checkbox input { margin-top: 5px; accent-color: var(--gold); }
.checkbox input:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.btn:focus-visible, .tabs button:focus-visible, .nav a:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-footer { text-align: center; color: var(--muted); font-size: .95rem; margin-top: 4px; }
.captcha { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.captcha-question { font-family: var(--font-body); font-variant-numeric: lining-nums tabular-nums; font-weight: 700; font-size: 1.3rem; color: var(--gold-bright); padding: 4px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); white-space: nowrap; }

.alert { padding: 12px 16px; border-radius: var(--radius); border: 1px solid; margin-bottom: 18px; font-size: .97rem; }
.alert-error { border-color: rgba(208, 97, 79, .6); background: rgba(208, 97, 79, .1); color: #f2b6aa; }
.alert-success { border-color: rgba(124, 196, 128, .55); background: rgba(124, 196, 128, .09); color: #bfe6c1; }
.alert-info { border-color: rgba(159, 194, 214, .45); background: rgba(159, 194, 214, .08); color: #cfe1eb; }

/* ---------- cabinet ---------- */
.cabinet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.cabinet-head h1 { margin: 0; }
.cabinet-head .sub { font-size: 1rem; }
.cabinet-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.drawer { margin-bottom: 18px; }
.drawer > summary { list-style: none; cursor: pointer; display: inline-flex; }
.drawer > summary::-webkit-details-marker { display: none; }
.drawer-body { margin-top: 14px; }
.drawer-row { margin-bottom: 24px; }
.drawer-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.drawer-buttons .btn[aria-expanded="true"] { outline: 1px solid var(--gold-bright); outline-offset: 2px; }
.drawer-panel { margin-bottom: 16px; }
.drawer-panel .sub { margin: 12px 0 0; }
.js .drawer-panel:not(.open) { display: none; }

.account { margin-bottom: 22px; }
.account-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; justify-content: space-between; margin-bottom: 14px; }
.account-login { font-family: var(--font-heading); font-size: 1.6rem; color: var(--gold-bright); font-weight: 700; }
.account-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: .92rem; }
.account-facts strong { color: var(--text); font-weight: 500; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }

.limit-meter { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; }
.limit-meter .bar { width: 120px; }

/* ---------- footer ---------- */
.site-footer {
	margin-top: 40px;
	border-top: 1px solid var(--line);
	background: linear-gradient(180deg, #090c11, #05070a);
	color: var(--muted);
	font-size: .92rem;
}
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; padding: 36px 0 20px; }
.site-footer h4 { color: var(--gold); font-size: 1.15rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--gold-bright); }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.footer-brand img { width: 30px; }
.site-footer .footer-bottom { display: block; border-top: 1px solid rgba(203, 168, 95, .12); padding: 14px 0 22px; font-size: .82rem; text-align: center; color: var(--muted); }

/* ---------- prose (about / rules) ---------- */
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.quote { font-family: var(--font-heading); font-size: 1.45rem; color: var(--mist); text-align: center; max-width: 760px; margin: 0 auto; line-height: 1.4; }

/* ---------- error page ---------- */
.error-page { text-align: center; padding: 90px 0; }
.error-code { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; background: linear-gradient(180deg, #fff1c4, #9a7535); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- responsive ---------- */
/* the full menu needs about 1060px: below that the header collapses into the burger */
@media (max-width: 1080px) {
	.js .nav-toggle { display: block; }
	.site-header .wrap { flex-wrap: wrap; min-height: 60px; }
	.js .nav, .js .header-actions { display: none; }
	.js .site-header.open .nav, .js .site-header.open .header-actions { display: flex; }
	.nav { flex-direction: column; align-items: stretch; width: 100%; margin: 0; padding-bottom: 8px; }
	.nav a { padding: 10px 4px; border-bottom: 1px solid rgba(203, 168, 95, .1); }
	.nav a::after { display: none; }
	.header-actions { width: 100%; padding-bottom: 14px; flex-wrap: wrap; }
}

@media (max-width: 1020px) {
	.layout-main { grid-template-columns: 1fr; }
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-2, .grid-3 { grid-template-columns: 1fr; }
	.site-footer .wrap { grid-template-columns: 1fr; }
	.file { grid-template-columns: 1fr; }
	.file-actions { min-width: 0; }
	.mirrors { justify-content: flex-start; }
}

@media (max-width: 520px) {
	body { font-size: 16px; }
	.grid-4 { grid-template-columns: 1fr; }
	.panel { padding: 18px 16px; }
	.hero-content { padding: 50px 0 70px; }
	.bar-row { grid-template-columns: 110px minmax(0, 1fr) 54px; gap: 8px; }
	.topbar .wrap { justify-content: center; }
	.counter-value { font-size: 1.9rem; }
	.hide-sm { display: none; }
}
