html {
	color-scheme: dark light;

	font-size: 62.5%; /* 10px */
	hanging-punctuation: first last;

	/* prevent font size inflation */
	-moz-text-size-adjust: none;
	-webkit-text-size-adjust: none;
	text-size-adjust: none;
}
body {
	margin: 0;
	min-height: 100svh;
	line-height: 1.5;
}

/* Prettier wrapping */
h1,
h2,
h3,
h4 {
	text-wrap: balance;
}

/* Remove default margin in favour of better control in authored CSS */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
	margin-block-end: 0;
}

/* Easy paragraph reading  */
p,
li,
figcaption {
	max-width: 65ch;
	text-wrap: balance; /* fallback */
	text-wrap: pretty;
}

/* Responsive images/videos */
img {
	max-width: 100%;
	height: auto;
	shape-margin: 0.75rem;
	background-repeat: no-repeat;
	background-size: cover;

	vertical-align: middle;
	font-style: italic;
}
picture,
svg,
video {
	display: block;
	max-width: 100%;
}

/* Inputs, buttons and link defaults */
input,
button,
textarea,
select {
	font-family: inherit;
	font-size: inherit;
}
a:not([class]) {
	text-decoration-skip-ink: auto;
}

button,
a.__button {
	display: inline-block;

	background-color: transparent;
	padding-inline: 2rem;
	padding-block: 1.4rem;
	border: 2px solid white;
	border-radius: 10px;

	text-decoration: none;
}
button.__link {
	border: 0;
	padding: 0;
	background-color: inherit;

	line-height: inherit;
	cursor: pointer;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
	list-style: none;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
	min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
	scroll-margin-block: 5ex;
}

/* scroll defaults */
@media (prefers-reduced-motion: no-preference) {
	:has(:target) {
		scroll-behavior: smooth;
		scroll-padding-top: 2.5rem;
	}
}
