/* Universe RP site: one stylesheet for every page.
   Dark space theme taken from the mod's art: deep black and navy, galaxy blue and pale cyan glows.
   Fonts are self-hosted (SIL OFL, licences in assets/fonts/). */

@font-face {
	font-family: "Orbitron";
	src: url("../fonts/orbitron.woff2") format("woff2-variations"), url("../fonts/orbitron.woff2") format("woff2");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Exo 2";
	src: url("../fonts/exo2.woff2") format("woff2-variations"), url("../fonts/exo2.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Exo 2";
	src: url("../fonts/exo2-italic.woff2") format("woff2-variations"), url("../fonts/exo2-italic.woff2") format("woff2");
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}

:root {
	--space: #04060c;
	--navy: #0a1224;
	--navy-2: #101b33;
	--blue: #6fa8ff;
	--cyan: #bfe3ff;
	--text: #e9eef8;
	--muted: #9aa8c0;
	--line: rgba(150, 190, 255, 0.18);
	--line-strong: rgba(150, 200, 255, 0.45);
	--glass: rgba(10, 18, 36, 0.55);
	--glass-strong: rgba(6, 11, 24, 0.82);
	--glow: 0 0 18px rgba(111, 168, 255, 0.45);
	--radius: 14px;
	--gutter: clamp(16px, 4vw, 40px);
	--max: 1180px;
	--font-display: "Orbitron", "Exo 2", system-ui, sans-serif;
	--font-body: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: ui-monospace, "Cascadia Code", Consolas, "Liberation Mono", monospace;
	color-scheme: dark;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 80px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(1200px 700px at 78% -10%, rgba(64, 88, 170, 0.20), transparent 60%),
		radial-gradient(900px 600px at 8% 35%, rgba(80, 60, 150, 0.12), transparent 60%),
		radial-gradient(1000px 800px at 60% 110%, rgba(30, 80, 140, 0.16), transparent 60%),
		var(--space);
	background-attachment: fixed;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.65;
	overflow-x: hidden;
}

/* The star field canvas (assets/js/starfield.js) sits behind everything. */
#starfield {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;
}

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

a { color: var(--cyan); text-decoration-color: rgba(191, 227, 255, 0.35); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: currentColor; }

:focus-visible {
	outline: 2px solid var(--cyan);
	outline-offset: 3px;
	border-radius: 4px;
}

.skip-link {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 100;
	padding: 8px 14px;
	background: var(--navy-2);
	border: 1px solid var(--line-strong);
	border-radius: 8px;
	color: #fff;
}
.skip-link:focus { top: 12px; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	color: #fff;
	margin: 0 0 0.6em;
}
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); text-transform: uppercase; letter-spacing: 0.08em; }
h3 { font-size: 1.15rem; letter-spacing: 0.05em; }
p { margin: 0 0 1em; }

code, kbd {
	font-family: var(--font-mono);
	font-size: 0.9em;
	background: rgba(150, 190, 255, 0.10);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 0.05em 0.4em;
	color: var(--cyan);
}

.wrap {
	width: 100%;
	max-width: calc(var(--max) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.eyebrow {
	font-family: var(--font-display);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--blue);
	margin: 0 0 0.9em;
}

.lede { font-size: 1.15rem; color: #cfd8e8; font-weight: 300; max-width: 60ch; }

/* ---------- Header ---------- */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
	border-bottom: 1px solid transparent;
}
.site-header.scrolled,
.site-header.menu-open {
	background: var(--glass-strong);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
	border-bottom-color: var(--line);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 68px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: 0.18em;
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
	text-shadow: 0 0 10px rgba(191, 227, 255, 0.45);
}
.brand img { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 12px rgba(111, 168, 255, 0.55); }
.brand:hover { color: #fff; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
	position: relative;
	font-family: var(--font-display);
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #c9d4e6;
	text-decoration: none;
	padding: 10px 12px;
	border-radius: 8px;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; text-shadow: 0 0 10px rgba(191, 227, 255, 0.6); }
.nav a[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 4px;
	height: 1px;
	background: var(--cyan);
	box-shadow: var(--glow);
}
/* a narrow desktop or tablet, just above the menu button's width: the seven links a little closer together */
@media (min-width: 861px) and (max-width: 1000px) {
	.nav a { padding-left: 8px; padding-right: 8px; letter-spacing: 0.14em; }
	.nav a[aria-current="page"]::after { left: 8px; right: 8px; }
}
.nav .nav-icon { display: inline-flex; padding: 8px; }
.nav .nav-icon svg { width: 20px; height: 20px; fill: currentColor; }
.nav .nav-icon .label { display: none; }
.nav .ext::after { content: " ↗"; font-family: var(--font-body); letter-spacing: 0; }

.menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 10px;
	color: #fff;
	cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; stroke: currentColor; }

@media (max-width: 860px) {
	.menu-toggle { display: inline-flex; }
	.nav {
		display: none;
		position: absolute;
		top: 68px;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px var(--gutter) 18px;
		background: var(--glass-strong);
		-webkit-backdrop-filter: blur(14px);
		backdrop-filter: blur(14px);
		border-bottom: 1px solid var(--line);
	}
	.site-header.menu-open .nav { display: flex; }
	.nav a { padding: 14px 4px; font-size: 0.85rem; border-bottom: 1px solid rgba(150, 190, 255, 0.08); }
	.nav a[aria-current="page"]::after { display: none; }
	.nav .nav-icon { padding: 14px 4px; gap: 10px; }
	.nav .nav-icon .label { display: inline; }
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 12px 26px;
	border-radius: 999px;
	font-family: var(--font-display);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
	border: 1px solid transparent;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn-primary {
	color: #051022;
	background: linear-gradient(180deg, #d8eeff 0%, #8fbfff 100%);
	box-shadow: 0 0 0 1px rgba(191, 227, 255, 0.6), 0 0 24px rgba(111, 168, 255, 0.55), 0 0 60px rgba(111, 168, 255, 0.25);
}
.btn-primary:hover {
	color: #051022;
	transform: translateY(-1px);
	box-shadow: 0 0 0 1px rgba(220, 240, 255, 0.9), 0 0 30px rgba(140, 190, 255, 0.75), 0 0 80px rgba(111, 168, 255, 0.35);
}
.btn-ghost {
	color: #fff;
	background: rgba(10, 18, 36, 0.35);
	border-color: var(--line-strong);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.btn-ghost:hover { color: #fff; border-color: var(--cyan); box-shadow: var(--glow); }

/* ---------- Hero ---------- */

.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 110px 0 90px;
	overflow: hidden;
	isolation: isolate;
}
/* The galaxy sits in the flow between the title and the subtitle, as in the in-game art: the title
   overlaps its upper edge and the rule sits under its disc, at any screen size (the overlaps are
   fractions of the galaxy's own width). Its black background is screened away so it melts into the
   live star field, and the mask softens the picture's edges so there is no frame. */
.hero {
	--galaxy-w: min(1700px, 130vw);
}
.hero-galaxy {
	position: relative;
	width: var(--galaxy-w);
	flex: none;
	aspect-ratio: 2000 / 669;
	margin: calc(var(--galaxy-w) * -0.075) 0 calc(var(--galaxy-w) * -0.085);
	z-index: -1;
	mix-blend-mode: screen;
	-webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
	mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
	pointer-events: none;
	animation: galaxy-in 2.2s ease-out both;
}
@media (max-width: 700px) {
	.hero { --galaxy-w: 210vw; }
}
.hero-galaxy img { width: 100%; }
@keyframes galaxy-in {
	from { opacity: 0; transform: scale(1.04); }
	to { opacity: 1; transform: none; }
}

.hero-title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(1.6rem, 8.4vw, 7.4rem);
	white-space: nowrap;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	text-shadow:
		0 0 4px rgba(255, 255, 255, 0.9),
		0 0 14px rgba(220, 238, 255, 0.75),
		0 0 34px rgba(150, 195, 255, 0.55),
		0 0 70px rgba(111, 168, 255, 0.35);
	animation: title-in 1.6s 0.2s ease-out both;
}
.hero-rule {
	width: min(380px, 60vw);
	height: 2px;
	margin: 0 auto 18px;
	background: linear-gradient(90deg, transparent, rgba(235, 245, 255, 0.95) 12%, rgba(235, 245, 255, 0.95) 88%, transparent);
	box-shadow: 0 0 10px rgba(191, 227, 255, 0.8);
	animation: title-in 1.6s 0.5s ease-out both;
}
.hero-sub {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(0.85rem, 0.6rem + 1.1vw, 1.45rem);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 0 8px rgba(220, 238, 255, 0.8), 0 0 22px rgba(111, 168, 255, 0.5);
	animation: title-in 1.6s 0.6s ease-out both;
}
@keyframes title-in {
	from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
	to { opacity: 1; transform: none; filter: none; }
}
.hero-text {
	max-width: 640px;
	margin: 28px auto 0;
	padding: 0 var(--gutter);
	color: #d3dcec;
	font-weight: 300;
	font-size: clamp(1rem, 0.9rem + 0.4vw, 1.18rem);
	animation: title-in 1.6s 0.8s ease-out both;
}
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 30px;
	padding: 0 var(--gutter);
	animation: title-in 1.6s 1s ease-out both;
}
.release-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 22px;
	font-size: 0.88rem;
	color: var(--muted);
	min-height: 1.6em;
	animation: title-in 1.6s 1.1s ease-out both;
}
.release-badge .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #7dffb0;
	box-shadow: 0 0 10px #7dffb0;
}
.release-badge a { color: var(--cyan); }
.scroll-cue {
	position: absolute;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%);
	width: 26px;
	height: 42px;
	border: 1.5px solid var(--line-strong);
	border-radius: 14px;
	opacity: 0.8;
}
.scroll-cue::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 8px;
	width: 3px;
	height: 8px;
	margin-left: -1.5px;
	border-radius: 2px;
	background: var(--cyan);
	animation: cue 2s ease-in-out infinite;
}
@keyframes cue {
	0% { opacity: 0; transform: translateY(0); }
	30% { opacity: 1; }
	80%, 100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(70px, 9vw, 130px) 0; position: relative; }
.section.tight { padding-top: 0; }
.section-head { max-width: 760px; margin-bottom: clamp(30px, 4vw, 54px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

.split {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: clamp(28px, 5vw, 70px);
	align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.card {
	background: var(--glass);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(22px, 2.6vw, 32px);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: inset 0 1px 0 rgba(191, 227, 255, 0.06);
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: inset 0 1px 0 rgba(191, 227, 255, 0.1), 0 0 30px rgba(111, 168, 255, 0.12); }

.stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
.stat { text-align: left; }
.stat .num {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
	color: #fff;
	text-shadow: 0 0 16px rgba(111, 168, 255, 0.6);
	line-height: 1.1;
}
.stat .label { color: var(--muted); font-size: 0.92rem; }

.callout {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 22px;
	align-items: center;
}
.callout .icon {
	width: 54px;
	height: 54px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--line-strong);
	box-shadow: var(--glow);
}
.callout .icon svg { width: 26px; height: 26px; stroke: var(--cyan); fill: none; stroke-width: 1.6; }
.callout p { margin: 0; color: #cfd8e8; }
.callout h3 { margin-bottom: 0.3em; }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; text-align: left; } }

/* ---------- Footer ---------- */

.site-footer {
	margin-top: 40px;
	padding: 50px 0 34px;
	border-top: 1px solid var(--line);
	background: linear-gradient(180deg, rgba(4, 6, 12, 0.2), rgba(4, 6, 12, 0.85));
	color: var(--muted);
	font-size: 0.92rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 30px;
}
.footer-grid h4 {
	font-size: 0.74rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: #c9d4e6;
	margin-bottom: 1em;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0 0 0.45em; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: #fff; }
.footer-brand { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.18em; color: #fff; margin-bottom: 0.6em; }
.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px 24px;
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid rgba(150, 190, 255, 0.08);
	font-size: 0.84rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Inner pages: page heading ---------- */

.page-head {
	padding: clamp(120px, 14vw, 170px) 0 clamp(30px, 4vw, 50px);
	text-align: center;
}
.page-head h1 {
	font-size: clamp(2rem, 1.2rem + 3.6vw, 3.8rem);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-shadow: 0 0 6px rgba(255, 255, 255, 0.6), 0 0 30px rgba(111, 168, 255, 0.45);
}
.page-head .lede { margin-left: auto; margin-right: auto; }

/* ---------- Download picker ---------- */

.picker {
	background: var(--glass);
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 6px);
	padding: clamp(20px, 3vw, 36px);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 0 60px rgba(111, 168, 255, 0.08), inset 0 1px 0 rgba(191, 227, 255, 0.06);
}
.picker-form {
	display: grid;
	grid-template-columns: 1.15fr 1fr 1fr;
	gap: 22px;
	margin-bottom: 26px;
}
@media (max-width: 980px) { .picker-form { grid-template-columns: 1fr; gap: 18px; } }

.seg-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg-group legend {
	padding: 0;
	margin-bottom: 10px;
	font-family: var(--font-display);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--blue);
}
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}
.seg label {
	flex: 1 1 0;
	min-width: 92px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-height: 52px;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: rgba(4, 6, 12, 0.45);
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	text-align: center;
}
.seg label:hover { border-color: var(--line-strong); }
.seg-title { font-weight: 600; color: #fff; }
.seg-note { font-size: 0.8rem; color: var(--muted); line-height: 1.3; }
.seg input:checked + label {
	border-color: var(--cyan);
	background: rgba(111, 168, 255, 0.16);
	box-shadow: 0 0 0 1px rgba(191, 227, 255, 0.35), 0 0 22px rgba(111, 168, 255, 0.3);
}
.seg input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 3px; }

.dl-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
@media (max-width: 760px) { .dl-cards { grid-template-columns: 1fr; } }
.dl-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: rgba(4, 6, 12, 0.5);
}
.dl-card h3 { margin: 0; }
.dl-step {
	margin: 0;
	font-family: var(--font-display);
	font-size: 0.7rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--blue);
}
.dl-btn { margin-top: 4px; }
.dl-meta { margin: 0; font-size: 0.86rem; color: var(--muted); word-break: break-all; }
.dl-meta code { word-break: break-all; }
.dl-note { margin: 0; font-size: 0.92rem; color: #c3cde0; }
.dl-next {
	margin-top: 22px;
	padding: 20px 22px;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
}
.dl-next h3 { margin-bottom: 0.4em; }
.dl-steps { margin: 0 0 0.8em; padding-left: 1.3em; }
.dl-steps li { margin-bottom: 0.4em; }
.dl-next p { margin: 0; }
.dl-release { margin: 18px 0 0; font-size: 0.88rem; color: var(--muted); text-align: center; }

/* ---------- Tables ---------- */

.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--glass);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(150, 190, 255, 0.1); }
thead th {
	font-family: var(--font-display);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--blue);
	background: rgba(4, 6, 12, 0.35);
}
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; color: #fff; white-space: nowrap; }
td .size { display: block; font-size: 0.8rem; color: var(--muted); }
td a { word-break: break-all; }
.muted { color: var(--muted); }

.stack > * + * { margin-top: clamp(40px, 5vw, 64px); }
.prose { max-width: 820px; }
.prose h2 { margin-top: 0; }

/* ---------- Content pages: guides and features ---------- */

.toc {
	position: sticky;
	top: 68px;
	z-index: 20;
	margin: 0 0 10px;
	padding: 12px 0;
	background: linear-gradient(180deg, rgba(4, 6, 12, 0.92), rgba(4, 6, 12, 0.75));
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.toc ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
}
.toc ul::-webkit-scrollbar { display: none; }
.toc a {
	display: inline-block;
	white-space: nowrap;
	padding: 7px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 0.86rem;
	color: #cfd8e8;
	text-decoration: none;
	background: rgba(10, 18, 36, 0.5);
}
.toc a:hover, .toc a.active { color: #fff; border-color: var(--cyan); box-shadow: 0 0 14px rgba(111, 168, 255, 0.25); }

.group { scroll-margin-top: 140px; }
.group-head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 10px;
}
.group-head h2 { margin: 0; }
.ico {
	flex: none;
	width: 52px;
	height: 52px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	border: 1px solid var(--line-strong);
	background: rgba(111, 168, 255, 0.08);
	box-shadow: 0 0 20px rgba(111, 168, 255, 0.18);
}
.ico svg { width: 26px; height: 26px; fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.group > .lede { margin-bottom: 1.6em; }

.grid-2, .grid-3 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card h3 { margin-bottom: 0.5em; }
.card p:last-child, .card ul:last-child, .card ol:last-child { margin-bottom: 0; }
.card ul, .card ol, .prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.card li, .prose li { margin-bottom: 0.35em; }
.card .table-wrap { margin-top: 0.6em; background: rgba(4, 6, 12, 0.35); }
.span-2 { grid-column: span 2; }
@media (max-width: 700px) { .span-2 { grid-column: auto; } }

.feature-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-decoration: none;
	color: var(--text);
}
.feature-card:hover { color: var(--text); transform: translateY(-2px); }
.feature-card h3 { margin: 0; }
.feature-card p { margin: 0; color: #c3cde0; font-size: 0.96rem; }
.feature-card .more {
	margin-top: auto;
	font-family: var(--font-display);
	font-size: 0.7rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--blue);
}

.note {
	padding: 14px 18px;
	border-left: 3px solid var(--blue);
	border-radius: 0 10px 10px 0;
	background: rgba(111, 168, 255, 0.08);
	color: #d3dcec;
	margin: 0 0 1em;
}
.note.warn { border-left-color: #ffb46b; background: rgba(255, 180, 107, 0.08); }
.note strong { color: #fff; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps > li {
	counter-increment: step;
	position: relative;
	padding: 22px 24px 22px 76px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--glass);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}
.steps > li::before {
	content: counter(step);
	position: absolute;
	left: 22px;
	top: 20px;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--line-strong);
	font-family: var(--font-display);
	font-weight: 700;
	color: #fff;
	box-shadow: var(--glow);
}
.steps h3 { margin-bottom: 0.4em; }
.steps p:last-child, .steps ul:last-child { margin-bottom: 0; }
.steps ul { padding-left: 1.2em; }
@media (max-width: 560px) {
	.steps > li { padding: 70px 18px 18px; }
	.steps > li::before { top: 18px; left: 18px; }
}

pre {
	margin: 0 0 1em;
	padding: 14px 16px;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: rgba(2, 4, 10, 0.75);
	font-family: var(--font-mono);
	font-size: 0.88rem;
	line-height: 1.55;
	color: #d7e6ff;
}
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

.tag {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 8px;
	border-radius: 999px;
	border: 1px solid var(--line);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	color: var(--muted);
	vertical-align: middle;
}
td code, th code { white-space: nowrap; }

/* ---------- 404 ---------- */

.lost {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 120px var(--gutter) 60px;
}
.lost .code {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(4rem, 2rem + 12vw, 10rem);
	line-height: 1;
	color: #fff;
	text-shadow: 0 0 14px rgba(220, 238, 255, 0.7), 0 0 50px rgba(111, 168, 255, 0.5);
	margin: 0 0 0.2em;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Grid and list items may hold wide tables and code blocks: let them shrink, the inner box scrolls. */
.grid-2 > *, .grid-3 > *, .steps > li, .split > *, .dl-cards > * { min-width: 0; }

.section.group { padding: clamp(44px, 5.5vw, 76px) 0; }
.highlights { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .highlights { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .highlights { grid-template-columns: 1fr; } }
.highlights > * { min-width: 0; }
@media (max-width: 700px) {
	tbody th { white-space: normal; }
	th, td { padding: 10px 12px; }
	td code, th code { white-space: normal; word-break: break-word; }
}

/* ---------- Cvar calculator ---------- */

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.calc { display: grid; gap: 22px; }
.calc-card { scroll-margin-top: 90px; }
.calc-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 14px 24px;
	margin-bottom: 16px;
}
.calc-title { flex: 1 1 320px; min-width: 0; }
.calc-title h2 { font-size: 1.15rem; text-transform: none; letter-spacing: 0; margin-bottom: 0.4em; }
.calc-title h2 code { font-size: 1em; background: none; border: 0; padding: 0; color: #fff; word-break: break-all; }
.calc-title p { margin: 0; color: #c3cde0; font-size: 0.95rem; }
.calc-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.calc-value {
	width: 150px;
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	background: rgba(2, 4, 10, 0.75);
	color: #fff;
	font-family: var(--font-mono);
	font-size: 1rem;
}
.calc-value:focus { outline: 2px solid var(--cyan); outline-offset: 2px; }
.calc-value[aria-invalid="true"] { border-color: #ff8a8a; box-shadow: 0 0 0 1px #ff8a8a; }
.chip-btn {
	min-height: 42px;
	padding: 8px 16px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: rgba(10, 18, 36, 0.6);
	color: #fff;
	font-family: var(--font-body);
	font-size: 0.9rem;
	cursor: pointer;
}
.chip-btn:hover { border-color: var(--cyan); box-shadow: 0 0 14px rgba(111, 168, 255, 0.25); }
.calc-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--muted); font-size: 0.9rem; }
.bit-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 8px;
}
.bit {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: rgba(4, 6, 12, 0.45);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.bit:hover { border-color: var(--line-strong); }
.bit input { width: 18px; height: 18px; accent-color: #8fbfff; flex: none; margin: 0; }
.bit-name { flex: 1; min-width: 0; font-size: 0.93rem; }
.bit-name small { color: var(--muted); }
.bit-num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.bit:has(input:checked) { border-color: var(--cyan); background: rgba(111, 168, 255, 0.14); }
.calc-line {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
	flex-wrap: wrap;
}
.calc-line code { flex: 1 1 260px; padding: 10px 12px; font-size: 0.9rem; word-break: break-all; }

/* ---------- Gallery ---------- */

.gallery-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-grid > * { min-width: 0; }
.group-head + .gallery-grid { margin-top: 24px; }
.shot {
	display: block;
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: var(--navy);
	transition: border-color 0.25s, box-shadow 0.25s;
}
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.shot:hover, .shot:focus-visible { border-color: var(--line-strong); box-shadow: var(--glow); }
.shot:hover img { transform: scale(1.035); }

/* the full-size viewer (assets/js/gallery.js) */
body.lb-open { overflow: hidden; }
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	flex-direction: column;
	background: rgba(2, 4, 9, 0.95);
}
.lightbox[hidden] { display: none; }
.lb-stage {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 64px 84px 8px;
}
.lb-stage img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: 8px;
	border: 1px solid var(--line);
	box-shadow: 0 0 40px rgba(111, 168, 255, 0.18);
}
.lb-bar {
	display: flex;
	justify-content: center;
	gap: 18px;
	padding: 12px 16px 20px;
	font-family: var(--font-display);
	font-size: 0.74rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
}
.lb-bar .lb-group { color: var(--cyan); }
.lb-btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--line-strong);
	background: var(--glass-strong);
	color: #fff;
	cursor: pointer;
	transition: box-shadow 0.2s, border-color 0.2s;
}
.lb-btn:hover { border-color: var(--cyan); box-shadow: var(--glow); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 12px; right: 14px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
@media (max-width: 700px) {
	.lb-stage { padding: 64px 8px 8px; }
	.lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; width: 44px; height: 44px; }
	.lb-bar { padding-bottom: 24px; min-height: 64px; align-items: center; }
}
