/* A slide deck (lib/deck.js): 1920×1080 slides with inline styles, scaled to fit, one at a time.
   The page's own theme styles the frame and controls; these rules give the slides the defaults
   their markup assumes (the Slides artifact format: no margins, border-box, fixed type defaults). */
.deck-page .page { max-width: 1480px; }
.deck { grid-column: 1 / -1; display: grid; gap: 14px; }
.deck > * { grid-column: 1 / -1; min-width: 0; }
.deck-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.deck-head h1 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.75rem); text-shadow: 2px 2px 0 var(--pink); }
.deck-head p { margin: 0; color: var(--ink-2); font-size: 0.92rem; }
@media (hover: none) { .deck-head p { display: none; } } /* touch: swipe instead */
.deck-head kbd {
  padding: 0 6px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--panel);
  font: 700 0.85em var(--body);
}

.deck-frame {
  position: relative;
  width: min(100%, calc((100svh - 230px) * 16 / 9));
  min-width: min(100%, 280px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: 6px;
  background: #1a1523;
  box-shadow: 6px 6px 0 var(--ink);
  cursor: pointer;
  touch-action: pan-y;
}
.deck-frame:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
.deck-frame:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; background: #000000; }
.deck-stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }

.deck-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
.deck-bar .btn { padding: 6px 16px; font-size: 0.98rem; cursor: pointer; }
.deck-bar .btn[disabled] { opacity: 0.45; cursor: default; transform: none; box-shadow: 4px 4px 0 var(--ink); }
.deck-bar .btn[aria-pressed="true"] { background: var(--pink); color: #ffffff; }
.deck-count { min-width: 5.5em; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.deck-notes { width: min(100%, 980px); margin: 0 auto; }
.deck-notes h2 { font-size: 1.05rem; }
.deck-notes p { margin: 0; white-space: pre-line; }

/* Slide defaults */
.deck-stage, .deck-stage * { box-sizing: border-box; }
.deck-stage > section {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  font-size: 32px;
  line-height: 1.4;
  letter-spacing: normal;
  cursor: default;
}
@media screen { .deck-stage > section:not(.is-current) { display: none !important; } }
/* Later children paint over earlier ones, flow or pinned: a pinned backdrop listed first stays behind
   the text. (Plain CSS would paint every positioned element over the flow.) */
.deck-stage > section > * { position: relative; }
.deck-stage :where(h1, h2, h3, p, ul, ol, li) { margin: 0; letter-spacing: normal; text-shadow: none; }
.deck-stage :where(h1) { font-size: 96px; font-weight: 600; line-height: 1.1; }
.deck-stage :where(h2) { font-size: 64px; font-weight: 600; line-height: 1.15; }
.deck-stage :where(h3) { font-size: 44px; font-weight: 600; line-height: 1.2; }
.deck-stage :where(p, ul, ol) { font-size: 32px; line-height: 1.4; }
.deck-stage :where(ul, ol) { padding-left: 1.2em; }
.deck-stage aside { display: none; }
.deck-stage svg { display: block; flex: none; }
.deck-stage .is-entering { animation: deck-fade 220ms ease-out; }
@keyframes deck-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .deck-stage .is-entering { animation: none; } }

/* Print, or save as PDF: one slide per page */
@media print {
  @page { size: 1920px 1080px; margin: 0; }
  .deck-page .site-nav, .deck-head, .deck-bar, .deck-notes, .deck-page footer { display: none !important; }
  .deck-page .page { display: block; max-width: none; padding: 0; }
  .deck-frame { width: auto; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; overflow: visible; background: none; }
  .deck-stage { position: static; width: auto; height: auto; transform: none !important; }
  .deck-stage > section { position: relative; break-after: page; }
}
