Maybe somebody will find this solution more intuitive and easier to implement. The mechanics of this is that the link targets itself and in that case it's easy to select anything what comes next in the DOM.
.toggle-hide,
.toggle-content {
display: none;
}
.toggle-show:target + .toggle-hide,
.toggle-show:target + .toggle-hide + .toggle-content {
display: block;
}
.toggle-show:target {
display: none;
}
Show
Hide
Lorem ipsum