/* C30: GUIDE outer frame follows the exact category .mpw-container rules
 * in site.css (1320 / 96, 64, 48 and 36px gutters). No product rules change. */
body.mpw-guide-integrated #primary > .content-container.site-container {
  width:min(1320px,calc(100% - 96px)) !important;
  max-width:none !important;padding-inline:0 !important;margin-inline:auto !important;
}
body.mpw-guide-integrated #primary > .content-container.site-container > #main,
body.mpw-guide-integrated #primary .content-wrap,
body.mpw-guide-integrated #primary article.entry,
body.mpw-guide-integrated #primary .entry-content-wrap,
body.mpw-guide-integrated #primary #main .entry-content.single-content {
  width:100% !important;max-width:none !important;margin-inline:0 !important;padding-inline:0 !important;
}
body.mpw-guide-integrated #primary article.v3-guide[data-mp-universal-v511="1"] {
  width:100% !important;max-width:none !important;margin-inline:0 !important;
}
@media(max-width:1250px){body.mpw-guide-integrated #primary > .content-container.site-container{width:calc(100% - 64px) !important}}
@media(max-width:800px){body.mpw-guide-integrated #primary > .content-container.site-container{width:calc(100% - 48px) !important}}
@media(max-width:560px){body.mpw-guide-integrated #primary > .content-container.site-container{width:calc(100% - 36px) !important}}

/* One absolute decorative paint layer; all original text/card nodes keep their
 * grid positions and dimensions. Existing Bridge hero figures are reused. */
body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-featured-hero="shell"] {
  position:relative;isolation:isolate;overflow:hidden;
  --mpw-guide-copy-edge:calc(100% - 342px);
}
body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-featured-hero="shell"]::before,
body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-featured-hero="shell"]::after {display:none !important}
body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .v3-hero > .mpw-guide-hero-background {
  position:absolute !important;inset:0 !important;z-index:0 !important;pointer-events:none;
  width:100% !important;height:100% !important;margin:0 !important;border:0 !important;
  overflow:hidden;border-radius:inherit;
  -webkit-mask-image:linear-gradient(#000 0%,#000 78%,transparent 100%);
  mask-image:linear-gradient(#000 0%,#000 78%,transparent 100%);
}
body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .mpw-guide-hero-background > img {
  display:block !important;width:100% !important;height:100% !important;max-width:none !important;
  object-fit:cover !important;object-position:50% 45%;margin:0 !important;border:0 !important;border-radius:0 !important;
}
body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .mpw-guide-hero-background::after {
  content:"";position:absolute;inset:0;
  background:linear-gradient(0deg,rgba(248,251,250,.98),rgba(248,251,250,.9) 9%,transparent 30%),
   linear-gradient(90deg,rgba(248,251,250,.84) 0%,rgba(248,251,250,.87) 8%,
    rgba(248,251,250,.87) calc(var(--mpw-guide-copy-edge) - 1rem),rgba(248,251,250,.84) var(--mpw-guide-copy-edge),
    rgba(248,251,250,.10) min(100%,calc(var(--mpw-guide-copy-edge) + 5rem)),rgba(255,248,235,.06) 100%);
}
body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-featured-hero="shell"] > :not(.mpw-guide-hero-background) {position:relative;z-index:2}
body.mpw-guide-integrated .mpw-guide-duplicate-featured {display:none !important}
@media(min-width:1024px){body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-featured-hero="shell"]{--mpw-guide-copy-edge:calc(100% - 287px)}}
@media(min-width:1101px){body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-featured-hero="shell"]{--mpw-guide-copy-edge:calc(100% - 297px)}}
@media(max-width:767px){body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-featured-hero="shell"]{--mpw-guide-copy-edge:calc(100% - 18px)}
 body.mpw-guide-integrated article.v3-guide[data-mp-universal-v511="1"] .mpw-guide-hero-background::after{background:linear-gradient(90deg,rgba(248,251,250,.97),rgba(248,251,250,.9) 56%,rgba(248,251,250,.76)),linear-gradient(0deg,#f8fbfa,transparent 60%)}}
@media print{body.mpw-guide-integrated article.v3-guide .mpw-guide-hero-background{display:none !important}}

/* C31.1: freeze the photograph AND its gradient/mask to the closed content
 * height. Opening author information grows only the content below this plane.
 * Existing object-fit, object-position, width and focus-card rules are retained. */
body.mpw-guide-integrated #primary #main article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-background-stable="1"][data-mpw-featured-hero] {
 background-size:100% var(--mpw-guide-background-height) !important;background-repeat:no-repeat !important;
}
body.mpw-guide-integrated #primary #main article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-background-stable="1"][data-mpw-featured-hero="shell"] > .mpw-guide-hero-background {
 bottom:auto !important;height:var(--mpw-guide-background-height) !important;
}
body.mpw-guide-integrated #primary #main article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-background-stable="1"][data-mpw-featured-hero="bridge"] > figure.v3-hero-media[data-guide-shell-component="HERO_MEDIA"] {
 height:min(var(--mpw-guide-background-height),46rem) !important;
}
body.mpw-guide-integrated #primary #main article.v3-guide[data-mp-universal-v511="1"] .v3-hero[data-mpw-background-stable="1"][data-mpw-featured-hero="bridge"]::after {
 bottom:auto !important;height:var(--mpw-guide-background-height) !important;
}
