:root {
	--bg: #faf9f5;
	--surface: #f0eee6;
	--text: #141413;
	--muted: #5e5d59;
	--line: #e3dacc;
	--accent: #c96442;
	--accent-text: #ffffff;
	--code-bg: #141413;
	--code-text: #f0eee6;
	--blob: #d97757;
	--ink: #141413;
	--accent-deep: #c96442;
	--panel: #e8e4d9;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "PingFang SC", "Noto Sans JP", "Noto Sans SC", "Microsoft YaHei", "Yu Gothic", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Dark follows the system unless the header's picker chose a theme (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--bg: #1f1e1d;
		--surface: #2a2927;
		--text: #f0eee6;
		--muted: #a8a59b;
		--line: #3a3936;
		--accent: #d97757;
		--code-bg: #141413;
		--code-text: #f0eee6;
		--blob: #b85f42;
		--ink: #141413;
		--accent-deep: #c96442;
		--panel: #33312e;
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #1f1e1d;
	--surface: #2a2927;
	--text: #f0eee6;
	--muted: #a8a59b;
	--line: #3a3936;
	--accent: #d97757;
	--code-bg: #141413;
	--code-text: #f0eee6;
	--blob: #b85f42;
	--ink: #141413;
	--accent-deep: #c96442;
	--panel: #33312e;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 17px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* Header */
header.site {
	border-bottom: 1px solid var(--line);
}
html { scroll-padding-top: 84px; }
/* Pinned once you scroll past it (theme.js): fixed to the top, sliding in. The page keeps its height. */
.header-pinned body { padding-top: var(--header-h); }
.header-pinned header.site {
	position: fixed; top: 0; left: 0; right: 0; z-index: 30;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	box-shadow: 0 1px 12px rgb(0 0 0 / 0.06);
	animation: header-in 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes header-in { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .header-pinned header.site { animation: none; } }
.header-pinned .story.armed .term { top: calc(var(--header-h) + 16px); }
.header-pinned .docs-nav { top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); }
header.site .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 68px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	white-space: nowrap;
	font-weight: 600;
	text-decoration: none;
	letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }
nav.links { display: flex; gap: 24px; font-size: 15px; }
nav.links a { text-decoration: none; color: var(--muted); }
nav.links a:hover { color: var(--text); }
nav.links a.gh { display: inline-flex; align-items: center; gap: 7px; }
nav.links a.gh img { opacity: 0.75; transition: opacity 0.2s; }
nav.links a.gh:hover img { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) nav.links a.gh img { filter: invert(1); } }
:root[data-theme="dark"] nav.links a.gh img { filter: invert(1); }
nav.links { align-items: center; }

/* Appearance picker (theme.js) */
button.theme, button.menu, button.lang {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; margin: -6px -6px -6px 0; padding: 0;
	border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
}
button.theme:hover, button.theme:focus-visible, button.menu:hover, button.menu:focus-visible, button.lang:hover, button.lang:focus-visible { color: var(--text); background: var(--surface); }
button.menu { display: none; margin: 0; }
button.menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
button.theme svg, button.lang svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
button.theme svg .half { fill: currentColor; stroke: none; }
.theme-menu {
	position: absolute; inset: auto; margin: 0; padding: 6px; min-width: 150px;
	border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text);
	box-shadow: 0 12px 32px rgb(0 0 0 / 0.14); font: 14px/1.2 var(--sans);
}
.theme-menu button {
	display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
	border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.theme-menu button:hover, .theme-menu button:focus-visible { background: var(--surface); outline: none; }
.theme-menu svg {
	width: 16px; height: 16px; flex: none; color: var(--muted);
	fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.theme-menu a {
	display: flex; align-items: center; padding: 9px 10px; border-radius: 8px;
	color: inherit; text-decoration: none;
}
.theme-menu a:hover, .theme-menu a:focus-visible { background: var(--surface); outline: none; }
.theme-menu .check { margin-left: auto; color: var(--accent); visibility: hidden; }
.theme-menu [aria-checked="true"] .check { visibility: visible; }

/* Language picker (lang.js) */
.lang-menu { min-width: 170px; }
.lang-suggest {
	position: fixed; left: 16px; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px;
	max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border: 1px solid var(--line); border-radius: 12px;
	background: var(--bg); color: var(--text); box-shadow: 0 12px 32px rgb(0 0 0 / 0.14); font: 14px/1.3 var(--sans);
}
.lang-suggest a { color: var(--accent); font-weight: 500; text-decoration: none; }
.lang-suggest button {
	width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 18px/1 var(--sans); cursor: pointer;
}
.lang-suggest button:hover { background: var(--surface); color: var(--text); }
footer.site .i18n-note { flex-basis: 100%; }

/* Hero */
.hero { padding: 96px 0 72px; }
.hero h1 {
	font: 400 clamp(40px, 7vw, 68px)/1.08 var(--serif);
	letter-spacing: -0.02em;
	margin: 0 0 24px;
	max-width: 14ch;
}
.hero p.lede {
	font-size: clamp(18px, 2.4vw, 21px);
	color: var(--muted);
	max-width: 36em;
	margin: 0 0 36px;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 10px;
	font-weight: 500;
	font-size: 16px;
	text-decoration: none;
	border: 1px solid var(--text);
}
.button.primary { background: var(--text); color: var(--bg); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.ghost:hover { border-color: var(--accent); }
.button.with-icon { display: inline-flex; align-items: center; gap: 8px; }
.button.with-icon img { margin-top: -2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button.with-icon img { filter: invert(1); } }
:root[data-theme="dark"] .button.with-icon img { filter: invert(1); }
.note { font-size: 14px; color: var(--muted); }

/* Terminal snippet */
.cmd {
	margin: 56px 0 0;
	padding: 22px 24px;
	background: var(--code-bg);
	color: var(--code-text);
	border-radius: 14px;
	font: 15px/1.7 var(--mono);
	overflow-x: auto;
}
.cmd .p { color: #d97757; user-select: none; }
.cmd .c { color: #8d8a80; }
/* Command syntax (tabs.js): on the code background, which is dark in both themes */
.cmd .t-cmd { color: #7cc3c9; }
.cmd .t-flag { color: #c4a5e8; }
.cmd .t-str { color: #a3cf8f; }
.cmd .t-op { color: #e8826a; }
.cmd .t-arg { color: #e3c27a; }
.cmd .t-var { color: #e3c27a; }

/* Sections */
section.block { padding: 72px 0; border-top: 1px solid var(--line); }
section.block h2 {
	font: 400 clamp(28px, 4vw, 38px)/1.2 var(--serif);
	letter-spacing: -0.015em;
	margin: 0 0 40px;
}
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
}
.card {
	background: var(--surface);
	border-radius: 16px;
	padding: 28px;
}
.card h3 { font: 600 18px/1.3 var(--sans); margin: 0 0 10px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

ol.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 28px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 16px; }
ol.steps li::before {
	content: counter(s);
	font: 400 32px/1 var(--serif);
	color: var(--accent);
}
ol.steps h3 { margin: 0 0 6px; font: 600 18px/1.3 var(--sans); }
ol.steps p { margin: 0; color: var(--muted); }
code {
	font: 0.9em var(--mono);
	background: var(--surface);
	padding: 2px 6px;
	border-radius: 5px;
}

/* Legal / prose pages */
.prose { padding: 72px 0 96px; }
.prose h1 { font: 400 clamp(36px, 6vw, 52px)/1.1 var(--serif); letter-spacing: -0.02em; margin: 0 0 12px; }
.prose .meta { color: var(--muted); font-size: 15px; margin: 0 0 48px; }
.legal-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-bottom: 8px; }
.legal-head .meta { margin-bottom: 0; }
.legal-art { width: 210px; height: auto; overflow: visible; animation: rise 1s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.legal-head + * { margin-top: 40px; }
@media (max-width: 600px) {
	.legal-head { grid-template-columns: 1fr; }
	.legal-art { width: 160px; order: -1; }
}

/* Legal illustrations: shared */
.legal-art .blob { fill: var(--blob); }
.legal-art .paper { fill: #faf9f5; stroke: #141413; stroke-width: 3; stroke-linejoin: round; }
.legal-art .fold { fill: #ebe8df; stroke: #141413; stroke-width: 3; stroke-linejoin: round; }
.legal-art .line { fill: none; stroke: #141413; stroke-opacity: 0.3; stroke-width: 3; stroke-linecap: round; }
.legal-art .ink { fill: #141413; }
.legal-art .spark path { fill: var(--text); }
.legal-art .spark { transform-box: fill-box; transform-origin: center; animation: twinkle 3.6s ease-in-out infinite; }
.legal-art .spark.s2 { animation-delay: 1.5s; }

/* Terms: a pen signs the page */
.legal-art .signature {
	fill: none; stroke: #141413; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
	stroke-dasharray: 1; stroke-dashoffset: 0; animation: sign 3s linear both;
}
@keyframes sign { 0%, 25% { stroke-dashoffset: 1; } 85%, 100% { stroke-dashoffset: 0; } }
.legal-art .pen-body { fill: #c96442; stroke: #141413; stroke-width: 2.5; stroke-linejoin: round; }
.legal-art .pen-band { fill: #faf9f5; stroke: #141413; stroke-width: 2.5; }

/* Privacy: lines get redacted, then the lock clicks shut */
.legal-art .redact { fill: #141413; transform-box: fill-box; transform-origin: left center; animation: redact 0.6s cubic-bezier(0.6, 0, 0.3, 1) both; }
.legal-art .redact.d2 { animation-delay: 0.35s; }
.legal-art .redact.d3 { animation-delay: 0.7s; }
@keyframes redact { from { transform: scaleX(0); } }
.legal-art .lock { fill: #faf9f5; stroke: #141413; stroke-width: 3; }
.legal-art .shackle { fill: none; stroke: #141413; stroke-width: 6; stroke-linecap: round; animation: latch 0.7s 1.3s cubic-bezier(0.5, 0, 0.3, 1.4) both; }
@keyframes latch { from { transform: translateY(-12px); } }
.legal-art .click { fill: none; stroke: #141413; stroke-width: 2.5; stroke-linecap: round; opacity: 0; animation: click 0.6s 1.9s ease-out both; }
@keyframes click { 0% { opacity: 0; transform: scale(0.6); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.15); } }
.legal-art .click { transform-box: fill-box; transform-origin: center; }
.prose h2 { font: 400 26px/1.3 var(--serif); margin: 48px 0 12px; }
.prose h3 { font: 600 17px/1.4 var(--sans); margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.callout {
	background: var(--surface);
	border-left: 3px solid var(--accent);
	border-radius: 0 12px 12px 0;
	padding: 18px 22px;
	margin: 0 0 32px;
}
.callout p { margin: 0; }
.shots { margin: 28px 0 36px; }
.shots ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.shots li { margin: 0; }
.shots img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.shots figcaption { color: var(--muted); font-size: 14px; margin-top: 12px; }
@media (max-width: 600px) { .shots ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Hero illustration */
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
	.hero-grid { grid-template-columns: 1.15fr 1fr; gap: 48px; }
}
.hero-art { width: 100%; max-width: 480px; height: auto; justify-self: center; overflow: visible; contain: layout paint; }
/* motion.js adds .paused while an illustration is off screen, so scrolling doesn't repaint it */
.art.paused, .art.paused * { animation-play-state: paused !important; }
.hero-art .blob { fill: var(--blob); }
.hero-art .device { fill: #faf9f5; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.hero-art .ink-thin { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-art .ink-faint { fill: none; stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 2.5; stroke-linecap: round; }
.hero-art .ink-dot { fill: var(--ink); }
.hero-art .row { fill: #ebe8df; }
.hero-art .cursor { fill: var(--accent-deep); animation: blink 1.1s steps(1) infinite; }
.hero-art .tunnel { fill: none; stroke: var(--ink); stroke-opacity: 0.18; stroke-width: 10; stroke-linecap: round; }
.hero-art .tunnel-flow {
	fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round;
	stroke-dasharray: 2 10; animation: flow 1.4s linear infinite;
}
.hero-art .relay { fill: #faf9f5; stroke: var(--ink); stroke-width: 3; }
.hero-art .lock-shackle { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.hero-art .lock-hole { fill: var(--ink); }
.hero-art .relay-ring {
	fill: none; stroke: #faf9f5; stroke-width: 2;
	transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite;
}
.hero-art .packet { fill: #faf9f5; stroke: var(--ink); stroke-width: 2.5; }
.hero-art .packet.back { fill: var(--ink); stroke: none; }
.hero-art .spark path { fill: var(--text); }
.hero-art .spark { transform-box: fill-box; transform-origin: center; animation: twinkle 3.6s ease-in-out infinite; }
.hero-art .s2 { animation-delay: 1.2s; }
.hero-art .s3 { animation-delay: 2.4s; }
.hero-art .squiggle { fill: none; stroke: #faf9f5; stroke-width: 3; stroke-linecap: round; opacity: 0.8; }
.hero-art .phone { animation: float 6s ease-in-out infinite; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes pulse { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(0.55) rotate(45deg); opacity: 0.5; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.cmd .blink { color: #d97757; animation: blink 1.1s steps(1) infinite; margin-left: 2px; }

/* Hero terminal: motion.js pins it (.story.armed) and shows its lines as you scroll, like the real CLI */
.term .ln { white-space: pre-wrap; min-height: 1.7em; }
.term .qr .ln { white-space: pre; line-height: 1; min-height: 0; }
.term .mark.ok { color: #8fbf7f; }
.term .mark.spin { color: #7cc3c9; }
.story { margin-top: 56px; }
.story .term { margin: 0; }
.story.armed .term { position: sticky; top: 16px; }
.term.armed .ln:not(.on) { display: none; }
.term.armed .ln.on { animation: ln-in 0.25s ease-out; }
@keyframes ln-in { from { opacity: 0; transform: translateY(3px); } }
@media (max-width: 600px) { .cmd { font-size: 13px; padding: 18px; } }

/* Card icons */
.card .icon {
	width: 40px; height: 40px; margin-bottom: 18px;
	fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.card .icon .fill { stroke: var(--accent); }
.card .icon circle.fill { fill: var(--accent); stroke: none; }
.card .icon path.fill[d^="M6"] { fill: var(--accent); stroke: none; opacity: 0.9; }
.card .icon .dash { stroke: var(--accent); stroke-dasharray: 2 4; animation: flow 1.4s linear infinite; }
/* Feature cards: an illustration panel on top, the text below */
.card.feature { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.feature-art {
	display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
	background: var(--panel);
	border-bottom: 1px solid var(--line);
}
.feature-body { padding: 24px 28px 28px; }
.feature-art .device { fill: #faf9f5; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.feature-art .accent { fill: var(--accent-deep); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.feature-art .screen { fill: #141413; stroke: var(--ink); stroke-width: 2.5; }
.feature-art .row { fill: #ebe8df; }
.feature-art .ink { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.feature-art .faint { fill: none; stroke: var(--ink); stroke-opacity: 0.3; stroke-width: 2.5; stroke-linecap: round; }
.feature-art .cream-line { fill: none; stroke: #faf9f5; stroke-width: 2.5; stroke-linecap: round; }
.feature-art .cream-faint { fill: none; stroke: #faf9f5; stroke-opacity: 0.35; stroke-width: 2.5; stroke-linecap: round; }
.feature-art .dot { fill: #faf9f5; opacity: 0.35; }
.feature-art .prompt { fill: none; stroke: #d97757; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.feature-art .cursor { fill: #d97757; animation: blink 1.1s steps(1) infinite; }
.feature-art .play { fill: #faf9f5; }
.feature-art .rail.hot-rail { stroke: var(--accent-deep); }
.feature-art .hot-dot { fill: var(--accent-deep); }
.feature-art .mono { font: 500 13px var(--mono); fill: var(--ink); }
.feature-art .mono.cream { fill: #faf9f5; }
.feature-art .plus { fill: #3f7f4e; }
.feature-art .minus { fill: var(--accent-deep); }
.feature-art .method-ink { font-weight: 600; }

/* Files: the papers bob in and out of the folder */
.feature-art .lift { animation: float 4s ease-in-out infinite; }
.feature-art .lift.l2 { animation-delay: -2s; }

/* Git: work flows along the branch, the new commit pulses */
.feature-art .rail { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.feature-art .flow { fill: none; stroke: #faf9f5; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 10; animation: flow 1.4s linear infinite; }
.feature-art .node { fill: #faf9f5; stroke: var(--ink); stroke-width: 2.5; }
.feature-art .node.hot { fill: var(--accent-deep); }
.feature-art .ring { fill: none; stroke: var(--text); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
.feature-art .ring.r2 { animation-delay: 1.2s; }
.feature-art .chip { animation: float 5s ease-in-out infinite; }

/* Terminal: the key bar keys get pressed in turn */
.feature-art .key text { text-anchor: middle; }
.feature-art .key { animation: press 4s ease-in-out infinite; }
.feature-art .k2 { animation-delay: 1s; }
.feature-art .k3 { animation-delay: 2s; }
.feature-art .k4 { animation-delay: 3s; }
@keyframes press { 0%, 20%, 100% { transform: none; } 8% { transform: translateY(3px); } }

/* Ports: live servers pulse, the stuck one shakes */
.feature-art .live { fill: #3f7f4e; }
.feature-art .stop { fill: #faf9f5; stroke: var(--ink); stroke-width: 2.5; }
.feature-art .hot-stop { fill: var(--accent-deep); }
.feature-art .stuck { transform-box: fill-box; transform-origin: center; animation: shake 3.2s ease-in-out infinite; }
@keyframes shake { 0%, 80%, 100% { transform: none; } 84% { transform: translateX(-3px); } 88% { transform: translateX(3px); } 92% { transform: translateX(-2px); } 96% { transform: translateX(2px); } }

/* Preview & share and Requests */
.feature-art .phone { animation: float 6s ease-in-out infinite; }
.feature-art .packet { fill: #faf9f5; stroke: var(--ink); stroke-width: 2.5; }
.feature-art .packet.back { fill: var(--ink); stroke: none; }
.card { transition: transform 0.3s ease; }
.card:hover { transform: translateY(-3px); }

/* Entrance and scroll reveal (hidden only when JS runs, so the page works without it) */
.hero-copy > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.12s; }
.hero-copy > :nth-child(3) { animation-delay: 0.24s; }
.hero-art { animation: rise 1s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .reveal { opacity: 1; transform: none; }
}

/* Docs: a sidebar of pages beside the prose */
.docs { padding: 56px 0 96px; }
.docs .wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; }
/* Scrolls on its own when it's taller than the window; the padding keeps the links' hover
   background, which reaches 12px left of the text, inside the scroll box */
.docs-nav { position: sticky; top: 32px; font-size: 15px; max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin-left: -12px; padding-left: 12px; }
.docs-nav h4 { font: 600 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.docs-nav ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 2px; }
.docs-nav a { display: block; padding: 6px 12px; margin-left: -12px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.docs-nav a:hover { color: var(--text); background: var(--surface); }
.docs-nav a[aria-current="page"] { color: var(--text); background: var(--surface); font-weight: 500; }
.docs-nav ul.sub a { font-size: 14px; padding: 4px 12px; font-family: var(--mono); }
.docs .prose { padding: 0; max-width: 720px; }
.prose h2[id], .prose h3[id] { scroll-margin-top: 24px; }
.prose h2 code { font-size: 0.8em; padding: 3px 9px; }
.prose pre.cmd { margin: 16px 0 24px; font-size: 14px; }
.prose ol { padding-left: 22px; }
.prose ol li::marker { color: var(--accent); font-family: var(--serif); }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15px; }
.prose th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.prose th, .prose td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose td:first-child { white-space: nowrap; }
.prose td code { white-space: nowrap; }
.prose .lede { font-size: 19px; color: var(--muted); margin: 0 0 8px; }
kbd { font: 0.85em var(--mono); padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 2px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; min-width: 0; }
.pager a:hover { border-color: var(--accent); color: inherit; }
.pager a span { font-size: 13px; color: var(--muted); }
.pager a.next { margin-left: auto; text-align: right; }
@media (max-width: 860px) {
	.docs { padding-top: 32px; }
	.docs .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.docs-nav { position: static; max-height: none; overflow: visible; margin-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
	.docs-nav ul { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 16px; }
	.docs-nav a { margin-left: 0; }
	.docs-nav ul.sub, .docs-nav h4 + ul.sub, .docs-nav ul + h4 { display: none; }
	.prose td:first-child { white-space: normal; }
}

/* Docs illustration: a QR code is scanned onto the phone */
.legal-art .scan { fill: none; stroke: var(--accent-deep); stroke-width: 3; stroke-linecap: round; animation: scan 2.6s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(46px); } }
.legal-art .qr { fill: #141413; }
.legal-art .phone { animation: float 6s ease-in-out infinite; }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }

@media (max-width: 600px) {
	.wrap { padding: 0 16px; }
	nav.links { gap: 8px; font-size: 14px; }
	nav.links .hide-sm, nav.links .nav-link { display: none; }
	button.menu { display: inline-flex; }
	button.theme, button.lang { margin: 0; }
	.hero { padding: 64px 0 48px; }
	section.block { padding: 56px 0; }
}

/* Install tabs (tabs.js): one panel per install method. Without JS all panels show, each under its label. */
.install { margin: 20px 0 32px; }
.install .tabs { display: none; }
.install.ready .tabs {
	display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 18px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.install .tabs button {
	padding: 7px 14px; border: 0; border-radius: 8px; background: none; cursor: pointer;
	color: var(--muted); font: 500 15px/1.3 var(--sans);
}
.install .tabs button:hover { color: var(--text); }
.install .tabs button[aria-selected="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.install .tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.install.ready .tab-label { display: none; }
.install .tab-label { font: 600 15px/1.4 var(--sans); margin: 24px 0 4px; }
.install .panel > p { margin: 0 0 14px; color: var(--muted); }
.install h4 { font: 600 13px/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.install pre.cmd { margin: 0; font-size: 14px; }
.install .panel > :last-child { margin-bottom: 0; }
@media (max-width: 600px) {
	.install.ready .tabs { display: flex; }
	.install .tabs button { flex: 1 1 auto; padding: 7px 8px; font-size: 14px; }
}

/* Copy buttons on command blocks (tabs.js) */
.cmd-box { position: relative; }
pre.cmd.has-copy { padding-right: 60px; }
.install pre.cmd { white-space: pre-wrap; word-break: break-all; }
.cmd-box .copy {
	position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; cursor: pointer;
	background: rgb(240 238 230 / 0.08); color: #a8a59b;
}
.cmd-box .copy:hover, .cmd-box .copy:focus-visible { background: rgb(240 238 230 / 0.16); color: #f0eee6; outline: none; }
.cmd-box .copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Landing: install section */
.install-home { max-width: 760px; }
.install-home .install { margin: 0; }
.install-home .then { margin: 28px 0 0; color: var(--muted); }

/* Landing: beta invite form (beta.js) */
.beta-home { max-width: 760px; }
.beta-home h2 { margin-bottom: 16px; }
.beta-home .lede { color: var(--muted); margin: 0 0 28px; }
.beta-form { display: grid; gap: 18px; }
.beta-form .field { display: grid; gap: 6px; margin: 0; }
.beta-form label { font-weight: 500; font-size: 15px; }
.beta-form .optional, .beta-form .hint { color: var(--muted); font-weight: 400; }
.beta-form .hint { font-size: 14px; }
.beta-form input, .beta-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
	background: var(--surface); color: var(--text); font: 16px/1.4 var(--sans);
}
.beta-form textarea { resize: vertical; }
.beta-form input:focus, .beta-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(201 100 66 / 0.18); }
.beta-form button { cursor: pointer; font-family: inherit; }
.beta-form button:disabled { opacity: 0.6; cursor: progress; }
.beta-form .note.error { color: var(--accent); }
.beta-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Landing: "one command" section and the compare page */
pre.cmd.one-liner { font-size: clamp(20px, 4vw, 28px); padding: 22px 28px; margin: 8px 0 32px; text-align: center; }
pre.cmd.one-liner.has-copy { padding-right: 60px; }
#simple h2 { margin-bottom: 16px; }
#simple .lede { color: var(--muted); margin: 0 0 24px; max-width: 760px; }
#simple .then { margin: 28px 0 0; color: var(--muted); }
.compare { max-width: 1040px; }
.compare .lede { font-size: 19px; color: var(--muted); margin: 0 0 24px; max-width: 720px; }
.compare .meta { margin: -8px 0 40px; }
.compare h2 { margin-top: 48px; }
.compare .actions { margin-top: 40px; }
.table-scroll { overflow-x: auto; margin: 16px -16px 24px; padding: 0 16px; }
.compare-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
.compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.compare-table thead th { font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.compare-table tbody th { font-weight: 600; width: 16%; }
.compare-table .us { background: var(--surface); padding-left: 14px; }
.compare-table thead .us { color: var(--accent); }
.compare-table td.us { font-weight: 500; }
.compare-table tr.setup .us strong { color: var(--accent); }
.compare-table tr.setup th { color: var(--text); }

/* Footer: other products, one row */
footer.site .more { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
footer.site .more span { font-weight: 500; color: var(--text); }
footer.site .more a { display: inline-flex; align-items: center; gap: 8px; }
footer.site .more img { border-radius: 5px; }

/* Footer on phones: heading above the apps, links tightly wrapped */
@media (max-width: 600px) {
	footer.site { padding: 32px 0 40px; }
	footer.site .wrap { flex-direction: column; gap: 20px; }
	footer.site .more { gap: 10px 20px; }
	footer.site .more span { flex-basis: 100%; }
	footer.site nav { gap: 10px 20px; }
}
