/* ==========================================================================
   Print - the final review sheet doubles as the official grade report.
   Everything that is not the report is removed so Ctrl+P produces a clean,
   paginated document with no app chrome.
   ========================================================================== */

@media print {
  @page {
    size: A4 portrait;
    margin: 14mm 12mm;
  }

  :root {
    --c-paper: #ffffff;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000;
    font-size: 10.5pt;
  }

  .app-header,
  .rail,
  .commandbar,
  .stagebar,
  .stage__head,
  .app-footer,
  .toast-region,
  .modal-backdrop,
  .no-print,
  .stage:not([data-printable="true"]) {
    display: none !important;
  }

  .main {
    padding: 0 !important;
    max-width: none !important;
  }

  .app {
    display: block !important;
    background: #ffffff !important;
  }

  .frame {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .shell {
    max-width: none;
    padding: 0 !important;
  }

  .sheet {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .sheet__masthead {
    background: #0e121b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 7mm 7mm 0 !important;
    border-radius: 0 !important;
  }

  .sheet__main {
    padding: 6mm 6mm 6mm 0 !important;
  }

  .sheet__body {
    grid-template-columns: minmax(0, 1fr) 62mm !important;
  }

  .sheet__aside {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .stamp,
  .checklist--verify .checklist__item,
  .sheet__note,
  .receipt {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .receipt {
    display: none !important;
  }

  .sheet__chart,
  .sheet__note,
  .checklist--verify {
    break-inside: avoid;
  }

  .sheet__foot {
    padding: 4mm 6mm !important;
    background: #f3f5f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* The report is a document, not an interface: the actions are not part of it. */
  .no-print-actions,
  .no-print-actions .cluster {
    display: none !important;
  }

  .panel,
  .table-wrap,
  .notice {
    box-shadow: none !important;
    border-color: #c8cedb !important;
    break-inside: avoid;
  }

  .table-scroll {
    max-height: none !important;
    overflow: visible !important;
  }

  table.data thead th {
    position: static !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  table.data tbody tr {
    break-inside: avoid;
  }

  .stats,
  .metric-row {
    break-inside: avoid;
  }

  .chart {
    break-inside: avoid;
  }

  a {
    color: #000000;
    text-decoration: none;
  }

  .grade-chip,
  .badge,
  .chart__band {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
