Militancy mars Afghanistan’s election campaign