.menu-toggle { display: none; }

@media (max-width: 760px) {
  .top {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .top .brand {
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1.15;
    white-space: nowrap;
  }

  .top nav {
    display: flex;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: .5rem 6% 1rem;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, .18);
    animation: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    translate: 0 -6px;
    transition: opacity .25s ease, translate .3s ease, visibility 0s .3s;
  }

  .top nav a {
    display: inline-flex;
    align-self: flex-end;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    padding-inline: .5rem;
    margin-right: -.5rem;
    justify-content: flex-end;
    font-size: .9375rem;
    line-height: 1.6;
    white-space: nowrap;
  }

  .top nav a::after {
    left: .5rem;
    right: .5rem;
    bottom: calc(50% - .65em);
  }

  .top.is-menu-open {
    transform: translateY(0);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .top.is-menu-open::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: calc(-1 * var(--mobile-menu-height, 245px));
    left: 0;
    z-index: -1;
    pointer-events: none;
    background: rgba(0, 0, 0, .48);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .top.is-menu-open nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    translate: 0 0;
    transition-delay: 0s;
  }
  .top.is-menu-open nav a {
    animation: mobile-menu-option .35s ease both;
  }
  .top.is-menu-open nav a:nth-child(2) { animation-delay: .05s; }
  .top.is-menu-open nav a:nth-child(3) { animation-delay: .1s; }
  .top.is-menu-open nav a:nth-child(4) { animation-delay: .15s; }
  .top.is-menu-open nav a:nth-child(5) { animation-delay: .2s; }
  @keyframes mobile-menu-option {
    from { opacity: 0; translate: 0 -5px; }
    to { opacity: 1; translate: 0 0; }
  }
  .menu-toggle {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
  }
  .menu-toggle span { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
  .menu-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
  .is-menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .is-menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .is-menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  @media (prefers-reduced-motion: reduce) {
    .menu-toggle span, .top nav { transition: none; }
    .top nav { translate: none; }
    .top.is-menu-open nav a { animation: none; }
  }
}
