/* Print / PDF styles for the report page.
   Loaded only on report.html — converts the dark Tailwind theme to a clean
   light layout that survives a printer without losing all its content. */

@media print {
  @page { margin: 0.75in; size: letter; }

  /* Ask the browser to actually render background colors we care about. */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    transition: none !important;
    animation: none !important;
  }

  /* White page. */
  html,
  body {
    background: #fff !important;
    color: #1a1a2e !important;
    font-size: 10pt;
  }

  /* Hide chrome that has no business on paper. */
  nav,
  footer,
  .flex.flex-wrap.gap-3 {
    display: none !important;
  }

  #loading { display: none !important; }
  #report  { display: block !important; padding: 0 !important; }

  /* Glassmorphism → clean white card. */
  .glass {
    background: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border: 1px solid #d5d9e0 !important;
  }

  /* Risk banner: light background + thick left rule in the risk color. */
  #risk-banner {
    background: #f9fafb !important;
    border: 1px solid #d5d9e0 !important;
    border-left: 6px solid #94a3b8 !important;
    border-radius: 6px !important;
  }

  #risk-banner[data-risk="LOW"]      { border-left-color: #059669 !important; }
  #risk-banner[data-risk="MEDIUM"]   { border-left-color: #d97706 !important; }
  #risk-banner[data-risk="HIGH"]     { border-left-color: #ea580c !important; }
  #risk-banner[data-risk="CRITICAL"] { border-left-color: #dc2626 !important; }

  /* Risk score / level typography. */
  #risk-score-num   { font-size: 28pt !important; color: #1a1a2e !important; }
  #risk-level-label { font-size: 18pt !important; }
  .gauge-bar { display: none !important; }

  /* Dark bg Tailwind classes used by badges and finding cards. */
  .bg-red-950     { background-color: #fef2f2 !important; }
  .bg-orange-950  { background-color: #fff7ed !important; }
  .bg-amber-950   { background-color: #fffbeb !important; }
  .bg-emerald-950 { background-color: #f0fdf4 !important; }
  .bg-blue-950    { background-color: #eff6ff !important; }

  /* Text colours: dark-on-white equivalents. */
  .text-white,
  .text-slate-200,
  .text-slate-300 { color: #1a1a2e !important; }

  .text-muted       { color: #555 !important; }
  .text-red-400     { color: #991b1b !important; }
  .text-orange-400  { color: #9a3412 !important; }
  .text-amber-400   { color: #78350f !important; }
  .text-emerald-400 { color: #065f46 !important; }
  .text-blue-400    { color: #1e3a8a !important; }

  /* Section headings. */
  h2 {
    color: #1a1a2e !important;
    border-bottom: 1.5px solid #e0e4ea !important;
    padding-bottom: 6px !important;
    margin-bottom: 12px !important;
  }

  /* Expand <details> — JS does open=true; this ensures the content div shows. */
  details > div { display: block !important; }
  summary svg   { display: none !important; }

  /* Posture grid: neutral backgrounds. */
  #posture-grid > div {
    background: #f8f9fa !important;
    border: 1px solid #e0e4ea !important;
  }

  /* Mono text. */
  .font-mono { font-size: 9pt !important; }

  /* Page-break hints. */
  section,
  .glass { page-break-inside: avoid; }
}
