html {
	--fg: #170000;
	--fg2: #a77070;
	--bg: #fff7f7;
	--bg2: #f7f0f0;
	--accent: #a72020;
	--hl: #ff0000;
}
@media (prefers-color-scheme: dark) {
	html {
		--fg: #dfd7d7;
		--fg2: #f7a0a0;
		--bg: #170000;
		--bg2: #270000;
		--accent: #f7a0a0;
	}
}

body {
	background: var(--bg);
	color: var(--fg);
	word-break: break-word;
	font-size: 14px;
}
h1, h2, h3, h4 {
	font-family: sans-serif;
}
h4 {
	font-size: 1.2em;
}
header {
	font-size: 2em;
	font-family: sans-serif;
	margin: 1em;
}
footer {
	font-size: 2em;
	font-family: sans-serif;
	margin: 1em;
}
main {
	max-width: 1120px;
}
.post {
	font-size: 1.4em;
	padding: 0em 2em 1em 2em;
	line-height: 1.4;
	border: 1px solid var(--fg2);
	margin-bottom: 2em;
}
.post p {
	text-align: justify;
}
span.dropcap {
	float: left;
	font-size: 3em;
	line-height: 75%;
	margin-top: 0.1em;
	padding-right: 0.1em;
	font-variant: normal;
}
.smallcaps {
	font-variant: all-small-caps;
}
blockquote {
	margin-left: 2em;
	margin-bottom: 0;
	text-align: justify;
	quotes: "\201C" "\201D";
}
blockquote::before {
	position: absolute;
	margin-left: -0.5em;
	margin-top: -0.25em;
	font-size: 2em;
	content: open-quote;
}
blockquote::after {
	content: close-quote;
}
cite {
	margin-left: 4em;
}
:focus {
	outline: 2px solid var(--hl);
}
@media screen and (max-width: 1480px) {
	main {
		margin: auto;
	}
	header span, header form {
		display: inline;
		margin-right: 1.0em;
	}
}
@media screen and (min-width: 1480px) {
	main {
		margin: 2em;
	}
	header, footer {
		margin-top: 0;
		position: fixed;
		left: 1150px;
	}
	header span, header form {
		display: block;
		margin-bottom: 1em;
	}
	footer {
		margin-bottom: 1.2em;
		bottom: 0;
	}
}
a {
	color: var(--accent);
	text-decoration: none;
}
footer a, header a {
	padding: 0em 0.5em 0em 0.5em;
	white-space: nowrap;
}
footer a:hover, header a:hover {
	color: var(--hl);
	border: 1px solid var(--hl);
}
input {
	font-size: 0.7em;
	font-family: monospace;
	padding: 0.5em;
	vertical-align: top;
	background: var(--bg);
	color: var(--fg);
	border: 1px solid var(--accent);
}
img, video {
	max-width: 100%;
}

.post a {
	color: var(--accent);
	text-decoration: underline;
}
.post a:hover {
	color: var(--hl);
}
.post h2 {
	border-bottom: 1px solid var(--fg2);
}
.post h2 a {
	text-decoration: none;
}
.posttail {
	font-family: sans-serif;
	font-size: 0.8em;
	border-top: 1px solid var(--fg2);
}
form.post {
}
form.post span {
	font-family: monospace;
	padding: 0.5em;
	margin-top: 1em;
	margin-bottom: 1em;
}
.post input {
	font-size: 1.0em;
}
.post input[type="submit"] {
	padding: 0.5em;
	margin-top: 1em;
}
.post input[type="checkbox"] {
	position: fixed;
	top: -9999px;
}
.post input[type="checkbox"] + span:after {
	content: "no";
}
.post input[type="checkbox"]:checked + span:after {
	content: "yes";
}
.post input[type="checkbox"]:focus + span:after {
	outline: 2px solid var(--hl);
}
.post textarea, .post input[type="text"], .post input[type="password"], .post input[type="file"] {
	font-size: 1.0em;
	width: 100%;
	box-sizing: border-box;
	color: var(--fg);
	background-color: var(--bg);
	border-color: var(--fg2);
}
table {
	border-collapse: collapse;
	display: block;
	max-width: 100%;
	overflow-x: auto;
}
td {
	padding: 0.2em 0.4em 0.2em 0.4em;
	white-space: nowrap;
}
tr {
	border-bottom: 1px solid var(--fg2);
}

code {
	font-family: monospace;
	white-space: pre-wrap;
	background: var(--bg2);
}
span > code {
	padding: 0.2em;
}
pre > code {
	border: 1px solid var(--fg2);
	line-height: 1.2;
	padding: 0.5em;
	display: block;
	overflow: hidden;
}

code .kw { color: #A90D91 }
code .bi { color: #690DE1 }
code .st { color: #DC011E }
code .nm { color: #DC011E }
code .tp { color: #A90D91 }
code .cm { color: #177500 }
code .al { color: #006000 }
code .dl { color: #a00000 }
@media (prefers-color-scheme: dark) {
code .kw { color: #D90DB1 }
code .bi { color: #C94DE1 }
code .st { color: #C0011E }
code .nm { color: #C0011E }
code .tp { color: #A90D91 }
code .cm { color: #17A500 }
code .al { color: #00B000 }
code .dl { color: #D03030 }
}


@media screen and (max-width: 740px) {
	body {
		font-size: 0.7em;
	}
	pre > code {
		font-size: 0.6em;
	}
	header {
		line-height: 2.0;
	}
	header input {
		margin-top: 0.5em;
		font-size: 0.8em;
	}
	.post {
		padding: 0em 1em 1em 1em;
	}
	.post textarea {
		width: 20em;
	}
}
@media print {
	body, .post, code {
		background: #fff;
	}
	header, footer {
		display: none;
	}
}
