/* extrinsic size, from the viewport */html, body{block-size: 100%;}/* root container */html{container: root / size;}/* body as scroller */body{overflow: auto;}
Simpler Solution…
(without height queries)
body > :is(header, main, footer, aside),{container: layout / inline-size;}