/* Country Detail Panel - shared across risk-map and customer dashboards */

.cp-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cp-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.cp-panel {
    position: fixed;
    top: 68px;
    right: 0;
    bottom: 0;
    width: 340px;
    z-index: 10001;
    background: rgba(13, 17, 23, 0.95);
    border-left: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    padding: 24px 30px 30px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    font-family: 'Outfit', sans-serif;
    color: #e8e6e0;
}
.cp-panel.open { transform: translateX(0); }

.cp-close {
    position: sticky;
    top: 0;
    float: right;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-close:hover { background: rgba(255,255,255,0.2); }

/* Country name + flag */
.cp-country { font-size: 24px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.cp-country img { width: 36px; height: auto; border-radius: 4px; border: 1px solid rgba(255,255,255,0.15); flex-shrink: 0; }
.cp-region { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 8px; }

/* Override badge */
.cp-override-badge {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 4px 10px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.cp-override-badge:hover { opacity: 0.8; }
.cp-override--war {
    color: #fca5a5;
    border: 1px solid rgba(153,27,27,0.6);
    background: rgba(153,27,27,0.35);
}
.cp-override--conflict {
    color: #A83530;
    border: 1px solid rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.12);
}
.cp-override--spillover {
    color: #C45A00;
    border: 1px solid rgba(249,115,22,0.4);
    background: rgba(249,115,22,0.12);
}
.cp-override--geopolitical {
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.4);
    background: rgba(251,191,36,0.12);
}

/* Hoffmann tag */
.cp-hoffmann-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #6B8EAD;
    background: rgba(107,142,173,0.1);
    border: 1px solid rgba(107,142,173,0.25);
    border-radius: 4px;
    padding: 4px 10px;
    margin-bottom: 12px;
}

/* Score */
.cp-score-value { font-size: 48px; font-weight: 700; margin-bottom: 8px; color: #fff; }
.cp-score-bar-wrap { margin-bottom: 12px; }
.cp-score-labels { display: flex; justify-content: space-between; font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 4px; }

/* Gradient bar */
.cp-gradient-bar {
    position: relative;
    border-radius: 6px;
    background: linear-gradient(90deg, #4D7C5A, #6B9E6E, #8B9A46, #A3A853, #B8960A, #CA8A04, #C45A00, #BB4D00, #A83530, #9B2226);
}
.cp-gradient-bar--lg { width: 100%; height: 10px; }
.cp-gradient-bar--sm { width: 100%; height: 6px; border-radius: 3px; }
.cp-gradient-bar__marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}
.cp-gradient-bar--lg .cp-gradient-bar__marker { width: 14px; height: 14px; }
.cp-gradient-bar--sm .cp-gradient-bar__marker { width: 10px; height: 10px; }

/* Trend teaser */
.cp-trend-teaser {
    position: relative;
    margin-bottom: 16px;
    border-radius: 6px;
    overflow: hidden;
}
.cp-trend-teaser-blur {
    filter: blur(4px);
    opacity: 0.5;
    pointer-events: none;
}
.cp-trend-teaser-blur svg { display: block; width: 100%; height: 44px; }
.cp-trend-teaser-labels {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.cp-trend-teaser-labels span {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 10px;
    padding: 2px 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    color: rgba(255,255,255,0.25);
}
.cp-trend-teaser-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(13,17,23,0.4);
}
.cp-trend-teaser-lock { color: rgba(255,255,255,0.4); }
.cp-trend-teaser-text {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
}
.cp-trend-teaser-cta {
    font-family: 'Outfit', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6B8EAD;
    text-decoration: none;
    border: 1px solid rgba(107,142,173,0.3);
    padding: 3px 10px;
    border-radius: 3px;
    transition: all 0.15s ease;
}
.cp-trend-teaser-cta:hover {
    background: rgba(107,142,173,0.1);
    border-color: rgba(107,142,173,0.5);
}

/* Radar */
.cp-panel canvas { display: block; margin: 0 auto 16px; max-width: 100%; }

/* Dimension rows */
.cp-dim-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cp-dim-name { font-size: 13px; color: rgba(255,255,255,0.7); flex: 0 0 auto; width: 130px; }
.cp-dim-bar-wrap { flex: 1; min-width: 0; }
.cp-dim-bar-labels { display: flex; justify-content: space-between; font-size: 8px; color: rgba(255,255,255,0.3); margin-top: 2px; }
.cp-dim-score { font-size: 13px; font-weight: 600; width: 30px; text-align: right; color: rgba(255,255,255,0.7); flex: 0 0 auto; }
.cp-coverage-note { font-size: 11px; color: rgba(255,255,255,0.35); text-align: center; padding: 10px 0 4px; font-style: italic; }

/* Macro facts */
.cp-macro-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    margin-top: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cp-macro-year {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
.cp-macro-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cp-macro-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}
.cp-macro-value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-align: right;
}
.cp-macro-trend {
    font-size: 11px;
    font-weight: 500;
    margin-left: 4px;
}
.cp-macro-trend.positive { color: #4D7C5A; }
.cp-macro-trend.negative { color: #A83530; }
.cp-macro-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    font-weight: 400;
    margin-left: 6px;
}

/* Footer */
.cp-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.cp-footer-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.cp-footer-meta a {
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    font-size: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: color 0.15s;
}
.cp-footer-meta a:hover { color: rgba(255,255,255,0.6); }
.cp-footer-sep { color: rgba(255,255,255,0.15); font-size: 10px; }
.cp-footer-copy {
    color: rgba(255,255,255,0.2);
    font-size: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Mobile */
@media (max-width: 768px) {
    .cp-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 85vh;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.1);
        border-radius: 16px 16px 0 0;
        padding: 16px 20px 28px;
        padding-bottom: calc(28px + env(safe-area-inset-bottom));
        transform: translateY(100%);
    }
    .cp-panel.open { transform: translateY(0); }
    .cp-panel::before {
        content: '';
        display: block;
        width: 32px;
        height: 4px;
        background: rgba(255,255,255,0.3);
        border-radius: 2px;
        margin: 0 auto 12px;
    }
    .cp-close {
        position: absolute;
        top: 12px;
        right: 16px;
    }
    .cp-country { font-size: 20px; padding-right: 44px; }
    .cp-score-value { font-size: 36px; }
    .cp-dim-row { gap: 8px; padding: 8px 0; }
    .cp-dim-name { width: 100px; font-size: 11px; }
    .cp-dim-score { font-size: 12px; }
}

@media (max-width: 480px) {
    .cp-panel { padding: 10px 16px 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
    .cp-dim-name { width: 80px; font-size: 10px; }
}

/* ========================================================================
   LIGHT THEME — editorial style matching customer dashboards
   ======================================================================== */
.cp-backdrop--light { background: rgba(13, 17, 23, 0.35); }

.cp-panel--light {
    background: #FFFFFF;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: none;
    color: #0B0F14;
    box-shadow: -24px 0 48px -12px rgba(13, 17, 23, 0.12), -1px 0 0 rgba(0,0,0,0.04);
    padding: 28px 32px 32px;
    width: 380px;
    font-feature-settings: "ss01", "cv11";
}
.cp-panel--light * { font-variant-numeric: tabular-nums; }

.cp-panel--light .cp-close {
    background: #F4F5F4;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #555;
    width: 34px;
    height: 34px;
}
.cp-panel--light .cp-close:hover {
    background: #E0E7EE;
    color: #253749;
}

.cp-panel--light .cp-country {
    color: #0B0F14;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    align-items: center;
    gap: 12px;
}
.cp-panel--light .cp-country img {
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 32px;
}
.cp-panel--light .cp-region {
    color: #888;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

/* Hoffmann tag */
.cp-panel--light .cp-hoffmann-tag {
    color: #0F6F4E;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.22);
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    padding: 3px 9px 3px 7px;
    border-radius: 999px;
    gap: 4px;
}
.cp-panel--light .cp-hoffmann-tag svg { width: 10px; height: 10px; }

/* Score hero block */
.cp-panel--light .cp-score-value {
    color: #0B0F14;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1;
    margin-top: 4px;
    margin-bottom: 14px;
}
.cp-panel--light .cp-gradient-bar--lg { height: 6px; border-radius: 999px; }
.cp-panel--light .cp-gradient-bar--lg .cp-gradient-bar__marker { width: 12px; height: 12px; box-shadow: 0 0 0 3px #FFFFFF, 0 1px 3px rgba(0,0,0,0.25), 0 0 0 4px rgba(11,15,20,0.08); background: #0B0F14; }
.cp-panel--light .cp-score-bar-wrap {
    margin-bottom: 20px;
    padding: 4px 0 0;
    background: transparent;
    border: none;
}
.cp-panel--light .cp-score-labels {
    color: #888;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 8px;
}
.cp-panel--light .cp-gradient-bar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.cp-panel--light .cp-gradient-bar__marker {
    box-shadow: 0 0 0 2px #FFFFFF, 0 2px 6px rgba(0, 0, 0, 0.25);
    background: #1A1A1A;
}

/* Trend teaser */
.cp-panel--light .cp-trend-teaser {
    background: #F4F5F4;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    margin-bottom: 20px;
}
.cp-panel--light .cp-trend-teaser-blur { opacity: 0.35; }
.cp-panel--light .cp-trend-teaser-labels span {
    color: #888;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #FFFFFF;
}
.cp-panel--light .cp-trend-teaser-overlay {
    background: rgba(244, 245, 244, 0.7);
    backdrop-filter: blur(2px);
}
.cp-panel--light .cp-trend-teaser-lock { color: #888; }
.cp-panel--light .cp-trend-teaser-text {
    color: #555;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
}
.cp-panel--light .cp-trend-teaser-cta {
    color: #253749;
    border-color: rgba(107, 142, 173, 0.4);
    background: #FFFFFF;
}
.cp-panel--light .cp-trend-teaser-cta:hover {
    background: #E0E7EE;
    border-color: #6B8EAD;
}

/* Radar chart container - minimal, no card chrome */
.cp-panel--light canvas {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px;
    box-sizing: border-box;
    margin: 0 auto 16px;
}

/* Dimension rows as stacked cards (clean layout) */
.cp-panel--light [id$="-dimensions"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.cp-panel--light .cp-dim-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 10px;
    padding: 12px 0 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
}
.cp-panel--light .cp-dim-row:last-child { border-bottom: none; }
.cp-panel--light [id$="-dimensions"] {
    gap: 0;
    margin-top: 4px;
    padding: 0 2px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.cp-panel--light .cp-dim-name {
    color: #1A1A1A;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    width: auto;
    flex: none;
    grid-column: 1;
    grid-row: 1;
}
.cp-panel--light .cp-dim-score {
    color: #1A1A1A;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    width: auto;
    grid-column: 2;
    grid-row: 1;
    text-align: right;
}
.cp-panel--light .cp-dim-bar-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
}
.cp-panel--light .cp-dim-bar-labels {
    color: #aaa;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}
.cp-panel--light .cp-coverage-note {
    color: #888;
    font-size: 10px;
    padding: 12px 0 4px;
    font-style: normal;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
}

/* Macro facts - editorial table style */
.cp-panel--light .cp-macro-header {
    color: #888;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 24px;
    padding-bottom: 10px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
}
.cp-panel--light .cp-macro-year {
    color: #aaa;
    font-family: 'Space Mono', monospace;
}
.cp-panel--light .cp-macro-row {
    padding: 9px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.cp-panel--light .cp-macro-row:last-child { border-bottom: none; }
.cp-panel--light .cp-macro-row:hover { background: rgba(0,0,0,0.015); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 4px; }
.cp-panel--light .cp-macro-label {
    color: #6B7280;
    font-size: 12px;
    font-weight: 500;
}
.cp-panel--light .cp-macro-value {
    color: #0B0F14;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.01em;
}
.cp-panel--light .cp-macro-trend.positive { color: #4D7C5A; }
.cp-panel--light .cp-macro-trend.negative { color: #9B2226; }
.cp-panel--light .cp-macro-sub { color: #aaa; }

/* Footer */
.cp-panel--light .cp-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 28px;
    padding-top: 18px;
}
.cp-panel--light .cp-footer-meta a {
    color: #888;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.cp-panel--light .cp-footer-meta a:hover { color: #253749; }
.cp-panel--light .cp-footer-sep { color: #ccc; }
.cp-panel--light .cp-footer-copy {
    color: #aaa;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.04em;
}

/* Override badges on light theme - editorial pill style */
.cp-panel--light .cp-override-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 999px;
    border-width: 1px;
    border-style: solid;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cp-panel--light .cp-override-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.cp-panel--light .cp-override--war {
    color: #9B2226;
    background: rgba(155, 34, 38, 0.08);
    border-color: rgba(155, 34, 38, 0.25);
}
.cp-panel--light .cp-override--conflict {
    color: #A83530;
    background: rgba(168, 53, 48, 0.08);
    border-color: rgba(168, 53, 48, 0.25);
}
.cp-panel--light .cp-override--spillover {
    color: #BB4D00;
    background: rgba(187, 77, 0, 0.08);
    border-color: rgba(187, 77, 0, 0.25);
}
.cp-panel--light .cp-override--geopolitical {
    color: #B07505;
    background: rgba(176, 117, 5, 0.08);
    border-color: rgba(176, 117, 5, 0.25);
}

/* Default: .cp-hero is a passthrough (no layout change) */
.cp-hero { display: contents; }

/* ========================================================================
   COMPACT VARIANT — hero-row layout (score + radar side-by-side),
   dimension bars hidden (redundant with radar).
   Extends .cp-panel--light.
   ======================================================================== */
.cp-panel--compact {
    width: 420px;
    padding: 24px 28px 28px;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

.cp-panel--compact .cp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    column-gap: 16px;
    align-items: center;
    margin: 4px 0 20px;
    padding: 18px 18px 16px;
    background: linear-gradient(180deg, #FBFBFC 0%, #F6F7F9 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02), inset 0 1px 0 rgba(255,255,255,0.8);
}
.cp-panel--compact .cp-hero-score { min-width: 0; }
.cp-panel--compact .cp-score-value {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1;
    margin: 0 0 12px;
    background: linear-gradient(180deg, #0B0F14 0%, #2A3340 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cp-panel--compact .cp-score-bar-wrap { margin: 0; padding: 0; }
.cp-panel--compact .cp-gradient-bar--lg { height: 6px; border-radius: 999px; }
.cp-panel--compact .cp-gradient-bar--lg .cp-gradient-bar__marker { width: 12px; height: 12px; box-shadow: 0 0 0 3px #FBFBFC, 0 1px 3px rgba(0,0,0,0.3); background: #0B0F14; }
.cp-panel--compact .cp-score-labels { margin-top: 6px; font-size: 8px; }

.cp-panel--compact .cp-hero-radar {
    width: 160px;
    height: 160px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
    justify-self: end;
}

/* Inline trend teaser — single row banner, not a big blurred block */
.cp-panel--compact .cp-trend-teaser {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
    background: #F4F5F4;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
}
.cp-panel--compact .cp-trend-teaser-blur { display: none; }
.cp-panel--compact .cp-trend-teaser-overlay {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    background: transparent;
    padding: 0;
    flex: 1;
    backdrop-filter: none;
}
.cp-panel--compact .cp-trend-teaser-text {
    flex: 1;
    text-align: left;
}
.cp-panel--compact .cp-trend-teaser-cta {
    font-size: 9px;
    padding: 4px 10px;
}

/* Collapsible 6 dimensions (hidden by default, expandable) */
.cp-dim-details { margin-top: 4px; }
.cp-dim-summary {
    list-style: none;
    cursor: pointer;
    display: block;
    padding: 10px 12px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555;
    background: #F9FAFB;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    transition: background 0.15s;
}
.cp-dim-summary::-webkit-details-marker { display: none; -webkit-appearance: none; }
.cp-dim-summary::marker { display: none; content: ""; }
.cp-dim-details > summary { list-style: none; list-style-type: none; }
.cp-dim-summary-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cp-dim-summary:hover { background: #F4F5F4; color: #253749; }
.cp-dim-chevron { transition: transform 0.2s ease; flex-shrink: 0; }
.cp-dim-details[open] .cp-dim-chevron { transform: rotate(180deg); }
.cp-dim-details[open] .cp-dim-summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}
.cp-dim-details[open] [id$="-dimensions"] {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 4px 14px 10px;
}

/* Country header — flag + name + hoffmann tag inline */
.cp-panel--compact .cp-country {
    font-size: 20px;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.cp-panel--compact .cp-country img {
    width: 28px;
    height: 20px;
    border-radius: 2px;
    object-fit: cover;
}
.cp-panel--compact .cp-region {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    color: #888;
}
.cp-panel--compact .cp-hoffmann-tag {
    margin: -8px 0 16px;
    font-size: 9px;
    padding: 3px 8px;
}

/* 8pt rhythm */
.cp-panel--compact .cp-hero {
    margin: 8px 0 24px;
    padding: 16px;
}
.cp-panel--compact .cp-trend-teaser { margin-bottom: 24px; }

/* Macro section header — Stripe-style line extending right */
.cp-panel--compact .cp-macro-header {
    margin-top: 24px;
    padding-bottom: 8px;
    border-bottom: none;
    position: relative;
    gap: 12px;
}
.cp-panel--compact .cp-macro-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    order: 2;
}
.cp-panel--compact .cp-macro-header > span:first-child,
.cp-panel--compact .cp-macro-header {
    display: flex;
    align-items: center;
}
.cp-panel--compact .cp-macro-year { order: 3; flex-shrink: 0; }

/* Footer minimal — only copyright, no links */
.cp-panel--compact .cp-footer {
    margin-top: 32px;
    padding-top: 16px;
}
.cp-panel--compact .cp-footer-meta { display: none; }
.cp-panel--compact .cp-footer-copy {
    font-size: 9px;
    color: #bbb;
    text-align: center;
}

/* Tabular numerals everywhere in compact */
.cp-panel--compact .cp-score-value,
.cp-panel--compact .cp-dim-score,
.cp-panel--compact .cp-macro-value {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .cp-panel--compact {
        width: 100%;
        padding: 16px 20px 24px;
    }
    .cp-panel--compact .cp-hero {
        grid-template-columns: minmax(0, 1fr) 130px;
        column-gap: 12px;
        padding: 14px;
    }
    .cp-panel--compact .cp-hero-radar { width: 130px; height: 130px; }
    .cp-panel--compact .cp-score-value { font-size: 36px; }
}

/* Mobile light theme */
@media (max-width: 768px) {
    .cp-panel--light {
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        border-left: none;
        box-shadow: 0 -8px 32px rgba(13, 17, 23, 0.15);
        padding: 20px 24px 28px;
        padding-bottom: calc(28px + env(safe-area-inset-bottom));
    }
    .cp-panel--light::before { background: rgba(0, 0, 0, 0.2); }
}

/* ========================================================================
   DOCKED VARIANT — panel positioned absolutely inside map container
   (customer dashboards: light + compact themes, moved into #idx-map-body via JS)
   ======================================================================== */
.cp-panel.cp-panel--light,
.cp-panel.cp-panel--compact {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    left: auto !important;
    width: 380px;
    max-width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    border-radius: 3px !important;
    border-left: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 12px 32px -8px rgba(13, 17, 23, 0.18), 0 4px 12px -4px rgba(13, 17, 23, 0.08) !important;
    transform: translateX(8px);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1000;
}
.cp-panel.cp-panel--light.open,
.cp-panel.cp-panel--compact.open {
    transform: translateX(0);
    opacity: 1;
}
.cp-panel--compact .cp-hero,
.cp-panel--compact .cp-trend-teaser,
.cp-panel--compact .cp-dim-summary {
    border-radius: 3px !important;
}

@media (max-width: 768px) {
    .cp-panel.cp-panel--light,
    .cp-panel.cp-panel--compact {
        top: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        left: 8px !important;
        width: auto;
        max-width: none;
    }
    .cp-panel--light::before { display: none !important; }
}
