/* ==========================================================================
   THE CONTINENTAL BROADSIDE — DESIGN SYSTEM & TOKENS
   Classical European Philosophy Monograph & Tufte Marginalia
   Aesthetic: Edition Suhrkamp • Felix Meiner • Prussian Ultramarine & Vellum
   ========================================================================== */

:root,
[data-theme="light"] {
	color-scheme: light;

	/* 1. TYPOGRAPHY TOKENS */
	--font-serif: "EB Garamond", "Cormorant Garamond", "Garamond", "Georgia", serif;
	--font-sans: "Inter", -apple-system, sans-serif;
	--font-mono: "Courier Prime", "Courier New", monospace;

	/* 2. ANTIQUE MONOGRAPH BOOK PALETTE */
	--color-bg-primary: #FAF8F4;
	/* Antique Book Vellum Paper */
	--color-bg-secondary: #EFECE3;
	/* Sidenote Marginalia Tint */
	--color-bg-elevated: #FFFFFF;
	/* Clean Paper Plate */
	--color-bg-contrast: #14171A;
	/* Deep Book Carbon */

	/* 3. TEXT */
	--color-text-primary: #181A1D;
	/* Rich Monograph Black */
	--color-text-secondary: #4A4E55;
	/* Archival Charcoal */
	--color-text-muted: #7A808C;
	/* Marginalia Muted */
	--color-text-accent: #1D4E89;
	/* Prussian Ultramarine / Suhrkamp Blue */
	--color-text-inverse: #FAF8F4;

	/* 4. INTERACTIVE & ACCENT */
	--color-accent: #1D4E89;
	/* Prussian Blue */
	--color-accent-hover: #0F2D54;
	--color-accent-bg: #E8F0FA;
	--color-link: #1D4E89;
	--color-link-hover: #0F2D54;

	/* 5. BORDERS & MARGINALIA */
	--color-border: #D8D4C7;
	--color-border-subtle: #E8E5DC;
	--radius-btn: 0.125rem;
	--radius-card: 0.25rem;

	--b1: 42 28% 97%;
	--b2: 40 20% 91%;
	--bc: 215 15% 10%;
	--p: 213 65% 33%;
	--pc: 0 0% 100%;
}

[data-theme="dark"] {
	color-scheme: dark;

	--color-bg-primary: #0F1216;
	/* Deep Night Vellum */
	--color-bg-secondary: #171B21;
	/* Sidenote Plate */
	--color-bg-elevated: #20252D;
	--color-bg-contrast: #FAF8F4;

	--color-text-primary: #EDEAE4;
	/* Soft Warm Parchment */
	--color-text-secondary: #A0A6B2;
	--color-text-muted: #6C7280;
	--color-text-accent: #3075BA;
	/* Luminous Azure */
	--color-text-inverse: #0F1216;

	--color-accent: #60A5FA;
	--color-accent-hover: #93C5FD;
	--color-accent-bg: #132238;
	--color-link: #60A5FA;
	--color-link-hover: #93C5FD;

	--color-border: #262D38;
	--color-border-subtle: #1C222B;

	--b1: 215 20% 7%;
	--b2: 215 18% 11%;
	--bc: 42 20% 92%;
	--p: 213 94% 68%;
	--pc: 0 0% 0%;
}

html {
	font-family: var(--font-serif);
	background-color: var(--color-bg-primary);
	color: var(--color-text-primary);
	transition: background-color 0.15s ease, color 0.15s ease;
	scroll-behavior: smooth;
	font-size: 19px;
	line-height: 1.7;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
}

::selection {
	background-color: var(--color-accent);
	color: #FFFFFF;
}

.font-serif {
	font-family: var(--font-serif);
}

.font-sans {
	font-family: var(--font-sans);
}

.font-mono {
	font-family: var(--font-mono);
}

.bg-canvas {
	background-color: var(--color-bg-primary);
}

.bg-surface {
	background-color: var(--color-bg-secondary);
}

.bg-elevated {
	background-color: var(--color-bg-elevated);
}

.text-main {
	color: var(--color-text-primary);
}

.text-muted {
	color: var(--color-text-muted);
}

.text-secondary {
	color: var(--color-text-secondary);
}

.text-accent {
	color: var(--color-text-accent);
}

.border-theme {
	border-color: var(--color-border);
}

/* Scholarly Sidenote / Marginalia */
.marginalia {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--color-text-secondary);
}

.section-numeral {
	font-family: var(--font-serif);
	font-variant-numeric: tabular-nums;
	color: var(--color-text-accent);
	font-weight: bold;
}

.btn-broadside {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.9rem;
	font-family: var(--font-serif);
	font-size: 0.9rem;
	font-style: italic;
	background-color: transparent;
	color: var(--color-text-accent);
	border: 1px solid var(--color-text-accent);
	border-radius: var(--radius-btn);
	transition: all 0.12s ease;
	cursor: pointer;
}

.btn-broadside:hover {
	background-color: var(--color-accent);
	color: #FFFFFF;
}

/* ==========================================================================
   RICH TEXT (Wagtail RichTextField)
   ==========================================================================

   Tailwind's preflight resets every heading to `font-size: inherit;
   font-weight: inherit`, so a heading inside a RichTextField renders as
   ordinary body text. These rules restore the monograph heading scale
   for editor-written prose, and only for prose — the chrome headings
   (section titles, plate captions) are styled by their own components.
   ========================================================================== */

.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
	font-family: var(--font-serif);
	font-weight: 700;
	color: var(--color-text-primary);
	letter-spacing: -0.01em;
	line-height: 1.3;
	text-align: left;
}

.rich-text h2 {
	font-size: 1.35rem;
	margin-top: 1.75rem;
	margin-bottom: 0.6rem;
	padding-bottom: 0.35rem;
	border-bottom: 1px solid var(--color-border-subtle);
}

.rich-text h3 {
	font-size: 1.15rem;
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}

.rich-text h4 {
	font-size: 1rem;
	font-style: italic;
	margin-top: 1.25rem;
	margin-bottom: 0.4rem;
}

.rich-text h5,
.rich-text h6 {
	font-size: 0.95rem;
	margin-top: 1rem;
	margin-bottom: 0.35rem;
}

/* The first heading of a block should not open with a gap. */
.rich-text > h2:first-child,
.rich-text > h3:first-child,
.rich-text > h4:first-child,
.rich-text > h5:first-child,
.rich-text > h6:first-child {
	margin-top: 0;
}

.rich-text p {
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
}

.rich-text ul,
.rich-text ol {
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
	padding-left: 1.5rem;
}

.rich-text ul {
	list-style: disc;
}

.rich-text ol {
	list-style: decimal;
}

.rich-text li {
	margin-bottom: 0.35rem;
}

.rich-text a {
	color: var(--color-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rich-text a:hover {
	color: var(--color-link-hover);
}

.rich-text blockquote {
	margin: 1rem 0;
	padding-left: 1rem;
	border-left: 2px solid var(--color-border);
	font-style: italic;
	color: var(--color-text-secondary);
}

.rich-text hr {
	margin: 1.5rem 0;
	border: 0;
	border-top: 1px solid var(--color-border-subtle);
}

.rich-text code {
	font-family: var(--font-mono);
	font-size: 0.9em;
	background: var(--color-bg-secondary);
	padding: 0.1em 0.3em;
}

/* ==========================================================================
   CLASSICAL BOOK MONOGRAPH COMPONENTS
   ========================================================================== */

/* 0. Monograph Verso / Impressum (Page 2 of an Academic Book) */
.book-verso {
	padding: 1.5rem 0 2.5rem 0;
	font-size: 0.85rem;
	line-height: 1.7;
	color: var(--color-text-secondary);
	border-bottom: 1px solid var(--color-border-subtle);
}

.book-verso-header {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 0.95rem;
	color: var(--color-text-primary);
	margin-bottom: 0.75rem;
	border-bottom: 1px solid var(--color-border-subtle);
	padding-bottom: 0.35rem;
}

/* 1. Inhaltsverzeichnis / Book Index (Table of Contents) */
.book-toc {
	background: transparent;
	border-top: 1px solid var(--color-border);
	border-bottom: 1px solid var(--color-border);
	padding: 2.5rem 0;
	/* Logical properties only. A physical `margin: 3rem 0` shorthand would
	   reset `margin-inline` and therefore defeat Tailwind's `mx-auto`, which
	   is what keeps the index centred in the text column. */
	margin-block: 3rem;
}

.toc-header {
	font-family: var(--font-serif);
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-align: center;
	color: var(--color-text-primary);
	margin-bottom: 2rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--color-border-subtle);
}

.toc-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.toc-item {
	display: block;
	width: 100%;
}

.toc-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	width: 100%;
	text-decoration: none;
	color: var(--color-text-primary);
	transition: color 0.15s ease;
	font-size: 1.05rem;
}

.toc-row:hover {
	color: var(--color-text-accent);
}

.toc-title {
	font-weight: 600;
	padding-right: 0.5rem;
	flex-shrink: 0;
}

.toc-dots {
	flex-grow: 1;
	border-bottom: 2px dotted var(--color-text-muted);
	margin: 0 0.75rem;
	min-width: 1.5rem;
	align-self: flex-end;
	margin-bottom: 0.35em;
	opacity: 0.5;
}

.toc-target {
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: bold;
	color: var(--color-text-accent);
	padding-left: 0.5rem;
	flex-shrink: 0;
	white-space: nowrap;
}

/* 2. End of Chapter Return Links */
.chapter-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 1.25rem;
	margin-top: 2.5rem;
	border-top: 1px solid var(--color-border);
	font-size: 0.9rem;
	font-style: italic;
	color: var(--color-text-secondary);
}

.chapter-footer a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--color-text-accent);
	text-decoration: none;
	transition: color 0.15s ease;
}

.chapter-footer a:hover {
	color: var(--color-accent-hover);
	text-decoration: underline;
}

/* 3. Scholarly Book Plates (Vorträge & Tafeln) */
.book-plate {
	background-color: var(--color-bg-primary);
	border: 1px solid var(--color-border);
	padding: 1.5rem;
	box-shadow: inset 0 0 0 1px var(--color-border-subtle);
	margin: 2rem 0;
}

.plate-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	border-bottom: 1px solid var(--color-border);
	padding-bottom: 0.6rem;
	margin-bottom: 1rem;
}

.plate-numeral {
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: bold;
	color: var(--color-text-accent);
	letter-spacing: 0.05em;
}

.plate-venue {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--color-text-muted);
}

.plate-frame {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 1px solid var(--color-border);
	background-color: #000000;
	overflow: hidden;
	margin-bottom: 1rem;
}

.plate-legend {
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--color-text-secondary);
	border-top: 1px solid var(--color-border-subtle);
	padding-top: 0.75rem;
}

.plate-legend em,
.plate-legend i {
	font-style: italic;
}

/* 4. Scholarly Reference List / Literaturverzeichnis */
.book-bibliography {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}

.bib-item {
	position: relative;
	padding-bottom: 1.25rem;
	border-bottom: 1px dashed var(--color-border-subtle);
}

.bib-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.bib-entry {
	text-align: justify;
	line-height: 1.65;
	font-size: 1.05rem;
	color: var(--color-text-secondary);
}

.bib-entry.hanging-indent {
	padding-left: 2.5rem;
	text-indent: -2.5rem;
}

@media (max-width: 640px) {
	.bib-entry.hanging-indent {
		padding-left: 1.5rem;
		text-indent: -1.5rem;
	}
}

.bib-numeral {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--color-text-muted);
	letter-spacing: -0.02em;
	margin-right: 0.35rem;
	user-select: none;
}

.bib-author {
	font-weight: 600;
	color: var(--color-text-primary);
}

.bib-year {
	font-weight: 500;
	color: var(--color-text-primary);
}

.bib-title {
	color: var(--color-text-primary);
}

.bib-source {
	color: var(--color-text-secondary);
}

.bib-link {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--color-text-accent);
	text-decoration: underline;
	display: inline;
	margin-left: 0.5rem;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.bib-link:hover {
	color: var(--color-accent-hover);
}

.bib-meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 1.25rem;
	row-gap: 0.5rem;
	margin-top: 0.35rem;
	margin-left: 2.5rem;
}

@media (max-width: 640px) {
	.bib-meta-row {
		margin-left: 1.5rem;
	}
}

.bib-meta-row summary {
	list-style: none;
}

.bib-meta-row summary::-webkit-details-marker {
	display: none;
}

.bib-details {
	display: inline-block;
}

.bib-details[open] {
	display: block;
	width: 100%;
}

.bib-action-link {
	font-family: var(--font-serif);
	font-size: 0.9rem;
	color: var(--color-text-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	user-select: none;
	transition: color 0.15s ease, opacity 0.15s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
}

.bib-action-link:hover {
	color: var(--color-accent-hover);
	opacity: 0.85;
}

.bib-abstract-box {
	margin-top: 0.6rem;
	padding: 0.85rem 1.1rem;
	background-color: var(--color-bg-secondary);
	border-left: 2px solid var(--color-text-accent);
	border-top: 1px solid var(--color-border-subtle);
	border-right: 1px solid var(--color-border-subtle);
	border-bottom: 1px solid var(--color-border-subtle);
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--color-text-secondary);
	text-align: justify;
}

/* 5. "Zitiere das Werk" Interactive Drawer */
.citation-box {
	margin-top: 0.6rem;
	padding: 1rem 1.25rem;
	background-color: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	font-size: 0.875rem;
	line-height: 1.6;
}

.citation-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--color-border);
}

.citation-select {
	font-family: var(--font-serif);
	font-size: 0.85rem;
	padding: 0.3rem 0.6rem;
	background-color: var(--color-bg-primary);
	border: 1px solid var(--color-border);
	color: var(--color-text-primary);
	outline: none;
	cursor: pointer;
}

.citation-select:focus {
	border-color: var(--color-text-accent);
}

.btn-copy {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	padding: 0.3rem 0.65rem;
	background-color: var(--color-bg-primary);
	color: var(--color-text-accent);
	border: 1px solid var(--color-border);
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn-copy:hover {
	background-color: var(--color-text-accent);
	color: #FFFFFF;
	border-color: var(--color-text-accent);
}

.citation-output {
	background-color: var(--color-bg-primary);
	border: 1px solid var(--color-border-subtle);
	padding: 0.85rem 1rem;
	min-height: 3.5rem;
	word-break: break-word;
}

.citation-output.is-bibtex {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	line-height: 1.5;
	white-space: pre-wrap;
}

.citation-output i,
.citation-output em {
	font-style: italic !important;
}

/* ==========================================================================
   BOOKMARK NAVIGATION
   Classical bookmark ribbon with hover-expand labels
   ========================================================================== */

.bookmark-nav {
	position: fixed;
	top: 4rem;
	left: -5rem;
	z-index: 100;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 3.5rem;
	background-color: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-left: none;
	border-top-right-radius: var(--radius-card);
	border-bottom-right-radius: 0;
	box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.06);
	opacity: 0;
	transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            opacity 0.35s ease,
	            width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
}

.bookmark-nav::after {
	content: "";
	position: absolute;
	bottom: -12px;
	left: 0;
	right: 0;
	height: 12px;
	background: linear-gradient(to bottom right, var(--color-bg-secondary) 50%, transparent 50%);
	clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.bookmark-nav.is-visible {
	left: 0;
	opacity: 1;
}

.bookmark-nav:hover {
	width: 10rem;
}

.bookmark-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 0;
	width: 100%;
	text-decoration: none;
	color: var(--color-text-secondary);
	transition: background-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
	border-bottom: 1px solid var(--color-border-subtle);
	box-sizing: border-box;
}

.bookmark-link:last-of-type {
	border-bottom: none;
}

.bookmark-link:hover {
	background-color: var(--color-bg-elevated);
	color: var(--color-text-accent);
}

.bookmark-icon {
	flex-shrink: 0;
	width: 1.5rem;
	text-align: center;
	font-family: var(--font-serif);
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--color-text-accent);
	line-height: 1;
	display: block;
}

.bookmark-label {
	font-family: var(--font-serif);
	font-size: 0.85rem;
	font-style: italic;
	letter-spacing: 0.02em;
	max-width: 0;
	overflow: hidden;
	opacity: 0;
	white-space: nowrap;
	transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
	            opacity 0.2s ease;
	flex-shrink: 0;
}

.bookmark-nav:hover .bookmark-link {
	justify-content: flex-start;
	padding: 0.75rem 0.5rem;
}

.bookmark-nav:hover .bookmark-label {
	max-width: 7rem;
	opacity: 1;
}

.bookmark-tassel {
	height: 1.5rem;
	flex-shrink: 0;
}

@media (max-width: 640px) {
	.bookmark-nav {
		top: 3rem;
		width: 3rem;
		left: -4rem;
	}

	.bookmark-nav.is-visible {
		left: 0;
	}

	.bookmark-nav:hover {
		width: 8.5rem;
	}

	.bookmark-nav:hover .bookmark-label {
		max-width: 5.5rem;
	}

	.bookmark-icon {
		font-size: 1.15rem;
	}

	.bookmark-label {
		font-size: 0.78rem;
	}
}

/* ==========================================================================
   MOBILE PRESENTATION (< 640px)
   Preserves the monograph aesthetic while making the site usable on phones.
   ========================================================================== */

@media (max-width: 640px) {

	/* 0. Global */
	html {
		font-size: 17px;
	}

	body {
		overflow-x: hidden;
	}

	/* 1. Masthead */
	header h1 {
		font-size: 1.625rem !important;
		letter-spacing: 0.05em !important;
		word-break: break-word;
		overflow-wrap: anywhere;
	}

	header h1 a {
		display: inline-block;
		max-width: 100%;
	}

	header p.text-\[15px\] {
		letter-spacing: 0.12em !important;
	}

	/* 2. Floating mobile bookmark tab + dropdown */
	.mobile-bookmark-float {
		position: fixed;
		top: 0;
		right: 0;
		z-index: 200;
	}

	.mobile-bookmark-tab {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 2.75rem;
		height: 3rem;
		background-color: var(--color-bg-secondary);
		border: 1px solid var(--color-border);
		border-top: none;
		border-right: none;
		border-bottom-left-radius: var(--radius-card);
		color: var(--color-text-accent);
		font-family: var(--font-serif);
		font-size: 1.5rem;
		line-height: 1;
		cursor: pointer;
		box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.06);
		transition: background-color 0.15s ease, color 0.15s ease;
	}

	.mobile-bookmark-tab:hover,
	.mobile-bookmark-tab:focus {
		background-color: var(--color-bg-elevated);
		color: var(--color-text-accent);
	}

	.mobile-bookmark-tab[aria-expanded="true"] {
		background-color: var(--color-bg-elevated);
		border-bottom-color: transparent;
	}

	.mobile-bookmark-dropdown {
		position: absolute;
		top: 100%;
		right: 0;
		width: 16rem;
		max-width: calc(100vw - 1rem);
		background-color: var(--color-bg-secondary);
		border: 1px solid var(--color-border);
		border-top: none;
		border-right: none;
		border-bottom-right-radius: var(--radius-card);
		border-bottom-left-radius: var(--radius-card);
		box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.12);
		opacity: 0;
		pointer-events: none;
		transform: translateY(-10px);
		transition: opacity 0.25s ease, transform 0.25s ease;
		overflow: hidden;
	}

	.mobile-bookmark-dropdown.is-open {
		opacity: 1;
		pointer-events: auto;
		transform: translateY(0);
	}

	.mobile-bookmark-link {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		padding: 0.85rem 1rem;
		text-decoration: none;
		color: var(--color-text-secondary);
		border-bottom: 1px solid var(--color-border-subtle);
		transition: background-color 0.15s ease, color 0.15s ease;
		min-height: 48px;
	}

	.mobile-bookmark-link:last-child {
		border-bottom: none;
	}

	.mobile-bookmark-link:hover,
	.mobile-bookmark-link:focus {
		background-color: var(--color-bg-elevated);
		color: var(--color-text-accent);
	}

	.mobile-bookmark-link .bookmark-icon {
		flex-shrink: 0;
		width: 1.75rem;
		text-align: center;
		font-family: var(--font-serif);
		font-size: 1.35rem;
		font-weight: 600;
		color: var(--color-text-accent);
		line-height: 1;
	}

	.mobile-bookmark-link .bookmark-label {
		font-family: var(--font-serif);
		font-size: 1rem;
		font-style: italic;
		max-width: none;
		opacity: 1;
		overflow: visible;
		white-space: normal;
	}

	/* 3. Table of Contents */
	.book-toc {
		padding: 1.75rem 0;
		margin-block: 2rem;
	}

	.toc-header {
		font-size: 1rem;
		margin-bottom: 1.5rem;
	}

	.toc-list {
		gap: 0.75rem;
	}

	.toc-row {
		align-items: flex-start;
		font-size: 0.95rem;
		line-height: 1.35;
	}

	.toc-title {
		white-space: normal;
		padding-right: 0.35rem;
		flex-shrink: 1;
		min-width: 0;
	}

	.toc-dots {
		display: none;
	}

	.toc-target {
		padding-left: 0.5rem;
		flex-shrink: 0;
	}

	/* 4. Body text */
	.text-justify {
		text-align: left !important;
	}

	/* 5. Bibliography */
	.book-bibliography {
		gap: 1.25rem;
	}

	.bib-entry {
		text-align: left;
	}

	.bib-meta-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
		margin-left: 0;
	}

	.bib-action-link {
		font-size: 0.95rem;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}

	.citation-box {
		padding: 0.75rem;
	}

	.citation-output {
		padding: 0.6rem 0.75rem;
		font-size: 0.8rem;
	}

	/* 6. Book plates / iframes */
	iframe,
	img,
	video,
	svg {
		max-width: 100%;
	}

	.plate-frame {
		aspect-ratio: 16 / 10;
	}

	/* 7. Forms */
	input,
	textarea,
	select {
		font-size: 16px !important;
	}

	/* 8. Contact plate */
	#contact .flex.flex-col {
		align-items: center;
		text-align: center;
	}
}
