/* ask-print.css — the PDF layout for /ask answers (see ask-pdf.js). */
#printRoot { display: none; }

.pdf-btn {
  background: transparent; border: 1px solid var(--rule); border-radius: 999px;
  padding: 5px 15px; font-family: "Markazi Text", serif; font-size: 14.5px;
  color: var(--ink-soft); cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}
a.pdf-btn { display: inline-block; text-decoration: none; }
.pdf-btn::before { content: "⤓ "; color: var(--gold-deep); }
.pdf-btn:hover { background: var(--gold-soft); border-color: var(--gold); color: var(--crimson); }

@media print {
  @page {
    size: A4;
    margin: 16mm 15mm 18mm;
    @bottom-center { content: counter(page) " / " counter(pages); font: 9pt "EB Garamond", serif; color: #777; }
  }
  body.print-one > *:not(#printRoot) { display: none !important; }
  body.print-one::before, body.print-one::after { display: none !important; }
  body.print-one { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body.print-one #printRoot { display: block; }

  #printRoot {
    --paper: #fff; --paper-fold: #fff; --ink: #141414; --ink-soft: #474747;
    --rule: #cfcfcf; --rule-soft: #e4e4e4; --gold: #9a7b2f; --gold-soft: #f5efe0;
    --gold-deep: #7a5f1f; --crimson: #8b1e1e; --crimson-dk: #6d1515;
    color: #141414; background: #fff;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    font-family: "EB Garamond", "Markazi Text", serif;
  }
  #printRoot .pr-head { border-bottom: 1px solid #cfcfcf; padding-bottom: 8pt; margin-bottom: 14pt; }
  #printRoot .pr-brand { font-family: "Cinzel", serif; letter-spacing: .08em; font-size: 10pt; color: #7a5f1f; }
  #printRoot .pr-q { font-family: "EB Garamond", "Markazi Text", serif; font-size: 18pt; line-height: 1.3; margin: 6pt 0 4pt; font-weight: 500; }
  #printRoot .pr-q:lang(fa), #printRoot .pr-q:lang(ar), #printRoot .pr-q:lang(ur) { font-family: "Markazi Text", serif; }
  #printRoot .pr-meta { font: 8.5pt "IBM Plex Mono", monospace; color: #666; }
  #printRoot .pr-meta span { unicode-bidi: isolate; }

  #printRoot .answer::before, #printRoot .answer::after { display: none !important; }
  #printRoot .answer { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
  #printRoot .answer-body { font-size: 11.5pt; line-height: 1.65; color: #141414; }
  #printRoot .answer-body h1, #printRoot .answer-body h2, #printRoot .answer-body h3 { break-after: avoid; page-break-after: avoid; line-height: 1.25; margin: 14pt 0 6pt; }
  #printRoot .answer-body h1 { font-size: 19pt; }
  #printRoot .answer-body h2 { font-size: 15pt; }
  #printRoot .answer-body h3 { font-size: 12.5pt; }
  /* a run of verses may span pages, but a couplet (one <p>) never splits */
  #printRoot .answer-body blockquote { break-inside: auto; page-break-inside: auto; }
  #printRoot .answer-body blockquote p,
  #printRoot .answer-body figure, #printRoot .answer-body pre,
  #printRoot .answer-body table { break-inside: avoid; page-break-inside: avoid; }
  #printRoot .answer-body p { orphans: 3; widows: 3; }
  #printRoot a { color: inherit; text-decoration: none; border-bottom: .5pt solid #b5b5b5; }

  #printRoot .pr-foot { margin-top: 18pt; border-top: 1px solid #cfcfcf; padding-top: 8pt; font-size: 9pt; color: #555; break-inside: avoid; }
  #printRoot .pr-foot p { margin: 0 0 3pt; }
  #printRoot .pr-url a { border: 0; color: #7a5f1f; }
}
