/* Mobile navigation: desktop navigation remains unchanged. */
.mobile-nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  .topbar.mobile-nav-topbar {
    min-height: 56px !important;
    height: 56px !important;
    padding: 0 12px !important;
  }

  .topbar.mobile-nav-topbar .topbar-inner {
    width: min(var(--content), calc(100% - 24px));
    min-height: 56px !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }

  .topbar.mobile-nav-topbar .brand {
    min-height: 40px !important;
  }

  .topbar.mobile-nav-topbar + .main {
    padding-top: 56px !important;
  }

  .mobile-nav-shell {
    position: relative;
  }

  .mobile-nav-toggle {
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-content: center;
    gap: 4px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(124, 199, 255, .42);
    border-radius: 6px;
    background: rgba(8, 18, 30, .78);
    color: #f4faff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 15px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }

  .mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-nav-shell > .links {
    display: none !important;
    position: absolute;
    top: calc(100% + 1px);
    right: auto;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    gap: 2px !important;
    max-width: none !important;
    padding: 8px max(16px, calc((100vw - 1180px) / 2));
    overflow: visible !important;
    border-top: 1px solid rgba(124, 199, 255, .18);
    border-bottom: 1px solid rgba(124, 199, 255, .18);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    background: rgba(5, 8, 12, .98);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .42);
  }

  .mobile-nav-shell.mobile-nav-open > .links {
    display: flex !important;
  }

  .mobile-nav-shell > .links a {
    display: flex !important;
    width: 100%;
    min-height: 40px;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    border-radius: 0;
    font-size: 14px;
    border-radius: 6px;
    white-space: normal !important;
  }

  .mobile-nav-shell > .links a:hover,
  .mobile-nav-shell > .links a.active {
    background: rgba(124, 199, 255, .08);
  }

  .mobile-nav-shell > .links a:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-toggle span {
    transition: none;
  }
}
