/* Print styles for long‑form guides */
@page {
  margin: 12mm 15mm;
}

/* Force light color scheme for print */
:root { color-scheme: light only; }

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

body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12pt;
  line-height: 1.5;
}

/* Basic spacing rhythm */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  margin-block: 0.8em 0.4em;
}
p, ul, ol, dl, blockquote, pre {
  margin-block: 0.6em 0.9em;
}
li {
  margin-block: 0.25em;
}

/* Remove decorative effects */
* {
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Links: show URL after text */
a, a:visited { color: #000 !important; text-decoration: underline; }
/* Show URLs inline for external/mail links only (nav is hidden) */
a[href^="http"]::after,
a[href^="mailto:"]::after {
  content: " (" attr(href) ")";
  font-size: 10pt;
  color: #444;
}

/* Hide navigation and non-content UI */
header, nav, .nav-toggle,
.site-search, form[role="search"],
.skip-link, .footer-nav,
footer, #site-footer,
.breadcrumbs, .toc, .toc-label,
.cta-row, .toast, .sw-toast, .sw-update-toast,
.site-announce {
  display: none !important;
}

/* Avoid printing interactive controls */
button, input, select, textarea { display: none !important; }

/* Content width and images */
.container, main, article, section { max-width: none !important; }
img, svg, video, canvas { max-width: 100% !important; height: auto !important; }
figure { break-inside: avoid; page-break-inside: avoid; margin: 0; }
figcaption { font-size: 10pt; color: #444; }

/* Code and preformatted content should wrap */
pre, code {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-wrap: anywhere;
}

/* Pagination hints for better page breaks */
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; break-after: avoid; }
/* Keep first content with its heading */
:is(h1,h2,h3,h4,h5,h6) + :is(p,ul,ol,dl,table,pre,blockquote) { page-break-before: avoid; break-before: avoid; }
img, table, pre, code, blockquote { page-break-inside: avoid; break-inside: avoid; }
table { width: 100%; table-layout: fixed; }
thead, tbody, tfoot, tr, th, td { page-break-inside: avoid; break-inside: avoid; }
td, th { word-break: break-word; }
article, section, .card { break-inside: avoid; page-break-inside: avoid; }

/* Avoid breaking lists and list items across pages */
ul, ol { page-break-inside: avoid; break-inside: avoid; }
li, .card li { page-break-inside: avoid; break-inside: avoid; }

/* Reduce widows/orphans for better readability */
p, li, blockquote, caption { orphans: 3; widows: 3; }

/* Hide tiny in-page anchors and back-to-top links */
.heading-anchor, .back-to-top { display: none !important; }
