/* Ball Battle Lab website. The game's charcoal world: fighter colors are the only accents. */

:root {
	--ground: #0f1216;
	--panel: #161b21;
	--raised: #1e242c;
	--line: #2c343e;
	--line-2: #3b4551;
	--tab: #27313c;
	--hover: #29323d;
	--press: #35404d;
	--text: #f1f4f8;
	--muted: #8f9aa7;
	--disabled: #191e25;
	--text-disabled: #8c96a3;
	--focus: #b9d5ea;
	--display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--body: "Barlow", "Helvetica Neue", Arial, sans-serif;
	--gutter: clamp(16px, 3.2vw, 44px);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	color-scheme: dark;
}

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

html {
	background: var(--ground);
	scrollbar-color: var(--line-2) var(--ground);
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 80px;
}

body {
	margin: 0;
	background: var(--ground);
	color: var(--text);
	font: 400 1.0625rem/1.55 var(--body);
	caret-color: var(--text);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

::selection { background: var(--focus); color: var(--ground); }

img, video, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3 {
	margin: 0;
	font-family: var(--display);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.005em;
	text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--text); text-decoration-color: var(--line-2); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--text); }

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

.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 50;
	padding: 10px 14px;
	border-radius: 12px;
	background: var(--text);
	color: var(--ground);
	font: 700 1.1rem var(--display);
	text-decoration: none;
}
.skip:focus { top: 12px; }

.big { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); line-height: 1.4; }
.small { font-size: 0.875rem; color: var(--muted); }

/* ---------- buttons ---------- */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	background: var(--raised);
	color: var(--text);
	font: 700 1.25rem/1 var(--display);
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, transform 0.14s var(--ease-out);
	-webkit-tap-highlight-color: transparent;
}
.button:hover { background: var(--hover); }
.button:active { background: var(--press); transform: scale(0.97); }
.button.primary { min-height: 52px; padding: 0 24px; background: var(--text); color: var(--ground); font-size: 1.4rem; }
.button.primary:hover { background: #fff; }
.button.primary:active { background: #c4ced9; }
.button.quiet { background: transparent; }
.button.quiet:hover { background: var(--raised); }
.button.small { min-height: 40px; padding: 0 14px; font-size: 1.15rem; }
.button.icon-only { width: 44px; min-height: 44px; padding: 0; }
.button.icon-only svg { width: 18px; height: 18px; }
.button:disabled, .button[aria-disabled="true"] { background: var(--disabled); color: var(--text-disabled); cursor: default; transform: none; }

/* ---------- header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: var(--ground);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s;
}
.site-header[data-scrolled] { border-bottom-color: var(--line); }
.site-header .bar {
	display: flex;
	align-items: center;
	gap: clamp(8px, 2vw, 24px);
	max-width: 1520px;
	height: 64px;
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.wordmark {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	color: var(--text);
	font: 700 1.4rem/1 var(--display);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}
.wordmark .mark { width: 24px; height: 30px; flex: none; }

.nav { margin-left: auto; }
.nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 10px;
	color: var(--muted);
	font-size: 1rem;
	text-decoration: none;
	transition: color 0.15s, background-color 0.15s;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--text); }

@media (max-width: 719px) {
	.nav .wide, .nav li:first-child { display: none; }
	.wordmark { font-size: 1.2rem; }
	.wordmark .mark { width: 20px; height: 25px; }
}

/* ---------- bracket (home hero) ---------- */

.hero { max-width: 1560px; margin: 0 auto; padding: 12px var(--gutter) 24px; }

.bracket {
	--gap: clamp(14px, 1.7vw, 30px);
	--label-h: 34px;
	--body-h: clamp(452px, calc(100svh - 250px), 560px);
	--final-h: 132px;
	--slot-h: 42px;
	position: relative;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(284px, 1.45fr) repeat(3, minmax(0, 1fr));
	grid-template-rows: auto auto;
	column-gap: var(--gap);
}
.bracket-rounds { display: contents; }
.bracket .spacer, .bracket .tabs { display: none; }

.round { position: relative; z-index: 1; grid-row: 1; }
.round.left[data-round="0"] { grid-column: 1; }
.round.left[data-round="1"] { grid-column: 2; }
.round.left[data-round="2"] { grid-column: 3; }
.round.right[data-round="2"] { grid-column: 5; }
.round.right[data-round="1"] { grid-column: 6; }
.round.right[data-round="0"] { grid-column: 7; }

.round-name {
	height: var(--label-h);
	color: var(--muted);
	font: 400 0.875rem/var(--label-h) var(--body);
	text-align: center;
	white-space: nowrap;
}

.matches {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	height: var(--body-h);
	margin: 0;
	padding: 0;
	list-style: none;
}

.match { position: relative; display: grid; gap: 6px; }

.slot {
	--c: var(--line-2);
	position: relative;
	display: flex;
	align-items: center;
	gap: 7px;
	width: 100%;
	min-width: 0;
	height: var(--slot-h);
	padding: 0 10px 0 7px;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: var(--panel);
	color: var(--text);
	font: 700 1rem/1 var(--display);
	letter-spacing: 0.02em;
	text-align: left;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, opacity 0.2s, transform 0.16s var(--ease-out);
	-webkit-tap-highlight-color: transparent;
}
.slot .seed { flex: none; min-width: 1.35em; color: var(--muted); font: 400 0.8rem/1 var(--body); letter-spacing: 0; font-variant-numeric: tabular-nums; text-align: center; }
.slot .icon { flex: none; width: 28px; height: 24px; object-fit: contain; }
.slot .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot:hover:not(:disabled) { border-color: var(--c); background: color-mix(in oklab, var(--c) 10%, var(--panel)); }
.slot:active:not(:disabled) { transform: scale(0.97); }
.slot[aria-pressed="true"] { border-color: var(--c); background: color-mix(in oklab, var(--c) 20%, var(--panel)); }
.slot.is-out { opacity: 0.4; }
.slot.is-out:hover { opacity: 0.75; }
.slot.is-empty { border-style: dashed; background: transparent; cursor: default; }
.slot.is-empty .name { color: var(--muted); font: 400 0.8rem/1 var(--body); letter-spacing: 0; text-transform: none; }
.slot.is-new { animation: arrive 0.42s var(--ease-out); }
@keyframes arrive { from { transform: scale(0.9); background: color-mix(in oklab, var(--c) 45%, var(--panel)); } }

.round.right .slot { flex-direction: row-reverse; padding: 0 7px 0 10px; text-align: right; }

.to-room {
	position: absolute;
	top: 50%;
	right: calc(var(--gap) / -2 - 14px);
	z-index: 3;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	margin-top: -14px;
	padding: 0;
	border: 1px solid var(--line-2);
	border-radius: 50%;
	background: var(--raised);
	color: var(--muted);
	cursor: pointer;
	transition: color 0.15s, background-color 0.15s, transform 0.14s var(--ease-out);
}
.to-room svg { width: 12px; height: 12px; margin-left: 2px; fill: currentColor; }
.to-room:hover { color: var(--text); background: var(--hover); }
.to-room:active { transform: scale(0.92); }
.to-room:disabled { visibility: hidden; }
.round.right .to-room { right: auto; left: calc(var(--gap) / -2 - 14px); }
.to-room.is-open { color: var(--ground); background: var(--text); border-color: var(--text); }

.lines { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lines path { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-linejoin: round; }
.lines path.won { stroke: var(--c); stroke-width: 2.5; }

.bracket-center {
	position: relative;
	z-index: 2;
	grid-column: 4;
	grid-row: 1;
	display: grid;
	grid-template-rows: calc(var(--label-h) + var(--body-h) / 2 - var(--final-h) / 2) var(--final-h) auto;
	justify-items: center;
	text-align: center;
}
.bracket-center > .intro { align-self: end; padding-bottom: 18px; }
.bracket-center h1 { font-size: clamp(4rem, 3rem + 3vw, 6rem); line-height: 0.86; letter-spacing: -0.01em; }
.bracket-center .lede { max-width: 30ch; margin: 14px auto 0; color: var(--muted); font-size: 1.05rem; line-height: 1.45; }

.final { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: 100%; }
.final .slot { flex-direction: column; justify-content: center; gap: 5px; height: 96px; padding: 8px 4px; text-align: center; cursor: default; }
.final .slot .seed { order: 3; }
.final .slot .icon { width: 42px; height: 36px; }
.final .slot:not(.is-empty) { border-color: var(--c); background: color-mix(in oklab, var(--c) 14%, var(--panel)); }
.final .slot.is-empty .name { white-space: normal; line-height: 1.25; }

.champion { display: grid; justify-items: center; gap: 6px; width: 104px; }
.champion .ball {
	position: relative;
	display: grid;
	place-items: center;
	width: 92px;
	height: 92px;
	border: 2px solid var(--line-2);
	border-radius: 50%;
	background: radial-gradient(circle at 50% 38%, var(--raised), var(--panel) 70%);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}
.champion .q { color: var(--muted); font: 700 3.6rem/1 var(--display); transform: translateY(2px); }
.champion .ball img { position: absolute; inset: -18%; width: 136%; height: 136%; max-width: none; object-fit: contain; }
.champion.has-champion .ball { border-color: var(--c); }
.champion .label { color: var(--muted); font-size: 0.8rem; line-height: 1.25; text-wrap: balance; }
.champion.has-champion .label { color: var(--text); font: 700 1rem/1.1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; }
.champion-ask { display: flex; gap: 6px; }
.champion-ask .button { min-height: 36px; padding: 0 10px; font-size: 1rem; }

.center-actions { display: grid; justify-items: center; gap: 10px; padding-top: 18px; }
.center-actions .hint { color: var(--muted); font-size: 0.9rem; }
.picker-actions { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.picker-actions .button { min-height: 40px; font: 400 0.95rem/1 var(--body); color: var(--muted); }
.picker-actions .button:hover { color: var(--text); }

.bracket .caption { grid-column: 1 / -1; grid-row: 2; margin-top: 10px; color: var(--muted); font-size: 0.875rem; text-align: center; }

/* Laptop widths: the same bracket, a little tighter. Later rounds drop the icon; the colored slot names them. */
@media (min-width: 1180px) and (max-width: 1439px) {
	.hero { --gutter: 24px; }
	.bracket { --gap: 18px; }
	.slot { gap: 5px; padding: 0 7px 0 5px; font-size: 0.95rem; letter-spacing: 0.01em; }
	.round.right .slot { padding: 0 5px 0 8px; }
	.slot .seed { min-width: 1.15em; }
	.round:not([data-round="0"]) .slot .icon { display: none; }
	.round:not([data-round="0"]) .slot { padding-left: 10px; }
	.round.right:not([data-round="0"]) .slot { padding-right: 10px; }
}

/* Round tabs below the two-sided width. */
@media (max-width: 1179px) {
	.hero { padding-top: 20px; }
	.bracket { display: block; --slot-h: 48px; }
	.round-name { display: none; }
	.bracket-center { display: grid; grid-template-rows: none; justify-items: start; text-align: left; gap: 0; }
	.bracket-center > .intro { padding-bottom: 0; }
	.bracket-center h1 { font-size: clamp(3.75rem, 2.4rem + 7vw, 5.5rem); }
	.bracket-center .lede { margin: 12px 0 0; max-width: 34ch; font-size: 1.1rem; }
	.center-actions { order: -1; grid-row: 2; justify-items: start; padding-top: 20px; }
	.bracket-center > .intro { grid-row: 1; }
	.final { grid-row: 3; margin-top: 24px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
	.picker-actions { grid-row: 4; justify-content: flex-start; margin: 10px 0 0 -14px; }
	.final .slot { height: 88px; }
	.champion { text-align: center; }
	.bracket .tabs {
		position: sticky;
		top: 64px;
		z-index: 6;
		display: flex;
		gap: 4px;
		margin: 16px -6px 0;
		padding: 4px;
		border: 6px solid var(--ground);
		border-radius: 18px;
		background: var(--panel);
		background-clip: padding-box;
	}
	.tab {
		display: inline-flex;
		flex: 1;
		align-items: center;
		justify-content: center;
		gap: 6px;
		min-height: 44px;
		padding: 0 6px;
		border: 0;
		border-radius: 9px;
		background: transparent;
		color: var(--muted);
		font: 700 1.05rem/1 var(--display);
		cursor: pointer;
	}
	.tab[aria-selected="true"] { background: var(--tab); color: var(--text); }
	.tab .count { color: var(--muted); font: 400 0.75rem/1 var(--body); font-variant-numeric: tabular-nums; }
	.bracket-rounds { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
	.bracket .round.left, .bracket .round.right { display: none; grid-column: auto; grid-row: auto; }
	.bracket[data-tab="0"] .round[data-round="0"], .bracket[data-tab="1"] .round[data-round="1"], .bracket[data-tab="2"] .round[data-round="2"] { display: block; }
	.round.right { order: 2; }
	.matches { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 14px; height: auto; }
	.match { padding-right: 54px; }
	.round.right .slot { flex-direction: row; padding: 0 10px 0 7px; text-align: left; }
	.to-room, .round.right .to-room { left: auto; right: 0; width: 44px; height: 44px; margin-top: -22px; }
	.to-room svg { width: 14px; height: 14px; }
	.bracket .caption { margin-top: 18px; text-align: left; }
}
@media (min-width: 700px) and (max-width: 1179px) {
	.bracket-rounds { grid-template-columns: 1fr 1fr; column-gap: 28px; }
	.bracket-center { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: 32px; align-items: end; }
	.bracket-center > .intro { grid-column: 1; }
	.center-actions { grid-column: 1; }
	.final { grid-column: 2; grid-row: 1 / 3; margin-top: 0; }
	.picker-actions { grid-column: 2; grid-row: 3; }
}

/* ---------- match room ---------- */

.room-section { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.room { max-width: 1380px; margin: 0 auto; padding: 0 var(--gutter); }
.room-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 16px; margin-bottom: 32px; }
.room-head h2 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); text-transform: uppercase; letter-spacing: 0.01em; }
.room-head h2 [data-r] { color: color-mix(in oklab, var(--c) 88%, white); }
.room-head .vs { color: var(--muted); font-size: max(1.25rem, 0.5em); vertical-align: 0.35em; padding-inline: 0.2em; text-transform: lowercase; }
.room-meta { grid-column: 1; color: var(--muted); }
.stepper { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 4px; }

.room-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) minmax(0, 1fr); gap: clamp(24px, 3.5vw, 56px); align-items: start; }

.tape { --c: var(--line-2); display: grid; gap: 10px; }
.tape .token { width: 132px; height: 132px; margin: -12px 0 -6px -14px; }
.tape-name { color: color-mix(in oklab, var(--c) 88%, white); font-size: 2.4rem; text-transform: uppercase; letter-spacing: 0.02em; }
.tape-meta { color: var(--muted); }
.tape-stats { display: flex; gap: 20px; color: var(--muted); }
.tape-stats b { color: var(--text); font: 700 1.8rem/1 var(--display); margin-right: 4px; font-variant-numeric: tabular-nums; }
.tape-moves { display: grid; gap: 16px; margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.move h4, .move h3 { margin: 0; font: 700 1.3rem/1.1 var(--display); letter-spacing: 0.01em; }
.move .kind { margin-left: 4px; color: var(--muted); font: 400 0.85rem/1 var(--body); letter-spacing: 0; }
.tape-moves p { margin-top: 6px; line-height: 1.5; }
.tape-tip { padding-top: 14px; border-top: 1px solid var(--line); font-size: 1.15rem; line-height: 1.4; }

.screen { display: grid; gap: 18px; }
.frame { position: relative; overflow: hidden; aspect-ratio: 9 / 16; border: 1px solid var(--line); border-radius: 3px; background: #0b0e11; }
.frame video, .frame > img { width: 100%; height: 100%; object-fit: cover; }
/* The poster's VS card owns the middle; the button sits in the empty band under the meters. */
.clip-toggle { position: absolute; inset: 0; display: grid; place-items: end center; width: 100%; padding: 0 0 8%; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.clip-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--text); color: var(--ground); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45); transition: opacity 0.2s, transform 0.16s var(--ease-out); }
.clip-icon svg { width: 30px; height: 30px; fill: currentColor; }
.clip-toggle:hover .clip-icon { transform: scale(1.05); }
.clip-toggle:active .clip-icon { transform: scale(0.95); }
.clip-toggle .i-pause, .clip.is-playing .clip-toggle .i-play { display: none; }
.clip.is-playing .clip-toggle .i-pause { display: block; }
.clip.is-playing .clip-icon { opacity: 0; }
.clip.is-playing .clip-toggle:focus-visible .clip-icon, .clip.is-playing .clip-toggle:hover .clip-icon { opacity: 0.9; }
.clip-toggle:focus-visible { outline-offset: -4px; }
.clip-sound { position: absolute; right: 10px; bottom: 16px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 18, 22, 0.72); color: var(--text); cursor: pointer; }
.clip-sound svg { width: 22px; height: 22px; fill: currentColor; }
.clip-sound .i-off, .clip-sound[aria-pressed="true"] .i-on { display: none; }
.clip-sound[aria-pressed="true"] .i-off { display: block; }
.clip:not(.has-started) .clip-sound { display: none; }
.clip-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(241, 244, 248, 0.14); }
.clip-progress i { display: block; height: 100%; background: var(--text); transform: scaleX(0); transform-origin: left; }
.frame.is-empty .clip-toggle, .frame.is-empty .clip-sound, .frame.is-empty .clip-progress { display: none; }
.clip-code { margin-top: -8px; color: var(--muted); font-size: 0.875rem; text-align: center; }
.clip-code b { color: var(--text); font: 700 1rem/1 var(--display); letter-spacing: 0.03em; }
.no-clip { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }
.call-label { margin-bottom: 8px; color: var(--muted); font-size: 0.9rem; text-align: center; }
.call-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.button.pick { --c: var(--line-2); min-height: 48px; border: 1px solid color-mix(in oklab, var(--c) 55%, var(--line)); background: var(--panel); text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.15rem; }
.button.pick:hover { background: color-mix(in oklab, var(--c) 12%, var(--panel)); }
.button.pick[aria-pressed="true"] { border-color: var(--c); background: color-mix(in oklab, var(--c) 26%, var(--panel)); }
.verdict { padding: 14px 16px; border-radius: 12px; background: var(--panel); line-height: 1.45; }
.verdict b { font: 700 1.2rem/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; }
.h2h-label { margin-bottom: 8px; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.h2h-bar { display: flex; gap: 3px; height: 10px; }
.h2h-bar i { display: block; min-width: 3px; border-radius: 2px; background: var(--c); }
.room-links { display: grid; gap: 4px; }
.room-links .button { width: 100%; }
.tally { color: var(--muted); font-size: 0.9rem; text-align: center; }

@media (max-width: 1023px) {
	.room-body { grid-template-columns: 1fr 1fr; }
	.screen { grid-column: 1 / -1; grid-row: 1; max-width: 400px; width: 100%; justify-self: center; }
}
@media (max-width: 639px) {
	.room-head { grid-template-columns: 1fr; }
	.stepper { grid-column: 1; grid-row: auto; }
	.room-body { grid-template-columns: 1fr; }
	.tape-name { font-size: 2rem; }
}

/* ---------- sections ---------- */

.section { max-width: 1380px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gutter) 0; }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2, .clips-copy h2, .phones h2, .page-close h2 { font-size: clamp(2.6rem, 1.8rem + 3.2vw, 4.5rem); }
.section-head p { color: var(--muted); font-size: 1.15rem; max-width: 56ch; }

/* How a fight works: a fight clock down the left, the frame swaps as you read. */
.rules { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.rules-frame { position: sticky; top: 96px; }
.rule-list { margin: 0; padding: 0; list-style: none; }
.rule { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; padding: 30px 0 34px; border-top: 1px solid var(--line); }
.rule h3, .rule .clock { transition: color 0.25s; }
.rule:last-child { border-bottom: 1px solid var(--line); }
.rule .clock { padding-top: 6px; color: var(--muted); font: 700 1.25rem/1 var(--display); letter-spacing: 0.03em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.rule h3 { font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.6rem); }
.rule p { max-width: 52ch; margin-top: 12px; color: var(--muted); font-size: 1.1rem; }
.rule-still { display: none; }
@media (min-width: 900px) {
	.rules[data-live] .rule:not([data-active]) h3 { color: var(--muted); }
	.rule[data-active] .clock { color: var(--text); }
}
@media (max-width: 899px) {
	.rules { grid-template-columns: 1fr; }
	.rules-frame { display: none; }
	.rule { grid-template-columns: 64px minmax(0, 1fr) 84px; gap: 14px; padding: 22px 0; }
	.rule .clock { font-size: 1.05rem; }
	.rule p { font-size: 1rem; margin-top: 8px; }
	.rule-still { display: block; width: 84px; height: auto; aspect-ratio: 9 / 16; border: 1px solid var(--line); border-radius: 3px; object-fit: cover; }
}

/* Made for clips */
.clips-grid { display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 620px); gap: clamp(32px, 7vw, 110px); align-items: center; }
.clips-frame { margin: 0; }
.clips-copy { display: grid; gap: 18px; justify-items: start; }
.clips-copy > p:not(.big) { color: var(--muted); max-width: 54ch; }
.onscreen { display: grid; gap: 10px; margin: 6px 0 8px; padding: 0; list-style: none; }
.onscreen li { display: flex; gap: 12px; align-items: baseline; }
.onscreen li::before { content: ""; flex: none; width: 9px; height: 9px; border: 2px solid var(--muted); border-radius: 50%; transform: translateY(-1px); }
@media (max-width: 759px) {
	.clips-grid { grid-template-columns: 1fr; }
	.clips-frame { max-width: 300px; }
	.clips-copy { order: -1; }
}

/* Coming to phones + creator */
.phones-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 110px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.creator { padding-left: clamp(0px, 5vw, 72px); border-left: 1px solid var(--line); }
.phones .big { margin-top: 16px; color: var(--muted); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.store { display: grid; gap: 3px; min-width: 210px; padding: 14px 20px 15px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--ground); color: var(--text); text-decoration: none; }
.store-small, .store-platform { color: var(--muted); font-size: 0.8rem; line-height: 1.2; }
.store-name { font: 700 1.75rem/1 var(--display); letter-spacing: 0.01em; }
a.store:hover { border-color: var(--text); }
.creator h3 { font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.5rem); }
.creator p { margin-top: 12px; color: var(--muted); }
.socials { display: grid; margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.socials li { border-bottom: 1px solid var(--line); }
.social { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-height: 56px; padding: 16px 0; color: var(--text); text-decoration: none; }
a.social[href]:hover .platform { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.social[aria-disabled="true"] { cursor: default; }
.social .platform { font: 700 1.35rem/1 var(--display); letter-spacing: 0.01em; }
.social .handle { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 859px) {
	.phones-grid { grid-template-columns: 1fr; }
	.creator { padding-left: 0; padding-top: 36px; border-left: 0; border-top: 1px solid var(--line); }
	.store { min-width: 0; flex: 1 1 150px; }
}

/* Questions */
.faq-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 clamp(32px, 6vw, 96px); padding-bottom: clamp(64px, 9vw, 120px); }
.faq-section .section-head { margin: 0 0 32px; }
.faq { max-width: 880px; }
@media (max-width: 899px) { .faq-section { grid-template-columns: 1fr; } }
.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 18px 0; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); }
.qa summary svg { flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform 0.25s var(--ease-out); }
.qa[open] summary svg { transform: rotate(180deg); }
.qa summary:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--line-2); }
.qa p { max-width: 62ch; padding: 0 0 24px; color: var(--muted); font-size: 1.1rem; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 40px; max-width: 1380px; margin: 0 auto; padding: 56px var(--gutter) 32px; }
.footer-brand p { max-width: 34ch; margin-top: 14px; color: var(--muted); }
.footer-label { margin-bottom: 14px; color: var(--muted); font: 400 0.9rem/1.2 var(--body); letter-spacing: 0; }
.footer-nav ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.socials.compact { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; border-top: 0; }
.socials.compact li { border-bottom: 0; }
.socials.compact .social { display: inline-flex; justify-content: flex-start; gap: 10px; align-items: baseline; min-height: 36px; padding: 0; background: none; }
.socials.compact .social:hover .platform { text-decoration: underline; }
.socials.compact .platform { font: 400 1.0625rem/1.2 var(--body); }
.credits { width: min(1380px - 2 * var(--gutter), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 20px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.credits a { color: var(--muted); }
@media (max-width: 859px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 519px) {
	.footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- inner pages ---------- */

.page-head { display: grid; gap: 18px; justify-items: start; max-width: 1380px; margin: 0 auto; padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(3.25rem, 2rem + 5vw, 6rem); line-height: 0.9; }
.page-head .lede { max-width: 56ch; color: var(--muted); font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); line-height: 1.45; }

/* Fighters */
.jump { position: sticky; top: 64px; z-index: 20; border-block: 1px solid var(--line); background: var(--ground); }
.jump ol { display: flex; gap: 2px; max-width: 1380px; margin: 0 auto; padding: 6px var(--gutter); overflow-x: auto; list-style: none; scrollbar-width: thin; scroll-snap-type: x proximity; }
.jump li { flex: none; scroll-snap-align: start; }
.jump a { display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 6px 6px 8px; border-radius: 10px; color: var(--muted); font-size: 0.8rem; text-decoration: none; }
.jump a:hover { background: var(--panel); color: var(--text); }
.jump .icon { width: 36px; height: 31px; object-fit: contain; }

.reports { max-width: 1380px; margin: 0 auto; padding: 0 var(--gutter); }
.report { --c: var(--line-2); display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 150px; }
.report-art { position: relative; align-self: start; }
.report-art img { position: relative; width: 100%; height: auto; }
.report-body { display: grid; gap: 14px; align-content: start; }
.report-body h2 { color: color-mix(in oklab, var(--c) 88%, white); font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: 0.9; text-transform: uppercase; letter-spacing: 0.01em; }
.report-meta { color: var(--muted); }
.report-tip { max-width: 40ch; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.35; }
.report-stats { display: flex; gap: 24px; color: var(--muted); }
.report-stats b { margin-right: 4px; color: var(--text); font: 700 2.25rem/1 var(--display); font-variant-numeric: tabular-nums; }
.report-moves { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 10px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.report-moves .move h3 { font-size: 1.6rem; }
.report-moves p { margin-top: 8px; color: var(--muted); max-width: 46ch; }
.report-actions { margin-top: 8px; }
@media (max-width: 759px) {
	.report { grid-template-columns: 1fr; }
	.report-art { width: 190px; margin: 0 0 -12px -14px; }
	.report-moves { grid-template-columns: 1fr; }
}
.page-close { display: grid; gap: 14px; justify-items: start; max-width: 1380px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter); }
.page-close p:last-child { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.page-close > p:not(:last-child) { color: var(--muted); font-size: 1.15rem; }

/* Press and privacy */
.doc .page-head p:last-child .button { margin-top: 6px; }
.doc-section { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 760px); gap: 20px clamp(24px, 5vw, 72px); width: min(1380px - 2 * var(--gutter), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 44px 0; border-top: 1px solid var(--line); }
.doc-section > h2 { grid-column: 1; grid-row: 1; font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.6rem); }
.doc-section > :not(h2) { grid-column: 2; }
.doc-section .label { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.doc-section p:not(.big):not(.small) { max-width: 66ch; }
.prose p + p { margin-top: -4px; }
.facts { display: grid; margin: 0; }
.facts div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts div:first-child { padding-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.ticks { display: grid; gap: 10px; margin: 0; padding-left: 1.2em; }
.ticks li::marker { color: var(--muted); }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.downloads a { display: grid; gap: 8px; color: var(--text); font-size: 0.9rem; text-decoration: none; }
.downloads img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); transition: border-color 0.15s; }
.downloads a:hover img { border-color: var(--text); }
.downloads a:hover span { text-decoration: underline; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px 12px; margin: 8px 0 0; padding: 0; list-style: none; }
.swatches li { display: grid; gap: 4px; font-size: 0.85rem; }
.swatches .chip { height: 52px; border: 1px solid var(--line); border-radius: 9px; background: var(--c); }
.swatches code { color: var(--muted); font: 400 0.8rem/1 var(--body); font-variant-numeric: tabular-nums; }
@media (max-width: 759px) {
	.doc-section { grid-template-columns: 1fr; }
	.doc-section > h2, .doc-section > :not(h2) { grid-column: 1; grid-row: auto; }
	.facts div { grid-template-columns: 110px minmax(0, 1fr); }
}

/* 404 */
.missing-main { display: grid; place-items: center; min-height: calc(100svh - 64px - 1px); padding: 48px var(--gutter); }
.out { display: grid; justify-items: center; gap: 18px; text-align: center; }
.out h1 { font-size: clamp(3.5rem, 2.5rem + 5vw, 6rem); }
.out .lede { color: var(--muted); font-size: 1.2rem; }
.out p:last-child { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.out-arena { position: relative; width: 180px; height: 180px; margin-bottom: 12px; border: 1px solid var(--line-2); border-radius: 3px; background: #151b22; }
.out-ball { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: #f2c14e; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.28), 0 5px 0 rgba(0, 0, 0, 0.35); animation: escape 2.8s var(--ease-out) infinite; }
@keyframes escape {
	0% { transform: translate(-40px, 30px); opacity: 1; }
	35% { transform: translate(40px, -46px); }
	70% { transform: translate(130px, -10px); opacity: 1; }
	80%, 100% { transform: translate(150px, 0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
	html { scroll-behavior: auto; }
}
.socials.compact .handle { display: none; }
