@layer norn.components {
		norn-icon {
			display: inline-flex;
			flex: none;
			vertical-align: -0.125em;

			& svg {
				inline-size: var(--norn-ui-icon-s, 1em);
				block-size: var(--norn-ui-icon-s, 1em);

				&[data-size="m"] {
					inline-size: var(--norn-ui-icon-m, 1.25rem);
					block-size: var(--norn-ui-icon-m, 1.25rem);
				}

				&:not([data-project]) {
					fill: none;
					stroke: currentcolor;
					stroke-linecap: round;
					stroke-linejoin: round;
					stroke-width: 2;
				}

				&[data-project] {
					fill: currentcolor;
				}
			}

			& > :not(svg) {
				position: absolute;
				inline-size: 1px;
				block-size: 1px;
				overflow: hidden;
				clip-path: inset(50%);
				white-space: nowrap;
			}

			& [data-fill] {
				fill: currentcolor;
				stroke: none;
			}

			&:dir(rtl) [data-mirror] {
				transform: scaleX(-1);
			}
		}
	}
@layer norn.components {
		norn-segmented-control {
			--_gap: 2px;
			--_current: var(--norn-text-accent, light-dark(oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 82%, black) min(l, 0.5) c h), oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 55%, white) max(l, 0.72) c h)));
			display: inline-flex;
			max-inline-size: 100%;

			& fieldset {
				box-sizing: border-box;
				display: grid;
				grid-auto-columns: minmax(0, 1fr);
				grid-auto-flow: column;
				gap: var(--_gap);
				min-inline-size: 0;
				margin: 0;
				padding: var(--_gap);
				border: 0;
				border-radius: var(--norn-ui-border-radius, 6px);
				background: var(--norn-surface-raised, light-dark(hsl(40, 14%, 96%), #242932));
			}

			& legend,
			& [data-icon-only] label > span {
				box-sizing: border-box;
				position: absolute;
				inline-size: 1px;
				block-size: 1px;
				overflow: hidden;
				clip-path: inset(50%);
				white-space: nowrap;
			}

			/* The radio covers its label, so a click anywhere on the option selects it, and the native control keeps the focus. */
			& label {
				--_state: 0%;
				--_tint: transparent;
				box-sizing: border-box;
				position: relative;
				z-index: 0;
				display: inline-flex;
				align-items: center;
				justify-content: center;
				gap: var(--norn-space-2xs, 0.25rem);
				min-inline-size: 2.5rem;
				min-block-size: calc(var(--norn-ui-control-height, 2.25rem) - 2 * var(--_gap));
				padding-inline: var(--norn-space-s, 0.75rem);
				border-radius: calc(var(--norn-ui-border-radius, 6px) - var(--_gap));
				background-color: color-mix(in oklab, currentcolor var(--_state), var(--_tint));
				color: var(--norn-text-muted, light-dark(#4b5160, #a4abba));
				cursor: pointer;
				overflow-wrap: anywhere;
				text-align: center;

				&:hover {
					--_state: var(--norn-ui-state-hover, 8%);
				}

				&:active {
					--_state: var(--norn-ui-state-press, 12%);
				}

				&:has(input:checked) {
					--_tint: color-mix(in oklab, var(--_current) 14%, transparent);
					color: var(--_current);
				}

				/* The ring sits inside the option, clear of the track's edge. */
				&:has(input:focus-visible) {
					outline: var(--norn-ui-focus-width, 2px) solid var(--norn-text-accent, light-dark(oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 82%, black) min(l, 0.5) c h), oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 55%, white) max(l, 0.72) c h)));
					outline-offset: calc(-1 * var(--norn-ui-focus-offset, 2px));
				}
			}

			& input {
				box-sizing: border-box;
				position: absolute;
				inset: 0;
				z-index: 1;
				margin: 0;
				opacity: 0;
				cursor: pointer;
			}

			@media (pointer: coarse) {
				& label {
					min-block-size: 2.75rem;
				}
			}

			@media (prefers-reduced-motion: no-preference) {
				& label {
					transition: background-color var(--norn-ui-motion-duration, 150ms) var(--norn-ui-motion-easing, cubic-bezier(0.2, 0, 0, 1)),
						color var(--norn-ui-motion-duration, 150ms) var(--norn-ui-motion-easing, cubic-bezier(0.2, 0, 0, 1));
				}
			}

			/* One fill slides to the checked option: the start edge leads and the end edge trails. Without anchor positioning, or with less motion, the checked option fills itself. */
			@media (prefers-reduced-motion: no-preference) {
				@supports (anchor-name: --a) {
					anchor-scope: --norn-segment;

					& fieldset {
						position: relative;
						isolation: isolate;
					}

					& fieldset::before {
						content: "";
						position: absolute;
						position-anchor: --norn-segment;
						z-index: 0;
						inset-block: anchor(start) anchor(end);
						inset-inline: anchor(start) anchor(end);
						border-radius: calc(var(--norn-ui-border-radius, 6px) - var(--_gap));
						background-color: color-mix(in oklab, var(--_current) 14%, transparent);
						transition: inset-inline-start var(--norn-ui-motion-slide, 200ms) var(--norn-ui-motion-easing, cubic-bezier(0.2, 0, 0, 1)),
							inset-inline-end var(--norn-ui-motion-slide, 200ms) var(--norn-ui-motion-easing, cubic-bezier(0.2, 0, 0, 1)) var(--norn-ui-motion-trail, 90ms);
					}

					& fieldset:not(:has(input:checked))::before {
						display: none;
					}

					& label:has(input:checked) {
						--_tint: transparent;
						anchor-name: --norn-segment;
					}
				}
			}

			/* The checked option fills itself, since the browser replaces the tint. */
			@media (forced-colors: active) {
				& label:has(input:checked) {
					background-color: Highlight;
					color: HighlightText;
					forced-color-adjust: none;
				}

				& label:has(input:focus-visible) {
					outline-color: CanvasText;
				}

				& fieldset::before {
					display: none;
				}
			}
		}
	}
@layer norn.components {
		preview-canvas {
			display: grid;
			gap: var(--norn-space-s);
		}

		preview-canvas:not(:defined) [data-js] {
			display: none;
		}

		preview-canvas > div:first-child {
			display: flex;
			flex-wrap: wrap;
			align-items: center;
			gap: var(--norn-space-s) var(--norn-space-m);
			font-size: 0.9rem;
		}

		preview-canvas button {
			display: inline-flex;
			align-items: center;
			gap: 0.4em;
			min-block-size: 2.25rem;
			padding: 0.25rem 0.7rem;
			border: 1px solid var(--norn-ui-border-color);
			border-radius: var(--norn-ui-border-radius);
			background: var(--norn-surface-base);
			color: var(--norn-text-base);
			font: inherit;
			cursor: pointer;
		}

		preview-canvas button norn-icon svg {
			inline-size: 1.15rem;
			block-size: 1.15rem;
		}

		/* One icon per state: idle, running, pass, fail. */
		preview-canvas button:not([data-state="idle"]) [data-for="idle"],
		preview-canvas button:not([data-state="running"]) [data-for="running"],
		preview-canvas button:not([data-state="pass"]) [data-for="pass"],
		preview-canvas button:not([data-state="fail"]) [data-for="fail"] {
			display: none;
		}

		preview-canvas [data-for="pass"] {
			color: light-dark(#0b6b3a, #7ed6a1);
		}

		preview-canvas [data-for="fail"] {
			color: light-dark(#b42318, #ff8a80);
		}

		@media (prefers-reduced-motion: no-preference) {
			preview-canvas [data-for="running"] svg {
				animation: preview-spin 0.8s linear infinite;
			}
		}

		@keyframes preview-spin {
			to {
				rotate: 1turn;
			}
		}

		preview-canvas p {
			margin: 0;
			font-size: 0.9rem;
		}

		preview-canvas [data-stage] {
			overflow-x: auto;
			padding: var(--norn-space-s);
			border: 1px dashed var(--norn-ui-border-color);
			border-radius: var(--norn-ui-border-radius);
			background: var(--norn-surface-raised);
		}

		preview-canvas iframe {
			display: block;
			inline-size: var(--canvas-width, 100%);
			max-inline-size: none;
			min-block-size: 4rem;
			margin-inline: auto;
			border: 0;
			background: var(--norn-surface-base);
		}

		preview-canvas [data-results]:empty {
			display: none;
		}

		preview-canvas [data-results] {
			padding: var(--norn-space-s) var(--norn-space-m);
			border: 1px solid var(--norn-ui-border-color);
			border-radius: var(--norn-ui-border-radius);
			font-size: 0.9rem;
		}

		preview-canvas [data-results] ul {
			margin: 0.25rem 0 0;
			padding-inline-start: 1.25rem;
		}

		/* A phone has no use for fixed widths: the frame always fills its box, whatever width was chosen on a wide screen. */
		@media (max-width: 40rem) {
			preview-canvas norn-segmented-control[data-group="width"] {
				display: none;
			}

			preview-canvas iframe {
				inline-size: 100%;
			}
		}

		/* A touch screen gets a 44px target. */
		@media (pointer: coarse) {
			preview-canvas :is(button, norn-segmented-control label) {
				min-block-size: 2.75rem;
			}

			preview-canvas p a {
				display: inline-flex;
				align-items: center;
				min-block-size: 2.75rem;
			}
		}

		@media print {
			preview-canvas [data-js] {
				display: none;
			}
		}
	}
@layer norn.components {
		norn-copy-button {
			display: inline-flex;
			max-inline-size: 100%;

			& button {
				--_state: 0%;
				box-sizing: border-box;
				display: inline-flex;
				align-items: center;
				min-block-size: var(--norn-ui-control-height, 2.25rem);
				max-inline-size: 100%;
				padding: 0 var(--norn-space-xs, 0.5rem);
				border: 0;
				border-radius: var(--norn-ui-border-radius, 6px);
				background-color: color-mix(in oklab, currentcolor var(--_state), var(--_bg, transparent));
				color: var(--norn-text-muted, light-dark(#4b5160, #a4abba));
				font: inherit;
				font-size: var(--norn-font-size-s, 0.875rem);
				overflow-wrap: anywhere;
				text-align: start;
				cursor: pointer;

				&[hidden] {
					display: none;
				}

				&[data-surface="base"] {
					--_bg: var(--norn-surface-base, light-dark(#ffffff, #101216));
				}

				&[data-surface="raised"] {
					--_bg: var(--norn-surface-raised, light-dark(hsl(40, 14%, 96%), #242932));
				}

				&[data-surface="code"] {
					--_bg: var(--norn-surface-code, light-dark(hsl(40, 14%, 94%), #2c313b));
				}

				&:hover {
					--_state: var(--norn-ui-state-hover, 8%);
				}

				&:active {
					--_state: var(--norn-ui-state-press, 12%);
				}

				&[data-state="copied"] {
					color: var(--norn-status-success, light-dark(#0b6b3a, #7ed6a1));
				}

				&[data-state="failed"] {
					color: var(--norn-status-danger, light-dark(#b42318, #ff8a80));
				}
			}

			/* The copy icon and the check share a cell, and so do the three texts, so the button is as wide for one as for another. */
			& [data-icons],
			& [data-label] {
				display: inline-grid;
			}

			& [data-icons] > norn-icon,
			& [data-label] > span {
				grid-area: 1 / 1;
			}

			& [data-label] {
				margin-inline-start: var(--norn-space-2xs, 0.25rem);
			}

			& button:not([data-state="copied"]) [data-icons] > norn-icon:last-child,
			& button[data-state="copied"] [data-icons] > norn-icon:first-child,
			& [data-label] > span:not([data-active]) {
				visibility: hidden;
			}

			/* A compact button is only its icon until the pointer or focus is on it, or it has a result to show. */
			& button[data-compact]:not(:hover, :focus-visible, [data-state]) [data-label] {
				inline-size: 0;
				margin: 0;
				overflow: hidden;
				white-space: nowrap;
			}

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

			@media (pointer: coarse) {
				& button {
					min-block-size: 2.75rem;
				}
			}

			@media (prefers-reduced-motion: no-preference) {
				& button {
					transition: background-color var(--norn-ui-motion-duration, 150ms) var(--norn-ui-motion-easing, cubic-bezier(0.2, 0, 0, 1));
				}
			}

			@media print {
				display: none;
			}
		}
	}
@layer norn.components {
		norn-code-block {
			display: block;

			/* The caption sits above the code. The copy button shares the code's cell, over its top end corner. */
			& figure {
				display: grid;
				grid-template-columns: minmax(0, 1fr);
				margin: 0;
			}

			& figure:has(> figcaption) {
				row-gap: var(--norn-space-xs, 0.5rem);
			}

			& figcaption {
				grid-area: 1 / 1;
				color: var(--norn-text-muted, light-dark(#4b5160, #a4abba));
				font-family: var(--norn-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
				font-size: var(--norn-font-size-s, 0.875rem);
			}

			& norn-copy-button {
				grid-area: 2 / 1;
				z-index: 1;
				justify-self: end;
				align-self: start;
				margin: var(--norn-space-2xs, 0.25rem);
			}

			& pre {
				box-sizing: border-box;
				grid-area: 2 / 1;
				margin: 0;
				overflow-x: auto;
				padding: var(--norn-space-m, 1.25rem);
				border-radius: var(--norn-ui-border-radius, 6px);
				background: var(--norn-surface-code, light-dark(hsl(40, 14%, 94%), #2c313b));
				color: var(--norn-code-text, var(--norn-text-base, light-dark(#16181d, #eceef3)));
				font-family: var(--norn-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
				font-size: var(--norn-font-size-s, 0.875rem);
				line-height: 1.5;
			}

			/* With the copy button showing, the code's scrolling area stops short of it. A transparent border is outside the scrolling area and under the background, so no code runs beneath the button. The button sits at the figure's end, and the code is always left to right, so a right-to-left page takes the border on the other side. */
			& figure:has(> norn-copy-button > button:not([hidden])) {
				--_chip: calc(2 * var(--norn-space-xs, 0.5rem) + var(--norn-ui-icon-s, 1em) + var(--norn-space-2xs, 0.25rem) + var(--norn-space-xs, 0.5rem));
			}

			& figure:has(> norn-copy-button > button:not([hidden])) > pre {
				border-inline-end: var(--_chip) solid transparent;
			}

			& figure:dir(rtl):has(> norn-copy-button > button:not([hidden])) > pre {
				border-inline-end: 0;
				border-inline-start: var(--_chip) solid transparent;
			}

			& code {
				padding: 0;
				background: none;
				font: inherit;
			}

			/* A frame with a header bar for the caption, for `@chrome="terminal"`. `:where()` keeps each rule as specific as the plain one it follows, so a container's rules still win. */
			& figure:where([data-chrome="terminal"]),
			& figure:where([data-chrome="terminal"]):has(> figcaption) {
				overflow: hidden;
				row-gap: 0;
				border-radius: var(--norn-ui-border-radius, 6px);
			}

			& figure:where([data-chrome="terminal"]) > figcaption {
				box-sizing: border-box;
				display: flex;
				align-items: center;
				block-size: 2rem;
				padding-inline: var(--norn-space-s, 0.75rem);
				background: var(--norn-surface-raised, light-dark(hsl(40, 14%, 96%), #242932));
			}

			& figure:where([data-chrome="terminal"]) > pre {
				border-radius: 0;
			}

			/* Colors for the ranges the script registers, set on `code` as Firefox ignores them on an ancestor. Plain text without Custom Highlight API support. */
			& code::highlight(tok-comment) {
				color: var(--norn-code-comment, light-dark(#566070, #9aa3b5));
			}

			& code::highlight(tok-string) {
				color: var(--norn-code-string, light-dark(#0b6b3a, #7ed6a1));
			}

			& code::highlight(tok-keyword) {
				color: var(--norn-code-keyword, light-dark(#6b2fc2, #c4a3ff));
			}

			& code::highlight(tok-function) {
				color: var(--norn-code-function, light-dark(#1b4fc4, #8fb0ff));
			}

			& code::highlight(tok-number) {
				color: var(--norn-code-number, light-dark(#9a4a00, #ffb36b));
			}

			& code::highlight(tok-flag) {
				color: var(--norn-code-flag, light-dark(#00687a, #5ccfe0));
			}

			& code::highlight(tok-punctuation) {
				color: var(--norn-code-punctuation, var(--norn-text-muted, light-dark(#4b5160, #a4abba)));
			}

			@media print {
				break-inside: avoid;

				& pre {
					white-space: pre-wrap;
				}
			}
		}
	}
@layer norn.components {
		norn-skip-link {
			display: block;

			& a {
				position: absolute;
				inset-block-start: -5rem;
				inset-inline-start: var(--norn-space-m, 1.25rem);
				z-index: 10;
				padding: var(--norn-space-xs, 0.5rem) var(--norn-space-s, 0.75rem);
				border-radius: var(--norn-ui-border-radius, 6px);
				background: var(--norn-surface-raised, light-dark(hsl(40, 14%, 96%), #242932));
				color: var(--norn-text-base, light-dark(#16181d, #eceef3));

				&:focus {
					inset-block-start: var(--norn-space-xs, 0.5rem);
				}
			}

			@media (forced-colors: active) {
				& a {
					border: 1px solid CanvasText;
				}
			}

			@media print {
				display: none;
			}
		}
	}
@layer norn.components {
		norn-header {
			display: block;
			container-type: inline-size;

			& > header {
				position: relative;
				display: flex;
				flex-wrap: wrap;
				align-items: center;
				justify-content: space-between;
				gap: var(--norn-space-xs, 0.5rem) var(--norn-space-m, 1.25rem);
				padding: var(--norn-space-s, 0.75rem) var(--norn-space-m, 1.25rem);
				background: var(--norn-surface-raised, light-dark(hsl(40, 14%, 96%), #242932));
			}

			& > header > a[rel="home"] {
				display: inline-flex;
				align-items: center;
				gap: var(--norn-space-xs, 0.5rem);
				color: var(--norn-text-base, light-dark(#16181d, #eceef3));
				font-family: var(--norn-font-heading, var(--norn-font-body, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif));
				font-size: var(--norn-font-size-l, 1.25rem);
				font-weight: 700;
				text-decoration: none;
			}

			& > header > [rel="home"] img {
				display: block;
				inline-size: auto;
				max-inline-size: 100%;
				block-size: var(--_logo, 2rem);
			}

			/* Wide, the details is only a wrapper: its summary is hidden, and the navigation sits in the row. */
			& > header > details {
				display: contents;

				&::details-content {
					content-visibility: visible;
					display: contents;
				}
			}

			& > header > details > summary {
				display: none;
			}

			& > header > details > nav {
				display: flex;
				flex-wrap: wrap;
				gap: var(--norn-space-2xs, 0.25rem) var(--norn-space-xs, 0.5rem);
				font-size: var(--norn-font-size-m, 1rem);
			}

			& > header > details > nav > [data-label] {
				position: absolute;
				inline-size: 1px;
				block-size: 1px;
				overflow: hidden;
				clip-path: inset(50%);
				white-space: nowrap;
			}

			& > header > details > nav > a {
				--_state: 0%;
				box-sizing: border-box;
				display: inline-flex;
				align-items: center;
				gap: var(--norn-space-2xs, 0.25rem);
				min-block-size: var(--norn-ui-control-height, 2.25rem);
				padding-inline: var(--norn-space-xs, 0.5rem);
				border-block-end: 2px solid transparent;
				border-radius: var(--norn-ui-radius-s, 4px);
				background-color: color-mix(in oklab, currentcolor var(--_state), transparent);
				color: var(--norn-text-muted, light-dark(#4b5160, #a4abba));
				text-decoration: none;

				&:hover {
					--_state: var(--norn-ui-state-hover, 8%);
					color: var(--norn-text-base, light-dark(#16181d, #eceef3));
				}

				&:active {
					--_state: var(--norn-ui-state-press, 12%);
				}

				&[aria-current] {
					border-block-end-color: var(--norn-text-accent, light-dark(oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 82%, black) min(l, 0.5) c h), oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 55%, white) max(l, 0.72) c h)));
					color: var(--norn-text-base, light-dark(#16181d, #eceef3));
				}
			}

			/* Narrow, the links fold into a control at the end of the brand's row. Open, they take the full width below it. */
			@container (max-width: 40rem) {
				& > header {
					row-gap: 0;
				}

				& > header > details:not([open])::details-content {
					content-visibility: hidden;
				}

				& > header > details::details-content {
					display: block;
					flex: 1 0 100%;
				}

				& > header > details > nav {
					flex-direction: column;
					padding-block-start: var(--norn-space-xs, 0.5rem);
					flex-wrap: nowrap;
					gap: 0;
				}

				& > header > details > nav > a {
					padding-inline: var(--norn-space-s, 0.75rem);
				}

				& > header > details > summary {
					--_state: 0%;
					box-sizing: border-box;
					display: flex;
					align-items: center;
					gap: var(--norn-space-s, 0.75rem);
					min-block-size: var(--norn-ui-control-height, 2.25rem);
					margin-inline-start: auto;
					padding-inline: var(--norn-space-s, 0.75rem);
					border-radius: var(--norn-ui-radius-s, 4px);
					background-color: color-mix(in oklab, currentcolor var(--_state), transparent);
					font-weight: 600;
					list-style: none;
					cursor: pointer;

					&::-webkit-details-marker {
						display: none;
					}

					&:hover {
						--_state: var(--norn-ui-state-hover, 8%);
					}

					&:active {
						--_state: var(--norn-ui-state-press, 12%);
					}

					&:focus-visible {
						outline-offset: calc(-1 * var(--norn-ui-focus-offset, 2px));
					}

					/* A chevron drawn with two borders, pointing down when closed and up when open. */
					&::after {
						box-sizing: border-box;
						content: "";
						flex: none;
						inline-size: 0.5em;
						block-size: 0.5em;
						border-block-end: 2px solid var(--norn-text-accent, light-dark(oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 82%, black) min(l, 0.5) c h), oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 55%, white) max(l, 0.72) c h)));
						border-inline-end: 2px solid var(--norn-text-accent, light-dark(oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 82%, black) min(l, 0.5) c h), oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 55%, white) max(l, 0.72) c h)));
						rotate: 45deg;
					}
				}

				& > header > details[open] > summary::after {
					rotate: 225deg;
				}
			}

			@media (pointer: coarse) {
				& > header > details > nav > a,
				& > header > details > summary {
					min-block-size: 2.75rem;
				}
			}

			@media (prefers-reduced-motion: no-preference) {
				& > header > details > nav > a,
				& > header > details > summary {
					transition: background-color var(--norn-ui-motion-duration, 150ms) var(--norn-ui-motion-easing, cubic-bezier(0.2, 0, 0, 1));
				}
			}

			/* A clear border would be drawn in the text color, so the links that aren't current take the page's. */
			@media (forced-colors: active) {
				& > header > details > nav > a {
					border-block-end-color: Canvas;
				}

				& > header > details > nav > a[aria-current] {
					border-block-end-color: Highlight;
				}

				& > header > details > summary::after {
					border-color: CanvasText;
				}
			}

			@media print {
				& > header > details {
					display: none;
				}
			}

			/* Last, so a header with no links drops the whole control. */
			& > header > details:not(:has(a)) {
				display: none;
			}
		}

		/* Without ::details-content a closed details can't show its links, so the control is always there. */
		@supports not selector(::details-content) {
			norn-header > header > details > summary {
				display: flex;
				align-items: center;
				min-block-size: var(--norn-ui-control-height, 2.25rem);
				margin-inline-start: auto;
				font-weight: 600;
				cursor: pointer;
			}
		}
	}
@layer norn.components {
		preview-overrides {
			display: block;
		}

		preview-overrides:not(:defined) [data-js] {
			display: none;
		}

		preview-overrides p {
			display: flex;
			flex-wrap: wrap;
			align-items: center;
			gap: var(--norn-space-xs) var(--norn-space-m);
			margin: 0;
			padding: var(--norn-space-xs) var(--norn-space-m);
			border-block-end: 1px solid var(--norn-ui-border-color);
			background: var(--norn-surface-raised);
			font-size: 0.9rem;
		}

		preview-overrides [hidden] {
			display: none;
		}

		preview-overrides button {
			padding: 0.15rem 0.6rem;
			border: 1px solid var(--norn-ui-border-color);
			border-radius: var(--norn-ui-border-radius);
			background: var(--norn-surface-base);
			color: var(--norn-text-base);
			font: inherit;
			cursor: pointer;
		}

		@media print {
			preview-overrides {
				display: none;
			}
		}
	}
@layer norn.components {
		preview-nav {
			display: block;
			font-size: 0.95rem;
		}

		preview-nav details details + details {
			margin-block-start: var(--norn-space-s);
		}

		/* The disclosure around the groups: a bar the width of the column, with the page below it. */
		preview-nav > nav > details > summary {
			padding: 0.5rem var(--norn-space-s);
			border: 1px solid var(--norn-ui-border-color);
			border-radius: var(--norn-ui-border-radius);
			background: var(--norn-surface-raised);
		}

		preview-nav > nav > details[open] > summary {
			margin-block-end: var(--norn-space-s);
		}

		preview-nav summary {
			padding-block: 0.25rem;
			font-weight: 700;
			cursor: pointer;
		}

		preview-nav ul {
			display: grid;
			gap: 0.1rem;
			margin-block: 0.25rem 0;
			padding: 0;
			list-style: none;
		}

		preview-nav a {
			display: block;
			padding: 0.2rem var(--norn-space-s);
			border-radius: var(--norn-ui-border-radius);
			color: var(--norn-text-accent);
			text-decoration: none;
		}

		preview-nav a:is(:hover, :focus-visible) {
			background: var(--norn-surface-raised);
		}

		preview-nav a[aria-current="page"] {
			background: var(--norn-surface-raised);
			color: var(--norn-text-base);
			font-weight: 700;
		}

		/* Wide, the groups are the sidebar: no bar, and the groups show whether the disclosure is open, with a script or without. Without ::details-content the bar stays and still works. */
		@media (width > 48rem) {
			@supports selector(::details-content) {
				preview-nav > nav > details > summary {
					display: none;
				}

				preview-nav > nav > details::details-content {
					content-visibility: visible;
				}
			}
		}

		/* A touch screen gets a 44px target. */
		@media (pointer: coarse) {
			preview-nav a {
				min-block-size: 2.75rem;
				align-content: center;
			}

			preview-nav summary {
				min-block-size: 2.75rem;
				align-content: center;
			}
		}

		@media print {
			preview-nav {
				display: none;
			}
		}
	}