/* Click-to-enlarge for screenshots (js/lightbox.js). Opt in per image with <img data-zoom>. */
img[data-zoom] { cursor: pointer; }
img[data-zoom]:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
html.lightbox-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,10,10,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: lb-in 200ms ease-out; }
/* the overlay itself never scrolls, so the close button stays put; the image scrolls inside .lightbox-scroll */
.lightbox-scroll { position: absolute; inset: 0; display: flex; overflow-y: auto; overscroll-behavior: contain; padding: 3.5rem 1.25rem 1.5rem; cursor: default; touch-action: pan-x pan-y; }
/* zoomed in: the picture pans by drag instead of scrolling, and the browser's own pinch-zoom stays out of the way */
.lightbox.zoomed .lightbox-scroll { overflow: hidden; touch-action: none; }
.lightbox[hidden] { display: none; }
.lightbox-fig { transform-origin: 0 0; margin: auto; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.lightbox-img { display: block; width: auto; height: auto; max-width: min(94vw, var(--lb-max, 1600px)); max-height: none; border-radius: .5rem; background: #fff; box-shadow: 0 1rem 3rem rgba(0,0,0,.5); cursor: default; -webkit-user-drag: none; user-select: none; }
.lightbox-close, .lightbox-nav { position: fixed; z-index: 1; top: 1rem; right: 1.25rem; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 50%; background: rgba(20,20,20,.55); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); box-shadow: 0 2px 10px rgba(0,0,0,.35), inset 0 0 0 .5px rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .2s ease; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 1.25rem; right: auto; }
.lightbox-nav.next { right: 1.25rem; }
.lightbox-nav[hidden] { display: none; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(20,20,20,.75); }
.lightbox:focus { outline: none; } /* focus rests on the overlay itself, so the buttons only show a ring when reached with Tab */
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { background: rgba(20,20,20,.75); outline: 2px solid #fff; outline-offset: 2px; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lightbox { animation: none; } }
/* --lb-max is set by lightbox.js: the image's natural width divided by its pixel density (2x by default), so it never opens bigger than it was captured for.
   Tall images (long full-page captures, style guides) open at that width and scroll inside the overlay, instead of shrinking to fit the window. */
.lightbox.tall .lightbox-img { max-width: min(94vw, var(--lb-max, 1000px)); max-height: none; }
.lightbox-img.loading { visibility: hidden; }
