/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    background: #1e3a5f;
    border-bottom: 3px solid #152843;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    left: 0;
    right: 0;
    will-change: background;
}

.header-scrolled {
    background: rgba(30, 58, 95, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar {
    padding: 0.75rem 0;
}

.nav-container {
    /* Full-bleed: logo hugs the left edge, support hugs the right, on any viewport */
    max-width: none;
    margin: 0;
    padding: 0.5rem 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    flex-shrink: 0;
}

.nav-logo h1 {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1;
}

.nav-logo i {
    color: #fbbf24;
}

.nav-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: #fbbf24;
    flex-shrink: 0;
}

.nav-logo a {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

        .nav-logo a:hover {
            color: #fbbf24;
        }
        
        /* Hexagon Map Styling */
        .hexagon-map-container {
            text-align: center;
            margin: 20px 0;
        }
        
        .hexagon-map-container img {
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        .map-source {
            text-align: center;
            margin-top: 10px;
            color: #666;
            font-size: 0.9rem;
        }

.nav-menu-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
}

.nav-menu-row-1,
.nav-menu-row-2 {
    display: flex;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fbbf24;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

/* Ensure navigation displays horizontally on desktop */
@media (min-width: 769px) {
    .nav-menu-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: auto !important;
        background: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        text-align: left !important;
        transition: none !important;
        gap: 1rem !important;
        flex-wrap: nowrap !important; /* keep one line on desktop */
    }
    
    .nav-menu-row-1,
    .nav-menu-row-2 {
        display: flex !important;
    }
    
    .nav-menu li {
        display: inline-block !important;
        white-space: nowrap !important;
    }
    
    .nav-link {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.55rem !important;
    }
    
    .nav-x-link {
        display: flex !important;
    }
    
    .hamburger {
        display: none !important;
    }
}

/* Medium desktop: tighten spacing so the nav stays tidy */
@media (min-width: 769px) and (max-width: 1100px) {
    .nav-menu {
        gap: 0.6rem !important;
    }
    .nav-link {
        font-size: 0.82rem !important;
        padding: 0.45rem 0.5rem !important;
    }
}

/* Mobile: hide desktop X icon, show mobile X in menu */
@media (max-width: 768px) {
    .nav-menu-wrapper {
        flex-direction: column;
    }
    
    .nav-menu-row-2 {
        display: flex !important;
    }
    
    .nav-x-link {
        display: none !important;
    }
    
    /* Mobile X Link in Menu */
    .nav-x-link-mobile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 12px 16px;
        color: white;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.95rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0.5rem;
        transition: all 0.2s ease;
    }
    
    .nav-x-link-mobile:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fbbf24;
    }
    
    .nav-x-icon-mobile {
        width: 20px;
        height: 20px;
        fill: currentColor;
        color: white;
        transition: color 0.2s ease;
        flex-shrink: 0;
    }
    
    .nav-x-link-mobile:hover .nav-x-icon-mobile {
        color: #fbbf24;
    }
}

/* Desktop: hide mobile X link */
@media (min-width: 769px) {
    .nav-x-link-mobile {
        display: none;
    }
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    color: white;
    padding: 0.5rem 0;
    text-align: center;
    margin-top: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 0;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

/* Navigation X Icon Link */
.nav-x-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-x-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.nav-x-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    color: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-x-link:hover .nav-x-icon {
    color: #fbbf24;
    transform: scale(1.1);
}

/* Desktop Support Link */
.nav-support-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 7px 14px;
    border-radius: 3px;
    transition: background 0.2s ease;
    flex-shrink: 0;
    color: #1e3a5f;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    background: #fbbf24;
    border: 0;
}

.nav-support-link i,
.nav-support-link .nav-support-icon {
    width: 13px;
    height: 13px;
    fill: currentColor;
    color: #1e3a5f;
}

.nav-support-link:hover {
    background: #f59e0b;
    color: #1e3a5f;
}

/* Mobile Support Link */
.nav-support-link-mobile {
    display: none;
}

@media (max-width: 768px) {
    .nav-support-link {
        display: none;
    }

    .nav-support-link-mobile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 12px 16px;
        color: white;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.95rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.2s ease;
    }

    .nav-support-link-mobile:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-support-link-mobile i,
    .nav-support-link-mobile .nav-support-icon-mobile {
        width: 18px;
        height: 18px;
        fill: currentColor;
        color: #fbbf24;
        flex-shrink: 0;
    }
}

/* Hero Key Numbers */
.hero-key-numbers {
    margin-top: 2.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.hero-poll-context {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.key-numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.key-numbers-grid-compact {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    max-width: 100%;
}

/* Region Cards Grid */
.hero-region-cards {
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.region-cards-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.region-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.region-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.region-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.region-card-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.region-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.region-parliament-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.region-card-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.region-card-section {
    margin-bottom: 1.25rem;
}

.region-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.75rem 0;
}

.region-polling-list,
.region-seats-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.region-poll-item,
.region-seat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid;
    transition: all 0.15s ease;
}

.region-poll-item:hover,
.region-seat-item:hover {
    background: #f3f4f6;
}

.region-poll-item.reform,
.region-seat-item.reform { border-left-color: #12B6CF; }
.region-poll-item.labour,
.region-seat-item.labour { border-left-color: #d50000; }
.region-poll-item.conservative,
.region-seat-item.conservative { border-left-color: #0087dc; }
.region-poll-item.libdem,
.region-seat-item.libdem { border-left-color: #FDBB30; }
.region-poll-item.greens,
.region-seat-item.greens { border-left-color: #008066; }
.region-poll-item.snp,
.region-seat-item.snp { border-left-color: #FCD34D; }
.region-poll-item.pc,
.region-seat-item.pc { border-left-color: #3F8428; }
.region-poll-item.others,
.region-seat-item.others { border-left-color: #9ca3af; }

.region-item-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
}

.region-item-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.region-item-value.reform { color: #12B6CF; }
.region-item-value.labour { color: #d50000; }
.region-item-value.conservative { color: #0087dc; }
.region-item-value.libdem { color: #FDBB30; }
.region-item-value.greens { color: #008066; }
.region-item-value.snp { color: #FCD34D; }
.region-item-value.pc { color: #3F8428; }
.region-item-value.others { color: #9ca3af; }

.region-card-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.region-cta-btn {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.region-cta-primary {
    background: #1e3a8a;
    color: #ffffff;
    border: 1px solid #1e3a8a;
}

.region-cta-primary:hover {
    background: #1e40af;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}

.region-cta-secondary {
    background: #ffffff;
    color: #1e3a8a;
    border: 1px solid #d1d5db;
}

.region-cta-secondary:hover {
    background: #f9fafb;
    border-color: #1e3a8a;
}

/* Quick Stats Bar - Compact horizontal metrics */
.hero-quick-stats-wrapper {
    max-width: 800px;
    margin: 1.5rem auto 0;
}

.hero-quick-stats-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937 !important;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hero-quick-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.quick-stat-item {
    text-align: center;
    flex: 1;
}

.quick-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.quick-stat-lead {
    color: #22c55e !important; /* Match 7-Day Change green */
}

.quick-stat-change {
    font-weight: 800 !important; /* Bolder for 7-day change */
}

@media (max-width: 1200px) {
    .region-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .region-card {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .key-numbers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .region-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .region-card {
        padding: 1.25rem;
    }
    
    .region-card-title {
        font-size: 1.3rem;
    }
    
    .hero-quick-stats-wrapper {
        margin-top: 1rem;
    }
    
    .hero-quick-stats-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-quick-stats {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0.75rem;
    }
    
    .quick-stat-item {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 100px;
    }
    
    .quick-stat-value {
        font-size: 1.25rem;
    }
    
    .locals-resources-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .locals-resources-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
}

.key-number-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.key-numbers-grid-compact .key-number-item {
    padding: 0.75rem;
    border-radius: 10px;
}

.key-numbers-grid-compact .key-number-value {
    font-size: 2rem;
}

.key-numbers-grid-compact .key-number-label {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.key-number-value-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.key-number-momentum {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0.9;
}

.key-number-momentum.momentum-up {
    color: #86efac;
}

.key-number-momentum.momentum-down {
    color: #fecaca;
}

.key-number-momentum.momentum-neutral {
    color: rgba(255, 255, 255, 0.7);
}

.key-number-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: none;
    box-shadow: none;
}

.key-number-label {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.key-number-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Party colors for values - using class-based selectors for all instances */
.key-number-value.reform-color-value,
.key-number-item[data-party="ref"] .key-number-value,
.key-number-item[data-party="reform"] .key-number-value,
.key-number-item#hero-ref .key-number-value,
.key-number-item#hero-gb-ref .key-number-value,
.key-number-item#hero-holyrood-reform .key-number-value,
.key-number-item#hero-senedd-reform .key-number-value {
    color: #12B6CF;
}

.key-number-value.labour-color-value,
.key-number-item[data-party="lab"] .key-number-value,
.key-number-item[data-party="labour"] .key-number-value,
.key-number-item#hero-lab .key-number-value,
.key-number-item#hero-gb-lab .key-number-value,
.key-number-item#hero-holyrood-labour .key-number-value,
.key-number-item#hero-senedd-labour .key-number-value {
    color: #d50000;
}

.key-number-value.conservative-color-value,
.key-number-item[data-party="con"] .key-number-value,
.key-number-item[data-party="conservative"] .key-number-value,
.key-number-item#hero-con .key-number-value,
.key-number-item#hero-gb-con .key-number-value,
.key-number-item#hero-holyrood-conservative .key-number-value,
.key-number-item#hero-senedd-conservative .key-number-value {
    color: #0087dc;
}

.key-number-value.libdem-color-value,
.key-number-item[data-party="ld"] .key-number-value,
.key-number-item[data-party="libdem"] .key-number-value,
.key-number-item#hero-ld .key-number-value,
.key-number-item#hero-gb-ld .key-number-value,
.key-number-item#hero-holyrood-libdem .key-number-value,
.key-number-item#hero-senedd-libdem .key-number-value {
    color: #FDBB30;
}

.key-number-value.greens-color-value,
.key-number-item[data-party="green"] .key-number-value,
.key-number-item[data-party="greens"] .key-number-value,
.key-number-item#hero-green .key-number-value,
.key-number-item#hero-gb-green .key-number-value,
.key-number-item#hero-holyrood-greens .key-number-value,
.key-number-item#hero-senedd-greens .key-number-value {
    color: #008066;
}

.key-number-value.snp-color-value,
.key-number-item[data-party="snp"] .key-number-value,
.key-number-item#hero-snp .key-number-value,
.key-number-item#hero-gb-snp .key-number-value,
.key-number-item#hero-holyrood-snp .key-number-value {
    color: #FCD34D;
}

.key-number-value.pc-color-value,
.key-number-item[data-party="pc"] .key-number-value,
.key-number-item#hero-pc .key-number-value,
.key-number-item#hero-gb-pc .key-number-value,
.key-number-item#hero-senedd-pc .key-number-value {
    color: #3F8428;
}

.key-number-value.others-color-value,
.key-number-item[data-party="others"] .key-number-value,
.key-number-item#hero-others .key-number-value,
.key-number-item#hero-gb-others .key-number-value {
    color: #9ca3af;
}

.key-number-label.reform-color {
    color: #12B6CF;
}

.key-number-label.labour-color {
    color: #d50000;
}

.key-number-label.conservative-color {
    color: #0087dc;
}

.key-number-label.libdem-color {
    color: #FDBB30;
}

.key-number-label.greens-color {
    color: #008066;
}

.key-number-label.snp-color {
    color: #FCD34D;
}

.key-number-label.pc-color {
    color: #3F8428;
}

.key-number-label.others-color {
    color: #9ca3af;
}

.hero-state-play {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.state-play-label {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
    margin-right: 0.5rem;
}

.state-play-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a8a;
    text-shadow: none;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.locals-resources-section {
    margin: 32px auto 0;
    max-width: 1200px;
}

.locals-resources-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.locals-resources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-alert {
    margin: 0;
    padding: 20px 24px;
    background: #1e3a8a;
    color: #f8fafc;
    border: 1px solid #0f172a;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}
.hero-alert-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 6px;
}
.hero-alert-copy {
    margin: 0 0 10px 0;
    color: #e2e8f0;
}
.hero-alert .btn {
    margin-top: 4px;
}

.btn-hero {
    background: rgba(255, 255, 255, 0.95);
    color: #1e40af;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-hero:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #1e3a8a;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: #1e40af;
    border: 1px solid rgba(14, 116, 144, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-hero-secondary:hover {
    background: white;
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card i {
    font-size: 2rem;
    color: #fbbf24;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    opacity: 0.8;
}

/* Latest Polling Section */
.latest-polling {
    padding: 60px 0;
    background: #f8f9fa;
}

.poll-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.poll-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 5px solid;
}

.poll-card:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.poll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.poll-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.poll-value {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.poll-details {
    font-size: 0.9rem;
    color: #666;
}

.poll-details p {
    margin: 5px 0;
}

.poll-source {
    text-align: center;
    margin-top: 30px;
}

.poll-source p {
    margin-bottom: 15px;
    color: #666;
}

/* Poll Selection Grid */
.poll-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.poll-selection-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.poll-selection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.poll-selection-card.selected {
    border-color: #007bff;
    background: #f8f9ff;
}

.poll-selection-card h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1rem;
}

.poll-selection-card .poll-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.poll-selection-card .poll-sample {
    font-size: 0.8rem;
    color: #888;
}

/* Latest poll summary inside locals page */
.locals-latest-poll {
    margin: 1.5rem 0;
}

.locals-latest-poll h3 {
    margin-bottom: 0.35rem;
}

.locals-latest-meta {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0.85rem;
}

.locals-seat-totals {
    margin: 1.5rem 0;
}

.seat-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.locals-card-full {
    grid-column: 1/-1;
}

.locals-card-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}

.locals-card-info .locals-card-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    color: #475569;
}

.locals-card-info .locals-card-value {
    margin: 0.35rem 0 0.75rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}

.locals-card-info .locals-card-note {
    font-size: 0.95rem;
    color: #1e293b;
}

.locals-vote-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.locals-vote-share-grid article {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
}

.locals-vote-share-grid h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #0f172a;
}

.vote-share-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.95rem;
}

.vote-share-row:last-child {
    border-bottom: none;
}

.vote-share-label {
    font-weight: 600;
    color: #0f172a;
}

.vote-share-value {
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.seat-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.seat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.seat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.locals-seat-note {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 0.5rem;
}

.seat-majority-summary {
    margin: 0.5rem 0;
    font-weight: 600;
    color: #1f2937;
}

.seat-majority-summary.majority-achieved {
    color: #047857;
}

.seat-majority-summary.hung-parliament {
    color: #b45309;
}

.majority-line-container {
    position: relative;
    height: 28px;
    margin-top: 0.5rem;
}

.majority-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dc2626;
}

.majority-label {
    position: absolute;
    top: -18px;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: #dc2626;
}

/* Party-specific colors for poll cards */
.poll-card.reform {
    border-left-color: #12B6CF;
}

.poll-card.reform h3,
.poll-card.reform .poll-value {
    color: #12B6CF;
}

.poll-card.labour {
    border-left-color: #E4003B;
}

.poll-card.labour h3,
.poll-card.labour .poll-value {
    color: #E4003B;
}

.poll-card.conservative {
    border-left-color: #0087DC;
}

.poll-card.conservative h3,
.poll-card.conservative .poll-value {
    color: #0087DC;
}

.poll-card.libdem {
    border-left-color: #FAA61A;
}

.poll-card.libdem h3,
.poll-card.libdem .poll-value {
    color: #FAA61A;
}

.poll-card.green {
    border-left-color: #008066;
}

.poll-card.green h3,
.poll-card.green .poll-value {
    color: #008066;
}

.poll-card.snp {
    border-left-color: #B8860B;
}

.poll-card.snp h3,
.poll-card.snp .poll-value {
    color: #B8860B;
}

.poll-card.greens h3,
.poll-card.greens .poll-value {
    color: #008066;
}

/* Plaid Cymru styling */
.poll-card.plaid { border-left-color: #B8860B; }
.poll-card.plaid h3,
.poll-card.plaid h4,
.poll-card.plaid .poll-value { color: #B8860B; }

/* Features Section */
.features {
    padding: 5rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    color: #1e3a8a;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e3a8a;
}

.feature-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

/* Latest Updates Section */
.latest-updates {
    padding: 5rem 0;
    background: #f8fafc;
}

/* Snapshot bar */
.snapshot-bar { background: linear-gradient(180deg, #f6f8ff 0%, #ffffff 100%); border-bottom: 1px solid #e5e7eb; }
.snapshot-content { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 18px 0; }
.snapshot-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.snapshot-left { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.snapshot-title { background: #1E3A8A; color: #ffffff; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.snapshot-meta { color: #374151; font-size: 1rem; letter-spacing: 0.1px; }
.snapshot-meta .snapshot-pollster { font-weight: 600; color: #0F172A; }
.snapshot-meta .snapshot-date { color: #6b7280; margin-left: 6px; }
.snapshot-meta .snapshot-party { font-weight: 700; }
.snapshot-meta .snapshot-party.ref { color: #12B6CF; font-weight: 700; }
.snapshot-meta .snapshot-party.lab { color: #E4003B; font-weight: 700; }
.snapshot-meta .snapshot-party.con { color: #0087DC; font-weight: 700; }
.time-ago { color: #9ca3af; margin-left: 8px; }

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.update-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
}

.update-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.update-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #eef2ff;
    color: #1E3A8A;
    margin-right: 8px;
}

.update-date { color: #3B82F6; font-weight: 500; }
.update-source { color: #6b7280; }
.time-ago { color: #9ca3af; margin-left: 8px; }

.update-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1E3A8A;
}

.update-card p {
    color: #475569;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 5rem 0;
    background: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e3a8a;
}

.about-content p {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 3rem;
    line-height: 1.7;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.about-feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    font-weight: 500;
    color: #374151;
}

.about-feature i {
    color: #3b82f6;
    font-size: 1.25rem;
}

/* Footer */
.footer {
    background: #1e3a8a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
}

.footer-section h3 i {
    margin-right: 0.5rem;
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fbbf24;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    text-align: center;
    color: #94a3b8;
}

/* Data Display Styles */
.data-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

.data-header {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    padding: 1.5rem;
}

.data-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.data-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.data-content {
    padding: 2rem;
}

.poll-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.poll-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

/* Party Color Coding */
.poll-card.labour {
    border-left-color: #d50000;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
}

.poll-card.conservative {
    border-left-color: #0087dc;
    background: linear-gradient(135deg, #eff6ff 0%, #bfdbfe 100%);
}

.poll-card.reform {
    border-left-color: #12B6CF;
    background: linear-gradient(135deg, #f0fdfa 0%, #a7f3d0 100%);
}

.poll-card.libdem {
    border-left-color: #FDBB30;
    background: linear-gradient(135deg, #fffbeb 0%, #fed7aa 100%);
}

.poll-card.greens {
    border-left-color: #008066;
    background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
}

.poll-card.snp {
    border-left-color: #FFF95D;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.poll-card.others {
    border-left-color: #999999;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
}

.poll-card.pc {
    border-left-color: #3F8428;
    background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
}

.poll-card.alba {
    border-left-color: #005EB8;
    background: linear-gradient(135deg, #ffffff 0%, #e6f2ff 100%);
}

.poll-card h4 {
    color: #1e3a8a;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Party-specific title colors */
.poll-card.labour h4 {
    color: #d50000;
}

.poll-card.conservative h4 {
    color: #0087dc;
}

.poll-card.reform h4 {
    color: #12B6CF;
}

.poll-card.libdem h4 {
    color: #FDBB30;
}

.poll-card.greens h4 {
    color: #008066;
}

.poll-card.snp h4 {
    color: #B8860B;
}

.poll-card.pc h4 {
    color: #3F8428;
}

.poll-card.alba h4 {
    color: #005EB8;
}

.poll-card.yourparty {
    border-left-color: #7C3AED;
    background: linear-gradient(135deg, #f5f3ff 0%, #ddd6fe 100%);
}

.poll-card.yourparty h4 {
    color: #6D28D9;
}

.poll-card.yourparty .poll-value {
    color: #7C3AED;
}

.poll-card .poll-meta {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #475569;
    opacity: 0.9;
}

.poll-card.others h4 {
    color: #999999;
}

.poll-value {
    font-size: 2rem;
    font-weight: 700;
    color: #3b82f6;
}

/* Party-specific poll value colors */
.poll-card.labour .poll-value {
    color: #d50000;
}

.poll-card.conservative .poll-value {
    color: #0087dc;
}

.poll-card.reform .poll-value {
    color: #12B6CF;
}

.poll-card.libdem .poll-value {
    color: #FDBB30;
}

.poll-card.greens .poll-value {
    color: #008066;
}

.poll-card.snp .poll-value {
    color: #B8860B;
}

.poll-card.pc .poll-value {
    color: #3F8428;
}

.poll-card.alba .poll-value {
    color: #005EB8;
}

.poll-card.others .poll-value {
    color: #999999;
}

.poll-change {
    font-size: 0.875rem;
    color: #6b7280;
}

.poll-change.positive {
    color: #059669;
}

.poll-change.negative {
    color: #dc2626;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.data-table tr:hover {
    background: #f8fafc;
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

/* Chart wrapper with aspect ratio */
.chart-container > div {
    width: 100%;
    position: relative;
}

/* Desktop: wider aspect ratio */
.chart-container canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 1;
}

/* Recent polls cards container (hidden by default, shown on mobile) */
.recent-polls-preview {
    margin-top: 2rem;
}

.recent-polls-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.recent-polls-intro {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.recent-polls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    align-items: flex-start;
}

.recent-poll-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.recent-poll-card.interactive {
    cursor: pointer;
}

.recent-poll-card.placeholder {
    cursor: default;
    text-align: center;
    color: #6b7280;
}

.recent-poll-card.interactive:hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.recent-poll-card.interactive:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 3px;
}

.recent-poll-card.interactive.expanded {
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.18);
}

.recent-poll-card.is-active {
    border-color: #2563eb;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.18);
    transform: translateY(-2px);
}

.recent-poll-card.is-active .recent-poll-pollster {
    color: #1d4ed8;
}

.recent-poll-card.is-active .recent-poll-summary {
    opacity: 1;
}

.recent-poll-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.recent-poll-pollster {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}

.recent-poll-card-date {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 2px;
}

.recent-poll-card-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: right;
}

.recent-poll-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recent-poll-pill {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #1f2937;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.recent-poll-pill.reform { background: rgba(18,182,207,0.12); color:#0f6070; }
.recent-poll-pill.labour { background: rgba(213,0,0,0.12); color:#7f1010; }
.recent-poll-pill.conservative { background: rgba(0,135,220,0.12); color:#0c4a6e; }
.recent-poll-pill.libdem { background: rgba(253,187,48,0.15); color:#8a4c00; }
.recent-poll-pill.greens { background: rgba(0,128,102,0.12); color:#0f5134; }
.recent-poll-pill.snp { background: rgba(255,249,93,0.2); color:#665c00; }
.recent-poll-pill.pc { background: rgba(63,132,40,0.12); color:#24531a; }
.recent-poll-pill.others { background: rgba(156,163,175,0.12); color:#374151; }
.recent-poll-pill.neutral { background:#f8fafc; color:#6b7280; }

.recent-poll-detail {
    display: none;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    font-size: 0.85rem;
}

.recent-poll-card.expanded .recent-poll-detail {
    display: block;
}

.recent-poll-meta-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0.75rem;
    color: #475569;
}

.recent-poll-prev {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 2px;
}

.cw-projection {
    font-size: 0.8rem;
    color: #475569;
}

.recent-poll-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recent-poll-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 10px;
}

.recent-poll-row.empty {
    justify-content: center;
    color: #9ca3af;
    font-style: italic;
}

.recent-poll-party {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1f2937;
}

.party-chip {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.party-chip.reform { background:#12B6CF; }
.party-chip.labour { background:#d50000; }
.party-chip.conservative { background:#0087dc; }
.party-chip.libdem { background:#FDBB30; }
.party-chip.greens { background:#008066; }
.party-chip.snp { background:#FFF95D; }
.party-chip.pc { background:#3F8428; }
.party-chip.others { background:#999999; }

.recent-poll-value {
    font-weight: 700;
    color: #0f172a;
}

.recent-poll-change {
    font-weight: 600;
    font-size: 0.85rem;
}

.recent-poll-change.positive { color: #059669; }
.recent-poll-change.negative { color: #dc2626; }
.recent-poll-change.neutral { color: #6b7280; }

.recent-poll-card.placeholder:hover {
    transform: none;
    box-shadow: none;
}

.margin-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

/* Margin Analysis Grid - for seat calculator */
#margin-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.margin-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.margin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.margin-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.margin-card-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.margin-card-meta {
    font-size: 0.9rem;
    color: #475569;
}

.margin-card-value.positive { color: #047857; }
.margin-card-value.negative { color: #b91c1c; }
.margin-card-value.neutral { color: #0f172a; }

@media (max-width: 1024px) {
    .recent-polls-grid {
        grid-template-columns: 1fr;
    }
}

.recent-polls-cards {
    display: none;
}

/* Latest polls mobile cards container (hidden by default, shown on mobile) */
.latest-polls-cards-mobile {
    display: none;
}

@media (max-width: 768px) {
    .margin-card-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Mobile: taller chart for better visibility - handled in polls-shared.css */
    
    /* Show cards, hide table on mobile */
    .recent-polls-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .data-table-container {
        display: none;
        overflow-x: visible;
        width: 100%;
    }
    
    @media (min-width: 769px) {
        .data-table-container {
            display: block;
            overflow-x: visible;
            width: 100%;
        }
    }
    
    /* Poll card styles for recent polls */
    .recent-poll-card {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 1.25rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
    }
    
    .recent-poll-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }
    
    .recent-poll-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid #f3f4f6;
    }
    
    .recent-poll-date {
        font-weight: 600;
        color: #1e3a8a;
        font-size: 1rem;
    }
    
    .recent-poll-meta {
        text-align: right;
        font-size: 0.85rem;
        color: #6b7280;
    }
    
    .recent-poll-pollster {
        font-weight: 600;
        color: #374151;
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .recent-poll-sample {
        color: #9ca3af;
    }
    
    .recent-poll-parties {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 0.75rem;
    }
    
    .recent-poll-party-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0.75rem;
        background: #f8fafc;
        border-radius: 8px;
        font-size: 0.875rem;
    }
    
    .recent-poll-party-name {
        font-weight: 500;
        color: #374151;
    }
    
    .recent-poll-party-value {
        font-weight: 700;
        color: #1e3a8a;
    }
    
    /* Party-specific colors for recent poll cards */
    .recent-poll-party-item.labour .recent-poll-party-name { color: #d50000; }
    .recent-poll-party-item.labour .recent-poll-party-value { color: #d50000; }
    
    .recent-poll-party-item.reform .recent-poll-party-name { color: #12B6CF; }
    .recent-poll-party-item.reform .recent-poll-party-value { color: #12B6CF; }
    
    .recent-poll-party-item.conservative .recent-poll-party-name { color: #0087dc; }
    .recent-poll-party-item.conservative .recent-poll-party-value { color: #0087dc; }
    
    .recent-poll-party-item.libdem .recent-poll-party-name { color: #FDBB30; }
    .recent-poll-party-item.libdem .recent-poll-party-value { color: #FDBB30; }
    
    .recent-poll-party-item.greens .recent-poll-party-name { color: #008066; }
    .recent-poll-party-item.greens .recent-poll-party-value { color: #008066; }
    
    .recent-poll-party-item.snp .recent-poll-party-name { color: #B8860B; }
    .recent-poll-party-item.snp .recent-poll-party-value { color: #B8860B; }
    
    .recent-poll-party-item.pc .recent-poll-party-name { color: #3F8428; }
    .recent-poll-party-item.pc .recent-poll-party-value { color: #3F8428; }
    
    .recent-poll-party-item.others .recent-poll-party-name { color: #999999; }
    .recent-poll-party-item.others .recent-poll-party-value { color: #999999; }
}

/* Add spacing between poll cards and Party Support Swings */
.poll-grid + .chart-container + .data-container {
    margin-top: 40px;
}

.chart-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.insight-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.insight-card i {
    font-size: 1.5rem;
    color: #3b82f6;
    margin-bottom: 0.75rem;
}

.insight-card h4 {
    color: #1e3a8a;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.insight-card p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Quick Stats Card */
.quick-stats-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.weekly-change-card {
    transition: all 0.3s ease;
}

.weekly-change-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.quick-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.quick-stats-header h3 {
    color: #1e3a8a;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.quick-stats-header h3 i {
    color: #3b82f6;
}

.quick-stats-date {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.latest-poll-info {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: #0369a1;
    font-size: 0.9rem;
}

.latest-poll-info p {
    margin: 0;
}

.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.quick-stat-item {
    text-align: center;
    padding: 1.5rem 1.25rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
}

.quick-stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.quick-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 12px 12px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-stat-item:hover::before {
    opacity: 1;
}

.quick-stat-label {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.3;
}

.quick-stat-value {
    color: #1e3a8a;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.quick-stat-percentage {
    color: #3b82f6;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.quick-stat-sample,
.quick-stat-period {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.article-hero-card {
    display: none;
    margin: 2rem 0;
}

.article-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
}

.article-hero-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.article-hero-content h3 {
    font-size: 1.9rem;
    line-height: 1.3;
    margin: 0.25rem 0 0.5rem;
}

.article-hero-content p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.92);
}

.article-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.article-hero-card .btn-hero {
    align-self: flex-start;
    background: #ffffff;
    color: #0f172a;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.article-hero-card .btn-hero:hover {
    transform: translateY(-2px);
}

.meta-dot {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .article-hero-card {
        padding: 1.5rem;
    }
    
    .article-hero-content h3 {
        font-size: 1.5rem;
    }
}

/* Poll Ranges Section */
.poll-ranges-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.poll-ranges-section h4 {
    color: #1e3a8a;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.poll-ranges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    max-width: 100%;
}

.poll-range-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 0.875rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
}

.poll-range-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.poll-range-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 10px 10px 0 0;
    transition: width 0.3s ease;
}

.poll-range-item:hover::after {
    width: 100%;
}


.poll-range-label {
    color: #1e3a8a;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.3;
}

.poll-range-values {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.poll-range-high,
.poll-range-low {
    font-size: 0.75rem;
    font-weight: 500;
}

.poll-range-high {
    color: #059669;
}

.poll-range-low {
    color: #dc2626;
}

/* Dual Charts Section */
.dual-charts-section {
    margin: 1.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.chart-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.chart-panel:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.chart-title {
    color: #1e3a8a;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.polling-bars-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.poll-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.poll-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    border-color: #e2e8f0;
    background: #fafbfc;
}

.party-name {
    width: 120px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e3a8a;
    flex-shrink: 0;
}

.bar-container {
    flex: 1;
    height: 38px;
    background: #f1f5f9;
    border-radius: 19px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.bar-fill {
    height: 100%;
    border-radius: 19px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: width 0.8s ease-out;
    position: relative;
    overflow: hidden;
    min-width: 60px; /* Ensure minimum space for numbers */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bar-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s ease-in-out;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.bar-percentage {
    z-index: 1;
    position: relative;
}

.momentum-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
    justify-content: center;
}

.momentum-arrow {
    font-size: 1.2rem;
    font-weight: 600;
}

.momentum-change {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
}

.momentum-change.positive {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

.momentum-change.negative {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.momentum-change.stable {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
}

.momentum-explanation {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: #0369a1;
    font-size: 0.875rem;
}

.momentum-explanation i {
    margin-right: 0.5rem;
    color: #0284c7;
}

/* Party-specific bar colors */
.bar-fill.reform {
    background: linear-gradient(135deg, #12B6CF, #0ea5e9);
}

.bar-fill.labour {
    background: linear-gradient(135deg, #E4003B, #dc2626);
}

.bar-fill.conservative {
    background: linear-gradient(135deg, #0087DC, #2563eb);
}

.bar-fill.libdem {
    background: linear-gradient(135deg, #FAA61A, #f59e0b);
}

.bar-fill.greens {
    background: linear-gradient(135deg, #008066, #059669);
}

.bar-fill.snp {
    background: linear-gradient(135deg, #FFF95D, #f59e0b);
}

.bar-fill.others {
    background: linear-gradient(135deg, #999999, #6b7280);
}

.bar-fill.pc {
    background: linear-gradient(135deg, #3F8428, #059669);
}

/* Seats-specific styling */
.seats-bars-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.seats-bar {
    position: relative;
}

.bar-seats {
    z-index: 1;
    position: relative;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.majority-indicator {
    min-width: 60px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #dc2626;
}

.seat-majority-summary {
    margin-bottom: 0.85rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
}

.seat-majority-summary.majority-achieved {
    color: #047857;
}

.seat-majority-summary.hung-parliament {
    color: #b45309;
}

/* Methodology Content */
.methodology-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.methodology-content p {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.methodology-content ul {
    list-style: none;
    padding: 0;
}

.methodology-content ul li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: #374151;
    line-height: 1.6;
}

.methodology-content ul li:before {
    content: "•";
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Mobile scroll hint - show only on mobile */
.mobile-scroll-hint {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-scroll-hint {
        display: block !important;
        animation: fadeIn 0.5s ease-in;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu-wrapper {
        position: fixed;
        left: -100%;
        top: 70px;
        background-color: #1e3a5f;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 999;
    }

    .nav-menu-wrapper.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-menu-row-2 {
        display: flex !important;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .key-numbers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .key-number-value {
        font-size: 2.5rem;
    }
    
    .hero-state-play {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .state-play-text {
        font-size: 1rem;
    }

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

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

    .updates-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .poll-ranges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* Hide desktop poll grid on mobile, show compact cards */
    /* Only hide poll-grid for latest polls, not for seat predictions */
    .latest-polls .poll-grid,
    #latest-polls.poll-grid {
        display: none;
    }
    
    /* Hide desktop cards on mobile, show mobile cards instead */
    #polling-averages-grid,
    #seat-predictions-grid,
    #scotland-seat-cards,
    #wales-seat-cards,
    #seat-summary-scotland,
    #seat-summary-wales,
    #seat-summary-london,
    #poll-input-grid-scotland,
    #poll-input-grid-wales,
    #poll-input-grid-london,
    #poll-input-grid {
        display: none !important;
    }

    /* Show mobile cards on mobile */
    #polling-averages-mobile,
    #seat-predictions-mobile,
    #scotland-seat-cards-mobile,
    #wales-seat-cards-mobile,
    #seat-summary-scotland-mobile,
    #seat-summary-wales-mobile,
    #seat-summary-london-mobile,
    #seat-summary-mobile,
    #poll-input-grid-scotland-mobile,
    #poll-input-grid-wales-mobile,
    #poll-input-grid-london-mobile,
    #poll-input-grid-mobile {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* Hide council control desktop grid on mobile; use mobile cards instead */
    .locals-council-counts .poll-grid {
        display: none;
    }
    /* Hide generic poll grids on mobile to avoid duplicate tiles in devolved panels */
    .poll-grid {
        display: none !important;
    }

    /* Show regional seat projections poll-grid on mobile */
    #regional-seats-container .poll-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* Mobile styling for regional seat cards - white cards with left border */
    #regional-seats-container .poll-card {
        background: white !important;
        border: 1px solid #e5e7eb;
        border-left: 4px solid;
        padding: 0.6rem;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #regional-seats-container .poll-card h4 {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }

    #regional-seats-container .poll-card .poll-value {
        font-size: 1.4rem;
        margin-bottom: 0.15rem;
    }

    #regional-seats-container .poll-card .poll-change {
        font-size: 0.65rem;
    }

    /* Party border colors for mobile regional seat cards */
    #regional-seats-container .poll-card.labour { border-left-color: #d50000; }
    #regional-seats-container .poll-card.conservative { border-left-color: #0087dc; }
    #regional-seats-container .poll-card.reform { border-left-color: #12B6CF; }
    #regional-seats-container .poll-card.libdem { border-left-color: #FDBB30; }
    #regional-seats-container .poll-card.greens { border-left-color: #008066; }
    #regional-seats-container .poll-card.snp { border-left-color: #FFF95D; }
    #regional-seats-container .poll-card.pc { border-left-color: #3F8428; }
    #regional-seats-container .poll-card.others { border-left-color: #999999; }

    /* Margin analysis grid should still show on mobile */
    #margin-analysis-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Poll selection grid mobile optimization */
    .poll-selection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Seat predictions grid mobile optimization */
    #seat-predictions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .latest-polls-cards-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .latest-poll-card-mobile {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        border-left: 3px solid;
    }
    
    .latest-poll-card-mobile:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transform: translateY(-1px);
    }

    /* Authority control pill on mobile: shrink and allow wrapping */
    .locals-authority-control-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        max-width: 140px;
        font-size: 0.85rem;
        padding: 4px 8px;
        line-height: 1.2;
        white-space: normal;
        text-align: center;
        word-break: break-word;
    }
    
    .latest-poll-card-mobile h4 {
        font-size: 0.8rem;
        font-weight: 600;
        margin: 0 0 0.5rem 0;
        color: #374151;
    }
    
    .latest-poll-card-mobile .poll-value {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0 0 0.25rem 0;
    }
    
    .latest-poll-card-mobile .poll-change {
        font-size: 0.65rem;
        color: #6b7280;
        line-height: 1.2;
    }
    
    /* Party-specific colors for latest poll mobile cards */
    .latest-poll-card-mobile.labour {
        border-left-color: #d50000;
        background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    }
    .latest-poll-card-mobile.labour h4,
    .latest-poll-card-mobile.labour .poll-value {
        color: #d50000;
    }
    
    .latest-poll-card-mobile.conservative {
        border-left-color: #0087dc;
        background: linear-gradient(135deg, #eff6ff 0%, #bfdbfe 100%);
    }
    .latest-poll-card-mobile.conservative h4,
    .latest-poll-card-mobile.conservative .poll-value {
        color: #0087dc;
    }
    
    .latest-poll-card-mobile.reform {
        border-left-color: #12B6CF;
        background: linear-gradient(135deg, #f0fdfa 0%, #a7f3d0 100%);
    }
    .latest-poll-card-mobile.reform h4,
    .latest-poll-card-mobile.reform .poll-value {
        color: #12B6CF;
    }
    
    .latest-poll-card-mobile.libdem {
        border-left-color: #FDBB30;
        background: linear-gradient(135deg, #fffbeb 0%, #fed7aa 100%);
    }
    .latest-poll-card-mobile.libdem h4,
    .latest-poll-card-mobile.libdem .poll-value {
        color: #FDBB30;
    }
    
    .latest-poll-card-mobile.greens {
        border-left-color: #008066;
        background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
    }
    .latest-poll-card-mobile.greens h4,
    .latest-poll-card-mobile.greens .poll-value {
        color: #008066;
    }
    
    .latest-poll-card-mobile.snp {
        border-left-color: #FFF95D;
        background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    }
    .latest-poll-card-mobile.snp h4,
    .latest-poll-card-mobile.snp .poll-value {
        color: #B8860B;
    }
    
    .latest-poll-card-mobile.pc {
        border-left-color: #3F8428;
        background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
    }
    .latest-poll-card-mobile.pc h4,
    .latest-poll-card-mobile.pc .poll-value {
        color: #3F8428;
    }
    
    .latest-poll-card-mobile.others {
        border-left-color: #999999;
        background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    }
    .latest-poll-card-mobile.others h4,
    .latest-poll-card-mobile.others .poll-value {
        color: #999999;
    }
    
    .latest-poll-card-mobile.alba {
        border-left-color: #005EB8;
        background: linear-gradient(135deg, #ffffff 0%, #e6f2ff 100%);
    }
    .latest-poll-card-mobile.alba h4,
    .latest-poll-card-mobile.alba .poll-value {
        color: #005EB8;
    }

    .poll-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Enhanced Table Improvements for Mobile */
    .data-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        margin: 1rem 0;
        border-radius: 8px;
        /* Custom scrollbar for webkit browsers */
        scrollbar-width: thin;
        scrollbar-color: #3b82f6 #f1f5f9;
    }

    .data-container::-webkit-scrollbar {
        height: 6px;
    }

    .data-container::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }

    .data-container::-webkit-scrollbar-thumb {
        background: #3b82f6;
        border-radius: 3px;
    }

    .data-container::-webkit-scrollbar-thumb:hover {
        background: #1e40af;
    }

    /* Enhanced scroll indicator - shows only when scrollable */
    .data-container[data-scrollable="true"]::after {
        content: 'Scroll';
        position: absolute;
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
        background: rgba(59, 130, 246, 0.85);
        color: white;
        padding: 2px 6px;
        border-radius: 12px;
        font-size: 0.6rem;
        font-weight: 500;
        pointer-events: none;
        z-index: 3;
        opacity: 0.7;
        animation: subtlePulse 3s infinite;
        transition: opacity 0.3s ease;
    }

    @keyframes subtlePulse {
        0%, 100% { opacity: 0.7; }
        50% { opacity: 0.4; }
    }

    /* Hide indicator on scroll or after interaction */
    .data-container.scrolled::after,
    .data-container:active::after {
        opacity: 0.2;
    }

    .data-table {
        font-size: 0.75rem;
        width: 100%;
        max-width: 100%;
        border-collapse: collapse;
        margin: 0;
        background: white;
        table-layout: auto;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.35rem;
        text-align: left;
        border-bottom: 1px solid #e2e8f0;
        white-space: normal;
        vertical-align: middle;
        word-wrap: break-word;
    }
    
    .data-table th:first-child,
    .data-table td:first-child {
        min-width: 80px;
        max-width: 100px;
    }
    
    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        min-width: 100px;
        max-width: 120px;
    }
    
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        min-width: 70px;
        max-width: 90px;
    }
    
    /* Party percentage columns - make them narrower */
    .data-table th:nth-child(n+4),
    .data-table td:nth-child(n+4) {
        min-width: 50px;
        max-width: 70px;
        text-align: center;
    }

    .data-table th {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        font-weight: 600;
        color: #374151;
        position: sticky;
        top: 0;
        z-index: 2;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .data-table tr:hover {
        background: #f8fafc;
    }

    /* Enhanced data headers for mobile */
    .data-header {
        padding: 1rem 1.5rem;
        text-align: center;
    }

    .data-header h3 {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }

    .data-header p {
        font-size: 0.8rem;
        opacity: 0.9;
    }

    /* Enhanced chart container and image mobile styles */
    .chart-container {
        padding: 1rem;
        margin-bottom: 1.5rem;
        text-align: center;
        background: white;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        position: relative;
        /* Full-bleed on mobile */
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Sticky controls on mobile */
    .chart-container .snapshot-bar {
        position: sticky;
        top: 70px;
        z-index: 10;
        background: white;
        padding: 12px;
        border-bottom: 1px solid #e5e7eb;
        margin: -1rem -1rem 8px -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .chart-container h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        color: #1e40af;
        font-weight: 600;
    }

    /* Enhanced chart images with better mobile visibility */
    .chart-container img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        transition: all 0.3s ease;
        border: 2px solid transparent;
        background: white;
        padding: 4px;
    }

    /* Tap to expand functionality */
    .chart-container img:hover,
    .chart-container img:focus {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
        border-color: #3b82f6;
    }

    /* Hide zoom instruction after first interaction (no-op since removed) */
    .chart-container.interacted::after { content: none; }

    /* Improve content spacing */
    .data-content {
        padding: 0;
    }

    /* Better mobile spacing for containers */
    .container {
        padding: 0 1rem;
    }

    /* Party name truncation for very long names */
    .data-table td:first-child {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Weekly changes cards on mobile */
    #weekly-changes-container {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .weekly-change-card {
        padding: 0.875rem !important;
    }
}

@media (max-width: 480px) {
    .poll-grid {
        grid-template-columns: 1fr;
    }

    .poll-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .poll-ranges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .poll-selection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .poll-selection-card {
        padding: 12px;
    }

    .poll-selection-card h4 {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .poll-selection-card .poll-date {
        font-size: 0.8rem;
    }

    .poll-selection-card .poll-sample {
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Further enhanced table improvements for very small screens */
    .data-table {
        font-size: 0.65rem;
        width: 100%;
        max-width: 100%;
    }

    .data-table th,
    .data-table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.6rem;
    }

    .data-table th {
        font-size: 0.55rem;
    }
    
    /* Make columns even more compact on very small screens */
    .data-table th:first-child,
    .data-table td:first-child {
        min-width: 60px;
        max-width: 80px;
    }
    
    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        min-width: 70px;
        max-width: 90px;
    }
    
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        min-width: 50px;
        max-width: 65px;
    }
    
    .data-table th:nth-child(n+4),
    .data-table td:nth-child(n+4) {
        min-width: 40px;
        max-width: 55px;
    }

    /* Smaller scroll indicator for very small screens */
    .data-container[data-scrollable="true"]::after {
        font-size: 0.55rem;
        padding: 1px 4px;
        right: 4px;
        border-radius: 8px;
    }

    /* More compact headers */
    .data-header {
        padding: 0.75rem 1rem;
    }

    .data-header h3 {
        font-size: 1rem;
    }

    .data-header p {
        font-size: 0.75rem;
    }

    /* Container improvements for mobile */
    .container {
        padding: 0 0.75rem;
    }

    .data-container {
        margin: 0.75rem 0;
    }

    /* Chart container: full-bleed on mobile to maximize space */
    .chart-container {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding: 0.75rem 0.75rem 0.5rem 0.75rem;
        margin-bottom: 1rem;
    }

    .chart-container h3 {
        font-size: 1rem;
        padding: 0 0.75rem;
    }

    .chart-container .breadcrumb {
        padding: 0 0.75rem;
    }

    .chart-container .ft-legend {
        padding: 0 0.75rem;
    }

    .chart-container .mobile-controls-wrap {
        padding: 0 0.75rem;
    }

    /* Even more aggressive party name truncation */
    .data-table td:first-child {
        max-width: 100px;
    }

    /* Make percentage columns slightly wider for readability */
    .data-table td:not(:first-child) {
        min-width: 60px;
        text-align: center;
    }
    
    /* Mobile responsive dual charts - keep side by side but compact */
    .charts-container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .chart-panel {
        padding: 0.75rem;
    }
    
    .chart-title {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .poll-bar {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.5rem;
        align-items: center;
    }
    
    .party-name {
        width: 60px;
        font-size: 0.75rem;
        text-align: left;
        flex-shrink: 0;
    }
    
    .bar-container {
        height: 25px;
        flex: 1;
    }
    
    .momentum-indicator {
        min-width: 50px;
        justify-content: center;
        gap: 0.25rem;
        flex-shrink: 0;
    }
    
    .momentum-arrow {
        font-size: 0.9rem;
    }
    
    .momentum-change {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
    
    .majority-indicator {
        min-width: 30px;
        font-size: 0.7rem;
    }
    
    .majority-line {
        right: 34.8%;
    }
    
    .majority-label {
        font-size: 0.65rem;
        top: -20px;
    }
    
    .bar-seats {
        font-size: 0.75rem;
    }
    
    .bar-fill {
        padding-right: 6px;
        font-size: 0.8rem;
        min-width: 30px;
    }
    
    .polling-bars-container,
    .seats-bars-container {
        gap: 0.5rem;
    }
    
    .momentum-explanation {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

/* Very small screens - stack vertically */
@media (max-width: 480px) {
    .charts-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-panel {
        padding: 0.75rem;
    }
    
    .poll-bar {
        flex-direction: row;
        gap: 0.4rem;
        padding: 0.4rem;
    }
    
    .party-name {
        width: 50px;
        font-size: 0.7rem;
    }
    
    .bar-container {
        height: 22px;
    }
    
    .momentum-indicator {
        min-width: 45px;
        gap: 0.2rem;
    }
    
    .momentum-arrow {
        font-size: 0.8rem;
    }
    
    .momentum-change {
        font-size: 0.65rem;
        padding: 1px 3px;
    }
    
    .bar-fill {
        padding-right: 4px;
        font-size: 0.75rem;
        min-width: 25px;
    }
    
    .majority-indicator {
        min-width: 25px;
        font-size: 0.65rem;
    }
    
    .majority-label {
        font-size: 0.6rem;
        top: -18px;
    }
}

/* Map Description Styles */
.map-description {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #374151;
}

.regional-breakdown h4 {
    color: #1f2937;
    margin-bottom: 16px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.region-item {
    background: white;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.region-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.region-item.england {
    border-left: 4px solid #dc2626;
}

.region-item.scotland {
    border-left: 4px solid #1e40af;
}

.region-item.wales {
    border-left: 4px solid #059669;
}

.region-flag {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.region-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.region-content strong {
    font-size: 1.1rem;
    color: #1f2937;
}

.region-content span {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

.map-benefit {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    color: #1e40af;
    font-size: 1rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .map-description {
        padding: 16px;
        margin: 16px 0;
    }
    
    .region-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .region-item {
        padding: 12px;
    }
    
    .map-intro {
        font-size: 1rem;
    }
}

/* Contact Page Styles - CSS Variables */
:root {
    --primary-color: #4CAF50;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
}

/* Contact Page Styles */
.contact-container {
    margin-top: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    background: #4CAF50;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.2rem;
}

.contact-details h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.contact-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.response-time {
    margin-top: 2rem;
}

.response-card {
    background: linear-gradient(135deg, var(--primary-color), #45a049);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.response-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.response-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.response-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.contact-form-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-form-container h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-note {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.form-note p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-note i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.form-status {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.form-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mobile responsiveness for contact page */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info,
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin: 0 0 1rem 0;
        align-self: center;
    }
    
    .response-card {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Full-bleed main content on mobile */
    .main-content .container {
        padding: 0 1rem;
    }
    
    .data-container {
        border-radius: 8px;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Social Media Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateY(-2px);
}

.social-link i {
    font-size: 1.1rem;
    color: #1da1f2; /* Twitter/X blue */
    transition: color 0.3s ease;
}

.social-link:hover i {
    color: #fbbf24;
}

.x-logo {
    width: 16px;
    height: 16px;
    color: #1da1f2; /* Twitter/X blue */
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.social-link:hover .x-logo {
    color: #fbbf24;
}

@media (max-width: 768px) {
    .social-links {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .social-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Image modal for mobile zoom functionality */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-modal img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.image-modal .close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Only show modal functionality on mobile */
@media (max-width: 768px) {
    .chart-container {
        position: relative;
    }
}

/* Article Page Styles */
.article-container {
    margin: 2rem 0;
}

.featured-article {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.article-date {
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.article-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-excerpt {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    font-style: italic;
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
}

.article-content {
    line-height: 1.8;
    color: #374151;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e3a8a;
    margin: 2rem 0 1rem 0;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
}

.article-author {
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
}

/* Article Archive */
.article-archive {
    margin-top: 3rem;
}

.article-archive h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.archive-article {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.archive-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.archive-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #666;
}

.archive-date {
    background: #f3f4f6;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-weight: 500;
}

.archive-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-weight: 500;
}

.archive-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.archive-excerpt {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.archive-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.archive-tags .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}

/* Mobile Responsiveness for Articles */
@media (max-width: 768px) {
    .featured-article {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-excerpt {
        font-size: 1rem;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .archive-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .archive-article {
        padding: 1rem;
    }
    
    .archive-title {
        font-size: 1.1rem;
    }
}

/* Articles Listing Page Styles */
.articles-list {
    margin: 2rem 0;
}

.article-preview {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.article-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.article-preview .article-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-preview .article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-preview .article-title a:hover {
    color: #3b82f6;
}

.article-preview .article-excerpt {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.article-preview .article-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Breadcrumb Styles */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #1e40af;
}

.breadcrumb span {
    color: #374151;
    font-weight: 500;
}

/* Individual Article Page Styles */
.article-container .featured-article .article-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Mobile Responsiveness for Articles Listing */
@media (max-width: 768px) {
    .article-preview {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .article-preview .article-title {
        font-size: 1.4rem;
    }
    
    .article-preview .article-excerpt {
        font-size: 1rem;
    }
    
    .article-container .featured-article .article-title {
        font-size: 1.8rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
}

/* Submenu (dropdown) */
.nav-menu li.has-submenu { position: relative; }

/* Chevron arrow for submenu items */
.nav-menu li.has-submenu > a::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 6px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.nav-menu li.has-submenu.active > a::after {
    transform: rotate(180deg);
}

.nav-menu li .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e3a5f;
    border: 1px solid #152843;
    border-radius: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    min-width: 220px;
    padding: 8px 0;
    z-index: 1100;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    /* Force vertical layout */
    display: none;
    flex-direction: column;
}

.nav-menu li.has-submenu.active > .submenu {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Desktop hover fallback so submenus open even if JS binding is delayed */
@media (min-width: 769px) {
  .nav-menu li.has-submenu:hover > .submenu,
  .nav-menu li.has-submenu:focus-within > .submenu {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback: show submenu when trigger indicates expanded (even if .active not toggled) */
.nav-menu li.has-submenu > a[aria-expanded="true"] + .submenu {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.nav-menu li .submenu li { list-style: none; }
.nav-menu li .submenu a {
    display: block;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-menu li .submenu a:hover { 
    background: rgba(255,255,255,0.12); 
    color: #fbbf24; 
    border-left-color: #fbbf24;
    padding-left: 20px;
}

/* Mobile: show submenu when parent is active */
@media (max-width: 768px) {
  .nav-menu li.has-submenu { width: 100%; }
  .nav-menu li.has-submenu > a { position: relative; }
  .nav-menu li.has-submenu.active > .submenu { 
    display: block; 
    position: static; 
    box-shadow: none; 
    border: none; 
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    margin-top: 8px;
    opacity: 1;
    transform: none;
  }
  /* Fallback on mobile: show when trigger reports expanded */
  .nav-menu li.has-submenu > a[aria-expanded="true"] + .submenu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    margin-top: 8px;
    opacity: 1;
    transform: none;
  }
  .nav-menu li.has-submenu .submenu a { 
    padding-left: 24px; 
    border-left: none;
  }
  .nav-menu li.has-submenu .submenu a:hover {
    padding-left: 24px;
    border-left: none;
  }
}

/* Homepage overrides (Option A palette) */
.snapshot-bar { background: linear-gradient(180deg, #f6f8ff 0%, #ffffff 100%); border-bottom: 1px solid #e5e7eb; }
.snapshot-title { background: #1E3A8A; color: #ffffff; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.snapshot-meta { color: #374151; }
.snapshot-meta .snapshot-pollster { font-weight: 600; color: #0F172A; }
.snapshot-meta .snapshot-date { color: #6b7280; }
.snapshot-meta .snapshot-party.ref { color: #12B6CF; font-weight: 700; }
.snapshot-meta .snapshot-party.lab { color: #E4003B; font-weight: 700; }
.snapshot-meta .snapshot-party.con { color: #0087DC; font-weight: 700; }

.update-card { background: #ffffff; border: 1px solid #e5e7eb; box-shadow: none; }
.update-card h3 { color: #1E3A8A; }
.update-card p { color: #475569; }
.update-date { color: #3B82F6; }
.update-icon { background: #eef2ff; color: #1E3A8A; }

.poll-card { background: #ffffff; border: 1px solid #e5e7eb; box-shadow: none; }
.poll-header h3, .poll-value { color: #0F172A; }
.section-title { color: #1E3A8A; }

/* Pronounced homepage overrides for visibility */
.hero { background: #ffffff; color: #0F172A; border-bottom: 1px solid #e5e7eb; }
.hero-title { color: #1E3A8A; }
.hero-subtitle { color: #475569; }

.section-title { color: #1E3A8A; position: relative; display: inline-block; padding-bottom: 6px; }
.section-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; background: #1E3A8A; border-radius: 2px; }

.update-card { border-left: 4px solid #1E3A8A; }
.poll-card { border-left: 4px solid #e5e7eb; }

/* Global page header and chart styling overrides */
.data-header h2,
.data-header h3 {
    color: #1E3A8A;
    display: inline-block;
    position: relative;
    padding-bottom: 6px;
}
.data-header h2::after,
.data-header h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    background: #1E3A8A;
    border-radius: 2px;
}
.data-header p,
.data-header .subtitle {
    color: #475569;
}

.chart-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: none;
    padding: 25px;
}

/* Ensure readable section headers on all pages */
.data-header {
    background: #ffffff;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

/* Ensure page headings are visible below sticky nav */
main { padding-top: 0; }
.data-header:first-child { margin-top: 12px; }
.data-header h1 { font-size: 1.75rem; line-height: 1.25; color: #1E3A8A; position: relative; display: inline-block; padding-bottom: 6px; }
.data-header h1::after { content: ''; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; background: #1E3A8A; border-radius: 2px; }

/* Chart control bar aesthetics */
.snapshot-bar .snapshot-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.snapshot-bar .btn { 
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #0f172a;
    border-radius: 9999px;
    padding: 6px 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.snapshot-bar .btn:hover { 
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
}
.snapshot-bar .btn.is-active { 
    background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%);
    color: #ffffff;
    border-color: #1e3a8a;
    box-shadow: 0 4px 12px rgba(30,64,175,0.25);
}
.snapshot-bar input[type="date"] { 
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.snapshot-bar input[type="date"]:hover { border-color: #cbd5e1; }
.snapshot-bar input[type="date"]:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }

@media (max-width: 768px) {
  .snapshot-bar .btn { padding: 6px 10px; font-size: 0.85rem; }
  .snapshot-bar input[type="date"] { font-size: 0.85rem; }
}

/* Path to No10: Seat chart and layout */
.seat-graph-container canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 1;
}

/* Make controls sticky inside the graph block */
.desktop-graph .snapshot-bar {
    position: sticky;
    top: 70px;
    z-index: 10;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    margin: -8px -12px 8px -12px;
    padding: 10px 12px;
}

/* Hex map default height (desktop) */
#hex-map {
    height: 700px;
}

/* Regional seats container as responsive grid */
#regional-seats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.region-seats-card {
    text-align: center;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.region-seats-card h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
}
.region-seats-card .poll-info {
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
    font-style: italic;
}
.region-seats-card .seats-list {
    font-size: 12px;
    line-height: 1.4;
}

/* Copy toast */
.copy-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
    background: rgba(17, 24, 39, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9999;
}
.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 560px;
    width: calc(100% - 32px);
    background: #111827;
    color: #f9fafb;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    box-shadow: 0 25px 40px rgba(15, 23, 42, 0.35);
    display: none;
    z-index: 9999;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-copy {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #d1d5db;
}

.cookie-banner-copy strong {
    color: #f9fafb;
    font-weight: 600;
}

.cookie-banner-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.cookie-banner button {
    flex: 0 0 auto;
    min-width: 110px;
    background: rgba(243, 244, 246, 0.12);
    color: #f9fafb;
    border: 1px solid rgba(243, 244, 246, 0.22);
    border-radius: 8px;
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cookie-banner button:hover {
    background: rgba(243, 244, 246, 0.2);
}

.cookie-banner .cookie-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner .cookie-link:hover {
    color: #bfdbfe;
}

@media (max-width: 768px) {
    /* Seat chart aspect for mobile and full-bleed */
    .seat-graph-container canvas {
        aspect-ratio: 3 / 4;
        min-height: 400px;
    }
    .plot-container {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hex map mobile height */
    #hex-map {
        height: 60vh;
        min-height: 420px;
    }

    /* Regional seats grid tighter on mobile */
    #regional-seats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .cookie-banner {
        bottom: 16px;
        padding: 1.25rem;
    }

    .cookie-banner-actions {
        flex-direction: row;
        justify-content: stretch;
    }

    .cookie-banner button {
        flex: 1 1 0;
        min-width: 0;
    }
}


@media (max-width: 480px) {
    #regional-seats-container {
        grid-template-columns: 1fr;
    }
}


/* 2026 Local Elections page */
.locals-hero {
    background: radial-gradient(circle at top, #0f172a 0%, #1e3a8a 35%, #172554 100%);
    color: white;
}

.locals-hero .hero-title {
    color: white;
}

.locals-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
}

.locals-hero-overline {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

/* Compact Hero */
.locals-hero-compact {
    padding: 1.5rem 0 1rem;
}

.locals-hero-compact .hero-title {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.locals-hero-compact .locals-hero-overline {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

/* Global Search Styles */
.locals-global-search {
    margin-top: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.locals-global-search-container {
    position: relative;
}

.locals-global-search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.locals-global-search-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.locals-global-search-icon {
    color: #9ca3af;
    font-size: 1.1rem;
}

.locals-global-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1f2937;
    background: transparent;
}

.locals-global-search-input::placeholder {
    color: #9ca3af;
}

.locals-global-search-postcode-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.locals-global-search-postcode-btn:hover {
    background: #2563eb;
}

.locals-global-search-clear-btn {
    background: transparent;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.locals-global-search-clear-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.locals-global-search-clear-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.locals-global-search-hint {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.locals-global-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 2000;
    display: none;
    margin-top: 0.5rem;
}

.locals-global-search-results.dc-inline {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    max-height: none;
    overflow: visible;
    margin-top: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.dc-candidates {
    list-style: none;
    padding-left: 0;
    margin: 0.25rem 0 0;
}

.dc-candidates li {
    margin-bottom: 0.35rem;
    color: #1f2937;
}

.locals-global-search-postcode-details a {
    color: #2563eb;
    text-decoration: underline;
}

.dc-attribution {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.5rem;
}

.dc-attribution a {
    color: #2563eb;
    text-decoration: underline;
}

.dc-candidate-prev {
    color: #64748b;
    font-size: 0.85rem;
}

.dc-inline .locals-global-search-postcode-info:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.dc-disclosure {
    display: none;
    margin-top: 1rem;
    width: 100%;
}

.dc-disclosure summary {
    cursor: pointer;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    list-style: none;
    background: #2563eb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
    box-sizing: border-box;
}

.dc-disclosure summary::-webkit-details-marker {
    display: none;
}

.dc-disclosure summary::after {
    content: '▾';
    font-size: 0.9rem;
    opacity: 0.9;
}

.dc-inline {
    width: 100%;
    box-sizing: border-box;
}
.locals-global-search-results.active {
    display: block;
}

.locals-global-search-result-item {
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.2s;
}

.locals-global-search-result-item:hover {
    background: #f3f4f6;
}

.locals-global-search-result-item:last-child {
    border-bottom: none;
}

.locals-global-search-result-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.locals-global-search-result-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.locals-global-search-result-type {
    font-size: 0.875rem;
    color: #64748b;
}

.locals-global-search-postcode-item {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.locals-search-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: locals-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes locals-spin {
    to { transform: rotate(360deg); }
}

.locals-global-search-loading,
.locals-global-search-error,
.locals-global-search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: #64748b;
}

.locals-global-search-error {
    color: #dc2626;
}

.locals-global-search-postcode-info {
    padding: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    color: #0f172a !important;
}

.locals-global-search-postcode-info *:not(a) {
    color: #0f172a !important;
}

.locals-global-search-postcode-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.locals-global-search-postcode-details {
    margin-bottom: 0.75rem;
    color: #0f172a !important;
}

.locals-global-search-postcode-details div {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #0f172a !important;
}

.locals-global-search-postcode-details strong {
    color: #0f172a !important;
}

.locals-global-search-postcode-details *:not(a) {
    color: #0f172a !important;
}

.locals-global-search-postcode-note {
    font-size: 0.875rem;
    color: #475569;
    font-style: italic;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

/* Authority Info Display */
.locals-global-search-info {
    margin-top: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.locals-global-search-info.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.locals-global-search-info-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3b82f6;
}

.locals-global-search-info-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #1f2937;
}

.locals-global-search-info-text em {
    font-style: italic;
    color: #64748b;
    font-size: 0.9rem;
}

.locals-authority-website-intro {
    display: block;
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.locals-authority-website-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.locals-authority-website-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.locals-authority-website-link::after {
    content: '↗';
    font-size: 0.85rem;
    opacity: 0.7;
    margin-left: 0.25rem;
}

.locals-authority-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.locals-authority-line {
    font-size: 0.95rem;
    color: #0f172a;
}

.locals-authority-seats {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.locals-authority-seats-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.locals-authority-seats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.locals-authority-seat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* Mobile: Use grid layout for consistent pill sizing and reduced scrolling */
@media (max-width: 768px) {
    .locals-authority-seats-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .locals-authority-seat-badge {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 10px;
        font-size: 0.8rem;
        min-height: 36px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.locals-authority-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.locals-authority-control-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    margin-bottom: 6px;
}

@media (max-width: 768px) {
    .locals-global-search-info-content {
        padding: 1rem;
    }
}

/* Comparison Tools Styles */
.locals-comparison-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    max-height: 80vh;
    transition: transform 0.3s ease;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.locals-comparison-panel.collapsed {
    transform: translateY(calc(100% - 60px));
}

.locals-comparison-panel-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.locals-comparison-panel-title {
    font-weight: 600;
    color: #1f2937;
}

.locals-comparison-panel-count {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.locals-comparison-panel-content {
    padding: 1.5rem;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.locals-comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.locals-comparison-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    position: relative;
}

.locals-comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.locals-comparison-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.locals-comparison-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition: background 0.2s;
    flex-shrink: 0;
}

.locals-comparison-remove:hover {
    background: #dc2626;
}

.locals-comparison-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.locals-comparison-details div {
    font-size: 0.9rem;
    color: #374151;
}

.locals-comparison-details strong {
    color: #1f2937;
    margin-right: 0.5rem;
}

.locals-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.locals-comparison-table th,
.locals-comparison-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.locals-comparison-table th {
    font-weight: 600;
    color: #1f2937;
    background: #f8fafc;
}

.locals-comparison-table tr:last-child td {
    border-bottom: none;
}

.locals-comparison-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.locals-comparison-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.locals-comparison-btn:hover {
    background: #2563eb;
}

.locals-comparison-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.locals-comparison-btn-secondary:hover {
    background: #d1d5db;
}

@media (max-width: 768px) {
    .locals-global-search {
        margin-top: 1.5rem;
    }
    
    .locals-global-search-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .locals-global-search-postcode-btn {
        width: 100%;
        justify-content: center;
    }
    
    .locals-global-search-clear-btn {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .locals-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .locals-comparison-panel {
        max-height: 90vh;
    }
}

.locals-section {
    padding: 4rem 0;
}

.locals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Mobile: ensure tiles are in a grid layout */
@media (max-width: 768px) {
    .locals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .locals-card {
        padding: 1.25rem;
        min-height: auto;
    }
}

.locals-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 190px;
}

.locals-card-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
}

.locals-card-value {
    font-size: 2.75rem;
    font-weight: 700;
    color: #0f172a;
}

.locals-card-note {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

.locals-card-links {
    min-height: 0;
}

.locals-card-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0.4rem 0 0.4rem;
}

.link-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #cbd5f5;
    color: #1e3a8a;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    background: #f5f7ff;
    transition: background 0.2s ease, color 0.2s ease;
}

.link-chip:hover {
    background: #e0e7ff;
    color: #111827;
}

/* Compact Stats Bar */
.locals-stats-bar {
    padding: 12px 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.locals-stats-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.locals-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.locals-stat-item a {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.locals-stat-item a:hover {
    opacity: 0.8;
}

.locals-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a8a;
}

.locals-stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

.locals-stat-divider {
    width: 1px;
    height: 20px;
    background: #cbd5e1;
}

.locals-stat-alert a {
    background: #fef2f2;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.locals-stat-alert a:hover {
    background: #fee2e2;
    opacity: 1;
}

.locals-stat-alert .locals-stat-value {
    color: #dc2626;
}

.locals-stat-alert .locals-stat-label {
    color: #dc2626;
    font-weight: 500;
}

.locals-stat-links {
    display: flex;
    gap: 8px;
    margin-left: 8px;
}

.locals-stat-chip {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e3a8a;
    background: #e0e7ff;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.locals-stat-chip:hover {
    background: #c7d2fe;
}

@media (max-width: 768px) {
    .locals-stats-compact {
        gap: 12px;
    }

    .locals-stat-divider {
        display: none;
    }

    .locals-stat-links {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 8px;
    }
}

.locals-downloads {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.locals-download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f9fafb;
}

.locals-download-card h4 {
    margin-bottom: 0.35rem;
    color: #0f172a;
}

.locals-download-card p {
    color: #475569;
    font-size: 0.9rem;
}

.locals-source-note {
    margin: 1rem 0 2rem;
    font-size: 0.9rem;
    color: #475569;
}

.locals-source-note a {
    color: #1e3a8a;
    font-weight: 600;
}

.locals-gap-panel {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    background: #ffffff;
    color: #0f172a;
    line-height: 1.5;
}

.locals-gap-panel h3 {
    margin-bottom: 1rem;
    color: #0f172a;
}

.locals-gap-group {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.locals-gap-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.locals-info-dropdown {
    display: block;
}

.locals-info-dropdown summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    outline: none;
    list-style: none;
}

.locals-info-dropdown summary::-webkit-details-marker {
    display: none;
}

.locals-info-dropdown summary::after {
    content: '▾';
    margin-left: 0.35rem;
    font-size: 0.8rem;
    color: #475569;
}

.locals-info-dropdown[open] summary::after {
    content: '▴';
}

.locals-info-body {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: #0f172a;
}

.locals-info-body h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.locals-info-body ul {
    margin: 0;
    padding-left: 1.1rem;
    color: #1f2937;
}

.locals-info-body li {
    margin-bottom: 0.35rem;
}

.locals-gap-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
}

.locals-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.locals-tab {
    border: 1px solid #dbeafe;
    background: #f8fafc;
    color: #1e3a8a;
    border-radius: 999px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 150px;
}

.locals-tab span {
    font-size: 0.95rem;
}

.locals-tab small {
    font-size: 0.75rem;
    color: #475569;
}

.locals-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.locals-tab.active {
    background: #1e3a8a;
    color: #fff;
    border-color: transparent;
}

.locals-tab.active small {
    color: rgba(255,255,255,0.8);
}

/* View toggle: Councils / Mayoral Races */
.locals-view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.locals-view-toggle-btn {
    border: 2px solid #1e3a8a;
    background: transparent;
    color: #1e3a8a;
    border-radius: 8px;
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s, color 0.15s;
}

.locals-view-toggle-btn:hover {
    background: #eff6ff;
}

.locals-view-toggle-btn.active {
    background: #1e3a8a;
    color: #fff;
}

/* Type filter pills */
.locals-type-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.locals-type-filter-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.locals-type-filter-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.locals-type-filter-btn.active {
    background: #1e3a8a;
    color: #fff;
    border-color: transparent;
}

/* Type column in unified table */
.locals-type-cell {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
}

/* County overlay on unified map */
.county-boundary {
    pointer-events: all;
}

@media (max-width: 700px) {
    .locals-view-toggle-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.85rem;
    }
    .locals-type-cell {
        display: none;
    }
}

.locals-map-controls {
    margin-bottom: 1rem;
}

.locals-ward-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.locals-ward-colour-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #eef2ff;
    color: #1e1b4b;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #c7d2fe;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.locals-ward-colour-label select {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    padding: 0.45rem 2.4rem 0.45rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
    cursor: pointer;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23111' d='M1.25.5 5 4.25 8.75.5 10 1.75 5 6 0 1.75z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) 50%;
}

.locals-ward-colour-label select:focus {
    outline: 2px solid #a5b4fc;
    outline-offset: 2px;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.35);
}

.locals-ward-colour-label select:hover {
    border-color: #94a3b8;
}

/* Zoom Controls */
.locals-zoom-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.locals-zoom-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    color: #475569;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.locals-zoom-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.locals-zoom-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.locals-ward-back-btn {
    padding: 0.65rem 1.25rem;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.locals-ward-back-btn:hover {
    background: #1e3a8a;
}

.locals-view-wards-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.locals-view-wards-btn:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.locals-view-wards-btn:active {
    transform: translateY(0);
}

.locals-ward-vote-chart {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.locals-ward-chart-header {
    margin-bottom: 1rem;
}

.locals-ward-chart-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.locals-ward-chart-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.locals-vertical-chart-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.locals-y-axis {
    display: none;
}

.locals-y-axis-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: right;
    padding-right: 0.5rem;
}

.locals-vertical-chart-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-height: 0;
    padding-bottom: 0.25rem;
}

.locals-vertical-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.locals-vertical-bar-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    text-align: right;
    min-width: 56px;
}

.locals-vertical-bar-container {
    flex: 1;
    height: 16px;
    background: #f1f5f9;
    border-radius: 999px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.locals-vertical-bar-fill {
    height: 100%;
    width: 100%;
    max-width: 100%;
    transition: width 0.5s ease-out;
    border-radius: 999px;
    position: relative;
}

.locals-vertical-bar-fill.conservative { background: #0087dc; }
.locals-vertical-bar-fill.labour { background: #d50000; }
.locals-vertical-bar-fill.libdem { background: #FDBB30; }
.locals-vertical-bar-fill.greens { background: #008066; }
.locals-vertical-bar-fill.snp { background: #FFF95D; }
.locals-vertical-bar-fill.pc { background: #3F8428; }
.locals-vertical-bar-fill.reform { background: #12B6CF; }
.locals-vertical-bar-fill.alba { background: #005EB8; }
.locals-vertical-bar-fill.others { background: #999999; }
.locals-vertical-bar-fill.reform { background: #12B6CF; }
.locals-vertical-bar-fill.others { background: #808080; }

.locals-vertical-bar-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e3a8a;
    text-align: left;
    word-wrap: break-word;
    line-height: 1.2;
    min-width: 96px;
}

.locals-group-meta {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.locals-group-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #94a3b8;
}

.locals-group-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.15rem;
}

.locals-count-number {
    font-size: 2rem;
    color: #1e3a8a;
    font-weight: 700;
}

.locals-count-label {
    font-size: 0.85rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.locals-table-wrapper {
    margin-top: 1.5rem;
    overflow-x: auto;
}

.locals-table {
    font-size: 0.88rem;
}

.locals-table th,
.locals-table td {
    white-space: nowrap;
    padding: 0.55rem 0.75rem;
}

.locals-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    background: transparent;
    border-bottom: 2px solid #e2e8f0;
}

/* Party-colored header underlines */
.locals-table th[data-sort="lab"] { border-bottom-color: #E4003B; }
.locals-table th[data-sort="con"] { border-bottom-color: #0087DC; }
.locals-table th[data-sort="libdem"] { border-bottom-color: #FAA61A; }
.locals-table th[data-sort="green"] { border-bottom-color: #008066; }
.locals-table th[data-sort="reform"] { border-bottom-color: #12B6CF; }
.locals-table th[data-sort="other"] { border-bottom-color: #999; }

/* Party seat cells - right-align numbers */
.locals-table td.locals-party-cell {
    text-align: center;
    font-variant-numeric: tabular-nums;
    min-width: 3rem;
}

.locals-th-sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.locals-th-sortable:hover {
    background: #f1f5f9;
}

.locals-sort-icon {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: 2px;
}

.locals-table-section-header {
    background: #f1f5f9;
    border-top: 2px solid #e2e8f0;
    border-bottom: none;
}

.locals-table-section-header td {
    padding: 0.65rem 0.75rem;
    white-space: normal;
}

.locals-table-section-header strong {
    font-size: 0.85rem;
    color: #0f172a;
    font-weight: 600;
}

.locals-table-section-count {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.locals-table-section-note {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #94a3b8;
    font-style: italic;
}

/* Compact row hover */
.locals-table tbody tr:not(.locals-table-section-header):hover {
    background: #f8fafc;
}

/* Area name in table - reduce boldness */
.locals-table td:first-child strong {
    font-weight: 500;
    color: #1e293b;
}

/* Seats total column */
.locals-table td:nth-child(3),
.locals-table td:nth-child(4) {
    font-variant-numeric: tabular-nums;
}

.party-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.party-tag--lab {
    background: #fdecec;
    color: #d50000;
}

.party-tag--con {
    background: #e1f0ff;
    color: #0087dc;
}

.party-tag--ld {
    background: #fff4da;
    color: #fdbb30;
}

.party-tag--green {
    background: #e0f6ef;
    color: #008066;
}

.party-tag--ref {
    background: #e0f8ff;
    color: #12B6CF;
}

.party-tag--pc {
    background: #fdf7d5;
    color: #3F8428;
}

.party-tag--snp {
    background: #fffbe3;
    color: #0A2C50;
}

.party-tag--ind {
    background: #ececec;
    color: #374151;
}

.party-tag--noc {
    background: #f1f5f9;
    color: #0f172a;
}

.party-tag--oth {
    background: #e5e7eb;
    color: #1f2937;
}

.locals-mayors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.locals-mayor-column h3 {
    margin-bottom: 1.5rem;
    color: #0f172a;
    font-size: 1.25rem;
}

.locals-mayor-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.locals-mayor-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.locals-mayor-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.locals-mayor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.locals-mayor-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.locals-mayor-incumbent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.locals-mayor-incumbent-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.locals-mayor-incumbent-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.locals-mayor-by-election-note {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

.locals-mayor-no-incumbent {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.9rem;
}

.locals-mayor-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.locals-mayor-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.locals-mayor-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
}

.locals-mayor-detail-value {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 500;
}

.locals-mayor-results {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.locals-mayor-results-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.locals-mayor-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.locals-mayor-result-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
}

.locals-mayor-result-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.locals-mayor-result-value {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
}

.locals-mayor-councils {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.locals-mayor-councils-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.locals-mayor-councils-list {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}

.locals-mayor-candidates {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.locals-mayor-candidates-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.locals-mayor-candidates-list {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.locals-mayor-candidate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.locals-mayor-candidate-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.9rem;
}

.locals-mayor-2022-results {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.locals-mayor-2022-results-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.locals-mayor-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.locals-mayor-results-table thead {
    background: #f8fafc;
}

.locals-mayor-results-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

.locals-mayor-results-table td {
    padding: 0.5rem 0.75rem;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.locals-mayor-results-table tbody tr:last-child td {
    border-bottom: none;
}

.locals-mayor-results-table .party-row-con {
    background: rgba(0, 135, 220, 0.05);
}

.locals-mayor-results-table .party-row-lab {
    background: rgba(213, 0, 0, 0.05);
}

.locals-mayor-results-table .party-row-ld {
    background: rgba(253, 187, 48, 0.1);
}

.locals-mayor-results-table .party-row-green {
    background: rgba(0, 128, 102, 0.05);
}

.locals-mayor-results-table .party-row-oth {
    background: rgba(156, 163, 175, 0.05);
}

.locals-mayor-results-total {
    background: #f8fafc;
    font-weight: 600;
    border-top: 2px solid #e5e7eb;
}

.locals-mayor-results-total td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    color: #0f172a;
}

/* Status badges */
.locals-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.locals-status-badge.status-new {
    background: #dbeafe;
    color: #1e40af;
}

.locals-status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.locals-status-badge.status-incumbent {
    background: #d1fae5;
    color: #065f46;
}

.locals-status-badge.status-open {
    background: #fce7f3;
    color: #9f1239;
}

.locals-status-badge.status-other {
    background: #f1f5f9;
    color: #475569;
}

/* Legacy styles for backward compatibility */
.locals-mayor-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.locals-mayor-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    align-items: center;
}

.locals-mayor-name {
    font-weight: 600;
    color: #0f172a;
}

.locals-mayor-incumbent {
    color: #475569;
    font-size: 0.9rem;
    text-align: right;
}

.locals-status-pill {
    background: #fde68a;
    color: #92400e;
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .locals-download-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .locals-tab {
        flex: 1 1 calc(50% - 0.75rem);
        min-width: 0;
    }

    .locals-group-count {
        align-items: flex-start;
    }

    .locals-mayor-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .locals-mayor-incumbent {
        text-align: left;
    }
    
    .locals-mayors {
        grid-template-columns: 1fr;
    }
    
    .locals-mayor-card {
        padding: 1.25rem;
    }
    
    .locals-mayor-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .locals-mayor-details {
        grid-template-columns: 1fr;
    }
    
    .locals-mayor-results-grid {
        grid-template-columns: 1fr;
    }
}

.locals-panel-section {
    padding-top: 2rem;
}

/* Full-width layout: override container max-width inside panel section */
.locals-panel-section > .container {
    max-width: 100%;
    padding: 0 1.5rem;
}

/* Share Button Styles */
.locals-panel-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.share-view-btn:hover {
    background: #e0e7ff;
    border-color: #c7d2fe;
    color: #1e40af;
}

.share-view-btn.copied {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.share-view-btn i {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .locals-panel-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .share-view-btn {
        width: 100%;
        justify-content: center;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* FAQ Section Styles */
.locals-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2rem;
    text-align: center;
}

.locals-faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.locals-faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s ease;
}

.locals-faq-item:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.locals-faq-item[open] {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.locals-faq-question {
    display: block;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.locals-faq-question::-webkit-details-marker {
    display: none;
}

.locals-faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 400;
    color: #475569;
    transition: transform 0.2s ease, color 0.2s ease;
}

.locals-faq-item[open] .locals-faq-question::after {
    content: '−';
    transform: translateY(-50%) rotate(0deg);
}

.locals-faq-question:hover {
    background-color: #f8fafc;
}

.locals-faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: #1e293b;
    line-height: 1.7;
}

.locals-faq-answer p {
    margin-bottom: 1rem;
}

.locals-faq-answer p:last-child {
    margin-bottom: 0;
}

.locals-faq-answer ul,
.locals-faq-answer ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.locals-faq-answer li {
    margin-bottom: 0.5rem;
}

.locals-faq-answer a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.locals-faq-answer a:hover {
    color: #1e40af;
}

.locals-faq-answer strong {
    color: #0f172a;
    font-weight: 600;
}

@media (max-width: 768px) {
    .locals-section-title {
        font-size: 1.75rem;
    }
    
    .locals-faq-question {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        padding-right: 3rem;
    }
    
    .locals-faq-question::after {
        right: 1.25rem;
        font-size: 1.25rem;
    }
    
    .locals-faq-answer {
        padding: 0 1.25rem 1.25rem 1.25rem;
        font-size: 0.95rem;
    }
}

.locals-tier-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.locals-tier-tabs button {
    border: 1px solid #c7d2fe;
    background: #fff;
    color: #1e3a8a;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.locals-tier-tabs button.active {
    background: #1e3a8a;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(30,58,138,0.25);
}

.locals-panel {
    background: #fff;
    border-radius: 8px;
    padding: 2rem 1.5rem;
    box-shadow: none;
    border: none;
}

.locals-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.locals-panel-cta a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    border: 1px solid #c7d2fe;
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
}

.locals-panel-cta a:hover {
    background: #1e3a8a;
    color: #fff;
}

.locals-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.locals-stat {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    background: #f9fafb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.locals-council-counts {
    margin-bottom: 1rem;
}

.locals-council-counts-header {
    margin-bottom: 0.5rem;
}

.locals-council-counts-header h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    font-weight: 600;
    margin: 0;
}

/* Compact council count cards */
.locals-council-counts .poll-grid {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.locals-council-counts .poll-card {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    min-width: auto;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.locals-council-counts .poll-card h4 {
    font-size: 0.75rem;
    margin: 0;
    font-weight: 500;
}

.locals-council-counts .poll-card .poll-value {
    font-size: 1rem;
    font-weight: 700;
}

.locals-council-counts .poll-card .poll-meta {
    display: none;
}

/* Compact mobile cards for council counts */
.locals-council-counts .latest-polls-cards-mobile {
    display: none;
}

@media (max-width: 768px) {
    .locals-council-counts .poll-grid {
        display: none !important;
    }

    .locals-council-counts .latest-polls-cards-mobile {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .locals-council-counts .latest-poll-card-mobile {
        padding: 0.4rem 0.6rem;
        border-radius: 6px;
        min-width: auto;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .locals-council-counts .latest-poll-card-mobile h4 {
        font-size: 0.7rem;
        margin: 0;
    }

    .locals-council-counts .latest-poll-card-mobile .poll-value {
        font-size: 0.9rem;
    }
}

/* Current Control Overview Section */
.locals-control-overview {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 1.5rem 0;
}

.locals-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.locals-overview-right {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
}

.locals-overview-right .locals-ticker-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.75rem 0;
}

.locals-overview-right .locals-ticker-grid {
    max-height: 360px;
}

.locals-overview-right .locals-ticker-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.locals-overview-right .locals-ticker-hold {
    opacity: 0.65;
}

.locals-overview-right .locals-ticker-date {
    color: #94a3b8;
}

.locals-overview-right .locals-ticker-ward {
    color: #e2e8f0;
}

.locals-overview-right .locals-ticker-council {
    color: #64748b;
}

.locals-overview-right .locals-ticker-footnote {
    color: #64748b;
}

.locals-overview-right .locals-ticker-filter-btn {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

.locals-overview-right .locals-ticker-filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: transparent;
}

.locals-overview-right .locals-ticker-filter-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
    .locals-overview-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .locals-overview-right {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1.5rem;
    }
}

.locals-control-header {
    text-align: center;
    margin-bottom: 1rem;
}

.locals-control-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: white;
}

.locals-control-subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
}

.locals-control-bar-container {
    max-width: 800px;
    margin: 0 auto 1rem auto;
}

.locals-control-bar {
    display: flex;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.locals-control-bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: flex 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.locals-control-bar-segment:hover {
    filter: brightness(1.1);
}

.locals-control-bar-segment.labour { background: #E4003B; }
.locals-control-bar-segment.conservative { background: #0087DC; }
.locals-control-bar-segment.libdem { background: #FAA61A; }
.locals-control-bar-segment.green { background: #02A95B; }
.locals-control-bar-segment.independent { background: #888888; }
.locals-control-bar-segment.noc { background: #6b7280; }

.locals-control-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Party cards */
.locals-control-card {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    border-left: 4px solid #6b7280;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.locals-control-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.locals-control-card--labour { border-left-color: #E4003B; }
.locals-control-card--conservative { border-left-color: #0087DC; }
.locals-control-card--libdem { border-left-color: #FAA61A; }
.locals-control-card--green { border-left-color: #02A95B; }
.locals-control-card--independent { border-left-color: #888888; }
.locals-control-card--noc { border-left-color: #6b7280; }

.locals-control-card-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.locals-control-card-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.locals-control-card-party {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

.locals-control-card-seats {
    font-size: 0.75rem;
    color: #94a3b8;
}

.locals-control-card-flagships {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 0.35rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Legacy legend dot - keep for detail panel headers */
.locals-control-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.locals-control-legend-dot.labour { background: #E4003B; }
.locals-control-legend-dot.conservative { background: #0087DC; }
.locals-control-legend-dot.libdem { background: #FAA61A; }
.locals-control-legend-dot.green { background: #02A95B; }
.locals-control-legend-dot.independent { background: #888888; }
.locals-control-legend-dot.noc { background: #6b7280; }

.locals-control-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.locals-control-map-link,
.locals-control-postponed-link {
    font-size: 0.8rem;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.locals-control-map-link:hover,
.locals-control-postponed-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.locals-control-postponed-link {
    color: #fbbf24;
}

.locals-control-postponed-link:hover {
    color: #fcd34d;
}

.locals-control-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}


/* Interactive detail panel */
.locals-control-detail {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.locals-control-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.locals-control-detail-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.locals-control-detail-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.locals-control-detail-close:hover {
    color: white;
}

.locals-control-detail-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.locals-control-filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.locals-control-filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.locals-control-filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.locals-control-detail-list {
    max-height: 300px;
    overflow-y: auto;
}

.locals-control-council-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.locals-control-council-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.8rem;
    transition: background 0.15s ease;
}

.locals-control-council-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.locals-control-council-name {
    color: white;
    font-weight: 500;
    flex: 1 0 auto;
}

.locals-control-council-expand {
    color: #64748b;
    font-size: 0.75rem;
    margin-left: auto;
    transition: transform 0.15s ease;
}

.locals-control-council-item:hover .locals-control-council-expand {
    transform: translateX(3px);
    color: #94a3b8;
}

.locals-control-council-type {
    color: #64748b;
    font-size: 0.7rem;
}

.locals-control-council-seats {
    color: #94a3b8;
    font-size: 0.7rem;
}

.locals-control-detail-empty {
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Council breakdown panel */
.locals-council-breakdown {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: slideDown 0.2s ease-out;
}

.locals-council-breakdown-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.locals-council-breakdown-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.locals-council-breakdown-control {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.locals-council-breakdown-control.labour { background: rgba(228, 0, 59, 0.3); color: #fca5a5; }
.locals-council-breakdown-control.conservative { background: rgba(0, 135, 220, 0.3); color: #93c5fd; }
.locals-council-breakdown-control.libdem { background: rgba(250, 166, 26, 0.3); color: #fcd34d; }
.locals-council-breakdown-control.green { background: rgba(2, 169, 91, 0.3); color: #86efac; }
.locals-council-breakdown-control.independent { background: rgba(136, 136, 136, 0.3); color: #d1d5db; }
.locals-council-breakdown-control.noc { background: rgba(107, 114, 128, 0.3); color: #d1d5db; }

.locals-council-breakdown-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0.25rem;
    line-height: 1;
}

.locals-council-breakdown-close:hover {
    color: white;
}

.locals-council-breakdown-bar {
    display: flex;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.locals-breakdown-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    min-width: 0;
}

.locals-breakdown-segment.labour { background: #E4003B; }
.locals-breakdown-segment.conservative { background: #0087DC; }
.locals-breakdown-segment.libdem { background: #FAA61A; }
.locals-breakdown-segment.green { background: #02A95B; }
.locals-breakdown-segment.reform { background: #12B6CF; }
.locals-breakdown-segment.snp { background: #FFF95D; color: #333; }
.locals-breakdown-segment.pc { background: #3F8428; }
.locals-breakdown-segment.independent { background: #888888; }
.locals-breakdown-segment.noc { background: #6b7280; }

.locals-council-breakdown-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.locals-breakdown-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #e2e8f0;
}

.locals-breakdown-legend-item strong {
    color: white;
}

.locals-council-breakdown-total {
    font-size: 0.7rem;
    color: #64748b;
    text-align: right;
}

/* Ward explorer links in council lists */
.locals-ward-explorer-link,
.locals-ward-explorer-link:visited,
.locals-ward-explorer-link:active {
    font-size: 0.65rem;
    color: #64748b !important;
    text-decoration: none;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 3px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    opacity: 0.5;
    margin-left: 0.35rem;
    vertical-align: middle;
    white-space: nowrap;
}

.locals-table tbody tr:hover .locals-ward-explorer-link {
    opacity: 1;
}

.locals-ward-explorer-link:hover {
    background: #2563eb;
    color: #ffffff !important;
    border-color: #2563eb;
}

/* Ward explorer button in breakdown panel */
.locals-ward-explorer-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    background: #2563eb;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}
.locals-ward-explorer-btn:hover {
    background: #1d4ed8;
}

@media (max-width: 640px) {
    .locals-control-overview {
        padding: 1rem 0;
    }

    .locals-control-header h2 {
        font-size: 1.1rem;
    }

    .locals-control-bar {
        height: 32px;
    }

    .locals-control-bar-segment {
        font-size: 0.75rem;
    }

    .locals-control-legend {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.5rem;
    }

    .locals-control-card-count {
        font-size: 1.4rem;
    }

    .locals-control-card-flagships {
        display: none;
    }

    .locals-control-council-grid {
        grid-template-columns: 1fr;
    }

    .locals-control-detail-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .locals-control-filter-btn {
        flex-shrink: 0;
    }
}

.locals-stat-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: #64748b;
}

.locals-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

/* Party-colored stat tiles */
.locals-stat.lab .locals-stat-value,
.locals-stat.lab {
    background-color: rgba(213, 0, 0, 0.08);
    border-left: 4px solid #d50000;
}

.locals-stat.con .locals-stat-value,
.locals-stat.con {
    background-color: rgba(0, 135, 220, 0.08);
    border-left: 4px solid #0087dc;
}

.locals-stat.ld .locals-stat-value,
.locals-stat.ld {
    background-color: rgba(253, 187, 48, 0.08);
    border-left: 4px solid #FDBB30;
}

.locals-stat.green .locals-stat-value,
.locals-stat.green {
    background-color: rgba(0, 128, 102, 0.08);
    border-left: 4px solid #008066;
}

.locals-stat.ref .locals-stat-value,
.locals-stat.ref {
    background-color: rgba(18, 182, 207, 0.08);
    border-left: 4px solid #12B6CF;
}

.locals-stat.snp .locals-stat-value,
.locals-stat.snp {
    background-color: rgba(255, 249, 93, 0.15);
    border-left: 4px solid #FFF95D;
}

.locals-stat.pc .locals-stat-value,
.locals-stat.pc {
    background-color: rgba(63, 132, 40, 0.08);
    border-left: 4px solid #3F8428;
}

.locals-stat.ind .locals-stat-value,
.locals-stat.ind {
    background-color: rgba(107, 114, 128, 0.08);
    border-left: 4px solid #6b7280;
}

.locals-stat.noc .locals-stat-value,
.locals-stat.noc {
    background-color: rgba(148, 163, 184, 0.08);
    border-left: 4px solid #94a3b8;
}

.locals-stat.oth .locals-stat-value,
.locals-stat.oth {
    background-color: rgba(107, 114, 128, 0.08);
    border-left: 4px solid #6b7280;
}

/* Side-by-side charts */
.locals-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.locals-chart-col {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
}

.locals-chart-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.locals-chart-container {
    min-height: 120px;
}

@media (max-width: 640px) {
    .locals-charts-row {
        grid-template-columns: 1fr;
    }
}

.locals-map-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    background: #f8fafc;
}

.locals-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.locals-map-canvas {
    width: 100%;
    min-height: 320px;
}

.locals-map {
    width: 100%;
    height: 100%;
}

.locals-map path {
    stroke: #ffffff;
    stroke-width: 0.7px;
    vector-effect: non-scaling-stroke;
    transition: all 0.2s ease;
}

/* Selected council styling */
.locals-map .selected-council {
    animation: pulse-glow 3s ease-in-out infinite;
}

.locals-map .non-selected-council {
    transition: opacity 0.2s ease;
}

.locals-map .council-path.hovered {
    transform-origin: center;
    animation: none !important;
}

/* Pulsing glow animation - subtle pulse */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        filter: url(#glow-filter);
    }
    50% {
        opacity: 0.92;
        filter: url(#glow-filter);
    }
}

/* Council labels */
.council-label {
    font-family: 'Inter', sans-serif;
    pointer-events: none;
    user-select: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.btn-reset {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.locals-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Collapsible sections for reducing scrolling */
.locals-collapsible-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.locals-collapsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f9fafb;
    border: none;
    width: 100%;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    transition: background 0.15s ease;
    list-style: none;
    user-select: none;
}

.locals-collapsible-summary::-webkit-details-marker {
    display: none;
}

.locals-collapsible-summary:hover {
    background: #f3f4f6;
}

.locals-collapsible-summary i {
    font-size: 0.75rem;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.locals-collapsible-section[open] .locals-collapsible-summary i {
    transform: rotate(180deg);
}

.locals-collapsible-section > *:not(summary) {
    padding: 16px 18px;
}

/* Hide sections by default until content is loaded */
.locals-collapsible-section.locals-hidden {
    display: none;
}

.locals-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #475569;
}

.locals-map-legend i {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.locals-hidden {
    display: none !important;
}

.locals-polling-block {
    margin-top: 1.5rem;
}

.locals-poll-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.locals-poll-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    background: #fff;
}

.locals-poll-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #0f172a;
}

.locals-poll-card ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    font-size: 0.9rem;
}

.locals-projection-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    background: #f8fafc;
}

.locals-projection-card h3 {
    margin-bottom: 0.25rem;
}

.locals-projection-updated {
    font-size: 0.85rem;
    color: #6b7280;
}

.locals-projection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.locals-projection-grid article {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem;
}

/* Battleground Councils Section */
.locals-battleground-header {
    margin-bottom: 2rem;
    text-align: center;
}

.locals-battleground-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.locals-battleground-subtitle {
    color: #64748b;
    font-size: 1rem;
}

.locals-battleground-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.locals-battleground-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    gap: 1rem;
}

.locals-battleground-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.locals-battleground-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: #cbd5e1;
    flex-shrink: 0;
    width: 2.5rem;
    text-align: center;
    line-height: 1.2;
}

.locals-battleground-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.locals-battleground-content h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}

.locals-battleground-name-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #1e3a8a;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease;
}

.locals-battleground-name-btn:hover {
    text-decoration-color: #1e3a8a;
    color: #1e40af;
}

.locals-battleground-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.locals-battleground-margin {
    font-size: 0.85rem;
    color: #64748b;
}


.locals-battleground-reasons {
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.locals-battleground-reasons strong {
    font-size: 0.85rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.locals-battleground-reasons ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.locals-battleground-reasons li {
    font-size: 0.85rem;
    color: #64748b;
    padding-left: 1rem;
    position: relative;
}

.locals-battleground-reasons li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #94a3b8;
}

.locals-battleground-byelections {
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.5rem;
}

.locals-battleground-byelections strong {
    font-size: 0.85rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.locals-battleground-byelections ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.locals-battleground-byelection-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.locals-battleground-byelection-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.locals-battleground-byelection-ward {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.locals-battleground-byelection-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.locals-battleground-byelection-arrow {
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.locals-battleground-byelection-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-left: auto;
    flex-shrink: 0;
}

.locals-battleground-byelections li {
    font-size: 0.8rem;
    color: #64748b;
    padding-left: 0;
    position: relative;
    line-height: 1.4;
}

.locals-battleground-byelections li::before {
    display: none;
}

.locals-battleground-byelections li em {
    color: #94a3b8;
    font-style: italic;
}

.locals-battleground-score {
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.locals-battleground-score strong {
    color: #0f172a;
    font-weight: 600;
}

.locals-battleground-stats {
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.locals-battleground-stat {
    font-size: 0.8rem;
    color: #64748b;
}

.locals-battleground-stat strong {
    color: #0f172a;
    font-weight: 600;
}

.locals-battleground-more {
    margin-top: 1.5rem;
    text-align: center;
}

.locals-battleground-more-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e3a8a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.locals-battleground-more-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e40af;
}

.locals-battleground-more-grid {
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .locals-battleground-grid {
        grid-template-columns: 1fr;
    }
    
    .locals-battleground-card {
        padding: 1.25rem;
    }
    
    .locals-battleground-rank {
        width: 2rem;
        font-size: 1.25rem;
    }
}

.locals-projection-party {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: #94a3b8;
}

.locals-projection-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}

.locals-embed-wrapper {
    margin-top: 1.5rem;
}

.locals-embed-wrapper iframe {
    width: 100%;
    min-height: 560px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

/* Info Panel (Path to No10 style) */
.locals-map-canvas {
    position: relative;
}

/* Map Interaction Hint */
.locals-map-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: rgba(30, 58, 138, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.locals-map-hint.show {
    opacity: 1;
}

.locals-map-hint-icon {
    font-size: 1.1rem;
}

.locals-map-hint-text {
    white-space: nowrap;
}

/* Search Box */
.locals-search-box {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 250px;
}

.locals-search-box input {
    border: none;
    outline: none;
    font-size: 0.9rem;
    padding: 4px 8px;
    flex: 1;
    color: #1f2937;
}

.locals-search-box input::placeholder {
    color: #9ca3af;
}

.locals-search-box button {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
}

.locals-search-box button:hover {
    background: #2563eb;
}

.locals-search-results {
    position: absolute;
    top: 60px;
    left: 20px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.locals-search-results.active {
    display: block;
}

.locals-search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    color: #1f2937;
    transition: background 0.2s;
}

.locals-search-result-item:hover {
    background: #f3f4f6;
}

.locals-search-result-item:last-child {
    border-bottom: none;
}

.locals-info-panel {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 320px;
    max-width: calc(100% - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 3000; /* Raise above search overlays */
    display: none;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    pointer-events: auto; /* Ensure panel content is clickable */
}

.locals-info-panel.active {
    display: block;
    pointer-events: auto; /* Ensure active panel is clickable */
}

.locals-info-close {
    z-index: 3001; /* Ensure close button stays above overlays */
}

.locals-info-panel.active {
    display: block;
}

.locals-info-panel h3 {
    margin: 0 0 12px 0;
    padding-right: 30px;
    font-size: 1.25rem;
    color: #1f2937;
    font-weight: 600;
}

.locals-info-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.locals-info-close:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.locals-party-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.locals-seats-section {
    margin-top: 16px;
}

.locals-seats-section h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.locals-seat-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.locals-seat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.locals-seat-item:last-child {
    border-bottom: none;
}

.locals-seat-party {
    font-weight: 500;
    color: #1f2937;
}

.locals-seat-count {
    color: #6b7280;
}

/* By-election items in info panel and ticker */
.locals-byelection-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.locals-byelection-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.locals-byelection-item:last-child {
    border-bottom: none;
}

.locals-byelection-gain {
    background: #fffbeb;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    border-bottom: none;
}

.locals-byelection-date {
    font-size: 0.7rem;
    color: #64748b;
}

.locals-byelection-ward {
    font-weight: 500;
    font-size: 0.8rem;
}

.locals-byelection-result {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.locals-byelection-gain-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* By-Election Ticker */

.locals-ticker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.locals-ticker-header h2 {
    font-size: 1.3rem;
    margin: 0;
}

.locals-ticker-filter {
    display: flex;
    gap: 0.5rem;
}

.locals-ticker-filter-btn {
    padding: 0.35rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: white;
    font-size: 0.8rem;
    cursor: pointer;
    color: #475569;
    transition: background 0.15s, color 0.15s;
}

.locals-ticker-filter-btn.active {
    background: #1e3a8a;
    color: white;
    border-color: transparent;
}

.locals-ticker-filter-btn:hover:not(.active) {
    background: #f1f5f9;
}

.locals-ticker-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 400px;
    overflow-y: auto;
}

.locals-ticker-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

.locals-ticker-clickable {
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.locals-ticker-clickable:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.locals-overview-right .locals-ticker-clickable:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.locals-ticker-gain {
    border-left: 3px solid #f59e0b;
}

.locals-ticker-hold {
    opacity: 0.75;
}

.locals-ticker-date {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}

.locals-ticker-detail {
    min-width: 0;
}

.locals-ticker-ward {
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.locals-ticker-council {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
}

.locals-ticker-hold-badge {
    font-size: 0.6rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.locals-ticker-footnote {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
}

.locals-ticker-footnote a {
    color: #1e3a8a;
    text-decoration: none;
}

.locals-ticker-footnote a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .locals-ticker-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    .locals-ticker-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .locals-panel-section > .container {
        padding: 0 0.75rem;
    }
    .locals-panel {
        padding: 1rem 0.5rem;
    }
    .locals-table {
        font-size: 0.78rem;
    }
    .locals-table th,
    .locals-table td {
        padding: 0.4rem 0.35rem;
    }
    .locals-table th {
        font-size: 0.7rem;
    }

    .locals-map-canvas {
        min-height: 260px;
    }

    .locals-search-box {
        top: 10px;
        left: 10px;
        min-width: 200px;
    }
    
    .locals-search-results {
        top: 50px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
    
    .locals-info-panel {
        right: 10px;
        left: 10px;
        top: 10px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 100px);
        padding: 16px;
    }

    .locals-poll-card ul {
        grid-template-columns: 1fr;
    }
    
    .locals-map-hint {
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        max-width: calc(100% - 40px);
    }
    
    .locals-map-hint-text {
        white-space: normal;
        text-align: center;
    }
    
    .locals-zoom-controls {
        flex-wrap: wrap;
    }
    
    .locals-zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .council-label {
        font-size: 9px;
    }
}

/* =====================================================
   WEEKLY UPDATE SECTION - Premium Light Theme
   ===================================================== */

/* Weekly Update Section Container */
.weekly-update-section {
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    padding: 20px;
    overflow: hidden;
}

.wu-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.wu-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.wu-header .wu-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

/* Grid Layout */
.wu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Panel Styles */
.wu-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.wu-panel-title {
    font-size: 13px;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wu-panel-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0 0%, transparent 100%);
}

/* Horizontal Bar Chart for 7MA */
.wu-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wu-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wu-bar-item .party-label {
    width: 80px;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    text-align: right;
    flex-shrink: 0;
}

.wu-bar-item .bar-track {
    flex: 1;
    height: 28px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.wu-bar-item .bar-fill {
    height: 100%;
    background: var(--party-color, #808080);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    min-width: 40px;
    transition: width 0.4s ease;
}

.wu-bar-item .bar-value {
    font-size: 12px;
    font-weight: 800;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.wu-bar-item.leader .bar-track {
    height: 34px;
}

.wu-bar-item.leader .bar-value {
    font-size: 14px;
}

.wu-bar-item.leader .party-label {
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
}

/* Lead Indicator */
.wu-lead-indicator {
    margin-top: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(18, 182, 207, 0.08) 0%, rgba(18, 182, 207, 0.03) 100%);
    border: 1px solid rgba(18, 182, 207, 0.2);
    border-radius: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wu-lead-indicator .lead-text {
    font-size: 12px;
    font-weight: 600;
    color: #0e7490;
}

.wu-lead-indicator .lead-value {
    font-size: 18px;
    font-weight: 900;
    color: #1e293b;
}

/* Changes Panel */
.wu-changes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wu-change-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid var(--party-color, #808080);
    border-top: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.wu-change-item .party-name {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.wu-change-item .change-value {
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wu-change-item .change-value.positive { color: #16a34a; }
.wu-change-item .change-value.negative { color: #dc2626; }
.wu-change-item .arrow { font-size: 11px; }

/* Bottom Row: Days Leading & Approvals */
.wu-bottom-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.wu-days-leading-panel {
    flex: 0 0 180px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px 12px;
}

.wu-days-leading-panel .wu-panel-title {
    justify-content: center;
    width: 100%;
    margin-bottom: 8px;
}

.wu-days-leading-panel .big-number {
    font-size: 42px;
    font-weight: 900;
    color: #12B6CF;
    line-height: 1;
}

.wu-days-leading-panel .label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-top: 4px;
    text-transform: uppercase;
}

.wu-days-leading-panel .sublabel {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}

.wu-polls-led-stat {
    margin-top: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.wu-polls-led-stat .stat-value {
    font-size: 18px;
    font-weight: 900;
    color: #1e293b;
}

.wu-polls-led-stat .stat-label {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

/* Approvals Panel */
.wu-approvals-panel {
    flex: 1;
}

.wu-approval-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.wu-approval-card {
    background: white;
    border-radius: 12px;
    padding: 18px 14px;
    border: 1px solid #e2e8f0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wu-approval-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--party-color, #808080);
}

.wu-approval-card .leader-name {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wu-approval-card .net-value {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.wu-approval-card .net-value.negative { color: #dc2626; }
.wu-approval-card .net-value.positive { color: #16a34a; }

/* =====================================================
   LATEST POLLING SECTION - Premium Bar Charts
   ===================================================== */

.latest-polling-section {
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    padding: 20px;
    margin-top: 16px;
}

.lp-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.lp-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.lp-header .lp-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.lp-dual-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.lp-chart-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.lp-chart-title {
    font-size: 14px;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: -0.2px;
}

/* Premium Bar Style */
.lp-bar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.lp-bar-list .bar-track {
    position: relative;
}

.lp-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-bar-item .party-label {
    width: 90px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    text-align: right;
    flex-shrink: 0;
}

.lp-bar-item .bar-track {
    flex: 1;
    height: 32px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: visible;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.lp-bar-item .bar-fill {
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    min-width: 50px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, var(--party-color) 0%, var(--party-color-dark, var(--party-color)) 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.lp-bar-item .bar-value {
    font-size: 13px;
    font-weight: 800;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.lp-bar-item.leader .bar-track {
    height: 40px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), 0 0 0 2px var(--party-color);
}

.lp-bar-item.leader .bar-value {
    font-size: 15px;
}

.lp-bar-item.leader .party-label {
    font-weight: 800;
    color: #1e293b;
}

/* Majority Line */
.majority-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #0f172a;
    z-index: 10;
    border-radius: 2px;
}

.majority-line::before {
    content: '326';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    background: #f8fafc;
    padding: 1px 4px;
    border-radius: 3px;
}

.majority-line[style*="--hide-label"]::before {
    display: none;
}

/* Majority Status Text */
.lp-majority-status {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lp-majority-status.majority {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.lp-majority-status.hung {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.15);
}

/* Party Colors for new sections */
.party-reform { --party-color: #12B6CF; --party-color-dark: #0e9eb5; }
.party-labour { --party-color: #d50000; --party-color-dark: #b30000; }
.party-conservative { --party-color: #0087dc; --party-color-dark: #006bb3; }
.party-libdem { --party-color: #FDBB30; --party-color-dark: #e5a620; }
.party-greens { --party-color: #008066; --party-color-dark: #006652; }
.party-snp { --party-color: #FFF95D; --party-color-dark: #e6e052; }
.party-pc { --party-color: #3F8428; --party-color-dark: #326a20; }
.party-others { --party-color: #808080; --party-color-dark: #666666; }

/* Responsive - Mobile */
@media (max-width: 768px) {
    .weekly-update-section,
    .latest-polling-section { padding: 14px; }
    
    .wu-header h3 { font-size: 18px; }
    .wu-header { margin-bottom: 14px; padding-bottom: 12px; }
    
    .wu-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .wu-panel { padding: 12px; }
    .wu-panel-title { font-size: 12px; margin-bottom: 10px; }
    
    .wu-bar-item .party-label { width: 65px; font-size: 10px; }
    .wu-bar-item .bar-track { height: 24px; }
    .wu-bar-item.leader .bar-track { height: 28px; }
    .wu-bar-item .bar-value { font-size: 11px; }
    
    .wu-bottom-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .wu-days-leading-panel {
        flex: 1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        padding: 12px;
    }
    
    .wu-days-leading-panel .wu-panel-title {
        flex-basis: 100%;
    }
    
    .wu-days-leading-panel .big-number { font-size: 36px; }
    
    .wu-approval-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wu-approval-card {
        padding: 14px 10px;
    }
    
    .wu-approval-card .leader-name { font-size: 11px; }
    .wu-approval-card .net-value { font-size: 22px; }
    
    .lp-dual-charts {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .lp-bar-item .party-label { width: 70px; font-size: 11px; }
    .lp-bar-item .bar-track { height: 28px; }
    .lp-bar-item.leader .bar-track { height: 34px; }
}

@media (max-width: 480px) {
    .wu-approval-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   FEATURED SUBSTACK ARTICLE BANNER
   ============================================ */

.featured-article-banner {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 1.5rem auto;
    max-width: 1200px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.featured-article-banner::before {
    display: none;
}

.featured-article-inner {
    max-width: 100%;
    margin: 0;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.featured-article-content {
    flex: 1;
    min-width: 0;
}

.featured-article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.featured-article-badge i {
    font-size: 10px;
}

.featured-article-title {
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.featured-article-title span {
    color: #1f2937;
}

.featured-article-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
    max-width: 100%;
}

.featured-article-highlights {
    display: none;
}

.featured-highlight {
    display: none;
}

.featured-article-cta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #1e3a8a;
    padding: 10px 18px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: none;
}

.featured-btn:hover {
    background: #f9fafb;
    border-color: #1e3a8a;
    color: #1e3a8a;
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.featured-btn i {
    font-size: 12px;
}

.featured-substack-logo {
    display: none;
}

/* Party color decorative bars - hidden */
.featured-party-bars {
    display: none;
}

.featured-party-bar {
    display: none;
    border-radius: 3px 3px 0 0;
}

.featured-party-bar.con { height: 30px; background: #0087dc; }
.featured-party-bar.lab { height: 38px; background: #d50000; }
.featured-party-bar.ref { height: 50px; background: #12B6CF; }
.featured-party-bar.grn { height: 28px; background: #008066; }
.featured-party-bar.ld { height: 22px; background: #FDBB30; }

/* Bottom party accent stripe */
.featured-bottom-accent {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .featured-article-inner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 16px;
        padding: 16px 20px;
    }
    
    .featured-article-cta {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: flex-start;
    }
    
    .featured-article-title {
        font-size: 16px;
    }
    
    .featured-article-subtitle {
        font-size: 13px;
    }
    
    .featured-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}
