:root {
	--bg: #0f172a;
	--panel: #0b1222;
	--surface: #111a2e;
	--line: rgba(255, 255, 255, 0.08);
	--text: #e9eef7;
	--muted: #b7c3d8;
	--accent: #7dd3fc;
	--accent-strong: #38bdf8;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	background: radial-gradient(circle at 16% 18%, rgba(125, 211, 252, 0.08), transparent 30%),
		linear-gradient(180deg, #0f172a 0%, #0f172a 100%);
	color: var(--text);
	font-family: "Sora", "DM Sans", system-ui, -apple-system, sans-serif;
	display: flex;
	flex-direction: column;
	line-height: 1.6;
}

.top-nav {
	display: flex;
	justify-content: center;
	padding: 14px 6vw 4px;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: rgba(17, 26, 46, 0.9);
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

.back-link:hover {
	transform: translateY(-1px);
	border-color: rgba(125, 211, 252, 0.5);
	background: #15223a;
}

.back-link:active {
	transform: translateY(0);
}

.page-header {
	padding: 28px 6vw 10px;
	border-bottom: 1px solid var(--line);
	background: rgba(15, 23, 42, 0.92);
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--accent);
	font-weight: 700;
	font-size: 0.82rem;
	margin: 0;
}

h1 {
	margin: 6px 0 6px;
	font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.lede {
	margin: 0;
	color: var(--muted);
}

main {
	flex: 1;
	padding: 26px 6vw 34px;
}

.board {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
	align-items: start;
}

.info-card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 14px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.info-card h3 {
	margin: 0 0 8px;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
}

.info-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(32px, 1fr));
	gap: 6px;
}

.info-list li {
	padding: 6px 8px;
	text-align: center;
	border-radius: 10px;
	background: var(--surface);
	border: 1px solid var(--line);
	font-weight: 600;
}

.lesson {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 20px;
	text-align: center;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.controls {
	display: flex;
	justify-content: center;
	margin: 6px 0 10px;
	color: var(--muted);
	font-size: 0.95rem;
}

.controls label {
	display: flex;
	gap: 8px;
	align-items: center;
}

.stats {
	display: flex;
	gap: 18px;
	margin: 14px 0 0;
	color: var(--muted);
	font-weight: 700;
	justify-content: center;
}

.stats p {
	margin: 0;
}

#question {
	font-size: clamp(3rem, 10vw, 4rem);
	margin: 10px 0 14px;
}

input {
	width: 100%;
	padding: 12px;
	font-size: 1rem;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--text);
	margin-bottom: 10px;
}

button {
	width: 100%;
	padding: 12px;
	font-size: 1rem;
	border-radius: 10px;
	border: 1px solid transparent;
	background: var(--accent-strong);
	color: #0a0f1d;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.12s ease, border-color 0.12s ease;
}

button + button {
	margin-top: 8px;
}

button:hover {
	transform: translateY(-1px);
}

button:active {
	transform: translateY(0);
}

#restart {
	background: transparent;
	color: var(--text);
	border-color: var(--line);
}

#feedback {
	margin: 12px 0 0;
	font-weight: 700;
}

.page-footer {
	padding: 16px 6vw 24px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.9rem;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 720px) {
	main {
		padding: 18px 5vw 26px;
	}

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

	.lesson {
		order: -1;
	}
}
