/* Final layout layer for every public page, after all component themes.
   Keep brand colors, typefaces and materials in their existing shared files.
   Only available space, wrapping and alignment change between viewports. */
body.site-has-header :is(.overview-inner, .about-shell, .site-pricing__inner,
    .site-solutions__inner, .ai-section-shell, .footer-content) > * {
  min-width: 0;
}
body.site-has-header :is(.overview-product-preface__links, .overview-actions,
    .page-end-cta__actions, .site-plan__price) {
  flex-wrap: wrap;
}
body.site-has-header :is(.overview-product-title-group, .ai-hero__heading h1) {
  grid-template-rows: minmax(var(--hero-prelude-height, 0px), auto)
    minmax(var(--hero-headline-height, 0px), auto);
}
body.site-has-header :is(.overview-product-summary, .overview-heading p,
    .page-end-cta__description, .footer-contact__text) {
  overflow-wrap: anywhere;
}
body.legacy-product-page :is(.feature-details-wrapper-2 > *, .leftfeaturetitle) {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Tablet cards need a full reading column; three narrow plans squeeze their
   prices and English feature copy even though the page itself does not spill. */
@media (min-width: 768px) and (max-width: 991px) {
  body.site-refined-page .site-pricing__grid.pricing-table {
    grid-template-columns: minmax(0, 1fr);
    max-width: 40rem;
    margin-inline: auto;
  }
  body.site-refined-page .site-plan__identity { min-height: 0; }
}

@media (max-width: 767px) {
  body.site-has-header :is(.overview-product-preface__links, .overview-actions) {
    max-width: 100%;
  }
  body.product-clean-page .overview-product-intro .overview-hero-note {
    position: static;
    margin-top: .5rem;
  }
  body.site-closing-page .footer-content > .div-block-47 {
    grid-template-columns: repeat(2, minmax(0, 7rem));
    max-width: 100%;
    column-gap: clamp(.75rem, 4vw, 1.5rem);
  }
  body.site-closing-page .div-block-47 :is(.qrfeatureimage, .qrcodetext) {
    max-width: 100%;
  }
  body.site-closing-page .div-block-47 .qrfeatureimage {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
  body.site-closing-page :is(.footer-agents__list li, .copyright,
      .made-by-section, .policeagreement) {
    min-width: 0;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }
}

/* Keep the established left rail / right capture on phones. Reserve enough
   space for both; the old short-screen 9rem rail crowded the capture at 320px. */
@media (max-width: 600px) {
  body .ai-ecosystem--illustrated.is-native-tour .ai-ecosystem__stage {
    grid-template-columns: minmax(6.25rem, 30%) minmax(0, 1fr);
    column-gap: .625rem;
  }
}

/* Short windows can scroll through the complete section. A fixed-height
   sticky stage must never crop navigation, copy or the continuation link. */
@media (max-height: 600px), (max-width: 600px) and (max-height: 720px) {
  body .ai-ecosystem--illustrated.is-native-tour {
    height: auto;
    min-height: 0;
  }
  body .ai-ecosystem--illustrated.is-native-tour .ai-ecosystem__stage {
    position: relative;
    top: auto;
    height: auto;
    min-height: 100svh;
    padding-block: calc(var(--ai-header-height, 80px) + 1rem) 2rem;
  }
}

@media (min-width: 1600px) {
  body.site-refined-page .site-pricing__inner {
    max-width: var(--site-reading-width);
  }
}
