/*
 * Quiet Intelligence — photographic archive command experience.
 * Presentation only. The existing gallery records, query contract and lightbox
 * controller remain authoritative.
 */

.aiesep-app :is(.gallery-index-complete, .gallery-detail-complete) {
  background:
    radial-gradient(circle at 9% 12%, rgba(28, 161, 218, .075), transparent 29rem),
    linear-gradient(180deg, #f7fafe 0, #edf3f8 100%);
  color: #496178;
}

.aiesep-app .gallery-command {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: rgba(235, 244, 251, .78);
  background:
    radial-gradient(circle at 84% 16%, rgba(39, 188, 228, .23), transparent 25rem),
    radial-gradient(circle at 4% 94%, rgba(41, 124, 183, .22), transparent 28rem),
    linear-gradient(137deg, #071829 0%, #0a2540 54%, #103b59 100%);
  border-bottom: 1px solid rgba(137, 190, 221, .22);
  box-shadow: 0 34px 90px rgba(5, 25, 43, .2);
}

.aiesep-app .gallery-command::before,
.aiesep-app .gallery-command::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.aiesep-app .gallery-command::before {
  inset: 0;
  opacity: .36;
  background-image:
    linear-gradient(rgba(166, 217, 240, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 217, 240, .08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, #000, transparent 48%);
}

.aiesep-app .gallery-command::after {
  width: 32rem;
  height: 32rem;
  right: -13rem;
  bottom: -18rem;
  border: 1px solid rgba(109, 210, 239, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(109, 210, 239, .035), 0 0 0 9rem rgba(109, 210, 239, .025);
}

.aiesep-app .gallery-command-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(31rem, 1.12fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  min-height: clamp(590px, 68vh, 760px);
  padding-block: clamp(68px, 8vw, 112px) clamp(94px, 10vw, 136px);
}

.aiesep-app .gallery-command-copy {
  position: relative;
  z-index: 3;
  min-width: 0;
}

.aiesep-app .gallery-command-kicker {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 22px;
  color: #a9ddec;
  font-size: .75rem;
  font-weight: 680;
  line-height: 1.4;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.aiesep-app .gallery-command-kicker > span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #36d0cd;
  box-shadow: 0 0 0 6px rgba(54, 208, 205, .11), 0 0 22px rgba(54, 208, 205, .58);
}

.aiesep-app .gallery-command h1 {
  max-width: 9.5ch;
  margin: 0;
  color: #fff;
  font-size: clamp(3.75rem, 6.6vw, 7rem);
  font-weight: 640;
  line-height: .88;
  letter-spacing: -.072em;
  text-wrap: balance;
}

.aiesep-app .gallery-command h1 span {
  display: block;
  color: #7bdaf1;
  font-weight: 430;
}

.aiesep-app .gallery-command--detail h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 5.35vw, 5.75rem);
  line-height: .94;
}

.aiesep-app .gallery-command-introduction,
.aiesep-app .gallery-command-lede {
  max-width: 42rem;
  margin-top: 28px;
}

.aiesep-app .gallery-command-introduction p,
.aiesep-app .gallery-command-lede {
  margin-bottom: 0;
  color: rgba(231, 241, 248, .8);
  font-size: clamp(1.0625rem, 1.45vw, 1.25rem);
  line-height: 1.62;
}

.aiesep-app .gallery-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  margin-top: 34px;
}

.aiesep-app .gallery-command-actions .button {
  min-height: 50px;
  padding-inline: 20px;
}

.aiesep-app .gallery-command-text-link,
.aiesep-app .gallery-command-back {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  color: #d9f2fb;
  font-size: .9375rem;
  font-weight: 620;
  text-decoration: none;
  text-underline-offset: .22em;
}

.aiesep-app .gallery-command-text-link:hover,
.aiesep-app .gallery-command-back:hover {
  color: #fff;
  text-decoration: underline;
}

.aiesep-app .gallery-command-back {
  margin-bottom: 34px;
  color: #acddeb;
}

.aiesep-app .gallery-command-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 43rem;
  margin: 44px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(164, 208, 230, .18);
}

.aiesep-app .gallery-command-stats > div {
  min-width: 0;
  padding-right: 20px;
}

.aiesep-app .gallery-command-stats > div + div {
  padding-left: 20px;
  border-left: 1px solid rgba(164, 208, 230, .16);
}

.aiesep-app .gallery-command-stats dt {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.aiesep-app .gallery-command-stats dd {
  margin: 8px 0 0;
  color: rgba(209, 229, 240, .61);
  font-size: .75rem;
  line-height: 1.35;
}

.aiesep-app .gallery-viewer-note { display:flex;align-items:center;gap:9px;max-width:42ch;margin:18px 0 0;color:#aac4d6;font-size:.75rem;line-height:1.55; }
.aiesep-app .gallery-viewer-note>span { display:grid;width:27px;height:27px;flex:0 0 27px;place-items:center;border:1px solid rgba(169,219,239,.28);border-radius:9px;color:#83dded; }
.aiesep-app .gallery-viewer-note strong { color:#eef9fd;font-weight:650; }
.aiesep-app .gallery-viewer-entry { display:inline-flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:10px 15px;border:1px solid rgba(255,255,255,.25);border-radius:12px;color:#fff;background:rgba(255,255,255,.075);font:620 .82rem/1.35 var(--a-font-body);cursor:pointer;backdrop-filter:blur(12px); }
.aiesep-app .gallery-viewer-entry:hover { border-color:rgba(132,223,240,.55);background:rgba(255,255,255,.13); }
.aiesep-app .gallery-viewer-entry:focus-visible { outline:3px solid #82dff1;outline-offset:3px; }

.aiesep-app .gallery-command-collage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
  align-self: stretch;
  min-height: 510px;
  perspective: 1200px;
}

.aiesep-app .gallery-command-frame {
  position: relative;
  z-index: 2;
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(191, 224, 241, .26);
  border-radius: 22px;
  background: #173e5a;
  box-shadow: 0 30px 72px rgba(2, 14, 26, .38), 0 1px 0 rgba(255, 255, 255, .16) inset;
  transition: border-color 240ms ease, box-shadow 300ms ease, transform 360ms var(--a-premium-ease);
}

.aiesep-app .gallery-command-frame--1 {
  z-index: 3;
  grid-column: 1 / 10;
  grid-row: 2 / 12;
  transform: rotate(-1.5deg);
}

.aiesep-app .gallery-command-frame--2 {
  grid-column: 9 / 13;
  grid-row: 1 / 7;
  transform: translateX(10px) rotate(2.3deg);
}

.aiesep-app .gallery-command-frame--3 {
  grid-column: 8 / 13;
  grid-row: 7 / 13;
  transform: translate(18px, 5px) rotate(1deg);
}

.aiesep-app .gallery-command-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) contrast(1.035);
  transition: filter 350ms ease, transform 600ms var(--a-premium-ease);
}

.aiesep-app .gallery-command-frame-shade,
.aiesep-app .gallery-detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(3, 18, 31, .12) 58%, rgba(3, 18, 31, .89) 100%);
  pointer-events: none;
}

.aiesep-app .gallery-command-frame-label {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 17px;
  left: 18px;
  display: grid;
  gap: 3px;
}

.aiesep-app .gallery-command-frame-label small {
  color: rgba(217, 239, 248, .72);
  font-size: .6875rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.aiesep-app .gallery-command-frame-label strong {
  color: #fff;
  font-size: clamp(.875rem, 1.25vw, 1.125rem);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.aiesep-app .gallery-command-frame--2 .gallery-command-frame-label,
.aiesep-app .gallery-command-frame--3 .gallery-command-frame-label {
  right: 12px;
  bottom: 12px;
  left: 12px;
}

.aiesep-app .gallery-command-frame--2 .gallery-command-frame-label small,
.aiesep-app .gallery-command-frame--3 .gallery-command-frame-label small {
  display: none;
}

.aiesep-app .gallery-command-frame-empty {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 20px;
  color: #b8d4e2;
  text-align: center;
}

.aiesep-app .gallery-command-orbit {
  position: absolute;
  z-index: 1;
  width: 13rem;
  height: 13rem;
  top: -1rem;
  left: -1rem;
  border: 1px solid rgba(98, 211, 230, .24);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5rem rgba(98, 211, 230, .035), 0 0 0 3.5rem rgba(98, 211, 230, .025);
}

@media (hover: hover) {
  .aiesep-app .gallery-command-frame:hover {
    z-index: 5;
    border-color: rgba(132, 222, 242, .66);
    box-shadow: 0 38px 86px rgba(2, 14, 26, .46), 0 0 0 5px rgba(78, 200, 230, .08);
  }

  .aiesep-app .gallery-command-frame--1:hover {
    transform: translateY(-7px) rotate(-.5deg);
  }

  .aiesep-app .gallery-command-frame--2:hover {
    transform: translate(5px, -7px) rotate(1deg);
  }

  .aiesep-app .gallery-command-frame--3:hover {
    transform: translate(12px, -3px) rotate(0);
  }

  .aiesep-app .gallery-command-frame:hover img {
    filter: saturate(1) contrast(1.02);
    transform: scale(1.035);
  }
}

/* Collection detail command image. */
.aiesep-app .gallery-detail-hero {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(191, 224, 241, .26);
  border-radius: 26px;
  background: #173e5a;
  box-shadow: 0 34px 88px rgba(2, 14, 26, .42), 0 1px 0 rgba(255, 255, 255, .14) inset;
  transform: rotate(.85deg);
}

.aiesep-app .gallery-detail-hero-image {
  position: relative;
  height: clamp(330px, 38vw, 490px);
  overflow: hidden;
  border-radius: 25px 25px 0 0;
}

.aiesep-app .gallery-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(.87) contrast(1.03);
}

.aiesep-app .gallery-detail-hero figcaption {
  display: grid;
  gap: 5px;
  padding: 18px 22px 20px;
}

.aiesep-app .gallery-detail-hero figcaption span {
  color: #9acbdb;
  font-size: .6875rem;
  font-weight: 670;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.aiesep-app .gallery-detail-hero figcaption strong {
  color: #fff;
  font-size: .9375rem;
  font-weight: 580;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.aiesep-app .gallery-detail-hero--empty {
  display: flex;
  min-height: 470px;
  flex-direction: column;
  justify-content: end;
  padding: 32px;
  color: #b8d4e2;
}

.aiesep-app .gallery-detail-hero--empty strong {
  color: #fff;
  font-size: 1.5rem;
}

/* The workspace floats into the command stage like an application surface. */
.aiesep-app :is(.gallery-index-complete, .gallery-detail-complete) .gallery-workspace {
  position: relative;
  z-index: 4;
  padding-block: 0 clamp(64px, 8vw, 110px);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.aiesep-app .gallery-discovery {
  margin: -42px 0 clamp(54px, 7vw, 88px);
  overflow: clip;
  border: 1px solid rgba(111, 143, 173, .28);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 72px rgba(7, 31, 53, .14), 0 1px 0 #fff inset;
  backdrop-filter: blur(24px) saturate(140%);
}

.aiesep-app .gallery-discovery > summary {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 22px;
  cursor: pointer;
  list-style: none;
}

.aiesep-app .gallery-discovery > summary::-webkit-details-marker {
  display: none;
}

.aiesep-app .gallery-discovery > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.aiesep-app .gallery-discovery > summary small,
.aiesep-app .gallery-results-kicker {
  margin: 0;
  color: #58728b;
  font-size: .6875rem;
  font-weight: 680;
  line-height: 1.4;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.aiesep-app .gallery-discovery > summary strong {
  color: #142c45;
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -.016em;
}

.aiesep-app .gallery-discovery-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(102, 137, 168, .28);
  border-radius: 50%;
  background: #f2f7fb;
}

.aiesep-app .gallery-discovery-toggle::before,
.aiesep-app .gallery-discovery-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  content: "";
  border-radius: 2px;
  background: #186aa2;
  transform: translate(-50%, -50%);
  transition: transform 220ms var(--a-premium-ease);
}

.aiesep-app .gallery-discovery-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.aiesep-app .gallery-discovery[open] .gallery-discovery-toggle::after {
  transform: translate(-50%, -50%) rotate(0);
}

.aiesep-app .gallery-search {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) auto;
  gap: 16px;
  align-items: end;
  margin: 0;
  padding: 22px;
  border: 0;
  border-top: 1px solid rgba(111, 143, 173, .2);
  background: linear-gradient(135deg, rgba(247, 251, 254, .96), rgba(239, 246, 251, .92));
}

.aiesep-app .gallery-search label {
  display: block;
  margin-bottom: 7px;
  color: #415f7a;
  font-size: .75rem;
  font-weight: 640;
}

.aiesep-app .gallery-search :is(input, select, .button) {
  min-height: 50px;
  border-radius: 12px;
}

.aiesep-app .gallery-search .button {
  justify-content: center;
  white-space: nowrap;
}

.aiesep-app .gallery-results-heading,
.aiesep-app .gallery-detail-toolbar {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(102, 136, 166, .24);
}

.aiesep-app .gallery-results-heading h2,
.aiesep-app .gallery-detail-toolbar h2 {
  margin: 5px 0 0;
  color: #102840;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 620;
  line-height: 1.02;
  letter-spacing: -.05em;
}

.aiesep-app .gallery-results-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: flex-end;
  color: #557089;
  font-size: .8125rem;
}

.aiesep-app .gallery-results-meta p {
  margin: 0;
}

.aiesep-app .gallery-results-meta a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #0868b5;
  font-weight: 620;
  text-underline-offset: .2em;
}

/* Asymmetric archive collection cards. */
.aiesep-app .gallery-collection-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 26px;
}

.aiesep-app .gallery-collection {
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(103, 137, 168, .24);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 0 #fff inset, 0 14px 42px rgba(14, 43, 68, .075);
}

.aiesep-app .gallery-collection:nth-child(10n + 1),
.aiesep-app .gallery-collection:nth-child(10n + 7) {
  grid-column: span 7;
}

.aiesep-app .gallery-collection:nth-child(10n + 2),
.aiesep-app .gallery-collection:nth-child(10n + 6) {
  grid-column: span 5;
}

.aiesep-app .gallery-collection-link {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.aiesep-app .gallery-collection-cover {
  position: relative;
  aspect-ratio: 1.28 / 1;
  overflow: hidden;
  border-radius: 0;
  background: #dfeaf1;
}

.aiesep-app .gallery-collection:nth-child(10n + 1) .gallery-collection-cover,
.aiesep-app .gallery-collection:nth-child(10n + 7) .gallery-collection-cover {
  aspect-ratio: 1.7 / 1;
}

.aiesep-app .gallery-collection-cover img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  filter: saturate(.87) contrast(1.025);
  transform: none;
  transition: filter 300ms ease, transform 600ms var(--a-premium-ease);
}

.aiesep-app .gallery-collection-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 22, 36, .02), rgba(4, 22, 36, .32));
  pointer-events: none;
}

.aiesep-app .gallery-collection-index {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(6, 31, 51, .68);
  box-shadow: 0 8px 24px rgba(3, 20, 34, .14);
  backdrop-filter: blur(12px);
  font-size: .6875rem;
  font-weight: 650;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.aiesep-app .gallery-collection-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 138px;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  margin: -34px 14px 14px;
  padding: 18px 52px 18px 18px;
  border: 1px solid rgba(111, 143, 173, .22);
  border-radius: 17px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 36px rgba(8, 35, 57, .12), 0 1px 0 #fff inset;
  backdrop-filter: blur(18px) saturate(135%);
}

.aiesep-app .gallery-collection-number {
  margin: 0 0 7px;
  color: #54718a;
  font-size: .6875rem;
  font-weight: 660;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.aiesep-app .gallery-collection-copy h3 {
  max-width: none;
  margin: 0;
  color: #112a43;
  font-size: clamp(1.125rem, 1.65vw, 1.375rem);
  font-weight: 610;
  line-height: 1.24;
  letter-spacing: -.027em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.aiesep-app .gallery-collection-arrow {
  position: absolute;
  top: 50%;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #0868b5;
  border: 1px solid rgba(8, 104, 181, .18);
  border-radius: 50%;
  background: #eff7fd;
  font-size: 1rem;
  transform: translateY(-50%);
  transition: color 200ms ease, background-color 200ms ease, transform 250ms var(--a-premium-ease);
}

@media (hover: hover) {
  .aiesep-app .gallery-collection:hover {
    transform: translateY(-5px);
  }

  .aiesep-app .gallery-collection-link:hover .gallery-collection-cover img {
    filter: saturate(1) contrast(1.015);
    transform: none;
  }

  .aiesep-app .gallery-collection-link:hover .gallery-collection-arrow {
    color: #fff;
    background: #0868b5;
    transform: translate(2px, -52%);
  }
}

/* Detail record cards and documentary sequence. */
.aiesep-app .gallery-detail-complete .gallery-workspace {
  padding-top: clamp(54px, 7vw, 88px);
}

.aiesep-app .gallery-detail-complete .gallery-introduction {
  max-width: 52rem;
  margin: 0 auto clamp(42px, 6vw, 70px);
  color: #405d76;
}

.aiesep-app .gallery-detail-complete .gallery-introduction p {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.72;
}

.aiesep-app .gallery-source-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  max-width: none;
  margin: 0 0 clamp(52px, 7vw, 84px);
  padding: 22px 24px;
  color: #405d76;
  border: 1px solid rgba(68, 139, 178, .28);
  border-left: 1px solid rgba(68, 139, 178, .28);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(237, 248, 253, .98), rgba(247, 251, 254, .96));
  box-shadow: 0 14px 38px rgba(17, 57, 82, .07), 0 1px 0 #fff inset;
}

.aiesep-app .gallery-source-note-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #0868b5;
  border: 1px solid rgba(8, 104, 181, .2);
  border-radius: 13px;
  background: #fff;
  font-size: 1rem;
  font-weight: 720;
  box-shadow: 0 8px 20px rgba(8, 70, 111, .07);
}

.aiesep-app .gallery-source-note h2 {
  margin: 3px 0 7px;
  color: #15304a;
  font-size: 1.125rem;
  font-weight: 620;
  letter-spacing: -.02em;
}

.aiesep-app .gallery-source-note p:last-child {
  max-width: 72ch;
  margin: 0;
  font-size: .875rem;
  line-height: 1.58;
}

.aiesep-app .gallery-detail-toolbar p:last-child {
  max-width: 35ch;
  margin: 0;
  color: #557089;
  font-size: .8125rem;
  line-height: 1.55;
  text-align: right;
}

.aiesep-app .gallery-photo-grid {
  gap: 28px;
}

.aiesep-app .gallery-detail-results .gallery-photo-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.aiesep-app .gallery-detail-results .gallery-photo {
  grid-column: span 4;
}

.aiesep-app .gallery-detail-results .gallery-photo:nth-child(8n + 1) {
  grid-column: span 8;
}

.aiesep-app .gallery-detail-results .gallery-photo:nth-child(8n + 1) .gallery-photo-open {
  aspect-ratio: 2 / 1;
}

.aiesep-app .gallery-photo {
  min-width: 0;
  margin: 0;
  padding: 10px 10px 16px;
  border: 1px solid rgba(103, 137, 168, .22);
  border-radius: 20px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 1px 0 #fff inset, 0 12px 36px rgba(14, 43, 68, .065);
  scroll-margin-top: 7rem;
}

.aiesep-app .gallery-photo-open {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 13px;
  background: #e1eaf0;
}

.aiesep-app .gallery-photo-open img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  filter: saturate(.9) contrast(1.02);
  transition: filter 280ms ease, transform 500ms var(--a-premium-ease);
}

.aiesep-app .gallery-open-label {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(5, 29, 48, .76);
  box-shadow: 0 8px 22px rgba(4, 24, 40, .2);
  backdrop-filter: blur(12px);
  font-size: .6875rem;
  font-weight: 620;
}

.aiesep-app .gallery-photo figcaption {
  padding: 14px 4px 0;
}

.aiesep-app .gallery-photo-title {
  margin: 0;
  color: #173049;
  font-size: .9375rem;
  font-weight: 620;
  line-height: 1.42;
}

.aiesep-app .gallery-photo-description,
.aiesep-app .gallery-photo-context {
  margin-top: 7px;
  color: #587088;
  font-size: .8125rem;
  line-height: 1.55;
}

.aiesep-app .gallery-photo-context a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.aiesep-app .gallery-photo-tags {
  gap: 6px;
  margin-top: 12px;
}

.aiesep-app .gallery-photo-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 9px;
  color: #276889;
  border: 1px solid rgba(55, 130, 164, .2);
  border-radius: 999px;
  background: #f1f8fb;
  font-size: .6875rem;
  font-weight: 590;
  text-decoration: none;
}

.aiesep-app .gallery-photo-unavailable {
  min-height: 14rem;
  aspect-ratio: auto;
  padding: 24px;
  color: #49677f;
  border: 1px dashed rgba(95, 132, 163, .34);
  border-radius: 13px;
  background:
    repeating-linear-gradient(135deg, rgba(106, 142, 170, .055) 0 1px, transparent 1px 12px),
    #eef4f7;
}

.aiesep-app .gallery-original-label {
  margin-top: 8px;
  font-size: .75rem;
}

.aiesep-app .gallery-original-label summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  color: #346d8c;
}

@media (hover: hover) {
  .aiesep-app .gallery-photo {
    transition: border-color 220ms ease, box-shadow 280ms ease, transform 280ms var(--a-premium-ease);
  }

  .aiesep-app .gallery-photo:hover {
    border-color: rgba(8, 104, 181, .3);
    box-shadow: 0 1px 0 #fff inset, 0 24px 54px rgba(10, 48, 77, .11);
    transform: translateY(-4px);
  }

  .aiesep-app .gallery-photo-open:hover img {
    filter: saturate(1) contrast(1.01);
    transform: none;
  }
}

.aiesep-app .gallery-adjacent {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 28px;
  border-top: 1px solid rgba(102, 136, 166, .24);
}

.aiesep-app .gallery-adjacent a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 18px;
  min-height: 118px;
  align-content: center;
  padding: 20px;
  color: inherit;
  border: 1px solid rgba(103, 137, 168, .22);
  border-radius: 18px;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 10px 32px rgba(14, 43, 68, .06);
  text-decoration: none;
}

.aiesep-app .gallery-adjacent a > span:first-child {
  grid-column: 1 / -1;
  color: #58728b;
  font-size: .6875rem;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.aiesep-app .gallery-adjacent strong {
  color: #173049;
  font-size: 1.0625rem;
  font-weight: 610;
  line-height: 1.35;
}

.aiesep-app .gallery-adjacent a > span:last-child {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  align-self: center;
  color: #0868b5;
  border: 1px solid rgba(8, 104, 181, .18);
  border-radius: 50%;
  background: #eff7fd;
}

.aiesep-app .gallery-empty {
  max-width: 46rem;
  margin-block: 32px;
  padding: 34px;
  border: 1px solid rgba(103, 137, 168, .24);
  border-radius: 20px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 42px rgba(14, 43, 68, .07);
}

.aiesep-app .gallery-empty h2,
.aiesep-app .gallery-empty h3 {
  margin: 5px 0 10px;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

/* The existing accessible dialog receives a more deliberate cinema surface. */
.aiesep-app .gallery-lightbox {
  padding: 16px clamp(14px, 3vw, 48px) 22px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 38%, rgba(46, 132, 178, .13), transparent 34rem),
    #061522;
}

.aiesep-app .gallery-lightbox::backdrop {
  background: rgba(3, 13, 22, .98);
}

.aiesep-app .gallery-lightbox-toolbar {
  min-height: 58px;
  background: transparent;
  border-bottom: 1px solid rgba(180, 214, 231, .14);
}

.aiesep-app .gallery-lightbox button {
  min-width: 46px;
  min-height: 46px;
  color: #fff;
  border-color: rgba(181, 217, 233, .32);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(12px);
}

.aiesep-app .gallery-lightbox-stage {
  gap: clamp(6px, 1.5vw, 22px);
}

.aiesep-app .gallery-lightbox-image {
  border-radius: 8px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .46);
}

.aiesep-app .gallery-lightbox-caption {
  padding-top: 12px;
}

.aiesep-app .gallery-lightbox-caption h2 {
  color: #fff;
  letter-spacing: -.02em;
}

.aiesep-app .gallery-lightbox-download {
  color: #75d9f0;
  font-weight: 600;
}

@media (max-width: 1120px) {
  .aiesep-app .gallery-command-grid {
    grid-template-columns: minmax(0, .9fr) minmax(26rem, 1.1fr);
    gap: 42px;
  }

  .aiesep-app .gallery-command-collage {
    min-height: 460px;
  }

  .aiesep-app .gallery-collection {
    grid-column: span 6 !important;
  }

  .aiesep-app .gallery-collection .gallery-collection-cover {
    aspect-ratio: 1.5 / 1 !important;
  }

  .aiesep-app .gallery-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aiesep-app .gallery-search .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .aiesep-app .gallery-detail-results .gallery-photo {
    grid-column: span 6;
  }

  .aiesep-app .gallery-detail-results .gallery-photo:nth-child(8n + 1) {
    grid-column: span 12;
  }
}

@media (max-width: 820px) {
  .aiesep-app .gallery-command-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-block: 58px 102px;
  }

  .aiesep-app .gallery-command h1,
  .aiesep-app .gallery-command--detail h1 {
    max-width: 11ch;
  }

  .aiesep-app .gallery-command-collage {
    min-height: 480px;
  }

  .aiesep-app .gallery-detail-hero {
    width: min(100%, 42rem);
    margin-inline: auto;
  }

  .aiesep-app .gallery-detail-hero-image {
    height: min(62vw, 440px);
  }
}

@media (max-width: 700px) {
  .aiesep-app .gallery-command-grid {
    gap: 42px;
    padding-block: 44px 82px;
  }

  .aiesep-app .gallery-command h1,
  .aiesep-app .gallery-command--detail h1 {
    font-size: clamp(3.15rem, 15vw, 4.6rem);
    line-height: .92;
  }

  .aiesep-app .gallery-command-back {
    margin-bottom: 24px;
  }

  .aiesep-app .gallery-command-introduction,
  .aiesep-app .gallery-command-lede {
    margin-top: 22px;
  }

  .aiesep-app .gallery-command-actions {
    align-items: stretch;
    margin-top: 26px;
  }

  .aiesep-app .gallery-command-actions .button {
    width: 100%;
  }

  .aiesep-app .gallery-command-text-link {
    width: 100%;
  }

  .aiesep-app .gallery-command-stats {
    margin-top: 32px;
    padding-top: 20px;
  }

  .aiesep-app .gallery-command-collage {
    min-height: 390px;
    margin-inline: -2px;
  }

  .aiesep-app .gallery-command-frame {
    border-radius: 17px;
  }

  .aiesep-app .gallery-command-frame--1 {
    grid-column: 1 / 11;
    grid-row: 2 / 11;
  }

  .aiesep-app .gallery-command-frame--2 {
    grid-column: 8 / 13;
    grid-row: 1 / 6;
  }

  .aiesep-app .gallery-command-frame--3 {
    grid-column: 7 / 13;
    grid-row: 7 / 13;
  }

  .aiesep-app .gallery-command-frame-label {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .aiesep-app .gallery-discovery {
    margin-top: -34px;
    border-radius: 18px;
  }

  .aiesep-app .gallery-discovery > summary {
    min-height: 70px;
    padding: 14px 16px;
  }

  .aiesep-app .gallery-search {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  .aiesep-app .gallery-search .button {
    grid-column: auto;
    width: 100%;
  }

  .aiesep-app .gallery-results-heading,
  .aiesep-app .gallery-detail-toolbar {
    display: grid;
    align-items: start;
    margin-bottom: 22px;
  }

  .aiesep-app .gallery-results-meta {
    justify-content: flex-start;
  }

  .aiesep-app .gallery-detail-toolbar p:last-child {
    text-align: left;
  }

  .aiesep-app .gallery-collection-grid,
  .aiesep-app .gallery-detail-results .gallery-photo-grid,
  .aiesep-app .gallery-photo-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .aiesep-app .gallery-collection,
  .aiesep-app .gallery-detail-results .gallery-photo,
  .aiesep-app .gallery-detail-results .gallery-photo:nth-child(8n + 1) {
    grid-column: auto !important;
  }

  .aiesep-app .gallery-collection .gallery-collection-cover,
  .aiesep-app .gallery-collection:nth-child(10n + 1) .gallery-collection-cover,
  .aiesep-app .gallery-collection:nth-child(10n + 7) .gallery-collection-cover {
    aspect-ratio: 1.45 / 1 !important;
  }

  .aiesep-app .gallery-detail-results .gallery-photo:nth-child(8n + 1) .gallery-photo-open {
    aspect-ratio: 4 / 3;
  }

  .aiesep-app .gallery-source-note {
    gap: 14px;
    padding: 18px;
  }

  .aiesep-app .gallery-adjacent {
    grid-template-columns: minmax(0, 1fr);
  }

  .aiesep-app .gallery-lightbox-stage {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
  }
}

@media (max-width: 420px) {
  .aiesep-app .gallery-command-grid {
    padding-top: 36px;
  }

  .aiesep-app .gallery-command h1,
  .aiesep-app .gallery-command--detail h1 {
    font-size: clamp(2.8rem, 15.5vw, 3.7rem);
  }

  .aiesep-app .gallery-command-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 0;
  }

  .aiesep-app .gallery-command-stats > div:nth-child(3) {
    grid-column: 1 / -1;
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid rgba(164, 208, 230, .16);
    border-left: 0;
  }

  .aiesep-app .gallery-command-collage {
    min-height: 330px;
  }

  .aiesep-app .gallery-command-frame-label strong {
    font-size: .8125rem;
  }

  .aiesep-app .gallery-detail-hero-image {
    height: min(58vw, 310px);
  }

  .aiesep-app .gallery-viewer-entry { width: 100%; }

  .aiesep-app .gallery-collection-copy {
    min-height: 128px;
    margin-inline: 10px;
    margin-bottom: 10px;
  }

  .aiesep-app .gallery-source-note {
    grid-template-columns: minmax(0, 1fr);
  }

  .aiesep-app .gallery-lightbox {
    padding-inline: 10px;
  }

  .aiesep-app .gallery-lightbox-stage {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aiesep-app :is(.gallery-command-frame, .gallery-command-frame img, .gallery-collection, .gallery-collection-cover img, .gallery-collection-arrow, .gallery-photo, .gallery-photo-open img, .gallery-discovery-toggle::before, .gallery-discovery-toggle::after) {
    transition: none;
  }

  .aiesep-app :is(.gallery-command-frame, .gallery-command-frame:hover, .gallery-detail-hero, .gallery-collection:hover, .gallery-photo:hover) {
    transform: none;
  }
}

html[data-motion="reduced"] .aiesep-app :is(.gallery-command-frame, .gallery-command-frame:hover, .gallery-detail-hero, .gallery-collection:hover, .gallery-photo:hover) {
  transform: none;
}

@media (forced-colors: active) {
  .aiesep-app :is(.gallery-command, .gallery-command-frame, .gallery-detail-hero, .gallery-discovery, .gallery-collection, .gallery-photo, .gallery-source-note, .gallery-adjacent a) {
    border: 1px solid CanvasText;
    box-shadow: none;
  }

  .aiesep-app .gallery-command h1,
  .aiesep-app .gallery-command h1 span,
  .aiesep-app .gallery-command-stats dt,
  .aiesep-app .gallery-command :is(a, p, dd) {
    color: CanvasText;
  }
}

/* A compact opening keeps the archive and its photographs within reach. */
.aiesep-app .gallery-command-grid{min-height:0;padding-block:48px 56px;gap:40px}
.aiesep-app .gallery-command h1{font-size:60px;line-height:1.04;letter-spacing:-.045em;max-width:14ch}
.aiesep-app .gallery-command--detail h1{font-size:52px;line-height:1.08;max-width:18ch}
.aiesep-app .gallery-command-back{margin-bottom:18px}
.aiesep-app .gallery-command-kicker{margin-bottom:16px}
.aiesep-app .gallery-command-introduction,.aiesep-app .gallery-command-lede{margin-top:18px}
.aiesep-app .gallery-command-actions{margin-top:22px}
@media(max-width:820px){.aiesep-app .gallery-command-grid{padding-block:32px 40px;gap:28px}.aiesep-app .gallery-command h1{font-size:44px}.aiesep-app .gallery-command--detail h1{font-size:40px}.aiesep-app .gallery-command-collage{min-height:330px}.aiesep-app .gallery-detail-hero-image{height:280px}}
@media(max-width:620px){.aiesep-app .gallery-command-grid{padding-block:28px 32px;gap:22px}.aiesep-app .gallery-command h1{font-size:36px;max-width:none}.aiesep-app .gallery-command--detail h1{font-size:34px;max-width:none}.aiesep-app .gallery-command-introduction p,.aiesep-app .gallery-command-lede{font-size:16px;line-height:1.6}.aiesep-app .gallery-command-stats{margin-top:22px}.aiesep-app .gallery-detail-hero-image{height:210px}.aiesep-app .gallery-command-actions{gap:10px;margin-top:18px}.aiesep-app .gallery-command-actions .button{min-height:44px}}

/* Full photographic previews with captions below, without overlapping tiles. */
.aiesep-app .gallery-command-collage{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto;gap:14px;height:auto;min-height:0;align-items:stretch;align-self:center}
.aiesep-app .gallery-command-frame{display:grid;grid-template-rows:auto 1fr;min-width:0;padding:0;box-sizing:border-box;background:#18354b}
.aiesep-app .gallery-command-frame--1,.aiesep-app .gallery-command-frame--2,.aiesep-app .gallery-command-frame--3{grid-column:auto;grid-row:auto;transform:none}
.aiesep-app .gallery-command-frame img{width:100%;height:auto;aspect-ratio:3/2;min-height:0;object-fit:contain;filter:none}
.aiesep-app .gallery-command-frame-shade,.aiesep-app .gallery-command-orbit{display:none}
.aiesep-app .gallery-command-frame-label{position:static;padding:12px;background:#18354b}
@media(hover:hover){.aiesep-app .gallery-command-frame--1:hover,.aiesep-app .gallery-command-frame--2:hover,.aiesep-app .gallery-command-frame--3:hover{transform:translateY(-3px)}.aiesep-app .gallery-command-frame:hover img{transform:none}}
@media(max-width:620px){.aiesep-app .gallery-command-collage{grid-template-columns:repeat(2,minmax(0,1fr));height:auto;min-height:0;gap:10px}.aiesep-app .gallery-command-frame--1{grid-column:1/-1}.aiesep-app .gallery-command-frame-label strong{font-size:13px;line-height:1.35}}
