/* Layout stays in editable Divi modules. Only remove migration-added scaffolding. */
html.ep-divi { margin: 0; padding: 0; }
body.ep-divi { margin: 0; padding: 0; font: inherit; line-height: inherit; }
body.ep-divi #page-container,
body.ep-divi #et-main-area,
body.ep-divi #main-content { padding: 0; margin: 0; background: transparent; }
body.ep-divi .ep-section,
body.ep-divi .ep-row,
body.ep-divi .ep-column {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  float: none !important;
  background: transparent;
}
body.ep-divi .ep-section::after,
body.ep-divi .ep-row::after,
body.ep-divi .ep-column::after { display: none; }
/* No important here: the subsequently enqueued source utilities own actual nodes. */
body.ep-divi .ep-source-node {
  display: revert;
  position: static;
  float: none;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: inherit;
}
body.ep-divi .ep-leaf,
body.ep-divi .ep-leaf .et_pb_heading_container,
body.ep-divi .ep-leaf .et_pb_text_inner,
body.ep-divi .ep-leaf .et_pb_image_wrap,
body.ep-divi .ep-leaf-text .et_pb_text_inner > p:not([data-ep-original]) {
  display: contents !important;
}
/* display:contents removes boxes, not inherited styles. Divi Text's 1.7em
   otherwise leaks into source spans and changes flex/card heights. Reset only
   added wrappers; original paragraphs/spans keep their source utilities. */
body.ep-divi .ep-leaf-text,
body.ep-divi .ep-leaf-text .et_pb_text_inner,
body.ep-divi .ep-leaf-text .et_pb_text_inner > p:not([data-ep-original]) {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
}
/* Audited space-y paragraph stacks: utility margins are on display:contents
   Text modules. Forward their computed margins, not a font-relative gap, to
   the original visible paragraph. Keep all selector parts except the source
   Group in :where(): source paragraph margin utilities (loaded later) win.
   Last children, headings and real Group/link/list boxes are not changed. */
body.ep-divi:is(body,#ep-divi-specificity) :where(main) .ep-source-node:where(.space-y-1,.space-y-5) > :where(.ep-leaf-text:not(:last-child)) > :where(.et_pb_text_inner),
body.ep-divi:is(body,#ep-divi-specificity) :where(main) .ep-source-node:where(.space-y-1,.space-y-5) > :where(.ep-leaf-text:not(:last-child)) > :where(.et_pb_text_inner) > :where(p[data-ep-original]) {
  margin-block-start: inherit;
  margin-block-end: inherit;
}
body.ep-divi .ep-leaf-heading :is(h1,h2,h3,h4,h5,h6),
body.ep-divi .ep-leaf-image img {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
}
body.ep-divi [x-cloak] { display: none !important; }
body.ep-divi .ep-consent-template { display: contents !important; }
/* Native template Groups use x-show: Alpine's inline display:none MUST win. */
body.ep-divi .ep-source-template { display: contents; }
body.ep-divi .ep-source-link { gap: normal; }
body.ep-divi .ep-source-link .et_pb_link_inner,
body.ep-divi .ep-source-link .et_pb_link_text {
  display: contents !important;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: inherit;
}
body.ep-divi .ep-source-link .et_pb_link_inner::before,
body.ep-divi .ep-source-link .et_pb_link_inner::after,
body.ep-divi .ep-source-link .et_pb_link_text::before,
body.ep-divi .ep-source-link .et_pb_link_text::after { content: none; }
/* Low-specificity defaults only: source width/height/position utilities win. */
body.ep-divi .ep-icon-image,
body.ep-divi .ep-button-icon {
  display: inline-block;
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask-image: var(--ep-icon-url, linear-gradient(transparent, transparent));
  mask-image: var(--ep-icon-url, linear-gradient(transparent, transparent));
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
body.ep-divi .ep-icon-image .et_pb_image_wrap { display: contents !important; }
body.ep-divi .ep-icon-image img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
}
/* A customer may replace a native SVG Image with an ordinary media-library
   picture. Keep it visible instead of silently masking an unsupported format. */
body.ep-divi .ep-icon-image[data-ep-icon-mode="image"] {
  background-color: transparent;
  -webkit-mask-image: none;
  mask-image: none;
}
body.ep-divi .ep-icon-image[data-ep-icon-mode="image"] img {
  opacity: 1 !important;
  object-fit: contain;
}
/* Survives native rendering before runtime restores the reviewed x-cloak. */
body.ep-divi [data-ep-cloak="true"] { display: none !important; }
