/* Print stylesheet — SRS §13.3 / §6.5.2 #10.
   Loaded via <link media="print"> in layouts/app.blade.php, so this
   stylesheet is only fetched/applied when the user actually prints.

   Goals:
   1. Hide chrome (TANIA brand bar, theme picker, footer, "Back to dashboard"
      button, the print button itself).
   2. Expand the improvement-plan box from a scrolling region to fully
      visible — every page of the narrative must appear in the PDF.
   3. Force a clean, ink-friendly background. */

@media print {
  /* 0. Kill the animated grid + aurora backdrop — costs ink, prints as a mess. */
  body::before,
  body::after { display: none !important; }

  /* 1. Chrome we never want on paper. */
  .tania-nav,
  .tania-header,
  .theme-picker,
  .tania-footer,
  footer,
  .page-bar,
  .back-link,
  .results-actions,
  button {
    display: none !important;
  }

  /* Identity strip + cat-panels: keep, but neutralize colors for ink. */
  .results-identity,
  .cat-panel,
  .hero-results {
    background: #fff !important;
    border: 1pt solid #000 !important;
    box-shadow: none !important;
    color: #000 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .results-identity .lbl,
  .cat-panel .summary,
  .hero-results .tier .desc { color: #333 !important; }
  .results-identity .val,
  .cat-panel-head .name,
  .hero-results .tier .val,
  .cat-panel ul li { color: #000 !important; }
  .hero-results .overall .val { color: #000 !important; }
  .cat-panel::before { background: #000 !important; }
  .hero-results .tier .chip { border-color: #000 !important; color: #000 !important; background: #fff !important; }
  .cat-panels { display: block !important; }
  .cat-panel { margin: 0 0 10pt !important; }

  /* 2. Plan box: drop the fixed height + scroll affordance. */
  .plan,
  .plan[tabindex] {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .plan-note {
    display: none !important;
  }

  /* 3. Page-level reset for print. */
  html, body {
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11pt !important;
  }

  .tania-container {
    max-width: none !important;
    margin: 0 !important;
    padding: 0.4in 0.5in !important;
  }

  /* Section headings + cards: dim chrome, keep the structure. */
  .section-head {
    border-top: 1pt solid #000 !important;
    margin-top: 12pt !important;
    padding-top: 6pt !important;
    font-weight: 600 !important;
  }
  .panel,
  .cats,
  section.panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* Category cards: keep score blocks, skip the gradient bar. */
  .cat .bar {
    border: 0.5pt solid #000 !important;
    background: #fff !important;
  }
  .cat .bar span {
    background: #000 !important;
  }

  /* Radar canvas: print at native size, avoid mid-canvas page breaks. */
  #employee-radar {
    page-break-inside: avoid;
    break-inside: avoid;
    max-width: 4in;
    height: auto;
  }

  /* Avoid orphan section headings. */
  h2, h3, h4 {
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Lists shouldn't split across pages mid-item. */
  li {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Hide hyperlinks' URL appendix that some browsers add. */
  a[href]::after {
    content: "" !important;
  }
}
