#series-body {
  transition: opacity 200ms ease;
}
#series-body.fading-out {
  opacity: 0;
}

/* Schedule tab bar */

.back-link {
  margin-top: 1.5rem;
}

.instances-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.instances-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  color: #15105c;
  letter-spacing: 0.01em;
  margin: 0;
}

.instances-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid rgba(200, 192, 239, 0.5);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.instances-cta:hover {
  border-color: #b8b0e8;
  box-shadow: 0 2px 8px rgba(94, 76, 190, 0.08);
}

.schedule-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
  padding: 4px;
  background: rgba(200, 192, 239, 0.15);
  border-radius: 12px;
}

.schedule-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: rgba(21, 16, 92, 0.5);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  text-align: center;
}

.schedule-tab:hover {
  color: #15105c;
}

.schedule-tab.active {
  background: #fff;
  color: #15105c;
  box-shadow: 0 1px 3px rgba(21, 16, 92, 0.08);
}

@media (max-width: 600px) {
  .schedule-tab {
    font-size: 14px;
    padding: 9px 12px;
  }
}

/* ── Series hero ── */

.series-hero {
  text-align: center;
  padding: 2rem 0;
  position: relative;
  overflow: visible;
}

.series-hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 34px;
  font-weight: 800;
  text-transform: uppercase;
  color: #15105c;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0 0 6px;
}

.series-hero .meta {
  font-family: 'DM Sans', sans-serif;
  color: #15105c;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .series-hero h1 { font-size: 28px; }
  .series-hero .meta { font-size: 16px; }
}

/* ── Sections ── */

.series-section { margin: 0.5rem 0; }
.series-section h3 { font-size: 1rem; margin: 0 0 0.3rem; color: var(--muted); }
.series-section p { margin: 0; line-height: 1.6; color: var(--ink); }
.series-section ul { margin: 0.3rem 0; padding-left: 1.2rem; color: var(--ink-soft); line-height: 1.8; }

/* ── Instance list / cards ── */

.instance-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.instance-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--wash);
  border: 1px solid rgba(170, 180, 195, 0.15);
  border-radius: var(--radius-sm);
  gap: 1rem;
}

.instance-card .time { font-weight: 600; }
.instance-card .spots { font-size: 0.85rem; color: var(--muted); }
.instance-card .spots.full {
  color: #c0706a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

.event-card-actions,
.instance-card div:last-child {
  min-height: 32px;
  display: flex;
  align-items: center;
}

/* ── At a glance ── */

.glance-list { display: flex; flex-direction: column; gap: 0; }
.glance-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(170, 180, 195, 0.1);
  font-size: 0.9rem;
  color: var(--ink);
}
.glance-row:last-child { border-bottom: none; }
.glance-row i {
  font-size: 1.1rem;
  color: var(--ink);
  flex-shrink: 0;
  width: 1.2rem;
  text-align: center;
}
.series-about-label {
  margin: 1.5rem 0 0.3rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

/* ── Story card ── */

.story-card {
  background: #fffefa;
  border: none;
  border-left: 4px solid var(--ink);
  border-radius: 0 12px 12px 0;
  padding: 2rem 2rem 2rem 1.75rem;
  margin-bottom: 1.5rem;
}

.story-card-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.5;
  margin-bottom: 0.75rem;
}

.story-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.story-card-author {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.story-card-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  opacity: 0.7;
  line-height: 1.6;
}

.story-card-cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 11px 22px;
  background: var(--purple, #05007A);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.story-card-cta:hover {
  opacity: 0.88;
}

.topic-card-btn {
  margin: 1.5rem 0 2.5rem;
  padding: 14px 24px;
  background: var(--purple, #05007A);
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.topic-card-btn:hover {
  opacity: 0.9;
}

/* ── How it works button ── */

.how-it-works-btn {
  position: absolute;
  top: 14px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: #fff;
  border: 1.5px solid #d8d1f5;
  border-radius: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #15105c;
  cursor: pointer;
  transform: rotate(-3deg);
  box-shadow: 2px 3px 0 rgba(94, 76, 190, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
  z-index: 2;
  white-space: nowrap;
}

.how-it-works-btn:hover {
  transform: rotate(0deg) translateY(-1px);
  box-shadow: 2px 5px 0 rgba(94, 76, 190, 0.16);
}

@media (max-width: 600px) {
  .how-it-works-btn {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 12px;
    transform: rotate(-2deg);
  }
}

/* ── Slide-in panel ── */

.panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.panel-overlay.is-active {
  pointer-events: auto;
}

.panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 16, 92, 0.3);
  opacity: 0;
  transition: opacity 300ms ease;
}

.panel-overlay.is-active .panel-backdrop {
  opacity: 1;
}

.panel-sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100%);
  background: #fff;
  transform: translateX(100%);
  transition: transform 300ms ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.panel-overlay.is-active .panel-sheet {
  transform: translateX(0);
}

.panel-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid rgba(200, 192, 239, 0.2);
  z-index: 1;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.panel-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  background: rgba(200, 192, 239, 0.15);
  border-radius: 10px;
  font-size: 20px;
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease;
}

.panel-close:hover {
  background: rgba(200, 192, 239, 0.3);
}

.panel-body {
  padding: 20px;
}

.panel-body .video-wrapper {
  margin-bottom: 20px;
}

.panel-body .series-section {
  margin-bottom: 16px;
}

/* ── Video (info panel) ── */

.video-wrapper {
  position: relative;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(170, 180, 195, 0.08);
}

.series-video {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 400ms ease;
}

.series-video.is-loaded {
  opacity: 1;
}

.video-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.video-spinner-ring {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(5, 0, 122, 0.1);
  border-top-color: rgba(5, 0, 122, 0.4);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.video-play-btn {
  position: absolute;
  bottom: 12px;
  left: 12px;
  top: auto;
  right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.video-play-btn svg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
  transition: transform 160ms ease;
}

.video-play-btn:hover svg {
  transform: scale(1.08);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
