@font-face {
	font-family: "Latin Modern Roman";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/fonts/lmroman10-regular.woff2") format("woff2");
}
@font-face {
	font-family: "Latin Modern Roman";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("/fonts/lmroman10-italic.woff2") format("woff2");
}
@font-face {
	font-family: "Latin Modern Roman";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/fonts/lmroman10-bold.woff2") format("woff2");
}

:root {
	--bg: #f6f4ee;
	--fg: #0b1020;
	--muted: #5d5d66;
	--rule: #dcd9d0;
	--accent: #2f6bff;
	--gold: #e8b04b;
	--serif: "Latin Modern Roman", "CMU Serif", "Computer Modern", "STIX Two Text", Georgia, "Times New Roman", serif;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0b1020;
		--fg: #f6f4ee;
		--muted: #a2a4b3;
		--rule: #24293d;
		--accent: #7ea1ff;
	}
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
	background: var(--bg);
	color: var(--fg);
	font-family: var(--serif);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Animated conformal map, behind everything. */
.plane {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;
}

.page {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	max-width: 72rem;
	margin: 0 auto;
	padding: 1.25rem 1rem;
}

/* Header and nav */
.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 1.4rem;
	color: inherit;
	text-decoration: none;
	font-size: 1.35rem;
	letter-spacing: 0.01em;
}

.brand svg { width: 2.1rem; height: 2.1rem; flex: none; }

.nav {
	display: flex;
	align-items: center;
	gap: 1.4rem;
	font-size: 1.15rem;
}

.nav a {
	color: inherit;
	text-decoration: none;
	padding: 0.2rem 0.1rem;
	border-bottom: 1px solid transparent;
}

.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"] {
	border-bottom-color: var(--accent);
}

.nav functorial-account { margin-left: 0.8rem; }

/* Hero */
.hero {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 3rem 0 6rem;
}

.hero h1 {
	margin: 0 0 1rem;
	font-weight: 400;
	font-size: clamp(2.4rem, 7vw, 4.75rem);
	line-height: 1.05;
	letter-spacing: -0.005em;
	text-wrap: balance;
}

.hero .tagline {
	margin: 0 0 2.25rem;
	max-width: 60ch;
	font-size: clamp(1.2rem, 2.6vw, 1.65rem);
	font-style: italic;
	color: var(--muted);
	text-wrap: balance;
}

.cta {
	display: inline-block;
	padding: 0.75rem 1.6rem;
	border: 1.5px solid var(--fg);
	border-radius: 999px;
	color: var(--fg);
	background: color-mix(in srgb, var(--bg) 80%, transparent);
	backdrop-filter: blur(4px);
	text-decoration: none;
	font-size: 1.2rem;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.cta:hover, .cta:focus-visible {
	background: var(--fg);
	color: var(--bg);
	border-color: var(--fg);
}

/* About page */
.prose {
	flex: 1;
	max-width: 46rem;
	width: 100%;
	margin: 0 auto;
	padding: 3rem 0 4rem;
}

.prose h1 { margin: 0 0 1rem; font-weight: 400; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; }

.lede {
	margin: 0 0 2rem;
	font-size: 1.25rem;
	color: var(--muted);
}

.card {
	border: 1.5px solid color-mix(in srgb, var(--muted) 45%, transparent);
	border-radius: 18px;
	padding: 1.25rem 1.5rem 1.25rem;
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	backdrop-filter: blur(6px);
}

.card + .card { margin-top: 1.5rem; }

.card-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin: 0 0 1.25rem;
}

.card-title { margin: 0; font-size: 1.05rem; color: var(--muted); }

.open { color: var(--accent); text-decoration: none; }
.open:hover { text-decoration: underline; }

.diagram {
	display: block;
	width: 100%;
	max-width: 36rem;
	height: auto;
	margin: 0 auto;
	overflow: visible;
}

.diagram .word { font-family: var(--serif); font-size: 72px; fill: var(--fg); }
.diagram .label { font-family: var(--serif); font-size: 18px; fill: var(--muted); }
.diagram .arrow, .diagram .head { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.diagram .node { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.diagram .glyph { fill: none; stroke: var(--fg); stroke-width: 1.75; stroke-linejoin: round; }
.diagram .dot { fill: var(--fg); }

.cards .flash { fill: var(--bg); stroke: color-mix(in srgb, var(--muted) 60%, transparent); stroke-width: 1.5; }
.cards .flash.front { stroke: var(--accent); stroke-width: 2; }
.cards .corner { font-family: var(--serif); font-size: 16px; fill: var(--muted); }
.cards .keyword { font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace; font-size: 30px; fill: var(--fg); }

.how {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 1.5rem;
}

.how li { display: flex; gap: 0.75rem; }
.n { color: var(--accent); padding-top: 0.15rem; }
.how h2 { margin: 0 0 0.25rem; font-size: 1.15rem; font-weight: 700; }
.how p { margin: 0; color: var(--muted); }

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

/* Terms and contact pages */
.legal { font-size: 1.1rem; }
.legal h2 { margin: 2rem 0 0.5rem; font-size: 1.3rem; font-weight: 700; scroll-margin-top: 1rem; }
.legal h2:first-child, .legal .toc + h2 { margin-top: 0.5rem; }
.legal p { margin: 0 0 0.85rem; }
.legal ul { margin: 0 0 0.85rem; padding-left: 1.25rem; }
.legal li { margin: 0 0 0.4rem; }
.legal a { color: var(--accent); }
.legal .email { margin: 0 0 1rem; font-size: 1.5rem; }

.toc { margin: 0 0 1.75rem; padding: 0 0 1.25rem; border-bottom: 1px solid var(--rule); }
.toc ol { margin: 0; padding-left: 1.5rem; columns: 2 14rem; column-gap: 2rem; }
.toc li { margin: 0 0 0.2rem; }

footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	column-gap: 1rem;
	font-size: 0.95rem;
	color: var(--muted);
}

footer p { margin: 0.5rem 0; }
footer a { color: inherit; }
footer .links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }

@media (max-width: 480px) {
	.hero { padding: 2rem 0 4rem; }
	.brand span { font-size: 1.15rem; }
	.nav { gap: 0.9rem; font-size: 1rem; }
}

@media (max-width: 360px) {
	.brand span { display: none; }
}

/* ---- build.functorial.inc: f3b ---------------------------------------------------- */

:root {
	--mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
	--code: color-mix(in srgb, var(--fg) 6%, var(--bg));
	--good: #1f7a4d;
}

@media (prefers-color-scheme: dark) {
	:root { --good: #5fd39a; }
}

.mono, code, pre, textarea { font-family: var(--mono); font-variant-ligatures: none; }

.f3b-hero { flex: none; padding: 2.5rem 0 3rem; }

/* The Boeing F3B, in ASCII. 86 columns wide: sized so it fits a phone without scrolling. */
.art {
	margin: 0 0 1.75rem;
	font-size: min(0.9rem, 1.72vw);
	line-height: 1.18;
	color: var(--fg);
	text-align: left;
	white-space: pre;
	user-select: none;
}

.art .prop { color: var(--accent); }

.f3b-hero h1.mono {
	font-weight: 500;
	font-size: clamp(3rem, 10vw, 5.5rem);
	letter-spacing: 0.02em;
	margin: 0 0 0.6rem;
}

.f3b-hero .tagline { margin: 0; }
.f3b-hero .tagline a { color: var(--accent); }

.sections {
	width: 100%;
	max-width: 46rem;
	margin: 0 auto;
	padding: 0 0 4rem;
	display: grid;
	gap: 1.5rem;
}

.sections h2 {
	margin: 0 0 0.75rem;
	font-weight: 400;
	font-size: 1.6rem;
	scroll-margin-top: 1rem;
}

.sections h3 { margin: 1.4rem 0 0.4rem; font-size: 1.1rem; }
.sections p { margin: 0 0 0.85rem; font-size: 1.1rem; }
.sections p:last-child { margin-bottom: 0; }
.sections a { color: var(--accent); }
.sections .muted { color: var(--muted); }

code {
	font-size: 0.86em;
	background: var(--code);
	padding: 0.08em 0.32em;
	border-radius: 5px;
	overflow-wrap: anywhere;
}

/* The install command: a read-only textarea, so it selects whole on a tap. */
.install {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
	margin: 0 0 0.85rem;
}

.install textarea {
	flex: 1;
	min-width: 0;
	resize: none;
	height: 2.9rem;
	padding: 0.75rem 0.9rem;
	font-size: 0.95rem;
	line-height: 1.4;
	color: var(--fg);
	background: var(--code);
	border: 1.5px solid color-mix(in srgb, var(--muted) 45%, transparent);
	border-radius: 12px;
	white-space: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
}

.install textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.copy {
	flex: none;
	padding: 0 1.1rem;
	font: inherit;
	font-size: 1rem;
	color: var(--fg);
	background: transparent;
	border: 1.5px solid var(--fg);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease;
}

.copy:hover, .copy:focus-visible { background: var(--fg); color: var(--bg); }

/* A terminal session: the command, then what f3b prints. */
pre.term {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	font-size: 0.85rem;
	line-height: 1.55;
	background: var(--code);
	border-radius: 12px;
	overflow-x: auto;
}

pre.term .ps { color: var(--muted); user-select: none; }
pre.term .cmd { color: var(--fg); font-weight: 600; }
pre.term .out { color: var(--muted); }
pre.term .ok { color: var(--good); }

.prices {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75rem;
	margin: 0.25rem 0 1rem;
}

.prices div {
	text-align: center;
	padding: 0.9rem 0.5rem;
	border: 1.5px solid color-mix(in srgb, var(--muted) 45%, transparent);
	border-radius: 14px;
}

.prices b { display: block; font-size: 1.6rem; font-weight: 400; }
.prices span { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }

table.exit { border-collapse: collapse; width: 100%; font-size: 1rem; margin: 0 0 0.5rem; }
table.exit td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.exit td:first-child { font-family: var(--mono); width: 3rem; color: var(--accent); }

/* Top-up result pages */
.done .tagline code { font-style: normal; }

@media (max-width: 480px) {
	.install { flex-direction: column; }
	.copy { padding: 0.6rem 1.1rem; }
	.prices b { font-size: 1.3rem; }
}
