/*
 * CareStrand UI Integrity Guard v1.3.1
 *
 * The public website is rendered inside a WordPress installation where themes
 * and other plugins may apply broad rules to semantic elements such as
 * article, figure, label and direct-child divs. These scoped rules preserve
 * CareStrand component geometry without resetting typography or accessibility.
 */

body.carestrand-website-page .cs-wrap,
body.carestrand-website-page .cs-wrap * {
  box-sizing: border-box;
}

/* Grid and flex children must be allowed to shrink inside their own tracks. */
body.carestrand-website-page .cs-wrap :where(
  .cs-hero-grid,
  .cs-page-hero-grid,
  .cs-section-head,
  .cs-grid,
  .cs-two-col,
  .cs-three-stage,
  .cs-architecture,
  .cs-route-list,
  .cs-journey,
  .cs-permission,
  .cs-demo-panel,
  .cs-gallery,
  .cs-audience-grid,
  .cs-roadmap,
  .cs-contact-layout,
  .cs-contact-steps,
  .cs-post-grid,
  .cs-related-grid,
  .cs-insights-signup,
  .cs-article-hero-grid,
  .cs-walkthrough-grid,
  .carestrand-contact-grid
) > * {
  min-width: 0;
}

/* Neutralise common theme article geometry while preserving article semantics. */
body.carestrand-website-page .cs-wrap article:not(.cs-article-body) {
  width: auto !important;
  max-width: none !important;
  margin-block: 0 !important;
  margin-inline: 0 !important;
  float: none !important;
  clear: none !important;
}

body.carestrand-website-page .cs-wrap .cs-article-body {
  width: min(100%, 800px) !important;
  max-width: 800px !important;
  margin-inline: auto !important;
  float: none !important;
  clear: none !important;
}

/*
 * Contact-process cards.
 * Some themes style article > div with a narrow editorial content width. Use a
 * strongly scoped flex contract so the numbered badge and copy cannot collapse
 * into a one-word-wide column.
 */
body.carestrand-website-page .cs-wrap .cs-contact-steps {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  gap: 11px !important;
}

body.carestrand-website-page .cs-wrap .cs-contact-steps > article {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 13px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 15px !important;
}

body.carestrand-website-page .cs-wrap .cs-contact-steps > article > b {
  display: grid !important;
  flex: 0 0 38px !important;
  place-items: center !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: flex-start !important;
}

body.carestrand-website-page .cs-wrap .cs-contact-steps > article > div {
  display: block !important;
  flex: 1 1 0% !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  align-self: center !important;
}

body.carestrand-website-page .cs-wrap .cs-contact-steps > article > div > strong,
body.carestrand-website-page .cs-wrap .cs-contact-steps > article > div > span {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-inline: 0 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

/* Protect the adjacent safety notice from the same broad direct-child rules. */
body.carestrand-website-page .cs-wrap .cs-notice {
  width: 100% !important;
  max-width: none !important;
}

body.carestrand-website-page .cs-wrap .cs-notice > div {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Card and editorial components that commonly inherit theme article widths. */
body.carestrand-website-page .cs-wrap :where(
  .cs-grid,
  .cs-three-stage,
  .cs-journey,
  .cs-permission,
  .cs-audience-grid,
  .cs-roadmap,
  .cs-post-grid
) > article {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

body.carestrand-website-page .cs-wrap .cs-post-card {
  display: flex !important;
  flex-direction: column !important;
}

body.carestrand-website-page .cs-wrap .cs-post-card > .cs-post-card__body {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

body.carestrand-website-page .cs-wrap :where(.cs-card, .cs-stage, .cs-audience, .cs-roadmap article, .cs-permission article) > div {
  min-width: 0;
  max-width: 100%;
}

/* Theme-safe figures and media. */
body.carestrand-website-page .cs-wrap :where(.cs-gallery figure, .cs-article-cover, .cs-media-card) {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

/* Contact form fields remain full-width even when a theme sizes labels. */
body.carestrand-website-page .cs-wrap .cs-contact-panel,
body.carestrand-website-page .cs-wrap .cs-contact-panel .otoprep-rc-capture,
body.carestrand-website-page .cs-wrap .cs-contact-panel .carestrand-contact-form,
body.carestrand-website-page .cs-wrap .cs-contact-panel .carestrand-contact-grid {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

body.carestrand-website-page .cs-wrap .cs-contact-panel label.otoprep-rc-field,
body.carestrand-website-page .cs-wrap .cs-contact-panel .otoprep-rc-field {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body.carestrand-website-page .cs-wrap .cs-contact-panel :where(input, select, textarea, button) {
  max-width: 100% !important;
}

/* Long labels and URLs must wrap without forcing the canvas wider. */
body.carestrand-website-page .cs-wrap :where(h1, h2, h3, h4, p, li, strong, span, a, small, label) {
  overflow-wrap: break-word;
}

/* Chrome children should not make the header wider than the viewport. */
body.carestrand-website-page .cs-chrome-nav > *,
body.carestrand-website-page .cs-chrome-footer > * {
  min-width: 0;
}

@media (max-width: 1080px) and (min-width: 701px) {
  body.carestrand-website-page .cs-wrap .cs-contact-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.carestrand-website-page .cs-wrap .cs-contact-steps > article {
    height: 100%;
  }
}

@media (max-width: 700px) {
  body.carestrand-website-page .cs-wrap .cs-contact-steps {
    grid-template-columns: 1fr !important;
  }

  body.carestrand-website-page .cs-wrap .cs-contact-steps > article {
    padding: 14px !important;
  }
}
