﻿/** * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * 
 * Exclusive Admixture Result Page V2 - Editorial Cinematic Design
 * Premium dark theme with gold accents for exclusive admixture reports.
 */

/* ==========================================================================
   CSS VARIABLES - EXCLUSIVE PREMIUM THEME
   ========================================================================== */

:root {
    /* Colors - Premium Gold/Amber Palette */
    --exa-gold: #C4956A;
    --exa-gold-light: #D4B896;
    --exa-gold-dark: #8B6D4F;
    --exa-amber: #d4a017;
    --exa-amber-light: #f4c430;
    --exa-amber-dark: #b8860b;
    
    /* Backgrounds */
    --exa-bg-dark: #0a0a0a;
    --exa-bg-dark-alt: #1a1a1a;
    --exa-bg-section: #1a1a1a;
    --exa-bg-light: #f8f5f0;
    --exa-bg-parchment: #f5efe6;
    
    /* Text */
    --exa-text-primary: #ffffff;
    --exa-text-dark: #1a1a1a;
    --exa-text-muted: rgba(255, 255, 255, 0.6);
    --exa-text-muted-dark: #6c757d;
    
    /* Status */
    --exa-success: #27ae60;
    --exa-warning: #f39c12;
    --exa-danger: #e74c3c;
    
    /* Shadows - Premium */
    --exa-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --exa-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --exa-shadow-hover: 0 8px 30px rgba(196, 149, 106, 0.2);
    --exa-shadow-gold: 0 4px 20px rgba(196, 149, 106, 0.3);
    
    /* Typography */
    --exa-font-display: 'Cormorant Garamond', Georgia, serif;
    --exa-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Layout */
    --exa-radius: 12px;
    --exa-radius-sm: 8px;
    --exa-section-padding: 5rem;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

.exa-main {
    background: var(--exa-bg-dark);
    min-height: 100vh;
    color: var(--exa-text-primary);
    max-width: 100%;
    overflow-x: hidden;
}

/* ==========================================================================
   SKIP LINK
   ========================================================================== */

.exa-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--exa-gold);
    color: var(--exa-text-dark);
    padding: 8px 16px;
    z-index: 9999;
    transition: top 0.3s;
    border-radius: 0 0 var(--exa-radius-sm) 0;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--exa-font-body);
}

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

/* ==========================================================================
   SCROLL PROGRESS BAR
   ========================================================================== */

.exa-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--exa-gold) 0%, var(--exa-amber) 100%);
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(196, 149, 106, 0.5);
}

/* ==========================================================================
   PAGE NAVIGATION DOTS (DESKTOP)
   ========================================================================== */

.exa-page-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.exa-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: block;
}

.exa-nav-dot::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--exa-bg-dark-alt);
    color: var(--exa-text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--exa-font-body);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid rgba(196, 149, 106, 0.3);
}

.exa-nav-dot:hover::before {
    opacity: 1;
}

.exa-nav-dot:hover,
.exa-nav-dot.active {
    background: var(--exa-gold);
    border-color: var(--exa-gold);
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(196, 149, 106, 0.6);
}

@media (max-width: 991px) {
    .exa-page-nav {
        display: none;
    }
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION
   ========================================================================== */

.exa-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(196, 149, 106, 0.2);
    padding: 0.75rem 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

.exa-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: var(--exa-font-body);
    font-size: 0.65rem;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: var(--exa-radius-sm);
}

.exa-mobile-nav-item i {
    font-size: 1.1rem;
}

.exa-mobile-nav-item.active,
.exa-mobile-nav-item:hover {
    color: var(--exa-gold);
    background: rgba(196, 149, 106, 0.1);
}

@media (min-width: 992px) {
    .exa-mobile-nav {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .exa-mobile-nav {
        justify-content: space-between;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .exa-mobile-nav-item {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.5rem 0.25rem;
        font-size: 0.6rem;
    }
}

/* Adjust main content padding on mobile to prevent overlap */
@media (max-width: 991px) {
    .exa-main {
        padding-bottom: 80px;
    }
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */

.exa-back-to-top {
    position: fixed;
    bottom: 120px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--exa-bg-dark-alt);
    color: var(--exa-text-primary);
    border: 2px solid rgba(196, 149, 106, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.exa-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.exa-back-to-top:hover {
    background: var(--exa-gold);
    color: var(--exa-text-dark);
    border-color: var(--exa-gold);
    box-shadow: var(--exa-shadow-gold);
}

@media (max-width: 768px) {
    .exa-back-to-top {
        bottom: 100px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}

/* ==========================================================================
   EXPORT TOOLBAR
   ========================================================================== */

.exa-export-toolbar {
    position: fixed;
    top: 50%;
    left: 24px;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exa-export-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--exa-bg-dark-alt);
    color: var(--exa-text-primary);
    border: 2px solid rgba(196, 149, 106, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
}

.exa-export-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--exa-bg-dark-alt);
    color: var(--exa-text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--exa-font-body);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid rgba(196, 149, 106, 0.3);
}

.exa-export-btn:hover::before {
    opacity: 1;
}

.exa-export-btn:hover {
    background: var(--exa-gold);
    color: var(--exa-text-dark);
    border-color: var(--exa-gold);
    box-shadow: var(--exa-shadow-gold);
}

@media (max-width: 768px) {
    .exa-export-toolbar {
        left: 16px;
        top: auto;
        bottom: 100px;
        transform: none;
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.exa-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--exa-bg-dark) 0%, var(--exa-bg-dark-alt) 100%);
    overflow: hidden;
    padding: 2rem;
}

.exa-hero-bg {
    position: absolute;
    inset: 0;
}

.exa-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(10, 10, 10, 0.55) 0%, var(--exa-bg-dark) 70%);
}

.exa-hero-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}

/* DNA Animation */
.exa-hero-dna {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: 500px;
    opacity: 0.1;
    pointer-events: none;
}

.exa-dna-strand {
    stroke: var(--exa-gold);
    stroke-width: 2;
    fill: none;
    animation: exa-dna-pulse 4s ease-in-out infinite;
}

.exa-dna-strand-2 {
    animation-delay: 2s;
}

@keyframes exa-dna-pulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Particles */
.exa-hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.exa-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--exa-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: exa-particle-float 8s ease-in-out infinite;
}

.exa-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.exa-particle:nth-child(2) { left: 20%; top: 60%; animation-delay: 1s; }
.exa-particle:nth-child(3) { left: 80%; top: 30%; animation-delay: 2s; }
.exa-particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 3s; }
.exa-particle:nth-child(5) { left: 50%; top: 10%; animation-delay: 4s; }
.exa-particle:nth-child(6) { left: 30%; top: 80%; animation-delay: 5s; }

@keyframes exa-particle-float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    50% { transform: translateY(-30px) translateX(20px); opacity: 0.6; }
}

.exa-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.exa-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: rgba(196, 149, 106, 0.1);
    border: 1px solid rgba(196, 149, 106, 0.3);
    border-radius: 50px;
    color: var(--exa-gold);
    font-family: var(--exa-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.exa-hero-title {
    font-family: var(--exa-font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--exa-text-primary);
    margin-bottom: 1.5rem;
}

.exa-title-line {
    display: block;
}

.exa-title-accent {
    display: block;
    color: var(--exa-gold);
    font-style: italic;
}

.exa-hero-lead {
    font-family: var(--exa-font-body);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
    margin-bottom: 2rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.exa-hero-sample-name {
    color: var(--exa-gold);
    font-weight: 600;
}

.exa-hero-stats {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0 3rem;
    max-width: 720px;
    margin-inline: auto;
    margin-bottom: 2rem;
}

.exa-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.exa-hero-stat-value {
    display: block;
    text-align: center;
    font-family: var(--exa-font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--exa-gold);
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.exa-hero-stat-label {
    display: block;
    text-align: center;
    min-height: 2.4em;
    font-family: var(--exa-font-body);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.exa-hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.exa-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--exa-text-muted);
    text-decoration: none;
    font-family: var(--exa-font-body);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s;
    animation: exa-bounce 2s ease-in-out infinite;
}

.exa-scroll-indicator:hover {
    color: var(--exa-gold);
}

@keyframes exa-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ==========================================================================
   PREMIUM BADGE
   ========================================================================== */

.exa-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--exa-gold) 0%, var(--exa-amber) 100%);
    border-radius: 50px;
    color: var(--exa-text-dark);
    font-family: var(--exa-font-body);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: var(--exa-shadow-gold);
}

.exa-premium-badge i {
    font-size: 1rem;
}

/* ==========================================================================
   SECTION STYLES
   ========================================================================== */

.exa-section {
    padding: var(--exa-section-padding) 0;
    position: relative;
}

.exa-section-dark {
    background: var(--exa-bg-dark-alt);
}

.exa-section-parchment {
    background: var(--exa-bg-parchment);
    color: var(--exa-text-dark);
}

/* Chapter Header */
.exa-chapter-header {
    text-align: center;
    margin-bottom: 3rem;
}

.exa-chapter-number {
    display: block;
    font-family: var(--exa-font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--exa-gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.exa-section-title {
    font-family: var(--exa-font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--exa-text-primary);
    margin-bottom: 0.5rem;
}

.exa-section-parchment .exa-section-title {
    color: var(--exa-text-dark);
}

.exa-section-subtitle {
    font-family: var(--exa-font-body);
    font-size: 1.125rem;
    color: var(--exa-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.exa-section-parchment .exa-section-subtitle {
    color: var(--exa-text-muted-dark);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.exa-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    border: 2px solid rgba(196, 149, 106, 0.3);
    border-radius: var(--exa-radius);
    color: var(--exa-text-primary);
    font-family: var(--exa-font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.exa-btn-primary:hover {
    background: var(--exa-gold);
    border-color: var(--exa-gold);
    color: var(--exa-text-dark);
    box-shadow: var(--exa-shadow-gold);
    transform: translateY(-2px);
}

.exa-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--exa-radius);
    color: var(--exa-text-primary);
    font-family: var(--exa-font-body);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.exa-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.exa-btn-success {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--exa-success);
    border: none;
    border-radius: var(--exa-radius);
    color: white;
    font-family: var(--exa-font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.exa-btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.exa-card {
    background: var(--exa-bg-dark-alt);
    border-radius: var(--exa-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.exa-card:hover {
    border-color: rgba(196, 149, 106, 0.3);
    box-shadow: var(--exa-shadow);
}

.exa-card-header {
    padding: 1.5rem;
    background: rgba(196, 149, 106, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.exa-card-body {
    padding: 1.5rem;
}

/* ==========================================================================
   TABS / SEGMENTED CONTROLS
   ========================================================================== */

/* Segmented Control Tabs (Map/Chart toggle) */
.exa-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(196, 149, 106, 0.2);
    border-radius: 50px;
    margin-bottom: 1.5rem;
    width: 100%;
    justify-content: center;
}

.exa-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 50px;
    color: var(--exa-text-muted);
    font-family: var(--exa-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 200px;
    text-decoration: none;
}

.exa-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--exa-text-primary);
    text-decoration: none;
}

.exa-tab.active {
    background: var(--exa-gold);
    color: var(--exa-text-dark);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(196, 149, 106, 0.3);
}

.exa-tab i {
    font-size: 1rem;
}

/* Chromosome View Tabs */
.exa-chromo-tabs {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 1rem 1.5rem;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    justify-content: center;
    border-bottom: 1px solid rgba(196, 149, 106, 0.2);
}

.exa-chromo-tabs .nav-item {
    margin: 0;
}

.exa-chromo-tabs .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(196, 149, 106, 0.2);
    border-radius: 50px;
    color: var(--exa-text-muted);
    font-family: var(--exa-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.exa-chromo-tabs .nav-link:hover {
    background: rgba(196, 149, 106, 0.1);
    border-color: var(--exa-gold);
    color: var(--exa-text-primary);
    text-decoration: none;
}

.exa-chromo-tabs .nav-link.active {
    background: var(--exa-gold);
    border-color: var(--exa-gold);
    color: var(--exa-text-dark);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(196, 149, 106, 0.3);
}

.exa-chromo-tabs .nav-link i {
    font-size: 1rem;
}

@media (max-width: 767.98px) {
    .exa-tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 8px;
    }
    
    .exa-tab {
        max-width: none;
        width: 100%;
    }
    
    .exa-chromo-tabs {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    .exa-chromo-tabs .nav-link {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

.animate-fade-in {
    animation: exa-fade-in 0.6s ease-out;
}

.animate-fade-in-up {
    animation: exa-fade-in-up 0.8s ease-out;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes exa-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes exa-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --exa-section-padding: 3rem 1rem;
    }
    
    .exa-hero {
        padding: 1rem;
    }
    
    .exa-hero-stats {
        column-gap: 2rem;
    }
    
    .exa-hero-stat-value {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .exa-hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .exa-hero-stat:nth-child(n+2) .exa-hero-stat-value {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(196, 149, 106, 0.2);
    }
}

/* ==========================================================================
   EXCLUSIVE REGION DRAWER
   ========================================================================== */

body.drawer-open {
    overflow: hidden;
}

.exclusive-region-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
    backdrop-filter: blur(4px);
    pointer-events: none;
    cursor: pointer;
}

.exclusive-region-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.exclusive-region-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(450px, 100%);
    height: 100%;
    background: #0D0D0F; /* Obsidian */
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.exclusive-region-drawer.active {
    transform: translateX(0);
}

@media (max-width: 575.98px) {
    .exclusive-region-drawer {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        height: 90vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
    }

    .exclusive-region-drawer.active {
        transform: translateY(0);
    }
}

.drawer-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(196, 149, 106, 0.2);
    background: linear-gradient(135deg, var(--exa-gold) 0%, #8B6D4F 100%);
    flex-shrink: 0;
}

.drawer-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: rgba(0, 0, 0, 0.15);
    color: #0D0D0F;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-close-btn:hover {
    background: rgba(0, 0, 0, 0.25);
    color: #0D0D0F;
}

.drawer-close-btn:focus {
    outline: 2px solid #0D0D0F;
    outline-offset: 2px;
}

.drawer-region-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: #0D0D0F; /* Obsidian text on gold background */
    text-shadow: none;
}

.badge-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.badge-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    background: #0D0D0F; /* Obsidian */
    color: #E8E4DC; /* Bone */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.drawer-image-container {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.drawer-region-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.25rem;
    background: linear-gradient(to top, rgba(13, 13, 15, 0.95) 0%, transparent 100%);
    color: #F5F3EF; /* Ivory */
}

.drawer-title {
    font-family: var(--exa-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #F5F3EF; /* Ivory */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.drawer-subtitle {
    font-size: 0.9rem;
    color: var(--exa-gold-light); /* #D4B896 */
    margin: 0;
    opacity: 1;
}

.drawer-section {
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(168, 159, 145, 0.15);
}

.drawer-section:last-child {
    border-bottom: none;
}

/* Card overrides for dark theme */
.exclusive-region-drawer .card-dnagenics {
    background: transparent;
    border: none;
    border-color: rgba(196, 149, 106, 0.2);
    color: #E8E4DC; /* Bone */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.exclusive-region-drawer .card-dnagenics:hover {
    box-shadow: 0 4px 16px rgba(196, 149, 106, 0.15);
    transform: translateY(-2px);
}

.exclusive-region-drawer .card-header {
    background: #1A1C1E; /* Slate */
    border-bottom: 1px solid rgba(196, 149, 106, 0.2);
    color: var(--exa-gold);
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0;
}

.exclusive-region-drawer .card-header.bg-gradient-dnagenics-primary {
    background: linear-gradient(135deg, var(--exa-gold) 0%, #8B6D4F 100%);
    color: #0D0D0F; /* Obsidian */
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(196, 149, 106, 0.2);
    border-radius: 12px 12px 0 0;
}

.exclusive-region-drawer .card-header h5 {
    color: inherit;
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.exclusive-region-drawer .card-header.bg-gradient-dnagenics-primary h5 {
    color: #0D0D0F; /* Obsidian */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

.exclusive-region-drawer .card-header i {
    color: inherit;
    font-size: 1.1rem;
    opacity: 0.95;
}

.exclusive-region-drawer .card-header.bg-gradient-dnagenics-primary i {
    color: #0D0D0F; /* Obsidian */
    opacity: 1;
}

.exclusive-region-drawer .card-body {
    position: relative;
    background: linear-gradient(135deg, rgba(196, 149, 106, 0.03) 0%, #1A1C1E 100%); /* Subtle gold gradient to slate */
    color: #E8E4DC; /* Bone */
    border-left: 3px solid var(--exa-gold);
    border-radius: 0 0 12px 12px;
    padding: 1.25rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.exclusive-region-drawer .card-body:hover {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(196, 149, 106, 0.15);
    border-left-color: var(--exa-gold-light);
}

.exclusive-region-drawer .card-body p {
    color: #E8E4DC; /* Bone */
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* Special styling for Genetic Connection card body */
.exclusive-region-drawer .card-header.bg-gradient-dnagenics-primary + .card-body {
    background: linear-gradient(135deg, rgba(196, 149, 106, 0.05) 0%, rgba(139, 109, 79, 0.02) 100%);
    border-left: 3px solid var(--exa-gold);
    position: relative;
}

.exclusive-region-drawer .card-header.bg-gradient-dnagenics-primary + .card-body::before {
    content: '\f471'; /* Font Awesome DNA icon unicode */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 4rem;
    color: var(--exa-gold);
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

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

.country-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #1A1C1E; /* Slate */
    border: 1px solid rgba(196, 149, 106, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    color: #E8E4DC; /* Bone */
    transition: all 0.2s ease;
}

.country-tag:hover {
    background: rgba(196, 149, 106, 0.2);
    border-color: var(--exa-gold);
    color: var(--exa-gold);
}

.drawer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(168, 159, 145, 0.15);
    background: #1A1C1E; /* Slate */
    flex-shrink: 0;
}

.drawer-footer .btn {
    width: 100%;
    font-weight: 600;
}

.drawer-footer .btn-light {
    background: transparent !important;
    border-color: var(--exa-gold-light) !important;
    color: var(--exa-gold-light) !important;
}

.drawer-footer .btn-light:hover {
    background: rgba(196, 149, 106, 0.1) !important;
    border-color: var(--exa-gold) !important;
    color: var(--exa-gold) !important;
}

.drawer-footer .btn-light i {
    color: inherit !important;
}

/* Alert styles for dark theme */
.exclusive-region-drawer .alert {
    background: linear-gradient(135deg, rgba(196, 149, 106, 0.02) 0%, rgba(139, 109, 79, 0.01) 100%);
    border: 1px solid rgba(196, 149, 106, 0.2);
    border-radius: 12px;
    color: #E8E4DC; /* Bone */
}

.exclusive-region-drawer .alert-info {
    background: linear-gradient(135deg, rgba(196, 149, 106, 0.05) 0%, rgba(139, 109, 79, 0.02) 100%);
    border-color: rgba(196, 149, 106, 0.3);
}

.exclusive-region-drawer .alert-heading {
    color: var(--exa-gold);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.exclusive-region-drawer .alert-heading i {
    color: var(--exa-gold);
    margin-right: 0.5rem;
}

.exclusive-region-drawer .alert p {
    color: #E8E4DC; /* Bone */
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Map container styling */
.exclusive-region-drawer #drawerMiniMap {
    background: #1A1C1E; /* Slate */
}

@media (max-width: 576px) {
    .exclusive-region-drawer {
        width: 100%;
        right: -100%;
        top: auto;
        bottom: 0;
        height: 90vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
    }
    
    .exclusive-region-drawer.active {
        right: 0;
    }
    
    .drawer-header {
        border-radius: 20px 20px 0 0;
        padding: 1rem 1.5rem;
    }
    
    .drawer-section {
        padding: 1.25rem 1.5rem;
    }
    
    .drawer-footer {
        padding: 1rem 1.5rem;
    }
}

/* ==========================================================================
   COMPOSITION TABLE - PREMIUM SCROLLBAR
   ========================================================================== */

/* Premium gold-themed scrollbar for composition table */
.ancestry-breakdown-container {
    scrollbar-width: thin;
    scrollbar-color: var(--exa-gold) rgba(196, 149, 106, 0.1);
    padding-right: 0.5rem; /* Space for scrollbar to prevent content clipping */
}

.ancestry-breakdown-container::-webkit-scrollbar {
    width: 6px;
}

.ancestry-breakdown-container::-webkit-scrollbar-track {
    background: rgba(196, 149, 106, 0.08);
    border-radius: 3px;
}

.ancestry-breakdown-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--exa-gold) 0%, var(--exa-gold-dark) 100%);
    border-radius: 3px;
}

.ancestry-breakdown-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--exa-gold-light) 0%, var(--exa-gold) 100%);
}

/* ==========================================================================
   PREMIUM COMPOSITION CARD HEADER
   ========================================================================== */

.exa-composition-header {
    position: relative;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(196, 149, 106, 0.08) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-bottom: none;
}

.exa-composition-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--exa-gold) 50%, transparent 100%);
}

.exa-composition-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--exa-font-display);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--exa-text-primary);
    margin: 0;
    letter-spacing: 0.02em;
}

.exa-composition-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--exa-gold) 0%, var(--exa-gold-dark) 100%);
    border-radius: 8px;
    color: var(--exa-bg-dark);
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(196, 149, 106, 0.3);
    flex-shrink: 0;
}

/* ==========================================================================
   REFERENCE PANEL ENRICHED VISUALIZATION
   ========================================================================== */

.exa-ref-panel-meta {
    text-align: center;
    margin-bottom: 2rem;
}

.exa-ref-panel-meta .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    background-color: rgba(196, 149, 106, 0.1);
    border: 1px solid var(--exa-gold);
    color: var(--exa-gold);
}

.exa-ref-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 0;
}

@media (max-width: 768px) {
    .exa-ref-panel-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .exa-ref-panel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.exa-ref-panel-card {
    background: var(--exa-bg-dark-alt);
    border: 1px solid rgba(196, 149, 106, 0.2);
    border-radius: var(--exa-radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.exa-ref-panel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--exa-gold) 0%, var(--exa-amber) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Desktop: Collapsed state (default) */
@media (min-width: 769px) {
    .exa-ref-panel-card {
        max-height: 200px;
        overflow: hidden;
        transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    box-shadow 0.4s ease, 
                    border-color 0.4s ease;
    }
    
    .exa-ref-panel-card-expanded {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.4s ease 0.15s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
    }
    
    /* Desktop: Expanded state (hover) */
    .exa-ref-panel-card:hover {
        max-height: 800px;
        border-color: var(--exa-gold);
        box-shadow: var(--exa-shadow-gold);
        transform: translateY(-4px);
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                    box-shadow 0.3s ease, 
                    border-color 0.3s ease;
    }
    
    .exa-ref-panel-card:hover::before {
        opacity: 1;
    }
    
    .exa-ref-panel-card:hover .exa-ref-panel-card-expanded {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile: Always expanded */
@media (max-width: 768px) {
    .exa-ref-panel-card {
        max-height: none;
        overflow: visible;
    }
    
    .exa-ref-panel-card-expanded {
        opacity: 1;
        transform: translateY(0);
    }
}

.exa-ref-panel-card-primary {
    position: relative;
}

.exa-ref-panel-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.exa-ref-panel-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.25rem;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.exa-ref-panel-card-title {
    flex: 1;
}

.exa-ref-panel-card-title h4 {
    font-family: var(--exa-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--exa-gold);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.exa-ref-panel-card-title small {
    font-size: 0.875rem;
    color: var(--exa-text-muted);
    font-weight: 400;
}

.exa-ref-panel-card-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: var(--exa-radius-sm);
    overflow: hidden;
    background: var(--exa-bg-dark);
}

.exa-ref-panel-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.exa-ref-panel-card-description {
    margin-bottom: 1rem;
}

.exa-ref-panel-card-description p {
    color: var(--exa-text-primary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
}

.exa-ref-panel-tags-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.exa-ref-panel-tag-more {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: rgba(196, 149, 106, 0.15);
    border: 1px solid rgba(196, 149, 106, 0.4);
    border-radius: 12px;
    color: var(--exa-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-style: italic;
}

.exa-ref-panel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.exa-ref-panel-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: rgba(196, 149, 106, 0.1);
    border: 1px solid rgba(196, 149, 106, 0.3);
    border-radius: 12px;
    color: var(--exa-gold-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exa-ref-panel-regions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(196, 149, 106, 0.1);
}

.exa-ref-panel-regions-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--exa-gold);
    display: block;
    margin-bottom: 0.5rem;
}

.exa-ref-panel-regions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exa-ref-panel-regions-list li {
    color: var(--exa-text-primary);
    font-size: 0.875rem;
    padding: 0.25rem 0;
    opacity: 0.8;
    position: relative;
    padding-left: 1.25rem;
}

.exa-ref-panel-regions-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--exa-gold);
    font-weight: bold;
}

.exa-ref-panel-edited-badge {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(196, 149, 106, 0.1);
}

.exa-ref-panel-edited-badge .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    background-color: rgba(243, 156, 18, 0.1);
    border: 1px solid var(--exa-warning);
    color: var(--exa-warning);
}

/* Hidden cards for pagination */
.exa-ref-panel-card-hidden {
    display: none;
}

/* Show More Button */
.exa-ref-panel-show-more {
    margin-top: 2rem;
    padding-top: 2rem;
}

.exa-ref-panel-show-more .btn {
    border-color: var(--exa-gold);
    color: var(--exa-gold);
    background-color: transparent;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

.exa-ref-panel-show-more .btn:hover {
    background-color: var(--exa-gold);
    color: var(--exa-bg-dark);
    border-color: var(--exa-gold);
    transform: translateY(-2px);
    box-shadow: var(--exa-shadow-gold);
}

.exa-ref-panel-show-more .btn .badge {
    background-color: var(--exa-gold);
    color: var(--exa-bg-dark);
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}

/* Animation delays for staggered card appearance */
.exa-ref-panel-card:nth-child(1) { animation-delay: 0.1s; }
.exa-ref-panel-card:nth-child(2) { animation-delay: 0.2s; }
.exa-ref-panel-card:nth-child(3) { animation-delay: 0.3s; }
.exa-ref-panel-card:nth-child(4) { animation-delay: 0.4s; }
.exa-ref-panel-card:nth-child(5) { animation-delay: 0.5s; }
.exa-ref-panel-card:nth-child(6) { animation-delay: 0.6s; }
.exa-ref-panel-card:nth-child(n+7) { animation-delay: 0.7s; }

/* ==========================================================================
   AI ASSISTANT SECTION - DARK THEME OVERRIDES
   ========================================================================== */

/* Override shared ai-assistant.css white backgrounds for dark theme */
.exa-section .ai-assistant-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(196, 149, 106, 0.3);
    border-radius: 12px;
    padding: 2rem;
}

.exa-section .ai-assistant-section h4 {
    color: var(--exa-gold);
}

.exa-section .ai-assistant-section h4 i {
    color: var(--exa-gold);
}

.exa-section .ai-assistant-section .badge-success {
    background: rgba(39, 174, 96, 0.3);
    color: #27ae60;
}

.exa-section .ai-assistant-section .badge-warning {
    background: rgba(243, 156, 18, 0.3);
    color: var(--exa-warning);
}

.exa-section .ai-assistant-section .alert-light {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid rgba(196, 149, 106, 0.2);
    border-left: 3px solid var(--exa-gold);
    color: var(--exa-text-primary);
}

.exa-section .ai-assistant-section .alert-light p {
    color: var(--exa-text-primary);
}

.exa-section .ai-assistant-section .alert-light i {
    color: var(--exa-gold);
}

.exa-section .ai-assistant-section .suggested-prompts .btn-outline-primary {
    color: var(--exa-gold);
    border-color: rgba(196, 149, 106, 0.3);
}

.exa-section .ai-assistant-section .suggested-prompts .btn-outline-primary:hover {
    background: rgba(196, 149, 106, 0.2);
    color: var(--exa-gold-light);
    border-color: rgba(196, 149, 106, 0.5);
}

.exa-section .ai-assistant-section .btn-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--exa-text-primary);
    border: 2px solid var(--exa-gold);
}

.exa-section .ai-assistant-section .btn-light:hover {
    background: var(--exa-gold);
    color: var(--exa-bg-dark);
    border-color: var(--exa-gold);
}

/* AI Results - Dark background override */
.exa-section .ai-results {
    background: rgba(26, 26, 26, 0.8);
    color: var(--exa-text-primary);
    border: 1px solid rgba(196, 149, 106, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Ensure all text elements in AI results use light color */
.exa-section .ai-results .ai-result-content,
.exa-section .ai-results p,
.exa-section .ai-results div,
.exa-section .ai-results span,
.exa-section .ai-results li {
    color: rgba(255, 255, 255, 0.85);
}

/* Headings in AI results */
.exa-section .ai-results h1,
.exa-section .ai-results h2,
.exa-section .ai-results h3,
.exa-section .ai-results h4 {
    color: var(--exa-gold);
    font-weight: 600;
}

/* Strong/bold text */
.exa-section .ai-results strong {
    color: var(--exa-text-primary);
    font-weight: 700;
}

/* Blockquotes */
.exa-section .ai-results blockquote,
.exa-section .ai-results .ai-result-content blockquote {
    background: rgba(196, 149, 106, 0.08);
    border-left: 4px solid var(--exa-gold);
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    color: rgba(255, 255, 255, 0.85);
}

.exa-section .ai-results blockquote p,
.exa-section .ai-results .ai-result-content blockquote p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.exa-section .ai-results blockquote strong,
.exa-section .ai-results .ai-result-content blockquote strong {
    color: var(--exa-text-primary);
    font-weight: 700;
}

.exa-section .ai-results blockquote em,
.exa-section .ai-results .ai-result-content blockquote em {
    color: rgba(255, 255, 255, 0.7);
}

/* Code blocks */
.exa-section .ai-results code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--exa-gold-light);
}

/* Lists */
.exa-section .ai-results ul,
.exa-section .ai-results ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.exa-section .ai-results li {
    margin-bottom: 0.35rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

/* AI Sample Output (for unlicensed users) */
.exa-section .ai-sample-output {
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(196, 149, 106, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
}

.exa-section .ai-sample-output h6 {
    color: var(--exa-gold);
    font-weight: 700;
    margin-bottom: 1rem;
}

.exa-section .ai-sample-output .sample-content {
    background: rgba(196, 149, 106, 0.05);
    border-color: rgba(196, 149, 106, 0.2);
}

.exa-section .ai-sample-output .sample-content p {
    color: rgba(255, 255, 255, 0.85);
}

.exa-section .ai-sample-output .sample-content p:last-child {
    margin-bottom: 0 !important;
}

.exa-section .ai-sample-output .bg-light {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(196, 149, 106, 0.2) !important;
}

/* ==========================================================================
   ADX RESULT CARD — AI Infographic card
   ========================================================================== */

.adx-result-card {
    background: var(--exa-bg-dark-alt);
    border: 1px solid rgba(196, 149, 106, 0.15);
    border-radius: 12px;
    box-shadow: var(--exa-shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.adx-result-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(196, 149, 106, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to right, rgba(196, 149, 106, 0.08), transparent);
}

.adx-result-card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.adx-result-card-title i {
    color: var(--exa-gold);
    font-size: 0.9rem;
}

.adx-result-card-body {
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.75);
}

.adx-result-card-body .text-muted {
    color: rgba(255, 255, 255, 0.55) !important;
}

.adx-result-card .badge-secondary {
    background: rgba(196, 149, 106, 0.2);
    color: var(--exa-gold-light);
    border: 1px solid rgba(196, 149, 106, 0.3);
}

.adx-result-card .badge-warning {
    background: rgba(212, 160, 23, 0.2);
    color: var(--exa-amber-light);
    border: 1px solid rgba(212, 160, 23, 0.3);
}

.adx-result-card .btn-primary {
    background: var(--exa-gold);
    border-color: var(--exa-gold);
    color: var(--exa-bg-dark);
}

.adx-result-card .btn-primary:hover {
    background: var(--exa-gold-light);
    border-color: var(--exa-gold-light);
    color: var(--exa-bg-dark);
}

.adx-result-card .btn-link {
    color: var(--exa-gold);
}

.adx-result-card .btn-link:hover {
    color: var(--exa-gold-light);
}

/* ==========================================================================
   HERO BACKGROUND IMAGE FIX
   ========================================================================== */

.exa-hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* ==========================================================================
   CHAPTER DIVIDER (gold rule below section title, mirrors cinematic report)
   ========================================================================== */

.exa-chapter-divider {
    width: 48px;
    height: 1px;
    background: var(--exa-gold);
    margin: 0.9rem auto 1.25rem;
    opacity: 0.6;
}

/* ==========================================================================
   SECTION BADGE (outlined, quieter than the filled premium badge)
   ========================================================================== */

.exa-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    background: transparent;
    border: 1px solid rgba(196, 149, 106, 0.45);
    border-radius: 50px;
    color: var(--exa-gold);
    font-family: var(--exa-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ==========================================================================
   STAT PILLS (quick key-value badges used in Summary + Hero)
   ========================================================================== */

.exa-stat-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin: 1.25rem 0 1.5rem;
}

.exa-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(196, 149, 106, 0.07);
    border: 1px solid rgba(196, 149, 106, 0.18);
    border-radius: 100px;
    padding: 0.35rem 0.85rem;
    font-family: var(--exa-font-body);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.exa-stat-pill strong {
    color: var(--exa-gold-light);
    font-weight: 600;
}

/* ==========================================================================
   TOP COMPONENT CARDS (Summary section – ranked top-3)
   ========================================================================== */

.exa-top-components {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

@media (max-width: 767px) {
    .exa-top-components {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.exa-top-component {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1.25rem 1.25rem;
    background: rgba(196, 149, 106, 0.04);
    border: 1px solid rgba(196, 149, 106, 0.18);
    border-radius: var(--exa-radius);
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.exa-top-component:hover {
    border-color: rgba(196, 149, 106, 0.4);
    box-shadow: 0 6px 24px rgba(196, 149, 106, 0.12);
}

.exa-top-component-primary {
    background: rgba(196, 149, 106, 0.08);
    border-color: rgba(196, 149, 106, 0.35);
}

.exa-top-component-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--exa-gold), transparent);
}

.exa-top-component-rank {
    font-family: var(--exa-font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(196, 149, 106, 0.5);
    margin-bottom: 0.6rem;
}

.exa-top-component-primary .exa-top-component-rank {
    color: var(--exa-gold);
}

.exa-top-component-pct {
    font-family: var(--exa-font-display);
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--exa-gold);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.exa-top-component:not(.exa-top-component-primary) .exa-top-component-pct {
    font-size: 2.2rem;
    color: var(--exa-gold-light);
}

.exa-top-component-name {
    font-family: var(--exa-font-body);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.85rem;
}

.exa-top-component-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: hidden;
}

.exa-top-component-bar i {
    display: block;
    height: 100%;
    background: var(--exa-gold);
    border-radius: 2px;
    opacity: 0.6;
}

.exa-top-component-primary .exa-top-component-bar i {
    opacity: 1;
}

/* ==========================================================================
   INSIGHT PANEL (replaces Bootstrap alert-light – stays dark-themed)
   ========================================================================== */

.exa-insight-panel {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.1rem 1.25rem;
    background: rgba(196, 149, 106, 0.05);
    border: 1px solid rgba(196, 149, 106, 0.2);
    border-left: 3px solid var(--exa-gold);
    border-radius: 0 var(--exa-radius-sm) var(--exa-radius-sm) 0;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--exa-font-body);
    font-size: 0.9rem;
    line-height: 1.65;
}

.exa-insight-panel strong {
    color: var(--exa-text-primary);
}

.exa-insight-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: rgba(196, 149, 106, 0.15);
    border-radius: 50%;
    color: var(--exa-gold);
    font-size: 0.85rem;
    margin-top: 0.05rem;
}

/* ==========================================================================
   PROMPT CHIPS (AI suggested prompts – replaces btn-outline-primary)
   ========================================================================== */

.exa-prompt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: transparent;
    border: 1px solid rgba(196, 149, 106, 0.3);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.65);
    font-family: var(--exa-font-body);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.exa-prompt-chip:hover {
    background: rgba(196, 149, 106, 0.12);
    border-color: var(--exa-gold);
    color: var(--exa-gold-light);
}

/* ==========================================================================
   AI SAMPLE CARD (unlicensed state – replaces bg-light border rounded)
   ========================================================================== */

.exa-ai-sample-card {
    background: rgba(196, 149, 106, 0.04);
    border: 1px solid rgba(196, 149, 106, 0.2);
    border-radius: var(--exa-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.exa-ai-sample-card p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.exa-ai-sample-card p strong {
    color: rgba(255, 255, 255, 0.85);
}

.exa-ai-sample-card ul {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    line-height: 1.75;
    padding-left: 1.25rem;
    margin-bottom: 0;
}

/* ==========================================================================
   ICON CIRCLE (for empty states / feature intros)
   ========================================================================== */

.exa-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(196, 149, 106, 0.1);
    border: 1px solid rgba(196, 149, 106, 0.25);
    border-radius: 50%;
    color: var(--exa-gold);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* ==========================================================================
   COMPOSITION TABLE ROWS (exa-comp-row replaces inline styles)
   ========================================================================== */

.exa-comp-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--exa-radius-sm);
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.exa-comp-row:hover {
    background: rgba(196, 149, 106, 0.08);
    border-color: rgba(196, 149, 106, 0.3);
}

.exa-comp-row:focus {
    outline: 2px solid var(--exa-gold);
    outline-offset: 2px;
}

.exa-comp-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.exa-comp-name {
    font-family: var(--exa-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--exa-text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exa-comp-bar-wrap {
    width: 72px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.exa-comp-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0, 0, 0.2, 1);
}

.exa-comp-pct {
    font-family: var(--exa-font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--exa-gold-light);
    min-width: 48px;
    text-align: right;
    flex-shrink: 0;
}

/* ==========================================================================
   REGION PROGRESS BAR (replaces Bootstrap progress inside region cards)
   ========================================================================== */

.exa-region-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.exa-region-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0, 0, 0.2, 1);
}

/* ==========================================================================
   MINI COMPONENT PILLS (Additional ancestry components row)
   ========================================================================== */

.exa-mini-component {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(196, 149, 106, 0.04);
    border: 1px solid rgba(196, 149, 106, 0.12);
    border-radius: var(--exa-radius-sm);
    transition: border-color 0.2s, background 0.2s;
}

.exa-mini-component:hover {
    background: rgba(196, 149, 106, 0.08);
    border-color: rgba(196, 149, 106, 0.28);
}

.exa-mini-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.exa-mini-name {
    font-family: var(--exa-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--exa-text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exa-mini-pct-badge {
    font-family: var(--exa-font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--exa-gold);
    background: rgba(196, 149, 106, 0.12);
    border: 1px solid rgba(196, 149, 106, 0.25);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    flex-shrink: 0;
}

/* ==========================================================================
   PORTRAIT CARD
   ========================================================================== */

.exa-portrait-card {
    background: linear-gradient(135deg, #12161c 0%, #1a1f2a 100%);
    border: 1px solid rgba(201, 164, 48, 0.18);
    border-radius: var(--exa-radius);
    overflow: hidden;
}

.exa-portrait-card-accent {
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a430, transparent);
}

.exa-portrait-card-body {
    padding: 1.5rem;
}

.exa-portrait-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--exa-gold);
    margin-bottom: 6px;
}

.exa-portrait-title {
    font-family: var(--exa-font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: #f0ece4;
    margin-bottom: 4px;
}

.exa-portrait-description {
    font-size: 13px;
    color: #a89f91;
    margin: 0;
    line-height: 1.5;
}

.exa-portrait-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(201, 164, 48, 0.1);
    border: 1px solid rgba(201, 164, 48, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--exa-gold);
}

.exa-portrait-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}

.exa-portrait-input {
    flex: 1;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 12px;
    color: #f0ece4;
    outline: none;
    font-family: var(--exa-font-body);
    transition: border-color 0.2s;
}

.exa-portrait-input:focus {
    border-color: rgba(196, 149, 106, 0.5);
}

.exa-portrait-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--exa-gold);
    color: #0e1117;
    padding: 9px 20px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    margin-top: 0.85rem;
}

.exa-portrait-btn:hover {
    background: var(--exa-gold-light);
    color: #0e1117;
    text-decoration: none;
}

/* ==========================================================================
   OUTLINE BUTTON
   ========================================================================== */

.exa-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(196, 149, 106, 0.35);
    border-radius: 50px;
    color: var(--exa-gold);
    font-family: var(--exa-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    text-decoration: none;
}

.exa-btn-outline:hover {
    background: rgba(196, 149, 106, 0.1);
    border-color: var(--exa-gold);
    color: var(--exa-gold-light);
    text-decoration: none;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .exa-page-nav,
    .exa-mobile-nav,
    .exa-back-to-top,
    .exa-export-toolbar,
    .exa-scroll-progress,
    .exclusive-region-drawer,
    .exclusive-region-drawer-backdrop {
        display: none !important;
    }
    
    .exa-main {
        padding-bottom: 0;
    }
}

/* ==========================================================================
   MAP CARD HEADER + SUB-MODE TABS
   ========================================================================== */

.exa-mapcard {
    overflow: hidden;
}

.exa-mapcard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: rgba(196, 149, 106, 0.07);
    border-bottom: 1px solid rgba(196, 149, 106, 0.15);
    flex-wrap: wrap;
}

.exa-mapcard-titles {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.exa-mapcard-title {
    font-family: var(--exa-font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--exa-text-primary);
    letter-spacing: 0.02em;
}

.exa-mapcard-subtitle {
    font-family: var(--exa-font-body);
    font-size: 0.75rem;
    color: var(--exa-text-muted);
}

.exa-mapcard-footnote {
    margin: 0;
    padding: 0.55rem 1.1rem;
    font-size: 0.75rem;
    color: var(--exa-text-muted);
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Map mode sub-tabs */
.exa-mapmode-tabs {
    display: flex;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 3px;
    flex-shrink: 0;
}

.exa-mapmode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--exa-font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--exa-text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.65rem;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}

.exa-mapmode-tab:hover {
    color: var(--exa-text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.exa-mapmode-tab.active {
    background: var(--exa-gold);
    color: var(--exa-text-dark);
    font-weight: 600;
}

@media (max-width: 480px) {
    .exa-mapcard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
    .exa-mapmode-tabs {
        width: 100%;
        justify-content: stretch;
    }
    .exa-mapmode-tab {
        flex: 1;
        text-align: center;
    }
}

/* ==========================================================================
   POPULATION BREAKDOWN - PRIMARY ROW + PILL
   ========================================================================== */

.exa-composition-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.exa-comp-info-btn {
    background: transparent;
    border: none;
    padding: 0.25rem;
    color: var(--exa-text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
    flex-shrink: 0;
}

.exa-comp-info-btn:hover {
    color: var(--exa-gold-light);
    background: rgba(196, 149, 106, 0.12);
}

.exa-comp-row.is-primary {
    border-left: 3px solid var(--accent, var(--exa-gold));
    padding-left: calc(0.75rem - 3px);
    background: rgba(196, 149, 106, 0.05);
}

.exa-comp-primary {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--exa-gold);
    background: rgba(196, 149, 106, 0.15);
    border: 1px solid rgba(196, 149, 106, 0.3);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    margin-left: 0.45rem;
    vertical-align: middle;
    white-space: nowrap;
}

/* ==========================================================================
   POPULATION BREAKDOWN - "OTHER" EXPANDABLE GROUP
   ========================================================================== */

.exa-comp-other-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--exa-radius-sm);
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    color: var(--exa-text-muted);
    font-family: var(--exa-font-body);
    font-size: 0.85rem;
}

.exa-comp-other-toggle:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(196, 149, 106, 0.25);
    color: var(--exa-text-primary);
}

.exa-comp-other-toggle-inner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.exa-comp-other-count {
    font-size: 0.72rem;
    color: var(--exa-text-muted);
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
}

.exa-comp-other-total {
    font-family: var(--exa-font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--exa-text-muted);
}

.exa-comp-other-chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.22s ease;
    flex-shrink: 0;
}

.exa-comp-other-toggle[aria-expanded="true"] .exa-comp-other-chevron {
    transform: rotate(-135deg);
}

.exa-comp-other-children {
    padding-left: 0.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0.4rem;
}

.exa-comp-row-sub {
    opacity: 0.88;
}

.exa-comp-row-sub:hover {
    opacity: 1;
}

.exa-comp-swatch-sm {
    width: 7px;
    height: 7px;
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   POPULATION BREAKDOWN - FOOTNOTE
   ========================================================================== */

.exa-comp-footnote {
    font-family: var(--exa-font-body);
    font-size: 0.72rem;
    color: var(--exa-text-muted);
    margin: 0.6rem 0 0;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1.5;
}

/* ==========================================================================
   RECENTER CONTROL BUTTON
   ========================================================================== */

.exa-recenter-control a,
.exa-recenter-control button {
    display: block;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #333;
    text-align: center;
    line-height: 26px;
    text-decoration: none;
    transition: background 0.15s;
}

.exa-recenter-control a:hover,
.exa-recenter-control button:hover {
    background: #f4f4f4;
}

/* ==========================================================================
   RICH LEAFLET TOOLTIP (exa-map-tooltip-skin)
   ========================================================================== */

.leaflet-tooltip.exa-map-tooltip-skin {
    background: rgba(15, 15, 20, 0.96) !important;
    border: 1px solid rgba(196, 149, 106, 0.35) !important;
    border-radius: 8px !important;
    padding: 0 !important;
    color: #fff !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55) !important;
    max-width: 240px;
    pointer-events: none;
}

.leaflet-tooltip.exa-map-tooltip-skin::before {
    display: none !important;
}

.exa-map-tip {
    padding: 0.7rem 0.9rem 0.65rem;
}

.exa-map-tip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.exa-map-tip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.exa-map-tip-name {
    font-family: var(--exa-font-display);
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exa-map-tip-pct {
    font-family: var(--exa-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--exa-gold-light);
    margin-bottom: 0.3rem;
}

.exa-map-tip-primary {
    display: inline-flex;
    align-items: center;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--exa-gold);
    background: rgba(196, 149, 106, 0.15);
    border: 1px solid rgba(196, 149, 106, 0.3);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    margin-bottom: 0.25rem;
}

.exa-map-tip-desc {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.45;
    margin-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 0.35rem;
}

/* ==========================================================================
   FREEMIUM UPSELL BANNER (free teaser calculator for unlicensed users)
   ========================================================================== */
.exa-free-banner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, rgba(30, 125, 82, 0.18) 0%, rgba(30, 125, 82, 0.08) 100%);
    border: 1px solid rgba(47, 170, 112, 0.45);
    border-left: 4px solid #2faa70;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.exa-free-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(47, 170, 112, 0.18);
    color: #3fcf8e;
    font-size: 1.35rem;
}

.exa-free-banner-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    line-height: 1.5;
}

.exa-free-banner-text strong {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
}

.exa-free-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    background: #1e7d52;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(30, 125, 82, 0.35);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.exa-free-banner-cta:hover,
.exa-free-banner-cta:focus {
    background: #25a06a;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(30, 125, 82, 0.45);
}

@media (max-width: 640px) {
    .exa-free-banner {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1.1rem 1.15rem;
    }

    .exa-free-banner-text {
        flex: 1 1 14rem;
    }

    .exa-free-banner-cta {
        flex: 1 1 100%;
        justify-content: center;
    }
}

