/* ============================================================
 * fdrp.liviu.ai — Print Stylesheet
 * ============================================================ */

@media print {
  /* --- Base --- */
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html {
    font-size: 11pt;
  }

  body {
    font-family: 'IBM Plex Sans', 'Georgia', serif;
    line-height: 1.5;
    padding: 0;
    margin: 0;
    padding-top: 0 !important;
  }

  /* --- Hide navigation and footer --- */
  .site-nav,
  .site-footer,
  .nav-toggle,
  .skip-link,
  .cta-paper,
  .cta-secondary,
  .copy-btn,
  .bibtex-block .copy-btn,
  [role="navigation"] {
    display: none !important;
  }

  /* --- Typography --- */
  h1 {
    font-size: 18pt;
    color: #000 !important;
    page-break-after: avoid;
  }

  h2 {
    font-size: 14pt;
    page-break-after: avoid;
  }

  h3 {
    font-size: 10pt;
    page-break-after: avoid;
  }

  p, li, dd {
    orphans: 3;
    widows: 3;
  }

  /* --- Links: show URL --- */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    font-weight: normal;
    color: #444 !important;
  }

  /* Don't show URL for anchor links or JS links */
  a[href^="#"]::after,
  a[href^="javascript"]::after,
  .nav-links a::after,
  .breadcrumb a::after {
    content: none;
  }

  /* --- Layout --- */
  .container {
    max-width: 100%;
    padding: 0;
  }

  /* --- Cards: flatten --- */
  .card {
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  /* --- Tables --- */
  .comparison-table {
    border: 1px solid #999 !important;
  }

  .comparison-table th {
    border-bottom: 2px solid #000 !important;
  }

  .comparison-table td {
    border-bottom: 1px solid #ccc !important;
  }

  table {
    page-break-inside: avoid;
  }

  /* --- Code blocks --- */
  pre, .bibtex-block {
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  code {
    border: 1px solid #ddd !important;
  }

  /* --- Severity badges: keep color --- */
  .severity-critical { color: #c00 !important; }
  .severity-high { color: #c60 !important; }
  .severity-medium { color: #a80 !important; }
  .severity-low { color: #070 !important; }

  /* --- Retraction notice --- */
  .retraction-notice {
    border-left: 4px solid #a80 !important;
    background: #fffbe6 !important;
  }

  /* --- Readout: black text --- */
  .readout-value {
    font-size: 24pt;
    color: #000 !important;
  }

  /* --- Images --- */
  img, svg {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  /* --- Page break controls --- */
  section {
    page-break-before: auto;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  figure, .card, pre, blockquote, table {
    page-break-inside: avoid;
  }

  /* --- Page margins --- */
  @page {
    margin: 2cm;
  }

  @page :first {
    margin-top: 3cm;
  }
}
