/*
 * Final public-site mobile containment layer.
 * It deliberately loads after the legacy stylesheet so older page-specific
 * experiments cannot create a horizontal layout or hide navigation controls.
 */

@media (max-width: 760px) {
  html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body.home-page,
  body.archive-page,
  body.report-page,
  body.info-page,
  body.report-submit-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }

  .home-page *,
  .archive-page *,
  .report-page *,
  .info-page *,
  .report-submit-page *,
  .home-page *::before,
  .archive-page *::before,
  .report-page *::before,
  .info-page *::before,
  .report-submit-page *::before,
  .home-page *::after,
  .archive-page *::after,
  .report-page *::after,
  .info-page *::after,
  .report-submit-page *::after {
    min-width: 0;
  }

  .site-header,
  .site-footer,
  .home-main,
  .archive-main,
  .report-main,
  .info-main,
  .report-submit-main,
  .hero,
  .hero-shell,
  .hero-shell-clean,
  .archive-hero-section,
  .archive-content-section,
  .report-hero-section,
  .report-content-section,
  .info-hero-section,
  .info-content-section,
  .report-submit-hero-section,
  .report-submit-form-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .container,
  .site-header .container,
  .site-footer .container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding-inline: clamp(14px, 4vw, 20px) !important;
  }

  .site-header .nav-row-rich,
  .site-header .nav-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    min-height: 0 !important;
    gap: 0.65rem !important;
    padding-block: 0.65rem !important;
  }

  .site-header .brand-cluster,
  .site-header .nav-hub,
  .site-header .nav-utility {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .site-header .nav-hub {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: visible !important;
    gap: 0.6rem !important;
  }

  .site-header .nav-links {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .site-header .nav-links::-webkit-scrollbar {
    display: none;
  }

  .site-header .nav-links a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-height: 34px !important;
    padding: 0.46rem 0.7rem !important;
  }

  .site-header .nav-utility {
    display: flex !important;
    justify-content: flex-start !important;
  }

  .site-header .nav-utility-cta {
    width: auto !important;
    min-height: 38px !important;
    padding: 0.56rem 0.9rem !important;
  }

  .hero-shell,
  .hero-shell-clean,
  .archive-hero-card,
  .report-hero-card,
  .info-hero-card,
  .report-submit-hero-card,
  .lookup-modal {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .hero-inner,
  .hero-inner-clean,
  .archive-hero-card,
  .report-hero-card,
  .info-hero-card,
  .report-submit-hero-card,
  .archive-layout,
  .report-layout,
  .info-layout,
  .report-intro-grid,
  .report-action-strip,
  .report-ai-answer-grid,
  .report-ai-snapshot-grid,
  .archive-summary-grid,
  .archive-report-grid,
  .archive-index-grid,
  .database-stats-grid,
  .info-card-grid,
  .answers-grid,
  .examples-grid,
  .guide-grid,
  .blacklist-grid,
  .faq-list,
  .report-submit-hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .hero-copy,
  .hero-copy-clean,
  .hero-side,
  .hero-side-panel,
  .archive-hero-copy,
  .report-hero-copy,
  .info-hero-copy,
  .report-submit-hero-copy,
  .archive-content-grid,
  .report-detail-card,
  .info-content-grid,
  .archive-side-panel,
  .report-side-panel,
  .info-side-panel,
  .hero-search-panel,
  .hero-search-panel-simple,
  .hero-search-field,
  .search-panel,
  .report-form,
  .report-submit-form-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .hero-search-field input,
  .field input,
  .field select,
  .field textarea,
  input,
  select,
  textarea {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .archive-summary-card,
  .database-stat-card,
  .info-summary-card,
  .info-panel,
  .faq-item,
  .archive-report-card,
  .archive-index-card,
  .report-overview-card,
  .report-action-grid article,
  .report-ai-answer-panel,
  .answer-card,
  .example-card,
  .guide-card,
  .blacklist-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .home-page h1,
  .home-page h2,
  .home-page h3,
  .archive-page h1,
  .archive-page h2,
  .archive-page h3,
  .report-page h1,
  .report-page h2,
  .report-page h3,
  .info-page h1,
  .info-page h2,
  .info-page h3,
  .report-submit-page h1,
  .report-submit-page h2,
  .report-submit-page h3,
  .home-page p,
  .archive-page p,
  .report-page p,
  .info-page p,
  .report-submit-page p,
  .home-page li,
  .archive-page li,
  .report-page li,
  .info-page li,
  .report-submit-page li {
    max-width: 100% !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .hero-actions,
  .archive-hero-actions,
  .report-hero-actions,
  .info-hero-actions,
  .report-submit-actions,
  .submit-action-buttons,
  .hero-inline-result-actions,
  .answers-actions,
  .advice-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero-actions .button,
  .archive-hero-actions .button,
  .report-hero-actions .button,
  .info-hero-actions .button,
  .report-submit-actions .button,
  .submit-action-buttons .button,
  .hero-inline-result-actions .button,
  .answers-actions .button,
  .advice-actions .button {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  .cookie-banner {
    right: 12px !important;
    bottom: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .cookie-banner-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
  }

  .cookie-banner .button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .footer-slim-row,
  .footer-slim-nav,
  .footer-slim-bottom {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
