/**
 * SBV Navigation Typography 0.10.8
 * Balanced type sizing for desktop, tablet and smartphone navigation.
 * Loaded after the general typography and mobile UX layers on purpose.
 */

/* Desktop: the 88px header benefits from a clear 16px primary navigation. */
@media (min-width: 82.001rem) {
  body.sbv-site .sbv-primary-nav__link {
    font-size: 1rem !important; /* 16px */
    font-weight: var(--sbv-weight-semibold) !important;
    line-height: 1.25;
    letter-spacing: 0 !important;
  }
}

/* Compact desktop / notebook: preserve space without dropping below 15px. */
@media (min-width: 64.001rem) and (max-width: 82rem) {
  body.sbv-site .sbv-primary-nav__link {
    font-size: .9375rem !important; /* 15px */
    font-weight: var(--sbv-weight-semibold) !important;
    line-height: 1.25;
    letter-spacing: 0 !important;
  }
}

/* Tablet + phone drawer: calmer top level, stronger sub navigation. */
@media (max-width: 64rem) {
  body.sbv-site .sbv-mobile-nav__item > a,
  body.sbv-site .sbv-mobile-nav summary {
    min-height: 4.5rem;
    padding-block: .8rem;
    font-family: var(--sbv-font-primary) !important;
    font-size: clamp(1.3125rem, 1.16rem + .55vw, 1.5rem) !important; /* ~21–24px */
    font-weight: 700 !important;
    line-height: 1.15 !important;
    letter-spacing: -.008em !important;
  }

  body.sbv-site .sbv-mobile-nav__number {
    font-size: .8125rem !important; /* 13px */
    line-height: 1;
  }

  body.sbv-site .sbv-mobile-nav__overview {
    min-height: 3rem;
    font-size: .9375rem !important; /* 15px */
    font-weight: 600 !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
  }

  body.sbv-site .sbv-mobile-nav__sublist .sbv-mobile-nav__item > a {
    min-height: 3rem;
    padding-block: .55rem;
    font-size: 1rem !important; /* 16px */
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
  }

  body.sbv-site .sbv-mobile-utility__link {
    min-height: 3.375rem; /* 54px touch target */
    font-size: 1rem !important; /* 16px */
    line-height: 1.35 !important;
  }

  body.sbv-site .sbv-mobile-utility-group__label,
  body.sbv-site .sbv-mobile-drawer__title {
    font-size: .875rem !important; /* 14px */
    line-height: 1.4 !important;
  }
}

/* Small phones: keep hierarchy compact enough for long German labels. */
@media (max-width: 40rem) {
  body.sbv-site .sbv-mobile-nav__item > a,
  body.sbv-site .sbv-mobile-nav summary {
    min-height: 4.25rem;
    font-size: 1.3125rem !important; /* 21px */
    line-height: 1.18 !important;
  }

  body.sbv-site .sbv-mobile-nav__sublist .sbv-mobile-nav__item > a,
  body.sbv-site .sbv-mobile-utility__link {
    font-size: 1rem !important;
  }
}

/* Very narrow phones: allow wrapping rather than shrinking text further. */
@media (max-width: 22.5rem) {
  body.sbv-site .sbv-mobile-nav__label {
    align-items: flex-start;
  }

  body.sbv-site .sbv-mobile-nav__label > span:last-child,
  body.sbv-site .sbv-mobile-utility__label {
    overflow-wrap: anywhere;
  }
}

@media (forced-colors: active) {
  body.sbv-site .sbv-primary-nav__link,
  body.sbv-site .sbv-mobile-nav__item > a,
  body.sbv-site .sbv-mobile-nav summary {
    forced-color-adjust: auto;
  }
}
