/* Slides kit: the page around the slides (deck, read and overview views; print). */
html, body { margin: 0; background: #000 }
body { font-family: var(--font-body); color: var(--ink) }
.deck { margin: 0 }

/* Deck view: one slide per window, scroll snap */
html.view-deck { scroll-snap-type: y mandatory; overflow-y: scroll; scrollbar-width: none }
html.view-deck::-webkit-scrollbar { display: none }
.view-deck .slide { height: 100vh; height: 100dvh; display: grid; place-items: center; scroll-snap-align: start; overflow: hidden }
.slide > .s { flex: none }
.slide .note { display: none }

/* Read view: slides down the page with their notes */
html.view-read, html.view-read body { background: #ebe7df }
.view-read .deck { max-width: var(--sw); margin: 0 auto; padding: 32px 16px 120px; display: grid; gap: 56px }
.view-read .slide > .s { box-shadow: 0 1px 3px rgb(0 0 0 / .2) }
.view-read .slide .note { display: block; margin: 16px 0 0; max-width: 68ch; font: 18px/1.55 var(--font-body); color: var(--ink) }

/* Overview: every slide as a thumbnail; click one to go there */
html.view-overview, html.view-overview body { background: #ebe7df }
.view-overview .deck { display: grid; grid-template-columns: repeat(var(--cols), var(--sw)); gap: 14px; justify-content: center; padding: 16px }
.view-overview .slide { cursor: pointer; position: relative }
.view-overview .slide::after { content: attr(id); position: absolute; left: 6px; top: 4px; font: 500 11px var(--font-label); color: var(--muted) }
.view-overview .slide.on > .s { outline: 4px solid var(--ink); outline-offset: 2px }

/* Contents rail: long ticks for sections, short for slides */
.rail { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 20; display: grid; justify-items: end; gap: 4px; padding: 8px 4px; mix-blend-mode: difference; transition: opacity .4s }
.rail .tick { all: unset; cursor: pointer; display: block; width: 8px; height: 2px; padding: 2px 0; background: rgb(255 255 255 / .45); background-clip: content-box; position: relative }
.rail .tick.sec { width: 18px; height: 3px; margin-top: 6px; background-color: rgb(255 255 255 / .7) }
.rail .tick.minor { display: none }
.rail .tick.on { display: block; width: 26px; background-color: #fff }
.rail .tick:hover::before { content: attr(data-label); position: absolute; right: 34px; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 500 13px var(--font-label); letter-spacing: .06em; color: #fff; background: #000; padding: 4px 8px }
.progress { position: fixed; left: 0; bottom: 0; height: 3px; z-index: 20; background: #fff; mix-blend-mode: difference; transition: width .3s, opacity .4s }
.idle .rail, .idle .progress { opacity: 0 }
.view-read .rail, .view-overview .rail, .view-read .progress, .view-overview .progress { display: none }

.notes-bar { display: none }
.show-notes.view-deck .notes-bar:not(:empty) { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgb(0 0 0 / .85); color: #fff; font: 22px/1.4 var(--font-body); padding: 16px 28px }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; background: rgb(0 0 0 / .85); color: #fff; font: 500 14px var(--font-label); letter-spacing: .06em; padding: 10px 16px; opacity: 0; transition: opacity .25s; pointer-events: none }
.toast.on { opacity: 1 }
@media (prefers-reduced-motion: reduce) { .progress, .rail, .toast { transition: none } }

/* Print / PDF: one slide per page at 1920 × 1080 */
@page { size: 1920px 1080px; margin: 0 }
@media print {
  :root { --u: 1px !important; --sw: 1920px !important; --sh: 1080px !important }
  html, body { background: #fff !important }
  .rail, .progress, .notes-bar, .toast, .slide .note { display: none !important }
  .deck { display: block !important; max-width: none !important; padding: 0 !important }
  .slide { display: block !important; height: 1080px !important; width: 1920px; overflow: hidden; break-after: page }
  .slide:last-child { break-after: auto }
  .s { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none !important; outline: none !important }
}
