/* Markdown to PDF: how a document looks, in the page's live preview and in the PDF (free_tools/markdown_pdf.py inlines this file).
   Everything is scoped to .md-doc so the site's own styles don't leak in or out. Themes: .theme-clean (default), .theme-github, .theme-serif. */
.md-doc {
    --text: #1f2328; --muted: #59636e; --line: #d1d9e0; --soft: #f6f8fa; --link: #0969da; --accent: #3c50e0;
    --body-font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", "Noto Sans", "WenQuanYi Zen Hei", "IPAGothic", sans-serif, "Noto Color Emoji";
    --heading-font: var(--body-font);
    --mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
    color: var(--text); background: #fff; font-family: var(--body-font); font-size: 11pt; line-height: 1.6;
    overflow-wrap: break-word; word-wrap: break-word;
}
.md-doc.theme-github { --heading-font: var(--body-font); font-size: 10.5pt; }
.md-doc.theme-serif {
    --body-font: Georgia, "Times New Roman", "Liberation Serif", "DejaVu Serif", "Noto Serif", "WenQuanYi Zen Hei", serif, "Noto Color Emoji";
    --heading-font: var(--body-font); --link: #1a4d8f; font-size: 11.5pt; line-height: 1.65;
}
.md-doc > :first-child { margin-top: 0 !important; }
.md-doc h1, .md-doc h2, .md-doc h3, .md-doc h4, .md-doc h5, .md-doc h6 {
    font-family: var(--heading-font); font-weight: 600; line-height: 1.25; margin: 1.5em 0 0.6em; color: var(--text);
    break-after: avoid; page-break-after: avoid;
}
.md-doc h1 { font-size: 2em; }
.md-doc h2 { font-size: 1.5em; }
.md-doc h3 { font-size: 1.25em; }
.md-doc h4 { font-size: 1em; }
.md-doc h5 { font-size: 0.875em; }
.md-doc h6 { font-size: 0.85em; color: var(--muted); }
.md-doc.theme-github h1, .md-doc.theme-github h2 { padding-bottom: 0.3em; border-bottom: 1px solid var(--line); }
.md-doc.theme-clean h1 { font-size: 2.1em; letter-spacing: -0.01em; }
.md-doc.theme-serif h1, .md-doc.theme-serif h2 { font-weight: 700; }
.md-doc p, .md-doc ul, .md-doc ol, .md-doc blockquote, .md-doc table, .md-doc pre, .md-doc dl { margin: 0 0 1em; }
.md-doc ul, .md-doc ol { padding-left: 2em; }
.md-doc ul { list-style: disc; }
.md-doc ol { list-style: decimal; }
.md-doc ul ul { list-style: circle; }
.md-doc ul ul ul { list-style: square; }
.md-doc li { margin: 0.25em 0; }
.md-doc li > p { margin: 0.25em 0; }
.md-doc li > ul, .md-doc li > ol { margin: 0.25em 0 0; }
.md-doc li:has(> input[type="checkbox"]) { list-style: none; }
.md-doc li > input[type="checkbox"] { margin: 0 0.4em 0 -1.4em; vertical-align: middle; }
.md-doc a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.md-doc strong { font-weight: 600; }
.md-doc em { font-style: italic; }
.md-doc del { text-decoration: line-through; }
.md-doc hr { height: 0; border: 0; border-top: 1px solid var(--line); margin: 1.75em 0; }
.md-doc blockquote { padding: 0 1em; color: var(--muted); border-left: 0.25em solid var(--line); }
.md-doc.theme-clean blockquote { border-left-color: var(--accent); }
.md-doc img { max-width: 100%; height: auto; break-inside: avoid; }
.md-doc code {
    font-family: var(--mono-font); font-size: 0.85em; padding: 0.15em 0.35em; border-radius: 4px; background: var(--soft);
}
.md-doc pre {
    font-family: var(--mono-font); font-size: 0.85em; line-height: 1.45; padding: 0.9em 1em; border-radius: 6px;
    background: var(--soft); border: 1px solid #e6eaef; white-space: pre-wrap; overflow-wrap: anywhere;
}
.md-doc pre code { padding: 0; background: transparent; font-size: 1em; border-radius: 0; }
.md-doc table { border-collapse: collapse; width: auto; max-width: 100%; display: table; font-size: 0.95em; }
.md-doc th, .md-doc td { border: 1px solid var(--line); padding: 0.4em 0.75em; text-align: left; vertical-align: top; }
.md-doc th { font-weight: 600; background: var(--soft); }
.md-doc tr { break-inside: avoid; page-break-inside: avoid; }
.md-doc thead { display: table-header-group; }
.md-doc sup, .md-doc sub { font-size: 0.75em; }
@media print {
    .md-doc pre, .md-doc blockquote { break-inside: avoid; }
}
