How the Republic of Venice chose its Doge: lot-based elections and supermajority rule