  We develop a framework for obtaining linear programming bounds for spherical
codes whose inner products belong to a prescribed subinterval $[\ell,s]$ of
$[-1,1)$. An intricate relationship between Levenshtein-type upper bounds on
cardinality of codes with inner products in $[\ell,s]$ and lower bounds on the
potential energy (for absolutely monotone interactions) for codes with inner
products in $[\ell,1)$ (when the cardinality of the code is kept fixed) is
revealed and explained. Thereby, we obtain a new extension of Levenshtein
bounds for such codes. The universality of our bounds is exhibited by a unified
derivation and their validity for a wide range of codes and potential
functions.
