/* Zoe Crystal Library R18.7 RC3.3 — scoped, aspect-ratio-preserving image bounds.
   Display-only: does not crop, rewrite uploads, or affect WooCommerce/home pages. */
body.single-zg_crystal .zg19,
body.single-zg_crystal .zg19-body,
body.single-zg_crystal .zg19-body section,
body.single-zg_crystal .zcl-detail-content,
body.zg-b18-knowledge .entry-content,
body.zg-b18-knowledge .wpb_wrapper {min-width:0;max-width:100%;box-sizing:border-box}
body.single-zg_crystal .zg19-body :is(figure,.wp-caption,.wpb_single_image),
body.single-zg_crystal .zcl-detail-content :is(figure,.wp-caption,.wpb_single_image),
body.zg-b18-knowledge .entry-content :is(figure,.wp-caption,.wpb_single_image) {max-width:100%;min-width:0;box-sizing:border-box}
body.single-zg_crystal .zg19-body :is(p,figure,.wp-caption,.wpb_single_image) img,
body.single-zg_crystal .zcl-detail-content :is(p,figure,.wp-caption,.wpb_single_image) img,
body.zg-b18-knowledge .entry-content :is(p,figure,.wp-caption,.wpb_single_image) img {
 display:block;max-width:100%!important;width:auto;height:auto!important;object-fit:contain;
}
/* Preserve the existing fixed-width grid card and hero image rules. */
body.single-zg_crystal .zg19-gallery img,
body.single-zg_crystal .zg19-image img {max-width:100%!important;object-fit:contain}
body.single-zg_crystal .zg19-body :is(figure,.wp-caption) figcaption,
body.zg-b18-knowledge .entry-content :is(figure,.wp-caption) figcaption {max-width:100%;overflow-wrap:anywhere}
@media(max-width:767px){
 body.single-zg_crystal .zg19-body :is(p,figure,.wp-caption,.wpb_single_image) img,
 body.single-zg_crystal .zcl-detail-content :is(p,figure,.wp-caption,.wpb_single_image) img,
 body.zg-b18-knowledge .entry-content :is(p,figure,.wp-caption,.wpb_single_image) img {max-height:70vh;}
}
/* RC3.5.1: editorial-only bounds. Do not alter hero, galleries, linked images or icons. */
body.single-zg_crystal img.zg-editorial-inline-image,
body.single-zg_knowledge img.zg-editorial-inline-image {
  display:block;width:auto!important;max-width:min(100%,440px)!important;
  height:auto!important;max-height:480px!important;object-fit:contain;
  margin-inline:auto;cursor:zoom-in;
}
@media(max-width:767px){
  body.single-zg_crystal img.zg-editorial-inline-image,
  body.single-zg_knowledge img.zg-editorial-inline-image {
    max-width:min(100%,340px)!important;max-height:400px!important;
  }
}
.zg-image-zoom-dialog{border:0;padding:20px;background:#fff;border-radius:10px;max-width:96vw;max-height:96vh;box-shadow:0 20px 70px #0005}
.zg-image-zoom-dialog::backdrop{background:rgba(0,0,0,.82)}
.zg-image-zoom-dialog img{display:block;width:auto;height:auto;max-width:calc(96vw - 40px);max-height:calc(96vh - 90px);object-fit:contain}
.zg-image-zoom-dialog button{display:block;margin:0 0 10px auto;background:#222;color:white;border:0;border-radius:4px;padding:8px 13px;cursor:pointer}

/* RC3.5.3: constrain editorial images before JS initializes.
   This prevents a large-image flash and preserves existing hero/gallery controls. */
body.single-zg_crystal .zg19-body :is(p,figure,.wp-caption,.wpb_single_image) img:not(.emoji):not(.avatar):not([data-no-zoom]),
body.single-zg_crystal .zcl-detail-content :is(p,figure,.wp-caption,.wpb_single_image) img:not(.emoji):not(.avatar):not([data-no-zoom]),
body.single-zg_knowledge .entry-content :is(p,figure,.wp-caption,.wpb_single_image) img:not(.emoji):not(.avatar):not([data-no-zoom]) {
  width:auto!important;height:auto!important;
  max-width:min(100%,440px)!important;max-height:480px!important;
  object-fit:contain;box-sizing:border-box;
}
@media(max-width:767px){
body.single-zg_crystal .zg19-body :is(p,figure,.wp-caption,.wpb_single_image) img:not(.emoji):not(.avatar):not([data-no-zoom]),
body.single-zg_crystal .zcl-detail-content :is(p,figure,.wp-caption,.wpb_single_image) img:not(.emoji):not(.avatar):not([data-no-zoom]),
body.single-zg_knowledge .entry-content :is(p,figure,.wp-caption,.wpb_single_image) img:not(.emoji):not(.avatar):not([data-no-zoom]) {
 max-width:min(100%,340px)!important;max-height:400px!important;
}}
/* Exclusions have higher specificity than the fallback rules. */
body.single-zg_crystal :is(.zg19-gallery,.zg19-image,.zg19-hero,.zg19-facts,.zg19-tags,.zg19-mobile-image,.zcl-detail-hero) img,
body.single-zg_knowledge :is(.zg19-gallery,.zg19-image,.zg19-hero,.zcl-detail-hero) img {
 max-width:100%!important;max-height:none!important;
}

/* RC3.7: saved per-occurrence settings are CSS-only, available before JavaScript. */
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="20"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="20"]{display:block!important;width:20%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="25"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="25"]{display:block!important;width:25%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="30"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="30"]{display:block!important;width:30%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="35"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="35"]{display:block!important;width:35%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="40"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="40"]{display:block!important;width:40%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="45"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="45"]{display:block!important;width:45%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="50"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="50"]{display:block!important;width:50%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="55"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="55"]{display:block!important;width:55%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="60"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="60"]{display:block!important;width:60%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="65"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="65"]{display:block!important;width:65%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="70"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="70"]{display:block!important;width:70%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="75"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="75"]{display:block!important;width:75%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="80"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="80"]{display:block!important;width:80%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="85"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="85"]{display:block!important;width:85%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="90"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="90"]{display:block!important;width:90%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="95"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="95"]{display:block!important;width:95%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-scale="100"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-scale="100"]{display:block!important;width:100%!important;max-width:100%!important;max-height:none!important;height:auto!important;object-fit:contain!important;box-sizing:border-box!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-align="left"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-align="left"]{margin-left:0!important;margin-right:auto!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-align="center"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-align="center"]{margin-left:auto!important;margin-right:auto!important}
body.single-zg_crystal img.zg-editorial-configured[data-zg-align="right"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-align="right"]{margin-left:auto!important;margin-right:0!important}
/* Configured image should never be mistaken for a gallery image. */
body.single-zg_crystal img.zg-editorial-configured[data-zg-zoom="0"],body.single-zg_knowledge img.zg-editorial-configured[data-zg-zoom="0"]{cursor:default!important}

/* RC4.0: per-slot settings take precedence over earlier generic image bounds. */
.zg18-article-layout img.zg-editorial-configured[data-zg-scale]{max-height:none!important;object-fit:contain!important}

/* RC4.1 scoped editorial presentation: avoid altering page-wide grid. */
.zg18-article-layout img.zg-editorial-configured[data-zg-scale] { cursor:zoom-in!important; }
.zg18-article-layout img.zg-editorial-configured[data-zg-zoom="0"] { cursor:default!important; }
.zg18-article-layout :is(figure,.wp-caption) { max-width:100%; box-sizing:border-box; }
.zg18-article-layout :is(figcaption,.wp-caption-text) {font-size:clamp(12px,0.9rem,14px);line-height:1.55;color:#68636b;overflow-wrap:anywhere;}
.zg18-article-layout :is(p,li) {line-height:1.75;}
.zg18-article-layout :is(h2,h3,h4) {line-height:1.35;}
.zg18-article-layout :is(.zg-editorial-configured,.wp-caption,figure) {min-width:0;}
@media(max-width:767px){.zg18-article-layout {max-width:100%;overflow-wrap:anywhere;} .zg18-article-layout :is(figure,.wp-caption){max-width:100%;}}
/* RC4.2: overlay works independently of native dialog support. */
.zg-image-zoom-dialog[hidden]{display:none!important}
.zg-image-zoom-dialog:not([hidden]){position:fixed!important;inset:0!important;z-index:2147483000!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:100vw;max-width:none;height:100vh;max-height:none;margin:0;padding:24px;background:rgba(0,0,0,.88);border:0;border-radius:0}
.zg-image-zoom-dialog:not([hidden]) img{display:block;width:auto!important;height:auto!important;max-width:calc(100vw - 48px)!important;max-height:calc(100vh - 110px)!important;object-fit:contain}
.zg-image-zoom-dialog:not([hidden]) button{align-self:flex-end;margin:0 0 12px;color:#fff;background:#333;border:1px solid #777;border-radius:6px;padding:9px 14px;cursor:pointer}
body.zg-image-zoom-open{overflow:hidden}

/* Clear Quartz editorial layout. Image size never determines track width. */
.zg18-article-layout section figcaption {color:#465462!important}
.zg18-article-layout figure:has([data-zg-image]):not(:has(img)) {background:transparent!important;border:0!important;padding:0!important;min-height:0!important;box-shadow:none!important}
.zg18-article-layout figure:has([data-zg-image]):not(:has(img,figcaption)) {display:none!important}
.zg18-article-layout img.zg-editorial-configured {margin-left:auto!important;margin-right:auto!important}
.zg18-article-layout img[data-zg-zoom="0"] {cursor:default!important}
