Lawyers gear up for Brexit battle