/*
 * Web typography uses the self-hosted variable Albert Sans consistently.
 * Avenir Next remains an optional local fallback. The font file is an unmodified
 * Albert Sans build from Google Fonts / The Albert Sans Project, SIL OFL 1.1.
 * Licence: /fonts/AlbertSans-OFL.txt
 */
@font-face {
  font-family: 'Albert Sans';
  src: url('/fonts/AlbertSans-Variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-main: 'Albert Sans', 'Avenir Next', system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Deliberate review mode retained for old local review links. Albert Sans is
   now also the normal production family. */
body.font-preview-albert {
  --font-main: 'Albert Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Web-Typografierollen. Albert Sans erlaubt die nötigen feinen Zwischenwerte;
   Avenir Next greift nur ein, falls der Webfont technisch nicht geladen wird.
   Farbe und Schriftkonturen werden nicht künstlich aufgehellt oder nachgezogen. */
body {
  font-weight: var(--weight-regular, 400);
  font-variation-settings: 'wght' 365;
}

body :where(p, li, ol, ul, dt, dd, td, a, label, input, select, textarea, button, summary, small) {
  font-weight: var(--weight-regular, 400) !important;
  font-variation-settings: 'wght' 365;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body :where(h1, h2, h3, h4, h5, h6, .hero-claim, .article-subline) {
  font-weight: var(--weight-light, 300) !important;
  font-variation-settings: 'wght' 285;
}

body :where(.title-text, .knowledge-logo) {
  font-weight: var(--weight-regular, 400) !important;
  font-variation-settings: 'wght' 320;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Startseiten-Akkordeons: groß genug für eine bewusst etwas feinere Kontur.
   Der Legacy-Wert 200 bleibt als statischer Notfall-Fallback unangetastet. */
body:not(.knowledge-page) label.cat[for^='tog'],
body:not(.knowledge-page) label.cat[for^='tog']::before,
body:not(.knowledge-page) label.cat[for^='tog'] > :where(h2.cat, h3.cat, p.cat, span.cat) {
  font-variation-settings: 'wght' 300;
}

body :where(
  strong,
  b,
  th,
  .knowledge-overview-zebra__link,
  .knowledge-overview-zebra__title,
  .article-toc__title,
  .article-nav span,
  .article-recommendations__item span,
  .region-links__label,
  .glossary-term-title
) {
  font-weight: var(--weight-medium, 500) !important;
  font-variation-settings: 'wght' 500;
}
