/* Keep header dropdowns, search and sidebar containers outside content effects. */
/* Keep scrolling content out of the sticky header's compositing layer on mobile Safari. */
html[data-variant] body.hx-site .main-header {
    background-color:var(--hx-surface,var(--bg-secondary));
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
    isolation:isolate;
    transition:box-shadow 200ms ease,border-color 200ms ease;
}
/* Opt-in depth: style zero leaves each theme's existing header untouched. */
html body.hx-site .main-header[data-edge="1"]:is([data-edge-scroll-only="false"],.hx-header-scrolled) {
    box-shadow:0 12px 24px -8px rgba(0,0,0,.5);
}
html body.hx-site .main-header[data-edge="2"]:is([data-edge-scroll-only="false"],.hx-header-scrolled) {
    box-shadow:0 1px 0 #4b82c7,0 9px 20px -8px rgba(35,117,234,.55);
}
html body.hx-site .main-header[data-edge="3"]:is([data-edge-scroll-only="false"],.hx-header-scrolled) {
    box-shadow:0 2px 0 var(--hx-border,#52647b),0 4px 0 rgba(3,8,18,.35),0 14px 22px -10px rgba(0,0,0,.65);
}
html body.hx-site .main-header[data-edge="5"]:is([data-edge-scroll-only="false"],.hx-header-scrolled) {
    box-shadow:0 1px 0 var(--hx-accent),0 9px 20px -8px color-mix(in srgb,var(--hx-accent) 55%,transparent);
}
/* Preserve sharp edge details while removing the diffuse shadow. */
html body.hx-site .main-header[data-edge-no-shadow="true"]:is([data-edge-scroll-only="false"],.hx-header-scrolled) { box-shadow:none; }
html body.hx-site .main-header[data-edge="2"][data-edge-no-shadow="true"]:is([data-edge-scroll-only="false"],.hx-header-scrolled) { box-shadow:0 1px 0 #4b82c7; }
html body.hx-site .main-header[data-edge="3"][data-edge-no-shadow="true"]:is([data-edge-scroll-only="false"],.hx-header-scrolled) { box-shadow:0 2px 0 var(--hx-border,#52647b),0 4px 0 rgba(3,8,18,.35); }
html body.hx-site .main-header[data-edge="5"][data-edge-no-shadow="true"]:is([data-edge-scroll-only="false"],.hx-header-scrolled) { box-shadow:0 1px 0 var(--hx-accent); }

/* Neutralize legacy clipping even if a cached script still adds the class.
   Scroll-driven clipping caused missing content on touch devices. */
html body.hx-site main.app-container.hx-header-content-clip {
    clip-path:none;
}
