/* Shared editorial rhythm: complete images, proportional rows, one spacing scale. */
.photo-grid.editorial-gallery{--gallery-gap:clamp(18px,2.2vw,36px);display:flex;flex-direction:column;gap:var(--gallery-gap);padding:0 var(--pad) clamp(64px,7vw,112px);align-items:stretch}
.editorial-gallery .gallery-spread{display:grid;grid-template-columns:var(--gallery-columns,1fr);gap:var(--gallery-gap);align-items:start;width:100%;margin:0}
.editorial-gallery .gallery-spread.is-portrait{width:min(100%,680px);align-self:center}
.editorial-gallery .gallery-spread.is-portrait-pair{width:min(100%,1120px);align-self:center}
.editorial-gallery .gallery-spread .photo,.editorial-gallery .gallery-spread .photo:nth-child(3n+1){position:relative;display:block;grid-column:auto;width:100%;height:auto;min-height:0;max-height:none;padding:0;margin:0;border:0;align-self:start;line-height:0;background:transparent;overflow:hidden}
.editorial-gallery .gallery-spread .photo img{display:block;position:static;width:100%;height:auto;min-height:0;max-height:none;object-fit:contain;aspect-ratio:var(--image-ratio);transform:none;transition:filter .3s}
.editorial-gallery .photo:hover img{transform:none;filter:brightness(.97)}
.editorial-gallery .photo:focus-visible{outline:2px solid currentColor;outline-offset:5px}
@media(max-width:650px){.photo-grid.editorial-gallery{--gallery-gap:16px}.editorial-gallery .gallery-spread{display:flex;flex-direction:column;gap:var(--gallery-gap)}.editorial-gallery .gallery-spread.is-portrait,.editorial-gallery .gallery-spread.is-portrait-pair{width:100%}}
@media(prefers-reduced-motion:reduce){.editorial-gallery .gallery-spread .photo img{transition:none}}

/* Preserve existing chapters and captions, with the same spacing as the other cases. */
.editorial-chapter{--gallery-gap:clamp(18px,2.2vw,36px)}
.editorial-chapter .terras-row{display:grid;grid-template-columns:var(--gallery-columns,1fr);gap:var(--gallery-gap);align-items:start;width:100%;margin:0 0 var(--gallery-gap)}
.editorial-chapter .terras-row:last-child{margin-bottom:0}
.editorial-chapter .terras-row .terras-figure{margin:0;min-width:0}
.editorial-chapter .terras-row .photo{display:block;width:100%;height:auto;max-height:none;grid-column:auto;padding:0;margin:0;line-height:0}
.editorial-chapter .terras-row .photo img{display:block;width:100%;height:auto;object-fit:contain;transform:none}
@media(max-width:650px){.editorial-chapter{--gallery-gap:16px}.editorial-chapter .terras-row{display:flex;flex-direction:column}.editorial-chapter .terras-figure{width:100%}.editorial-chapter .terras-row .terras-figure+.terras-figure{margin:0}}
