:root {
	--ink: #202020;
	--muted: #716d64;
	--paper: #f5f0e7;
	--line: #d9d1c2;
	--coral: #e9684f;
	--yellow: #f3c969;
	--mint: #b9d9c2;
	--blue: #b8d6e5;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	color: var(--ink);
	background: var(--paper);
	font-family: Georgia, "Times New Roman", serif;
}

body::before {
	position: fixed;
	inset: 0;
	z-index: -1;
	content: "";
	opacity: .38;
	background-image: radial-gradient(#c9bfaf 1px, transparent 1px);
	background-size: 18px 18px;
}

.shell { max-width: 1180px; margin: 0 auto; padding: 44px 28px 36px; }
.hero { max-width: 780px; padding: 28px 0 62px; }
.eyebrow, .card-label { margin: 0 0 13px; color: var(--coral); font: 700 11px/1.2 Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 22px; font-size: clamp(3.3rem, 8vw, 7.2rem); font-weight: 400; line-height: .88; letter-spacing: -.055em; }
.intro { max-width: 580px; color: var(--muted); font-size: 1.12rem; line-height: 1.55; }
.hero-meta { display: flex; gap: 24px; margin-top: 30px; color: var(--muted); font: 11px Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #5b9d67; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 25px; border-top: 1px solid var(--line); padding-top: 22px; }
h2 { max-width: 570px; margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.7rem); font-weight: 400; line-height: .98; letter-spacing: -.04em; }
.lab-layout { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 22px; align-items: start; }
.experiments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.experiments .section-heading { grid-column: 1 / -1; }
.experiment-card { min-height: 470px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--ink); }
.coin-card { background: var(--yellow); }
.magic-card { background: var(--mint); }
.game-card { background: var(--blue); }
.card-number { font: 700 12px Arial, sans-serif; }
.card-content { display: flex; flex: 1; flex-direction: column; justify-content: end; }
h3 { margin-bottom: 12px; font-size: 2.5rem; font-weight: 400; line-height: .95; letter-spacing: -.04em; }
.card-content > p:not(.card-label) { min-height: 75px; margin-bottom: 21px; font-size: 1rem; line-height: 1.4; }
.result { min-height: 57px; margin-bottom: 14px; padding: 16px 12px; border-top: 1px solid rgba(32,32,32,.45); font-size: 1.2rem; line-height: 1.1; }
.result-pop { animation: pop .3s ease-out; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
button, input { font: inherit; }
button { cursor: pointer; }
.action-button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 14px; border: 1px solid var(--ink); color: var(--ink); background: transparent; font: 700 13px Arial, sans-serif; text-transform: uppercase; }
.action-button:hover, .choice-button:hover, .choice-button:focus-visible { background: var(--ink); color: var(--paper); }
input { width: 100%; margin-bottom: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid rgba(32,32,32,.55); outline: 0; color: var(--ink); background: transparent; }
input::placeholder { color: rgba(32,32,32,.6); }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 12px; }
.choice-button { min-height: 45px; padding: 5px; border: 1px solid var(--ink); background: transparent; font-size: .85rem; }
.footer-note { margin-top: 30px; color: var(--muted); font-size: .95rem; font-style: italic; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.terminal { position: sticky; top: 22px; overflow: hidden; color: #d9efdb; background: #202521; box-shadow: 8px 8px 0 rgba(32,32,32,.12); }
.terminal-topbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 13px; color: #a5b4a4; background: #303731; font: 10px Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.terminal-lights { display: flex; gap: 5px; }
.terminal-lights i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #e9684f; }
.terminal-lights i:nth-child(2) { background: #f3c969; }
.terminal-lights i:nth-child(3) { background: #77b77e; }
.terminal-topbar button { padding: 0; border: 0; color: #a5b4a4; background: transparent; font: 10px Arial, sans-serif; cursor: pointer; }
.terminal-topbar button:hover { color: #fff; }
.terminal-heading { padding: 24px 20px 13px; border-bottom: 1px solid #3d493e; }
.terminal .eyebrow { margin-bottom: 9px; color: #77b77e; }
.terminal h2 { color: #f5f0e7; font-size: 1.65rem; }
.terminal-output { min-height: 270px; max-height: 390px; overflow: auto; padding: 18px 20px 24px; font: 12px/1.55 "SFMono-Regular", Consolas, monospace; }
.terminal-output p { margin: 0 0 12px; overflow-wrap: anywhere; }
.terminal-prompt { margin-right: 7px; color: #77b77e; }
.terminal-muted { color: #839084; }
.terminal-entry { color: #d9efdb; }
.terminal-entry time { display: block; margin-bottom: 2px; color: #839084; font-size: 10px; }
.statistics { margin-top: 22px; padding: 20px; border: 1px solid var(--ink); background: #fffaf0; box-shadow: 8px 8px 0 rgba(32,32,32,.12); }
.statistics-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.statistics .eyebrow { margin-bottom: 7px; }
.statistics h2 { font-size: 1.65rem; }
.statistics-heading button { padding: 3px 0; border: 0; border-bottom: 1px solid var(--ink); color: var(--muted); background: transparent; font: 10px Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.statistics-heading button:hover { color: var(--coral); border-color: var(--coral); }
.stat-group { padding: 14px 0 3px; border-bottom: 1px solid var(--line); }
.stat-group:last-child { border-bottom: 0; }
.stat-group-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font: 700 11px Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.stat-total { color: var(--muted); font-weight: 400; }
.stat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 7px 0; font: 12px/1.2 Arial, sans-serif; }
.stat-label { overflow-wrap: anywhere; }
.stat-value { color: var(--muted); white-space: nowrap; }
.stat-bar { grid-column: 1 / -1; height: 4px; background: var(--line); }
.stat-bar span { display: block; height: 100%; background: var(--coral); transition: width .3s ease; }
.statistics-empty { margin: 16px 0 2px; color: var(--muted); font-size: .95rem; font-style: italic; }

@media (max-width: 800px) {
	.shell { padding: 25px 18px; }
	.hero { padding-bottom: 45px; }
	.hero-meta { flex-direction: column; gap: 10px; }
	.section-heading { display: block; }
	.section-heading .eyebrow { margin-bottom: 15px; }
	.experiments { grid-template-columns: 1fr; }
	.experiment-card { min-height: 390px; }
	.lab-layout { grid-template-columns: 1fr; }
	.terminal { position: static; }
	.statistics { margin-bottom: 8px; }
}
