/* Level 26 — a walkthrough presented like the other plates in the library:
   paper, an engineer's monospace for anything measured, a serif for anything
   said. The interior render is bright, so the plate sits on a paper scrim at
   the top and bottom. Shared by the live concept and the case study. */

:root {
	--paper: #ebe8e1;
	--ink: #211d19;
	--dim: #6f675e;
	--rule: rgba(33, 29, 25, 0.18);
	--rule-strong: rgba(33, 29, 25, 0.45);
	--accent: #8a5a2b;
	--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(--paper);
	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); }

kbd {
	display: inline-block;
	min-width: 20px;
	padding: 0 5px;
	border: 1px solid var(--rule-strong);
	font: inherit;
	text-align: center;
	color: var(--ink);
}

/* — the plate ——————————————————————————————————————————————————— */

body.plate { overflow: hidden; background: #cfd8df; }

#stage { position: fixed; inset: 0; }
#stage canvas { display: block; }

.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;
	transition: opacity 0.35s ease;
}

.hud a, .hud button { pointer-events: auto; }
.hud.is-hidden { opacity: 0; visibility: hidden; }

.intro::before, .intro::after {
	content: "";
	position: fixed;
	left: 0;
	right: 0;
	z-index: -1;
	pointer-events: none;
}
.intro::before { top: 0; height: 190px; background: linear-gradient(rgba(235, 232, 225, 0.92), rgba(235, 232, 225, 0)); }
.intro::after { bottom: 0; height: 340px; background: linear-gradient(rgba(235, 232, 225, 0), rgba(235, 232, 225, 0.94) 55%); }

.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, 66px);
	line-height: 1;
	letter-spacing: -0.015em;
	text-transform: none;
	font-weight: 400;
	margin: 0 0 14px;
}

.lede {
	max-width: 56ch;
	color: var(--dim);
	line-height: 1.75;
	text-transform: none;
	letter-spacing: 0.01em;
	margin: 0;
	font-size: 12px;
}

.caliber { text-align: right; color: var(--dim); display: grid; gap: 3px; margin: 0; }
.caliber div { display: flex; justify-content: flex-end; gap: 8px; }
.caliber dt, .caliber dd { margin: 0; }
.caliber dd { color: var(--ink); font-variant-numeric: tabular-nums; }

.start { display: grid; justify-items: end; gap: 10px; }

.start-button {
	pointer-events: auto;
	font: inherit;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--paper);
	background: var(--ink);
	border: 0;
	padding: 13px 26px;
	cursor: pointer;
	transition: background 0.2s ease;
}
.start-button:hover { background: var(--accent); }
.start-button:disabled { opacity: 0.4; cursor: wait; }

.keys { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; color: var(--dim); }
.message { max-width: 44ch; text-align: right; color: var(--accent); text-transform: none; letter-spacing: 0.02em; min-height: 1.8em; }

/* — walking ————————————————————————————————————————————————————— */

.walk { grid-template-rows: auto 1fr auto; }

.room {
	justify-self: start;
	padding: 8px 12px;
	background: rgba(235, 232, 225, 0.88);
	border: 1px solid var(--rule);
	backdrop-filter: blur(3px);
}
.room b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.3; }
.room span { color: var(--dim); letter-spacing: 0.06em; }

.hint {
	padding: 6px 10px;
	background: rgba(235, 232, 225, 0.88);
	border: 1px solid var(--rule);
	color: var(--dim);
}

#minimap { background: rgba(235, 232, 225, 0.9); border: 1px solid var(--rule); }

.cross {
	position: fixed;
	left: 50%;
	top: 50%;
	width: 5px;
	height: 5px;
	margin: -2.5px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* — registration marks ——————————————————————————————————————————— */

.mark { position: fixed; width: 9px; height: 9px; border: 1px solid var(--rule-strong); pointer-events: none; }
.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; }

body.bare .hud, body.bare .mark { display: none; }

#fallback {
	position: fixed;
	inset: 0;
	display: none;
	place-items: center;
	text-align: center;
	padding: 24px;
	color: var(--dim);
	background: var(--paper);
}

@media (max-width: 820px) {
	.caliber, .keys { display: none; }
	.row.bottom { flex-direction: column; align-items: stretch; }
	.start { justify-items: stretch; }
	.message { text-align: left; }
	#minimap { display: none; }
}

/* — the case study ——————————————————————————————————————————————— */

.study { max-width: 940px; margin: 0 auto; padding: clamp(24px, 5vw, 68px) clamp(20px, 5vw, 54px) 96px; }

.nav {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 24px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--rule);
	font-size: 11px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.nav-links { display: flex; gap: 18px; color: var(--dim); }
.nav-links a { border-bottom: 0; }
.nav-links a:hover { color: var(--ink); }

.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: var(--dim); 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: var(--dim);
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--rule);
}

.study p { max-width: 68ch; margin: 0 0 16px; }
.plate-shot { display: block; width: 100%; height: auto; margin: clamp(28px, 5vw, 44px) 0 0; border: 1px solid var(--rule); }

.facts, .cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1px;
	background: var(--rule);
	border: 1px solid var(--rule);
	margin-top: clamp(24px, 4vw, 40px);
}

.facts div, .cards article { background: var(--paper); padding: 16px 18px; }
.facts dt { color: var(--dim); 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: var(--dim); margin: 0; }

.dims { width: 100%; max-width: 68ch; border-collapse: collapse; }
.dims th, .dims td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
.dims th { color: var(--dim); padding-right: 24px; }
.dims td { font-variant-numeric: tabular-nums; }

.study footer {
	margin-top: clamp(48px, 8vw, 80px);
	padding-top: 18px;
	border-top: 1px solid var(--rule);
	color: var(--dim);
	font-size: 11px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}
