
:root {
	/* 
	 * hand-selected colors; I tried to fit a
	 * terminal aesthetic. I think the chromas
	 * of the colors are all roughly the same,
	 * so try to avoid using any one of them as
	 * the background for any other color for
	 * accessibility reasons.
	 */
	--red: oklch(77% 0.1345 20.951);
	--orange: oklch(83.752% 0.10566 61.412);
	--yellow: oklch(94.376% 0.12354 100.464);
	--green: oklch(90.33% 0.15626 135.02);
	--cyan: oklch(90.373% 0.10317 181.501);
	--blue: oklch(72.617% 0.12684 286.22);
	--purple: oklch(79.712% 0.15479 322.844);

	--darker-bg: #282b33;
	--lighter-bg: #313639;
}

@media (max-width: 600px) {
	html > body {
		min-width: 200px;
		margin-left: 0;
		margin-right: 0;
		font-size: 1.05rem;
		box-sizing: border-box;
		padding: 1rem;
	}
	img.preview, img.preview.right {
		float: unset !important;
		margin-left: 0;
		margin-right: 0;
	}
	#reflow {
		clear: both;
	}
}
html {
	display: flex;
	width: 100%;
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	justify-content: center;
	background-color: var(--darker-bg);
	font-family: Merriweather, Helvetica, Arial, sans-serif;
	color: var(--orange);
	font-weight: 350;
}

body {
	max-width: 700px;
	min-width: 500px;
	background-color: var(--lighter-bg);
	padding: 3rem;
	padding-top: 1rem;
	font-size: 1.1rem;
	line-height: 1.5;
	height: fit-content;
	border-radius: 2px;
	box-shadow: 3px 3px 8px 0 #22222299;
}

code {
	background-color: var(--darker-bg);
	padding: 0.15rlh 0.2rlh;
	border-radius: 5px;
}

hr {
	clear: both;
	border: 0;
	padding-top: 1rlh;
	padding-bottom: 1rlh;
	margin: 0;
	text-align: center;
}

hr:before {
	content: '[--------';
}

hr:after {
	content: "--------]";
}

a {
	transition: color 0.1s;
	color: var(--yellow);
	font-weight: 700;
	text-decoration: none;
}
a:hover {
	color: var(--red);
	text-decoration: underline;
}

img {
	max-width: 100%;
}

img.profile {
	clip-path: circle(50% at 50% 50%);
	max-width: 150px;
	box-sizing: border-box;
	float: left;
	margin-right: 2rem;
	margin-bottom: 1rlh;
}

h1, h2, h3, h4, h5, h6 {
	clear: both;
	margin: 0;
	padding-top: 1.25rlh;
	padding-bottom: 0.5rlh;
	color: var(--yellow)
}
p {
	margin: 0;
	padding-bottom: 1rlh;
}
p:has(+ h1), p:has(+ h2), p:has(+ h3), p:has(+ h4), p:has(+ h5), p:has(+ h6), p:has(+ ul), p:has(+ ol) {
	padding-bottom: unset;
}
h2 + ol {
	margin-top: 0;
}

h1 > a {
	text-decoration: none;
	color: unset !important;
}
h2 {
	margin-top: 1rlh;
}

.preview {
	max-width: calc(min(100%, 300px));
	float: left;
	margin-right: 1.5rem;
	padding-bottom: 0.5rlh
}
.preview.right {
	float: right;
	margin-left: 1.5rem;
	margin-right: unset;
}

[data-tooltip] {
	position: relative;
}
[data-tooltip]:hover::after {
	display: block;
	position: absolute;
	content: attr(data-tooltip);
	padding: 0.5rem;
	background-color: var(--darker-bg);
	bottom: 1rlh;
	font-size: 1rem;
}

button {
	font-size: 1rem;
	font-family: inherit;
	font-weight: 700;
	border: none;
	background-color: transparent;
	color: var(--red);
	cursor: pointer;
}
button:hover {
	color: var(--orange);
	border-color: var(--orange);
	text-decoration: underline;
}
ul > li:not(:last-child), ol > li:not(:last-child) {
	margin-bottom: 0.25rlh;
}

#backlink {
	display: none;
	cursor: pointer;
}

.horizontally-center {
	display: flex;
	width: 100%;
	justify-content: center;
}

figure {
	display: flex;
	flex-direction: column;
	align-items: center;
}
figure > img {
	margin-bottom: 0.5rlh;
}
figcaption {
	font-style: italic;
}