/* Reversible trial: sampled solid white/dark grey, never pixel blending. */
body[data-variant="A"] .site-header{mix-blend-mode:normal}
body[data-variant="A"] .site-header>.wordmark,
body[data-variant="A"] .site-header>.header-project-name,
body[data-variant="A"] .site-header>.header-controls{transition:color 420ms ease-in-out}
@media(prefers-reduced-motion:reduce){
 body[data-variant="A"] .site-header>.wordmark,
 body[data-variant="A"] .site-header>.header-project-name,
 body[data-variant="A"] .site-header>.header-controls{transition:none}
}
body.scroll-header-ready[data-variant="A"]:not(.header-compact) .site-header>.wordmark,
body.scroll-header-ready[data-variant="A"]:not(.header-compact) .site-header>.header-project-name,
body.scroll-header-ready[data-variant="A"]:not(.header-compact) .site-header>.header-controls{color:var(--sampled-ink,#fff)}
/* Enlarged blurred copy fills behind the sharp, full-frame foreground. */
.gallery-backdrop{position:absolute;inset:0;width:100%;height:100%;z-index:-3;pointer-events:none}
body[data-variant="A"] .immersive{background-color:#494c48}
body[data-variant="A"].viewing-sheet .zone-status{color:#282828;text-shadow:none}
@media(prefers-reduced-motion:reduce){body[data-variant="A"] .immersive{transition:none}}
/* Narrow photo-edge treatment; the central image remains unshaded. */
body[data-variant="A"] .hero-shade{display:block;pointer-events:none;background:linear-gradient(to bottom,#10171366,transparent 140px),linear-gradient(to top,#10171340,transparent 70px),linear-gradient(to right,#10171326,transparent 60px),linear-gradient(to left,#10171326,transparent 60px)}
body[data-variant="A"] .hero-shade{opacity:1;transition:opacity 420ms ease-in-out}
body[data-variant="A"].viewing-sheet .hero-shade{opacity:0}
/* Loading never dims the current image; the decoded incoming layer fades in. */
body[data-variant="A"] .hero-photo{transition:none;opacity:1}
.gallery-incoming{pointer-events:none}
@media(prefers-reduced-motion:reduce){body[data-variant="A"] .hero-shade{transition:none}}
/* Sheet contrast is confined to header items, never a full-image scrim. */
body.viewing-sheet:not(.header-compact) .site-header .wordmark,
body.viewing-sheet:not(.header-compact) .site-header .header-project-name,
body.viewing-sheet:not(.header-compact) .site-header .header-controls{background:transparent;box-shadow:none;border:0;border-radius:0}
@media(max-width:700px){body[data-variant="A"] .hero-shade{background:linear-gradient(to bottom,#10171359,transparent 90px),linear-gradient(to top,#10171333,transparent 35px),linear-gradient(to right,#1017131f,transparent 25px),linear-gradient(to left,#1017131f,transparent 25px)}}
/* Direct live refinement: the gallery shares the opening composition.
   Only A; source images, masks and accepted header motion are unchanged. */
.gallery-deck{--preview-height:clamp(150px,calc((100svh - var(--hero-height) - 240px)*.68),440px);padding:24px 4% 32px;gap:24px;justify-content:flex-start}
.gallery-heading{padding:0;font-size:clamp(16px,1.25vw,24px)}
.gallery-heading .eyebrow{font-size:13px}
.gallery-categories{gap:8px clamp(18px,2.4vw,48px);padding-bottom:8px}
.gallery-categories button{font:clamp(16px,1.35vw,26px)/1.3 'Times New Roman',Times,serif;padding:12px 0;min-height:48px}
.gallery-items{gap:clamp(16px,2vw,40px);padding:6px 6px 12px;align-items:start;overflow-x:auto}
.gallery-items button{flex:1 0 180px;max-width:none;min-width:0;display:grid;grid-template-columns:28px minmax(0,1fr);align-items:start;gap:14px 8px;padding:0 0 14px;border:0;border-bottom:1px solid var(--line);font:clamp(18px,1.6vw,30px)/1.15 'Times New Roman',Times,serif;transition:flex-grow 350ms ease,color 180ms ease}
.gallery-items button[aria-pressed="true"]{flex-grow:1.65;border-bottom:2px solid var(--ink)}
.gallery-items button:hover{background:none;color:var(--ink)}
.gallery-items img{grid-column:1/-1;width:100%;height:var(--preview-height);object-fit:contain;background:var(--panel);transition:background 200ms ease}
.gallery-items small{font-size:12px;padding-top:5px}
.gallery-items button[aria-pressed="true"] small::after{content:' /';}
.selection-context{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:clamp(24px,5vw,100px);padding-top:10px;align-items:start}
.selected-title{font-size:clamp(32px,3.3vw,64px);margin-top:12px;max-width:22ch}
.selected-caption{font-size:clamp(20px,1.6vw,30px);line-height:1.4;max-width:55ch}
.gallery-status{font-size:12px;margin-top:16px}
.area-equivalent{border-top:1px solid var(--line);padding-top:4px;min-height:48px}
/* Reserve the closed finish-control row while loading or viewing sheets. */
.gallery-deck .area-equivalent[hidden]{display:block!important;visibility:hidden;height:48px;overflow:hidden;pointer-events:none}
.area-equivalent summary{padding-top:10px}
@media(max-width:900px){
 .gallery-deck{--preview-height:clamp(140px,calc((100svh - var(--hero-height) - 280px)*.55),280px);gap:18px}
 .gallery-items button{flex-basis:160px}.gallery-items button[aria-pressed="true"]{flex-grow:1.35}
 .selection-context{gap:24px}
}
@media(max-width:600px){
 .gallery-deck{padding:20px 5% 24px;gap:16px;min-height:calc(100svh - var(--hero-height));--preview-height:150px}
 .gallery-heading .eyebrow{font-size:11px}.gallery-categories{gap:0 18px;padding:0}
 .gallery-categories button{font-size:17px;padding:10px 0}
 .gallery-items{gap:16px}.gallery-items button,.gallery-items button[aria-pressed="true"]{flex:0 0 72%;font-size:22px;grid-template-columns:24px 1fr}
 .selection-context{grid-template-columns:1fr;gap:16px;padding-top:0}.selected-title{font-size:34px;margin-top:8px}.selected-caption{font-size:20px}
}
/* Reserve room for the gallery rather than letting the main image consume it.
   Natural overflow remains available for expanded details and large text. */
:root{--hero-height:min(56.25vw,55svh)}
.gallery-deck{--preview-height:clamp(100px,calc((100svh - var(--hero-height) - 260px)*.72),340px);gap:16px;padding-block:18px 22px}
.gallery-categories{padding-bottom:0;gap:4px 28px}
.gallery-categories button{font-size:clamp(16px,1.25vw,23px);padding:8px 0}
.gallery-items{padding-block:4px 8px;gap:24px}
.gallery-items button{font-size:clamp(17px,1.25vw,24px);gap:10px 8px;padding-bottom:10px}
.selection-context{grid-template-columns:minmax(0,2fr) minmax(0,1fr);padding-top:0;gap:24px}
.selected-title{font-size:clamp(27px,2.2vw,42px);max-width:none;margin-top:6px}
.image-description{font-size:16px;align-self:start}
.image-description summary{cursor:pointer;min-height:44px;padding-block:8px;text-decoration:underline;text-underline-offset:5px}
.image-description[open] .selected-caption{font-size:20px;margin-top:10px}
@media(max-width:600px){
 .gallery-deck{--preview-height:120px;gap:12px;padding-block:14px 18px}
 .gallery-categories{gap:0 16px}.gallery-categories button{font-size:16px}
 .gallery-items{gap:16px}.gallery-items button{font-size:18px}
 .selection-context{grid-template-columns:1fr;gap:6px}.selected-title{font-size:27px}
}
@media(prefers-reduced-motion:reduce){.gallery-items button,.gallery-items img{transition:none}}
/* Image reel (see reel.js): every thumbnail of the open tab in justified rows, sized by script. Shared by Sutter and template pages. */
body.reel-v2 .gallery-items{display:flex;flex-wrap:wrap;gap:8px;overflow:visible;padding:0;scroll-snap-type:none}
body.reel-v2 .gallery-items.reel-scroll{overflow-y:auto;scrollbar-width:thin}
body.reel-v2 .gallery-items button,body.reel-v2 .gallery-items button[aria-pressed="true"]{flex:none;display:block;padding:0;border:0;border-radius:4px;overflow:hidden;background:var(--panel);opacity:.55;outline:2px solid transparent;outline-offset:2px;transition:opacity 180ms ease,outline-color 180ms ease}
body.reel-v2 .gallery-items button:hover{opacity:.85;background:var(--panel)}
body.reel-v2 .gallery-items button[aria-pressed="true"]{opacity:1;outline-color:var(--ink)}
body.reel-v2 .gallery-items button:focus-visible{outline-color:var(--ink);opacity:1}
body.reel-v2 .gallery-items img{width:100%;height:100%;object-fit:cover;background:none}
body.reel-v2 .gallery-items small,body.reel-v2 .gallery-items span{display:none}
body.reel-v2 .selection-context .selected-kind,body.reel-v2 .selection-context .selected-title,body.reel-v2 .image-description summary{display:none}
body.reel-v2 .selection-context{display:block}
body.reel-v2 .selected-caption{margin:0;font-size:15px;color:var(--muted)}
@media(prefers-reduced-motion:reduce){body.reel-v2 .gallery-items button{transition:none}}
