Prevent Last Visit bar from messing up colors

Isn’t it possible to use a more specific selector here in order to stay in a pure CSS solution?

Can you share a snippet of your current CSS rule?