@layer norn.components {
		norn-simple-table {
			display: block;
			min-inline-size: 0;

			/* Shadows at the edges that have more to scroll to: the first two are the page's color and scroll with the content, so they cover the shadows underneath until the content has moved. */
			& > div:first-of-type {
				--_bg: var(--norn-surface-base, light-dark(#ffffff, #101216));
				--_shadow: color-mix(in oklab, var(--norn-text-base, light-dark(#16181d, #eceef3)) 18%, transparent);
				overflow-x: auto;
				background:
					linear-gradient(to right, var(--_bg) 30%, transparent) local 0 0 / 2rem 100% no-repeat,
					linear-gradient(to left, var(--_bg) 30%, transparent) local 100% 0 / 2rem 100% no-repeat,
					radial-gradient(farthest-side at 0 50%, var(--_shadow), transparent) scroll 0 0 / 0.75rem 100% no-repeat,
					radial-gradient(farthest-side at 100% 50%, var(--_shadow), transparent) scroll 100% 0 / 0.75rem 100% no-repeat;
			}

			& > div > table {
				min-inline-size: 100%;
				border-collapse: collapse;
				border-block-end: 1px solid var(--norn-ui-border-color, light-dark(#d3d8e2, #2d323e));
			}

			& > div > table > caption {
				padding-block-end: var(--norn-space-xs, 0.5rem);
				color: var(--norn-text-muted, light-dark(#4b5160, #a4abba));
				text-align: start;
			}

			& > div > table :is(th, td) {
				min-inline-size: 7rem;
				padding: var(--norn-space-xs, 0.5rem) var(--norn-space-s, 0.75rem);
				border-block-end: 1px solid var(--norn-ui-border-color, light-dark(#d3d8e2, #2d323e));
				text-align: start;
				vertical-align: top;
			}

			/* The last column is usually the one with sentences, so it keeps room to wrap into rather than a column of words. */
			& > div > table :is(th, td):last-child {
				min-inline-size: 10rem;
			}

			/* Wrap between words only: a token split across lines reads as two. */
			& > div > table :is(th, td, code) {
				overflow-wrap: normal;
				word-break: normal;
			}

			& > div > table code {
				white-space: nowrap;
			}

			/* An even body row takes the raised surface, for a long table read across. */
			& > div[data-striped] > table > tbody > tr:nth-child(even) {
				background-color: var(--norn-surface-raised, light-dark(hsl(40, 14%, 96%), #242932));
			}

			/* A numeric column, named by its position, lines up at the end with figures of one width. */
			& > div[data-numeric~="1"] > table :is(th, td):nth-child(1),
			& > div[data-numeric~="2"] > table :is(th, td):nth-child(2),
			& > div[data-numeric~="3"] > table :is(th, td):nth-child(3),
			& > div[data-numeric~="4"] > table :is(th, td):nth-child(4),
			& > div[data-numeric~="5"] > table :is(th, td):nth-child(5),
			& > div[data-numeric~="6"] > table :is(th, td):nth-child(6),
			& > div[data-numeric~="7"] > table :is(th, td):nth-child(7),
			& > div[data-numeric~="8"] > table :is(th, td):nth-child(8) {
				font-variant-numeric: tabular-nums;
				text-align: end;
			}

			& > [data-note] {
				margin: 0;
				padding-block-start: var(--norn-space-xs, 0.5rem);
				color: var(--norn-text-muted, light-dark(#4b5160, #a4abba));
				font-size: var(--norn-font-size-s, 0.875rem);
			}

			& > [data-note]:empty {
				display: none;
			}

			@media print {
				& > div:first-of-type {
					overflow: visible;
					background: none;
				}
			}
		}
	}
@layer norn.components {
		preview-tokens {
			display: grid;
			gap: var(--norn-space-s);
		}

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

		preview-tokens > p {
			display: flex;
			flex-wrap: wrap;
			align-items: center;
			gap: var(--norn-space-s) var(--norn-space-m);
			margin: 0;
		}

		preview-tokens button {
			padding: 0.25rem 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;
		}

		preview-tokens input[type="text"] {
			inline-size: 100%;
			min-inline-size: 10rem;
			padding: 0.2rem 0.5rem;
			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;
			font-family: var(--norn-font-mono);
			font-size: 0.85rem;
		}

		preview-tokens [data-pair] {
			display: flex;
			flex-wrap: wrap;
			align-items: center;
			gap: var(--norn-space-xs) var(--norn-space-s);
		}

		preview-tokens [data-pair] label {
			display: inline-flex;
			align-items: center;
			gap: 0.35rem;
			font-size: 0.85rem;
		}

		preview-tokens input[type="color"] {
			inline-size: 2.5rem;
			block-size: 1.75rem;
			padding: 0;
		}

		preview-tokens [data-pair] button {
			padding: 0.15rem 0.6rem;
			font-size: 0.85rem;
		}

		preview-tokens button:disabled {
			opacity: 0.5;
			cursor: default;
		}

		@media print {
			preview-tokens [data-js] {
				display: none;
			}
		}
	}
@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;
			}
		}
	}