.slides-hero {
  background: var(--navy-950);
  color: #fff;
  padding: clamp(4rem, 8vw, 7rem) 0 3.5rem;
}

.slides-hero h1 { color: #fff; }
.slides-hero .lede { color: rgba(255, 255, 255, 0.74); }

.slides-browser {
  width: 100%;
  overflow: hidden;
}

.slides-stage {
  position: relative;
  width: 100%;
}

.slides-track {
  display: flex;
  width: 100%;
  gap: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.slides-track::-webkit-scrollbar { display: none; }

.slide-panel {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: center;
  margin: 0;
  padding: 0 clamp(0.75rem, 2.2vw, 2rem);
}

.slide-image-button {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 0;
  box-shadow: 0 24px 65px rgba(16, 35, 63, 0.16);
  cursor: zoom-in;
}

.slide-image-button picture,
.slide-image-button img {
  display: block;
  width: 100%;
}

.slide-image-button img {
  height: auto;
  object-fit: contain;
  background: #fff;
}

.slide-panel figcaption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  max-width: var(--content-max);
  margin: 0.8rem auto 0;
  color: var(--muted);
}

.slide-panel figcaption span {
  color: var(--gold-600);
  font-size: 0.72rem;
  font-weight: 800;
}

.slide-panel figcaption strong {
  min-width: 0;
  color: var(--navy-900);
  overflow-wrap: anywhere;
}

.slides-stage-arrow,
.presentation-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(7, 20, 38, 0.86);
  color: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.slides-stage-arrow:hover,
.presentation-arrow:hover {
  background: var(--teal-700);
}

.slides-stage-arrow.is-previous,
.presentation-arrow.is-previous { left: clamp(0.65rem, 1.6vw, 1.5rem); }
.slides-stage-arrow.is-next,
.presentation-arrow.is-next { right: clamp(0.65rem, 1.6vw, 1.5rem); }

.slide-status {
  margin-top: 1.1rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.presentation-dialog[hidden] { display: none; }

.presentation-dialog {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(3, 10, 20, 0.98);
  color: #fff;
}

.presentation-toolbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  padding: 0.75rem 1rem;
}

.presentation-toolbar > div:first-child {
  display: grid;
  gap: 0.15rem;
}

.presentation-toolbar span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.74rem;
}

.presentation-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.presentation-toolbar button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.presentation-toolbar button:hover { background: var(--teal-700); }

.presentation-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.presentation-track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.presentation-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-width: 100%;
  margin: 0;
  padding: clamp(0.5rem, 1.5vw, 1.25rem) clamp(0.5rem, 3.5vw, 3.5rem) 0.7rem;
  overflow: auto;
}

.presentation-slide picture {
  display: grid;
  min-height: 0;
  place-items: center;
}

.presentation-slide img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 145px);
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
}

.presentation-slide figcaption {
  padding: 0.55rem 0 0;
  text-align: center;
}

.presentation-slide figcaption a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 750;
}

@media (max-width: 767px) {
  .slide-panel { padding-inline: 0.5rem; }

  .slide-panel figcaption {
    grid-template-columns: auto minmax(0, 1fr);
    padding-inline: 0.25rem;
  }

  .slide-panel figcaption a { grid-column: 1 / -1; }

  .slides-stage-arrow,
  .presentation-arrow {
    width: 46px;
    height: 46px;
  }

  .presentation-toolbar {
    align-items: flex-start;
  }

  .presentation-toolbar span { display: none; }

  .presentation-toolbar-actions button:first-child { display: none; }

  .presentation-slide {
    padding-inline: 0.35rem;
  }

  .presentation-slide img {
    max-height: calc(100dvh - 126px);
    border-radius: 12px;
  }
}

/* Normal-mode arrows stay discoverable without obscuring slide content. */
.slides-stage-arrow {
  opacity: 0.16;
  background: rgba(7, 20, 38, 0.46);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  transition: opacity 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.slides-stage-arrow:hover,
.slides-stage-arrow:focus-visible {
  opacity: 1;
  background: var(--teal-700);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  transform: translateY(-50%) scale(1.04);
}

@media (hover: none) {
  .slides-stage-arrow {
    opacity: 0.58;
  }
}
