/* Print: branded header on every printed page (results, answer sheets). */
@media print {
  @page { margin: 14mm 12mm; }

  html, html[lang="bn"] { font-size: 90%; }
  body { background: var(--white); }
  .topbar, .demo-bar, .site-footer, #toast-root, .no-print, .btn, .toolbar { display: none !important; }
  .container { max-width: none; padding: 0; }
  .card, .stats, .q-item { break-inside: avoid; }

  .print-header {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding-bottom: var(--s-2);
    margin-bottom: var(--s-4);
    border-bottom: 2px solid var(--c-accent-line);
  }
  .print-header img { height: 2.75rem; width: auto; }
  .print-header-name { font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--c-primary); line-height: 1.2; }
  .print-header-meta { font-size: var(--text-xs); color: var(--c-muted); }

  /* Result PDF: the logo as a faint watermark behind the page (step 6). */
  .watermark { display: flex; position: fixed; inset: 0; align-items: center; justify-content: center; pointer-events: none; z-index: 0; }
  .watermark-img { width: 60%; max-width: 14cm; height: auto; opacity: .07; }
  .result-page > *:not(.watermark) { position: relative; z-index: 1; }

  /* Keep brand colours when printing. */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
