Nested ternary operators to format total-score box