EU countries seal hard-line deal on Ukrainian grain, raising possibility of tariffs