Set new logic for the cern_level color variable
Now that the logic is slightly more complex, the conditions for each color were pulled out into a single place in the report.
{% if ((prob_inf > 10) or (expected_new_cases >= 1)) %} {% set cern_level = 'red' %}
{% elif (2 <= prob_inf <= 10) %} {% set cern_level = 'orange' %}
{% else %} {% set cern_level = 'green' %}
{% endif %}
Then we use these in each of the needed cases.