@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-link-button {
			display: inline-flex;
			max-inline-size: 100%;

			& a[data-variant] {
				--_state: 0%;
				--_bg: transparent;
				--_border: transparent;
				box-sizing: border-box;
				display: inline-flex;
				align-items: center;
				gap: var(--norn-space-xs, 0.5rem);
				min-block-size: var(--norn-ui-control-height, 2.25rem);
				padding: var(--norn-space-2xs, 0.25rem) var(--norn-space-m, 1.25rem);
				border: 1px solid var(--_border);
				border-radius: var(--norn-ui-border-radius, 6px);
				background-color: color-mix(in oklab, currentcolor var(--_state), var(--_bg));
				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)));
				font-weight: 600;
				line-height: 1.3;
				overflow-wrap: anywhere;
				text-decoration: none;

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

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

			/* The surrounding text color, for a secondary or quiet button. The primary rule below keeps its own. */
			& a[data-tone="current"] {
				color: inherit;
			}

			/* A square at the control height: the icon alone shows, and the label is read but not shown. */
			& a[data-icon-only] {
				justify-content: center;
				inline-size: var(--norn-ui-control-height, 2.25rem);
				padding: 0;
			}

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

			& a[data-variant="primary"] {
				--_bg: var(--norn-ui-accent, #2346d4);
				color: var(--norn-text-on-accent, color(from var(--norn-ui-accent, #2346d4) xyz-d65 calc(0.95047 * clamp(0, calc((0.1791 - y) * 1000000), 1)) clamp(0, calc((0.1791 - y) * 1000000), 1) calc(1.08883 * clamp(0, calc((0.1791 - y) * 1000000), 1))));
			}

			& a[data-variant="secondary"] {
				--_border: 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)));
			}

			@media (pointer: coarse) {
				& a[data-variant] {
					min-block-size: 2.75rem;
				}

				& a[data-icon-only] {
					inline-size: 2.75rem;
				}
			}

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

			/* The primary button stays filled, since the browser would turn its fill into the page color. */
			@media (forced-colors: active) {
				& a[data-variant="primary"] {
					border-color: LinkText;
					background-color: LinkText;
					color: Canvas;
					forced-color-adjust: none;

					&:focus-visible {
						outline-color: CanvasText;
					}
				}

				& a[data-variant="secondary"] {
					border-color: LinkText;
					color: LinkText;
				}

				/* A clear border would be drawn in the text color, so the quiet button's takes the page's. */
				& a[data-variant="quiet"] {
					border-color: Canvas;
					color: LinkText;
				}
			}
		}
	}
@layer norn.components {
		norn-notice {
			--_color: var(--norn-status-info, light-dark(#1b4fc4, #8fb0ff));
			display: block;

			&:has(> [data-severity="success"]) {
				--_color: var(--norn-status-success, light-dark(#0b6b3a, #7ed6a1));
			}

			&:has(> [data-severity="warning"]) {
				--_color: var(--norn-status-warning, light-dark(#9a4a00, #ffb36b));
			}

			&:has(> [data-severity="danger"]) {
				--_color: var(--norn-status-danger, light-dark(#b42318, #ff8a80));
			}

			/* A tint and a bar, as in norn-callout. */
			& > div {
				display: flex;
				flex-wrap: wrap;
				align-items: center;
				gap: var(--norn-space-s, 0.75rem) var(--norn-space-m, 1.25rem);
				overflow-wrap: anywhere;
				padding: var(--norn-space-s, 0.75rem) var(--norn-space-m, 1.25rem);
				border-inline-start: 3px solid var(--_color);
				border-start-end-radius: var(--norn-ui-border-radius, 6px);
				border-end-end-radius: var(--norn-ui-border-radius, 6px);
				background: color-mix(in oklab, var(--_color) 8%, var(--norn-surface-base, light-dark(#ffffff, #101216)));
			}

			& > div > norn-icon {
				flex: none;
				align-self: start;
				margin-block-start: calc((1lh - var(--norn-ui-icon-m, 1.25rem)) / 2);
				color: var(--_color);
			}

			& > div > div:first-of-type {
				flex: 1 1 16rem;
				min-inline-size: 0;
			}

			& > div > div:first-of-type > :is(p, ul, ol) {
				margin: 0;
			}

			& > div > div:last-child:not(:has(*)) {
				display: none;
			}

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

			@media (forced-colors: active) {
				& > div {
					border-inline-start-color: CanvasText;
				}
			}
		}
	}