/* dreamlab print stylesheet — invoked only when printing */
@media print {
  /* Reset to high contrast for paper */
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  /* Kill the grain overlay and any decorative overlays */
  body::after,
  body::before {
    display: none !important;
  }

  /* Strip site chrome and interactive widgets */
  .back, .nav-back, .brand,
  .footer, .footer-nav, .footer-year, .footer-rule, .footer-appt, .footer-cta,
  .book-cta, .book-cta-section, .hub-cta, .footer-book, .header-book,
  .reactions, .reaction, .condition-toggle, .condition-btn,
  .research-prompt, .name-prompt,
  .thesis-mobile-cta,
  .hero-scroll, .pairs-with,
  dreamlab-disclaimer,
  #rootGraph,
  .toggle-bar {
    display: none !important;
  }

  /* Make sure the on-page disclaimer (if inline) prints as a clear sidebar note */
  .disclaimer {
    color: #555 !important;
    border-left: 2px solid #999 !important;
    background: #f5f5f0 !important;
    padding: 0.5rem 0.75rem !important;
    page-break-inside: avoid;
  }

  /* Headings darker, smaller */
  h1, h2, h3, h4 {
    color: #000 !important;
    page-break-after: avoid;
  }
  h1 { font-size: 22pt; }
  h2 { font-size: 16pt; }
  h3 { font-size: 13pt; }

  /* Links — show the URL after each one for paper readers */
  a[href]:not([href^="#"]):not([href^="javascript:"])::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #444;
    word-break: break-all;
  }
  a {
    color: #000 !important;
    text-decoration: underline !important;
    border-bottom: 0 !important;
  }

  /* Make body text readable */
  .section-text, .item-detail, .pillar-desc, .card-desc,
  .intro, .intro-detail, .thesis-body, .thesis-heading {
    color: #222 !important;
    font-size: 11pt !important;
    line-height: 1.55 !important;
  }

  /* Italic / accent labels */
  .section-label, .card-label, .item-meta, .founders-label,
  .thesis-label, .pillars-heading {
    color: #555 !important;
  }

  /* Citation blocks — keep tight + on one page when possible */
  .references li, .citation, .cite-meta, .mech-card {
    page-break-inside: avoid;
  }

  /* Force page break before major top-level sections to avoid splits */
  .pillars, section.about, .book-cta-section, .footer {
    page-break-before: auto;
  }

  /* Tables/grids: don't try to maintain dark-mode grids on paper */
  .pillars-grid, .chooser-grid, .thesis-grid, .pillar {
    background: transparent !important;
    border: none !important;
    display: block !important;
  }

  .pillar {
    padding: 0 0 1rem 0 !important;
    border-bottom: 1px solid #ddd !important;
    margin-bottom: 1rem;
  }

  /* Citation metadata sidebar — keep visible but neutral */
  .cite-meta {
    color: #666 !important;
    font-size: 8pt !important;
  }
}
