/* Ergänzungen zum Handoff (tokens.css und site.css bleiben 1:1 wie geliefert).
   Lange deutsche Komposita („Anforderungsverwalter“, „Barrierefreiheitsstärkungsgesetz“)
   und lange Linktexte sprengen bei 375 px die Breite. */
h1, h2, .post-teaser__title, .topic__posts a, .post-nav__title {
  hyphens: auto;
  overflow-wrap: break-word;
}
.prose a { overflow-wrap: anywhere; }

/* Auf schmalen Bildschirmen auch Anreißer und Fließtext trennen. */
@media (max-width: 40rem) {
  .lead, .post-teaser__desc, .prose { hyphens: auto; overflow-wrap: break-word; }
}

/* Abweichung vom Styleguide (Wunsch 2026-10-14):
   Hover bei Titeln, Hashtags und Links ist nur eine Unterstreichung, ohne Hintergrund und
   ohne dickere Linie. Active (Drücken) hat keinen eigenen Effekt. Nav-Buttons, Buttons und
   die Vorheriger-Karte behalten ihren Hover-Hintergrund. */
a:hover { text-decoration-thickness: 2px; }
.plain:hover { background: none; text-decoration: underline; }
.site-nav a:hover { text-decoration: none; }
.site-nav a:not([aria-current]):hover { background: var(--color-surface-hover); }

a:active, .plain:active { background: none; color: var(--color-text); }
.tags a:active { color: var(--color-text-muted); }
.prose a:active, .link-accent:active { color: var(--color-accent); }
.btn--primary:active { background: var(--color-accent); color: var(--color-on-accent); }
.btn--primary:hover:active { background: var(--color-accent-hover); }
.btn:hover:active, .post-nav a:hover:active { background: var(--color-surface-hover); }

/* Name oben links: weder Hover- noch Active-Effekt (Fokusrahmen bleibt für Tastatur). */
.site-title:hover, .site-title:active { background: none; color: var(--color-text); text-decoration: none; }

/* Bilder pro Post: dekorativ (alt=""), im Artikel volle Breite, auf der Startseite als flacher Streifen über dem Teaser. */
.post-image { display: block; width: 100%; height: auto; margin: 2rem 0 1.5rem; border-radius: var(--radius-md); }
.post-teaser__image { display: block; width: 100%; height: auto; border-radius: var(--radius-md); margin-bottom: 0.75rem; }

/* Codeblöcke scrollen in sich, statt die Seite zu verbreitern. */
.prose pre { overflow-x: auto; padding: 1rem 1.25rem; border-radius: var(--radius-md); font-size: 1rem; }

/* Code: Systemschrift in Monospace (keine Fremdschrift), Fläche und Rahmen wie Karten. */
.prose code, .prose kbd { font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; font-size: 0.9em; }
.prose :not(pre) > code { padding: 0.1em 0.35em; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text); overflow-wrap: anywhere; }
.prose pre { margin: 1.5rem 0; background: var(--color-surface); border: 1px solid var(--color-border); border-left: 3px solid var(--color-accent); line-height: 1.55; color: var(--color-text); }
.prose pre code { font-size: 0.9rem; }
.prose pre code[data-lang]::before { content: attr(data-lang); display: block; margin-bottom: 0.5rem; color: var(--color-text-muted); font-family: var(--font-sans); font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }
/* Hugo/Chroma-Klassen in den Farben der Bilder */
.chroma .c, .chroma .c1, .chroma .cm, .chroma .ch, .chroma .cs { color: var(--color-text-muted); font-style: italic; }
.chroma .k, .chroma .kd, .chroma .kn, .chroma .kr, .chroma .kt, .chroma .nt, .chroma .o, .chroma .ow { color: #9b8cff; }
.chroma .s, .chroma .s1, .chroma .s2, .chroma .sb, .chroma .sd, .chroma .se, .chroma .sh, .chroma .si, .chroma .sx, .chroma .dl { color: #f2b56b; }
.chroma .nv, .chroma .na, .chroma .nb, .chroma .nf, .chroma .vg, .chroma .vi { color: var(--color-accent); }
.chroma .m, .chroma .mi, .chroma .mf, .chroma .mh, .chroma .kc { color: #f08a8a; }
.chroma .line { display: inline; }

/* Ganzer Teaser klickbar: Der Titel-Link spannt sich über den Eintrag, Hashtags bleiben eigene Links darüber.
   „Lesen →“ ist nur Hinweis (aria-hidden), damit Screenreader keinen doppelten Link hören. */
.post-teaser { position: relative; }
.post-teaser__title::after { content: ""; position: absolute; inset: 0; }
.post-teaser .tags a { position: relative; z-index: 1; }
.post-teaser__title:focus-visible { outline: none; }
.post-teaser:has(.post-teaser__title:focus-visible) { outline: 3px solid var(--color-accent); outline-offset: 4px; border-radius: var(--radius-md); }
.post-teaser__more { margin-left: auto; color: var(--color-accent); font-weight: var(--weight-bold); }
.post-teaser:hover .post-teaser__more { color: var(--color-accent-hover); text-decoration: underline; text-underline-offset: 0.2em; }
.prose table { display: block; max-width: 100%; overflow-x: auto; }
