);
        } else {
          state.attempts += 1;
          state.streak = 0;
          feedback(`Try again`, false);
          updateStatsUI();
          problemToFocus();
        }
      }

      function nextProblem() {
        els.answer.value = '';
        state.current = generateProblem();
        els.question.textContent = state.current.text;
        problemToFocus();
      }

      function skip() {
        if (!state.running) return;
        state.attempts += 1;
        state.streak = 0;
        s