/* Series order is authored in painting-order.json; layout never reorders it. */
.series-gallery{--row-height:clamp(280px,32vw,460px);--column-gap:clamp(28px,4vw,68px)}
.series-group{margin-bottom:100px}
.series-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--column-gap);align-items:start}
.series-row+.series-row{margin-top:54px}
.series-row[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr));max-width:1040px;margin-left:auto;margin-right:auto}
.series-row[data-count="1"]{grid-template-columns:minmax(0,1fr);max-width:640px;margin-left:auto;margin-right:auto}
.series-row[data-count="2"]:has([data-work-id="11"]){max-width:850px}
.series-gallery .work-card{grid-column:auto;margin:0;min-width:0}
.series-gallery .work-card>a{display:block}
.series-gallery .art-images{height:calc(var(--row-height) * var(--row-scale,1));width:100%;aspect-ratio:auto;overflow:visible;gap:12px;display:flex;align-items:flex-end;justify-content:center}
.series-gallery .art-images img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(var(--row-height) * var(--art-scale));object-fit:contain;object-position:center bottom}
.series-gallery .art-images.pair img{width:auto;max-width:calc(50% - 6px)}
.series-gallery .wide-row .art-images{height:auto;min-height:0}
.series-gallery .wide-row img{width:100%;height:auto}
.series-gallery figcaption{display:flex;flex-direction:column;align-items:flex-start;gap:3px;margin-top:18px;line-height:1.5;font-size:14px;letter-spacing:0}
.series-gallery figcaption .card-title{color:var(--ink);overflow-wrap:normal}
.series-gallery figcaption .card-facts,.series-gallery figcaption .card-medium{color:var(--muted);white-space:normal;flex-shrink:1}
.series-gallery figcaption .card-medium{font-size:12px}
.year-filter a{min-width:36px;min-height:44px;text-align:center}
@media(min-width:1700px){.series-gallery{--row-height:460px}}
@media(min-width:651px) and (max-width:1000px){.series-gallery{--row-height:330px;--column-gap:26px}.series-group{margin-bottom:78px}}
@media(max-width:650px){
 .series-gallery{--row-height:350px;--column-gap:22px}
 .series-group{margin-bottom:65px}
 .series-row,.series-row[data-count="2"],.series-row[data-count="1"]{grid-template-columns:minmax(0,1fr);max-width:none;gap:40px}
 .series-row+.series-row{margin-top:40px}
 .series-gallery .art-images{height:auto;min-height:0;align-items:center}
 .series-gallery .art-images img{max-height:calc(460px * var(--art-scale));max-width:100%;width:auto;height:auto}
 .series-gallery figcaption{margin-top:16px;font-size:14px;gap:3px}
 .series-row.narrow-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
 .series-row.narrow-row[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
 .series-gallery .narrow-row .art-images{height:270px;align-items:flex-end}
 .series-gallery .narrow-row img{max-height:270px}
 .series-gallery .narrow-row figcaption{font-size:13px;line-height:1.45}
 .series-gallery .narrow-row .card-medium{font-size:12px}
 .series-row[data-count="1"] .art-images img{max-height:390px}
 .series-gallery .art-images.pair img{max-width:calc(50% - 6px)}
}

/* Balance the two Collective Growth paintings at the start of the archive. */
@media(min-width:651px){.series-group[data-group="growth"] .series-row[data-count="2"]{max-width:920px}}

/* Keep both A Thousand Mists paintings together, followed by Collective Growth. */
.series-group[data-group="a-thousand-mists"] .series-row{max-width:780px;grid-template-columns:repeat(2,minmax(0,1fr))}
.series-group[data-group="a-thousand-mists"] .art-images{height:auto}
.series-group[data-group="a-thousand-mists"] .art-images img{width:100%;max-height:none}
@media(max-width:650px){
 .series-group[data-group="a-thousand-mists"] .series-row{max-width:100%;gap:20px}
 .series-group[data-group="a-thousand-mists"] figcaption{font-size:13px}
 .series-group[data-group="growth"] .series-row[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
 .series-group[data-group="growth"] .art-images{align-items:flex-end}
 .series-group[data-group="growth"] figcaption{font-size:13px}
}
