:root {
    --bg: #0a0a0f;
    --bg2: #12121a;
    --bg3: #1a1a26;
    --border: #2a2a3a;
    --text: #e8e8f0;
    --text-muted: #7070a0;
    --accent: #e8f020;
    --accent2: #20f0a0;
    --danger: #f04060;
    --font-display: 'Syne', sans-serif;
    --font-mono: 'DM Mono', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Header ── */
.site-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-dot {
    color: var(--accent);
}

.site-header nav {
    display: flex;
    gap: 1.5rem;
    margin-right: auto;
}

.site-header nav a,
.lang-switcher a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.15s;
}

.site-header nav a:hover,
.site-header nav a.active,
.lang-switcher a.active {
    color: var(--accent);
}

.lang-switcher {
    display: flex;
    gap: 0.75rem;
}

/* ── Main ── */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ── Hero ── */
.hero {
    margin-bottom: 4rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 480px;
}

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-bottom: 4rem;
}

.stat-card {
    background: var(--bg2);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: background 0.15s;
}

.stat-card:hover {
    background: var(--bg3);
}

.stat-card.accent {
    background: var(--accent);
}

.stat-card.accent .stat-num,
.stat-card.accent .stat-label {
    color: #0a0a0f;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ── Section header ── */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-outline {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    transition: all 0.15s;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Votes list ── */
.votes-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.vote-row {
    display: grid;
    grid-template-columns: 90px 1fr 28px 140px;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: var(--bg2);
    text-decoration: none;
    color: var(--text);
    transition: background 0.1s;
}

.vote-row:hover {
    background: var(--bg3);
}

.vote-date {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}

.vote-title {
    font-size: 0.82rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.vote-result {
    font-size: 0.9rem;
    text-align: center;
    font-weight: 700;
}

.vote-result.adopted {
    color: var(--accent2);
}

.vote-result.rejected {
    color: var(--danger);
}

.vote-result.unknown {
    color: var(--text-muted);
}

.vote-bar {
    height: 4px;
    background: var(--bg3);
    border-radius: 2px;
    display: flex;
    overflow: hidden;
}

.bar-for {
    background: var(--accent2);
    height: 100%;
}

.bar-against {
    background: var(--danger);
    height: 100%;
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.site-footer a {
    color: var(--text-muted);
}

.site-footer a:hover {
    color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .vote-row {
        grid-template-columns: 70px 1fr 24px;
    }

    .vote-bar {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Page header ── */
.page-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.page-count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Layout ── */
.votes-page-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── Filtres ── */
.filters-panel {
    position: sticky;
    top: 72px;
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-group label:first-child {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.filter-group input[type="text"],
.filter-group input[type="date"],
.filter-group select {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    width: 100%;
    outline: none;
    transition: border-color 0.15s;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--accent);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.1s;
}

.radio-label:has(input:checked) {
    color: var(--accent);
}

.radio-label input {
    accent-color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: #0a0a0f;
    border: none;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: opacity 0.15s;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-reset {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-decoration: none;
    margin-top: -0.5rem;
}

.btn-reset:hover {
    color: var(--danger);
}

/* ── Vote rows (version étendue) ── */
.vote-row {
    grid-template-columns: 90px 1fr 100px 90px 120px;
}

.vote-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    overflow: hidden;
}

.vote-ref {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.vote-counts {
    font-size: 0.72rem;
    white-space: nowrap;
    text-align: right;
}

.count-for {
    color: var(--accent2);
}

.count-against {
    color: var(--danger);
}

.count-abs {
    color: var(--text-muted);
}

.count-sep {
    color: var(--border);
    margin: 0 1px;
}

.vote-result {
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.bar-abs {
    background: var(--text-muted);
    height: 100%;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.page-btn {
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    transition: all 0.1s;
}

.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.page-btn.active {
    background: var(--accent);
    color: #0a0a0f;
    border-color: var(--accent);
    font-weight: 700;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 0.2rem;
}

/* ── Empty ── */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--border);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .votes-page-layout {
        grid-template-columns: 1fr;
    }

    .filters-panel {
        position: static;
    }

    .vote-row {
        grid-template-columns: 70px 1fr 80px;
    }

    .vote-counts,
    .vote-bar {
        display: none;
    }
}

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent);
}

/* ── Vote detail header ── */
.vote-detail-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.vote-detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vote-date-large {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.vote-result-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    letter-spacing: 0.05em;
}

.vote-result-badge.adopted {
    background: rgba(32, 240, 160, 0.15);
    color: var(--accent2);
}

.vote-result-badge.rejected {
    background: rgba(240, 64, 96, 0.15);
    color: var(--danger);
}

.vote-result-badge.unknown {
    background: var(--bg3);
    color: var(--text-muted);
}

.vote-detail-title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.vote-detail-ref {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Sections ── */
.vote-section {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* ── Résultat global ── */
.result-overview {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

.result-numbers {
    display: flex;
    gap: 2rem;
}

.result-num {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.result-num .num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.result-num .lbl {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.result-num .pct {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.result-num.for .num {
    color: var(--accent2);
}

.result-num.against .num {
    color: var(--danger);
}

.result-num.abstention .num {
    color: var(--text-muted);
}

.result-bar-large {
    height: 8px;
    background: var(--bg3);
    border-radius: 4px;
    display: flex;
    overflow: hidden;
}

.rbl-for {
    background: var(--accent2);
    height: 100%;
}

.rbl-against {
    background: var(--danger);
    height: 100%;
}

.rbl-abs {
    background: var(--text-muted);
    height: 100%;
    opacity: 0.4;
}

.result-chart-wrap {
    width: 120px;
    height: 120px;
}

/* ── Tableau groupes ── */
.group-table-wrap {
    overflow-x: auto;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.group-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.group-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.group-table tr:hover td {
    background: var(--bg2);
}

.col-for {
    color: var(--accent2);
    text-align: right;
}

.col-against {
    color: var(--danger);
    text-align: right;
}

.col-abs {
    color: var(--text-muted);
    text-align: right;
}

.group-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border: 1px solid;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.mini-bar {
    height: 4px;
    background: var(--bg3);
    border-radius: 2px;
    display: flex;
    overflow: hidden;
    min-width: 80px;
}

.mb-for {
    background: var(--accent2);
    height: 100%;
}

.mb-against {
    background: var(--danger);
    height: 100%;
}

.mb-abs {
    background: var(--text-muted);
    height: 100%;
    opacity: 0.4;
}

/* ── Grille pays ── */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.country-card {
    background: var(--bg2);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-decoration: none;
    transition: background 0.1s;
}

.country-card:hover {
    background: var(--bg3);
}

.cc-code {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.cc-counts {
    font-size: 0.7rem;
}

.cc-for {
    color: var(--accent2);
}

.cc-against {
    color: var(--danger);
}

.cc-abs {
    color: var(--text-muted);
}

.cc-sep {
    color: var(--border);
    margin: 0 1px;
}

/* ── Tabs MEPs ── */
.mep-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.mep-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 1.25rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    cursor: pointer;
    margin-bottom: -1px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mep-tab:hover {
    color: var(--text);
}

.mep-tab.active.tab-for {
    color: var(--accent2);
    border-bottom-color: var(--accent2);
}

.mep-tab.active.tab-against {
    color: var(--danger);
    border-bottom-color: var(--danger);
}

.mep-tab.active.tab-abs {
    color: var(--text-muted);
    border-bottom-color: var(--text-muted);
}

.tab-count {
    background: var(--bg3);
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
    border-radius: 2px;
}

/* ── Grille MEPs ── */
.mep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.mep-chip {
    background: var(--bg2);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.78rem;
    transition: background 0.1s;
}

.mep-chip:hover {
    background: var(--bg3);
}

.mep-group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mep-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mep-cc {
    font-size: 0.68rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .result-overview {
        grid-template-columns: 1fr;
    }

    .result-chart-wrap {
        display: none;
    }

    .result-numbers {
        justify-content: space-around;
    }
}

.group-fullname {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* ── Répartition groupes ── */
.group-distribution {
    display: flex;
    height: 36px;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    overflow: hidden;
    gap: 1px;
    background: var(--border);
}

.gd-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.15s, flex 0.3s;
    position: relative;
}

.gd-segment:hover,
.gd-segment.active {
    opacity: 1;
}

.gd-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.3rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ── Layout ── */
.meps-page-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── Grille MEPs ── */
.meps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.mep-card {
    background: var(--bg2);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: background 0.1s;
    overflow: hidden;
}

.mep-card:hover {
    background: var(--bg3);
}

.mep-card.inactive {
    opacity: 0.5;
}

.mep-card-bar {
    height: 3px;
    width: 100%;
    flex-shrink: 0;
}

.mep-card-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mep-card-name {
    font-size: 0.82rem;
    line-height: 1.3;
}

.mep-card-name strong {
    display: block;
}

.mep-card-country {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.mep-card-group {
    font-size: 0.68rem;
    font-weight: 500;
    margin-top: 0.2rem;
}

.mep-card-inactive {
    font-size: 0.62rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.1rem 0.3rem;
    margin-top: 0.25rem;
    align-self: flex-start;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .meps-page-layout {
        grid-template-columns: 1fr;
    }

    .meps-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* ── MEP detail header ── */
.mep-detail-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.mep-detail-color {
    width: 6px;
    min-height: 80px;
    border-radius: 3px;
    flex-shrink: 0;
}

.mep-detail-name {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.mep-detail-name span {
    font-weight: 800;
    display: block;
}

.mep-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
    align-items: center;
}

.mep-detail-country {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mep-detail-group {
    font-size: 0.8rem;
    font-weight: 500;
}

/* ── MEP stats grid ── */
.mep-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-bottom: 3rem;
}

/* ── Vote breakdown ── */
.mep-vote-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 600px;
}

.mvb-row {
    display: grid;
    grid-template-columns: 80px 1fr 40px 60px;
    align-items: center;
    gap: 0.75rem;
}

.mvb-label {
    font-size: 0.75rem;
    text-align: right;
}

.mvb-label.for {
    color: var(--accent2);
}

.mvb-label.against {
    color: var(--danger);
}

.mvb-label.abs,
.mvb-label.absent {
    color: var(--text-muted);
}

.mvb-bar-wrap {
    background: var(--bg3);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.mvb-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.mvb-pct {
    font-size: 0.75rem;
    text-align: right;
}

.mvb-count {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.mep-vote-chart-wrap {
    width: 120px;
    height: 120px;
    margin-top: 1rem;
}

/* ── Historique groupes ── */
.group-history {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gh-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    font-size: 0.8rem;
}

.gh-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gh-group {
    font-weight: 700;
    min-width: 60px;
}

.gh-name {
    flex: 1;
    color: var(--text-muted);
}

.gh-dates {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Position dans vote-row ── */
.vote-row {
    grid-template-columns: 90px 1fr 100px 90px;
}

.mep-position {
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    text-align: right;
}

.pos-for {
    color: var(--accent2);
}

.pos-against {
    color: var(--danger);
}

.pos-abstention {
    color: var(--text-muted);
}

.pos-did_not_vote {
    color: var(--border);
}

.country-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.country-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.country-code-badge {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.group-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.gl-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
}

.gl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gl-name {
    color: var(--text-muted);
}

.gl-count {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.footer-sep {
    color: var(--border);
    margin: 0 0.25rem;
}

.summary-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.summary-credit {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-style: italic;
}

.summary-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s, transform 0.15s;
}

.summary-more-link:hover {
    opacity: 0.82;
    transform: translateX(2px);
}