/* Printed result report for every tool page (see docs/tools-print-study.md).
   On screen nothing changes. When printed or saved as PDF the page becomes a plain report: report header,
   result, meaning, breakdown, the person's answers, care note, sources. No site header, buttons, promotions
   or forms. The report header, answers table and closing lines are added by nv-tools-print.js. */
.nv-print-only { display: none; }

@media print {
  @page { margin: 16mm 15mm 18mm; }

  html, body { background: #fff !important; color: #111 !important; font-size: 10pt !important; line-height: 1.4 !important; }
  *, *::before, *::after { box-shadow: none !important; text-shadow: none !important; animation: none !important; transition: none !important; }

  /* Everything that is a screen control or a promotion */
  .nv-site-header, .nv-tool-hero, header, nav, footer, aside, .disc, .main-warning-wrapper, .progress-bar-bg, .progress-wrapper,
  .view:not(#view-results), #view-start, #view-quiz, #view-builder, #view-sensitive,
  .seo-article-section, .seo-sec, .how-sec, .faq-sec, .faq-section, .seo-table-wrapper,
  .nv-crosssell-box, .nv-cs-box, .nv-workbook-cta, .nv-affiliate-section, .nv-store-box,
  .action-row, .btn-copy, .btn-export, .btn-retake, .btn-store-header, #nv-gate, #nv-custom-modal, .no-print,
  #view-results button, #view-results .btn-primary, #view-results .btn-secondary, #view-results .btn-success,
  .apa-citation-box button, .nv-sources button, .print-header { display: none !important; }

  #view-results { display: block !important; visibility: visible !important; opacity: 1 !important; }
  main, .main-wrap, .container, .wrapper, #view-results { max-width: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: #fff !important; }

  /* Plain, high-contrast report */
  #view-results *, .nv-sources *, .nv-print-only * { background: transparent !important; color: #111 !important; border-color: #b9bcc8 !important; }
  #view-results a, .nv-sources a { text-decoration: underline; word-break: break-word; }
  #view-results h1, #view-results h2, #view-results h3, #view-results h4, .nv-sources h2 { break-after: avoid; page-break-after: avoid; }
  .nv-sources h2 { font-size: 12pt !important; margin: 14pt 0 6pt !important; }

  /* Do not push a tall block to the next page and leave a gap behind it; keep only small blocks whole */
  #view-results * { break-inside: auto !important; page-break-inside: auto !important; }
  #view-results tr, #view-results li, #view-results canvas, #view-results img, #view-results svg,
  .score-hero, .score-card, .score-hero-container, .hero-block, .apa-citation-box, .metric-card, .nv-print-answers tr { break-inside: avoid !important; page-break-inside: avoid !important; }
  #view-results canvas, #view-results svg { max-width: 100% !important; max-height: 85mm !important; height: auto !important; }

  /* Tables */
  #view-results table, .nv-print-only table { width: 100% !important; border-collapse: collapse; font-size: 9.5pt; }
  #view-results th, #view-results td, .nv-print-only th, .nv-print-only td { border: 1px solid #c8cad4; padding: 4pt 6pt; text-align: left; vertical-align: top; }

  /* Report header and closing lines added by nv-tools-print.js */
  .nv-print-only { display: block !important; }
  .nv-print-head { border-bottom: 2px solid #111; padding-bottom: 8pt; margin-bottom: 12pt; }
  .nv-print-top { display: flex !important; justify-content: space-between; align-items: center; gap: 12pt; border-bottom: 1px solid #b9bcc8; padding-bottom: 7pt; margin-bottom: 9pt; }
  .nv-print-logo { display: block !important; height: 14mm !important; width: auto !important; max-width: 60mm; }
  .nv-print-site { font-size: 8.5pt; text-align: right; line-height: 1.35; }
  .nv-print-site a { font-weight: 700; text-decoration: none; }
  .nv-print-brand { font-size: 8.5pt; letter-spacing: .08em; text-transform: uppercase; }
  .nv-print-head h1 { font-size: 18pt !important; line-height: 1.2; margin: 3pt 0 4pt !important; }
  .nv-print-meta { font-size: 9.5pt; }
  .nv-print-section { margin-top: 16pt; }
  .nv-print-section h2 { font-size: 12pt !important; margin: 0 0 6pt !important; }
  .nv-print-note { font-size: 9.5pt; border: 1px solid #b9bcc8; padding: 7pt 9pt; margin-top: 14pt; }
  .nv-print-note p { margin: 0 0 4pt; }
  .nv-print-end { font-size: 8.5pt; margin-top: 14pt; border-top: 1px solid #b9bcc8; padding-top: 6pt; }
  .nv-print-answers table { font-size: 9pt; }
  .nv-print-answers td, .nv-print-answers th { padding: 2.5pt 5pt !important; }
  .nv-print-answers td:first-child { width: 6%; }
  .nv-print-answers td:nth-child(2) { width: 62%; }
}
