How Spain (Narrowly) Became a Democracy