/* Print-friendly overrides — applied via media="print" in base.html. */

@page {
  margin: 0.75in 0.6in;
}

html, body {
  background: white !important;
  color: black !important;
  font-size: 11pt;
}

/* Hide all on-screen chrome */
.screen-only,
header[class*="sticky"],
footer { display: none !important; }

main { padding: 0 !important; }

.print-doc {
  border: none !important;
  background: white !important;
  padding: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  max-width: none !important;
}

.prose,
.prose * { color: black !important; }

.prose h1, .prose h2, .prose h3, .prose h4 {
  break-after: avoid;
  page-break-after: avoid;
  color: black !important;
}
.prose h2 { margin-top: 1.5em; padding-top: 0.25em; border-top: 1px solid #ccc; }

.prose pre,
.prose .highlight pre,
.prose blockquote,
.prose table,
.prose img,
.prose figure {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Plan print: scalable, page-break-friendly images.
   --img-scale is set inline on .print-doc (default 60%). */
.print-doc { --img-scale: 60%; }
.print-doc .prose img {
  display: block;
  max-width: var(--img-scale) !important;
  height: auto !important;
  margin: 0.5em auto;
}
/* Image exclude toggle: body.plan-no-images hides every content image. */
body.plan-no-images .print-doc .prose img { display: none !important; }
.prose pre {
  background: #f5f5f5 !important;
  color: #111 !important;
  border: 1px solid #ddd;
  font-size: 9.5pt;
}
.prose pre code { color: #111 !important; }
.prose :not(pre) > code {
  background: #f1f1f1 !important;
  color: #b00 !important;
}

/* Print URLs after links so paper readers can find sources */
.prose a {
  color: black !important;
  text-decoration: underline;
}
.prose a[href^="http"]::after,
.prose a[href^="/docs/"]::after {
  content: " (" attr(href) ")";
  font-size: 8.5pt;
  color: #555;
  word-break: break-all;
}

/* Don't duplicate URL for the source-of-truth link in the doc viewer header */
.screen-only a::after { content: none !important; }
