:root {
	--light: hsl(0, 0%, 100%);
	--dark: hsl(0, 0%, 0%);

	--color-accent: hsl(348, 0%, 47%);
	--color-accent-light: hsla(348, 0%, 47%, 0.696);
	--color-accent-lighter: hsla(348, 0%, 47%, 0.105);

	--color-background: var(--light);
	--color-foreground: var(--dark);

	--width-heavy: 0.5rem;
	--width-medium: 0.25rem;
	--width-light: 0.125rem;

	--button-color-background: var(--light);

	--link-color: hsl(240, 65%, 47%);
	--link-color--active: hsl(0, 65%, 47%);
	--link-color--visited: hsl(300, 65%, 47%);
}

* {
	box-sizing: border-box;
}

body {
	font-family: Georgia,
		Times,
		Times New Roman,
		serif;
	margin: 0;
	padding: 0;
	background-color: var(--color-background);
	color: var(--color-foreground);
}

main {
	width: clamp(20ch, 100%, 65ch);
	margin-inline: auto;
	margin-block: 4rem;
	padding-inline: 1rem;
}

h1,
p {
	margin: 0;
	padding: 0;
}

p {
	margin-block-end: 1rem;
}

h1 {
	margin-block-end: var(--width-heavy);
	padding-block-end: var(--width-heavy);
	font-size: 2rem;
	font-weight: bold;
}

a {
	color: var(--link-color);

	&:hover {
		filter: brightness(120%);
	}

	&:active {
		color: var(--link-color--active);
	}

	&:visited {
		color: var(--link-color--visited);
	}
}

abbr {
	text-decoration-color: var(--color-accent);
}

abbr:hover {
	background-color: var(--color-accent-lighter);
}

button {
	border-radius: var(--width-light);
	font-family: inherit;
	background-color: var(--color-accent);
	border: none;
	padding: calc(var(--width-heavy) * 2) calc(var(--width-heavy) * 4);
	text-transform: uppercase;
	font-weight: bold;
	color: var(--button-color-background);
	background-clip: padding-box;
	text-align: center;
	min-width: calc(1rem + var(--width-heavy) * 4);
}

button:hover {
	filter: brightness(120%);
}

button:active {
	filter: brightness(80%);
}

button:disabled {
	opacity: 60%;
	cursor: not-allowed;
}

#tos-box {
	margin-block: calc(var(--width-heavy) * 4)
}

#tos {
	margin: auto;
	overflow: hidden;
	background-color: var(--color-accent-lighter);
	margin-block: 1rem;
	-moz-user-select: none;
	-webkit-user-select: none;
	user-select: none;
}

#tos button {
	padding: calc(var(--width-heavy) * 2);
}

#tos-container {
	width: 100%;
	aspect-ratio: 1 / 1;
	position: relative;
}

#tos-container button {
	position: absolute;
}

#tos-container:has(img) {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	justify-items: stretch;
	align-items: stretch;
}

#tos-container img {
	grid-column: 2;
	grid-row: 2;
	aspect-ratio: 1 / 1;
}

@media (prefers-color-scheme: dark) {
	:root {
		--color-background: var(--dark);
		--color-foreground: var(--light);

		--button-foreground: var(--color-foreground);
	}
}