/* =========================================================
   The Right Pulse — Plugin Styles
   Inherits: --primary, --accent, --bg, --text from child theme
   ========================================================= */

/* ── Breadcrumbs ─────────────────────────────────────────── */
.trp-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.78rem;
    margin-bottom: 18px;
    color: #aaa;
}
.trp-bc-link {
    color: var(--primary, #082545);
    text-decoration: none;
    font-weight: 500;
    opacity: .65;
    transition: opacity .2s;
}
.trp-bc-link:hover { opacity: 1; text-decoration: underline; }
.trp-bc-sep { color: #ccc; font-size: 0.9rem; }
.trp-bc-current { color: #aaa; font-weight: 600; }

/* ── Shared ─────────────────────────────────────────────── */
.trp-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 3px;
    color: #fff;
    white-space: nowrap;
}
.trp-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line-gray, #f2f2f2);
}

/* ── Party Page ─────────────────────────────────────────── */
.trp-party {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 48px;
}

/* Header */
.trp-party-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 0 24px;
    border-bottom: 2px solid var(--line-gray, #f2f2f2);
    margin-bottom: 28px;
}
.trp-party-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid var(--line-gray, #f2f2f2);
    background: #f9f9f9;
    padding: 6px;
}
.trp-party-logo-placeholder {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -.02em;
}
.trp-party-meta {
    flex: 1;
}
.trp-party-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--primary, #082545);
    line-height: 1.15;
}
.trp-party-name-en {
    font-size: 0.9rem;
    color: #777;
    margin: 0 0 10px;
    font-style: italic;
}
.trp-party-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.trp-party-country {
    font-size: 1.1rem;
    line-height: 1;
}

/* Stats bar */
.trp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.trp-stat {
    background: var(--line-gray, #f2f2f2);
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
}
.trp-stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary, #082545);
    line-height: 1;
    margin-bottom: 4px;
}
.trp-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #888;
}

/* Poll section */
.trp-poll {
    background: var(--primary, #082545);
    color: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.trp-poll-pct {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    min-width: 90px;
}
.trp-poll-detail {
    flex: 1;
}
.trp-poll-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .6;
    margin-bottom: 8px;
}
.trp-poll-bar-wrap {
    background: rgba(255,255,255,.15);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}
.trp-poll-bar {
    height: 100%;
    border-radius: 4px;
    transition: width .6s ease;
}
.trp-poll-source {
    font-size: 0.75rem;
    opacity: .55;
}
.trp-poll-none {
    font-size: 0.85rem;
    opacity: .7;
    font-style: italic;
}

/* Leaders */
.trp-leaders {
    margin-bottom: 28px;
}
.trp-leader-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-gray, #f2f2f2);
}
.trp-leader-row:last-child { border-bottom: none; }
.trp-leader-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary, #082545);
}
.trp-leader-role {
    font-size: 0.8rem;
    color: #777;
    margin-left: auto;
}

/* Elections */
.trp-elections {
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.trp-election {
    border: 1px solid var(--line-gray, #f2f2f2);
    border-radius: 8px;
    padding: 14px 16px;
}
.trp-election-type {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 6px;
}
.trp-election-date {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary, #082545);
}
.trp-election-note {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 2px;
}

/* ── News Grid (shared: party + country) ────────────────── */
.trp-news {
    margin-top: 36px;
}
.trp-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.trp-news-card {
    display: block;
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line-gray, #f2f2f2);
    transition: box-shadow .2s, transform .2s;
    background: #fff;
}
.trp-news-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.trp-news-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: var(--line-gray, #f2f2f2);
}
.trp-news-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--line-gray, #f2f2f2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1.5rem;
}
.trp-news-body {
    padding: 12px 14px 14px;
}
.trp-news-date {
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 5px;
}
.trp-news-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary, #082545);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Country Page ───────────────────────────────────────── */
.trp-country {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 0 48px;
}
.trp-country-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 0 22px;
    border-bottom: 2px solid var(--line-gray, #f2f2f2);
    margin-bottom: 28px;
}
.trp-country-flag {
    font-size: 3rem;
    line-height: 1;
}
.trp-country-name {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary, #082545);
    margin: 0;
}
.trp-country-subtitle {
    font-size: 0.82rem;
    color: #888;
    margin: 2px 0 0;
}

/* Party cards on country page */
.trp-country-parties {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}
.trp-cparty-card {
    border: 1px solid var(--line-gray, #f2f2f2);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s;
    background: #fff;
    border-left: 4px solid var(--party-color, #082545);
}
.trp-cparty-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.trp-cparty-info { flex: 1; }
.trp-cparty-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary, #082545);
    margin: 0 0 4px;
}
.trp-cparty-name-en {
    font-size: 0.78rem;
    color: #999;
    margin-bottom: 8px;
    font-style: italic;
}
.trp-cparty-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.trp-cparty-poll {
    margin-left: auto;
    text-align: right;
    flex-shrink: 0;
}
.trp-cparty-poll-pct {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary, #082545);
    line-height: 1;
}
.trp-cparty-poll-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #bbb;
    margin-top: 2px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .trp-stats { grid-template-columns: repeat(2, 1fr); }
    .trp-elections { grid-template-columns: 1fr; }
    .trp-news-grid { grid-template-columns: repeat(2, 1fr); }
    .trp-poll { flex-direction: column; gap: 12px; }
    .trp-poll-pct { font-size: 2.2rem; }
    .trp-country-parties { grid-template-columns: 1fr; }
    .trp-party-header { flex-direction: column; gap: 16px; }
}
@media (max-width: 480px) {
    .trp-news-grid { grid-template-columns: 1fr; }
    .trp-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Group Page ─────────────────────────────────────────── */
.trp-group {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 0 48px;
}
.trp-group-header {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 28px 0 24px;
    border-bottom: 2px solid var(--line-gray, #f2f2f2);
    margin-bottom: 28px;
}
.trp-group-abbr-badge {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -.02em;
}
.trp-group-logo-wrap {
    flex-shrink: 0;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trp-group-logo {
    max-height: 72px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.trp-group-meta {
    flex: 1;
}
.trp-group-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--primary, #082545);
    line-height: 1.15;
}
.trp-group-stats {
    font-size: 0.83rem;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.trp-group-stats strong {
    color: var(--primary, #082545);
    font-weight: 700;
}
.trp-group-stats-sep {
    color: #ccc;
}
.trp-group-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.65;
    margin: 0 0 28px;
    padding: 16px 20px;
    background: var(--line-gray, #f9f9f9);
    border-radius: 8px;
    border-left: 3px solid var(--line-gray, #ddd);
}

@media (max-width: 600px) {
    .trp-group-header { flex-direction: column; gap: 14px; }
    .trp-group-name { font-size: 1.35rem; }
}

/* ─────────────────────────────────────────────────────────
   v1.0.3 additions
   ───────────────────────────────────────────────────────── */

/* ── Italic reset (theme archive-description may inherit italic) */
.trp-country, .trp-party, .trp-group { font-style: normal; }

/* ── Party card v2: logo + leader row ─────────────────────
   Override the v1 flex layout with a 3-col grid.
   Columns: logo | info | poll
   ──────────────────────────────────────────────────────── */
.trp-cparty-card {
    display: grid !important;
    grid-template-columns: 52px 1fr auto;
    gap: 0 14px;
    align-items: start;
}

/* Logo column */
.trp-cparty-logo-wrap {
    flex-shrink: 0;
}
.trp-cparty-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 7px;
    border: 1px solid var(--line-gray, #ebebeb);
    background: #fafafa;
    padding: 5px;
    display: block;
}
.trp-cparty-logo-placeholder-sm {
    width: 52px;
    height: 52px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -.02em;
}

/* Info column */
.trp-cparty-body {
    min-width: 0;       /* allow text truncation */
}
.trp-cparty-seats {
    font-size: .74rem;
    color: #aaa;
}
.trp-cparty-flag {
    font-size: .9rem;
    line-height: 1;
}

/* Leader row */
.trp-cparty-leader {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line-gray, #f2f2f2);
}
.trp-cparty-leader-photo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    flex-shrink: 0;
    border: 1.5px solid var(--line-gray, #e0e0e0);
    background: #eee;
}
.trp-cparty-leader-initials {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.trp-cparty-leader-name {
    font-size: .78rem;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── News list (country pages — no competing archive grid) ─ */
.trp-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.trp-news-list-item {
    border-bottom: 1px solid var(--line-gray, #f2f2f2);
}
.trp-news-list-item:last-child { border-bottom: none; }
.trp-news-list-link {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 9px 4px;
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
    transition: background .15s;
}
.trp-news-list-link:hover { background: #fafafa; }
.trp-news-list-link:hover .trp-news-list-title {
    color: var(--accent, #8B1E1E);
}
.trp-news-list-date {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #c0c0c0;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 74px;
}
.trp-news-list-title {
    font-family: 'Playfair Display', serif;
    font-size: .88rem;
    font-weight: 600;
    color: var(--primary, #082545);
    line-height: 1.35;
    transition: color .15s;
}

/* ── Mobile: card grid ─────────────────────────────────── */
@media (max-width: 600px) {
    .trp-cparty-card {
        grid-template-columns: 42px 1fr auto;
        gap: 0 10px;
        padding: 14px 14px;
    }
    .trp-cparty-logo,
    .trp-cparty-logo-placeholder-sm {
        width: 42px;
        height: 42px;
        font-size: .85rem;
    }
    .trp-cparty-poll-pct { font-size: 1.3rem; }
    .trp-cparty-leader-name { font-size: .72rem; }
    .trp-news-list-date { min-width: 60px; font-size: .6rem; }
    .trp-news-list-title { font-size: .82rem; }
}

/* ── v1.0.4: larger photos, inherit site font sizes ─────── */

/* Logo: 52 → 64px */
.trp-cparty-card {
    grid-template-columns: 64px 1fr auto;
}
.trp-cparty-logo,
.trp-cparty-logo-placeholder-sm {
    width: 64px;
    height: 64px;
}
.trp-cparty-logo-placeholder-sm { font-size: 1.2rem; }

/* Leader photo: 30 → 44px */
.trp-cparty-leader-photo,
.trp-cparty-leader-initials {
    width: 44px;
    height: 44px;
}
.trp-cparty-leader-initials { font-size: .9rem; }
.trp-cparty-leader-name {
    font-size: .88rem;   /* slightly larger, still compact */
    color: #444;
}

/* News list: remove micro sizes, inherit from site */
.trp-news-list-date {
    font-size: .75rem;
    min-width: 80px;
    color: #aaa;
}
.trp-news-list-title {
    font-size: 1rem;      /* let site base font scale this */
    font-family: inherit; /* inherit theme font instead of forcing Playfair */
    font-weight: 600;
}
.trp-news-list-link {
    gap: 14px;
    padding: 11px 4px;
}

/* Mobile */
@media (max-width: 600px) {
    .trp-cparty-card { grid-template-columns: 52px 1fr auto; }
    .trp-cparty-logo,
    .trp-cparty-logo-placeholder-sm { width: 52px; height: 52px; }
    .trp-cparty-leader-photo,
    .trp-cparty-leader-initials { width: 36px; height: 36px; }
    .trp-news-list-title { font-size: .95rem; }
    .trp-news-list-date { min-width: 68px; }
}

/* ═══════════════════════════════════════════════════════════
   v1.0.5 — Width / font-inheritance / image clarity
   ═══════════════════════════════════════════════════════════ */

/* ── 1. Match surrounding content width exactly ─────────── */
.trp-country, .trp-party, .trp-group {
    max-width: 100% !important;
    margin-left: 0  !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}
.trp-country-parties,
.trp-stats,
.trp-elections {
    width: 100%;
}

/* ── 2. Font sizes inherit from site ────────────────────── */
/* Remove all hardcoded font-size from body text;
   only keep intentional sizing on micro-labels and stat numbers */
.trp-cparty-name      { font-size: inherit; font-weight: 700; }
.trp-cparty-name-en   { font-size: .9em; }        /* relative to parent */
.trp-cparty-leader-name { font-size: inherit; }
.trp-cparty-seats     { font-size: .85em; color: #888; }
.trp-cparty-meta      { font-size: inherit; }
.trp-news-list-title  { font-size: inherit; font-family: inherit; font-weight: 600; line-height: 1.4; }
.trp-news-list-date   { font-size: .82em; color: #aaa; white-space: nowrap; }
.trp-news-list-link   { gap: 14px; padding: 10px 4px; align-items: baseline; }

/* ── 3. Logo container: horizontal-friendly rectangle ───── */
/* All party logos are wide (aspect 2:1–3:1), not square.
   Container: 88px wide × 54px tall → logo fills width naturally */
.trp-cparty-card {
    grid-template-columns: 88px 1fr auto !important;
    gap: 0 16px;
    align-items: center;
}
.trp-cparty-logo-wrap {
    width: 88px;
    height: 54px;
    border-radius: 7px;
    background: #fff;
    border: 1px solid var(--line-gray, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-sizing: border-box;
    flex-shrink: 0;
}
/* Natural size within container — no forced square */
.trp-cparty-logo {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 44px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    object-fit: contain;
    display: block;
}
/* Placeholder (no logo): keep square with initial */
.trp-cparty-logo-placeholder-sm {
    width: 78px;
    height: 44px;
    border-radius: 5px;
    font-size: 1.1rem;
}

/* ── 4. Leader photos: larger circle, sharper crop ────────── */
.trp-cparty-leader-photo,
.trp-cparty-leader-initials {
    width: 52px !important;
    height: 52px !important;
    flex-shrink: 0;
}
.trp-cparty-leader-photo {
    object-position: center 10%; /* favour top of frame (face) */
}
.trp-cparty-leader-initials { font-size: .95rem; }
.trp-cparty-leader {
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
}

/* ── 5. Mobile adjustments ───────────────────────────────── */
@media (max-width: 600px) {
    .trp-cparty-card {
        grid-template-columns: 72px 1fr auto !important;
        gap: 0 12px;
        padding: 14px 12px;
    }
    .trp-cparty-logo-wrap { width: 72px; height: 44px; }
    .trp-cparty-logo { max-height: 36px !important; }
    .trp-cparty-leader-photo,
    .trp-cparty-leader-initials { width: 40px !important; height: 40px !important; }
    .trp-country-parties { grid-template-columns: 1fr; }
}

/* ── v1.0.6: party bio + leader profile ─────────────────── */

/* Party bio */
.trp-bio {
    margin-bottom: 28px;
}
.trp-bio-text {
    margin: 0 0 10px;
    line-height: 1.7;
    color: #444;
}
.trp-bio-wiki {
    font-size: .78rem;
    color: #aaa;
    text-decoration: none;
    border-bottom: 1px dotted #ccc;
    transition: color .15s;
}
.trp-bio-wiki:hover { color: var(--primary, #082545); border-color: currentColor; }

/* Leader profile block (primary leader on party page) */
.trp-leader-profile {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 20px 0 20px;
    border-bottom: 1px solid var(--line-gray, #f2f2f2);
    margin-bottom: 6px;
}
.trp-leader-profile-photo {
    width: 110px;
    height: 140px;
    object-fit: cover;
    object-position: center 10%;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--line-gray, #eee);
    background: #f5f5f5;
}
.trp-leader-profile-body {
    flex: 1;
    min-width: 0;
}
.trp-leader-profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary, #082545);
    margin-bottom: 4px;
}
.trp-leader-profile-role {
    font-size: .82rem;
    color: #888;
    margin-bottom: 12px;
}
.trp-leader-since {
    color: #bbb;
    margin-left: 4px;
}
.trp-leader-profile-bio {
    margin: 0 0 10px;
    line-height: 1.7;
    color: #444;
}

/* Mobile */
@media (max-width: 600px) {
    .trp-leader-profile {
        flex-direction: column;
        gap: 16px;
    }
    .trp-leader-profile-photo {
        width: 90px;
        height: 115px;
    }
}

/* ══════════════════════════════════════════════════════════
   v1.0.7 — Width fix · Navigation footer · Badge links
   ══════════════════════════════════════════════════════════ */

/* ── 1. Guaranteed full-width fill for all TRP containers ─ */
.trp-country,
.trp-party,
.trp-group {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ── 2. Navigation footer pill links ──────────────────────── */
.trp-nav-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px 0 0;
    border-top: 2px solid var(--line-gray, #f0f0f0);
}
.trp-nav-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #bbb;
    flex-shrink: 0;
    margin-right: 4px;
}
.trp-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--line-gray, #e0e0e0);
    font-size: .82rem;
    font-weight: 600;
    color: var(--primary, #082545);
    text-decoration: none;
    background: #fff;
    transition: border-color .2s, background .2s, color .2s;
    white-space: nowrap;
}
.trp-nav-link:hover {
    border-color: var(--primary, #082545);
    background: var(--primary, #082545);
    color: #fff;
}
.trp-nav-link-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: .8;
}

/* ── 3. Clickable EP-group badges in party header ──────────── */
.trp-badge-link {
    text-decoration: none;
    cursor: pointer;
    transition: opacity .2s, filter .2s;
}
.trp-badge-link:hover {
    opacity: .85;
    filter: brightness(1.15);
}

/* ── 4. EP-group stat cell with link ───────────────────────── */
.trp-stat-group {
    font-size: .9rem;
    padding-top: 4px;
}
.trp-stat-group-link {
    text-decoration: none;
    font-weight: 700;
    transition: opacity .2s;
}
.trp-stat-group-link:hover { opacity: .75; text-decoration: underline; }

/* ── 5. N/A poll indicator ─────────────────────────────────── */
.trp-cparty-poll-na {
    font-size: .85rem !important;
    color: #ccc;
    letter-spacing: .04em;
}

/* ── 6. Mobile ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .trp-nav-footer { gap: 8px; }
    .trp-nav-label  { font-size: .62rem; }
    .trp-nav-link   { font-size: .76rem; padding: 5px 12px; }
}

/* ════════════════════════════════════════════════════════════
   v1.0.8 — Card links: party name, EP badge, country flag, poll
   ════════════════════════════════════════════════════════════ */

/* Card is now a <div> — keep the same visual + hover via :has() */
.trp-cparty-card {
    cursor: default;
    text-decoration: none;
    color: inherit;
}
/* Lift the whole card when any link inside is hovered */
.trp-cparty-card:has(a:hover) {
    box-shadow: 0 6px 20px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
/* Fallback for browsers without :has() support (Firefox < 121) */
@supports not selector(:has(a)) {
    .trp-cparty-card:hover {
        box-shadow: 0 6px 20px rgba(0,0,0,.10);
        transform: translateY(-2px);
    }
}

/* Party name link */
.trp-cparty-name-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 6px;
}
.trp-cparty-name-link:hover .trp-cparty-name {
    color: var(--party-color, var(--primary, #082545));
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Country flag link */
.trp-cparty-flag-link {
    text-decoration: none;
    font-size: 1.1em;
    border-radius: 4px;
    transition: transform .15s, box-shadow .15s;
    display: inline-block;
}
.trp-cparty-flag-link:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* Poll column is now an <a> */
.trp-cparty-poll {
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    padding: 6px 10px;
    transition: background .18s;
}
.trp-cparty-poll:hover {
    background: rgba(8,37,69,.05);
}
.trp-cparty-poll:hover .trp-cparty-poll-pct {
    color: var(--party-color, var(--primary, #082545));
}

/* Country subtitle link (country page header) */
.trp-country-subtitle-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}
.trp-country-subtitle-link:hover {
    border-bottom-style: solid;
}

/* Party country flag link (party page header) */
.trp-party-country-link {
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    transition: transform .15s;
}
.trp-party-country-link:hover {
    transform: scale(1.15);
}

/* ════════════════════════════════════════════════════════════
   v1.0.9 — Directory shortcode styles
   ════════════════════════════════════════════════════════════ */

.trp-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 16px 0 24px;
}

.trp-directory-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}

.trp-directory-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.trp-directory-list li {
    margin-bottom: 6px;
}

.trp-directory-link {
    font-size: 13px;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.5;
    display: block;
    padding: 3px 0;
    border-bottom: 1px solid transparent;
    transition: color .15s, border-color .15s;
}

.trp-directory-link:hover {
    color: var(--primary, #082545);
    border-bottom-color: currentColor;
}

/* ════════════════════════════════════════════════════════════
   v1.0.9 patch — country chart wrapper
   ════════════════════════════════════════════════════════════ */
.trp-ctry-chart-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px 14px;
    margin-bottom: 20px;
}

/* ── Election Results ──────────────────────────────────────── */
.trp-election-results {
    margin-bottom: 28px;
}
.trp-results-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.trp-result-item {
    flex: 1;
    min-width: 110px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 14px;
    text-align: center;
}
.trp-result-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 4px;
}
.trp-result-pct {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2px;
}
.trp-result-seats {
    font-size: 0.78rem;
    color: #666;
    font-weight: 600;
}
