Where each party made gains — and suffered losses — across the country