I want to toggle a <div> via a checkbox.
<div class="docs">...</div>
...
<input type="checkbox" id="toggle-docs">
The docs should only be visible if the checkbox is checked.
This should work without JS.
Up to now I only found solutions which require the checkbox to be near the div (via + or ~ selector).
Is there a way to solve this with modern CSS?