:root {
	--bg: #fbfaf7;
	--fg: #1b1b1f;
	--muted: #5d5d66;
	--rule: #e3e0d8;
	--accent: #2f5d8a;
	--serif: "Latin Modern Roman", "CMU Serif", "Computer Modern", "STIX Two Text", Georgia, "Times New Roman", serif;
	--sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #131417;
		--fg: #ebe9e4;
		--muted: #9a9aa3;
		--rule: #2a2b30;
		--accent: #8fb6dc;
	}
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
	background: var(--bg);
	color: var(--fg);
	font-family: var(--serif);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

main {
	max-width: 46rem;
	min-height: 100vh;
	margin: 0 auto;
	padding: 2.5rem 1rem;
	display: flex;
	flex-direction: column;
}

.mark {
	margin: 0;
	font-family: var(--sans);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: lowercase;
}

.hero { padding: 12vh 0 4rem; }

.hero h1 { margin: 0 0 1rem; font-weight: 400; font-size: 4rem; line-height: 1; }

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.card {
	border: 1.5px solid color-mix(in srgb, var(--muted) 45%, transparent);
	border-radius: 18px;
	padding: 1.25rem 1.5rem 0.5rem;
}

.card + .card { margin-top: 1.5rem; }

.card-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin: 0 0 1.25rem;
}

.card-title {
	margin: 0;
	font-family: var(--sans);
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	color: var(--muted);
}

.open {
	font-family: var(--sans);
	font-size: 0.85rem;
	color: var(--accent);
	text-decoration: none;
}

.open:hover { text-decoration: underline; }

.cards .flash { fill: var(--bg); stroke: color-mix(in srgb, var(--muted) 60%, transparent); stroke-width: 1.5; }
.cards .flash.front { stroke: var(--accent); stroke-width: 2; }
.cards .corner { font-family: var(--serif); font-size: 16px; fill: var(--muted); }
.cards .keyword { font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace; font-size: 30px; fill: var(--fg); }

.explain {
	margin-top: 1.75rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--rule);
}

.explain .lede { margin-bottom: 2rem; }

.more {
	display: block;
	margin: 0.75rem auto 0;
	padding: 0.1rem 1.25rem 0.4rem;
	background: none;
	border: 0;
	border-radius: 8px;
	font: 1.5rem/1 var(--sans);
	color: var(--muted);
	cursor: pointer;
}

.more[aria-expanded="true"] { font-size: 0.85rem; padding: 0.5rem 1.25rem; }

.more:hover, .more:focus-visible { color: var(--accent); }

.diagram {
	display: block;
	width: 100%;
	max-width: 36rem;
	height: auto;
	margin: 0 auto;
	overflow: visible;
}

.diagram .word { font-family: var(--serif); font-size: 72px; fill: var(--fg); }
.diagram .label { font-family: var(--sans); font-size: 17px; fill: var(--muted); }
.diagram .arrow, .diagram .head { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.diagram .node { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.diagram .glyph { fill: none; stroke: var(--fg); stroke-width: 1.75; stroke-linejoin: round; }
.diagram .dot { fill: var(--fg); }

.lede {
	margin: 0;
	max-width: 36rem;
	font-size: 1.25rem;
	color: var(--muted);
}

.how {
	list-style: none;
	margin: 0 0 0.5rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 1.75rem;
}

.how li { display: flex; gap: 0.75rem; }

.n {
	font-family: var(--sans);
	font-size: 0.8rem;
	color: var(--accent);
	padding-top: 0.3rem;
}

.how h2 {
	margin: 0 0 0.25rem;
	font-size: 1.1rem;
	font-weight: 600;
}

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

footer {
	margin-top: auto;
	padding-top: 4rem;
	font-family: var(--sans);
	font-size: 0.85rem;
	color: var(--muted);
}

footer a { color: inherit; }
