/* --- Reset and normalisation --- */

/* Better focus-visible for keyboard accessibility */
*:focus-visible {
	outline-color: currentColor;
	outline-style: solid;
	outline-offset: .125rem;
	outline-width: .125rem;
}

/* Box-sizing reset for easier layouts */
*,
::before,
::after {
	box-sizing: inherit;
}

html {
	box-sizing: border-box; /* Define base box-sizing */
	-moz-tab-size: 4; /* Default tab size and line-height */
	tab-size: 4;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%; /* Prevent some devices from zooming in automatically, for ex. when rotating them */
}

/* Make sure the body fills up the screen, reset default page margins */
body {
	min-height: 100vh;
	margin: 0;
  padding: 0;
}

/* Basic defaults for titles */
h1,
h2,
h3,
h4 {
	font-weight: normal;
	overflow-wrap: break-word;
	hyphens: auto;
}

/* Ensure that embedded content doesn't overflow its container  */
audio,
iframe,
img,
picture,
svg,
video {
	max-width: 100%;
}

/* Make images easier to deal with */
img,
picture {
	height: auto;
	max-width: 100%;
	vertical-align: top;
}

/* Reset hr styling */
hr {
	height: 0;
	border: 0.075rem solid currentColor;
	color: inherit;
}

/* Remove list style from menus */
menu {
	list-style: none;
	padding-inline-start: 0;
}

/* Keep list markers inside the list block */
ul,
ol {
	list-style: inside;
}

/* Monospace items defaults */
code,
kbd,
samp,
pre {
	font-family: monospace;
	font-size: 1em;
}

/* Normalise small font size */
small {
	font-size: 80%;
}

/* Prevent 'sub' and 'sup' from affecting line height */
sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

/* better table styling */
table {
	border-collapse: collapse; /* Remove space between cells in tables */
	text-indent: 0; /* Remove unwanted spacing */
	border-color: inherit;
}

/* Add default styling to interactive elements */
button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
	line-height: 1.5rem;
	margin: 0;
}

button,
select {
	text-transform: none;
}

/* Allows styling in some iOS / Safari */
button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
}

/* Make textareas easier to use */
textarea {
	resize: vertical;
}

textarea:not([rows]) {
	min-height: 6rem;
}

/* Remove red halo on some Firefox */
:-moz-ui-invalid {
	box-shadow: none;
}

legend {
	padding: 0;
}

progress {
	vertical-align: baseline;
}

/* Correct the cursor style of increment and decrement buttons in Safari */
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
	height: auto;
}

[type="search"] {
	-webkit-appearance: textfield;
}

/* Removes some default padding and buttons */
::-webkit-search-decoration,
::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

::-webkit-file-upload-button {
	-webkit-appearance: button;
	font: inherit;
}

/* Add the correct display in Chrome and Safari */
summary {
	display: list-item;
}

/* Reset some margins */
figure {
	margin-inline: 0;
}

/* Make forms easier to work with */
form {
  display: block;
}

/* Prevent children from stretching fieldsets */
fieldset {
	min-width: 0;
	margin: 0;
}

/* Form defaults */
input,
label,
select,
textarea {
  display: block;
}

input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
}

input:last-child,
select:last-child,
textarea:last-child {
  margin-block-end: 0;
}

audio,
video,
input:not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="button"]):not([type="reset"]):not([type="submit"]),
select,
meter,
progress,
textarea {
  width: 100%;
  max-width: 100%;
}

/* Anchors should have extra scroll margin */
:target {
  scroll-margin-block: 1rem;
}