/* =====================================================================
   MOBILE FIXES (Nov 23, 2026)
   One shared stylesheet, linked at the end of <head> on every page so it
   wins over each page's own inline styles. Phone/tablet only (≤768px):
   desktop is untouched.
   ===================================================================== */

@media (max-width: 768px) {

  /* 1. Keep the header pinned to the top.
     The old guard (html,body{overflow-x:hidden}) turns <body> into a scroll
     box, which silently breaks position:sticky on iPhone Safari, so the
     header scrolled away with the page. "clip" stops sideways scrolling
     the same way without breaking sticky. */
  html, body { overflow-x: clip; }

  /* 2. Header bar: keep "Schedule a Demo" on one line, inside the bar. */
  .nav-inner { padding: 0 1rem; gap: .5rem; }
  .nav-actions { gap: .5rem; }
  .nav-actions .btn--primary {
    white-space: nowrap;
    padding: .6rem 1rem;
    font-size: .85rem;
    line-height: 1.2;
    min-height: 40px;
  }
  .nav-toggle { margin-right: -.4rem; }

  /* 3. Hamburger menu (pages whose script shows .nav-menu with inline styles).
     Full-width panel under the header, left-aligned, scrollable, with the
     Platform and Resources sub-pages listed so they can be reached on a phone. */
  .nav-wrap .nav-menu[style*="flex"] {
    position: fixed !important;
    top: 69px !important;
    left: 0 !important;
    right: 0 !important;
    /* explicit height, not bottom:0 — once scrolled, the header's blur effect
       makes it the box this panel is measured against */
    height: calc(100vh - 69px);
    height: calc(100dvh - 69px);
    margin: 0;
    align-items: stretch;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: .5rem 1.25rem 2.5rem !important;
    background: var(--charcoal, #16262B) !important;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .nav-wrap .nav-menu[style*="flex"] .nav-item { width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-wrap .nav-menu[style*="flex"] .nav-item::after { display: none; }
  .nav-wrap .nav-menu[style*="flex"] .nav-link {
    padding: .95rem 0;
    font-size: 1.05rem;
    border-radius: 0;
    color: var(--paper, #E8E4DC) !important;
    white-space: normal;
  }
  .nav-wrap .nav-menu[style*="flex"] .nav-link:hover { background: none; }
  .nav-wrap .nav-menu[style*="flex"] .nav-dropdown {
    display: block;
    position: static;
    min-width: 0;
    background: none !important;
    border: 0;
    box-shadow: none;
    padding: 0 0 .6rem .9rem;
    border-radius: 0;
  }
  .nav-wrap .nav-menu[style*="flex"] .nav-dropdown a {
    padding: .6rem 0;
    font-size: .98rem;
    color: var(--paper, #E8E4DC) !important;
    opacity: .85;
  }
  .nav-wrap .nav-menu[style*="flex"] .nav-dropdown a:hover { background: none; opacity: 1; }

  /* 4. Slide-out drawer (about, pricing, partnerships, faqs, contact,
     compliance-library): the Log In button was dark text on a dark panel. */
  .nav-drawer .btn--outline-dark,
  .nav-drawer .btn--ghost {
    background: transparent;
    color: var(--paper, #E8E4DC);
    border: 1.5px solid rgba(255,255,255,.45);
  }
  .nav-drawer-header { min-height: 69px; }
  .nav-drawer-close { min-width: 44px; min-height: 44px; }

  /* 5. AI Marketing Review hero: the desktop line breaks left a ragged,
     undersized headline on phones. */
  #mr-hero-heading { font-size: 2.1rem; line-height: 1.15; }
  #mr-hero-heading br,
  .mr-hero p br { display: none; }
}

/* "Menu" button header (careers, press, compare, Claude Compliance API and MCP,
   thank-you page): the open menu hangs off the pinned header and is taller than
   a phone screen, so Log In and Schedule a Demo at the bottom could not be
   reached. Let it scroll inside the screen. */
@media (max-width: 1040px) {
  .site-menu.is-open {
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

/* Readability: card descriptions and labels that were 12–14px on phones. */
@media (max-width: 768px) {
  .connector-card p { font-size: 1rem !important; line-height: 1.55; }      /* pricing (page sets .9rem !important) */
  .rule-card-ai, .rule-card-related, .rule-card-applies-label { font-size: .95rem; } /* compliance library */
  .rule-stat-label, .hero-asof, .hero-disclaimer { font-size: .85rem; }      /* compliance library */
}

/* compliant-texting-resources: the one-column "whitelist" grid sized itself to
   its content and ran 2px past the screen on 320px phones. */
@media (max-width: 480px) {
  .whitelist-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Very narrow phones (iPhone SE 1st gen and similar, 320px): drop the header
   demo button so the logo and menu button fit. Demo buttons remain in the
   page content (and in the drawer on pages that have one). */
@media (max-width: 350px) {
  .nav-actions .btn--primary { display: none; }
}
