/* CSS-only lightbox for figure zoom — no JavaScript required.
   Triggered by the URL fragment #fig-N-full matching a <div class="lightbox"
   id="fig-N-full">. Closing uses the empty fragment # via the .lightbox-close
   anchor. */

figure.zoomable {
  margin: 1.5em 0;
  text-align: center;
}

figure.zoomable img {
  max-width: 100%;
  height: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

figure.zoomable img:hover {
  transform: scale(1.02);
}

figure.zoomable figcaption {
  margin-top: 0.6em;
  font-size: 0.92em;
  color: #444;
  line-height: 1.45;
  text-align: left;
}

/* The lightbox is hidden by default. The :target pseudo-class reveals it
   when the URL fragment matches its id. */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.5rem;
  text-decoration: none;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-close:hover {
  color: #ccc;
}

/* Collapsible styling — the deep-dive section gets a slightly
   muted header to signal it's the secondary commentary. */
details > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.5em 0.8em;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::before {
  content: "\25B6  ";
  font-size: 0.7em;
  color: #888;
  margin-right: 0.4em;
}

details[open] > summary::before {
  content: "\25BC  ";
}

details > summary:hover {
  background: #ebebeb;
}

details[open] > summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0.5em;
}

/* WikiJournalClub card sits outside the deep-dive details — give it a
   subtle styled box to set it apart from the body commentary. */
.wjc-card {
  /* Wrapper class for the WJC card, applied as a Markdown attribute
     or via a parent div. Decorative top border signals "primary data". */
  border-left: 3px solid #2c3e50;
  padding-left: 1rem;
  margin: 1.5em 0;
}
