/* Homepage proving-ground components. Breakpoints match Oxygen: 1119 / 1023 / 767 / 479. */

/* Header */

.site-header {
	padding: 24px;
	background-color: var(--lx-navy);
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: 1120px;
	margin: 0 auto;
}

.site-nav-link,
.site-nav-link:hover {
	color: var(--lx-white);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
	text-decoration: none;
}

.site-nav-link:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Sections: native Oxygen Sections; width and side padding come from Oxygen global settings. */

.hero {
	overflow: hidden;
	background-image: linear-gradient(148.96deg, var(--lx-navy) 0%, var(--lx-navy-soft) 71.429%);
}

.hero .section-container {
	flex-direction: row;
	align-items: flex-start;
	gap: 100px;
	padding-top: 48px;
	padding-bottom: 0;
}

.intro {
	background-color: var(--lx-white);
}

.intro .section-container {
	align-items: center;
	padding-top: 80px;
	padding-bottom: 80px;
}

.features {
	background-color: var(--lx-white);
}

.features .section-container {
	gap: 100px;
	padding-top: 72px;
	padding-bottom: 100px;
}

.modes {
	background-color: var(--lx-navy);
}

.modes .section-container {
	align-items: stretch;
	gap: 48px;
	padding-top: 88px;
	padding-bottom: 88px;
}

.closing {
	background-color: var(--lx-paper);
}

.closing .section-container {
	align-items: center;
	padding-top: 88px;
	padding-bottom: 88px;
}

/* Hero */

.hero-copy {
	display: flex;
	flex: 0 1 560px;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	align-self: center;
	min-width: 0;
	padding-block: 48px;
}

.hero-eyebrow {
	color: var(--lx-yellow);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.3;
	text-transform: uppercase;
}

.hero-title {
	margin: 0;
	color: var(--lx-white);
	font-size: 56px;
	font-weight: 800;
	line-height: 1.3;
}

.hero-lead {
	max-width: 490px;
	color: var(--lx-white);
	font-size: 20px;
	line-height: 1.3;
}

/* Hero illustration: the device plus its motion toggle, which sits just right of the device's bottom edge. */

.hero-media {
	--toggle-size: 36px;
	--toggle-gap: 8px;
	position: relative;
	display: flex;
	flex: none;
	max-width: 100%;
}

/* Device illustration: static editable game reference. Inner measures scale with the screen width (382.278 design px). */

/* The phone is cropped below the tool row and fades into the hero background; the full board stays opaque. */

.device {
	--device-w: 400px;
	flex: none;
	width: var(--device-w);
	max-width: 100%;
	max-height: calc(var(--device-w) * 1.75);
	overflow: hidden;
	padding: 8.861px;
	border-radius: 45.57px;
	background-color: var(--lx-navy);
	-webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent);
	mask-image: linear-gradient(to bottom, #000 82%, transparent);
}

.device-screen {
	--u: calc(100cqw / 350.912);
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	padding: 6.154% 4.1025%;
	border-radius: 35.443px;
	background-color: var(--lx-paper);
	color: var(--lx-navy);
}

/* Scoreboard, fill rail and message strip follow the game's phone layout (Scoreboard.tsx, ultraviolet.css),
   measured against the board panel: 1u is 0.9413 game px at a 390px viewport. Rows align with the board's
   tile area, 4.7u inside the panel. */

.game-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	padding-inline: calc(4.7 * var(--u));
}

.wordmark-compact {
	font-size: calc(28.6 * var(--u));
	color: var(--lx-navy);
}

.game-score {
	display: flex;
	flex-direction: column;
	white-space: nowrap;
}

.game-score-end {
	align-items: flex-end;
}

.game-score-label {
	color: var(--lx-muted);
	font-size: calc(11.3 * var(--u));
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.game-score-value {
	font-size: calc(26.36 * var(--u));
	font-weight: 800;
	line-height: 1.05;
}

.game-meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: calc(9 * var(--u));
	margin-top: calc(3 * var(--u));
	padding-inline: calc(4.7 * var(--u));
	line-height: 1;
	white-space: nowrap;
}

.game-meta-start {
	display: flex;
	align-items: baseline;
	gap: calc(12 * var(--u));
}

.game-meta-item {
	display: flex;
	align-items: baseline;
	gap: calc(4.5 * var(--u));
}

.game-meta-label {
	color: var(--lx-muted);
	font-size: calc(11.3 * var(--u));
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.game-meta-value {
	font-size: calc(14.16 * var(--u));
	font-weight: 800;
}

.game-rail {
	height: calc(1.9 * var(--u));
	margin-top: calc(4.8 * var(--u));
	border-radius: 1px;
	background-image: linear-gradient(90deg, transparent 0%, rgba(38, 18, 56, 0.08) 12%, rgba(38, 18, 56, 0.08) 88%, transparent 100%);
}

.device-screen .selection-preview {
	justify-content: center;
	height: calc(37.65 * var(--u));
	margin: calc(8.85 * var(--u)) calc(4.7 * var(--u)) 0;
	padding: 0 calc(13 * var(--u));
	border-radius: calc(11.3 * var(--u));
	transition: background-color 0.2s ease;
}

.device-screen .selection-preview.is-cleared {
	background-color: rgba(38, 18, 56, 0.04);
}

.device-screen .selection-word {
	font-size: calc(18.8 * var(--u));
	letter-spacing: 0.02em;
}

.device-screen .board {
	margin-top: calc(2.26 * var(--u));
}

.board {
	--tile-size: calc(39.208 * var(--u));
	display: flex;
	flex-direction: column;
	gap: calc(3.921 * var(--u));
	margin-top: calc(15.683 * var(--u));
	padding: calc(4.901 * var(--u));
	border-radius: calc(14.703 * var(--u));
	background-color: var(--lx-board);
}

.board-row {
	display: flex;
	gap: calc(3.921 * var(--u));
}

.selection-preview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: calc(41.168 * var(--u));
	margin-top: calc(11.762 * var(--u));
	padding: 0 calc(13.723 * var(--u));
	border-radius: calc(11.762 * var(--u));
	background-color: var(--lx-selection);
	line-height: 1.2;
	white-space: nowrap;
}

.selection-word {
	font-size: calc(19.604 * var(--u));
	font-weight: 800;
}

.selection-hint {
	color: var(--lx-muted);
	font-size: calc(13.723 * var(--u));
	font-weight: 700;
}

.tool-row {
	display: flex;
	justify-content: space-between;
	margin-top: calc(9.6 * var(--u));
	--tool-width: calc(109.783 * var(--u));
	--tool-height: calc(45.089 * var(--u));
	--tool-radius: calc(12.743 * var(--u));
	--tool-border: calc(0.98 * var(--u));
	--tool-font: calc(15.683 * var(--u));
}

.word-row {
	display: flex;
	justify-content: space-between;
	margin-top: calc(11.762 * var(--u));
	font-size: calc(15.683 * var(--u));
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
}

.game-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: calc(58.812 * var(--u));
	margin-top: calc(77.436 * var(--u));
	padding: calc(5.881 * var(--u)) 0;
	font-weight: 700;
	line-height: 1.1;
	white-space: nowrap;
}

.game-nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: calc(1.96 * var(--u));
	width: calc(70.182 * var(--u));
	padding: calc(3.921 * var(--u)) 0;
	border-radius: calc(7.842 * var(--u));
	color: var(--lx-muted);
}

.game-nav-item-active {
	background-color: var(--lx-lavender);
	color: var(--lx-purple);
}

.game-nav-icon {
	font-size: calc(19.604 * var(--u));
}

.game-nav-label {
	font-size: calc(12.743 * var(--u));
}

/* Tiles: one component, sized by --tile-size; letter, corner, shadow and multiplier scale from it. */

.tile {
	position: relative;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--tile-size);
	height: var(--tile-size);
	border: 1.3px solid var(--lx-tile-edge);
	border-radius: calc(var(--tile-size) * 0.225);
	background-color: var(--lx-white);
	color: var(--lx-tile-ink);
	font-size: calc(var(--tile-size) * 0.625);
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
	filter: drop-shadow(0 calc(var(--tile-size) * 0.05) 0 rgba(38, 18, 56, 0.13));
}

.tile-selected {
	border-color: transparent;
	background-color: var(--lx-yellow);
}

/* Hero loop states, set by js/hero-loop.js. Timing and easing follow the game's refill motion. */

.board[data-loop-refill] .board-row {
	overflow: clip;
	overflow-clip-margin: 4px;
}

.tile.is-clearing {
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.tile.is-spawning {
	animation: tile-refill-spawn 520ms cubic-bezier(0.48, 0.04, 0.22, 1) var(--spawn-delay, 0ms) both;
}

.tile.is-fresh:not(.tile-selected) {
	background-image: linear-gradient(var(--lx-fresh-start), var(--lx-fresh-end));
}

.selection-preview > * {
	transition: opacity 0.2s ease;
}

.selection-preview.is-cleared > * {
	opacity: 0;
}

@keyframes tile-refill-spawn {
	from {
		opacity: 0;
		transform: translateX(-115%);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.motion-toggle {
	visibility: hidden;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--lx-lavender);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.motion-toggle.is-ready {
	visibility: visible;
}

/* Icon toggle: pause bars while playing, a play triangle while paused. The name lives in aria-label. */

.motion-toggle-icon {
	position: absolute;
	bottom: 16px;
	left: calc(100% + var(--toggle-gap));
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: var(--toggle-size);
	height: var(--toggle-size);
	padding: 0;
	border: 1.5px solid rgba(233, 222, 255, 0.55);
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.08);
	text-decoration: none;
}

.motion-toggle-icon:hover {
	border-color: var(--lx-lavender);
	background-color: rgba(255, 255, 255, 0.16);
}

.motion-toggle-icon:focus-visible {
	outline: 3px solid var(--lx-yellow);
	outline-offset: 2px;
}

.motion-toggle-icon::before,
.motion-toggle-icon::after {
	content: '';
	width: 4px;
	height: 13px;
	border-radius: 1px;
	background-color: var(--lx-lavender);
}

.motion-toggle-icon.is-paused::before {
	width: 12px;
	height: 14px;
	margin-left: 3px;
	border-radius: 0;
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.motion-toggle-icon.is-paused::after {
	content: none;
}

@media (forced-colors: active) {
	.motion-toggle-icon::before,
	.motion-toggle-icon::after {
		background-color: ButtonText;
	}
}

.tile-silver,
.tile-gold {
	border-color: transparent;
	color: var(--lx-white);
}

.tile-silver {
	background-image: var(--lx-silver);
}

.tile-gold {
	background-image: var(--lx-gold);
}

.tile-cream {
	background-color: var(--lx-cream);
}

.tile-flat {
	border-color: transparent;
	color: var(--lx-navy);
	filter: none;
}

.tile-multiplier {
	position: absolute;
	top: calc(var(--tile-size) * 0.025);
	left: calc(var(--tile-size) * 0.6);
	font-size: calc(var(--tile-size) * 0.2);
	line-height: 1.2;
}

/* Tool pills: game tool colors; size comes from the surrounding illustration. */

.tool {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--tool-width);
	height: var(--tool-height);
	border: var(--tool-border) solid;
	border-radius: var(--tool-radius);
	color: var(--lx-navy);
	font-size: var(--tool-font);
	font-variant-emoji: text;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
}

.tool-swap {
	border-color: var(--lx-teal-edge);
	background-color: var(--lx-teal);
}

.tool-gap {
	border-color: var(--lx-coral-edge);
	background-color: var(--lx-coral);
}

.tool-buster {
	border-color: var(--lx-yellow-edge);
	background-color: var(--lx-yellow);
}

/* Introduction */

.intro-text {
	max-width: 960px;
	color: var(--lx-navy);
	font-size: 32px;
	line-height: 1.45;
	text-align: center;
}

/* Feature rows: illustration first in source; alternate rows mirror on wide screens only. */

.feature {
	display: flex;
	align-items: center;
	gap: 100px;
	width: 100%;
}

.feature-mirrored {
	flex-direction: row-reverse;
}

.feature-media {
	display: flex;
	flex: 0 1 520px;
	align-items: center;
	justify-content: center;
	min-width: 0;
	height: 320px;
	padding: 16px;
}

.feature-copy {
	display: flex;
	flex: 0 1 500px;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.feature-eyebrow {
	color: var(--lx-purple);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 1.12px;
}

.feature-title {
	margin: 0;
	color: var(--lx-navy);
	font-size: 40px;
	font-weight: 800;
	line-height: 1.3;
}

.feature-lead {
	font-size: 20px;
	line-height: 1.3;
}

.feature-points {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	font-size: 18px;
	line-height: 1.45;
	list-style: none;
}

.feature-point {
	position: relative;
	padding-left: 24px;
}

.feature-point::before {
	content: '•';
	position: absolute;
	left: 0;
	font-weight: 800;
}

.board-sample {
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	width: min(486px, 100%);
	--tile-size: 11.494cqw;
	--row-gap: 1.646cqw;
}

.board-sample .board-row {
	gap: 1.1495cqw;
}

.board-sample .board-row + .board-row {
	margin-top: var(--row-gap);
}

.tile-trio {
	display: flex;
	justify-content: center;
	gap: 24px;
	--tile-size: 108px;
}

.tile-glyph {
	font-size: calc(var(--tile-size) * 0.56);
	line-height: 1;
}

.tool-stack {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 420px;
	max-width: 100%;
	--tool-width: 220px;
	--tool-height: 72px;
	--tool-radius: 20px;
	--tool-border: 1.5px;
	--tool-font: 24px;
	--tool-step: 100px;
}

.tool-step-1 {
	margin-left: var(--tool-step);
}

.tool-step-2 {
	margin-left: calc(var(--tool-step) * 2);
}

/* Modes */

.modes-title {
	margin: 0;
	color: var(--lx-white);
	font-size: 48px;
	font-weight: 800;
	line-height: 1.3;
	text-align: center;
}

.mode-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.mode-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	padding: 36px 28px;
	border-radius: 16px;
	color: var(--lx-navy);
	text-align: center;
}

.mode-card-daily {
	background-color: var(--lx-purple);
	color: var(--lx-white);
}

.mode-card-rounds {
	background-color: var(--lx-paper);
}

.mode-card-endless {
	background-color: var(--lx-yellow);
}

.mode-scene {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 206px;
	--s: 1px;
}

.mode-title {
	margin: 0;
	color: inherit;
	font-size: 32px;
	font-weight: 800;
	line-height: 1.4;
}

.mode-text {
	font-size: 20px;
	line-height: 1.4;
}

.calendar {
	display: flex;
	flex-direction: column;
	gap: calc(10 * var(--s));
	width: calc(188 * var(--s));
	padding: calc(16 * var(--s));
	border-radius: calc(16 * var(--s));
	background-color: var(--lx-white);
	--tile-size: calc(30 * var(--s));
}

.calendar-bar {
	height: calc(14 * var(--s));
	margin: calc(3 * var(--s)) 0;
	border-radius: calc(5 * var(--s));
	background-color: var(--lx-lavender);
}

.calendar-row {
	display: flex;
	gap: calc(12 * var(--s));
}

.calendar-cell {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: calc(30 * var(--s));
	height: calc(29 * var(--s));
	border-radius: calc(7 * var(--s));
	background-color: var(--lx-paper);
	color: var(--lx-navy);
	font-size: calc(16 * var(--s));
	font-weight: 800;
	line-height: 1.3;
}

.calendar .tile {
	border: 0;
	background-color: var(--lx-yellow);
	color: var(--lx-navy);
}

.round-strips {
	display: flex;
	flex-direction: column;
	gap: calc(10 * var(--s));
	width: calc(248 * var(--s));
}

.round-strip {
	display: flex;
	justify-content: space-between;
	gap: calc(8 * var(--s));
	width: calc(210 * var(--s));
	padding: calc(12 * var(--s));
	border-radius: calc(12 * var(--s));
	background-color: var(--lx-white);
	color: var(--lx-navy);
	font-size: calc(16 * var(--s));
	font-weight: 800;
	line-height: 1.3;
	text-align: left;
}

.round-strip-step-1 {
	margin-left: calc(18 * var(--s));
}

.round-strip-step-2 {
	margin-left: calc(36 * var(--s));
}

.round-strip-current {
	background-color: var(--lx-coral);
}

.round-arrow {
	color: var(--lx-purple);
	font-size: calc(18 * var(--s));
	line-height: 1.2;
}

.round-strip-current .round-arrow {
	color: var(--lx-navy);
}

.tile-streams {
	display: flex;
	flex-direction: column;
	gap: calc(8 * var(--s));
	width: calc(260 * var(--s));
	--tile-size: calc(42 * var(--s));
}

.tile-stream {
	display: flex;
	gap: calc(8 * var(--s));
}

.tile-stream-step-1 {
	padding-left: calc(28 * var(--s));
}

.tile-stream-step-2 {
	padding-left: calc(10 * var(--s));
}

/* Closing call to action */

.closing-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 28px;
	width: min(760px, 100%);
}

.tile-word {
	display: flex;
	justify-content: center;
	gap: 10px;
	--tile-size: 52px;
}

.closing-title {
	margin: 0;
	color: var(--lx-navy);
	font-size: 56px;
	font-weight: 800;
	line-height: 1.3;
	text-align: center;
}

/* Footer */

.site-footer {
	padding: 32px 24px;
	background-color: var(--lx-white);
}

.site-footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: 1120px;
	margin: 0 auto;
}

.footer-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: var(--lx-footer-ink);
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em;
	font-size: 16px;
	line-height: 1.3;
}

.footer-link,
.footer-link:hover {
	color: var(--lx-footer-ink);
	text-decoration: none;
}

.footer-link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.footer-copyright {
	font-size: 14px;
}

.footer-credit-link {
	display: block;
	flex: none;
	border-radius: 4px;
	line-height: 0;
}

.footer-credit {
	display: block;
	flex: none;
	width: 153px;
	height: auto;
}

/* How to Play, Contact and Privacy: single reading column. */

.doc-page {
	background-color: var(--lx-paper);
}

.doc-page .section-container {
	align-items: stretch;
	gap: 48px;
	max-width: 784px;
	padding-top: 72px;
	padding-bottom: 96px;
}

.doc-header {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-bottom: 40px;
	border-bottom: 1.5px solid var(--lx-tile-edge);
}

.doc-eyebrow {
	margin: 0;
	color: var(--lx-purple);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
	text-transform: uppercase;
}

.doc-title {
	margin: 0;
	font-size: 48px;
	font-weight: 800;
	line-height: 1.15;
}

.doc-lead {
	margin: 0;
	font-size: 20px;
	line-height: 1.45;
}

.doc-status {
	align-self: flex-start;
	margin: 8px 0 0;
	padding: 8px 14px;
	border-radius: 10px;
	background-color: var(--lx-selection);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

.doc-section {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.doc-heading {
	margin: 0;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.25;
}

.doc-subheading {
	margin: 12px 0 0;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.3;
}

.doc-text,
.doc-list {
	margin: 0;
	font-size: 18px;
	line-height: 1.55;
}

.doc-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 0;
	list-style: none;
}

.doc-list-item {
	position: relative;
	padding-left: 24px;
}

.doc-list-item::before {
	content: '•';
	position: absolute;
	left: 0;
	font-weight: 800;
}

.doc-values {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
	gap: 8px 24px;
}

.doc-text a {
	color: var(--lx-purple);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}

.doc-text a:hover {
	color: var(--lx-purple-hover);
}

.doc-cta {
	margin-top: 8px;
}

/* Contact form: Breakdance Forms markup in site tokens. Field borders keep 3:1 against white. */

.contact-form .breakdance-form {
	--bde-form-gap: 20px;
	gap: 20px;
}

.contact-form .breakdance-form-field__label {
	color: var(--lx-navy);
	font-weight: 700;
	line-height: 1.3;
}

.contact-form .breakdance-form-field__input {
	border: 1.5px solid var(--lx-muted);
	border-radius: 12px;
	background-color: var(--lx-white);
	color: var(--lx-navy);
	font-size: 16px;
}

.contact-form .breakdance-form-field__input:focus-visible {
	outline: 3px solid var(--lx-purple);
	outline-offset: 2px;
}

.contact-form textarea.breakdance-form-field__input {
	min-height: 160px;
}

.contact-form .breakdance-form-button {
	min-height: 52px;
	padding: 14px 24px;
	border-radius: 16px;
	background-color: var(--lx-purple);
	font-size: 18px;
	font-weight: 800;
}

.contact-form .breakdance-form-button:hover {
	background-color: var(--lx-purple-hover);
}

.contact-form .breakdance-form-message {
	margin-top: 16px;
	padding: 14px 16px;
	border-radius: 12px;
	font-weight: 700;
}

.contact-form .breakdance-form-message:focus {
	outline: 3px solid var(--lx-purple);
	outline-offset: 2px;
}

/* Help page figures. The visual is aria-hidden; the figcaption is its text equivalent. */

.doc-figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin: 8px 0 0;
	padding: 28px 24px 24px;
	border: 1.5px solid var(--lx-tile-edge);
	border-radius: 20px;
	background-color: var(--lx-white);
}

.doc-caption {
	align-self: stretch;
	margin: 0;
	font-size: 16px;
	line-height: 1.55;
}

/* Board loop on the Help page: the hero board at its own width, driven by js/hero-loop.js. */

.board-demo {
	--u: calc(100cqw / 350.912);
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	width: min(100%, 400px);
}

.board-demo .board {
	margin-top: 0;
}

.doc-motion-toggle {
	align-self: center;
	color: var(--lx-purple);
}

.doc-motion-toggle:hover {
	color: var(--lx-purple-hover);
}

/* Static tool diagrams: before and after, with the game's tool selection colors. */

.tool-example-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	width: 100%;
}

.tool-example-step {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.tool-example-label {
	margin: 0;
	color: var(--lx-muted);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Top margin matches the label height plus gap, so the arrow centers on the boards. */
.tool-example-arrow {
	flex: none;
	margin: 28px 0 0;
	color: var(--lx-muted);
	font-size: 24px;
	font-weight: 800;
	line-height: 1;
}

.mini-board {
	--tile-size: 11.275cqw;
	--mini-gap: 1.4cqw;
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 320px;
	padding: 6px;
	border-radius: 12px;
	background-color: var(--lx-board);
}

.mini-board .board-row {
	gap: var(--mini-gap);
}

.mini-board .board-row + .board-row {
	margin-top: var(--mini-gap);
}

.tile-swap-pick,
.tile-gap-pick,
.tile-buster-pick {
	box-shadow: inset 0 0 0 1px var(--pick-edge);
	border-color: var(--pick-edge);
}

.tile-swap-pick {
	--pick-edge: var(--lx-teal-edge);
	background-image: var(--lx-swap-pick);
}

.tile-gap-pick {
	--pick-edge: var(--lx-coral-edge);
	background-image: var(--lx-gap-pick);
}

.tile-buster-pick {
	--pick-edge: var(--lx-yellow-edge);
	background-image: var(--lx-buster-pick);
}

.tile-new {
	background-image: linear-gradient(var(--lx-fresh-start), var(--lx-fresh-end));
}

/* Tablet landscape */

@media (max-width: 1119px) {
	.feature {
		gap: 48px;
	}

	/* The motion toggle sits in the gap beside the device. */
	.hero .section-container {
		gap: 64px;
	}
}

/* Tablet portrait: the hero stays two columns; feature rows stack. */

@media (max-width: 1023px) {
	.hero .section-container {
		padding-top: 40px;
	}

	.hero-copy {
		flex: 1 1 0;
		gap: 20px;
		padding-block: 32px;
	}

	.hero-eyebrow {
		font-size: 18px;
	}

	.hero-title {
		font-size: clamp(38px, 4.8vw, 48px);
	}

	.hero-lead {
		font-size: 18px;
	}

	/* Fluid buttons share a row when both labels fit; otherwise they wrap. */
	.hero .button-group {
		width: 100%;
	}

	.hero .button {
		width: auto;
		min-width: min(150px, 100%);
	}

	.device {
		--device-w: clamp(300px, 38vw, 360px);
		padding: 7.832px;
		border-radius: 40.28px;
	}

	.device-screen {
		border-radius: 31.329px;
	}

	.feature,
	.feature-mirrored {
		flex-direction: column;
		align-items: flex-start;
		gap: 28px;
		max-width: 560px;
	}

	/* Stacked feature art is capped at 320px and starts at the copy's left edge; sizes follow the desktop
	   proportions (tile trio 372px, tool stack 420px wide). */
	.feature-media {
		container-type: inline-size;
		flex: none;
		justify-content: flex-start;
		width: 100%;
		max-width: 320px;
		height: auto;
		padding: 0;
	}

	.board-sample {
		width: 100%;
	}

	.tile-trio {
		gap: calc(100cqw * 24 / 372);
		--tile-size: calc(100cqw * 108 / 372);
	}

	.tool-stack {
		gap: calc(100cqw * 24 / 420);
		width: 100%;
		--tool-width: calc(100cqw * 220 / 420);
		--tool-height: calc(100cqw * 72 / 420);
		--tool-radius: calc(100cqw * 20 / 420);
		--tool-border: max(1px, calc(100cqw * 1.5 / 420));
		--tool-font: calc(100cqw * 24 / 420);
		--tool-step: calc(100cqw * 100 / 420);
	}

	.feature-copy {
		flex: none;
		width: 100%;
		max-width: 560px;
	}

	.features .section-container {
		align-items: center;
		gap: 72px;
	}

	.mode-cards {
		grid-template-columns: minmax(0, 1fr);
		width: 100%;
		max-width: 480px;
		margin: 0 auto;
	}
}

/* Phone landscape: mobile composition from the 390 design. */

@media (max-width: 767px) {
	.site-nav {
		display: none;
	}

	.hero {
		background-image: linear-gradient(108deg, var(--lx-navy) 0%, var(--lx-navy-soft) 71.429%);
	}

	.hero .section-container {
		flex-direction: column;
		align-items: center;
		gap: 12px;
		padding-top: 32px;
		padding-bottom: 56px;
	}

	.hero-copy {
		flex: none;
		align-self: stretch;
		align-items: center;
		padding-block: 0;
		text-align: center;
	}

	.hero-title {
		font-size: 40px;
	}

	.hero-lead {
		font-size: 20px;
	}

	.hero .button-group {
		justify-content: center;
		width: 100%;
		max-width: 420px;
	}

	.hero .button {
		flex: 1 1 auto;
		min-width: 0;
		padding-inline: 14px;
	}

	/* Room for the toggle on the right; the device and toggle center together. */
	.hero-media {
		align-self: center;
		padding-right: calc(var(--toggle-size) + var(--toggle-gap));
	}

	.hero-media .motion-toggle-icon {
		right: 0;
		left: auto;
	}

	/* Cropped at the board's bottom edge: rows 1 to 7, where WAKES forms, stay opaque and the fade completes
	   across row 8. Ratios are the board offsets over the screen width (device width less its padding). */
	.device {
		--device-w: min(320px, calc(100vw - 48px - var(--toggle-size) - var(--toggle-gap)));
		--screen-w: calc(var(--device-w) - 15.664px);
		max-height: calc(var(--screen-w) * 1.2742 + 7.832px);
		-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--screen-w) * 0.1255), transparent);
		mask-image: linear-gradient(to bottom, #000 calc(100% - var(--screen-w) * 0.1255), transparent);
	}

	.intro .section-container {
		padding-top: 56px;
		padding-bottom: 56px;
	}

	.intro-text {
		font-size: 24px;
	}

	.features .section-container {
		gap: 64px;
		padding-top: 48px;
		padding-bottom: 72px;
	}

	.feature-eyebrow {
		font-size: 13px;
		letter-spacing: 1.04px;
	}

	.feature-title {
		font-size: 32px;
	}

	.board-sample {
		--row-gap: 1.504cqw;
	}

	.modes .section-container {
		gap: 32px;
		padding-top: 56px;
		padding-bottom: 56px;
	}

	.modes-title {
		font-size: 36px;
	}

	.mode-cards {
		gap: 20px;
	}

	.mode-card {
		padding: 28px 24px;
	}

	.closing .section-container {
		padding-top: 64px;
		padding-bottom: 64px;
	}

	.tile-word {
		--tile-size: 44px;
	}

	.closing-title {
		font-size: 40px;
	}

	.closing .button-group {
		flex-direction: column;
		align-items: center;
	}

	.site-footer-inner {
		flex-direction: column;
		gap: 20px;
	}

	.footer-meta {
		align-items: center;
		text-align: center;
	}

	.footer-links {
		justify-content: center;
	}

	.doc-page .section-container {
		gap: 40px;
		padding-top: 48px;
		padding-bottom: 64px;
	}

	.doc-header {
		padding-bottom: 32px;
	}

	.doc-title {
		font-size: 36px;
	}

	.doc-lead {
		font-size: 18px;
	}

	.doc-heading {
		font-size: 26px;
	}

	.doc-subheading {
		font-size: 20px;
	}

	.doc-text,
	.doc-list {
		font-size: 17px;
	}

	.doc-figure {
		padding: 24px 16px 20px;
	}

	.tool-example-steps {
		flex-direction: column;
		gap: 12px;
	}

	.tool-example-step {
		width: 100%;
	}

	.tool-example-arrow {
		margin-top: 0;
		transform: rotate(90deg);
	}
}

/* Phone portrait: keep the 390 composition intact down to 320. */

@media (max-width: 479px) {
	.hero-title {
		font-size: clamp(32px, 10.2vw, 40px);
	}

	.mode-scene {
		--s: min(1px, calc((100vw - 96px) / 260));
	}

	.modes-title {
		font-size: clamp(30px, 9.2vw, 36px);
	}

	.closing-title {
		font-size: clamp(34px, 10.2vw, 40px);
	}

	.doc-title {
		font-size: clamp(30px, 9.2vw, 36px);
	}
}

/* Without motion the toggle stays hidden, so the device takes the full width again. */

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	.hero-media {
		padding-right: 0;
	}

	.device {
		--device-w: min(320px, calc(100vw - 48px));
	}
}
