/* Constitution v2.0 Artwork gallery: previews that open the shared enlargement
   dialog (the Constitutional Lexicon reference in index.html). */
/* One piece per card: the picture beside its explainer on wide screens, above it on narrow ones. */
.artwork-list { display: grid; gap: 1.5rem; }
.category-index .artwork-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}
.artwork-picture { position: sticky; top: calc(var(--shell-header-height, 84px) + 1rem); }
.artwork-card h3 { margin: 0 0 0.25rem; font-size: 1.35rem; }
.artwork-card .artwork-motto { margin: 0 0 1rem; color: #7b571c; font-family: "Fraunces", Georgia, serif; }
.artwork-explainer h4 { margin: 1.25rem 0 0.35rem; font-size: 1rem; }
.artwork-explainer p + p { margin-top: 0.75rem; }
.artwork-explainer p { line-height: 1.6; }
@media (max-width: 760px) {
  .category-index .artwork-card { grid-template-columns: minmax(0, 1fr); }
  .artwork-picture { position: static; }
}

.artwork-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.artwork-open img { display: block; width: 100%; height: auto; }
.artwork-open:focus-visible { outline: 2px solid #b8862c; outline-offset: 4px; border-radius: 4px; }

.diagram-description {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: normal !important;
  border: 0 !important;
}

.seal-dialog {
  width: min(96vw, 1100px);
  max-width: none;
  max-height: 96vh;
  margin: auto;
  padding: 3rem 1rem 1rem;
  border: 1px solid #ddd0ad;
  border-radius: 10px;
  background: #f7f1e3;
  color: #17233f;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
}
.seal-dialog::backdrop { background: rgba(8, 13, 25, 0.88); }
.seal-dialog img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(96vh - 10.5rem);
  margin: 0 auto;
  object-fit: contain;
}
.seal-dialog-close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #ddd0ad;
  border-radius: 999px;
  background: #efe6d0;
  color: #17233f;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.seal-dialog-close:hover,
.seal-dialog-close:focus-visible { color: #b8862c; border-color: #b8862c; }
.seal-dialog-original {
  display: block;
  width: fit-content;
  margin: 0.7rem auto 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5c6478;
}
.seal-dialog-original:hover,
.seal-dialog-original:focus-visible { color: #87601e; }
