/* Shared header: logo → primary navigation → search → account. */
.site-header > .masthead,
.site-header > .wrap.masthead,
.site-header > .container.masthead {
  gap: 24px;
  min-height: 104px;
  max-width: 1800px;
  justify-content: flex-start;
}
.masthead > .main-nav,
.masthead > .primary-nav {
  width: auto;
  max-width: none;
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  min-height: 52px;
  white-space: nowrap;
  overflow: auto;
}
.masthead > .main-nav > span {
  display: none;
}
.masthead > .main-nav {
  border-top: 0;
}
.masthead > .main-nav a,
.masthead > .primary-nav a {
  font-size: 14px;
  min-height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.masthead > .search,
.masthead > #site-search {
  width: 520px;
  max-width: 520px;
  flex: 0 1 520px;
  margin: 0 0 0 auto;
  order: 0;
}
.masthead > .search input,
.masthead > #site-search input {
  width: 100px;
  min-width: 0;
}
.masthead > .search button,
.masthead > #site-search button {
  padding: 10px 16px;
  white-space: nowrap;
  font-size: 13px;
}
.masthead > .brand strong {
  font-size: 24px;
}
.masthead > .brand small {
  font-size: 12px;
  letter-spacing: 0.5px;
}
.masthead > .account-entry,
.masthead > .account-link {
  font-size: 13px;
  flex: 0 0 auto;
}
.masthead > .account-entry small,
.masthead > .account-link small {
  display: none;
}
.brand-logo {
  max-width: 180px;
  max-height: 56px;
  object-fit: contain;
  display: block;
}
.brand.has-logo > .brand-mark {
  display: none;
}
.brand.has-logo > span:not(.brand-mark) {
  display: none;
}
@media (max-width: 1450px) and (min-width: 1051px) {
  .site-header > .masthead,
  .site-header > .wrap.masthead,
  .site-header > .container.masthead {
    gap: 16px;
  }
  .masthead > .main-nav,
  .masthead > .primary-nav {
    gap: 20px;
  }
  .masthead > .search,
  .masthead > #site-search {
    flex-basis: 440px;
    max-width: 440px;
  }
  .masthead > .account-entry,
  .masthead > .account-link {
    display: block;
  }
  .masthead > .brand strong {
    font-size: 22px;
  }
}
@media (max-width: 1050px) {
  .site-header > .masthead,
  .site-header > .wrap.masthead,
  .site-header > .container.masthead {
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 12px;
  }
  .masthead > .brand {
    order: 0;
  }
  .masthead > .main-nav,
  .masthead > .primary-nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    gap: 28px;
  }
  .masthead > .search,
  .masthead > #site-search {
    order: 1;
    flex: 1;
    width: auto;
    max-width: none;
    margin-left: auto;
  }
  .masthead > .account-entry,
  .masthead > .account-link {
    order: 2;
  }
  .masthead > .account-entry svg {
    width: 20px;
  }
}
@media (max-width: 640px) {
  .masthead > .account-entry,
  .masthead > .account-link {
    display: block;
    order: 0;
    margin-left: auto;
    font-size: 12px;
  }
  .masthead > .account-link span {
    font-size: 12px;
  }
  .masthead > .search,
  .masthead > #site-search {
    order: 2;
    flex-basis: 100%;
    width: 100%;
  }
  .masthead > .main-nav,
  .masthead > .primary-nav {
    order: 1;
    gap: 24px;
  }
  .masthead > .brand {
    width: auto;
  }
  .masthead > .brand strong {
    font-size: 22px;
  }
  .brand-logo {
    max-width: 160px;
    max-height: 48px;
  }
}
