/* Tokens. A project overrides --accent & the fonts in project.css, which loads after this sheet; do not edit this file. */
/* Cascade order for every sheet; project styles outside a layer win. */
@layer reset, tokens, base, layout, components, studio, print;

/* Self-hosted fonts. Each fallback matches its font's metrics against Arial (Courier New for PT Mono), so text keeps its size & line height when the font arrives. */
/* PT Mono: advance 0.6em, ascent 88.5%, descent 23.5%. */
@font-face {
	font-family: "PT Mono";
	src: url("../fonts/pt-mono.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "PT Mono Fallback";
	src: local("Courier New"), local("CourierNewPSMT"), local("Liberation Mono"), local("Courier");
	size-adjust: 100%;
	ascent-override: 88.5%;
	descent-override: 23.5%;
	line-gap-override: 0%;
}

/* Bundled faces: set the sans in project.css (`--font-sans`). Yellowtail is for `--font-signature` only. A face is fetched only when text uses it. */
@font-face {
	font-family: "Instrument Sans";
	src: url("../fonts/instrument-sans-var.woff2") format("woff2");
	font-weight: 400 700;
	font-display: swap;
}

@font-face {
	font-family: "Instrument Sans";
	src: url("../fonts/instrument-sans-italic-var.woff2") format("woff2");
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
}

@font-face {
	font-family: "Instrument Sans Fallback";
	src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
	size-adjust: 102.6%;
	ascent-override: 94.54%;
	descent-override: 24.37%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Instrument Sans Fallback";
	src: local("Arial Italic"), local("Arial-ItalicMT"), local("Liberation Sans Italic"), local("Helvetica Oblique");
	font-style: italic;
	size-adjust: 102.52%;
	ascent-override: 94.61%;
	descent-override: 24.39%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Yellowtail";
	src: url("../fonts/yellowtail.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Yellowtail Fallback";
	src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
	size-adjust: 73.65%;
	ascent-override: 131.93%;
	descent-override: 40.91%;
	line-gap-override: 12.2%;
}

@layer tokens {
	:root {
		color-scheme: light dark;

		/* Surfaces */
		--bg: light-dark(#ffffff, #101216);
		--bg-elev: light-dark(hsl(40, 14%, 96%), hsl(0, 0%, 11%));
		--code-bg: light-dark(hsl(40, 14%, 94%), hsl(0, 0%, 14%));
		--border: light-dark(#d3d8e2, #2d323e);

		/* Text */
		--fg: light-dark(#16181d, #eceef3);
		--fg-muted: light-dark(#4b5160, #a4abba);

		/* Placeholder, replaced by the project block. */
		--accent: #2346d4;
		/* Accent for text & links: darkened on light surfaces, lightened on dark ones. */
		--accent-text: light-dark(
			color-mix(in oklch, var(--accent) 82%, black),
			color-mix(in oklch, var(--accent) 55%, white)
		);
		/* Ink or white by accent lightness. */
		--on-accent: oklab(from var(--accent) clamp(0, calc((0.58 - l) * 1000), 1) 0 0);

		/* Fonts: mono is locked. */
		--sans-stack:
			ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
		--font-sans: var(--sans-stack);
		--font-display: var(--font-sans);
		/* Signing a name, nothing else. */
		--font-signature: "Yellowtail", "Yellowtail Fallback", cursive;
		--font-mono:
			"PT Mono", "PT Mono Fallback", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

		/* Syntax highlighting, measured against --code-bg. */
		--tok-comment: light-dark(#566070, #9aa3b5);
		--tok-string: light-dark(#0b6b3a, #7ed6a1);
		--tok-keyword: light-dark(#6b2fc2, #c4a3ff);
		--tok-function: light-dark(#1b4fc4, #8fb0ff);
		--tok-number: light-dark(#9a4a00, #ffb36b);

		/* Studio layer: fixed. */
		--studio-navy: #33394e;
		--studio-ink: #ffffff;
		--studio-link: #ffd36b;
		--studio-core: #d22d6f;
		--studio-orange: #ff944d;
		--studio-teal: #1f91ad;
		--studio-yellow: #ffd36b;

		/* Card accents, in order: the project color, then the studio palette. */
		--feature-1: var(--accent);
		--feature-2: var(--studio-orange);
		--feature-3: var(--studio-teal);
		--feature-4: var(--studio-yellow);

		/* Shape & rhythm */
		--radius: 6px;
		--space-xs: 0.5rem;
		--space-s: 0.75rem;
		--space-m: 1.25rem;
		--space-l: 2rem;
		--space-xl: 4rem;
		--measure: 40em;
		--shadow: 0 6px 20px light-dark(rgb(22 24 29 / 0.08), rgb(0 0 0 / 0.4));
	}
}

/* Minimal reset */
@layer reset {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}

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

	body,
	h1,
	h2,
	h3,
	p,
	figure,
	pre,
	ul {
		margin: 0;
	}

	ul {
		padding: 0;
		list-style: none;
	}

	img,
	picture,
	svg {
		display: block;
		max-inline-size: 100%;
		block-size: auto;
	}

	button {
		font: inherit;
		color: inherit;
	}

	@media (prefers-reduced-motion: reduce) {
		html {
			scroll-behavior: auto;
		}

		*,
		*::before,
		*::after {
			animation-duration: 0.01ms !important;
			transition-duration: 0.01ms !important;
		}
	}
}

/* Page layout */
@layer base {
	html {
		scroll-behavior: smooth;
	}

	body {
		min-block-size: 100vh;
		background: var(--bg);
		color: var(--fg);
		font-family: var(--font-sans);
		line-height: 1.6;
	}

	h1,
	h2,
	h3 {
		font-family: var(--font-display);
		line-height: 1.15;
		text-wrap: balance;
	}

	p,
	li {
		text-wrap: pretty;
	}

	p {
		line-height: 1.4;
	}

	a {
		color: var(--accent-text);
		text-decoration: underline dotted;
		text-decoration-color: currentcolor;
		text-decoration-thickness: 1px;
		text-underline-offset: 0.2em;
		overflow-wrap: break-word;
	}

	a:is(:hover, :focus-visible) {
		text-decoration-style: solid;
	}

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

	/* Links in running text take a hairline ring; bold or large text, & controls, keep 2px. */
	:is(p, li, dd, td, th, small, figcaption, nav) a:focus-visible {
		outline-width: 1px;
	}

	:is(h1, h2, h3, strong) a:focus-visible,
	main > header nav a:focus-visible,
	[data-studio="cta"] a:focus-visible {
		outline-width: 2px;
	}

	main:focus {
		outline: none;
	}

	a[href="#main"] {
		position: absolute;
		inset-block-start: -5rem;
		inset-inline-start: var(--space-m);
		z-index: 10;
		padding: var(--space-xs) var(--space-s);
		border: 1px solid var(--border);
		border-radius: var(--radius);
		background: var(--bg-elev);
		color: var(--fg);
	}

	a[href="#main"]:focus {
		inset-block-start: var(--space-xs);
	}
}

@layer layout {
	/* One gap per context. */
	:is(main > header, main > section, body > footer > div > *, li > article) {
		display: grid;
		grid-auto-flow: row;
		align-content: start;
		gap: var(--space-m);
	}

	:is(body > footer > div > *, li > article) {
		gap: var(--space-s);
	}

	/* Header */
	body > header > div {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-xs) var(--space-m);
		padding: var(--space-s) var(--space-m);
		border-block-end: 1px solid var(--border);
		background: var(--bg-elev);
	}

	body > header a[rel="home"] {
		display: inline-flex;
		align-items: center;
		gap: var(--space-xs);
		color: var(--fg);
		font-family: var(--font-display);
		font-size: 1.2rem;
		font-weight: 700;
		text-decoration: none;
	}

	body > header nav {
		display: flex;
		flex-wrap: wrap;
		gap: var(--space-xs) var(--space-m);
		font-size: 0.95rem;
	}

	/* Icon-led links */
	:is(body > header nav, body > footer) a:has(> svg) {
		display: inline-flex;
		align-items: center;
		gap: 0.4em;
	}

	/* Intro & sections */
	:is(main > header, main > section) {
		inline-size: min(100% - 2 * var(--space-m), 64rem);
		margin-inline: auto;
		padding-block: var(--space-l);
	}

	main > section[id] {
		scroll-margin-block-start: var(--space-m);
	}

	main > section > h2 {
		font-size: 1.7rem;
	}

	main > header {
		padding-block: var(--space-xl) var(--space-l);
	}

	main > header h1 {
		display: flex;
		flex-direction: column;
		gap: var(--space-xs);
		font-size: clamp(2rem, 5vw, 3.25rem);
	}

	main > header h1 > :first-child {
		font-size: 1.15em;
	}

	main > header h1 > :last-child {
		color: var(--accent-text);
		font-weight: 400;
	}

	main > header > p {
		max-inline-size: var(--measure);
		color: var(--fg-muted);
		font-size: 1.2rem;
	}

	/* Variant for the code sample: read by @container style() in components.css */
	main > header {
		--chrome: terminal;
	}

	main > header nav ul {
		display: flex;
		flex-wrap: wrap;
		gap: var(--space-s);
	}

	main > header > ul {
		display: flex;
		flex-wrap: wrap;
		gap: var(--space-l) var(--space-m);
		color: var(--fg-muted);
		font-size: 0.95rem;
	}

	/* Docs: a sidebar beside the page */
	main > div:has(> nav[aria-label="Documentation"]) {
		display: grid;
		grid-template-columns: 14rem minmax(0, 1fr);
		gap: var(--space-l);
		inline-size: min(100% - 2 * var(--space-m), 64rem);
		margin-inline: auto;
		padding-block: var(--space-l);
	}

	/* The sidebar stays in view beside the page; a long list scrolls inside it, below the search. */
	nav[aria-label="Documentation"] {
		position: sticky;
		inset-block-start: var(--space-m);
		display: flex;
		flex-direction: column;
		align-self: start;
		max-block-size: calc(100dvh - 2 * var(--space-m));
		font-size: 0.92rem;
	}

	/* Padding with an equal negative margin gives focus rings room: overflow clips them at the box edge. */
	nav[aria-label="Documentation"] > ul {
		min-block-size: 0;
		margin: -6px;
		padding: 6px;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	nav[aria-label="Documentation"] ul {
		display: flex;
		flex-direction: column;
		gap: 0.15rem;
	}

	/* Pages nested under a page: a rule down the left. */
	nav[aria-label="Documentation"] ul ul {
		margin: 0.15rem 0 0.5rem 0.5rem;
		padding-inline-start: 0.75rem;
		border-inline-start: 1px solid var(--border);
	}

	nav[aria-label="Documentation"] a {
		display: flex;
		align-items: baseline;
		gap: 0.55rem;
		padding: 0.25rem 0.5rem;
		border-radius: 0 4px 4px 0;
		color: var(--fg-muted);
		text-decoration: none;
	}

	nav[aria-label="Documentation"] a > svg {
		color: var(--accent-text);
	}

	nav[aria-label="Documentation"] a:hover {
		background: var(--bg-elev);
		color: var(--fg);
	}

	nav[aria-label="Documentation"] a[aria-current="page"] {
		background: var(--bg-elev);
		box-shadow: inset 3px 0 0 var(--accent);
		color: var(--accent-text);
		font-weight: 600;
	}

	main > div > article {
		display: grid;
		align-content: start;
		gap: var(--space-m);
	}

	main > div > article h1 {
		font-size: clamp(1.9rem, 4vw, 2.5rem);
	}

	/* Sections inside a page stack with a small row gap. */
	main > div > article :is(article, section) {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		min-inline-size: 0;
		align-content: start;
		gap: var(--space-s);
	}

	nav[aria-label="Pager"] {
		display: flex;
		justify-content: space-between;
		gap: var(--space-m);
		padding-block-start: var(--space-m);
		border-block-start: 1px solid var(--border);
	}

	nav[aria-label="Pager"] a[rel="prev"]::before {
		content: "← ";
	}

	nav[aria-label="Pager"] a[rel="next"] {
		margin-inline-start: auto;
	}

	nav[aria-label="Pager"] a[rel="next"]::after {
		content: " →";
	}

	/* Footer */
	body > footer {
		margin-block-start: var(--space-xl);
		padding: var(--space-l) var(--space-m);
		border-block-start: 1px solid var(--border);
		color: var(--fg-muted);
		font-size: 0.95rem;
		display: grid;
		gap: var(--space-l);
	}

	body > footer a {
		color: inherit;
	}

	body > footer a:is(:hover, :focus-visible) {
		color: var(--accent-text);
	}

	body > footer > :is(div, section) {
		inline-size: min(100%, 64rem);
		margin-inline: auto;
	}

	/* Lock-up: name, link columns, & the studio credit, which takes a fourth column when wide */
	body > footer > div {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
		align-items: start;
		gap: var(--space-l);
	}

	@media (min-width: 60rem) {
		body > footer > div {
			grid-template-columns: minmax(0, 25rem) repeat(2, minmax(min-content, max-content));
			justify-content: space-between;
		}

		body > footer > div:has(> [data-studio="footer"]) {
			grid-template-columns:
				minmax(0, 25rem) repeat(2, minmax(min-content, max-content))
				minmax(0, 13.75rem);
		}
	}

	body > footer > div > :first-child strong {
		color: var(--accent-text);
		font-family: var(--font-mono);
		font-size: 1.2rem;
	}

	body > footer strong {
		color: var(--fg);
	}

	body > footer ul {
		display: flex;
		flex-direction: column;
		gap: 0.4rem;
	}

	body > footer small {
		font-size: 0.9rem;
	}

	/* npm badges: shown only once the package has a release */
	body > footer [data-badges] {
		display: flex;
		flex-wrap: wrap;
		gap: var(--space-xs);
	}

	body > footer [data-badges] img {
		inline-size: auto;
		block-size: 20px;
	}

	@media (max-width: 40rem) {
		main > div:has(> nav[aria-label="Documentation"]) {
			grid-template-columns: minmax(0, 1fr);
		}

		nav[aria-label="Documentation"] {
			position: static;
			max-block-size: none;
		}

		nav[aria-label="Documentation"] > ul {
			overflow-y: visible;
		}
	}
}

@layer print {
	@media print {
		html {
			font-size: 12px;
		}

		a[href="#main"],
		body > header nav,
		main > header nav,
		[data-studio="cta"],
		nav[aria-label="Documentation"],
		figure > button {
			display: none;
		}

		:is(main > header, main > section, body > footer > div > *, li > article) {
			gap: var(--space-s);
		}

		:is(main > header, main > section) {
			padding-block: var(--space-m);
		}

		li > article,
		figure {
			break-inside: avoid;
		}

		pre {
			white-space: pre-wrap;
		}
	}
}

/* Shared components. */
@layer components {
	/* Icons: inline SVG, sized & colored by the text around them */
	svg[aria-hidden="true"] {
		flex: none;
		inline-size: 1em;
		block-size: 1em;
		fill: currentcolor;
	}

	/* Intro actions */
	main > header nav a {
		display: inline-flex;
		align-items: center;
		gap: 0.5em;
		padding: 0.6rem 1.1rem;
		border: 1px solid var(--accent);
		border-radius: var(--radius);
		background: var(--accent);
		color: var(--on-accent);
		font-weight: 700;
		text-decoration: none;
	}

	main > header nav a:is(:hover, :focus-visible) {
		text-decoration: underline;
	}

	/* Emphasis is inherited from the item; the second action is the quiet one. */
	main > header nav li + li {
		--emphasis: low;
	}

	@container style(--emphasis: low) {
		main > header nav a {
			background: transparent;
			color: var(--accent-text);
		}
	}

	/* Tags: an icon & a few words, no box */
	main > header > ul > li {
		display: inline-flex;
		align-items: center;
		gap: 0.4em;
		line-height: 1.5;
	}

	main > header > ul > li > svg {
		color: var(--accent-text);
	}

	/* Cards */
	main > section > ul {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
		gap: var(--space-m);
	}

	/* Each card takes the next accent. */
	li {
		--feature: var(--feature-1);
	}

	li:nth-child(4n + 2) {
		--feature: var(--feature-2);
	}

	li:nth-child(4n + 3) {
		--feature: var(--feature-3);
	}

	li:nth-child(4n + 4) {
		--feature: var(--feature-4);
	}

	li > article {
		position: relative;
		block-size: 100%;
		padding: var(--space-m);
		border: 1px solid var(--border);
		border-radius: var(--radius);
		background: var(--bg-elev);
	}

	li > article::before {
		content: "";
		position: absolute;
		inset: -1px;
		inline-size: calc(100% + 2px);
		block-size: 0.6em;
		border-radius: var(--radius) var(--radius) 0 0;
		background: var(--feature);
	}

	li > article > span[aria-hidden="true"] {
		display: grid;
		place-items: center;
		justify-self: start;
		inline-size: 3rem;
		block-size: 3rem;
		border-radius: var(--radius);
		background: color-mix(in srgb, var(--feature) 28%, transparent);
		font-size: 1.25rem;
	}

	li > article > h3 {
		font-size: 1.2rem;
	}

	/* Set on the list (`--title-face: mono`), inherited down to each card. */
	@container style(--title-face: mono) {
		li > article > h3 {
			font-family: var(--font-mono);
			font-size: 1rem;
			font-weight: 700;
		}
	}

	li > article > p {
		color: var(--fg-muted);
	}

	/* Contents: a term & its description, in two columns when wide */
	main > section > dl {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
		gap: var(--space-m) var(--space-l);
	}

	main > section > dl > div {
		display: grid;
		align-content: start;
		gap: 0.25rem;
		padding-block-end: var(--space-s);
		border-block-end: 1px solid var(--border);
	}

	main > section > dl dt {
		font-family: var(--font-display);
		font-size: 1.1rem;
		font-weight: 700;
	}

	main > section > dl dd {
		margin: 0;
		color: var(--fg-muted);
	}

	/* Prose: the body of a docs page */
	main > div > article :is(h2, h3) {
		margin-block-start: var(--space-s);
	}

	/* A heading that links is marked with a #, & its link takes the text color. */
	main > div > article :is(h1, h2, h3, h4, h5, h6):has(> a)::before {
		content: "#";
		margin-inline-end: 0.25em;
	}

	main > div > article :is(h1, h2, h3, h4, h5, h6) > a {
		color: inherit;
		text-underline-offset: 0.1em;
	}

	main > div > article h2 {
		font-size: 1.5rem;
	}

	main > div > article h3 {
		font-size: 1.2rem;
	}

	main > div > article :is(ul, ol) {
		display: grid;
		gap: 0.4rem;
		padding-inline-start: 1.25rem;
		list-style: revert;
	}

	main > div > article blockquote {
		padding-inline-start: var(--space-m);
		border-inline-start: 3px solid var(--border);
		color: var(--fg-muted);
	}

	main > div > article table {
		border-collapse: collapse;
		border-block-end: 1px solid var(--border);
	}

	main > div > article :is(th, td) {
		padding: var(--space-xs) var(--space-s);
		border-block-end: 1px solid var(--border);
		text-align: start;
	}

	/* A wide table scrolls sideways inside its own focusable region. */
	[data-scroll] {
		overflow-x: auto;
	}

	main > div > article hr {
		border: 0;
		border-block-start: 1px solid var(--border);
	}

	/* Code */
	code,
	pre {
		font-family: var(--font-mono);
	}

	code {
		padding: 0.1em 0.35em;
		border-radius: 0.25rem;
		background: var(--code-bg);
		font-size: 0.9em;
	}

	pre {
		overflow-x: auto;
		padding: var(--space-m);
		border: 1px solid var(--border);
		border-radius: var(--radius);
		background: var(--code-bg);
		font-size: 0.9rem;
		line-height: 1.5;
	}

	pre code {
		padding: 0;
		background: none;
		font-size: inherit;
	}

	/* Terminal chrome, set on a container with `--chrome: terminal`. */
	@container style(--chrome: terminal) {
		figure {
			inline-size: min(100%, 40rem);
			justify-self: start;
			overflow: hidden;
			border: 1px solid var(--border);
			border-radius: var(--radius);
			box-shadow: var(--shadow);
		}

		figure::before {
			content: "";
			grid-area: 1 / 1;
			block-size: 2.25rem;
			border-block-end: 1px solid var(--border);
			background:
				radial-gradient(circle 0.35rem at 1.1rem 50%, var(--studio-core) calc(100% - 1px), transparent),
				radial-gradient(circle 0.35rem at 2.1rem 50%, var(--studio-orange) calc(100% - 1px), transparent),
				radial-gradient(circle 0.35rem at 3.1rem 50%, var(--studio-yellow) calc(100% - 1px), transparent),
				var(--bg-elev);
		}

		figcaption {
			grid-area: 1 / 1;
			align-self: center;
			margin: 0;
			padding-inline-start: 4.25rem;
		}

		figure pre {
			border: 0;
			border-radius: 0;
		}
	}

	figcaption {
		margin-block-end: var(--space-xs);
		color: var(--fg-muted);
		font-family: var(--font-mono);
		font-size: 0.85rem;
	}

	figure {
		display: grid;
	}

	figure > pre,
	figure > button {
		grid-area: 2 / 1;
	}

	figure pre {
		padding-inline-end: 5.5rem;
	}

	figure > button {
		justify-self: end;
		align-self: start;
		margin: var(--space-xs);
		padding: 0.25rem 0.7rem;
		border: 1px solid var(--border);
		border-radius: var(--radius);
		background: var(--bg);
		color: var(--fg);
		font-size: 0.85rem;
		cursor: pointer;
	}

	figure > button:is(:hover, :focus-visible) {
		border-color: var(--accent-text);
	}

	figure > [role="status"] {
		position: absolute;
		inline-size: 1px;
		block-size: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	/* Syntax colors: ranges registered by assets/scripts/code-highlight.js */
	::highlight(tok-comment) {
		color: var(--tok-comment);
	}

	::highlight(tok-string) {
		color: var(--tok-string);
	}

	::highlight(tok-keyword) {
		color: var(--tok-keyword);
	}

	::highlight(tok-function) {
		color: var(--tok-function);
	}

	::highlight(tok-number) {
		color: var(--tok-number);
	}

	::highlight(tok-punctuation) {
		color: var(--fg-muted);
	}

	/* Narrow screens */
	@media (max-width: 40rem) {
		figure pre {
			padding-inline-end: var(--space-m);
		}

		figure > button {
			grid-row: 3;
			justify-self: start;
			margin: var(--space-xs) 0 0;
		}
	}
}

/* Studio layer: locked. Reads only --studio-* tokens. Do not edit in a project. */
@layer studio {
	[data-studio="banner"] {
		display: block;
		background: var(--studio-navy);
	}

	[data-studio="banner"] img {
		margin-inline: auto;
		inline-size: 100%;
		max-inline-size: 1600px;
		block-size: auto;
	}

	/* Four-color stripe under the header, shown with the banner */
	body > header:has(> [data-studio="banner"]) > div {
		position: relative;
	}

	body > header:has(> [data-studio="banner"]) > div::after {
		content: "";
		position: absolute;
		inset: auto 0 -1px;
		block-size: 3px;
		background: linear-gradient(
			90deg,
			var(--studio-core) 0 25%,
			var(--studio-orange) 25% 50%,
			var(--studio-yellow) 50% 75%,
			var(--studio-teal) 75%
		);
	}

	[data-studio="cta"] {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		gap: var(--space-m) var(--space-l);
		padding: var(--space-l);
		border-radius: var(--radius);
		background: var(--studio-navy);
		color: var(--studio-ink);
	}

	/* The CTA closes main, above the footer. */
	main > [data-studio="cta"] {
		max-inline-size: 64rem;
		margin-block: 4rem 0;
		margin-inline: auto;
	}

	[data-studio="cta"] > img {
		inline-size: 4.5rem;
	}

	[data-studio="cta"] > div {
		display: grid;
		gap: 0.4rem;
	}

	[data-studio="cta"] > div > p:has(+ h2) {
		color: inherit;
		font-size: inherit;
		font-weight: 600;
		letter-spacing: normal;
		text-transform: none;
	}

	[data-studio="cta"] h2 {
		font-size: clamp(1.35rem, 3vw, 1.75rem);
	}

	/* The studio name is signed, wherever it appears in the call to action. */
	[data-studio="cta"] [data-signature] {
		font-family: var(--font-signature);
		font-size: 1.3em;
		font-weight: 400;
		line-height: 1;
	}

	[data-studio="cta"] > div > p [data-signature] {
		font-size: 1.5em;
	}

	[data-studio="cta"] ul {
		flex-direction: row;
		flex-wrap: wrap;
		gap: var(--space-s);
	}

	[data-studio="cta"] a {
		display: inline-block;
		padding: 0.6rem 1.1rem;
		border: 2px solid var(--studio-link);
		border-radius: var(--radius);
		color: var(--studio-link);
		font-weight: 700;
		text-decoration: none;
	}

	[data-studio="cta"] li:first-child a {
		background: var(--studio-link);
		color: var(--studio-navy);
	}

	[data-studio="cta"] a:is(:hover, :focus-visible) {
		text-decoration: underline;
	}

	[data-studio="cta"] :focus-visible {
		outline-color: var(--studio-link);
	}

	@media (max-width: 40rem) {
		[data-studio="cta"] {
			grid-template-columns: minmax(0, 1fr);
		}
	}

	/* The footer art is 880 x 150 with about 270 of blank canvas on each side: crop to a 300 x 135 box. */
	[data-studio="footer"] {
		display: block;
		max-inline-size: min(100%, 20rem);
	}

	[data-studio="footer"] img {
		inline-size: 100%;
		aspect-ratio: 300 / 135;
		object-fit: cover;
	}
}
