@layer reset {
	html {
		text-size-adjust: 100%;
	}
}

/* Normalize block-level text elements */

h1,
h2,
h3,
h4,
h5,
h6 {
	display: block;
}

p,
figcaption {
	display: block;
}

/* Consolidated margin/padding resets for common elements */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
li,
figcaption {
	margin-block-start: 0;
	margin-block-end: 0;
	margin-inline-start: 0;
	margin-inline-end: 0;
	padding: 0;
}

/* Set core body defaults */

body,
html {
	min-height: 100dvh;
}

a {
	text-decoration-skip-ink: auto;
}

sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub {
	inset-block-end: -0.25em;
}

sup {
	inset-block-start: -0.5em;
}

ul,
ol,
dl {
	margin: 0;
	padding: 0;
	list-style-position: inside;
}

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

/* Make images easier to work with */
img,
picture {
	display: block;
	max-width: 100%;
	height: auto;
}

svg {
	fill: currentColor;
}


video,
iframe {
	display: block;
	max-inline-size: 100%;
	block-size: auto;
	border: none;
}

figcaption {
	contain: inline-size;
}

input,
select,
textarea,
button {
	font: inherit;
}

label {
	display: block;
}

input:not( :where([type="submit"],
		[type="checkbox"],
		[type="radio"],
		[type="button"],
		[type="reset"])) {
	inline-size: 100%;
}

@supports (field-sizing: content) {
	textarea {
		field-sizing: content;
	}
}

pre,
code,
kbd,
samp {
	font-family: ui-monospace, SFMono-Regular, monospace;
}

pre {
	white-space: pre-wrap;
}

[aria-disabled="true" i],
[disabled] {
	cursor: not-allowed;
}

[disabled],
label:has(input[disabled]) {
	opacity: 0.5;
}

hr {
	border-style: solid;
	border-width: 1px 0 0;
	color: inherit;
	overflow: visible;
}

:target {
	scroll-margin: 3rem;
}

table {
	caption-side: bottom;
	border-collapse: collapse;
}

table td,
table th {
	text-align: left;
}

table caption {
	font-size: 90%;
}

table td,
table th {
	word-break: normal;
	border: 1px solid gray;
	padding: 0.5rem;
}

[role="region"][aria-labelledby][tabindex] {
	overflow: auto;
}

[hidden] {
	display: none;
}

.screenreader-only:not(:focus):not(:active) {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

:focus-visible {
	outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
	@view-transition {
		navigation: auto;
	}

	html {
		interpolate-size: allow-keywords;

		&:focus-within {
			scroll-behavior: smooth;
		}
	}
}