First-principles theory of surface magnetocrystalline anisotropy and the diatomic-pair model | Synapse