/* Etheric print/PDF projection for reveal.js native PrintView.
   The accepted browser deck DOM remains authoritative; this stylesheet only
   removes interactive state and makes the same compositions deterministic in print. */

html.print-pdf,
html.reveal-print {
  color-scheme: light;
  --ed-paper: #f6f5f1;
  --ed-surface: #fcfcfa;
  --ed-ink: #151719;
  --ed-ink-2: #5b6065;
  --ed-muted: #7c818c;
  --ed-rule: #d8d7d1;
  --ed-rule-soft: #e8e6e0;
  --ed-rule-strong: #b9bab5;
}

html.print-pdf,
html.print-pdf body,
html.print-pdf .reveal-viewport,
html.reveal-print,
html.reveal-print body,
html.reveal-print .reveal-viewport,
html.print-pdf .pdf-page,
html.reveal-print .pdf-page {
  background: var(--ed-paper) !important;
}

html.print-pdf .reveal,
html.print-pdf .reveal *,
html.reveal-print .reveal,
html.reveal-print .reveal * {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

html.print-pdf .ed-product-chrome,
html.print-pdf .ed-grid-navigator,
html.print-pdf .reveal .progress,
html.print-pdf .reveal .slide-number,
html.reveal-print .ed-product-chrome,
html.reveal-print .ed-grid-navigator,
html.reveal-print .reveal .progress,
html.reveal-print .reveal .slide-number {
  display: none !important;
}

html.print-pdf .reveal .slides section,
html.print-pdf .reveal .fragment,
html.reveal-print .reveal .slides section,
html.reveal-print .reveal .fragment {
  animation: none !important;
  transition: none !important;
}

html.print-pdf .reveal .slides > section,
html.print-pdf .reveal .slides > section > section,
html.reveal-print .reveal .slides > section,
html.reveal-print .reveal .slides > section > section {
  overflow: hidden !important;
  background: var(--ed-surface) !important;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Normal deck chrome gains one additional PDF/export action. */
.ed-command-dock.ed-has-pdf {
  width: 238px;
}

/* Screen-only print helper. It never enters the printed/PDF page. */
.ed-print-helper {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10000;
  display: flex;
  max-width: min(660px, calc(100vw - 28px));
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--ed-rule-strong);
  background: color-mix(in srgb, var(--ed-surface) 97%, transparent);
  color: var(--ed-ink);
  box-shadow: 0 10px 30px rgba(21, 23, 25, .12);
  font-family: var(--ed-sans);
}

.ed-print-helper-copy {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 2px 8px;
  align-items: baseline;
  min-width: 0;
  color: var(--ed-ink-2);
  font-size: 12px;
  line-height: 1.35;
}

.ed-print-hint {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ed-print-options {
  display: flex;
  flex: 1 1 250px;
  flex-wrap: wrap;
  gap: 2px 0;
  min-width: 0;
}

.ed-print-option {
  font-weight: 650;
  white-space: nowrap;
}

.ed-print-option:not(:last-child)::after {
  content: " · ";
  color: var(--ed-muted);
  font-weight: 400;
  white-space: pre;
}

.ed-print-helper-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
}

.ed-print-back,
.ed-print-action {
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--ed-rule-strong);
  border-radius: var(--ed-radius-ui);
  font-family: var(--ed-sans);
  font-size: 12px;
  font-weight: 650;
  line-height: 36px;
  text-decoration: none;
  white-space: nowrap;
}

.ed-print-back {
  padding: 0 12px;
  background: var(--ed-surface);
  color: var(--ed-ink-2);
  cursor: pointer;
}

.ed-print-action {
  padding: 0 14px;
  background: var(--ed-accent);
  color: var(--ed-surface);
  cursor: pointer;
}

.ed-print-action:disabled {
  cursor: wait;
  opacity: .55;
}

.ed-print-back:hover,
.ed-print-back:focus-visible {
  border-color: var(--ed-accent);
  color: var(--ed-accent);
}

.ed-print-action:not(:disabled):hover,
.ed-print-action:not(:disabled):focus-visible {
  filter: brightness(.94);
}

@media (max-width: 720px) {
  .ed-command-dock.ed-has-pdf {
    width: 214px;
  }

  .ed-print-helper {
    left: 10px;
    right: 10px;
    max-width: none;
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .ed-print-helper-actions {
    justify-content: flex-end;
  }
}

@media print {
  html,
  body,
  .reveal-viewport,
  .pdf-page {
    background: var(--ed-paper) !important;
  }

  html,
  body,
  .reveal,
  .reveal * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .ed-product-chrome,
  .ed-grid-navigator,
  .ed-print-helper,
  .reveal .progress,
  .reveal .slide-number {
    display: none !important;
  }

  .reveal .slides section,
  .reveal .fragment {
    animation: none !important;
    transition: none !important;
  }
}