/* Pierre Gagnaire Case Study — bounded compatibility only.
 * Pantoufle MASTER owns composition and motion.
 * The only case-specific adaptation here is the three-item documentary exit.
 */
html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resources-inline{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:min(930px,100%)!important;
}
html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resource__label{
  font-size:11px!important;
  font-weight:500!important;
  letter-spacing:.11em!important;
  line-height:1.1!important;
}

/* Gallery-stage invariant: the validated slot frame owns its geometry.
 * Neutralize the inherited LUX role heights that otherwise flatten G02/G04. */
@media(min-width:901px){
  html body.mev2a-gagnaire-current #post-330#post-330 .mev-cs-gallery--slots .mev-cs-gallery__cell{
    height:100%!important;
    max-height:none!important;
    aspect-ratio:auto!important;
  }
  html body.mev2a-gagnaire-current #post-330#post-330 .mev-cs-gallery--slots.mev-cs-gallery--landscape[data-mev-gallery-count="2"] .mev-cs-gallery__grid{
    height:33.333333vw!important;
    aspect-ratio:3 / 1!important;
    max-height:none!important;
  }
  html body.mev2a-gagnaire-current #post-330#post-330 .mev-cs-gallery--slots.mev-cs-gallery--landscape[data-mev-gallery-count="3"] .mev-cs-gallery__grid{
    height:22.222222vw!important;
    aspect-ratio:9 / 2!important;
    max-height:none!important;
  }
  html body.mev2a-gagnaire-current #post-330#post-330 .mev-cs-gallery--slots.mev-cs-gallery--portrait[data-mev-gallery-count="3"] .mev-cs-gallery__grid{
    height:min(78vh,41.666667vw)!important;
    aspect-ratio:12 / 5!important;
    max-height:78vh!important;
  }
}
/* Quote stage: keep the citation compact while preserving its internal rhythm. */
html body.mev2a-gagnaire-current #post-330#post-330 .mev2a-gagnaire-quote-section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

html body.mev2a-gagnaire-current #post-330#post-330 .mev2a-gagnaire-quote {
  margin-top: 0 !important;
  padding-top: 64px !important;
  padding-bottom: 64px !important;
}

/* Text-stage invariant: no editorial content or conclusion rail may sit on
 * a section-colour boundary. The selector automatically yields to galleries
 * once they are inserted at the end of their section. */
@media(min-width:901px){
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev-p25-section:has(.mev-p25-section-conclusion):not(:has(.mev-cs-gallery)){
    padding-bottom:72px!important;
  }
}
@media(max-width:900px){
  html body.mev2a-gagnaire-current #post-330#post-330 .mev2a-gagnaire-quote {
    padding-top:48px!important;
    padding-bottom:48px!important;
  }
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resource,
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resource + .mev-p25-lab-resource {
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
    place-content:center!important;
    place-items:center!important;
    align-self:stretch!important;
    row-gap:7px!important;
    height:auto!important;
    min-height:110px!important;
    margin:0!important;
    padding:20px 24px!important;
    text-align:center!important;
  }
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resource__label,
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resource__title {
    grid-column:1!important;
    width:auto!important;
    margin:0!important;
    padding:0!important;
    place-self:center!important;
    transform:none!important;
  }
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resource__label {
    grid-row:1!important;
  }
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resource__title {
    grid-row:2!important;
  }
  /* Desktop cascade separators are extra grid children on CTA 2/3: exclude them on stacked mobile rows. */
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resource > .mev-p25-motion-line--v {
    display:none!important;
  }
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev-p25-section:has(.mev-p25-section-conclusion):not(:has(.mev-cs-gallery)){
    padding-bottom:48px!important;
  }
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resources-inline{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:min(100%,calc(100vw - 32px))!important;
  }
  html body.mev-case-study-gagnaire-candidate #post-330#post-330 .mev2a-pantoufle-resources .mev-p25-lab-resource + .mev-p25-lab-resource{
    border-top:1px solid rgba(0,0,0,.42)!important;
    border-left:0!important;
  }
}

/* Programming stage: the shared spine already owns the horizontal indent.
 * Keep the "same centre" module on that rail and leave one editorial breath
 * before the prose that follows its lower separator. */
html body.mev2a-gagnaire-current #post-330#post-330 .mev2a-gagnaire-programming-spine > .mev-p25-prose > .mev-p25-integration-cycle{
  width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-bottom:38px!important;
}

