/* Folio site. The landing page is an arcade cabinet; the docs are its operator manual.
   Three inks, one job each: red is the single action, blue goes somewhere, yellow marks a trap. */

@font-face { font-family: "Archivo"; src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-latin-wdth-italic.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap; }
@font-face { font-family: "Bungee"; src: url("fonts/bungee-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root
{
	--black: #111114;
	--black-2: #18181d;
	--black-3: #24242b;
	--on-black: #eeede7;
	--on-black-2: #b1b0a9;

	--paper: #f6f6f3;
	--paper-2: #ebebe5;
	--ink: #141417;
	--ink-2: #4b4b53;
	--rule: #d7d7cf;

	--red: #e1251b;
	--red-deep: #9e120b;
	--yellow: #f8c21c;
	--yellow-deep: #b98500;
	--yellow-wash: #fff3c4;
	--blue: #1c58d6;
	--blue-deep: #0f3592;
	--link: #1a4fc2;

	--code-bg: #121216;
	--code-fg: #e7e6e0;
	--focus: var(--blue);

	--text: "Archivo", system-ui, sans-serif;
	--display: "Bungee", "Archivo", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, monospace;

	--topbar: 58px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark)
{
	:root:not([data-theme="light"])
	{
		--paper: #141418;
		--paper-2: #1f1f25;
		--ink: #ebeae4;
		--ink-2: #a9a8a1;
		--rule: #2e2e36;
		--link: #86abff;
		--yellow-wash: #2b2410;
		--focus: #86abff;
		color-scheme: dark;
	}
}

:root[data-theme="dark"]
{
	--paper: #141418;
	--paper-2: #1f1f25;
	--ink: #ebeae4;
	--ink-2: #a9a8a1;
	--rule: #2e2e36;
	--link: #86abff;
	--yellow-wash: #2b2410;
	--focus: #86abff;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 16px); }

body
{
	margin: 0;
	font-family: var(--text);
	font-size: 17px;
	line-height: 1.65;
	background: var(--paper);
	color: var(--ink);
	font-kerning: normal;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

::selection { background: var(--yellow); color: #111114; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

img, video { max-width: 100%; height: auto; }

.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.ext { width: .8em; height: .8em; margin-left: .25em; opacity: .7; }

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

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: #111114; padding: 10px 14px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }

kbd
{
	font-family: var(--mono);
	font-size: 12px;
	padding: 1px 6px;
	border-radius: 4px;
	border: 1px solid currentColor;
	opacity: .6;
}

/* ===========================================================================================
   Docs: the operator manual
   =========================================================================================== */

.topbar
{
	position: sticky;
	top: 0;
	z-index: 40;
	height: var(--topbar);
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 0 20px;
	background: var(--black);
	color: var(--on-black);
	--focus: var(--yellow);
}

.topbar::after, .foot::before
{
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--red) 0 33.33%, var(--yellow) 33.33% 66.66%, var(--blue) 66.66%);
}
.topbar::after { bottom: -4px; }

.wordmark
{
	display: inline-flex;
	align-items: center;
	height: 36px;
	padding: 0 12px;
	background: var(--yellow);
	border-radius: 4px;
	text-decoration: none;
	box-shadow: inset 0 0 0 2px #111114;
}
.wordmark span
{
	font-family: var(--display);
	font-size: 21px;
	line-height: 1;
	color: var(--red);
	text-transform: uppercase;
	text-shadow: 2px 2px 0 #111114;
	letter-spacing: .02em;
}

.topbar-docs, .topbar-links a
{
	color: var(--on-black);
	text-decoration: none;
	font-stretch: 115%;
	font-weight: 650;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .06em;
	display: inline-flex;
	align-items: center;
}
.topbar-docs:hover, .topbar-links a:hover { color: var(--yellow); }

.topbar-links { margin-left: auto; display: flex; gap: 22px; }

.rail-toggle
{
	display: none;
	background: none;
	border: 0;
	color: inherit;
	padding: 8px;
	margin-left: -8px;
	cursor: pointer;
	font-size: 22px;
	line-height: 0;
}

/* Repository link and clone copier, in the sticky bar on every page */

.repo-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.repo-link
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid #3a3a43;
	color: var(--on-black);
	text-decoration: none;
	font-size: 14px;
	font-weight: 650;
	white-space: nowrap;
}
.repo-link:hover { border-color: var(--on-black); }
.clone
{
	display: flex;
	align-items: stretch;
	height: 36px;
	border-radius: 8px;
	background: var(--black-3);
	border: 1px solid #3a3a43;
	overflow: hidden;
}
.clone-cmd
{
	display: none;
	align-items: center;
	padding: 0 12px;
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--on-black-2);
	white-space: nowrap;
	user-select: all;
}
.clone-btn
{
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 0 12px;
	background: var(--on-black);
	color: #111114;
	border: 0;
	font: 700 13px/1 var(--text);
	font-stretch: 110%;
	white-space: nowrap;
	cursor: pointer;
}
.clone-btn:hover { background: #ffffff; }
.clone-btn.clone-url { background: none; color: var(--on-black); border-left: 1px solid #3a3a43; }
.clone-btn.clone-url:hover { background: #2e2e36; }
.clone-btn.done, .clone-btn.clone-url.done { background: var(--yellow); color: #111114; }
.clone-btn:focus-visible { outline-offset: -3px; }
.landing .clone-cmd { display: inline-flex; }
@media (max-width: 1480px) { .landing .clone-cmd { display: none; } }
.topbar .repo-tools { margin-left: 4px; }
@media (max-width: 1180px)
{
	.repo-link span { display: none; }
	.repo-link .ext { display: none; }
}
@media (max-width: 760px)
{
	.clone-btn:first-of-type span { font-size: 0; }
	.clone-btn:first-of-type span::after { content: "Clone"; font-size: 13px; }
	.clone-btn.done:first-of-type span::after { content: "Copied"; }
	.topbar .clone-url { display: none; }
}

/* Search */

.search { position: relative; flex: 0 1 420px; min-width: 0; margin-left: 8px; }
.search-field
{
	display: flex;
	align-items: center;
	gap: 10px;
	height: 38px;
	padding: 0 12px;
	background: var(--black-3);
	border: 1px solid #34343d;
	border-radius: 8px;
	color: var(--on-black-2);
	cursor: text;
}
.search-field:focus-within { border-color: var(--yellow); color: var(--on-black); }
.search-field input
{
	flex: 1;
	min-width: 0;
	background: none;
	border: 0;
	outline: 0;
	color: var(--on-black);
	font: inherit;
	font-size: 15px;
	caret-color: var(--yellow);
}
.search-field input::placeholder { color: var(--on-black-2); }
.search-field input::-webkit-search-cancel-button { display: none; }

.search-results
{
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	width: min(560px, calc(100vw - 32px));
	max-height: min(70vh, 560px);
	overflow-y: auto;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--paper);
	color: var(--ink);
	border: 1px solid var(--rule);
	border-radius: 12px;
	box-shadow: 0 18px 40px -12px #0000006b, 0 4px 10px -4px #00000040;
}
.search-results a
{
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
}
.search-results [aria-selected="true"] a, .search-results a:hover { background: var(--paper-2); }
.search-results .sr-where { display: block; font-size: 12px; font-stretch: 112%; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.search-results .sr-head { display: block; font-weight: 700; font-size: 15.5px; line-height: 1.35; margin: 2px 0; }
.search-results .sr-text { display: block; font-size: 14px; line-height: 1.45; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.search-results mark { background: var(--yellow-wash); color: inherit; border-radius: 2px; padding: 0 1px; }
.search-results .sr-empty { padding: 14px; color: var(--ink-2); font-size: 15px; }

/* Shell */

.shell
{
	display: grid;
	grid-template-columns: 272px minmax(0, 1fr) 232px;
	max-width: 1480px;
	margin: 0 auto;
	align-items: start;
}

.rail
{
	position: sticky;
	top: calc(var(--topbar) + 4px);
	height: calc(100vh - var(--topbar) - 4px);
	overflow-y: auto;
	overscroll-behavior: contain;
	border-right: 1px solid var(--rule);
	scrollbar-width: thin;
	scrollbar-color: var(--rule) transparent;
}
.rail-inner { padding: 26px 16px 48px 20px; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail-top { margin-bottom: 18px !important; }
.rail section + section { margin-top: 22px; }
.rail h2
{
	margin: 0 0 6px 10px;
	font-size: 11.5px;
	font-stretch: 118%;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--ink-2);
}
.rail a
{
	display: block;
	padding: 5px 10px;
	border-radius: 6px;
	color: var(--ink);
	text-decoration: none;
	font-size: 14.5px;
	line-height: 1.4;
}
.rail a:hover { background: var(--paper-2); }
.rail a[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 650; }

.page { min-width: 0; padding: 44px clamp(20px, 4vw, 64px) 80px; }

.toc
{
	position: sticky;
	top: calc(var(--topbar) + 4px);
	max-height: calc(100vh - var(--topbar) - 4px);
	overflow-y: auto;
	padding: 44px 20px 40px 0;
	font-size: 13.5px;
	scrollbar-width: thin;
}
.toc h2 { margin: 0 0 10px; font-size: 11.5px; font-stretch: 118%; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; color: var(--ink-2); text-decoration: none; line-height: 1.4; border-left: 1px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); font-weight: 650; border-left-color: var(--ink); }

/* Prose */

.prose { max-width: 74ch; margin: 0 auto; }
.prose > :first-child { margin-top: 0; }

.prose h1
{
	font-size: clamp(32px, 3.6vw, 46px);
	font-stretch: 125%;
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.02em;
	margin: 0 0 .5em;
	text-wrap: balance;
}
.prose h1 + p { font-size: 19.5px; line-height: 1.55; color: var(--ink-2); }

.prose h2, .prose h3, .prose h4 { position: relative; text-wrap: balance; }
.prose h2
{
	font-size: 25px;
	font-stretch: 122%;
	font-weight: 750;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 2.3em 0 .65em;
	padding-top: .7em;
	border-top: 3px solid var(--ink);
}
.prose h3 { font-size: 19.5px; font-stretch: 110%; font-weight: 720; line-height: 1.3; margin: 1.9em 0 .5em; }
.prose h4 { font-size: 17px; font-weight: 720; margin: 1.6em 0 .4em; }

.anchor
{
	position: absolute;
	left: -1.4em;
	bottom: .12em;
	color: var(--ink-2);
	opacity: 0;
	font-size: .8em;
	padding-right: .3em;
	line-height: 1;
}
.prose h2 .anchor { bottom: .2em; }
.prose :is(h2, h3, h4):hover .anchor, .anchor:focus-visible { opacity: 1; }

.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.35em; }

.prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); }
.prose a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--link); }
.prose strong { font-weight: 700; }

.prose :not(pre) > code
{
	font-family: var(--mono);
	font-size: .84em;
	padding: .12em .38em;
	border-radius: 4px;
	background: var(--paper-2);
	white-space: break-spaces;
	overflow-wrap: anywhere;
}

.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }

.prose img { border-radius: 8px; display: block; margin: 1.4em 0; }
.prose p > img { display: inline-block; margin: 0; }

.prose blockquote
{
	margin: 1.4em 0;
	padding: 14px 20px;
	background: var(--yellow-wash);
	border: 1px solid color-mix(in srgb, var(--yellow-deep) 55%, transparent);
	border-radius: 10px;
}
.prose blockquote > :last-child { margin-bottom: 0; }

/* Code: set on the cabinet's screen */

.screen
{
	margin: 1.4em 0;
	background: var(--code-bg);
	color: var(--code-fg);
	border-radius: 12px;
	box-shadow: inset 0 0 0 1px #2c2c34, 0 1px 0 #0000000d;
	overflow: hidden;
	--focus: var(--yellow);
}
.screen figcaption
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 34px;
	padding: 0 8px 0 16px;
	border-bottom: 1px solid #26262d;
	font-size: 11.5px;
	font-stretch: 118%;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #9d9c95;
}
.copy
{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 0;
	padding: 6px 8px;
	border-radius: 6px;
	color: #9d9c95;
	font: inherit;
	cursor: pointer;
}
.copy:hover { color: var(--code-fg); background: #222229; }
.copy.done { color: var(--yellow); }
.screen pre
{
	margin: 0;
	padding: 16px 20px 18px;
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 14px;
	line-height: 1.6;
	tab-size: 4;
	scrollbar-width: thin;
	scrollbar-color: #3a3a43 transparent;
}
.screen code ::selection, .screen pre::selection { background: #f8c21c66; }
.screen.video { background: #000; }
.screen.video video { display: block; width: 100%; }

.hljs-comment, .hljs-quote { color: #7f7e78; font-style: italic; }
.hljs-keyword, .hljs-name, .hljs-selector-tag, .hljs-built_in, .hljs-literal, .hljs-type, .hljs-meta .hljs-keyword { color: #8fb2ff; }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-variable, .hljs-template-variable, .hljs-params { color: #f6cd5a; }
.hljs-string, .hljs-number, .hljs-symbol, .hljs-regexp, .hljs-link, .hljs-meta .hljs-string { color: #ff9a8c; }
.hljs-selector-class, .hljs-selector-id, .hljs-selector-pseudo, .hljs-title, .hljs-section { color: #ffffff; font-weight: 600; }
.hljs-meta, .hljs-tag { color: #a9a8a1; }

/* Tables: set like the settings sheet in a cabinet's manual */

.table { margin: 1.4em 0; overflow-x: auto; border-radius: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.prose thead th
{
	background: var(--ink);
	color: var(--paper);
	text-align: left;
	font-size: 12px;
	font-stretch: 115%;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 9px 14px;
	white-space: nowrap;
}
.prose table.headless { border-top: 3px solid var(--ink); }
.prose td code { overflow-wrap: normal; white-space: nowrap; }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose td:first-child { font-weight: 600; }
.prose td:first-child:has(a) { min-width: 12em; }
.prose tbody tr:hover td { background: color-mix(in srgb, var(--paper-2) 60%, transparent); }

/* The decisive beat on the docs home: the one red block */

.decisive
{
	margin: 2em 0 2.4em;
	padding: 26px 30px 12px;
	background: var(--red);
	color: #ffffff;
	border-radius: 14px;
	--focus: #ffffff;
}
.decisive h2 { border: 0; padding: 0; margin: 0 0 .5em; color: #ffffff; font-size: 28px; }
.decisive a { color: #ffffff; text-decoration-color: #ffffffa6; }
.decisive :not(pre) > code { background: #00000033; color: #ffffff; }
.decisive li::marker { color: #ffffffb3; }
.decisive .anchor { color: #ffffffb3; }

.doors
{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 8px;
	margin: 0 0 1em;
	padding: 0;
	list-style: none;
}
.doors a
{
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 14px 11px;
	border: 1px solid var(--ink);
	border-radius: 10px;
	text-decoration: none;
	color: var(--ink);
	transition: background-color .2s cubic-bezier(.16, 1, .3, 1), color .2s cubic-bezier(.16, 1, .3, 1);
}
.doors a:hover { background: var(--ink); color: var(--paper); }
.doors strong { font-stretch: 115%; font-weight: 750; font-size: 15px; line-height: 1.25; }
.doors span { font-size: 13px; color: inherit; opacity: .72; }

/* Pager and footer */

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 74ch; margin: 64px auto 0; }
.pager a
{
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 20px;
	border: 1px solid var(--rule);
	border-radius: 12px;
	color: var(--ink);
	text-decoration: none;
	transition: border-color .2s cubic-bezier(.16, 1, .3, 1);
}
.pager a:hover { border-color: var(--ink); }
.pager span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-stretch: 115%; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.pager strong { font-size: 17px; font-weight: 700; line-height: 1.3; }
.pager .next { text-align: right; align-items: flex-end; grid-column: 2; }

.foot { position: relative; background: var(--black); color: var(--on-black-2); font-size: 14px; --focus: var(--yellow); }
.foot::before { top: 0; }
.foot-inner { max-width: 1480px; margin: 0 auto; padding: 34px 24px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; align-items: center; }
.foot p { margin: 0; }
.foot a { color: var(--on-black); text-underline-offset: 3px; }
.foot a:first-child:has(.icon) { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--yellow); }

.scrim { position: fixed; inset: 0; background: #0000008c; z-index: 45; }

@media (max-width: 1240px)
{
	.shell { grid-template-columns: 260px minmax(0, 1fr); }
	.toc { display: none; }
}

@media (max-width: 960px)
{
	.shell { display: block; }
	.rail-toggle { display: inline-flex; }
	.rail
	{
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		height: auto;
		width: min(320px, 86vw);
		z-index: 50;
		background: var(--paper);
		border-right: 1px solid var(--rule);
		transform: translateX(-102%);
		transition: transform .32s cubic-bezier(.16, 1, .3, 1);
		visibility: hidden;
	}
	.rail.open { transform: none; visibility: visible; }
	.topbar-docs { display: none; }
	.search { flex: 1 1 auto; }
	.topbar-links a:first-child { display: none; }
}

@media (max-width: 640px)
{
	.topbar { gap: 10px; padding: 0 12px; }
	.wordmark { display: none; }
	.search { margin-left: 0; }
	.topbar .repo-tools { gap: 6px; margin-left: 0; }
	.topbar .repo-link { padding: 0 9px; }
	.search-field kbd { display: none; }
	.topbar-links { gap: 14px; }
	.page { padding: 28px 16px 64px; }
	.prose h1 + p { font-size: 18px; }
	.screen pre { font-size: 13px; padding: 14px 16px; }
	.screen { border-radius: 10px; margin-left: -4px; margin-right: -4px; }
	.prose table { font-size: 14.5px; }
	.prose td, .prose thead th { padding: 9px 10px; }
	.prose td:first-child:has(a) { min-width: 9em; }
	.decisive { padding: 20px 18px 6px; margin-left: -4px; margin-right: -4px; }
	.pager { grid-template-columns: 1fr; }
	.pager .next { grid-column: 1; }
	.anchor { display: none; }
}

/* ===========================================================================================
   Landing: the cabinet
   =========================================================================================== */

body.landing { background: var(--black); color: var(--on-black); --focus: var(--yellow); color-scheme: dark; }

.cabinet-top { padding: 0 clamp(12px, 2.4vw, 36px); }

.sitebar
{
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: clamp(16px, 2vw, 28px);
	padding: 0 clamp(12px, 2.4vw, 36px);
	background: var(--black);
	box-shadow: 0 1px 0 #24242b;
}
.sitebar .marquee-nav { flex: 1 1 auto; min-width: 0; }

.marquee-nav
{
	display: flex;
	align-items: center;
	gap: clamp(14px, 2.4vw, 32px);
	height: 56px;
	flex-wrap: wrap;
}
.marquee-nav a
{
	color: var(--on-black);
	text-decoration: none;
	font-stretch: 115%;
	font-weight: 650;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .07em;
	display: inline-flex;
	align-items: center;
}
.marquee-nav a:hover { color: var(--yellow); }
.marquee-nav .mn-home { margin-right: auto; font-family: var(--display); font-size: 17px; letter-spacing: .02em; font-weight: 400; gap: 10px; }
.marquee-nav .mn-home span { font-family: var(--text); font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--on-black-2); }

/* The marquee: a backlit translucent panel in a black frame. */
.marquee
{
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto;
	align-items: end;
	column-gap: 40px;
	padding: clamp(18px, 2.4vw, 34px) clamp(20px, 3.4vw, 52px) clamp(18px, 2vw, 28px);
	background: var(--yellow);
	color: #111114;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: inset 0 0 0 clamp(6px, .8vw, 10px) #0b0b0d, inset 0 0 0 calc(clamp(6px, .8vw, 10px) + 2px) #3a3a40;
	isolation: isolate;
}
.marquee-light
{
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(120% 90% at 50% 40%, #fff7d6 0%, #ffe27a00 62%),
		repeating-linear-gradient(90deg, #00000000 0 calc(25% - 1px), #0000000a calc(25% - 1px) 25%);
	opacity: .9;
}
.marquee-title
{
	position: relative;
	margin: 0;
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(76px, 10vw, 148px);
	line-height: .9;
	color: var(--red);
	text-shadow: 1px 1px 0 #111114, 2px 2px 0 #111114, 3px 3px 0 #111114, 4px 4px 0 #111114, 5px 5px 0 #111114, 6px 6px 0 #111114, 7px 7px 0 #111114, 8px 8px 0 #111114;
	letter-spacing: -.01em;
	text-transform: uppercase;
	grid-column: 1;
}
.marquee-tag
{
	grid-column: 1;
	margin: clamp(10px, 1.2vw, 18px) 0 0;
	font-stretch: 125%;
	font-weight: 800;
	font-size: clamp(16px, 2vw, 29px);
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: .01em;
	max-width: 32ch;
	text-wrap: balance;
}
.ladder { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: left; }
.ladder-words { display: flex; flex-direction: column; gap: 6px; }
.ladder-words span { font-family: var(--display); line-height: .9; text-transform: uppercase; color: #111114; }
.ladder p { margin: 12px 0 0; font-size: 11.5px; font-stretch: 118%; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }

/* Power-on: the tube behind the marquee strikes and steadies. */
@media (prefers-reduced-motion: no-preference)
{
	.js .marquee { animation: strike 1.1s steps(1, end) both; }
	.js .marquee-title { animation: settle .9s cubic-bezier(.16, 1, .3, 1) .35s both; }
}
@keyframes strike
{
	0% { filter: brightness(.35) saturate(.6); }
	12% { filter: brightness(1.05); }
	18% { filter: brightness(.45) saturate(.7); }
	30% { filter: brightness(.95); }
	36% { filter: brightness(.6) saturate(.8); }
	48%, 100% { filter: none; }
}
@keyframes settle { from { transform: translateY(6%) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }

/* Cabinet body: bezel, screen, control deck, side art in the gutters. */
.cabinet
{
	position: relative;
	padding: clamp(12px, 1.4vw, 20px) clamp(12px, 2.4vw, 36px) 0;
	overflow: hidden;
}
.cabinet::before, .cabinet::after
{
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: max(0px, calc((100% - 1180px) / 2 - 24px));
	background: repeating-linear-gradient(118deg,
		transparent 0 40px, var(--red) 40px 100px, transparent 100px 118px,
		var(--yellow) 118px 178px, transparent 178px 196px, var(--blue) 196px 256px, transparent 256px 560px);
	pointer-events: none;
}
.cabinet::before { left: 0; }
.cabinet::after { right: 0; transform: scaleX(-1); }

.bezel
{
	position: relative;
	width: fit-content;
	max-width: 1120px;
	margin: 0 auto;
	padding: clamp(8px, 1.4vw, 18px);
	background: #1c1c22;
	border-radius: clamp(14px, 2vw, 30px) clamp(14px, 2vw, 30px) 0 0;
	box-shadow: inset 0 0 0 1px #2e2e36;
}
.screen-glass
{
	position: relative;
	aspect-ratio: 16 / 9;
	width: calc(34vh * 16 / 9);
	max-width: 100%;
	margin: 0 auto;
	background: #000;
	border-radius: clamp(8px, 1.4vw, 18px);
	overflow: hidden;
	box-shadow: 0 0 0 1px #000, 0 0 0 5px #0d0d10;
}
.screen-glass video { display: block; width: 100%; height: 100%; object-fit: cover; }
.loop-toggle
{
	position: absolute;
	right: clamp(18px, 3vw, 44px);
	bottom: clamp(18px, 3vw, 44px);
	background: #111114cc;
	color: var(--on-black);
	border: 1px solid #ffffff2e;
	border-radius: 999px;
	padding: 6px 14px;
	font: 650 12px/1.4 var(--text);
	font-stretch: 115%;
	text-transform: uppercase;
	letter-spacing: .07em;
	cursor: pointer;
}
.loop-toggle:hover { background: #111114; }

.screen-glass video { cursor: pointer; }
.screen-play
{
	position: absolute;
	left: 50%;
	top: 50%;
	width: clamp(64px, 7vw, 92px);
	height: clamp(64px, 7vw, 92px);
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: #111114d9;
	color: var(--on-black);
	box-shadow: 0 0 0 2px #ffffff40, 0 12px 30px -8px #000000b3;
	cursor: pointer;
	font-size: clamp(28px, 3vw, 40px);
	transform: translate(-50%, -50%) scale(.9);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s cubic-bezier(.16, 1, .3, 1), transform .2s cubic-bezier(.16, 1, .3, 1);
}
.screen-play .icon { margin-left: .1em; }
.screen-glass.paused .screen-play { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.screen-glass.paused:hover .screen-play { background: #111114; transform: translate(-50%, -50%) scale(1.06); }
.screen-glass.paused video { filter: brightness(.7); }

/* The control deck: printed overlay on blue, round buttons, the instruction card. */
.deck
{
	position: relative;
	max-width: 1180px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr);
	gap: clamp(18px, 3vw, 44px);
	align-items: start;
	padding: clamp(18px, 2vw, 28px) clamp(18px, 3vw, 44px);
	background:
		repeating-linear-gradient(90deg, #ffffff10 0 1px, transparent 1px 64px),
		var(--blue);
	border-radius: 0 0 clamp(14px, 2vw, 26px) clamp(14px, 2vw, 26px);
	box-shadow: 0 30px 60px -30px #000000;
	--focus: #ffffff;
}

.instruction-card
{
	background: var(--paper);
	color: var(--ink);
	--paper: #f6f6f3;
	--ink: #141417;
	--ink-2: #4b4b53;
	--link: #1a4fc2;
	border-radius: 8px;
	padding: 20px 24px 6px;
	font-size: 16px;
	line-height: 1.55;
	box-shadow: 0 2px 0 #0f359266, 0 10px 24px -10px #00000080;
	--focus: var(--blue);
}
.instruction-card p { margin: 0 0 .9em; }
.instruction-card a { color: var(--link); text-underline-offset: 3px; }
.instruction-card .req
{
	font-size: 13.5px;
	font-stretch: 112%;
	font-weight: 650;
	padding-top: .8em;
	border-top: 2px solid var(--ink);
}

.controls
{
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: auto auto auto;
	gap: 14px 18px;
	align-items: start;
}
.ctl-start { grid-column: 1 / -1; }
.ctl a
{
	display: flex;
	align-items: center;
	gap: 12px;
	color: #ffffff;
	text-decoration: none;
	border-radius: 999px;
}
.ctl-start a { gap: 16px; }
.ctl-cap
{
	--size: 46px;
	--cap: var(--blue);
	--cap-hi: #6f97ff;
	--cap-deep: #0b2a77;
	flex: none;
	width: var(--size);
	height: var(--size);
	border-radius: 50%;
	background: radial-gradient(circle at 34% 30%, var(--cap-hi) 0 14%, var(--cap) 46%, color-mix(in srgb, var(--cap) 80%, #000) 100%);
	box-shadow:
		0 0 0 4px #0d0d10,
		0 0 0 6px #ffffff2a,
		0 5px 1px 3px var(--cap-deep),
		0 12px 18px 2px #00000059;
	transition: transform .12s cubic-bezier(.16, 1, .3, 1), box-shadow .12s cubic-bezier(.16, 1, .3, 1);
}
.ctl-blue .ctl-cap { --cap: #3c78ff; --cap-hi: #a9c3ff; --cap-deep: #0a2366; }
.ctl-yellow .ctl-cap { --cap: var(--yellow); --cap-hi: #fff2b0; --cap-deep: #8a6200; }
.ctl-red .ctl-cap { --cap: var(--red); --cap-hi: #ff9c92; --cap-deep: #6d0a05; --size: clamp(88px, 8vw, 112px); }
.ctl a:hover .ctl-cap { transform: translateY(-1px); }
.ctl a:active .ctl-cap
{
	transform: translateY(4px);
	box-shadow: 0 0 0 4px #0d0d10, 0 0 0 6px #ffffff2a, 0 1px 1px 3px var(--cap-deep), 0 4px 8px 1px #00000059;
}
.ctl-label
{
	font-stretch: 118%;
	font-weight: 750;
	font-size: 14px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.ctl-label b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); letter-spacing: .02em; line-height: 1; margin-bottom: 4px; }
.ctl p { margin: 6px 0 0 58px; font-size: 13.5px; line-height: 1.45; color: #dfe7ff; }
.ctl-start p { margin: 6px 0 0 calc(clamp(88px, 8vw, 112px) + 16px); font-size: 15px; }

/* Why Folio: the attract loop, one stage at a time */
.band-head
{
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 clamp(16px, 3vw, 44px);
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(34px, 5vw, 68px);
	line-height: 1;
	text-transform: uppercase;
	color: var(--yellow);
}

.attract { padding: clamp(72px, 9vw, 128px) 0 clamp(40px, 5vw, 72px); }
.stage
{
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(36px, 4.6vw, 64px) clamp(16px, 3vw, 44px);
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 18px clamp(24px, 4vw, 64px);
	align-items: start;
	border-bottom: 1px solid var(--black-3);
}
.stage h3
{
	margin: 0;
	font-stretch: 125%;
	font-weight: 800;
	font-size: clamp(26px, 3vw, 42px);
	line-height: 1.08;
	letter-spacing: -.015em;
	text-wrap: balance;
	color: var(--on-black);
}
.stage-body { color: var(--on-black-2); font-size: 17.5px; line-height: 1.6; }
.stage-body > :first-child { margin-top: 0; }
.stage-body p { margin: 0 0 1em; max-width: 62ch; }
.stage-body strong { color: var(--on-black); }
.stage-body a { color: #9fbcff; text-underline-offset: 3px; }
.stage-body a:hover { color: #ffffff; }
.stage-body img { border-radius: 10px; display: block; margin: 1.2em 0; box-shadow: 0 0 0 1px #2c2c34; }
.stage-body .screen { margin: 1.2em 0; }
.stage-body :not(pre) > code { font-family: var(--mono); font-size: .86em; padding: .1em .36em; border-radius: 4px; background: var(--black-3); color: var(--on-black); }

.stage.text-only { grid-template-columns: minmax(0, 1fr); }
.stage.text-only h3 { font-size: clamp(30px, 4.2vw, 58px); max-width: 20ch; }
.stage.text-only .stage-body { columns: 2 320px; column-gap: clamp(24px, 4vw, 56px); }
.stage.text-only .stage-body p { break-inside: avoid; }

/* Showcase */
.showcase { padding: clamp(56px, 7vw, 96px) 0; background: var(--black-2); }
.showcase-body
{
	max-width: 1180px;
	margin: clamp(24px, 3vw, 40px) auto 0;
	padding: 0 clamp(16px, 3vw, 44px);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(16px, 2vw, 28px);
	align-items: start;
	color: var(--on-black-2);
}
.showcase-body img { border-radius: 12px; display: block; box-shadow: 0 0 0 1px #2c2c34; }
.showcase-body .screen, .showcase-body p { margin: 0; }
.showcase-body p:last-child { grid-column: 1 / -1; font-size: 15px; }

/* In the box: the game-select menu */
.game-select { padding: clamp(72px, 9vw, 120px) 0 clamp(80px, 9vw, 128px); }
.gs
{
	max-width: 1180px;
	margin: clamp(24px, 3vw, 40px) auto 0;
	padding: 0 clamp(16px, 3vw, 44px);
	display: grid;
	grid-template-columns: minmax(220px, 3fr) minmax(0, 8fr);
	gap: clamp(16px, 2.4vw, 32px);
	align-items: start;
}
.gs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; }
.gs-list button
{
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 14px;
	background: none;
	border: 0;
	border-radius: 6px;
	color: var(--on-black-2);
	font: inherit;
	font-stretch: 118%;
	font-weight: 750;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .05em;
	text-align: left;
	cursor: pointer;
	transition: background-color .16s cubic-bezier(.16, 1, .3, 1), color .16s cubic-bezier(.16, 1, .3, 1);
}
.gs-list button:hover { color: var(--on-black); background: var(--black-3); }
.gs-list button[aria-selected="true"] { background: var(--on-black); color: #111114; }
.gs-list button::before
{
	content: "";
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 0 6px 9px;
	border-color: transparent transparent transparent currentColor;
	opacity: 0;
	transition: opacity .16s;
}
.gs-list button[aria-selected="true"]::before { opacity: 1; }

.gs-screen
{
	background: #1c1c22;
	border-radius: 20px;
	padding: clamp(10px, 1.6vw, 20px);
	box-shadow: inset 0 0 0 1px #2e2e36;
	min-height: 420px;
}
.game-panel
{
	background: #0a0a0c;
	border-radius: 12px;
	padding: clamp(20px, 3vw, 36px);
	min-height: 380px;
	color: var(--on-black-2);
	box-shadow: 0 0 0 1px #000;
}
.game-panel h3
{
	margin: 0 0 .5em;
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(26px, 3vw, 40px);
	line-height: 1;
	text-transform: uppercase;
	color: var(--yellow);
}
.game-panel p { margin: 0 0 1em; max-width: 60ch; }
.game-panel img { display: block; border-radius: 8px; margin: 1.2em 0 0; max-height: 520px; width: auto; }
.game-panel .screen { margin: 1.2em 0 0; }
.game-panel a { color: #9fbcff; }
@media (prefers-reduced-motion: no-preference)
{
	.game-panel:not([hidden]) { animation: tune .32s cubic-bezier(.16, 1, .3, 1); }
}
@keyframes tune { from { opacity: 0; filter: brightness(1.8) contrast(.6); } to { opacity: 1; filter: none; } }

/* The manual: where the cabinet's paperwork lives */
.manual
{
	background: var(--paper);
	color: var(--ink);
	color-scheme: light;
	--paper: #f6f6f3;
	--paper-2: #ebebe5;
	--ink: #141417;
	--ink-2: #4b4b53;
	--rule: #d7d7cf;
	--link: #1a4fc2;
	--focus: var(--blue);
	padding: clamp(32px, 5vw, 72px) 0 clamp(56px, 7vw, 96px);
	border-top: 6px solid var(--ink);
}
.manual-sheet
{
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(28px, 3.6vw, 48px) clamp(16px, 3vw, 44px);
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	gap: 12px clamp(24px, 4vw, 64px);
	border-bottom: 1px solid var(--rule);
}
.manual-sheet:last-child { border-bottom: 0; }
.manual-sheet > h2
{
	grid-column: 1;
	margin: 0;
	font-stretch: 125%;
	font-weight: 800;
	font-size: clamp(24px, 2.6vw, 34px);
	line-height: 1.1;
	letter-spacing: -.01em;
	text-wrap: balance;
}
.manual-sheet > h2 .anchor { display: none; }
.manual-sheet > :not(h2) { grid-column: 2; min-width: 0; }
.manual-sheet h3 { margin: 0 0 .4em; font-size: 13px; font-stretch: 118%; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.manual-sheet h3 .anchor { display: none; }
.manual-sheet h3 ~ h3 { margin-top: 1.6em; }
.manual-sheet p { margin: 0 0 1em; }
.manual-sheet a { color: var(--link); text-underline-offset: 3px; }
.manual-sheet :not(pre) > code { font-family: var(--mono); font-size: .85em; padding: .1em .36em; border-radius: 4px; background: var(--paper-2); }
.manual-sheet hr { display: none; }
.manual-sheet .table { margin: 0 0 1.4em; }
.manual-sheet table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.manual-sheet thead th { background: var(--ink); color: var(--paper); text-align: left; font-size: 12px; font-stretch: 115%; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px; }
.manual-sheet td { padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.manual-sheet td:first-child { font-weight: 600; }
.manual-sheet ul { margin: 0 0 1em; padding-left: 1.2em; }
.manual-sheet li { margin: .3em 0; }

.spec ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(20px, 3vw, 40px); }
.spec li { margin: 0; padding: 14px 0 16px; border-top: 1px solid var(--rule); font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.spec li strong { display: block; color: var(--ink); font-size: 17px; font-stretch: 112%; font-weight: 750; margin-bottom: 2px; }

.latest ul { padding-left: 1.2em; }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }

@media (max-width: 980px)
{
	.marquee { grid-template-columns: 1fr; }
	.ladder { display: none; }
	.deck { grid-template-columns: 1fr; }
	.stage, .manual-sheet, .gs { grid-template-columns: minmax(0, 1fr); }
	.manual-sheet > :not(h2) { grid-column: 1; }
	.gs-list { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
	.gs-list button { white-space: nowrap; }
	.showcase-body { grid-template-columns: 1fr; }
	.spec ul { grid-template-columns: 1fr; }
}

@media (max-width: 640px)
{
	.sitebar { gap: 10px; }
	.marquee-nav a:not(.mn-home) { display: none; }
	.marquee-nav .mn-home span { display: none; }
	.marquee-title { font-size: 25vw; }
	.marquee-tag { max-width: none; }
	.bezel { padding: 8px; }
	.screen-glass { max-height: none; }
	.controls { grid-template-columns: 1fr 1fr; order: -1; }
	.ctl-start { grid-column: 1 / -1; grid-row: auto; }
	.ctl-start a { flex-direction: row; align-items: center; }
	.ctl-start p { max-width: none; margin-left: 0; }
	.ctl p { margin-left: 0; }
	.ctl a { flex-direction: column; align-items: flex-start; gap: 10px; }
	.stage.text-only .stage-body { columns: 1; }
	.loop-toggle { right: 16px; bottom: 16px; }
	.game-panel { min-height: 0; }
	.gs-screen { min-height: 0; }
}
