Resolve [ui.terminal_themes][TERM_PROGRAM] to a registered theme.
Centralizes both the lookup and the misconfiguration warnings, which are logged exactly once per call. Three callers now share that contract: the managed and user TOML tiers and the UI.