/* =====================================================================
   RÖADV Transcendence -- site stylesheet (no frameworks)
   Colors & fonts live in :root -- change them there.
   ===================================================================== */
:root {
	--bg:          #0a0d08;
	--bg-2:        #0f140c;
	--panel:       #151b12;
	--panel-2:     #1b2317;
	--panel-3:     #222c1d;
	--line:        rgba(212, 173, 90, .18);
	--line-2:      rgba(212, 173, 90, .38);

	--gold:        #f0c250;
	--gold-hi:     #ffe29a;
	--gold-lo:     #a97a26;
	--green:       #6ea845;
	--sky:         #5bbbe9;
	--red:         #e5675a;
	--amber:       #e9a73b;

	--text:        #ece3cf;
	--text-2:      #c9bc9d;
	--muted:       #94886c;

	--f-display:   'Cinzel', Georgia, serif;
	--f-body:      'Rubik', 'Segoe UI', Tahoma, sans-serif;

	--r:           12px;
	--r-sm:        8px;
	--shadow:      0 10px 30px rgba(0, 0, 0, .35);
	--wrap:        1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background:
		radial-gradient(1200px 500px at 15% -5%, rgba(110, 168, 69, .10), transparent 60%),
		radial-gradient(900px 400px at 90% 0%, rgba(240, 194, 80, .07), transparent 60%),
		var(--bg);
	color: var(--text);
	font: 400 15px/1.6 var(--f-body);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--gold-hi); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold); }
h1, h2, h3, h4, h5 { font-family: var(--f-display); color: var(--gold-hi); letter-spacing: .3px; line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(26px, 4vw, 36px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
p { margin: 0 0 1em; }
code { font-family: Consolas, 'Courier New', monospace; background: rgba(240, 194, 80, .1); color: var(--gold-hi); padding: 2px 6px; border-radius: 5px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.main { flex: 1; padding-top: 36px; padding-bottom: 64px; }
.is-home .main { padding-top: 8px; }

/* Utilities */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.gold { color: var(--gold); }
.danger { color: var(--red); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.pad { padding: 0 18px 14px; margin: 0; }
.pad-x { padding: 12px 18px 0; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.show-sm { display: none; }
ul.plain { list-style: none; margin: 0; padding: 0; }
.dotted { border-bottom: 1px dotted var(--muted); cursor: help; }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
	font: 600 14px/1.2 var(--f-body); cursor: pointer; white-space: nowrap;
	transition: transform .12s, filter .15s, background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo)); color: #2a1a0c; border-color: var(--gold-lo); box-shadow: 0 4px 14px rgba(240, 194, 80, .18), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold:hover { color: #2a1a0c; filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, .03); color: var(--gold-hi); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(240, 194, 80, .1); color: var(--gold-hi); border-color: var(--gold); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .4; cursor: default; }
.inline-form { display: inline; margin: 0; }

/* =====================================================================
   Navigation
   ===================================================================== */
.nav {
	position: sticky; top: 0; z-index: 50;
	background: rgba(10, 13, 8, .88);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.nav-brand img { display: block; height: 46px; width: auto; }
.nav-menu { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-main, .nav-account { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-account { gap: 8px; }
.nav-link {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 8px 12px; border-radius: 8px; border: 0; background: none; cursor: pointer;
	color: var(--text-2); font: 500 14px/1.2 var(--f-body);
}
.nav-link:hover, .nav-link.is-active, .has-drop.is-open > .nav-link { color: var(--gold-hi); background: rgba(240, 194, 80, .08); }
.nav-link.is-active { box-shadow: inset 0 -2px 0 var(--gold); }
.nav-link .ext { font-size: 11px; opacity: .6; }
.nav-user { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; }
.has-drop { position: relative; }
.drop {
	position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px;
	list-style: none; margin: 0; padding: 6px;
	background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm);
	box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(-4px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.has-drop.is-open .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text); font-size: 14px; }
.drop a:hover { background: rgba(240, 194, 80, .1); color: var(--gold-hi); }
.drop-sep { height: 1px; background: var(--line); margin: 6px 4px; }

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: none; cursor: pointer; padding: 12px 11px; }
.nav-toggle span:not(.sr) { display: block; height: 2px; background: var(--gold-hi); border-radius: 2px; margin: 4px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =====================================================================
   Hero (homepage)
   ===================================================================== */
.hero { position: relative; overflow: hidden; padding: 64px 0 56px; text-align: center; isolation: isolate; }
.hero-sky {
	position: absolute; inset: 0; z-index: -2;
	background: url('../img/hero-bg.jpg') center 38% / cover no-repeat;
}
.hero-sky::after {
	content: ""; position: absolute; inset: 0;
	background:
		radial-gradient(ellipse 70% 55% at 50% 42%, rgba(10, 13, 8, .05), rgba(10, 13, 8, .55) 75%),
		linear-gradient(180deg, rgba(10, 13, 8, .35) 0%, rgba(10, 13, 8, .15) 35%, rgba(10, 13, 8, .75) 78%, var(--bg) 100%);
}
.hero-motes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-motes i {
	position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%;
	background: var(--gold-hi); box-shadow: 0 0 8px 2px rgba(255, 226, 154, .6); opacity: 0;
	animation: mote 12s linear infinite;
}
@keyframes mote {
	0%   { transform: translate(0, 0); opacity: 0; }
	10%  { opacity: .9; }
	80%  { opacity: .6; }
	100% { transform: translate(30px, -560px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-motes { display: none; } }

.hero-inner { position: relative; }
.hero-kicker { font: 700 13px/1 var(--f-display); letter-spacing: 6px; text-transform: uppercase; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); margin-bottom: 4px; }
.hero-logo { margin: 0 auto 6px; max-width: 520px; filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .55)); }
.hero-logo img { display: block; width: 100%; height: auto; }
.hero-tagline { max-width: 620px; margin: 0 auto 26px; font-size: 17px; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .85), 0 0 2px rgba(0, 0, 0, .9); }
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-cta .btn-ghost { background: rgba(10, 13, 8, .55); }
.status-pill {
	display: inline-flex; align-items: center; gap: 8px; margin: 0 0 26px;
	padding: 7px 16px; border-radius: 999px; font-size: 14px;
	background: rgba(10, 13, 8, .72); border: 1px solid var(--line-2); color: var(--text);
}
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.status-pill.is-up .dot { background: #59d36b; box-shadow: 0 0 0 0 rgba(89, 211, 107, .6); animation: pulse 2s infinite; }
.status-pill .sep { color: var(--muted); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(89, 211, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(89, 211, 107, 0); } }

.hero-stats {
	display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; margin: 0 auto; max-width: 860px;
	background: rgba(10, 13, 8, .78); border: 1px solid var(--line-2); border-radius: var(--r);
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-stats > div { padding: 14px 8px; border-left: 1px solid var(--line); }
.hero-stats > div:first-child { border-left: 0; }
.hero-stats dt { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); order: 2; }
.hero-stats dd { margin: 0; font: 700 22px/1.2 var(--f-display); color: var(--gold); }
.hero-stats > div { display: flex; flex-direction: column-reverse; }

/* =====================================================================
   Layout pieces
   ===================================================================== */
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 36px 0 16px; }
.section > .section-title:first-child, .section-head .section-title { margin-top: 0; }
.section-title .ic { font-size: 20px; filter: saturate(.8); }
.section-link { font-size: 14px; }
.sub-title { margin: 32px 0 12px; font-size: 18px; }

.page-head { text-align: center; margin: 4px auto 30px; max-width: 760px; }
.page-head p { color: var(--text-2); margin: 0; }
.page-icon {
	width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; font-size: 26px;
	border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 226, 154, .25), rgba(240, 194, 80, .06));
	border: 1px solid var(--line-2);
}
.page-head-left { text-align: left; max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head-left > div:first-child { max-width: 760px; }
.crumb { margin: 0 0 14px; font-size: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stack { margin-bottom: 18px; }

.card {
	background: linear-gradient(180deg, var(--panel-2), var(--panel));
	border: 1px solid var(--line); border-radius: var(--r);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
	margin-bottom: 18px;
}
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.card-pad { padding: 22px; }
.card h3 { font-size: 17px; }
.eyebrow { display: block; font: 700 12px/1.3 var(--f-body); letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.empty { padding: 34px 20px; margin: 0; text-align: center; color: var(--muted); }
.note { margin: 14px 0 0; font-style: italic; color: var(--muted); font-size: 14px; }
.callout { margin: 18px 0 0; padding: 14px 16px; border-radius: var(--r-sm); border-left: 3px solid var(--gold); background: rgba(240, 194, 80, .06); color: var(--text-2); font-size: 14px; }

/* Tags */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.tag {
	display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5;
	background: rgba(240, 194, 80, .1); color: var(--gold-hi); border: 1px solid var(--line-2); vertical-align: middle;
}
.tag-mvp  { background: rgba(229, 103, 90, .15); color: #ffb2a9; border-color: rgba(229, 103, 90, .4); margin-left: 4px; }
.tag-ok   { background: rgba(89, 211, 107, .12); color: #9be9a6; border-color: rgba(89, 211, 107, .35); }
.tag-warn { background: rgba(233, 167, 59, .14); color: #ffd28a; border-color: rgba(233, 167, 59, .4); }
.tag-info { background: rgba(91, 187, 233, .12); color: #b5e3f8; border-color: rgba(91, 187, 233, .35); }
.tag-dim  { background: rgba(255, 255, 255, .04); color: var(--muted); border-color: rgba(255, 255, 255, .1); font-weight: 500; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--r-sm); margin: 0 0 18px; border: 1px solid; font-size: 14px; }
.alert-info    { background: rgba(91, 187, 233, .08); border-color: rgba(91, 187, 233, .35); color: #cbeaf9; }
.alert-success { background: rgba(89, 211, 107, .08); border-color: rgba(89, 211, 107, .35); color: #c4f0ca; }
.alert-error   { background: rgba(229, 103, 90, .09); border-color: rgba(229, 103, 90, .4); color: #ffcdc7; }
.alert ul.plain li + li { margin-top: 4px; }
.admin-box .inline-form { margin-left: 8px; }

/* =====================================================================
   Tables
   ===================================================================== */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
	text-align: left; padding: 12px 14px; font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase;
	color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid rgba(212, 173, 90, .09); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(240, 194, 80, .04); }
.table th.right, .table td.right { text-align: right; }
.table .num { width: 56px; text-align: right; }
.table tr.is-mine td { background: rgba(240, 194, 80, .07); }
.table ul.plain li + li { margin-top: 2px; }
.dim-rows td { color: var(--text-2); }
.row-link { cursor: pointer; }
.table-sub { background: rgba(0, 0, 0, .18); border-radius: var(--r-sm); font-size: 13px; }
.table-sub th { padding: 8px 12px; }
.table-sub td { padding: 8px 12px; }

.with-ico { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.with-ico.big { display: flex; gap: 16px; }
.with-ico.big h1, .with-ico.big h2 { margin: 0 0 4px; }
.with-ico.big p { margin: 0; }
.ico { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; flex: none; }
.ico-lg { width: 48px; height: 48px; padding: 6px; border-radius: 10px; background: radial-gradient(circle, #33402a, #1b2317); border: 1px solid var(--line-2); }

.medal { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 999px; font-weight: 700; font-size: 12px; color: var(--text-2); background: rgba(255, 255, 255, .05); }
.rank-1 .medal { background: linear-gradient(180deg, #ffe29a, #c8922b); color: #2a1a0c; }
.rank-2 .medal { background: linear-gradient(180deg, #f1f1f1, #9ea4ab); color: #23262a; }
.rank-3 .medal { background: linear-gradient(180deg, #f1b989, #a3622d); color: #2a1407; }

/* Toolbars (search, filters) */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); margin: 0; }
.toolbar.flush { padding: 0; border: 0; }
.toolbar label { color: var(--muted); font-size: 13px; }
.grow { flex: 1 1 220px; min-width: 0; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=date], select {
	appearance: none; -webkit-appearance: none;
	background: #0c100a; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r-sm);
	padding: 10px 12px; font: 400 14px/1.3 var(--f-body); width: 100%;
	transition: border-color .15s, box-shadow .15s;
}
.toolbar input, .toolbar select { width: auto; }
.toolbar input.grow { width: 100%; }
select { padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 194, 80, .15); }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) saturate(3) hue-rotate(5deg); cursor: pointer; }
::placeholder { color: #6d6450; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.tab {
	padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
	color: var(--text-2); font: 500 14px/1.3 var(--f-body); cursor: pointer;
}
.tab:hover { color: var(--gold-hi); border-color: var(--line-2); }
.tab.is-active { background: linear-gradient(180deg, rgba(240, 194, 80, .22), rgba(240, 194, 80, .08)); color: var(--gold-hi); border-color: var(--gold-lo); }
.tab-count { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* Pagination */
.pager { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 16px; border-top: 1px solid var(--line); }
.pager a, .pager-cur, .pager-gap { min-width: 36px; padding: 6px 10px; border-radius: 8px; text-align: center; font-size: 14px; }
.pager a { border: 1px solid var(--line); color: var(--text-2); }
.pager a:hover { border-color: var(--gold); color: var(--gold-hi); }
.pager-cur { background: var(--gold); color: #2a1a0c; font-weight: 700; }
.pager-gap { color: var(--muted); min-width: 0; }
.client-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* =====================================================================
   Homepage
   ===================================================================== */
.intro p { font-size: 16px; color: var(--text-2); margin: 0; }
.ranker-list { list-style: none; margin: 0; padding: 0; }
.ranker-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(212, 173, 90, .09); }
.ranker-list li:first-child { border-top: 0; padding-top: 2px; }
.ranker-list .who { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranker-list .is-empty .who { color: var(--muted); font-weight: 400; font-style: italic; }
.ranker-list .val { font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.ranker-list .rank-1 .who { color: var(--gold-hi); }

/* =====================================================================
   Information
   ===================================================================== */
.kv { width: 100%; border-collapse: collapse; }
.kv th, .kv td { padding: 10px 0; border-bottom: 1px solid rgba(212, 173, 90, .09); font-size: 15px; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.kv th { text-align: left; font-weight: 400; color: var(--text-2); }
.kv td { text-align: right; font-weight: 700; color: var(--gold-hi); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { padding: 16px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .2); border: 1px solid var(--line); }
.feature h4 { font-size: 15px; margin-bottom: 6px; }
.feature p { margin: 0; font-size: 14px; color: var(--text-2); }
.cmd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 28px; }
.cmd { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(212, 173, 90, .07); font-size: 14px; color: var(--text-2); }
.cmd code { min-width: 86px; text-align: center; }
.rules { columns: 2; column-gap: 36px; }
.rule-group { break-inside: avoid; margin-bottom: 20px; }
.rule-group h4 { font-size: 15px; color: var(--gold); }
.rule-group ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.rule-group li { margin-bottom: 6px; }
.rule-group li::marker { color: var(--gold-lo); }
.rules .callout { column-span: all; }

/* =====================================================================
   Downloads
   ===================================================================== */
.dl-group { margin-bottom: 44px; }
.dl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.dl-head h2 { margin: 0; }
.dl-head h2 small { font: 500 13px var(--f-body); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.dl-head p { margin: 0; color: var(--muted); font-size: 14px; }
.dl-ic { width: 48px; height: 48px; flex: none; display: grid; place-items: center; font-size: 22px; border-radius: 12px; background: rgba(240, 194, 80, .08); border: 1px solid var(--line-2); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.dl-card { padding: 22px 18px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; margin: 0; transition: transform .15s, border-color .15s; }
.dl-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.dl-card h4 { margin: 10px 0 8px; font-size: 15px; }
.dl-card .muted { margin: 10px 0 16px; }
.dl-card .btn { margin-top: auto; }
.dl-card-ic { font-size: 26px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 226, 154, .22), rgba(240, 194, 80, .04)); border: 1px solid var(--line-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { position: relative; margin: 0; }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; margin-bottom: 12px; background: var(--gold); color: #2a1a0c; font-weight: 800; }
.step h4 { font-size: 15px; }
.step p { margin: 0; font-size: 14px; color: var(--text-2); }
.mini-steps { margin: 0; padding-left: 22px; color: var(--text-2); font-size: 14px; }
.mini-steps li { margin-bottom: 8px; }
.mini-steps li::marker { color: var(--gold); font-weight: 700; }
.code-copy {
	margin-top: auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 10px 14px; border-radius: var(--r-sm); cursor: pointer;
	background: #0c100a; border: 1px dashed var(--gold-lo); color: var(--gold-hi); font: 700 17px/1 Consolas, monospace; letter-spacing: 2px;
}
.code-copy:hover { border-color: var(--gold); }
.code-hint { font: 600 12px var(--f-body); letter-spacing: 0; color: var(--muted); }
.copy-inline { cursor: pointer; }

/* =====================================================================
   Market
   ===================================================================== */
.balance { display: flex; flex-direction: column; align-items: flex-end; padding: 12px 18px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line-2); min-width: 180px; }
.balance:has(> .btn) { padding: 0; border: 0; background: none; min-width: 0; }
.balance strong { font: 700 26px/1.1 var(--f-display); color: var(--gold); }
.market-bar { display: flex; flex-direction: column; gap: 8px; }
.market-bar p { margin: 0; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.mk-card {
	display: flex; flex-direction: column; padding: 12px; border-radius: var(--r);
	background: linear-gradient(180deg, var(--panel-3), var(--panel)); border: 1px solid var(--line); color: var(--text);
	transition: transform .15s, border-color .15s, box-shadow .15s;
}
.mk-card:hover { transform: translateY(-3px); border-color: var(--gold-lo); box-shadow: var(--shadow); color: var(--text); }
.mk-sub { font-size: 12px; color: var(--muted); }
.mk-name { font-weight: 600; line-height: 1.3; min-height: 2.6em; }
.mk-img { height: 130px; display: grid; place-items: center; margin: 10px 0; border-radius: var(--r-sm); background: radial-gradient(circle at 50% 45%, #33402a 0%, #151b12 72%); }
.mk-img img { max-height: 112px; max-width: 90%; image-rendering: auto; }
.mk-qty { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.mk-price { text-align: center; padding: 8px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--gold); background: rgba(240, 194, 80, .08); border: 1px solid var(--line-2); transition: background .15s, color .15s; }
.mk-card:hover .mk-price { background: var(--gold); color: #2a1a0c; }
.mk-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.mk-hero-img { width: 170px; height: 150px; display: grid; place-items: center; border-radius: var(--r); background: radial-gradient(circle at 50% 45%, #33402a 0%, #151b12 72%); border: 1px solid var(--line-2); }
.mk-hero-img img { max-width: 150px; max-height: 135px; }
.mk-hero-info { flex: 1; min-width: 240px; }
.mk-hero-info p { margin: 0; }
.mk-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 10px 0 14px; }
.mk-stats dt { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.mk-stats dd { margin: 0; font-size: 20px; font-weight: 700; }

/* =====================================================================
   Transparency / item db
   ===================================================================== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat { padding: 18px 20px; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.stat span { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.stat strong { font: 700 24px/1.3 var(--f-display); color: var(--gold-hi); word-break: break-word; }
.stat .small-stat { font-size: 18px; }
.refine-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; margin-bottom: 12px; }
.refine-grid > div { text-align: center; padding: 10px 4px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.refine-grid strong { font-size: 16px; }
.pick-list { list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px; }
.pick-list a { display: flex; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.pick-list a:hover { background: rgba(240, 194, 80, .07); color: var(--gold-hi); }
.item-title { margin-bottom: 16px; }
.tab-panel { margin-top: 0; }
.expand-row { cursor: pointer; }
.caret-r { display: inline-block; width: 0; height: 0; border: 5px solid transparent; border-left: 6px solid var(--gold); margin-right: 8px; transition: transform .15s; vertical-align: 1px; }
.expand-row.is-open .caret-r { transform: rotate(90deg) translateX(2px); }
.expand-detail > td { padding: 4px 14px 16px 34px; }

.item-view { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.item-view > .card { margin: 0; }
.item-art { display: grid; place-items: center; min-height: 220px; background: radial-gradient(circle at 50% 45%, #33402a 0%, #151b12 72%); }
.item-art img { max-width: 180px; max-height: 180px; }
.item-name { font-size: 26px; }
/* Light box like the game's own description window, so RO's ^RRGGBB colours stay readable */
.item-desc { margin: 18px 0 0; padding: 16px 18px; border-radius: var(--r-sm); background: #fbf8f0; border: 1px solid #d9cba6; line-height: 1.7; font-size: 14px; color: #1d1d1d; }
.item-desc .muted { color: #7a7060; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-bottom: 18px; }
.item-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, background .15s; }
.item-tile:hover { border-color: var(--gold-lo); background: var(--panel-2); color: var(--gold-hi); }
.item-tile-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.item-tile-id { font-size: 12px; color: var(--muted); }
.item-grid + .card .pager { border-top: 0; }
.item-grid + .card:empty { display: none; }
.item-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.shop-head h1 { font-size: 24px; }

/* =====================================================================
   Forms / auth
   ===================================================================== */
.auth { display: grid; place-items: center; padding: 10px 0 20px; }
.auth-card { width: 100%; max-width: 420px; margin: 0; }
.auth-card.auth-wide { max-width: 620px; }
.auth-card h1 { text-align: center; margin-bottom: 4px; }
.auth-card > .muted { text-align: center; }
.auth-alt { text-align: center; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.form { display: grid; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.form small, .form .hint { font-size: 12px; color: var(--muted); font-weight: 400; margin: 0; }
.form .btn { margin-top: 6px; justify-self: start; }
.form .btn-block { justify-self: stretch; }
.form-2col { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: 1 / -1; }
.seg { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.seg legend { font-size: 13px; font-weight: 500; color: var(--text-2); padding: 0; margin-bottom: 6px; width: 100%; }
.seg label { flex: 1; flex-direction: row; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: #0c100a; cursor: pointer; font-size: 14px; color: var(--text); }
.seg label:has(input:checked) { border-color: var(--gold); background: rgba(240, 194, 80, .1); color: var(--gold-hi); }
.seg input { accent-color: var(--gold); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* =====================================================================
   Footer
   ===================================================================== */
.footer { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), #070906); padding: 44px 0 24px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-brand img { height: 64px; width: auto; }
.footer-brand p { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.footer h5 { font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--text-2); font-size: 14px; padding: 3px 0; }
.footer-grid a:hover { color: var(--gold-hi); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; }
.footer-bottom p { margin: 0 0 4px; }
.debug { white-space: pre-wrap; background: #000; padding: 12px; border-radius: 8px; color: #f99; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1080px) {
	.nav-toggle { display: block; }
	.nav-menu {
		position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		padding: 10px 16px 18px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px rgba(0, 0, 0, .6);
		max-height: calc(100vh - 68px); overflow-y: auto;
		display: none;
	}
	.nav.is-open .nav-menu { display: flex; }
	.nav-main, .nav-account { flex-direction: column; align-items: stretch; }
	.nav-link { width: 100%; justify-content: space-between; padding: 12px; font-size: 15px; }
	.nav-link.is-active { box-shadow: inset 3px 0 0 var(--gold); }
	.drop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; margin: 0 0 6px 12px; background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
	.has-drop.is-open .drop { display: block; }
	.nav-account { flex-direction: row; justify-content: stretch; gap: 10px; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line); }
	.nav-account > li { flex: 1; }
	.nav-account .btn, .nav-account .nav-link { width: 100%; }
	.nav-account form .btn { width: 100%; }
}
@media (max-width: 900px) {
	.grid-3, .steps { grid-template-columns: 1fr 1fr; }
	.feature-grid { grid-template-columns: 1fr 1fr; }
	.stat-grid { grid-template-columns: 1fr 1fr; }
	.refine-grid { grid-template-columns: repeat(5, 1fr); }
	.hero-stats { grid-template-columns: repeat(3, 1fr); }
	.hero-stats > div:nth-child(4) { border-left: 0; }
	.hero-stats > div:nth-child(n+4) { border-top: 1px solid var(--line); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.rules { columns: 1; }
	.item-view { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	body { font-size: 14px; }
	.wrap { padding: 0 14px; }
	.main { padding-top: 24px; }
	.hero { padding: 40px 0 36px; }
	.hero-tagline { font-size: 15px; }
	.hero-stats dd { font-size: 18px; }
	.grid-2, .grid-3, .steps, .cmd-grid, .form-2col { grid-template-columns: 1fr; }
	.feature-grid { grid-template-columns: 1fr; }
	.card-pad { padding: 18px; }
	.hide-sm { display: none; }
	.show-sm { display: block; }
	.table th, .table td { padding: 10px; }
	.page-head-left { flex-direction: column; align-items: stretch; }
	.balance { align-items: flex-start; }
	.mk-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.mk-img { height: 100px; }
	.section-head { flex-direction: column; gap: 0; }
	.toolbar input, .toolbar select { width: 100%; }
	.toolbar .btn { flex: 1; }
}
