Tens of millions of Americans voted in elections seen as a referendum on Donald Trump’s presidency amid anger over surging petrol prices, tariffs and the Iran war. Early results showed a significant swing toward Democrats, including in places where they did not win.