If the code is correct but not working for you check to see if your web browser has any add blockers or dark modes enabled as these will cause problems for the tests.
On the latest image I see you have put the background:red; below the background:var(--red-color);
You need to swap them around so background:red; is above.
If it doesn’t work do you have a different browser you could try it on?