:root {
	--global-bg: #02182b;
	--code-bg: #50013d;
	--global-text: #ddd;
	--highlight-text: #000;
	--highlight-background: #f4d35e;
	--gutter-background: #222;

	--columns: 12;
	--column-width: 60px;

	--border-width: 5px;
	--pdp-text: #e9dbcd;
	--pdp-highlight: #4d513e;
	--pdp-background: #84883e;
	--pdp-gutter: 30px;
}

@media (prefers-color-scheme: light) {
	:root {
		--global-bg: #fff;
		--code-bg: #ddd;
		--global-text: #000;
		--highlight-text: var(--global-text);
		--highlight-background: #f4d35e;
	}
}

body {
	background: var(--gutter-background);
	margin: 0;
	color: var(--global-text);
	font-family: sans-serif;
	font-size: 20px;
	line-height: 1.25em;
}

body > .background {
	background: var(--pdp-background);
}

/****************************************************************************/
/* Make it look like a PDP-12 ***********************************************/

body > .background > header h1,
body > .background > header .menu,
body > .background > main,
body > .background > footer {
	display: grid;
	grid-template-columns: minmax(5px, 1fr) repeat(var(--columns), minmax(0, var(--column-width))) minmax(5px, 1fr);
}

body > .background > header h1 .inner,
body > .background > header menu,
body > .background > main > *,
body > .background > footer p {
	grid-column: 2 / -2;
}

body > .background > header {
	display: grid;
	grid-template-columns: repeat(1, 1fr);
	color: var(--pdp-text);
}

body > .background > header h1 {
	background: var(--pdp-highlight);
	border: var(--border-width) solid var(--pdp-text);
	border-left: none;
	border-right: none;
	margin: 50px 0 0;
}

body > .background > header h1 .inner {
	display: flex;
	flex-wrap: wrap;
}

body > .background > header h1 .digital {
	background: var(--pdp-text);
	display: inline-grid;
	gap: var(--border-width);
	grid-template-columns: repeat(7, 1fr);
	border: solid var(--pdp-text);
	border-width: 0 var(--border-width);
	font-size: 40pt;
}

body > .background > header h1 .digital span {
	background: var(--pdp-highlight);
	text-align: center;
	padding: .1em 0 .15em;
}

body > .background > header h1 .pdp-12 {
	padding-top: 5px;
	font-size: 20pt;
	font-weight: bold;
	text-transform: uppercase;
	margin: auto calc(var(--pdp-gutter) / 3) auto var(--pdp-gutter);
}

@media screen and (max-width: 600px) {
	body > .background > header h1 {
		line-height: inherit;
	}

	body > .background > header h1 .digital {
		font-size: 18pt;
	}

	body > .background > header h1 .pdp-12 {
		font-size: 14pt;
	}
}


body > .background > header .menu {
	border-bottom: var(--border-width) solid var(--pdp-text);
}

body > .background > header menu {
	padding: 7px 0 7px;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
}

body > .background > header menu li {
	list-style: none;
	font-variant-caps: all-small-caps;
	font-weight: lighter;
	font-size: 16pt;
}

body > .background > header menu a {
	color: inherit;
}

body > .background > main {
	background: var(--global-bg);
	margin: calc(var(--pdp-gutter) / 2) 0;
}

body > .background > footer {
	color: var(--pdp-text);
	border-top: 5px solid var(--pdp-text);
	font-family: monospace;
	text-align: center;
}

body > .background > footer p {
	rotate: -2deg;
}

body > .background > footer span {
	font-family: monospace;
	text-transform: uppercase;
	color: #f4ebf0;
	background: #c6373b;
	border: solid black;
	padding: 5px 10px 4px;
	border-width: 0 2px 2px 0;
}

/****************************************************************************/
/* Make the main body of the posts readable *********************************/

a {
	color: inherit;
}

pre, code, kbd, samp {
	font-size: 15px;
	background-color: var(--code-bg);
	border: 3px solid var(--code-bg);

	& em {
		font-style: inherit;
		outline: 1px dashed var(--highlight-background);
	}

	& button.copy {
		margin-left: 10px;
		color: var(--global-bg);
		background: var(--global-text);
		border: 1px solid var(--global-text);
		border-radius: 3px;
		cursor: pointer;

		&:active {
			color: var(--global-text);
			background: var(--global-bg);
		}
	}
}

pre {
	overflow: auto;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: normal;
	line-height: 1.2em;
}

img {
	max-width: 100%;
}

.warning {
	background: var(--highlight-background);
	color: var(--highlight-text);
	padding: 10px 15px 15px;
	margin-bottom: 15px;
	& h2 {
		font-size: 22px;
		margin-bottom: 5px;
	}
}
