/**
 * Blade Boss Navigation v2.1 — "Best Nav Bar on the Planet"
 * 
 * ID-SCOPED for bulletproof CSS isolation.
 * Every selector is scoped under its parent element ID:
 *   #bbDesktopNav  — Desktop floating pill
 *   #bbMobileHeader — Mobile top bar
 *   #bbSlideMenu   — Slide-out right menu
 *   #bbMenuOverlay — Dark overlay behind slide menu
 *   #bbTabBar      — iOS bottom tab bar
 *
 * ID specificity (1-0-0) beats ANY class-based CSS (0-x-0),
 * so no external stylesheet (calendar, Elementor, theme, etc.)
 * can ever override these styles. No !important needed.
 *
 * Features:
 *   - Floating centered pill (desktop)
 *   - Glassmorphic backdrop blur + saturate
 *   - Multi-layer premium shadows
 *   - Gradient underline (green -> orange) on hover
 *   - Shimmer sweep on CTA button
 *   - floatDown entrance animation
 *   - Avatar pill + dropdown (logged-in)
 *   - iOS bottom tab bar (mobile)
 *   - Right-side slide-out menu (mobile)
 *   - Hamburger -> X morphing animation
 *   - Hide on scroll down, reveal on scroll up
 *   - Design tokens integration
 *   - View Transition persistence
 *   - 48px touch targets everywhere
 *   - Proper ARIA focus styles
 */


/* ================================================
   SHARED / ALL BREAKPOINTS
   ================================================ */

/* View Transition: nav persists across page navigations.
   Each element MUST have a unique name (spec requirement).
   Elements hidden via display:none don't participate, but
   mobile header + tab bar are both visible on mobile. */
#bbDesktopNav {
    view-transition-name: bb-desktop-nav;
}
#bbMobileHeader {
    view-transition-name: bb-mobile-header;
}
#bbTabBar {
    view-transition-name: bb-tab-bar;
}

/* Scoped reset — ID specificity prevents external CSS bleed-in */
#bbDesktopNav *,
#bbDesktopNav *::before,
#bbDesktopNav *::after,
#bbMobileHeader *,
#bbMobileHeader *::before,
#bbMobileHeader *::after,
#bbSlideMenu *,
#bbSlideMenu *::before,
#bbSlideMenu *::after,
#bbTabBar *,
#bbTabBar *::before,
#bbTabBar *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Shared font stack */
#bbDesktopNav,
#bbDesktopNav a,
#bbDesktopNav button,
#bbDesktopNav span,
#bbMobileHeader,
#bbMobileHeader a,
#bbMobileHeader button,
#bbSlideMenu,
#bbSlideMenu a,
#bbSlideMenu button,
#bbTabBar,
#bbTabBar a,
#bbTabBar button {
    font-family: var(--font-body, 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animation keyframes */
@keyframes floatDown {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(0.96);
    }
    60% {
        opacity: 1;
        transform: translateX(-50%) translateY(4px) scale(1.005);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes dropdownReveal {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow:
            0 2px 8px rgba(245, 120, 66, 0.25),
            0 4px 16px rgba(245, 120, 66, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            0 0 0 0 rgba(245, 120, 66, 0.4);
    }
    50% {
        box-shadow:
            0 2px 8px rgba(245, 120, 66, 0.25),
            0 4px 16px rgba(245, 120, 66, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            0 0 0 6px rgba(245, 120, 66, 0);
    }
}


/* ================================================
   DESKTOP FLOATING PILL
   ================================================ */
@media (min-width: 768px) {
    #bbDesktopNav {
        position: fixed;
        top: 24px;
        left: 50%;
        transform: translateX(-50%);
        z-index: var(--z-nav, 9999);
        will-change: transform;

        /* Glassmorphic */
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.6);

        /* Floating pill */
        border-radius: 60px;
        padding: 10px 24px 10px 28px;
        min-height: 60px;
        max-width: calc(100vw - 40px);

        /* Premium multi-layer shadows */
        box-shadow:
            0 1px 2px rgba(0, 0, 0, 0.03),
            0 4px 12px rgba(0, 0, 0, 0.05),
            0 12px 40px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);

        /* Layout */
        display: flex;
        align-items: center;
        gap: 36px;

        /* Entrance */
        animation: floatDown 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);

        /* Transitions */
        transition:
            top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            background 0.4s ease,
            box-shadow 0.4s ease,
            transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease;
    }

    /* Subtle glow ring on hover */
    #bbDesktopNav::after {
        content: '';
        position: absolute;
        inset: -2px;
        background: linear-gradient(
            135deg,
            transparent 20%,
            rgba(30, 94, 52, 0.08) 50%,
            transparent 80%
        );
        border-radius: 60px;
        opacity: 0;
        z-index: -1;
        transition: opacity 0.4s ease;
        pointer-events: none;
    }

    #bbDesktopNav:hover::after {
        opacity: 1;
    }

    /* -- Scrolled state -- */
    #bbDesktopNav.scrolled {
        top: 12px;
        padding: 8px 20px 8px 24px;
        background: rgba(255, 255, 255, 0.97);
        box-shadow:
            0 2px 4px rgba(0, 0, 0, 0.04),
            0 8px 24px rgba(0, 0, 0, 0.08),
            0 16px 56px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    /* -- Hidden state (scroll down) -- */
    #bbDesktopNav.nav-hidden {
        transform: translateX(-50%) translateY(-120px);
        opacity: 0;
        pointer-events: none;
    }

    /* -- Logo -- */
    #bbDesktopNav .bb-logo-link {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        margin-right: 8px;
        transition: transform 0.3s var(--ease-out, ease);
    }

    #bbDesktopNav .bb-logo {
        height: 36px !important;
        width: auto !important;
        max-width: 150px !important;
        object-fit: contain;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.08));
        transition: height 0.35s var(--ease-out, ease), max-width 0.35s var(--ease-out, ease), transform 0.35s var(--ease-out, ease), filter 0.35s var(--ease-out, ease);
    }

    #bbDesktopNav.scrolled .bb-logo {
        height: 30px !important;
        max-width: 130px !important;
    }

    #bbDesktopNav .bb-logo-link:hover .bb-logo {
        transform: scale(1.06) rotate(-1.5deg);
        filter: drop-shadow(0 3px 8px rgba(30, 94, 52, 0.18));
    }

    /* -- Nav links -- */
    #bbDesktopNav .bb-nav-menu {
        display: flex;
        align-items: center;
        gap: 28px;
        list-style: none;
        margin: 0 auto 0 0;
    }

    #bbDesktopNav .bb-nav-link {
        color: var(--bb-charcoal, #2A2A2A);
        text-decoration: none;
        font-size: 14.5px;
        font-weight: 550;
        letter-spacing: 0.01em;
        position: relative;
        padding: 8px 2px;
        white-space: nowrap;
        transition: color 0.3s ease, opacity 0.3s ease;
        opacity: 0.75;
    }

    #bbDesktopNav .bb-nav-link:hover {
        opacity: 1;
        color: var(--bb-green, #1E5E34);
    }

    /* The gradient underline — green -> orange */
    #bbDesktopNav .bb-nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2.5px;
        background: linear-gradient(90deg, var(--bb-green, #1E5E34), var(--bb-orange, #F57842));
        border-radius: 2px;
        transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #bbDesktopNav .bb-nav-link:hover::after,
    #bbDesktopNav .bb-nav-link.active::after {
        width: 100%;
        left: 0;
    }

    #bbDesktopNav .bb-nav-link.active {
        color: var(--bb-green, #1E5E34);
        font-weight: 650;
        opacity: 1;
    }

    /* Focus visible */
    #bbDesktopNav .bb-nav-link:focus-visible {
        outline: 2px solid var(--bb-orange, #F57842);
        outline-offset: 4px;
        border-radius: 4px;
    }

    /* -- CTA area -- */
    #bbDesktopNav .bb-nav-cta {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    /* Login pill button */
    #bbDesktopNav .bb-nav-login-link {
        color: var(--bb-green, #1E5E34);
        background: rgba(30, 94, 52, 0.07);
        border: 1px solid rgba(30, 94, 52, 0.18);
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        padding: 9px 20px;
        border-radius: 30px;
        transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
        white-space: nowrap;
    }

    #bbDesktopNav .bb-nav-login-link:hover {
        background: rgba(30, 94, 52, 0.12);
        border-color: rgba(30, 94, 52, 0.3);
        transform: translateY(-1px);
    }

    #bbDesktopNav .bb-nav-login-link:focus-visible {
        outline: 2px solid var(--bb-green, #1E5E34);
        outline-offset: 2px;
    }

    /* Join Now — premium CTA with shimmer */
    #bbDesktopNav .bb-nav-join {
        display: inline-flex;
        align-items: center;
        padding: 10px 26px;
        background: linear-gradient(135deg, var(--bb-orange, #F57842) 0%, #E86A2E 100%);
        color: #fff;
        border: none;
        border-radius: 30px;
        font-size: 14.5px;
        font-weight: 700;
        letter-spacing: 0.02em;
        text-decoration: none;
        position: relative;
        overflow: hidden;
        white-space: nowrap;
        cursor: pointer;
        box-shadow:
            0 2px 8px rgba(245, 120, 66, 0.25),
            0 4px 16px rgba(245, 120, 66, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        animation: pulseGlow 2s ease-in-out infinite;
        transition: transform 0.35s var(--ease-out, ease), box-shadow 0.35s var(--ease-out, ease);
    }

    /* Shimmer sweep */
    #bbDesktopNav .bb-nav-join::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent
        );
        transition: none;
    }

    #bbDesktopNav .bb-nav-join:hover::before {
        animation: shimmer 0.6s ease forwards;
    }

    #bbDesktopNav .bb-nav-join:hover {
        transform: translateY(-2px) scale(1.03);
        animation: none;
        box-shadow:
            0 4px 12px rgba(245, 120, 66, 0.35),
            0 8px 28px rgba(245, 120, 66, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        color: #fff;
    }

    #bbDesktopNav .bb-nav-join:active {
        transform: translateY(0) scale(0.98);
        transition-duration: 0.1s;
    }

    #bbDesktopNav .bb-nav-join:focus-visible {
        outline: 2px solid var(--bb-orange, #F57842);
        outline-offset: 3px;
    }


    /* === LOGGED-IN: USER DROPDOWN === */

    #bbDesktopNav .bb-user-dropdown {
        position: relative;
    }

    #bbDesktopNav .bb-user-info {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 5px 14px 5px 5px;
        background: rgba(30, 94, 52, 0.05);
        border: 1px solid rgba(30, 94, 52, 0.12);
        border-radius: 30px;
        cursor: pointer;
        height: 42px;
        transition: background 0.3s ease, border-color 0.3s ease;
        font-size: 0; /* collapse whitespace */
        white-space: nowrap;
        -webkit-user-select: none;
        user-select: none;
    }

    #bbDesktopNav .bb-user-info:hover {
        background: rgba(30, 94, 52, 0.1);
        border-color: rgba(30, 94, 52, 0.22);
    }

    #bbDesktopNav .bb-user-info:focus-visible {
        outline: 2px solid var(--bb-green, #1E5E34);
        outline-offset: 2px;
    }

    #bbDesktopNav .bb-user-avatar {
        width: 30px;
        height: 30px;
        background: linear-gradient(135deg, var(--bb-green, #1E5E34) 0%, #2A7A48 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 2px 6px rgba(30, 94, 52, 0.2);
    }

    #bbDesktopNav .bb-avatar-initial {
        color: #fff;
        font-weight: 700;
        font-size: 14px;
        text-transform: uppercase;
        line-height: 1;
    }

    #bbDesktopNav .bb-username {
        font-size: 13px !important;
        font-weight: 600;
        color: var(--bb-charcoal, #2A2A2A) !important;
        letter-spacing: 0.01em;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #bbDesktopNav .bb-chevron {
        margin-left: 2px;
        transition: transform 0.3s var(--ease-out, ease);
        color: var(--bb-charcoal, #2A2A2A);
        opacity: 0.5;
    }

    #bbDesktopNav .bb-user-dropdown.open .bb-chevron {
        transform: rotate(180deg);
    }

    /* Dropdown menu */
    #bbDesktopNav .bb-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 14px;
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.06),
            0 12px 40px rgba(0, 0, 0, 0.12);
        min-width: 220px;
        padding: 6px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(0.96);
        transform-origin: top right;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        z-index: calc(var(--z-nav, 9999) + 1);
    }

    #bbDesktopNav .bb-dropdown-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        animation: dropdownReveal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        animation-fill-mode: both;
    }

    #bbDesktopNav .bb-dropdown-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        color: var(--bb-charcoal, #2A2A2A);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        border-radius: 10px;
        transition: background 0.15s ease, color 0.15s ease;
        cursor: pointer;
        border: none;
        background: none;
        width: 100%;
        text-align: left;
    }

    #bbDesktopNav .bb-dropdown-item svg {
        opacity: 0.5;
        flex-shrink: 0;
        transition: opacity 0.15s ease;
    }

    #bbDesktopNav .bb-dropdown-item:hover {
        background: rgba(30, 94, 52, 0.06);
        color: var(--bb-green, #1E5E34);
    }

    #bbDesktopNav .bb-dropdown-item:hover svg {
        opacity: 0.8;
    }

    #bbDesktopNav .bb-dropdown-divider {
        height: 1px;
        background: rgba(0, 0, 0, 0.06);
        margin: 4px 8px;
    }

    #bbDesktopNav .bb-dropdown-logout {
        color: #dc2626;
    }

    #bbDesktopNav .bb-dropdown-logout:hover {
        background: rgba(239, 68, 68, 0.06);
        color: #dc2626;
    }

    #bbDesktopNav .bb-dropdown-logout svg {
        stroke: #dc2626;
    }


    /* -- Hide mobile elements on desktop -- */
    #bbMobileHeader,
    #bbTabBar,
    #bbSlideMenu,
    #bbMenuOverlay {
        display: none !important;
    }
}


/* ================================================
   TABLET REFINEMENTS (768-1024)
   ================================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    #bbDesktopNav {
        padding: 8px 14px 8px 18px;
        gap: 16px;
    }

    #bbDesktopNav .bb-nav-menu {
        gap: 12px;
    }

    #bbDesktopNav .bb-nav-link {
        font-size: 13px;
        padding: 6px 1px;
    }

    #bbDesktopNav .bb-logo {
        height: 28px;
    }

    #bbDesktopNav .bb-nav-login-link {
        padding: 8px 14px;
        font-size: 13px;
    }

    #bbDesktopNav .bb-nav-join {
        padding: 9px 16px;
        font-size: 13px;
    }
}

/* ================================================
   LARGE TABLET / SMALL LAPTOP (1025-1200)
   ================================================ */
@media (min-width: 1025px) and (max-width: 1200px) {
    #bbDesktopNav {
        gap: 28px;
    }

    #bbDesktopNav .bb-nav-menu {
        gap: 22px;
    }

    #bbDesktopNav .bb-nav-link {
        font-size: 14px;
    }
}


/* ================================================
   MOBILE (< 768px)
   ================================================ */
@media (max-width: 767px) {

    /* -- Hide desktop -- */
    #bbDesktopNav {
        display: none !important;
    }

    /* === MOBILE HEADER === */
    #bbMobileHeader {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        will-change: transform;
        height: calc(60px + env(safe-area-inset-top, 0px));
        padding-top: env(safe-area-inset-top, 0px);
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        z-index: var(--z-nav, 9999);
        display: flex;
        align-items: center;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
    }

    #bbMobileHeader.nav-hidden {
        transform: translateY(-100%);
    }

    #bbMobileHeader .bb-mobile-header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0 16px;
    }

    #bbMobileHeader .bb-mobile-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* Mobile JOIN header button */
    #bbMobileHeader .bb-mobile-join-header {
        display: inline-flex;
        align-items: center;
        background: linear-gradient(135deg, var(--bb-orange, #F57842), #E86A2E);
        color: #fff;
        border: none;
        border-radius: 20px;
        padding: 7px 16px;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        text-decoration: none;
        box-shadow: 0 2px 8px rgba(245, 120, 66, 0.3);
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.15s ease;
    }

    #bbMobileHeader .bb-mobile-join-header:active {
        transform: scale(0.94);
    }

    #bbMobileHeader .bb-mobile-logo {
        height: 30px;
        width: auto;
        display: block;
    }

    /* === HAMBURGER === */
    #bbMobileHeader .bb-hamburger {
        width: 44px;
        height: 44px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        background: none;
        border: none;
        border-radius: 12px;
        transition: background 0.2s ease;
        z-index: calc(var(--z-nav, 9999) + 2);
    }

    #bbMobileHeader .bb-hamburger:active {
        background: rgba(0, 0, 0, 0.04);
    }

    #bbMobileHeader .bb-hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--bb-charcoal, #2A2A2A);
        margin: 3px 0;
        border-radius: 2px;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }

    #bbMobileHeader .bb-hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    #bbMobileHeader .bb-hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    #bbMobileHeader .bb-hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }


    /* === SLIDE-OUT MENU === */
    #bbMenuOverlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: calc(var(--z-nav, 9999) - 1);
        -webkit-tap-highlight-color: transparent;
    }

    #bbMenuOverlay.active {
        opacity: 1;
        visibility: visible;
    }

    #bbSlideMenu {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        background: #fff;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
        z-index: calc(var(--z-nav, 9999) + 1);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-top: calc(70px + env(safe-area-inset-top, 0px));
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);

        /* Hide scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    #bbSlideMenu::-webkit-scrollbar {
        display: none;
    }

    #bbSlideMenu.active {
        transform: translateX(0);
    }

    #bbSlideMenu .bb-slide-menu-content {
        padding: 8px 20px 120px;
    }

    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        #bbSlideMenu .bb-slide-menu-content {
            padding-bottom: calc(100px + env(safe-area-inset-bottom));
        }
    }

    /* User section in slide menu */
    #bbSlideMenu .bb-mobile-user-section {
        padding: 16px 0 20px;
        margin-bottom: 8px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    #bbSlideMenu .bb-mobile-user-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    #bbSlideMenu .bb-user-avatar-lg {
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, var(--bb-green, #1E5E34) 0%, #2A7A48 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 2px 6px rgba(30, 94, 52, 0.2);
    }

    #bbSlideMenu .bb-user-avatar-lg .bb-avatar-initial {
        color: #fff;
        font-weight: 700;
        font-size: 17px;
        text-transform: uppercase;
        line-height: 1;
    }

    #bbSlideMenu .bb-mobile-username {
        font-size: 16px;
        font-weight: 700;
        color: var(--bb-charcoal, #2A2A2A);
        line-height: 1.3;
    }

    #bbSlideMenu .bb-mobile-tier {
        font-size: 13px;
        font-weight: 500;
        color: var(--bb-green, #1E5E34);
        opacity: 0.8;
    }

    /* Close button */
    #bbSlideMenu .bb-slide-close {
        position: absolute;
        top: calc(12px + env(safe-area-inset-top, 0px));
        right: 16px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 12px;
        color: var(--bb-charcoal, #2A2A2A);
        cursor: pointer;
        transition: transform 0.2s ease, background 0.2s ease;
        z-index: 2;
        -webkit-tap-highlight-color: transparent;
    }

    #bbSlideMenu .bb-slide-close:active {
        transform: scale(0.92);
        background: rgba(0, 0, 0, 0.08);
    }

    /* Menu links */
    #bbSlideMenu .bb-slide-menu-links {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    #bbSlideMenu .bb-slide-menu-links li {
        margin: 0;
    }

    #bbSlideMenu .bb-slide-menu-links a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
        color: var(--bb-charcoal, #2A2A2A);
        text-decoration: none;
        font-size: 15px;
        font-weight: 550;
        background: rgba(0, 0, 0, 0.015);
        border: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 14px;
        transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        min-height: 52px;
        position: relative;
    }

    #bbSlideMenu .bb-slide-menu-links a:active {
        transform: scale(0.98);
    }

    /* Icon container */
    #bbSlideMenu .bb-slide-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        background: rgba(30, 94, 52, 0.06);
        border-radius: 10px;
        color: var(--bb-green, #1E5E34);
        transition: background 0.2s ease, color 0.2s ease;
    }

    #bbSlideMenu .bb-slide-icon svg {
        width: 18px;
        height: 18px;
    }

    /* Label */
    #bbSlideMenu .bb-slide-label {
        flex: 1;
        letter-spacing: 0.01em;
    }

    /* Chevron arrow */
    #bbSlideMenu .bb-slide-chevron {
        flex-shrink: 0;
        color: var(--bb-charcoal, #2A2A2A);
        opacity: 0.2;
        transition: color 0.2s ease, opacity 0.2s ease;
    }

    /* Active dot */
    #bbSlideMenu .bb-slide-active-dot {
        display: none;
    }

    /* Active state */
    #bbSlideMenu .bb-slide-menu-links a.active {
        background: rgba(30, 94, 52, 0.06);
        border-color: rgba(30, 94, 52, 0.18);
        color: var(--bb-green, #1E5E34);
        font-weight: 650;
    }

    #bbSlideMenu .bb-slide-menu-links a.active .bb-slide-icon {
        background: var(--bb-green, #1E5E34);
        color: #fff;
    }

    #bbSlideMenu .bb-slide-menu-links a.active .bb-slide-chevron {
        color: var(--bb-green, #1E5E34);
        opacity: 0.5;
    }

    /* Menu footer (auth buttons) */
    #bbSlideMenu .bb-slide-menu-footer {
        padding-top: 20px;
        margin-top: 16px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Login pinned to top of menu */
    #bbSlideMenu .bb-slide-menu-login-top {
        padding-bottom: 16px;
        margin-bottom: 8px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    #bbSlideMenu .bb-slide-login {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 14px;
        background: var(--bb-charcoal, #2A2A2A);
        border: 1px solid rgba(245, 120, 66, 0.15);
        border-radius: 14px;
        color: #fff;
        text-decoration: none;
        font-size: 15px;
        font-weight: 650;
        min-height: 52px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
        transition: transform 0.2s ease;
    }

    #bbSlideMenu .bb-slide-login:active {
        transform: scale(0.97);
    }

    #bbSlideMenu .bb-slide-join {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px;
        background: linear-gradient(135deg, var(--bb-orange, #F57842), #E86A2E);
        border-radius: 14px;
        color: #fff;
        text-decoration: none;
        font-size: 15px;
        font-weight: 700;
        min-height: 52px;
        box-shadow: 0 4px 15px rgba(245, 120, 66, 0.3);
        transition: transform 0.2s ease;
    }

    #bbSlideMenu .bb-slide-join:active {
        transform: scale(0.97);
    }

    #bbSlideMenu .bb-mobile-logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px;
        background: rgba(239, 68, 68, 0.05);
        border: 1px solid rgba(239, 68, 68, 0.12);
        border-radius: 14px;
        color: #dc2626;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        min-height: 48px;
        transition: transform 0.2s ease;
    }

    #bbSlideMenu .bb-mobile-logout-btn:active {
        transform: scale(0.97);
    }


    /* Keyboard focus for mobile nav elements */
    .bb-hamburger:focus-visible,
    .bb-slide-close:focus-visible,
    .bb-slide-menu-links a:focus-visible,
    .bb-slide-login:focus-visible,
    .bb-slide-join:focus-visible,
    .bb-mobile-logout-btn:focus-visible,
    .bb-tab:focus-visible {
        outline: 2px solid var(--bb-green, #1E5E34);
        outline-offset: 2px;
    }


    /* === iOS BOTTOM TAB BAR === */
    #bbTabBar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        will-change: transform;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        z-index: calc(var(--z-nav, 9999) - 2);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.04);
    }

    #bbTabBar .bb-tabs {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 56px;
        padding: 0 8px;
    }

    #bbTabBar .bb-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: var(--bb-charcoal, #2A2A2A);
        opacity: 0.62;
        transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        padding: 6px 4px;
        border-radius: 10px;
        min-height: 48px;
        background: none;
        border: none;
        cursor: pointer;
        font-family: var(--font-body, 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif);
    }

    #bbTabBar .bb-tab:active {
        transform: scale(0.92);
    }

    #bbTabBar .bb-tab.active {
        color: var(--bb-green, #1E5E34);
        opacity: 1;
    }

    #bbTabBar .bb-tab.active .bb-tab-icon {
        transform: scale(1.1);
    }

    #bbTabBar .bb-tab.active .bb-tab-icon svg {
        stroke-width: 2.5;
    }

    #bbTabBar .bb-tab-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s var(--ease-out, ease);
        line-height: 1;
    }

    #bbTabBar .bb-tab-icon svg {
        stroke: currentColor;
    }

    #bbTabBar .bb-tab-label {
        font-size: 10px;
        font-weight: 550;
        letter-spacing: 0.01em;
        line-height: 1;
    }

    #bbTabBar .bb-tab-more {
        color: var(--bb-orange, #F57842);
        opacity: 0.7;
    }

    #bbTabBar .bb-tab-more.active {
        color: var(--bb-orange, #F57842);
        opacity: 1;
    }


    /* -- Body spacing -- */
    body {
        padding-top: calc(60px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    /* -- Mobile scroll lock -- */
    body.bb-menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        /* --scroll-y set by JS to prevent iOS jump */
        top: calc(-1 * var(--scroll-y, 0px));
    }
}


/* ================================================
   DESKTOP BODY SPACING
   ================================================ */
/* TODO: Replace hardcoded 100px with calc(var(--nav-height) + 28px) 
   once all pages are migrated off Elementor. 100px = 72px nav + 28px 
   breathing room for the floating pill offset. */
@media (min-width: 768px) {
    body {
        padding-top: 100px;
    }
}


/* ================================================
   ACCESSIBILITY & MOTION
   ================================================ */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    #bbDesktopNav,
    #bbDesktopNav .bb-logo,
    #bbDesktopNav .bb-nav-link::after,
    #bbDesktopNav .bb-nav-join,
    #bbDesktopNav .bb-nav-join::before,
    #bbDesktopNav .bb-nav-login-link,
    #bbDesktopNav .bb-user-info,
    #bbDesktopNav .bb-dropdown-item,
    #bbDesktopNav .bb-dropdown-menu,
    #bbSlideMenu,
    #bbSlideMenu .bb-slide-close,
    #bbSlideMenu .bb-slide-menu-links a,
    #bbSlideMenu .bb-slide-icon,
    #bbSlideMenu .bb-slide-chevron,
    #bbSlideMenu .bb-slide-menu-login-top a,
    #bbSlideMenu .bb-slide-login,
    #bbSlideMenu .bb-slide-join,
    #bbSlideMenu .bb-mobile-logout-btn,
    #bbMobileHeader,
    #bbMobileHeader .bb-hamburger span,
    #bbTabBar .bb-tab,
    .bb-skip-link {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    #bbDesktopNav {
        animation: none;
    }
}

/* Skip link — visible on focus only */
.bb-skip-link {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bb-green, #1E5E34);
    color: #fff;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    z-index: var(--z-toast, 10300);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.bb-skip-link:focus {
    top: 0;
}


/* ================================================
   PRINT
   ================================================ */
@media print {
    #bbDesktopNav,
    #bbMobileHeader,
    #bbTabBar,
    #bbSlideMenu,
    #bbMenuOverlay {
        display: none !important;
    }

    body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONTRACT LAYER (P5 step 1, D-298; pass 28, Chris Oct 26): the home page's nav on every page rebuilt on the
   token contract. nav.php renders this markup (.bbn-wrap, .bbn, .bbn-mm) only where <html> carries data-theme;
   every other page keeps the v2 markup and the v1 rules above, untouched. Light and dark follow the tokens.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* the wordmark: one logo on every page (the nav, the menu, the footer) */
.bb-wordmark { font: 800 1.15rem/1 var(--site-font-disp); letter-spacing: 0.02em; text-decoration: none; white-space: nowrap; color: var(--ink); }
.bb-wordmark span { color: var(--brand-ink); }

/* the floating pill */
.bbn-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav, 60); padding: calc(12px + env(safe-area-inset-top, 0px)) var(--site-gut-r) 0 var(--site-gut-l); display: flex; justify-content: center; pointer-events: none; }
.bbn { pointer-events: auto; width: 100%; max-width: 880px; /* one size always (Chris, Oct 29): the wide pill at the top left a gap before Log in */ display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 7px 9px 7px 20px; border-radius: 999px; box-sizing: border-box;
  background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06); transition: box-shadow 0.4s ease; }
html[data-theme="light"] .bbn { box-shadow: 0 14px 40px rgba(14, 40, 22, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.bbn.shrunk { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
html[data-theme="light"] .bbn.shrunk { box-shadow: 0 18px 50px rgba(14, 40, 22, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.bbn *, .bbn-mm * { box-sizing: border-box; }
.bbn-links { display: none; gap: 2px; margin-left: 8px; }
.bbn-links a { position: relative; color: var(--ink-2); text-decoration: none; font: 600 0.88rem/1 var(--site-font-body); padding: 12px 14px; border-radius: 999px; transition: color 0.2s ease; }
.bbn-links a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--brand-ink), var(--warm)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease-out); }
.bbn-links a:hover, .bbn-links a.is-here { color: var(--ink); }
.bbn-links a:hover::after, .bbn-links a.is-here::after { transform: scaleX(1); }
.bbn-sp { flex: 1; }
.bbn-login { display: none; color: var(--ink-2); text-decoration: none; font: 600 0.88rem/1 var(--site-font-body); padding: 12px 14px; border-radius: 999px; transition: color 0.2s ease; }
.bbn-login:hover { color: var(--ink); }
.bbn-cta { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; text-decoration: none; overflow: hidden; white-space: nowrap;
  font: 800 0.92rem/1 var(--site-font-disp); letter-spacing: 0.06em; text-transform: uppercase; color: var(--warm-fg); background: linear-gradient(135deg, var(--warm) 0%, var(--site-warm-press) 100%);
  box-shadow: 0 10px 30px rgba(245, 120, 66, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22); transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out); }
.bbn-cta::after { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent); transform: skewX(-18deg); transition: left 0.56s ease; }
.bbn-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(245, 120, 66, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.bbn-cta:hover::after { left: 160%; }
.bbn-cta:active { transform: translateY(0); }
.bbn-cta-i { width: 17px; height: 17px; flex: none; transition: transform 0.3s var(--ease-out); }
.bbn-cta:hover .bbn-cta-i { transform: translateX(4px); }
.bbn-cta--wide { min-height: 50px; padding: 0 24px; border-radius: 14px; }
.bbn-menu-btn { width: 44px; height: 44px; border-radius: 50%; cursor: pointer; flex: none; display: grid; place-items: center; padding: 0; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); color: var(--ink); }
html[data-theme="light"] .bbn-menu-btn { background: rgba(14, 40, 22, 0.05); }
.bbn-menu-btn svg { width: 18px; height: 18px; }
.bbn a:focus-visible, .bbn button:focus-visible, .bbn-mm a:focus-visible, .bbn-mm button:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; }
/* phones: the pill stays clean (Chris, Oct 26); the Scan rides the floating pill bottom-left (.bb-fabcta), the home page's way (D-311, D-057) */
.bbn .bbn-cta-short { display: none; }
@media (max-width: 479px) { .bbn .bbn-cta { display: none; } }
@media (min-width: 860px) { .bbn-links { display: flex; } .bbn-login { display: inline-flex; } .bbn-menu-btn { display: none; } }

/* the member's pill and menu, inside the nav */
.bbn .bb-user-dropdown { position: relative; }
.bbn .bb-user-info { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 999px; cursor: pointer; background: var(--brand-soft); border: 1px solid var(--line); color: var(--ink); font: 600 0.86rem/1 var(--site-font-body); }
.bbn .bb-user-info:hover { border-color: var(--line-2); }
.bbn .bb-user-avatar, .bbn-mm .bb-user-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #FFFFFF; font: 700 0.85rem/1 var(--font-num); flex: none; }
.bbn .bb-username { color: var(--ink) !important; }
.bbn .bb-chevron { transition: transform 0.2s ease; }
.bbn .bb-user-dropdown.open .bb-chevron { transform: rotate(180deg); }
.bbn .bb-dropdown-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.2s ease, transform 0.2s var(--ease-out), visibility 0s linear 0.2s; }
.bbn .bb-dropdown-menu.active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease, transform 0.2s var(--ease-out); }
.bbn .bb-dropdown-item { display: block; padding: 10px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font: 500 0.88rem/1.3 var(--site-font-body); }
.bbn .bb-dropdown-item:hover { background: var(--brand-soft); color: var(--brand-ink); }
.bbn .bb-dropdown-divider { height: 1px; margin: 6px 4px; background: var(--line); }
.bbn .bb-dropdown-logout, .bbn .bb-dropdown-logout:hover { color: var(--danger); }
.bbn .bb-dropdown-logout:hover { background: var(--danger-soft); }
@media (max-width: 479px) { .bbn .bb-username { display: none; } .bbn .bb-user-info { padding-right: 8px; } }

/* the glass menu (phones and tablets) */
.bbn-mm { position: fixed; inset: 0; z-index: calc(var(--z-nav, 60) + 70); display: none; flex-direction: column; background: rgba(8, 12, 18, 0.9); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  padding: calc(24px + env(safe-area-inset-top, 0px)) var(--site-gut-r) calc(24px + env(safe-area-inset-bottom, 0px)) var(--site-gut-l); overflow-y: auto; -webkit-overflow-scrolling: touch; }
html[data-theme="light"] .bbn-mm { background: rgba(243, 246, 242, 0.92); }
.bbn-mm.open { display: flex; }
.bbn-mm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bbn-mm-top .bbn-logo { margin-right: auto; }
.bbn-mm-login { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font: 600 0.9rem/1 var(--site-font-body); background: rgba(255, 255, 255, 0.05); }
html[data-theme="light"] .bbn-mm-login { background: rgba(14, 40, 22, 0.05); }
.bbn-mm-user { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 600 0.84rem/1.2 var(--site-font-body); }
.bbn-mm-user > span:last-child { display: grid; gap: 2px; }
.bbn-mm-user i { font-style: normal; color: var(--brand-ink); font-size: 0.72rem; }
.bbn-mm-close { width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-2); color: var(--ink); }
html[data-theme="light"] .bbn-mm-close { background: rgba(14, 40, 22, 0.06); }
.bbn-mm-links { flex: 1; display: grid; align-content: center; gap: 6px; }
.bbn-mm-links > a { font: var(--site-w-disp) clamp(1.5rem, 6.2vw, 2.2rem)/1.25 var(--site-font-disp); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; padding: 5px 2px; opacity: 0; transform: translateY(18px); }
.bbn-mm.open .bbn-mm-links > a { opacity: 1; transform: none; transition: opacity 0.45s ease, transform 0.6s var(--ease-out); }
.bbn-mm.open .bbn-mm-links > a:nth-child(2) { transition-delay: 0.05s; }
.bbn-mm.open .bbn-mm-links > a:nth-child(3) { transition-delay: 0.1s; }
.bbn-mm.open .bbn-mm-links > a:nth-child(4) { transition-delay: 0.15s; }
.bbn-mm.open .bbn-mm-links > a:nth-child(5) { transition-delay: 0.2s; }
.bbn-mm-links > a span { color: var(--ink-2); font: 700 0.8em/1 var(--font-num); margin-right: 14px; }
.bbn-mm-links > a[aria-current="page"] span { color: var(--brand-ink); }
.bbn-mm-small { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 14px 0 6px; }
.bbn-mm-small a { color: var(--ink-2); text-decoration: none; font: 600 0.92rem/1 var(--site-font-body); letter-spacing: -0.02em; min-height: 36px; padding: 5px 2px; display: inline-flex; align-items: center; }
.bbn-mm-small a[aria-current="page"] { color: var(--brand-ink); }
.bbn-mm-foot { display: grid; gap: 10px; padding-top: 16px; }
.bbn-mm-logout { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 14px; border: 1px solid var(--danger-soft); background: var(--danger-soft); color: var(--danger); text-decoration: none; font: 600 0.92rem/1 var(--site-font-body); }
@media (max-height: 520px) { .bbn-mm-links { align-content: start; gap: 0; padding-top: 10px; } .bbn-mm-links > a { font-size: 1.2rem; padding: 2px 2px; } .bbn-mm-small { padding: 8px 0 4px; } .bbn-mm { padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); } .bbn-mm-foot { padding-top: 10px; } }
html.bbn-lock, html.bbn-lock body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .bbn-mm.open .bbn-mm-links > a { transition: none; } .bbn, .bbn-cta, .bbn-cta-i { transition: none; } }

/* the page progress line, at the very top, the home page's (nav.js fills it on contract pages) */
html[data-theme] .progress-bar { top: env(safe-area-inset-top, 0px); height: 3px; background: transparent; z-index: calc(var(--z-nav, 60) + 1); transform: none; }
html[data-theme] .progress-fill { background: linear-gradient(90deg, var(--brand), var(--brand-ink) 60%, var(--warm)); box-shadow: 0 0 12px rgba(16, 185, 129, 0.45); transition: width 120ms linear; }
html[data-theme] .progress-bar.nav-hidden { transform: none; }

html[data-theme] .bb-skip-link { background: var(--brand); color: #FFFFFF; }

/* ━━━ SITE GRAMMAR, shared by every contract page (pass 31): the home page's values, defined once ━━━ */
/* the floating buttons: back to top at the right gutter, the Scan pill at the left on phones (never over the footer) */
html[data-theme] .bb-fab { position: fixed; z-index: 58; right: var(--site-gut-r); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0;
  background: var(--glass); border: 1px solid var(--line-2); color: var(--ink); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity 0.3s ease, transform 0.4s var(--ease-out); }
html[data-theme] .bb-fab.on { opacity: 1; transform: none; pointer-events: auto; }
html[data-theme] .bb-fab svg { width: 18px; height: 18px; }
html[data-theme] .bb-fab:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; }
html[data-theme] .bb-fabcta { position: fixed; z-index: 58; left: var(--site-gut-l); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); min-height: 46px; padding: 0 18px 0 16px; border-radius: 999px; display: none; align-items: center; gap: 9px;
  font: 800 0.8rem/1 var(--site-font-disp); letter-spacing: 0.06em; text-transform: uppercase; color: var(--warm-fg); text-decoration: none;
  background: linear-gradient(135deg, var(--warm), var(--site-warm-press)); box-shadow: 0 12px 30px rgba(245, 120, 66, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity 0.3s ease, transform 0.4s var(--ease-out); }
html[data-theme] .bb-fabcta svg { width: 15px; height: 15px; }
html[data-theme] .bb-fabcta.on { opacity: 1; transform: none; pointer-events: auto; }
html[data-theme] .bb-fabcta:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; }
@media (max-width: 479px) { html[data-theme] .bb-fabcta { display: inline-flex; } }
/* the ambient wash with the home page's grid, the grain, the cursor ring */
html[data-theme] .ambient { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(90% 60% at 70% -10%, rgba(30, 94, 52, 0.34) 0%, transparent 60%), radial-gradient(60% 50% at 0% 40%, rgba(16, 185, 129, 0.07) 0%, transparent 60%), radial-gradient(70% 60% at 100% 90%, rgba(245, 120, 66, 0.05) 0%, transparent 60%); }
html[data-theme] .ambient::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px); background-size: 72px 72px; mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 85%); -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 85%); }
html[data-theme="light"] .ambient { background: radial-gradient(90% 60% at 70% -10%, rgba(30, 94, 52, 0.13) 0%, transparent 60%), radial-gradient(60% 50% at 0% 45%, rgba(16, 185, 129, 0.06) 0%, transparent 60%), radial-gradient(70% 60% at 100% 90%, rgba(245, 120, 66, 0.05) 0%, transparent 60%); }
html[data-theme="light"] .ambient::after { background-image: linear-gradient(rgba(14, 40, 22, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(14, 40, 22, 0.05) 1px, transparent 1px); }
html[data-theme] #grain { position: fixed; inset: -60%; z-index: 95; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 280px 280px; animation: bb-grain 9s steps(10) infinite; }
html[data-theme="light"] #grain { opacity: 0.028; }
@keyframes bb-grain { 0%, 100% { transform: translate(0, 0); } 10% { transform: translate(-4%, -6%); } 20% { transform: translate(-10%, 4%); } 30% { transform: translate(6%, -8%); } 40% { transform: translate(-4%, 10%); } 50% { transform: translate(-10%, 6%); } 60% { transform: translate(10%, 0); } 70% { transform: translate(0, 8%); } 80% { transform: translate(3%, 12%); } 90% { transform: translate(-7%, 4%); } }
html[data-theme] #curRing { position: fixed; top: 0; left: 0; z-index: var(--z-toast, 10300); pointer-events: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid rgba(91, 212, 147, 0.65); opacity: 0; transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s ease, opacity 0.3s ease; }
html[data-theme] #curRing.on { opacity: 1; }
html[data-theme] #curRing.hot { width: 58px; height: 58px; border-color: rgba(245, 120, 66, 0.8); }
html[data-theme="light"] #curRing { border-color: rgba(30, 94, 52, 0.55); }
@media (pointer: coarse) { html[data-theme] #curRing { display: none; } }
@media (prefers-reduced-motion: reduce) { html[data-theme] #grain { animation: none; } html[data-theme] .bb-fab, html[data-theme] .bb-fabcta { transition: none; } }
