@layer layout {
	/*
	 * One grid drives every page. Content sits in `content`; anything that
	 * should bleed edge-to-edge opts into `full` without needing a wrapper
	 * escape hatch.
	 */
	.rail {
		display: grid;
		grid-template-columns:
			[full-start] minmax(var(--gutter), 1fr)
			[content-start] min(var(--content-max), 100% - var(--gutter) * 2)
			[content-end] minmax(var(--gutter), 1fr)
			[full-end];
	}

	.rail > * {
		grid-column: content;
	}

	.rail > .full {
		grid-column: full;
		width: 100%;
	}

	.prose {
		max-width: var(--prose-max);
	}

	.prose > * + * {
		margin-top: var(--space-m);
	}

	.stack > * + * {
		margin-top: var(--space-m);
	}

	.stack-l > * + * {
		margin-top: var(--space-xl);
	}

	.site-main {
		min-height: 60svh;
	}

	.section {
		padding-block: var(--space-3xl);
	}

	.section-tight {
		padding-block: var(--space-2xl);
	}

	/* Full-bleed media frame that fills the viewport below the header */
	.viewport-media {
		position: relative;
		width: 100%;
		height: 100svh;
		overflow: clip;
	}

	.viewport-media > img,
	.viewport-media > picture > img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}
