from markdown_pdf import MarkdownPdf, Section
from pathlib import Path

src = Path(r"C:\PKA\Team Inbox\2026-05-19 - Loom - Prospect Dashboard Scoping.md")
dst = src.with_suffix(".pdf")

md = src.read_text(encoding="utf-8")

pdf = MarkdownPdf(toc_level=2)
css = """
body { font-family: 'Segoe UI', Arial, sans-serif; font-size: 11pt; line-height: 1.45; }
h1 { font-size: 22pt; border-bottom: 2px solid #25a354; padding-bottom: 4px; color: #25a354; }
h2 { font-size: 15pt; margin-top: 18pt; color: #e66c50; }
h3 { font-size: 12pt; color: #ffa333; }
table { border-collapse: collapse; width: 100%; margin: 8pt 0; }
th, td { border: 1px solid #cccccc; padding: 5pt 7pt; text-align: left; vertical-align: top; }
th { background: #f2faf5; }
code { background: #f4f4f4; padding: 1pt 3pt; border-radius: 3px; font-family: Consolas, monospace; }
pre { background: #f4f4f4; padding: 8pt; border-radius: 4px; overflow-x: auto; }
hr { border: 0; border-top: 1px solid #dddddd; margin: 12pt 0; }
strong { color: #222; }
"""

pdf.add_section(Section(md, toc=False), user_css=css)
pdf.meta["title"] = "Prospect Dashboard - Scoping Doc"
pdf.meta["author"] = "Loom / PKA"
pdf.save(str(dst))
print(f"WROTE: {dst}")
