/* ===== Shared (screen + print) ===== */
.slides { counter-reset: slide; }

/* Treat each H2 as slide start and auto-number */
.slides h2 {
  counter-increment: slide;
  margin-top: 2rem;
  margin-bottom: 0.25rem;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.2rem;
}

/* "Slide N" line under the title */
/* Horizontal rule before each slide title, except the first */
.slides h2:not(:first-of-type) {
  border-top: 2px solid #ccc;
  padding-top: 1rem;
  margin-top: 2rem;
}

.slides h2::after {
  content: "Slide " counter(slide);
  display: block;
  font-size: 2rem;
  color: #666;
  margin-top: 0.25rem;
}
@media print {
  /* Basic page */
  @page { size: Letter; margin: 0.5in; }

  /* Hide chrome */
  header, nav, footer, .site-header, .site-footer, .sidebar, .toc, .breadcrumbs {
    display: none !important;
  }

  /* Kill layout features that break pagination */
  html, body {
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Try really hard to get out of flex/grid/overflow traps */
  /* Add or remove selectors you see in your DOM around .slides */
  main, .content, .container, .wrapper, .post, .post-single, .post-content,
  .prose, article, section, .markdown, .entry-content, .page {
    display: block !important;
    float: none !important;
    overflow: visible !important;
    position: static !important;
    transform: none !important;
    contain: none !important;
    max-height: none !important;
    height: auto !important;
  }

  /* Reset anything explicitly sized to viewport */
  [style*="height:100vh"], [style*="height: 100vh"], .h-screen, .min-h-screen {
    height: auto !important;
    min-height: auto !important;
  }

  /* One slide per page with h2 */
  .slides h2 { break-before: page; page-break-before: always; }
  .slides h2:first-of-type { break-before: auto; page-break-before: auto; }

  /* Avoid awkward splits */
  .slides > * { break-inside: avoid-page; }

  /* Your visual separator before each slide title (except the first) */
  .slides h2:not(:first-of-type)::before {
    content: "";
    display: block;
    border-top: 2px solid #ccc;
    margin: 1.5rem 0 1rem;
  }
}

