/* Fonts are self-hosted; see fonts/fonts.css (linked from the HTML). */

:root {
    /* Civic editorial palette: paper, ink, one deep-blue accent. */
    --primary: #1A5A96;          /* actions, selected states (BC gov blue) */
    --secondary: #B33A1E;        /* the single alert/highlight colour */
    --accent: #1A5A96;           /* kept as alias: legacy rules reference it */
    --success: #2E7D32;
    --warning: #9A6700;
    --background: #FCFBF7;
    --surface: #F5F3EC;
    --surface-light: #EDEAE0;
    --text: #1D1C1A;
    --text-muted: #575757;
    --border: #DDDDD6;
}

[data-theme="dark"] {
    --primary: #7FB2E5;
    --secondary: #E58A70;
    --accent: #7FB2E5;
    --success: #7BC47F;
    --warning: #D4A72C;
    --background: #16181D;
    --surface: #1C1F26;
    --surface-light: #24272F;
    --text: #E8E8E4;
    --text-muted: #A3A39E;
    --border: #34363E;
}

.leaflet-control-attribution { background-color: rgba(255,255,255,0.9) !important; }
[data-theme="dark"] .leaflet-control-attribution { background-color: rgba(22,24,29,0.9) !important; }
[data-theme="dark"] .compare-modal { background: rgba(22,24,29,0.97); }

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

body {
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    z-index: 200;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

header {
    background: var(--background);
    border-bottom: 3px double var(--text);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.hero {
    padding: 4rem 0 3rem;
    background: var(--surface);
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Countdown styles */
.countdown-container {
    display: inline-block;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 4vw, 2.5rem);
}

.countdown-header {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.countdown-units {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    justify-content: center;
    flex-wrap: wrap;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    min-width: 70px;
}

.countdown-number {
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
}

.countdown-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.countdown-date {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.countdown-seconds {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.cta-find {
    display: inline-block;
    background: var(--primary);
    padding: 1rem 2rem;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: opacity 0.3s;
}

.cta-find:hover {
    opacity: 0.9;
}

.why-matters {
    padding: 4rem 0;
}

.why-matters h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.why-matters-intro {
    font-size: clamp(1rem, 2vw, 1.2rem);
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

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

.responsibility-card {
    background: var(--surface);
    border-radius: 4px;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.responsibility-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.responsibility-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.responsibility-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent);
}

.responsibility-desc {
    color: var(--text-muted);
}

.impact-statement {
    background: var(--surface);
    border-radius: 4px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    text-align: center;
}

.impact-statement-text {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 500;
}

.impact-highlight {
    color: var(--accent);
    font-weight: 700;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: left;
}

/* Map styles */
.map-container {
    background: var(--surface);
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    overflow: hidden;
}

#leafletMap {
    height: clamp(300px, 50vh, 600px);
    width: 100%;
    z-index: 1;
}

.map-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
}

/* Leaflet dark theme overrides */
.leaflet-control-zoom a {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
    background-color: var(--surface-light) !important;
}

.leaflet-control-attribution {
    background-color: rgba(21, 27, 59, 0.85) !important;
    color: var(--text-muted) !important;
    font-size: 0.65rem !important;
}

.leaflet-control-attribution a {
    color: var(--accent) !important;
}

.muni-tooltip {
    background: var(--surface) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: 4px !important;
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif !important;
    padding: 0.5rem 0.75rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.muni-tooltip::before {
    border-top-color: var(--surface) !important;
}

.map-label-icon {
    background: none !important;
    border: none !important;
    text-align: center;
}

.municipality-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.muni-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.muni-card:hover,
.muni-card:focus-visible {
    border-color: var(--accent);
    transform: translateY(-5px);
    
}
.muni-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.muni-card.selected {
    border-color: var(--primary);
    background: var(--surface-light);
}

.muni-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.muni-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.muni-type {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.muni-pop {
    font-size: 0.65rem;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    margin-top: 0.35rem;
}

.detail-panel {
    background: var(--surface);
    border-radius: 4px;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid var(--border);
    display: none;
    position: relative;
}

.detail-panel.active {
    display: block;
    animation: slideUp 0.5s ease-out;
}

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

.detail-hero-wrapper {
    margin-bottom: 2rem;
}

.detail-hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    background: var(--surface-light);
}

.detail-hero-credit {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.detail-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.detail-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.incumbent-section {
    background: var(--surface);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.incumbent-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent);
}

.incumbent-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.incumbent-status {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.status-badge.running {
    background: var(--success);
    color: white;
}

.status-badge.not-running {
    background: var(--secondary);
    color: white;
}

.status-badge.undecided {
    background: var(--warning);
    color: var(--background);
}

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

.info-card {
    background: var(--surface-light);
    border-radius: 4px;
    padding: 2rem;
    border-left: 4px solid var(--primary);
}

.info-card-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.info-card-content {
    font-size: 1.1rem;
}

.unique-features {
    background: var(--surface);
    border-radius: 4px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border);
}

.unique-features-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.cta-button {
    display: inline-block;
    background: var(--primary);
    padding: 1rem 2rem;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-top: 2rem;
}

.cta-button:hover {
    opacity: 0.9;
}

.placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

footer {
    background: var(--surface);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

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

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-section p, .footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

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


.legal-disclaimer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.7;
    opacity: 0.8;
}

.legal-disclaimer a {
    color: var(--accent);
    text-decoration: none;
}

.legal-disclaimer a:hover {
    text-decoration: underline;
}

.quote-section {
    background: var(--surface-light);
    border-radius: 4px;
    padding: 1.75rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent);
    position: relative;
}

.quote-section::before {
    content: "\201C";
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.3;
    position: absolute;
    top: 0.25rem;
    left: 0.75rem;
    line-height: 1;
}

.quote-text {
    font-style: italic;
    color: var(--text);
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.quote-source {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-left: 1.5rem;
}

.quote-source a {
    color: var(--accent);
    text-decoration: none;
}

.quote-source a:hover {
    text-decoration: underline;
}

.achievements-section {
    background: var(--surface);
    border-radius: 4px;
    padding: 1.75rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.achievements-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--success);
}

.achievements-list {
    list-style: none;
    padding: 0;
}

.achievements-list li {
    color: var(--text-muted);
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.achievements-list li::before {
    content: "\2713";
    color: var(--success);
    font-weight: 700;
    position: absolute;
    left: 0;
}

.achievements-list a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
}

.achievements-list a:hover {
    text-decoration: underline;
}

/* Categorized achievements */
.achievements-category {
    margin-bottom: 1.25rem;
}
.achievements-category:last-child { margin-bottom: 0; }
.category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.category-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}
.category-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}
.category-items { list-style: none; padding: 0; }
.category-items li {
    color: var(--text-muted);
    padding: 0.3rem 0 0.3rem 2rem;
    position: relative;
    font-size: 0.9rem;
}
.category-items li::before {
    content: "\2713";
    color: var(--success);
    font-weight: 700;
    position: absolute;
    left: 0.5rem;
}
.category-items a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
}
.category-items a:hover { text-decoration: underline; }
/* Challenges section (amber) */
.challenges-section {
    background: var(--surface);
    border-radius: 4px;
    padding: 1.75rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}
.challenges-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--warning);
}
.challenges-category {
    margin-bottom: 1.25rem;
}
.challenges-category:last-child { margin-bottom: 0; }
.challenges-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.challenges-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}
.challenges-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--warning);
}
.challenges-items { list-style: none; padding: 0; }
.challenges-items li {
    color: var(--text-muted);
    padding: 0.3rem 0 0.3rem 2rem;
    position: relative;
    font-size: 0.9rem;
}
.challenges-items li::before {
    content: "\26A0";
    color: var(--warning);
    font-weight: 700;
    position: absolute;
    left: 0.5rem;
}
.challenges-items a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
}
.challenges-items a:hover { text-decoration: underline; }

/* Key Statistics */
.stats-section {
    margin: 2rem 0;
}
.stats-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
    background: var(--surface-light);
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
}
.stat-icon {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}
.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.2rem;
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}
.stat-source {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Map legend */
.map-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 1rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
}

/* Indigenous name — displayed beside English name */
.indigenous-name {
    font-style: italic;
    color: var(--accent);
    opacity: 0.85;
    font-size: clamp(0.85rem, 2vw, 1rem);
    display: inline;
}
.detail-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.detail-title-row .detail-title {
    margin: 0;
}

.no-update-message {
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
    background: var(--surface-light);
    border-radius: 4px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .countdown-seconds { display: none; }
}

/* Language selector */
.lang-selector select {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 2rem 0.4rem 0.6rem;
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238B93B0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}
.lang-selector select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Theme toggle & zoom controls */
.nav-controls { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    min-width: 40px;
    min-height: 40px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; }

@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        padding: 0.75rem 0;
        row-gap: 0.5rem;
    }
    .logo {
        flex: 1 1 100%;
        text-align: center;
        font-size: 1.15rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .nav-controls {
        flex: 1 1 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Indigenous language notice */
.indigenous-notice {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}
.indigenous-notice.show { display: block; }
.indigenous-notice strong { color: var(--accent); }

.translating-indicator {
    display: none;
    text-align: center;
    padding: 0.6rem 1rem;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--surface);
    border-radius: 4px;
    animation: pulse-fade 1.5s ease-in-out infinite;
}
.translating-indicator.show { display: block; }
@keyframes pulse-fade {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Solidarity statement */
.solidarity {
    background: var(--surface);
    border-top: 3px solid #E67E22;
    border-bottom: 3px solid #E67E22;
    padding: clamp(2rem, 4vw, 3rem) 0;
}
.solidarity-inner {
    max-width: 860px;
    margin: 0 auto;
}
.solidarity-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.solidarity-heart { font-size: 1.75rem; }
.solidarity h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: #C05621;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}
.solidarity p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.85;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}
.solidarity .solidarity-opening {
    color: var(--text);
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 500;
    font-style: italic;
}
.solidarity-ecm {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #E67E22;
    margin: 1.75rem 0;
    text-align: center;
}
.solidarity-support {
    background: var(--surface);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border);
}
.solidarity-support p { margin-bottom: 0.4rem; font-size: 0.95rem; }
.solidarity-support strong { color: var(--text); }
.solidarity-support a {
    color: var(--accent);
    text-decoration: none;
}
.solidarity-support a:hover { text-decoration: underline; }
.solidarity-reconciliation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem !important;
    color: var(--text-muted);
    font-style: italic;
}

/* Feedback section */
.feedback-section { padding: 4rem 0 2rem; }
.feedback-container {
    background: var(--surface);
    border-radius: 4px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--border);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.feedback-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent);
}
.feedback-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}
.feedback-prompt { margin-bottom: 1rem; color: var(--text); }
.feedback-options {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.feedback-btn {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.85rem 1.25rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
}
.feedback-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.feedback-btn.selected {
    border-color: var(--success);
    background: rgba(0, 200, 150, 0.1);
    pointer-events: none;
}
.feedback-thanks {
    display: none;
    color: var(--success);
    font-weight: 600;
    font-size: 1.05rem;
    margin: 1rem 0;
}
.feedback-thanks.show {
    display: block;
    animation: slideUp 0.4s ease-out;
}
.feedback-detail-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}
.feedback-detail-link:hover { text-decoration: underline; }

/* Privacy footer */
.privacy-notice {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}
.last-updated {
    margin-top: 1rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.6;
}
.visitor-counter {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.8;
}

[dir="rtl"] .quote-section::before { left: auto; right: 0.75rem; }
[dir="rtl"] .quote-text, [dir="rtl"] .quote-source { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .info-card { border-left: none; border-right: 4px solid var(--primary); }
[dir="rtl"] .achievements-list li { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .achievements-list li::before { left: auto; right: 0; }
[dir="rtl"] .status-badge { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .solidarity-header { flex-direction: row-reverse; }
[dir="rtl"] .lang-selector select {
    background-position: left 0.5rem center;
    padding: 0.4rem 0.6rem 0.4rem 2rem;
}

/* CTA button row (polling + elections) */
.cta-button-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.cta-button-row .cta-button { margin-top: 0; }
.cta-button-secondary {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--accent);
    padding: 1rem 2rem;
    border-radius: 4px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}
.cta-button-secondary:hover {
    background: rgba(26, 90, 150, 0.07);
}

/* Calendar buttons */
.calendar-btn {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--accent);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    margin-top: 1rem;
    transition: all 0.3s;
}
.calendar-btn:hover {
    background: rgba(26, 90, 150, 0.07);
}
.calendar-btn-small {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.6rem 0.75rem;
    min-height: 36px;
    border-radius: 4px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    transition: all 0.3s;
}
.calendar-btn-small:hover {
    border-color: var(--accent);
    background: rgba(26, 90, 150, 0.07);
}

/* Candidates section */
.candidates-section {
    background: var(--surface);
    border-radius: 4px;
    padding: 2rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}
.candidates-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent);
}
.candidates-empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}
.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.candidate-card {
    background: var(--surface-light);
    border-radius: 4px;
    padding: 1rem;
    border: 1px solid var(--border);
}
.candidate-card-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.candidate-card-position {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}
.candidate-card-party {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.candidate-card-incumbent {
    display: inline-block;
    background: var(--warning);
    color: var(--background);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-top: 0.35rem;
}
.candidate-card-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
}
.candidate-card-link:hover { text-decoration: underline; }

/* Postal code search */
.postal-search {
    max-width: 480px;
    margin: 0 auto 2rem;
    text-align: center;
}
.postal-search-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.postal-search-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}
.postal-input {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.6rem 1rem;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
    text-transform: uppercase;
    width: 160px;
    text-align: center;
}
.postal-input:focus {
    outline: none;
    border-color: var(--accent);
}
.postal-btn {
    background: var(--primary);
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1.25rem;
    color: white;
    font-weight: 600;
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.3s;
}
.postal-btn:hover { opacity: 0.9; }
.postal-result {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface-light);
    border-radius: 4px;
    font-size: 0.9rem;
    display: none;
}
.postal-result.show { display: block; }
.postal-match-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    color: var(--accent);
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    margin: 0.25rem;
    transition: all 0.3s;
}
.postal-match-btn:hover {
    background: rgba(26, 90, 150, 0.07);
}

/* Compare mode */
.compare-toggle-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem 1.25rem;
    color: var(--text-muted);
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.3s;
}
.compare-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.compare-toggle-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(26, 90, 150, 0.07);
}
.muni-card.compare-selected {
    border-color: var(--accent) !important;
    
    position: relative;
}
.muni-card.compare-selected::after {
    content: "\2713";
    position: absolute;
    top: 4px;
    right: 6px;
    background: var(--accent);
    color: var(--background);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.compare-floating {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 90;
    display: none;
    transition: transform 0.3s;
}
.compare-floating.show { display: block; }
.compare-floating:hover { transform: translateY(-2px); }
.compare-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 39, 0.95);
    z-index: 150;
    display: none;
    overflow-y: auto;
    padding: 2rem;
}
.compare-modal.show { display: block; }
.compare-modal-inner {
    max-width: 900px;
    margin: 0 auto;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
    overscroll-behavior: contain;
}
#compareTableContainer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.compare-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.compare-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}
.compare-modal-close {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    color: var(--text);
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
}
.compare-modal-close:hover { border-color: var(--accent); }
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.compare-table th, .compare-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.compare-table th {
    background: var(--surface);
    color: var(--accent);
    font-weight: 600;
    position: sticky;
    top: 0;
}
.compare-table td:first-child {
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.compare-table tr:hover td { background: rgba(26, 90, 150, 0.07); }
.compare-remove-btn {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    padding: 0.4rem 0.5rem;
    min-width: 28px;
    min-height: 28px;
}

/* Universal focus-visible styles for all interactive elements */
.feedback-btn:focus-visible,
.calendar-btn:focus-visible,
.calendar-btn-small:focus-visible,
.postal-btn:focus-visible,
.postal-match-btn:focus-visible,
.compare-toggle-btn:focus-visible,
.compare-floating:focus-visible,
.compare-modal-close:focus-visible,
.compare-remove-btn:focus-visible,
.cta-button:focus-visible,
.cta-button-secondary:focus-visible,
.feedback-detail-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.postal-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
}

@media (max-width: 600px) {
    .compare-table { font-size: 0.75rem; }
    .compare-table th, .compare-table td { padding: 0.5rem; }
}
[dir="rtl"] .compare-table th, [dir="rtl"] .compare-table td { text-align: right; }
[dir="rtl"] .cta-button-row { flex-direction: row-reverse; }
[dir="rtl"] .postal-search-row { flex-direction: row-reverse; }
[dir="rtl"] .candidate-card-incumbent { margin-left: 0; margin-right: 0; }

/* Percentile bars on stat cards */
.stat-percentile { height: 4px; border-radius: 2px; background: var(--surface); margin-top: 0.4rem; overflow: hidden; }
.stat-percentile-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.stat-rank { font-size: 0.6rem; color: var(--text-muted); margin-top: 0.2rem; }


/* 5-column stats grid */
@media (min-width: 901px) {
    .stats-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Map controls for choropleth */
.map-controls { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 1rem; flex-wrap: wrap; justify-content: center; }
.map-controls label { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.map-controls select {
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
    border-radius: 6px; padding: 0.4rem 0.75rem; font-size: 0.8rem;
    font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif; cursor: pointer;
}
.map-controls select:focus { border-color: var(--accent); outline: none; }
.map-legend-gradient {
    display: flex; align-items: center; gap: 0.5rem; justify-content: center;
    padding: 0.4rem 1rem; font-size: 0.7rem; color: var(--text-muted);
}
.map-legend-gradient .gradient-bar {
    width: 120px; height: 10px; border-radius: 2px; display: inline-block;
}

/* Comparison bar wrappers */
.compare-bar-wrapper { position: relative; min-width: 80px; }
.compare-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: rgba(26, 90, 150, 0.07); transition: width 0.4s ease; }
.compare-value { position: relative; z-index: 1; }

/* Radar chart */
.radar-chart-container { display: flex; justify-content: center; margin: 1rem 0; }
.radar-chart-container svg text { font-family: 'BC Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif; }

/* Honour reduced-motion preference for all animation and transitions */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Key dates & how to vote */
.key-dates {
    padding: 3rem 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.key-dates-intro {
    text-align: center;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 2rem;
}
.key-dates-list {
    list-style: none;
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
}
.key-date-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
}
.key-date-item-highlight {
    border-left-color: var(--secondary);
    border-color: var(--secondary);
}
.key-date-when {
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
}
.key-date-item-highlight .key-date-when { color: var(--secondary); }
.key-date-what { color: var(--text); }
.key-date-link {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}
.key-date-link:hover { text-decoration: underline; }
.key-dates-eligibility {
    max-width: 720px;
    margin: 1.5rem auto 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}
.key-dates-source {
    max-width: 720px;
    margin: 1rem auto 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.key-dates-source a { color: var(--accent); }

.candidates-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* About */
.about-section {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}
.about-section .container { max-width: 720px; }
.about-text {
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1rem;
}
.about-contact {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Election news */
.news-section {
    padding: 3rem 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.news-intro {
    text-align: center;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 1.5rem;
}
.news-list {
    list-style: none;
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
}
.news-item {
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.news-item-title {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}
.news-item-title:hover { color: var(--accent); text-decoration: underline; }
.news-item-meta {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.news-updated {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
/* Per-municipality news inside the detail panel */
.muni-news {
    background: var(--surface-light);
    border-radius: 4px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}
.muni-news-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--accent);
}
.muni-news .news-item { background: var(--surface); }

/* Candidacy updates: automated who-is-running signals inside the
   candidates section */
.candidacy-updates {
    background: var(--surface-light);
    border-left: 3px solid var(--secondary);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
}
.candidacy-updates-title {
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--secondary);
}
.candidacy-updates-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.candidacy-updates .news-item { background: var(--surface); }

/* ===== Civic editorial layer ===== */
h1, h2, h3,
.section-title,
.detail-title,
.hero h1,
.why-matters h2,
.feedback-title,
.solidarity-title,
.muni-name {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

.logo {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
}

.hero {
    text-align: left;
    padding: 3.5rem 0 2.5rem;
}
.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    line-height: 1.15;
    max-width: 26ch;
    margin-bottom: 1rem;
    color: var(--text);
}
.hero-subtitle {
    max-width: 62ch;
    margin: 0 0 1.5rem;
    font-size: 1.05rem;
}

/* One-line countdown replaces the widget */
.countdown-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    max-width: 720px;
    font-variant-numeric: tabular-nums;
}
.countdown-line strong { font-weight: 600; }
.countdown-line .countdown-remaining { color: var(--text-muted); }

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

/* Flatten the grid cards: text-first tiles */
.muni-card {
    background: var(--background);
    border: 1px solid var(--border);
    padding: 0.9rem 1rem;
    text-align: left;
}
.muni-card:hover,
.muni-card:focus-visible {
    transform: none;
    border-color: var(--primary);
}
.muni-card:hover .muni-name { text-decoration: underline; }
.muni-name { font-size: 1.05rem; }
.muni-type, .muni-pop { font-size: 0.8rem; color: var(--text-muted); display: inline; }
.muni-type::after { content: " \00b7 "; }

/* Buttons: flat, single radius */
.cta-find, .calendar-btn, .postal-btn, .compare-toggle-btn, .compare-floating {
    border-radius: 4px;
    font-weight: 500;
}
.cta-find { background: var(--primary); color: #fff; }

/* Links get the accent; text stays ink */
a { color: var(--primary); }

/* Quieter feedback + news cards */
.news-item, .key-date-item, .candidate-card {
    background: var(--background);
}

/* ===== Editorial texture layer ===== */

/* Kicker above the hero headline */
.hero-kicker {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 0.9rem;
}

/* Big serif numerals in the countdown line */
.countdown-remaining { font-size: 1.05rem; }
.countdown-remaining strong {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    padding: 0 0.1em;
}

/* Section titles: short accent bar device */
.section-title::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    background: var(--secondary);
    margin-bottom: 0.8rem;
}
.news-section .container > .section-title,
.key-dates .container > .section-title { margin-top: 0.5rem; }

/* Municipality tiles: structured, with race-status tags */
.muni-card { padding: 1rem 1.1rem 0.9rem; }
.muni-name { display: block; margin-bottom: 0.15rem; }
.muni-status-tag {
    display: inline-block;
    margin-top: 0.55rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 2px;
}
.muni-status-tag.status-running { background: rgba(46, 125, 50, 0.12); color: var(--success); }
.muni-status-tag.status-open { background: rgba(179, 58, 30, 0.12); color: var(--secondary); }
.muni-status-tag.status-undecided { background: var(--surface-light); color: var(--text-muted); }
[data-theme="dark"] .muni-status-tag.status-running { background: rgba(123, 196, 127, 0.15); }
[data-theme="dark"] .muni-status-tag.status-open { background: rgba(229, 138, 112, 0.15); }

/* Editorial links: underlined in running text */
.legal-disclaimer a, .privacy-notice a, .key-dates-source a,
.news-item-title, .quote-source a, .footer-section a {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

/* Footer: strong top rule */
footer { border-top: 3px double var(--text); }

/* Solidarity: warm tinted band with stronger frame */
.solidarity { border-top: 4px solid #C05621; }

/* GOV.UK-style action panel */
.action-panel {
    background: var(--primary);
    color: #fff;
    padding: 1.5rem 1.75rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    max-width: 720px;
}
[data-theme="dark"] .action-panel { background: #1E4976; }
.action-panel-lead {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}
.action-panel-btn {
    display: inline-block;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    padding: 0.7rem 1.3rem;
    border-radius: 4px;
    text-decoration: none;
}
.action-panel-btn:hover { background: var(--surface-light); text-decoration: underline; }
[data-theme="dark"] .action-panel-btn { color: #1E4976; }
[data-theme="dark"] .action-panel-btn:hover { background: #E8E8E4; }

/* Visible language links (vote.gov pattern) */
.lang-strip {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.lang-strip .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.4rem;
    padding: 0.45rem 20px;
}
.lang-strip-link {
    background: none;
    border: none;
    padding: 0.15rem 0;
    cursor: pointer;
    color: var(--primary);
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.lang-strip-link:hover { color: var(--text); }
.lang-strip-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.dead-link { color: var(--text-muted); font-size: 0.85em; }

/* Schematic map: no base tiles, polygons on paper */
#leafletMap.leaflet-container {
    background: var(--surface);
}
.map-label-icon span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 0 4px var(--surface), 0 0 4px var(--surface);
}
.map-label-small span { font-size: 10px; font-weight: 500; color: var(--text-muted); }
.leaflet-control-zoom a {
    background: var(--background) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* ===== Interaction-standards layer ===== */

/* Anchor targets clear the sticky header instead of hiding under it */
#municipalities, #key-dates, #feedback, #newsSection, #detailPanel {
    scroll-margin-top: 5rem;
}

/* Remove double-tap zoom delay quirks on controls; keep pinch zoom on content */
a, button, select, input, .muni-card {
    touch-action: manipulation;
}

@media (max-width: 600px) {
    /* Header scrolls away on small screens instead of consuming the viewport */
    header { position: static; }
    #municipalities, #key-dates, #feedback, #newsSection, #detailPanel {
        scroll-margin-top: 1rem;
    }

    /* Form controls at 16px so iOS does not auto-zoom on focus */
    select, input, textarea { font-size: 16px !important; }

    /* Language strip: single scrollable chip row with real tap targets */
    .lang-strip .container {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0 1.25rem;
    }
    .lang-strip .container::-webkit-scrollbar { display: none; }
    .lang-strip-link {
        font-size: 0.95rem;
        padding: 0.65rem 0.15rem;
        white-space: nowrap;
    }

    /* Schematic map: hide the small-village labels that collide at phone zoom */
    .map-label-small { display: none; }

    /* Modal fills the screen edge-to-edge */
    .compare-modal { padding: 0.75rem; }
    .compare-modal-inner { padding: 1rem; }
}

/* Inline notice replacing alert() dialogs */
.compare-notice {
    display: none;
    margin: 0.75rem auto 0;
    max-width: 480px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--secondary);
}
.compare-notice.show { display: block; }
