/* OC Architects V207 — single editorial datum for converted Gutenberg pages.
   Source: QNAP theme v159 styles.css V96 --oc-page-measure (1100px,
   responsive 18–48px gutter). This file replaces conflicting CTA width
   patches from V202–V204; it does not modify the header, hero heights,
   project imagery, Gutenberg block content, or existing button behaviour.

   Theme/WordPress Group blocks can inject .wp-block-group__inner-container;
   both possible DOM shapes are covered for the affected outer containers.
   Keep full-bleed dark backgrounds, align their INTERNAL content only. */
body:has(main.oc-pilot-page) {
  --oc-v207-width: 1100px;
  --oc-v207-gutter: clamp(18px, 4vw, 48px);
  --oc-v207-measure: min(var(--oc-v207-width), calc(100% - 2 * var(--oc-v207-gutter)));
}

/* Theme footer is outside Gutenberg's <main>. Match its own 1100px
   editorial datum on every converted preview, not a guessed 90% width. */
body:has(main.oc-pilot-page) .footer > .wrap,
body:has(main.oc-pilot-page) .footer .wrap.oc-footer-main {
  box-sizing:border-box!important;
  width:var(--oc-v207-measure)!important;
  max-width:none!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* Stage 8 — Projects, Office Premises, Specialist Premises archives.
   Their old 1180px measure and special 64px archive inset were different
   from the footer. This one rule aligns hero, breadcrumb, body and CTA. */
body main.oc-stage8-page .oc-s8-wrap.wp-block-group,
body main.oc-stage8-page .oc-s8-breadcrumb.wp-block-group,
body main.oc-stage8-page .oc-s8-hero .oc-s8-hero-copy.wp-block-group {
  box-sizing:border-box!important;
  width:var(--oc-v207-measure)!important;
  max-width:none!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
}
/* The closing strips must stay full-bleed; only their text/buttons align. */
body main.oc-stage8-page .oc-s8-outro.wp-block-group,
body main.oc-stage8-page .oc-s8-bottomcta.wp-block-group {
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}
body main.oc-stage8-page .oc-s8-outro .oc-s8-outro-grid.wp-block-group,
body main.oc-stage8-page .oc-s8-outro .oc-s8-outro-grid.wp-block-group > .wp-block-group__inner-container {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  padding-left:0!important;
  padding-right:0!important;
}
body main.oc-stage8-projects .oc-s8-outro .oc-s8-outro-copy {
  margin-left:0!important;
  padding-left:0!important;
}
body main.oc-stage8-projects .oc-s8-outro .oc-s8-cta-row {
  margin-left:auto!important;
  margin-right:0!important;
  padding-right:0!important;
}

/* Stage 9 — Quotation. The original 1180px outer width and Gutenberg's
   independently constrained nested disclaimer caused the offset visible
   under the two-column calculator. Keep all content on one datum. */
body main.oc-stage9-page .oc-s9-wrap.wp-block-group,
body main.oc-stage9-page .oc-s9-breadcrumb.wp-block-group,
body main.oc-stage9-page .oc-s9-hero .oc-s9-hero-copy.wp-block-group {
  box-sizing:border-box!important;
  width:var(--oc-v207-measure)!important;
  max-width:none!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
}
body main.oc-stage9-page .oc-s9-content.wp-block-group,
body main.oc-stage9-page .oc-s9-bottomcta.wp-block-group {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}
/* Don't let a nested constrained Gutenberg group recenter the disclaimer. */
body main.oc-stage9-page .oc-s9-wrap.wp-block-group > .wp-block-group__inner-container,
body main.oc-stage9-page .oc-s9-disclaimer.wp-block-group,
body main.oc-stage9-page .oc-s9-disclaimer.wp-block-group > .wp-block-group__inner-container {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* Stage 3 uses the same 1100px cap but an obsolete fixed 24px gutter.
   Align its hero title, breadcrumb, section content and CTA with the footer
   at intermediate screen sizes. Do not touch nested column/grid widths. */
body main.oc-stage3-page .oc-s3-breadcrumbs.wp-block-group,
body main.oc-stage3-page .oc-s3-subhero > .oc-s3-wrap.wp-block-group,
body main.oc-stage3-page .oc-s3-subhero > .wp-block-group__inner-container > .oc-s3-wrap.wp-block-group,
body main.oc-stage3-page .oc-s3-section > .oc-s3-wrap.wp-block-group,
body main.oc-stage3-page .oc-s3-section > .wp-block-group__inner-container > .oc-s3-wrap.wp-block-group,
body main.oc-stage3-page .oc-s3-bottomcta > .oc-s3-wrap.wp-block-group,
body main.oc-stage3-page .oc-s3-bottomcta > .wp-block-group__inner-container > .oc-s3-wrap.wp-block-group {
  box-sizing:border-box!important;
  width:var(--oc-v207-measure)!important;
  max-width:none!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* Earlier converted pages already use the theme's 1100px outer measure.
   Align their closing bands without changing page-specific inner grids. */
body main.oc-stage3-page .oc-s3-bottomcta .oc-s3-wrap.wp-block-group,
body main.oc-stage4-page .oc-s4-bottomcta .oc-s4-wrap.wp-block-group,
body main.oc-stage7-page .oc-s7-bottomcta .oc-s7-wrap.wp-block-group {
  box-sizing:border-box!important;
  width:var(--oc-v207-measure)!important;
  max-width:none!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* Mobile remains responsive; no horizontal overflow or fixed 1180px width. */
@media (max-width:850px) {
  body main.oc-stage8-projects .oc-s8-outro .oc-s8-outro-grid.wp-block-group,
  body main.oc-stage8-projects .oc-s8-outro .oc-s8-outro-grid.wp-block-group > .wp-block-group__inner-container {
    display:block!important;
  }
  body main.oc-stage8-projects .oc-s8-outro .oc-s8-cta-row {
    margin-left:0!important;
  }
}
