/* CamCore responsive hardening — mobile, tablet and desktop */

html,
body {
  max-width: 100%;
}

img,
video,
iframe {
  max-width: 100%;
}

button,
a {
  touch-action: manipulation;
}

/* Repository-wide readability baseline. */
body {
  font-size: 17px;
  line-height: 1.7;
}

.nav-link,
.nav-cta,
.button {
  font-size: .9375rem;
}

.glance-row span:last-child,
.trust-item,
.card-link,
.toc a,
.policy-pagination a,
.search-clear,
.search-count,
.route-step p,
.support-note,
.footer-grid p,
.footer-grid > div:not(.footer-brand) a {
  font-size: .875rem;
}

.meta-line span,
.route-step span,
.footer-grid h2,
.footer-bottom {
  font-size: .8125rem;
}

.kicker,
.eyebrow,
.badge,
.scope-card span,
.toc strong,
.footer-badge {
  font-size: .75rem;
}

/* If JavaScript is unavailable, never leave the mobile navigation expanded
   over the page. The normal JS-enhanced menu remains unchanged. */
@media (max-width: 1120px) {
  html:not(.js) .primary-nav {
    display: none !important;
  }

  .js .menu-button {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
  }

  .js .primary-nav {
    z-index: 2;
    max-height: calc(100dvh - 105px - env(safe-area-inset-bottom));
    padding-bottom: calc(11px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.nav-open {
    overscroll-behavior: none;
  }

  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 5, 8, .58);
    backdrop-filter: blur(2px);
    pointer-events: none;
  }

  .site-header {
    z-index: 50;
  }
}

@media (max-width: 850px) {
  .hero,
  .page-hero,
  .split,
  .policy-grid,
  .article-layout,
  .cards,
  .steps,
  .scope-grid,
  .support-route {
    min-width: 0;
  }

  .hero-copy,
  .hero-panel,
  .page-hero-copy,
  .page-hero-mark,
  .panel,
  .article-card,
  .card,
  .step {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-right: 8px;
  }

  .js .primary-nav {
    left: -1px;
    right: -1px;
    top: calc(100% + 6px);
    border-radius: 16px;
  }

  .nav-link,
  .nav-cta,
  .menu-button,
  .button,
  summary,
  .search-clear {
    min-height: 48px;
  }

  .nav-link,
  .nav-cta {
    font-size: .94rem;
  }

  .hero-copy,
  .page-hero-copy {
    min-height: 0;
  }

  .hero-actions {
    gap: 8px;
  }

  .support-form-shell iframe {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .site-wrap {
    width: calc(100% - 12px);
  }

  .hero-copy,
  .hero-panel,
  .page-hero-copy,
  .page-hero-mark,
  .panel,
  .article-card,
  .site-footer {
    border-radius: 20px;
  }

  .brand img {
    width: 136px;
  }

  .hero-copy,
  .page-hero-copy,
  .hero-panel,
  .page-hero-mark,
  .panel,
  .article-card {
    padding-left: 19px;
    padding-right: 19px;
  }
}

@media (orientation: landscape) and (max-height: 520px) and (max-width: 1120px) {
  .js .primary-nav {
    max-height: calc(100dvh - 84px - env(safe-area-inset-bottom));
  }
}
