@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600&display=swap');
        
        :root {
            --bg: #0a0a0a;
            --card: #111111;
            --text: #f0f0f0;
            --muted: #888;
            --border: #222;
            --accent-left: #00d4ff;
            --accent-right: #ff2e63;
            --panel: #1a1a1a;
        }
        
        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            background: var(--bg);
            color: var(--text);
            font-family: 'Inter', system-ui, sans-serif;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        /* ── Header ── */
        header {
            text-align: center;
            padding: 32px 20px 16px;
            border-bottom: 1px solid var(--border);
        }
        
        header .wordmark,
        header .wordmark:visited {
            display: inline-block;
            text-decoration: none;
            font-family: 'Space Grotesk', sans-serif;
            font-size: clamp(2.8rem, 8vw, 4.8rem);
            font-weight: 500;
            letter-spacing: -0.04em;
            line-height: 1.1;
            background: linear-gradient(90deg, #00d4ff, #ff2e63);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .site-intro {
            max-width: 640px;
            margin: 14px auto 0;
            color: #888;
            font-size: 0.9rem;
            line-height: 1.55;
        }

        .site-intro strong { color: #bbb; }
        
        .subtitle {
            font-size: 0.95rem;
            color: var(--muted);
            margin-top: 6px;
            letter-spacing: 0.15em;
            text-transform: uppercase;
        }

        .tagline {
            font-size: 0.85rem;
            color: #666;
            margin-top: 8px;
        }
        
        /* ── Country nav ── */
        .country-nav-wrap {
            border-bottom: 1px solid #2a2a2a;
            background: linear-gradient(180deg, #141414 0%, #0e0e0e 100%);
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
        }

        .country-nav-inner {
            max-width: 1280px;
            margin: 0 auto;
            padding: 14px 16px 10px;
        }

        .country-nav-heading {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
            padding: 0 4px;
        }

        .country-nav-heading .nav-title {
            font-size: 0.78rem;
            font-weight: 600;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: #bbb;
        }

        .country-nav-heading .nav-hint {
            font-size: 0.75rem;
            color: #666;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }

        .country-nav {
            display: flex;
            align-items: center;
            gap: 12px;
            overflow-x: auto;
            padding: 6px 4px 14px;
            scrollbar-width: auto;
            scrollbar-color: auto;

            /* scrollbar-color: #555 #1a1a1a; */
            /* Scroll affordance: edge fades */
            mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
            -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
        }

        .country-nav::-webkit-scrollbar { height: 15px; }
        .country-nav::-webkit-scrollbar-track {
            background: #1a1a1a;
            border-radius: 9999px;
        }
        .country-nav::-webkit-scrollbar-thumb {
            background: linear-gradient(90deg, #00d4ff55, #ff2e6355);
            border-radius: 9999px;
            border: 2px solid #1a1a1a;
        }
        .country-nav::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(90deg, #00d4ff99, #ff2e6399);
        }

        .nav-label {
            font-size: 0.68rem;
            font-weight: 600;
            color: #888;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            white-space: nowrap;
            flex-shrink: 0;
            margin-right: 2px;
            padding: 0 4px;
        }

        .country-chip {
            display: inline-flex;
            align-items: center;
            text-decoration: none;
            gap: 8px;
            padding: 10px 14px;
            border-radius: 9999px;
            border: 2px solid #3a3a3a;
            background: #1a1a1a;
            color: #e8e8e8;
            font-size: 0.84rem;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.15s ease;
            flex-shrink: 0;
            font-family: inherit;
            min-height: 38px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
        }

        .country-chip:hover {
            border-color: #666;
            background: #242424;
            color: #fff;
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
        }

        .country-chip.active {
            border-color: var(--accent-left);
            background: rgba(0, 212, 255, 0.14);
            color: #fff;
            box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.35), 0 0 22px -4px rgba(0, 212, 255, 0.55);
        }

        .country-chip .flag { font-size: 1.16rem; line-height: 1; }
        .country-chip .chip-name { letter-spacing: 0.02em; }

        .world-chip {
            border-color: #4a4a4a;
            background: linear-gradient(135deg, rgba(0,212,255,0.14), rgba(255,46,99,0.14));
            font-size: 0.86rem;
            padding: 10px 18px;
        }

        .world-chip:hover {
            border-color: #777;
            background: linear-gradient(135deg, rgba(0,212,255,0.22), rgba(255,46,99,0.22));
        }

        .world-chip.active {
            border-color: #ccc;
            background: linear-gradient(135deg, rgba(0,212,255,0.28), rgba(255,46,99,0.28));
            box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 0 22px -4px rgba(255,255,255,0.25);
        }

        @media (max-width: 640px) {
            .country-chip {
                padding: 8px 11px;
                font-size: 0.76rem;
                min-height: 35px;
                gap: 6px;
            }
            .country-chip .flag { font-size: 1rem; }
            .country-nav-heading .nav-hint { display: none; }
        }

        /* ── Main ── */
        main {
            flex: 1;
            max-width: 1280px;
            margin: 0 auto;
            padding: 32px 20px 40px;
            width: 100%;
        }

        .view { display: none; }
        .view.active { display: block; }
        
        /* ── Scorecard ── */
        .scorecard {
            background: var(--card);
            border-radius: 24px;
            padding: 36px 48px;
            box-shadow: 0 0 60px -10px rgba(0, 212, 255, 0.2), 0 25px 50px -12px rgb(0 0 0 / 0.4);
            border: 1px solid var(--border);
            margin-bottom: 40px;
            position: relative;
        }
        
        .scorecard::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--accent-left), var(--accent-right));
            border-radius: 24px 24px 0 0;
        }
        
        .current-header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }

        .country-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 1.15rem;
            font-weight: 600;
            color: #ddd;
            margin-bottom: 16px;
            justify-content: center;
            width: 100%;
        }

        .country-badge .flag-lg { font-size: 1.6rem; }

        .power-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-left: 10px;
            padding: 4px 12px;
            border-radius: 9999px;
            font-size: 0.72rem;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            border: 1px solid #333;
            vertical-align: middle;
        }

        .power-pill.power-left {
            color: var(--accent-left);
            border-color: rgba(0, 212, 255, 0.45);
            background: rgba(0, 212, 255, 0.1);
        }

        .power-pill.power-right {
            color: var(--accent-right);
            border-color: rgba(255, 46, 99, 0.45);
            background: rgba(255, 46, 99, 0.1);
        }

        .power-pill .power-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: currentColor;
            box-shadow: 0 0 8px currentColor;
        }

        .score-panel .in-power-tag {
            display: none;
            margin-top: 10px;
            font-size: 0.7rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            font-weight: 600;
            opacity: 0.95;
        }

        .score-panel.is-in-power .in-power-tag {
            display: block;
        }

        .score-panel.is-in-power h3::after {
            content: ' · IN POWER';
            font-size: 0.65em;
            letter-spacing: 0.08em;
            opacity: 0.85;
        }

        .card-power {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.65rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 9999px;
            border: 1px solid #333;
            white-space: nowrap;
        }

        .card-power.power-left {
            color: var(--accent-left);
            border-color: rgba(0, 212, 255, 0.4);
            background: rgba(0, 212, 255, 0.08);
        }

        .card-power.power-right {
            color: var(--accent-right);
            border-color: rgba(255, 46, 99, 0.4);
            background: rgba(255, 46, 99, 0.08);
        }

        .live-dot {
            width: 12px; height: 12px;
            background: #00ff9d;
            border-radius: 50%;
            box-shadow: 0 0 12px #00ff9d;
            animation: pulse 2s infinite;
            flex-shrink: 0;
        }

        .current-header h2 {
            font-size: 1.15rem;
            font-weight: 500;
            color: #ccc;
        }
        
        .scores-container {
            display: flex;
            justify-content: center;
            gap: 80px;
            align-items: center;
            flex-wrap: wrap;
        }

        .scores-explainer {
            display: flex;
            justify-content: center;
            margin-top: 20px;
            color: var(--muted);
            font-size: 0.9rem;
        }

        .faction-note {
            text-align: center;
            margin-top: 14px;
            font-size: 0.8rem;
            color: #666;
        }

        .faction-note span { color: #999; }
        
        .score-panel { text-align: center; min-width: 220px; position: relative; }
        .score-panel h3 {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 10px;
            letter-spacing: 0.1em;
        }
        
        .big-score {
            font-family: 'Space Grotesk', sans-serif;
            font-size: clamp(5rem, 12vw, 8.5rem);
            font-weight: 500;
            line-height: 1;
            letter-spacing: -0.08em;
            margin-bottom: 8px;
            text-shadow: 0 0 40px currentColor, 0 10px 20px rgba(0,0,0,0.6);
        }
        
        .left-label { color: var(--accent-left); }
        .right-label { color: var(--accent-right); }

        .data-info {
            font-size: 0.85rem;
            color: #777;
        }
        
        /* ── Chart ── */
        .chart-container {
            background: var(--card);
            border-radius: 24px;
            padding: 28px;
            box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.4);
            border: 1px solid var(--border);
        }
        
        .chart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            padding: 0 8px;
            flex-wrap: wrap;
            gap: 12px;
        }

        .chart-header h2 {
            font-size: 1.1rem;
            font-weight: 600;
            letter-spacing: 0.04em;
        }

        .chart-header-title {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .chart-container.is-capturing .chart-copy-actions {
            display: none !important;
        }

        .chart-capture-head {
            display: none;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin: -4px 0 18px;
            padding: 4px 8px 14px;
            border-bottom: 1px solid #222;
        }

        .chart-capture-place {
            flex: 1;
            margin: 0;
            text-align: left;
            font-size: 1.05rem;
            font-weight: 600;
            color: #f0f0f0;
            min-width: 0;
        }

        .chart-capture-title {
            flex-shrink: 0;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.25rem;
            font-weight: 500;
            letter-spacing: -0.04em;
            line-height: 1.1;
        }

        .chart-capture-title .vio { color: #00d4ff; }
        .chart-capture-title .meter { color: #ff2e63; }

        .chart-capture-territory {
            flex: 1;
            margin: 0;
            text-align: right;
            font-size: 0.85rem;
            font-weight: 600;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #888;
        }
        
        #main-chart { width: 100%; height: 540px; }
        #world-chart { width: 100%; height: 420px; }
        #power-chart { width: 100%; height: 420px; }

        .compass {
            margin: 28px auto 0;
            max-width: 420px;
        }

        .compass-caption {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 12px;
            font-size: 0.72rem;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #777;
            margin-bottom: 10px;
        }

        .compass-caption-sub {
            color: #555;
            letter-spacing: 0.04em;
            text-transform: none;
            font-size: 0.7rem;
        }

        .compass-plot {
            position: relative;
            padding: 22px 40px;
        }

        .compass-grid {
            position: relative;
            width: 100%;
            aspect-ratio: 1 / 1;
            border: 1px solid #333;
            border-radius: 8px;
            background:
                linear-gradient(180deg, rgba(232, 176, 64, 0.10) 0%, transparent 50%, rgba(110, 231, 183, 0.08) 100%),
                linear-gradient(90deg, rgba(0, 212, 255, 0.10) 0%, transparent 50%, rgba(255, 46, 99, 0.10) 100%),
                #141414;
            overflow: visible;
        }

        .compass-cross-h,
        .compass-cross-v {
            position: absolute;
            background: rgba(255, 255, 255, 0.18);
            pointer-events: none;
        }

        .compass-cross-h {
            left: 0;
            right: 0;
            top: 50%;
            height: 1px;
        }

        .compass-cross-v {
            top: 0;
            bottom: 0;
            left: 50%;
            width: 1px;
        }

        .compass-axis-label {
            position: absolute;
            font-size: 0.64rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #777;
            pointer-events: none;
            z-index: 1;
        }

        .compass-axis-label.top {
            top: 4px;
            left: 50%;
            transform: translateX(-50%);
            color: #e8b040;
        }

        .compass-axis-label.bottom {
            bottom: 4px;
            left: 50%;
            transform: translateX(-50%);
            color: #6ee7b7;
        }

        .compass-axis-label.left {
            left: 2px;
            top: 50%;
            transform: translateY(-50%);
            color: #00d4ff;
        }

        .compass-axis-label.right {
            right: 2px;
            top: 50%;
            transform: translateY(-50%);
            color: #ff2e63;
        }

        .compass-axis-label.mod {
            font-size: 0.52rem;
            letter-spacing: 0.05em;
            line-height: 1.15;
            text-align: center;
            max-width: 76px;
        }

        .compass-axis-label.mod-left {
            left: 37.5%;
            top: calc(50% + 5px);
            transform: translateX(-50%);
            color: #00d4ff;
        }

        .compass-axis-label.mod-right {
            left: 62.5%;
            top: calc(50% + 5px);
            transform: translateX(-50%);
            color: #ff2e63;
        }

        .compass-axis-label.mod-top {
            top: 37.5%;
            left: calc(50% + 7px);
            transform: translateY(-50%);
            text-align: left;
            color: #e8b040;
        }

        .compass-axis-label.mod-bottom {
            top: 62.5%;
            left: calc(50% + 7px);
            transform: translateY(-50%);
            text-align: left;
            color: #6ee7b7;
        }

        .compass-link {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
            overflow: visible;
        }

        .compass-link line {
            stroke: #e8b040;
            stroke-width: 0.875;
            stroke-dasharray: 5 4;
            stroke-linecap: round;
            opacity: 0.9;
        }

        .compass-link.collapsed {
            opacity: 0;
        }

        .compass-dot {
            position: absolute;
            transform: translate(-50%, -50%);
            border: 2px solid #fff;
            box-shadow: 0 0 12px rgba(0, 0, 0, 0.55);
            transition: left 0.25s ease, top 0.25s ease, background 0.25s ease;
            z-index: 2;
        }

        .compass-dot.public {
            width: 15px;
            height: 15px;
            border-radius: 2px;
            background: #888;
        }

        .compass-dot.power {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #1a1a1a;
            border-color: #e8b040;
            box-shadow: 0 0 0 1px rgba(232, 176, 64, 0.55), 0 0 12px rgba(0, 0, 0, 0.5);
            z-index: 3;
        }

        .compass-legend {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            margin-top: 10px;
            font-size: 0.72rem;
            color: #aaa;
            flex-wrap: wrap;
        }

        .compass-key {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .compass-key i {
            display: inline-block;
            width: 10px;
            height: 10px;
            border: 1.5px solid #fff;
            flex-shrink: 0;
        }

        .compass-key.public i {
            border-radius: 2px;
            background: #00d4ff;
        }

        .compass-key.power i {
            border-radius: 50%;
            background: #1a1a1a;
            border-color: #e8b040;
        }

        .compass-key-value {
            color: #ddd;
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 600;
        }

        #compass-chart { width: 100%; max-width: 840px; height: 480px; }

        .spectrum-axis-legend {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.72rem;
            color: #666;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            padding: 2px 55px 0 55px;
            margin-top: 2px;
        }

        .world-chart-wrap {
            margin-bottom: 36px;
        }

        .world-chart-note {
            text-align: center;
            font-size: 0.8rem;
            color: #666;
            margin-top: 8px;
        }

        .agg-toggle {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 6px;
            margin: 0 0 12px;
            font-size: 0.92rem;
            letter-spacing: 0.04em;
        }

        .agg-toggle a {
            color: #777;
            text-decoration: none;
            border-bottom: 1px solid transparent;
            padding: 1px 2px;
            transition: color 0.15s ease, border-color 0.15s ease;
            text-transform: lowercase;
            font-weight: 500;
        }

        .agg-toggle a:hover {
            color: #ddd;
            border-bottom-color: #555;
        }

        .agg-toggle a.active {
            color: #fff;
            border-bottom-color: #00d4ff;
        }

        .agg-toggle .agg-sep {
            color: #444;
            user-select: none;
        }
        
        .events-list {
            margin-top: 22px;
            padding: 16px 22px;
            background: var(--panel);
            border-radius: 12px;
            font-size: 0.92rem;
            border: 1px solid #333;
        }
        
        .event-item {
            display: flex;
            gap: 14px;
            padding: 8px 0;
            border-bottom: 1px solid var(--border);
        }
        .event-item:last-child { border-bottom: none; }
        .event-date { color: #aaa; min-width: 140px; font-weight: 500; flex-shrink: 0; }
        .event-dot { color: #444; }
        
        /* ── World overview ── */
        .world-intro {
            text-align: center;
            margin-bottom: 28px;
        }

        .world-intro h2 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.8rem;
            font-weight: 500;
            margin-bottom: 8px;
        }

        .world-intro p {
            color: var(--muted);
            font-size: 0.95rem;
            max-width: 640px;
            margin: 0 auto;
            line-height: 1.5;
        }

        .region-section {
            margin-bottom: 40px;
        }

        .region-title {
            font-size: 0.8rem;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: #888;
            margin-bottom: 14px;
            padding-left: 4px;
            font-weight: 600;
        }

        .region-power-columns {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            align-items: start;
        }

        .power-column {
            background: #0d0d0d;
            border: 1px solid #222;
            border-radius: 16px;
            padding: 14px;
            min-height: 80px;
        }

        .power-column.col-left {
            border-color: rgba(0, 212, 255, 0.22);
            box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.06);
        }

        .power-column.col-right {
            border-color: rgba(255, 46, 99, 0.22);
            box-shadow: inset 0 0 0 1px rgba(255, 46, 99, 0.06);
        }

        .power-column-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 12px;
            padding: 0 4px 10px;
            border-bottom: 1px solid #222;
            font-size: 0.72rem;
            font-weight: 600;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }

        .power-column.col-left .power-column-header { color: var(--accent-left); }
        .power-column.col-right .power-column-header { color: var(--accent-right); }

        .power-column-count {
            font-size: 0.7rem;
            letter-spacing: 0.04em;
            color: #666;
            font-weight: 500;
            text-transform: none;
        }

        .power-column-cards {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .power-column-empty {
            color: #555;
            font-size: 0.85rem;
            padding: 16px 8px;
            text-align: center;
            font-style: italic;
        }

        .card-capture-brand {
            display: none;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.72rem;
            font-weight: 600;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: #00d4ff;
            margin: -2px 0 12px;
            padding-bottom: 10px;
            border-bottom: 1px solid #222;
        }

        a.country-card {
            display: block;
            text-decoration: none;
        }

        .country-card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 16px 18px;
            cursor: pointer;
            transition: all 0.15s ease;
            text-align: left;
            font-family: inherit;
            color: inherit;
            width: 100%;
        }

        .country-card:hover {
            border-color: #444;
            transform: translateY(-2px);
            box-shadow: 0 8px 24px -8px rgba(0,0,0,0.5);
        }

        @media (max-width: 800px) {
            .region-power-columns {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 420px) {
            .card-top { flex-wrap: wrap; }
            .card-aside { margin-left: auto; }
        }

        .card-top {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 14px;
        }

        .card-flag { font-size: 1.5rem; line-height: 1.2; }
        .card-identity {
            flex: 1;
            min-width: 0;
        }
        .card-name-row {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .card-name {
            font-weight: 600;
            font-size: 1.05rem;
            min-width: 0;
        }

        .card-actions {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            flex-shrink: 0;
        }

        .card-icon-btn {
            width: 26px;
            height: 26px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 7px;
            border: 1px solid #333;
            background: #1a1a1a;
            color: #9a9a9a;
            cursor: pointer;
            font-family: inherit;
            line-height: 0;
            transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
        }

        .card-icon-btn:hover,
        .card-icon-btn:focus-visible {
            border-color: #777;
            color: #fff;
            background: #242424;
            outline: none;
        }

        .card-icon-btn.is-copied {
            color: #00ff9d;
            border-color: rgba(0, 255, 157, 0.45);
        }

        .card-icon-btn svg {
            width: 13px;
            height: 13px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .card-month {
            font-size: 0.75rem;
            color: #666;
            margin-top: 4px;
        }

        .card-event {
            margin: 0 0 6px;
            font-size: 0.72rem;
            line-height: 1.35;
            color: #ffd900;
            text-align: left;
        }

        .share-popover {
            position: fixed;
            z-index: 400;
            min-width: 220px;
            padding: 8px;
            background: #161616;
            border: 1px solid #333;
            border-radius: 12px;
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
        }

        .share-popover[hidden] { display: none; }

        .share-popover-title {
            font-size: 0.68rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #777;
            padding: 6px 10px 8px;
        }

        .share-popover button {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 8px 10px;
            border: 0;
            border-radius: 8px;
            background: transparent;
            color: #e8e8e8;
            font-family: inherit;
            font-size: 0.86rem;
            text-align: left;
            cursor: pointer;
        }

        .share-popover button[hidden] { display: none !important; }

        .share-popover button:hover,
        .share-popover button:focus-visible {
            background: #242424;
            outline: none;
        }

        .share-popover .share-ico {
            width: 22px;
            height: 22px;
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.78rem;
            font-weight: 700;
            color: #ddd;
        }

        .share-popover-sep {
            height: 1px;
            background: #2a2a2a;
            margin: 6px 4px;
        }

        .app-toast {
            position: fixed;
            left: 50%;
            bottom: 24px;
            transform: translateX(-50%) translateY(12px);
            z-index: 500;
            padding: 10px 16px;
            border-radius: 9999px;
            background: #1a1a1a;
            border: 1px solid #333;
            color: #eee;
            font-size: 0.85rem;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.18s ease, transform 0.18s ease;
        }

        .app-toast.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .card-aside {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 8px;
            flex-shrink: 0;
        }

        .card-scores {
            display: flex;
            gap: 14px;
            justify-content: flex-end;
        }

        .card-score-col { text-align: right; min-width: 3.2em; }

        .card-score-label {
            font-size: 0.65rem;
            letter-spacing: 0.08em;
            margin-bottom: 2px;
        }

        .card-score-value {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.55rem;
            font-weight: 500;
            line-height: 1.1;
        }

        .card-factions {
            margin-top: 12px;
            font-size: 0.72rem;
            color: #555;
            line-height: 1.4;
        }

        .card-polity {
            display: inline-block;
            margin-right: 8px;
            padding: 1px 7px;
            border-radius: 9999px;
            border: 1px solid #333;
            font-size: 0.62rem;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #bbb;
        }

        .card-spectrum {
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid #222;
        }

        .card-spectrum-label {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            font-size: 0.68rem;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #666;
            margin-bottom: 6px;
        }

        .card-spectrum-value {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 6px;
            text-transform: none;
        }

        .mood-chip {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.82rem;
            font-weight: 600;
            letter-spacing: 0.02em;
            padding: 2px 8px;
            border-radius: 9999px;
            border: 1px solid currentColor;
            background: rgba(255, 255, 255, 0.03);
            white-space: nowrap;
        }

        .card-spectrum-track {
            position: relative;
            height: 6px;
            border-radius: 9999px;
            background: linear-gradient(90deg, #00d4ff 0%, #555 50%, #ff2e63 100%);
            box-shadow: inset 0 0 0 1px #222;
        }

        .card-spectrum-axis {
            display: flex;
            justify-content: space-between;
            margin-top: 5px;
            font-size: 0.58rem;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #666;
        }

        .card-spectrum-center {
            position: absolute;
            left: 50%;
            top: -2px;
            bottom: -2px;
            width: 1px;
            background: rgba(255,255,255,0.3);
            transform: translateX(-50%);
        }

        .card-spectrum-thumb {
            position: absolute;
            top: 50%;
            width: 11px;
            height: 11px;
            border-radius: 50%;
            border: 1.5px solid #fff;
            transform: translate(-50%, -50%);
            box-shadow: 0 0 6px rgba(0,0,0,0.45);
        }

        #spectrum-sum-chart,
        #country-spectrum-chart { width: 100%; height: 248px; }

        .spectrum-powerbar-wrap { margin-top: 8px; }

        .country-spectrum-wrap { margin-top: 28px; }

        /* ── Methodology blurb ── */
        .methodology {
            margin-top: 40px;
            padding: 24px 28px;
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            font-size: 0.88rem;
            color: #888;
            line-height: 1.6;
        }

        .methodology h2 {
            color: #bbb;
            font-size: 0.9rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin-bottom: 10px;
        }

        .methodology strong { color: #aaa; }
        .methodology a { color: #00d4ff; text-decoration: none; }
        .methodology a:hover { text-decoration: underline; }

        .page-h1 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.8rem;
            font-weight: 500;
            margin-bottom: 8px;
        }

        h1.country-badge {
            font-size: 1.15rem;
            font-weight: 600;
            color: #ddd;
            background: none;
            -webkit-text-fill-color: unset;
        }

        .method-page h1 { font-size: 1.8rem; margin-bottom: 12px; }
        .method-page h2 { color: #ccc; font-size: 1.05rem; margin: 22px 0 8px; letter-spacing: 0.04em; }
        .method-page p, .method-page li { color: #999; }
        .method-page ul { margin: 0 0 12px 1.2rem; }
        .method-page .legal-updated { color: #666; font-size: 0.85rem; margin-bottom: 16px; }

        footer {
            text-align: center;
            padding: 28px 20px;
            color: #555;
            font-size: 0.85rem;
            border-top: 1px solid var(--border);
        }

        .footer-index {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 14px;
            justify-content: center;
            max-width: 960px;
            margin: 0 auto 18px;
            font-size: 0.8rem;
        }

        .footer-index a {
            color: #777;
            text-decoration: none;
        }

        .footer-index a:hover { color: #ddd; }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }

        @media (max-width: 640px) {
            .scorecard { padding: 28px 20px; }
            .scores-container { gap: 40px; }
            .chart-header { flex-direction: column; align-items: flex-start; }
            #main-chart { height: 360px; }
            .event-date { min-width: 110px; }
            .chart-host.history { height: 360px; }
        }

html { min-height: 100%; }
a { color: inherit; }
.chart-host { width: 100%; }
.chart-host.history { height: 540px; }
.chart-host.mid { height: 420px; }
.chart-host.spectrum { height: 248px; }
.chart-host.compass { height: 480px; }
.chart-copy-actions { margin-left: 8px; }
