/*
 * Shared header layout — included by every page that includes header.php.
 *
 * The header is position:fixed (NOT sticky): header.php collapses it on scroll
 * (expanded ~189px -> compact ~56px) and publishes both heights as --header-height /
 * --header-height-compact. A sticky header still occupies layout space, so collapsing it
 * shifts the content below and triggers scroll anchoring -> jump / flicker loop and a
 * page that can't scroll back to the top. Fixed takes it out of flow; the body padding
 * below reserves the expanded height instead.
 *
 * Selectors are deliberately a little more specific than a bare `header` / `body` so a
 * stale per-page rule can't silently override them again.
 */
:root {
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
}

header[role="banner"] {
    background-color: var(--white, #fff);
    box-shadow: 0 2px 15px rgba(11, 93, 59, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding-top: var(--safe-area-inset-top, 0px);
    overflow-anchor: none;
}

html body {
    padding-top: calc(var(--header-height, 189px) + var(--safe-area-inset-top, 0px));
}

/* Anchored / scrolled-to sections stop below the collapsed header, not under it. */
[id] {
    scroll-margin-top: var(--header-height-compact, 58px);
}
