@layer reset.variables {
	:root {
		--font-sans: system-ui, sans-serif, var(--font-emoji);
		--font-serif: stixtwotext, georgia, serif, var(--font-emoji);
		--font-mono: monospace, m, var(--font-emoji);
		--font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
		--back: light-dark(oklch(98% 0 0deg), oklch(21% 0 0deg));
		--soft: light-dark(white, black);
		--edge: light-dark(oklch(85% 0 0deg), oklch(40% 0 0deg));
		--mute: light-dark(oklch(50% 0 0deg), oklch(77% 0 0deg));
		--text: light-dark(oklch(24% 0 0deg), oklch(95% 0 0deg));
		--bold: light-dark(black, white);
		--shadow: 0 2px 4px -1px #0002;
	}
}

@layer reset.fix {
	* {
		box-sizing: border-box;
	}

	b,
	strong {
		font-weight: 700;
	}

	code,
	pre {
		font-family: var(--font-mono);
	}

	button,
	label,
	summary,
	[type="button"],
	[type="submit"] {
		cursor: pointer;
	}

	button,
	input,
	select {
		font: inherit;
		color: currentcolor;
	}
}

@layer reset.normalize {
	html {
		text-size-adjust: none;
		line-height: 1.5;
		tab-size: 4;
		scrollbar-gutter: stable;
	}

	:focus-visible {
		outline-offset: 0.2em;
		outline: 0.2em solid;
	}

	img,
	svg {
		display: block;
		max-inline-size: 100%;
		max-block-size: 100%;
		block-size: auto;
	}

	table {
		inline-size: 100%;
		background-color: Canvas;
		border-collapse: collapse;
	}

	td,
	th {
		padding: 0.25em;
		border: 1px solid;
	}

	th {
		vertical-align: bottom;
	}

	td {
		vertical-align: top;
	}
}

@layer reset.prose {
	html {
		font-optical-sizing: auto;
		text-rendering: optimizelegibility;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}

	body {
		font-kerning: normal;
		font-variant-ligatures: common-ligatures;

		/* font-size-adjust: ex-height 0.523; */
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		margin-block: 2rem 1rem;
		line-height: normal;
		text-wrap: balance;
		break-after: avoid;

		:not(&):first-child {
			margin-block-start: 0;
		}
	}

	:last-child {
		margin-block-end: 0;
	}

	[id] {
		scroll-margin-block: 1em;
	}

	a,
	abbr[title] {
		text-underline-position: from-font;
		text-decoration-thickness: from-font;
	}

	blockquote,
	li,
	p {
		text-wrap: pretty;
		hanging-punctuation: first allow-end;
	}

	blockquote,
	pre:has(> code) {
		margin-inline: 0;
		padding: 1em;
		line-height: normal;
		border: 1px solid;
		background-color: Canvas;
	}

	blockquote {
		font-style: italic;
	}

	ol,
	ul {
		padding-inline-start: 3ch;
	}

	li {
		padding-block: 0.25em;
		line-height: normal;
	}

	li:has(ol, ul) {
		padding-block-end: 0;

		:is(ol, ul) {
			padding-block-start: 0.25em;
		}
	}

	pre {
		overflow-inline: auto;
	}

	hr {
		margin-block: 3em;
		border: 0;
		border-block-start: 1px solid;
	}
}

/* utilities */

.list-none {
	padding: 0;
	list-style-type: none;
}

.icon-svg {
	--size: 1em;
	display: inline-block;
	width: var(--size);
	height: var(--size);
	margin-block-start: calc(0.5lh - var(--size) / 2);
	vertical-align: top;
}

.icon-tabler,
tabler-icon {
	display: inline-block;
	width: 1.5em;
	height: 1.5em;
	vertical-align: -0.375em;
	color: currentColor;

	svg {
		object-fit: contain;
		max-width: 100%;
		max-height: 100%;
		stroke-width: 2;
	}
}

.icon-fw {
	display: inline-block;
	width: 3ch;
	text-align: center;
}

[hidden],
.hidden {
	display: none;
}
