/*
Theme Name:   TH Swiss
Theme URI:    https://tobiasherold.de
Description:  Swiss-Style-Child-Theme für Ollie. Schwarz-Weiß-Raster, Inter als einzige Schrift, Swiss Red als einziger Akzent, alles eckig. Persönlicher R&D-Blog von Tobias Herold.
Author:       Tobias Herold
Author URI:   https://tobiasherold.de
Template:     ollie
Version:      1.0.0
Requires at least: 6.7
Tested up to: 7.0.2
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Tags:         blog, portfolio, one-column, two-columns, block-patterns, block-styles, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, full-width-template, style-variations, template-editing, wide-blocks, translation-ready
Text Domain:  th-swiss
*/

/* ============================================================
   1. Token-Aliase
   Einzige Quelle der Werte ist theme.json. Hier nur Kurznamen,
   damit das Markup aus dem Claude-Design-Entwurf 1:1 passt.
   ============================================================ */
:root {
	--paper:    var(--wp--preset--color--base);
	--ink:      var(--wp--preset--color--main);
	--muted:    var(--wp--preset--color--secondary);
	--accent:   var(--wp--preset--color--primary);
	--accent-on:var(--wp--preset--color--primary-accent);
	--focus:    var(--wp--preset--color--primary);
	--rule:     var(--wp--preset--color--main);
	--rule-s:   var(--wp--preset--color--border-light);
	--tint:     var(--wp--preset--color--tertiary);
	--tint-red: var(--wp--preset--color--tint-red);
	--tint-dark:var(--wp--preset--color--tint-dark);
	--tint-ink: var(--wp--preset--color--main-accent);
}

/* ============================================================
   2. Globale Swiss-Regeln (unverrückbar)
   ============================================================ */

/* Alles eckig. Keine Ausnahme. */
* { border-radius: 0 !important; }

html, body {
	background: var(--paper);
	color: var(--ink);
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-feature-settings: 'ss01';
}

/* Keine Verläufe, keine Schatten. */
* { box-shadow: none; }

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

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

input, button, textarea, select { font: inherit; }

img, svg, video { max-width: 100%; height: auto; }

/* Links: schwarz, roter Unterstrich, Hover Swiss Red */
.wp-site-blocks a:where(:not(.wp-element-button):not(.wp-block-button__link)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	text-decoration-color: var(--accent);
}

/* Separator: eine durchgezogene 1px-Linie in Ink.
   WordPress-Core setzt zusätzlich border-bottom und height, das muss weg. */
.wp-block-separator:not(.is-style-dots),
.wp-block-separator.has-background:not(.is-style-dots) {
	border-bottom: 0;
	border-left: 0;
	border-right: 0;
	height: 0;
	opacity: 1;
}
.wp-block-separator:not(.has-background) {
	background: none;
	color: var(--ink);
}

/* Skip-Link */
.th-skip {
	position: fixed; top: 8px; left: 8px; z-index: 100;
	background: var(--ink); color: var(--paper);
	padding: 10px 14px; font-size: 13px; font-weight: 500;
	text-decoration: none;
	transform: translateY(-140%);
	transition: transform .15s ease;
}
.th-skip:focus-visible { transform: translateY(0); }

.screen-reader-text, .th-sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   3. Typo-Utilities
   ============================================================ */

.th-display {
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: var(--wp--custom--line-height--none);
}

.th-label {
	font-weight: 500;
	font-size: 12px;
	letter-spacing: var(--wp--custom--letter-spacing--label);
	line-height: 1.3;
	text-transform: uppercase;
}

/* Block-Label: kleines Kapitälchen-Label mit Unterstrich */
.th-block-label {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--caps);
	text-transform: uppercase;
	padding-bottom: 10px;
	border-bottom: 1px solid currentColor;
	opacity: .85;
}

/* Roter Marker-Unterstrich, bleibt bei Zeilenumbruch lesbar */
.th-mark {
	display: inline;
	background-image: linear-gradient(var(--accent), var(--accent));
	background-repeat: no-repeat;
	background-size: 100% 0.12em;
	background-position: 0 100%;
}

/* Tabellarische Ziffern für Zähler, Meta, Stats */
.th-nums { font-variant-numeric: tabular-nums; }

/* ============================================================
   4. Raster und Flächen
   ============================================================ */

.th-rule    { border-color: var(--rule) !important; }
.th-rule-s  { border-color: var(--rule-s) !important; }

.th-block-pad { padding: 36px 40px; }
@media (max-width: 781px) { .th-block-pad { padding: 28px 24px; } }

/* Tint-Varianten */
.th-tint        { background: var(--tint); color: var(--ink); }
.th-tint-red    { background: var(--tint-red); color: var(--tint-ink); }
.th-tint-dark   { background: var(--tint-dark); color: var(--paper); }
.th-tint-accent { background: var(--accent); color: var(--accent-on); }

.th-tint .th-block-label,
.th-tint-red .th-block-label { color: var(--accent); border-color: var(--accent); opacity: 1; }

.th-tint-dark,
.th-tint-dark :where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,cite,figcaption) { color: var(--paper); }
.th-tint-dark .th-block-label { color: var(--paper); border-color: var(--paper); }
.th-tint-dark a { color: var(--paper); text-decoration-color: var(--paper); }

.th-tint-accent,
.th-tint-accent :where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,cite,figcaption) { color: var(--accent-on); }
.th-tint-accent .th-block-label { color: var(--accent-on); border-color: var(--accent-on); }
.th-tint-accent a { color: var(--accent-on); text-decoration: none; }

/* ============================================================
   5. Fließtext (Reading-Spalte)
   ============================================================ */

.th-prose :where(p, li) {
	max-width: 62ch;
	line-height: var(--wp--custom--line-height--relaxed);
	text-wrap: pretty;
	hyphens: manual;
}

/* Die Lesespalte bricht bei 62ch um, bleibt aber linksbündig.
   Ohne das zentriert das constrained-Layout die schmaleren Absätze. */
/* Das constrained-Layout von WordPress zentriert alles, was schmaler ist als
   die Content-Breite. Die Lesespalte soll aber linksbündig am Raster kleben. */
.th-prose :where(p, ul, ol, figure, blockquote, pre, dl, table),
.th-lead {
	margin-left: 0 !important;
	margin-right: auto !important;
}
.th-prose :where(h2) { margin-top: 2.4em; margin-bottom: .5em; }
.th-prose :where(h3) { margin-top: 1.8em; margin-bottom: .4em; }

/* Listen mit Swiss-Red-Quadrat statt Punkt */
.th-prose ul:not(.wp-block-navigation__container) {
	list-style: none;
	padding-left: 0;
	max-width: 62ch;
}
.th-prose ul:not(.wp-block-navigation__container) > li {
	position: relative;
	padding-left: 1.2em;
}
.th-prose ul:not(.wp-block-navigation__container) > li::before {
	content: '';
	position: absolute; left: 0; top: .62em;
	width: 10px; height: 10px;
	background: var(--accent);
}

/* ============================================================
   6. Navigation (Header)
   ============================================================ */

.th-nav .wp-block-navigation-item__content {
	position: relative;
	padding: 8px 0;
	color: var(--muted);
	transition: color .12s ease;
}
.th-nav .wp-block-navigation-item__content:hover { color: var(--ink); }
.th-nav .wp-block-navigation-item__content:hover::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
	height: 2px; background: var(--ink);
}
.th-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.th-nav .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--ink);
	font-weight: 700;
}
.th-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after,
.th-nav .wp-block-navigation-item__content[aria-current="page"]::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
	height: 3px; background: var(--accent);
}

/* Sticky Header */
.th-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--paper);
}

/* TH-Logomark */
.th-logomark {
	display: block;
	flex-shrink: 0;
	line-height: 0;
	text-decoration: none;
}
.th-logomark svg { display: block; width: 28px; height: 28px; }

/* Eintragszähler rechts im Header.
   Hier stand im Entwurf der Sprachumschalter DE·EN. Der kommt zurück,
   sobald WordPress Mehrsprachigkeit mitbringt. */
.th-header-counter { white-space: nowrap; }

/* Auf kleinen Viewports weicht die Meta-Spalte, das Burger-Menü bleibt */
@media (max-width: 600px) {
	.th-header-meta { display: none; }
}

/* ============================================================
   7. Footer
   ============================================================ */

.th-widget-title {
	display: inline-block;
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.01em;
	color: var(--ink);
	text-transform: none;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--ink);
	margin-bottom: 18px;
}

/* Footer-Listen ohne Aufzählungszeichen */
.th-footer-list {
	list-style: none;
	padding-left: 0;
	margin-bottom: 0;
}
.th-footer-list li { margin-bottom: 8px; }
.th-footer-list li:last-child { margin-bottom: 0; }

.th-footer-nav .wp-block-navigation-item__content,
.th-footer a { text-decoration: none; }
.th-footer-nav .wp-block-navigation-item__content:hover,
.th-footer-nav .wp-block-navigation-item__content:focus-visible,
.th-footer a:hover,
.th-footer a:focus-visible {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* ============================================================
   7b. Masthead und Meta-Listen
   ============================================================ */

.th-display-hero {
	font-weight: 700;
	font-size: clamp(56px, 10vw, 152px);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: 0.92;
}

/* Der große Zähler links im Masthead */
.th-numeral {
	font-size: clamp(64px, 9vw, 128px);
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: 0.92;
	font-variant-numeric: tabular-nums;
}

/* Lead-Absatz unter dem Titel */
.th-lead {
	max-width: 58ch;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: var(--wp--custom--letter-spacing--body);
}

/* Meta-Liste als zweispaltiges Raster, Label links, Wert rechts */
.th-meta-list { display: grid; row-gap: 6px; }
.th-meta-list > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
/* Zeilen ohne Wert (etwa Tags, die nicht gesetzt sind) fallen weg */
.th-meta-row:not(:has(.th-meta-val:not(:empty))):not(:has(time)):not(:has(a)) { display: none !important; }
.th-meta-row {
	display: grid !important;
	grid-template-columns: auto 1fr;
	gap: 6px 24px;
	font-size: 14px;
	align-items: baseline;
}
.th-meta-row > * { margin: 0 !important; }
.th-meta-key { font-weight: 500; }
.th-meta-val { text-transform: none; letter-spacing: 0; }
.th-meta-val a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* ============================================================
   7c. Eintragsliste (Blog-Archiv, Startseite, weitere Einträge)
   ============================================================ */

.th-entry-list { list-style: none; padding-left: 0; margin: 0; }
.th-entry-list > li { margin: 0; }
.th-entry-list > li::before { content: none !important; }

.th-entry-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px 24px;
	padding: 32px 16px;
	margin: 0 -16px;
	border-bottom: 1px solid var(--rule-s);
	transition: background-color .12s ease;
}
.th-entry-list > li:first-child .th-entry-row { border-top: 1px solid var(--rule-s); }
.th-entry-row:hover { background: #ebe8e1; }
.th-entry-row:hover :where(a, p, time) { color: #000000; }

.th-entry-num { font-variant-numeric: tabular-nums; }
.th-entry-num::before { content: '//'; }

.th-entry-title {
	font-weight: 700;
	font-size: clamp(24px, 3vw, 36px);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: 1.05;
}
.th-entry-title a { text-decoration: none; }
.th-entry-sub { max-width: 56ch; }

@media (min-width: 782px) {
	.th-entry-row {
		grid-template-columns: 1fr 7fr 2fr 2fr;
		align-items: start;
	}
	.th-entry-cat, .th-entry-date { align-self: end; }
	.th-entry-date { text-align: right; }
}

/* Kategoriefilter als Chip-Leiste */
.th-catfilter .wp-block-categories {
	list-style: none;
	padding-left: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 32px;
}
.th-catfilter .wp-block-categories li { margin: 0; }
.th-catfilter .wp-block-categories li::before { content: none !important; }
.th-catfilter .wp-block-categories a {
	position: relative;
	display: inline-block;
	padding: 6px 0;
	font-size: 14px;
	color: var(--muted);
	text-decoration: none;
	transition: color .12s ease;
}
.th-catfilter .wp-block-categories a:hover { color: var(--ink); }
.th-catfilter .wp-block-categories a:hover::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: 0;
	height: 2px; background: var(--ink);
}
.th-catfilter .wp-block-categories .current-cat > a { color: var(--ink); font-weight: 700; }
.th-catfilter .wp-block-categories .current-cat > a::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: 0;
	height: 3px; background: var(--accent);
}

/* Sticky Filterleiste unter dem Header */
.th-filterbar { position: sticky; top: 72px; z-index: 30; }

/* ============================================================
   7d. Artikel-Layout mit TOC-Schiene
   ============================================================ */

.th-article-grid { display: block; }
.th-rail { display: none; }

@media (min-width: 1024px) {
	.th-article-grid {
		display: grid;
		grid-template-columns: 220px minmax(0, 1fr);
		gap: 48px;
		align-items: start;
	}
	.th-rail { display: block; }
	.th-rail-inner { position: sticky; top: 104px; }
}

.th-toc-title { margin: 0 0 8px; color: var(--muted); }
.th-toc-list { list-style: none; padding-left: 0; margin: 0; }
.th-toc-list li { margin: 0; }
.th-toc-list li::before { content: none !important; }
.th-toc-list a {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 12px;
	padding: 8px 0;
	border-top: 1px solid var(--rule-s);
	font-size: 13px;
	color: var(--muted);
	text-decoration: none;
}
.th-toc-list li:last-child a { border-bottom: 1px solid var(--rule-s); }
.th-toc-list a[aria-current="true"] { color: var(--ink); font-weight: 500; }
.th-toc-list a[aria-current="true"] .th-toc-num { color: var(--accent); }
.th-toc-num { font-weight: 500; font-variant-numeric: tabular-nums; }

.th-reading-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-top: 24px;
	padding: 8px 12px;
	font-size: 12px;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--ink);
	cursor: pointer;
	transition: background-color .12s ease, color .12s ease;
}
.th-reading-toggle:hover { background: var(--ink); color: var(--paper); }

/* ============================================================
   7e. Anmerkung des Architekten
   ============================================================ */

.th-note-mark { flex-shrink: 0; width: 56px; height: 56px; display: block; }
.th-note-name .has-secondary-color { color: var(--muted) !important; }
.th-note-bio { max-width: 58ch; }

.th-note-contact {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-items: start;
}
.th-note-contact > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.th-note-contact-item > * { margin-left: 0 !important; }
@media (min-width: 782px) {
	.th-note-contact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ============================================================
   7f. Swiss-Bausteine
   ============================================================ */

/* Aside: Label und Titel links, Inhalt rechts, auf getönter Fläche */
.th-aside { margin-top: var(--wp--preset--spacing--large); margin-bottom: var(--wp--preset--spacing--large); }
.th-aside .th-aside-title {
	font-weight: 700;
	font-size: 24px;
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: 1.1;
	margin-top: 16px;
}
.th-aside :where(p) { max-width: 62ch; }

/* Prinzipien: nummeriertes Raster */
.th-principles {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--medium);
}
@media (min-width: 782px) {
	.th-principles.is-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.th-principles.is-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.th-principles.is-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.th-principle {
	border-top: 1px solid var(--ink);
	padding-top: 16px;
}
.th-principle > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.th-principle-num {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--label);
	color: var(--accent);
	font-variant-numeric: tabular-nums;
	margin-bottom: 12px !important;
}
.th-principle-title {
	font-weight: 700;
	font-size: 20px;
	letter-spacing: var(--wp--custom--letter-spacing--heading);
	line-height: 1.15;
	margin-bottom: 8px !important;
}
.th-principle-text { font-size: 15px; line-height: 1.5; max-width: 42ch; }

/* Kennzahlen */
.th-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--medium);
	border-top: 1px solid var(--ink);
	border-bottom: 1px solid var(--ink);
	padding-top: var(--wp--preset--spacing--medium);
	padding-bottom: var(--wp--preset--spacing--medium);
	margin-top: var(--wp--preset--spacing--large);
	margin-bottom: var(--wp--preset--spacing--large);
}
@media (min-width: 782px) { .th-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.th-stat > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.th-stat-value {
	font-weight: 700;
	/* Skaliert mit der Kachelbreite, damit auch lange Werte nicht überlaufen */
	font-size: clamp(28px, 3.4vw, 56px);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: 0.95;
	overflow-wrap: break-word;
	hyphens: none;
	font-variant-numeric: tabular-nums;
}
.th-stat-label { font-size: 14px; line-height: 1.4; max-width: 22ch; margin-top: 16px !important; }

/* Spezifikations-Tabelle */
.th-spec { width: 100%; border-collapse: collapse; }
.th-spec th, .th-spec td {
	text-align: left;
	padding: 16px 0;
	font-size: 15px;
	border-bottom: 1px solid var(--rule-s);
	vertical-align: top;
}
.th-spec th {
	font-size: 13px;
	font-weight: 500;
	color: var(--muted);
	width: 34%;
	padding-right: 24px;
}

/* Querverweise mit Pfeil */
.th-crossref { list-style: none; padding-left: 0; margin: 0; }
.th-crossref li { margin: 0; border-top: 1px solid var(--rule-s); }
.th-crossref li:last-child { border-bottom: 1px solid var(--rule-s); }
.th-crossref li::before { content: none !important; }
.th-crossref a {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 16px;
	align-items: baseline;
	padding: 16px;
	margin: 0 -16px;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--heading);
	text-decoration: none;
	transition: background-color .12s ease;
}
.th-crossref a::after {
	content: '→';
	color: var(--accent);
	font-weight: 400;
	transition: transform .12s ease;
}
.th-crossref a:hover { background: var(--tint); }
.th-crossref a:hover::after { transform: translateX(4px); }

/* FAQ als natives details-Element, kein JavaScript nötig */
.th-faq { border-top: 1px solid var(--ink); }
.th-faq .wp-block-details {
	border-bottom: 1px solid var(--rule-s);
	padding: 0;
}
.th-faq .wp-block-details summary {
	padding: 20px 0;
	font-size: 18px;
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--heading);
	list-style: none;
	cursor: pointer;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 16px;
	align-items: baseline;
}
.th-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.th-faq .wp-block-details summary::after {
	content: '+';
	color: var(--accent);
	font-weight: 400;
	font-size: 22px;
	line-height: 1;
}
.th-faq .wp-block-details[open] summary::after { content: '−'; }
.th-faq .wp-block-details > :not(summary) { padding-bottom: 20px; }
.th-faq .wp-block-details p { max-width: 62ch; margin-top: 0; }

/* Handlungsaufforderung am Seitenende */
.th-cta { margin-top: var(--wp--preset--spacing--large); }
.th-cta .th-cta-title {
	font-weight: 700;
	font-size: clamp(32px, 5vw, 56px);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: 1;
}

/* ============================================================
   7f2. Weitere Bausteine
   ============================================================ */

/* Bild mit Fig.-Label */
.th-photograph { margin: var(--wp--preset--spacing--large) 0; }
.th-photograph-img img { width: 100%; object-fit: cover; }
.th-photograph-caption { max-width: 62ch; }

/* Pull-Quote */
.th-pullquote { margin: var(--wp--preset--spacing--large) 0; }
.th-pullquote-text {
	font-weight: 700;
	font-size: clamp(28px, 4vw, 56px);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: 1.05;
	max-width: none !important;
}

/* Code mit Kopfzeile */
.th-code-specimen { margin: var(--wp--preset--spacing--large) 0; }
.th-code-head {
	border-bottom: 1px solid var(--ink);
	padding-bottom: 8px;
	margin-bottom: 0;
	gap: 16px;
}
.th-code-specimen .wp-block-code { margin-top: 0; border-top: 0; }
.th-code-caption { max-width: 62ch; }

/* Zeitachse */
.th-timeline {
	border-top: 1px solid var(--ink);
	margin: var(--wp--preset--spacing--large) 0;
}
.th-timeline-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4px 24px;
	padding: 20px 0;
	border-bottom: 1px solid var(--rule-s);
}
@media (min-width: 600px) {
	.th-timeline-row { grid-template-columns: 100px minmax(0, 1fr); gap: 24px; align-items: start; }
}
.th-timeline-row > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.th-timeline-year {
	font-weight: 700;
	font-size: 20px;
	letter-spacing: var(--wp--custom--letter-spacing--heading);
	color: var(--accent);
	font-variant-numeric: tabular-nums;
}
.th-timeline-body > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.th-timeline-title { font-weight: 700; font-size: 18px; letter-spacing: var(--wp--custom--letter-spacing--heading); margin-bottom: 4px !important; }
.th-timeline-text { font-size: 15px; line-height: 1.5; max-width: 62ch; }

/* Leistungs-Raster */
.th-features {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--medium);
	margin: var(--wp--preset--spacing--large) 0;
}
@media (min-width: 782px) {
	.th-features.is-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.th-features.is-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.th-features.is-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.th-feature { border-top: 1px solid var(--ink); padding-top: 16px; }
.th-feature > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.th-feature-glyph { font-size: 20px; line-height: 1; color: var(--accent); margin-bottom: 16px !important; }
.th-feature-title { font-weight: 700; font-size: 20px; letter-spacing: var(--wp--custom--letter-spacing--heading); line-height: 1.15; margin-bottom: 8px !important; }
.th-feature-text { font-size: 15px; line-height: 1.5; max-width: 42ch; }

/* Preis-Stufen */
.th-pricing {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--medium);
	margin: var(--wp--preset--spacing--large) 0;
}
@media (min-width: 782px) { .th-pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.th-tier {
	border: 1px solid var(--rule-s);
	padding: 28px 24px;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.th-tier.is-highlight { border-color: var(--ink); border-width: 2px; }
.th-tier > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }

.th-tier-badge {
	display: inline-block;
	align-self: start;
	background: var(--accent);
	color: var(--paper);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--caps);
	text-transform: uppercase;
	padding: 4px 10px;
	margin-bottom: 16px !important;
}
.th-tier-name {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--label);
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 8px !important;
}
.th-tier-price {
	font-weight: 700;
	font-size: clamp(28px, 3vw, 40px);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: 1;
	margin-bottom: 8px !important;
}
.th-tier-note { font-size: 14px; line-height: 1.4; margin-bottom: 20px !important; }
.th-tier-list {
	list-style: none;
	padding-left: 0;
	font-size: 15px;
	line-height: 1.5;
	border-top: 1px solid var(--rule-s);
	margin-bottom: 24px !important;
	flex: 1;
}
.th-tier-list li {
	padding: 10px 0;
	border-bottom: 1px solid var(--rule-s);
	margin: 0;
}
.th-tier-list li::before { content: none !important; }

/* ============================================================
   7g. Projekte
   ============================================================ */

.th-project-grid {
	list-style: none;
	padding-left: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--large) var(--wp--preset--spacing--medium);
}
.th-project-grid > li { margin: 0; }
.th-project-grid > li::before { content: none !important; }

@media (min-width: 600px) { .th-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .th-project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.th-project-thumb { margin-bottom: 16px !important; }
.th-project-thumb img { width: 100%; object-fit: cover; }

.th-project-card-head {
	border-top: 1px solid var(--ink);
	padding-top: 12px;
	gap: 12px;
}

/* Status als Marke, nicht als Link-Liste */
.th-status-badge {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--caps);
	text-transform: uppercase;
}
.th-status-badge a {
	text-decoration: none;
	color: var(--accent);
}
.th-status-badge a::before { content: '■ '; }

.th-project-title {
	font-weight: 700;
	font-size: clamp(20px, 2.2vw, 26px);
	letter-spacing: var(--wp--custom--letter-spacing--heading);
	line-height: 1.1;
}
.th-project-title a { text-decoration: none; }
.th-project-sub { max-width: 40ch; }

/* Status in der Meta-Liste der Projektseite */
.th-status a { text-decoration: none; color: var(--accent); font-weight: 500; }

/* ============================================================
   8. Reading-Mode
   ============================================================ */

body.reading .th-dim-on-read { opacity: .35; transition: opacity .15s ease; }
body.reading .th-dim-on-read:hover,
body.reading .th-dim-on-read:focus-within { opacity: 1; }
body.reading .th-header {
	background: rgba(255,255,255,0.85);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 1 !important;
}

/* ============================================================
   9. Progress-Bar
   ============================================================ */

#th-progress {
	position: fixed; top: 0; left: 0; right: 0;
	height: 2px; z-index: 60;
	pointer-events: none;
}
#th-progress::after {
	content: ''; display: block; height: 100%;
	width: var(--pct, 0%);
	background: var(--accent);
	transition: width .06s linear;
}

/* ============================================================
   10. Microanimations (nur wenn erwünscht)
   ============================================================ */

/* Einblenden beim Hereinscrollen. Die Klasse setzt das JavaScript,
   deshalb sieht niemand ohne JavaScript einen leeren Kasten. */
.th-reveal {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .45s ease, transform .45s ease;
}
.th-reveal.is-visible { opacity: 1; transform: none; }

/* Bilder blenden auf, sobald sie geladen sind */
.th-img-fade {
	opacity: 0;
	transition: opacity .35s ease;
}
.th-img-fade.is-geladen { opacity: 1; }

/* Verweis-Zeilen ziehen den Unterstrich auf, statt ihn zu schalten */
.th-prose a:where(:not(.wp-element-button)) {
	background-image: linear-gradient(var(--accent), var(--accent));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: background-size .2s ease;
	text-decoration-color: transparent;
}
.th-prose a:where(:not(.wp-element-button)):hover,
.th-prose a:where(:not(.wp-element-button)):focus-visible {
	background-size: 100% 1px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
	.th-reveal { opacity: 1; transform: none; }
}
