/* Layout uses LeptosKit builders; the ink comes from the shared Skribble
 * theme, and every movement is a `Motion` the leptoskit renderer turns into
 * CSS. This sheet only places things and draws them. */

/* Lettering: Latin subsets of the book's fonts, preloaded by the page. */
@font-face {
	font-family: "SkribbleSketchLatin";
	src: url("/docs/assets/fonts/skribble/SkribbleNotoSketch-Latin.woff2")
		format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range:
		U+0020-007E,
		U+00A0,
		U+00B7,
		U+2013-2014,
		U+2018-201D,
		U+2022,
		U+2026;
}
@font-face {
	font-family: "SkribbleMonoLatin";
	src: url("/docs/assets/fonts/skribble/SkribbleMonoPlayful-Latin.woff2")
		format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range:
		U+0020-007E,
		U+00A0,
		U+00B7,
		U+2013-2014,
		U+2018-201D,
		U+2022,
		U+2026,
		U+2190-2199;
}

:root {
	/* The mono subset draws the arrows the sketch font lacks. */
	--sk-font:
		"SkribbleSketchLatin", "SkribbleMonoLatin", "Segoe Print", "Bradley Hand",
		"Comic Sans MS", cursive;
	--sk-mono:
		"SkribbleMonoLatin", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--paper: var(--sk-paper);
	--ink: var(--sk-ink);
	--quiet: var(--sk-quiet);
	--ember: var(--sk-coral);
	--warm: var(--sk-sun);
	--mint: var(--sk-mint);
	--line: var(--sk-rule);
	--display: var(--sk-font);
	--body: var(--sk-font);
	--code: var(--sk-mono);
	--gutter: max(5vw, calc((100vw - 1320px) / 2));
	/* The screens drawn on the stage: crisp, like the real thing. */
	--screen: #ffffff;
	--screen-2: #f3f1f5;
	--screen-ink: #1d1a22;
	--screen-quiet: #5c5563;
	--screen-line: #d9d4de;
	--bezel: #2a2033;
	--system:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Cantarell,
		"Noto Sans", "HarmonyOS Sans", system-ui, sans-serif;
	--terminal:
		ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
	/* How much scrolling each platform on the stage gets. */
	--turn: 62svh;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--screen: #221d28;
		--screen-2: #2c2633;
		--screen-ink: #f3ebdf;
		--screen-quiet: #bfb3c2;
		--screen-line: #463c4d;
		--bezel: #0f0c12;
	}
}
:root[data-theme="dark"] {
	--screen: #221d28;
	--screen-2: #2c2633;
	--screen-ink: #f3ebdf;
	--screen-quiet: #bfb3c2;
	--screen-line: #463c4d;
	--bezel: #0f0c12;
}

* {
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
}
body {
	margin: 0;
	color: var(--ink);
	font-family: var(--body);
}
::selection {
	background: var(--warm);
	color: var(--sk-on-accent);
}
a {
	color: inherit;
	text-decoration: none;
}
button, a {
	-webkit-tap-highlight-color: transparent;
}
button {
	font: inherit;
	cursor: pointer;
}
a:focus-visible, button:focus-visible {
	outline: 3px dashed var(--ember);
	outline-offset: 5px;
}
#site {
	width: 100%;
	overflow: clip;
	color: var(--ink);
	font-family: var(--body);
}
#site h1, #site h2, #site h3 {
	margin: 0;
	font-family: var(--display);
	font-weight: 400;
	letter-spacing: 0;
}
#main > [id] {
	scroll-margin-top: 1rem;
}
#skip {
	position: absolute;
	left: 1rem;
	top: -8rem;
	z-index: 10;
	padding: 1rem;
	background: var(--warm);
	color: var(--sk-on-accent);
}
#skip:focus {
	top: 0.75rem;
}
#hero-eyebrow,
[id$="-eyebrow"],
#source-caption,
#preview-caption,
[id^="scene-"][id$="-caption"],
#fan-tree-label,
#ownership-customer-label,
#ownership-managed-label,
#map-head-tree,
#map-head-becomes {
	font-family: var(--code);
	font-size: 0.68rem;
	line-height: 1.7;
	letter-spacing: 0.08em;
}

/* Header ------------------------------------------------------------------ */

#header {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 2rem;
	align-items: center;
	padding: 1.4rem var(--gutter);
}
#header::after {
	content: "";
	position: absolute;
	pointer-events: none;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 12px;
	background: var(--ink);
	mask: url("/docs/_leptoskit/generated/rule-1.svg") center / 100% 100%
		no-repeat;
}
#brand {
	display: flex;
	flex-direction: row;
	gap: 0.6rem;
	align-items: center;
	width: max-content;
}
#brand > span {
	font-family: var(--display);
	font-size: 1.65rem;
	letter-spacing: -0.02em;
}
#nav {
	display: flex;
	flex-direction: row;
	gap: 2rem;
	align-items: center;
	font-size: 1rem;
}
#nav a {
	position: relative;
	padding: 0.5rem 0;
}
#nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.15rem;
	height: 6px;
	background: var(--ember);
	mask: url("/docs/_leptoskit/generated/rule-2.svg") center / 100% 100%
		no-repeat;
	clip-path: inset(0 100% 0 0);
	transition: clip-path 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#nav a:hover::after, #nav a:focus-visible::after {
	clip-path: inset(0 0 0 0);
}
#nav-console {
	justify-self: end;
	padding: 0.75rem 1.1rem;
	font-size: 0.95rem;
}

/* Buttons drawn in ink ---------------------------------------------------- */

#hero-primary, #start-primary, #demo-increment, #nav-console {
	position: relative;
	border: 0;
	border-radius: var(--sk-wobbly-small);
	background: var(--warm);
	color: var(--sk-on-accent);
	transition:
		background-color 0.2s ease,
		transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#hero-primary:hover,
#start-primary:hover,
#demo-increment:hover,
#nav-console:hover {
	background: var(--ember);
	color: var(--sk-on-accent);
	transform: translateY(-2px) rotate(-0.6deg);
}
#hero-primary:active, #start-primary:active, #demo-increment:active {
	transform: translateY(1px) scale(0.98);
}
#hero-primary::after,
#start-primary::after,
#demo-increment::after,
#nav-console::after,
#fan-tree::after {
	content: "";
	position: absolute;
	pointer-events: none;
	inset: var(--sk-box-inset);
	background: var(--ink);
	mask: url("/docs/_leptoskit/generated/box-4.svg") center / 100% 100%
		no-repeat;
}

/* Hero -------------------------------------------------------------------- */

#hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 2rem;
	width: min(1320px, 90%);
	margin: 0 auto;
	padding: 5.5rem 0 4.5rem;
	min-height: 680px;
}
#hero-copy {
	display: flex;
	gap: 1.5rem;
}
#hero-eyebrow {
	color: var(--quiet);
}
#hero-title {
	display: flex;
	flex-direction: column;
	font-size: clamp(2.6rem, 5.6vw, 5.4rem);
	line-height: 1.06;
	max-width: 700px;
}
#hero-title > span {
	width: max-content;
	max-width: 100%;
	transform-origin: 0 100%;
}
#hero-line-2 {
	color: var(--ember);
}
#hero-underline {
	width: min(68%, 420px);
	height: 22px;
	margin-top: -1.15rem;
	background: var(--warm);
	mask: url("/docs/_leptoskit/generated/underline-2.svg") center / 100% 100%
		no-repeat;
}
#hero-description {
	max-width: 470px;
	font-size: 1.15rem;
	line-height: 1.65;
	color: var(--quiet);
}
#hero-actions, #start-actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 1.25rem;
	align-items: center;
	margin-top: 0.4rem;
	font-size: 0.95rem;
}
#hero-primary, #start-primary {
	padding: 1rem 1.35rem;
}
#hero-secondary, #start-source {
	padding: 0.9rem 0;
	text-decoration: underline wavy var(--ember) 2px;
	text-underline-offset: 0.3em;
}
#hero-secondary:hover, #start-source:hover {
	text-decoration-color: var(--warm);
}
#hero-note {
	color: var(--quiet);
	font-size: 0.95rem;
}

/* One tree in front, every screen fanned behind it. */
#hero-fan {
	position: relative;
	height: 500px;
	min-width: 0;
	font-size: 7px;
}
#fan-cards > a {
	position: absolute;
	left: calc(50% - 5.4rem);
	top: 70px;
	display: flex;
	flex-direction: column;
	width: 10.8rem;
	height: 14.2rem;
	padding: 0.45rem 0.45rem 0;
	border-radius: 0.9rem;
	background: var(--sk-paper);
	box-shadow:
		0 0 0 1.5px var(--ink),
		0.35rem 0.45rem 0 -0.05rem color-mix(in srgb, var(--ink) 18%, transparent);
	transform-origin: 50% 165%;
	rotate: var(--angle);
	transition:
		transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
		box-shadow 0.3s ease;
	cursor: pointer;
}
#fan-web {
	--angle: -42deg;
}
#fan-ios {
	--angle: -30deg;
}
#fan-android {
	--angle: -18deg;
}
#fan-macos {
	--angle: -6deg;
}
#fan-windows {
	--angle: 6deg;
}
#fan-linux {
	--angle: 18deg;
}
#fan-terminal {
	--angle: 30deg;
}
#fan-harmonyos {
	--angle: 42deg;
}
#fan-cards:has(> a:hover) > a:not(:hover) {
	transform: translateY(0.5rem);
}
#fan-cards > a:hover {
	transform: translateY(-1.6rem) scale(1.04);
	box-shadow:
		0 0 0 2px var(--ember),
		0.5rem 0.7rem 0 -0.05rem color-mix(in srgb, var(--ink) 22%, transparent);
	z-index: 2;
}
#fan-cards [id$="-device"] {
	width: 100%;
	height: auto;
	flex: 1 1 auto;
	border-radius: 0.55rem;
	box-shadow: none;
	border-width: 0;
}
#fan-cards [id$="-name"] {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 1.9rem;
	font-family: var(--code);
	font-size: 0.68rem;
	letter-spacing: 0.06em;
}
#fan-tree {
	position: absolute;
	z-index: 3;
	left: calc(50% - 9.3rem);
	top: 200px;
	width: 18.6rem;
	padding: 1.1rem 1.25rem 1.2rem;
	gap: 0.5rem;
	border-radius: var(--sk-wobbly-small);
	background: var(--sk-paper);
	rotate: -3deg;
	box-shadow: 0.5rem 0.6rem 0 0
		color-mix(in srgb, var(--warm) 70%, transparent);
}
#fan-tree-label {
	color: var(--ember);
	font-size: 0.62rem;
}
#fan-tree-code {
	white-space: pre;
	font: 0.78rem/1.85 var(--code);
}

/* The screens ------------------------------------------------------------- */

/* Sizes are in em, so the same drawing serves the fan, the stage, and the
 * side-by-side layout at different scales. */
[id$="-device"] {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: clip;
	background: var(--screen);
	color: var(--screen-ink);
	font-family: var(--system);
	--accent: #0a5fc4;
	--on-accent: #ffffff;
}
[id$="-device-chrome"] {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	flex: 0 0 auto;
	gap: 0.8em;
	height: 2.6em;
	padding: 0 1.1em;
	font-size: 1em;
}
[id$="-device-body"] {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.55em;
	flex: 1 1 auto;
	padding: 1.2em 1.6em 1.6em;
}
[id$="-device-title"] {
	font-size: 2em;
	font-weight: 650;
	line-height: 1.1;
	letter-spacing: -0.01em;
}
[id$="-device-count"] {
	font-size: 1.05em;
	color: var(--screen-quiet);
}
[id$="-device-button"] {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.9em;
	padding: 0.85em 1.3em;
	border-radius: 0.5em;
	background: var(--accent);
	color: var(--on-accent);
	font-size: 1em;
	font-weight: 600;
}
[id$="-device-time"] {
	font-size: 0.85em;
	font-weight: 650;
}
[id$="-device-camera"] {
	position: absolute;
	left: 50%;
	top: 0.7em;
	width: 0.9em;
	height: 0.9em;
	margin-left: -0.45em;
	border-radius: 50%;
	background: var(--bezel);
}

/* The web: leptoskit's own paper and ink. */
[id$="-web-device"] {
	width: 30em;
	height: 21em;
	border-radius: 0.6em;
	background: var(--sk-paper);
	color: var(--ink);
	font-family: var(--display);
	box-shadow: 0 0 0 0.12em var(--ink);
}
[id$="-web-device-chrome"] {
	background: var(--sk-paper-3);
	border-bottom: 0.1em solid var(--line);
}
[id$="-web-device-dots"] {
	width: 3.2em;
	height: 0.8em;
	background:
		radial-gradient(
			circle at 0.4em 50%,
			var(--ember) 0.32em,
			transparent 0.36em
		),
		radial-gradient(
		circle at 1.6em 50%,
		var(--warm) 0.32em,
		transparent 0.36em
	),
		radial-gradient(
		circle at 2.8em 50%,
		var(--mint) 0.32em,
		transparent 0.36em
	);
}
[id$="-web-device-address"] {
	flex: 1;
	padding: 0.25em 0.9em;
	border-radius: 999px;
	background: var(--sk-paper);
	color: var(--quiet);
	font: 0.78em var(--code);
}
[id$="-web-device-title"] {
	font-size: 2.4em;
	font-weight: 400;
}
[id$="-web-device-count"] {
	color: var(--quiet);
}
[id$="-web-device-button"] {
	position: relative;
	align-self: flex-start;
	border-radius: var(--sk-wobbly-small);
	background: var(--warm);
	color: var(--sk-on-accent);
	font-weight: 400;
}
[id$="-web-device-button"]::after {
	content: "";
	position: absolute;
	inset: -0.2em -0.15em;
	background: var(--ink);
	mask: url("/docs/_leptoskit/generated/box-2.svg") center / 100% 100%
		no-repeat;
}

/* Phones: a bezel, a status bar, and the content beneath. */
[id$="-ios-device"], [id$="-android-device"], [id$="-harmonyos-device"] {
	width: 16em;
	height: 31em;
	border: 0.55em solid var(--bezel);
	border-radius: 2.6em;
	box-shadow: 0 0 0 0.12em var(--ink);
}
[id$="-ios-device-body"],
[id$="-android-device-body"],
[id$="-harmonyos-device-body"] {
	justify-content: flex-start;
	padding-top: 2.2em;
}
[id$="-ios-device-button"],
[id$="-android-device-button"],
[id$="-harmonyos-device-button"] {
	margin-top: auto;
}
[id$="-ios-device"] {
	--accent: #0a5fc4;
}
[id$="-ios-device-camera"] {
	width: 4.6em;
	height: 1.3em;
	margin-left: -2.3em;
	top: 0.55em;
	border-radius: 999px;
}
[id$="-ios-device-title"] {
	font-size: 2.3em;
	font-weight: 750;
}
[id$="-ios-device-button"] {
	border-radius: 999px;
}
[id$="-android-device"] {
	--accent: #5b4596;
	border-radius: 1.9em;
}
[id$="-android-device-title"] {
	font-size: 1.85em;
	font-weight: 450;
}
[id$="-android-device-button"] {
	align-self: flex-end;
	border-radius: 999px;
	padding: 0.85em 1.5em;
}
[id$="-harmonyos-device"] {
	--accent: #0a55e6;
	border-radius: 2.2em;
}
[id$="-harmonyos-device-camera"] {
	left: 1.6em;
	margin-left: 0;
	top: 0.75em;
}
[id$="-harmonyos-device-time"] {
	margin-left: auto;
}
[id$="-harmonyos-device-button"] {
	border-radius: 999px;
	padding: 1em 1.3em;
}

/* Desktop windows: a title bar of their own. */
[id$="-macos-device"], [id$="-windows-device"], [id$="-linux-device"] {
	width: 29em;
	height: 19.5em;
	box-shadow: 0 0 0 0.12em var(--ink), 0 1.2em 2.4em -1.2em rgb(20 12 30 / 45%);
}
[id$="-macos-device-body"],
[id$="-windows-device-body"],
[id$="-linux-device-body"] {
	align-items: flex-start;
}
[id$="-macos-device"] {
	--accent: #0a5fc4;
	border-radius: 0.8em;
}
[id$="-macos-device-chrome"] {
	background: var(--screen-2);
	border-bottom: 0.08em solid var(--screen-line);
}
[id$="-macos-device-controls"] {
	width: 3.6em;
	height: 0.9em;
	background:
		radial-gradient(circle at 0.45em 50%, #ff5f57 0.4em, transparent 0.44em),
		radial-gradient(circle at 1.8em 50%, #febc2e 0.4em, transparent 0.44em),
		radial-gradient(circle at 3.15em 50%, #28c840 0.4em, transparent 0.44em);
}
[id$="-macos-device-caption"] {
	position: absolute;
	left: 0;
	right: 0;
	text-align: center;
	justify-content: center;
	font-size: 0.85em;
	font-weight: 650;
	color: var(--screen-quiet);
}
[id$="-macos-device-button"] {
	padding: 0.45em 1.1em;
	border-radius: 0.45em;
	font-weight: 500;
	box-shadow: 0 0.08em 0.15em rgb(0 0 0 / 25%);
}
[id$="-windows-device"] {
	--accent: #005fb8;
	border-radius: 0.5em;
}
[id$="-windows-device-chrome"] {
	flex-direction: row-reverse;
	justify-content: space-between;
	padding-right: 0;
}
[id$="-windows-device-controls"]::before {
	content: "—\2003\25A2\2003\2715";
	display: flex;
	align-items: center;
	height: 2.6em;
	padding: 0 1.2em;
	font-size: 0.85em;
	color: var(--screen-quiet);
}
[id$="-windows-device-caption"] {
	font-size: 0.85em;
}
[id$="-windows-device-title"] {
	font-weight: 600;
}
[id$="-windows-device-button"] {
	padding: 0.5em 1.4em;
	border-radius: 0.3em;
	background: var(--screen-2);
	color: var(--screen-ink);
	font-weight: 400;
	box-shadow:
		inset 0 0 0 0.08em var(--screen-line),
		inset 0 -0.12em 0 var(--screen-line);
}
[id$="-linux-device"] {
	--accent: #1a5fb4;
	border-radius: 0.95em;
}
[id$="-linux-device-chrome"] {
	justify-content: center;
	background: var(--screen-2);
	border-bottom: 0.08em solid var(--screen-line);
	height: 3em;
}
[id$="-linux-device-caption"] {
	font-size: 0.9em;
	font-weight: 700;
}
[id$="-linux-device-controls"] {
	position: absolute;
	right: 0.9em;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	background: var(--screen-line);
}
[id$="-linux-device-controls"]::before {
	content: "\2715";
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 0.7em;
	font-weight: 700;
	color: var(--screen-ink);
}
[id$="-linux-device-button"] {
	padding: 0.6em 1.4em;
	border-radius: 999px;
	font-weight: 700;
}

/* The terminal: a box of cells, the same in either theme. */
[id$="-terminal-device"] {
	width: 30em;
	height: 18em;
	border-radius: 0.5em;
	background: #1d1722;
	color: #f3ebdf;
	font-family: var(--terminal);
	box-shadow: 0 0 0 0.12em var(--ink);
}
[id$="-terminal-device-chrome"] {
	color: #7fd9c9;
	font-size: 0.85em;
}
[id$="-terminal-device-body"] {
	align-items: flex-start;
	gap: 0.4em;
	margin: 0 1.1em 1.1em;
	padding: 1.1em 1.3em;
	border: 0.1em solid #6f6273;
	border-radius: 0.2em;
}
[id$="-terminal-device-title"] {
	font-size: 1.35em;
	font-weight: 700;
	color: #f2c14e;
}
[id$="-terminal-device-count"] {
	color: #d9cdc1;
}
[id$="-terminal-device-button"] {
	padding: 0.1em 0.2em;
	border-radius: 0;
	background: #f3ebdf;
	color: #1d1722;
	font-weight: 700;
}

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

#tree {
	position: relative;
}
#tree > [id^="on-"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
}
#stage {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.5rem;
	padding: 5rem var(--gutter) 4rem;
	background: var(--sk-paper-2);
}
#stage-intro {
	max-width: 720px;
	gap: 1.25rem;
}
#stage-intro-eyebrow,
#studio-intro-eyebrow,
#workflow-intro-eyebrow,
#capabilities-intro-eyebrow,
#cloud-intro-eyebrow {
	color: var(--ember);
}
#stage-intro-title,
#studio-intro-title,
#workflow-intro-title,
#capabilities-intro-title,
#cloud-intro-title {
	white-space: pre-line;
	font-size: clamp(2.4rem, 4.4vw, 4.1rem);
	line-height: 1.05;
}
#stage-intro-description,
#studio-intro-description,
#workflow-intro-description,
#capabilities-intro-description,
#cloud-intro-description {
	max-width: 520px;
	color: var(--quiet);
	line-height: 1.7;
}

/* The tree beside what it becomes. */
#widget-map {
	position: relative;
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 0.6rem 1.6rem;
	align-items: baseline;
	width: max-content;
	max-width: 100%;
	padding: 1.5rem 1.7rem 1.7rem;
	border-radius: var(--sk-wobbly-small);
	background: var(--sk-paper);
	font: 0.95rem/1.6 var(--code);
}
#widget-map::after {
	content: "";
	position: absolute;
	pointer-events: none;
	inset: var(--sk-card-inset);
	background: var(--ink);
	mask: url("/docs/_leptoskit/generated/card-2.svg") center / 100% 100%
		no-repeat;
}
#widget-map > div {
	display: contents;
}
#widget-map > #map-head {
	display: flex;
	flex-direction: row;
	grid-column: 1 / -1;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1.5rem;
	padding-bottom: 0.8rem;
	margin-bottom: 0.3rem;
	border-bottom: 1.5px dashed var(--line);
}
[id^="map-row-"][id$="-code"] {
	white-space: pre;
}
[id$="-swap"] {
	display: grid;
	position: relative;
	padding-left: 1.6rem;
	color: var(--ember);
	font-weight: 700;
}
[id$="-swap"]::before {
	content: "→";
	position: absolute;
	left: 0;
	color: var(--quiet);
	font-family: var(--terminal);
	font-weight: 400;
}
[id$="-swap"] > span {
	grid-area: 1 / 1;
	white-space: pre;
}
#map-head-platforms {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
#map-head-tree, #map-head-becomes {
	color: var(--quiet);
}
#map-head-swap {
	padding-left: 0;
	color: var(--ember);
	font-family: var(--display);
	font-size: 2.3rem;
	line-height: 1.1;
	font-weight: 400;
}
#map-head-swap::before {
	content: none;
}

/* Side by side, until scroll timelines stage them. */
#scenes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: 1.5rem;
	font-size: 9px;
}
#scenes > div {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.2rem;
	min-height: 33em;
	padding: 2em 1em;
	border-radius: var(--sk-wobbly-small);
	background:
		radial-gradient(var(--sk-dots) 1px, transparent 1.5px) 0 0 / 24px 24px,
		color-mix(in srgb, var(--tint) 24%, var(--sk-paper));
}
/* Each platform gets a world of its own colour. */
#scene-web {
	--tint: var(--sk-sun);
}
#scene-ios {
	--tint: var(--sk-sky);
}
#scene-android {
	--tint: var(--sk-mint);
}
#scene-macos {
	--tint: var(--sk-lilac);
}
#scene-windows {
	--tint: var(--sk-coral);
}
#scene-linux {
	--tint: var(--sk-sun);
}
#scene-terminal {
	--tint: var(--sk-pink);
}
#scene-harmonyos {
	--tint: var(--sk-sky);
}
#scenes > div::after {
	content: "";
	position: absolute;
	pointer-events: none;
	inset: var(--sk-card-inset);
	background: var(--ink);
	mask: url("/docs/_leptoskit/generated/card-3.svg") center / 100% 100%
		no-repeat;
}
[id^="scene-"][id$="-caption"] {
	font-size: 0.72rem;
	color: var(--ink);
}
[id^="scene-"][id$="-widgets"] {
	max-width: 30ch;
	text-align: center;
	justify-content: center;
	font: 0.8rem/1.6 var(--code);
	color: var(--quiet);
}
#stage [id$="-swap"] > span:not(:first-child),
#ticker > a[id^="ticker-"]:not(#ticker-more),
#stage-progress {
	display: none;
}
#ticker {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0.4rem 1.6rem;
	align-items: center;
}
#ticker-more {
	font-size: 0.85rem;
	text-decoration: underline wavy var(--ember) 2px;
	text-underline-offset: 0.3em;
}
[id^="ticker-"][id$="-ink"] {
	position: absolute;
	left: -0.2rem;
	right: -0.2rem;
	bottom: -0.1rem;
	height: 9px;
	background: var(--ember);
	mask: url("/docs/_leptoskit/generated/underline-3.svg") center / 100% 100%
		no-repeat;
}

/* Staged: a tall track scrolls past a stage that stays put, and every part
 * of the stage follows the track's timeline. */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		#tree {
			height: calc(100svh + 8 * var(--turn));
		}
		/* Each platform's link lands in the middle of its turn. */
		#tree > [id^="on-"] {
			top: calc(var(--turns) * var(--turn));
		}
		#on-web {
			--turns: 0.5;
		}
		#on-ios {
			--turns: 1.5;
		}
		#on-android {
			--turns: 2.5;
		}
		#on-macos {
			--turns: 3.5;
		}
		#on-windows {
			--turns: 4.5;
		}
		#on-linux {
			--turns: 5.5;
		}
		#on-terminal {
			--turns: 6.5;
		}
		#on-harmonyos {
			--turns: 7.5;
		}
		#stage {
			position: sticky;
			top: 0;
			height: 100svh;
			grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
			grid-template-rows: auto minmax(0, 1fr) auto;
			grid-template-areas:
				"intro scenes"
				"map scenes"
				"ticker ticker";
			gap: 1.5rem 3rem;
			padding-top: clamp(2rem, 5svh, 3.5rem);
			padding-bottom: clamp(1.5rem, 4svh, 2.5rem);
			overflow: clip;
		}
		#stage-intro {
			grid-area: intro;
		}
		#widget-map {
			grid-area: map;
			align-self: center;
		}
		#scenes {
			grid-area: scenes;
			display: block;
			position: relative;
			font-size: clamp(9px, 2svh, 17px);
		}
		#scenes > div {
			position: absolute;
			inset: 0;
			min-height: 0;
		}
		[id^="scene-"][id$="-caption"] {
			font-size: 0.78rem;
		}
		/* The map says it; the captions' widget lists stay for screen
		 * readers, which read every scene in order. */
		[id^="scene-"][id$="-widgets"] {
			position: absolute;
			width: 1px;
			height: 1px;
			overflow: hidden;
			clip-path: inset(50%);
			white-space: nowrap;
		}
		#stage [id$="-swap"] > span:not(:first-child),
		#ticker > a[id^="ticker-"]:not(#ticker-more),
		#stage-progress {
			display: flex;
		}
		#ticker {
			grid-area: ticker;
			gap: 0.4rem 1.8rem;
		}
		#ticker > a:not(#ticker-more) {
			position: relative;
			padding: 0.35rem 0;
			font-size: 1.05rem;
		}
		#ticker-more {
			margin-left: auto;
		}
		#stage-progress {
			position: absolute;
			left: var(--gutter);
			right: var(--gutter);
			bottom: 0.6rem;
			height: 8px;
			background: var(--ink);
			opacity: 0.55;
			mask: url("/docs/_leptoskit/generated/rule-4.svg") center / 100% 100%
				no-repeat;
		}
	}
}

/* The live example -------------------------------------------------------- */

#toolkit {
	padding: 6rem var(--gutter);
	gap: 3rem;
}
#studio-intro {
	max-width: 720px;
	gap: 1.25rem;
}
#studio-board {
	position: relative;
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 1px;
	border-radius: var(--sk-wobbly-small);
}
#studio-board::after,
#demo-card::after,
[id^="feature-"]:not([id$="-icon"]):not([id$="-link"])::after,
#ownership::after {
	content: "";
	position: absolute;
	pointer-events: none;
	inset: var(--sk-card-inset);
	background: var(--ink);
	opacity: 0.8;
	mask: url("/docs/_leptoskit/generated/card-1.svg") center / 100% 100%
		no-repeat;
}
#source-panel {
	padding: 2.2rem;
	gap: 1.5rem;
	border-radius: var(--sk-wobbly-small);
	background: var(--sk-paper-3);
}
#source-caption, #preview-caption {
	color: var(--quiet);
}
#source-code {
	white-space: pre;
	overflow-x: auto;
	font: 0.82rem/1.85 var(--code);
}
#source-guide, #source-motion {
	align-self: flex-start;
	color: var(--quiet);
	font-size: 0.95rem;
	text-decoration: underline wavy var(--ember) 2px;
	text-underline-offset: 0.3em;
}
#source-guide {
	margin-top: auto;
}
#preview-panel {
	padding: 2rem;
	gap: 1.5rem;
	justify-content: center;
	border-radius: var(--sk-wobbly-small);
	background: var(--sk-paper);
}
#preview-caption {
	text-align: center;
	justify-content: center;
}
#live-demo {
	width: 100%;
	align-items: center;
}
#demo-card {
	position: relative;
	width: min(100%, 330px);
	min-height: 350px;
	background: var(--paper);
	border-radius: var(--sk-wobbly-small);
}
#demo-mark {
	width: 50px;
	height: 50px;
}
#demo-title {
	font-size: 2rem;
}
#demo-tally {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.6rem;
}
#demo-count {
	font-size: 1.05rem;
	transform-origin: 0 50%;
}
#demo-plus {
	position: absolute;
	left: 9.5rem;
	color: var(--ember);
	font: 700 1.2rem var(--code);
}
#demo-description {
	color: var(--quiet);
	font-size: 0.95rem;
	line-height: 1.6;
}
#demo-increment {
	padding: 0.8rem 1rem;
	margin-top: auto;
	width: 100%;
	font-size: 0.95rem;
}
#demo-increment:disabled {
	cursor: progress;
}
#preview-note {
	max-width: 340px;
	margin: 0 auto;
	text-align: center;
	color: var(--quiet);
	font-size: 0.95rem;
	line-height: 1.6;
}

/* The journey and the foundations ----------------------------------------- */

#workflow, #capabilities {
	width: min(1320px, 90%);
	margin: 0 auto;
	padding: 5rem 0;
	gap: 3rem;
}
#workflow-intro, #capabilities-intro {
	max-width: 680px;
	gap: 1.25rem;
}
#workflow-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3rem;
}
[id^="step-0"][id$="-rule"] {
	height: 9px;
	background: var(--ember);
	mask: url("/docs/_leptoskit/generated/rule-3.svg") center / 100% 100%
		no-repeat;
}
[id^="step-0"][id$="-number"] {
	font-family: var(--code);
	color: var(--ember);
	font-size: 0.8rem;
}
[id^="step-0"][id$="-title"] {
	font-size: 1.7rem;
	line-height: 1.15;
}
[id^="step-0"][id$="-description"] {
	color: var(--quiet);
	font-size: 0.98rem;
	line-height: 1.7;
}
[id^="step-"][id$="-link"],
[id^="feature-"][id$="-link"],
#ownership a {
	align-self: flex-start;
	margin-top: auto;
	padding-top: 0.4rem;
	font-size: 0.95rem;
	text-decoration: underline wavy var(--ember) 2px;
	text-underline-offset: 0.3em;
}
#capabilities {
	padding-top: 1rem;
}
#capability-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.75rem;
}
[id^="feature-"]:not([id$="-icon"]):not([id$="-link"]) {
	position: relative;
	padding: 2.1rem;
	min-height: 320px;
	border-radius: var(--sk-wobbly-small);
	background-color: var(--sk-paper-2);
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
[id^="feature-"]:not([id$="-icon"]):not([id$="-link"]):hover {
	transform: translateY(-4px) rotate(-0.4deg);
}
[id^="feature-"][id$="-icon"] {
	font: 1.65rem var(--code);
	color: var(--ember);
	margin-bottom: 0.4rem;
}
[id^="feature-"] h3 {
	font-size: 1.6rem;
	line-height: 1.15;
}
[id^="feature-"] > span:not([id$="-icon"]) {
	color: var(--quiet);
	font-size: 0.98rem;
	line-height: 1.7;
}
#feature-motion {
	background-color: color-mix(in srgb, var(--sk-coral) 11%, var(--paper));
}
#feature-live {
	background-color: color-mix(in srgb, var(--sk-mint) 13%, var(--paper));
}

/* Your cloud -------------------------------------------------------------- */

#cloud {
	padding: 6rem var(--gutter);
	gap: 3rem;
	background: color-mix(in srgb, var(--sk-mint) 13%, var(--paper));
}
#cloud-intro {
	max-width: 760px;
	gap: 1.25rem;
}
#ownership {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-radius: var(--sk-wobbly-small);
	background: var(--paper);
}
#ownership-customer, #ownership-managed {
	padding: 2.5rem;
}
#ownership-customer {
	border-right: 1px dashed var(--line);
}
#ownership h3 {
	font-size: clamp(1.9rem, 3vw, 2.6rem);
	white-space: pre-line;
	line-height: 1.08;
}
#ownership > div > span:not([id$="-label"]) {
	color: var(--quiet);
	max-width: 440px;
	font-size: 0.98rem;
	line-height: 1.75;
}
#ownership-customer-label, #ownership-managed-label {
	color: var(--ember);
}
#cloud-note {
	color: var(--quiet);
	font-size: 0.95rem;
	line-height: 1.75;
	max-width: 740px;
}

/* The end ----------------------------------------------------------------- */

#start {
	width: min(1320px, 90%);
	margin: 0 auto;
	padding: 7rem 0;
	gap: 2rem;
	align-items: center;
	text-align: center;
}
#start-eyebrow {
	color: var(--ember);
}
#start-title {
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: clamp(2.6rem, 6vw, 5.7rem);
	line-height: 1.04;
}
#start-title > span {
	overflow: clip;
	padding: 0 0.15em 0.12em;
}
#start-line-2 {
	color: var(--ember);
}
#start-actions {
	justify-content: center;
}
#footer {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 2rem;
	align-items: center;
	padding: 2rem var(--gutter);
	font-size: 0.95rem;
	color: var(--quiet);
}
#footer::before {
	content: "";
	position: absolute;
	pointer-events: none;
	left: 0;
	right: 0;
	top: -6px;
	height: 12px;
	background: var(--ink);
	opacity: 0.4;
	mask: url("/docs/_leptoskit/generated/rule-1.svg") center / 100% 100%
		no-repeat;
}
#footer-brand {
	font-family: var(--display);
	font-size: 1.4rem;
	color: var(--ink);
}
#footer-links {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 1.4rem;
}
#footer-links a {
	padding: 0.4rem 0;
}
#footer-links a:hover {
	color: var(--ember);
}
noscript {
	display: block;
	padding: 1rem 5%;
	font: 0.9rem/1.6 var(--body);
	background: var(--sk-paper-3);
}

/* Narrower screens -------------------------------------------------------- */

@media (max-width: 1000px) {
	#hero {
		gap: 1rem;
		padding: 4rem 0;
	}
	#hero-fan {
		font-size: 6px;
	}
	#source-panel, #preview-panel {
		padding: 1.5rem;
	}
	#source-code {
		font-size: 0.72rem;
	}
	#capability-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	#workflow-steps {
		gap: 1.8rem;
	}
}
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) and (max-width: 1000px) {
		#stage {
			grid-template-columns: minmax(0, 1fr);
			grid-template-rows: auto auto minmax(0, 1fr) auto;
			grid-template-areas:
				"intro"
				"map"
				"scenes"
				"ticker";
			gap: 1rem;
		}
		#stage-intro {
			gap: 0.4rem;
		}
		#stage-intro-title {
			white-space: normal;
			font-size: clamp(1.7rem, 6.5vw, 2.6rem);
		}
		#stage-intro-description {
			display: none;
		}
		#widget-map {
			width: 100%;
			padding: 0.8rem 1rem;
			gap: 0.15rem 1rem;
			font-size: 0.72rem;
		}
		#scenes {
			font-size: clamp(7px, 1.35svh, 12px);
		}
		#ticker {
			gap: 0.2rem 1rem;
		}
		#ticker > a:not(#ticker-more) {
			font-size: 0.9rem;
		}
		#ticker-more {
			display: none;
		}
	}
}
@media (max-width: 700px) {
	#header {
		grid-template-columns: 1fr auto;
		padding: 1rem 5%;
		gap: 1rem;
	}
	#nav-console {
		grid-column: 2;
		grid-row: 1;
		padding: 0.65rem 0.8rem;
		font-size: 0.8rem;
	}
	#nav {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-content: space-between;
		gap: 0.75rem;
		font-size: 0.95rem;
	}
	#hero {
		grid-template-columns: minmax(0, 1fr);
		padding: 2.5rem 0 1rem;
		gap: 0.5rem;
		min-height: 0;
	}
	#hero-copy {
		gap: 1.25rem;
	}
	#hero-eyebrow {
		font-size: 0.6rem;
	}
	#hero-title {
		font-size: clamp(2.5rem, 12.5vw, 3.5rem);
	}
	#hero-underline {
		margin-top: -0.9rem;
	}
	#hero-description {
		font-size: 1.05rem;
	}
	#hero-fan {
		height: 340px;
		font-size: 4.6px;
	}
	#fan-cards > a {
		left: calc(50% - 3.9rem);
		top: 40px;
		width: 7.8rem;
		height: 10.4rem;
		padding: 0.3rem 0.3rem 0;
	}
	#fan-cards [id$="-name"] {
		height: 1.5rem;
		font-size: 0.55rem;
	}
	#fan-tree {
		left: calc(50% - 8.8rem);
		top: 150px;
		width: 17.6rem;
		padding: 0.8rem 0.9rem 0.9rem;
	}
	#fan-tree-code {
		font-size: 0.75rem;
	}
	#stage {
		padding-top: 3.5rem;
		padding-bottom: 3rem;
	}
	#site h2 {
		font-size: clamp(2.1rem, 9.5vw, 3.2rem);
	}
	#toolkit {
		padding-top: 3.5rem;
		padding-bottom: 3.5rem;
		gap: 2rem;
	}
	#studio-board {
		grid-template-columns: minmax(0, 1fr);
	}
	#source-code {
		white-space: pre-wrap;
		overflow-wrap: anywhere;
		font-size: 0.75rem;
	}
	#workflow, #capabilities {
		padding-top: 3.5rem;
		padding-bottom: 3.5rem;
		gap: 2rem;
	}
	#capabilities {
		padding-top: 0;
	}
	#workflow-steps {
		grid-template-columns: minmax(0, 1fr);
		gap: 2.25rem;
	}
	#capability-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
	}
	[id^="feature-"]:not([id$="-icon"]):not([id$="-link"]) {
		padding: 1.75rem;
		min-height: 0;
	}
	#cloud {
		padding-top: 3.5rem;
		padding-bottom: 3.5rem;
		gap: 2rem;
	}
	#ownership {
		grid-template-columns: minmax(0, 1fr);
	}
	#ownership-customer, #ownership-managed {
		padding: 1.75rem;
	}
	#ownership-customer {
		border-right: 0;
		border-bottom: 1px dashed var(--line);
	}
	#start {
		padding: 4.5rem 0;
	}
	#start-title {
		font-size: clamp(2.3rem, 10.5vw, 3.4rem);
	}
	#footer {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.75rem;
		padding-top: 1.5rem;
		padding-bottom: 1.5rem;
	}
}
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) and (max-width: 700px) {
		#stage {
			padding: 1.25rem 5% 1.75rem;
		}
		#stage-intro-eyebrow {
			font-size: 0.6rem;
		}
		#widget-map {
			gap: 0.1rem 0.6rem;
			padding: 0.7rem 0.8rem;
			font-size: 0.58rem;
		}
		#widget-map > #map-head {
			display: none;
		}
		#widget-map [id$="-swap"] {
			padding-left: 1.1rem;
		}
		#stage-progress {
			bottom: 0.4rem;
		}
	}
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	#fan-cards > a,
	[id^="feature-"]:not([id$="-icon"]):not([id$="-link"]),
	#hero-primary,
	#start-primary,
	#demo-increment,
	#nav-console {
		transition: none;
	}
}
