..."_" if c in bad else c for c in s)
    return out[:180] if len(out) > 180 else out


def looks_english(s: str) -> bool:
    # pragmatische Heuristik (nicht perfekt, aber verhindert "User requests..., AI provides..." etc.)
    t = (s or "").lower()
    markers = ["user requests", "ai provides", "summary of", "health issues", "the user", "provides a"]
    return any(m in t for m in markers)

...