EU agrees on $2.1T deal after marathon summit