The bureaucratic battle to make the Brexit deal work