/* RufDiamond shared lightbox + caption + section alignment. 16 Nov 2026. */
/* --- Captions under photos --- */
.gallery{align-items:start}
.gallery li figure,
.hero-fig,
.p-hero figure,
figure.about-photo,
.about-photo-row figure{
  margin:0;
}
.gallery figure{display:block;height:100%}
.gallery figcaption,
.hero-fig figcaption,
.p-hero figcaption,
figure.lb-cap figcaption{
  color:var(--mut,#6b7480);
  font-size:.88rem;
  line-height:1.35;
  margin-top:.4rem;
}
.hero-fig{margin:0 0 1.5rem}
.hero-fig .hub-hero,
.hero-fig img.hub-hero{
  margin-bottom:0;
  width:100%;
  display:block;
}

/* Clickable photos */
img.lb-img,
.gallery img,
.hero-fig img,
.p-hero img,
figure.about-photo img,
.about-photo-row img,
figure.lb-cap img{
  cursor:zoom-in;
}
.gallery img[tabindex],
.lb-img[tabindex],
.hero-fig img[tabindex],
.p-hero img[tabindex]{
  outline-offset:3px;
}

/* Section headings and intro text match the photo/gallery width and edges.
   Overrides the inlined .lead{max-width:70ch} so the text block is the same
   width as the hub hero or gallery in the same .wrap, and stays centred with it.
   Paragraphs remain left-aligned inside that block so they stay readable. */
.content > .wrap > .lead,
.wrap > .lead,
main .lead,
.page-head .lead{
  max-width:none;
  width:100%;
}
/* Keep paragraph line length readable; they share the photo's left edge. */
.lead p{
  max-width:70ch;
}
/* Do not let a page-head tag sit narrower than the photo under it */
.page-head .tag{
  max-width:none;
  width:100%;
}

/* --- Lightbox dialog --- */
.rd-lb{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:max(.75rem,env(safe-area-inset-top)) max(.75rem,env(safe-area-inset-right)) max(.75rem,env(safe-area-inset-bottom)) max(.75rem,env(safe-area-inset-left));background:rgba(10,11,13,.92);color:#f4f1ea}
.rd-lb[hidden]{display:none!important}
.rd-lb__stage{position:relative;max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:0}
.rd-lb__img{max-width:100%;max-height:calc(100vh - 6.5rem);max-height:calc(100dvh - 6.5rem);width:auto;height:auto;object-fit:contain;border-radius:4px;background:#0d0e10;box-shadow:0 12px 40px rgba(0,0,0,.5)}
.rd-lb__cap{margin:.7rem 0 0;max-width:min(70ch,100%);text-align:center;font-size:.95rem;line-height:1.4;color:#ecebe6}
.rd-lb__x,
.rd-lb__prev,
.rd-lb__next{
  position:absolute;z-index:2;width:48px;height:48px;padding:0;border:2px solid #f5c400;border-radius:6px;background:#15171a;color:#f5c400;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:1.6rem;line-height:1;
}
.rd-lb__x{top:0;right:0}
.rd-lb__prev,.rd-lb__next{top:50%;transform:translateY(-50%)}
.rd-lb__prev{left:0}
.rd-lb__next{right:0}
.rd-lb__x:hover,
.rd-lb__prev:hover,
.rd-lb__next:hover,
.rd-lb__x:focus-visible,
.rd-lb__prev:focus-visible,
.rd-lb__next:focus-visible{background:#f5c400;color:#111}
.rd-lb__prev[hidden],.rd-lb__next[hidden]{display:none!important}
.rd-lb__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
body.rd-lb-open{overflow:hidden}
@media (max-width:699px){
  .rd-lb__prev,.rd-lb__next{width:44px;height:44px;top:auto;bottom:.25rem;transform:none}
  .rd-lb__prev{left:.25rem}
  .rd-lb__next{right:.25rem}
  .rd-lb__img{max-height:calc(100vh - 8rem);max-height:calc(100dvh - 8rem)}
}
