/**
 * Horizontal-scroll containment without killing sticky header.
 * Use sitewide (home + inner pages).
 *
 * Important: do NOT set overflow-x on .nrtr-site-chrome / sticky-header /
 * html+body with `hidden` — that makes overflow-y compute to `auto` and
 * breaks position:sticky (esp. iOS Safari). Prefer `clip`.
 */

html {
  overflow-x: clip !important;
  max-width: 100%;
  width: 100%;
}

body {
  overflow-x: clip !important;
  max-width: 100%;
  width: 100%;
}

#MainContent,
.content-for-layout,
.home-page,
.nrtr-story,
.shopify-section.section {
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: clip;
  box-sizing: border-box !important;
}

.header-wrapper,
.header,
.section-header,
sticky-header,
.nrtr-site-chrome {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: visible;
  overflow-y: visible;
}

/* Health keyword marquee: layout-isolated absolute tracks */
.home-health-drift,
.home-health-drift-row {
  overflow: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  /* Avoid contain:paint — iOS can freeze nested transform animations inside it */
  isolation: isolate;
}

.home-health-drift-track {
  position: absolute !important;
  left: 0;
  max-width: none;
}

.home-page .header-row,
.home-page .header-text-block,
.home-page .header-image {
  max-width: 100%;
  box-sizing: border-box;
}

.nrtr-story .nrtr-timeline-wrap,
.nrtr-story .nrtr-compare,
.nrtr-story .nrtr-compare-carousel,
.nrtr-story .nrtr-compare-carousel-viewport,
.nrtr-story .home-ai-coach-prompts,
.nrtr-story .nrtr-lf-sliders {
  max-width: 100%;
  min-width: 0;
  overscroll-behavior-x: contain;
}

/* Do NOT force .nrtr-ch-inner to max-width:100% — that kills the
   intentional 78rem content rail (see ch-02 “Your health is complex”). */
.nrtr-story .nrtr-ch,
.nrtr-story .nrtr-demo-shell,
.nrtr-story .nrtr-close-shell {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.nrtr-story .nrtr-ch-inner,
.nrtr-story .nrtr-founder {
  min-width: 0;
  box-sizing: border-box;
}

@media screen and (max-width: 989px) {
  .nrtr-compare-table {
    min-width: 0 !important;
  }

  .nrtr-compare {
    overflow-x: hidden !important;
  }

  .nrtr-compare-carousel-viewport {
    width: 100% !important;
    max-width: 100% !important;
  }

  .nrtr-timeline-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
}

@media screen and (max-width: 749px) {
  #supademo-modal-container div[onclick*="stopPropagation"],
  #supademo-modal-container div[style*="width: 80%"],
  #supademo-modal-container .supademo-loading-content {
    width: calc(100% - 12px) !important;
    max-width: calc(100% - 12px) !important;
  }

  .nrtr-close-constellation {
    max-width: 100% !important;
  }

  .nrtr-close-rail li {
    white-space: normal !important;
  }
}
