/* andreasvongunten 2026 — Editorial-Erweiterung (Longread)
   Quelle: Design-System andreasvongunten.com, guidelines/editorial-erweiterung.md (Juli 2026)
   Einbindung: siehe block-styles.php (wp_enqueue_block_style pro Block oder global fürs Single-Template). */

/* — 2 · Artikel-Typografie — */
.wp-block-post-content { counter-reset: kapitel; }
.wp-block-post-content :is(h1,h2,h3,h4) { font-weight: 500; } /* nur im Beitrag; Wortmarke/UI bleiben 600 */
.wp-block-post-content p { font-size: var(--wp--custom--typography--fs-read, clamp(17px, 15.8px + 0.33vw, 20px)); line-height: 1.7; }
.wp-block-post-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--wp--custom--color--link-underline, rgba(54,90,65,.4));
  text-underline-offset: var(--wp--custom--typography--underline-offset, 0.18em);
  transition: text-decoration-color .16s cubic-bezier(.22,.61,.36,1);
}
.wp-block-post-content a:hover { text-decoration-color: #365A41; }

/* — 3.1 Lede (core/paragraph) — */
.is-style-lede { font-size: var(--wp--custom--typography--fs-lede, clamp(19px, 17.6px + 0.44vw, 22px)) !important; line-height: 1.55 !important; color: #4E4840; font-style: italic; }
/* Luft zum Titel/Eyebrow davor: muss >24px sein (Untermargin des Vorgaenger-Absatzes kollabiert) */
.wp-block-post-content p.is-style-lede { margin-block-start: 32px; }

/* — 3.2 Initiale (core/paragraph) — nie zusammen mit Lede im selben Artikel — */
.is-style-initiale::first-letter { float: left; font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 3.3em; line-height: .83; padding: 6px 12px 0 0; color: #365A41; }

/* — 3.3 Langzitat (core/quote) — koexistiert mit dem Pull-Quote-Stil —
   Selektoren doppelt notiert, damit sie die .avg-prose-blockquote-Regeln (theme.css) übersteuern. */
.avg-prose blockquote.is-style-langzitat, .is-style-langzitat { border-left: 2px solid #365A41; padding: 2px 0 2px 24px; margin: 0 0 24px; font-family: Spectral, Georgia, serif; font-weight: 400; font-style: italic; font-size: var(--wp--custom--typography--fs-read, clamp(17px, 15.8px + 0.33vw, 20px)); line-height: 1.7; color: #4E4840; }
.avg-prose blockquote.is-style-langzitat cite, .is-style-langzitat cite { font-style: normal; font-size: 16px; color: #857B69; }

/* — 3.4 Notiz (core/group) — erstes Kind = Kapitälchen-Tag — */
.is-style-notiz { background: #EAE3D4; border: 1px solid #D9D0BC; border-radius: 12px; padding: 24px; font-size: 16px; line-height: 1.6; }
.is-style-notiz p { font-size: 16px; line-height: 1.6; } /* schlägt die globale Fliesstext-Regel (.wp-block-post-content p) */
.is-style-notiz > :first-child { font-family: Spectral, Georgia, serif; font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #7A5416; margin: 0 0 12px; }

/* — 3.5 Ausblick (core/group) — dunkelgrüne Akzent-Box — */
.is-style-ausblick { background: #365A41; border-radius: 12px; padding: 32px; color: rgba(245,240,230,.92); font-size: 17px; line-height: 1.6; }
.is-style-ausblick p { font-size: 17px; line-height: 1.6; }
.is-style-ausblick :is(h2,h3,h4) { color: #D9A94E; font-weight: 500; margin-top: 0; }
.is-style-ausblick a { color: #7FA98A; text-decoration-color: rgba(127,169,138,.5); }
.is-style-ausblick a:hover { text-decoration-color: #7FA98A; }

/* — 3.6 Spurenliste (core/list) — Eintrag: Link + <em>Beschreibung</em> —
   ul-Selektor doppelt notiert + Bullet-Reset, damit die .avg-prose-Listenregeln (theme.css) nicht durchschlagen. */
.avg-prose ul.is-style-spurenliste, .is-style-spurenliste { list-style: none; padding: 0; margin: 0 0 24px; }
.avg-prose ul.is-style-spurenliste li::before { content: none; }
.avg-prose ul.is-style-spurenliste li, .is-style-spurenliste li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 8px; margin: 0 -8px; border-bottom: 1px solid #D9D0BC; border-radius: 6px; transition: background .16s cubic-bezier(.22,.61,.36,1); }
.avg-prose ul.is-style-spurenliste li:last-child, .is-style-spurenliste li:last-child { border-bottom: none; }
.is-style-spurenliste li:hover { background: rgba(54,90,65,.06); } /* flache Lasur — kein Verlauf */
.is-style-spurenliste a { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 18px; text-decoration: none; color: #221F19; transition: color .16s cubic-bezier(.22,.61,.36,1); }
.is-style-spurenliste a::after { content: '\00A0↗'; color: #365A41; } /* geschütztes Leerzeichen: Pfeil bricht nie allein um */
.is-style-spurenliste li:hover a { color: #365A41; }
.is-style-spurenliste em { font-size: 15px; color: #857B69; text-align: right; flex-shrink: 0; }

/* — 3.7 Tafel (core/image) — Passepartout für Faksimiles/Kunstwerke — */
.is-style-tafel img { background: #F5F0E6; padding: 8px; border: 1px solid #D9D0BC; border-radius: 6px; box-shadow: 0 12px 28px -6px rgba(34,31,25,.18); box-sizing: border-box; }
.is-style-tafel figcaption { font-style: italic; font-size: 14px; color: #857B69; text-align: left; margin-top: 8px; }

/* — 4.1 Kapitelkopf (Pattern) — Nummerierung automatisch via CSS-Counter — */
.avg-kapitelkopf { counter-increment: kapitel; margin-top: 32px; }
.avg-kapitel-zeile { display: flex; align-items: center; gap: 12px; }
.avg-kapitel-ziffer::before { content: counter(kapitel, upper-roman); }
p.avg-kapitel-ziffer, .avg-kapitel-ziffer { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 16px; line-height: 1; color: #365A41; margin: 0; }
p.avg-kapitel-label, .avg-kapitel-label { font-family: Spectral, Georgia, serif; font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #4E4840; margin: 0; }
.avg-kapitel-linie { flex: 1; height: 1px; border: none; background: #D9D0BC; margin: 0; align-self: center; }
.avg-kapitelkopf h2 { margin: 12px 0 0; font-weight: 500; }
/* Abstand Kapitelkopf -> Folgeabsatz: MUSS auf dem Folge-Element sitzen. Absaetze haben oben 0 Margin
   (.avg-prose p, theme.css) — der 1.4rem-Block-Gap greift dort nie, H2-Untermargins kollabieren. */
.wp-block-post-content .avg-kapitelkopf + * { margin-block-start: 16px; }

/* — 4.2 Fassungs-Umschalter (Pattern + fassung.js) — */
.avg-fassung-toggle { display: inline-flex; gap: 4px; background: #EAE3D4; border-radius: 999px; padding: 4px; }
.avg-fassung-toggle .wp-block-button__link { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 16px; line-height: 1.2; padding: 8px 20px; min-height: 36px; border: none; border-radius: 999px; background: transparent; color: #4E4840; cursor: pointer; transition: background .2s cubic-bezier(.22,.61,.36,1), color .2s cubic-bezier(.22,.61,.36,1); }
.avg-fassung-toggle .is-active .wp-block-button__link { background: #365A41; color: #F5F0E6; }
.avg-fassung-toggle .wp-block-button__link:focus-visible { outline: 2px solid #365A41; outline-offset: 2px; box-shadow: 0 0 0 5px rgba(54,90,65,.18); }
/* Ohne JS: beide Fassungen sichtbar. fassung.js blendet die inaktive aus. */
.avg-fassung-panel[hidden] { display: none; }

/* — 4.3 Kolophon (Pattern) — */
.is-style-kolophon, .avg-kolophon { background: #EAE3D4; border-top: 1px solid #B3A992; border-radius: 0 0 12px 12px; padding: 32px; margin-top: 64px; font-size: 16px; line-height: 1.6; }
.is-style-kolophon p, .avg-kolophon p { font-size: 16px; line-height: 1.6; }
.avg-kolophon .avg-kolophon-kopf { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.avg-kolophon h2 { margin: 0; font-size: 22px; font-weight: 500; }
p.avg-status-pill, .avg-status-pill { display: inline-block; font-family: Spectral, Georgia, serif; font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #365A41; border: 1px solid #365A41; border-radius: 999px; padding: 4px 12px; }

/* — 5 · Scroll-Reveal (reveal.js) — Opt-in via Klasse avg-reveal, nur Editorial-Blöcke — */
.avg-reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); }
.avg-reveal.is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .avg-reveal { opacity: 1; transform: none; transition: none; }
  .wp-block-post-content a, .is-style-spurenliste li, .is-style-spurenliste a, .avg-fassung-toggle .wp-block-button__link { transition: none; }
}
