/* Turnout by 2024 presidential lean — self-contained.
   Keep selectors under .ev-lean so the state-hero restyle can merge cleanly.
   Contrast: deep tiles use white text on #002349 / #6b1010 (WCAG-AA).
   Light tiles use #002349 / #5a1010 on pale fills. Signs and labels are text. */

.ev-lean {
    margin: var(--space-lg, 2rem) 0;
    padding: var(--space-md, 1.5rem);
    background: var(--bg-white, #fff);
    border: 1px solid var(--border-color, #d5dbe3);
    border-radius: var(--radius-lg, 12px);
}

.ev-lean h2 {
    margin: 0 0 0.35rem;
    color: var(--brand-primary, #002349);
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    line-height: 1.2;
}

.ev-lean-disclaimer {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--brand-primary, #002349);
}

.ev-lean-note,
.ev-lean-unmatched,
.ev-lean-source,
.ev-lean-cities-note {
    margin: 0 0 0.75rem;
    color: var(--text-secondary, #3a4658);
    font-size: 0.95rem;
}

.ev-lean-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 640px) {
    .ev-lean-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1100px) {
    .ev-lean-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ev-lean-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 13.5rem;
    padding: 1rem 1.05rem 1.1rem;
    border-radius: 14px;
    border: 2px solid transparent;
}

.ev-lean--strong-harris {
    background: #002349;
    color: #fff;
    border-color: #00152b;
}

.ev-lean--lean-harris {
    background: #d7e6ff;
    color: #002349;
    border-color: #9bb6e6;
}

.ev-lean--lean-trump {
    background: #ffd6d6;
    color: #5a1010;
    border-color: #e3a0a0;
}

.ev-lean--strong-trump {
    background: #6b1010;
    color: #fff;
    border-color: #4a0b0b;
}

.ev-lean-kicker {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.92;
}

.ev-lean-label {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.15;
}

.ev-lean-change {
    margin: 0.15rem 0 0;
}

.ev-lean-change-value {
    display: block;
    font-size: clamp(2.1rem, 6vw, 2.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.ev-lean-change-caption {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.ev-lean-change--up .ev-lean-change-value::before {
    content: none;
}

.ev-lean-count {
    margin: 0.15rem 0 0;
}

.ev-lean-count-n {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
}

.ev-lean-count-label {
    font-size: 0.8rem;
}

.ev-lean-bar {
    margin-top: auto;
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.ev-lean--lean-harris .ev-lean-bar,
.ev-lean--lean-trump .ev-lean-bar {
    background: rgba(0, 35, 73, 0.16);
}

.ev-lean-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: currentColor;
}

.ev-lean-cities {
    margin-top: var(--space-md, 1.5rem);
    padding-top: var(--space-sm, 0.75rem);
    border-top: 1px solid var(--border-color, #d5dbe3);
}

.ev-lean-cities h3 {
    margin: 0 0 0.35rem;
    color: var(--brand-primary, #002349);
    font-size: 1.15rem;
}

.ev-lean-cities-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

@media (min-width: 720px) {
    .ev-lean-cities-list {
        grid-template-columns: 1fr 1fr;
    }
}

.ev-lean-cities-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.6rem;
    align-items: baseline;
    padding: 0.55rem 0.7rem;
    background: #f4f7fb;
    border-radius: 8px;
    color: #002349;
}

.ev-lean-city-name {
    font-weight: 700;
}

.ev-lean-city-n {
    font-variant-numeric: tabular-nums;
}

.ev-lean-city-chg {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.ev-lean-source {
    margin: 0.85rem 0 0;
}

.early-vote-card-lean,
.ev-hero-lean {
    margin: 0.35rem 0 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand-primary, #002349);
    line-height: 1.3;
}

.ev-hero--compact .ev-hero-lean {
    margin: 0.15rem 0 0;
}
