UK and EU reach a post-Brexit trade deal in the nick of time