/* Brain of Reese — shared markdown renderer (no external libs, no CDN). * * Extracted from app.js (phase 10) so the chat page and the document * viewer share the exact same escape-first renderer: every character is * HTML-escaped before any markup transform runs, so document (or user) * content can never inject live HTML/XSS. Classic script on purpose: * index.html and document.html load it via a plain relative