/* Mobile-only layout fixes. Desktop rules unchanged above 768px. */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: clip;
  }

  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .page-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  .page-hero:not(.page-hero--center) .page-hero-grid > div:first-child {
    max-width: 100%;
    align-items: stretch;
  }

  .page-hero:not(.page-hero--center) .page-hero-grid > div:first-child h1,
  .page-hero:not(.page-hero--center) .page-hero-grid > div:first-child .h1,
  .page-hero:not(.page-hero--center) .page-hero-grid > div:first-child .h-display.h1 {
    max-width: none !important;
  }

  .page-hero .cta-row,
  .page-hero .cta-paths {
    flex-direction: column;
    align-items: stretch !important;
    width: 100%;
  }

  .page-hero .cta-row .btn,
  .page-hero .cta-paths .btn {
    width: 100%;
    justify-content: center;
  }

  .insight-strip {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .insight-pill {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 8.5rem;
  }

  .workflow-steps,
  .persona-row,
  .persona-row-6,
  .feature-groups,
  .cap-grid,
  .metrics-grid {
    grid-template-columns: 1fr !important;
  }

  .ucl-evidence,
  .ocr-demo {
    max-width: 100%;
    padding-inline: 0;
  }

  .ucl-dash-img,
  .ocr-demo-video {
    width: 100%;
    max-width: 100%;
  }

  .ucl-dash-img.te-dash {
    max-height: min(42vh, 320px);
    object-fit: contain;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .insight-pill {
    flex: 1 1 100%;
  }

  .ocr-demo-steps {
    grid-template-columns: 1fr 1fr;
  }
}
