/* Theorie views (Topic page + both overviews). Reading layout "Ruhige Spalte" — values in docs/theorie-demo-spec.md. */

@font-face {
	font-family: "Afacad Flux";
	font-style: normal;
	font-weight: 100 1000;
	font-display: swap;
	src: url(../fonts/afacad-flux-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Afacad Flux";
	font-style: normal;
	font-weight: 100 1000;
	font-display: swap;
	src: url(../fonts/afacad-flux-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--th-pink: #da0385;
	--th-ink: #1d1d1f;
	--th-muted: #6b6b70;
	--th-line: #eee;
	--th-border: #e3e3e3;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.theorie {
	margin: 0;
	background: #fff;
	color: var(--th-ink);
	font-family: "Afacad Flux", system-ui, sans-serif;
	font-size: 19px;
	line-height: 1.6;
}
.theorie a { color: inherit; }
.theorie img { max-width: 100%; height: auto; display: block; }

/* Top bar: back link left, logo right. */
.th-bar {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 16px;
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--th-line);
}
.th-bar__back { text-decoration: none; font-weight: 600; font-size: 17px; padding: 8px 0; }
.th-bar__logo { margin-left: auto; }
.th-bar__logo img { height: 40px; width: auto; }
.admin-bar .th-bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .th-bar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .th-bar { top: 0; } }

.th-main { max-width: 34em; margin: 0 auto; padding: 32px 16px 64px; }

/* Chapter label (above a Topic title, and as headings on the overviews). */
.th-chapter {
	color: var(--th-pink);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: 14px;
	line-height: 1.4;
}
.th-title { font-size: 2.1em; line-height: 1.1; font-weight: 800; margin: .2em 0 .1em; }
.th-meta { color: var(--th-muted); font-size: 15px; margin: 0 0 2em; }

/* Topic body — also used inside the accordion. */
.th-body > p:first-child { font-size: 1.12em; }
.th-body h2 { font-size: 1.3em; font-weight: 700; line-height: 1.2; margin: 2em 0 .4em; }
.th-body h3 { font-size: 1.1em; font-weight: 700; line-height: 1.25; margin: 1.6em 0 .3em; }
.th-body blockquote,
.th-body .wp-block-quote {
	margin: 2em 0;
	padding: 0 0 0 1em;
	border: 0;
	border-left: 4px solid var(--th-pink);
	font-size: 1.15em;
	font-weight: 600;
}
.th-body blockquote p { margin: 0; }
.th-body figure { margin: 2em 0; }
.th-body figcaption,
.th-body .wp-element-caption { font-size: .85em; color: var(--th-muted); margin-top: .5em; text-align: left; }
.th-body ul, .th-body ol { padding-left: 1.2em; }
.th-body li { margin: .3em 0; }

/* Previous / next Topic. */
.th-pn { display: grid; gap: 12px; margin-top: 3em; padding-top: 1.5em; border-top: 1px solid var(--th-line); }
.th-pn a { display: block; padding: 14px 16px; border: 1px solid var(--th-border); border-radius: 10px; text-decoration: none; font-weight: 600; line-height: 1.3; }
.th-pn small { display: block; margin-bottom: 2px; color: var(--th-muted); font-size: 14px; font-weight: 400; }

/* Overviews. */
.th-intro { margin-bottom: 2em; }
.th-group { margin-top: 2.2em; }
.th-group > .th-chapter { margin: 0 0 .4em; }
.th-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--th-line); }
.th-list > li { border-bottom: 1px solid var(--th-line); scroll-margin-top: 80px; }
.th-list__link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	text-decoration: none;
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.25;
}
.th-list__link::after { content: "→"; color: var(--th-pink); font-weight: 400; }

/* Accordion variant: native <details>. */
.th-topic { border-bottom: 1px solid var(--th-line); scroll-margin-top: 64px; }
.th-topic > summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	cursor: pointer;
	list-style: none;
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.25;
}
.th-topic > summary::-webkit-details-marker { display: none; }
.th-topic > summary::after { content: "+"; color: var(--th-pink); font-size: 1.4em; font-weight: 400; line-height: 1; }
.th-topic[open] > summary::after { content: "–"; }
.th-topic .th-meta { margin: -.4em 0 1em; }
.th-topic .th-body { padding-bottom: 1.5em; }
.th-topic .th-body h2 { font-size: 1.15em; }

:focus-visible { outline: 2px solid var(--th-pink); outline-offset: 2px; }
