Her advisers were confident of that victory until the moment late on the night of the election when their path to 270 electoral votes had been finally blocked by Trump’s breaching of the “blue wall” in the Northern industrial states.