.mobile-site-header {
  display: none;
}

.mobile-site-header__floating-toggle {
  display: none;
}

@media (max-width: 767px) {
  .site-header {
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
  }

  .site-header__desktop-only {
    display: none !important;
  }

  .mobile-site-header {
    display: block;
    --mep-mobile-header-icon-size: 20px;
  }

  html.has-mobile-overlay-open {
    overflow: hidden;
  }

  body.is-mobile-scroll-locked {
    position: fixed;
    inset: 0;
    width: 100%;
    overflow: hidden;
  }

  .mobile-site-header__container {
    width: calc(100% - 1.5rem);
  }

  .mobile-site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    min-height: 78px;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(23, 33, 39, 0.08);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
  }

  .mobile-site-header__brand {
    min-width: 0;
  }

  .mobile-site-header__logo .custom-logo-link,
  .mobile-site-header__brand .custom-logo-link {
    display: inline-flex;
    max-width: min(54vw, 210px);
  }

  .mobile-site-header__logo .custom-logo,
  .mobile-site-header__brand .custom-logo {
    max-height: 44px;
    width: auto;
  }

  .mobile-site-header__title {
    color: var(--mep-navy);
    font-family: var(--mep-font-display);
    font-size: 1.4rem;
    line-height: 1;
    text-decoration: none;
  }

  .mobile-site-header__actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .mobile-site-header .mobile-site-header__icon-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    min-width: 48px;
    width: 48px;
    max-width: 48px;
    min-height: 48px;
    height: 48px;
    max-height: 48px;
    padding: 0;
    border: 1px solid rgba(23, 33, 39, 0.12);
    border-radius: 0;
    background: #fffdfa;
    color: var(--mep-navy);
    box-shadow: none;
    line-height: 0;
    text-decoration: none;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
  }

  .mobile-site-header button.mobile-site-header__icon-control {
    appearance: none;
    -webkit-appearance: none;
    gap: 0;
    font: inherit;
  }

  .mobile-site-header .mobile-site-header__icon-control:hover,
  .mobile-site-header .mobile-site-header__icon-control:focus-visible {
    border-color: rgba(197, 155, 87, 0.46);
    background: rgba(197, 155, 87, 0.08);
    color: var(--mep-navy);
    transform: none;
    box-shadow: none;
  }

  .mobile-site-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--mep-mobile-header-icon-size, 20px);
    height: var(--mep-mobile-header-icon-size, 20px);
    flex: 0 0 var(--mep-mobile-header-icon-size, 20px);
    line-height: 0;
  }

  .mobile-site-header__icon svg {
    width: 100%;
    height: 100%;
  }

  .mobile-site-header__badge {
    position: absolute;
    top: 0.25rem;
    right: 0.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.18rem;
    border-radius: 999px;
    background: var(--mep-gold);
    color: var(--mep-navy);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
  }

  .mobile-site-header__nav,
  .mobile-site-header__search {
    position: fixed;
    inset: 0;
    z-index: 320;
    display: grid;
    align-items: stretch;
    justify-items: stretch;
    padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(12, 9, 8, 0.34);
    backdrop-filter: blur(8px);
    transition: opacity 220ms ease, visibility 0s linear 220ms;
  }

  .mobile-site-header__nav.is-open,
  .mobile-site-header__search.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 220ms ease, visibility 0s linear 0s;
  }

  .mobile-site-header__nav {
    padding: 0;
    justify-items: end;
  }

  .mobile-site-header__panel-shell {
    width: min(calc(100vw - 1rem), 36rem);
    margin: calc(78px + 0.5rem) auto auto;
    padding: 1.1rem 1rem 1rem;
    border: 1px solid rgba(23, 33, 39, 0.12);
    background: linear-gradient(180deg, #fffdf9 0%, #f7f0e4 100%);
    box-shadow: 0 26px 60px rgba(12, 23, 38, 0.22);
  }

  .mobile-site-header__panel-shell--nav {
    width: min(86vw, 24.5rem);
    max-width: min(86vw, 24.5rem);
    height: 100dvh;
    margin: 0 0 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 0.15rem) 0 calc(env(safe-area-inset-bottom, 0px) + 1rem);
    overflow-y: auto;
    border: 0;
    background: #ffffff;
    box-shadow: -20px 0 46px rgba(12, 23, 38, 0.16);
    transform: translate3d(104%, 0, 0);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .mobile-site-header__nav.is-open .mobile-site-header__panel-shell--nav {
    transform: translate3d(0, 0, 0);
  }

  .mobile-site-header__search .mobile-site-header__panel-shell {
    transform: translateY(-1rem);
    transition: transform 220ms ease;
  }

  .mobile-site-header__search.is-open .mobile-site-header__panel-shell {
    transform: translateY(0);
  }

  .mobile-site-header__nav-head {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    justify-items: center;
    min-height: 60px;
    margin-bottom: 0;
    padding: 0 0.85rem;
    border-bottom: 1px solid rgba(23, 33, 39, 0.08);
  }

  .mobile-site-header__panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .mobile-site-header__panel-copy {
    min-width: 0;
  }

  .mobile-site-header__panel-eyebrow {
    margin: 0 0 0.4rem;
    color: var(--mep-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .mobile-site-header__panel-title {
    margin: 0;
    max-width: 14ch;
    color: var(--mep-navy);
    font-size: clamp(1.6rem, 6vw, 2.05rem);
    line-height: 1.02;
  }

  .mobile-site-header__panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 48px;
    width: 48px;
    max-width: 48px;
    min-height: 48px;
    height: 48px;
    max-height: 48px;
    padding: 0;
    border: 1px solid rgba(23, 33, 39, 0.12);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.72);
    color: var(--mep-navy);
    box-shadow: none;
    line-height: 0;
  }

  .mobile-site-header__nav-head .mobile-site-header__panel-close {
    min-width: 44px;
    width: 44px;
    max-width: 44px;
    min-height: 44px;
    height: 44px;
    max-height: 44px;
    border: 0;
    background: transparent;
    justify-self: start;
  }

  .mobile-site-header__nav-title {
    margin: 0;
    color: var(--mep-navy);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .mobile-site-header__nav-spacer {
    display: block;
    width: 44px;
    height: 44px;
  }

  .mobile-site-header__floating-toggle {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 0.8rem);
    right: 0.75rem;
    z-index: 330;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    width: 52px;
    max-width: 52px;
    min-height: 52px;
    height: 52px;
    max-height: 52px;
    padding: 0;
    border: 1px solid rgba(23, 33, 39, 0.12);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    color: var(--mep-navy);
    box-shadow: 0 16px 34px rgba(12, 23, 38, 0.18);
    line-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.45rem);
    transition: opacity 180ms ease, visibility 0s linear 180ms, transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
  }

  html.has-mobile-floating-toggle .mobile-site-header__floating-toggle {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 180ms ease, visibility 0s linear 0s, transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
  }

  .mobile-site-header__floating-toggle:hover,
  .mobile-site-header__floating-toggle:focus-visible {
    border-color: rgba(197, 155, 87, 0.46);
    background: #ffffff;
  }

  .mobile-site-header__search-form {
    display: grid;
    gap: 0.75rem;
  }

  .mobile-site-header__search-input,
  .mobile-site-header__search-submit {
    min-height: 52px;
  }

  .mobile-site-header__search-input {
    width: 100%;
    padding: 0 1rem;
    border: 1px solid rgba(23, 33, 39, 0.12);
    background: #fffdfa;
    color: var(--mep-navy);
    font-size: 1rem;
  }

  .mobile-site-header__search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--mep-navy);
    background: var(--mep-navy);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .mobile-site-header__search-note {
    margin: 0.9rem 0 0;
    color: rgba(23, 33, 39, 0.74);
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .mobile-site-header__menu {
    margin-top: 0;
  }

  .mobile-site-header__nav-body {
    display: grid;
    gap: 1rem;
    padding: 0.85rem 1rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
  }

  .mobile-site-header__menu .mobile-site-header__menu-list,
  .mobile-site-header__menu .mobile-site-header__menu-list ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .mobile-site-header__menu .mobile-site-header__menu-list li,
  .mobile-site-header__menu .mobile-site-header__menu-list ul li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  .mobile-site-header__menu-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(23, 33, 39, 0.08);
    color: var(--mep-navy);
    font-family: var(--mep-font-display);
    font-size: clamp(1.02rem, 4.5vw, 1.2rem);
    font-weight: 400;
    line-height: 1.18;
    text-decoration: none;
  }

  .mobile-site-header__menu-list a::after {
    content: "";
    flex-shrink: 0;
    width: 0.6rem;
    height: 0.6rem;
    margin-left: 1rem;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.82;
  }

  .mobile-site-header__menu-list .menu-item-has-children > a::after {
    opacity: 1;
  }

  .mobile-site-header__menu-list ul a {
    padding-left: 1.8rem;
    font-size: 1rem;
  }

  .mobile-site-header__nav-cta-stack {
    padding-top: 1rem;
    border-top: 1px solid rgba(23, 33, 39, 0.08);
  }

  .mobile-site-header__nav-cta-stack .site-header__actions,
  .mobile-site-header__cta-stack {
    display: grid;
    gap: 0.75rem;
    width: 100%;
  }

  .mobile-site-header__cta-stack .site-header__cta,
  .mobile-site-header__cta-stack .site-header__cta:visited {
    width: 100%;
    min-height: 50px;
    justify-content: center;
    text-align: center;
  }

  .mobile-site-header__nav-icon-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.65rem;
  }

  .mobile-site-header__nav-icon-row .mobile-site-header__icon-button,
  .mobile-site-header__nav-icon-row .mobile-site-header__icon-link {
    flex: 0 0 48px;
  }

  .mobile-site-header__icon-button:focus-visible,
  .mobile-site-header__icon-link:focus-visible,
  .mobile-site-header__floating-toggle:focus-visible,
  .mobile-site-header__panel-close:focus-visible,
  .mobile-site-header__menu-list a:focus-visible,
  .mobile-site-header__search-input:focus,
  .mobile-site-header__search-submit:focus-visible {
    outline: 2px solid rgba(197, 155, 87, 0.9);
    outline-offset: 2px;
  }

  html.has-mobile-overlay-open .mobile-site-header__floating-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.45rem);
    transition: opacity 180ms ease, visibility 0s linear 180ms, transform 180ms ease;
  }

  body.admin-bar .mobile-site-header__search {
    padding-top: 46px;
  }

  body.admin-bar .mobile-site-header__panel-shell--nav {
    padding-top: calc(46px + env(safe-area-inset-top, 0px) + 0.15rem);
  }

  body.admin-bar .mobile-site-header__floating-toggle {
    top: calc(46px + env(safe-area-inset-top, 0px) + 0.75rem);
  }
}

@media (max-width: 400px) {
  .mobile-site-header__container {
    width: calc(100% - 1rem);
  }

  .mobile-site-header__bar {
    min-height: 72px;
    padding: 0.75rem 0;
  }

  .mobile-site-header__logo .custom-logo,
  .mobile-site-header__brand .custom-logo {
    max-height: 40px;
  }

  .mobile-site-header__panel-shell {
    width: calc(100vw - 0.5rem);
    padding: 0.95rem 0.85rem 0.9rem;
  }

  .mobile-site-header__panel-shell--nav {
    width: min(90vw, 22rem);
    max-width: min(90vw, 22rem);
    padding-inline: 0;
  }
}

@media (min-width: 768px) {
  .mobile-site-header {
    display: none !important;
  }
}
