Interest margins recover for largest US mortgage provider as costs fall