/* Earth — dark ground for the live concept, paper for the case study. */

:root {
	--void: #04060c;
	--ink: #e9edf4;
	--dim: #7f8a9c;
	--rule: rgba(233, 237, 244, 0.16);
	--rule-strong: rgba(233, 237, 244, 0.45);
	--accent: #7fd0ff;
	--mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
	margin: 0;
	background: var(--void);
	color: var(--ink);
	font-family: var(--mono);
	font-size: 13px;
	line-height: 1.8;
}

a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); }
a:hover { border-bottom-color: var(--rule-strong); }

body.plate { overflow: hidden; }

#stage { position: fixed; inset: 0; }

.hud {
	position: fixed;
	inset: 0;
	pointer-events: none;
	padding: clamp(16px, 3vw, 38px);
	display: grid;
	grid-template-rows: auto 1fr auto;
	font-size: 11px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.hud a { pointer-events: auto; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.row.bottom { align-items: flex-end; }
.hud-nav { display: flex; gap: 18px; color: var(--dim); }
.hud-nav a { border-bottom: 0; }
.hud-nav a:hover { color: var(--ink); }

.title {
	font-family: var(--serif);
	font-size: clamp(34px, 6vw, 68px);
	line-height: 1;
	letter-spacing: -0.015em;
	text-transform: none;
	font-weight: 400;
	margin: 0 0 14px;
}

.lede {
	max-width: 30ch;
	color: var(--dim);
	line-height: 1.75;
	text-transform: none;
	margin: 0;
	font-size: 12px;
}

.readout { text-align: right; color: var(--dim); display: grid; gap: 3px; margin: 0; }
.readout div { display: flex; justify-content: flex-end; gap: 8px; }
.readout dt, .readout dd { margin: 0; }
.readout dd { color: var(--ink); font-variant-numeric: tabular-nums; }

.mark { position: fixed; width: 9px; height: 9px; border: 1px solid var(--rule); }
.mark.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.mark.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.mark.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.mark.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

#fallback {
	position: fixed;
	inset: 0;
	display: none;
	place-items: center;
	text-align: center;
	padding: 24px;
	color: var(--dim);
}

/* — the case study is on paper, like the rest of the library ————— */

body.study-page {
	background: #e7e3da;
	color: #241f1a;
}

.study { max-width: 940px; margin: 0 auto; padding: clamp(24px, 5vw, 68px) clamp(20px, 5vw, 54px) 96px; }
.study a { border-bottom-color: rgba(36, 31, 26, 0.2); }

.nav {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 24px;
	padding-bottom: 18px;
	border-bottom: 1px solid rgba(36, 31, 26, 0.18);
	font-size: 11px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.nav-links { display: flex; gap: 18px; color: #7d746a; }
.nav-links a { border-bottom: 0; }
.nav-links a:hover { color: #241f1a; }

.study h1 {
	font-family: var(--serif);
	font-size: clamp(32px, 5.4vw, 56px);
	line-height: 1.04;
	letter-spacing: -0.015em;
	font-weight: 400;
	margin: clamp(40px, 7vw, 68px) 0 20px;
	max-width: 20ch;
}

.study .lede-block { max-width: 62ch; color: #7d746a; font-size: 14px; }
.study section { margin-top: clamp(40px, 6vw, 60px); }

.study h2 {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 400;
	color: #7d746a;
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(36, 31, 26, 0.18);
}

.study p { max-width: 68ch; margin: 0 0 16px; }
.plate-shot { display: block; width: 100%; margin: clamp(28px, 5vw, 44px) 0 0; border: 1px solid rgba(36, 31, 26, 0.18); }

.facts, .cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1px;
	background: rgba(36, 31, 26, 0.18);
	border: 1px solid rgba(36, 31, 26, 0.18);
	margin-top: clamp(24px, 4vw, 40px);
}

.facts div, .cards article { background: #e7e3da; padding: 16px 18px; }
.facts dt { color: #7d746a; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.facts dd { margin: 0; }
.cards article { padding: 22px 20px 24px; }
.cards h3 { font-size: 13px; font-weight: 400; margin: 0 0 10px; }
.cards p { color: #7d746a; margin: 0; }

.study ul { max-width: 68ch; margin: 0; padding-left: 18px; color: #7d746a; }
.study li { margin-bottom: 8px; }
.study code { background: rgba(36, 31, 26, 0.07); padding: 1px 5px; }

.study footer {
	margin-top: clamp(48px, 8vw, 80px);
	padding-top: 18px;
	border-top: 1px solid rgba(36, 31, 26, 0.18);
	color: #7d746a;
	font-size: 11px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

@media (max-width: 820px) {
	.lede, .readout { display: none; }
}
