#viewer #viewerImage[hidden],
.reveal-copy[hidden] {
  display: none;
}

#viewer.branding-viewer {
  width: min(1920px, 96vw);
  max-width: 96vw;
}

#viewer .modal-top {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #111;
}

.reveal-layout {
  background: #fff;
  color: #111;
}

.reveal-layout.has-copy {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  padding: 32px;
}

.reveal-copy {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.reveal-copy h2 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  margin: 0 0 18px;
}

.reveal-copy p {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  margin: 0 0 14px;
}

.reveal-copy .reveal-subhead {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 14px;
}

.reveal-media {
  min-width: 0;
  align-self: center;
}

#viewer .modal-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(94dvh - 80px);
  object-fit: contain;
  background: #fff;
}

#viewer .has-copy .modal-img {
  max-height: calc(94dvh - 144px);
}

#viewer .video-stage {
  padding: 0;
}

body:has(#viewer[open]) {
  overflow: hidden;
}

@media (max-width: 700px) {
  .reveal-layout.has-copy {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .reveal-copy {
    max-width: 420px;
  }

  #viewer .modal-top {
    flex-wrap: wrap;
  }

  #viewer .modal-img,
  #viewer .has-copy .modal-img {
    max-height: none;
  }
}
/* Green wash over Branding tiles */

.card[data-category="Branding"]::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(64, 75, 0, 0.68);
  mix-blend-mode: multiply;
  transition: background 0.3s;
}

.card[data-category="Branding"]:hover::after {
  background: rgba(64, 75, 0, 0.42);
}

.card[data-category="Branding"] .card-meta {
  z-index: 2;
}
/* Force the Branding tile wash to display */
.card[data-category="Branding"]::after {
  display: block !important;
}
/* Reveal viewer: consistent top position */

#viewer {
  position: fixed;
  inset: 24px 0 auto;
  margin: 0 auto;
  padding: 0;

  height: auto;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);

  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Keep Previous, Next, and Close visible */

#viewer .modal-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #111;
}

/* Allow reveal content to grow naturally */

#viewer .reveal-layout {
  height: auto;
  max-height: none;
}

#viewer .reveal-media {
  min-width: 0;
  align-self: start;
}

#viewer .modal-img,
#viewer .has-copy .modal-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

/* Preserve hidden images */

#viewer #viewerImage[hidden] {
  display: none;
}

/* Smaller screens */

@media (max-width: 700px) {
  #viewer {
    inset: 12px 0 auto;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  #viewer .modal-top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  #viewer .modal-actions {
    display: flex;
    width: 100%;
    gap: 8px;
  }

  #viewer .modal-actions button {
    flex: 1;
    min-width: 0;
  }
}