Whatever happens, the UK faces the challenge of rebuilding trust in its strained political system.
The referendum campaign has exposed social divisions that have lain dormant for decades. Politicians have misrepresented statistics and cast doubt on experts. Leave voters in particular seem to have lost faith in practically everything apart from their own common sense.