/* ff7r2-thai.pages.dev, Rev 2: the page opens the way the game does.
   True black like the title screen, steel like the logo, the menu's blue light for whatever is selected, and the mako
   green of the cracks under the Buster Sword for measures. One typeface: Sarabun, the face the mod draws in the game. */

:root {
	--black: #000;
	--night: #05080d;
	--panel: #0b1119;
	--line: rgb(205 214 222 / 0.16);
	--steel: #dbe2e8;
	--steel-2: #98a5b2;
	--blue: #2f7ff2;
	--blue-lit: #9cc6ff;
	--mako: #54e2d0;

	--f: 'Sarabun', 'Leelawadee UI', 'Thonburi', sans-serif;
	--f-ja: 'Yu Gothic UI', 'Hiragino Sans', 'Noto Sans JP', 'Meiryo', sans-serif;
	--ease: cubic-bezier(0.16, 1, 0.3, 1);
	--wrap: 80rem;
	--gut: clamp(20px, 4.5vw, 72px);
	--bar: 60px;
}

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

html {
	/* big desktops get the whole page larger, not wider margins */
	font-size: clamp(16px, 0.45vw + 9.2px, 22px);
	scroll-padding-top: calc(var(--bar) + 12px);
	scrollbar-color: var(--blue) var(--black);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--black);
	color: var(--steel);
	font: 400 1.15rem/1.7 var(--f);
	font-variant-numeric: tabular-nums;
	caret-color: var(--blue);
	overflow-x: clip;
}

::selection {
	background: var(--blue);
	color: #fff;
}

img {
	display: block;
	max-inline-size: 100%;
	block-size: auto;
}

a {
	color: inherit;
	text-underline-offset: 0.2em;
}

h1,
h2,
h3,
p {
	margin: 0;
}

svg {
	inline-size: 1.25em;
	block-size: 1.25em;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

code {
	padding: 1px 7px;
	background: var(--panel);
	color: var(--blue-lit);
	font: 500 0.92em ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

:focus-visible {
	outline: 2px solid var(--blue-lit);
	outline-offset: 3px;
}

.nb {
	white-space: nowrap;
}

.skip {
	position: fixed;
	inset-block-start: -100px;
	inset-inline-start: 12px;
	z-index: 50;
	padding: 10px 16px;
	background: var(--steel);
	color: var(--black);

	&:focus {
		inset-block-start: 12px;
	}
}

/* ---------- top bar ---------- */
.top {
	position: fixed;
	inset: 0 0 auto;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: clamp(12px, 3vw, 36px);
	block-size: var(--bar);
	padding-inline: var(--gut);
	background: var(--black);
	border-block-end: 1px solid var(--line);
}

.brand {
	margin-inline-end: auto;
	font-weight: 700;
	font-size: 1.05rem;
	text-decoration: none;

	& span {
		margin-inline-start: 0.4em;
		color: var(--steel-2);
		font-weight: 400;
	}
}

.top-nav {
	display: flex;
	gap: clamp(14px, 2vw, 30px);
	font-size: 1.02rem;

	& a {
		padding: 8px 2px;
		color: var(--steel-2);
		text-decoration: none;
		background: linear-gradient(var(--blue-lit), var(--blue-lit)) left bottom / 0 1.5px no-repeat;
		transition: background-size 320ms var(--ease), color 160ms;

		&:hover,
		&:focus-visible {
			color: #fff;
			background-size: 100% 1.5px;
		}
	}
}

/* ---------- buttons: the game's pointed bars ---------- */
.btn {
	--tip: 13px;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-block-size: 48px;
	padding: 10px 30px;
	border: 0;
	background: linear-gradient(to bottom, #3b8cff, #1f62d6);
	clip-path: polygon(var(--tip) 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, var(--tip) 100%, 0 50%);
	color: #fff;
	font: 700 1.08rem/1.2 var(--f);
	text-decoration: none;
	cursor: pointer;
	transition: filter 160ms, translate 160ms var(--ease);

	&:hover {
		filter: brightness(1.18);
	}

	&:active {
		translate: 0 1px;
	}

	/* a clipped box loses its outline, so the ring is drawn inside it */
	&:focus-visible {
		outline: none;
		box-shadow: inset 0 0 0 2px #fff;
	}
}

.btn-sm {
	--tip: 10px;
	min-block-size: 38px;
	padding: 6px 22px;
	font-size: 0.98rem;
}

.btn-lg {
	--tip: 16px;
	min-block-size: 60px;
	padding: 12px 44px;
	font-size: 1.25rem;
}

.btn-line {
	isolation: isolate;
	background: var(--steel-2);

	&::before {
		content: '';
		position: absolute;
		inset: 1.5px;
		z-index: -1;
		background: var(--black);
		clip-path: polygon(calc(var(--tip) - 0.5px) 0, calc(100% - var(--tip) + 0.5px) 0, 100% 50%, calc(100% - var(--tip) + 0.5px) 100%, calc(var(--tip) - 0.5px) 100%, 0 50%);
	}

	&:hover {
		background: #fff;
	}
}

.measure {
	color: var(--steel-2);
	font-size: 0.98rem;
}

/* ---------- the game menu list: the row you are on lights up the way the game's does ---------- */
.gm {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gm-item {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 14px;
	padding: 8px 20px 8px 42px;
	isolation: isolate;
	color: var(--steel-2);
	font-size: 1.3rem;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	transition: color 200ms;

	& small {
		color: inherit;
		font-size: 0.92rem;
		font-weight: 400;
		opacity: 0.85;
	}

	/* the small diamond in front of every row */
	&::before {
		content: '';
		position: absolute;
		inset-inline-start: 16px;
		inset-block-start: 1.05em;
		inline-size: 7px;
		block-size: 7px;
		border: 1.5px solid currentColor;
		rotate: 45deg;
		transition: background-color 200ms, box-shadow 200ms;
	}

	/* the blue streak of light behind the row you are on */
	&::after {
		content: '';
		position: absolute;
		inset: 0 -22% 0 -6%;
		z-index: -1;
		background:
			linear-gradient(to right, transparent, rgb(156 198 255 / 0.95) 14%, transparent 62%) left 50% / 100% 1.5px no-repeat,
			radial-gradient(ellipse 52% 62% at 20% 50%, rgb(47 127 242 / 0.62), transparent 72%);
		opacity: 0;
		transition: opacity 260ms;
		pointer-events: none;
	}

	&:focus-visible {
		outline: none;
	}
}

.gm-item:hover,
.gm-item:focus-visible,
.gm-item[aria-current='true'],
.gm:not(:hover, :focus-within) .gm-item.is-on {
	color: #fff;

	&::before {
		background: #fff;
		box-shadow: 0 0 10px 2px rgb(156 198 255 / 0.9);
	}

	&::after {
		opacity: 1;
	}
}

.gm-main {
	font-size: 1.6rem;
	font-weight: 700;
}

/* ---------- the boot: the game's title screen, which scrolling turns into the main menu ---------- */
.boot {
	position: relative;
	background: var(--black);
}

.boot-pin {
	position: relative;
	display: grid;
	align-items: end;
	min-block-size: 100svh;
	padding-block-start: var(--bar);
	overflow: clip;
	isolation: isolate;
}

.boot-bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	inline-size: 100%;
	block-size: 100%;
	max-inline-size: none;
	object-fit: cover;
	object-position: 64% 50%;
	/* the left of the shot (the game's own menu) fades to black; the page's menu stands there instead */
	-webkit-mask-image: linear-gradient(to right, transparent 45%, #000 63%);
	mask-image: linear-gradient(to right, transparent 45%, #000 63%);
}

.motes {
	position: absolute;
	inset: 0;
	z-index: -1;
	inline-size: 100%;
	block-size: 100%;
	pointer-events: none;
}

/* the logo's resting place: the top corner. app.js starts it full size in the middle and brings it here. */
.boot-logo {
	position: absolute;
	inset-inline-start: calc(var(--gut) - 0.7vw);
	inset-block-start: calc(var(--bar) + 12px);
	inline-size: clamp(11rem, 16vw, 19rem);
	margin: 0;
	mix-blend-mode: lighten;
	transform-origin: 0 0;

	& img {
		inline-size: 100%;
	}
}

.boot-press {
	display: none;
}

.boot-menu {
	max-inline-size: 47rem;
	padding: 0 var(--gut) clamp(36px, 9vh, 110px);
}

h1 {
	font-size: clamp(2.3rem, 4.6vw, 4.4rem);
	font-weight: 800;
	line-height: 1.2;
	text-wrap: balance;
}

.boot-lead {
	max-inline-size: 34em;
	margin-block: clamp(10px, 1.6vh, 18px) clamp(18px, 3.4vh, 36px);
	color: var(--steel-2);
	font-size: 1.2rem;
	text-wrap: pretty;
}

.boot .gm {
	margin-inline-start: -16px;
}

/* with JS and motion allowed the section is two screens tall and its stage stays pinned while the page scrolls */
/* --boot-run is how far the page scrolls while the logo travels: about 20 notches of a mouse wheel (owner, 23-11) */
.scrolly .boot {
	--boot-run: 2000px;
	block-size: calc(100svh + var(--boot-run));
}

@media (hover: none) {
	.scrolly .boot {
		--boot-run: 130svh;
	}
}

.scrolly .boot-pin {
	position: sticky;
	inset-block-start: 0;
	block-size: 100svh;
	min-block-size: 0;
}

.scrolly .boot-press {
	position: absolute;
	inset: auto 0 11vh;
	display: grid;
	justify-items: center;
	gap: 16px;
	font-size: clamp(1.1rem, 1.6vw, 1.5rem);
	font-weight: 500;
	letter-spacing: 0.08em;
	pointer-events: none;

	/* a small arrow under the line: the way on is down */
	&::after {
		content: '';
		inline-size: 11px;
		block-size: 11px;
		border-block-end: 2px solid currentColor;
		border-inline-end: 2px solid currentColor;
		rotate: 45deg;
		opacity: 0.7;
	}
}

/* ---------- words alone on black ---------- */
.say {
	display: grid;
	justify-items: center;
	gap: 16px;
	padding: clamp(110px, 20vh, 260px) var(--gut);
	text-align: center;
}

.say-big {
	max-inline-size: 17em;
	font-size: clamp(2rem, 4.4vw, 4rem);
	font-weight: 800;
	line-height: 1.32;
	text-wrap: balance;
}

.say-small {
	color: var(--steel-2);
	font-size: clamp(1.15rem, 1.6vw, 1.45rem);
}

/* ---------- sections ---------- */
.sec {
	inline-size: min(var(--wrap), 100% - 2 * var(--gut));
	margin-inline: auto;
	padding-block: clamp(72px, 13vh, 170px);
}

.sec-head {
	margin-block-end: clamp(28px, 5vh, 56px);

	& p {
		max-inline-size: 42em;
		margin-block-start: 10px;
		color: var(--steel-2);
		text-wrap: pretty;
	}
}

h2 {
	max-inline-size: 22em;
	font-size: clamp(1.9rem, 3.4vw, 3.1rem);
	font-weight: 800;
	line-height: 1.28;
	text-wrap: balance;
}

.shot {
	display: block;
	background: var(--night);
	box-shadow: 0 0 0 1px var(--line);
	transition: box-shadow 200ms;

	& img {
		inline-size: 100%;
	}

	&:hover {
		box-shadow: 0 0 0 1px var(--blue-lit);
	}
}

/* ---------- the viewer ---------- */
.viewer-in {
	display: grid;
	grid-template-columns: minmax(14rem, 19rem) minmax(0, 1fr);
	gap: clamp(20px, 3.4vw, 56px);
	align-items: start;
}

.viewer-list {
	margin-inline-start: -16px;

	& .gm-item {
		padding-block: 6px;
		font-size: 1.18rem;
	}
}

.stage {
	margin: 0;

	& a {
		display: block;
		box-shadow: 0 0 0 1px var(--line), 0 40px 90px -40px rgb(47 127 242 / 0.5);
		cursor: zoom-in;
	}

	& img {
		inline-size: 100%;
		aspect-ratio: 16 / 9;
		object-fit: cover;
	}

	& figcaption {
		display: grid;
		gap: 4px;
		margin-block-start: 22px;
	}

	& h3 {
		font-size: 1.55rem;
		font-weight: 700;
		line-height: 1.35;
	}

	& p {
		max-inline-size: 44em;
		color: var(--steel-2);
		text-wrap: pretty;
	}
}

/* ---------- the tease ---------- */
.deep {
	position: relative;
	display: grid;
	justify-items: center;
	padding: clamp(40px, 8vh, 110px) var(--gut) clamp(90px, 16vh, 200px);
	overflow: hidden;
	text-align: center;
}

.deep-grin {
	inline-size: min(61.25rem, 100%);
	-webkit-mask-image: radial-gradient(ellipse 54% 60% at 50% 52%, #000 34%, transparent 82%);
	mask-image: radial-gradient(ellipse 54% 60% at 50% 52%, #000 34%, transparent 82%);
}

.deep-copy {
	position: relative;
	max-inline-size: 44em;
	margin-block-start: clamp(-70px, -5vw, -20px);

	& h2 {
		max-inline-size: none;
	}

	& > p {
		margin-block-start: 6px;
		color: var(--steel-2);
	}

	& blockquote {
		margin: 26px 0 0;

		& p {
			font-size: clamp(1.5rem, 3.1vw, 2.6rem);
			font-weight: 800;
			line-height: 1.5;
			text-wrap: balance;

			&::before {
				content: '“';
			}

			&::after {
				content: '”';
			}
		}

		& footer {
			margin-block-start: 12px;
			color: var(--steel-2);
			font-size: 1rem;
		}
	}
}

/* ---------- one line, three languages ---------- */
.cutter {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: clamp(24px, 4vw, 72px);
	align-items: center;

	& > input {
		position: absolute;
		opacity: 0;
		pointer-events: none;
	}
}

.cutter-copy > p {
	margin-block-start: 12px;
	color: var(--steel-2);
	text-wrap: pretty;
}

.picks {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-block-start: 26px;

	& label {
		padding: 6px 20px;
		box-shadow: inset 0 0 0 1px var(--line);
		color: var(--steel-2);
		font-weight: 500;
		cursor: pointer;
		transition: background-color 160ms, color 160ms, box-shadow 160ms;

		&:hover {
			box-shadow: inset 0 0 0 1px var(--blue-lit);
			color: #fff;
		}
	}
}

.cutter:has(#s1:checked) label[for='s1'],
.cutter:has(#s2:checked) label[for='s2'] {
	background: var(--blue);
	box-shadow: none;
	color: #fff;
}

.cutter:has(#s1:focus-visible) label[for='s1'],
.cutter:has(#s2:focus-visible) label[for='s2'],
.cutter:has(#l-jp:focus-visible) label[for='l-jp'],
.cutter:has(#l-en:focus-visible) label[for='l-en'],
.cutter:has(#l-th:focus-visible) label[for='l-th'] {
	outline: 2px solid var(--blue-lit);
	outline-offset: 3px;
}

.cutter:has(#s1:checked) [data-s='2'],
.cutter:has(#s2:checked) [data-s='1'] {
	display: none;
}

.metrics {
	display: grid;
	gap: 10px;
	margin: 26px 0 0;

	& div {
		display: grid;
		grid-template-columns: 8.4em minmax(0, 1fr) 3em;
		align-items: center;
		gap: 14px;

		/* a measured bar: tenths, read off the character's card */
		&::after {
			content: '';
			grid-column: 2;
			grid-row: 1;
			block-size: 5px;
			background: linear-gradient(to right, var(--mako) calc(var(--v) * 10%), var(--line) 0);
		}
	}

	& dt {
		grid-column: 1;
		font-size: 1.05rem;
	}

	& dd {
		grid-column: 3;
		grid-row: 1;
		margin: 0;
		color: var(--mako);
		font-weight: 700;
		text-align: end;
	}
}

.fine {
	max-inline-size: 34em;
	margin-block-start: 20px;
	color: var(--steel-2);
	font-size: 1rem;
}

/* the line: the game's own shot of it on top, whole, then the same line in the language picked */
.screen {
	display: grid;
	background: var(--night);
	box-shadow: 0 0 0 1px var(--line);
}

/* the two shots share one place; picking the other sample fades to its shot */
.screen-shot {
	display: grid;
	aspect-ratio: 16 / 9;
	background: #000;

	& img {
		grid-area: 1 / 1;
		inline-size: 100%;
		block-size: 100%;
		object-fit: cover;
		opacity: 0;
		transition: opacity 360ms;
	}
}

.cutter:has(#s1:checked) .screen-shot .is-1,
.cutter:has(#s2:checked) .screen-shot .is-2 {
	opacity: 1;
}

.who {
	justify-self: start;
	padding: 20px clamp(20px, 3.4vw, 44px) 0;
	color: var(--steel);
	font-size: 1.1rem;
	font-weight: 500;

	& span {
		margin-inline-start: 0.5em;
		font: 400 0.9rem var(--f-ja);
		opacity: 0.8;
	}

	/* the rule the game draws under a speaker's name */
	&::after {
		content: '';
		display: block;
		inline-size: calc(100% + 5rem);
		block-size: 1px;
		margin-block-start: 7px;
		background: linear-gradient(to right, rgb(255 255 255 / 0.85), transparent);
	}
}

.lines {
	display: grid;
	align-content: start;
	min-block-size: 6.6rem;
	padding: 10px clamp(20px, 3.4vw, 44px) 22px;
}

.line {
	display: none;
	color: #fff;
	font-size: clamp(1.6rem, 2.6vw, 2.4rem);
	font-weight: 700;
	line-height: 1.38;
	text-shadow: 0 2px 10px #000;
	text-wrap: balance;

	&:lang(ja) {
		font-family: var(--f-ja);
		letter-spacing: 0.02em;
	}
}

.cutter:has(#s1:checked):has(#l-jp:checked) .line[data-s='1'][data-l='jp'],
.cutter:has(#s1:checked):has(#l-en:checked) .line[data-s='1'][data-l='en'],
.cutter:has(#s1:checked):has(#l-th:checked) .line[data-s='1'][data-l='th'],
.cutter:has(#s2:checked):has(#l-jp:checked) .line[data-s='2'][data-l='jp'],
.cutter:has(#s2:checked):has(#l-en:checked) .line[data-s='2'][data-l='en'],
.cutter:has(#s2:checked):has(#l-th:checked) .line[data-s='2'][data-l='th'] {
	display: block;
}

.layers {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-block-start: 1px solid var(--line);

	& label {
		position: relative;
		padding: 15px 8px 17px;
		color: var(--steel-2);
		font-size: clamp(0.95rem, 1.3vw, 1.08rem);
		font-weight: 500;
		text-align: center;
		cursor: pointer;
		transition: background-color 160ms, color 160ms;

		&:hover {
			color: #fff;
		}
	}
}

.cutter:has(#l-jp:checked) label[for='l-jp'],
.cutter:has(#l-en:checked) label[for='l-en'],
.cutter:has(#l-th:checked) label[for='l-th'] {
	background: linear-gradient(to bottom, rgb(47 127 242 / 0.28), transparent);
	color: #fff;

	&::before {
		content: '';
		position: absolute;
		inset: -1px 0 auto;
		block-size: 2px;
		background: var(--blue-lit);
		box-shadow: 0 0 14px 2px rgb(47 127 242 / 0.8);
	}
}

/* ---------- the workbench ---------- */
.bench-row {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(16px, 2.4vw, 36px);
	align-items: center;
	margin-block-start: clamp(20px, 3vw, 40px);
}

.stats {
	display: grid;
	gap: 12px;
	margin: 0;

	& div {
		display: flex;
		align-items: baseline;
		gap: 10px;
	}

	& dt {
		color: var(--steel-2);
	}

	/* the dotted run between a name and its figure, like a status screen */
	& i {
		flex: 1;
		min-inline-size: 16px;
		border-block-end: 1.5px dotted var(--line);
		translate: 0 -0.3em;
	}

	& dd {
		margin: 0;
		color: var(--mako);
		font-size: 1.25rem;
		font-weight: 700;
		white-space: nowrap;
	}
}

/* the figures, said out loud */
.hub {
	display: grid;
	gap: 6px;

	& b {
		color: var(--mako);
		font-size: clamp(4rem, 10vw, 9rem);
		font-weight: 800;
		line-height: 1;
		letter-spacing: -0.02em;
	}

	& span {
		max-inline-size: 30em;
		font-size: clamp(1.2rem, 1.9vw, 1.7rem);
		text-wrap: balance;
	}
}

.hub-time {
	margin-block-start: clamp(64px, 11vh, 140px);

	& b {
		font-size: clamp(3rem, 7vw, 6.4rem);
	}
}

.tool {
	display: grid;
	grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
	gap: clamp(20px, 3.6vw, 64px);
	align-items: center;
	margin-block-start: clamp(56px, 10vh, 130px);

	& .shot {
		box-shadow: 0 0 0 1px var(--line), 0 40px 90px -40px rgb(84 226 208 / 0.35);
	}
}

.tool-flip {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);

	& .shot {
		order: 2;
	}
}

.tool-copy {
	& b {
		display: block;
		color: var(--mako);
		font-size: clamp(2.4rem, 4.6vw, 4.4rem);
		font-weight: 800;
		line-height: 1.1;
		letter-spacing: -0.01em;
	}

	& h3 {
		margin-block: 10px 8px;
		font-size: 1.55rem;
		font-weight: 700;
		line-height: 1.35;
	}

	& p {
		color: var(--steel-2);
		text-wrap: pretty;
	}
}

.proof {
	max-inline-size: 22em;
	margin-block-start: clamp(56px, 10vh, 120px);
	font-size: clamp(1.6rem, 3.1vw, 2.7rem);
	font-weight: 800;
	line-height: 1.42;
	text-wrap: balance;
}

/* ---------- install ---------- */
.setup {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 72px);
	align-items: center;
}

.steps {
	display: grid;
	gap: 26px;
	margin: 30px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: step;

	& li {
		display: grid;
		grid-template-columns: 3.2rem minmax(0, 1fr);
		counter-increment: step;

		&::before {
			content: counter(step);
			grid-row: span 2;
			color: var(--blue-lit);
			font-size: 2.8rem;
			font-weight: 800;
			line-height: 0.95;
		}
	}

	& h3 {
		font-size: 1.3rem;
		font-weight: 700;
		line-height: 1.4;
	}

	& p {
		grid-column: 2;
		margin-block-start: 4px;
		color: var(--steel-2);
		text-wrap: pretty;
	}
}

.path {
	color: var(--blue-lit);
	font-weight: 500;
}

.asides {
	display: grid;
	gap: 8px;
	margin: 30px 0 0;
	padding: 22px 0 0;
	border-block-start: 1px solid var(--line);
	list-style: none;
	color: var(--steel-2);
	font-size: 1.05rem;
	line-height: 1.6;

	& li {
		position: relative;
		padding-inline-start: 24px;

		&::before {
			content: '';
			position: absolute;
			inset-inline-start: 4px;
			inset-block-start: 0.66em;
			inline-size: 6px;
			block-size: 6px;
			border: 1.5px solid var(--blue-lit);
			rotate: 45deg;
		}
	}
}

/* ---------- questions ---------- */
.faq {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	gap: clamp(16px, 4vw, 72px);
}

.faq-list details {
	border-block-start: 1px solid var(--line);

	&:last-child {
		border-block-end: 1px solid var(--line);
	}

	& summary {
		position: relative;
		padding: 18px 44px 18px 0;
		list-style: none;
		font-size: 1.2rem;
		font-weight: 700;
		line-height: 1.45;
		cursor: pointer;

		&::-webkit-details-marker {
			display: none;
		}

		&::after {
			content: '';
			position: absolute;
			inset-inline-end: 10px;
			inset-block-start: 50%;
			inline-size: 9px;
			block-size: 9px;
			border-block-end: 2px solid var(--blue-lit);
			border-inline-end: 2px solid var(--blue-lit);
			rotate: 45deg;
			translate: 0 -70%;
			transition: rotate 320ms var(--ease), translate 320ms var(--ease);
		}

		&:hover {
			color: #fff;
		}
	}

	&[open] summary::after {
		rotate: 225deg;
		translate: 0 -20%;
	}

	& p {
		max-inline-size: 60ch;
		padding-block-end: 22px;
		color: var(--steel-2);
	}
}

/* ---------- the stages ---------- */
.stages {
	display: grid;
	grid-template-columns: repeat(11, minmax(0, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;

	& li {
		min-block-size: 6.6rem;
	}

	& b {
		font-size: 0.95rem;
		font-weight: 700;
	}

	& .is-open {
		display: grid;
		align-content: space-between;
		padding: 12px;
		background: linear-gradient(to bottom, rgb(47 127 242 / 0.4), rgb(47 127 242 / 0.1));
		box-shadow: inset 0 2px 0 var(--blue-lit);
		color: #fff;

		& span {
			font-size: clamp(0.92rem, 1.15vw, 1.1rem);
			font-weight: 700;
			white-space: nowrap;
		}
	}

	& a {
		display: grid;
		align-content: space-between;
		block-size: 100%;
		padding: 12px;
		background: var(--panel);
		color: var(--steel-2);
		text-decoration: none;
		transition: background-color 200ms, color 200ms, box-shadow 200ms;

		/* a padlock: these are still shut */
		&::after {
			content: '';
			inline-size: 18px;
			block-size: 18px;
			background: currentColor;
			-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='1.5'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
			mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='1.5'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
			opacity: 0.7;
		}

		&:hover,
		&:focus-visible {
			background: #121b27;
			box-shadow: inset 0 2px 0 var(--steel-2);
			color: #fff;
		}
	}
}

.unlock {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 24px;
	margin-block-start: 30px;
	color: var(--steel-2);
}

.deep-copy .hint {
	margin-block-start: 32px;
	color: var(--steel-2);
	font-size: 1rem;
}

/* ---------- the close ---------- */
.last {
	display: grid;
	justify-items: center;
	gap: 22px;
	padding: clamp(60px, 12vh, 150px) var(--gut) clamp(80px, 14vh, 170px);
	text-align: center;

	& h2 {
		max-inline-size: 20em;
	}
}

.foot {
	padding: 26px var(--gut) 40px;
	border-block-start: 1px solid var(--line);
	color: var(--steel-2);
	font-size: 1rem;
	text-align: center;

	& b {
		color: var(--steel);
	}

	& p + p {
		margin-block-start: 4px;
	}

	& a {
		color: var(--steel);
	}
}

/* ---------- the full version's own page ---------- */
.found {
	display: grid;
	justify-items: center;
	min-block-size: 100svh;
	padding: calc(var(--bar) + 24px) var(--gut) 80px;
	align-content: center;
	text-align: center;
}

.found-grin {
	inline-size: min(52rem, 100%);
	-webkit-mask-image: radial-gradient(ellipse 54% 60% at 50% 52%, #000 34%, transparent 82%);
	mask-image: radial-gradient(ellipse 54% 60% at 50% 52%, #000 34%, transparent 82%);
}

.found-copy {
	display: grid;
	justify-items: center;
	gap: 14px;
	max-inline-size: 38em;
	margin-block-start: clamp(-60px, -4vw, -16px);

	& p {
		color: var(--steel-2);
		text-wrap: pretty;
	}

	& .btn {
		margin-block-start: 12px;
	}
}

.found-note {
	font-size: 1rem;
}

/* ---------- motion: one sequence at the start; the rest only answers the visitor ---------- */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}

	.scrolly .boot-press span {
		animation: press 2.2s ease-in-out infinite;
	}

	.scrolly .boot-press::after {
		animation: nudge 2.2s ease-in-out infinite;
	}

	.line {
		animation: sub-in 420ms var(--ease);
	}

	#view-img.is-swapping {
		animation: sub-in 360ms var(--ease);
	}
}

@keyframes press {
	0%,
	100% {
		opacity: 0.35;
	}

	50% {
		opacity: 1;
	}
}

@keyframes nudge {
	0%,
	100% {
		translate: 0 0;
	}

	50% {
		translate: 0 7px;
	}
}

@keyframes sub-in {
	from {
		opacity: 0;
		translate: 0 8px;
	}

	to {
		opacity: 1;
		translate: 0 0;
	}
}

/* ?still in the address holds everything in its finished state (for screenshots) */
.still *,
.still *::before,
.still *::after {
	animation: none !important;
	transition: none !important;
}

/* ---------- narrower screens ---------- */
@media (max-width: 1000px) {
	.top-nav {
		display: none;
	}

	.viewer-in,
	.cutter,
	.setup,
	.faq,
	.tool,
	.tool-flip {
		grid-template-columns: minmax(0, 1fr);
	}

	.tool-flip .shot {
		order: 0;
	}

	/* the list becomes a row to swipe; the picture sits under it */
	.viewer-list {
		grid-auto-flow: column;
		grid-auto-columns: max-content;
		gap: 4px;
		margin-inline: calc(-1 * var(--gut));
		padding: 4px var(--gut) 14px;
		overflow-x: auto;
		scrollbar-width: thin;
		scrollbar-color: var(--blue) transparent;

		& .gm-item::after {
			inset-inline: 0;
		}
	}

	.bench-row {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

		& .stats {
			grid-column: 1 / -1;
		}
	}

	.stages {
		grid-template-columns: repeat(4, minmax(0, 1fr));

		& li {
			min-block-size: 5.4rem;
		}
	}
}

@media (max-width: 720px) {
	body {
		font-size: 1.08rem;
	}

	.brand span {
		display: none;
	}

	/* on a phone the sword fills the screen and the menu sits over its foot */
	.boot-bg {
		object-position: 66% 50%;
		block-size: 62%;
		-webkit-mask-image: linear-gradient(to bottom, #000 42%, transparent 96%);
		mask-image: linear-gradient(to bottom, #000 42%, transparent 96%);
	}

	.boot-logo {
		inline-size: 10.5rem;
	}

	.boot-lead {
		font-size: 1.08rem;
	}

	.gm-item {
		font-size: 1.15rem;
	}

	.gm-main {
		font-size: 1.35rem;
	}

	.bench-row {
		grid-template-columns: minmax(0, 1fr);
	}

	.metrics div {
		grid-template-columns: 7.4em minmax(0, 1fr) 2.8em;
	}

	.stats div {
		flex-wrap: wrap;
	}
}
