/* Cross Domain Reasoning Repository - Print Stylesheet */

@media print {
  @page {
    margin: 2cm 2cm 2.5cm 2cm;
    size: letter;
  }

  *, *::before, *::after {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-family: "Charter", "Bitstream Charter", "Times New Roman", Times, serif;
    font-size: 10.5pt;
    line-height: 1.5;
    background: #ffffff;
    color: #000000;
  }

  /* Hide interactive / non-printable UI elements and top tags */
  .site-header,
  .site-footer,
  .paper-sidebar,
  .reading-progress-container,
  .theme-toggle-btn,
  .sidebar-actions,
  .copy-btn,
  .filter-bar,
  .topic-filters,
  .toast,
  .paper-meta-top,
  .paper-badge-row,
  .badge,
  .brand-tag,
  .no-print {
    display: none !important;
  }

  .paper-wrapper {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .paper-content {
    max-width: 100% !important;
    font-size: 10.5pt !important;
  }

  /* Academic Title formatting */
  .paper-header {
    text-align: center;
    border-bottom: 2pt solid #000000;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .paper-headline {
    font-size: 18pt !important;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.25;
  }

  .paper-authors-block {
    justify-content: center;
    gap: 2rem;
    margin-bottom: 0.75rem;
  }

  .author-name {
    font-size: 11pt;
    font-weight: bold;
  }

  .author-affiliation {
    font-size: 9.5pt;
    font-style: italic;
  }

  .paper-info-bar {
    border: 1pt solid #666666;
    justify-content: center;
    font-size: 8.5pt;
    margin-top: 0.75rem;
    padding: 0.4rem;
  }

  /* Abstract */
  .paper-abstract-box {
    border: 1pt solid #000000 !important;
    border-left: 3pt solid #000000 !important;
    padding: 1rem;
    margin: 1.5rem 0;
    page-break-inside: avoid;
  }

  .abstract-title {
    font-size: 9pt;
    font-weight: bold;
  }

  .abstract-text {
    font-size: 9.5pt;
  }

  /* Headings */
  h1, h2, h3, h4 {
    page-break-after: avoid;
    break-after: avoid;
    color: #000000;
  }

  h2 {
    font-size: 13pt;
    border-bottom: 1pt solid #000000;
    margin-top: 2rem;
  }

  h3 {
    font-size: 11.5pt;
    margin-top: 1.5rem;
  }

  h4 {
    font-size: 10.5pt;
    margin-top: 1rem;
  }

  /* Tables & Figures */
  .table-container, .paper-table, .figure-box, .algorithm-block, .callout {
    page-break-inside: avoid;
    break-inside: avoid;
    border: 1pt solid #333333 !important;
  }

  .paper-table {
    border-collapse: collapse;
    font-size: 8.5pt;
  }

  .paper-table th {
    border-bottom: 1.5pt solid #000000 !important;
    font-weight: bold;
  }

  .paper-table td {
    border-bottom: 0.5pt solid #999999 !important;
  }

  .paper-table tbody tr:last-child td {
    border-bottom: 1.5pt solid #000000 !important;
  }

  /* Math display */
  .math-block {
    page-break-inside: avoid;
    break-inside: avoid;
    border: none !important;
    padding: 0.5rem 0;
  }

  /* Code blocks */
  .code-block-container {
    page-break-inside: avoid;
    break-inside: avoid;
    border: 1pt solid #666666 !important;
  }

  pre {
    font-size: 8pt !important;
    line-height: 1.35 !important;
    white-space: pre-wrap;
    word-break: break-all;
  }

  code {
    border: none;
    font-size: 8.5pt;
  }

  /* Links & references */
  a {
    text-decoration: none;
  }

  .citation-link {
    font-weight: bold;
  }

  .ref-item {
    page-break-inside: avoid;
  }
}

