/* Tailwind v3 Preflight Reset */
        *, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; }
        html { line-height: 1.5; -webkit-text-size-adjust: 100%; font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; }
        body { margin: 0; line-height: inherit; }
        h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }
        p { margin: 0; }
        a { color: inherit; text-decoration: inherit; }
        b, strong { font-weight: bolder; }
        button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; padding: 0; }
        button, select { text-transform: none; }
        button, [type='button'] { -webkit-appearance: button; background-color: transparent; background-image: none; }
        img, svg, video, canvas { display: block; vertical-align: middle; }
        img, video { max-width: 100%; height: auto; }
        [hidden] { display: none; }
        table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
        ul, ol { list-style: none; margin: 0; padding: 0; }
        input::placeholder { color: #9ca3af; }
        /* Layout */
        .hidden { display: none; }
        .block { display: block; }
        .flex { display: flex; }
        .grid { display: grid; }
        .inline-flex { display: inline-flex; }
        /* Flexbox & Grid */
        .flex-1 { flex: 1 1 0%; }
        .flex-shrink-0 { flex-shrink: 0; }
        .flex-wrap { flex-wrap: wrap; }
        .items-center { align-items: center; }
        .justify-between { justify-content: space-between; }
        .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
        .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .gap-2 { gap: 0.5rem; }
        .gap-3 { gap: 0.75rem; }
        .gap-4 { gap: 1rem; }
        .gap-6 { gap: 1.5rem; }
        .gap-8 { gap: 2rem; }
        /* Spacing */
        .p-3 { padding: 0.75rem; }
        .p-4 { padding: 1rem; }
        .p-6 { padding: 1.5rem; }
        .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
        .px-4 { padding-left: 1rem; padding-right: 1rem; }
        .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
        .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
        .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
        .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
        .py-4 { padding-top: 1rem; padding-bottom: 1rem; }
        .py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
        .py-8 { padding-top: 2rem; padding-bottom: 2rem; }
        .py-16 { padding-top: 4rem; padding-bottom: 4rem; }
        .pb-1 { padding-bottom: 0.25rem; }
        .pb-6 { padding-bottom: 1.5rem; }
        .pt-6 { padding-top: 1.5rem; }
        .mb-1 { margin-bottom: 0.25rem; }
        .mb-2 { margin-bottom: 0.5rem; }
        .mb-3 { margin-bottom: 0.75rem; }
        .mb-4 { margin-bottom: 1rem; }
        .mb-6 { margin-bottom: 1.5rem; }
        .mb-8 { margin-bottom: 2rem; }
        .mt-1 { margin-top: 0.25rem; }
        .mt-4 { margin-top: 1rem; }
        .mt-16 { margin-top: 4rem; }
        .mr-1 { margin-right: 0.25rem; }
        .mx-auto { margin-left: auto; margin-right: auto; }
        .space-y-1 > * + * { margin-top: 0.25rem; }
        /* Sizing */
        .w-4 { width: 1rem; }
        .w-6 { width: 1.5rem; }
        .w-8 { width: 2rem; }
        .w-16 { width: 4rem; }
        .w-full { width: 100%; }
        .h-4 { height: 1rem; }
        .h-6 { height: 1.5rem; }
        .h-8 { height: 2rem; }
        .h-16 { height: 4rem; }
        .min-h-screen { min-height: 100vh; }
        .min-w-full { min-width: 100%; }
        .max-w-4xl { max-width: 56rem; }
        .max-w-7xl { max-width: 80rem; }
        /* Typography */
        .text-xs { font-size: 0.75rem; line-height: 1rem; }
        .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
        .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
        .text-xl { font-size: 1.25rem; line-height: 1.75rem; }
        .text-2xl { font-size: 1.5rem; line-height: 2rem; }
        .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
        .text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
        .font-bold { font-weight: 700; }
        .font-medium { font-weight: 500; }
        .font-semibold { font-weight: 600; }
        .uppercase { text-transform: uppercase; }
        .text-center { text-align: center; }
        .text-left { text-align: left; }
        .text-right { text-align: right; }
        .leading-relaxed { line-height: 1.625; }
        .tracking-wide { letter-spacing: 0.025em; }
        .whitespace-nowrap { white-space: nowrap; }
        .align-top { vertical-align: top; }
        .underline { text-decoration-line: underline; }
        /* Colors */
        .text-white { color: #fff; }
        .text-gray-400 { color: #9ca3af; }
        .text-gray-600 { color: #4b5563; }
        .text-gray-700 { color: #374151; }
        .text-gray-800 { color: #1f2937; }
        .text-gray-900 { color: #111827; }
        .text-blue-600 { color: #2563eb; }
        .text-blue-700 { color: #1d4ed8; }
        .text-amber-900 { color: #78350f; }
        .bg-white { background-color: #fff; }
        .bg-gray-50 { background-color: #f9fafb; }
        .bg-gray-200 { background-color: #e5e7eb; }
        .bg-blue-50 { background-color: #eff6ff; }
        .bg-yellow-50 { background-color: #fefce8; }
        .bg-red-50 { background-color: #fef2f2; }
        .bg-amber-50 { background-color: #fffbeb; }
        .opacity-75 { opacity: 0.75; }
        .opacity-90 { opacity: 0.9; }
        /* Borders */
        .border { border-width: 1px; }
        .border-b { border-bottom-width: 1px; }
        .border-b-2 { border-bottom-width: 2px; }
        .border-l-4 { border-left-width: 4px; }
        .border-t { border-top-width: 1px; }
        .border-white { border-color: #fff; }
        .border-gray-200 { border-color: #e5e7eb; }
        .border-gray-300 { border-color: #d1d5db; }
        .border-gray-400 { border-color: #9ca3af; }
        .border-gray-600 { border-color: #4b5563; }
        .border-blue-600 { border-color: #2563eb; }
        .border-amber-300 { border-color: #fcd34d; }
        .border-l-blue-500 { border-left-color: #3b82f6; }
        .border-l-yellow-500 { border-left-color: #eab308; }
        .border-l-red-600 { border-left-color: #dc2626; }
        .rounded { border-radius: 0.25rem; }
        .rounded-lg { border-radius: 0.5rem; }
        .divide-y > * + * { border-top-width: 1px; }
        .divide-gray-200 > * + * { border-color: #e5e7eb; }
        /* Effects */
        .shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
        .overflow-hidden { overflow: hidden; }
        .overflow-x-auto { overflow-x: auto; }
        .ring-2 { outline: 2px solid var(--tw-ring-color, #3b82f6); outline-offset: 0; }
        .ring-blue-800 { --tw-ring-color: #1e40af; }
        /* Hover */
        .hover\:underline:hover { text-decoration-line: underline; }
        /* Responsive */
        @media (min-width: 768px) {
            .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
            .md\:block { display: block; }
            .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
            .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
        }
        @media (min-width: 1024px) {
            .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        }
        
        body {
            font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            color: #1b1b1b;
        }
        
        h1, h2, h3 {
            font-family: 'Merriweather', Georgia, serif;
        }
        
        /* Official US Government Colors */
        .gov-header {
            background-color: #f0f0f0;
            border-bottom: 1px solid #dfe1e2;
        }
        
        .gov-blue {
            background-color: #005ea2;
        }
        
        .gov-dark-blue {
            background-color: #112e51;
        }
        
        /* Travel Advisory Level Colors (Official State Dept) */
        .level-1 {
            background-color: #00bde3;
            color: #162e51;
        }
        
        .level-2 {
            background-color: #ffbe2e;
            color: #162e51;
        }
        
        .level-3 {
            background-color: #fa9441;
            color: white;
        }
        
        .level-4 {
            background-color: #d83933;
            color: white;
        }
        
        .card-gov {
            border: 1px solid #dfe1e2;
            transition: all 0.2s ease;
        }
        
        .card-gov:hover {
            border-color: #005ea2;
            box-shadow: 0 2px 8px rgba(0, 94, 162, 0.15);
        }
        
        #map {
            height: 600px;
            border: 1px solid #dfe1e2;
        }
        
        .btn-gov {
            font-weight: 600;
            border: 2px solid transparent;
            transition: all 0.2s ease;
        }
        
        .btn-gov:hover {
            border-color: #112e51;
        }
        
        .gov-input {
            border: 1px solid #565c65;
            padding: 0.5rem 0.75rem;
        }
        
        .gov-input:focus {
            outline: 2px solid #005ea2;
            outline-offset: 0;
        }
        
        .stat-box {
            border-left: 4px solid #005ea2;
        }

        .advisory-popup .leaflet-popup-content-wrapper {
            border: 1px solid #dfe1e2;
            border-radius: 12px;
            padding: 0;
            overflow: hidden;
            max-width: min(88vw, 380px);
            max-height: min(72vh, 560px);
            box-shadow: 0 12px 28px rgba(17, 46, 81, 0.22);
        }

        .advisory-popup .leaflet-popup-content {
            margin: 0;
            min-width: 260px;
            max-width: min(88vw, 380px) !important;
            max-height: min(66vh, 500px);
            overflow-y: auto;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
            font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        .advisory-popup .leaflet-popup-tip {
            background: #ffffff;
            border: 1px solid #dfe1e2;
        }

        .country-popup-card {
            background: #ffffff;
            color: #1b1b1b;
        }

        .country-popup-header {
            background: linear-gradient(180deg, rgba(240, 246, 252, 0.95), rgba(255, 255, 255, 1));
            border-top: 4px solid var(--advisory-color);
            border-bottom: 1px solid #dfe1e2;
            padding: 12px 14px 10px;
        }

        .country-popup-level {
            display: inline-flex;
            align-items: center;
            border-radius: 999px;
            background: var(--advisory-color);
            color: var(--advisory-foreground);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.02em;
            padding: 3px 10px;
            margin-bottom: 9px;
        }

        .country-popup-title {
            margin: 0 0 3px;
            font-family: 'Merriweather', Georgia, serif;
            font-size: 17px;
            line-height: 1.25;
            color: #112e51;
        }

        .country-popup-region {
            margin: 0;
            font-size: 12px;
            color: #565c65;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .country-popup-body {
            padding: 12px 14px 14px;
        }

        .country-popup-advisory {
            margin: 0 0 10px;
            font-size: 13px;
            font-weight: 700;
            color: #1b1b1b;
            line-height: 1.4;
        }

        .country-popup-reason-label {
            margin: 0 0 4px;
            font-size: 10px;
            font-weight: 700;
            color: #565c65;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .country-popup-reason {
            margin: 0 0 10px;
            font-size: 12px;
            line-height: 1.45;
            color: #1b1b1b;
            background: #f6f9fc;
            border: 1px solid #dfe1e2;
            border-radius: 8px;
            padding: 8px 9px;
        }

        .country-popup-updated {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 11px;
            color: #71767a;
            font-weight: 600;
        }

        .country-popup-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--advisory-color);
            flex-shrink: 0;
        }

        @media (max-width: 768px) {
            #map {
                height: 66vh;
                min-height: 420px;
                max-height: 620px;
            }

            .advisory-popup .leaflet-popup-content-wrapper {
                border-radius: 14px;
                max-width: min(94vw, 430px);
                max-height: 62vh;
            }

            .advisory-popup .leaflet-popup-content {
                min-width: 0;
                width: min(94vw, 430px) !important;
                max-width: min(94vw, 430px) !important;
                max-height: 56vh;
            }

            .country-popup-header {
                padding: 10px 12px 9px;
            }

            .country-popup-body {
                padding: 10px 12px 12px;
            }

            .country-popup-title {
                font-size: 16px;
            }

            .country-popup-reason {
                font-size: 12px;
                line-height: 1.4;
            }

            .leaflet-touch .leaflet-control-zoom a {
                width: 34px;
                height: 34px;
                line-height: 34px;
                font-size: 20px;
            }

            .advisory-popup .leaflet-popup-close-button {
                width: 34px;
                height: 34px;
                font-size: 24px;
                line-height: 30px;
                padding: 0;
            }
        }

        /* Site Theme Toggle */
        .site-theme-toggle {
            position: fixed;
            right: 1rem;
            bottom: 1rem;
            z-index: 1600;
            display: inline-flex;
            align-items: center;
            gap: 0.55rem;
            border-radius: 999px;
            border: 1px solid #9fbef0;
            background: linear-gradient(135deg, #112e51 0%, #1d4f8c 100%);
            color: #f8fbff;
            padding: 0.5rem 0.8rem 0.5rem 0.6rem;
            font-size: 0.78rem;
            font-weight: 700;
            box-shadow: 0 10px 24px rgba(3, 23, 54, 0.28);
            cursor: pointer;
            transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
        }

        .site-theme-toggle:hover {
            transform: translateY(-1px);
            box-shadow: 0 14px 28px rgba(3, 23, 54, 0.35);
        }

        .site-theme-toggle-switch {
            position: relative;
            width: 2.2rem;
            height: 1.2rem;
            border-radius: 999px;
            border: 1px solid rgba(176, 206, 255, 0.55);
            background: rgba(231, 241, 255, 0.18);
            flex-shrink: 0;
        }

        .site-theme-toggle-thumb {
            position: absolute;
            top: 50%;
            left: 2px;
            width: 0.9rem;
            height: 0.9rem;
            border-radius: 50%;
            transform: translateY(-50%);
            background: #f8fbff;
            box-shadow: 0 2px 8px rgba(3, 23, 54, 0.28);
            transition: left 180ms ease, background 180ms ease;
        }

        .site-theme-toggle-label {
            line-height: 1;
            white-space: nowrap;
        }

        body.theme-dark .site-theme-toggle {
            border-color: #8aa5cf;
            background: linear-gradient(135deg, #0b1220 0%, #1a2740 100%);
        }

        body.theme-dark .site-theme-toggle-thumb {
            left: calc(100% - 0.9rem - 2px);
            background: #ffdd85;
        }

        /* Global Dark Theme */
        body.theme-dark {
            background-color: #0b1220;
            color: #e2e8f0;
        }

        body.theme-dark .gov-dark-blue {
            background-color: #08152d;
        }

        body.theme-dark .gov-blue {
            background-color: #0c3a6c;
        }

        body.theme-dark .bg-white {
            background-color: #0f172a;
        }

        body.theme-dark .bg-gray-50 {
            background-color: #111827;
        }

        body.theme-dark .bg-gray-200 {
            background-color: #1f2937;
        }

        body.theme-dark .bg-blue-50 {
            background-color: #102948;
        }

        body.theme-dark .bg-yellow-50 {
            background-color: #3c320d;
        }

        body.theme-dark .bg-red-50 {
            background-color: #43191e;
        }

        body.theme-dark .bg-amber-50 {
            background-color: #3f2e10;
        }

        body.theme-dark .text-gray-900 {
            color: #f8fafc;
        }

        body.theme-dark .text-gray-800 {
            color: #e2e8f0;
        }

        body.theme-dark .text-gray-700 {
            color: #cbd5e1;
        }

        body.theme-dark .text-gray-600 {
            color: #94a3b8;
        }

        body.theme-dark .text-gray-400 {
            color: #64748b;
        }

        body.theme-dark .border-gray-200,
        body.theme-dark .border-gray-300 {
            border-color: #334155;
        }

        body.theme-dark .border-gray-400 {
            border-color: #475569;
        }

        body.theme-dark .border-gray-600 {
            border-color: #64748b;
        }

        body.theme-dark .divide-gray-200 > * + * {
            border-color: #334155;
        }

        body.theme-dark .card-gov {
            background: #111827;
            border-color: #334155;
        }

        body.theme-dark .card-gov:hover {
            border-color: #60a5fa;
            box-shadow: 0 8px 24px rgba(96, 165, 250, 0.18);
        }

        body.theme-dark .gov-input {
            background: #0b1220;
            color: #e2e8f0;
            border-color: #64748b;
        }

        body.theme-dark .gov-input:focus {
            outline-color: #60a5fa;
        }

        body.theme-dark .gov-input::placeholder {
            color: #94a3b8;
        }

        body.theme-dark .advisory-popup .leaflet-popup-content-wrapper {
            background: #0f172a;
            border-color: #334155;
            box-shadow: 0 14px 30px rgba(2, 6, 23, 0.62);
        }

        body.theme-dark .advisory-popup .leaflet-popup-tip {
            background: #0f172a;
            border-color: #334155;
        }

        body.theme-dark .country-popup-card {
            background: #0f172a;
            color: #e2e8f0;
        }

        body.theme-dark .country-popup-header {
            background: linear-gradient(180deg, rgba(17, 27, 49, 0.96), rgba(15, 23, 42, 1));
            border-bottom-color: #334155;
        }

        body.theme-dark .country-popup-title {
            color: #e5edff;
        }

        body.theme-dark .country-popup-region,
        body.theme-dark .country-popup-reason-label,
        body.theme-dark .country-popup-updated {
            color: #94a3b8;
        }

        body.theme-dark .country-popup-advisory,
        body.theme-dark .country-popup-reason {
            color: #e2e8f0;
        }

        body.theme-dark .country-popup-reason {
            background: #111827;
            border-color: #334155;
        }
