https://css-tricks.com/the-checkbox-hack/
This article explains how to style an element by clicking on it with just css.
The idea is that you put a hidden input next to a div, and style the div based on it's neighboring input being checked.
Here's the example:
html
<label for="toggle-1">Do Something</label>
<input type="checkbox" id="toggle-1">
<div>Control me</div>
css
input[type=checkbox] {
   position: absolute;
   top: -9999px;
   left: -9999px;
   /* For mobile, it's typically better to position checkbox on top of clickable
      area and turn opacity to 0 instead. */
}
/* Default State */
div {
   background: green;
   width: 400px;
   height: 100px;
   line-height: 100px;
   color: white;
   text-align: center;
}
/* Toggled State */
input[type=checkbox]:checked ~ div {
   background: red;
}