/* Sticky navigation leaves room for anchors, reading controls and keyboard focus. */
:root { --header-height:72px; --reading-height:48px; }
html { scroll-padding-top:calc(var(--header-height) + 16px); }
.site-header,.legacy-page .site-header { position:sticky; top:0; z-index:60; background:white; border-bottom:1px solid var(--line); }
.nav,.legacy-page .nav { min-height:var(--header-height); border-bottom:0; }
.skip,.legacy-page .skip { z-index:100; }
.reading-dock { top:calc(var(--header-height) + 1px); }
.editorial-toc { top:calc(var(--header-height) + var(--reading-height) + 20px); }
.editorial-section { scroll-margin-top:calc(var(--reading-height) + 8px); }
:where(a,button,input,select,textarea,summary) { scroll-margin-block-start:calc(var(--header-height) + 16px); }
.back-to-top { position:fixed; z-index:50; right:max(20px,env(safe-area-inset-right)); bottom:max(20px,env(safe-area-inset-bottom)); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; width:52px; height:52px; padding:0; background:white; border:1px solid #7d838e; border-radius:50%; color:var(--ink); font-size:10px; line-height:1.3; font-weight:650; transition:background-color .16s,color .16s; }
.back-to-top svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.back-to-top:is(:hover,:focus-visible) { background:var(--blue); border-color:var(--blue); color:white; }
.minimal-footer-inner { padding-right:96px; }
@media(max-width:640px) {
 :root { --header-height:64px; --reading-height:44px; }
 .nav-links,.legacy-page .nav-links { top:100%; max-height:calc(100dvh - var(--header-height) - 16px); overflow-y:auto; }
 .back-to-top { width:48px; height:48px; right:max(12px,env(safe-area-inset-right)); bottom:max(12px,env(safe-area-inset-bottom)); }
 .minimal-footer-inner { padding-right:76px; }
}
@media(prefers-reduced-motion:reduce) {
 .hero-service,.hero-service>.arrow,.back-to-top { transition:none; }
 .hero-service:is(:hover,:focus-visible)>.arrow { transform:none; }
}
