/* Hubweite Seitenhierarchie
 *
 * Primäre page-tabs stehen vor dem Seitenkopf. Untergeordnete Bereiche verwenden
 * section-tabs. Die Typografie des Seitenkopfs wird hier absichtlich zuletzt
 * geladen, damit einzelne Module nicht wieder eigene Titelgrößen erfinden.
 */
.page .page-header {
    margin-bottom: .78rem;
    gap: .5rem .75rem;
}

.page .page-header > h1,
.page .page-header > h2,
.page .page-header > div:first-child > h1,
.page .page-header > div:first-child > h2,
.page .page-header .page-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 400;
    line-height: 1.2;
}

.page .page-header > div:first-child > p,
.page .page-header > div:first-child > .muted {
    margin-top: .28rem;
    margin-bottom: 0;
}

.page .page-tabs {
    margin-top: 0;
    margin-bottom: .72rem;
}

.page .page-tab {
    min-height: 2.72rem;
    padding-top: .58rem;
    padding-bottom: .54rem;
    font-size: .92rem;
    font-weight: 400;
}

.page .page-tabs + .page-header {
    margin-top: 0;
}

/* Zweite Navigationsebene: kompakter und sichtbar nachrangig. */
.page .section-tabs {
    margin-top: .08rem;
    margin-bottom: .75rem;
}

.page .section-tab {
    font-weight: 400;
}

@media (max-width: 700px) {
    .page .page-header > h1,
    .page .page-header > h2,
    .page .page-header > div:first-child > h1,
    .page .page-header > div:first-child > h2,
    .page .page-header .page-title {
        font-size: 1.38rem;
    }

    .page .page-tab {
        min-height: 2.55rem;
        padding-inline: .78rem;
        font-size: .88rem;
    }
}


/* 2026-10-28: Konsistente Linkfarben und Schriftvererbung.
 * Explizite link/visited-Regeln schützen die Hub-Navigation und Aktionen
 * vor Browser-Standardfarben, wenn andere Stylesheets Links übersteuern.
 * Druckansichten sind davon ausdrücklich ausgenommen. */
@media screen {
    html body,
    html body .page {
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    html body .page a:link,
    html body .page a:visited {
        color: var(--color-primary, #3f4b5d) !important;
        text-decoration: none !important;
    }
    html body .page a:hover,
    html body .page a:focus-visible {
        text-decoration: underline !important;
    }

    /* Textartige Personenlinks sind gerade keine bunten Standardlinks. */
    html body .page a.entity-text-link:link,
    html body .page a.entity-text-link:visited {
        color: inherit !important;
    }

    /* Farbige Aktionsflächen behalten lesbare Schrift. */
    html body .page a.button:link,
    html body .page a.button:visited {
        color: #fff !important;
        text-decoration: none !important;
    }
    html body .page a.button--secondary:link,
    html body .page a.button--secondary:visited,
    html body .page a.button--quiet:link,
    html body .page a.button--quiet:visited {
        color: var(--color-primary-dark, #2f3948) !important;
    }
    html body .page a.button:hover,
    html body .page a.button:focus-visible {
        text-decoration: none !important;
    }

    /* Pille im Kopfbereich und mobile Navigation. */
    html body .site-nav a.site-nav__link:link,
    html body .site-nav a.site-nav__link:visited,
    html body .site-mobile-nav__menu a:link,
    html body .site-mobile-nav__menu a:visited {
        color: #fff !important;
        text-decoration: none !important;
    }
    html body .site-nav__dropdown-menu a:link,
    html body .site-nav__dropdown-menu a:visited {
        color: var(--color-text, #252b36) !important;
        text-decoration: none !important;
    }
    html body .site-nav a.site-nav__link:hover,
    html body .site-nav a.site-nav__link:focus-visible {
        color: var(--color-accent-yellow, #ffd200) !important;
    }

    /* Navigationsreiter sind keine gewöhnlichen Textlinks. */
    html body .page a.page-tab:link,
    html body .page a.page-tab:visited,
    html body .page a.section-tab:link,
    html body .page a.section-tab:visited {
        color: var(--color-muted, #6f7682) !important;
        text-decoration: none !important;
    }
    html body .page a.page-tab:hover,
    html body .page a.section-tab:hover,
    html body .page a.page-tab.is-active,
    html body .page a.section-tab.is-active,
    html body .page a.page-tab[aria-current="page"],
    html body .page a.section-tab[aria-current="page"] {
        color: var(--color-primary-dark, #2f3948) !important;
        text-decoration: none !important;
    }
    html body .page .page-header__navigation a:link,
    html body .page .page-header__navigation a:visited {
        color: var(--color-muted, #6f7682) !important;
        text-decoration: none !important;
    }
    html body .page .page-header__navigation a:hover {
        color: var(--color-primary-dark, #2f3948) !important;
        text-decoration: underline !important;
    }

    /* Statusmarkierungen und Icon-Aktionen behalten ihre eigenen Farben. */
    html body .page a.event-hint:link,
    html body .page a.event-hint:visited,
    html body .page a.badge:link,
    html body .page a.badge:visited,
    html body .page a.icon-action:link,
    html body .page a.icon-action:visited {
        color: inherit !important;
        text-decoration: none !important;
    }
}
