/* Decks page: every deck stacked vertically, each with its own slide viewer. */
.deck-list {
  display: flex;
  flex-direction: column;
  /* Breathing room between the header and the first deck. */
  padding-top: clamp(4rem, 9vw, 8rem);
}

.deck-section {
  padding-top: 5rem;
  padding-bottom: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  scroll-margin-top: 2rem;
}

.deck-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.deck-section_header {
  max-width: 48rem;
  margin-bottom: 2.5rem;
}

.deck-section_meta {
  margin-bottom: 1rem;
  color: var(--green);
}

.deck-section_description {
  margin-top: 1.25rem;
  opacity: 0.8;
}

.deck-list_empty {
  opacity: 0.7;
}

.deck-viewer {
  --deck-ratio: 1.7778;
  /* Fit the slide and its controls on one screen. */
  width: min(100%, calc((100svh - 9rem) * var(--deck-ratio)));
}

.deck-viewer_stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--deck-ratio);
  overflow: hidden;
  background-color: var(--charcoal);
  touch-action: pan-y;
  user-select: none;
}

.deck-viewer_canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.deck-viewer_status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
}

.deck-viewer_controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.deck-viewer_button {
  position: relative;
  overflow: hidden;
  border: 0;
  font: inherit;
  cursor: pointer;
  min-width: 9rem;
}

.deck-viewer_button:disabled {
  opacity: 0.35;
  cursor: default;
}

.deck-viewer_button:disabled .button_bg {
  width: 0% !important;
}

.deck-viewer_button:focus-visible {
  outline: 0.125rem solid var(--green);
  outline-offset: 0.125rem;
}

.deck-viewer_count {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

/* PowerPoint: Microsoft's viewer, sized so the slide fills the width exactly. Its
   ~24px toolbar sits below the slide. The logo (left) and notes/fullscreen buttons
   (right) are covered; the middle, where Microsoft places the ◄ count ► group (its
   position shifts with width), is recoloured from grey to the site's black by a
   difference-blend layer that lets clicks through. The iframe is nudged 1px to hide
   the viewer's own border. */
.deck-office {
  --deck-toolbar: 24px;
  --deck-toolbar-grey: #3a3a3a; /* toolbar grey (#444) minus the site black (#0a0a0a) */
  container-type: inline-size;
  width: min(100%, calc((100svh - 9rem) * var(--deck-ratio)));
}

.deck-office_frame {
  position: relative;
  overflow: hidden;
  height: calc(100cqw / var(--deck-ratio) + var(--deck-toolbar));
  background-color: var(--charcoal);
}

.deck-office_iframe {
  position: absolute;
  top: -1px;
  left: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  border: 0;
}

.deck-office_cover,
.deck-office_tint {
  position: absolute;
  bottom: 0;
  height: var(--deck-toolbar);
}

.deck-office_cover {
  background-color: var(--black);
}

.deck-office_cover.is-left {
  left: 0;
  width: 40px;
}

.deck-office_cover.is-right {
  right: 0;
  width: 92px;
}

/* Microsoft's toolbar has a lighter top edge; hide it. */
.deck-office_cover.is-edge {
  left: 0;
  right: 0;
  bottom: calc(var(--deck-toolbar) - 2px);
  height: 3px;
}

.deck-office_tint {
  left: 40px;
  right: 92px;
  background-color: var(--deck-toolbar-grey);
  mix-blend-mode: difference;
  pointer-events: none;
}

/* Video decks use Osmo's Bunny player (bunny-player.css), full width of the container. */
.deck-video {
  --deck-ratio: 1.7778;
  width: 100%;
}

.bunny-player [data-player-control]:focus-visible {
  outline: 0.125rem solid var(--green);
  outline-offset: 0.125rem;
}

@media screen and (max-width: 479px) {
  .deck-section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .deck-viewer_button {
    min-width: 0;
    padding: 1.1rem 1.25rem;
  }
}
