/* Reset, layout primitives, page chrome and responsive rules. */

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 17px/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	-webkit-font-smoothing: antialiased;
	transition: background 0.2s, color 0.2s;
}

.wrap {
	max-width: 720px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Theme toggle */
.theme {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 10;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--ink);
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 6px 12px;
	cursor: pointer;
}

.theme:hover {
	border-color: var(--accent);
	color: var(--accent);
}

[data-dark] {
	display: none;
}

html[data-theme='dark'] [data-light] {
	display: none;
}

html[data-theme='dark'] [data-dark] {
	display: inline;
}

/* Hero */
.hero {
	padding: 120px 0 72px;
	border-bottom: 1px solid var(--line);
}

.avatar {
	display: block;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 0 24px;
}

.eyebrow {
	margin: 0 0 20px;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--muted);
}

h1 {
	margin: 0 0 20px;
	font-size: clamp(40px, 8vw, 60px);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.lede {
	margin: 0 0 32px;
	font-size: 20px;
	line-height: 1.5;
	color: var(--muted);
	max-width: 34em;
}

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

.links a,
.copy {
	font-family: var(--mono);
	font-size: 13px;
	text-decoration: none;
	color: var(--ink);
	background: none;
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 7px 14px;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}

.links a:hover,
.copy:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.copy.done {
	border-color: var(--ok);
	color: var(--ok);
}

/* Sections */
main {
	padding: 8px 24px 0;
}

section {
	padding: 64px 0;
	border-bottom: 1px solid var(--line);
}

h2 {
	margin: 0 0 12px;
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

h3 {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.note {
	margin: 0 0 24px;
	font-size: 15px;
	color: var(--muted);
}

.disclaimer {
	margin: 16px 0 0;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--muted);
}

/* Footer */
footer {
	padding: 40px 24px 64px;
}

footer p {
	margin: 0;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--muted);
}

@media (max-width: 620px) {
	.hero {
		padding: 84px 0 56px;
	}

	section {
		padding: 48px 0;
	}

	.workx {
		grid-template-columns: 1fr;
		gap: 18px;
		width: 100%;
		left: auto;
		transform: none;
	}

	.wpanes {
		min-height: 0;
	}

	.rname {
		font-size: 11px;
	}

	.rgemlab {
		font-size: 11px;
	}

	.readout,
	.readout.five {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.iwrr {
		grid-template-columns: 1fr;
	}

	.wctrls {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.stage {
		grid-template-columns: 72px 1fr 58px;
		gap: 6px 8px;
	}

	.demo {
		padding: 16px;
	}
}

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