/**
 * Shared site header + footer chrome (landing page design).
 * Loaded on homepage and all content pages so nav/footer stay identical.
 * Brand: #5B54F5
 */
:root {
	--chrome-brand: #5b54f5;
	--chrome-brand-hover: #4a43e0;
	--chrome-ink: #0a0a0a;
	--chrome-muted: #52525b;
	--chrome-line: #e4e4e7;
	--chrome-soft: #f4f4f5;
	--chrome-bg: #fafafa;
	--chrome-focus: #71717a;
}

/* Screen-reader-only utility (brand home label, etc.) */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* —— Header —— */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	padding-top: env(safe-area-inset-top, 0px);
	border-bottom: 1px solid transparent;
	background: rgba(247, 246, 243, 0.88);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
	border-color: rgba(10, 10, 10, 0.1);
	background: rgba(247, 246, 243, 0.94);
	box-shadow: 0 8px 35px rgba(10, 10, 10, 0.07);
}
/* Shared max width for header + footer (matches homepage max-w-7xl = 80rem).
   Use .site-chrome-inner so content-page .container (1120px) cannot shrink chrome. */
.site-chrome-inner {
	box-sizing: border-box;
	width: min(80rem, calc(100% - 2.5rem)) !important;
	max-width: none !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 0;
	padding-right: 0;
}
@media (min-width: 1024px) {
	.site-chrome-inner {
		width: min(80rem, calc(100% - 4rem)) !important;
	}
}

.site-header .nav-shell,
.nav-shell {
	position: relative;
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.site-header .brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--chrome-ink);
	text-decoration: none;
	flex-shrink: 0;
}
.site-header .brand .mark {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	background: var(--chrome-brand);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	box-shadow: 0 10px 24px rgba(91, 84, 245, 0.22);
	transition: transform 0.2s ease;
}
.site-header .brand:hover .mark {
	transform: rotate(3deg) scale(1.05);
}

.site-header .nav-links,
.nav-links {
	display: flex;
	align-items: center;
	align-self: stretch;
	gap: 0;
	color: var(--chrome-muted);
	font-size: 14px;
	font-weight: 500;
}
.site-header .nav-list {
	position: relative;
	display: flex;
	align-items: center;
	align-self: stretch;
	margin: 0;
	padding: 0;
}
.site-header .nav-hover-bg {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	width: 0;
	height: 0;
	border-radius: 999px;
	background: rgba(91, 84, 245, 0.1);
	opacity: 0;
	pointer-events: none;
	transition:
		transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
		width 0.32s cubic-bezier(0.32, 0.72, 0, 1),
		height 0.32s cubic-bezier(0.32, 0.72, 0, 1),
		opacity 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}
.site-header .nav-hover-bg.is-visible {
	opacity: 1;
}
.site-header .nav-links a,
.nav-links a {
	color: inherit;
	text-decoration: none;
}
.site-header .nav-trigger,
.site-header .nav-link {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 6px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--chrome-muted);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.site-header .nav-trigger:hover,
.site-header .nav-trigger[aria-expanded="true"],
.site-header .nav-link:hover {
	color: var(--chrome-ink);
}
.site-header .nav-trigger:focus-visible,
.site-header .nav-link:focus-visible,
.site-header .nav-links a:focus-visible,
.nav-links a:focus-visible {
	color: var(--chrome-ink);
	outline: 2px solid var(--chrome-focus);
	outline-offset: 4px;
}
.site-header .nav-link.active,
.site-header .nav-link[aria-current="page"],
.site-header .nav-trigger.active {
	color: var(--chrome-ink);
	font-weight: 600;
}
.site-header .nav-item {
	position: relative;
	display: flex;
	align-items: center;
	align-self: stretch;
}
.site-header .nav-caret {
	display: grid;
	width: 16px;
	height: 16px;
	opacity: 0.7;
	transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.site-header .nav-caret svg {
	width: 16px;
	height: 16px;
	display: block;
}
.site-header .nav-item.open .nav-caret,
.site-header .nav-trigger[aria-expanded="true"] .nav-caret,
.site-header .nav-trigger:hover .nav-caret {
	transform: rotate(180deg);
}
.site-header .nav-dropdown {
	display: none;
	position: absolute;
	top: calc(100% - 8px);
	left: 0;
	padding-top: 4px;
	z-index: 1;
	pointer-events: none;
}
/* Bridge only the gap under the bar — not the sibling triggers. */
.site-header .nav-dropdown::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 4px;
	pointer-events: auto;
}
.site-header .nav-dropdown-panel {
	width: max-content;
	max-width: min(42rem, calc(100vw - 2.5rem));
	padding: 16px;
	border: 1px solid var(--chrome-line);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 18px 48px rgba(16, 21, 44, 0.12);
	transform-origin: top left;
	pointer-events: auto;
	position: relative;
	z-index: 1;
}
.site-header .nav-item.open .nav-dropdown,
.site-header:not(.nav-ready) .nav-item:hover .nav-dropdown,
.site-header .nav-item:focus-within .nav-dropdown {
	display: block;
}
.site-header .nav-mega {
	display: flex;
	width: max-content;
	gap: 36px;
	overflow: hidden;
}
.site-header .nav-mega-col {
	min-width: 11.5rem;
	flex: 1 0 auto;
}
.site-header .nav-mega-title {
	margin: 0 0 16px;
	color: var(--chrome-muted);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	text-transform: capitalize;
}
.site-header .nav-mega-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.site-header .nav-mega-link {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	color: var(--chrome-ink);
	text-decoration: none;
}
.site-header .nav-mega-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border: 1px solid var(--chrome-line);
	border-radius: 6px;
	color: var(--chrome-ink);
	background: #fff;
	transition:
		background-color 0.3s cubic-bezier(0.32, 0.72, 0, 1),
		color 0.3s cubic-bezier(0.32, 0.72, 0, 1),
		border-color 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.site-header .nav-icon-svg {
	width: 20px;
	height: 20px;
	display: block;
}
.site-header .nav-mega-copy {
	display: block;
	width: max-content;
	line-height: 20px;
}
.site-header .nav-mega-label {
	display: block;
	color: var(--chrome-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	white-space: nowrap;
}
.site-header .nav-mega-desc {
	display: block;
	color: var(--chrome-muted);
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	white-space: nowrap;
	transition: color 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.site-header .nav-mega-link:hover .nav-mega-icon,
.site-header .nav-mega-link:focus-visible .nav-mega-icon {
	background: var(--chrome-soft);
	border-color: var(--chrome-line);
	color: var(--chrome-ink);
}
.site-header .nav-mega-link:hover .nav-mega-desc,
.site-header .nav-mega-link:focus-visible .nav-mega-desc {
	color: var(--chrome-ink);
}
.site-header .nav-mega-link.active .nav-mega-icon,
.site-header .nav-mega-link[aria-current="page"] .nav-mega-icon {
	background: rgba(91, 84, 245, 0.1);
	border-color: rgba(91, 84, 245, 0.22);
	color: var(--chrome-brand);
}
.site-header .nav-links .nav-mobile-cta {
	display: none;
}
@media (prefers-reduced-motion: reduce) {
	.site-header .nav-hover-bg,
	.site-header .nav-caret,
	.site-header .nav-dropdown-panel,
	.site-header .nav-mega-icon,
	.site-header .nav-mega-desc,
	.site-header .nav-trigger,
	.site-header .nav-link {
		transition: none;
	}
}

.site-header .nav-actions,
.nav-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}
.site-header .nav-actions .btn.ghost {
	border: 0;
	background: transparent;
	color: var(--chrome-ink);
	font-weight: 600;
	padding: 8px 4px;
	box-shadow: none;
}
.site-header .nav-actions .btn.ghost:hover {
	color: var(--chrome-brand);
	background: transparent;
}
.site-header .nav-actions .btn.primary {
	border: 0;
	border-radius: 12px;
	background: var(--chrome-brand);
	color: #fff;
	font-weight: 600;
	padding: 12px 18px;
	box-shadow: 0 12px 28px rgba(91, 84, 245, 0.22);
	text-decoration: none;
}
.site-header .nav-actions .btn.primary:hover {
	background: var(--chrome-brand-hover);
	transform: translateY(-1px);
	box-shadow: 0 14px 32px rgba(91, 84, 245, 0.28);
}

.site-header .nav-toggle,
.nav-toggle {
	display: none;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	padding: 0;
	border: 1px solid var(--chrome-line);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	touch-action: manipulation;
	flex-shrink: 0;
	margin-left: auto;
	z-index: 80;
}
.site-header .nav-toggle span,
.nav-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--chrome-ink);
	border-radius: 1px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-header .nav-toggle[aria-expanded="true"] span:nth-child(1),
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.site-header .nav-toggle[aria-expanded="true"] span:nth-child(2),
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}
.site-header .nav-toggle[aria-expanded="true"] span:nth-child(3),
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}
.site-header .nav-toggle:focus-visible,
.nav-toggle:focus-visible {
	outline: 2px solid var(--chrome-focus);
	outline-offset: 2px;
}

/* —— Closing call to action (SiteCta.tsx) ——
   The same dark band above the footer on every marketing page. Self contained: it does not lean on home.css or
   theme.css, so it looks the same on the homepage, /pricing, and the library pages. */
.site-cta {
	position: relative;
	overflow: hidden;
	padding: 128px 24px;
	background: #000;
	color: #fff;
	text-align: center;
	isolation: isolate;
}
.site-cta-grid {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M48 0H0V48' fill='none' stroke='white' stroke-opacity='0.08'/%3E%3C/svg%3E");
	background-position: center top;
	-webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 100%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 80% at 50% 100%, #000 20%, transparent 75%);
	pointer-events: none;
}
.site-cta-glow {
	position: absolute;
	bottom: -360px;
	left: calc(50% - 280px);
	z-index: -1;
	width: 560px;
	height: 560px;
	border-radius: 9999px;
	background: var(--chrome-brand);
	filter: blur(140px);
	opacity: 0.4;
	pointer-events: none;
}
.site-cta-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 880px;
	margin: 0 auto;
}
.site-cta h2 {
	margin: 0;
	padding-bottom: 8px;
	font-family: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
	font-size: 4.5rem;
	line-height: 1;
	font-weight: 600;
	letter-spacing: -0.045em;
	color: #fff;
}
/* The second line steps back, like the gradient headline on the homepage, without painting a gradient. */
.site-cta-second {
	color: #a1a1aa;
}
.site-cta-body {
	max-width: 560px;
	margin: 24px 0 0;
	color: #a1a1aa;
	font-size: 1.25rem;
	line-height: 1.75rem;
}
.site-cta-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 40px;
}
.site-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 24px;
	border: 1px solid transparent;
	border-radius: 12px;
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.site-cta-btn:active {
	transform: scale(0.98);
}
.site-cta-btn.is-primary {
	background: #fff;
	color: #0a0a0a;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08), 0 16px 32px -12px rgba(91, 84, 245, 0.6);
}
.site-cta-btn.is-primary:hover {
	background: #e4e4e7;
}
.site-cta-btn.is-ghost {
	border-color: rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}
.site-cta-btn.is-ghost:hover {
	border-color: rgba(255, 255, 255, 0.32);
	background: rgba(255, 255, 255, 0.12);
}
.site-cta-btn:focus-visible,
.site-cta-help a:focus-visible {
	outline: 2px solid #a1a1aa;
	outline-offset: 2px;
}
.site-cta-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}
.site-cta-help {
	margin: 32px 0 0;
	color: #a1a1aa;
	font-size: 0.875rem;
	line-height: 1.25rem;
}
.site-cta-help a {
	color: #fff;
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.3);
	text-underline-offset: 3px;
}
.site-cta-help a:hover {
	text-decoration-color: currentColor;
}
@media (max-width: 767px) {
	.site-cta {
		padding: 96px 16px;
	}
	.site-cta h2 {
		font-size: 2.25rem;
		line-height: 2.5rem;
	}
	.site-cta h2 br {
		display: none;
	}
	.site-cta-body {
		font-size: 1.125rem;
	}
	.site-cta-actions,
	.site-cta-btn {
		width: 100%;
	}
}
@media (prefers-reduced-motion: reduce) {
	.site-cta-btn {
		transition: none;
	}
}

/* —— Footer —— */
.footer {
	position: relative;
	padding: 64px 0 0;
	border-top: 1px solid var(--chrome-line);
	background: var(--chrome-bg);
	color: var(--chrome-muted);
	font-size: 14px;
}
/* One row: the brand, then five link columns. Narrower screens move the brand above the columns. */
.footer-grid {
	display: grid;
	grid-template-columns: minmax(200px, 1.4fr) repeat(5, minmax(0, 1fr));
	column-gap: 32px;
	row-gap: 40px;
	align-items: start;
	padding-bottom: 48px;
}
.footer-brand {
	max-width: 240px;
}
.footer-brand .brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	font-weight: 700;
	color: var(--chrome-ink);
	text-decoration: none;
}
.footer-brand .brand .mark {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: #0a0a0a; /* matches the header mark and favicon */
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
}
.footer-brand p {
	margin: 16px 0 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--chrome-muted);
	text-wrap: pretty;
}
.footer-social {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px;
}
.footer-social a {
	box-sizing: border-box;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--chrome-line);
	color: var(--chrome-ink);
	box-shadow: 0 1px 2px rgba(16, 21, 44, 0.05);
	text-decoration: none;
	transition: transform 0.7s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.7s cubic-bezier(0.32, 0.72, 0, 1), color 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}
.footer-social a:hover {
	transform: translateY(-2px);
	border-color: var(--chrome-line);
	color: var(--chrome-ink);
}
.footer-social a:active {
	transform: scale(0.98);
}
.footer-social a:focus-visible {
	outline: 2px solid var(--chrome-focus);
	outline-offset: 3px;
}
.footer-social svg {
	width: 16px;
	height: 16px;
	display: block;
}
/* The developer under the social icons (FooterDev.tsx): ASCII frames stacked in one cell, one shown at a time
   while the footer is on screen. Without JS, off screen, or with reduced motion, the last frame stays put. */
.footer-dev {
	display: grid;
	margin-top: 32px;
	color: #9f9fa8;
	user-select: none;
	pointer-events: none;
}
.footer-dev-frame {
	grid-area: 1 / 1;
	margin: 0;
	font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 9px;
	line-height: 1.2;
	letter-spacing: 0;
	white-space: pre;
	visibility: hidden;
	animation: footer-dev-frame 5.6s steps(1, end) infinite;
	animation-delay: calc(var(--i, 0) * 0.8s);
}
.footer-dev-screen {
	color: #3f3f46;
}
@keyframes footer-dev-frame {
	0% {
		visibility: visible;
	}
	14.2857% {
		visibility: hidden;
	}
	100% {
		visibility: hidden;
	}
}
.footer-art:not([data-live]) ~ .site-chrome-inner .footer-dev-frame {
	animation: none;
}
.footer-art:not([data-live]) ~ .site-chrome-inner .footer-dev-frame:last-child {
	visibility: visible;
}
/* Below 1100px the brand turns into one row above the link columns, so there is no room under the buttons. */
@media (max-width: 1099px) {
	.footer-dev {
		display: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	.footer-dev-frame {
		animation: none;
	}
	.footer-dev-frame:last-child {
		visibility: visible;
	}
}
.footer-col h4,
.footer-col .footer-col-title {
	margin: 0 0 16px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #94a3b8;
}
.footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.footer-col a,
.footer-col a.highlight-link,
.footer-col a.highlight-link:visited {
	display: inline !important;
	max-width: none !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--chrome-ink) !important;
	font-weight: 400 !important;
	font-size: 14px !important;
	line-height: 20px !important;
	text-decoration: none !important;
	transition: color 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}
.footer-col a:hover,
.footer-col a.highlight-link:hover {
	color: var(--chrome-ink) !important;
	text-decoration: none !important;
}
.footer-col a.footer-col-more,
.footer-col a.footer-col-more:visited {
	color: var(--chrome-brand) !important;
	font-weight: 500 !important;
}
.footer-col a.footer-col-more:hover {
	color: var(--chrome-brand-hover) !important;
}
.footer-col a:focus-visible,
.footer-col a.highlight-link:focus-visible,
.footer-legal a:focus-visible {
	color: var(--chrome-brand) !important;
	outline: 2px solid var(--chrome-focus);
	outline-offset: 3px;
	border-radius: 3px;
}
.footer-bottom {
	margin-top: 0;
	padding: 24px 0 28px;
	border-top: 1px solid var(--chrome-line);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 12px;
	line-height: 16px;
	color: var(--chrome-muted);
}
/* Human / Machine: read this page, or its Markdown copy for LLMs. Floats in the bottom left corner, out of
   the reading column, and stays quiet until hovered or focused. On phones it sits in the footer, because the
   bottom edge already holds the trial bar, the chat bubble, and the cookie banner. */
.reader-toggle {
	position: fixed;
	left: max(16px, env(safe-area-inset-left, 0px));
	bottom: max(16px, env(safe-area-inset-bottom, 0px));
	z-index: 50;
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	border-radius: 999px;
	background: var(--chrome-ink);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 8px 24px rgba(10, 10, 10, 0.18);
	opacity: 0.55;
	transition: opacity 0.4s cubic-bezier(0.32, 0.72, 0, 1);
	font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.reader-toggle:hover,
.reader-toggle:focus-within {
	opacity: 1;
}
/* Step aside while the cookie banner is open; it takes the same bottom edge. */
body:has(.usedocs-consent:not([hidden])) .reader-toggle {
	opacity: 0;
	pointer-events: none;
}
@media (max-width: 640px) {
	.reader-toggle {
		position: static;
		transform: none;
		box-shadow: none;
		opacity: 1;
	}
}
/* Articles with an "On this page" rail use the bottom left corner for it, so the switch stays in the footer. */
.blog-page .reader-toggle,
.learn-page .reader-toggle {
	position: static;
	box-shadow: none;
	opacity: 1;
}
@media print {
	.reader-toggle {
		display: none;
	}
}
.reader-toggle-option {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border: 1px solid transparent;
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	transition: color 0.7s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}
.reader-toggle-option[aria-current="page"] {
	border-color: rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}
a.reader-toggle-option:hover {
	color: #fff;
}
a.reader-toggle-option:focus-visible {
	outline: 2px solid var(--chrome-focus);
	outline-offset: 2px;
}
.reader-toggle-dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: currentColor;
}
.footer-legal {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}
.footer-legal a {
	color: var(--chrome-muted);
	text-decoration: none;
	transition: color 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}
.footer-legal a:hover {
	color: var(--chrome-ink);
}

/* —— Footer art (FooterArt.tsx) ——
   A faint dot grid behind the footer, fading in from the top. Layering uses tree order only: the art comes
   first and the content is position: relative with no z-index, so no new stacking context traps the fixed
   .reader-toggle. */
.footer > .site-chrome-inner {
	position: relative;
}
.footer-art {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%);
	mask-image: linear-gradient(to bottom, transparent, #000 35%);
}
.footer-art::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='1' cy='1' r='1' fill='%230a0a0a' fill-opacity='0.09'/%3E%3C/svg%3E");
}
@media print {
	.footer-art {
		display: none;
	}
}

@media (max-width: 1099px) {
	.footer-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		column-gap: 24px;
	}
	.footer-brand {
		display: flex;
		grid-column: 1 / -1;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 16px 32px;
		max-width: none;
	}
	.footer-brand p {
		flex: 1 1 280px;
		max-width: 420px;
		margin: 0;
	}
	.footer-social {
		margin-top: 0;
	}
}
@media (max-width: 860px) {
	.footer {
		padding: 48px 0 0;
	}
	.footer-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 32px;
		padding-bottom: 40px;
	}
}
@media (max-width: 540px) {
	.footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 16px;
	}
	.footer-brand {
		display: block;
	}
	.footer-brand p {
		margin-top: 16px;
	}
	.footer-social {
		margin-top: 16px;
	}
	.footer-bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
}

/* —— Mobile menu —— */
@media (max-width: 980px) {
	.site-header .nav-toggle,
	.nav-toggle {
		display: inline-flex;
	}
	.site-header .nav-links,
	.nav-links {
		position: absolute;
		top: calc(72px + 4px);
		left: 0;
		right: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		padding: 12px;
		gap: 2px;
		background: #fff;
		border: 1px solid var(--chrome-line);
		border-radius: 16px;
		box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
		z-index: 60;
	}
	.site-header .nav-links.open,
	.nav-links.open {
		display: flex;
		overflow: auto;
		max-height: min(36rem, calc(100dvh - 88px));
	}
	.site-header .nav-list {
		flex-direction: column;
		align-items: stretch;
	}
	.site-header .nav-item {
		flex-direction: column;
		align-items: stretch;
	}
	.site-header .nav-hover-bg {
		display: none;
	}
	.site-header .nav-item:hover .nav-dropdown,
	.site-header:not(.nav-ready) .nav-item:hover .nav-dropdown,
	.site-header .nav-item:focus-within .nav-dropdown {
		display: none;
	}
	.site-header .nav-item.open .nav-dropdown {
		display: block;
	}
	.site-header .nav-dropdown::before {
		content: none;
	}
	.site-header .nav-trigger,
	.site-header .nav-link {
		width: 100%;
		justify-content: space-between;
		padding: 12px 16px;
		border-radius: 12px;
		font-weight: 600;
		color: var(--chrome-ink);
	}
	.site-header .nav-trigger:hover,
	.site-header .nav-item.open .nav-trigger,
	.site-header .nav-link:hover {
		background: #f0effe;
		color: var(--chrome-brand);
	}
	.site-header .nav-dropdown {
		position: static;
		left: auto;
		top: auto;
		transform: none;
		min-width: 0;
		max-width: none;
		margin: 0 8px 8px;
		padding: 0;
	}
	.site-header .nav-dropdown-panel {
		width: 100%;
		max-width: 100%;
		padding: 12px;
		border-radius: 12px;
		box-shadow: none;
		background: #f8fafc;
		overflow: hidden;
	}
	.site-header .nav-mega {
		flex-direction: column;
		width: 100%;
		gap: 20px;
	}
	.site-header .nav-mega-col {
		min-width: 0;
		width: 100%;
	}
	.site-header .nav-mega-copy {
		width: auto;
		min-width: 0;
	}
	.site-header .nav-mega-label,
	.site-header .nav-mega-desc {
		white-space: normal;
	}
	.site-header .nav-mega-col ul {
		gap: 8px;
	}
	.site-header .nav-mega-title {
		margin-bottom: 8px;
	}
	.site-header .nav-mega-link {
		padding: 8px;
		border-radius: 10px;
	}
	.site-header .nav-mega-link:hover,
	.site-header .nav-mega-link:focus-visible {
		background: #fff;
	}
	.site-header .nav-links .nav-mobile-cta,
	.nav-links .nav-mobile-cta {
		display: block;
		margin-top: 8px;
		padding: 12px 16px;
		border-radius: 12px;
		text-align: center;
		font-weight: 600;
		background: var(--chrome-brand);
		color: #fff !important;
	}
	.site-header .nav-links .nav-mobile-cta:hover,
	.nav-links .nav-mobile-cta:hover {
		background: var(--chrome-brand-hover);
		color: #fff !important;
	}
	.site-header .nav-actions,
	.nav-actions {
		display: none;
	}
}

/* —— Floating island header (every page) ——
   The homepage's nav: a glass pill over the page, black brand mark and call to action, violet on hover.
   Content pages keep it sticky and in flow (16px + 56px, the same height as the old bar), so nothing below
   moves. The homepage pins it with position: fixed and adds a dark tone over its hero (home.css). */
.site-header,
.site-header.scrolled {
	position: sticky;
	top: 0;
	padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
	border: 0;
	background: transparent;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	pointer-events: none;
}
.site-header .site-chrome-inner {
	position: relative;
	width: max-content !important;
	max-width: calc(100% - 32px) !important;
	padding: 0 8px 0 16px;
	border-radius: 9999px;
	pointer-events: auto;
}
/* Glass sits on a pseudo element: backdrop-filter on the inner itself would trap the fixed mobile overlay. */
.site-header .site-chrome-inner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border: 1px solid #e4e4e7;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(24px) saturate(1.4);
	-webkit-backdrop-filter: blur(24px) saturate(1.4);
	box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 12px 32px -12px rgba(10, 10, 10, 0.1);
	transition: background-color 0.7s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.7s cubic-bezier(0.32, 0.72, 0, 1),
		box-shadow 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}
.site-header .nav-shell {
	height: 56px;
	gap: 24px;
}
.site-header .brand,
.site-header .brand .mark,
.site-header .nav-trigger,
.site-header .nav-link,
.site-header .nav-actions .btn {
	transition: color 0.7s cubic-bezier(0.32, 0.72, 0, 1), background-color 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}
.site-header .brand .mark {
	background: #0a0a0a;
	box-shadow: none;
}
.site-header .nav-actions {
	gap: 8px;
}
.site-header .nav-actions .btn.ghost {
	padding: 8px 12px;
	font-size: 0.875rem;
	line-height: 1.25rem;
}
.site-header .nav-actions .btn.ghost:hover {
	color: #5b54f5;
}
.site-header .nav-actions .btn.primary {
	padding: 8px 12px;
	border-radius: 9999px;
	background: #0a0a0a;
	box-shadow: none;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 600;
}
.site-header .nav-actions .btn.primary:hover {
	background: #5b54f5;
	box-shadow: none;
	transform: none;
}
.site-header .nav-actions .btn.primary:active {
	transform: scale(0.98);
}
.site-header .nav-toggle {
	position: relative;
	z-index: 90;
	border-radius: 9999px;
	pointer-events: auto;
	transition: border-color 0.7s cubic-bezier(0.32, 0.72, 0, 1), background-color 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}
.site-header .nav-toggle span {
	transition: transform 0.7s cubic-bezier(0.32, 0.72, 0, 1), background-color 0.7s cubic-bezier(0.32, 0.72, 0, 1);
}
/* Hamburger morphs into an X: lines rotate and translate, none disappear. */
.site-header .nav-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.site-header .nav-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 1;
	transform: rotate(45deg);
}
.site-header .nav-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}
@media (max-width: 980px) {
	.site-header .site-chrome-inner {
		width: calc(100% - 32px) !important;
	}
	.site-header .nav-links,
	.site-header .nav-links.open {
		position: fixed;
		inset: 0;
		z-index: 70;
		max-height: none;
		padding: 96px 24px 32px;
		border: 0;
		border-radius: 0;
		background: rgba(255, 255, 255, 0.8);
		backdrop-filter: blur(64px);
		-webkit-backdrop-filter: blur(64px);
		box-shadow: none;
		overflow-y: auto;
	}
	.site-header .nav-links.open .nav-item,
	.site-header .nav-links.open .nav-mobile-cta {
		animation: nav-rise 0.8s cubic-bezier(0.32, 0.72, 0, 1) both;
	}
	.site-header .nav-links.open .nav-item:nth-child(2) {
		animation-delay: 0.1s;
	}
	.site-header .nav-links.open .nav-item:nth-child(3) {
		animation-delay: 0.15s;
	}
	.site-header .nav-links.open .nav-item:nth-child(4) {
		animation-delay: 0.2s;
	}
	.site-header .nav-links.open .nav-item:nth-child(5) {
		animation-delay: 0.25s;
	}
	.site-header .nav-links.open .nav-mobile-cta {
		animation-delay: 0.3s;
	}
	.site-header .nav-trigger,
	.site-header .nav-link {
		font-size: 1.25rem;
		line-height: 1.75rem;
	}
	.site-header .nav-links .nav-mobile-cta,
	.site-header .nav-links .nav-mobile-cta:hover {
		background: #0a0a0a;
	}
}
@keyframes nav-rise {
	from {
		opacity: 0;
		transform: translateY(48px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
@media (prefers-reduced-motion: reduce) {
	.site-header .nav-links.open .nav-item,
	.site-header .nav-links.open .nav-mobile-cta {
		animation: none;
	}
}
