.portal-index { margin-block: 2rem 0; }
.portal-index h2 { font-size: clamp(1.75rem, 4vw, 2.625rem); margin-bottom: 1rem; }
.portal-index-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.portal-index-grid section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.portal-index-grid h3 { margin-bottom: .55rem; font-size: 1.15rem; letter-spacing: -.02em; }
.portal-index-grid ul { margin: 0; padding: 0; list-style: none; }
.portal-index-grid a { display: flex; align-items: center; min-height: 44px; padding-block: .3rem; color: var(--blue); font-weight: 650; line-height: 1.3; text-decoration: none; }
.portal-index-grid li + li { border-top: 1px solid var(--line); }
.portal-index-grid a:hover { text-decoration: underline; text-underline-offset: .2em; }
.membership-section .membership-lead { margin-top: .9rem; max-width: 62ch; }
.portal-disclosure { margin-top: .9rem; }
.portal-disclosure > summary { cursor: pointer; list-style: none; }
.portal-disclosure > summary::-webkit-details-marker { display: none; }
.portal-disclosure > summary::after { content: "+"; margin-left: .65rem; font-size: 1.15em; }
.portal-disclosure[open] > summary::after { content: "−"; }
.portal-disclosure > form { margin-top: 1rem; max-width: 52rem; }
.gallery-grid .album-open { position: relative; text-align: left; }
.album-open .album-open-label { position: absolute; bottom: .75rem; right: .75rem; background: #101c31; color: #fff; font-size: .875rem; font-weight: 750; min-height: 38px; padding: .45rem .65rem; border-radius: 5px; }
#viewer { max-height: calc(100dvh - 1rem); overflow: auto; padding: clamp(.65rem, 2vw, 1.25rem); }
#viewer .viewer-header { display: flex; justify-content: space-between; gap: .65rem; align-items: flex-start; margin-bottom: .7rem; }
#viewer .viewer-header h2 { font-size: clamp(1.15rem, 3vw, 1.65rem); letter-spacing: -.025em; }
#viewer .viewer-header p { margin: .25rem 0 0; font-size: .9rem; }
#viewer .viewer-stage { touch-action: pan-y pinch-zoom; }
#viewer .viewer-stage img { max-width: 100%; max-height: min(51dvh, 620px); width: auto; height: auto; }
#viewer figcaption { padding: 0; font-size: .9rem; }
#viewer .viewer-thumbs { display: flex; overflow-x: auto; gap: .45rem; padding: .6rem .2rem .25rem; scrollbar-width: thin; }
#viewer .viewer-thumbs button { flex: 0 0 68px; border: 2px solid transparent; border-radius: 5px; background: transparent; padding: 2px; }
#viewer .viewer-thumbs button[aria-current] { border-color: var(--mint); }
#viewer .viewer-thumbs img { width: 100%; height: 46px; object-fit: cover; border-radius: 3px; }
@media(max-width: 850px) { .portal-index-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media(max-width: 360px) { .portal-index-grid { gap: .45rem; } .portal-index-grid section { padding: .65rem; } }
.portal-disclosure:not([open]) .disclosure-open,
.portal-disclosure[open] .disclosure-closed { display: none; }

.archive-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .8rem 1.25rem;
  margin-block: 1.2rem 1.45rem;
}
.archive-toolbar .gallery-tabs { margin: 0; }
.archive-toolbar .gallery-filters {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto;
  align-items: center;
  gap: .3rem .75rem;
  margin: 0;
  padding: .65rem .8rem;
  background: #fff;
  border: 1px solid #b6c9d9;
  border-radius: 9px;
}
.archive-toolbar .gallery-filters label { grid-column: 1 / -1; color: var(--ink); font-weight: 750; }
.archive-toolbar .gallery-filters select { min-height: 44px; border: 1px solid var(--blue); font-weight: 700; }
#gallery-count { margin: 0; font-size: .875rem; color: var(--muted); white-space: nowrap; }
.gallery-grid .archive-card { background: #f2f5f8; padding: 0; }
.archive-card .project-copy > :is(h3, p, time) { margin-inline: 0; }
.archive-card .project-copy > .album-total { margin: 0 0 .5rem; }
.archive-card .project-copy > .album-credit { color: var(--muted); font-size: .875rem; }
.gallery-grid .archive-card .album-open img { height: clamp(140px,18vw,242px); aspect-ratio: auto; object-fit: cover; }
.album-open .album-cover-year {
  position: absolute;
  z-index: 1;
  top: .75rem;
  left: .75rem;
  background: var(--navy);
  color: #fff;
  padding: .25rem .6rem;
  font-size: .9rem;
  font-weight: 800;
  border-radius: 5px;
}
@media (max-width: 755px) {
  .archive-toolbar .gallery-filters { width: 100%; }
  .gallery-grid .archive-card .album-open img { height: clamp(115px,28vw,200px); }
}
@media (max-width: 440px) { .gallery-grid .archive-card .album-open img { height: 180px; } }

#acervo .archive-card { scroll-margin-top: 1rem; }
.archive-card .project-copy > p { white-space: pre-line; overflow-wrap: anywhere; }
.gallery-grid .archive-card .album-open { height: clamp(140px,18vw,242px); background: var(--navy); color: #fff; }
.archive-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #101c31df;
  border: 1px solid #ffffffcc;
}
#video-viewer {
  width: min(calc(100% - 1rem), 980px);
  padding: clamp(.65rem, 2vw, 1.25rem);
  max-height: calc(100dvh - 1rem);
  background: var(--navy);
  color: #fff;
}
#video-viewer .viewer-header { display: flex; gap: .75rem; justify-content: space-between; align-items: flex-start; margin-bottom: .7rem; }
#video-viewer h2 { font-size: clamp(1.15rem, 3vw, 1.65rem); margin: 0; overflow-wrap: anywhere; }
#video-viewer-stage :is(iframe, video) { display: block; width: 100%; max-height: 65dvh; border: 0; background: #000; }
#video-viewer-stage iframe { aspect-ratio: 16/9; }
#video-viewer-description { margin-top: .7rem; white-space: pre-line; }
@media (max-width: 755px) { .gallery-grid .archive-card .album-open { height: clamp(115px,28vw,200px); } }
@media (max-width: 440px) { .gallery-grid .archive-card .album-open { height: 180px; } }

.hero-photo.has-custom-image img { object-fit: contain; object-position: center; }
.hero-photo.has-custom-image::after { content: none; }

#collections-viewer { width: min(calc(100% - 1rem), 980px); padding: clamp(.8rem, 3vw, 1.75rem); max-height: calc(100dvh - 1rem); }
#collections-viewer .viewer-header { display: flex; align-items: start; justify-content: space-between; gap: .7rem; margin-bottom: .8rem; }
#collections-viewer h2 { font-size: clamp(1.35rem, 3vw, 2.1rem); margin: 0; overflow-wrap: anywhere; }
#collections-body > p { margin-block: 1rem; white-space: pre-line; }
#collections-body .collection-featured { max-width: 34rem; grid-template-columns: minmax(0, 1fr); }
