/* ============================================================
   PequeRoku landing — "phosphor terminal" design system
   Dark-first (CRT phosphor green + amber), light = paper terminal.
   No build step; everything is vanilla CSS.
   ============================================================ */

/* ========================
   Design tokens
   ======================== */
:root {
	/* Dark (default) — green-black CRT */
	--color-bg: #060a08;
	--color-surface: #0b110d;
	--color-surface-2: #0e1711;
	--color-text: #d6e6da;
	--color-text-2: #8ba593;
	--color-primary: #4ff086; /* phosphor green */
	--color-accent: #4ff086;
	--color-amber: #ffb454;
	--color-border: #1d2b22;
	--color-success: #4ff086;
	--color-warning: #ffb454;
	--color-error: #ff6b6b;

	--term-bg: #03100a;
	--term-text: #b8f0c9;

	--glow-text: 0 0 22px rgba(79, 240, 134, 0.35);
	--glow-box:
		0 0 0 1px rgba(79, 240, 134, 0.18), 0 18px 60px rgba(0, 0, 0, 0.55), 0 0
		42px rgba(79, 240, 134, 0.1);
	--shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
	--shadow-2: 0 14px 40px rgba(0, 0, 0, 0.5);

	--font-body:
		"IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu,
		Cantarell, "Noto Sans", Helvetica, Arial, sans-serif;
	--font-mono:
		"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
		"Liberation Mono", monospace;
	--font-display: "VT323", "IBM Plex Mono", monospace;

	--radius: 12px;
	--radius-sm: 8px;
	--container: 1160px;
	--scanlines: block;
}

/* Light theme — paper terminal */
html[data-theme="light"] {
	--color-bg: #f3efe4;
	--color-surface: #faf7ee;
	--color-surface-2: #ece7d6;
	--color-text: #1c2a20;
	--color-text-2: #5b6f60;
	--color-primary: #0c7c3f;
	--color-accent: #0c7c3f;
	--color-amber: #a85f00;
	--color-border: #d9d2bd;
	--color-success: #0c7c3f;
	--color-warning: #a85f00;
	--color-error: #b3261e;

	--term-bg: #11231a;
	--term-text: #b8f0c9;

	--glow-text: none;
	--glow-box: 0 10px 30px rgba(28, 42, 32, 0.12);
	--shadow-1: 0 1px 2px rgba(28, 42, 32, 0.08);
	--shadow-2: 0 12px 30px rgba(28, 42, 32, 0.14);
	--scanlines: none;
}

/* ========================
   Base
   ======================== */
* {
	box-sizing: border-box;
}
html,
body {
	height: 100%;
}
html {
	/* clip (not hidden) so position:sticky keeps working */
	overflow-x: clip;
}
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	background: var(--color-bg);
	color: var(--color-text);
	-webkit-font-smoothing: antialiased;
}
a {
	color: inherit;
	text-decoration: none;
}
::selection {
	background: var(--color-accent);
	color: var(--color-bg);
}
:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* CRT scanlines + vignette (dark theme only) */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 999;
	pointer-events: none;
	display: var(--scanlines);
	background:
		repeating-linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.14) 0 1px,
			transparent 1px 3px
		),
		radial-gradient(120% 90% at 50% 10%, transparent 60%, rgba(0, 0, 0, 0.35));
	opacity: 0.45;
}

/* ========================
   Layout helpers
   ======================== */
.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}
.stack {
	display: flex;
	flex-direction: column;
	gap: var(--gap, 16px);
	max-width: 900px;
	margin: 0 auto;
	width: 100%;
}
.text-align-center {
	text-align: center;
}
.row {
	display: flex;
	align-items: center;
	gap: var(--gap, 12px);
}
.spacer {
	height: var(--h, 24px);
}
.mid-center-text {
	font-size: 18px;
	text-align: center;
}
.big-text-no-margin {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(32px, 5vw, 48px);
	letter-spacing: 0.01em;
	margin: 0;
}
.muted {
	color: var(--color-text-2);
}
.small {
	font-size: 13px;
}
.mb-0 {
	margin-bottom: 0px;
}
.section {
	padding-top: 110px;
}
.center {
	justify-content: center;
}

/* ========================
   Header
   ======================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(160%) blur(10px);
	background: color-mix(in oklab, var(--color-bg) 78%, transparent);
	border-bottom: 1px solid var(--color-border);
}
.header-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	height: 64px;
}
.brand {
	font-family: var(--font-mono);
	font-weight: 600;
	letter-spacing: -0.02em;
	font-size: 17px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.brand .logo {
	font-size: 15px;
	font-family: var(--font-mono);
	background: color-mix(in oklab, var(--color-accent) 16%, transparent);
	border: 1px solid color-mix(in oklab, var(--color-accent) 45%, transparent);
	color: var(--color-accent);
	padding: 5px 8px;
	border-radius: 8px;
	line-height: 1.4;
}
.brand .name {
	display: inline-flex;
	align-items: baseline;
}
.brand .name strong {
	color: var(--color-accent);
}
.main-nav {
	justify-self: center;
	display: flex;
	gap: 6px;
}
.main-nav a {
	font-family: var(--font-mono);
	font-size: 14px;
	color: var(--color-text-2);
	padding: 8px 12px;
	border-radius: 8px;
	transition:
		color 0.2s ease,
		background 0.2s ease;
}
.main-nav a:hover {
	color: var(--color-accent);
	background: color-mix(in oklab, var(--color-accent) 8%, transparent);
}
.header-actions {
	justify-self: end;
}

/* ========================
   Buttons
   ======================== */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: var(--radius-sm);
	font-family: var(--font-mono);
	font-size: 14px;
	font-weight: 500;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-text);
	box-shadow: var(--shadow-1);
	cursor: pointer;
	transition:
		transform 0.06s ease,
		box-shadow 0.2s ease,
		background 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease;
}
.btn:hover {
	transform: translateY(-1px);
	border-color: color-mix(
		in oklab,
		var(--color-accent) 55%,
		var(--color-border)
	);
	box-shadow: var(--shadow-2);
}
.btn.primary,
.btn.accent {
	background: var(--color-accent);
	border-color: color-mix(in oklab, var(--color-accent), black 25%);
	color: var(--color-bg);
	font-weight: 600;
}
.btn.primary:hover,
.btn.accent:hover {
	box-shadow:
		0 0 24px color-mix(in oklab, var(--color-accent) 45%, transparent),
		var(--shadow-2);
}
.btn.ghost {
	background: transparent;
}
.btn-disabled {
	background: var(--color-text-2);
	color: var(--color-surface);
	pointer-events: none;
}

.theme-toggle,
.menu-toggle {
	border-radius: var(--radius-sm);
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-text);
	font-family: var(--font-mono);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	height: 40px;
	width: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition:
		border-color 0.2s ease,
		color 0.2s ease;
}
.theme-toggle:hover,
.menu-toggle:hover {
	border-color: var(--color-accent);
	color: var(--color-accent);
}
.menu-toggle {
	display: none;
}
#navMenuToggle > i {
	color: currentColor;
}

/* ========================
   Hero
   ======================== */
.hero {
	position: relative;
	overflow: hidden;
	padding: 92px 0 30px;
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(
			900px 480px at 18% 0%,
			color-mix(in oklab, var(--color-accent) 14%, transparent),
			transparent 70%
		),
		radial-gradient(
			700px 420px at 90% 12%,
			color-mix(in oklab, var(--color-amber) 8%, transparent),
			transparent 70%
		);
}
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: radial-gradient(
		color-mix(in oklab, var(--color-text-2) 28%, transparent) 1px,
		transparent 1px
	);
	background-size: 26px 26px;
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 75%);
	-webkit-mask-image: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.5),
		transparent 75%
	);
}
.hero-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 48px;
	align-items: center;
}
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-text-2);
	background: color-mix(in oklab, var(--color-surface), transparent 30%);
	border: 1px solid var(--color-border);
	padding: 6px 12px;
	border-radius: 999px;
}
.eyebrow .bear {
	color: var(--color-accent);
	text-transform: none;
	letter-spacing: 0;
}
.hero h1 {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(64px, 9vw, 118px);
	line-height: 0.85;
	letter-spacing: 0.01em;
	margin: 22px 0 14px;
	text-shadow: var(--glow-text);
}
.hero-tag {
	font-family: var(--font-mono);
	font-size: clamp(16px, 2.2vw, 20px);
	margin: 0 0 14px;
}
.hero-tag em {
	font-style: normal;
	color: var(--color-accent);
}
.hero-sub {
	color: var(--color-text-2);
	max-width: 560px;
	margin: 0;
}
.hero-actions {
	margin-top: 24px;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.hero-fine {
	font-family: var(--font-mono);
	font-size: 12.5px;
	color: var(--color-text-2);
	margin-top: 16px;
	letter-spacing: 0.04em;
}

/* ========================
   Terminal window
   ======================== */
.term {
	background: var(--term-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--glow-box);
}
.term-bar {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 10px 12px;
	border-bottom: 1px solid
		color-mix(in oklab, var(--color-border), transparent 30%);
	background: color-mix(in oklab, var(--term-bg), white 4%);
}
.term-bar .dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: color-mix(in oklab, var(--color-text-2) 35%, transparent);
}
.term-bar .dot:first-child {
	background: color-mix(in oklab, var(--color-error) 70%, transparent);
}
.term-bar .dot:nth-child(2) {
	background: color-mix(in oklab, var(--color-amber) 70%, transparent);
}
.term-bar .dot:nth-child(3) {
	background: color-mix(in oklab, var(--color-accent) 70%, transparent);
}
.term-title {
	margin-left: 8px;
	font-family: var(--font-mono);
	font-size: 12px;
	color: #7d9b88;
	flex: 1;
}
.term-body {
	margin: 0;
	padding: 20px 18px;
	font-family: var(--font-mono);
	font-size: 14px;
	line-height: 1.85;
	color: var(--term-text);
	white-space: pre-wrap;
	word-break: break-word;
	min-height: 132px;
}
.t-prompt {
	color: var(--color-accent);
	font-weight: 600;
}
.t-ok .t-text {
	color: var(--color-amber);
}
.t-line {
	display: inline;
}
.t-caret {
	display: inline-block;
	width: 9px;
	height: 1.05em;
	margin-left: 2px;
	vertical-align: text-bottom;
	background: var(--color-accent);
	animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
	50% {
		opacity: 0;
	}
}

/* Demo video inside a terminal frame */
.demo-sec {
	padding-top: 70px;
}
.video-term {
	max-width: 960px;
	margin: 0 auto;
}
.video-term video {
	display: block;
	width: 100%;
}
.caption {
	text-align: center;
	font-family: var(--font-mono);
	font-size: 12.5px;
	color: var(--color-text-2);
	margin-top: 14px;
	letter-spacing: 0.03em;
}

/* ========================
   Section headers
   ======================== */
.sec-head {
	margin-bottom: 34px;
}
.sec-tag {
	font-family: var(--font-mono);
	font-size: 13px;
	letter-spacing: 0.1em;
	color: var(--color-amber);
}
.sec-head h2 {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(38px, 5.5vw, 64px);
	line-height: 0.95;
	margin: 8px 0 0;
	text-shadow: var(--glow-text);
}
.sec-head h2 .accent {
	color: var(--color-accent);
}

/* ========================
   Cards
   ======================== */
.grid-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.grid-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}
.grid-2x2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}
.card {
	position: relative;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 22px;
	box-shadow: var(--shadow-1);
	display: flex;
	flex-direction: column;
	transition:
		transform 0.12s ease,
		box-shadow 0.25s ease,
		border-color 0.25s ease;
}
/* TUI corner brackets, revealed on hover */
.card::before,
.card::after {
	content: "";
	position: absolute;
	width: 14px;
	height: 14px;
	border: 2px solid var(--color-accent);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.card::before {
	top: -2px;
	left: -2px;
	border-right: 0;
	border-bottom: 0;
	border-top-left-radius: var(--radius);
}
.card::after {
	bottom: -2px;
	right: -2px;
	border-left: 0;
	border-top: 0;
	border-bottom-right-radius: var(--radius);
}
.card:hover {
	transform: translateY(-3px);
	border-color: color-mix(
		in oklab,
		var(--color-accent) 45%,
		var(--color-border)
	);
	box-shadow:
		0 0 28px color-mix(in oklab, var(--color-accent) 12%, transparent),
		var(--shadow-2);
}
.card:hover::before,
.card:hover::after {
	opacity: 1;
}
.card h3 {
	font-family: var(--font-mono);
	font-size: 16.5px;
	margin: 0 0 6px;
}
.card p {
	margin: 0;
	font-size: 14.5px;
}
.card-glyph {
	display: inline-block;
	align-self: flex-start;
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
	color: var(--color-amber);
	border-bottom: 1px dashed
		color-mix(in oklab, var(--color-amber) 50%, transparent);
	padding-bottom: 3px;
	margin-bottom: 14px;
}
.card-symbol {
	margin-bottom: 14px;
	font-size: 2em;
	color: var(--color-accent);
}

/* ========================
   Agents split
   ======================== */
.split {
	display: grid;
	grid-template-columns: 1fr 1.05fr;
	gap: 40px;
	align-items: start;
}
.split-copy p {
	margin-top: 0;
}
code.inline {
	font-family: var(--font-mono);
	font-size: 0.88em;
	color: var(--color-accent);
	background: color-mix(in oklab, var(--color-accent) 9%, transparent);
	border: 1px solid color-mix(in oklab, var(--color-accent) 22%, transparent);
	border-radius: 6px;
	padding: 1px 6px;
}
.chip-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}
.chip {
	font-family: var(--font-mono);
	font-size: 12px;
	padding: 5px 10px;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	background: var(--color-surface-2);
	color: var(--color-text-2);
	transition:
		border-color 0.2s ease,
		color 0.2s ease;
}
.chip:hover {
	border-color: var(--color-accent);
	color: var(--color-accent);
}

/* ========================
   Tabs
   ======================== */
.tabs {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--color-surface);
}
.tablist {
	display: flex;
	gap: 2px;
	background: color-mix(in oklab, var(--color-surface-2), transparent 20%);
	border-bottom: 1px solid var(--color-border);
}
.tablist button {
	flex: 1;
	padding: 11px;
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	background: transparent;
	color: var(--color-text-2);
	border: 0;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	transition:
		color 0.2s ease,
		border-color 0.2s ease;
}
.tablist button[aria-selected="true"] {
	color: var(--color-accent);
	border-bottom-color: var(--color-accent);
	background: color-mix(in oklab, var(--color-accent) 6%, transparent);
}
.tabpanel {
	padding: 14px;
	display: none;
}
.tabpanel.active {
	display: block;
}
.tabpanel .muted {
	margin: 12px 2px 2px;
}

/* ========================
   Code blocks
   ======================== */
pre.code {
	position: relative;
	margin: 0;
	padding: 16px;
	background: var(--term-bg);
	color: var(--term-text);
	font-family: var(--font-mono);
	font-size: 13px;
	line-height: 1.7;
	border-radius: var(--radius-sm);
	border: 1px solid var(--color-border);
	overflow: auto;
}
pre.code.light {
	background: var(--term-bg);
}
pre.code.slim {
	font-size: 12.5px;
	padding: 12px 14px;
}
.copy-btn {
	position: absolute;
	top: 8px;
	right: 8px;
	padding: 4px 9px;
	font-family: var(--font-mono);
	font-size: 11px;
	border-radius: 6px;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-text-2);
	cursor: pointer;
	transition:
		color 0.2s ease,
		border-color 0.2s ease;
}
.copy-btn:hover {
	color: var(--color-accent);
	border-color: var(--color-accent);
}
.term-bar .copy-btn {
	position: static;
}

/* ========================
   Self-host steps
   ======================== */
.steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.step {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.step-num {
	font-family: var(--font-display);
	font-size: 38px;
	line-height: 1;
	color: var(--color-amber);
	text-shadow: var(--glow-text);
}
.step h3 {
	font-family: var(--font-mono);
	font-size: 16px;
	margin: 0;
}
.step p {
	margin: 0;
}
.reqs {
	text-align: center;
	font-size: 14.5px;
	margin: 28px auto 6px;
	max-width: 640px;
}

/* ========================
   Comparison table
   ======================== */
.cmp-wrap {
	overflow-x: auto;
}
.cmp {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--font-mono);
	font-size: 13.5px;
}
.cmp th,
.cmp td {
	text-align: left;
	padding: 11px 16px;
	border-bottom: 1px solid var(--color-border);
	white-space: nowrap;
}
.cmp thead th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-text-2);
	border-bottom: 1px solid
		color-mix(in oklab, var(--color-text-2) 40%, var(--color-border));
}
.cmp td:first-child {
	color: var(--color-text-2);
}
.cmp .hl {
	color: var(--color-accent);
	background: color-mix(in oklab, var(--color-accent) 6%, transparent);
	border-left: 1px solid
		color-mix(in oklab, var(--color-accent) 30%, transparent);
	border-right: 1px solid
		color-mix(in oklab, var(--color-accent) 30%, transparent);
}
.cmp thead .hl {
	color: var(--color-accent);
	font-weight: 600;
}

/* ========================
   Help / support
   ======================== */
.help-grid {
	display: grid;
	grid-template-columns: 1fr 1.15fr;
	gap: 16px;
}
.help-card .hero-actions {
	margin-top: auto;
	padding-top: 18px;
}
.help-card.featured {
	border-color: color-mix(
		in oklab,
		var(--color-accent) 45%,
		var(--color-border)
	);
	background: color-mix(in oklab, var(--color-accent) 5%, var(--color-surface));
	box-shadow: 0 0 34px color-mix(in oklab, var(--color-accent) 10%, transparent);
}
.quote {
	max-width: 720px;
	margin: 48px auto 0;
	text-align: center;
	font-size: 18px;
	line-height: 1.7;
	color: var(--color-text-2);
}
.quote cite {
	display: block;
	margin-top: 14px;
	font-family: var(--font-mono);
	font-style: normal;
	font-size: 13px;
	color: var(--color-amber);
}

/* ========================
   Final CTA
   ======================== */
.cta-final {
	text-align: center;
	padding-top: 120px;
	padding-bottom: 40px;
}
.cta-cmd {
	font-family: var(--font-display);
	font-size: clamp(40px, 7vw, 72px);
	line-height: 1;
	margin: 0;
	color: var(--color-accent);
	text-shadow: var(--glow-text);
}
.cta-final h2 {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(28px, 4vw, 44px);
	margin: 14px 0 8px;
}

/* ========================
   Quote / closing (legacy)
   ======================== */
.closing {
	font-size: clamp(18px, 3vw, 26px);
	text-align: center;
	margin: 40px auto 100px;
	color: var(--color-text-2);
	max-width: 900px;
}
hr.sep {
	border: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		var(--color-border),
		transparent
	);
	margin: 60px 0;
}
.video-wrap {
	margin: 36px auto 0;
	width: min(100%, 960px);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
}

/* ========================
   Docs components (terms/privacy)
   ======================== */
.doc-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 24px;
}
.sidebar {
	position: sticky;
	top: 84px;
	align-self: start;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 12px;
}
.sidebar a {
	display: block;
	padding: 8px 10px;
	border-radius: 8px;
	font-family: var(--font-mono);
	font-size: 13.5px;
	color: var(--color-text-2);
}
.sidebar a:hover,
.sidebar a.active {
	background: color-mix(in oklab, var(--color-accent), transparent 90%);
	color: var(--color-text);
}
.callout {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--color-border);
	border-left: 6px solid var(--accent, var(--color-accent));
	background: color-mix(in oklab, var(--color-surface), transparent 20%);
	border-radius: var(--radius-sm);
}
.callout.note {
	--accent: var(--color-accent);
}
.callout.warn {
	--accent: var(--color-warning);
}
.callout.good {
	--accent: var(--color-success);
}
.callout.error {
	--accent: var(--color-error);
}
.badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.02em;
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
}
.accordion {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
}
.accordion details {
	border-bottom: 1px solid var(--color-border);
	background: var(--color-surface);
}
.accordion summary {
	list-style: none;
	cursor: pointer;
	padding: 14px 16px;
	font-weight: 600;
}
.accordion summary::-webkit-details-marker {
	display: none;
}
.accordion details[open] summary {
	background: color-mix(in oklab, var(--color-accent), transparent 92%);
}
.accordion .content {
	padding: 0 16px 16px;
	color: var(--color-text-2);
}

/* ========================
   Footer
   ======================== */
footer {
	border-top: 1px solid var(--color-border);
	margin-top: 90px;
	padding: 26px 0;
	color: var(--color-text-2);
	font-family: var(--font-mono);
	font-size: 13px;
}
.footer-row {
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}
/* biome-ignore lint/style/noDescendingSpecificity: footer links are never .main-nav/.sidebar links */
footer a:hover {
	color: var(--color-accent);
}

/* ========================
   Entry animation (hero only)
   CSS-only on purpose: if it doesn't run, elements just sit at their
   natural, fully visible state — content can never end up hidden.
   ======================== */
@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
}
.hero-copy {
	animation: rise 0.7s ease both;
}
.hero-term .term {
	animation: rise 0.7s ease 0.18s both;
}

/* Motion kill-switches: !important is the point — they must beat everything. */
@media (prefers-reduced-motion: reduce) {
	.t-caret {
		animation: none;
	}
	* {
		/* biome-ignore lint/complexity/noImportantStyles: a11y kill-switch */
		transition: none !important;
		/* biome-ignore lint/complexity/noImportantStyles: a11y kill-switch */
		animation: none !important;
	}
}
/* Same, when JS turns motion off (?motion=off) */
html.no-anim * {
	/* biome-ignore lint/complexity/noImportantStyles: a11y kill-switch */
	transition: none !important;
	/* biome-ignore lint/complexity/noImportantStyles: a11y kill-switch */
	animation: none !important;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 1000px) {
	.hero-grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}
	.grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}
	.grid-4 {
		grid-template-columns: repeat(2, 1fr);
	}
	.split {
		grid-template-columns: 1fr;
	}
	.steps {
		grid-template-columns: 1fr;
	}
	.help-grid {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 900px) {
	.doc-layout {
		grid-template-columns: 1fr;
	}
	.sidebar {
		position: static;
	}
}
@media (max-width: 700px) {
	.menu-toggle {
		display: inline-flex;
	}
	.main-nav {
		display: none;
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		background: var(--color-surface);
		border-bottom: 1px solid var(--color-border);
		padding: 12px 20px;
		flex-direction: column;
		gap: 6px;
		box-shadow: var(--shadow-2);
	}
	body.nav-open .main-nav,
	.site-header:has(.menu-toggle[aria-expanded="true"]) .main-nav {
		display: flex;
	}
	.header-inner {
		grid-template-columns: 1fr auto;
	}
	.grid-3,
	.grid-4,
	.grid-2x2 {
		grid-template-columns: 1fr;
	}
	.section {
		padding-top: 80px;
	}
	.brand {
		font-size: 15px;
		gap: 6px;
	}
	.brand .logo {
		font-size: 13px;
		padding: 4px 6px;
	}
	.header-actions .btn {
		padding: 8px 10px;
		font-size: 13px;
	}
}
@media (max-width: 460px) {
	/* icon-only GitHub button on small phones */
	#ghStars {
		display: none;
	}
}
