/* Lecture-slideshow viewer */
.slides-shell { max-width: 960px; margin: 1.5rem auto 3rem; padding: 0 1.25rem; }

.slides-topbar {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding-bottom: .75rem; border-bottom: 1px solid #ddd; margin-bottom: 1rem;
}
.slides-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-weight: 700; font-size: 1.1rem; pointer-events: none; white-space: nowrap;
}
.slides-counter {
  color: #555; font-variant-numeric: tabular-nums; font-size: .9rem;
}

/* Each slide gets a fixed 16:9-ish stage so the slideshow feels consistent. */
.slides-stage {
  border: 1px solid #ddd; border-radius: 8px;
  background: #fff;
  aspect-ratio: 16 / 9;
  padding: 2rem 2.5rem;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.slides-stage:has(.slide-embed),
.slides-stage:has(.video-embed) { padding: 0; }
.slide-embed, .video-embed { position: absolute; inset: 0; }
.slide-embed iframe, .video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Slideshow (PDF) embeds: cover both side toolbars with full-height bars. */
.slide-embed::before,
.slide-embed::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  background: #000;
  z-index: 2;
}
.slide-embed::before { left: 0; }
.slide-embed::after  { right: 0; }

/* Video embeds: small white square in the top-right with the logo on top,
   so it blends in rather than looking like a black redaction. */
.video-corner-cover {
  position: absolute;
  top: 0; right: 0;
  width: 64px; height: 64px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.video-corner-cover img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* Per-user watermark — faint email tag in the top-right corner of slide/video
   stages so leaked recordings are traceable. Subtle but legible. */
.cp-watermark {
  position: absolute;
  top: 8px;
  right: 76px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.35);
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
  user-select: none;
  z-index: 3;
  letter-spacing: .02em;
}

/* Inline figure embedded into a text slide. */
.slide-image {
  margin: .5rem auto;
  display: flex; justify-content: center; align-items: center;
  min-height: 0; flex-shrink: 1;
}
.slide-image img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}
.slides-loading { color: #777; font-style: italic; }

.slide { display: flex; flex-direction: column; gap: .9rem; flex: 1; }

/* Title slide — dark blue background */
.slide-title-type, .slide.slide-title {
  background: linear-gradient(135deg, #0a3f6e 0%, #11538d 100%);
  margin: -2rem -2.5rem; padding: 4rem 3rem;
  color: #fff; min-height: 460px;
  border-radius: 8px;
}
.title-slide h1 {
  font-size: 2.6rem; font-weight: 800; margin: 0;
  line-height: 1.15; color: #fff;
}
.title-slide h2 {
  font-size: 1.4rem; font-weight: 600; margin: .6rem 0 0;
  color: #4aa6ff;
}
.title-slide .title-footer {
  margin-top: auto; padding-top: 5rem;
  font-size: .95rem; color: #cfdfee; font-weight: 600;
}

/* Normal slides */
.slide-title {
  font-size: 1.9rem; font-weight: 800; color: #11538d;
  margin: 0;
}
.slide-subtitle {
  font-size: 1.05rem; font-weight: 600; color: #333;
  margin: -.25rem 0 .25rem;
}

/* Idea callout — blue highlight box */
.slide-callout {
  font-size: 1.25rem; font-weight: 600;
  color: #2f80c8;
  padding: .35rem 0;
  text-align: center;
  line-height: 1.4;
}

.slide-body { font-size: 1.05rem; line-height: 1.6; }
.slide-body ul, .slide-body ol { margin: .35em 0 .5em 1.3em; padding: 0; }
.slide-body li { margin: .4em 0; }
.slide-body p { margin: .5em 0; }

/* Answer (highlighted in red, bottom-right) */
.slide-answer {
  margin-top: auto;
  text-align: right;
  font-size: 1.4rem;
  color: #b00020;
  padding-top: 1rem;
}

/* Long math + tables overflow horizontally inside their block. */
mjx-container[display="true"] {
  display: block !important; max-width: 100%;
  overflow-x: auto; overflow-y: hidden;
}

/* Bottom nav controls */
.slides-controls {
  display: flex; justify-content: space-between; gap: .5rem;
  margin-top: 1rem;
}
.slides-controls .pset-mini { flex: 1; font-size: .95rem; padding: .5rem 1rem; }

/* Reuse pset-mini button styles from elsewhere; if not loaded, add minimal: */
.pset-mini {
  flex: 1 1 0; padding: .35rem .7rem; font-size: .85rem;
  background: #e5e7eb; color: #333; border: 0; border-radius: 4px;
  cursor: pointer;
}
.pset-mini:hover:not(:disabled) { background: #d1d5db; }
.pset-mini:disabled { opacity: .5; cursor: not-allowed; }
.pset-mini.primary { background: #2f5d8c; color: #fff; }
.pset-mini.primary:hover:not(:disabled) { background: #244a70; }

/* Gray back button (mirrors pset.css). */
a.pset-back,
a.pset-back:link, a.pset-back:visited,
a.pset-back:hover, a.pset-back:active, a.pset-back:focus {
  display: inline-block;
  padding: .35rem .7rem;
  font-size: .85rem; font-weight: 500;
  background: #e5e7eb; color: #333;
  border: 0; border-radius: 4px;
  text-decoration: none !important; line-height: 1.2;
}
a.pset-back:hover { background: #d1d5db; }
