:root {
	interpolate-size: allow-keywords;
}

html,
body {
	font-family:
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		Oxygen,
		Ubuntu,
		Cantarell,
		"Open Sans",
		"Helvetica Neue",
		sans-serif;
	width: 100%;
	padding: 0;
	margin: 0;
	color-scheme: light;
}


#main-content-link {
	position: absolute;
	top: 0;
	left: 0;
	padding: 1em;
	background: white;
	opacity: 0;

	&:focus-visible {
		display: block;
		z-index: 1000;
		opacity: 1;
	}
}

main {
	scroll-margin-top: var(--topbar-height);
	margin-bottom: max(var(--navigation-mobile-height), var(--topbar-height));
	padding-left: 1em;
	padding-right: 1em;
}

h1, h2, h3, h4, h5, h6 {
	text-wrap: balance;
}

.container {
	width: calc(96% * 1vw);
	max-width: 65ch;
	min-width: min-content;
	border: var(--container-border);
	border-radius: var(--container-rounding);
	padding: 1.5rem 1.25rem;
	margin: 2rem auto 0;   /* order of margins is important */
	margin-top: 2rem;
	position: relative;

	
	h1, h2, h3, h4, h5, h6 {
		margin-top: 0;
	}
	
	@media screen and (max-width: 650px) {
		border: unset;
		padding-left: 0.5rem;
		padding-right: 0.5rem;
		padding-top: 0.5rem;
		margin-top: 0;
	}
}

.button-list {
	display: flex;
	gap: var(--button-gap);
	justify-content: end;
	
	@media screen and (max-width: 650px) {
		justify-content: space-evenly;

		> * {
			flex: 1;
		}
	}
}

button, .button {
	border-width: 0;
	font-size: inherit;

	color: var(--component-text-color);
	background: var(--component-background);
	cursor: pointer;
	padding-block: var(--button-padding);
	padding-inline: calc(2 * var(--button-padding));;
	text-decoration: none;
	border-radius: 0.5rem;
	text-align: center;

	&:hover {
		background: color-mix(in srgb-linear, var(--component-background) 100%, black 20%);
	}

	&:active {
		background: color-mix(in srgb-linear, var(--component-background) 100%, black 50%);
	}
}
