/* Product editorial layout; native Welcart purchase controls retain their own structure. */
.stem-product--editorial .stem-product-info{position:static;min-width:0;padding:0}
.stem-site .stem-product--editorial #itempage.stem-product-grid{grid-template-columns:minmax(0,1.6fr) minmax(310px,1fr);gap:5%}
.stem-product--editorial .stem-product-heading{margin-bottom:18px}
.stem-product--editorial .stem-product-code{font-size:11px;margin:0 0 12px;letter-spacing:.03em}
.stem-product--editorial .stem-product-title{font-size:28px;line-height:1.6;margin:0}
.stem-product-intro{margin:0 0 24px;font-size:16px;line-height:1.95}
.stem-product-intro p{margin:0 0 14px}
.stem-product-intro ul{margin:0;padding:0 0 18px 1.2em;border-bottom:1px solid var(--stem-line);font-size:13px}
.stem-product-intro li{margin:0 0 5px;padding-left:3px}
.stem-product--editorial .stem-product-price{margin:0 0 22px}
.stem-product-selection{min-width:0;scroll-margin-top:24px}
.stem-product-selection:focus-visible{outline:2px solid var(--stem-ink);outline-offset:6px}
.stem-gallery-pair{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:stretch}
.stem-gallery-pair.has-companion{grid-template-columns:1fr 1fr}
.stem-gallery-pair .stem-gallery-zoom{min-width:0;display:flex;align-items:center;background:var(--stem-paper)}
.stem-gallery-pair .stem-gallery-main{aspect-ratio:4/5;min-height:360px;height:100%;max-height:650px;object-fit:contain}
.stem-gallery-companion{min-width:0;margin:0;position:relative;background:var(--stem-paper)}
.stem-gallery-companion>a{display:block;height:100%}
.stem-gallery-companion img{height:100%;min-height:360px;max-height:650px;width:100%;object-fit:contain;aspect-ratio:4/5}
.stem-gallery-companion-label{position:absolute;bottom:0;left:0;right:0;background:rgba(255,255,255,.94);padding:10px 12px;font-size:11px;line-height:1.6}
.stem-gallery-companion-label:empty{display:none}
.stem-gallery-navigation{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0 0}
.stem-product--editorial .stem-gallery-hint{margin:0;font-size:11px}
.stem-gallery-position{display:flex;align-items:center;gap:8px;flex:none}
.stem-gallery-count{font-size:11px;min-width:44px;text-align:center;font-variant-numeric:tabular-nums}
.stem-site .stem-gallery-position button{display:inline-flex;align-items:center;justify-content:center;padding:4px;width:36px;min-height:38px;margin:0;background:transparent;border:1px solid var(--stem-line);color:var(--stem-ink);font-size:18px;cursor:pointer}
.stem-gallery-position button:focus-visible,.stem-gallery-companion a:focus-visible{outline:2px solid var(--stem-ink);outline-offset:3px}
.stem-product--editorial .stem-gallery-thumbs{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:8px;scrollbar-width:thin}
.stem-site .stem-product--editorial .stem-gallery-thumb{flex:0 0 76px;width:76px}
.stem-product--editorial .stem-gallery-thumb img{aspect-ratio:1;object-fit:contain}
.stem-product-save{margin:5px 0 24px}
.stem-site .stem-product-save .stem-favorite-button{padding:6px 0;border:0;background:none;min-height:36px;font-size:11px;gap:7px;box-shadow:none}
.stem-product-purchase-note{border-top:1px solid var(--stem-line);padding-top:20px;margin-top:18px;font-size:12px;line-height:1.9}
.stem-product-purchase-note p{display:grid;grid-template-columns:6em 1fr;gap:12px;margin:0 0 8px}
.stem-product-purchase-note strong{font-weight:500}
.stem-product-purchase-note span{color:var(--stem-slate)}
.stem-product-purchase-note a{display:inline-block;margin-top:6px;text-decoration:underline;text-underline-offset:4px}
.stem-product-section-nav{display:flex;flex-wrap:wrap;gap:16px 28px;margin:64px 0 0;padding:21px 0;border-top:1px solid var(--stem-line);border-bottom:1px solid var(--stem-line);font-size:13px}
.stem-product-section-nav a{padding:5px 0;text-decoration:underline;text-underline-offset:5px}
.stem-product--editorial .stem-product-copy{max-width:100%;margin:46px 0 0;padding:0;border:0}
.stem-product-story>h2{font-size:26px;margin:0 auto 28px;max-width:760px;scroll-margin-top:28px}
.stem-product--editorial .stem-product-story .entry-content{max-width:100%;font-size:16px;line-height:2.1}
.stem-product-story .entry-content>p,.stem-product-story .entry-content>ul,.stem-product-story .entry-content>ol,.stem-product-story .entry-content>h2,.stem-product-story .entry-content>h3,.stem-product-story .entry-content>h4,.stem-product-story .entry-content>table{max-width:760px;margin-left:auto;margin-right:auto}
/* Welcart wraps original body blocks; keep their measure aligned with the chapters,
   while full-width photographic spreads remain outside this text-only rule. */
.stem-product-story .entry-content .loopexp>.field>:is(p,ul,ol,h1,h2,h3,h4,h5,h6,table,blockquote){max-width:760px;margin-left:auto;margin-right:auto}
/* Imported listing photos and source author profiles share the prose measure.
   Keep editorial photo spreads free to use the full page width. */
.stem-product-story .entry-content>.loopimg{float:none;width:100%;max-width:760px;margin:28px auto;text-align:left}
.stem-product-story .entry-content>.loopimg>a{display:inline-block;max-width:100%}
.stem-product-story .entry-content>.loopimg img{display:block;width:300px;max-width:100%;height:auto}
.stem-product-story .entry-content .profile{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:start;gap:24px;max-width:760px;margin:40px auto;padding:24px;border:1px solid var(--stem-line);background:var(--stem-paper)}
.stem-product-story .entry-content .profile_image{min-width:0;margin:0;padding:0}
.stem-product-story .entry-content .profile_image img{display:block;width:96px;height:96px;max-width:100%;object-fit:cover;border-radius:50%}
.stem-product-story .entry-content .profile_text{min-width:0}
.stem-product-story .entry-content .profile_text_name{margin:0 0 10px;font-size:14px;font-weight:600;line-height:1.8}
.stem-product-story .entry-content .profile_text_description{margin:0;color:var(--stem-slate);font-size:13px;line-height:1.9}
.stem-product-story .entry-content>p{margin-top:16px;margin-bottom:16px}
.stem-product-story .entry-content table:has(td.horizont){font-size:12px;line-height:1.7;border-spacing:0}
.stem-product-story .entry-content table:has(td.horizont) :is(th,td){padding:12px 14px;vertical-align:middle;background:#fff;white-space:normal}
.stem-product-story .entry-content table:has(td.horizont) :is(.horizont,.head,tr>:first-child){background:#f3f6f7;font-weight:500}
.stem-product-story .entry-content table:has(td.horizont) tr>:first-child{min-width:110px;text-align:left}
.stem-product-story .entry-content img{height:auto;max-width:100%}
.stem-product-story .entry-content .wp-caption{max-width:100%;margin:38px auto}
.stem-product-story .entry-content .wp-caption img{width:100%;max-height:850px;object-fit:contain}
.stem-product-story .entry-content .wp-caption-text{font-size:12px;color:var(--stem-slate);line-height:1.8;margin:10px 0 0}
/* Curated chapter hooks retain the actual photograph and original caption as a pair. */
.stem-product-story .entry-content .stem-editorial-chapter{font-size:28px;line-height:1.7;max-width:760px;margin:64px auto 28px;scroll-margin-top:28px}
.stem-product-story .entry-content .stem-editorial-prose{max-width:760px;margin-left:auto;margin-right:auto}
.stem-product-story .entry-content .stem-editorial-spread{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);align-items:center;gap:44px;width:100%!important;max-width:none;margin:54px 0}
.stem-product-story .entry-content .stem-editorial-spread>img,.stem-product-story .entry-content .stem-editorial-spread>a{display:block;width:100%;min-width:0}
.stem-product-story .entry-content .stem-editorial-spread .wp-caption-text,.stem-product-story .entry-content .stem-editorial-spread figcaption{font-size:16px;line-height:2.1;color:var(--stem-ink);margin:0}
.stem-product-reading{margin:65px 0 0;border-top:1px solid var(--stem-line);padding:35px 0 0}
.stem-product-reading-heading{display:flex;justify-content:space-between;align-items:baseline;gap:20px;margin:0 0 28px}
.stem-product-reading-heading h2{font-size:24px;margin:0;scroll-margin-top:28px}
.stem-product-reading-heading>a{font-size:12px;text-decoration:underline;text-underline-offset:4px}
.stem-product-reading-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:35px}
.stem-product-reading-grid>.stem-webmag-card:only-child{max-width:680px}
.stem-product-explore{display:flex;flex-wrap:wrap;gap:15px 30px;border-top:1px solid var(--stem-line);margin:48px 0 0;padding:26px 0;font-size:13px}
.stem-product-explore a{text-decoration:underline;text-underline-offset:5px}
.stem-site .stem-product-return{display:none}.stem-site .stem-product-return[hidden]{display:none!important}
@media(max-width:1120px) and (min-width:901px){.stem-site .stem-product--editorial #itempage.stem-product-grid{grid-template-columns:minmax(0,1.25fr) minmax(300px,1fr);gap:32px}.stem-gallery-pair .stem-gallery-main,.stem-gallery-companion img{min-height:280px}.stem-product--editorial .stem-product-title{font-size:25px}}
@media(max-width:900px){
 .stem-site .stem-product--editorial #itempage.stem-product-grid{display:flex;flex-direction:column;gap:0}
 .stem-product--editorial .stem-product-info,.stem-site .stem-product--editorial #itempage .item-info.stem-product-form{display:contents}
 .stem-product--editorial .stem-product-info>*{order:4;width:100%}
 .stem-product--editorial .stem-product-form>*{order:5;width:100%}
 .stem-product--editorial .stem-product-heading{order:1;margin:0 0 15px}
 .stem-product--editorial .stem-product-price{order:2;margin:0 0 24px}
 .stem-product--editorial .stem-product-gallery{order:3;max-width:100%;margin:0 0 26px}
 .stem-product--editorial .stem-product-intro{order:4;margin:0 0 12px;font-size:16px}
 .stem-product--editorial .stem-product-save,
 .stem-product--editorial .stem-product-notifications,
 .stem-product--editorial .stem-product-purchase-note{order:6}
 .stem-product--editorial .stem-product-save{margin:0 0 8px}
 .stem-product--editorial .stem-product-purchase-note{margin-top:8px}
 .stem-gallery-pair .stem-gallery-main,.stem-gallery-companion img{min-height:280px;max-height:620px}
 .stem-product-section-nav{margin-top:40px;gap:10px 22px;font-size:12px;padding:16px 0}
 .stem-site .stem-product-return{position:fixed;bottom:max(15px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:35;display:flex;align-items:center;justify-content:center;gap:25px;min-height:48px;max-width:calc(100% - 40px);width:330px;margin:0;padding:12px 16px;border:1px solid var(--stem-ink);background:var(--stem-ink);color:white;font:inherit;font-size:12px;box-shadow:0 2px 12px #0002;cursor:pointer}
 .stem-product-return:focus-visible{outline:2px solid var(--stem-ink);outline-offset:4px}
}
@media(max-width:600px){
 .stem-product--editorial .stem-product-title{font-size:25px}
 .stem-gallery-pair.has-companion{grid-template-columns:1fr;gap:0}.stem-gallery-companion{display:none}
 .stem-gallery-pair .stem-gallery-main,.stem-gallery-companion img{min-height:240px;max-height:480px}
 .stem-gallery-companion-label{font-size:10px;padding:7px 8px}
 .stem-site .stem-product--editorial .stem-gallery-thumb{flex-basis:64px;width:64px}
 .stem-product--editorial .stem-gallery-hint{font-size:10px}
 .stem-product-story>h2{font-size:23px}
 .stem-product-story .entry-content .stem-editorial-chapter{font-size:24px;margin-top:40px}
 .stem-product-story .entry-content .stem-editorial-spread{grid-template-columns:1fr;gap:20px;margin:35px 0}
 .stem-product-story .entry-content table:has(td.horizont) :is(th,td){padding:10px}
 .stem-product--editorial .stem-product-story .entry-content{font-size:16px;line-height:2}
 .stem-product-story .entry-content .wp-caption{margin:28px 0}
 .stem-product-story .entry-content .profile{grid-template-columns:1fr;gap:16px;margin:30px auto;padding:20px}
 .stem-product-story .entry-content .profile_image img{width:80px;height:80px}
 .stem-product-purchase-note p{grid-template-columns:5.8em 1fr;gap:9px}
 .stem-product-reading{margin-top:45px;padding-top:28px}
 .stem-product-reading-grid{grid-template-columns:1fr;gap:30px}
 .stem-product-reading-heading{align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:22px}
 .stem-product-reading-heading h2{font-size:22px}
}
