In a juvenile court proceeding involving the issue of fitness to proceed or criminal responsibility, the court shall determine whether the child: 1. Is fit to proceed in accordance with title 27; and 2. Lacked criminal responsibility for the commission of an offense in accordance with chapter 12.1-04.1.