/* Keep public header controls inside their own layout in both text directions. */
@media (max-width: 600px) {
  .site-header { height: auto; min-height: 112px; }
  .site-header .nav-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: calc(100% - 32px);
    height: auto;
    min-height: 112px;
    padding-block: 10px;
    gap: 8px 12px;
  }
  .site-header .nav-inner > .brand { grid-column: 1; grid-row: 1; min-width: 0; justify-self: start; }
  .site-header .nav-actions { display: contents; }
  .site-header .nav-actions > [data-bm-locale-switcher] {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    max-width: 100%;
    justify-self: start;
  }
  .site-header .nav-actions .bm-locale-trigger { max-width: 100%; min-height: 44px; }
  .site-header .nav-actions > noscript { grid-column: 1 / -1; grid-row: 3; }
  .site-header .nav-actions > noscript .language-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .site-header .nav-actions > .button {
    grid-column: 2;
    grid-row: 2;
    min-height: 44px;
    max-width: 100%;
    padding-inline: 12px;
    font-size: 12px;
    white-space: normal;
    text-align: center;
  }
  .site-header .nav-actions > .mobile-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .site-header .public-nav { top: 100%; max-height: calc(100vh - 128px); max-height: calc(100dvh - 128px); }
  .site-header .public-nav a { white-space: normal; min-height: 44px; }
}

/* The artwork may animate inside its frame, but cannot widen a small viewport. */
@media (max-width: 760px) {
  .hero-art { overflow: hidden; overflow: clip; }
  .hero-art .ambient { max-width: 100%; max-height: 100%; }
  .hero-art .region-card { right: 0; }
  .hero-art .connection-card { left: 0; }
  .final-cta .cta-moon { left: auto; right: auto; inset-inline-end: 0; max-width: 100%; }
}

/* The Electronics header already wraps; retain a gap and tappable controls. */
@media (max-width: 850px) {
  .es-header-inner { column-gap: 12px; }
  .es-header-inner > .es-brand { min-width: 0; }
  .es-header-inner > [data-bm-locale-switcher] { max-width: 100%; }
  .es-header-inner .bm-locale-trigger, .es-header-inner .es-menu-toggle { min-height: 44px; }
}
