/* Quasareum — homepage. One document, two readers: warm white for people, quasar blue
   for the machine voice, amber for measured data. Dark by design: the page is a
   photographic plate, with its FITS header printed in the corner. Layout: a 12-column
   editorial grid; figures numbered like a paper, each with its provenance; hairlines,
   not boxes. Motion means exposure: light accumulates, type stays still. */

/* Fonts: declared inline in the page head, with versioned URLs that match the preloads. */

/* Every text colour holds 7:1 or better on the page ground (WCAG AAA). */
:root {
	--bg: #07080b;
	--bg-raise: #0d0f14;
	--rule: #1d2027;
	--rule-2: #2a2e37;
	--ink: #efede6;
	--ink-2: #aaa79f;
	--ink-3: #a09d95;
	--machine: #9db4ff;
	--machine-2: #6f8bff;
	--hot: #ffb45e;
	--night: #0f1d2e;
	--sophria: #93b6d6;
	--island: #f3f1ea;
	--island-ink: #23302a;
	--sage: #4c765d;

	--f-text: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	--gutter: clamp(16px, 4.4vw, 72px);
	--measure: 64ch;
	--t-ui: 160ms;
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-swift: cubic-bezier(0.65, 0, 0.35, 1);

	color-scheme: dark;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 72px;
	background: var(--bg);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--f-text);
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	line-height: 1.6;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
svg,
canvas,
picture {
	display: block;
	max-width: 100%;
}
canvas[hidden] {
	display: none;
}

a {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
	text-underline-offset: 0.22em;
	transition: text-decoration-color var(--t-ui), color var(--t-ui);
}
a:hover {
	text-decoration-color: currentColor;
}
:focus-visible {
	outline: 2px solid var(--machine-2);
	outline-offset: 3px;
	border-radius: 2px;
}

code,
pre,
kbd {
	font-family: var(--f-mono);
	font-size: 0.92em;
}

h1,
h2,
h3 {
	text-wrap: balance;
	font-weight: 700;
	margin: 0;
}
p,
ul,
ol,
dl,
dd,
figure {
	margin: 0;
}
p {
	text-wrap: pretty;
}
data,
time {
	font-variant-numeric: tabular-nums;
}

.skip {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 50;
	padding: 8px 12px;
	background: var(--ink);
	color: var(--bg);
	font-family: var(--f-mono);
	font-size: 0.875rem;
}
.skip:focus {
	top: 8px;
}

/* ── The machine line: the first link a machine meets, before the masthead ── */
.machine-line {
	position: relative;
	z-index: 3;
	padding: 9px var(--gutter);
	border-bottom: 1px solid var(--rule);
	font-family: var(--f-mono);
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--machine);
	background: var(--bg);
}
.machine-line p {
	max-width: 132ch;
}
.machine-line .ml-k {
	color: var(--ink-2);
}
.machine-line a {
	color: var(--machine);
	text-decoration-color: color-mix(in srgb, var(--machine) 35%, transparent);
	white-space: nowrap;
}

/* ── Masthead ── */
.masthead {
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 20;
	display: flex;
	align-items: center;
	gap: clamp(12px, 3vw, 40px);
	padding: 10px var(--gutter);
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	font-weight: 800;
	letter-spacing: -0.01em;
	font-size: 1.0625rem;
}
.brand .mark {
	width: 22px;
	height: 22px;
}
.toc {
	display: flex;
	gap: clamp(12px, 2.2vw, 28px);
	font-family: var(--f-mono);
	font-size: 0.8125rem;
	color: var(--ink-2);
	margin-left: auto;
}
.toc a {
	text-decoration: none;
	padding: 6px 0;
}
.toc a:hover {
	color: var(--ink);
}
.controls {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--f-mono);
	font-size: 0.75rem;
}
.controls[hidden] {
	display: none;
}
/* With JS on, server-rendered controls hold their place from the first paint and are
   only revealed, so nothing shifts when the module runs. */
.js .controls[hidden],
.js .actions[hidden],
.js .breath[hidden],
.js .ledger-controls[hidden] {
	display: flex;
	visibility: hidden;
}
.js .proof[hidden] {
	display: grid;
	visibility: hidden;
}
.reader {
	display: inline-flex;
	border: 1px solid var(--rule-2);
	border-radius: 999px;
	padding: 2px;
}
.reader-btn,
.motion-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--ink-2);
	font: inherit;
	padding: 5px 12px;
	border-radius: 999px;
	cursor: pointer;
	min-height: 32px;
}
.reader-btn[aria-pressed="true"] {
	background: var(--ink);
	color: var(--bg);
}
.reader-btn[data-reader="machine"][aria-pressed="true"] {
	background: var(--machine);
	color: #06070c;
}
.motion-btn {
	border: 1px solid var(--rule-2);
}
.motion-btn[aria-pressed="true"] {
	border-color: var(--machine);
	color: var(--machine);
}

/* ── <main> keeps the FITS plate first in the DOM; on narrow screens it shows after the hero */
main {
	position: relative;
	display: flex;
	flex-direction: column;
}
.hero {
	order: -1;
}

/* ── The FITS header: the agent entry points as the cards of an astronomical plate ── */
.fits {
	padding: 22px var(--gutter) 0;
	font-family: var(--f-mono);
	font-size: 0.75rem;
	line-height: 1.6;
	color: var(--ink-2);
}
.cards {
	border-left: 1px solid var(--machine);
	padding: 10px 0 10px 14px;
	max-width: 100%;
	overflow-x: auto;
}
.card {
	display: grid;
	grid-template-columns: minmax(31ch, max-content) minmax(0, 1fr);
	white-space: pre;
}
.card .kv {
	color: var(--machine);
}
.card .kv a {
	color: var(--machine);
	text-decoration-color: color-mix(in srgb, var(--machine) 40%, transparent);
}
.card .cm {
	white-space: normal;
	color: var(--ink-2);
}
/* On wide screens the header sits on the plate itself, top right, like a FITS header
   printed in the margin of an astronomical plate. */
@media (min-width: 1360px) {
	.fits {
		position: absolute;
		z-index: 3;
		top: clamp(18px, 3.2vh, 40px);
		right: var(--gutter);
		padding: 0;
		width: calc(80ch + 16px);
	}
	.cards {
		padding: 4px 0 4px 14px;
		text-shadow: 0 0 6px var(--bg), 0 0 2px var(--bg);
	}
}

/* ── Hero ── */
.hero {
	position: relative;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px;
	min-height: min(100svh - 96px, 1040px);
	padding: clamp(40px, 9vh, 120px) var(--gutter) clamp(32px, 6vh, 72px);
	isolation: isolate;
	overflow: clip;
}
.hero-copy {
	grid-column: 1 / span 6;
	align-self: center;
	display: grid;
	gap: 18px;
	position: relative;
	z-index: 2;
	min-width: 0;
}
.kicker,
.eyebrow,
.status {
	font-family: var(--f-mono);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-2);
	font-weight: 500;
}
.hero h1 {
	display: grid;
	gap: 14px;
	margin-top: 4px;
}
.wordmark {
	font-size: clamp(3.4rem, 1.2rem + 8vw, 8.6rem);
	line-height: 0.86;
	letter-spacing: -0.048em;
	font-weight: 800;
	color: var(--ink);
	margin-left: -0.05em;
}
.tagline {
	font-size: clamp(1.15rem, 0.9rem + 1.1vw, 1.75rem);
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: var(--ink-2);
}
.fn-ref {
	color: var(--machine);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	/* under the raised numeral, not under the line's baseline */
	text-underline-offset: -0.3em;
	padding: 0 0.1em;
}
.lede {
	font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
	line-height: 1.38;
	max-width: 30ch;
	font-weight: 500;
	letter-spacing: -0.005em;
}
.thesis {
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
	max-width: 42ch;
	color: var(--machine);
	font-family: var(--f-mono);
	line-height: 1.5;
}
.index {
	list-style: none;
	padding: 0;
	display: grid;
	gap: 2px;
	font-family: var(--f-mono);
	font-size: 0.8125rem;
	color: var(--ink-3);
	max-width: 52ch;
}
.index li {
	display: grid;
	grid-template-columns: 12ch minmax(0, 1fr);
	align-items: baseline;
	padding: 3px 0;
	border-bottom: 1px solid var(--rule);
}
.index a {
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}
.index a:hover {
	text-decoration: underline;
}
.st {
	color: var(--ink-2);
}
.st-live {
	color: var(--hot);
}
.st-soon {
	color: var(--sophria);
}
.byline {
	color: var(--ink-2);
	max-width: 46ch;
}
.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 2px;
}
.actions[hidden] {
	display: none;
}
.footnote {
	font-size: 0.8125rem;
	color: var(--ink-3);
	max-width: 52ch;
	line-height: 1.5;
}

.btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 999px;
	border: 1px solid var(--rule-2);
	background: transparent;
	color: var(--ink);
	font: 500 0.9375rem/1 var(--f-text);
	letter-spacing: 0.005em;
	cursor: pointer;
	transition: background var(--t-ui), border-color var(--t-ui), color var(--t-ui);
}
.btn:hover {
	border-color: var(--ink-2);
}
.btn-primary {
	background: var(--ink);
	color: var(--bg);
	border-color: var(--ink);
}
.btn-primary:hover {
	background: #fff;
}
.btn[aria-pressed="true"] {
	border-color: var(--machine);
	color: var(--machine);
}
.btn[aria-disabled="true"] {
	cursor: progress;
}

/* Fig. 1 — the plate spans the hero; text sits over the dark sky. */
.fig-1 {
	/* No grid placement on purpose: an absolutely positioned grid child would take its
	   grid area as containing block instead of the hero's padding box. */
	position: absolute;
	inset: 0;
	z-index: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-end;
	padding: 0 var(--gutter) clamp(20px, 4vh, 44px);
	pointer-events: none;
}
.fig-1 .stage {
	position: absolute;
	inset: 0;
	background: #050608;
}
.fig-1 .stage::after {
	/* a quiet scrim so the left column always reads */
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(48% 40% at 100% 100%, color-mix(in srgb, var(--bg) 86%, transparent) 0%, color-mix(in srgb, var(--bg) 50%, transparent) 55%, transparent 100%),
		linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 26%, transparent 52%),
		linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 50%, transparent) 12%, transparent 28%);
	pointer-events: none;
}
.fig-1 .poster,
.fig-1 .lens {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 64% 50%;
}
.fig-1 .lens {
	opacity: 0;
	transition: opacity 0.6s var(--ease-out);
}
.fig-1 .lens.is-live {
	opacity: 1;
}
.fig-1 figcaption {
	position: relative;
	z-index: 2;
	width: min(440px, 34vw);
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--ink-2);
	pointer-events: auto;
}
.fig figcaption strong {
	color: var(--ink);
	font-weight: 700;
}
.fig-n {
	font-family: var(--f-mono);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--machine);
	margin-right: 0.35em;
	font-weight: 600;
}
.prov {
	display: inline-block;
	font-family: var(--f-mono);
	font-size: 0.6875rem;
	line-height: 1.5;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-2);
	border: 1px solid var(--rule-2);
	border-radius: 3px;
	padding: 0 6px;
	margin-right: 0.45em;
	vertical-align: 0.08em;
}

/* ── Sections ── */
main > section:not(.hero):not(.fits) {
	padding: clamp(64px, 12vh, 140px) var(--gutter) 0;
}
.section-head {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 14px;
	margin-bottom: clamp(32px, 6vh, 64px);
	border-top: 1px solid var(--rule);
	padding-top: 22px;
}
.section-head h2 {
	grid-column: 1 / span 5;
	font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.25rem);
	line-height: 0.98;
	letter-spacing: -0.035em;
	font-weight: 800;
}
.section-lede {
	grid-column: 7 / span 6;
	font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
	line-height: 1.45;
	color: var(--ink-2);
	max-width: 46ch;
	align-self: end;
}
.machine-aside {
	margin-top: clamp(28px, 5vh, 48px);
	padding: 10px 0 10px 14px;
	border-left: 1px solid var(--machine);
	font-family: var(--f-mono);
	font-size: 0.75rem;
	line-height: 1.6;
	color: var(--ink-2);
	max-width: 100%;
	overflow-wrap: anywhere;
}
.machine-aside .ma-k {
	color: var(--machine);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-right: 0.6em;
}
.machine-aside a,
.machine-aside code {
	color: var(--machine);
}

/* At a glance */
.glance {
	padding-top: clamp(40px, 8vh, 96px) !important;
}
.glance .eyebrow {
	margin-bottom: 14px;
}
.glance dl {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	border-top: 1px solid var(--rule);
}
.glance dl > div {
	display: grid;
	grid-template-columns: 7.5rem 1fr;
	gap: 12px;
	padding: 14px 16px 14px 0;
	border-bottom: 1px solid var(--rule);
}
.glance dt {
	font-family: var(--f-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink-3);
	padding-top: 3px;
}
.glance dd {
	min-width: 0;
}

/* ── Work ── */
.product {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 28px;
	padding: clamp(28px, 5vh, 56px) 0;
	border-top: 1px solid var(--rule);
}
.product-text {
	grid-column: 1 / span 5;
	display: grid;
	align-content: start;
	gap: 14px;
	min-width: 0;
}
.product .shot,
.product .island {
	grid-column: 6 / -1;
	min-width: 0;
}
.product h3 {
	font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);
	line-height: 1;
	letter-spacing: -0.035em;
	font-weight: 800;
}
.status {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.product-text .status,
.paper .status {
	order: -1;
}
.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 9px;
	border-radius: 999px;
	border: 1px solid var(--rule-2);
	color: var(--ink);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.pill::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}
.pill-live {
	color: var(--hot);
	border-color: color-mix(in srgb, var(--hot) 40%, transparent);
}
.pill-soon {
	color: var(--machine);
	border-color: color-mix(in srgb, var(--machine) 40%, transparent);
}
.pill-client {
	color: var(--ink-2);
}
.product-tagline {
	font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
	line-height: 1.35;
	font-weight: 500;
}
.product-quote {
	font-family: var(--f-mono);
	color: var(--machine);
	font-size: 0.9375rem;
}
.facts {
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
	color: var(--ink-2);
	font-size: 0.96875rem;
}
.facts li {
	position: relative;
	padding-left: 18px;
}
.facts li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.72em;
	width: 8px;
	height: 1px;
	background: var(--ink-3);
}
.stack {
	font-family: var(--f-mono);
	font-size: 0.8125rem;
	color: var(--ink-3);
	line-height: 1.5;
}
.go {
	font-family: var(--f-mono);
	font-size: 0.875rem;
	color: var(--ink-2);
}
.go a:first-child {
	color: var(--ink);
	font-weight: 600;
}

.shot .frame {
	position: relative;
	border: 1px solid var(--rule-2);
	background: var(--bg-raise);
}
.shot img {
	width: 100%;
	height: auto;
}
.fig figcaption {
	margin-top: 12px;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--ink-2);
	max-width: 72ch;
}

/* Fig. 2 — numbered markers on the capture; the legend carries the words. */
.pin {
	position: absolute;
	left: var(--x);
	top: var(--y);
	width: 26px;
	height: 26px;
	margin: -13px 0 0 -13px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	border: 1.5px solid var(--machine);
	color: var(--machine);
	font: 700 0.75rem/1 var(--f-mono);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--bg) 40%, transparent);
	transition: transform var(--t-ui) var(--ease-out), background var(--t-ui), color var(--t-ui);
}
.callouts {
	list-style: none;
	padding: 0;
	margin-top: 14px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 8px 24px;
	font-size: 0.875rem;
	color: var(--ink-2);
	counter-reset: pin;
}
.callouts li {
	counter-increment: pin;
	display: grid;
	grid-template-columns: 26px 1fr;
	gap: 10px;
	align-items: baseline;
}
.callouts li::before {
	content: counter(pin);
	font: 700 0.75rem/24px var(--f-mono);
	text-align: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1.5px solid var(--machine);
	color: var(--machine);
}
.shot:has(.callouts li:nth-child(1):hover) .pin:nth-of-type(1),
.shot:has(.callouts li:nth-child(2):hover) .pin:nth-of-type(2),
.shot:has(.callouts li:nth-child(3):hover) .pin:nth-of-type(3),
.shot:has(.callouts li:nth-child(4):hover) .pin:nth-of-type(4) {
	background: var(--machine);
	color: #06070c;
	transform: scale(1.18);
}

.product-perplog .shot {
	grid-column: 6 / -1;
	margin-right: calc(var(--gutter) * -1);
}
.product-perplog .shot figcaption,
.product-perplog .callouts {
	padding-right: var(--gutter);
}
.product-sophria {
	position: relative;
}
.product-sophria::before {
	content: "";
	position: absolute;
	inset: 0 calc(var(--gutter) * -1);
	background: linear-gradient(180deg, transparent, var(--night) 18%, var(--night) 82%, transparent);
	z-index: -1;
}
.product-sophria .pill-soon {
	color: var(--sophria);
	border-color: color-mix(in srgb, var(--sophria) 45%, transparent);
}
.product-sophria .product-quote {
	color: var(--sophria);
}
.product-sophria .stack,
.product-sophria .facts li::before {
	color: var(--ink-2);
}
.shot-phone {
	justify-self: center;
	width: min(330px, 74vw);
}
.shot-phone .frame {
	border-radius: 34px;
	overflow: hidden;
	border-color: color-mix(in srgb, var(--sophria) 30%, transparent);
	background: var(--night);
	box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--sophria) 45%, transparent);
}

/* Sophria's breathing flower — its own geometry: six translucent petals, 4.2 s phases. */
.breath {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
	min-height: 64px;
}
.breath[hidden] {
	display: none;
}
.breath-cue {
	font-family: var(--f-mono);
	font-size: 0.875rem;
	color: var(--sophria);
	min-width: 6ch;
}
.flower {
	--s: 0.2;
	--r: -90deg;
	position: relative;
	width: 64px;
	height: 64px;
	flex: none;
	isolation: isolate;
}
.flower span {
	position: absolute;
	left: 19.6%;
	top: 19.6%;
	width: 60.8%;
	height: 60.8%;
	border-radius: 50%;
	background: color-mix(in srgb, var(--sophria) 55%, transparent);
	mix-blend-mode: plus-lighter;
	transform: rotate(calc(var(--i) * 60deg + var(--r))) translateY(-32%) scale(var(--s));
	transition: transform 4.2s cubic-bezier(0.42, 0, 0.58, 1);
}
.flower span:nth-child(1) { --i: 0; }
.flower span:nth-child(2) { --i: 1; }
.flower span:nth-child(3) { --i: 2; }
.flower span:nth-child(4) { --i: 3; }
.flower span:nth-child(5) { --i: 4; }
.flower span:nth-child(6) { --i: 5; }
.flower[data-phase="inhale"] {
	--s: 1;
	--r: 0deg;
}
.flower[data-phase="exhale"] {
	--s: 0.2;
	--r: -90deg;
}

/* Amav Sophro — the only light surface on the page: the client's own palette. */
.island {
	align-self: stretch;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 10px;
	min-height: 260px;
	background: var(--island);
	color: var(--island-ink);
	border-radius: 2px;
	padding: 40px 24px;
}
.island-mark {
	width: 72px;
	height: 72px;
}
.island-name {
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--sage);
}
.island-line {
	font-family: var(--f-mono);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	color: #3d4842;
}

.next {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px;
	padding: 28px 0 0;
	border-top: 1px solid var(--rule);
}
.next h3 {
	grid-column: 1 / span 3;
}
.next ul {
	grid-column: 6 / -1;
	list-style: none;
	padding: 0;
	display: grid;
	gap: 8px;
	color: var(--ink-2);
}

/* ── Research ── */
.method {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	border-top: 1px solid var(--rule);
	border-left: 1px solid var(--rule);
	margin-bottom: clamp(40px, 7vh, 72px);
}
.method li {
	padding: 16px 18px 18px;
	border-right: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
	font-size: 0.9375rem;
	color: var(--ink-2);
	line-height: 1.5;
}
.paper {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 18px;
	padding: clamp(28px, 5vh, 56px) 0;
	border-top: 1px solid var(--rule);
}
.paper > * {
	grid-column: 1 / span 7;
	min-width: 0;
}
.paper h3 {
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
	font-weight: 700;
	max-width: 26ch;
}
.paper > p:not(.status):not(.big-figure):not(.go) {
	color: var(--ink-2);
	max-width: var(--measure);
}
.big-figure {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 24px;
	align-items: baseline;
}
.big-figure .num {
	font-size: clamp(3.4rem, 2rem + 6vw, 7rem);
	font-weight: 800;
	letter-spacing: -0.05em;
	line-height: 0.9;
	color: var(--hot);
}
.big-figure .num-text {
	max-width: 46ch;
	font-size: 1.0625rem;
	line-height: 1.45;
}
.paper .chart-fig,
.paper .ledger,
.paper > .go {
	grid-column: 1 / -1;
}
.chart-fig {
	margin-top: 8px;
}
.chart-scroll {
	max-width: 100%;
	overflow-x: auto;
}
.chart-data {
	margin-top: 10px;
	max-width: 80ch;
	font-family: var(--f-mono);
	font-size: 0.75rem;
	line-height: 1.6;
	color: var(--ink-2);
}
.chart {
	width: 100%;
	max-width: 980px;
	height: auto;
	overflow: visible;
}
.chart .grid {
	stroke: var(--rule);
	stroke-width: 1;
}
.chart .grid.zero {
	stroke: var(--machine-2);
	stroke-width: 1.25;
}
.chart .lbl {
	fill: var(--ink-3);
	font: 11px var(--f-mono);
}
.chart .data {
	fill: none;
	stroke: var(--ink);
	stroke-width: 2.25;
	stroke-linejoin: round;
}
.chart .mass {
	fill: var(--machine);
	fill-opacity: 0.16;
	stroke: var(--machine);
	stroke-opacity: 0.8;
	stroke-width: 1;
}
.chart .note {
	fill: var(--ink-2);
	font: 12px var(--f-mono);
	paint-order: stroke;
	stroke: var(--bg);
	stroke-width: 5px;
	stroke-linejoin: round;
}
.chart .note.hl,
.chart .note.mc {
	fill: var(--hot);
}
.chart .note.th {
	fill: var(--machine);
}
.chart .ticks {
	stroke: var(--ink);
	stroke-width: 1;
}
.chart .ticks.control {
	stroke: var(--machine);
}
.chart .median {
	stroke: var(--hot);
	stroke-width: 2;
}
.chart .row-lbl {
	fill: var(--ink);
	font: 12px var(--f-mono);
}
.chart .dot {
	fill: var(--hot);
}
.chart .ref {
	fill: none;
	stroke: var(--ink-2);
	stroke-width: 1.25;
}
.chart .theory {
	fill: none;
	stroke: var(--machine);
	stroke-width: 1.5;
	stroke-dasharray: 6 5;
}

/* Fig. 5 — the same ledger, read twice */
.ledger {
	margin-top: 8px;
}
.ledger-stage {
	position: relative;
	aspect-ratio: 16 / 7;
	min-height: 320px;
	border: 1px solid var(--rule-2);
	background: radial-gradient(120% 140% at 70% 0%, #0c0f18 0%, #050608 60%);
	overflow: hidden;
}
.ledger-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.ledger-count {
	position: absolute;
	left: 18px;
	top: 16px;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(4, auto);
	gap: 4px 28px;
	font-family: var(--f-mono);
	pointer-events: none;
}
.ledger-count dt {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink-3);
}
.ledger-count dd {
	margin: 2px 0 0;
	font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.35rem);
	font-variant-numeric: tabular-nums;
	color: var(--ink);
	white-space: nowrap;
}
.ledger-count dd[data-ledger="count"] {
	color: var(--hot);
}
.ledger-lock {
	position: absolute;
	z-index: 2;
	left: 0;
	top: 0;
	width: max-content;
	max-width: calc(100% - 24px);
	padding: 4px 9px;
	border-left: 1px solid var(--machine);
	background: color-mix(in srgb, #050608 82%, transparent);
	font: 0.75rem/1.45 var(--f-mono);
	color: var(--machine);
	white-space: normal;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
.ledger-lock[hidden] {
	display: none;
}
.ledger-lock.is-on {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.3s var(--ease-out), visibility 0s;
}
.ledger-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
}
.ledger-controls[hidden] {
	display: none;
}
.still [data-action="ledger-play"] {
	display: none;
}
.seg {
	display: inline-flex;
	border: 1px solid var(--rule-2);
	border-radius: 999px;
	padding: 3px;
}
.seg-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--ink-2);
	font: 500 0.875rem/1 var(--f-text);
	padding: 0 14px;
	min-height: 38px;
	border-radius: 999px;
	cursor: pointer;
}
.seg-btn[aria-pressed="true"] {
	background: var(--ink);
	color: var(--bg);
}
.aside-note {
	margin-top: 28px;
	font-family: var(--f-mono);
	font-size: 0.8125rem;
	color: var(--ink-3);
}

/* ── Study ── */
.caveat,
.no-qpu,
.track {
	margin-top: 22px;
	max-width: var(--measure);
	color: var(--ink-2);
}
.caveat {
	border-left: 2px solid var(--hot);
	padding-left: 16px;
}
.no-qpu {
	font-family: var(--f-mono);
	font-size: 0.9375rem;
	color: var(--ink);
	border-left: 2px solid var(--machine);
	padding-left: 16px;
}
.track strong {
	color: var(--ink);
}

/* ── Studio ── */
.numbers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 24px;
	margin-bottom: 36px;
}
.numbers dt {
	font-family: var(--f-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink-3);
}
.numbers dd {
	margin-top: 6px;
	color: var(--ink-2);
}
.numbers .num {
	display: block;
	font-size: clamp(2.6rem, 1.8rem + 3vw, 4.5rem);
	line-height: 1;
	letter-spacing: -0.045em;
	font-weight: 800;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
	margin-bottom: 6px;
}

/* Fig. 8 — a type chart: each year's count is set in a weight that grows with it. */
.years-fig {
	margin-bottom: 36px;
}
.years {
	display: grid;
	grid-template-columns: repeat(13, minmax(0, 1fr));
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}
.years > div {
	display: grid;
	gap: 4px;
	padding: 12px 6px 10px 0;
}
.years dt {
	font-family: var(--f-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.04em;
	color: var(--ink-3);
}
.years dd {
	font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem);
	line-height: 1;
	letter-spacing: -0.03em;
	font-weight: calc(200 + 600 * var(--v));
	color: color-mix(in oklab, var(--ink) calc(70% + 30% * var(--v)), var(--bg));
	font-variant-numeric: tabular-nums;
}
.years dd::after {
	content: "";
	display: block;
	height: 2px;
	margin-top: 8px;
	width: calc(4% + 96% * var(--v));
	background: var(--hot);
	opacity: calc(0.35 + 0.65 * var(--v));
}
.years .undated dd {
	color: var(--ink-2);
	font-weight: 300;
}
.years .undated dd::after {
	background: var(--ink-3);
	width: 4%;
}

.formation,
.name-origin {
	max-width: var(--measure);
	color: var(--ink-2);
	margin: 0 0 28px;
}
.convictions {
	list-style: none;
	padding: 0;
	margin: 14px 0 32px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	border-top: 1px solid var(--rule);
	counter-reset: c;
}
.convictions li {
	counter-increment: c;
	padding: 12px 16px 12px 0;
	border-bottom: 1px solid var(--rule);
	font-weight: 600;
	display: grid;
	grid-template-columns: 2.6rem 1fr;
}
.convictions li::before {
	content: counter(c, decimal-leading-zero);
	font-family: var(--f-mono);
	font-weight: 400;
	font-size: 0.75rem;
	color: var(--ink-3);
	padding-top: 0.25em;
}
.name-origin strong {
	color: var(--ink);
}

/* ── Agents ── */
.agents > p {
	max-width: var(--measure);
	color: var(--ink-2);
	margin-bottom: 22px;
}
.agents > p code {
	color: var(--machine);
}
.entry-points {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	column-gap: 24px;
	border-top: 1px solid var(--rule);
	font-size: 0.9375rem;
	color: var(--ink-2);
	margin-bottom: 28px;
}
.entry-points li {
	padding: 12px 16px 12px 0;
	border-bottom: 1px solid var(--rule);
}
/* With exactly three columns (3 × 420px + 2 gaps up to 4 × 420px + 3 gaps), a last entry
   alone on its row takes the whole row. */
.entry-points {
	container-type: inline-size;
}
@container (min-width: 1308px) and (max-width: 1751.98px) {
	.entry-points li:last-child:nth-child(3n + 1) {
		grid-column: 1 / -1;
	}
}
.entry-points a {
	color: var(--machine);
	text-decoration: none;
	margin-right: 8px;
}
.entry-points a:hover code {
	text-decoration: underline;
}
.proof {
	display: grid;
	justify-items: start;
	gap: 10px;
	margin: 0 0 28px;
}
.proof[hidden] {
	display: none;
}
.proof-out {
	font-family: var(--f-mono);
	font-size: 0.8125rem;
	color: var(--ink-2);
	max-width: var(--measure);
}
.proof-out[data-state="verified"] {
	color: var(--machine);
}
.proof-out[data-state="failed"] {
	color: var(--hot);
}
.code {
	margin: 0 0 22px;
	padding: 18px 20px;
	overflow-x: auto;
	background: var(--bg-raise);
	border: 1px solid var(--rule);
	color: var(--machine);
	font-size: 0.8125rem;
	line-height: 1.7;
	max-width: 100%;
}

/* ── Footer ── */
.colophon {
	margin-top: clamp(80px, 14vh, 160px);
	padding: 28px var(--gutter) calc(36px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--rule);
	display: grid;
	gap: 12px;
	font-family: var(--f-mono);
	font-size: 0.8125rem;
	line-height: 1.6;
	color: var(--ink-3);
}
.colophon .contact {
	font-family: var(--f-text);
	font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	color: var(--ink);
	letter-spacing: -0.01em;
}
.colophon .contact a {
	font-weight: 700;
}
.colophon .social a,
.colophon .built a {
	color: var(--ink-2);
}
.colophon .social a {
	display: inline-block;
	min-width: 24px;
	padding: 3px 2px;
	text-align: center;
}

/* ── /legal: the notice, in the homepage's type ── */
.legal-page {
	display: grid;
	gap: 22px;
	max-width: 80ch;
	padding: clamp(48px, 10vh, 120px) var(--gutter) clamp(64px, 12vh, 140px);
}
.legal-page h1 {
	font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4.25rem);
	line-height: 0.98;
	letter-spacing: -0.035em;
	font-weight: 800;
}
.legal-list {
	display: grid;
	border-top: 1px solid var(--rule);
}
.legal-list > div {
	display: grid;
	grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--rule);
}
.legal-list dt {
	font-family: var(--f-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink-3);
	padding-top: 3px;
}
.legal-page > p:last-child {
	color: var(--ink-2);
}
.legal-page code {
	color: var(--machine);
}

/* ── Reading Order: this page, as an agent receives it ── */
.machine-view {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: #05060a;
	color: var(--machine);
	overflow: auto;
	overscroll-behavior: contain;
}
.machine-view::backdrop {
	background: #05060a;
}
/* While the view opens or closes, the page shows through and dims under reading.js's
   veil instead of vanishing. */
.machine-view[data-phase]::backdrop {
	background: transparent;
}
.mv-bar {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 18px;
	padding: 12px var(--gutter);
	background: #05060a;
	border-bottom: 1px solid #1a2140;
	font-family: var(--f-mono);
	font-size: 0.8125rem;
}
.mv-req {
	color: var(--ink);
}
.mv-res {
	color: var(--ink-2);
}
.mv-proof {
	color: var(--ink-2);
}
.mv-proof[data-state="verified"] {
	color: var(--machine);
}
.mv-proof[data-state="mismatch"] {
	color: var(--hot);
}
.mv-proof:empty {
	display: none;
}
.mv-bar .btn {
	margin-left: auto;
	min-height: 36px;
	border-color: #2a3560;
	color: var(--machine);
}
.mv-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) min(36vw, 480px);
	gap: 32px;
	padding: 24px var(--gutter) 64px;
}
.mv-doc {
	margin: 0;
	font-family: var(--f-mono);
	font-size: 0.875rem;
	line-height: 1.7;
	white-space: pre-wrap;
	word-break: break-word;
	counter-reset: ln;
	min-width: 0;
}
.mv-doc .ln {
	display: block;
	position: relative;
	padding-left: 4.2ch;
	min-height: 1.7em;
}
.mv-doc .ln::before {
	counter-increment: ln;
	content: counter(ln);
	position: absolute;
	left: 0;
	width: 3ch;
	text-align: right;
	color: #8f9fd0;
}
.mv-doc .h {
	color: var(--ink);
	font-weight: 700;
}
.mv-doc .q {
	color: var(--ink-2);
}
.mv-doc .u {
	color: #c9d6ff;
}
.mv-side {
	order: 2;
	position: sticky;
	top: 112px;
	align-self: start;
	display: grid;
	gap: 14px;
	min-width: 0;
}
.mv-note {
	font-size: 0.8125rem;
	color: var(--ink-2);
	line-height: 1.5;
	font-family: var(--f-mono);
}
.mv-ld {
	font-family: var(--f-mono);
	font-size: 0.75rem;
	color: var(--ink-2);
	border-top: 1px solid #1a2140;
	padding-top: 10px;
}
.mv-ld summary {
	cursor: pointer;
	color: var(--machine);
}
.mv-ld pre {
	margin: 10px 0 0;
	max-height: 50vh;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
}

/* ── Responsive ── */
@media (max-width: 1199px) {
	/* Below 1200px the plate goes first, then the words, then the caption: the copy never
	   sits on the ring, and on phones the h1 and the one-liner stay on the first screen. */
	.hero {
		display: flex;
		flex-direction: column;
		min-height: 0;
		padding-top: 0;
		gap: 0;
	}
	.fig-1 {
		display: contents;
	}
	.fig-1 .stage {
		position: relative;
		inset: auto;
		order: -1;
		aspect-ratio: 16 / 7;
		max-height: 50svh;
		width: auto;
		margin: 0 calc(var(--gutter) * -1);
	}
	.fig-1 .stage::after {
		background: linear-gradient(0deg, var(--bg) 0%, transparent 26%);
	}
	.fig-1 .poster,
	.fig-1 .lens {
		object-position: 50% 50%;
	}
	.fig-1 figcaption {
		position: relative;
		order: 1;
		width: auto;
		max-width: 72ch;
		margin-top: 28px;
		pointer-events: auto;
	}
	.hero-copy {
		grid-column: auto;
		align-self: stretch;
		margin-top: 20px;
	}
}

@media (max-width: 900px) {
	.toc {
		display: none;
	}
	.controls {
		margin-left: auto;
	}
	.fig-1 .stage {
		aspect-ratio: 4 / 3.4;
		max-height: 52svh;
	}
	.section-head h2,
	.section-lede {
		grid-column: 1 / -1;
	}
	.product-text,
	.product .shot,
	.product .island,
	.paper > *,
	.next h3,
	.next ul {
		grid-column: 1 / -1;
	}
	.product-perplog .shot {
		margin-right: 0;
	}
	.product-perplog .shot figcaption,
	.product-perplog .callouts {
		padding-right: 0;
	}
	.mv-body {
		grid-template-columns: minmax(0, 1fr);
	}
	.mv-side {
		position: relative;
		top: 0;
		order: 0;
	}
	.ledger-stage {
		aspect-ratio: 4 / 5;
	}
	.ledger-count {
		grid-template-columns: repeat(2, auto);
	}
	.years {
		grid-template-columns: repeat(7, minmax(0, 1fr));
	}
	.card {
		grid-template-columns: minmax(0, 1fr);
	}
	.card .cm {
		padding-left: 2ch;
		margin-bottom: 4px;
	}
}

/* A chart never draws below its own width (720 user units): its labels keep their
   authored 11–12px, and a narrow screen scrolls the chart instead. */
@media (max-width: 790px) {
	.chart-scroll .chart {
		min-width: 720px;
	}
}

@media (max-width: 520px) {
	.machine-line {
		font-size: 0.75rem;
	}
	.ml-more {
		display: none;
	}
	.brand span {
		display: none;
	}
	.big-figure {
		grid-template-columns: 1fr;
	}
	.convictions li {
		grid-template-columns: 2.2rem 1fr;
	}
	.glance dl > div,
	.legal-list > div {
		grid-template-columns: 1fr;
		gap: 2px;
	}
	.pin {
		width: 20px;
		height: 20px;
		margin: -10px 0 0 -10px;
		font-size: 0.625rem;
	}
}

/* Motion off, by the page's switch or the system setting: nothing moves. */
.still *,
.still *::before,
.still *::after {
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.01ms !important;
	scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
	html:not(.motion-on) *,
	html:not(.motion-on) *::before,
	html:not(.motion-on) *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ── Print: a two-page memo for whoever asks for one ── */
@media print {
	:root {
		--bg: #fff;
		--bg-raise: #fff;
		--rule: #d9d6cf;
		--rule-2: #c9c6bf;
		--ink: #111;
		--ink-2: #333;
		--ink-3: #4a4a4a;
		--machine: #2a44b0;
		--machine-2: #2a44b0;
		--hot: #9a4f00;
		--sophria: #2f5878;
		color-scheme: light;
	}
	@page {
		margin: 14mm 16mm;
	}
	body {
		font-size: 10pt;
		line-height: 1.45;
		background: #fff;
		color: #111;
	}
	.machine-line,
	.masthead,
	.skip,
	.fits,
	.fig-1 .stage,
	.actions,
	.controls,
	.breath,
	.pin,
	.ledger-stage canvas,
	.ledger-controls,
	.machine-view,
	.island,
	.shot-phone,
	.machine-aside,
	.convictions,
	.code {
		display: none !important;
	}
	main > section:not(.hero):not(.fits) {
		padding: 14pt 0 0;
	}
	.hero {
		min-height: 0;
		padding: 0;
		display: block;
	}
	.fig-1 {
		position: static;
		display: block;
		padding: 0;
	}
	.fig-1 figcaption {
		width: auto;
		margin-top: 6pt;
	}
	.wordmark {
		font-size: 34pt;
	}
	.section-head {
		display: block;
		margin-bottom: 8pt;
		padding-top: 8pt;
	}
	.section-head h2 {
		font-size: 18pt;
	}
	.section-lede {
		margin-top: 4pt;
	}
	.product,
	.paper,
	.next {
		display: block;
		padding: 8pt 0;
		break-inside: avoid;
	}
	.product-sophria::before {
		display: none;
	}
	.product .shot {
		max-width: 60%;
		margin: 8pt 0 0;
	}
	.big-figure .num {
		font-size: 26pt;
	}
	.ledger-stage {
		aspect-ratio: auto;
		min-height: 0;
		border: 0;
		background: none;
	}
	.ledger-count {
		position: static;
	}
	.colophon {
		margin-top: 18pt;
		padding: 10pt 0 0;
	}
	a {
		text-decoration: none;
	}
}
