/* Mobile + tablet overflow fixes — keeps existing layouts, prevents horizontal scroll */

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

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

main,
.site-header,
.site-footer {
  max-width: 100%;
}

.container,
[class*="-shell"],
[class*="-inner"],
[class*="-main"],
[class*="-content"],
[class*="-copy"],
[class*="-layout"],
[class*="-grid"],
[class*="-band"],
[class*="-panel"],
[class*="-stage"] {
  min-width: 0;
}

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

/* Full-bleed marquees: 100vw + calc(50% - 50vw) causes scrollbar overflow */
.products-promo-marquee,
.locations-locator-marquee:not(.locations-hero-marquee),
.fund-hero-reviews-marquee {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  left: auto;
  right: auto;
}

.locations-hero-marquee {
  width: 100%;
  max-width: 100%;
}

.locations-locator-stage {
  width: 100%;
  max-width: min(1440px, 100%);
  box-sizing: border-box;
}

/* Tablet: split columns with wide mins should stack before they overflow */
@media (max-width: 900px) {
  .locations-faq__content,
  .fund-page-faq__content,
  .gift-cards-faq__content,
  .employment-faq__content,
  .about-faq__content {
    grid-template-columns: 1fr;
    gap: clamp(28px, 4vw, 40px);
  }

  .locations-faq__header-lead,
  .locations-faq__header-sub,
  .fund-page-faq__header-lead,
  .fund-page-faq__header-sub {
    max-width: none;
  }

  .states-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fund-page-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
    max-width: 100%;
  }

  .products-browser-main {
    padding-left: clamp(16px, 4vw, 24px);
    padding-right: clamp(16px, 4vw, 24px);
  }

  .button-row,
  .hero-buttons,
  [class*="-actions"],
  [class*="-cta__actions"] {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .container,
  .usa250-shell {
    width: min(var(--container), calc(100% - 24px));
  }

  .locations-locator-stage {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-main-inner {
    gap: 12px;
  }

  .header-topbar-row {
    gap: 8px;
  }

  .countdown-wrap {
    font-size: 10px;
    gap: 4px;
  }

  .fund-page-stats {
    grid-template-columns: 1fr;
  }

  .fund-hero-split-form {
    box-shadow:
      0 2px 8px rgba(10, 30, 70, 0.06),
      0 20px 48px rgba(10, 30, 70, 0.16);
  }

  .states-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
