The problem with #theme-toggle:checked ~body is that the selector is wrong. ~ requires that the second part comes after the first part in the HTML. But your toggle is inside the html and the body. [1]
Use the new-ish :has selector [2]:
css
html:has(#theme-toggle:checked) {
background-color: #eff1f5;
}
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/Subsequent-sibling_combinator[2] https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:has
I’m glad that after 5-ish years of doing this shit professionally I finally know enough to help others! :D