A local, deterministic pipeline that reconstructs useful Markdown document structure from lossy sources.