/* Shared header sizing must follow its content, including enlarged text. */
@media screen {
  body[data-site-theme] .site-header {
    height: auto !important;
    min-height: 88px;
  }
  body[data-site-theme] .site-header .brand {
    min-width: 0;
    max-width: 100%;
  }
  body[data-site-theme] .site-header .brand .brand-logo {
    max-width: 100%;
    height: auto;
    aspect-ratio: 1880 / 515;
  }
  body[data-site-theme] .site-header :is(.menu,.motion-toggle) {
    min-height: 44px;
    min-width: 44px;
  }
}
@media screen and (max-width: 1180px) {
  body[data-site-theme] .site-header nav {
    top: 100%;
    max-height: 70vh;
    max-height: 70dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-wrap: nowrap;
  }
}
@media screen and (max-width: 600px) {
  body[data-site-theme] .site-header {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(76px,5.5rem);
    gap: 8px 12px;
    padding: 12px 16px;
    align-items: center;
  }
  body[data-site-theme] .site-header .brand {
    grid-column: 1;
    grid-row: 1 / 3;
    margin: 0;
    justify-self: start;
  }
  body[data-site-theme] .site-header .brand .brand-logo {
    width: 180px;
  }
  body[data-site-theme] .site-header .menu {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    padding: 8px;
    font-size: 13px;
  }
  body[data-site-theme] .site-header .motion-toggle {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.4;
  }
  body[data-site-theme] .site-header .header-cta { display: none; }
  /* Avoid automatic form zoom on iPhones; preserve the user's own zoom. */
  body[data-site-theme] main :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) {
    font-size: max(16px,1rem) !important;
  }
}
