/* Print only the letter: everything that is not the letter or one of its ancestors disappears,
   and the ancestors lose the layout that framed the letter on screen.
   Loaded by src/components/letter-tool/LetterTool.tsx as <link media="print">, so it never delays
   the first paint (a bundled CSS import would be a second render-blocking stylesheet). */
@media print {
  body *:not(:has(#letter-print), #letter-print, #letter-print *) {
    display: none !important;
  }
  *:has(#letter-print) {
    display: block !important;
    position: static !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  #letter-print {
    max-height: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
    outline: 0 !important;
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--color-ink);
    font-size: 11pt;
    line-height: 1.5;
  }
  #letter-print mark {
    padding: 0 !important;
    background: none !important;
    color: inherit !important;
  }
  /* Keep paragraphs whole across the page break, and leave room to sign above the printed name. */
  #letter-print p,
  #letter-print dl {
    break-inside: avoid;
  }
  #letter-print [data-signoff] > :last-child {
    margin-top: 0.55in;
  }
  @page {
    margin: 0.9in;
  }
}
