Transfer of power in the Sharaf al‑Dīn imamate (912–980/1506–1573): theory and practice