:root {
	--bg: #202124;
	--surface: #292a2d;
	--surface-2: #303134;
	--border: #3c4043;
	--text: #e8eaed;
	--text-body: #bdc1c6;
	--text-secondary: #9aa0a6;
	--accent: #8ab4f8;
	--accent-on: #062e6f;
	--accent-soft: rgba(138, 180, 248, 0.14);
	--radius: 12px;
	--sidebar-w: 280px;
	--header-h: 64px;
	--max-content: 720px;
	--font-display: 'Google Sans Text', 'Roboto', Arial, sans-serif;
	--font-body: 'Roboto', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--text-body);
	background: var(--bg);
	line-height: 1.65;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--accent);
	color: var(--accent-on);
	padding: 10px 16px;
	border-radius: 0 0 6px 0;
	z-index: 200;
	font-weight: 500;
}
.skip-link:focus { left: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* Top bar */
.topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	height: var(--header-h);
	background: var(--bg);
	border-bottom: 1px solid var(--border);
}
.topbar-inner {
	max-width: 1100px;
	height: 100%;
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 6px; display: block; }
.brand-name {
	font-family: var(--font-display);
	font-size: 1.1rem;
	font-weight: 500;
	color: var(--text);
}
.brand-sep { color: var(--border); font-weight: 300; }
.brand-sub {
	font-family: var(--font-display);
	font-size: 1.1rem;
	color: var(--text-secondary);
	font-weight: 400;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	margin-right: 4px;
}
.nav-toggle:hover { background: var(--surface); }
.nav-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--text);
	margin: 0 auto;
}

/* Shell: sidebar + content */
.shell {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: flex-start;
}

.sidebar-scrim { display: none; }

.sidebar {
	width: var(--sidebar-w);
	flex-shrink: 0;
	position: sticky;
	top: var(--header-h);
	max-height: calc(100vh - var(--header-h));
	overflow-y: auto;
	padding: 24px 16px 24px 16px;
}
.sidebar-group { margin-bottom: 4px; }
.sidebar-title {
	display: block;
	padding: 10px 16px;
	border-radius: 20px;
	font-family: var(--font-display);
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--text);
}
.sidebar-title:hover { background: var(--surface); text-decoration: none; }
.sidebar-title.is-active-doc { color: var(--accent); background: var(--accent-soft); }
.sidebar-title.is-active-doc:hover { background: var(--accent-soft); }

.sidebar-list {
	list-style: none;
	margin: 4px 0 16px 20px;
	padding: 0;
	border-left: 2px solid var(--border);
}
.sidebar-list li a {
	display: block;
	padding: 8px 16px;
	font-size: 0.85rem;
	color: var(--text-secondary);
	margin-left: -2px;
	border-left: 2px solid transparent;
}
.sidebar-list li a:hover { color: var(--text); text-decoration: none; }
.sidebar-list li a.is-active {
	color: var(--accent);
	border-left: 2px solid var(--accent);
	font-weight: 500;
}

/* Main content */
.content {
	flex: 1;
	min-width: 0;
	padding: 40px 24px 96px;
	max-width: var(--max-content);
}

h1 {
	font-family: var(--font-display);
	font-size: 2.3rem;
	font-weight: 400;
	color: var(--text);
	margin: 0 0 12px;
	letter-spacing: -0.2px;
}
h2 {
	font-family: var(--font-display);
	font-size: 1.4rem;
	font-weight: 500;
	color: var(--text);
	margin: 2.4em 0 0.7em;
	padding-top: 0.5em;
	border-top: 1px solid var(--border);
	scroll-margin-top: calc(var(--header-h) + 16px);
}
section:first-of-type h2:first-child {
	border-top: none;
	padding-top: 0;
}
h3 {
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 500;
	margin: 1.7em 0 0.5em;
	color: var(--text);
}
p { margin: 0 0 1.1em; }
strong { color: var(--text); font-weight: 500; }

ul, ol {
	margin: 0 0 1.3em;
	padding-left: 1.4em;
}
li { margin-bottom: 0.65em; }
li > ul { margin-top: 0.65em; margin-bottom: 0; }

address { font-style: normal; margin: 0 0 1.3em; }

.meta { color: var(--text-secondary); font-size: 0.9rem; }
.intro-lede { font-size: 1.05rem; }

/* Doc switcher pills */
.doc-tabs {
	display: inline-flex;
	background: var(--surface);
	border-radius: 999px;
	padding: 4px;
	margin: 4px 0 32px;
	gap: 2px;
}
.doc-tabs a {
	padding: 8px 20px;
	border-radius: 999px;
	font-family: var(--font-display);
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-secondary);
}
.doc-tabs a:hover { color: var(--text); text-decoration: none; }
.doc-tabs a.is-active {
	background: var(--accent);
	color: var(--accent-on);
}
.doc-tabs a.is-active:hover { color: var(--accent-on); }

.notice {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 18px 22px;
	margin: 1.5em 0;
}
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--text); }

/* Homepage document cards */
.doc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 2em 0;
}
.doc-card {
	display: block;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px;
	color: var(--text);
	transition: background 0.15s ease, border-color 0.15s ease;
}
.doc-card:hover {
	background: var(--surface-2);
	border-color: var(--accent);
	text-decoration: none;
}
.doc-card h2 {
	margin: 0 0 6px;
	border: none;
	padding: 0;
	font-size: 1.15rem;
	color: var(--accent);
}
.doc-card p { margin: 0; font-size: 0.95rem; color: var(--text-secondary); }

/* Footer */
.site-footer {
	border-top: 1px solid var(--border);
}
.site-footer-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 32px 24px 40px;
	text-align: center;
}
.site-footer p {
	color: var(--text-secondary);
	font-size: 0.9rem;
	margin: 0 0 8px;
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--accent); }
.footer-nav {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 18px;
}
.footer-nav a { font-size: 0.9rem; }
.copyright { color: #6b6f76; font-size: 0.8rem; margin-top: 12px; }

/* Mobile */
@media (max-width: 860px) {
	.nav-toggle { display: flex; }

	.sidebar {
		position: fixed;
		top: var(--header-h);
		left: 0;
		bottom: 0;
		width: 280px;
		max-height: none;
		background: var(--surface-2);
		border-right: 1px solid var(--border);
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		z-index: 60;
	}
	.sidebar.is-open { transform: translateX(0); }

	.sidebar-scrim {
		display: none;
		position: fixed;
		inset: var(--header-h) 0 0 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 50;
	}
	.sidebar-scrim.is-open { display: block; }

	.content { padding: 32px 20px 72px; max-width: 100%; }
	.doc-grid { grid-template-columns: 1fr; }
	h1 { font-size: 1.8rem; }
	.brand-sub { display: none; }
	.brand-sep { display: none; }
}
