/* ============================================================
   MML-U Brand Kit · print.css
   For HTML -> PDF rendering of the program page, curriculum
   sheet, and program narrative (Stage 2 PDF lane).

   Inherited from parent print conventions where applicable;
   adapted for academic catalog density.
   ============================================================ */

@page {
  size: Letter;
  margin: 0.75in 0.75in 0.85in 0.75in;
}

@media print {
  /* Webfont print fallback — Manrope -> sans-serif, IBM Plex Mono -> monospace */
  body {
    background: #fff !important;
    color: #000 !important;
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  /* Hide screen-only chrome */
  .mmlu-skip-list,
  .mmlu-sidebar,
  .mmlu-tabs,
  .mmlu-sidebar__print,
  .mmlu-sidebar__search { display: none !important; }

  /* Single-column flow */
  .mmlu-layout {
    display: block;
    max-width: none;
    padding: 0;
  }
  .mmlu-content {
    padding: 0;
  }

  /* Show all tab panels — labelled, sequential */
  .mmlu-tabpanel {
    display: block !important;
    page-break-inside: avoid;
    margin-bottom: 18pt;
  }
  .mmlu-tabpanel + .mmlu-tabpanel {
    page-break-before: always;
  }
  .mmlu-tabpanel::before {
    content: attr(data-label);
    display: block;
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-size: 16pt;
    margin-bottom: 10pt;
    color: #000;
    border-bottom: 1.5pt solid #0E6A3D;
    padding-bottom: 4pt;
  }

  /* Header — print as a clean strip */
  .mmlu-header {
    border-bottom: 1pt solid #000;
    margin-bottom: 12pt;
    background: #fff !important;
  }
  .mmlu-header__strip {
    height: 3pt;
    background: #0E6A3D !important;
    -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
  }
  .mmlu-header__inner {
    max-width: none;
    padding: 8pt 0;
  }

  /* Breadcrumb in print: small caption above the title */
  .mmlu-breadcrumb {
    background: transparent !important;
    border: 0;
  }
  .mmlu-breadcrumb__inner {
    max-width: none;
    padding: 0 0 6pt 0;
    font-size: 8pt;
    color: #444;
  }

  /* Headings */
  h1 { font-size: 20pt; line-height: 1.2; margin: 0 0 6pt 0; }
  h2 { font-size: 14pt; line-height: 1.25; margin: 12pt 0 6pt 0; }
  h3 { font-size: 11pt; line-height: 1.3; margin: 8pt 0 4pt 0; }

  /* Tables: strict avoid-break-inside, show borders */
  table { page-break-inside: avoid; border-collapse: collapse; width: 100%; }
  thead { display: table-header-group; }
  tr, td, th { page-break-inside: avoid; }

  .mmlu-course-table th,
  .mmlu-course-table td {
    border-bottom: 0.5pt solid #999;
    padding: 4pt 6pt;
  }
  .mmlu-course-table caption {
    border-bottom: 1.5pt solid #0E6A3D;
    padding: 8pt 0 4pt 0;
    -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
  }
  .mmlu-course-table thead th {
    background: #f2f3f2 !important;
    -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
  }
  .mmlu-course-table .row-total td {
    border-top: 1pt solid #000;
    border-bottom: 1pt solid #000;
    background: #f2f3f2 !important;
  }

  .mmlu-plan th,
  .mmlu-plan td { border: 0.5pt solid #999; padding: 4pt 6pt; }
  .mmlu-plan thead th,
  .mmlu-plan .year-label,
  .mmlu-plan .term-summary {
    background: #f2f3f2 !important;
    -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
  }
  .mmlu-plan tfoot td {
    background: #000 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
  }

  /* Links: keep underline but suppress URL annotations */
  a { color: #0E6A3D !important; text-decoration: underline; }
  a[href]::after { content: ""; }

  /* Footer: keep as last block; no fancy alignment */
  .mmlu-footer {
    border-top: 1pt solid #999;
    background: transparent !important;
    margin-top: 18pt;
  }
  .mmlu-footer__inner {
    padding: 8pt 0;
    color: #444;
    font-size: 9pt;
  }

  /* Avoid orphan/widow on prose */
  p, li { orphans: 3; widows: 3; }
}
