/* Approved global media geometry and tab overlay; loaded after frozen516 layout. */
/* Remove the shared neutral matte; image pixels and explicit contrast plates stay intact. */
.continuous-edition .case-plate,.historical-document .case-plate{background:transparent}
/* The first primary visual fits within a square based on the available media width.
   Natural images remain proportional; portrait stages keep their media left aligned. */
.continuous-edition .flow-media{container-type:inline-size}
.continuous-edition .flow-media>.case-media:first-child>.case-plate:not(.video-stage):not(.op-player-stage):not(.op-motion-stage){width:fit-content!important;max-width:100%;min-height:0}
.continuous-edition .flow-media>.case-media:first-child>.case-plate:not(.video-stage):not(.op-player-stage):not(.op-motion-stage)>img{width:min(100cqw,calc(min(100cqw,960px) * var(--primary-media-aspect-ratio,1)))!important;height:auto!important;max-width:100%!important;max-height:min(100cqw,960px)!important;object-fit:contain;object-position:left top}
.continuous-edition .flow-media>.case-media:first-child>.case-plate:is(.video-stage,.op-player-stage,.op-motion-stage){width:min(100cqw,calc(min(100cqw,960px) * var(--primary-media-aspect-ratio,1)))!important;max-width:100%!important;max-height:min(100cqw,960px)}
.continuous-edition .flow-media>.case-media:first-child>.case-plate:is(.video-stage,.op-player-stage,.op-motion-stage)>:is(img,video,iframe){object-fit:contain!important;object-position:left center}
/* Absolute poster/model layers need a definite stage width; a raster image's
   fit-content width would collapse this interactive 3D frame. */
.continuous-edition .flow-content .flow-media>.case-media.lantern-case[data-lantern-figure]:first-child>.case-plate.lantern-stage{width:min(100cqw,calc(min(100cqw,960px) * var(--primary-media-aspect-ratio,1.3333333333333333)))!important;max-width:100%;max-height:min(100cqw,960px);aspect-ratio:4/3;min-height:0}
/* New source-size caps preserve the two-column caption rows without stretching
   a small source's plate to the size of its taller neighbour. */
.related-case-media:has(>:only-child)>figure.case-media{display:block!important;grid-template-rows:none!important;grid-row:auto!important;align-self:start!important}
.related-case-media:has(>:only-child)>figure.case-media>.case-plate{align-self:start!important;min-height:0}
.related-case-media{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
.related-case-media:has(>:only-child){display:block}
.related-case-media>.case-media:last-child:nth-child(odd){grid-column:1/-1}
/* Pair complete case cards while preserving each card's heading and reading. */
.paired-case-studies{margin:32px 0}
.paired-case-studies>.case-study-extra{min-width:0;margin:0;padding:0;border:0}
.paired-case-studies>.case-study-extra .case-commentary{margin-bottom:0}
@media(min-width:761px){
}
/* Subgrid aligns media and caption rows while leaving controls in their own row.
   Galleries with other child shapes retain their normal-flow layout. */
@supports (grid-template-rows:subgrid){
 @media(min-width:761px){
  .related-case-media:not(:has(>:only-child)):not(:has(>figure>:nth-child(4))):not(:has(>figure>:only-child)):not(:has(>figure>:first-child:not(.case-plate))):not(:has(>figure>:nth-child(2):not(figcaption))){row-gap:0}
  .related-case-media:not(:has(>:only-child)):not(:has(>figure>:nth-child(4))):not(:has(>figure>:only-child)):not(:has(>figure>:first-child:not(.case-plate))):not(:has(>figure>:nth-child(2):not(figcaption)))>figure{display:grid;grid-template-rows:subgrid;grid-row:span 3;align-self:stretch;align-content:start}
  .related-case-media:not(:has(>:only-child)):not(:has(>figure>:nth-child(4))):not(:has(>figure>:only-child)):not(:has(>figure>:first-child:not(.case-plate))):not(:has(>figure>:nth-child(2):not(figcaption)))>figure>.case-plate{align-self:stretch}
 }
}
@media(max-width:760px){
 .edition-reading-navigation .edition-category-links{margin-bottom:4px}
 .related-case-media{grid-template-columns:minmax(0,1fr);gap:24px}
}
.edition-reading-navigation .edition-category-links{margin-bottom:8px}
@media(max-width:760px){.edition-reading-navigation .edition-category-links{margin-bottom:4px}}
.archive-reading-index[data-has-previous=true][data-has-next=false] .section-nav-list {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34px, #000 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 34px, #000 100%);
}
