/* In-page anchors land just below the sticky header at <=1023px (>=1024px: desktop-rhythm-20261004.min.css).
   Header = logo (img aspect) + nav rows + 30px gap/padding/border (16px with no nav at <=600px); +8px clearance. */
@media screen and (max-width: 1023px) {
  html:has(.site-header .site-logo) { --anchor-offset: calc(100vw * 92 / 550 + 135px); scroll-padding-top: var(--anchor-offset); }
}
@media screen and (max-width: 767px) {
  html:has(.site-header .site-logo) { --anchor-offset: calc(100vw * 92 / 550 + 126px); }
  html:has(.site-header .site-logo) main :is(input, select, textarea, button, [id]) { scroll-margin-top: max(0px, 96px - var(--anchor-offset)); }
}
@media screen and (max-width: 647px) {
  html:has(.site-header .site-logo) { --anchor-offset: calc(100vw * 92 / 550 + 165px); }
}
@media screen and (max-width: 600px) {
  html:has(.site-header .site-logo) { --anchor-offset: calc(100vw * 146 / 975 + 24px); }
  html.has-js:has(.site-header .site-logo) { --anchor-offset: calc((100vw - 60px) * 146 / 975 + 24px); }
}
