:root {
	--border-color: #5d293f;
	--background-color: #cf6180;
	--inline-code-bg-color: #350515;

	--panel-color: #5d293f;
	--panel-shadow: 8px 8px hsla(322.1, 84%, 31.8%, 0.26);

	--separator-color: #7d4356;

	--panel-2-color: #971758;
	--panel-2-shadow-color: hsla(272.1, 72.9%, 11.6%, 0.2);
	--panel-2-shadow: 8px 8px var(--panel-2-shadow-color);

	--panel-text-color: #c5aab2;
	--panel-link-color: hsl(326.2, 25.2%, 69.6%);
	--panel-link-hover-color: hsl(347.3, 100%, 76.9%);
	--meta-text-color: #b66c83;
	--big-meta-text-color: #974a62;

	--h1-color: #f0d1db;
	--h2-color: #d5cbcf;

	--site-title-color: #F0F0F0;
	--site-subtitle-color: #eaaecd;
}

html, body {
	width: 100%;
	height: 100%;
	margin: 0;
	background: var(--border-color);
	color: var(--panel-text-color);
	font-family: sans-serif;
	overflow: hidden;
}

.viewport {
	margin: 10px;
	margin-bottom: 0;
	position: absolute;
	width: calc(100% - 20px);
	height: calc(100% - 20px);
	min-width: 400px;

	display: flex;
	flex-direction: column;

	overflow-y: auto;
	z-index: 1;

	background: var(--background-color);
}

main {
	flex: 1;
}

canvas {
	overflow: hidden;
	display: block;
	width: calc(100% - 20px);
	height: calc(100% - 20px);
	top: 10px;
	left: 10px;
	position: fixed;
	z-index: 0;
	background: var(--background-color);
}

a, a:visited {
	text-decoration: underline dotted 1px var(--background-color);
	font-weight: 900;
	font-style: italic;
	color: var(--panel-link-color);
	transition: color 0.6s cubic-bezier(0.16, 0.79, 0.13, 0.78);
}

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

/* No italics for headers */
h1 a, h2 a, h3 a {
	font-style: revert;
}

a.icon::after {
	content: "";
}

ul {
	padding-left: 1em;
	list-style-type: none;
}

li { padding-bottom: 0.5ch; }

label + table { padding-top: 3px; }
table { border-spacing: 0px; }

tr {
	height: 2.5em;
}

td:first-child {
	padding-right: 10px;
}

time {
	color: var(--meta-text-color);
	font-style: italic;
	flex-shrink: 0;
}

code {
	background: var(--inline-code-bg-color);
	border: 1px solid var(--background-color);
	border-radius: 4px;
	padding: 0px 3px;
}

pre {
	padding: 0px 8px;
	overflow-x: scroll;
}

pre > code {
	border: unset;
	background: unset;
	padding-left: 4px;
}

.role, .role-date { color: var(--meta-text-color); }
.role-date::before {
	font-style: normal;
	content: " :: ";
}

.icon {
	display: inline-block;
	background-repeat: round;
	width: 20px;
	height: 20px;
}

.icon.webring {
	background-image: url(https://webring.xxiivv.com/icon.white.svg);
	transform: scale(1.5, 1.5);
}


h1 { text-shadow: 4px 4px #00000028; }
h2 { text-shadow: 3px 3px #00000030; }

.viewport > header {
	display: flex;
	justify-content: flex-end;
	flex-direction: column;

	margin-top: 60px;

	margin-left: auto;
	margin-right: auto;

	div.title {
		z-index: 1;

		display: flex;
		flex-flow: row wrap;
		justify-content: space-between;
		align-items: baseline;
		gap: 8px;

		h1 {
			color: var(--site-title-color);

			font-weight: bolder;
			font-size: 3em;
			margin-bottom: -14px;
			margin-top: 0;
		}

		h2 {
			color: var(--site-subtitle-color);

			margin-bottom: -6px;
			margin-top: 0;
			font-size: 1.5em;
		}
	}

	nav {
		background: var(--panel-color);
		box-shadow: var(--panel-shadow);

		display: flex;
		flex-direction: row;
		align-items: baseline;
		gap: 16px;

		margin-bottom: 25px;

		ul {
			display: flex;
			flex-direction: row;
			gap: 16px;
		}

		li {
			padding: 0px;
		}
	}
}

main > header, main > article {
	background: var(--panel-color);
	padding: 20px;

	margin-bottom: 25px;
	box-shadow: var(--panel-shadow);

	h1, h2, h3 {
		margin-left: 0;
		margin-right: 0;

		margin-top: 1em;
		margin-bottom: 0px;
	}

	h1:first-child, h2:first-child, h3:first-child {
		margin-top: 0;
	}

	hgroup {
		margin-bottom: 10px;
	}

	h1 {
		color: var(--h1-color);

		font-size: 2.5em;
		font-weight: bolder;
	}

	h2 {
		color: var(--h2-color);

		font-size: 1.5em;
	}

	h3, h4 {
		color: var(--panel-text-color);
	}
}

main > article {
	p {
		margin-top: 10px;
		margin-bottom: 10px;
		line-height: 1.1em;
	}

	p:last-child {
		margin-bottom: 0px;
	}

	ul {
		list-style-type: "-";
		margin: 0;
	}

	ul li {
		padding-left: 0.5em;
	}

	aside, article {
		background: var(--panel-2-color);
		box-shadow: var(--panel-2-shadow);

		margin: 0;
		margin-bottom: 1em;
		padding: 1em;

		p:first-child {
			margin-top: 0px;
		}
	}

	aside.todo {
		background: transparent;
		outline: 2px dashed #f7ed58;
	}

	hgroup {
		display: flex;
		flex-direction: row;
		align-items: baseline;
	}
}

.viewport > footer {
	position: relative;

	display: flex;
	flex-direction: row;
	justify-content: center;

	align-items: center;
	align-self: center;

	padding: 10px 20px;
	margin-bottom: 25px;
	gap: 20px;

	background: var(--panel-color);
	box-shadow: var(--panel-shadow);

	font-size: 10pt;

	span {
		margin: 0px;
		display: inline-flex;

		gap: 2px;
		align-items: center;

		a {
			display: inline-block;
			text-decoration: none;
			font-style: normal;
			font-size: 1.5em;

			&::after {
				content: "";
			}

			img.froge {
				object-fit: contain;
				object-position: bottom;
				width: 1.5em;
				height: 1.5em;
			}
		}
	}
}


/* probably portrait */
@media screen and (max-width: 730px) {
	.viewport > header, main {
		margin-left: 10px;
		margin-right: 10px;
		width: auto;
	}
}

/* small desktop/ipad/landscape mobile */
@media screen and (min-width: 730px) {
	.viewport > header, main {
		margin-left: auto;
		margin-right: auto;
		width: 690px;
	}
}


.inline-terms {
	display: inline-flex;
	flex-direction: row;
	gap: 1ex;

	.taxonomy-tags::before {
		content: '#';
		color: var(--meta-text-color);
	}
}

.inline-post-preview-list {
	display: flex;
	flex-direction: column;

	.inline-post-preview {
		display: flex;
		gap: 1ex;

		/* Fallback for if line-clamp fails me */
		max-height: 6em;

		.summary {
			/* Fallback for if/when -webkit-line-clamp becomes standard */
			display: box;
			line-clamp: 3;

			/* I hate vendor prefixes - I thought we were over this */
			display: -webkit-box;
			-webkit-line-clamp: 3;
			-webkit-box-orient: vertical;

			text-overflow: ellipsis;
			overflow: hidden;

			flex-grow: 1;
			flex-shrink: 1;
		}

		&:not(:last-child) {
			border-bottom: 1px solid var(--separator-color);
			padding: 1.5ex 0;
		}

		&:last-child {
			padding-top: 1.5ex;
		}
	}
}

.stretcher {
	flex-shrink: 1;
	flex-grow: 1;
}

.list-header {
	h1, h2, h3, h4 {
		margin: 0;
	}

	.taxonomy-tags::before {
		content: '#';
		color: var(--big-meta-text-color);
	}
}

.list-entry {
	header, hgroup, footer {
		display: flex;
		flex-direction: row;
		align-items: baseline;
	}
}