/* ============================================================================
   newAreaCfA.css — CFA design layer for newAreaHTMLCF.php ONLY.
   Production newAreaHTML.php does not load this file. Every rule is scoped
   under body.cfa. Loads AFTER newAreaCss26CF.min.css and overrides it.
   Design system: .claude/design/design.md (flat orange accent, navy/teal bold
   register reserved for the hero, Raleway display / Tahoma body, FA6 icons).
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. HEADER v2 — "command bar". Hero ground extends to y=0 behind it.
   The navbar DOM is untouched (AJAX menu, toggler, search all keep their ids);
   only the chrome changes.
   - Top state: fully transparent over the navy hero, white Raleway links.
   - Scrolled state: compact layered-navy glass (gradient + mint glow + blur),
     2px orange signature line across the top, logo shrinks 80→46px.
   - Dropdowns: dark glass panels matching the bar — orange top border, white
     uppercase items, mint + orange left-tick hover. One language, both states.
   ---------------------------------------------------------------------------- */

body.cfa {
    padding-top: 0 !important; /* hero now owns the clearance under the fixed nav */
}

/* the header element is 0-height (its navbar is fixed) but carried 20px margins
   that held the hero 40px short of the top — collapse them */
body.cfa .topNav-header {
    margin: 0 !important;
}

/* Scrolled: layered navy glass, not flat black. Out-cascades the upstream
   white !important rule. The 2px orange top line is the system's signature
   panel ornament reused on the bar itself. */
body.cfa .navbar.navbar-expand-lg.topNav-navbar.navbar-scrolled {
    background:
        radial-gradient(140% 220% at 88% -80%, rgba(26, 188, 156, 0.16), transparent 55%),
        linear-gradient(160deg, rgba(9, 15, 23, 0.96) 0%, rgba(17, 29, 41, 0.93) 55%, rgba(21, 35, 51, 0.90) 100%) !important;
    background-color: rgba(10, 17, 25, 0.94) !important; /* fallback */
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-top: 2px solid #ED8B00;
    border-bottom: 1px solid rgba(26, 188, 156, 0.16);
    box-shadow: 0 12px 32px rgba(4, 10, 18, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

/* Compact logo when scrolled (inline style carries height:80px — !important needed) */
body.cfa .topNav-navbar .navbar-brand img {
    transition: height 0.35s ease-in-out;
}
body.cfa .topNav-navbar.navbar-scrolled .navbar-brand img {
    height: 46px !important;
}

/* Desktop inline menu (≥992px only — the ≤991px menu is a white full-screen
   panel with its own dark-link styling, untouched). */
@media (min-width: 992px) {
    body.cfa .topNav-navbar .navbar-nav > .nav-item > .nav-link {
        color: rgba(255, 255, 255, 0.92);
        font-family: 'Raleway', sans-serif;
        font-weight: 600;
        font-size: 0.78rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding: 0.65rem 1.1rem;
        position: relative;
        background: transparent !important; /* kill the legacy grey hover box */
        transition: color 0.2s ease-in-out;
    }
    body.cfa .topNav-navbar .navbar-nav > .nav-item > .nav-link:hover,
    body.cfa .topNav-navbar .navbar-nav > .nav-item > .nav-link:focus,
    body.cfa .topNav-navbar .navbar-nav > .nav-item.show > .nav-link {
        color: #1ABC9C;
        background: transparent !important;
    }
    /* no boxy focus ring on mouse interaction; clean mint outline for keyboard */
    body.cfa .topNav-navbar .navbar-nav .nav-link:focus,
    body.cfa .topNav-navbar .navbar-nav .nav-link.show {
        outline: none !important;
        box-shadow: none !important;
        border: none !important;
    }
    body.cfa .topNav-navbar .navbar-nav .nav-link:focus-visible {
        outline: 2px solid rgba(26, 188, 156, 0.55) !important;
        outline-offset: 3px;
        border-radius: 2px;
    }
    /* signature underline: 2px orange, grows from centre */
    body.cfa .topNav-navbar .navbar-nav > .nav-item > .nav-link::after {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 1px;
        width: 0;
        height: 2px;
        background: #ED8B00;
        transition: width 0.22s ease-in-out;
        border: none; /* neutralise any Bootstrap caret styling on this pseudo */
    }
    body.cfa .topNav-navbar .navbar-nav > .nav-item > .nav-link:hover::after {
        width: calc(100% - 1.7rem);
    }
    /* open dropdown: the panel is the connector — no underline, avoids a
       double-orange-line box artifact between link and panel */
    body.cfa .topNav-navbar .navbar-nav > .nav-item.show > .nav-link::after {
        width: 0;
    }

    /* search icon: quiet ring on hover */
    body.cfa .topNav-search-icon {
        color: rgba(255, 255, 255, 0.92);
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 1px solid transparent;
        transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out,
                    background-color 0.2s ease-in-out;
    }
    body.cfa .topNav-search-icon:hover,
    body.cfa .topNav-search-icon:focus {
        color: #1ABC9C;
        border-color: rgba(26, 188, 156, 0.4);
        background: rgba(26, 188, 156, 0.08);
    }

    /* Dropdown panels: dark glass, same material as the scrolled bar.
       Opaque enough to sit over the light page content when scrolled. */
    body.cfa .topNav-navbar .dropdown-menu {
        background:
            linear-gradient(165deg, rgba(13, 22, 32, 0.97) 0%, rgba(17, 29, 41, 0.97) 100%) !important;
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        border: 1px solid rgba(26, 188, 156, 0.22) !important;
        border-top: 2px solid #ED8B00 !important;
        border-radius: 0 0 6px 6px !important;
        box-shadow: 0 24px 48px rgba(4, 10, 18, 0.55) !important;
        padding: 0.45rem 0 !important;
        margin-top: 0 !important;
        min-width: 230px;
        animation: cfaDropIn 0.2s ease-in-out;
    }
    /* the legacy #mapSearch hover handler writes inline background #FFFFFF /
       #F8F9F9 onto the LI itself on mouse in/out — kill at the li level too */
    body.cfa .topNav-navbar .dropdown-menu li {
        background: transparent !important;
        color: inherit !important;
    }

    /* padding carries !important: the legacy jQuery hover handler writes inline
       padding-left 5px/7px (and white backgrounds) onto items — inline styles
       lose only to !important */
    body.cfa .topNav-navbar .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.82) !important;
        font-family: 'Raleway', sans-serif;
        font-weight: 600;
        font-size: 0.73rem;
        letter-spacing: 0.11em;
        text-transform: uppercase;
        padding: 0.68rem 1.3rem !important;
        border-left: 2px solid transparent;
        background: transparent !important;
        transition: color 0.18s ease-in-out, border-color 0.18s ease-in-out,
                    background-color 0.18s ease-in-out, padding-left 0.18s ease-in-out;
    }
    body.cfa .topNav-navbar .dropdown-menu .dropdown-item:hover,
    body.cfa .topNav-navbar .dropdown-menu .dropdown-item:focus {
        color: #1ABC9C !important;
        background: rgba(26, 188, 156, 0.08) !important;
        border-left-color: #ED8B00;
        padding-left: 1.55rem !important;
    }
    body.cfa .topNav-navbar .dropdown-menu .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.1);
        opacity: 1;
    }

    /* aaAsCustomJS2025 injects an animated .dropdown-border sweep into the first
       item on open — redundant against the new panel cap and reads as a stray
       orange dash. Hidden here (the shared JS is not touched). */
    body.cfa .topNav-navbar .dropdown-menu .dropdown-border {
        display: none !important;
    }

    /* Scrolled state: the panel reads as a seamless extension of the bar —
       same material, no second orange cap. margin-top stays 0: dropdowns are
       HOVER-driven (mouseleave on the li closes them), so any gap between the
       link and the panel breaks the pointer path — the panel emerges from
       behind the opaque bar instead. */
    body.cfa .topNav-navbar.navbar-scrolled .dropdown-menu {
        border-top: none !important;
        margin-top: 0 !important;
        background:
            radial-gradient(160% 120% at 85% -30%, rgba(26, 188, 156, 0.10), transparent 55%),
            linear-gradient(165deg, rgba(11, 18, 27, 0.97) 0%, rgba(17, 29, 41, 0.97) 100%) !important;
    }
}

@keyframes cfaDropIn {
    from { opacity: 0; transform: translateY(-7px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile chrome over the dark ground: white toggler + section-spy button */
body.cfa .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}
body.cfa .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
body.cfa .topNav-navbar #sectionSpyDropdown {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
}
body.cfa .topNav-navbar #sectionSpyDropdown:hover,
body.cfa .topNav-navbar #sectionSpyDropdown:focus {
    color: #fff;
    border-color: #1ABC9C;
    background: rgba(26, 188, 156, 0.15);
}

/* ----------------------------------------------------------------------------
   2. HERO — extends to the very top of the page; nav floats over it.
   ---------------------------------------------------------------------------- */

body.cfa .eco-hero-wrapper {
    margin-top: 0;
    padding-top: 112px; /* clearance for the fixed navbar (80px logo + padding) */
}
@media (max-width: 768px) {
    body.cfa .eco-hero-wrapper { padding-top: 92px; }
}

body.cfa .eco-hero {
    padding: 2.25rem 0 2.5rem;
}

body.cfa .eco-hero-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: clamp(2.6rem, 5vw, 3.6rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ----------------------------------------------------------------------------
   3. STATFLOW — flowing keystat strip at the hero's base.
   Skeleton chips are server-rendered: the strip height is fixed at first paint
   (zero CLS). newAreaCfA.js fills values and runs the GSAP entrance/count-ups.
   Chips without data stay dim with an em dash.
   ---------------------------------------------------------------------------- */

body.cfa .cfa-statflow {
    position: relative;
    margin-top: 2rem;
    z-index: 1;
}

body.cfa .cfa-statflow-line {
    position: absolute;
    inset: -18px 0 auto 0;
    width: 100%;
    height: 56px;
    pointer-events: none;
    overflow: visible;
}

/* data pulses travel the flow path (CSS motion path; hidden where unsupported) */
body.cfa .cfa-flow-pulse { opacity: 0; }
@supports (offset-path: path('M0,0 L10,10')) {
    body.cfa .cfa-flow-pulse {
        offset-path: path('M0,40 C150,40 220,16 380,16 C540,16 600,44 760,44 C920,44 1000,20 1200,20');
        offset-rotate: 0deg;
        animation: cfaFlowTravel 9s linear infinite;
        opacity: 0.9;
    }
    body.cfa .cfa-flow-pulse-2 { animation-duration: 13s; animation-delay: 3s; opacity: 0.75; }
    body.cfa .cfa-flow-pulse-3 { animation-duration: 11s; animation-delay: 6s; opacity: 0.6; }
}
@keyframes cfaFlowTravel {
    from { offset-distance: 0%; }
    to   { offset-distance: 100%; }
}

body.cfa .cfa-statflow-track {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.cfa .cfa-stat {
    flex: 1 1 0;
    min-width: 122px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(26, 188, 156, 0.22);
    border-top: 2px solid rgba(237, 139, 0, 0.85); /* signature orange top border */
    border-radius: 5px;
    padding: 10px 14px 9px;
    opacity: 0.38;
    transform-origin: center center;
    backface-visibility: hidden;       /* smoother GSAP rotateX flip when a stat cycles in */
    transition: opacity 0.4s ease-in-out, border-color 0.4s ease-in-out,
                background-color 0.3s ease-in-out;
}
body.cfa .cfa-stat.is-live {
    opacity: 1;
    border-color: rgba(26, 188, 156, 0.45);
    border-top-color: #ED8B00;
    background: rgba(255, 255, 255, 0.07);
}

body.cfa .cfa-stat-value {
    display: block;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.15;
    color: #fff;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
body.cfa .cfa-stat-value .cfa-unit {
    font-size: 0.62em;
    color: #aeb8c2;
    margin-left: 2px;
}
body.cfa .cfa-stat-label {
    display: block;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8fa0ad;
    margin-top: 3px;
    white-space: nowrap;
}
/* meta row: national-percentile bar (animates 0->pct on reveal) + data date */
body.cfa .cfa-stat-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    min-height: 10px;
}
body.cfa .cfa-stat-bar {
    position: relative;
    flex: 1 1 auto;
    min-width: 22px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}
body.cfa .cfa-stat-bar i {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #1ABC9C, #ED8B00);
    transition: width 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
body.cfa .cfa-stat-date {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 0.52rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #7e8b97;
    white-space: nowrap;
    margin-left: auto;
}
@media (prefers-reduced-motion: reduce) {
    body.cfa .cfa-stat-bar i { transition: none; }
}

/* JS shows 6 chips below 1200px: 3 columns (2 rows) on tablet, 2 columns (3 rows) on phone
   — both fill evenly (7 would leave an orphan, the "row off" on phone). */
@media (max-width: 1199px) {
    body.cfa .cfa-statflow-track { display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
    body.cfa .cfa-statflow-track { grid-template-columns: repeat(2, 1fr); }
    body.cfa .cfa-statflow-line { display: none; }
    body.cfa .cfa-stat-value { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    body.cfa .cfa-flow-pulse { animation: none !important; opacity: 0 !important; }
    body.cfa .cfa-stat { transition: none; }
}

/* ----------------------------------------------------------------------------
   4. SECTION LAYER — typographic rhythm + card discipline, section by section.
   Pure CSS over existing DOM; the per-section theme variables (--card-bg,
   --border-color, --text-color, --primary-color) are respected so dark mode
   and the locked section themes keep working.
   ---------------------------------------------------------------------------- */

/* Section headings: launch in from the rail side (GSAP, newAreaCfA.js) and
   draw a gradient underline. --cfaLine defaults to 1 so no-JS / reduced-motion
   render the full underline statically. The legacy char-split typewriter is
   disabled on this page. */
body.cfa #content h2.mb-0 {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: clamp(1.55rem, 2.1vw, 2rem);
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: 8px;
    will-change: transform, opacity;
}
body.cfa #content h2.mb-0::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 130px;
    height: 3px;
    background: linear-gradient(90deg, #ED8B00 0%, #ED8B00 55%, #1ABC9C 100%);
    transform: scaleX(var(--cfaLine, 1));
    transform-origin: left center;
}

/* Cards: hairline borders, 5px radii, near-zero elevation (design.md §4) */
body.cfa .text-container,
body.cfa .faq-container,
body.cfa .standouts-container {
    border: 1px solid var(--border-color, #DDDDDD);
    border-radius: 5px;
    box-shadow: none;
}

/* FAQ reads as the system callout: cream fill + orange hairline (light mode) */
body.cfa:not(.dark-mode) .faq-container {
    background: #EFEDE7;
    border-color: rgba(237, 139, 0, 0.4);
}

/* Section toggle pills: uppercase Raleway, square 2px radius (design.md buttons) */
body.cfa .sectionNav {
    border-radius: 2px;
    border-width: 1px;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 7px 14px;
}
body.cfa .sectionNav.active {
    border-color: var(--primary-color, #ED8B00);
}

/* Section rhythm: a touch more air between major sections */
body.cfa #content section.mb-5 {
    margin-bottom: 4rem !important;
}

/* Source attributions: quiet, consistent */
body.cfa #content p.source,
body.cfa #content .source {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    color: var(--muted-color, #777);
    opacity: 0.85;
}

/* ----------------------------------------------------------------------------
   5. SEARCH FORM — dark glass, matches the command bar. (The legacy form was
   a bare white band at top:2px.) Escape / click-outside closing lives in
   newAreaCfA.js.
   ---------------------------------------------------------------------------- */

body.cfa .topNav-search-form {
    top: 0 !important;
    background:
        radial-gradient(140% 220% at 88% -80%, rgba(26, 188, 156, 0.14), transparent 55%),
        linear-gradient(160deg, rgba(9, 15, 23, 0.97) 0%, rgba(17, 29, 41, 0.96) 100%);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 2px solid #ED8B00;
    border-bottom: 1px solid rgba(26, 188, 156, 0.2);
    box-shadow: 0 12px 32px rgba(4, 10, 18, 0.45);
    padding: 16px 0;
}
body.cfa .topNav-search-form .form-control {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(26, 188, 156, 0.3);
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}
body.cfa .topNav-search-form .form-control::placeholder {
    color: #8fa0ad;
}
body.cfa .topNav-search-form .form-control:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: #1ABC9C;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.15);
    color: #fff;
}
body.cfa .topNav-close-search {
    color: #8fa0ad !important;
    transition: color 0.2s ease-in-out;
}
body.cfa .topNav-close-search:hover,
body.cfa .topNav-close-search:focus {
    color: #1ABC9C !important;
}

/* ----------------------------------------------------------------------------
   6. EXPERIMENT LAYOUT — rail hidden (it stays in the DOM as the scrollspy
   model the dock mirrors), slim sticky ad column, body widened to match the
   header's 1400px container.
   ---------------------------------------------------------------------------- */

body.cfa #sideNavBar {
    display: none !important;
}

/* body width = header width (was 1200px) */
body.cfa .content-wrap {
    max-width: 1400px !important;
}
body.cfa .eco-hero .container {
    max-width: 1400px;
}

/* slim sticky ad column */
body.cfa .cfa-ad-rail {
    position: sticky;
    top: 120px;
    padding: 14px 4px 16px 8px;
}

/* keep content clear of the dock strip until the viewport margin absorbs it */
@media (min-width: 1200px) and (max-width: 1567px) {
    body.cfa .content-wrap {
        padding-right: 96px;
    }
}

/* ----------------------------------------------------------------------------
   7. ORBIT DOCK — right-edge WebGL nav. A slim dark-glass strip (the command
   bar's material, rotated vertical) is the dock's home: additive particles
   need a dark ground. DOM dots carry interaction/accessibility; the canvas
   behind them is pure art (pointer-events none). Desktop ≥1200px only —
   mobile keeps its bottom nav + section dropdown.
   ---------------------------------------------------------------------------- */

/* floating vertical island — the command bar's dark glass in an Apple-style
   capsule: rounded ends, hugging the content height, lifted off the edge */
body.cfa #cfaDockWrap {
    position: fixed;
    top: calc(50% + 12px);
    right: 14px;
    width: 72px;
    z-index: 1028; /* under the navbar (1030) */
    padding: 16px 0;
    border-radius: 36px;
    background:
        radial-gradient(140% 60% at 50% 0%, rgba(26, 188, 156, 0.14), transparent 60%),
        linear-gradient(170deg, rgba(9, 15, 23, 0.94) 0%, rgba(17, 29, 41, 0.92) 55%, rgba(21, 35, 51, 0.90) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(26, 188, 156, 0.22);
    box-shadow: 0 18px 48px rgba(4, 10, 18, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    /* parked offscreen (incl. shadow) over the hero/top map; glides in past
       the map (.cfa-dock-in toggled by an IO on #secTopMap) */
    transform: translateY(-50%) translateX(calc(100% + 70px));
    transition: transform 0.55s cubic-bezier(0.22, 0.8, 0.3, 1);
    /* short viewports: the capsule caps its height and the icon list scrolls */
    max-height: calc(100vh - 118px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
body.cfa #cfaDockWrap.cfa-dock-in {
    transform: translateY(-50%) translateX(0);
}

/* scrollable icon viewport (scrollbar hidden — wheel/drag scrolls; the active
   icon is auto-revealed by JS) */
body.cfa #cfaDockScroll {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
body.cfa #cfaDockScroll::-webkit-scrollbar {
    display: none;
}

/* the break + utility tray: always visible below the icons */
body.cfa .cfa-dock-sep {
    flex: none;
    width: 30px;
    height: 1px;
    margin: 7px auto;
    background: rgba(255, 255, 255, 0.18);
}
body.cfa .cfa-dock-utils {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
body.cfa .cfa-dock-util {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(26, 188, 156, 0.3);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out,
                background-color 0.2s ease-in-out;
}
body.cfa .cfa-dock-util:hover,
body.cfa .cfa-dock-util:focus-visible {
    color: #1ABC9C;
    border-color: rgba(26, 188, 156, 0.6);
    background: rgba(26, 188, 156, 0.12);
}
body.cfa .cfa-dock-util svg {
    width: 17px;
    height: 17px;
}

/* originals absorbed into the capsule tray on dock widths */
@media (min-width: 1200px) {
    body.cfa .color-scheme-toggle,
    body.cfa #scrollToTopBtn {
        display: none !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    body.cfa #cfaDockWrap { transition: none; }
}
/* scroll-progress thread inside the capsule's left edge */
body.cfa .cfa-dock-progress {
    position: absolute;
    top: 22px;
    bottom: 22px;
    left: 7px;
    width: 2px;
    height: auto;
    border-radius: 2px;
    background: linear-gradient(180deg, #ED8B00, #1ABC9C);
    transform: scaleY(0);
    transform-origin: top center;
    pointer-events: none;
    opacity: 0.85;
}
/* canvas sits inside the scroll viewport at the top of the icon list and is
   sized by JS to the full list height — it scrolls with the buttons */
body.cfa #cfaDockCanvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}
body.cfa #cfaDock {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
}
body.cfa .cfa-dock-node {
    position: relative;
    width: 72px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}
@media (max-height: 829px) {
    body.cfa .cfa-dock-node { height: 30px; }
    body.cfa #cfaDockWrap { padding: 12px 0; }
}
/* fallback marker: a geometric diamond — hidden once the WebGL glyphs boot
   (#cfaDockWrap gains .cfa-dock-gl). Light, for the dark capsule. */
body.cfa .cfa-dock-node::after {
    content: '';
    width: 11px;
    height: 11px;
    transform: rotate(45deg);
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.55);
    transition: transform 0.25s ease-in-out, border-color 0.25s ease-in-out,
                background-color 0.25s ease-in-out;
}
body.cfa .cfa-dock-node:hover::after,
body.cfa .cfa-dock-node:focus-visible::after {
    border-color: #1ABC9C;
    transform: rotate(45deg) scale(1.25);
}
body.cfa .cfa-dock-node.active::after {
    border-color: #ED8B00;
    background: rgba(237, 139, 0, 0.15);
    transform: rotate(45deg) scale(1.4);
}
body.cfa .cfa-dock-gl .cfa-dock-node::after {
    display: none; /* the three.js glyphs take over */
}
body.cfa .cfa-dock-node:focus-visible {
    outline: 2px solid rgba(26, 188, 156, 0.6);
    outline-offset: -6px;
    border-radius: 5px;
}

/* dock now uses flat solid-colour FontAwesome icons (3D glyphs retired) — hide the
   diamond fallback and style the per-section icon: white idle, mint hover, orange active */
body.cfa .cfa-dock-node::after { display: none !important; }
body.cfa .cfa-dock-node i {
    font-size: 16px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.22s ease, transform 0.2s ease;
    pointer-events: none;
}
body.cfa .cfa-dock-node:hover i,
body.cfa .cfa-dock-node:focus-visible i {
    color: #1ABC9C;
    transform: scale(1.16);
}
body.cfa .cfa-dock-node.active i {
    color: #ED8B00;
    transform: scale(1.2);
}
/* light (olive) dock theme → blue icons */
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-node i { color: #2E6CA8; }
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-node:hover i,
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-node:focus-visible i { color: #2E78C8; }
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-node.active i { color: #ED8B00; }

/* glass label flyout (always shown for the active node) */
body.cfa .cfa-dock-label {
    position: absolute;
    right: 84px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    background: linear-gradient(165deg, rgba(13, 22, 32, 0.96) 0%, rgba(17, 29, 41, 0.96) 100%);
    border: 1px solid rgba(26, 188, 156, 0.25);
    border-right: 2px solid #ED8B00;
    border-radius: 5px;
    padding: 7px 13px;
    box-shadow: 0 10px 24px rgba(4, 10, 18, 0.4);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}
body.cfa .cfa-dock-label .cfa-dock-num {
    color: rgba(237, 139, 0, 0.9);
    margin-right: 7px;
    font-size: 0.85em;
    font-variant-numeric: tabular-nums;
}
body.cfa .cfa-dock-node:hover .cfa-dock-label,
body.cfa .cfa-dock-node:focus-visible .cfa-dock-label,
body.cfa .cfa-dock-node.active .cfa-dock-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
/* shared floating label (top set inline by JS; lives at wrap level so the
   scroll viewport's horizontal clip can't cut it off) */
body.cfa .cfa-dock-label-float.is-shown {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
/* hide the label whenever the capsule is parked (slid away) */
body.cfa #cfaDockWrap:not(.cfa-dock-in) .cfa-dock-label-float {
    opacity: 0 !important;
    pointer-events: none;
}

/* pull-out handle — thin tab on the right edge, shown only while the capsule
   is parked; click glides the capsule out */
body.cfa #cfaDockHandle {
    position: fixed;
    top: calc(50% + 12px);
    right: 0;
    transform: translateY(-50%) translateX(100%);
    z-index: 1027; /* under the capsule */
    width: 22px;
    height: 78px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    background: linear-gradient(170deg, rgba(9, 15, 23, 0.92) 0%, rgba(17, 29, 41, 0.9) 100%);
    border: 1px solid rgba(26, 188, 156, 0.22);
    border-right: none;
    border-radius: 12px 0 0 12px;
    box-shadow: -8px 0 22px rgba(4, 10, 18, 0.32);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    cursor: pointer;
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.35s ease-in-out,
                color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
@media (min-width: 1200px) {
    body.cfa #cfaDockHandle { display: flex; }
}
body.cfa #cfaDockHandle.is-visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}
body.cfa #cfaDockHandle:hover,
body.cfa #cfaDockHandle:focus-visible {
    color: #1ABC9C;
    background: linear-gradient(170deg, rgba(11, 18, 27, 0.95) 0%, rgba(20, 34, 50, 0.93) 100%);
    outline: none;
}
body.cfa #cfaDockHandle svg {
    width: 15px;
    height: 15px;
}
@media (prefers-reduced-motion: reduce) {
    body.cfa #cfaDockHandle { transition: opacity 0.2s ease-in-out; }
}

/* header-launch ping: a soft orange ring on the node */
body.cfa .cfa-dock-node.cfa-dock-ping {
    animation: cfaDockPing 0.8s ease-in-out;
    border-radius: 8px;
}
@keyframes cfaDockPing {
    0%   { box-shadow: inset 0 0 0 0 rgba(237, 139, 0, 0); background-color: rgba(237, 139, 0, 0); }
    45%  { background-color: rgba(237, 139, 0, 0.14); }
    100% { background-color: rgba(237, 139, 0, 0); }
}

@media (max-width: 1199px) {
    body.cfa #cfaDockWrap { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    body.cfa .cfa-dock-node::after,
    body.cfa .cfa-dock-label { transition: none; }
    body.cfa .cfa-dock-node.cfa-dock-ping { animation: none; }
}

/* ----------------------------------------------------------------------------
   7b. MOBILE/TABLET SCROLLSPY BAR — #mobileBottomNav repositioned as a TOP
   chip bar under the navbar (<1200px; the dock owns ≥1200px). The existing
   inline scrollspy drives .show, .active and auto-centring; this is restyle
   only.
   ---------------------------------------------------------------------------- */

@media (max-width: 1199px) {
    /* rounded glassmorphic pill strip modelled on the dashboard's .msn nav */
    body.cfa .mobile-bottom-nav {
        top: 69px;       /* flush under the compact (scrolled) navbar bottom —
                            the bar only appears after scrolling past Summary,
                            when the navbar has shrunk to 69px */
        bottom: auto;
        background: rgba(255, 255, 255, 0.96);
        -webkit-backdrop-filter: saturate(180%) blur(8px);
        backdrop-filter: saturate(180%) blur(8px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
        padding: 0;
    }
    body.cfa .mobile-bottom-nav .nav-scroll-container {
        display: flex;
        gap: 6px;
        padding: 12px 12px 9px; /* top padding so pills clear the navbar */
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    body.cfa .mobile-bottom-nav .nav-scroll-container::-webkit-scrollbar {
        display: none;
    }
    /* horizontal pill: icon + label inline, fully rounded, outline → fill */
    body.cfa .mobile-bottom-nav .nav-link {
        display: inline-flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
        min-width: 0;
        padding: 9px 14px 7px;
        background: transparent;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 999px;
        color: #475569;
        scroll-snap-align: center;
        transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }
    body.cfa .mobile-bottom-nav .nav-link i {
        font-size: 11px;
        margin: 0;
        opacity: 0.6;
    }
    body.cfa .mobile-bottom-nav .nav-link span {
        font-family: 'Raleway', sans-serif;
        font-weight: 600;
        font-size: 12px;
        letter-spacing: 0.02em;
        text-transform: none;
        white-space: nowrap;
    }
    body.cfa .mobile-bottom-nav .nav-link.active,
    body.cfa .mobile-bottom-nav .nav-link:active {
        background: #ED8B00;            /* page accent fill (cohesive with the dock) */
        color: #fff;
        border-color: #ED8B00;
        box-shadow: 0 2px 6px rgba(237, 139, 0, 0.25);
        transform: none;
    }
    body.cfa .mobile-bottom-nav .nav-link.active i { opacity: 1; color: #fff; }

    /* the shared rule pads the page bottom for a bottom bar — not needed on top */
    body.cfa.mobile-nav-active { padding-bottom: 0 !important; }
    /* anchor jumps must clear navbar + top bar */
    body.cfa section[id] { scroll-margin-top: 132px; }

    /* drop the mobile "current section" dropdown button — the pill strip shows
       where we are, and removing it frees the navbar for the wordmark */
    body.cfa .topNav-navbar .dropdown.d-lg-none { display: none !important; }
    /* keep the hamburger hard right now that the spacer button is gone */
    body.cfa .topNav-navbar .navbar-toggler { margin-left: auto; }
}

/* phones: tighten the body's side gutters so content sits closer to the edge.
   Two nested .container-fluid (12px each) + #content (1px) = ~25px each side;
   halve the container gutters → ~13px. */
@media (max-width: 767px) {
    body.cfa #content .container-fluid {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
}
@media (min-width: 1200px) {
    /* the scrollspy's show condition has no width gate — keep the bar off the
       dock's turf */
    body.cfa .mobile-bottom-nav { display: none !important; }
}

/* ----------------------------------------------------------------------------
   8. WORDMARK — "AREA SEARCH" beside the logo. Letters write on at load
   (newAreaCfA.js); SEARCH slow-cycles the brand palette forever. Now shown on
   mobile too (the section-spy button was removed to make room).
   ---------------------------------------------------------------------------- */

body.cfa .cfa-wordmark {
    display: inline-block;
    margin-left: 5px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    line-height: 1;
    vertical-align: middle;
    user-select: none;
    white-space: nowrap;
}
/* very narrow phones: keep the navbar uncluttered */
@media (max-width: 359px) {
    body.cfa .cfa-wordmark { display: none; }
}
@media (min-width: 1200px) {
    body.cfa .cfa-wordmark { font-size: 1.45rem; letter-spacing: 0.14em; }
}
body.cfa .cfa-wm-area {
    color: #fff;
}
body.cfa .cfa-wm-search {
    color: #1ABC9C;
    animation: cfaSearchPalette 28s ease-in-out infinite;
}
body.cfa .cfa-wm-l {
    display: inline-block;
    will-change: transform, opacity;
}
@keyframes cfaSearchPalette {
    0%   { color: #1ABC9C; }
    20%  { color: #0E6E7C; }
    40%  { color: #ED8B00; }
    60%  { color: #999967; }
    80%  { color: #6E0F31; }
    100% { color: #1ABC9C; }
}
@media (prefers-reduced-motion: reduce) {
    body.cfa .cfa-wm-search { animation: none; }
}

/* ----------------------------------------------------------------------------
   7. HERO FLOW FIELD — three.js particle layer (newAreaCfA.js loads three.js
   lazily on desktop only; everything degrades to the SVG fan lines).
   ---------------------------------------------------------------------------- */

body.cfa .cfa-three-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
/* once WebGL is live, the static fans recede so the moving field reads clearly */
body.cfa .eco-hero-wrapper.cfa-webgl .eco-fan-svg { opacity: 0.22; }
body.cfa .eco-hero-wrapper.cfa-webgl .eco-fan-secondary { opacity: 0.1; }
/* …and once the animated three.js fan is lit, drop the static SVG fan entirely */
body.cfa .eco-hero-wrapper.cfa-fanlit .eco-fan-svg { display: none; }

/* ----------------------------------------------------------------------------
   8. CHART CATEGORY CHIP RAIL — replaces the native <select> chart pickers on
   the 11 standard data sections (population…age). Pure progressive enhancement:
   newAreaCfA.js mirrors each select's options into a draggable horizontal
   "swiper" of pills and drives the (still-present, visually hidden) select via
   dispatched change events, so the page's own chart rendering is untouched.
   The scoped "liquid" morph + the shared WebGL sheen sweep on switch live here.
   ---------------------------------------------------------------------------- */

/* the native select stays in the DOM as the source of truth (JS sets .value and
   fires `change` on it) but is visually removed once its chip rail is built */
body.cfa select.cfa-chip-source.cfa-enhanced {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip: rect(0 0 0 0); clip-path: inset(50%);
    overflow: hidden; white-space: nowrap;
}

body.cfa .cfa-chipnav {
    position: relative;
    display: flex;
    gap: 8px;
    padding: 6px 2px 12px;
    margin: 4px 0 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    /* fade the leading/trailing edges to signal the rail scrolls */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
body.cfa .cfa-chipnav::-webkit-scrollbar { display: none; }
body.cfa .cfa-chipnav.cfa-dragging { cursor: grabbing; scroll-snap-type: none; }
body.cfa .cfa-chipnav.cfa-dragging .cfa-chip { pointer-events: none; }

body.cfa .cfa-chip {
    flex: 0 0 auto;
    scroll-snap-align: center;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    line-height: 1;
    color: #475569;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    padding: 10px 17px;
    white-space: nowrap;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease,
                box-shadow .18s ease, transform .12s ease;
}
body.cfa .cfa-chip:hover {
    border-color: #1ABC9C;
    color: #0E6E7C;
    background: rgba(26, 188, 156, 0.07);
}
body.cfa .cfa-chip:active { transform: scale(0.96); }
body.cfa .cfa-chip:focus-visible {
    outline: 2px solid #1ABC9C;
    outline-offset: 2px;
}
body.cfa .cfa-chip.cfa-chip-active {
    background: #ED8B00;
    color: #fff;
    border-color: #ED8B00;
    box-shadow: 0 3px 10px rgba(237, 139, 0, 0.28);
}

/* scoped "liquid" morph on the chart container during a switch */
body.cfa .cfa-chart-morph {
    transition: filter .22s ease, opacity .22s ease, transform .22s ease;
    will-change: filter, opacity, transform;
}
body.cfa .cfa-chart-morph.cfa-morph-out {
    filter: blur(6px);
    opacity: 0.32;
    transform: scale(0.986);
}

/* shared WebGL sheen — one canvas/context, positioned over the switching card
   and only rendered during the brief (~0.7s) pulse */
body.cfa .cfa-fx-canvas {
    position: fixed;
    pointer-events: none;
    z-index: 60;                 /* above content, below navbar(≥1030)/dock/modals */
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity .14s ease;
}
body.cfa .cfa-fx-canvas.cfa-fx-on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    body.cfa .cfa-chart-morph { transition: none; }
    body.cfa .cfa-chart-morph.cfa-morph-out { filter: none; opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------------------
   9. CHART CARDS — the 11 standard section charts default to a warm "Claude
   Beige" LIGHT card (the page's light theme: dark text, transparent canvas bg);
   the per-chart toggle flips to the header-navy DARK card. Both framed alike
   (orange top accent, rounded, soft shadow) so the toggle feels intentional.
   ---------------------------------------------------------------------------- */

/* default: Claude-Beige light card */
body.cfa .chart-container.light-mode {
    background: #F0EEE6 !important;          /* Claude Beige */
    border: 1px solid rgba(120, 110, 88, 0.16);
    border-top: 2px solid #ED8B00;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(120, 110, 88, 0.12);
    padding: 14px 16px 8px;
    margin-top: 4px;
}
body.cfa .chart-container.light-mode .apexcharts-canvas { background: transparent !important; }

/* navy dark card (toggle state) */
body.cfa .chart-container.dark-mode {
    /* same navy register as the scrolled header */
    background: linear-gradient(165deg, #0b121b 0%, #111d29 55%, #152333 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 2px solid #ED8B00;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(9, 15, 23, 0.30);
    padding: 14px 16px 8px;
    margin-top: 4px;
}
/* let the navy card show through ApexCharts' own opaque canvas background, and
   lift the data marks so darker brand tones (burgundy/olive) read on the navy */
body.cfa .chart-container.dark-mode .apexcharts-canvas {
    background: transparent !important;
    filter: brightness(1.16) saturate(1.12);
}

/* keep the chart's own control buttons legible on navy */
body.cfa .chart-container.dark-mode .chart-theme-toggle,
body.cfa .chart-container.dark-mode .chart-refresh-btn {
    color: #cfe8ef;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}
body.cfa .chart-container.dark-mode .chart-theme-toggle:hover,
body.cfa .chart-container.dark-mode .chart-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

/* ----------------------------------------------------------------------------
   10. DOCK "LIGHT" THEME — olive capsule + blue icons. Toggled from the dock
   util tray (newAreaCfA.js adds .cfa-dock-light to the wrap AND the pull-out
   handle, persists in localStorage, and swaps the WebGL glyph colours to blue).
   Higher specificity (#id.class) than the base dark rules, so order-independent.
   ---------------------------------------------------------------------------- */

body.cfa #cfaDockWrap.cfa-dock-light {
    background:
        radial-gradient(140% 60% at 50% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
        linear-gradient(170deg, rgba(218, 218, 172, 0.95) 0%, rgba(204, 204, 154, 0.94) 55%, rgba(188, 188, 136, 0.93) 100%);
    border: 1px solid rgba(40, 78, 120, 0.30);
    box-shadow: 0 18px 46px rgba(70, 68, 40, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-sep {
    background: rgba(40, 60, 90, 0.28);
}
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-util {
    border-color: rgba(31, 78, 121, 0.40);
    background: rgba(255, 255, 255, 0.20);
    color: #1f4e79;
}
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-util:hover,
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-util:focus-visible {
    color: #15314e;
    border-color: rgba(31, 78, 121, 0.70);
    background: rgba(31, 78, 121, 0.16);
}
/* CSS-diamond fallback (only when WebGL is off) → blue on olive */
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-node::after {
    border-color: rgba(31, 78, 121, 0.75);
}
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-node:hover::after,
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-node:focus-visible::after {
    border-color: #2E78C8;
}
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-node.active::after {
    border-color: #ED8B00;
    background: rgba(237, 139, 0, 0.18);
}
/* progress thread: blue → orange reads on olive */
body.cfa #cfaDockWrap.cfa-dock-light .cfa-dock-progress {
    background: linear-gradient(180deg, #1f4e79, #ED8B00);
}
/* pull-out handle matches the olive capsule */
body.cfa #cfaDockHandle.cfa-dock-light {
    background: linear-gradient(170deg, rgba(218, 218, 172, 0.95) 0%, rgba(196, 196, 146, 0.93) 100%);
    border: 1px solid rgba(40, 78, 120, 0.30);
    border-right: none;
    color: #1f4e79;
}
body.cfa #cfaDockHandle.cfa-dock-light:hover,
body.cfa #cfaDockHandle.cfa-dock-light:focus-visible {
    color: #15314e;
    background: linear-gradient(170deg, rgba(224, 224, 180, 0.97) 0%, rgba(200, 200, 150, 0.95) 100%);
}

/* ----------------------------------------------------------------------------
   11. 3D RADIAL TRANSIT MAP — replaces the Grid.js "Transport Stops Detail"
   table with a pitched 3D map built from the stops' real coordinates (newAreaCfA.js
   initTransit). A floating toggle restores the data table.
   ---------------------------------------------------------------------------- */

/* once our module mounts, the Grid.js table + its search + heading are replaced
   for good (custom map + custom table take over) */
/* the shared .table-container box (24px padding + white bg) is redundant now —
   our map/table are their own cards, so let them span the full section width */
body.cfa #transportStopsTableContainer.cfa-transit-on {
    min-height: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
body.cfa #transportStopsTableContainer.cfa-transit-on > h4,
body.cfa #transportStopsTableContainer.cfa-transit-on > .mb-3,
body.cfa #transportStopsTableContainer.cfa-transit-on > #transportStopsTable { display: none !important; }
/* map view vs custom-table view */
body.cfa #transportStopsTableContainer.cfa-mode-list .cfa-transit { display: none; }
body.cfa #transportStopsTableContainer.cfa-mode-map .cfa-transit-list { display: none; }

/* Map/Table views mounted as hosts beside the transport chart container */
body.cfa .cfa-transit-host { margin-top: 4px; }
/* the standalone Grid.js stops block is replaced by the Map/Table pills */
body.cfa #transportStopsTableContainer.cfa-transit-hidden { display: none !important; min-height: 0 !important; }
/* hide the chart container while a Map/Table view is active (page re-shows it) */
body.cfa #transportChartContainer.cfa-chart-hidden { display: none !important; }
/* view-switch pills (3D Map / Data table) — tinted teal so they read as views,
   not chart categories; active state is the shared orange */
body.cfa .cfa-chip.cfa-chip-view:not(.cfa-chip-active) {
    border-color: rgba(14, 110, 124, 0.35);
    color: #0E6E7C;
}

body.cfa .cfa-transit {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(170deg, #0b121b 0%, #111d29 60%, #15233a 100%);
    border-top: 2px solid #ED8B00;
    box-shadow: 0 14px 34px rgba(9, 15, 23, 0.30);
    margin-top: 4px;
}
body.cfa .cfa-transit-head {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 3;
    padding: 14px 16px;
    pointer-events: none;
}
body.cfa .cfa-transit-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    color: #fff;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}
body.cfa .cfa-transit-title small {
    display: block;
    font-weight: 500;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.03em;
    margin-top: 2px;
}
body.cfa .cfa-transit-canvas { display: block; width: 100%; cursor: grab; touch-action: none; }
body.cfa .cfa-transit.cfa-grabbing .cfa-transit-canvas { cursor: grabbing; }
body.cfa .cfa-transit-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
body.cfa .cfa-transit-label {
    position: absolute;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    white-space: nowrap;
    color: #eaf6f9;
    background: rgba(8, 14, 22, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 3px 8px;
    border-radius: 6px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.15s ease;
    will-change: left, top;
}
body.cfa .cfa-transit-label.is-on { opacity: 1; }
body.cfa .cfa-transit-label .t-trips { color: #9fe0d2; margin-left: 6px; font-variant-numeric: tabular-nums; }
body.cfa .cfa-transit-label.is-center {
    color: #fff;
    border-color: rgba(237, 139, 0, 0.5);
    border-bottom: 2px solid #ED8B00;
}
body.cfa .cfa-transit-legend {
    position: absolute;
    left: 16px; bottom: 14px;
    z-index: 3;
    pointer-events: none;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}
body.cfa .cfa-transit-legend .lg { display: flex; align-items: center; gap: 6px; }
body.cfa .cfa-transit-legend .sw { width: 10px; height: 10px; border-radius: 3px; }
body.cfa .cfa-transit-hint {
    position: absolute;
    right: 16px; bottom: 14px;
    z-index: 3;
    pointer-events: none;
    font-family: 'Raleway', sans-serif;
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.5);
}
/* north arrow — needle rotates to screen-north as the camera orbits */
body.cfa .cfa-transit-compass {
    position: absolute;
    top: 52px; right: 16px;
    z-index: 4;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(8, 14, 22, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    pointer-events: none;
}
body.cfa .cfa-compass-rot { position: absolute; inset: 0; }
body.cfa .cfa-needle-n, body.cfa .cfa-needle-s {
    position: absolute; left: 50%; width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
}
body.cfa .cfa-needle-n { top: 6px; transform: translateX(-50%); border-bottom: 15px solid #ED8B00; }
body.cfa .cfa-needle-s { bottom: 6px; transform: translateX(-50%); border-top: 15px solid rgba(255, 255, 255, 0.5); }
body.cfa .cfa-compass-n {
    position: absolute; top: -2px; left: 50%;
    transform: translateX(-50%);
    font-family: 'Raleway', sans-serif; font-weight: 700; font-size: 0.6rem;
    color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
body.cfa .cfa-compass-hub {
    position: absolute; top: 50%; left: 50%;
    width: 6px; height: 6px; border-radius: 50%;
    background: #fff; transform: translate(-50%, -50%);
}
/* rich hover tooltip on a stop (name + mode + trips + distance + routes) */
body.cfa .cfa-transit-tip {
    position: absolute;
    min-width: 160px;
    max-width: 250px;
    opacity: 0;
    transition: opacity 0.14s ease;
    will-change: left, top;
    font-family: 'Raleway', sans-serif;
    color: #eaf6f9;
    background: rgba(8, 14, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(4, 10, 18, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    overflow: hidden;
}
body.cfa .cfa-transit-tip.is-on { opacity: 1; }
body.cfa .cfa-transit-tip .tip-name { font-weight: 700; font-size: 0.8rem; padding: 8px 11px 5px; color: #fff; line-height: 1.2; }
body.cfa .cfa-transit-tip .tip-meta { display: flex; align-items: center; gap: 9px; padding: 0 11px 8px; font-size: 0.7rem; color: rgba(255, 255, 255, 0.82); font-variant-numeric: tabular-nums; }
body.cfa .cfa-transit-tip .tip-badge { font-weight: 700; font-size: 0.62rem; padding: 2px 8px; border-radius: 999px; color: #06222b; }
body.cfa .cfa-transit-tip .tip-routes { font-size: 0.66rem; line-height: 1.4; color: rgba(255, 255, 255, 0.74); padding: 6px 11px 8px; border-top: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); }

/* custom data-table view (replaces Grid.js) */
body.cfa .cfa-transit-list {
    margin-top: 4px;
    background: #fff;
    border-radius: 16px;
    border-top: 2px solid #ED8B00;
    box-shadow: 0 10px 26px rgba(120, 110, 88, 0.10);
    padding: 14px 16px 8px;
    font-family: 'Raleway', sans-serif;
}
body.cfa .cfa-tl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding-right: 120px; }
body.cfa .cfa-tl-title { font-weight: 600; font-size: 1.05rem; color: #15314e; }
body.cfa .cfa-tl-title span { color: #6b7d8c; font-weight: 500; font-size: 0.85rem; }
body.cfa .cfa-tl-search {
    flex: 0 1 280px;
    min-width: 170px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    padding: 9px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    outline: none;
    color: #15314e;
}
body.cfa .cfa-tl-search:focus { border-color: #1ABC9C; box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.12); }
body.cfa .cfa-tl-tablewrap { overflow-x: auto; }
body.cfa .cfa-tl-table { width: 100%; border-collapse: collapse; }
body.cfa .cfa-tl-table th {
    text-align: left;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7d8c;
    font-weight: 700;
    padding: 8px 10px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
}
body.cfa .cfa-tl-table th.num { text-align: right; }
body.cfa .cfa-tl-table th .ar { opacity: 0; margin-left: 4px; font-size: 0.85em; }
body.cfa .cfa-tl-table th.sorted { color: #15314e; }
body.cfa .cfa-tl-table th.sorted .ar { opacity: 1; color: #ED8B00; }
body.cfa .cfa-tl-table td { padding: 10px; font-size: 0.82rem; color: #2a3b49; border-bottom: 1px solid rgba(0, 0, 0, 0.05); vertical-align: middle; }
body.cfa .cfa-tl-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
body.cfa .cfa-tl-table tbody tr { cursor: pointer; transition: background-color 0.12s ease; }
body.cfa .cfa-tl-table tbody tr:hover { background: rgba(26, 188, 156, 0.06); }
body.cfa .cfa-tl-name { font-weight: 600; color: #0E6E7C; }
body.cfa .cfa-tl-badge { display: inline-block; font-size: 0.64rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: #06222b; white-space: nowrap; }
body.cfa .cfa-tl-trips { display: flex; align-items: center; gap: 9px; justify-content: flex-end; }
body.cfa .cfa-tl-bar { width: 78px; height: 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.07); overflow: hidden; flex: none; }
body.cfa .cfa-tl-bar span { display: block; height: 100%; border-radius: 4px; }
body.cfa .cfa-tl-tripsnum { font-weight: 600; min-width: 44px; text-align: right; }
body.cfa .cfa-tl-routes { color: #48606f; max-width: 280px; }
body.cfa .cfa-tl-chip { display: inline-block; font-size: 0.7rem; background: rgba(14, 110, 124, 0.08); color: #0E6E7C; border: 1px solid rgba(14, 110, 124, 0.18); border-radius: 6px; padding: 1px 7px; margin: 1px 4px 1px 0; white-space: nowrap; }
body.cfa .cfa-tl-more { color: #8a99a6; font-size: 0.72rem; }
body.cfa .cfa-tl-empty { text-align: center; color: #8a99a6; padding: 26px; font-size: 0.85rem; }

/* floating Map/List toggle — lives on the container so it persists in both modes */
body.cfa .cfa-transit-toggle {
    position: absolute;
    top: 0; right: 0;
    z-index: 5;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    color: #0E6E7C;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
body.cfa .cfa-transit-toggle:hover { background: #1ABC9C; color: #fff; border-color: #1ABC9C; }
