/* Mobile navigation panel shared by the free scan and full report pages. */
.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  opacity: 0;
  transform: translateY(-0.5rem) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    visibility 0s linear 220ms;
}

.mobile-menu-panel[data-open="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    visibility 0s linear 0s;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 0s linear 180ms;
}

.mobile-menu-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 180ms ease,
    visibility 0s linear 0s;
}

.mobile-menu-surface {
  border: 2px solid #000;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 4px 4px 0 #000;
  padding: 0.75rem;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
}

/* iOS Safari renders `position: fixed` + `backdrop-filter` as a duplicated/ghosted
   layer on scroll — dropping the blur on phones avoids it, matching the same fix
   applied to scan.html and the other sticky-nav pages this session. */
@media (max-width: 767px) {
  .mobile-menu-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.menu-open {
    overflow: hidden;
  }
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.8rem;
  padding: 0.95rem 1rem;
  min-height: 44px;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
}

.mobile-menu-link:hover,
.mobile-menu-link:focus-visible {
  background: #c1e8ce;
}

.mobile-menu-meta {
  display: block;
  margin-top: 0.25rem;
  color: #475569; /* slate-600: #64748b was under 4.5:1 on this background */
  font-size: 0.875rem;
  font-weight: 700;
}
