/* =========================================================================
   PRINT — used for window.print() based PDF / printable export
   -------------------------------------------------------------------------
   #print-area receives the *same* classes as the live #preview-page node
   (preview-page, style-*, size-*), so whatever visual style/theme was
   chosen on screen (notebook, dark, glass, corporate, etc.) prints
   identically instead of falling back to a generic plain document.
   ========================================================================= */
@media print {
  /* Browsers strip background colors/images by default when printing —
     force them to show so themed print-outs (dark mode, notebook lines,
     colored borders) actually appear on paper. */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }

  #print-area {
    position: absolute !important; left: 0 !important; top: 0 !important;
    width: 100%;
    max-width: 100% !important;
    min-height: auto !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    padding: 20px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  /* Glassmorphism relies on backdrop-filter, which most print engines
     ignore or render as a solid block — swap it for a clean solid card
     so the "glass" theme still looks intentional on paper. */
  #print-area.style-glass {
    background: var(--color-bg-elevated, #fff) !important;
    backdrop-filter: none !important;
    border: 1px solid var(--color-border, #ddd) !important;
  }

  .no-print { display: none !important; }
  a::after { content: none !important; }
  .checklist-item, .preview-checklist-item { break-inside: avoid; }
}
