:root {
	--bg0: #050914;
	--bg1: #061029;
	--bg2: #061a3a;
	--card: rgba(10, 18, 40, 0.72);
	--card2: rgba(10, 18, 40, 0.86);
	--stroke: rgba(120, 170, 255, 0.16);
	--stroke2: rgba(120, 170, 255, 0.22);
	--text: rgba(235, 242, 255, 0.92);
	--muted: rgba(235, 242, 255, 0.68);

	--blue: #4aa6ff;
	--blue2: #2d7dff;

	--r12: 12px;
	--r16: 16px;
	--r22: 22px;

	--shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
	--shadow2: 0 12px 40px rgba(0, 0, 0, 0.35);

	--headerH: 64px;
	--burgerSize: 48px;
	--burgerPad: 14px;
}

/* Base */
* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--headerH) + 14px);
}

body {
	margin: 0;
	font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial,
		sans-serif;
	color: var(--text);
	background: radial-gradient(
			1100px 700px at 20% 10%,
			rgba(45, 125, 255, 0.38),
			transparent 58%
		),
		radial-gradient(
			900px 650px at 80% 20%,
			rgba(74, 166, 255, 0.26),
			transparent 55%
		),
		radial-gradient(
			900px 700px at 55% 85%,
			rgba(25, 85, 255, 0.16),
			transparent 60%
		),
		linear-gradient(180deg, var(--bg0), var(--bg1) 40%, var(--bg2));
	min-height: 100vh;
	overflow-x: hidden;
}

/* Layout helpers */
.container {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
}

.page-root {
	padding: 18px 0 60px;
}

.app-shell {
	padding-top: 10px;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	backdrop-filter: blur(12px);
	background: linear-gradient(
		180deg,
		rgba(4, 8, 18, 0.82),
		rgba(4, 8, 18, 0.52)
	);
	border-bottom: 1px solid var(--stroke);
}

.header-grid {
	height: var(--headerH);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 10px;

	/* important: make room for the floating hamburger on the left */
	padding-left: calc(var(--burgerSize) + (var(--burgerPad) * 2) - 6px);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	min-width: 0;
}

.brand-title-single {
	font-family: "Sora", system-ui, -apple-system, Segoe UI, Roboto, Arial,
		sans-serif;
	font-weight: 700;
	letter-spacing: 0.2px;
	font-size: 18px;
	color: rgba(235, 242, 255, 0.92);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.2s ease, text-shadow 0.2s ease;
}

.brand:hover .brand-title-single {
	color: rgba(130, 200, 255, 0.98);
	text-shadow: 0 0 12px rgba(74, 166, 255, 0.55);
}

/* Center nav */
.nav-links {
	display: flex;
	justify-content: center;
	gap: 10px;
}

.nav-link {
	text-decoration: none;
	color: var(--muted);
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid transparent;
	background: rgba(10, 18, 40, 0.24);
	transition: 0.15s ease;
	font-weight: 600;
}

.nav-link:hover {
	color: var(--text);
	border-color: var(--stroke2);
	background: rgba(10, 18, 40, 0.36);
}

.nav-link.active {
	color: rgba(235, 242, 255, 0.96);
	background: linear-gradient(
		180deg,
		rgba(74, 166, 255, 0.38),
		rgba(45, 125, 255, 0.22)
	);
	border-color: rgba(74, 166, 255, 0.35);
}

/* Actions (right) */
.header-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid var(--stroke);
	background: rgba(10, 18, 40, 0.34);
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	transition: 0.15s ease;
	white-space: nowrap;
}

.btn:hover {
	border-color: rgba(74, 166, 255, 0.35);
	background: rgba(10, 18, 40, 0.48);
}

.btn-primary {
	border-color: rgba(74, 166, 255, 0.45);
	background: linear-gradient(
		180deg,
		rgba(74, 166, 255, 0.95),
		rgba(45, 125, 255, 0.95)
	);
	color: #071026;
	box-shadow: 0 12px 34px rgba(45, 125, 255, 0.25);
}

.btn-primary:hover {
	filter: brightness(1.03);
}

.btn-ghost {
	background: rgba(10, 18, 40, 0.22);
}

/* Floating hamburger */
.burger-fab {
	position: fixed;
	top: var(--burgerPad);
	left: var(--burgerPad);
	z-index: 80;
	width: var(--burgerSize);
	height: var(--burgerSize);
	border-radius: 14px;
	border: 1px solid rgba(120, 170, 255, 0.22);
	background: rgba(7, 12, 24, 0.62);
	backdrop-filter: blur(10px);
	box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	display: grid;
	place-items: center;
}

.burger-fab:hover {
	border-color: rgba(74, 166, 255, 0.35);
}

.burger-lines,
.burger-lines::before,
.burger-lines::after {
	content: "";
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: rgba(235, 242, 255, 0.9);
	position: relative;
	transition: transform 0.18s ease, top 0.18s ease, opacity 0.18s ease;
}

.burger-lines::before {
	position: absolute;
	top: -6px;
	left: 0;
}

.burger-lines::after {
	position: absolute;
	top: 6px;
	left: 0;
}

/* Drawer */
.drawer-overlay {
	position: fixed;
	inset: 0;
	z-index: 75;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(2px);
}

.drawer {
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	width: min(340px, 86vw);
	z-index: 76;
	background: linear-gradient(
		180deg,
		rgba(6, 16, 40, 0.96),
		rgba(6, 20, 55, 0.96)
	);
	border-right: 1px solid rgba(120, 170, 255, 0.2);
	box-shadow: var(--shadow);
	padding: 14px;
	display: flex;
	flex-direction: column;
	transform: translateX(-106%);
	transition: transform 0.2s ease;
}

.drawer.open {
	transform: translateX(0);
}

.drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 6px 10px;
}

.drawer-title {
	font-family: "Sora", system-ui, -apple-system, Segoe UI, Roboto, Arial,
		sans-serif;
	font-weight: 800;
	letter-spacing: 0.4px;
	color: rgba(235, 242, 255, 0.9);
	text-transform: uppercase;
	font-size: 13px;
}

.drawer-body {
	flex: 1;
	overflow: auto;
	padding: 8px 6px;
}

.drawer-section {
	margin-top: 6px;
}

.drawer-label {
	color: rgba(235, 242, 255, 0.6);
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.drawer-links {
	display: grid;
	gap: 10px;
}

.drawer-link {
	text-decoration: none;
	color: rgba(235, 242, 255, 0.86);
	border: 1px solid rgba(120, 170, 255, 0.18);
	background: rgba(10, 18, 40, 0.42);
	border-radius: 14px;
	padding: 12px 12px;
	font-weight: 800;
	transition: 0.15s ease;
	cursor: pointer;
}

.drawer-link:hover {
	border-color: rgba(74, 166, 255, 0.32);
	background: rgba(10, 18, 40, 0.58);
}

.drawer-footer {
	padding: 10px 6px 6px;
	border-top: 1px solid rgba(120, 170, 255, 0.16);
}

.w-full {
	width: 100%;
}

/* Close icon button */
.icon-btn {
	border: 1px solid rgba(120, 170, 255, 0.18);
	background: rgba(10, 18, 40, 0.32);
	color: var(--text);
	border-radius: 12px;
	width: 40px;
	height: 40px;
	cursor: pointer;
	display: grid;
	place-items: center;
}

.icon-btn:hover {
	border-color: rgba(74, 166, 255, 0.32);
}

.icon-x {
	position: relative;
	width: 16px;
	height: 16px;
}

.icon-x::before,
.icon-x::after {
	content: "";
	position: absolute;
	top: 7px;
	left: 0;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: rgba(235, 242, 255, 0.9);
}

.icon-x::before {
	transform: rotate(45deg);
}

.icon-x::after {
	transform: rotate(-45deg);
}

/* Card surfaces + prose */
.surface {
	border-radius: var(--r22);
	border: 1px solid var(--stroke);
	background: var(--card);
	box-shadow: var(--shadow2);
}

.page-shell {
	display: grid;
	gap: 16px;
}

.page-hero {
	border-radius: var(--r22);
	border: 1px solid var(--stroke);
	background: radial-gradient(
			900px 420px at 20% 10%,
			rgba(74, 166, 255, 0.18),
			transparent 55%
		),
		rgba(10, 18, 40, 0.44);
	box-shadow: var(--shadow2);
	padding: 22px;
}

.eyebrow {
	color: rgba(235, 242, 255, 0.62);
	font-weight: 900;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	font-size: 12px;
	margin-bottom: 8px;
}

.page-hero h1 {
	font-family: "Sora", system-ui, -apple-system, Segoe UI, Roboto, Arial,
		sans-serif;
	margin: 0;
	font-size: clamp(26px, 3vw, 44px);
	letter-spacing: -0.3px;
}

.lead {
	margin: 10px 0 0;
	color: rgba(235, 242, 255, 0.68);
	font-size: 16px;
}

.hero-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 14px;
}

/* Prose */
.prose {
	padding: 18px 18px 22px;
}

.prose h1,
.prose h2,
.prose h3 {
	font-family: "Sora", system-ui, -apple-system, Segoe UI, Roboto, Arial,
		sans-serif;
}

.prose a {
	color: rgba(130, 200, 255, 0.95);
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid rgba(120, 170, 255, 0.18);
	border-radius: 12px;
	overflow: hidden;
}

.prose th,
.prose td {
	border-bottom: 1px solid rgba(120, 170, 255, 0.12);
	padding: 10px 10px;
	color: rgba(235, 242, 255, 0.86);
}

.prose th {
	background: rgba(10, 18, 40, 0.55);
	font-weight: 900;
}

/* table wrap from markdown.js */
.table-wrap {
	overflow-x: auto;
	border-radius: 12px;
}

/* Guide sections */
.guide-section {
	padding: 14px 18px 18px;
	border-top: 1px solid rgba(120, 170, 255, 0.10);
}

.guide-section:first-child {
	border-top: 0;
}

/* Troubleshooting UI (fixes "white boxes") */
.toolbar {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	padding: 14px;
	border-bottom: 1px solid rgba(120, 170, 255, 0.12);
	flex-wrap: wrap;
}

.search {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid rgba(120, 170, 255, 0.16);
	background: rgba(10, 18, 40, 0.32);
	border-radius: 14px;
	padding: 10px 12px;
	min-width: min(420px, 100%);
}

.search-icon {
	opacity: 0.75;
}

.search input {
	border: 0;
	outline: 0;
	background: transparent;
	color: rgba(235, 242, 255, 0.92);
	font-weight: 700;
	width: 100%;
	font-family: inherit;
}

.filter-chips {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.chip {
	border: 1px solid rgba(120, 170, 255, 0.16);
	background: rgba(10, 18, 40, 0.26);
	color: rgba(235, 242, 255, 0.86);
	border-radius: 999px;
	padding: 9px 12px;
	font-weight: 900;
	cursor: pointer;
	transition: 0.15s ease;
}

.chip:hover {
	border-color: rgba(74, 166, 255, 0.32);
	background: rgba(10, 18, 40, 0.40);
}

.chip.active {
	border-color: rgba(74, 166, 255, 0.42);
	background: linear-gradient(180deg, rgba(74, 166, 255, 0.32), rgba(45, 125, 255, 0.16));
}

.accordion-list {
	padding: 14px;
	display: grid;
	gap: 10px;
}

.acc-item {
	border: 1px solid rgba(120, 170, 255, 0.14);
	background: rgba(10, 18, 40, 0.26);
	border-radius: 16px;
	overflow: hidden;
}

.acc-head {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 14px;
	border: 0;
	background: transparent;
	color: rgba(235, 242, 255, 0.92);
	cursor: pointer;
	text-align: left;
}

.acc-title {
	font-weight: 900;
}

.acc-meta {
	margin-top: 6px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid rgba(120, 170, 255, 0.16);
	background: rgba(10, 18, 40, 0.28);
	color: rgba(235, 242, 255, 0.78);
	font-weight: 900;
	font-size: 12px;
}

.muted {
	color: rgba(235, 242, 255, 0.62);
	font-weight: 800;
	font-size: 12px;
}

.chevron {
	opacity: 0.75;
	transition: transform 0.18s ease;
}

.acc-head[aria-expanded="true"] .chevron {
	transform: rotate(180deg);
}

.acc-body {
	padding: 0 14px 14px;
}

/* Empty */
.empty {
	padding: 18px;
	text-align: center;
	color: rgba(235, 242, 255, 0.70);
	font-weight: 800;
}

/* Loading */
.loading {
	display: grid;
	place-items: center;
	padding: 18px;
}

.spinner {
	width: 22px;
	height: 22px;
	border-radius: 999px;
	border: 2px solid rgba(235, 242, 255, 0.25);
	border-top-color: rgba(74, 166, 255, 0.9);
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Back to top */
.back-to-top {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 60;
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid rgba(120, 170, 255, 0.18);
	background: rgba(7, 12, 24, 0.62);
	color: rgba(235, 242, 255, 0.92);
	cursor: pointer;
	backdrop-filter: blur(10px);
	box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	transition: 0.18s ease;
}

.back-to-top.visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

/* Mobile rules */
@media (max-width: 860px) {
	.header-grid {
		grid-template-columns: 1fr auto;
		gap: 10px;
	}

	.nav-links {
		display: none;
	}

	.header-actions .btn {
		padding: 9px 12px;
		font-weight: 800;
	}

	.brand-title-single {
		font-size: 16px;
	}
}

@media (max-width: 520px) {
	.container {
		width: min(1120px, calc(100% - 24px));
	}

	.header-actions .btn {
		padding: 8px 10px;
		font-size: 14px;
	}

	.page-hero {
		padding: 18px;
	}

	.prose {
		padding: 14px 14px 18px;
	}

	.search {
		min-width: 100%;
	}
}

/* Noscript banner */
.noscript-banner {
	padding: 18px;
}

.noscript-content {
	border: 1px solid rgba(120, 170, 255, 0.16);
	background: rgba(10, 18, 40, 0.52);
	border-radius: 14px;
	padding: 14px;
}
