/* Compact mobile navigation drawer */
@media (max-width: 940px) {
  .site-header .desktop-nav,
  .site-header .desktop-cta {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .mobile-nav-panel {
    position: fixed;
    inset: 0;
    z-index: 120;
    pointer-events: none;
  }

  .mobile-nav-panel[hidden] {
    display: none !important;
  }

  .mobile-nav-panel:not([hidden]) {
    display: block;
  }

  /* No full-screen blur or click-blocking layer. The page remains visible
     and can continue scrolling while the menu is open. */
  .mobile-nav-backdrop {
    display: none !important;
  }

  .site-header .mobile-nav-drawer {
    position: fixed;
    top: 86px;
    right: 12px;
    width: min(330px, calc(100vw - 24px));
    max-height: calc(100dvh - 104px);
    height: auto;

    display: flex !important;
    flex-direction: column;
    gap: 2px;

    margin: 0;
    padding: 17px;
    overflow-y: auto;
    overscroll-behavior: contain;

    pointer-events: auto;
    visibility: visible;
    opacity: 1;

    border: 1px solid rgba(141, 148, 158, 0.28);
    border-radius: 16px;
    background: rgba(14, 17, 22, 0.98);
    box-shadow: 0 22px 65px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(14px);
  }

  .mobile-nav-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 10px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(141, 148, 158, 0.17);
  }

  .mobile-nav-heading > span {
    color: #fff;
    font-size: 1rem;
    font-weight: 850;
  }

  .mobile-nav-heading button {
    padding: 7px 10px;
    border: 1px solid rgba(141, 148, 158, 0.28);
    border-radius: 8px;
    background: transparent;
    color: #cbd1d7;
    font: inherit;
  }

  .site-header .mobile-nav-drawer > a:not(.button) {
    display: block;
    margin: 0;
    padding: 10px 11px;
    border-radius: 8px;
    color: #d3d9de;
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .site-header .mobile-nav-drawer > a:not(.button):hover,
  .site-header .mobile-nav-drawer > a:not(.button):focus-visible {
    background: rgba(255, 255, 255, 0.055);
    color: var(--green);
  }

  .mobile-nav-cta {
    margin-top: 10px;
    width: 100%;
    padding: 11px 15px;
  }

  /* The old menu implementation fixed the body and prevented scrolling.
     Explicitly neutralize that behavior for the compact drawer. */
  body.mobile-nav-open {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    overflow: visible !important;
  }
}

@media (max-width: 420px) {
  .site-header .mobile-nav-drawer {
    top: 78px;
    right: 8px;
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 92px);
    padding: 15px;
    border-radius: 14px;
  }
}