/* Context photography is separate from the preserved teaching figures. */
.photo-story,.reader-body figure.photo-story{display:block;width:100%;max-width:min(100%,var(--photo-width,600px));min-width:0;margin:2rem 0 2.5rem;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;break-inside:avoid}
.photo-story>img,.reader-body figure.photo-story>img{display:block;width:100%;max-width:100%;height:auto;aspect-ratio:var(--photo-ratio,3/2);max-height:none;object-fit:cover;border-radius:12px;background:#e8ece8}
.photo-story>.photo-caption,.photo-caption{font-family:inherit;font-size:.83rem;line-height:1.6;color:#52615a;margin:.65rem 0 0;max-width:78ch;padding:0;background:transparent}
.context-photo.photo-retained{max-width:min(100%,var(--photo-width,720px))}
.context-photo.photo-retained img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:var(--photo-ratio,16/9);object-fit:cover}
.photo-frame .photo-caption{padding-inline:1rem;padding-bottom:1rem}
@media(max-width:700px){.photo-story,.reader-body figure.photo-story{margin:1.5rem 0 2rem}.photo-story>img{border-radius:9px}.photo-story>.photo-caption{font-size:.8rem;line-height:1.55}}

/* Scope only the three owned landing/index pages through inserted classes. */
.isra-home-photo { margin:0; padding:0; }
.isra-home-photo picture { display:block; }
.isra-home-photo img { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; border:1px solid var(--line); }
/* A small floated housing context leaves the existing topic diagram/links intact. */
#task-0 > .isra-home-photo--topic { float:right; width:156px; max-width:42%; margin:3px 0 12px 16px; }
#task-0 > .task-links { clear:both; }
/* Use the existing intro as a two-column heading; diagrams keep their full width. */
#research .research-heading:has(> .isra-home-photo--reading) { max-width:none; display:grid; grid-template-columns:minmax(0,1fr) 320px; column-gap:48px; align-items:start; }
#research .research-heading:has(> .isra-home-photo--reading) > :not(.isra-home-photo) { grid-column:1; max-width:760px; }
#research .research-heading > .isra-home-photo--reading { grid-column:2; grid-row:1 / span 3; align-self:center; }
#research .isra-home-photo img { border-color:#6d8b78; }
/* Section-heading thumbnails leave each bilingual inventory list full width. */
.inventory-group:has(> .isra-home-photo--index) { display:grid; grid-template-columns:minmax(0,1fr) 200px; gap:18px 32px; align-items:center; }
.inventory-group:has(> .isra-home-photo--index) > h2 { grid-column:1; grid-row:1; margin:0; }
.inventory-group > .isra-home-photo--index { grid-column:2; grid-row:1; }
.inventory-group:has(> .isra-home-photo--index) > ul { grid-column:1 / -1; width:100%; }
@media(max-width:1060px) {
 #research .research-heading:has(> .isra-home-photo--reading) { grid-template-columns:minmax(0,1fr) 260px; column-gap:32px; }
}
@media(max-width:760px) {
 #task-0 > .isra-home-photo--topic { width:132px; margin-left:14px; }
 #research .research-heading:has(> .isra-home-photo--reading) { display:flex; flex-direction:column; gap:0; }
 #research .research-heading > .isra-home-photo--reading { width:224px; max-width:100%; align-self:flex-start; margin-top:8px; }
}
@media(max-width:540px) {
 .inventory-group:has(> .isra-home-photo--index) { grid-template-columns:minmax(0,1fr) 128px; gap:16px; }
 .inventory-group:has(> .isra-home-photo--index) > h2 { font-size:1.9rem; overflow-wrap:break-word; }
}
/* Equivalent coordinator wrappers may add photo-story; keep landing geometry. */
.photo-story.isra-home-photo { margin:0; padding:0; max-width:100%; background:transparent; }
.photo-story.isra-home-photo img { aspect-ratio:3/2; border-radius:0; }
@media(max-width:360px) {
 .inventory-group:has(> .isra-home-photo--index) { grid-template-columns:minmax(0,1fr); }
 .inventory-group:has(> .isra-home-photo--index) > h2 { grid-column:1; grid-row:1; overflow-wrap:normal; }
 .inventory-group > .isra-home-photo--index { grid-column:1; grid-row:2; width:128px; max-width:100%; }
 .inventory-group:has(> .isra-home-photo--index) > ul { grid-column:1; grid-row:3; }
}
