/* Project previews stay still; the full-size gallery holds the controls. */
.site-carousel { border: 0; background: transparent; }
.site-carousel-slide figcaption { display: none; }
.site-carousel-open {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: flex-end; justify-content: flex-end;
  width: 100%; padding: 12px; border: 0;
  background: transparent; color: var(--ink); cursor: zoom-in;
}
.site-carousel-open span {
  padding: 7px 10px; background: rgba(250,249,245,.96);
  font: 600 13px/1.3 var(--sans);
}
.site-carousel-open:hover span { background: var(--paper); color: var(--rust-text); }
.site-carousel-open:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.site-carousel-open:focus-visible span { background: var(--paper); }

.gallery-dialog {
  width: min(1380px, calc(100vw - 32px)); max-width: none;
  height: fit-content; max-height: calc(100dvh - 32px); margin: auto; padding: 0;
  border: 0; background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 70px rgb(0 0 0 / .26);
}
.gallery-dialog::backdrop { background: rgb(10 17 25 / .78); }
.gallery-dialog-bar, .gallery-dialog-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 16px;
}
.gallery-dialog-bar h2 { margin: 0; font: 600 18px/1.3 var(--sans); }
.gallery-close, .gallery-dialog-actions button {
  min-width: 44px; min-height: 44px; padding: 8px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
}
.gallery-dialog-actions button { font-size: 22px; }
.gallery-close:hover, .gallery-dialog-actions button:hover { background: #e9ede8; }
.gallery-dialog-image { display: grid; place-items: center; min-height: 0; background: #e8ece7; }
.gallery-dialog-image img {
  display: block; max-width: 100%; max-height: calc(100dvh - 160px);
  width: auto; height: auto; object-fit: contain;
}
.gallery-caption { font-size: 14px; line-height: 1.4; }
.gallery-description { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.gallery-original { color: var(--rust-text); font-size: 14px; text-underline-offset: 4px; }
.gallery-dialog-actions { display: flex; align-items: center; gap: 6px; }
.gallery-count { min-width: 4ch; text-align: center; font: 600 14px/1 var(--sans); }

.project-overview .question { line-height: 1.42; }
.shield-actions { margin-top: 12px; align-items: flex-start; }
.shield-actions .shield-watch,
.shield-actions .shield-watch:hover {
  width: auto; min-height: 44px; margin: 0; padding: 0 0 2px;
  border: 0; border-bottom: 1px solid currentColor;
  background: transparent; color: var(--rust-text);
  justify-content: flex-start; text-align: left;
  align-self: flex-start;
}
.shield-actions .shield-watch:hover { color: var(--ink); }
.shield-actions .shield-watch .demo-length { font-size: 13px; font-weight: 400; color: var(--muted); }
.project-overview .project-details { margin-top: 12px; }
.project-overview .project-details summary { color: var(--muted); font-weight: 500; }
.project-overview .project-details summary:hover { color: var(--ink); }
.project-overview .shield-demo-note { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.project-overview .project-details .shield-pipeline-link { margin: 8px 0; padding: 0; border: 0; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 640px) {
  .gallery-dialog { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
  .gallery-dialog-image img { max-height: calc(100dvh - 170px); }
  .gallery-dialog-bar, .gallery-dialog-footer { padding: 7px 10px; }
  .gallery-dialog-bar h2 { font-size: 16px; }
  .project-overview .question { line-height: 1.42; }
}
