/* Wallmosphere — website styles.
 *
 * The palette, the type and the geometry are lifted straight out of
 * themes/bluecat/theme.toml, because the site's job is to look like the product
 * it sells. The deep navy is the bar's background, the sky blue is the bar's
 * accent, the border blue is its border, and the 14 px corner radius is its
 * `corner_radius`. Amber and pink exist in exactly the three places the theme
 * itself allows them: a confetti burst, the like control and a real warning.
 *
 * The Content-Security-Policy is `style-src 'self'`, so a `style="…"` attribute
 * is dropped by the browser and never reaches the page. Every rule lives here.
 */

/* ---------------------------------------------------------------- tokens -- */

:root {
	/* Ground: the top of the BlueCat sky, one step darker than the theme's
	   surface colour so a navy panel reads as raised against it. */
	--void: #050d1c;
	--void-90: rgba(5, 13, 28, 0.9);
	--void-96: rgba(5, 13, 28, 0.96);

	/* [bar.colors] */
	--navy: #0e2448;
	--navy-lift: #16305a;
	--edge: 154, 198, 255; /* #9AC6FF, used through alpha */
	--fg: #eaf2ff;
	--muted: #8fb3e6;
	--dim: #6d88b4;
	--accent: #7cc4ff;
	--accent-warm: #a8d8ff;
	--indicator: #9ad0ff;

	/* [cursor].click_colors — the theme's only warm shades. */
	--warn: #ffd27f;
	--rose: #ffb3d9;
	--danger: #ff9a9a;

	--line: rgba(var(--edge), 0.14);
	--line-strong: rgba(var(--edge), 0.3);
	--glass: rgba(14, 36, 72, 0.55);
	--glass-lift: rgba(22, 48, 90, 0.72);

	/* [bar] geometry */
	--r-pill: 999px;
	--r-lg: 20px;
	--r: 14px;
	--r-sm: 10px;

	--shell: 1200px;
	--header-h: 66px;

	/* The window of live sky a page shows before the ground fades in. */
	--sky-window: 130px;

	--display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
	--text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
	--mono: "Cascadia Code", "Cascadia Mono", Consolas, ui-monospace, "SF Mono", monospace;

	--lift: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
	--halo: 0 0 0 1px var(--line), 0 30px 70px -32px rgba(124, 196, 255, 0.5);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--void);
	color: var(--fg);
	font-family: var(--text);
	font-size: 16px;
	line-height: 1.62;
	overflow-x: hidden;
}

/* ------------------------------------------------------------ the sky ---- */

/* One fixed canvas behind the whole site. It is the same scene the wallpaper
   shader draws — stars that twinkle, planets that bob, a streak every 14 s —
   at a fraction of the cost, and it is the reason the site feels awake. */
.sky {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(120% 90% at 78% -10%, rgba(28, 74, 140, 0.55), transparent 62%),
		radial-gradient(90% 70% at 10% 0%, rgba(14, 36, 72, 0.85), transparent 70%),
		linear-gradient(180deg, #0a1c3a 0%, #071531 45%, var(--void) 100%);
}

.sky-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

/* The aurora: a pale blue veil across the top of the sky, screen-blended,
   exactly like params[6]. */
.sky-aurora {
	position: absolute;
	inset: 0 0 auto;
	height: 62vh;
	mix-blend-mode: screen;
	opacity: 0.5;
	background:
		radial-gradient(70% 100% at 20% 0%, rgba(124, 196, 255, 0.16), transparent 60%),
		radial-gradient(50% 80% at 72% 6%, rgba(154, 208, 255, 0.13), transparent 65%);
	animation: aurora 26s ease-in-out infinite alternate;
}

@keyframes aurora {
	from {
		transform: translate3d(-3%, 0, 0) scaleY(1);
		opacity: 0.36;
	}
	to {
		transform: translate3d(3%, 2%, 0) scaleY(1.12);
		opacity: 0.62;
	}
}

.site-header,
main,
.site-footer {
	position: relative;
	z-index: 1;
}

/* main carries the ground. Above --sky-window it is transparent and the live
   sky shows through; below it the page settles onto solid dark so body text
   keeps its contrast. */
main {
	flex: 1 0 auto;
	background: linear-gradient(
		180deg,
		transparent 0,
		transparent var(--sky-window),
		var(--void-90) calc(var(--sky-window) + 260px),
		var(--void-96) calc(var(--sky-window) + 900px),
		var(--void-96) 100%
	);
	padding-bottom: clamp(70px, 9vw, 120px);
}

/* The home page holds the sky open all the way past the desktop mock; the auth
   pages and the 404 float their card in the open sky. */
main.is-home {
	--sky-window: 660px;
}

main.is-open-sky {
	--sky-window: 100vh;
}

/* --------------------------------------------------------------- basics -- */

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

img {
	max-width: 100%;
	display: block;
}

svg {
	display: block;
}

h1,
h2,
h3,
h4 {
	font-family: var(--display);
	line-height: 1.08;
	letter-spacing: -0.03em;
	margin: 0 0 0.5em;
	font-weight: 700;
	color: var(--fg);
}

h1 {
	font-size: clamp(2.4rem, 6.4vw, 4.3rem);
}

h2 {
	font-size: clamp(1.75rem, 3.6vw, 2.6rem);
}

h3 {
	font-size: 1.14rem;
	letter-spacing: -0.015em;
}

p {
	margin: 0 0 1em;
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 2.4rem 0;
}

code,
kbd,
samp {
	font-family: var(--mono);
}

.shell {
	width: 100%;
	max-width: var(--shell);
	margin: 0 auto;
	padding: 0 26px;
}

.shell-narrow {
	max-width: 720px;
}

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

.skip {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 60;
	padding: 10px 18px;
	border-radius: var(--r-sm);
	background: var(--accent);
	color: #06121f;
	font-weight: 650;
	transition: top 0.16s ease;
}

.skip:focus {
	top: 12px;
	text-decoration: none;
}

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

/* Eyebrows and data labels borrow the bar's own tracked-uppercase idiom
   ([bar].label = "TO THE MOON"). */
.eyebrow {
	font-family: var(--text);
	text-transform: uppercase;
	letter-spacing: 0.3em;
	font-size: 0.68rem;
	font-weight: 600;
	color: var(--muted);
	margin: 0 0 12px;
}

.label {
	text-transform: uppercase;
	letter-spacing: 0.22em;
	font-size: 0.68rem;
	font-weight: 600;
	color: var(--dim);
}

/* The one structural device on the site: a theme is three TOML tables, so the
   three things the app replaces are labelled with the table that configures
   them. The marker carries information rather than decorating a list. */
.toml-tag {
	font-family: var(--mono);
	font-size: 0.8rem;
	letter-spacing: 0;
	color: var(--accent);
	background: rgba(124, 196, 255, 0.08);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	padding: 2px 9px;
	display: inline-block;
}

.lede {
	color: var(--muted);
	font-size: clamp(1rem, 1.6vw, 1.16rem);
	line-height: 1.66;
}

.num {
	font-family: var(--mono);
	font-variant-numeric: tabular-nums;
}

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	height: var(--header-h);
	transition: background 0.25s ease, border-color 0.25s ease;
	border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
	background: rgba(5, 13, 28, 0.82);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border-bottom-color: var(--line);
}

.site-header .shell {
	display: flex;
	align-items: center;
	gap: 26px;
	height: 100%;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	color: var(--fg);
	font-family: var(--display);
	font-weight: 700;
	font-size: 1.02rem;
	letter-spacing: -0.01em;
	flex: none;
}

.brand:hover {
	text-decoration: none;
	color: var(--fg);
}

.brand-mark {
	width: 30px;
	height: 30px;
	flex: none;
	filter: drop-shadow(0 0 12px rgba(124, 196, 255, 0.45));
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brand:hover .brand-mark {
	transform: rotate(-8deg) scale(1.06);
}

.nav {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
	font-size: 0.93rem;
}

.nav a:not(.btn) {
	position: relative;
	color: var(--muted);
	padding: 7px 13px;
	border-radius: var(--r-pill);
	transition: color 0.18s ease, background 0.18s ease;
}

.nav a:not(.btn):hover {
	color: var(--fg);
	background: rgba(var(--edge), 0.08);
	text-decoration: none;
}

.nav a.is-active {
	color: var(--fg);
}

/* The running-app indicator from the bar, reused to mark the current page. */
.nav a.is-active::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 1px;
	width: 16px;
	height: 2px;
	margin-left: -8px;
	border-radius: 2px;
	background: var(--indicator);
	box-shadow: 0 0 10px var(--indicator);
}

.nav-cta {
	margin-left: 8px;
}

.avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: inline-grid;
	place-items: center;
	background: linear-gradient(155deg, var(--accent), #3a78c8);
	color: #04101f;
	font-weight: 700;
	font-size: 0.82rem;
	letter-spacing: 0;
}

.nav-toggle {
	display: none;
	margin-left: auto;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: var(--r-sm);
	border: 1px solid var(--line);
	background: var(--glass);
	color: var(--fg);
	cursor: pointer;
}

.nav-toggle svg {
	width: 20px;
	height: 20px;
	margin: auto;
}

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

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 11px 20px;
	border-radius: var(--r-pill);
	border: 1px solid var(--line-strong);
	background: var(--glass);
	color: var(--fg);
	font: inherit;
	font-size: 0.94rem;
	font-weight: 550;
	text-align: center;
	cursor: pointer;
	transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease,
		background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.btn:hover {
	text-decoration: none;
	border-color: rgba(var(--edge), 0.5);
	background: var(--glass-lift);
	transform: translateY(-2px);
}

.btn:active {
	transform: translateY(0);
}

.btn svg {
	width: 17px;
	height: 17px;
	flex: none;
}

.btn-primary {
	background: linear-gradient(170deg, #a9dcff, var(--accent) 60%, #4ea6ee);
	border-color: transparent;
	color: #04121f;
	font-weight: 650;
	box-shadow: 0 14px 38px -16px rgba(124, 196, 255, 0.95);
}

.btn-primary:hover {
	background: linear-gradient(170deg, #c4e8ff, #8fcfff 60%, #62b4f4);
	box-shadow: 0 20px 48px -14px rgba(124, 196, 255, 1);
	border-color: transparent;
}

.btn-quiet {
	border-color: transparent;
	background: transparent;
	color: var(--muted);
}

.btn-quiet:hover {
	background: rgba(var(--edge), 0.08);
	border-color: var(--line);
	color: var(--fg);
}

.btn-danger {
	border-color: rgba(255, 154, 154, 0.34);
	background: rgba(255, 154, 154, 0.06);
	color: var(--danger);
}

.btn-danger:hover {
	border-color: var(--danger);
	background: rgba(255, 154, 154, 0.12);
}

.btn-sm {
	padding: 7px 14px;
	font-size: 0.85rem;
}

.btn-lg {
	padding: 15px 28px;
	font-size: 1.02rem;
}

.btn-block {
	width: 100%;
}

.btn[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* ----------------------------------------------------------------- hero -- */

.hero {
	position: relative;
	padding-top: clamp(26px, 4vw, 40px);
	text-align: center;
}

.hero-copy {
	max-width: 780px;
	margin: 0 auto;
}

.hero h1 {
	margin: 0 0 16px;
	font-size: clamp(2.3rem, 5.6vw, 3.9rem);
	background: linear-gradient(174deg, #ffffff 8%, #bcdcff 62%, #6fa9e6 128%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	text-shadow: 0 0 60px rgba(124, 196, 255, 0.28);
}

.hero .lede {
	max-width: 62ch;
	margin: 0 auto 24px;
}

.hero-actions {
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
}

.hero-note {
	margin: 16px 0 0;
	font-size: 0.82rem;
	color: var(--dim);
}

/* The page-load sequence: the copy arrives line by line, then the desktop rises
   into the sky. One orchestrated moment, not scattered effects.

   Every hidden state is written under `.js`, which boot.js adds before the first
   paint. A visitor whose script never runs gets the settled page immediately
   instead of a blank one. */
.js .reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.8s cubic-bezier(0.16, 0.84, 0.24, 1),
		transform 0.8s cubic-bezier(0.16, 0.84, 0.24, 1);
}

.js .reveal.is-in {
	opacity: 1;
	transform: none;
}

.reveal-1 { transition-delay: 0.04s; }
.reveal-2 { transition-delay: 0.14s; }
.reveal-3 { transition-delay: 0.24s; }
.reveal-4 { transition-delay: 0.34s; }
.reveal-5 { transition-delay: 0.44s; }

/* --------------------------------------------------------------- stage --- */

/* The desktop mock: the real BlueCat wallpaper, real desktop icons, and the
   bar drawn to the geometry in theme.toml — height 44, margin 10, radius 14. */
.stage-wrap {
	margin-top: clamp(20px, 3vw, 32px);
}

/* A desktop is 16:9, but a 16:9 card tall enough to read pushes the bar — the
   one thing here nobody else has — below the fold. The mock is a 2:1 slice
   instead, and its width is tied to the viewport height so the bar lands above
   the fold on a short screen too. */
.stage {
	position: relative;
	width: min(100%, 1040px, max(600px, calc((100vh - 486px) * 2)));
	width: min(100%, 1040px, max(600px, calc((100svh - 486px) * 2)));
	margin: 0 auto;
	aspect-ratio: 2 / 1;
	border-radius: var(--r-lg);
	overflow: hidden;
	border: 1px solid rgba(var(--edge), 0.26);
	background: var(--navy);
	box-shadow: var(--lift), 0 0 90px -30px rgba(124, 196, 255, 0.55);
}

.js .stage {
	opacity: 0;
	transform: translateY(46px) scale(0.965);
	transition: opacity 1s cubic-bezier(0.16, 0.84, 0.24, 1) 0.42s,
		transform 1s cubic-bezier(0.16, 0.84, 0.24, 1) 0.42s;
}

.js .stage.is-in {
	opacity: 1;
	transform: none;
}

/* Inside the stage the pointer is the theme's cursor, drawn on the overlay
   canvas, so a visitor sees the dot and the confetti without installing
   anything. Outside it, the system cursor is untouched. */
.stage.has-fx {
	cursor: none;
}

.stage-wall {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Keep the cat and the horizon in frame when the slice is cropped. */
	object-position: 50% 64%;
	animation: breathe 45s ease-in-out infinite alternate;
}

/* params[0]: a 45 s zoom cycle. */
@keyframes breathe {
	from { transform: scale(1.02); }
	to { transform: scale(1.06); }
}

.stage-fx {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 3;
	pointer-events: none;
}

.stage-icons {
	position: absolute;
	top: 6%;
	left: 3%;
	display: grid;
	gap: 6px;
	z-index: 2;
	text-align: center;
}

.dicon {
	width: 62px;
	padding: 6px 4px;
	border-radius: var(--r-sm);
	color: #f2f7ff;
	font-size: 0.6rem;
	line-height: 1.25;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
	display: grid;
	justify-items: center;
	gap: 6px;
}

.dicon svg {
	width: 24px;
	height: 24px;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}

/* -------------------------------------------------------------- the bar -- */

.bar {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	z-index: 2;
	height: 44px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 8px;
	border-radius: var(--r);
	background: rgba(14, 36, 72, 0.85);
	border: 1px solid rgba(var(--edge), 0.18);
	backdrop-filter: blur(20px) saturate(1.2);
	-webkit-backdrop-filter: blur(20px) saturate(1.2);
	box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.8);
	color: var(--fg);
	font-size: 0.78rem;
}

/* At stage width the bar scales with the mock so it never looks oversized. */
.stage .bar {
	transform-origin: bottom center;
}

.bar-start {
	width: 30px;
	height: 30px;
	flex: none;
	border-radius: 8px;
	display: grid;
	place-items: center;
	background: rgba(124, 196, 255, 0.1);
	border: 1px solid rgba(var(--edge), 0.18);
	padding: 0;
}

.bar-start img,
.bar-start svg {
	width: 22px;
	height: 22px;
	border-radius: 6px;
}

.bar-search {
	display: flex;
	align-items: center;
	gap: 7px;
	height: 28px;
	padding: 0 12px;
	border-radius: var(--r-pill);
	background: rgba(var(--edge), 0.08);
	border: 1px solid rgba(var(--edge), 0.14);
	color: var(--muted);
	font-size: 0.74rem;
	flex: none;
}

.bar-search svg {
	width: 13px;
	height: 13px;
	opacity: 0.8;
}

.bar-apps {
	display: flex;
	align-items: center;
	gap: 3px;
	margin-left: 4px;
}

.bar-app {
	position: relative;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	color: var(--muted);
	transition: background 0.18s ease, color 0.18s ease;
}

.bar-app svg {
	width: 17px;
	height: 17px;
}

.bar-app:hover {
	background: rgba(var(--edge), 0.1); /* [bar.colors].hover */
	color: var(--fg);
}

.bar-app.is-active {
	background: rgba(124, 196, 255, 0.15); /* [bar.colors].active */
	color: var(--fg);
}

/* [bar.colors].indicator — 2 px under running apps, full for the active one
   and 40 % for the rest. */
.bar-app.is-running::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 1px;
	width: 13px;
	height: 2.5px;
	margin-left: -6.5px;
	border-radius: 2px;
	background: var(--indicator);
	opacity: 0.5;
	transition: width 0.3s ease, opacity 0.3s ease;
}

.bar-app.is-active::after {
	width: 18px;
	margin-left: -9px;
	opacity: 1;
	box-shadow: 0 0 8px var(--indicator);
}

.bar-spacer {
	flex: 1;
}

.bar-tray {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--muted);
	padding-right: 4px;
}

.bar-tray svg {
	width: 14px;
	height: 14px;
}

.bar-tray .is-warn {
	color: var(--warn); /* [bar.colors].warning */
}

.bar-clock {
	display: grid;
	justify-items: end;
	line-height: 1.12;
	padding: 0 10px;
	font-variant-numeric: tabular-nums;
}

.bar-clock b {
	font-weight: 600;
	font-size: 0.83rem;
}

.bar-clock span {
	color: var(--muted);
	font-size: 0.64rem;
}

.bar-label {
	text-transform: uppercase;
	letter-spacing: 0.24em;
	font-size: 0.58rem;
	color: var(--muted);
	opacity: 0.75;
	padding-right: 6px;
	white-space: nowrap;
}

/* --------------------------------------------------------------- bands --- */

.band {
	padding-top: clamp(64px, 8vw, 108px);
}

.band-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 34px;
}

.band-head h2 {
	margin: 0;
	max-width: 20ch;
}

.band-head p {
	margin: 12px 0 0;
	max-width: 52ch;
}

.band-head-center {
	text-align: center;
	flex-direction: column;
	align-items: center;
}

.band-head-center p {
	margin-inline: auto;
}

.band-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 0.93rem;
	color: var(--muted);
	white-space: nowrap;
	padding-bottom: 6px;
}

.band-link:hover {
	color: var(--accent);
	text-decoration: none;
}

.band-link svg {
	width: 15px;
	height: 15px;
	transition: transform 0.2s ease;
}

.band-link:hover svg {
	transform: translateX(4px);
}

/* Scroll-in for everything below the hero. */
.js .on-scroll {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.7s cubic-bezier(0.16, 0.84, 0.24, 1),
		transform 0.7s cubic-bezier(0.16, 0.84, 0.24, 1);
}

.on-scroll.is-in {
	opacity: 1;
	transform: none;
}

/* -------------------------------------------------------------- pillars -- */

.pillars {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.pillar {
	position: relative;
	display: flex;
	flex-direction: column;
	border-radius: var(--r-lg);
	border: 1px solid var(--line);
	background: linear-gradient(168deg, rgba(14, 36, 72, 0.72), rgba(6, 16, 34, 0.86));
	overflow: hidden;
	transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.28s ease,
		box-shadow 0.28s ease;
}

.pillar:hover {
	transform: translateY(-5px);
	border-color: rgba(var(--edge), 0.34);
	box-shadow: var(--halo);
}

.pillar-demo {
	position: relative;
	height: 160px;
	overflow: hidden;
	background: radial-gradient(120% 120% at 50% 0%, #12305c, #060f22 70%);
	border-bottom: 1px solid var(--line);
	display: grid;
	place-items: center;
}

.pillar-body {
	padding: 20px 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.pillar-body h3 {
	margin: 4px 0 0;
}

.pillar-body p {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.pillar-body .toml-tag {
	align-self: flex-start;
}

/* --- demo 1: the sky. A CSS starfield that speeds up on hover. ----------- */

.demo-sky {
	position: absolute;
	inset: 0;
}

.demo-stars i {
	position: absolute;
	width: 2px;
	height: 2px;
	border-radius: 50%;
	background: #fff;
	opacity: 0.55;
	animation: twinkle 3.4s ease-in-out infinite;
}

@keyframes twinkle {
	0%, 100% { opacity: 0.2; transform: scale(0.8); }
	50% { opacity: 1; transform: scale(1.4); }
}

/* Positions are baked into the sheet rather than written as style attributes,
   which the CSP would drop. */
.demo-stars i:nth-child(1)  { left: 8%;  top: 22%; animation-delay: 0s; }
.demo-stars i:nth-child(2)  { left: 17%; top: 62%; animation-delay: -0.4s; }
.demo-stars i:nth-child(3)  { left: 25%; top: 12%; animation-delay: -1.1s; }
.demo-stars i:nth-child(4)  { left: 33%; top: 78%; animation-delay: -2.2s; }
.demo-stars i:nth-child(5)  { left: 41%; top: 34%; animation-delay: -0.8s; }
.demo-stars i:nth-child(6)  { left: 48%; top: 68%; animation-delay: -1.7s; }
.demo-stars i:nth-child(7)  { left: 56%; top: 18%; animation-delay: -2.6s; }
.demo-stars i:nth-child(8)  { left: 63%; top: 52%; animation-delay: -0.2s; }
.demo-stars i:nth-child(9)  { left: 71%; top: 82%; animation-delay: -1.4s; }
.demo-stars i:nth-child(10) { left: 79%; top: 28%; animation-delay: -3s; }
.demo-stars i:nth-child(11) { left: 86%; top: 64%; animation-delay: -0.6s; }
.demo-stars i:nth-child(12) { left: 93%; top: 40%; animation-delay: -2s; }
.demo-stars i:nth-child(13) { left: 12%; top: 44%; animation-delay: -2.8s; }
.demo-stars i:nth-child(14) { left: 68%; top: 8%;  animation-delay: -1.9s; }
.demo-stars i:nth-child(15) { left: 4%;  top: 74%; animation-delay: -1.2s; }
.demo-stars i:nth-child(16) { left: 21%; top: 34%; animation-delay: -2.4s; }
.demo-stars i:nth-child(17) { left: 37%; top: 56%; animation-delay: -0.9s; }
.demo-stars i:nth-child(18) { left: 52%; top: 88%; animation-delay: -3.1s; }
.demo-stars i:nth-child(19) { left: 60%; top: 36%; animation-delay: -1.6s; }
.demo-stars i:nth-child(20) { left: 76%; top: 12%; animation-delay: -0.3s; }
.demo-stars i:nth-child(21) { left: 89%; top: 86%; animation-delay: -2.7s; }
.demo-stars i:nth-child(22) { left: 30%; top: 24%; animation-delay: -0.7s; }

/* A handful of near stars, the way the artwork has them. */
.demo-stars i:nth-child(4n) {
	width: 3px;
	height: 3px;
	box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.pillar:hover .demo-stars i {
	animation-duration: 1.1s;
}

.demo-planet {
	position: absolute;
	right: 30px;
	top: 30px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: radial-gradient(circle at 32% 30%, #cfe4ff, #2f6fb8 60%, #143766);
	box-shadow: 0 0 24px rgba(124, 196, 255, 0.35);
	animation: bob 6s ease-in-out infinite alternate;
}

/* params[5]: the planets bob 2–3 screen px. */
@keyframes bob {
	from { transform: translateY(-3px); }
	to { transform: translateY(3px); }
}

.demo-streak {
	position: absolute;
	top: 18%;
	left: -20%;
	width: 90px;
	height: 1.5px;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, #fff);
	transform: rotate(18deg);
	opacity: 0;
	animation: streak 7s linear infinite;
}

@keyframes streak {
	0% { opacity: 0; transform: translate(0, 0) rotate(18deg); }
	4% { opacity: 1; }
	16% { opacity: 0; transform: translate(260px, 90px) rotate(18deg); }
	100% { opacity: 0; transform: translate(260px, 90px) rotate(18deg); }
}

/* --- demo 2: a miniature bar whose active window changes on hover. ------- */

.demo-bar {
	width: 84%;
	height: 34px;
	border-radius: 11px;
	background: rgba(14, 36, 72, 0.9);
	border: 1px solid rgba(var(--edge), 0.2);
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 0 8px;
	box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.8);
}

.demo-key {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background: rgba(var(--edge), 0.12);
	position: relative;
}

.demo-key::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -5px;
	width: 10px;
	height: 2px;
	margin-left: -5px;
	border-radius: 2px;
	background: var(--indicator);
	opacity: 0.35;
	transition: opacity 0.3s ease, width 0.3s ease;
}

.pillar:hover .demo-key:nth-child(2)::after {
	opacity: 1;
	width: 16px;
	margin-left: -8px;
	box-shadow: 0 0 8px var(--indicator);
}

.pillar:hover .demo-key:nth-child(2) {
	background: rgba(124, 196, 255, 0.22);
}

.demo-bar .demo-fill {
	flex: 1;
}

.demo-bar .demo-clock {
	font-family: var(--mono);
	font-size: 0.6rem;
	color: var(--muted);
}

/* --- demo 3: the cursor. A dot that traces a path and pops on hover. ----- */

.demo-cursor {
	position: relative;
	width: 100%;
	height: 100%;
}

.demo-path {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.demo-dot {
	position: absolute;
	left: 16.7%;
	top: 80%;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #3a8dff; /* [cursor].fill */
	border: 1.5px solid #fff; /* [cursor].outline */
	box-shadow: 0 0 14px rgba(124, 196, 255, 0.75); /* [cursor].glow */
	transition: left 0.5s cubic-bezier(0.3, 1.4, 0.4, 1), top 0.5s cubic-bezier(0.3, 1.4, 0.4, 1);
}

.pillar:hover .demo-dot {
	left: 66.7%;
	top: 27.5%;
}

.demo-ring {
	position: absolute;
	left: 66.7%;
	top: 27.5%;
	width: 12px;
	height: 12px;
	margin: -1px 0 0 -1px;
	border-radius: 50%;
	border: 1.5px solid rgba(124, 196, 255, 0.7);
	opacity: 0;
}

.pillar:hover .demo-ring {
	animation: ripple 1.4s ease-out 0.45s infinite;
}

@keyframes ripple {
	from { opacity: 0.9; transform: scale(0.4); }
	to { opacity: 0; transform: scale(4.4); }
}

/* [cursor].click_colors — the theme's five confetti shades, and the only warm
   colour anywhere on the site. */
.demo-burst i {
	position: absolute;
	left: 66.7%;
	top: 27.5%;
	width: 5px;
	height: 3px;
	border-radius: 1px;
	opacity: 0;
}

.demo-burst i:nth-child(1) { background: #7cc4ff; }
.demo-burst i:nth-child(2) { background: #ffffff; }
.demo-burst i:nth-child(3) { background: #3a8dff; }
.demo-burst i:nth-child(4) { background: #ffd27f; }
.demo-burst i:nth-child(5) { background: #ffb3d9; }
.demo-burst i:nth-child(6) { background: #7cc4ff; }
.demo-burst i:nth-child(7) { background: #ffd27f; }
.demo-burst i:nth-child(8) { background: #ffffff; }

.pillar:hover .demo-burst i {
	animation: pop 1.4s cubic-bezier(0.15, 0.7, 0.3, 1) 0.45s infinite;
}

.demo-burst i:nth-child(1) { --dx: -46px; --dy: 34px; }
.demo-burst i:nth-child(2) { --dx: -30px; --dy: -18px; }
.demo-burst i:nth-child(3) { --dx: -12px; --dy: 44px; }
.demo-burst i:nth-child(4) { --dx: 8px;   --dy: -26px; }
.demo-burst i:nth-child(5) { --dx: 26px;  --dy: 40px; }
.demo-burst i:nth-child(6) { --dx: 44px;  --dy: -8px; }
.demo-burst i:nth-child(7) { --dx: 56px;  --dy: 30px; }
.demo-burst i:nth-child(8) { --dx: -56px; --dy: 8px; }

/* click_gravity = 1.0: the paper rises, then falls. */
@keyframes pop {
	0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
	12% { opacity: 1; }
	100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(320deg); }
}

/* ------------------------------------------------------------- metrics --- */

.metrics {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	overflow: hidden;
	background: var(--line);
}

.metric {
	background: linear-gradient(168deg, rgba(14, 36, 72, 0.6), rgba(6, 16, 34, 0.85));
	padding: 26px 24px;
	display: grid;
	gap: 6px;
	align-content: start;
}

.metric-value {
	font-family: var(--mono);
	font-variant-numeric: tabular-nums;
	font-size: clamp(1.7rem, 3.2vw, 2.4rem);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--fg);
}

.metric-value .unit {
	font-size: 0.5em;
	color: var(--accent);
	margin-left: 3px;
	letter-spacing: 0;
}

.metric-name {
	color: var(--fg);
	font-size: 0.92rem;
	font-weight: 550;
}

.metric-note {
	color: var(--dim);
	font-size: 0.8rem;
	line-height: 1.5;
}

.metrics-source {
	margin: 16px 0 0;
	font-size: 0.78rem;
	color: var(--dim);
}

/* ----------------------------------------------------------- theme grid -- */

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 22px;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: linear-gradient(168deg, rgba(14, 36, 72, 0.68), rgba(6, 16, 34, 0.9));
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	overflow: hidden;
	transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s ease,
		border-color 0.28s ease;
}

.card:hover,
.card:focus-within {
	transform: translateY(-6px);
	border-color: rgba(var(--edge), 0.36);
	box-shadow: var(--halo);
}

.shot {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: linear-gradient(105deg, #0c1c38 20%, #16305a 40%, #0c1c38 60%);
	background-size: 300% 100%;
	animation: shimmer 1.4s linear infinite;
	overflow: hidden;
}

/* The skeleton runs until the preview decodes, then stops for good. */
@keyframes shimmer {
	to { background-position: -300% 0; }
}

.shot.is-ready {
	animation: none;
	background: var(--navy);
}

.shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shot.is-ready img {
	opacity: 1;
}

.card:hover .shot img {
	transform: scale(1.06);
}

/* The action row lives over the preview and arrives with the hover lift. It is
   revealed by :focus-within too, so it is reachable from the keyboard. */
.card-actions {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	display: flex;
	gap: 7px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover .card-actions,
.card:focus-within .card-actions {
	opacity: 1;
	transform: none;
}

.card-actions .btn {
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	background: rgba(8, 20, 40, 0.72);
	flex: 1;
	padding: 8px 10px;
	font-size: 0.82rem;
}

.card-actions .btn-primary {
	background: var(--accent);
	color: #04121f;
}

.card-actions .btn-icon {
	flex: 0 0 40px;
	padding: 8px 0;
}

.card-body {
	padding: 16px 18px 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.card-title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.card-title a {
	color: var(--fg);
	font-family: var(--display);
	font-weight: 650;
	font-size: 1.06rem;
	letter-spacing: -0.02em;
}

.card-title a:hover {
	color: var(--accent);
	text-decoration: none;
}

.card-author {
	color: var(--muted);
	font-size: 0.83rem;
}

.card-author a {
	color: var(--muted);
}

.card-desc {
	color: var(--muted);
	font-size: 0.88rem;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card-meta {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 12px;
	color: var(--dim);
	font-size: 0.79rem;
	border-top: 1px solid var(--line);
}

.card-meta .spacer {
	margin-left: auto;
}

/* The preview is one big link to the theme, with the action buttons layered
   over it. Both are real anchors, so neither depends on script. */
.shot-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.card-actions {
	z-index: 2;
}

.metaitem {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.metaitem svg {
	width: 13px;
	height: 13px;
	opacity: 0.75;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	border-radius: var(--r-pill);
	border: 1px solid var(--line);
	background: rgba(124, 196, 255, 0.07);
	color: var(--muted);
	font-size: 0.73rem;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

a.pill:hover {
	text-decoration: none;
	border-color: rgba(var(--edge), 0.4);
	color: var(--fg);
	background: rgba(124, 196, 255, 0.14);
}

.pill-version {
	font-family: var(--mono);
	font-size: 0.7rem;
}

/* The performance grade is the one place a theme earns a colour. */
.pill-score {
	color: var(--accent);
	border-color: rgba(124, 196, 255, 0.42);
	font-weight: 600;
	font-family: var(--mono);
}

.pill-score[data-grade^="C"],
.pill-score[data-grade^="D"] {
	color: var(--warn);
	border-color: rgba(255, 210, 127, 0.42);
	background: rgba(255, 210, 127, 0.08);
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* ------------------------------------------------------------- toolbar --- */

.toolbar {
	display: flex;
	gap: 16px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 28px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: rgba(9, 22, 44, 0.6);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.search {
	position: relative;
	display: flex;
	gap: 8px;
	flex: 1 1 280px;
	max-width: 440px;
}

.search svg {
	position: absolute;
	left: 13px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	color: var(--dim);
	pointer-events: none;
}

.search input[type="search"] {
	padding-left: 38px;
}

.sorts {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	margin-left: auto;
}

.sorts a {
	padding: 7px 14px;
	border-radius: var(--r-pill);
	border: 1px solid transparent;
	color: var(--muted);
	font-size: 0.86rem;
	transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.sorts a:hover {
	color: var(--fg);
	text-decoration: none;
	border-color: var(--line);
	background: rgba(var(--edge), 0.06);
}

.sorts a.is-active {
	color: #04121f;
	background: var(--accent);
	border-color: var(--accent);
	font-weight: 600;
}

.chips {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: -10px 0 24px;
	font-size: 0.85rem;
	color: var(--dim);
}

.chip-clear {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: var(--r-pill);
	border: 1px solid rgba(124, 196, 255, 0.4);
	background: rgba(124, 196, 255, 0.12);
	color: var(--fg);
	font-size: 0.8rem;
}

.chip-clear:hover {
	text-decoration: none;
	border-color: var(--accent);
}

/* --------------------------------------------------------------- forms --- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
	width: 100%;
	padding: 11px 14px;
	background: rgba(6, 16, 34, 0.7);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	color: var(--fg);
	font: inherit;
	font-size: 0.94rem;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input[type="file"] {
	width: 100%;
	padding: 11px 14px;
	background: rgba(6, 16, 34, 0.7);
	border: 1px dashed var(--line-strong);
	border-radius: var(--r-sm);
	color: var(--muted);
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}

input[type="file"]::file-selector-button {
	margin-right: 12px;
	padding: 6px 14px;
	border-radius: var(--r-pill);
	border: 1px solid var(--line-strong);
	background: var(--glass);
	color: var(--fg);
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
}

textarea {
	resize: vertical;
	min-height: 104px;
}

input::placeholder,
textarea::placeholder {
	color: var(--dim);
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--accent);
	background: rgba(6, 16, 34, 0.92);
	box-shadow: 0 0 0 3px rgba(124, 196, 255, 0.2);
}

label {
	display: block;
	font-size: 0.83rem;
	color: var(--fg);
	font-weight: 550;
	margin-bottom: 7px;
}

.field {
	margin-bottom: 18px;
}

.field-optional {
	color: var(--dim);
	font-weight: 400;
}

.hint {
	font-size: 0.8rem;
	color: var(--dim);
	margin: 6px 0 0;
	line-height: 1.55;
}

.panel {
	background: linear-gradient(168deg, rgba(14, 36, 72, 0.62), rgba(6, 16, 34, 0.88));
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 26px;
}

.panel-tight {
	padding: 20px;
}

.panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.panel-head h2,
.panel-head h3 {
	margin: 0;
}

.section-title {
	font-family: var(--display);
	font-size: 1.16rem;
	font-weight: 650;
	letter-spacing: -0.02em;
	margin: 0;
}

.token-form {
	margin-top: 16px;
}

/* The catalogue leads with a heading rather than a hero, so it needs the space
   the hero would have provided. */
.catalogue-head {
	padding-top: clamp(30px, 5vw, 58px);
	margin-bottom: 26px;
}

.catalogue-head h1 {
	font-size: clamp(1.9rem, 4vw, 2.7rem);
	margin: 0 0 12px;
}

.catalogue-head p {
	margin: 0;
	color: var(--muted);
	max-width: 56ch;
}

/* Auth pages: a glass card sitting in the open sky. */
.auth {
	max-width: 452px;
	margin: clamp(40px, 8vw, 84px) auto clamp(48px, 8vw, 92px);
	text-align: center;
}

.auth h1 {
	font-size: clamp(1.9rem, 4vw, 2.5rem);
	margin-bottom: 10px;
}

.auth .sub {
	color: var(--muted);
	font-size: 0.94rem;
	margin-bottom: 28px;
}

.auth-card {
	text-align: left;
	backdrop-filter: blur(24px) saturate(1.15);
	-webkit-backdrop-filter: blur(24px) saturate(1.15);
	background: rgba(11, 27, 52, 0.66);
	border-color: rgba(var(--edge), 0.22);
	box-shadow: var(--lift);
}

.auth-foot {
	margin: 22px 0 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.auth-mark {
	width: 52px;
	height: 52px;
	margin: 0 auto 20px;
	filter: drop-shadow(0 0 22px rgba(124, 196, 255, 0.5));
}

/* -------------------------------------------------------------- alerts --- */

.alert {
	display: flex;
	gap: 11px;
	align-items: flex-start;
	padding: 13px 16px;
	border-radius: var(--r-sm);
	border: 1px solid var(--line);
	margin-bottom: 20px;
	font-size: 0.9rem;
	line-height: 1.55;
}

.alert svg {
	width: 17px;
	height: 17px;
	flex: none;
	margin-top: 2px;
}

.alert p:last-child {
	margin-bottom: 0;
}

.alert-error {
	border-color: rgba(255, 154, 154, 0.42);
	background: rgba(255, 154, 154, 0.09);
	color: #ffcaca;
}

.alert-ok {
	border-color: rgba(124, 196, 255, 0.42);
	background: rgba(124, 196, 255, 0.09);
	color: #cbe6ff;
}

.alert-warn {
	border-color: rgba(255, 210, 127, 0.42);
	background: rgba(255, 210, 127, 0.08);
	color: var(--warn);
}

.flash {
	margin-top: 20px;
}

/* -------------------------------------------------------- theme detail --- */

.detail {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.85fr);
	gap: 42px;
	padding-top: clamp(28px, 4vw, 48px);
	align-items: start;
}

/* The preview reacts to the pointer the way the wallpaper does: a slow zoom,
   and a few pixels of parallax driven from JS. */
.detail-shot {
	position: relative;
	border-radius: var(--r-lg);
	overflow: hidden;
	border: 1px solid rgba(var(--edge), 0.2);
	box-shadow: var(--halo);
	aspect-ratio: 16 / 9;
	background: var(--navy);
}

.detail-shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.06);
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
	will-change: transform;
}

.detail-shot::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(120% 90% at 50% 110%, rgba(5, 13, 28, 0.55), transparent 60%);
	pointer-events: none;
}

.detail-title {
	margin: 30px 0 0;
	font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.detail-by {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 22px 0 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.detail-lede {
	font-size: 1.06rem;
	color: var(--muted);
	margin: 14px 0 0;
	max-width: 62ch;
}

.detail-tags {
	margin: 20px 0 0;
}

.detail aside {
	position: sticky;
	top: calc(var(--header-h) + 20px);
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.install-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.install-note {
	text-align: center;
	margin: 2px 0 6px;
}

.kv {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px 18px;
	font-size: 0.88rem;
	margin: 0;
}

.kv dt {
	color: var(--dim);
}

.kv dd {
	margin: 0;
	text-align: right;
	color: var(--fg);
	font-variant-numeric: tabular-nums;
}

.like-btn {
	gap: 9px;
}

.like-btn svg {
	width: 16px;
	height: 16px;
	transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.like-btn.is-liked {
	color: var(--rose);
	border-color: rgba(255, 179, 217, 0.5);
	background: rgba(255, 179, 217, 0.09);
}

.like-btn.is-liked svg {
	fill: var(--rose);
	transform: scale(1.16);
}

.versions {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.86rem;
}

.versions li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--line);
	color: var(--muted);
}

.versions li:last-child {
	border-bottom: 0;
}

.versions b {
	font-family: var(--mono);
	color: var(--fg);
	font-weight: 500;
}

/* ------------------------------------------------------------ download --- */

.download {
	padding-top: clamp(30px, 5vw, 56px);
}

.download-head {
	text-align: center;
	max-width: 640px;
	margin: 0 auto clamp(32px, 5vw, 52px);
}

.download-head h1 {
	margin-bottom: 14px;
}

.get {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
	gap: 20px;
	align-items: start;
}

.get-main {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 30px;
	border-radius: var(--r-lg);
	border: 1px solid rgba(var(--edge), 0.24);
	background: linear-gradient(168deg, rgba(18, 44, 84, 0.7), rgba(6, 16, 34, 0.9));
	box-shadow: var(--halo);
}

.get-version {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.get-title {
	font-family: var(--display);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	margin: 0;
}

.get-sub {
	margin: 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.get-alt > span {
	flex: 1 1 240px;
}

.get-alt {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px 18px;
	flex-wrap: wrap;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	font-size: 0.87rem;
	color: var(--muted);
}

.download-size {
	margin: 12px 0 0;
	text-align: center;
	font-size: 0.86rem;
}

.get-side {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.smartscreen {
	margin: 0;
}

.smartscreen p {
	margin: 0 0 8px;
}

.smartscreen p:last-child {
	margin-bottom: 0;
}

.empty-release pre {
	background: rgba(4, 11, 24, 0.9);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	padding: 14px 16px;
	overflow-x: auto;
	color: #d6e8ff;
	font-size: 0.88rem;
}

.hash {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--mono);
	font-size: 0.74rem;
	color: var(--dim);
	background: rgba(6, 16, 34, 0.7);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	padding: 9px 12px;
	word-break: break-all;
}

.hash span {
	flex: 1;
	min-width: 0;
}

.copy {
	flex: none;
	padding: 4px 11px;
	font-size: 0.75rem;
	border-radius: var(--r-pill);
	border: 1px solid var(--line-strong);
	background: transparent;
	color: var(--muted);
	font-family: var(--text);
	cursor: pointer;
	transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.copy:hover {
	color: var(--fg);
	border-color: var(--accent);
}

.copy.is-done {
	color: #04121f;
	background: var(--accent);
	border-color: var(--accent);
}

.reqs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 11px;
	font-size: 0.88rem;
	color: var(--muted);
}

.reqs li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.reqs svg {
	width: 15px;
	height: 15px;
	flex: none;
	margin-top: 4px;
	color: var(--accent);
}

/* The first-run and install sequences are genuinely ordered, so these are the
   one place a numbered marker earns its keep. */
.steps {
	list-style: none;
	counter-reset: step;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 4px;
}

.steps li {
	counter-increment: step;
	display: grid;
	grid-template-columns: 34px 1fr;
	gap: 14px;
	padding: 13px 0;
	border-bottom: 1px solid var(--line);
}

.steps li:last-child {
	border-bottom: 0;
}

.steps li::before {
	content: counter(step);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	border: 1px solid var(--line-strong);
	background: rgba(124, 196, 255, 0.09);
	color: var(--accent);
	font-family: var(--mono);
	font-size: 0.78rem;
}

.steps b {
	display: block;
	color: var(--fg);
	font-weight: 600;
	font-size: 0.94rem;
}

.steps p {
	margin: 3px 0 0;
	color: var(--muted);
	font-size: 0.87rem;
	line-height: 1.55;
}

.firstrun {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-top: 18px;
}

.firstrun-step {
	padding: 18px;
	border-radius: var(--r);
	border: 1px solid var(--line);
	background: rgba(6, 16, 34, 0.6);
	display: grid;
	gap: 8px;
	align-content: start;
}

.firstrun-step .label {
	color: var(--accent);
}

.firstrun-step b {
	font-size: 0.96rem;
}

.firstrun-step p {
	margin: 0;
	color: var(--muted);
	font-size: 0.85rem;
	line-height: 1.55;
}

/* --------------------------------------------------------------- account -- */

.stack {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.account-head {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
	padding: clamp(28px, 4vw, 48px) 0 32px;
}

.account-avatar {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: linear-gradient(155deg, var(--accent), #2f6fb8);
	color: #04101f;
	font-family: var(--display);
	font-weight: 700;
	font-size: 1.6rem;
	flex: none;
	box-shadow: 0 0 34px -8px rgba(124, 196, 255, 0.7);
}

.account-id h1 {
	margin: 0;
	font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}

.account-id .label {
	margin-bottom: 4px;
}

.account-head .grow {
	flex: 1;
}

.rows {
	display: flex;
	flex-direction: column;
}

.row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
}

.row:last-child {
	border-bottom: 0;
}

.row .rowshot {
	width: 116px;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	overflow: hidden;
	background: var(--navy);
	flex: none;
}

.row .rowshot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.row .grow {
	flex: 1;
	min-width: 0;
}

.row .grow a {
	color: var(--fg);
	font-weight: 600;
}

.progress {
	display: none;
	height: 5px;
	border-radius: var(--r-pill);
	background: rgba(var(--edge), 0.12);
	overflow: hidden;
	margin-bottom: 14px;
}

.is-uploading .progress {
	display: block;
}

.progress-bar {
	height: 100%;
	width: 0;
	border-radius: var(--r-pill);
	background: linear-gradient(90deg, var(--accent), var(--indicator));
	transition: width 0.2s ease;
}

.submit-row {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.token {
	font-family: var(--mono);
	font-size: 0.84rem;
	word-break: break-all;
	background: rgba(4, 12, 26, 0.9);
	border: 1px solid rgba(124, 196, 255, 0.36);
	border-radius: var(--r-sm);
	padding: 13px 15px;
	color: var(--accent);
	line-height: 1.5;
}

.token-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.inline-form {
	display: inline-flex;
}

/* ----------------------------------------------------------------- docs --- */

.docs {
	display: grid;
	grid-template-columns: 236px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
	padding-top: clamp(28px, 4vw, 48px);
}

.toc {
	position: sticky;
	top: calc(var(--header-h) + 24px);
	max-height: calc(100vh - var(--header-h) - 48px);
	overflow-y: auto;
	font-size: 0.87rem;
	border-left: 1px solid var(--line);
	padding-left: 2px;
}

.toc .label {
	display: block;
	padding: 0 0 12px 16px;
}

.toc a {
	display: block;
	padding: 5px 12px 5px 16px;
	color: var(--muted);
	border-left: 2px solid transparent;
	margin-left: -1px;
	line-height: 1.4;
	transition: color 0.16s ease, border-color 0.16s ease;
}

.toc a:hover {
	color: var(--fg);
	text-decoration: none;
}

.toc a.lv3 {
	padding-left: 30px;
	font-size: 0.83rem;
	color: var(--dim);
}

.toc a.is-current {
	color: var(--accent);
	border-left-color: var(--accent);
}

.prose {
	max-width: 76ch;
	color: var(--muted);
	font-size: 1rem;
}

.prose > :first-child {
	margin-top: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
	color: var(--fg);
	margin-top: 2em;
	scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h1 {
	font-size: clamp(2rem, 4vw, 2.8rem);
}

.prose h2 {
	font-size: 1.65rem;
	padding-bottom: 0.35em;
	border-bottom: 1px solid var(--line);
}

.prose h3 {
	font-size: 1.16rem;
	color: var(--accent-warm);
}

.prose strong {
	color: var(--fg);
	font-weight: 600;
}

.prose code {
	font-size: 0.86em;
	background: rgba(124, 196, 255, 0.1);
	border: 1px solid var(--line);
	border-radius: 5px;
	padding: 1px 6px;
	color: #cfe6ff;
}

.prose pre {
	background: rgba(4, 11, 24, 0.92);
	border: 1px solid var(--line);
	border-left: 2px solid rgba(124, 196, 255, 0.45);
	border-radius: var(--r-sm);
	padding: 16px 18px;
	overflow-x: auto;
	line-height: 1.6;
}

.prose pre code {
	background: none;
	border: 0;
	padding: 0;
	font-size: 0.85rem;
	color: #d6e8ff;
}

.prose blockquote {
	margin: 1.3em 0;
	padding: 4px 20px;
	border-left: 2px solid var(--accent);
	color: var(--muted);
	background: rgba(124, 196, 255, 0.05);
	border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	margin: 1.3em 0;
	display: block;
	overflow-x: auto;
}

.prose th,
.prose td {
	border: 1px solid var(--line);
	padding: 8px 12px;
	text-align: left;
}

.prose th {
	background: rgba(124, 196, 255, 0.08);
	color: var(--fg);
	font-weight: 600;
	white-space: nowrap;
}

.prose ul,
.prose ol {
	padding-left: 1.35em;
}

.prose li {
	margin: 0.35em 0;
}

.prose li::marker {
	color: var(--accent);
}

.prose img {
	border-radius: var(--r-sm);
	border: 1px solid var(--line);
}

/* ------------------------------------------------------------- creators -- */

.split {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 22px;
}

.route {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 30px;
	border-radius: var(--r-lg);
	border: 1px solid var(--line);
	background: linear-gradient(168deg, rgba(14, 36, 72, 0.66), rgba(6, 16, 34, 0.88));
	overflow: hidden;
	transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.26s ease;
}

.route:hover {
	transform: translateY(-4px);
	border-color: rgba(var(--edge), 0.32);
}

.route h3 {
	margin: 0;
	font-size: 1.3rem;
}

.route p {
	margin: 0;
	color: var(--muted);
	font-size: 0.93rem;
}

.route .btn {
	align-self: flex-start;
	margin-top: 8px;
}

.route-glow {
	position: absolute;
	right: -60px;
	top: -60px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(124, 196, 255, 0.18), transparent 68%);
	pointer-events: none;
	transition: transform 0.5s ease;
}

.route:hover .route-glow {
	transform: scale(1.25);
}

/* ------------------------------------------------------------ pagination -- */

.pager {
	display: flex;
	gap: 7px;
	justify-content: center;
	align-items: center;
	margin-top: 46px;
	flex-wrap: wrap;
}

.pager a,
.pager span {
	min-width: 40px;
	height: 40px;
	display: inline-grid;
	place-items: center;
	padding: 0 12px;
	border-radius: var(--r-sm);
	border: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.88rem;
	font-variant-numeric: tabular-nums;
	transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease,
		transform 0.18s ease;
}

.pager a:hover {
	color: var(--fg);
	border-color: rgba(var(--edge), 0.4);
	background: rgba(var(--edge), 0.08);
	text-decoration: none;
	transform: translateY(-2px);
}

.pager .is-active {
	background: var(--accent);
	border-color: var(--accent);
	color: #04121f;
	font-weight: 650;
}

.pager svg {
	width: 15px;
	height: 15px;
}

/* --------------------------------------------------------- empty & 404 --- */

.empty {
	text-align: center;
	padding: 70px 24px;
	color: var(--muted);
	border: 1px dashed var(--line-strong);
	border-radius: var(--r-lg);
	background: rgba(6, 16, 34, 0.4);
}

.empty h3 {
	margin-bottom: 8px;
}

.empty p {
	margin: 0 auto 20px;
	max-width: 46ch;
}

.notfound {
	text-align: center;
	padding: clamp(70px, 13vw, 150px) 20px;
}

.notfound h1 {
	font-size: clamp(1.7rem, 3.6vw, 2.5rem);
}

.notfound .code {
	font-family: var(--mono);
	font-size: clamp(3.6rem, 12vw, 7rem);
	font-weight: 600;
	letter-spacing: -0.06em;
	line-height: 1;
	margin: 0 0 6px;
	background: linear-gradient(180deg, #ffffff 10%, rgba(124, 196, 255, 0.22) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.notfound p {
	max-width: 46ch;
	margin-inline: auto;
}

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

.site-footer {
	border-top: 1px solid var(--line);
	background: var(--void-96);
	padding: 44px 0 34px;
	color: var(--dim);
	font-size: 0.86rem;
	flex: none;
}

.footer-top {
	display: flex;
	justify-content: space-between;
	gap: 32px;
	flex-wrap: wrap;
	padding-bottom: 26px;
	border-bottom: 1px solid var(--line);
}

.footer-brand {
	max-width: 34ch;
}

.footer-brand .brand {
	margin-bottom: 12px;
}

.footer-brand p {
	margin: 0;
	line-height: 1.6;
}

.footer-cols {
	display: flex;
	gap: 56px;
	flex-wrap: wrap;
}

.footer-col {
	display: grid;
	gap: 9px;
	align-content: start;
}

.footer-col .label {
	margin-bottom: 3px;
}

.footer-col a {
	color: var(--muted);
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding-top: 22px;
}

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 1040px) {
	.docs {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.toc {
		position: static;
		max-height: none;
		border-left: 0;
		border-bottom: 1px solid var(--line);
		padding: 0 0 14px;
		display: flex;
		flex-wrap: wrap;
		gap: 2px;
	}

	.toc .label {
		width: 100%;
		padding-left: 0;
	}

	.toc a {
		border-left: 0;
		border-radius: var(--r-pill);
		padding: 5px 13px;
	}

	.toc a.lv3 {
		display: none;
	}

	.toc a.is-current {
		background: rgba(124, 196, 255, 0.14);
	}
}

@media (max-width: 900px) {
	.pillars,
	.metrics,
	.split,
	.firstrun {
		grid-template-columns: repeat(2, 1fr);
	}

	.detail,
	.get {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.detail aside {
		position: static;
	}
}

@media (max-width: 760px) {
	:root {
		--header-h: 60px;
	}

	.nav-toggle {
		display: grid;
	}

	.nav {
		display: none;
		position: absolute;
		top: calc(var(--header-h) - 4px);
		right: 26px;
		left: 26px;
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
		padding: 10px;
		border-radius: var(--r);
		border: 1px solid var(--line-strong);
		background: rgba(7, 18, 38, 0.96);
		backdrop-filter: blur(20px);
		-webkit-backdrop-filter: blur(20px);
		box-shadow: var(--lift);
	}

	.nav.is-open {
		display: flex;
	}

	.nav a {
		padding: 11px 14px;
		border-radius: var(--r-sm);
	}

	.nav a.is-active::after {
		left: 14px;
		bottom: 7px;
		margin-left: 0;
	}

	.nav-cta {
		margin: 6px 0 0;
	}

	.hero {
		text-align: left;
	}

	.hero .lede,
	.hero-copy {
		margin-inline: 0;
	}

	.hero-actions {
		justify-content: flex-start;
	}

	.hero-actions .btn {
		flex: 1 1 auto;
	}

	.stage-icons {
		display: none;
	}

	.bar-search,
	.bar-label {
		display: none;
	}

	.pillars,
	.metrics,
	.split,
	.firstrun {
		grid-template-columns: 1fr;
	}

	.sorts {
		margin-left: 0;
	}

	.card-actions {
		opacity: 1;
		transform: none;
	}

	.band-head {
		align-items: flex-start;
	}

	.footer-cols {
		gap: 34px;
	}
}

@media (max-width: 520px) {
	.shell {
		padding: 0 18px;
	}

	.bar-apps .bar-app:nth-child(n + 4) {
		display: none;
	}

	.row .rowshot {
		width: 84px;
	}

	.metric {
		padding: 20px;
	}
}

/* ------------------------------------------------------- reduced motion --- */

/* The site still shows the sky and the desktop; it simply stops moving. The
   canvas draws one frame and the click effects resolve instantly. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}

	.js .reveal,
	.js .on-scroll,
	.js .stage {
		opacity: 1;
		transform: none;
	}

	.card-actions {
		opacity: 1;
		transform: none;
	}

	.shot img {
		opacity: 1;
	}
}
