/* Baseline: MoMA collection principles adapted to the existing type system.
   Bound both image axes by the column width, retain intrinsic proportions, and
   place captions directly below the actual image height. Default typography is 13px / 20px; archive desktop captions use the override below. */
body[data-catalogue-layout="moma"] .catalogue-page :is(.works-grid,.catalogue-grid):not(.list){grid-template-columns:repeat(7,minmax(0,1fr));gap:24px 20px}
body[data-catalogue-layout="moma"] .catalogue-page :is(.works-grid,.catalogue-grid):not(.list)>article{container-type:inline-size}
body[data-catalogue-layout="moma"] .catalogue-page :is(.works-grid,.catalogue-grid):not(.list) .catalogue-thumbnail img{width:auto;height:auto;max-width:100%;max-height:100cqw;object-fit:contain;object-position:left top}
body[data-catalogue-layout="moma"] .catalogue-page :is(.works-grid,.catalogue-grid):not(.list) .catalogue-thumbnail img:not([data-image-state="ready"]){width:100%;aspect-ratio:1/1}
body[data-catalogue-layout="moma"] .catalogue-page :is(.works-grid,.catalogue-grid):not(.list) .thumbnail-fallback{width:100%;height:auto;aspect-ratio:4/3}



/* Preserve caption width as density increases. Narrow desktops keep seven columns. */
@media(min-width:1440px){
 body[data-catalogue-layout="moma"] .catalogue-page :is(.works-grid,.catalogue-grid):not(.list){grid-template-columns:repeat(8,minmax(0,1fr))}
}
@media(min-width:1680px){
 body[data-catalogue-layout="moma"] .catalogue-page :is(.works-grid,.catalogue-grid):not(.list){grid-template-columns:repeat(9,minmax(0,1fr))}
}

/* Archive thumbnails: a compact caption scale, with every title retained.
   Other record types, text lists, detail pages and small screens keep their scale. */
@media(min-width:1200px){
 body[data-catalogue-layout="moma"] .catalogue-page .catalogue-grid[data-record-types="archive"]:not(.list){row-gap:20px}
 body[data-catalogue-layout="moma"] .catalogue-page .catalogue-grid[data-record-types="archive"]:not(.list) :is(.result-content h2,.result-meta,.type-badge,.result-excerpt,.sample-badge,.thumbnail-fallback){font-size:var(--text-caption);line-height:1.0625rem;font-weight:400}
}

/* Work-caption leading; the selected baseline resolves to 12px below. */
body[data-catalogue-layout="moma"] .catalogue-page .works-grid :is(.art-caption h2,.art-medium,.result-excerpt){line-height:1.2}

/* Selected 12px work captions. Legacy 13px remains available for comparison. */
body[data-catalogue-layout="moma"][data-work-type-size="12"] .catalogue-page .works-grid :is(.art-caption h2,.art-medium,.result-excerpt){font-size:var(--text-caption);line-height:1.2}
