/* Technical compatibility for migrated service content only. Theme CSS owns design. */
.dc-gutenberg-content {
  --wp--style--global--content-size: var(--container-max);
}

/* WordPress constrained layouts can otherwise replace the theme's container
   measure with the global narrow content size. */
.dc-gutenberg-content .dc-container.wp-block-group {
  width: min(100% - (var(--container-padding-desktop) * 2), var(--container-max));
  max-width: var(--container-max);
  margin-inline: auto !important;
}

/* Keep both current core/group markup and the older inner-container variant
   usable by family layouts. No display/grid template is prescribed here. */
.dc-gutenberg-content .wp-block-group > .wp-block-group__inner-container {
  width: 100%;
  max-width: none;
  margin-inline: 0 !important;
}

/* Children of native Gutenberg flex/grid Groups must be allowed to shrink;
   family-specific grid tracks and spacing remain defined by their own CSS. */
.dc-gutenberg-content :is(.is-layout-flex, .is-layout-grid) > .wp-block-group,
.dc-gutenberg-content :is(.is-layout-flex, .is-layout-grid) > .wp-block-group__inner-container > .wp-block-group {
  min-width: 0;
}

@media (max-width: 767px) {
  .dc-gutenberg-content .dc-container.wp-block-group {
    width: min(100% - (var(--container-padding-mobile) * 2), var(--container-max));
  }
}
