@font-face{font-family:"IBM Plex Sans";font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/ibm-plex-sans-400.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-weight:600;font-display:swap;src:url("/fonts/ibm-plex-sans-600.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-weight:700;font-display:swap;src:url("/fonts/ibm-plex-sans-700.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/ibm-plex-mono-400.woff2") format("woff2")}

/*
 * The Micromosaic design system, as plain CSS.
 *
 * Ported from ~/micromosaic-io/src/index.css at commit 9d8a53e. That file
 * declares its tokens as Tailwind `@theme` entries; this repo has no Tailwind,
 * so they are plain custom properties here and the layout utilities the parent
 * gets from Tailwind are written out below. The token VALUES and the
 * `@layer components` block are copied verbatim — where they differ from the
 * parent, the parent is right.
 *
 * Copied rather than shared, because a cross-repo import would break this
 * build whenever the sibling repo is absent. That is a real drift risk and it
 * is recorded as one (RMTX-216) rather than papered over with a check that
 * silently passes when it cannot see the source.
 *
 * Two rules from the parent that are load-bearing rather than stylistic:
 *
 *   - The palette is MONOCHROME on purpose. Red, green and amber all mean
 *     pass, fail and flaky inside this product, so a brand hue in any of them
 *     would read as a status. The tile fields carry the identity instead.
 *   - Square corners throughout. There is no radius token, by design.
 */

:root {
	--font-sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
	--font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

	/* Warm-neutral monochrome. Greys carry a slight warm bias so they read as
	   chosen rather than inherited. Verified WCAG AA on every ground. */
	--color-paper: #ffffff;
	--color-s2: #f4f3f1;
	--color-s3: #e7e5e1;
	--color-band: #17171a;
	--color-ink: #17171a;
	--color-ink-2: #4c4a47;
	--color-ink-3: #5d5b57;
	--color-rule: #17171a;
	--color-edge: rgb(23 23 26 / 0.16);
	--color-accent: #17171a;
	--color-accent-lift: #33322f;
	--color-on-accent: #ffffff;
	--color-on-band: #f5f4f2;
	--color-on-band-2: #a5a29c;

	--text-display: 3.25rem;
	--text-display-lh: 1.05;
	--text-h1: 2.5rem;
	--text-h1-lh: 1.1;
	--text-h2: 1.75rem;
	--text-h2-lh: 1.2;
	--text-h3: 1.25rem;
	--text-h3-lh: 1.3;

	color-scheme: light;
}

/* ---- base ---- */

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

body {
	background: var(--color-paper);
	color: var(--color-ink);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	margin: 0;
}

h1,
h2,
h3,
h4 {
	text-wrap: balance;
	letter-spacing: -0.01em;
	margin: 0;
}

p {
	margin: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

::selection {
	background: var(--color-accent);
	color: var(--color-on-accent);
}

img,
canvas {
	max-width: 100%;
}

/* ---- structure ---- */

/* Full-width horizontal bands are the page's structural unit. The rhythm is
   paper, grey, paper, dark; two adjacent bands of the same ground merge into
   one block and the section boundary disappears. */
.band {
	padding-block: 3.5rem;
	padding-inline: 1.25rem;
}

@media (min-width: 768px) {
	.band {
		padding-block: 6rem;
		padding-inline: 2rem;
	}
}

.band-inner {
	max-width: 68rem;
	margin-inline: auto;
}

.band-textured {
	position: relative;
	overflow: hidden;
}

.band-textured > .band-inner {
	position: relative;
}

.band-narrow {
	max-width: 46rem;
	margin-inline: auto;
}

.bg-paper {
	background: var(--color-paper);
}

.bg-s2 {
	background: var(--color-s2);
}

.bg-band {
	background: var(--color-band);
	color: var(--color-on-band);
}

/* ---- type ---- */

.eyebrow,
.label {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--color-ink-3);
}

.label {
	letter-spacing: 0.14em;
}

.bg-band .eyebrow,
.bg-band .label {
	color: var(--color-on-band-2);
}

.display {
	font-size: var(--text-h1);
	line-height: var(--text-h1-lh);
	font-weight: 600;
}

@media (min-width: 768px) {
	.display {
		font-size: var(--text-display);
		line-height: var(--text-display-lh);
	}
}

.h2 {
	font-size: var(--text-h2);
	line-height: var(--text-h2-lh);
	font-weight: 600;
}

.h3 {
	font-size: var(--text-h3);
	line-height: var(--text-h3-lh);
	font-weight: 600;
}

.lead {
	font-size: 1.25rem;
	color: var(--color-ink-2);
}

.bg-band .lead,
.bg-band .muted {
	color: var(--color-on-band-2);
}

.muted {
	color: var(--color-ink-2);
}

.prose-measure {
	max-width: 65ch;
}

.tnum {
	font-variant-numeric: tabular-nums;
}

.stack > * + * {
	margin-top: 1rem;
}

.stack-lg > * + * {
	margin-top: 2.5rem;
}

/* ---- controls ---- */

.btn {
	display: inline-block;
	font-weight: 600;
	font-size: 0.875rem;
	letter-spacing: 0.01em;
	padding: 0.6875rem 1.25rem;
	border: 1px solid transparent;
	cursor: pointer;
}

.btn-primary {
	background: var(--color-accent);
	color: var(--color-on-accent);
}

.btn-primary:hover {
	background: var(--color-accent-lift);
}

.btn-secondary {
	border-color: var(--color-rule);
	color: var(--color-ink);
}

.btn-secondary:hover {
	background: var(--color-s2);
}

.btn-on-band {
	border-color: var(--color-on-band-2);
	color: var(--color-on-band);
}

.btn-on-band:hover {
	background: rgb(255 255 255 / 0.08);
}

/* On a dark band the accent IS the band, so the primary button inverts. */
.btn-invert {
	background: var(--color-on-band);
	color: var(--color-band);
}

.btn-invert:hover {
	background: #ffffff;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.link-underline {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* ---- the hairline grid ----
   A 1px gap over the edge colour, so cards are separated by rules rather than
   by shadows. Square corners, no elevation. */

.grid-rule {
	display: grid;
	gap: 1px;
	background: var(--color-edge);
	border: 1px solid var(--color-edge);
}

.grid-rule > * {
	background: var(--color-paper);
	padding: 1.5rem;
}

/* The depths are an ordered list because they are genuinely a sequence, but
   their numbers are rendered as labels in the markup. Without this the browser
   draws its own markers too and every item is numbered twice. */
ol.grid-rule {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bg-s2 .grid-rule > * {
	background: var(--color-s2);
}

.cols-2,
.cols-4 {
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.cols-2,
	.cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.cols-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.split {
	display: grid;
	gap: 2.5rem;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.split {
		grid-template-columns: minmax(0, 1fr) 18rem;
		align-items: start;
	}
}

/* ---- chrome ---- */

.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	position: static;
	display: inline-block;
	padding: 0.5rem 1rem;
	background: var(--color-on-band);
	color: var(--color-band);
}

.nav {
	background: var(--color-band);
	color: var(--color-on-band);
}

.nav-inner {
	max-width: 68rem;
	margin-inline: auto;
	padding: 0.875rem 1.25rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

@media (min-width: 768px) {
	.nav-inner {
		padding-inline: 2rem;
	}
}

.wordmark {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	margin-right: auto;
}

.nav-links {
	display: none;
	align-items: center;
	gap: 1.25rem;
	font-size: 0.875rem;
	width: 100%;
}

.nav-links[data-open='true'] {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

@media (min-width: 768px) {
	.nav-links {
		display: flex;
		width: auto;
	}
}

.nav-toggle {
	background: none;
	border: 1px solid var(--color-on-band-2);
	color: inherit;
	font: inherit;
	font-size: 0.8125rem;
	padding: 0.375rem 0.75rem;
	cursor: pointer;
}

@media (min-width: 768px) {
	.nav-toggle {
		display: none;
	}
}

.nav-link[aria-current='page'] {
	border-bottom: 2px solid var(--color-on-band);
}

.footer {
	background: var(--color-band);
	color: var(--color-on-band-2);
	font-size: 0.8125rem;
	padding: 3rem 1.25rem;
}

@media (min-width: 768px) {
	.footer {
		padding-inline: 2rem;
	}
}

.footer-grid {
	max-width: 68rem;
	margin-inline: auto;
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.footer-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.footer h2 {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--color-on-band);
	margin-bottom: 0.5rem;
}

/* Marks copy that is not yet confirmed. Deliberately conspicuous. */
.pending {
	font-family: var(--font-mono);
	font-size: 0.625rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border: 1px dashed currentColor;
	padding: 0.05rem 0.35rem;
	white-space: nowrap;
}

.texture {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.mosaic-sparse {
	width: 100%;
	height: 16rem;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
