/* Keep the same mobile header offset on every page. */
@media (max-width: 767px) {
  [data-site-header] {
    margin-top: 24px;
  }
}

@media (max-width: 410px) {
  [data-site-header],
  [data-header-shell] dialog.site-search {
    max-width: 100vw;
  }

  [data-site-header] {
    padding-inline: clamp(8px, calc(40vw - 120px), 20px);
  }

  [data-site-header] [data-header-shell] {
    gap: 4px;
    padding-inline: 8px;
  }

  [data-header-shell] > a {
    min-width: 0;
    flex-shrink: 1;
  }

  [data-header-shell] > a > img {
    max-width: 100%;
  }

  [data-header-shell] > :last-child {
    column-gap: 0;
  }

  [data-header-shell] :is(.header-social, [data-site-search-open], [data-language-trigger], button[aria-haspopup="dialog"][aria-expanded]) {
    /* Fit five controls on narrow foldable covers, with 44px targets from 320px. */
    width: clamp(36px, calc(20vw - 20px), 44px);
    padding-inline: 0;
  }
}
