@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

        body {
            font-family: 'Inter', sans-serif;
            background-color: #f8fafc;
            /* slate-50 */
            color: #0f172a;
            margin: 0;
            overflow: hidden;
        }

        /* Active Notch Reverse Corner Radii - Fixed with Radial Gradients */
        .active-notch::before {
            content: "";
            position: absolute;
            right: 0;
            bottom: 100%;
            width: 24px;
            height: 24px;
            background: radial-gradient(circle at top left, transparent 23.5px, #f8fafc 24px);
            pointer-events: none;
        }

        .active-notch::after {
            content: "";
            position: absolute;
            right: 0;
            top: 100%;
            width: 24px;
            height: 24px;
            background: radial-gradient(circle at bottom left, transparent 23.5px, #f8fafc 24px);
            pointer-events: none;
        }

        /* Inactive Item Spotlight Glow (Wine complementary glow from ds.html) */
        .flashlight-btn {
            position: relative;
            overflow: hidden;
            transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .flashlight-btn::after {
            content: "";
            position: absolute;
            inset: -1px;
            background: radial-gradient(100px circle at var(--mouse-x, 0) var(--mouse-y, 0),
                    rgba(148, 37, 48, 0.35),
                    /* Intensified Wine complementary glow */
                    transparent 50%);
            opacity: 0;
            transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            pointer-events: none;
            border-radius: inherit;
            z-index: 0;
        }

        .flashlight-btn>* {
            position: relative;
            z-index: 10;
        }

        .flashlight-btn:hover::after {
            opacity: 1;
        }

        /* Floating Sidebar Ambient Life */
        @keyframes float-sidebar {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-8px);
            }
        }

        /* Nav Load Stagger Animation (Sync with ds.html) */
        .nav-load {
            opacity: 0;
            transform: translateX(-40px);
            filter: blur(4px);
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .nav-load.loaded {
            opacity: 1;
            transform: translateX(0);
            filter: blur(0);
        }

        /* Button Entry Stagger (Reveal pattern from ds.html: translateY(2rem)) */
        .nav-item {
            opacity: 0;
            transform: translateY(2rem);
            transition: all 1.0s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .loaded .nav-item {
            opacity: 1;
            transform: translateY(0);
        }

        /* Pulse slow for active item icon */
        .pulse-icon {
            animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }

        @keyframes pulse-slow {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.85;
                transform: scale(1.05);
            }
        }

        /* AIBI Hover Float & Glow */
        @keyframes aibi-levitate {

            0%,
            100% {
                transform: translateY(0px);
                filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
            }

            50% {
                transform: translateY(-4px);
                filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.8));
            }
        }

        .aibi-levitate {
            animation: aibi-levitate 3.5s ease-in-out infinite;
        }

        /* AIBI Tooltip Entry (ds.html DNA) */
        .aibi-tooltip-entry {
            transform-origin: left center;
            transform: translateX(-30px);
            opacity: 0;
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
            pointer-events: none;
        }

        .group:hover .aibi-tooltip-entry {
            transform: translateX(0);
            opacity: 1;
        }

        /* Lettering Mask Reveal (ds.html DNA) */
        .tooltip-text-wrapper {
            overflow: hidden;
            display: inline-block;
            vertical-align: bottom;
        }

        .tooltip-text-content {
            transform: translateY(110%);
            opacity: 0;
            transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
            display: block;
        }

        .group:hover .tooltip-text-content {
            transform: translateY(0);
            opacity: 1;
        }

        /* Main Content Reveal Animations */
        .reveal {
            opacity: 0;
            transform: translateY(30px);
            transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        .delay-100 {
            transition-delay: 100ms;
        }

        .delay-200 {
            transition-delay: 200ms;
        }

        .delay-300 {
            transition-delay: 300ms;
        }

        .delay-400 {
            transition-delay: 400ms;
        }

        /* Custom Scrollbar for Dark Cards */
        .custom-scrollbar::-webkit-scrollbar {
            width: 5px;
        }

        .custom-scrollbar::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 4px;
            margin-block: 10px;
        }

        .custom-scrollbar::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 4px;
        }

        .custom-scrollbar::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        /* Custom Tooltip Styling for Top 5 */
        .map-tooltip-wrapper {
            position: absolute;
            bottom: calc(100% + 10px);
            left: 50%;
            transform: translateX(-50%) translateY(20px) scale(0.9);
            background: linear-gradient(135deg, rgba(37, 30, 51, 0.95) 0%, rgba(20, 15, 28, 0.98) 100%);
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow: 0 16px 36px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
            border-radius: 16px;
            padding: 12px;
            width: min(280px, calc(100vw - 40px));
            min-width: 260px;
            pointer-events: none;
            opacity: 0;
            z-index: 1000;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            /* Bouncy animation */
            backdrop-filter: blur(12px);
        }

        .map-tooltip-wrapper > .flex:first-child {
            gap: 8px !important;
            margin-bottom: 10px !important;
            padding-bottom: 8px !important;
        }

        .map-tooltip-wrapper > .flex:first-child > div {
            width: 26px !important;
            height: 26px !important;
        }

        .map-tooltip-wrapper h4 {
            font-size: 10px !important;
            line-height: 1.2 !important;
        }

        .map-tooltip-wrapper .tooltip-row {
            gap: 8px !important;
            margin-bottom: 8px !important;
        }

        .map-tooltip-wrapper .tooltip-row > span:first-child {
            width: 68px !important;
            font-size: 8px !important;
        }

        .map-tooltip-wrapper .tooltip-row > div:nth-child(2) {
            height: 16px !important;
        }

        .map-tooltip-wrapper .tooltip-row > div:last-child {
            width: 76px !important;
        }

        .map-tooltip-wrapper .tooltip-row > div:last-child > span:first-child {
            font-size: 10px !important;
        }

        .map-tooltip-wrapper .tooltip-row iconify-icon,
        .map-tooltip-wrapper .tooltip-row > div:last-child span:last-child {
            font-size: 8px !important;
        }

        .map-bubble-wrapper > .map-tooltip-wrapper {
            display: none;
        }

        .map-tooltip-wrapper.map-floating-tooltip {
            display: block;
            position: fixed;
            bottom: auto;
            left: 0;
            top: 0;
            opacity: 0;
            pointer-events: none;
            overflow: hidden;
            transform: translate(-50%, calc(-100% - 14px)) scale(0.96);
            transition: opacity 0.22s ease, transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
            will-change: transform, opacity;
            z-index: 99999;
        }

        .map-tooltip-wrapper.map-floating-tooltip::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.12) 45%, transparent 58%);
            opacity: 0;
            transform: translateX(-120%);
            pointer-events: none;
            z-index: 1;
        }

        .map-tooltip-wrapper.map-floating-tooltip > * {
            position: relative;
            z-index: 2;
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-visible {
            opacity: 1;
            transform: translate(-50%, calc(-100% - 14px)) scale(1);
            box-shadow: 0 22px 52px rgba(0, 0, 0, 0.7), 0 0 30px rgba(168, 85, 247, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated::before {
            opacity: 1;
            animation: tooltip-sheen 1.25s ease-out forwards;
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-below {
            transform: translate(-50%, 14px) scale(0.96);
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-below.is-visible {
            transform: translate(-50%, 14px) scale(1);
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-below::after {
            top: auto;
            bottom: 100%;
            border-color: transparent transparent rgba(37, 30, 51, 0.98) transparent;
        }

        .map-tooltip-wrapper.map-floating-tooltip > .flex:first-child {
            opacity: 0;
            transform: translateY(-6px);
            transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated > .flex:first-child {
            opacity: 1;
            transform: translateY(0);
        }

        .map-tooltip-wrapper.map-floating-tooltip .tooltip-row {
            opacity: 0;
            transform: translateX(-15px);
            transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1), transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s ease;
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row {
            opacity: 1;
            transform: translateX(0);
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(1) {
            transition-delay: 0.08s;
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(2) {
            transition-delay: 0.14s;
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(3) {
            transition-delay: 0.20s;
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(4) {
            transition-delay: 0.26s;
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(5) {
            transition-delay: 0.32s;
        }

        .map-tooltip-wrapper.map-floating-tooltip .tooltip-row:hover {
            background-color: rgba(255, 255, 255, 0.04);
            transform: translateX(2px);
        }

        .map-tooltip-wrapper.map-floating-tooltip .tooltip-bar-fill {
            width: 0%;
            transition: width 0.95s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(1) .tooltip-bar-fill {
            transition-delay: 0.15s;
            width: var(--bar-width);
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(2) .tooltip-bar-fill {
            transition-delay: 0.22s;
            width: var(--bar-width);
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(3) .tooltip-bar-fill {
            transition-delay: 0.29s;
            width: var(--bar-width);
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(4) .tooltip-bar-fill {
            transition-delay: 0.36s;
            width: var(--bar-width);
        }

        .map-tooltip-wrapper.map-floating-tooltip.is-animated .tooltip-row:nth-child(5) .tooltip-bar-fill {
            transition-delay: 0.43s;
            width: var(--bar-width);
        }

        @keyframes tooltip-sheen {
            0% {
                transform: translateX(-120%);
            }
            100% {
                transform: translateX(120%);
            }
        }

        .map-bubble-wrapper:hover,
        .map-bubble-wrapper.is-active-region {
            z-index: 1200 !important;
            /* Fix tooltip overlap */
        }

        .map-bubble-wrapper:hover .map-tooltip-wrapper,
        .map-bubble-wrapper.is-active-region .map-tooltip-wrapper {
            opacity: 1;
            transform: translateX(-50%) translateY(0) scale(1);
        }

        .map-tooltip-wrapper::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -10px;
            border-width: 10px;
            border-style: solid;
            border-color: rgba(37, 30, 51, 0.98) transparent transparent transparent;
        }

        /* Staggered Row Animations in Tooltip */
        .tooltip-row {
            opacity: 0;
            transform: translateX(-15px);
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .map-bubble-wrapper:hover .tooltip-row,
        .map-bubble-wrapper.is-active-region .tooltip-row {
            opacity: 1;
            transform: translateX(0);
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(1),
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(1) {
            transition-delay: 0.1s;
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(2),
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(2) {
            transition-delay: 0.15s;
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(3),
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(3) {
            transition-delay: 0.2s;
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(4),
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(4) {
            transition-delay: 0.25s;
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(5),
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(5) {
            transition-delay: 0.3s;
        }

        /* Dynamic Tooltip Bar Animations via CSS Variables */
        .tooltip-bar-fill {
            width: 0%;
            transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
            /* Bouncy width */
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(1) .tooltip-bar-fill,
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(1) .tooltip-bar-fill {
            transition-delay: 0.15s;
            width: var(--bar-width);
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(2) .tooltip-bar-fill,
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(2) .tooltip-bar-fill {
            transition-delay: 0.20s;
            width: var(--bar-width);
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(3) .tooltip-bar-fill,
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(3) .tooltip-bar-fill {
            transition-delay: 0.25s;
            width: var(--bar-width);
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(4) .tooltip-bar-fill,
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(4) .tooltip-bar-fill {
            transition-delay: 0.30s;
            width: var(--bar-width);
        }

        .map-bubble-wrapper:hover .tooltip-row:nth-child(5) .tooltip-bar-fill,
        .map-bubble-wrapper.is-active-region .tooltip-row:nth-child(5) .tooltip-bar-fill {
            transition-delay: 0.35s;
            width: var(--bar-width);
        }

        /* ===== Map Bubble System ===== */
        .map-bubble-wrapper {
            position: absolute;
            transform: translate(-50%, -50%);
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            z-index: 500 !important;
            cursor: pointer;
        }

        .map-bubble {
            position: absolute;
            border-radius: 50%;
            background: var(--bubble-bg);
            box-shadow: 0 0 20px var(--bubble-glow);
            transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .map-bubble:hover {
            transform: scale(1.3);
            z-index: 600;
        }

        .map-bubble-ping {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            opacity: 0.6;
            animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
        }

        .map-bubble-label {
            color: #fff;
            font-family: 'Inter', sans-serif;
            font-size: 8px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.6);
            z-index: 10;
            text-align: center;
        }

        /* Override Leaflet Background */
        .leaflet-container {
            background: transparent !important;
        }

/* Responsive layout overrides */
        * {
            min-width: 0;
        }

        html.map-gesture-lock,
        body.map-gesture-lock {
            overflow: hidden !important;
            overscroll-behavior: none !important;
        }

        #ranking-uf-container,
        #ranking-mun-container {
            overscroll-behavior: contain;
        }

        @media (min-width: 901px) and (max-width: 1180px) {
            body > nav {
                left: 16px !important;
                top: 16px !important;
                bottom: 16px !important;
                width: 96px !important;
            }

            body > main {
                padding-left: 136px !important;
                padding-right: 24px !important;
            }
        }

        @media (max-width: 900px) {
            html,
            body {
                height: auto !important;
                min-height: 100%;
                overflow-x: hidden;
            }

            body {
                display: block !important;
                padding-bottom: 96px;
            }

            body > nav {
                left: 0 !important;
                right: 0 !important;
                top: auto !important;
                bottom: 0 !important;
                width: 100% !important;
                height: 78px !important;
                border-radius: 24px 24px 0 0 !important;
                flex-direction: row !important;
                align-items: center !important;
                justify-content: center !important;
                gap: 10px !important;
                padding: 8px 12px !important;
                animation: none !important;
            }

            body > nav > div:first-child,
            body > nav > div:nth-child(2),
            body > nav > div:last-child,
            .aibi-tooltip-entry {
                display: none !important;
            }

            body > nav > div:nth-child(3) {
                flex: 0 1 auto !important;
                width: auto !important;
                display: flex !important;
                flex-direction: row !important;
                align-items: center !important;
                justify-content: center !important;
                gap: 8px !important;
            }

            body > nav .nav-item {
                width: auto !important;
                justify-content: center !important;
            }

            body > nav a,
            body > nav .active-notch {
                width: 54px !important;
                height: 54px !important;
                border-radius: 18px !important;
                transform: none !important;
            }

            body > nav a:hover,
            body > nav .active-notch:hover {
                width: 54px !important;
                transform: none !important;
            }

            .active-notch::before,
            .active-notch::after {
                display: none !important;
            }

            body > main {
                height: auto !important;
                min-height: 100vh;
                padding: 24px 16px 108px !important;
                overflow: visible !important;
            }

            body > main header {
                margin-bottom: 24px !important;
            }

            body > main header h1 {
                font-size: clamp(1.7rem, 8vw, 2.4rem) !important;
                line-height: 1.05 !important;
                overflow-wrap: anywhere;
            }

            body > main header h2 {
                font-size: 1rem !important;
                line-height: 1.4 !important;
            }

            body > main h3 {
                overflow-wrap: anywhere;
            }

            body > main .grid {
                height: auto !important;
                min-height: 0 !important;
            }

            [class*="h-[calc"] {
                height: auto !important;
                min-height: 0 !important;
            }

            [class*="h-[700px]"],
            [class*="h-[300px]"] {
                height: auto !important;
                min-height: 320px !important;
            }

            #mapa-uf {
                height: 55vh !important;
                min-height: 340px !important;
                overscroll-behavior: contain;
                touch-action: none !important;
            }

            .map-tooltip-wrapper {
                bottom: calc(100% + 8px);
                width: min(240px, calc(100vw - 32px));
                min-width: 220px;
                padding: 10px;
                border-radius: 14px;
            }

            .map-tooltip-wrapper .tooltip-row {
                gap: 6px !important;
                margin-bottom: 6px !important;
            }

            .map-tooltip-wrapper .tooltip-row > span:first-child {
                width: 58px !important;
            }

            .map-tooltip-wrapper .tooltip-row > div:last-child {
                width: 64px !important;
            }

            #mapa-uf .leaflet-container,
            #mapa-uf .leaflet-pane,
            #mapa-uf .leaflet-map-pane {
                overscroll-behavior: contain;
                touch-action: none !important;
            }

            #ranking-uf-container,
            #ranking-mun-container {
                max-height: 360px;
                min-height: 240px;
            }

            .ft-table-wrapper {
                overflow-x: auto !important;
                -webkit-overflow-scrolling: touch;
            }

            .ft-table {
                min-width: 760px;
            }
        }

        @media (max-width: 480px) {
            body {
                padding-bottom: 88px;
            }

            body > nav {
                height: 70px !important;
                padding: 8px !important;
                gap: 6px !important;
            }

            body > nav > div:nth-child(3) {
                gap: 6px !important;
            }

            body > nav a,
            body > nav .active-notch,
            body > nav a:hover,
            body > nav .active-notch:hover {
                width: 46px !important;
                height: 46px !important;
                border-radius: 16px !important;
            }

            body > nav svg,
            body > nav iconify-icon {
                width: 24px !important;
                height: 24px !important;
                font-size: 24px !important;
            }

            body > main {
                padding: 18px 12px 96px !important;
            }

            [class*="h-[700px]"],
            [class*="h-[300px]"] {
                min-height: 280px !important;
            }

            #mapa-uf {
                min-height: 300px !important;
            }
        }
