/* ════════════════════════════════════════════════════════════════
   MDLab — print / PDF stylesheet.
   Loaded by the Python export service (Playwright) when printing the
   rendered HTML to PDF, and by the browser for Ctrl+P.
   ════════════════════════════════════════════════════════════════ */
@page {
  size: A4;
  margin: 18mm 16mm 20mm;
}

@media print {
  html, body { background: #fff !important; }
  /* Hide app chrome if the live app is printed directly */
  .topbar, .sidebar, .tabbar, .drop-overlay, .toasts, .busy, .sidebar-tabs { display: none !important; }
  .pane + .pane { border: none; }
}

/* The export service renders only a .md block inside .doc-view; these rules
   apply in both print media and the standalone export document. */
.export-doc {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #1e293b;
  font-size: 11pt;
  line-height: 1.55;
}
.export-doc .md h1, .export-doc .md h2, .export-doc .md h3 { color: #1a3a5c; }

/* Avoid awkward breaks */
.md h1, .md h2, .md h3, .md h4 { break-after: avoid; page-break-after: avoid; }
.md pre, .md table, .md blockquote, .md .mermaid, .md img { break-inside: avoid; page-break-inside: avoid; }
.md pre { white-space: pre-wrap; word-wrap: break-word; }  /* wrap long code so nothing is clipped in PDF */
.md a { color: #2d6ca3; text-decoration: none; }

/* Brand footer band for the PDF first page */
.export-header {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 2px solid #4a90c4; padding-bottom: 8px; margin-bottom: 18px;
}
.export-header .ttl { font-weight: 800; color: #1a3a5c; font-size: 14pt; }
.export-header .by { margin-left: auto; font-family: 'Space Mono', monospace; font-size: 8pt; color: #64748b; letter-spacing: 1px; }
