/* A manual on paper and as a PDF (scripts/make-manual-pdfs.mjs prints each manual page with these rules).
   Light colours on white, no menus or buttons, every answer open, and pictures that stay whole on one page. */

@page { size: A4; margin: 16mm 14mm 18mm; }

@media print {
  :root, :root:not([data-theme="dark"]), :root[data-theme="light"], :root[data-theme="dark"] {
    --bg: #ffffff; --bg-2: #f6f6fb; --bg-3: #ececf6; --border: #d6d6e6;
    --accent: #0c7a50; --accent-lo: rgba(12, 122, 80, .09);
    --violet: #5b3fef; --violet-lo: rgba(91, 63, 239, .08);
    --text: #14141f; --text-2: #34344b; --text-3: #6b6b85;
    color-scheme: light;
  }
  html, body { background: #fff !important; color: #14141f !important; overflow: visible !important; }
  body { font-size: 10.5pt !important; line-height: 1.6 !important; }
  html[lang="hi"] body { font-size: 11pt !important; line-height: 1.75 !important; }

  /* what is only for the screen */
  nav, footer, .docs-sidebar, .mn-toc-m, .manual-switch, .manual-bar, .mn-cta, .mn-btn, .nav-menu, #announce-bar, .announce,
  .skip, [data-install], script, noscript { display: none !important; }
  .print-only { display: block !important; }

  .wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .page-hero { padding: 0 0 8mm !important; text-align: left !important; border-bottom: 2px solid #0c7a50; margin-bottom: 8mm; }
  .page-hero h1 { font-size: 26pt !important; line-height: 1.2 !important; }
  .page-hero p { margin: 4mm 0 0 !important; max-width: none !important; font-size: 12pt !important; color: #34344b !important; }
  .print-only.stamp { margin-top: 4mm; font-size: 9pt; color: #6b6b85; }

  .docs-layout { display: block !important; padding: 0 !important; }
  .docs-content { display: block !important; }
  .doc-section { margin: 0 0 9mm !important; scroll-margin: 0 !important; break-inside: auto; }
  .doc-section h2 { font-size: 17pt !important; margin: 0 0 3mm !important; break-after: avoid; page-break-after: avoid; color: #14141f !important; }
  .doc-section h3 { font-size: 12.5pt !important; margin: 5mm 0 2mm !important; break-after: avoid; page-break-after: avoid; color: #0c7a50 !important; }
  .doc-section p, .doc-section li { color: #2a2a3e !important; orphans: 3; widows: 3; }
  .doc-section ol, .doc-section ul { margin-bottom: 3mm !important; gap: 1.5mm !important; }
  .doc-section strong, .doc-section b { color: #14141f !important; }
  .doc-section code, kbd { background: #f1f1f8 !important; border-color: #cfcfe2 !important; color: #14141f !important; }
  .doc-section a, .doc-section a.link { color: #0c7a50 !important; text-decoration: none !important; }

  .tip { background: #eef8f3 !important; border-left-color: #0c7a50 !important; color: #14141f !important; break-inside: avoid; page-break-inside: avoid; }
  .tip.warn { background: #fff6e6 !important; border-left-color: #e08a00 !important; }
  .mn-quick, .mn-glance, .req div, .mn-recipe { background: #f6f6fb !important; border: 1px solid #d6d6e6 !important; box-shadow: none !important; break-inside: avoid; page-break-inside: avoid; }
  .mn-quick li { background: #fff !important; }
  .mn-quick li::before, .mn-steps li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mn-tag, .soon { border: 1px solid #cfcfe2; }

  /* answers and tables stay open and whole */
  .doc-section details { background: #fff !important; break-inside: avoid; page-break-inside: avoid; }
  .doc-section details > .ans { display: block !important; }
  .doc-section summary { padding: 3mm 4mm !important; min-height: 0 !important; }
  .doc-section summary::after { content: '' !important; }
  .gest-wrap { overflow: visible !important; }
  .kbd-table { font-size: 9.5pt !important; }
  .kbd-table th { background: #ececf6 !important; color: #34344b !important; }
  .kbd-table td { color: #2a2a3e !important; }
  .kbd-table tr { break-inside: avoid; page-break-inside: avoid; }

  /* pictures of the app: small, two or three to a row, never cut in half */
  .mn-fig, .mn-pair, .mn-split { break-inside: avoid; page-break-inside: avoid; }
  .mn-shot, .mn-pic { width: 46mm !important; box-shadow: none !important; border-color: #d6d6e6 !important; }
  .mn-split, .mn-split.left, .mn-tour { grid-template-columns: minmax(0, 1fr) 46mm !important; gap: 6mm !important; }
  .mn-split.left { grid-template-columns: 46mm minmax(0, 1fr) !important; }
  .mn-split .mn-fig { order: 0 !important; }
  .mn-fig figcaption { font-size: 8.5pt !important; max-width: 52mm !important; }
  img { max-width: 100% !important; break-inside: avoid; page-break-inside: avoid; }
}
