Inflation rose sharply last month, at a time when Americans were already deeply sour over the cost of living.