"""Typewriter text animation used by the Synthesize stage.""" import html as _html def typewriter_html(text: str, label: str = "Step 4 \u00b7 Synthesize") -> str: """Render text that reveals itself via a CSS clip-path sweep.""" escaped = _html.escape(text).replace("\n\n", "

").replace("\n", "
") char_count = max(1, len(text)) duration = max(2500, char_count * 22) return f"""
{_html.escape(label)}

The AI stitches an answer from what it found.

{escaped}
"""