/* Soulstice — print. M4's Compass / statement output relies on this file.
   Print hides the app chrome and prints the output document only,
   black on white, with the frame rules removed. */

@media print {
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* The galaxy + CRT canvas never prints. */
  #backdrop { display: none !important; }

  .frame {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    border: 0 !important;
  }

  /* Panels print as plain white, no border or card inset. */
  #screen > * {
    background: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .chrome,
  .chrome__ground,
  .siteheader,
  .sitefooter,
  .skip-link,
  .noscript,
  .modes,
  .resume-list,
  .btn,
  .btn--block,
  .card__form,
  [data-role="ground-toggle"] {
    display: none !important;
  }

  /* The output document region (written by M4) is the only thing that prints. */
  .output-doc {
    display: block;
    color: #000000;
    font-family: var(--font-body);
  }

  .output-doc h1,
  .output-doc h2,
  .card__label {
    font-family: var(--font-display);
    color: #000000;
  }

  a[href]::after { content: ""; }

  .screen { padding: 0; }

  /* ---- M4: the #output document, printed as a single grid-style column ---- */

  @page { margin: 20mm; }

  #output {
    display: block;
    color: #000000;
    background: #ffffff;
  }

  #output .card__label,
  #output .output__actions,
  #output .output__hint,
  #output .output__copied,
  #output .output__fortee,
  #output .llm-kit,
  #output .btn,
  #output .btn--pdf,
  #output .btn--copy {
    display: none !important;
  }

  #output .output-doc {
    display: block;
    max-width: none;
    color: #000000;
    background: #ffffff;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  #output .output-doc h1,
  #output .output-doc h2,
  #output .output-doc h3 {
    font-family: var(--font-display);
    font-weight: 400;
    color: #000000;
    break-after: avoid;
  }
  #output .output-doc h1 { font-size: 18pt; margin: 0 0 12pt; }
  #output .output-doc h2 { font-size: 13.5pt; margin: 18pt 0 6pt; }
  #output .output-doc h3 { font-size: 11.5pt; margin: 12pt 0 4pt; }

  /* Red rules kept, but only as hairlines. */
  #output .output-doc hr {
    border: 0;
    border-top: 0.5pt solid #000000;
    margin: 14pt 0;
  }
  #output .output-doc blockquote {
    margin: 6pt 0;
    padding-left: 8pt;
    border-left: 0.75pt solid var(--red);
    color: #000000;
  }
  #output .output-doc ul,
  #output .output-doc ol { margin: 4pt 0 8pt; padding-left: 16pt; }
  #output .output-doc li { break-inside: avoid; margin: 2pt 0; }
  #output .output-doc p { margin: 4pt 0 8pt; break-inside: avoid; }

  /* The Soulstice footnote: the final block of the document, small and grey.
     Printed once where the text ends, not as a running footer. */
  #output .output-doc__footnote {
    margin-top: 14pt;
    font-size: 8.5pt;
    color: #444444;
    break-inside: avoid;
  }
}
