
* {
	margin: 0;
	padding: 0;
	border: 0;
	box-sizing: border-box;
}

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

body {
	position: relative;
	padding: 1rem;
	padding-block-end: 5rem;
	z-index: 1;
	background: var(--theme-bg-main);
}

@media screen and (min-width: 60rem) {
	body {
		padding-inline: 2rem;
	}
}

@media print {
	body {
		padding-block: 0.5rem;
	}
}

body > nav,
body > main {
	max-width: 100rem;
	margin-inline: auto;
}




/* ===== Footer ===== */

body > footer {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2.5rem;
	background: var(--theme-bg-light);
	border-block-start: 0.1rem solid var(--theme-line);
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	overflow: hidden;
}

body > footer :is(.left, .right) {
	min-width: 22rem;
}

body > footer :is(.left, .center, .right) {
	flex: 1 1 calc(100% / 3);
}

body > footer .left {
	text-align: left;
	padding-inline-start: 1.5rem;
}

body > footer .center {
	text-align: center;
}

body > footer .right {
	text-align: right;
	padding-inline-end: 1.5rem;
}

body > footer ul {
	padding: 0;
}

body > footer p {
	font-size: 0.8rem;
	margin: 0;
	padding-block: 0.5rem;
}


@media (max-width: 1199px) {
	body > footer {
		margin-block-start: 8rem;
		padding-block-end: 2rem;
		background: transparent;
		border: 0;
		position: static;
		flex-direction: column;
		height: auto;
	}

	body > footer > div,
	body > footer :is(p, .left, .center, .right) {
		font-size: 0.8rem;
		text-align: center;
		padding-inline: 0;
	}
}













color-scheme-toggle-button,
outline-button {
	position: fixed;
	top: 0.5rem;
	right: 0.5rem;
	display: block;
	z-index: 2;
}

outline-button {
	top: 0.5rem;
	right: 3rem;
}









#outline-panel {
	position: fixed;
	top: 4rem;
	right: 2rem;
	width: min(30rem, 80vw);
	max-height: 80vh;
	overflow-y: auto;
	background: var(--theme-bg-light);
	border: 0.2rem solid var(--theme-line);
	display: none;
	z-index: 10;
}

[data-show-outline] #outline-panel {
	display: block;
}

#outline-panel h2 {
	margin-block: 1rem;
	margin-inline: 1rem;
	padding: 0;
	font-size: 1.4rem;
}

#outline-panel ol {
	list-style: none;
	padding: 0;
}

#outline-panel li[data-depth='h1'] {
	font-size: 1.2rem;
	font-weight: 700;
	margin-inline-start: 1rem;
}

#outline-panel li[data-depth='h2'] {
	font-size: 1.1rem;
	font-weight: 600;
	margin-inline-start: 2rem;
}

#outline-panel li[data-depth='h3'] {
	margin-inline-start: 3rem;
}

#outline-panel li[data-depth='h4'] {
	font-size: 0.9rem;
	margin-inline-start: 4rem;
}

#outline-panel li[data-depth='h5'] {
	font-size: 0.9rem;
	margin-inline-start: 5rem;
}

#outline-panel li[data-depth='h6'] {
	font-size: 0.9rem;
	margin-inline-start: 6rem;
}

@media print {
	color-scheme-toggle-button,
	outline-button,
	#outline-panel {
		display: hidden !important;
	}
}

