@charset "UTF-8";

h2 {
	--h-flourish: "❧ ";
}

h3 {
	font-size: 1.4em;
	margin-block-end: 0.75em;
}

article {
	& header {
		margin-bottom: var(--flourish-gap);
		
		& p:has(time) {
			font-size: 0.9em;
			font-style: italic;
			margin-block: 0.2em 0;
			text-align: left;
		}
	}
	
	& nav {
		margin-bottom: var(--section-gap);
		
		& ul {
			list-style-type: "► ";
			list-style-position: inside;
			
			& li::marker {
				color: var(--highlight);
			}
		}
	}
	
	& section {
		margin-bottom: var(--section-gap);
	}
	
	& p {
		text-align: justify;
		margin-bottom: var(--p-gap);
		line-height: var(--line-height);
		
		&:has(+ :is(section, nav)) {
			margin-bottom: var(--section-gap);
		}
	}
	
	:is(& > p:first-of-type, & :is(hr, .topic-break) + p, & > section > p:first-of-type)::before {
		content: "❡ ";
		color: var(--highlight);
	}
	
	& hr {
		height: 0.1em;
		background: linear-gradient(90deg, transparent 0%, var(--highlight) 20%, var(--highlight) 80%, transparent 100%);
		margin-block: calc(2 * var(--p-gap));
	}
	
	--section-gap: calc(3 * var(--p-gap));
	--flourish-gap: 1rem;
}

.float-box {
	margin: 0 1.75em 0.75em;
	max-width: 45%;
	font-size: 0.9em;
	
	&.left {
		float: left;
		margin-left: 0;
	}
	
	&.right {
		float: right;
		margin-right: 0;
	}
}

h3, hr {
	clear: both;
}

hr.flourish {
	height: auto;
	background: none;
	color: var(--highlight);
	text-align: center;
	margin-block: 0 var(--flourish-gap);
	font-size: 2em;
	white-space: pre;
	word-spacing: 0.2rem;
	
	&::before {
		content: var(--bar) " 🙡 ✾ 🙢 "var(--bar);
	}
	
	--bar: "━━━━━━━━";
}

figure {
	text-align: center;
	margin-block: calc(2.5 * var(--p-gap));
	display: flex;
	align-items: center;
	justify-content: center;
	flex-flow: column;
	
	.float-box & {
		margin: 0;
	}
	
	& img {
		max-width: 80%;
		border-radius: 1rem;
		cursor: zoom-in;
		display: block;
	}
	
	&.fancy img {
		border-radius: var(--p-gap);
		/*box-shadow: 0.25em 0.25em 0 0 var(--highlight);*/
		border: 2px solid var(--highlight);
	}
}

figcaption {
	font-size: 0.9em;
	font-style: italic;
	margin-block-start: calc((2 / 3) * var(--p-gap));
	
	& :is(i:not([class]), em:not([class]), var, cite) {
		font-style: normal;
	}
}

.multi-figure, .img-group {
	display: flex;
	flex-flow: row wrap;
	justify-content: safe center;
	margin-block: calc(2.5 * var(--p-gap) - 1rem);
}

.multi-figure {
	& figure {
		width: 50%;
		margin: 0;
		padding: 1rem;
		
		& img {
			max-width: 100%;
		}
	}
}

.img-group {
	margin-block: -1rem;
	
	& img {
		max-width: calc(50% - 2rem);
		margin: 1rem;
	}
}



.zoom-overlay {
	display: none;
	
	&[data-active="true"] {
		display: flex;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(0.5, 0.5, 0.5, 0.5);
		z-index: 1;
		align-items: center;
		justify-content: center;
		cursor: zoom-out;
		
		& img {
			max-width: 99%;
			max-height: 99%;
		}
		
		body:has(&) {
			overflow: hidden;
		}
	}
}

abbr[title] {
	text-decoration-color: var(--highlight);
}

q:lang(de) {
	quotes: "„" "“" "‚" "‘";
}

q:lang(en) {
	quotes: "“" "”" "‘" "’";
}

.emoji {
	font-family: emoji;
	font-variant-emoji: emoji;
	hyphens: manual;
}

.url {
	hyphens: manual;
}

.poetry {
	border-inline-start: 0.25rem solid var(--brand-green);
	padding-inline-start: 0.75rem;
	margin-inline: 0.5rem;

	& h3 {
		font-style: italic;
		
		/*&::before {
			content: "🙘 ";
			color: var(--highlight);
			font-style: normal;
		}
		
		&::after {
			content: " 🙛";
			color: var(--highlight);
			font-style: normal;
		}*/
	}

	& p {
		text-align: start;

		&::before {
			content: none !important;
		}
	}
}

@media (max-width: 1800px) {
	hr.flourish {
		--bar: "━━━━━━━";
	}
}

@media (max-width: 1600px) {
	hr.flourish {
		--bar: "━━━━━━";
	}
}

@media (max-width: 1400px) {
	hr.flourish {
		--bar: "━━━━━";
	}
}

@media (max-width: 1200px) {
	hr.flourish {
		--bar: "━━━━";
	}
}

@media (max-width: 1000px) {
	hr.flourish {
		--bar: "━━━";
	}
}

@media (max-width: 800px) {
	hr.flourish {
		--bar: "━━";
	}
}

@media (max-width: 600px) {
	.float-box {
		font-size: 0.8em;
	}
}

@media (max-width: 550px) {
	footer {
		font-size: 0.9em;
	}
}

@media (max-width: 500px) {
	h3 {
		font-size: 1.2em;
	}
	
	hr.flourish {
		--bar: "━";
	}
}
