/*
 * This file is released into the public domain, marked with CC0.
 * A copy of the CC0 Public Domain Dedication can be found on:
 * <https://creativecommons.org/publicdomain/zero/1.0/>.
 */

:root {
	--bg:        hsl(300 20% 12.5%);
	--widget-bg: hsl(300 20% 10%);
	--border:    hsl(300 20% 25%);
	--text:      hsl(300 10% 80%);
	--text-dim:  hsl(300 10% 50%);
	--accent:    hsl(340 100% 70%);
}

@media (prefers-color-scheme: light) {
	:root {
		--bg:        hsl(300 20% 92.5%);
		--widget-bg: hsl(300 20% 90%);
		--border:    hsl(300 20% 75%);
		--text:      hsl(300 20% 20%);
		--text-dim:  hsl(300 20% 50%);
		--accent:    hsl(300 80% 40%);
	}
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--bg);
	color: var(--text);
	font-family: sans-serif;
	word-wrap: break-word;
	line-height: 1.75;
	font-size: 1.1rem;
	letter-spacing: .5px;
}

nav {
	box-sizing: border-box;
	max-width: 72rem;
	margin: 0 auto;
	padding: .5rem 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0 2rem;
	border-bottom: 1px solid var(--border);
}

nav .links {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5rem;
}

main {
	max-width: 48rem;
	margin: 0 auto;
	padding: 0 1rem;
}

h1 {
	font-size: 2rem;
	line-height: 1.5;
}

.heading-anchor {
	display: none;
}

:hover > .heading-anchor {
	display: inline
}

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

a:hover {
	text-decoration: underline;
}

hr {
	border: none;
	height: 1px;
	background: var(--border);
}

blockquote {
	padding: 0 1rem;
	background-color: var(--widget-bg);
	border: 1px solid var(--border);
	border-radius: 1rem;
}

pre {
	overflow: auto;
	padding: 1rem;
	background-color: var(--widget-bg) !important;
	border: 1px solid var(--border);
	border-radius: 1rem;
	line-height: 1.25;
}

pre > code {
	padding: 0;
	margin: 0;
	background-color: transparent;
	border: none;
}

code {
	padding: .2rem .4rem;
	background-color: var(--widget-bg);
	border-radius: .5rem;
	font-size: .8em;
}

table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 1rem;
	border: 1px solid var(--border);
	overflow: hidden;
	margin: 1rem 0;
}

th, td {
	padding: 6px 13px;
	background-color: var(--widget-bg);
	border-right: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

th:last-child, td:last-child {
	border-right: none;
}

tr:last-child td {
	border-bottom: none;
}

img {
	max-width: 100%;
}

main > hr:last-of-type {
	width: 0;
	margin: 0;
}

main > hr:last-of-type ~ * {
	font-size: 1rem;
	color: var(--text-dim);
	line-height: normal;
}

main > hr:last-of-type ~ * a {
	color: var(--text-dim);
	text-decoration: underline;
}

main > hr:last-of-type ~ * a:hover {
	color: var(--text);
}
