/**
 * PathTo270 Map - Frontend & Elementor Styles
 * Scoped under .em2028-root to prevent WordPress theme & Elementor Free conflicts.
 */

.em2028-root {
    /* Default Aesthetic CSS Custom Properties (Overridable via WP Admin or Elementor Widget) */
    --em2028-bg-card: #0f172a;
    --em2028-bg-panel: #1e293b;
    --em2028-bg-panel-hover: #334155;
    --em2028-bg-map: #0b1120;
    --em2028-text-main: #f8fafc;
    --em2028-text-muted: #94a3b8;
    --em2028-border-card: rgba(148, 163, 184, 0.18);
    --em2028-radius-card: 16px;
    --em2028-radius-inner: 10px;
    --em2028-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Title & Badge Custom Properties */
    --em2028-title-size: 24px;
    --em2028-title-color: var(--em2028-text-main);
    --em2028-badge-bg: linear-gradient(135deg, var(--em2028-dem-safe), var(--em2028-rep-safe));
    --em2028-badge-color: #ffffff;

    /* Party Colors - Dem */
    --em2028-dem-safe: #1d4ed8;
    --em2028-dem-likely: #3b82f6;
    --em2028-dem-lean: #60a5fa;
    --em2028-dem-tilt: #93c5fd;

    /* Party Colors - Rep */
    --em2028-rep-safe: #b91c1c;
    --em2028-rep-likely: #ef4444;
    --em2028-rep-lean: #f87171;
    --em2028-rep-tilt: #fca5a5;

    /* Toss-up */
    --em2028-tossup: #475569;
    --em2028-tossup-hover: #64748b;

    /* Uniform Map Vector Border & Hover Styling */
    --em2028-state-stroke: #0f172a;
    --em2028-state-stroke-width: 1.25px;
    --em2028-state-hover-stroke: #0f172a;
    --em2028-state-hover-stroke-width: 1.25px;

    /* Map State Abbreviations & Electoral Number Typography */
    --em2028-map-label-font: var(--em2028-font-family);
    --em2028-state-code-size: 11px;
    --em2028-state-code-weight: 800;
    --em2028-state-ev-size: 9.5px;
    --em2028-state-ev-weight: 700;
    --em2028-state-label-color: #ffffff;
    --em2028-state-label-stroke: rgba(15, 23, 42, 0.78);
    --em2028-state-label-stroke-width: 2.5px;

    --em2028-bar-height: 38px;
    --em2028-shadow-card: 0 20px 50px rgba(0, 0, 0, 0.35);

    box-sizing: border-box;
    font-family: var(--em2028-font-family);
    color: var(--em2028-text-main);
    background: var(--em2028-bg-card);
    border: 1px solid var(--em2028-border-card);
    border-radius: var(--em2028-radius-card);
    box-shadow: var(--em2028-shadow-card);
    padding: 24px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.em2028-root *,
.em2028-root *::before,
.em2028-root *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Built-in Aesthetic Theme Presets */
.em2028-root[data-theme="light"] {
    --em2028-bg-card: #ffffff;
    --em2028-bg-panel: #f1f5f9;
    --em2028-bg-panel-hover: #e2e8f0;
    --em2028-bg-map: #f8fafc;
    --em2028-text-main: #0f172a;
    --em2028-text-muted: #64748b;
    --em2028-border-card: #e2e8f0;
    --em2028-tossup: #cbd5e1;
    --em2028-tossup-hover: #94a3b8;
    --em2028-state-stroke: #ffffff;
    --em2028-state-hover-stroke: #ffffff;
    --em2028-shadow-card: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.em2028-root[data-theme="editorial"] {
    --em2028-bg-card: #faf8f5;
    --em2028-bg-panel: #f0ece1;
    --em2028-bg-panel-hover: #e5dfd0;
    --em2028-bg-map: #f5f2eb;
    --em2028-text-main: #1c1917;
    --em2028-text-muted: #57534e;
    --em2028-border-card: #d6d3d1;
    --em2028-dem-safe: #1e40af;
    --em2028-dem-likely: #3b82f6;
    --em2028-dem-lean: #60a5fa;
    --em2028-dem-tilt: #93c5fd;
    --em2028-rep-safe: #991b1b;
    --em2028-rep-likely: #dc2626;
    --em2028-rep-lean: #f87171;
    --em2028-rep-tilt: #fca5a5;
    --em2028-tossup: #d6d3cd;
    --em2028-tossup-hover: #a8a29e;
    --em2028-state-stroke: #faf8f5;
    --em2028-state-hover-stroke: #faf8f5;
    --em2028-shadow-card: 0 8px 24px rgba(28, 25, 23, 0.07);
}

.em2028-root[data-theme="midnight"] {
    --em2028-bg-card: #090d16;
    --em2028-bg-panel: #111827;
    --em2028-bg-panel-hover: #1f2937;
    --em2028-bg-map: #060911;
    --em2028-text-main: #f9fafb;
    --em2028-text-muted: #9ca3af;
    --em2028-border-card: rgba(99, 102, 241, 0.22);
    --em2028-dem-safe: #2563eb;
    --em2028-rep-safe: #e11d48;
    --em2028-tossup: #374151;
    --em2028-state-stroke: #090d16;
    --em2028-state-hover-stroke: #090d16;
}

/* Elementor Free Reset Overrides */
.em2028-root button.em2028-btn {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--em2028-border-card);
    background: var(--em2028-bg-panel);
    color: var(--em2028-text-main);
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    line-height: 1.2;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: none;
    outline: none;
}

.em2028-root button.em2028-btn:hover {
    background: var(--em2028-bg-panel-hover);
    transform: translateY(-1px);
}

.em2028-root button.em2028-btn.is-active {
    background: var(--em2028-text-main);
    color: var(--em2028-bg-card);
    border-color: var(--em2028-text-main);
}

/* Header & Fully Customizable Title + Badge Bar */
.em2028-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--em2028-border-card);
}

.em2028-title-group h2.em2028-title {
    margin: 0;
    font-size: var(--em2028-title-size);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--em2028-title-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.em2028-badge-live {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--em2028-badge-bg);
    color: var(--em2028-badge-color);
    line-height: 1.4;
}

.em2028-subtitle {
    margin: 4px 0 0;
    font-size: 13.5px;
    color: var(--em2028-text-muted);
}

.em2028-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Electoral College Scoreboard & Win/Lose Thermometer Bar */
.em2028-scoreboard {
    background: var(--em2028-bg-panel);
    border: 1px solid var(--em2028-border-card);
    border-radius: var(--em2028-radius-inner);
    padding: 18px 20px 22px;
    margin-bottom: 18px;
    position: relative;
}

.em2028-candidates-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.em2028-candidate {
    display: flex;
    align-items: center;
    gap: 14px;
}

.em2028-candidate.is-rep {
    flex-direction: row-reverse;
    text-align: right;
}

.em2028-cand-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.em2028-candidate.is-dem .em2028-cand-avatar {
    background: linear-gradient(135deg, var(--em2028-dem-likely), var(--em2028-dem-safe));
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.em2028-candidate.is-rep .em2028-cand-avatar {
    background: linear-gradient(135deg, var(--em2028-rep-likely), var(--em2028-rep-safe));
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.em2028-cand-info {
    display: flex;
    flex-direction: column;
}

.em2028-cand-name-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
}

.em2028-candidate.is-rep .em2028-cand-name-wrap {
    flex-direction: row-reverse;
}

.em2028-cand-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--em2028-text-main);
}

/* Gold Tick Icon for Projected Winner (replaces green pill text) */
.em2028-gold-tick {
    display: none;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.45));
    animation: em2028GoldPulse 2s infinite ease-in-out;
}

.em2028-gold-tick svg {
    width: 100%;
    height: 100%;
    display: block;
}

.em2028-candidate.is-winner .em2028-gold-tick {
    display: inline-flex;
}

@keyframes em2028GoldPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.em2028-cand-meta {
    font-size: 12px;
    color: var(--em2028-text-muted);
    margin-top: 2px;
}

.em2028-cand-ev {
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    margin: 0 4px;
    font-variant-numeric: tabular-nums;
}

.em2028-candidate.is-dem .em2028-cand-ev {
    color: var(--em2028-dem-likely);
}

.em2028-root[data-theme="light"] .em2028-candidate.is-dem .em2028-cand-ev,
.em2028-root[data-theme="editorial"] .em2028-candidate.is-dem .em2028-cand-ev {
    color: var(--em2028-dem-safe);
}

.em2028-candidate.is-rep .em2028-cand-ev {
    color: var(--em2028-rep-likely);
}

.em2028-root[data-theme="light"] .em2028-candidate.is-rep .em2028-cand-ev,
.em2028-root[data-theme="editorial"] .em2028-candidate.is-rep .em2028-cand-ev {
    color: var(--em2028-rep-safe);
}

.em2028-center-status {
    text-align: center;
    padding: 0 12px;
}

.em2028-tossup-counter {
    font-size: 12.5px;
    color: var(--em2028-text-muted);
    font-weight: 700;
}

/* Thermometer Bar Track */
.em2028-bar-outer {
    position: relative;
    padding-top: 6px;
}

.em2028-bar-track {
    height: var(--em2028-bar-height);
    width: 100%;
    background: var(--em2028-tossup);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    position: relative;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.em2028-bar-seg {
    height: 100%;
    transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 800;
    color: #ffffff;
    overflow: hidden;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    position: relative;
}

.em2028-bar-seg.seg-dem-safe   { background: var(--em2028-dem-safe); }
.em2028-bar-seg.seg-dem-likely { background: var(--em2028-dem-likely); }
.em2028-bar-seg.seg-dem-lean   { background: var(--em2028-dem-lean); }
.em2028-bar-seg.seg-dem-tilt   { background: var(--em2028-dem-tilt); color: #0f172a; text-shadow: none; }

.em2028-bar-seg.seg-tossup {
    background: var(--em2028-tossup);
    color: #f8fafc;
}

.em2028-root[data-theme="light"] .em2028-bar-seg.seg-tossup,
.em2028-root[data-theme="editorial"] .em2028-bar-seg.seg-tossup {
    color: #1e293b;
    text-shadow: none;
}

.em2028-bar-seg.seg-rep-tilt   { background: var(--em2028-rep-tilt); color: #0f172a; text-shadow: none; }
.em2028-bar-seg.seg-rep-lean   { background: var(--em2028-rep-lean); }
.em2028-bar-seg.seg-rep-likely { background: var(--em2028-rep-likely); }
.em2028-bar-seg.seg-rep-safe   { background: var(--em2028-rep-safe); }

/* Pinned In-Bar EV Totals Overlay (Ensures EV numbers & gold tick always stay crisp inside bar on mobile) */
.em2028-bar-totals-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
    font-variant-numeric: tabular-nums;
}

.em2028-bar-side-num {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.em2028-bar-side-num .em2028-gold-tick {
    width: 17px;
    height: 17px;
}

.em2028-bar-side-num.is-winner .em2028-gold-tick {
    display: inline-flex;
}

/* Midpoint Marker Line */
.em2028-270-marker {
    position: absolute;
    left: 50.185%;
    top: 0;
    bottom: -6px;
    width: 3px;
    background: #fbbf24;
    z-index: 5;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.65);
    pointer-events: none;
}

.em2028-270-marker::before {
    content: '▼';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #fbbf24;
    line-height: 1;
}

/* Interactive Toolbar: Dem / Toss-Up / Rep Choices */
.em2028-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--em2028-bg-panel);
    border-radius: var(--em2028-radius-inner);
    border: 1px solid var(--em2028-border-card);
}

.em2028-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.em2028-toolbar-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--em2028-text-muted);
    margin-right: 4px;
}

/* Choice Swatch Buttons (Dem / Toss-Up / Rep) */
.em2028-brush-btn {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--em2028-bg-card);
    color: var(--em2028-text-main);
    transition: all 0.15s ease;
    outline: none;
}

.em2028-brush-btn:hover {
    transform: translateY(-1px);
}

.em2028-brush-btn.is-selected {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25);
}

.em2028-swatch-dot {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Centered Map Workspace + Below-Map Elements */
.em2028-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 16px;
}

/* Centered Map Stage */
.em2028-map-stage {
    background: var(--em2028-bg-map);
    border: 1px solid var(--em2028-border-card);
    border-radius: var(--em2028-radius-inner);
    padding: 18px 24px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.em2028-svg {
    width: 100%;
    max-width: 980px;
    height: auto;
    margin: 0 auto;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    outline: none !important;
}

/* State Polygons & Unified Single-Pass Border Mesh (No focus box or popup on click) */
.em2028-state-path {
    stroke: var(--em2028-state-stroke);
    stroke-width: calc(var(--em2028-state-stroke-width) * 0.35);
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    cursor: pointer;
    outline: none !important;
    transition: fill 0.16s ease, filter 0.14s ease;
}

.em2028-state-path:focus,
.em2028-state-path:active {
    outline: none !important;
}

.em2028-state-path:hover {
    filter: brightness(1.16);
}

.em2028-borders-mesh {
    fill: none;
    stroke: var(--em2028-state-stroke);
    stroke-width: var(--em2028-state-stroke-width);
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.em2028-hover-outline {
    fill: none;
    stroke: var(--em2028-state-hover-stroke);
    stroke-width: var(--em2028-state-hover-stroke-width);
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.em2028-hover-outline.is-active {
    opacity: 1;
}

/* Customizable Map State Abbreviations & Electoral Numbers */
.em2028-state-label-group {
    pointer-events: none;
    text-anchor: middle;
    font-family: var(--em2028-map-label-font);
}

.em2028-state-code {
    font-family: var(--em2028-map-label-font);
    font-size: var(--em2028-state-code-size);
    font-weight: var(--em2028-state-code-weight);
    fill: var(--em2028-state-label-color);
    paint-order: stroke;
    stroke: var(--em2028-state-label-stroke);
    stroke-width: var(--em2028-state-label-stroke-width);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.em2028-state-ev {
    font-family: var(--em2028-map-label-font);
    font-size: var(--em2028-state-ev-size);
    font-weight: var(--em2028-state-ev-weight);
    fill: var(--em2028-state-label-color);
    opacity: 0.94;
    paint-order: stroke;
    stroke: var(--em2028-state-label-stroke);
    stroke-width: var(--em2028-state-label-stroke-width);
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Below-Map Panels: Split States (ME & NE) + Small States & D.C. */
.em2028-below-map-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    width: 100%;
}

.em2028-side-card {
    background: var(--em2028-bg-panel);
    border: 1px solid var(--em2028-border-card);
    border-radius: var(--em2028-radius-inner);
    padding: 14px 16px;
}

.em2028-side-title {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--em2028-text-muted);
    margin: 0 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.em2028-callouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 8px;
}

.em2028-pill-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    user-select: none;
}

.em2028-pill-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.14);
    border-color: rgba(255, 255, 255, 0.55);
}

.em2028-pill-ev {
    font-size: 11px;
    opacity: 0.92;
    background: rgba(0, 0, 0, 0.24);
    padding: 1px 5px;
    border-radius: 4px;
}

/* Split Electoral Vote District Cards (Maine & Nebraska) */
.em2028-split-groups-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.em2028-split-group {
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--em2028-border-card);
    border-radius: 8px;
    padding: 10px 12px;
}

.em2028-split-header {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--em2028-text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.em2028-split-Header-btn {
    font-size: 10.5px;
    color: var(--em2028-text-muted);
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
}

.em2028-split-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

/* Scenario Presets Bar */
.em2028-presets-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--em2028-border-card);
}

/* Battleground / Path to 270 & State Table Accordion */
.em2028-drawer {
    margin-top: 18px;
    background: var(--em2028-bg-panel);
    border: 1px solid var(--em2028-border-card);
    border-radius: var(--em2028-radius-inner);
    overflow: hidden;
}

.em2028-drawer-tabs {
    display: flex;
    border-bottom: 1px solid var(--em2028-border-card);
    background: rgba(0, 0, 0, 0.12);
    overflow-x: auto;
}

.em2028-tab-btn {
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--em2028-text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.em2028-tab-btn:hover {
    color: var(--em2028-text-main);
}

.em2028-tab-btn.is-active {
    color: var(--em2028-text-main);
    border-bottom-color: #fbbf24;
    background: var(--em2028-bg-panel);
}

.em2028-drawer-body {
    padding: 16px;
}

.em2028-swing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.em2028-swing-card {
    background: var(--em2028-bg-card);
    border: 1px solid var(--em2028-border-card);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.em2028-swing-card:hover {
    transform: translateY(-2px);
    border-color: var(--em2028-text-muted);
}

.em2028-swing-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 13.5px;
}

.em2028-swing-ev-badge {
    font-size: 11.5px;
    padding: 2px 7px;
    border-radius: 99px;
    color: #fff;
    font-weight: 800;
}

.em2028-swing-hist {
    font-size: 11px;
    color: var(--em2028-text-muted);
}

/* All States Table */
.em2028-table-wrap {
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid var(--em2028-border-card);
    border-radius: 8px;
}

.em2028-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.em2028-table th,
.em2028-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--em2028-border-card);
}

.em2028-table th {
    background: var(--em2028-bg-card);
    position: sticky;
    top: 0;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--em2028-text-muted);
    z-index: 2;
}

/* ==========================================================================
   CLEAN, EDGE-TO-EDGE MOBILE LAYOUT (<= 768px)
   Only shows:
   1. The EV Bar with EV numbers inside it (hides Nominee text & numbers above)
   2. Centered Dem / Toss-Up / Rep choices (hides "Active Color:" text)
   3. Edge-to-edge full-width Map!
   ========================================================================== */
@media (max-width: 768px) {
    .em2028-root {
        padding: 8px 4px;
        border-radius: 10px;
    }

    /* Hide desktop clutter on mobile */
    .em2028-header,
    .em2028-candidates-row,
    .em2028-shades-group,
    .em2028-active-color-label,
    .em2028-below-map-panels,
    .em2028-presets-bar,
    .em2028-drawer {
        display: none !important;
    }

    /* Compact EV Bar with EV numbers inside it */
    .em2028-scoreboard {
        background: transparent;
        border: none;
        padding: 2px 4px 8px;
        margin-bottom: 6px;
    }

    .em2028-bar-seg {
        color: transparent !important;
        text-shadow: none !important;
    }

    .em2028-bar-totals-overlay {
        display: flex;
    }

    /* Centered Dem / Toss-Up / Rep choices only */
    .em2028-toolbar {
        background: transparent;
        border: none;
        padding: 0 4px 8px;
        margin-bottom: 4px;
        justify-content: center;
    }

    .em2028-toolbar-group {
        width: 100%;
        justify-content: center;
        gap: 6px;
    }

    .em2028-brush-btn {
        flex: 1 1 auto;
        max-width: 120px;
        padding: 7px 10px;
        font-size: 12px;
    }

    /* Edge-to-edge Map on Mobile */
    .em2028-map-stage {
        padding: 2px 0;
        border: none;
        border-radius: 6px;
        background: transparent;
    }

    .em2028-svg {
        width: 100%;
        max-width: 100%;
    }
}
