/* ==========================================================================
   Resume builder — print stylesheet.
   Printing this page outputs ONLY the resume: black on white, A4,
   regardless of the site theme the visitor is using on screen.
   ========================================================================== */

@media print {
  @page {
    size: A4;
    margin: 18mm;
  }

  /* Hide everything, then walk the ancestor chain of the preview back
     into visibility. Avoids depending on any particular DOM depth. */
  body * { visibility: hidden !important; }

  #resume-preview,
  #resume-preview * { visibility: visible !important; }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.4;
  }

  #resume-preview {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    box-shadow: none !important;
  }

  #resume-preview h2 {
    font-size: 20pt;
    color: #000 !important;
    margin-bottom: 2pt;
  }

  #resume-preview .r-contact {
    font-size: 9pt;
    color: #000 !important;
    margin-bottom: 10pt;
  }

  #resume-preview h3 {
    font-size: 9pt;
    color: #000 !important;
    border-bottom: 0.5pt solid #000 !important;
    padding-bottom: 2pt;
    margin: 12pt 0 6pt;
    page-break-after: avoid;
  }

  #resume-preview .r-meta { color: #000 !important; font-size: 9.5pt; }
  #resume-preview .r-entry { page-break-inside: avoid; }
  #resume-preview .r-empty { display: none !important; }

  /* Chrome that must never reach paper. */
  .site-header,
  .site-footer,
  .builder-tabs,
  .builder-actions,
  .builder-form,
  .builder-footer,
  .builder-note,
  .fab-wrap,
  .nl-card,
  .scroll-progress,
  .skip-link,
  noscript { display: none !important; }
}
