/* ─── Print styles (used by all view pages) ───────────────────────────── */
@media print {
  /* Theme vars drive most of app.css/markdown.css, so flipping them to
     light values here makes the printed page readable without having to
     re-override every rule that reads var(--text)/var(--surface)/etc. */
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface2: #f2f2f2;
    --text: #111;
    --text-muted: #444;
    --border: #999;
  }

  nav, .md-header, .pdf-header, .no-print,
  .analysis-section, .notes-display-section, .notes-editor-section {
    display: none !important;
  }

  .md-body {
    border: none;
    box-shadow: none;
    padding: 0.5rem 0;
  }
  .md-body h1 { page-break-after: avoid; }
  .md-body h1:first-of-type + blockquote { display: none !important; }
  .md-body pre { page-break-inside: avoid; }

  /* Code blocks use hardcoded dark colors (not theme vars) — flatten them
     to plain dark-on-light instead of trying to preserve syntax colors. */
  .md-body code,
  .md-body pre, .md-body pre *,
  .code-highlight, .code-highlight * {
    background: #f2f2f2 !important;
    color: #111 !important;
  }
}
