/* Field Guide navbar override.
   This file intentionally scopes to Astra/JEGPF header selectors and leaves the
   account icon internals untouched. */

:root {
    /* Environment */
    --forest-0: #1a2f26;
    --forest-1: #243d32;
    --forest-2: #2f4f41;

    /* Journal UI */
    --card-bg: #f4efe6;
    --card-hover: #fffbfa;
    --card-border: #e0d8ca;
    --icon-border: #c2bbae;

    /* Ink */
    --text-heading: #2d3e35;
    --text-body: #4a5951;

    /* Physicality */
    --radius-book: 4px;
    --shadow-base: 2px 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-hover: 4px 10px 25px rgba(0, 0, 0, 0.3);
    --field-guide-ease: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Typography */
    --font-serif: Georgia, serif;

    /* Navbar sizing */
    --fg-nav-x: 12px;
    --fg-nav-y: 8px;
    --fg-nav-gap: 8px;
    --fg-nav-link-x: 14px;
    --fg-nav-link-y: 10px;
    --fg-nav-link-min: 44px;
    --fg-nav-logo: 54px;
    --fg-drawer-width: min(92vw, 440px);
}

html,
body {
    overflow-x: hidden;
}

body #masthead.site-header,
body .site-header,
body .main-header-bar,
body .ast-primary-header-bar,
body #ast-desktop-header,
body #ast-mobile-header,
body .ast-mobile-header-wrap {
    background: var(--card-bg) !important;
    color: var(--text-heading) !important;
    font-family: var(--font-serif) !important;
}

body #masthead.site-header,
body .site-header {
    border-bottom: 1px solid var(--card-border) !important;
    box-shadow: var(--shadow-base) !important;
    padding-top: 0 !important;
    transition: var(--field-guide-ease) !important;
}

body .site-header.sticky-active,
body .site-header.is-sticky {
    box-shadow: var(--shadow-hover) !important;
}

body .site-header .ast-container,
body .site-header .ast-builder-grid-row,
body .site-header .site-primary-header-wrap {
    max-width: 100% !important;
    padding-left: var(--fg-nav-x) !important;
    padding-right: var(--fg-nav-x) !important;
}

body .site-header .ast-builder-grid-row,
body .site-header .site-header-section,
body .site-header .ast-main-header-bar-alignment,
body .site-header .main-header-bar-navigation,
body .site-header .main-navigation {
    min-width: 0;
}

body header.custom-logo-link img,
body .custom-logo-link img,
body .site-logo-img img {
    width: var(--fg-nav-logo) !important;
    max-width: var(--fg-nav-logo) !important;
    height: auto !important;
    filter: sepia(0.1) contrast(1.05);
}

body .site-title,
body .site-title a {
    color: var(--text-heading) !important;
    font-family: var(--font-serif) !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

body .main-header-menu,
body .main-header-menu .menu-link,
body .main-header-menu .sub-menu .menu-link,
body .ast-mobile-popup-drawer .menu-link,
body .ast-mobile-header-wrap .menu-link {
    font-family: var(--font-serif) !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

body .main-header-menu .menu-link,
body .main-header-menu > li > a.menu-link,
body .main-header-menu > li > a.jegpf-wx-link {
    min-height: var(--fg-nav-link-min) !important;
    border-radius: var(--radius-book) !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--text-heading) !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    transition: var(--field-guide-ease) !important;
    box-shadow: none !important;
}

body .main-header-menu .menu-item:hover > .menu-link,
body .main-header-menu .menu-item:focus-within > .menu-link,
body .main-header-menu > li > a.menu-link:hover,
body .main-header-menu > li > a.menu-link:focus-visible {
    background: var(--card-hover) !important;
    border-color: var(--card-border) !important;
    color: var(--text-heading) !important;
    box-shadow: var(--shadow-base) !important;
    transform: translateY(-2px) !important;
}

body .main-header-menu .current-menu-item > .menu-link,
body .main-header-menu .current_page_item > .menu-link,
body .main-header-menu .current-menu-ancestor > .menu-link {
    background: var(--card-hover) !important;
    border-color: var(--icon-border) !important;
    color: var(--text-heading) !important;
    box-shadow: inset 0 -3px 0 var(--forest-1), var(--shadow-base) !important;
}

body .main-header-menu .menu-link:focus-visible,
body .ast-menu-toggle:focus-visible,
body .menu-toggle:focus-visible,
body .jegpf-mobile-profile-float a:focus-visible {
    outline: 2px solid var(--text-heading) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 4px rgba(244, 239, 230, 0.72), var(--shadow-base) !important;
}

body .main-header-menu .donate-bubble > .menu-link,
body .main-header-menu a.menu-link[href*="/donate"] {
    background: var(--text-heading) !important;
    border-color: var(--text-heading) !important;
    color: var(--card-bg) !important;
}

body .main-header-menu .donate-bubble:hover > .menu-link,
body .main-header-menu a.menu-link[href*="/donate"]:hover,
body .main-header-menu a.menu-link[href*="/donate"]:focus-visible {
    background: var(--forest-1) !important;
    border-color: var(--forest-1) !important;
    color: var(--card-hover) !important;
}

body .main-header-menu > li:is(.menu-item-weather, .weather-menu-item) {
    order: 9998 !important;
    flex-shrink: 0 !important;
}

body .main-header-menu > li:is(.menu-item-weather, .weather-menu-item) > a.jegpf-wx-link,
body .main-header-menu > li:is(.menu-item-weather, .weather-menu-item) > .menu-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    border-radius: var(--radius-book) !important;
    border: 1px solid var(--card-border) !important;
    background: rgba(255, 251, 250, 0.7) !important;
    color: var(--text-heading) !important;
    box-shadow: none !important;
}

body .main-header-menu > li:is(.menu-item-weather, .weather-menu-item) > a.jegpf-wx-link:hover,
body .main-header-menu > li:is(.menu-item-weather, .weather-menu-item):focus-within > a.jegpf-wx-link {
    background: var(--card-hover) !important;
    border-color: var(--icon-border) !important;
    box-shadow: var(--shadow-base) !important;
}

body .main-header-menu > li:is(.menu-item-weather, .weather-menu-item) img.icon {
    width: 20px !important;
    height: 20px !important;
    filter: sepia(0.1) contrast(1.05);
}

body .main-header-menu .sub-menu {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-book) !important;
    box-shadow: var(--shadow-hover) !important;
    padding: 8px !important;
}

body .main-header-menu .sub-menu .menu-link {
    min-height: 40px !important;
    padding: 9px 12px !important;
    border-radius: var(--radius-book) !important;
    color: var(--text-body) !important;
}

body .main-header-menu .sub-menu .menu-link:hover,
body .main-header-menu .sub-menu .menu-link:focus-visible {
    color: var(--text-heading) !important;
    background: var(--card-hover) !important;
}

body .ast-header-navigation-arrow svg,
body .ast-menu-toggle svg {
    fill: currentColor !important;
}

body .ast-header-navigation-arrow {
    color: inherit !important;
}

body .ast-mobile-header-wrap .menu-toggle,
body .ast-mobile-header-wrap .mobile-menu-toggle-icon,
body .ast-mobile-popup-drawer .menu-toggle-close,
body .ast-menu-toggle,
body .ast-menu-toggle .ast-icon,
body .dropdown-menu-toggle,
body .dropdown-menu-toggle .ast-icon {
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin: 0 !important;
}

body .ast-mobile-header-wrap .menu-toggle,
body .ast-mobile-header-wrap .mobile-menu-toggle-icon,
body .ast-mobile-popup-drawer .menu-toggle-close,
body .ast-menu-toggle,
body .ast-menu-toggle .ast-icon,
body .dropdown-menu-toggle .ast-icon {
    display: inline-flex !important;
}

body .ast-mobile-header-wrap .mobile-menu-toggle-icon .ahfb-svg-iconset,
body .ast-mobile-popup-drawer .menu-toggle-close .ahfb-svg-iconset {
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .ast-mobile-header-wrap .menu-toggle svg,
body .ast-mobile-popup-drawer .menu-toggle-close svg {
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

body .ast-menu-toggle .ast-icon,
body .dropdown-menu-toggle .ast-icon {
    width: 16px !important;
    height: 16px !important;
    color: currentColor !important;
}

body .ast-menu-toggle .ast-arrow-svg,
body .dropdown-menu-toggle .ast-arrow-svg {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    transform-origin: center !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body .ast-menu-toggle[aria-expanded="true"] .ast-arrow-svg,
body .ast-submenu-expanded > .ast-menu-toggle .ast-arrow-svg,
body .ast-submenu-expanded > .menu-link .dropdown-menu-toggle .ast-arrow-svg {
    transform: rotate(180deg) !important;
}

body .ast-menu-toggle::before,
body .ast-menu-toggle::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Account icon placement only. The icon's visual treatment remains in jegpf-styles.css. */
body .jegpf-nav-profile,
body .menu-item.jegpf-nav-profile {
    order: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    margin-left: 0 !important;
}

body .jegpf-profile-nav {
    margin-left: 0 !important;
}

body .jegpf-mobile-profile-float {
    line-height: 0 !important;
}

body .ast-mobile-popup-drawer .jegpf-nav-profile,
body .ast-mobile-popup-content .jegpf-nav-profile,
body .ast-mobile-header-wrap .jegpf-nav-profile {
    display: none !important;
}

/* Mobile/tablet: one clear vertical drawer through 1024px. */
@media (max-width: 1024px) {
    :root {
        --fg-nav-x: 12px;
        --fg-nav-y: 8px;
        --fg-nav-gap: 8px;
        --fg-nav-link-x: 14px;
        --fg-nav-link-y: 11px;
        --fg-nav-logo: 48px;
        --fg-drawer-width: min(94vw, 430px);
    }

    body #ast-desktop-header {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    body #ast-mobile-header,
    body .ast-mobile-header-wrap {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body .ast-mobile-header-wrap .ast-builder-grid-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        column-gap: var(--fg-nav-gap) !important;
        min-height: 64px !important;
        padding-top: var(--fg-nav-y) !important;
        padding-bottom: var(--fg-nav-y) !important;
    }

    body .ast-mobile-header-wrap .site-header-primary-section-left {
        min-width: 0 !important;
    }

    body #ast-mobile-header .site-title,
    body #ast-mobile-header .site-title a,
    body .ast-mobile-header-wrap .site-title,
    body .ast-mobile-header-wrap .site-title a {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        max-width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    body .ast-mobile-header-wrap .site-branding,
    body .ast-mobile-header-wrap .ast-site-identity {
        gap: 0 !important;
        width: auto !important;
    }

    body .ast-mobile-header-wrap .site-header-primary-section-right {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: var(--fg-nav-gap) !important;
        width: auto !important;
        min-width: 94px !important;
    }

    body .ast-mobile-header-wrap .ast-button-wrap,
    body .ast-mobile-header-wrap .mobile-menu-toggle-icon,
    body .ast-mobile-header-wrap .menu-toggle,
    body .ast-mobile-header-wrap .ast-mobile-menu-trigger-minimal {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    body .ast-mobile-header-wrap .ast-button-wrap {
        width: 94px !important;
        min-width: 94px !important;
        overflow: visible !important;
        flex-direction: row !important;
        gap: 10px !important;
    }

    body .ast-mobile-header-wrap .menu-toggle,
    body [data-section="section-header-mobile-trigger"] .ast-button-wrap .ast-mobile-menu-trigger-minimal {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        border: 1px solid var(--icon-border) !important;
        border-radius: 50% !important;
        background: transparent !important;
        color: var(--text-heading) !important;
        box-shadow: none !important;
        transition: var(--field-guide-ease) !important;
        order: 2 !important;
        flex: 0 0 44px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body .ast-mobile-header-wrap .menu-toggle:hover,
    body [data-section="section-header-mobile-trigger"] .ast-button-wrap .ast-mobile-menu-trigger-minimal:hover {
        background: var(--text-heading) !important;
        color: var(--card-bg) !important;
        border-color: var(--text-heading) !important;
    }

    body .jegpf-nav-profile,
    body .menu-item.jegpf-nav-profile {
        display: none !important;
    }

    body > .jegpf-mobile-profile-float,
    body .jegpf-mobile-profile-float[data-jegpf-profile-pending="true"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    body #ast-mobile-header .jegpf-mobile-profile-float.is-mounted,
    body .ast-mobile-header-wrap .jegpf-mobile-profile-float.is-mounted,
    body [data-section="section-header-mobile-trigger"] .jegpf-mobile-profile-float.is-mounted {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        order: 1 !important;
        margin: 0 !important;
        flex: 0 0 auto !important;
    }

    body .ast-mobile-header-wrap .ast-button-wrap,
    body .ast-mobile-header-wrap .mobile-menu-toggle-icon {
        order: 2 !important;
    }

    body.ast-main-header-nav-open .ast-mobile-header-content,
    body.ast-main-header-nav-open #ast-mobile-header .ast-mobile-header-content,
    body.ast-main-header-nav-open .ast-mobile-header-wrap .ast-mobile-header-content {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body .ast-mobile-popup-drawer {
        background: var(--card-bg) !important;
        min-height: 100dvh !important;
    }

    body .ast-mobile-popup-drawer .ast-mobile-popup-inner {
        width: 100vw !important;
        max-width: 100vw !important;
        min-height: 100dvh !important;
        background: var(--card-bg) !important;
        border-left: 0 !important;
        box-shadow: var(--shadow-hover) !important;
        color: var(--text-heading) !important;
    }

    body .ast-mobile-popup-drawer .ast-mobile-popup-header {
        background: var(--card-bg) !important;
        border-bottom: 1px solid var(--card-border) !important;
        padding: 14px 16px !important;
    }

    body .ast-mobile-popup-drawer .menu-toggle-close {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        border: 1px solid var(--icon-border) !important;
        background: transparent !important;
        color: var(--text-heading) !important;
        transition: var(--field-guide-ease) !important;
    }

    body .ast-mobile-popup-drawer .menu-toggle-close:hover,
    body .ast-mobile-popup-drawer .menu-toggle-close:focus-visible {
        background: var(--text-heading) !important;
        color: var(--card-bg) !important;
    }

    body .ast-mobile-popup-drawer .ast-mobile-popup-content,
    body .ast-mobile-popup-content,
    body .ast-mobile-header-content {
        background: var(--card-bg) !important;
        min-height: calc(100dvh - 72px) !important;
        height: calc(100dvh - 72px) !important;
        max-height: calc(100dvh - 72px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 12px !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu,
    body .ast-mobile-popup-content .main-header-menu,
    body .ast-mobile-header-wrap .main-header-menu,
    body .ast-mobile-header-content .main-header-menu {
        display: flex !important;
        flex-direction: column !important;
        grid-auto-flow: row !important;
        grid-auto-columns: auto !important;
        grid-auto-rows: auto !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        justify-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        white-space: normal !important;
        scroll-snap-type: none !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu > li,
    body .ast-mobile-popup-content .main-header-menu > li,
    body .ast-mobile-header-wrap .main-header-menu > li,
    body .ast-mobile-header-content .main-header-menu > li {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        align-self: stretch !important;
        justify-self: stretch !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu > li > .menu-link,
    body .ast-mobile-popup-content .main-header-menu > li > .menu-link,
    body .ast-mobile-header-wrap .main-header-menu > li > .menu-link,
    body .ast-mobile-header-content .main-header-menu > li > .menu-link,
    body .ast-mobile-popup-drawer .weather-menu-item > a.jegpf-wx-link,
    body .ast-mobile-popup-content .weather-menu-item > a.jegpf-wx-link,
    body .ast-mobile-header-wrap .weather-menu-item > a.jegpf-wx-link {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: var(--fg-nav-link-min) !important;
        height: auto !important;
        padding: var(--fg-nav-link-y) var(--fg-nav-link-x) !important;
        border: 1px solid var(--card-border) !important;
        border-radius: var(--radius-book) !important;
        background: rgba(255, 251, 250, 0.58) !important;
        color: var(--text-heading) !important;
        box-shadow: none !important;
        text-align: left !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow: visible !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu > li:hover > .menu-link,
    body .ast-mobile-popup-content .main-header-menu > li:hover > .menu-link,
    body .ast-mobile-popup-drawer .main-header-menu > li:focus-within > .menu-link,
    body .ast-mobile-popup-content .main-header-menu > li:focus-within > .menu-link {
        background: var(--card-hover) !important;
        border-color: var(--icon-border) !important;
        transform: none !important;
        box-shadow: var(--shadow-base) !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu .sub-menu,
    body .ast-mobile-popup-content .main-header-menu .sub-menu,
    body .ast-mobile-header-wrap .main-header-menu .sub-menu,
    body .ast-mobile-header-content .main-header-menu .sub-menu,
    body .main-header-bar-navigation.toggle-on .main-header-menu .sub-menu {
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 7px !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 8px 0 0 0 !important;
        padding: 8px 8px 8px 12px !important;
        border: 1px solid rgba(224, 216, 202, 0.72) !important;
        border-left: 2px solid var(--icon-border) !important;
        border-radius: var(--radius-book) !important;
        background: rgba(244, 239, 230, 0.54) !important;
        box-shadow: none !important;
        overflow: visible !important;
        white-space: normal !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu .sub-menu .menu-link,
    body .ast-mobile-popup-content .main-header-menu .sub-menu .menu-link,
    body .ast-mobile-header-wrap .main-header-menu .sub-menu .menu-link,
    body .ast-mobile-header-content .main-header-menu .sub-menu .menu-link,
    body .main-header-bar-navigation.toggle-on .main-header-menu .sub-menu .menu-link,
    body.ast-header-break-point .ast-mobile-popup-drawer .main-header-menu li.menu-item .sub-menu li > a.menu-link,
    body.ast-header-break-point .ast-mobile-popup-content .main-header-menu li.menu-item .sub-menu li > a.menu-link,
    body.ast-header-break-point .ast-mobile-header-wrap .main-header-menu li.menu-item .sub-menu li > a.menu-link,
    body.ast-header-break-point .ast-mobile-header-content .main-header-menu li.menu-item .sub-menu li > a.menu-link,
    body .main-header-bar-navigation.toggle-on .main-header-menu li.menu-item .sub-menu li > a.menu-link {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: var(--fg-nav-link-min) !important;
        height: auto !important;
        padding: 9px 12px !important;
        border: 1px solid rgba(224, 216, 202, 0.82) !important;
        border-radius: var(--radius-book) !important;
        color: var(--text-body) !important;
        background: rgba(255, 251, 250, 0.76) !important;
        box-shadow: none !important;
        font-family: var(--font-serif) !important;
        font-weight: 400 !important;
        line-height: 1.2 !important;
        text-align: left !important;
        text-decoration: none !important;
        white-space: normal !important;
        word-break: normal !important;
        animation: none !important;
        transform: none !important;
        overflow: visible !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu .sub-menu .menu-link:hover,
    body .ast-mobile-popup-content .main-header-menu .sub-menu .menu-link:hover,
    body .ast-mobile-header-wrap .main-header-menu .sub-menu .menu-link:hover,
    body .ast-mobile-header-content .main-header-menu .sub-menu .menu-link:hover,
    body .main-header-bar-navigation.toggle-on .main-header-menu .sub-menu .menu-link:hover,
    body .ast-mobile-popup-drawer .main-header-menu .sub-menu .menu-link:focus-visible,
    body .ast-mobile-popup-content .main-header-menu .sub-menu .menu-link:focus-visible,
    body .ast-mobile-header-wrap .main-header-menu .sub-menu .menu-link:focus-visible,
    body .ast-mobile-header-content .main-header-menu .sub-menu .menu-link:focus-visible,
    body .main-header-bar-navigation.toggle-on .main-header-menu .sub-menu .menu-link:focus-visible {
        background: var(--card-hover) !important;
        border-color: var(--icon-border) !important;
        color: var(--text-heading) !important;
        box-shadow: var(--shadow-base) !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu > li.menu-item-has-children > .ast-menu-toggle,
    body .ast-mobile-popup-content .main-header-menu > li.menu-item-has-children > .ast-menu-toggle,
    body .ast-mobile-header-wrap .main-header-menu > li.menu-item-has-children > .ast-menu-toggle {
        position: absolute !important;
        top: calc((var(--fg-nav-link-min) - 34px) / 2) !important;
        right: 6px !important;
        z-index: 3 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 50% !important;
        border: 1px solid var(--icon-border) !important;
        background: transparent !important;
        color: var(--text-heading) !important;
        box-shadow: none !important;
        transition: var(--field-guide-ease) !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu > li.menu-item-has-children > .menu-link > .dropdown-menu-toggle,
    body .ast-mobile-popup-content .main-header-menu > li.menu-item-has-children > .menu-link > .dropdown-menu-toggle,
    body .ast-mobile-header-wrap .main-header-menu > li.menu-item-has-children > .menu-link > .dropdown-menu-toggle,
    body .ast-mobile-header-content .main-header-menu > li.menu-item-has-children > .menu-link > .dropdown-menu-toggle {
        display: none !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu > li.menu-item-has-children > .ast-menu-toggle .ast-icon,
    body .ast-mobile-popup-content .main-header-menu > li.menu-item-has-children > .ast-menu-toggle .ast-icon,
    body .ast-mobile-header-wrap .main-header-menu > li.menu-item-has-children > .ast-menu-toggle .ast-icon,
    body .ast-mobile-popup-drawer .main-header-menu > li.menu-item-has-children > .ast-menu-toggle svg,
    body .ast-mobile-popup-content .main-header-menu > li.menu-item-has-children > .ast-menu-toggle svg,
    body .ast-mobile-header-wrap .main-header-menu > li.menu-item-has-children > .ast-menu-toggle svg {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu > li.menu-item-has-children > .ast-menu-toggle:hover,
    body .ast-mobile-popup-content .main-header-menu > li.menu-item-has-children > .ast-menu-toggle:hover,
    body .ast-mobile-header-wrap .main-header-menu > li.menu-item-has-children > .ast-menu-toggle:hover {
        background: var(--text-heading) !important;
        color: var(--card-bg) !important;
        border-color: var(--text-heading) !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu > li.menu-item-has-children > .menu-link,
    body .ast-mobile-popup-content .main-header-menu > li.menu-item-has-children > .menu-link,
    body .ast-mobile-header-wrap .main-header-menu > li.menu-item-has-children > .menu-link {
        padding-right: 48px !important;
    }

    body .jegpf-swipe-fade,
    body .jegpf-swipe-indicator {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

@media (min-width: 481px) and (max-width: 600px) {
    :root {
        --fg-nav-x: 14px;
        --fg-nav-y: 9px;
        --fg-nav-gap: 10px;
        --fg-nav-link-x: 16px;
        --fg-nav-link-y: 12px;
        --fg-nav-logo: 52px;
    }
}

@media (min-width: 601px) and (max-width: 768px) {
    :root {
        --fg-nav-x: 18px;
        --fg-nav-y: 10px;
        --fg-nav-gap: 12px;
        --fg-nav-link-x: 18px;
        --fg-nav-link-y: 13px;
        --fg-nav-logo: 56px;
        --fg-drawer-width: min(88vw, 520px);
    }

    body .ast-mobile-popup-drawer .ast-mobile-popup-content,
    body .ast-mobile-popup-content,
    body .ast-mobile-header-content {
        padding: 16px !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu,
    body .ast-mobile-popup-content .main-header-menu {
        gap: 10px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --fg-nav-x: 22px;
        --fg-nav-y: 12px;
        --fg-nav-gap: 14px;
        --fg-nav-link-x: 20px;
        --fg-nav-link-y: 14px;
        --fg-nav-logo: 60px;
        --fg-drawer-width: min(74vw, 560px);
    }

    body .ast-mobile-popup-drawer .ast-mobile-popup-content,
    body .ast-mobile-popup-content,
    body .ast-mobile-header-content {
        padding: 18px !important;
    }

    body .ast-mobile-popup-drawer .main-header-menu,
    body .ast-mobile-popup-content .main-header-menu {
        gap: 12px !important;
    }
}

/* Desktop starts at 1025px, overriding the old 1360px mobile switch. */
@media (min-width: 1025px) {
    :root {
        --fg-nav-x: 20px;
        --fg-nav-y: 10px;
        --fg-nav-gap: 10px;
        --fg-nav-link-x: 12px;
        --fg-nav-link-y: 8px;
        --fg-nav-logo: 58px;
    }

    body #ast-desktop-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body #ast-mobile-header,
    body .ast-mobile-header-wrap,
    body .jegpf-mobile-profile-float {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    body #ast-desktop-header .site-primary-header-wrap,
    body #ast-desktop-header .ast-builder-grid-row {
        min-height: 76px !important;
    }

    body #ast-desktop-header .site-header-primary-section-left {
        flex: 0 0 auto !important;
        min-width: max-content !important;
        margin-right: clamp(24px, 6vw, 120px) !important;
    }

    body #ast-desktop-header .site-branding,
    body #ast-desktop-header .ast-site-identity {
        display: inline-flex !important;
        align-items: center !important;
        gap: 10px !important;
        width: auto !important;
        max-width: min(32vw, 300px) !important;
    }

    body #ast-desktop-header .site-title {
        display: block !important;
        max-width: 190px !important;
        margin: 0 !important;
        color: var(--text-heading) !important;
        font-family: var(--font-serif) !important;
        font-size: clamp(14px, 1.05vw, 17px) !important;
        font-weight: 400 !important;
        line-height: 1.12 !important;
        letter-spacing: 0 !important;
        white-space: normal !important;
    }

    body #ast-desktop-header .site-title a {
        color: inherit !important;
        font-family: inherit !important;
        font-size: inherit !important;
        font-weight: inherit !important;
        line-height: inherit !important;
        text-decoration: none !important;
    }

    body #ast-desktop-header .site-header-primary-section-right {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    body #ast-desktop-header .ast-builder-menu-1,
    body #ast-desktop-header .ast-main-header-bar-alignment,
    body #ast-desktop-header .main-header-bar-navigation,
    body #ast-desktop-header .main-navigation {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    body #ast-desktop-header .ast-builder-menu-1 .main-header-menu,
    body .main-header-bar .main-header-menu {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: var(--fg-nav-gap) !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
    }

    body #ast-desktop-header .main-header-menu > li {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    body #ast-desktop-header .main-header-menu > li > .menu-link,
    body #ast-desktop-header .main-header-menu > li > a.jegpf-wx-link {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 0 !important;
        min-height: 42px !important;
        height: auto !important;
        padding: var(--fg-nav-link-y) var(--fg-nav-link-x) !important;
        white-space: nowrap !important;
        overflow: visible !important;
    }

    body #ast-desktop-header .main-header-menu > li > .ast-menu-toggle {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        min-width: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }

    body #ast-desktop-header .main-header-menu > li > .menu-link .dropdown-menu-toggle,
    body #ast-desktop-header .main-header-menu > li > a.jegpf-wx-link .dropdown-menu-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: 6px !important;
        line-height: 1 !important;
    }

    body #ast-desktop-header .jegpf-nav-profile,
    body #ast-desktop-header .menu-item.jegpf-nav-profile {
        margin-left: 8px !important;
        padding-left: 0 !important;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    :root {
        --fg-nav-x: 18px;
        --fg-nav-gap: 8px;
        --fg-nav-link-x: 10px;
        --fg-nav-link-y: 8px;
        --fg-nav-logo: 54px;
    }
}

@media (min-width: 1281px) and (max-width: 1440px) {
    :root {
        --fg-nav-x: 24px;
        --fg-nav-gap: 12px;
        --fg-nav-link-x: 14px;
        --fg-nav-link-y: 9px;
        --fg-nav-logo: 62px;
    }

    body #ast-desktop-header .ast-builder-menu-1 .main-header-menu,
    body .main-header-bar .main-header-menu {
        flex-wrap: nowrap !important;
    }
}

@media (min-width: 1441px) {
    :root {
        --fg-nav-x: 28px;
        --fg-nav-gap: 16px;
        --fg-nav-link-x: 16px;
        --fg-nav-link-y: 10px;
        --fg-nav-logo: 66px;
    }

    body .site-header .site-primary-header-wrap {
        max-width: 1600px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body #ast-desktop-header .ast-builder-menu-1 .main-header-menu,
    body .main-header-bar .main-header-menu {
        flex-wrap: nowrap !important;
    }
}

/* Final navbar fixes that must win over Astra Customizer and WPCode snippets. */
body .main-header-menu .donate-bubble > .menu-link,
body .main-header-menu a.menu-link[href*="/donate"],
body #ast-desktop-header .main-header-menu .donate-bubble > .menu-link,
body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"],
body .ast-mobile-header-wrap .main-header-menu .donate-bubble > .menu-link,
body .ast-mobile-header-wrap .main-header-menu a.menu-link[href*="/donate"],
body .ast-mobile-popup-drawer .main-header-menu .donate-bubble > .menu-link,
body .ast-mobile-popup-drawer .main-header-menu a.menu-link[href*="/donate"],
body .ast-mobile-popup-content .main-header-menu .donate-bubble > .menu-link,
body .ast-mobile-popup-content .main-header-menu a.menu-link[href*="/donate"] {
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    border-radius: var(--radius-book) !important;
    background-clip: padding-box !important;
}

body .main-header-menu .donate-bubble > .menu-link::after,
body .main-header-menu a.menu-link[href*="/donate"]::after,
body #ast-desktop-header .main-header-menu .donate-bubble > .menu-link::after,
body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]::after,
body .ast-mobile-header-wrap .main-header-menu .donate-bubble > .menu-link::after,
body .ast-mobile-header-wrap .main-header-menu a.menu-link[href*="/donate"]::after,
body .ast-mobile-popup-drawer .main-header-menu .donate-bubble > .menu-link::after,
body .ast-mobile-popup-drawer .main-header-menu a.menu-link[href*="/donate"]::after,
body .ast-mobile-popup-content .main-header-menu .donate-bubble > .menu-link::after,
body .ast-mobile-popup-content .main-header-menu a.menu-link[href*="/donate"]::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    border-radius: inherit !important;
    pointer-events: none !important;
    background: linear-gradient(120deg, transparent 38%, rgba(255, 255, 255, 0.28) 50%, transparent 62%) !important;
    transform: translateX(-125%) !important;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
    animation: none !important;
}

body .main-header-menu .donate-bubble:hover > .menu-link::after,
body .main-header-menu a.menu-link[href*="/donate"]:hover::after,
body .main-header-menu a.menu-link[href*="/donate"]:focus-visible::after,
body #ast-desktop-header .main-header-menu .donate-bubble:hover > .menu-link::after,
body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]:hover::after,
body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]:focus-visible::after,
body .ast-mobile-header-wrap .main-header-menu .donate-bubble:hover > .menu-link::after,
body .ast-mobile-header-wrap .main-header-menu a.menu-link[href*="/donate"]:hover::after,
body .ast-mobile-header-wrap .main-header-menu a.menu-link[href*="/donate"]:focus-visible::after,
body .ast-mobile-popup-drawer .main-header-menu .donate-bubble:hover > .menu-link::after,
body .ast-mobile-popup-drawer .main-header-menu a.menu-link[href*="/donate"]:hover::after,
body .ast-mobile-popup-drawer .main-header-menu a.menu-link[href*="/donate"]:focus-visible::after,
body .ast-mobile-popup-content .main-header-menu .donate-bubble:hover > .menu-link::after,
body .ast-mobile-popup-content .main-header-menu a.menu-link[href*="/donate"]:hover::after,
body .ast-mobile-popup-content .main-header-menu a.menu-link[href*="/donate"]:focus-visible::after {
    transform: translateX(125%) !important;
}

body #ast-desktop-header .main-header-menu > li.weather-menu-item > a.jegpf-wx-link,
body #ast-desktop-header .main-header-menu > li.weather-menu-item > .menu-link,
body .main-header-menu > li.weather-menu-item > a.jegpf-wx-link,
body .main-header-menu > li.weather-menu-item > .menu-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    min-height: 42px !important;
    height: auto !important;
    padding: var(--fg-nav-link-y) var(--fg-nav-link-x) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-book) !important;
    background: rgba(255, 251, 250, 0.7) !important;
    color: var(--text-heading) !important;
    box-shadow: none !important;
    font-family: var(--font-serif) !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    transform: none !important;
    overflow: visible !important;
}

body .ast-mobile-header-wrap .main-header-menu > li.weather-menu-item > a.jegpf-wx-link,
body .ast-mobile-header-wrap .main-header-menu > li.weather-menu-item > .menu-link,
body .ast-mobile-header-content .main-header-menu > li.weather-menu-item > a.jegpf-wx-link,
body .ast-mobile-header-content .main-header-menu > li.weather-menu-item > .menu-link,
body .ast-mobile-popup-drawer .main-header-menu > li.weather-menu-item > a.jegpf-wx-link,
body .ast-mobile-popup-drawer .main-header-menu > li.weather-menu-item > .menu-link,
body .ast-mobile-popup-content .main-header-menu > li.weather-menu-item > a.jegpf-wx-link,
body .ast-mobile-popup-content .main-header-menu > li.weather-menu-item > .menu-link,
body.ast-header-break-point .main-header-menu > li.weather-menu-item > a.jegpf-wx-link,
body.ast-header-break-point .main-header-menu > li.weather-menu-item > .menu-link {
    display: flex !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: var(--fg-nav-link-min) !important;
    height: auto !important;
    padding: var(--fg-nav-link-y) 48px var(--fg-nav-link-y) var(--fg-nav-link-x) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-book) !important;
    background: rgba(255, 251, 250, 0.58) !important;
    color: var(--text-heading) !important;
    box-shadow: none !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: normal !important;
}

body .main-header-menu > li.current-menu-item > .menu-link:not([href*="/donate"]),
body .main-header-menu > li.current_page_item > .menu-link:not([href*="/donate"]),
body .main-header-menu > li.current-menu-ancestor > .menu-link:not([href*="/donate"]),
body .main-header-menu > li.current-menu-item > a.jegpf-wx-link,
body .main-header-menu > li.current-menu-ancestor > a.jegpf-wx-link {
    background: var(--card-hover) !important;
    border-color: var(--icon-border) !important;
    color: var(--text-heading) !important;
    box-shadow: inset 0 -3px 0 var(--forest-1), var(--shadow-base) !important;
}

body #ast-desktop-header .main-header-menu > li.donate-bubble.current-menu-item > .menu-link,
body #ast-desktop-header .main-header-menu > li.donate-bubble.current_page_item > .menu-link,
body #ast-desktop-header .main-header-menu > li.donate-bubble.current-menu-ancestor > .menu-link,
body #ast-desktop-header .main-header-menu > li.current-menu-item > a.menu-link[href*="/donate"],
body #ast-desktop-header .main-header-menu > li.current_page_item > a.menu-link[href*="/donate"],
body #ast-desktop-header .main-header-menu > li.current-menu-ancestor > a.menu-link[href*="/donate"],
body .ast-mobile-header-wrap .main-header-menu > li.donate-bubble.current-menu-item > .menu-link,
body .ast-mobile-header-wrap .main-header-menu > li.donate-bubble.current_page_item > .menu-link,
body .ast-mobile-header-wrap .main-header-menu > li.donate-bubble.current-menu-ancestor > .menu-link,
body .ast-mobile-header-wrap .main-header-menu > li.current-menu-item > a.menu-link[href*="/donate"],
body .ast-mobile-header-wrap .main-header-menu > li.current_page_item > a.menu-link[href*="/donate"],
body .ast-mobile-header-wrap .main-header-menu > li.current-menu-ancestor > a.menu-link[href*="/donate"],
body .ast-mobile-popup-drawer .main-header-menu > li.donate-bubble.current-menu-item > .menu-link,
body .ast-mobile-popup-drawer .main-header-menu > li.donate-bubble.current_page_item > .menu-link,
body .ast-mobile-popup-drawer .main-header-menu > li.donate-bubble.current-menu-ancestor > .menu-link,
body .ast-mobile-popup-drawer .main-header-menu > li.current-menu-item > a.menu-link[href*="/donate"],
body .ast-mobile-popup-drawer .main-header-menu > li.current_page_item > a.menu-link[href*="/donate"],
body .ast-mobile-popup-drawer .main-header-menu > li.current-menu-ancestor > a.menu-link[href*="/donate"],
body .ast-mobile-popup-content .main-header-menu > li.donate-bubble.current-menu-item > .menu-link,
body .ast-mobile-popup-content .main-header-menu > li.donate-bubble.current_page_item > .menu-link,
body .ast-mobile-popup-content .main-header-menu > li.donate-bubble.current-menu-ancestor > .menu-link,
body .ast-mobile-popup-content .main-header-menu > li.current-menu-item > a.menu-link[href*="/donate"],
body .ast-mobile-popup-content .main-header-menu > li.current_page_item > a.menu-link[href*="/donate"],
body .ast-mobile-popup-content .main-header-menu > li.current-menu-ancestor > a.menu-link[href*="/donate"],
body .main-header-menu > li.donate-bubble.current-menu-item > .menu-link,
body .main-header-menu > li.donate-bubble.current_page_item > .menu-link,
body .main-header-menu > li.donate-bubble.current-menu-ancestor > .menu-link,
body .main-header-menu > li.current-menu-item > a.menu-link[href*="/donate"],
body .main-header-menu > li.current_page_item > a.menu-link[href*="/donate"],
body .main-header-menu > li.current-menu-ancestor > a.menu-link[href*="/donate"] {
    background: var(--card-hover) !important;
    border-color: var(--icon-border) !important;
    color: var(--text-heading) !important;
    box-shadow: inset 0 -3px 0 var(--forest-1), var(--shadow-base) !important;
}

body #ast-desktop-header .main-header-menu > li.weather-menu-item.current-menu-item > a.jegpf-wx-link,
body #ast-desktop-header .main-header-menu > li.weather-menu-item.current_page_item > a.jegpf-wx-link,
body #ast-desktop-header .main-header-menu > li.weather-menu-item.current-menu-ancestor > a.jegpf-wx-link,
body .ast-mobile-header-wrap .main-header-menu > li.weather-menu-item.current-menu-item > a.jegpf-wx-link,
body .ast-mobile-header-wrap .main-header-menu > li.weather-menu-item.current_page_item > a.jegpf-wx-link,
body .ast-mobile-header-wrap .main-header-menu > li.weather-menu-item.current-menu-ancestor > a.jegpf-wx-link,
body .ast-mobile-popup-drawer .main-header-menu > li.weather-menu-item.current-menu-item > a.jegpf-wx-link,
body .ast-mobile-popup-drawer .main-header-menu > li.weather-menu-item.current_page_item > a.jegpf-wx-link,
body .ast-mobile-popup-drawer .main-header-menu > li.weather-menu-item.current-menu-ancestor > a.jegpf-wx-link,
body .ast-mobile-popup-content .main-header-menu > li.weather-menu-item.current-menu-item > a.jegpf-wx-link,
body .ast-mobile-popup-content .main-header-menu > li.weather-menu-item.current_page_item > a.jegpf-wx-link,
body .ast-mobile-popup-content .main-header-menu > li.weather-menu-item.current-menu-ancestor > a.jegpf-wx-link {
    background: var(--card-hover) !important;
    border-color: var(--icon-border) !important;
    color: var(--text-heading) !important;
    box-shadow: inset 0 -3px 0 var(--forest-1), var(--shadow-base) !important;
}

@media (max-width: 1024px) {
    body .ast-mobile-header-wrap .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body .ast-mobile-header-wrap .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body .ast-mobile-header-wrap .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body .ast-mobile-header-content .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body .ast-mobile-header-content .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body .ast-mobile-header-content .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body .ast-mobile-popup-drawer .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body .ast-mobile-popup-drawer .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body .ast-mobile-popup-drawer .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body .ast-mobile-popup-content .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body .ast-mobile-popup-content .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body .ast-mobile-popup-content .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body .main-header-bar-navigation.toggle-on .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body .main-header-bar-navigation.toggle-on .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body .main-header-bar-navigation.toggle-on .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body.ast-header-break-point .ast-mobile-header-wrap .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body.ast-header-break-point .ast-mobile-header-wrap .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body.ast-header-break-point .ast-mobile-header-wrap .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body.ast-header-break-point .ast-mobile-header-content .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body.ast-header-break-point .ast-mobile-header-content .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body.ast-header-break-point .ast-mobile-header-content .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body.ast-header-break-point .ast-mobile-popup-drawer .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body.ast-header-break-point .ast-mobile-popup-drawer .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body.ast-header-break-point .ast-mobile-popup-drawer .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body.ast-header-break-point .ast-mobile-popup-content .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body.ast-header-break-point .ast-mobile-popup-content .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body.ast-header-break-point .ast-mobile-popup-content .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body.ast-header-break-point .main-header-bar-navigation.toggle-on .main-header-menu li.menu-item .sub-menu li.current-menu-item > a.menu-link,
    body.ast-header-break-point .main-header-bar-navigation.toggle-on .main-header-menu li.menu-item .sub-menu li.current_page_item > a.menu-link,
    body.ast-header-break-point .main-header-bar-navigation.toggle-on .main-header-menu li.menu-item .sub-menu li.current-menu-ancestor > a.menu-link,
    body .ast-mobile-header-wrap .main-header-menu .sub-menu li.current-menu-item > .menu-link,
    body .ast-mobile-header-wrap .main-header-menu .sub-menu li.current_page_item > .menu-link,
    body .ast-mobile-header-wrap .main-header-menu .sub-menu li.current-menu-ancestor > .menu-link,
    body .ast-mobile-header-content .main-header-menu .sub-menu li.current-menu-item > .menu-link,
    body .ast-mobile-header-content .main-header-menu .sub-menu li.current_page_item > .menu-link,
    body .ast-mobile-header-content .main-header-menu .sub-menu li.current-menu-ancestor > .menu-link,
    body .ast-mobile-popup-drawer .main-header-menu .sub-menu li.current-menu-item > .menu-link,
    body .ast-mobile-popup-drawer .main-header-menu .sub-menu li.current_page_item > .menu-link,
    body .ast-mobile-popup-drawer .main-header-menu .sub-menu li.current-menu-ancestor > .menu-link,
    body .ast-mobile-popup-content .main-header-menu .sub-menu li.current-menu-item > .menu-link,
    body .ast-mobile-popup-content .main-header-menu .sub-menu li.current_page_item > .menu-link,
    body .ast-mobile-popup-content .main-header-menu .sub-menu li.current-menu-ancestor > .menu-link,
    body .main-header-bar-navigation.toggle-on .main-header-menu .sub-menu li.current-menu-item > .menu-link,
    body .main-header-bar-navigation.toggle-on .main-header-menu .sub-menu li.current_page_item > .menu-link,
    body .main-header-bar-navigation.toggle-on .main-header-menu .sub-menu li.current-menu-ancestor > .menu-link {
        background: var(--card-hover) !important;
        border-color: var(--icon-border) !important;
        border-radius: var(--radius-book) !important;
        color: var(--text-heading) !important;
        box-shadow: inset 0 -3px 0 var(--forest-1), 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body #masthead.site-header,
    body .site-header,
    body .main-header-menu .menu-link,
    body .ast-menu-toggle,
    body .menu-toggle {
        transition: none !important;
    }

    body .main-header-menu .menu-item:hover > .menu-link,
    body .main-header-menu .menu-item:focus-within > .menu-link {
        transform: none !important;
    }
}

@media (min-width: 922px) {
    body #ast-desktop-header .site-title a,
    body #masthead.site-header .site-title a {
        white-space: nowrap !important;
        font-size: clamp(1.15rem, 1.65vw, 1.85rem) !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children > .sub-menu {
        position: fixed !important;
        top: var(--jegpf-dropdown-top, 150px) !important;
        left: var(--jegpf-dropdown-left, 50vw) !important;
        right: auto !important;
        margin-top: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100000 !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children.is-jegpf-dropdown-open > .sub-menu,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:hover > .sub-menu,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:focus-within > .sub-menu {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

body #ast-desktop-header .main-header-menu > li.menu-item-has-children:not(:hover):not(:focus-within):not(.is-jegpf-dropdown-open) > .sub-menu {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* Desktop navbar polish: moderate inset, soft button affordance, and natural dropdown panels. */
@media (min-width: 1025px) {
    :root {
        --fg-nav-x: clamp(40px, 2.4vw, 48px);
        --fg-nav-gap: 10px;
        --fg-nav-link-x: 15px;
        --fg-nav-link-y: 9px;
        --jegpf-donate-green: #3f604d;
        --jegpf-donate-green-hover: #49705a;
    }

    body #masthead.site-header .site-primary-header-wrap,
    body #ast-desktop-header .site-primary-header-wrap,
    body #ast-desktop-header .ast-container,
    body #ast-desktop-header .ast-builder-grid-row {
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: var(--fg-nav-x) !important;
        padding-right: var(--fg-nav-x) !important;
    }

    body #ast-desktop-header .site-header-primary-section-left {
        margin-right: clamp(18px, 2vw, 38px) !important;
    }

    body #ast-desktop-header .site-branding,
    body #ast-desktop-header .ast-site-identity {
        max-width: min(42vw, 520px) !important;
    }

    body #ast-desktop-header .site-title {
        max-width: 330px !important;
        font-size: clamp(15px, 1.08vw, 18px) !important;
        line-height: 1.08 !important;
    }

    body #ast-desktop-header .main-header-menu > li > .menu-link,
    body #ast-desktop-header .main-header-menu > li > a.jegpf-wx-link {
        cursor: pointer !important;
        background: rgba(255, 251, 250, 0.74) !important;
        border: 1px solid rgba(53, 71, 59, 0.18) !important;
        box-shadow: 0 2px 8px rgba(27, 50, 39, 0.08) !important;
        color: var(--text-heading) !important;
    }

    body #ast-desktop-header .main-header-menu > li:hover > .menu-link,
    body #ast-desktop-header .main-header-menu > li:focus-within > .menu-link,
    body #ast-desktop-header .main-header-menu > li.is-jegpf-dropdown-open > .menu-link,
    body #ast-desktop-header .main-header-menu > li > .menu-link:hover,
    body #ast-desktop-header .main-header-menu > li > .menu-link:focus-visible {
        background: #fffbfa !important;
        border-color: rgba(53, 71, 59, 0.34) !important;
        box-shadow: 0 7px 18px rgba(27, 50, 39, 0.16) !important;
        transform: translateY(-1px) !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children > .menu-link .dropdown-menu-toggle {
        width: 20px !important;
        height: 20px !important;
        margin-left: 8px !important;
        border: 1px solid rgba(53, 71, 59, 0.22) !important;
        border-radius: 999px !important;
        background: rgba(244, 239, 230, 0.62) !important;
        transition: transform 0.24s ease, background-color 0.24s ease, border-color 0.24s ease !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:hover > .menu-link .dropdown-menu-toggle,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:focus-within > .menu-link .dropdown-menu-toggle,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children.is-jegpf-dropdown-open > .menu-link .dropdown-menu-toggle {
        background: #f4efe6 !important;
        border-color: rgba(53, 71, 59, 0.4) !important;
        transform: rotate(180deg) !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children > .sub-menu {
        min-width: 220px !important;
        width: max-content !important;
        max-width: min(320px, calc(100vw - 32px)) !important;
        padding: 10px !important;
        border: 1px solid rgba(53, 71, 59, 0.22) !important;
        border-radius: 8px !important;
        background: #f8f1e8 !important;
        box-shadow: 0 18px 36px rgba(17, 36, 27, 0.22) !important;
        transform: translateX(-50%) translateY(6px) !important;
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children > .sub-menu::before {
        content: "" !important;
        position: absolute !important;
        top: -7px !important;
        left: 50% !important;
        width: 12px !important;
        height: 12px !important;
        background: #f8f1e8 !important;
        border-left: 1px solid rgba(53, 71, 59, 0.22) !important;
        border-top: 1px solid rgba(53, 71, 59, 0.22) !important;
        transform: translateX(-50%) rotate(45deg) !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children.is-jegpf-dropdown-open > .sub-menu,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:hover > .sub-menu,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:focus-within > .sub-menu {
        transform: translateX(-50%) translateY(0) !important;
    }

    body #ast-desktop-header .main-header-menu .sub-menu .menu-link {
        display: flex !important;
        align-items: center !important;
        min-width: 200px !important;
        min-height: 42px !important;
        padding: 10px 12px !important;
        border: 1px solid transparent !important;
        border-radius: 6px !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--text-body) !important;
        transform: none !important;
    }

    body #ast-desktop-header .main-header-menu .sub-menu .menu-link:hover,
    body #ast-desktop-header .main-header-menu .sub-menu .menu-link:focus-visible {
        background: #fffbfa !important;
        border-color: rgba(53, 71, 59, 0.14) !important;
        color: var(--text-heading) !important;
    }

    body #ast-desktop-header .main-header-menu .donate-bubble > .menu-link,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"],
    body .main-header-menu .donate-bubble > .menu-link,
    body .main-header-menu a.menu-link[href*="/donate"] {
        background: var(--jegpf-donate-green) !important;
        border-color: var(--jegpf-donate-green-hover) !important;
        color: #fffaf2 !important;
        box-shadow: 0 7px 18px rgba(27, 50, 39, 0.2) !important;
        animation: jegpfDonatePulse 4.2s ease-in-out infinite !important;
    }

    body #ast-desktop-header .main-header-menu .donate-bubble:hover > .menu-link,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]:hover,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]:focus-visible,
    body .main-header-menu .donate-bubble:hover > .menu-link,
    body .main-header-menu a.menu-link[href*="/donate"]:hover,
    body .main-header-menu a.menu-link[href*="/donate"]:focus-visible {
        background: var(--jegpf-donate-green-hover) !important;
        border-color: #5a8169 !important;
        color: #fffaf2 !important;
    }

    body #ast-desktop-header .main-header-menu .donate-bubble > .menu-link::after,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]::after,
    body .main-header-menu .donate-bubble > .menu-link::after,
    body .main-header-menu a.menu-link[href*="/donate"]::after {
        animation: jegpfDonateShine 4.2s ease-in-out infinite !important;
    }
}

@keyframes jegpfDonatePulse {
    0%, 100% {
        box-shadow: 0 7px 18px rgba(27, 50, 39, 0.2);
    }
    50% {
        box-shadow: 0 9px 24px rgba(63, 96, 77, 0.34);
    }
}

@keyframes jegpfDonateShine {
    0%, 58% {
        transform: translateX(-125%);
    }
    76%, 100% {
        transform: translateX(125%);
    }
}

@media (prefers-reduced-motion: reduce) {
    body .main-header-menu .donate-bubble > .menu-link,
    body .main-header-menu a.menu-link[href*="/donate"],
    body .main-header-menu .donate-bubble > .menu-link::after,
    body .main-header-menu a.menu-link[href*="/donate"]::after {
        animation: none !important;
    }
}

@media (max-width: 921px) {
    body #masthead.site-header .site-title,
    body #masthead.site-header .site-title a,
    body .ast-mobile-header-wrap .site-title,
    body .ast-mobile-header-wrap .site-title a {
        display: none !important;
    }
}

/* Final desktop navbar tuning: keep laptop nav on one line and refine button affordance. */
@media (min-width: 1025px) {
    :root {
        --fg-nav-x: clamp(24px, 2.2vw, 42px);
        --fg-nav-gap: 8px;
        --fg-nav-link-x: 13px;
        --fg-nav-link-y: 9px;
        --jegpf-nav-button-bg: #fbf4ea;
        --jegpf-nav-button-hover: #fffaf2;
        --jegpf-nav-button-border: rgba(53, 71, 59, 0.22);
        --jegpf-nav-button-shadow: 0 3px 10px rgba(27, 50, 39, 0.1);
        --jegpf-nav-button-shadow-hover: 0 8px 18px rgba(27, 50, 39, 0.16);
        --jegpf-donate-green: #4f765f;
        --jegpf-donate-green-hover: #5b886c;
    }

    body #ast-desktop-header .site-header-primary-section-left {
        margin-right: clamp(14px, 1.6vw, 28px) !important;
    }

    body #ast-desktop-header .site-branding,
    body #ast-desktop-header .ast-site-identity {
        max-width: min(38vw, 470px) !important;
    }

    body #ast-desktop-header .site-title {
        max-width: 310px !important;
        font-size: clamp(14px, 1vw, 17px) !important;
    }

    body #ast-desktop-header .ast-builder-menu-1 .main-header-menu,
    body .main-header-bar .main-header-menu {
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: var(--fg-nav-gap) !important;
    }

    body #ast-desktop-header .main-header-menu > li {
        flex: 0 0 auto !important;
    }

    body #ast-desktop-header .main-header-menu > li > .menu-link,
    body #ast-desktop-header .main-header-menu > li > a.jegpf-wx-link {
        min-height: 42px !important;
        padding: var(--fg-nav-link-y) var(--fg-nav-link-x) !important;
        background: var(--jegpf-nav-button-bg) !important;
        border-color: var(--jegpf-nav-button-border) !important;
        color: var(--text-heading) !important;
        box-shadow: var(--jegpf-nav-button-shadow) !important;
    }

    body #ast-desktop-header .main-header-menu > li:hover > .menu-link,
    body #ast-desktop-header .main-header-menu > li:focus-within > .menu-link,
    body #ast-desktop-header .main-header-menu > li.is-jegpf-dropdown-open > .menu-link,
    body #ast-desktop-header .main-header-menu > li > .menu-link:hover,
    body #ast-desktop-header .main-header-menu > li > .menu-link:focus-visible {
        background: var(--jegpf-nav-button-hover) !important;
        border-color: rgba(53, 71, 59, 0.38) !important;
        box-shadow: var(--jegpf-nav-button-shadow-hover) !important;
        color: var(--text-heading) !important;
        transform: translateY(-1px) !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children > .menu-link .dropdown-menu-toggle,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children > a.jegpf-wx-link .dropdown-menu-toggle {
        display: inline-grid !important;
        place-items: center !important;
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
        margin: 0 0 0 8px !important;
        padding: 0 !important;
        border: 1px solid rgba(53, 71, 59, 0.24) !important;
        border-radius: 999px !important;
        background: rgba(244, 239, 230, 0.78) !important;
        line-height: 0 !important;
        transform: none !important;
    }

    body #ast-desktop-header .dropdown-menu-toggle .ast-icon,
    body #ast-desktop-header .dropdown-menu-toggle .ahfb-svg-iconset {
        display: grid !important;
        place-items: center !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
    }

    body #ast-desktop-header .dropdown-menu-toggle .ast-arrow-svg {
        display: block !important;
        width: 12px !important;
        height: 12px !important;
        margin: 0 !important;
        transform-origin: center center !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:hover > .menu-link .dropdown-menu-toggle,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:focus-within > .menu-link .dropdown-menu-toggle,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children.is-jegpf-dropdown-open > .menu-link .dropdown-menu-toggle {
        background: #efe4d5 !important;
        border-color: rgba(53, 71, 59, 0.42) !important;
        transform: none !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:hover > .menu-link .dropdown-menu-toggle .ast-arrow-svg,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children:focus-within > .menu-link .dropdown-menu-toggle .ast-arrow-svg,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children.is-jegpf-dropdown-open > .menu-link .dropdown-menu-toggle .ast-arrow-svg,
    body #ast-desktop-header .ast-submenu-expanded > .menu-link .dropdown-menu-toggle .ast-arrow-svg {
        transform: rotate(180deg) !important;
    }

    body #ast-desktop-header .main-header-menu .donate-bubble > .menu-link,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"],
    body .main-header-menu .donate-bubble > .menu-link,
    body .main-header-menu a.menu-link[href*="/donate"] {
        background: var(--jegpf-donate-green) !important;
        border-color: rgba(255, 255, 255, 0.22) !important;
        color: #fffaf2 !important;
        box-shadow: 0 8px 20px rgba(27, 50, 39, 0.22) !important;
        animation: jegpfDonatePulse 4.2s ease-in-out infinite !important;
    }

    body #ast-desktop-header .main-header-menu .donate-bubble > .menu-link::after,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]::after,
    body .main-header-menu .donate-bubble > .menu-link::after,
    body .main-header-menu a.menu-link[href*="/donate"]::after {
        animation: jegpfDonateShine 4.2s ease-in-out infinite !important;
    }

    body #ast-desktop-header .main-header-menu .donate-bubble:hover > .menu-link,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]:hover,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]:focus-visible,
    body .main-header-menu .donate-bubble:hover > .menu-link,
    body .main-header-menu a.menu-link[href*="/donate"]:hover,
    body .main-header-menu a.menu-link[href*="/donate"]:focus-visible {
        background: var(--jegpf-donate-green-hover) !important;
        border-color: rgba(255, 255, 255, 0.34) !important;
        color: #fffaf2 !important;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    :root {
        --fg-nav-x: 16px;
        --fg-nav-gap: 6px;
        --fg-nav-link-x: 9px;
        --fg-nav-link-y: 7px;
        --fg-nav-logo: 48px;
    }

    body #ast-desktop-header .site-header-primary-section-left {
        margin-right: 12px !important;
        min-width: 0 !important;
    }

    body #ast-desktop-header .site-branding,
    body #ast-desktop-header .ast-site-identity {
        gap: 8px !important;
        max-width: min(36vw, 360px) !important;
        min-width: 0 !important;
    }

    body #ast-desktop-header .site-title {
        max-width: 280px !important;
        font-size: clamp(13px, 1vw, 15px) !important;
        line-height: 1.08 !important;
        white-space: nowrap !important;
    }

    body #ast-desktop-header .site-title a {
        white-space: nowrap !important;
    }

    body #ast-desktop-header .site-primary-header-wrap,
    body #ast-desktop-header .ast-builder-grid-row {
        min-height: 70px !important;
    }

    body #ast-desktop-header .main-header-menu > li > .menu-link,
    body #ast-desktop-header .main-header-menu > li > a.jegpf-wx-link {
        min-height: 38px !important;
        font-size: 13px !important;
        line-height: 1.05 !important;
    }

    body #ast-desktop-header .main-header-menu > li.menu-item-has-children > .menu-link .dropdown-menu-toggle,
    body #ast-desktop-header .main-header-menu > li.menu-item-has-children > a.jegpf-wx-link .dropdown-menu-toggle {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        margin-left: 6px !important;
    }

    body #ast-desktop-header .jegpf-nav-profile,
    body #ast-desktop-header .menu-item.jegpf-nav-profile {
        margin-left: 4px !important;
        align-self: center !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body #ast-desktop-header .main-header-menu .donate-bubble > .menu-link,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"],
    body .main-header-menu .donate-bubble > .menu-link,
    body .main-header-menu a.menu-link[href*="/donate"],
    body #ast-desktop-header .main-header-menu .donate-bubble > .menu-link::after,
    body #ast-desktop-header .main-header-menu a.menu-link[href*="/donate"]::after,
    body .main-header-menu .donate-bubble > .menu-link::after,
    body .main-header-menu a.menu-link[href*="/donate"]::after {
        animation: none !important;
    }
}
