/* ══════════════════════════════════════════════════════════════
   deck-base.css — the projector, not the brand.
   Every visual decision lives in each deck's own stylesheet;
   this file only sizes, centres and paginates the slides.
   ══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

/* the stage: one 1600×900 slide, scaled to fit whatever screen it lands on.
   Centred by absolute + translate rather than grid — a grid item wider than
   its track overflows to one side instead of straddling the centre. */
.deck {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.slide {
  --k: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1600px;
  height: 900px;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--k));
  transform-origin: center center;
  display: none;
}

.slide.is-active { display: block; }

/* Slides needing a display mode other than block ask for it HERE, never inline:
   an inline `display` outranks .slide{display:none}, so the slide would stay
   painted on top of every other slide in the deck. */
.slide--center.is-active { display: grid; place-items: center; }

/* column flow — lets a final row absorb the leftover height */
.slide--flow.is-active { display: flex; flex-direction: column; }

/* ── chrome ─────────────────────────────────────────────────── */

.deck-ui {
  position: fixed;
  z-index: 9000;
  font: 500 12px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  user-select: none;
}

.deck-count { right: 22px; bottom: 20px; opacity: .55; }

.deck-hint {
  left: 22px; bottom: 20px;
  opacity: .32;
  transition: opacity .5s ease;
}
.deck-hint.is-gone { opacity: 0; }

.deck-bar {
  position: fixed;
  left: 0; top: 0;
  height: 3px;
  width: 0;
  z-index: 9000;
  transition: width .45s cubic-bezier(.22,1,.36,1);
}

/* click zones — invisible, edge-hugging, keyboard-equivalent */
.deck-zone {
  position: fixed;
  top: 0; bottom: 0;
  width: 13vw;
  z-index: 8000;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
}
.deck-zone--prev { left: 0; cursor: w-resize; }
.deck-zone--next { right: 0; cursor: e-resize; }
.deck-zone:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }

/* ── print / PDF export ─────────────────────────────────────── */

@page { size: 1600px 900px; margin: 0; }

@media print {
  html, body { overflow: visible; height: auto; }
  .deck { position: static; display: block; }
  .deck-ui, .deck-bar, .deck-zone { display: none !important; }

  .slide {
    display: block !important;
    position: relative;
    left: auto; top: auto;
    transform: none !important;
    width: 1600px;
    height: 900px;
    break-inside: avoid;
    break-after: page;
    page-break-after: always;
  }

  /* cover slides keep their centring on paper — display:block would
     collapse the artwork into the top-left corner */
  .slide--center {
    display: grid !important;
    place-items: center;
  }
  .slide:last-child { break-after: auto; page-break-after: auto; }

  /* backgrounds are the brand — never let the print engine drop them */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
