:root {
	--text: #000000;
	--link: #1565C0;
	--link_visited: #1565C0;
	--accent1: #333333;
	--accent2: #666666;
	--background: #ffffff;
	--code: #e3e3e3;
	--button-text: #ffffff;
	--blockquote: #fffee0;
	--field: #fffee0;
	--note: #FEF770;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
	:root {
		--text: #f8f8f2;
		--link: #8be9fd;
		--link_visited: #8be9fd;
		--accent1: #f8f8f2;
		--accent2: #f8f8f2;
		--background: #282a36;
		--code: #44475a;
		--button-text: #282a36;
		--blockquote: #44475a;
		--field: #44475a;
		--note: #44475a;
	}
}

body {
	max-width: 40em;
	margin: 2em auto;
	font-family: -apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		Helvetica,
		Arial,
		sans-serif,
		"Apple Color Emoji",
		"Segoe UI Emoji",
		"Segoe UI Symbol";
	font-size: 18px;
	padding: 0 1em;
	line-height: 1.6;
	background-color: var(--background);
	color: var(--text);
}

header {
	margin-bottom: 2em;
}

.post-header {
	margin-bottom: 0;
}

header h1 a,
header h1 a:visited {
	text-decoration: none;
	color: var(--text);
}

header h1 a:hover {
	color: var(--accent1);
	text-decoration: none;
}

header p {
	margin-top: 0;
}

a {
	color: var(--link);
}

a:hover {
	text-decoration: none;
}

a:visited {
	color: var(--link_visited)
}

a.post-date {
	font-size: 0.8em;
	color: var(--link);
	text-decoration: none;
}

span.post-date {
	font-size: 0.8em;
}

a.post-date:hover {
	text-decoration: none;
}

.e-content {
	margin-bottom: 2em;
	overflow-wrap: anywhere;
}

.e-content p:first-of-type,
article p:first-of-type {
	margin-top: 0;
}

img.profile_photo {
	border-radius: 80px;
}

nav ul,
ul.reply-buttons {
	list-style-type: none;
	padding: 0;
}

nav ul li,
ul.reply-buttons li {
	display: inline;
	margin-right: 0.2em;
	line-height: 2em;
	white-space: nowrap;
}

nav a,
nav a:visited,
nav a:hover,
a.conversation-on-mb,
a.reply-by-email, a.read-more {
	text-decoration: none;
	padding: 5px 10px;
	border: 1px solid var(--link);
	color: var(--link);
	border-radius: 5px;
	font-size: 0.9em;
}

nav a:hover,
a.conversation-on-mb:hover,
a.reply-by-email:hover, a.read-more:hover {
	background: var(--link);
	color: var(--button-text);
}

button {
	cursor: pointer;
}

header h1 {
	margin-top: 0.2em;
	margin-bottom: 0.2em;
}

h1,
h2,
h3 {
	line-height: 1.2em;
}

h2 {
	margin-top: 0;
}

.post-nav {
	margin-top: 2.5em;
	margin-bottom: 2.5em;
	text-align: center;
}

.post-nav span {
	padding: 0 5px;
}

.post-nav a:visited {
	color: var(--link);
}

.post-meta {
	color: var(--accent2);
}

article img,
.e-content img,
.p-summary img {
	width: 100%;
	height: auto;
	border-radius: 5px;
}

ul.post-tags li {
	display: inline;
	font-size: 0.8em;
}

ul.post-tags,
ul.post-list {
	padding-left: 0;
}

ul.post-list {
	list-style-type: none;
}

ul.post-list a.u-url {
	text-decoration: none;
}

blockquote {
	padding: 1em;
	background: var(--blockquote);
	border-radius: 5px;
	font-size: 0.9em;
	margin: 1em;
}

blockquote p:last-of-type {
	margin-bottom: 0;
}

blockquote p:first-of-type {
	margin-top: 0;
}

div.highlight div {
	border-radius: 5px;
}

hr {
	margin: 2em 0;
	border: none;
	text-align: center;
}

hr::before {
	content: "•••••";
	display: block;
	color: var(--link);
}

sup a {
	text-decoration: none;
}

.footnote-backref {
	text-decoration: none;
}

.microblog_conversation {
	margin-top: 2em;
	margin-bottom: 2em;
}

.microblog_post {
	margin-bottom: 2em;
	padding: 1em;
	border: 1px solid var(--code);
	border-radius: 5px;
}

.microblog_user {
	font-weight: bold;
}

.microblog_user img {
	vertical-align: middle;
	width: 40px;
	height: auto;
	border-radius: 40px;
	max-width: 40px !important;
}

.microblog_time a,
.microblog_time a:visited {
	color: var(--accent2);
	font-size: 0.8em;
	text-decoration: none;
}

footer {
	margin-top: 2em;
	text-align: center;
}

footer .custom_footer {
	font-size: 0.75em;
	color: var(--accent2);
}

footer .attribution {
	display: none;
}

.full-archives {
	overflow-wrap: anywhere;
}

p.note {
	background: var(--note);
	border-radius: 5px;
	font-weight: bold;
	padding: 5px 10px;
}

p > code, li > code, span.tinylytics_hits {
	background: var(--code);
	padding: 2px 4px;
	font-size: 0.9em;
	border-radius: 5px;
	font-family: monospace;
}

mark {
	background: var(--note);
}

/* IF USING THE TINY THEME ADD ON FOR SUMMARY POSTS */

.p-summary {
	margin-bottom: 2em;
}

/* MAKES VIDEO EMBEDS THAT DON'T USE IFRAME RESPONSIVE. DOES NOT WORK WITH YOUTUBE. */
video {
	width: 100% !important;
	height: auto !important;
}

/* Styling specific to Tinylytics Plugin */

.did_select {
	background: var(--link);
	color: var(--button-text);
	opacity: 0.8;
	cursor: not-allowed;
}

/* OVERRIDING DEFAULT MICROBLOG AND PLUGIN CSS. Using !important isn't ideal, but it's the most effective for these things. */

.photos-grid-container {
	grid-column-gap: 5px !important;
}

input[type=text],
input[type=search] {
	padding: 10px;
	font-size: 0.9em;
	border: 1px solid var(--link) !important;
	border-radius: 5px !important;
	color: var(--text);
	display: block;
	height: auto;
	background: var(--field);
}

input[type=submit],
button {
	vertical-align: baseline;
	padding: 5px 10px;
	font-size: 0.9em;
	border-radius: 5px;
	border: 1px solid var(--link);
	background: none;
	color: var(--link);
	-webkit-appearance: none;
	margin-top: 5px;
	font-weight: normal;
}

input[type=submit]:hover,
button:hover {
	background: var(--link);
	color: var(--button-text);
}

#search-space-info {
	font-size: 0.9em;
	font-style: italic;
}

.bookshelf_book {
	margin-bottom: 2em;
}

.bookshelf_title {
	font-weight: bold;
}

.bigfoot-footnote__content {
	color: #000;
}
