The Brexit deal unwinds 45 years of EU-UK relations, with provisions for the exit bill, citizens' rights, the Irish border and the transition period