/* ── Reset & base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Figtree', sans-serif; background: #EBEBEB; overflow: hidden; height: 100vh; }

/* ── Full-screen map ────────────────────────────────────────────────────── */
.pw-map-wrapper {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    right: 0;
    background: #e8e4e0;
    z-index: 0;
    transition: right 0.38s cubic-bezier(0.4,0,0.2,1);
}
.pw-map-wrapper.split-open { right: 35%; }
#world-map { width: 100%; height: 100%; }

/* ── Split panel ─────────────────────────────────────────────────────────── */
.pw-split-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 35%;
    bottom: 0;
    background: #fff;
    overflow-y: auto;
    z-index: 5;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
    overscroll-behavior: contain;
    border-left: 1px solid #E5E7EB;
}
.pw-split-panel.open { transform: translateX(0); }

/* Panel loading state */
.pw-split-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 100%;
    color: #6B7280;
    font-size: 14px;
    font-family: 'Figtree', sans-serif;
}
.pw-split-panel.loading .pw-split-loading { display: flex; }
.pw-split-panel.loading .pw-split-content { display: none; }

/* ── Panel inner styles ──────────────────────────────────────────────────── */
.mp-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid #E5E7EB;
    padding: 14px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Row 1: flag + title + close btn */
.mp-header-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.mp-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.mp-header-text { min-width: 0; }
.mp-flag {
    width: 32px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #E5E7EB;
}
.mp-title {
    font-size: 14px;
    font-weight: 700;
    color: #0D1B4B;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mp-subtitle {
    font-size: 11.5px;
    color: #9CA3AF;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mp-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #9CA3AF;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mp-close-btn:hover { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }

/* Row 2: action buttons */
.mp-header-row2 {
    display: flex;
    align-items: center;
    gap: 7px;
}
.mp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Figtree', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
    border-radius: 9999px;
    padding: 5px 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.mp-action-btn:hover { background: #F3F4F6; border-color: #D1D5DB; color: #111827; }
.mp-action-btn--primary {
    background: #0D1B4B;
    color: #fff;
    border-color: #0D1B4B;
}
.mp-action-btn--primary:hover { background: #162460; border-color: #162460; color: #fff; }
.mp-action-btn.shortlisted { background: #EEF2FF; border-color: #6366F1; color: #4338CA; }

.mp-body { padding: 16px 16px 40px; background: #fff; }

.mp-section {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.mp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.mp-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: #111827;
}
.mp-scope { display: none; }

.mp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.mp-card {
    background: #FAFAFA;
    border: 1px solid #F0F0F0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: border-color 0.15s, background 0.15s;
}
.mp-card:hover { background: #fff; border-color: #D1D5DB; }
.mp-cat {
    font-size: 9.5px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.mp-name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
    margin-top: 1px;
}
.mp-val {
    font-size: 20px;
    font-weight: 700;
    color: #0D1B4B;
    line-height: 1.2;
    margin: 4px 0 2px;
}
.mp-desc {
    font-size: 10.5px;
    color: #9CA3AF;
    line-height: 1.4;
}
.mp-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 500;
    border-radius: 9999px;
    padding: 2px 7px;
    margin-top: 3px;
    width: fit-content;
}
.mp-trend.trend-up   { color: #065F46; background: #D1FAE5; }
.mp-trend.trend-down { color: #991B1B; background: #FEE2E2; }

/* ── Loading overlay ────────────────────────────────────────────────────── */
#loadingOverlay {
    position: absolute; inset: 0;
    background: rgba(235,235,235,.75);
    display: flex; align-items: center; justify-content: center; z-index: 50;
}
.pw-loading-inner {
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; font-size: 14px; color: #6B7280; font-weight: 500;
}
.pw-spinner {
    width: 32px; height: 32px; border: 3px solid #E5E7EB;
    border-top-color: #0D1B4B; border-radius: 50%;
    animation: pw-spin .7s linear infinite;
}
@keyframes pw-spin { to { transform: rotate(360deg); } }
.pw-btn-spinner {
    width: 12px; height: 12px; flex-shrink: 0;
    border: 2px solid rgba(55,65,81,.18); border-top-color: currentColor;
    border-radius: 50%; animation: pw-btn-spin .65s linear infinite;
    display: inline-block;
}
@keyframes pw-btn-spin { to { transform: rotate(360deg); } }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.pw-navbar {
    position: fixed; top: 20px; left: 20px; right: 20px; z-index: 250;
    display: flex; align-items: center; justify-content: space-between;
    pointer-events: none;
}
.pw-navbar > * { pointer-events: all; }

/* Mobile-only logo — hidden on desktop */
.pw-mobile-logo { display: none; }

/* Shared icon color */
.pw-pill-icon { flex-shrink: 0; color: #9CA3AF; }

/* ── Main unified pill (logo + search + sector + toggle) ── */
.pw-main-pill {
    display: flex; align-items: center;
    background: #fff; border-radius: 9999px;
    box-shadow: 0 2px 16px rgba(0,0,0,.10);
    padding: 10px 10px 10px 20px;
}

/* Logo section */
.pw-logo-wrap {
    display: flex; align-items: center;
    padding-right: 16px; flex-shrink: 0;
}
.pw-logo-wrap img {
    height: 26px; width: auto; display: block;
}

/* Vertical separator */
.pw-pill-sep {
    width: 1px; height: 20px; background: #E5E7EB; flex-shrink: 0;
}

/* Country search */
.pw-country-wrap {
    display: flex; align-items: center; gap: 8px;
    padding: 0 16px; min-width: 190px; position: relative;
}
.pw-country-wrap input {
    border: none; outline: none; font-family: 'Figtree', sans-serif;
    font-size: 14px; color: #111827; background: transparent; flex: 1; min-width: 0;
}

/* Country trigger (transparent on desktop — just a flex wrapper) */
.pw-country-trigger {
    display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
}

/* Mobile placeholder label — hidden on desktop */
.pw-country-trigger-label { display: none; }

/* Mobile chevron — hidden on desktop */
.pw-country-chevron { display: none !important; }

/* Mobile search wrap inside dropdown — hidden on desktop */
.pw-country-mob-search { display: none; }
.pw-country-wrap input::placeholder { color: #9CA3AF; }
.pw-country-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #F3F4F6; border-radius: 9999px;
    padding: 3px 6px 3px 8px;
    font-size: 13.5px; font-weight: 500; color: #111827;
    white-space: nowrap;
}
.pw-country-wrap.chip-active { min-width: 0; }
.pw-country-dropdown {
    position: absolute; top: calc(100% + 18px); left: -16px;
    width: 280px; background: #fff; border-radius: 8px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 16px rgba(0,0,0,.08); overflow: hidden; display: none; z-index: 200;
}
.pw-country-dropdown ul { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
.pw-country-dropdown li {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px;
    font-size: 13.5px; cursor: pointer; color: #111827; transition: background .12s;
}
.pw-country-dropdown li:hover { background: #F9FAFB; }
.pw-country-dropdown li img { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }

/* Sector */
.pw-sector-wrap {
    min-width: 190px; position: relative;
}
.pw-sector-trigger {
    display: flex; align-items: center; gap: 8px;
    padding: 0 16px; height: 40px;
    cursor: pointer; user-select: none;
}
.pw-sector-placeholder { font-size: 14px; color: #9CA3AF; flex: 1; white-space: nowrap; }
.pw-sector-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #F3F4F6; border-radius: 9999px;
    padding: 3px 6px 3px 10px;
    font-size: 13.5px; font-weight: 500; color: #111827;
    flex: 1; white-space: nowrap; overflow: hidden;
}
.pw-chip-clear {
    display: flex; align-items: center; justify-content: center;
    background: #E5E7EB; border: none; border-radius: 50%;
    width: 18px; height: 18px; cursor: pointer; flex-shrink: 0;
    color: #6B7280; transition: background .12s, color .12s; padding: 0;
}
.pw-chip-clear:hover { background: #D1D5DB; color: #111827; }
.pw-chevron { transition: transform .2s; flex-shrink: 0; color: #9CA3AF; }
.pw-chevron.open { transform: rotate(180deg); }
.pw-sector-dropdown {
    position: absolute; top: calc(100% + 18px); left: 0;
    width: 320px; background: #fff; border-radius: 8px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 16px rgba(0,0,0,.08); overflow: hidden; z-index: 200;
}
.pw-sector-search-wrap {
    display: flex; align-items: center; gap: 8px; padding: 12px 16px;
    border-bottom: 1px solid #E5E7EB;
}
.pw-sector-search-wrap input {
    border: none; outline: none; font-family: 'Figtree', sans-serif;
    font-size: 13.5px; color: #111827; background: transparent; flex: 1;
}
.pw-sector-search-wrap input::placeholder { color: #9CA3AF; }
#sectorList { list-style: none; padding: 0; margin: 0; max-height: 340px; overflow-y: auto; }
#sectorList li {
    display: flex; align-items: center; gap: 10px; padding: 11px 16px;
    font-size: 13.5px; cursor: pointer; color: #111827; transition: background .12s;
}
#sectorList li:hover { background: #F9FAFB; }

/* B2C / B2B toggle (sits inside main pill after last separator) */
.pw-toggle-pill {
    display: flex; align-items: center; gap: 3px;
    padding: 4px 4px 4px 12px;
}
.pw-type-btn {
    border: none; background: transparent;
    padding: 6px 14px; border-radius: 9999px;
    font-family: 'Figtree', sans-serif; font-size: 14px; font-weight: 500;
    color: #6B7280; cursor: pointer;
    transition: background .15s, color .15s;
}
.pw-type-btn.active { background: #0D1B4B; color: #fff; }

/* ── User avatar ─────────────────────────────────────────────────────────── */
.pw-avatar-wrap {
    position: relative;
}
.pw-avatar-btn {
    width: 40px; height: 40px; border-radius: 9999px;
    background: #0D1B4B; color: #fff;
    border: none; cursor: pointer;
    font-family: 'Figtree', sans-serif; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(13,27,75,.25);
    transition: opacity .15s;
    flex-shrink: 0;
}
.pw-avatar-btn:hover { opacity: .88; }
.pw-avatar-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    min-width: 220px; overflow: hidden; z-index: 500;
}
.pw-avatar-info {
    display: flex; flex-direction: column; gap: 2px;
    padding: 14px 16px;
}
.pw-avatar-name { font-size: 14px; font-weight: 600; color: #111827; }
.pw-avatar-email { font-size: 12px; color: #9CA3AF; }
.pw-avatar-sep { height: 1px; background: #F3F4F6; }
.pw-avatar-menu-link {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 11px 16px;
    font-family: 'Figtree', sans-serif; font-size: 14px; color: #374151;
    text-decoration: none; transition: background .12s;
}
.pw-avatar-menu-link:hover { background: #F9FAFB; color: #0D1B4B; }
.pw-avatar-logout {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 12px 16px;
    background: transparent; border: none; cursor: pointer;
    font-family: 'Figtree', sans-serif; font-size: 14px; color: #374151;
    text-align: left; transition: background .12s;
}
.pw-avatar-logout:hover { background: #FEF2F2; color: #DC2626; }

/* ── Nav right group ─────────────────────────────────────────────────────── */
.pw-nav-right {
    display: flex; align-items: center; gap: 8px;
}

/* ── AI button (icon-only, inside pill) ──────────────────────────────────── */
.pw-ai-btn {
    width: 32px; height: 32px; border-radius: 9999px; border: none; cursor: not-allowed;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: linear-gradient(135deg, #7C3AED 0%, #DB2777 60%, #F97316 100%);
    box-shadow: 0 1px 6px rgba(124,58,237,.30);
    transition: opacity .15s;
    opacity: 0.65;
}
.pw-ai-btn:hover { opacity: 0.8; }

/* ── Join waitlist pill (nav right) ─────────────────────────────────────── */
.pw-waitlist-nav-btn {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #0F172A;
    background: #fff;
    border-radius: 9999px;
    padding: 9px 18px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
    transition: background .15s, box-shadow .15s;
    flex-shrink: 0;
}
.pw-waitlist-nav-btn:hover {
    background: #F9FAFB;
    box-shadow: 0 2px 12px rgba(0,0,0,.16);
}

/* ── Shortlist nav icon ──────────────────────────────────────────────────── */
.pw-shortlist-nav-wrap { position: relative; }

.pw-shortlist-nav-btn {
    position: relative;
    width: 40px; height: 40px; border-radius: 9999px;
    background: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #374151;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
    transition: background .15s;
    flex-shrink: 0;
}
.pw-shortlist-nav-btn:hover { background: #F3F4F6; }

.pw-shortlist-badge {
    position: absolute; top: -3px; right: -3px;
    min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9999px;
    background: #0D1B4B; color: #fff;
    font-family: 'Figtree', sans-serif; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #EBEBEB;
    line-height: 1;
}

/* ── Shortlist panel ─────────────────────────────────────────────────────── */
.pw-shortlist-panel {
    position: absolute; top: calc(100% + 12px); right: 0;
    width: 380px;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.14);
    z-index: 500; overflow: hidden;
}

.pw-sl-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #F3F4F6;
}
.pw-sl-title {
    font-size: 15px; font-weight: 700; color: #111827;
}
.pw-sl-close {
    background: none; border: none; cursor: pointer;
    color: #9CA3AF; display: flex; align-items: center;
    padding: 4px; border-radius: 6px; transition: color .12s, background .12s;
}
.pw-sl-close:hover { color: #374151; background: #F3F4F6; }

.pw-sl-body { padding: 12px 8px; max-height: 420px; overflow-y: auto; }

.pw-sl-empty {
    padding: 24px 12px; text-align: center;
    font-size: 13.5px; color: #9CA3AF; line-height: 1.6;
}

.pw-sl-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; border-radius: 10px;
    transition: background .12s;
}
.pw-sl-item:hover { background: #F9FAFB; }

.pw-sl-flag { width: 28px; height: 20px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }

.pw-sl-info { flex: 1; min-width: 0; }
.pw-sl-country { font-size: 14px; font-weight: 600; color: #111827; }
.pw-sl-industry { font-size: 12px; color: #6B7280; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pw-sl-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.pw-sl-continue-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 9999px; border: none; cursor: pointer;
    background: #0D1B4B; color: #fff;
    font-family: 'Figtree', sans-serif; font-size: 12px; font-weight: 600;
    transition: background .15s; white-space: nowrap;
}
.pw-sl-continue-btn:hover { background: #162460; }

.pw-sl-research-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 9999px; cursor: pointer;
    background: transparent; color: #374151;
    border: 1.5px solid #D1D5DB;
    font-family: 'Figtree', sans-serif; font-size: 12px; font-weight: 600;
    transition: border-color .15s, background .15s; white-space: nowrap;
}
.pw-sl-research-btn:hover { border-color: #0D1B4B; background: #F9FAFB; }
.pw-sl-research-btn:disabled { opacity: .45; cursor: not-allowed; }

.pw-sl-delete-btn {
    background: none; border: none; cursor: pointer;
    color: #9CA3AF; display: flex; align-items: center;
    padding: 5px; border-radius: 6px; transition: color .12s, background .12s;
}
.pw-sl-delete-btn:hover { color: #DC2626; background: #FEF2F2; }

.pw-sl-error {
    margin: 0 12px 12px;
    padding: 10px 14px; border-radius: 8px;
    background: #FEF2F2; border: 1px solid #FECACA;
    font-size: 12.5px; color: #DC2626; line-height: 1.5;
}

/* ── Zoom controls ───────────────────────────────────────────────────────── */
.pw-zoom-controls {
    position: fixed; bottom: 36px; left: 28px; z-index: 100;
    display: flex; flex-direction: column; gap: 6px;
}
.pw-zoom-btn {
    width: 36px; height: 36px; background: #fff; border: none; border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12); font-size: 20px; cursor: pointer; color: #374151;
    display: flex; align-items: center; justify-content: center; transition: background .12s;
}
.pw-zoom-btn:hover { background: #F3F4F6; }

/* ── Side panel ──────────────────────────────────────────────────────────── */
.pw-panel {
    position: fixed;
    top: 14px; right: -580px;
    width: 540px;
    max-height: calc(100vh - 34px);
    background: #fff;
    z-index: 200;
    overflow-y: auto;
    transition: right .32s cubic-bezier(.22,1,.36,1);
    border-radius: 18px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 8px 40px rgba(0,0,0,.15), 0 2px 8px rgba(0,0,0,.06);
}
.pw-panel.open { right: 14px; }
.pw-panel::-webkit-scrollbar { width: 4px; }
.pw-panel::-webkit-scrollbar-track { background: transparent; }
.pw-panel::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 4px; }

.pw-panel-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 28px 28px 16px; border-bottom: 1px solid #F3F4F6;
}
.pw-panel-label {
    font-size: 11px; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: #6B7280;
    display: flex; align-items: center; gap: 4px; margin-bottom: 4px;
}
.pw-panel-title { font-size: 22px; font-weight: 700; color: #0D1B4B; line-height: 1.2; }
.pw-panel-close {
    background: none; border: none; cursor: pointer; color: #9CA3AF; padding: 2px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; transition: color .15s, background .15s; flex-shrink: 0;
}
.pw-panel-close:hover { color: #374151; background: #F3F4F6; }

/* Top-10 ranked table */
#panelCountries { padding: 0; }
.pw-top-table-wrap { overflow-x: hidden; }
.pw-top-table {
    width: 100%; border-collapse: collapse;
    font-family: 'Figtree', sans-serif;
    table-layout: fixed;
}

/* Column widths */
.pw-th-rank,  .pw-tr-td-rank  { width: 36px; }
.pw-th-market, .pw-tr-td-market { width: auto; }
.pw-th-num,   .pw-tr-td-num   { width: 78px; }
.pw-th-risk,  .pw-tr-td-risk  { width: 66px; }

.pw-top-table thead tr {
    border-bottom: 1px solid #F3F4F6;
}
.pw-top-table thead th {
    font-size: 10.5px; font-weight: 600; color: #9CA3AF;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 10px 6px 10px; text-align: left;
}
.pw-th-rank { padding-left: 24px !important; }

.pw-top-row {
    cursor: pointer;
    border-bottom: 1px solid #F9FAFB;
    transition: background .12s;
}
.pw-top-row:hover { background: #F9FAFB; }
.pw-top-row:last-child { border-bottom: none; }
.pw-top-row td { padding: 11px 6px; vertical-align: middle; }
.pw-tr-td-rank { padding-left: 24px !important; }
.pw-tr-td-risk { padding-right: 24px !important; }

.pw-tr-rank { font-size: 13px; font-weight: 700; color: #D1D5DB; }

.pw-tr-market { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pw-tr-flag { width: 26px; height: 18px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.pw-tr-name {
    font-size: 13px; font-weight: 600; color: #111827;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pw-tr-val { font-size: 13px; font-weight: 700; color: #111827; line-height: 1.2; }
.pw-tr-sub { font-size: 10.5px; font-weight: 600; margin-top: 1px; }
.pw-tr-sub-green  { color: #16A34A; }
.pw-tr-sub-muted  { color: #9CA3AF; }
.pw-tr-sub-amber  { color: #D97706; }
.pw-tr-sub-red    { color: #DC2626; }

.pw-tr-risk {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 7px; border-radius: 9999px; white-space: nowrap;
}
.pw-tr-risk-low  { background: #F0FDF4; color: #15803D; }
.pw-tr-risk-med  { background: #FFFBEB; color: #D97706; }
.pw-tr-risk-high { background: #FEF2F2; color: #DC2626; }

/* Matrix */
.pw-matrix { padding: 20px 28px 32px; border-top: 1px solid #F3F4F6; margin-top: 4px; }
.pw-matrix-title { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 4px; }
.pw-matrix-sub { font-size: 12.5px; color: #6B7280; margin-bottom: 16px; }
.pw-matrix-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #F9FAFB; }
.pw-matrix-item:last-child { border-bottom: none; }
.pw-matrix-icon-wrap {
    width: 36px; height: 36px; background: #F3F4F6; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    color: #374151; font-size: 16px;
}
.pw-matrix-name { font-size: 13px; font-weight: 600; color: #111827; margin-bottom: 2px; }
.pw-matrix-desc { font-size: 12px; color: #6B7280; line-height: 1.4; }
.pw-matrix-coverage {
    font-size: 11px; font-weight: 700; color: #16A34A;
    background: #F0FDF4; border-radius: 9999px;
    padding: 2px 7px; flex-shrink: 0; align-self: flex-start; margin-top: 2px;
}

/* ── Country profile ─────────────────────────────────────────────────────── */
.pw-cp-header {
    display: flex; align-items: center; justify-content: flex-end;
    padding: 20px 28px 0;
}
#cpContent { padding: 20px 28px 40px; }

.pw-cp-title-row { display: flex; align-items: center; gap: 12px; padding: 16px 0 12px; }
.pw-cp-flag { width: 40px; height: 28px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.pw-cp-name { font-size: 26px; font-weight: 700; color: #0D1B4B; }
.pw-cp-desc { font-size: 13.5px; color: #6B7280; line-height: 1.6; margin-bottom: 20px; }

/* Stats grid */
.pw-cp-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1px; background: #E5E7EB; border: 1px solid #E5E7EB;
    border-radius: 12px; overflow: hidden; margin-bottom: 20px;
}
.pw-cp-stat { background: #fff; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.pw-cp-stat-icon { color: #2563EB; }
.pw-cp-stat-val { font-size: 15px; font-weight: 700; color: #0D1B4B; line-height: 1; }
.pw-cp-stat-label { font-size: 11px; color: #6B7280; font-weight: 500; }

/* Cities */
.pw-cp-cities { margin-bottom: 20px; }
.pw-cp-cities-label {
    font-size: 12px; font-weight: 600; color: #6B7280;
    letter-spacing: .04em; text-transform: uppercase; display: block; margin-bottom: 8px;
}
.pw-cp-cities-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-city-chip {
    font-size: 12.5px; background: #F3F4F6; border: 1px solid #E5E7EB;
    border-radius: 9999px; padding: 3px 10px; color: #374151;
}

/* Metric rows */
.pw-metric-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0; border-bottom: 1px solid #F3F4F6; gap: 12px;
}
.pw-metric-row:last-of-type { border-bottom: none; }
.pw-metric-left { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.pw-metric-icon {
    width: 32px; height: 32px; background: #F3F4F6; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #374151;
}
.pw-metric-title { font-size: 13.5px; font-weight: 600; color: #111827; margin-bottom: 3px; }
.pw-metric-sub { font-size: 12px; color: #6B7280; line-height: 1.4; }
.pw-metric-right { text-align: right; flex-shrink: 0; }
.pw-metric-val { font-size: 17px; font-weight: 700; color: #0D1B4B; line-height: 1.1; }
.pw-metric-trend { font-size: 12px; font-weight: 500; margin-top: 2px; }
.pw-trend-up   { color: #16A34A; }
.pw-trend-down { color: #DC2626; }

/* CTA buttons */
.pw-cp-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.pw-cp-view-btn, .pw-cp-shortlist-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8px 14px; border-radius: 9999px; font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: 'Figtree', sans-serif; white-space: nowrap;
    text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.pw-cp-view-btn {
    background: #0D1B4B; color: #fff; border: 1.5px solid #0D1B4B;
}
.pw-cp-view-btn:hover { background: #162460; border-color: #162460; color: #fff; }
.pw-cp-shortlist-btn {
    background: transparent; color: #0D1B4B; border: 1.5px solid #D1D5DB;
}
.pw-cp-shortlist-btn:hover { border-color: #0D1B4B; background: #F9FAFB; }
.pw-cp-shortlist-btn.shortlisted {
    background: #EEF2FF; border-color: #6366F1; color: #4338CA;
}
.pw-cp-no-industry {
    margin-top: 16px; padding: 16px; background: #F9FAFB;
    border-radius: 10px; font-size: 13.5px; color: #6B7280; text-align: center;
}

/* ── Hover card ──────────────────────────────────────────────────────────── */
.pw-hover-card {
    position: fixed; z-index: 300; background: #fff; border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.16); width: 300px; overflow: hidden; pointer-events: none;
}
.pw-hc-top { padding: 16px 16px 0; display: flex; align-items: center; gap: 10px; }
.pw-hc-flag { width: 52px; height: 36px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.pw-hc-name { font-size: 17px; font-weight: 700; color: #0D1B4B; padding: 8px 16px 4px; }
.pw-hc-rows { padding: 4px 16px 12px; }
.pw-hc-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; padding: 4px 0; }
.pw-hc-row span { color: #6B7280; }
.pw-hc-row b { color: #111827; font-weight: 600; }
.pw-hc-sep { border-top: 1px dashed #E5E7EB; margin-top: 4px; padding-top: 8px !important; }
.pw-hc-footer { border-top: 1px solid #F3F4F6; padding: 10px 16px; }
.pw-hc-link {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 600; color: #0D1B4B; text-decoration: none;
}

/* ── City marker labels ──────────────────────────────────────────────────── */
.city-label {
    background: transparent !important; border: none !important; box-shadow: none !important;
    font-family: 'Figtree', sans-serif; font-size: 11px; font-weight: 600;
    color: #fff; white-space: nowrap; padding: 0 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* ── Compare modal ───────────────────────────────────────────────────────── */
.pw-compare-overlay {
    position: fixed; inset: 0; z-index: 400;
    background: rgba(0,0,0,.4);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 100px;
}
.pw-compare-modal {
    background: #fff; border-radius: 20px; width: 520px; max-height: 70vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.2); overflow: hidden;
}
.pw-compare-title { font-size: 16px; font-weight: 600; color: #111827; padding: 20px 24px 12px; }
.pw-compare-search-wrap {
    display: flex; align-items: center; gap: 10px;
    margin: 0 16px 8px; padding: 10px 14px;
    background: #F9FAFB; border-radius: 12px; border: 1px solid #E5E7EB;
}
.pw-compare-search-wrap input {
    border: none; outline: none; background: transparent;
    font-family: 'Figtree', sans-serif; font-size: 14px; color: #111827; flex: 1;
}
.pw-compare-search-wrap input::placeholder { color: #9CA3AF; }
#compareCountryList { list-style: none; overflow-y: auto; flex: 1; padding: 4px 0 16px; }
#compareCountryList li {
    display: flex; align-items: center; gap: 12px; padding: 12px 24px;
    cursor: pointer; font-size: 14px; color: #111827;
    border-bottom: 1px solid #F9FAFB; transition: background .12s;
}
#compareCountryList li:last-child { border-bottom: none; }
#compareCountryList li:hover { background: #F3F4F6; }
#compareCountryList li img { width: 24px; height: 17px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }

/* ── Country profile panel ─────────────────────────────────────────────── */
.cp-title-row {
    display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.cp-flag { width: 36px; height: 24px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.cp-name { font-size: 22px; font-weight: 700; color: #0D1B4B; margin: 0; flex: 1; min-width: 0; }
.cp-iso-badge {
    display: inline-block; font-size: 11px; font-weight: 600; color: #9CA3AF;
    background: #F3F4F6; border: 1px solid #E5E7EB; border-radius: 6px;
    padding: 1px 7px; letter-spacing: 0.06em; margin-top: 3px;
}
.cp-desc { font-size: 13px; color: #6B7280; line-height: 1.6; margin-bottom: 16px; }
.cp-city-list { display: flex; flex-direction: column; }
.cp-city-row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 2px; border-bottom: 1px solid #F3F4F6;
    transition: background .12s;
}
.cp-city-row:last-child { border-bottom: none; }
.cp-city-row:hover { background: #FAFAFA; border-radius: 6px; }
.cp-city-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #E5E7EB; flex-shrink: 0;
}
.cp-city-row[data-lat] .cp-city-dot { background: #0D1B4B; }
.cp-city-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cp-city-top { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.cp-city-name { font-size: 13px; font-weight: 600; color: #111827; }
.cp-city-tag {
    font-size: 10px; font-weight: 500; color: #6B7280;
    background: #F3F4F6; border-radius: 9999px;
    padding: 1px 7px; white-space: nowrap;
}
.cp-city-pop { font-size: 11px; color: #9CA3AF; }
.cp-city-zoom {
    width: 28px; height: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid #E5E7EB; border-radius: 6px;
    color: #9CA3AF; cursor: pointer;
    transition: border-color .12s, color .12s, background .12s;
}
.cp-city-zoom:hover { border-color: #0D1B4B; color: #0D1B4B; background: #F0F4FF; }

/* Section blocks */
.cp-section {
    background: #FAFAFA; border: 1px solid #F0F0F0; border-radius: 12px;
    padding: 14px 16px; margin-bottom: 10px;
}
.cp-section-title {
    font-size: 11px; font-weight: 700; color: #374151;
    text-transform: uppercase; letter-spacing: 0.07em;
    margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.cp-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; border-bottom: 1px solid #F3F4F6;
}
.cp-row:last-child { border-bottom: none; }
.cp-row-label { font-size: 12.5px; color: #6B7280; font-weight: 500; }
.cp-row-val {
    font-size: 13px; font-weight: 700; color: #0D1B4B;
    text-align: right; display: flex; align-items: center; gap: 5px;
}
.cp-badge-up {
    font-size: 10.5px; font-weight: 600; color: #15803D;
    background: #F0FDF4; border-radius: 9999px; padding: 1px 6px;
}
.cp-badge-down {
    font-size: 10.5px; font-weight: 600; color: #DC2626;
    background: #FEF2F2; border-radius: 9999px; padding: 1px 6px;
}
.cp-badge-neutral {
    font-size: 10.5px; font-weight: 600; color: #6B7280;
    background: #F3F4F6; border-radius: 9999px; padding: 1px 6px;
}

.cp-view-btn {
    display: block; margin-top: 12px; background: #0D1B4B; color: #fff;
    text-align: center; padding: 12px; border-radius: 9999px;
    text-decoration: none; font-size: 13.5px; font-weight: 600;
    font-family: 'Figtree', sans-serif; transition: background .15s;
}
.cp-view-btn:hover { background: #1e3a8a; color: #fff; }

/* ── Country profile: explore-by-industry sector picker ─────────────────── */
.cp-sector-picker { margin-top: 4px; }
.cp-sector-search-wrap {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: #fff;
    border: 1px solid #E5E7EB; border-radius: 8px; margin-bottom: 8px;
}
.cp-sector-search-wrap input {
    border: none; outline: none; background: transparent;
    font-family: 'Figtree', sans-serif; font-size: 14px; color: #111827; flex: 1;
}
.cp-sector-search-wrap input::placeholder { color: #9CA3AF; }
.cp-sector-list {
    list-style: none; padding: 0; margin: 0; max-height: 220px; overflow-y: auto;
}
.cp-sector-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 6px; font-size: 13.5px; color: #374151;
    border-bottom: 1px solid #F3F4F6; cursor: pointer;
    border-radius: 6px; transition: background .12s, color .12s;
}
.cp-sector-item:last-child { border-bottom: none; }
.cp-sector-item:hover { background: #EFF6FF; color: #0D1B4B; }
.cp-sector-no-results {
    padding: 16px 6px; font-size: 13px; color: #9CA3AF; text-align: center; list-style: none;
}

/* ── Tablet (≤ 768px) ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Narrow pill sections to prevent overflow at ~728px usable width */
    .pw-country-wrap { min-width: 140px; }
    .pw-sector-wrap  { min-width: 140px; }

    /* Waitlist button overflows navbar at tablet width — hidden here */
    .pw-waitlist-nav-btn { display: none; }

    /* Wider split panel so panel content isn't cramped at 35% of 768px */
    .pw-split-panel { width: 50%; }
    .pw-map-wrapper.split-open { right: 50%; }
}

/* ── Mobile (≤640px) ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* Top navbar: clean white bar */
    .pw-navbar {
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: #fff;
        border-bottom: 1px solid #E5E7EB;
        padding: 0 16px;
        align-items: center;
    }

    /* Show mobile logo */
    .pw-mobile-logo {
        display: flex;
        align-items: center;
        flex: 1;
    }
    .pw-mobile-logo img { height: 24px; width: auto; }

    .pw-waitlist-nav-btn { padding: 7px 14px; font-size: 12px; }

    /* ── Move main pill to fixed bottom search bar ── */
    .pw-main-pill {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: #fff;
        border-radius: 0;
        border-top: 1px solid #E5E7EB;
        box-shadow: 0 -2px 12px rgba(0,0,0,.08);
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 8px));
        gap: 8px;
    }

    /* Hide logo & separators from bottom bar */
    .pw-main-pill .pw-logo-wrap { display: none; }
    .pw-main-pill .pw-pill-sep { display: none; }

    /* Hide B2B/B2C toggle and AI button */
    .pw-toggle-pill { display: none; }
    .pw-ai-btn { display: none; }

    /* Country search: pill-shaped (default — shown alongside sector) */
    .pw-country-wrap {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 12px;
        height: 40px;
        background: #F9FAFB;
        border: 1px solid #E5E7EB;
        border-radius: 9999px;
    }

    /* Mobile: trigger fills the pill, inline input hidden */
    .pw-country-trigger { cursor: pointer; user-select: none; }
    #countrySearch { display: none !important; }
    #countrySearchIcon { flex-shrink: 0; }

    /* Mobile placeholder label */
    .pw-country-trigger-label {
        display: block;
        font-size: 13px; color: #9CA3AF;
        flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .pw-country-wrap.chip-active .pw-country-trigger-label { display: none; }

    /* Mobile chevron */
    .pw-country-chevron { display: flex !important; flex-shrink: 0; }

    /* Mobile search wrap inside dropdown */
    .pw-country-mob-search {
        display: flex; align-items: center; gap: 8px;
        padding: 12px 16px; border-bottom: 1px solid #E5E7EB;
    }
    .pw-country-mob-search input {
        border: none; outline: none; flex: 1;
        font-family: 'Figtree', sans-serif; font-size: 16px;
        color: #111827; background: transparent;
    }
    .pw-country-mob-search input::placeholder { color: #9CA3AF; }

    /* Sector: equal width with country by default */
    .pw-sector-wrap {
        flex: 1 1 0;
        min-width: 0;
    }
    .pw-sector-trigger {
        height: 40px;
        padding: 0 12px;
        background: #F9FAFB;
        border: 1px solid #E5E7EB;
        border-radius: 9999px;
        width: 100%;
    }

    /* ── Country profile open: show sector only ── */
    .pw-main-pill.country-view-active .pw-country-wrap { display: none; }
    .pw-main-pill.country-view-active .pw-sector-wrap { flex: 1; }

    /* ── Split panel open: hide entire bottom bar ── */
    .pw-main-pill.split-view-active { display: none; }
    .pw-sector-placeholder { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pw-sector-chip { font-size: 13px; min-width: 0; flex: 1; }
    .pw-sector-search-wrap input { font-size: 16px; }

    /* ── Bottom sheet: country dropdown ── */
    .pw-country-dropdown {
        position: fixed;
        top: auto;
        bottom: 72px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0,0,0,.16);
        animation: pw-sheet-up 0.22s ease;
    }
    .pw-country-dropdown ul { max-height: 48vh; }

    /* ── Bottom sheet: sector dropdown ── */
    .pw-sector-dropdown {
        position: fixed;
        top: auto;
        bottom: 72px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0,0,0,.16);
        animation: pw-sheet-up 0.22s ease;
    }
    #sectorList { max-height: 44vh; }

    /* ── Bottom sheet: shortlist panel ── */
    .pw-shortlist-panel {
        position: fixed;
        top: auto;
        bottom: 72px;
        left: 12px;
        right: 12px;
        width: auto;
        border-radius: 20px;
        max-height: 70vh;
        overflow: hidden;
        animation: pw-sheet-up 0.24s ease;
    }
    .pw-sl-body { max-height: 50vh; }

    /* Zoom controls: hidden on mobile (pinch-zoom available) */
    .pw-zoom-controls { display: none; }

    /* Hide bottom bar when any side panel is open (page-like experience) */
    .pw-main-pill.panel-view-active { display: none; }

    /* Side panel: full-page view below navbar */
    .pw-panel {
        top: 56px;
        right: -100vw;
        left: auto;
        width: 100vw;
        max-height: calc(100vh - 56px);
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    .pw-panel.open { right: 0; }

    /* Sticky top-10 panel header */
    .pw-panel-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #fff;
        padding: 14px 16px 12px;
        border-bottom: 1px solid #E5E7EB;
    }
    .pw-panel-title { font-size: 18px; }
    .pw-matrix { padding: 16px 16px 32px; }
    .pw-tr-td-rank { padding-left: 16px !important; }
    .pw-tr-td-risk { padding-right: 16px !important; }

    /* Sticky country profile title row */
    #cpContent { padding: 0 0 48px; }
    .cp-title-row {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #fff;
        padding: 14px 16px;
        border-bottom: 1px solid #E5E7EB;
        margin-bottom: 0;
    }
    .cp-name { font-size: 18px; }
    .cp-desc { padding: 12px 16px 0; margin: 0; }
    .cp-section {
        padding: 12px 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin: 0 0 4px;
    }
    .pw-cp-actions { padding: 0 16px 16px; }

    /* Split panel: full width on mobile */
    .pw-split-panel {
        width: 100%;
        top: 56px;
    }
    .pw-map-wrapper.split-open { right: 0; }

    /* Split panel header compact */
    .mp-header { padding: 12px 16px 10px; }
    .mp-header-row2 { gap: 6px; }
    .mp-action-btn { font-size: 12px; padding: 7px 10px; gap: 5px; }
    .mp-action-btn svg { width: 12px; height: 12px; }
    .mp-body { padding: 0; }
    .mp-section { padding: 14px 16px; border-radius: 0; border-left: none; border-right: none; margin-bottom: 6px; }
    .mp-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .mp-card { padding: 12px 13px; border-radius: 10px; }
    .mp-val { font-size: 18px; }

    /* ── Bottom sheet: compare modal ── */
    .pw-compare-overlay {
        align-items: flex-end;
        padding-top: 0;
    }
    .pw-compare-modal {
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
        animation: pw-sheet-up 0.28s ease;
    }

    /* ── Hover card: disabled on mobile ── */
    #hoverCard { display: none !important; }
}

@keyframes pw-sheet-up {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
