/**
 * Styles for Remarkdown documentation pages.
 */
@layer remarkdown {
	/*! Remarkdown 4.0.0-beta.2 (MIT) %h */
	/* $default-styles: base-reset, hn-reset, hn-prefix, ul-dash, ol-decimal, quote-mark, em-reset, em-star, strong-reset, strong-star, a-bracket, code-tick, pre-indent, hr-star */
	@scope (.remarkdown) to ([data-remarkdown]) {
		:scope {
			--rmd-base-font: Menlo, Consolas, DejaVu Sans Mono, ui-monospace, monospace;
			--rmd-code-font: inherit;
			--rmd-line-height: 1.5;
			--rmd-ul-indent: 3ch;
			--rmd-ol-indent: 3ch;
			--rmd-hn-prefix: "#";
			--rmd-h1-line: "========================================";
			--rmd-h2-line: "----------------------------------------";
			--rmd-ul-dash: "-";
			--rmd-ul-star: "*";
			--rmd-ul-plus: "+";
			--rmd-ol-mark: ".";
			--rmd-pre-ticks: "```";
			--rmd-pre-tilde: "~~~";
			--rmd-pre-tilde-line: "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
			--rmd-quote-mark: ">\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a>\a";
			--rmd-quote-rtl: "<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a<\a";
			--rmd-hr-stars: "* * * *";
			--rmd-hr-dashes: "-------";
			--rmd-table-vline: "|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a|\a";
			--rmd-table-hline: "----------------------------------------";
			font-family: var(--rmd-base-font);
			line-height: var(--rmd-line-height);
		}
		:is(pre, code, kbd, samp) {
			font-family: var(--rmd-code-font);
		}
		:any-link {
			text-decoration-inset: 1ch;
		}
		:any-link::before {
			content: "["/"";
		}
		:any-link::after {
			content: "]"/"";
		}
		:scope.a-showurl :any-link {
			text-decoration-inset: 0;
		}
		:scope.a-showurl :any-link::before {
			content: "["/"";
		}
		:scope.a-showurl :any-link::after {
			content: "](" attr(href) ")"/"";
			word-break: break-all;
		}
		em {
			font-style: normal;
			font-weight: normal;
		}
		em::before,
		em::after {
			content: "*"/"";
		}
		:scope.em-underscore em::before,
		:scope.em-underscore em::after {
			content: "_"/"";
		}
		strong {
			font-style: normal;
			font-weight: normal;
		}
		strong::before,
		strong::after {
			content: "**"/"";
		}
		:scope.strong-underscore strong::before,
		:scope.strong-underscore strong::after {
			content: "__"/"";
		}
		code::before,
		code::after {
			content: "`"/"";
		}
		pre code::before,
		pre code::after {
			content: none;
		}
		:scope.del-tilde del {
			text-decoration-inset: 2.2ch;
			text-decoration-thickness: round(up, 0.08em, 0.5px);
		}
		:scope.del-tilde del::before,
		:scope.del-tilde del::after {
			content: "~~"/"";
		}
		h1 {
			font-size: inherit;
			font-weight: inherit;
			margin-block: 1.5lh 1lh;
		}
		h2 {
			font-size: inherit;
			font-weight: inherit;
			margin-block: 1.5lh 1lh;
		}
		:is(h3, h4, h5, h6) {
			font-size: inherit;
			font-weight: inherit;
			margin-block: 1lh;
		}
		h1::before {
			content: var(--rmd-hn-prefix) " "/"";
		}
		h2::before {
			content: var(--rmd-hn-prefix) var(--rmd-hn-prefix) " "/"";
		}
		h3::before {
			content: var(--rmd-hn-prefix) var(--rmd-hn-prefix) var(--rmd-hn-prefix) " "/"";
		}
		h4::before {
			content: var(--rmd-hn-prefix) var(--rmd-hn-prefix) var(--rmd-hn-prefix)
				var(--rmd-hn-prefix) " "/"";
		}
		h5::before {
			content: var(--rmd-hn-prefix) var(--rmd-hn-prefix) var(--rmd-hn-prefix)
				var(--rmd-hn-prefix) var(--rmd-hn-prefix) " "/"";
		}
		h6::before {
			content: var(--rmd-hn-prefix) var(--rmd-hn-prefix) var(--rmd-hn-prefix)
				var(--rmd-hn-prefix) var(--rmd-hn-prefix) var(--rmd-hn-prefix) " "/"";
		}
		:scope.h1-line h1 {
			position: relative;
			width: fit-content;
			padding-bottom: 1lh;
		}
		:scope.h1-line h1::before {
			content: none;
		}
		:scope.h1-line h1::after {
			content: var(--rmd-h1-line) var(--rmd-h1-line) var(--rmd-h1-line) var(--rmd-h1-line)/"";
			position: absolute;
			bottom: 0;
			inset-inline: 0;
			height: 1lh;
			width: 100%;
			overflow: hidden;
			white-space: nowrap;
			pointer-events: none;
		}
		:scope.h2-line h2 {
			position: relative;
			width: fit-content;
			padding-bottom: 1lh;
		}
		:scope.h2-line h2::before {
			content: none;
		}
		:scope.h2-line h2::after {
			content: var(--rmd-h2-line) var(--rmd-h2-line) var(--rmd-h2-line) var(--rmd-h2-line)/"";
			position: absolute;
			bottom: 0;
			inset-inline: 0;
			height: 1lh;
			width: 100%;
			overflow: hidden;
			white-space: nowrap;
			pointer-events: none;
		}
		p {
			margin-block: 1lh;
		}
		figure {
			margin-block: 1lh;
			margin-inline: 0;
		}
		ul {
			margin-block: 1lh;
			margin-inline: 0;
			padding-inline-start: var(--rmd-ul-indent);
			padding-inline-end: 0;
			list-style-type: none;
			--rmd-ul-marker: var(--rmd-ul-dash);
		}
		li ul {
			margin-block: 0;
		}
		ul > li::before {
			content: var(--rmd-ul-marker)/"";
			float: inline-start;
			width: 1ch;
			margin-inline-start: min(var(--rmd-ul-indent) * -1, 0ch);
			margin-inline-end: 1ch;
		}
		:scope.ul-star ul {
			--rmd-ul-marker: var(--rmd-ul-star);
		}
		:scope.ul-plus ul {
			--rmd-ul-marker: var(--rmd-ul-plus);
		}
		ol {
			margin-block: 1lh;
			margin-inline: 0;
			padding-inline-start: var(--rmd-ol-indent);
			padding-inline-end: 0;
			counter-reset: rmd-ol;
			list-style-type: none;
		}
		li ol {
			margin-block: 0;
		}
		ol > li {
			counter-increment: rmd-ol;
		}
		ol > li::before {
			float: inline-start;
			min-width: 2ch;
			margin-inline-start: min(var(--rmd-ol-indent) * -1, 0ch);
			margin-inline-end: 1ch;
			content: counter(rmd-ol) var(--rmd-ol-mark)/"";
		}
		:scope.ol-alpha ol > li::before {
			content: counter(rmd-ol, lower-alpha) var(--rmd-ol-mark)/"";
		}
		:scope.ol-zero ol > li::before {
			content: "0" var(--rmd-ol-mark)/"";
		}
		pre {
			margin-block: 1lh;
			white-space: pre-wrap;
			tab-size: 4;
			margin-inline: 4ch 0;
		}
		:scope.pre-tick pre,
		:scope.pre-tilde pre,
		:scope.pre-tilde-full pre {
			margin-inline: 0;
		}
		:scope.pre-tick pre::before,
		:scope.pre-tick pre::after,
		:scope.pre-tilde pre::before,
		:scope.pre-tilde pre::after,
		:scope.pre-tilde-full pre::before,
		:scope.pre-tilde-full pre::after {
			content: none;
			display: block;
			width: 100%;
			height: 1lh;
			overflow: hidden;
			white-space: nowrap;
			pointer-events: none;
		}
		:scope.pre-tick pre::before,
		:scope.pre-tick pre::after {
			content: var(--rmd-pre-ticks)/"";
			position: relative;
			top: 0.25em;
		}
		:scope.pre-tilde pre::before,
		:scope.pre-tilde pre::after {
			content: var(--rmd-pre-tilde)/"";
		}
		:scope.pre-tilde-full pre::before,
		:scope.pre-tilde-full pre::after {
			content: var(--rmd-pre-tilde-line) var(--rmd-pre-tilde-line) var(--rmd-pre-tilde-line)
				var(--rmd-pre-tilde-line)/"";
		}
		blockquote {
			margin-block: 1lh;
			margin-inline: 0;
			padding-inline: 2ch;
			position: relative;
		}
		blockquote:dir(rtl) {
			--rmd-quote-mark: var(--rmd-quote-rtl);
		}
		blockquote::before {
			content: var(--rmd-quote-mark) var(--rmd-quote-mark) var(--rmd-quote-mark)
				var(--rmd-quote-mark)/"";
			position: absolute;
			inset-block: 0;
			inset-inline-start: 0ch;
			width: 1ch;
			overflow: hidden;
			white-space: pre;
			cursor: default;
		}
		hr {
			height: auto;
			margin-block: 1lh;
			margin-inline: 0;
			line-height: inherit;
			text-align: start;
			border: none;
			color: inherit;
		}
		:scope.hr-center hr {
			text-align: center;
		}
		hr::before {
			content: var(--rmd-hr-stars)/"";
			display: block;
		}
		:scope.hr-dash hr::before {
			content: var(--rmd-hr-dashes)/"";
			display: block;
		}
		:scope.table-reset table {
			margin-block: 1lh;
			border-collapse: collapse;
		}
		:scope.table-reset tr > * {
			padding-block: 0;
			padding-inline: 1ch;
			border: none;
			vertical-align: top;
			font-weight: inherit;
			text-align: match-parent;
		}
		:scope.table-reset tr > :first-child {
			padding-inline-start: 0;
		}
		:scope.table-reset tr > :last-child {
			padding-inline-end: 0;
		}
		:scope.table-border table,
		:scope.table-border-full table {
			--inset-start: 1ch;
			--inset-end: 1ch;
			margin-block: 1lh;
			border-collapse: collapse;
		}
		:scope.table-border tr > *,
		:scope.table-border-full tr > * {
			position: relative;
			padding-block: 0;
			padding-inline-start: var(--inset-start);
			padding-inline-end: var(--inset-end);
			border: none;
			vertical-align: top;
			font-weight: inherit;
			text-align: match-parent;
		}
		:scope.table-border tr > :first-child {
			--inset-start: 0ch;
		}
		:scope.table-border tr > :last-child {
			--inset-end: 0ch;
		}
		:scope.table-border :is(thead th, thead td, th[scope="col"]),
		:scope.table-border-full :is(thead th, thead td, th[scope="col"]) {
			--inset-total: calc(var(--inset-start) + var(--inset-end));
			padding-bottom: 1lh;
		}
		:scope.table-border :is(thead th, thead td, th[scope="col"])::after,
		:scope.table-border-full :is(thead th, thead td, th[scope="col"])::after {
			content: var(--rmd-table-hline) var(--rmd-table-hline)/"";
			position: absolute;
			bottom: 0;
			inset-inline-start: var(--inset-start);
			width: calc(100% - var(--inset-total));
			max-width: 100%;
			height: 1lh;
			overflow: hidden;
			white-space: nowrap;
			pointer-events: none;
		}
		:scope.table-border tr > *::before,
		:scope.table-border-full tr > *::before {
			content: none;
			position: absolute;
			inset-block: 0;
			inset-inline-start: 0;
			width: 1ch;
			overflow: hidden;
			white-space: pre;
		}
		:scope.table-border table {
			--inset-start: 2ch;
		}
		:scope.table-border tr > :not(:first-child)::before {
			content: var(--rmd-table-vline) var(--rmd-table-vline)/"";
		}
		:scope.table-border-full table {
			--inset-start: 2ch;
		}
		:scope.table-border-full tr {
			position: relative;
		}
		:scope.table-border-full tr::after {
			content: var(--rmd-table-vline) var(--rmd-table-vline)/"";
			position: absolute;
			inset-block: 0;
			inset-inline-end: 0;
			width: 1ch;
			overflow: hidden;
			white-space: pre;
		}
		:scope.table-border-full tr > :last-child {
			--inset-end: 2ch;
		}
		:scope.table-border-full tr > *::before {
			content: var(--rmd-table-vline) var(--rmd-table-vline)/"";
		}
	}
}
/* Demo layout and page styles */
:root {
	--text-color: hsl(0 0% 12%);
	--link-color: hsl(346 86% 54%);
	--code-color: hsl(0 60% 31%);
	--pseudo-color: hsl(220 70% 35% / 0.55);
	--bg-color: hsl(0 0% 100%);
	--bg-alt-color: hsl(0 0% 93%);
	--bg-border-color: hsl(0 0% 82%);
	--demo-text-color: hsl(180 70% 26%);
	--demo-bg-color: hsl(200 60% 94%);
	scroll-padding-block: 1.75lh;
	font-size: 112.5%;
	color: var(--text-color);
	background-color: var(--bg-color);
}
@media (width >= 56em) {
	:root {
		background-color: var(--bg-alt-color);
	}
}

body {
	--body-padding-inline: 2rem;
	max-width: 66ch;
	margin-block: 0;
	margin-inline: auto;
	padding-block: 2rem 3rem;
	padding-inline: var(--body-padding-inline);
}
@media (width >= 56em) {
	body {
		--body-padding-inline: 4.5rem;
		margin-block: 2rem;
		padding-block: 2.5rem 3.5rem;
		border: 3px solid var(--bg-border-color);
		background-color: var(--bg-color);
		box-shadow: 1ch 1ch 0 -3px var(--bg-border-color);
	}
}

main > :first-child {
	margin-top: 0;
}
main > :last-child {
	margin-bottom: 0;
}

@scope (.remarkdown) to ([data-remarkdown]) {
	/* Make the Markdown-like markers look nice */
	::before,
	::after {
		color: var(--pseudo-color);
	}
	a {
		color: var(--link-color);
		text-decoration-line: none;
		text-decoration-thickness: 1.5px;
		text-underline-offset: 0.25em;
	}
	a:hover {
		text-decoration-line: underline;
	}
	a:focus-visible {
		color: white;
		background-color: var(--link-color);
		outline: solid 2px var(--link-color);
	}
	a:focus-visible::before,
	a:focus-visible::after {
		color: inherit;
	}
	code {
		color: var(--code-color);
	}
	pre {
		tab-size: 2;
		white-space: pre-wrap;
		color: var(--code-color);
	}
	@media (width < 40em) {
		pre {
			margin-inline-start: 0;
		}
	}
	table {
		margin-block: 2.5em;
		font-size: 95%;
	}
}
/* Nav bar */
nav {
	display: flex;
	flex-direction: column;
	gap: 1ch;
	margin-block: 0 2lh;
	text-align: center;
}
nav > :first-child {
	font-style: italic;
}
nav > br {
	display: none;
}
@media (width >= 40em) {
	nav {
		flex-direction: row;
		gap: 2ch;
		text-align: right;
	}
	nav > :first-child {
		margin-inline-end: auto;
	}
}

/* Styles page */
#styles figure {
	overflow-x: auto;
	margin-block: 1lh;
	margin-inline: calc(var(--body-padding-inline) * -1);
	padding-block: 0.5lh;
	padding-inline: var(--body-padding-inline);
	border-bottom: solid 3px hsl(from currentColor h 80% 20%/0.1);
	color: var(--demo-text-color);
	background-color: var(--demo-bg-color);
}

#styles-list tr > :first-child {
	white-space: nowrap;
}
@media (width < 40em) {
	#styles-list tr > :last-child {
		display: none;
	}
}

details {
	border: solid 1px var(--bg-border-color);
	padding-inline: 2ch;
}
details summary {
	position: relative;
	margin-inline: -2ch;
	padding: 0.5lh 2ch;
	cursor: pointer;
}
details summary + * {
	margin-top: 0.5lh;
}
