﻿/** * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * 
 * Contemporary Population Origins Report V2 - Cinematic Living Design
 * Warm, vibrant tones celebrating living communities and human connection
 */

/* ========================================
   CSS Custom Properties - Warm Living Palette
   ======================================== */
:root {
    /* Primary Colors - Warm & Living */
    --cpo-coral: #E07A5F;
    --cpo-coral-light: #F2A690;
    --cpo-coral-dark: #C86B4E;
    --cpo-amber: #E9A319;
    --cpo-amber-light: #F5C85D;
    --cpo-terracotta: #C86B4E;
    --cpo-teal: #3D8B8B;
    --cpo-teal-light: #5DAEAE;
    --cpo-teal-dark: #2D6B6B;
    
    /* Neutral Colors */
    --cpo-cream: #FDF8F3;
    --cpo-cream-dark: #F5EDE5;
    --cpo-warm-white: #FFFAF6;
    --cpo-charcoal: #2D3436;
    --cpo-charcoal-soft: #434A4C;
    --cpo-text: #3A3A3A;
    --cpo-text-muted: #6B6B6B;
    --cpo-white: #FFFFFF;
    --cpo-border: rgba(45, 52, 54, 0.12);
    
    /* Community Colors */
    --cpo-europe: #4A90A4;
    --cpo-asia: #9B59B6;
    --cpo-africa: #27AE60;
    --cpo-americas: #E74C3C;
    --cpo-oceania: #F39C12;
    
    /* Typography */
    --cpo-font-serif: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
    --cpo-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Shadows */
    --cpo-shadow-sm: 0 2px 8px rgba(45, 52, 54, 0.06);
    --cpo-shadow-md: 0 8px 24px rgba(45, 52, 54, 0.10);
    --cpo-shadow-lg: 0 16px 48px rgba(45, 52, 54, 0.14);
    --cpo-shadow-xl: 0 24px 64px rgba(45, 52, 54, 0.18);
    --cpo-shadow-coral: 0 8px 32px rgba(224, 122, 95, 0.25);
    --cpo-shadow-warm: 0 12px 40px rgba(233, 163, 25, 0.20);
    
    /* Borders */
    --cpo-radius-sm: 8px;
    --cpo-radius-md: 16px;
    --cpo-radius-lg: 24px;
    --cpo-radius-xl: 32px;
    
    /* Transitions */
    --cpo-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --cpo-transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --cpo-transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   Base & Typography
   ======================================== */
.cpo-main {
    font-family: var(--cpo-font-sans);
    color: var(--cpo-text);
    background: var(--cpo-cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cpo-main h1,
.cpo-main h2,
.cpo-main h3,
.cpo-main h4 {
    font-family: var(--cpo-font-serif);
    font-weight: 600;
    color: var(--cpo-charcoal);
    line-height: 1.2;
}

.cpo-main p {
    line-height: 1.7;
}

/* ========================================
   Accessibility
   ======================================== */
.cpo-skip-link {
    position: absolute;
    left: -999px;
    top: 10px;
    z-index: 2000;
    background: var(--cpo-white);
    color: var(--cpo-charcoal);
    padding: 12px 16px;
    border-radius: var(--cpo-radius-sm);
    box-shadow: var(--cpo-shadow-lg);
    text-decoration: none;
    font-weight: 600;
}

.cpo-skip-link:focus {
    left: 10px;
    outline: 3px solid var(--cpo-coral);
}

/* ========================================
   Scroll Progress Bar
   ======================================== */
.cpo-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cpo-coral) 0%, var(--cpo-amber) 100%);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ========================================
   Page Navigation Dots
   ======================================== */
.cpo-page-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: var(--cpo-transition);
}

.cpo-page-nav.visible {
    opacity: 1;
    visibility: visible;
}

.cpo-nav-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(45, 52, 54, 0.2);
    border: 2px solid rgba(45, 52, 54, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: var(--cpo-transition);
    cursor: pointer;
}

.cpo-nav-dot:hover,
.cpo-nav-dot:focus {
    transform: scale(1.2);
    background: rgba(224, 122, 95, 0.6);
    outline: none;
}

.cpo-nav-dot.active {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-amber) 100%);
    transform: scale(1.2);
    border-color: var(--cpo-coral);
}

.cpo-nav-dot::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(45, 52, 54, 0.95);
    color: var(--cpo-white);
    padding: 8px 14px;
    border-radius: var(--cpo-radius-sm);
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cpo-nav-dot:hover::after,
.cpo-nav-dot:focus::after {
    opacity: 1;
}

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

/* ========================================
   Back to Top Button
   ======================================== */
.cpo-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 24px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-amber) 100%);
    color: var(--cpo-white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--cpo-transition);
    z-index: 1100;
    box-shadow: var(--cpo-shadow-lg);
}

.cpo-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.cpo-back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--cpo-shadow-coral);
}

/* ========================================
   Mobile Bottom Navigation
   ======================================== */
.cpo-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1250;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(224, 122, 95, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
}

.cpo-bottom-nav-item {
    text-decoration: none;
    color: var(--cpo-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--cpo-transition);
    opacity: 0.7;
}

.cpo-bottom-nav-item i {
    font-size: 1.1rem;
    color: var(--cpo-text-muted);
    transition: var(--cpo-transition);
}

.cpo-bottom-nav-item:hover {
    color: var(--cpo-coral);
    text-decoration: none;
    opacity: 1;
}

.cpo-bottom-nav-item:hover i {
    color: var(--cpo-coral);
    transform: scale(1.1);
}

.cpo-bottom-nav-item.active {
    color: var(--cpo-coral);
    text-decoration: none;
    opacity: 1;
    font-weight: 600;
}

.cpo-bottom-nav-item.active i {
    color: var(--cpo-amber);
    transform: scale(1.15);
}

/* Adjust main content padding for bottom nav on mobile */
@media (max-width: 767.98px) {
    .cpo-main {
        padding-bottom: 80px;
    }
    
    .cpo-back-to-top {
        bottom: 90px;
    }
}

/* ========================================
   HERO SECTION - Results Display
   ======================================== */
.cpo-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 60px;
    overflow: hidden;
}

.cpo-hero-bg {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, rgba(45, 52, 54, 0.75) 0%, rgba(61, 139, 139, 0.65) 50%, rgba(45, 52, 54, 0.8) 100%),
        url('/img/reports/ancestry/shared-modern-origins/sharedmodernorigins-hero.webp');
    background-size: cover;
    background-position: center;
}

.cpo-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(45, 52, 54, 0.3) 100%);
}

/* Connection threads effect */
.cpo-hero-threads {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(224, 122, 95, 0.4) 0%, transparent 25%),
        radial-gradient(circle at 80% 40%, rgba(233, 163, 25, 0.3) 0%, transparent 20%),
        radial-gradient(circle at 50% 70%, rgba(61, 139, 139, 0.35) 0%, transparent 30%),
        radial-gradient(circle at 30% 80%, rgba(224, 122, 95, 0.25) 0%, transparent 20%);
    animation: cpoThreadsFloat 20s ease-in-out infinite alternate;
}

@keyframes cpoThreadsFloat {
    0% { transform: scale(1) translateY(0); opacity: 0.12; }
    50% { opacity: 0.18; }
    100% { transform: scale(1.05) translateY(-20px); opacity: 0.12; }
}

.cpo-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    color: var(--cpo-white);
}

.cpo-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(224, 122, 95, 0.25);
    border: 1px solid rgba(224, 122, 95, 0.5);
    color: var(--cpo-coral-light);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.cpo-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.15;
}

.cpo-title-line {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    font-size: 0.65em;
    margin-bottom: 0.15em;
}

.cpo-title-accent {
    display: block;
    background: linear-gradient(135deg, var(--cpo-coral-light) 0%, var(--cpo-amber-light) 50%, var(--cpo-teal-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cpo-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 28px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Stats */
.cpo-hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cpo-stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--cpo-radius-md);
    padding: 16px 24px;
    min-width: 140px;
}

.cpo-stat-value {
    display: block;
    font-family: var(--cpo-font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--cpo-amber-light);
    line-height: 1;
}

.cpo-stat-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Trust Badges */
.cpo-trust-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.cpo-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.cpo-trust-item i {
    color: var(--cpo-coral-light);
}

/* ========================================
   SECTION COMMON STYLES
   ======================================== */
.cpo-section {
    padding: 80px 0;
    position: relative;
}

.cpo-section-light {
    background: var(--cpo-white);
}

.cpo-section-cream {
    background: var(--cpo-cream);
}

.cpo-section-warm {
    background: linear-gradient(135deg, var(--cpo-charcoal) 0%, #3D4F4F 50%, var(--cpo-charcoal) 100%);
    color: var(--cpo-white);
}

.cpo-section-warm h2,
.cpo-section-warm h3,
.cpo-section-warm h4 {
    color: var(--cpo-white);
}

.cpo-section-warm p {
    color: rgba(255, 255, 255, 0.85);
}

/* Chapter Headers */
.cpo-chapter-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.cpo-chapter-number {
    display: inline-block;
    font-family: var(--cpo-font-serif);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cpo-coral);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    position: relative;
}

.cpo-chapter-number::before,
.cpo-chapter-number::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cpo-coral));
}

.cpo-chapter-number::before {
    right: calc(100% + 16px);
}

.cpo-chapter-number::after {
    left: calc(100% + 16px);
    background: linear-gradient(90deg, var(--cpo-coral), transparent);
}

.cpo-section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--cpo-charcoal);
}

.cpo-section-subtitle {
    font-size: 1.1rem;
    color: var(--cpo-text-muted);
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto;
}

.cpo-section-warm .cpo-section-title {
    color: var(--cpo-white);
}

.cpo-section-warm .cpo-section-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

.cpo-section-warm .cpo-chapter-number {
    color: var(--cpo-amber-light);
}

.cpo-section-warm .cpo-chapter-number::before,
.cpo-section-warm .cpo-chapter-number::after {
    background: linear-gradient(90deg, transparent, var(--cpo-amber-light));
}

.cpo-section-warm .cpo-chapter-number::after {
    background: linear-gradient(90deg, var(--cpo-amber-light), transparent);
}

/* ========================================
   CONFIDENCE LEVEL TABS - Modern Pills
   ======================================== */
.cpo-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.cpo-tabs {
    display: inline-flex;
    background: var(--cpo-cream-dark);
    border-radius: 50px;
    padding: 6px;
    gap: 4px;
    box-shadow: var(--cpo-shadow-sm);
}

.cpo-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--cpo-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--cpo-transition);
    text-decoration: none;
}

.cpo-tab:hover {
    color: var(--cpo-charcoal);
    background: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.cpo-tab.active {
    background: var(--cpo-white);
    color: var(--cpo-charcoal);
    box-shadow: var(--cpo-shadow-md);
}

.cpo-tab-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpo-tab-badge.speculative {
    background: rgba(255, 193, 7, 0.2);
    color: #D4A006;
}

.cpo-tab-badge.intermediate {
    background: rgba(23, 162, 184, 0.2);
    color: #138496;
}

.cpo-tab-badge.conservative {
    background: rgba(40, 167, 69, 0.2);
    color: #1E7E34;
}

/* Legacy Bootstrap tabs compatibility */
.nav-pills.cpo-styled {
    display: inline-flex;
    background: var(--cpo-cream-dark);
    border-radius: 50px;
    padding: 6px;
    gap: 4px;
    box-shadow: var(--cpo-shadow-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.nav-pills.cpo-styled .nav-item {
    margin: 0;
}

.nav-pills.cpo-styled .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cpo-text-muted);
    background: transparent;
    border: none;
    transition: var(--cpo-transition);
}

.nav-pills.cpo-styled .nav-link:hover {
    color: var(--cpo-charcoal);
    background: rgba(255, 255, 255, 0.5);
}

.nav-pills.cpo-styled .nav-link.active {
    background: var(--cpo-white);
    color: var(--cpo-charcoal);
    box-shadow: var(--cpo-shadow-md);
}

/* ========================================
   AT-A-GLANCE SUMMARY CARDS
   ======================================== */
.cpo-summary-card {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
    overflow: hidden;
    margin-bottom: 40px;
}

.cpo-summary-header {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    padding: 20px 28px;
    color: var(--cpo-white);
}

.cpo-summary-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpo-summary-body {
    padding: 28px;
}

.cpo-top-regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.cpo-top-region-item {
    text-align: center;
    padding: 20px;
    background: var(--cpo-cream);
    border-radius: var(--cpo-radius-md);
    transition: var(--cpo-transition);
}

.cpo-top-region-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--cpo-shadow-md);
}

.cpo-top-region-percentage {
    font-family: var(--cpo-font-serif);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--cpo-coral);
    line-height: 1;
    margin-bottom: 8px;
}

.cpo-top-region-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cpo-charcoal);
    margin-bottom: 4px;
}

.cpo-top-region-continent {
    font-size: 0.85rem;
    color: var(--cpo-text-muted);
}

.cpo-quick-insights {
    background: var(--cpo-cream);
    padding: 20px 24px;
    border-radius: var(--cpo-radius-md);
}

.cpo-quick-insights h5 {
    color: var(--cpo-coral);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpo-quick-insights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cpo-quick-insights ul li {
    padding-left: 24px;
    margin-bottom: 10px;
    position: relative;
    color: var(--cpo-text);
    font-size: 0.95rem;
}

.cpo-quick-insights ul li:last-child {
    margin-bottom: 0;
}

.cpo-quick-insights ul li::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--cpo-coral);
}

/* ========================================
   VIEW EXPLANATION CARDS
   ======================================== */
.cpo-view-explanation {
    background: linear-gradient(135deg, rgba(224, 122, 95, 0.08) 0%, rgba(233, 163, 25, 0.08) 100%);
    border-left: 4px solid var(--cpo-coral);
    padding: 24px 28px;
    border-radius: 0 var(--cpo-radius-md) var(--cpo-radius-md) 0;
    margin-bottom: 32px;
}

.cpo-view-explanation h5 {
    color: var(--cpo-charcoal);
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpo-view-explanation p {
    color: var(--cpo-text);
    margin-bottom: 16px;
}

.cpo-view-explanation p:last-child {
    margin-bottom: 0;
}

.cpo-view-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.cpo-view-feature {
    background: var(--cpo-white);
    padding: 16px;
    border-radius: var(--cpo-radius-sm);
}

.cpo-view-feature strong {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--cpo-charcoal);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.cpo-view-feature ul {
    margin: 0;
    padding-left: 18px;
    font-size: 0.85rem;
    color: var(--cpo-text-muted);
}

.cpo-view-feature ul li {
    margin-bottom: 4px;
}

/* ========================================
   MAP CONTAINER
   ======================================== */
.cpo-map-container {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    padding: 24px;
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
    margin-bottom: 32px;
}

.cpo-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.cpo-map-header h4 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpo-map-header h4 i {
    color: var(--cpo-coral);
}

.cpo-map-wrapper {
    border-radius: var(--cpo-radius-md);
    overflow: hidden;
}

.cpo-map-wrapper .mapcontinental {
    height: 500px;
    width: 100%;
    border-radius: var(--cpo-radius-md);
}

@media (max-width: 768px) {
    .cpo-map-wrapper .mapcontinental {
        height: 350px;
    }
}

/* ========================================
   ANCESTRY BREAKDOWN TABLE
   ======================================== */
.cpo-ancestry-table {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    overflow: hidden;
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
}

.cpo-continent-section {
    border-bottom: 1px solid var(--cpo-border);
}

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

.cpo-continent-header {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--cpo-transition);
}

.cpo-continent-header:hover {
    filter: brightness(0.95);
}

.cpo-continent-header.europe {
    background: linear-gradient(135deg, var(--cpo-europe) 0%, #5DAEAE 100%);
    color: white;
}

.cpo-continent-header.asia {
    background: linear-gradient(135deg, var(--cpo-asia) 0%, #A569BD 100%);
    color: white;
}

.cpo-continent-header.africa {
    background: linear-gradient(135deg, var(--cpo-africa) 0%, #2ECC71 100%);
    color: white;
}

.cpo-continent-header.americas {
    background: linear-gradient(135deg, var(--cpo-americas) 0%, #F1948A 100%);
    color: white;
}

.cpo-continent-header.oceania {
    background: linear-gradient(135deg, var(--cpo-oceania) 0%, #F7DC6F 100%);
    color: white;
}

.cpo-continent-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpo-continent-percentage {
    font-size: 1.25rem;
    font-weight: 700;
}

.cpo-region-subheader {
    background: var(--cpo-cream);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--cpo-border);
}

.cpo-region-name {
    color: var(--cpo-charcoal-soft);
    font-weight: 500;
    font-size: 0.95rem;
}

.cpo-region-percentage {
    color: var(--cpo-text);
    font-weight: 600;
}

.cpo-population-row {
    padding: 14px 24px 14px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--cpo-border);
    transition: var(--cpo-transition);
    cursor: pointer;
}

.cpo-population-row:hover {
    background: rgba(224, 122, 95, 0.05);
}

.cpo-population-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cpo-color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.cpo-population-name {
    font-size: 0.95rem;
    color: var(--cpo-text);
}

.cpo-percentage-container {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.cpo-percentage-value {
    font-weight: 600;
    color: var(--cpo-charcoal);
    min-width: 55px;
    text-align: right;
    font-size: 0.95rem;
}

.cpo-percentage-bar {
    flex: 1;
    height: 8px;
    background: var(--cpo-cream-dark);
    border-radius: 4px;
    overflow: hidden;
}

.cpo-percentage-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease-out;
    background: linear-gradient(90deg, var(--cpo-coral) 0%, var(--cpo-amber) 100%);
}

/* ========================================
   REGION CARDS SECTION
   ======================================== */
.cpo-regions-section {
    margin-top: 48px;
}

.cpo-regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.cpo-region-card {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    overflow: hidden;
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
    transition: var(--cpo-transition);
}

.cpo-region-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cpo-shadow-lg);
}

.cpo-region-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.cpo-region-card-body {
    padding: 24px;
}

.cpo-region-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cpo-region-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cpo-charcoal);
    margin: 0;
}

.cpo-region-card-percentage {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-amber) 100%);
    color: var(--cpo-white);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
}

.cpo-region-card-continent {
    font-size: 0.85rem;
    color: var(--cpo-text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cpo-region-card-description {
    font-size: 0.95rem;
    color: var(--cpo-text);
    line-height: 1.6;
    margin-bottom: 16px;
}

.cpo-region-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cpo-coral);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--cpo-transition);
}

.cpo-region-card-link:hover {
    color: var(--cpo-terracotta);
    text-decoration: none;
}

/* ========================================
   AI ASSISTANT SECTION
   ======================================== */
.cpo-ai-section {
    background: linear-gradient(135deg, rgba(224, 122, 95, 0.08) 0%, rgba(233, 163, 25, 0.08) 100%);
    border-radius: var(--cpo-radius-lg);
    padding: 32px;
    border: 1px solid rgba(224, 122, 95, 0.2);
    margin-top: 40px;
}

.cpo-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.cpo-ai-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cpo-ai-title h4 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--cpo-charcoal);
}

.cpo-ai-title h4 i {
    color: var(--cpo-coral);
}

.cpo-ai-title small {
    color: var(--cpo-text-muted);
    font-weight: 400;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cpo-ai-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.cpo-ai-badge.enabled {
    background: rgba(40, 167, 69, 0.15);
    color: #1E7E34;
}

.cpo-ai-badge.disabled {
    background: rgba(255, 193, 7, 0.15);
    color: #D4A006;
}

.cpo-ai-info {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cpo-ai-info i {
    color: var(--cpo-teal);
    margin-top: 2px;
}

.cpo-ai-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--cpo-text);
}

.cpo-suggested-prompts {
    margin-bottom: 20px;
}

.cpo-suggested-prompts p {
    font-size: 0.85rem;
    color: var(--cpo-text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cpo-prompt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cpo-white);
    border: 1px solid var(--cpo-border);
    border-radius: 50px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cpo-text);
    cursor: pointer;
    transition: var(--cpo-transition);
    margin-right: 8px;
    margin-bottom: 8px;
}

.cpo-prompt-btn:hover {
    background: var(--cpo-coral);
    color: var(--cpo-white);
    border-color: var(--cpo-coral);
}

.cpo-prompt-btn i {
    color: var(--cpo-coral);
}

.cpo-prompt-btn:hover i {
    color: var(--cpo-white);
}

.cpo-ai-main-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    color: var(--cpo-white);
    border: none;
    border-radius: 50px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--cpo-transition);
    box-shadow: var(--cpo-shadow-coral);
}

.cpo-ai-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--cpo-shadow-lg);
}

.cpo-ai-main-btn img {
    width: 24px;
    height: 24px;
}

.cpo-ai-results {
    margin-top: 24px;
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    padding: 24px;
    min-height: 100px;
    display: none;
}

.cpo-ai-results.visible {
    display: block;
}

.cpo-ai-sample-output {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    padding: 24px;
    margin-top: 20px;
}

.cpo-ai-sample-output h6 {
    color: var(--cpo-charcoal);
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpo-ai-sample-output h6 i {
    color: var(--cpo-amber);
}

.cpo-ai-sample-content {
    background: var(--cpo-cream);
    border-radius: var(--cpo-radius-sm);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.cpo-ai-sample-content p:first-child {
    margin-bottom: 8px;
}

.cpo-ai-sample-content p:last-child {
    margin-bottom: 0;
    color: var(--cpo-text-muted);
    font-size: 0.9rem;
}

.cpo-ai-unlock-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    color: var(--cpo-white);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--cpo-transition);
}

.cpo-ai-unlock-btn:hover {
    transform: translateY(-2px);
    color: var(--cpo-white);
    text-decoration: none;
}

/* ========================================
   UNDERSTANDING SECTION
   ======================================== */
.cpo-understanding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.cpo-understanding-card {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    padding: 28px;
    text-align: center;
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
    transition: var(--cpo-transition);
}

.cpo-understanding-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cpo-shadow-lg);
}

.cpo-understanding-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--cpo-cream) 0%, var(--cpo-cream-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--cpo-coral);
}

.cpo-understanding-icon i {
    font-size: 1.75rem;
    color: var(--cpo-coral);
}

.cpo-understanding-card h4 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--cpo-charcoal);
}

.cpo-understanding-card p {
    font-size: 0.95rem;
    color: var(--cpo-text-muted);
    margin: 0;
    line-height: 1.6;
}

.cpo-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.cpo-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--cpo-white);
    padding: 20px;
    border-radius: var(--cpo-radius-md);
    box-shadow: var(--cpo-shadow-sm);
    transition: var(--cpo-transition);
}

.cpo-info-item:hover {
    box-shadow: var(--cpo-shadow-md);
}

.cpo-info-item i {
    color: var(--cpo-coral);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.cpo-info-content h6 {
    font-family: var(--cpo-font-sans);
    font-weight: 600;
    color: var(--cpo-charcoal);
    margin-bottom: 6px;
    font-size: 1rem;
}

.cpo-info-content p {
    font-size: 0.9rem;
    color: var(--cpo-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   FAQ ACCORDION
   ======================================== */
.cpo-faq-section {
    max-width: 900px;
    margin: 0 auto;
}

.cpo-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cpo-faq-item {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    overflow: hidden;
    box-shadow: var(--cpo-shadow-sm);
    border: 1px solid var(--cpo-border);
}

.cpo-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: 20px 24px;
    color: var(--cpo-charcoal);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--cpo-transition);
}

.cpo-faq-question:hover {
    background: rgba(224, 122, 95, 0.05);
}

.cpo-faq-question span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cpo-faq-question span .dna-icon:first-child {
    color: var(--cpo-coral);
    font-size: 1.1rem;
}

.cpo-faq-question .dna-icon-chevron-down {
    color: var(--cpo-text-muted);
    transition: transform 0.3s ease;
}

.cpo-faq-question[aria-expanded="true"] .dna-icon-chevron-down,
.cpo-faq-question:not(.collapsed) .dna-icon-chevron-down {
    transform: rotate(180deg);
}

.cpo-faq-answer {
    padding: 0 24px 20px;
    color: var(--cpo-text);
    line-height: 1.7;
}

.cpo-faq-answer p {
    margin-bottom: 12px;
}

.cpo-faq-answer p:last-child {
    margin-bottom: 0;
}

.cpo-faq-answer ul {
    margin: 12px 0;
    padding-left: 24px;
}

.cpo-faq-answer ul li {
    margin-bottom: 8px;
}

/* Bootstrap collapse compatibility */
.cpo-faq-item .collapse:not(.show) {
    display: none;
}

.cpo-faq-item .collapse.show + .cpo-faq-question .dna-icon-chevron-down,
.cpo-faq-item .collapsing + .cpo-faq-question .dna-icon-chevron-down {
    transform: rotate(180deg);
}

/* ========================================
   METHODOLOGY SECTION
   ======================================== */
.cpo-methodology-card {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    overflow: hidden;
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
    max-width: 900px;
    margin: 0 auto;
}

.cpo-methodology-header {
    background: linear-gradient(135deg, var(--cpo-charcoal) 0%, var(--cpo-charcoal-soft) 100%);
    padding: 20px 28px;
    color: var(--cpo-white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--cpo-transition);
}

.cpo-methodology-header:hover {
    filter: brightness(1.1);
}

.cpo-methodology-header h5 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cpo-white);
}

.cpo-methodology-header .dna-icon-chevron-down {
    transition: transform 0.3s ease;
    color: var(--cpo-white);
}

.cpo-methodology-header[aria-expanded="true"] .dna-icon-chevron-down,
.cpo-methodology-header:not(.collapsed) .dna-icon-chevron-down {
    transform: rotate(180deg);
}

.cpo-methodology-body {
    padding: 28px;
}

.cpo-methodology-body h6 {
    color: var(--cpo-charcoal);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpo-methodology-body h6:first-child {
    margin-top: 0;
}

.cpo-methodology-body h6 i {
    color: var(--cpo-coral);
}

.cpo-methodology-body p {
    color: var(--cpo-text);
    line-height: 1.7;
    margin-bottom: 12px;
}

.cpo-methodology-body ul {
    margin: 12px 0;
    padding-left: 24px;
    color: var(--cpo-text);
}

.cpo-methodology-body ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ========================================
   EXPORT & PRINT ACTIONS
   ======================================== */
.cpo-actions-card {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    padding: 24px 28px;
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
    margin-top: 40px;
}

.cpo-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cpo-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cpo-white);
    border: 2px solid var(--cpo-border);
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cpo-charcoal);
    cursor: pointer;
    transition: var(--cpo-transition);
}

.cpo-action-btn:hover {
    border-color: var(--cpo-coral);
    color: var(--cpo-coral);
}

.cpo-action-btn i {
    font-size: 1rem;
}

/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */
.cpo-alert {
    border-radius: var(--cpo-radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cpo-alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(23, 162, 184, 0.05) 100%);
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.cpo-alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.cpo-alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.cpo-alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.cpo-alert-info .cpo-alert-icon { color: #17a2b8; }
.cpo-alert-success .cpo-alert-icon { color: #28a745; }
.cpo-alert-warning .cpo-alert-icon { color: #ffc107; }

.cpo-alert-content h5 {
    font-family: var(--cpo-font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--cpo-charcoal);
}

.cpo-alert-content p {
    margin: 0;
    color: var(--cpo-text);
    font-size: 0.95rem;
}

.cpo-alert-content .btn {
    margin-top: 12px;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.cpo-animate-fade-in {
    animation: cpoFadeIn 0.8s ease-out forwards;
}

.cpo-animate-fade-in-up {
    animation: cpoFadeInUp 0.8s ease-out forwards;
}

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

@keyframes cpoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Scroll reveal */
.cpo-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.cpo-reveal.revealed {
    opacity: 1;
    /* IMPORTANT:
       When a parent element has a CSS transform (even translateY(0)),
       fixed-position descendants become relative to that parent instead of the viewport.
       This breaks full-screen overlays/drawers rendered inside reveal sections.
       Using `transform: none` restores correct viewport-fixed behavior. */
    transform: none;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */
@media (max-width: 991px) {
    .cpo-hero {
        min-height: 100vh;
        padding: 80px 20px 50px;
    }
    
    .cpo-hero-stats {
        gap: 16px;
    }
    
    .cpo-stat-item {
        min-width: 120px;
        padding: 14px 18px;
    }
    
    .cpo-section {
        padding: 60px 0;
    }
}

@media (max-width: 767px) {
    .cpo-hero-title {
        font-size: 1.75rem;
    }
    
    .cpo-section-title {
        font-size: 1.5rem;
    }
    
    .cpo-tabs-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        justify-content: flex-start;  /* Override centering for scroll */
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .nav-pills.cpo-styled {
        flex-wrap: nowrap;
        padding: 4px;
        min-width: max-content;  /* Prevent shrinking */
    }
    
    .nav-pills.cpo-styled .nav-link {
        padding: 10px 14px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .cpo-top-regions-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .cpo-percentage-container {
        min-width: 100px;
    }
    
    .cpo-percentage-bar {
        display: none;
    }
    
    .cpo-population-row {
        padding-left: 24px;
    }
    
    .cpo-actions-row {
        flex-direction: column;
    }
    
    .cpo-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* FAQ and Methodology responsive adjustments */
    .cpo-faq-section,
    .cpo-methodology-card {
        max-width: 100%;
        margin-left: 16px;
        margin-right: 16px;
    }
    
    .cpo-faq-question {
        padding: 16px 20px;
        font-size: 0.95rem;
    }
    
    .cpo-faq-answer {
        padding: 0 20px 16px;
    }
    
    .cpo-methodology-header {
        padding: 16px 20px;
    }
    
    .cpo-methodology-body {
        padding: 20px;
    }
    
    /* Responsive fixes for chromosome browser */
    .cpo-main .dar-chromo-visualization .row.no-gutters .col-1 {
        flex: 0 0 40px;
        max-width: 40px;
        padding-right: 8px;
    }
    
    .cpo-main .dar-chromo-visualization .row.no-gutters .col-11 {
        flex: 0 0 calc(100% - 48px);
        max-width: calc(100% - 48px);
    }
    
    .cpo-main .dar-chromo-label {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        margin-right: 8px;
    }
}

@media (max-width: 575px) {
    .cpo-top-regions-grid {
        grid-template-columns: 1fr;
    }
    
    .cpo-hero-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .cpo-stat-item {
        width: 100%;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .cpo-page-nav,
    .cpo-back-to-top,
    .cpo-bottom-nav,
    .cpo-scroll-progress,
    .cpo-hero-threads,
    .cpo-ai-section,
    .cpo-actions-card,
    .nav-pills,
    .cpo-tabs-container {
        display: none !important;
    }
    
    .cpo-hero {
        min-height: auto;
        padding: 40px 20px;
        background: #f5f5f5 !important;
    }
    
    .cpo-hero-bg {
        display: none;
    }
    
    .cpo-hero-content {
        color: #333;
    }
    
    .cpo-hero-title,
    .cpo-title-accent {
        color: #333;
        -webkit-text-fill-color: #333;
    }
    
    .cpo-section {
        padding: 30px 0;
        page-break-inside: avoid;
    }
    
    .cpo-map-container,
    .cpo-map-wrapper {
        display: none;
    }
    
    .collapse {
        display: block !important;
        height: auto !important;
    }
    
    .cpo-faq-answer {
        display: block !important;
    }
    
    body {
        font-size: 11pt;
    }
}

/* ========================================
   ACCESSIBILITY - Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cpo-hero-threads {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   HIGH CONTRAST MODE
   ======================================== */
@media (prefers-contrast: high) {
    .cpo-main {
        background: white;
    }
    
    .cpo-section-cream {
        background: #f0f0f0;
    }
    
    .cpo-summary-card,
    .cpo-ancestry-table,
    .cpo-region-card,
    .cpo-understanding-card,
    .cpo-faq-item {
        border: 2px solid currentColor !important;
    }
}

/* ========================================
   FAQ TEXT COLOR FIX - Warm Section Override
   Fix: White text on white background issue
   ======================================== */
.cpo-section-warm .cpo-faq-item {
    background: var(--cpo-white);
}

.cpo-section-warm .cpo-faq-question {
    color: var(--cpo-charcoal);
}

.cpo-section-warm .cpo-faq-question span {
    color: var(--cpo-charcoal);
}

.cpo-section-warm .cpo-faq-question span i:first-child {
    color: var(--cpo-coral);
}

.cpo-section-warm .cpo-faq-question .dna-icon-chevron-down {
    color: var(--cpo-text-muted);
}

.cpo-section-warm .cpo-faq-answer {
    color: var(--cpo-text);
}

.cpo-section-warm .cpo-faq-answer p,
.cpo-section-warm .cpo-faq-answer ul,
.cpo-section-warm .cpo-faq-answer li {
    color: var(--cpo-text);
}

.cpo-section-warm .cpo-faq-answer strong {
    color: var(--cpo-charcoal);
}

/* Methodology card text fix in warm section */
.cpo-section-warm .cpo-methodology-card {
    background: var(--cpo-white);
}

.cpo-section-warm .cpo-methodology-body {
    background: var(--cpo-white);
}

.cpo-section-warm .cpo-methodology-body h6,
.cpo-section-warm .cpo-methodology-body p,
.cpo-section-warm .cpo-methodology-body ul,
.cpo-section-warm .cpo-methodology-body li {
    color: var(--cpo-text);
}

.cpo-section-warm .cpo-methodology-body h6 {
    color: var(--cpo-charcoal);
}

/* ========================================
   MAP CONTAINER & COMPOSITION TABLE 
   Cinematic Living Design styling
   ======================================== */
.cpo-main .composition-table-container {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    overflow: hidden;
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
    height: 100%;
}

.cpo-main .map-container {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    overflow: hidden;
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
    padding: 0;
}

.cpo-main .mapcontinental {
    height: 500px;
    width: 100%;
    border-radius: var(--cpo-radius-lg);
}

@media (max-width: 768px) {
    .cpo-main .mapcontinental {
        height: 350px;
    }
}

/* ========================================
   FULL-WIDTH MAP WITH FLOATING PANEL LAYOUT
   Desktop (992px+) - Edge-to-edge map with overlay panel
   ======================================== */
@media (min-width: 992px) {
    /* Full-width map wrapper - breaks out of container */
    .cpo-map-fullwidth-wrapper {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        position: relative;
        height: 80vh;
        min-height: 700px;
        max-height: 90vh;
        overflow: hidden;
    }
    
    /* Map container - fills wrapper */
    .cpo-map-fullwidth-container {
        position: relative;
        width: 100%;
        height: 100%;
    }
    
    /* Floating Ancestry Panel - Left Overlay */
    .cpo-ancestry-overlay-panel {
        position: absolute;
        left: 24px;
        top: 24px;
        bottom: 24px;
        width: 380px;
        max-width: 30%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
        z-index: 500;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        border: 1px solid rgba(255, 255, 255, 0.3);
        pointer-events: auto; /* Ensure panel is interactive */
    }
    
    /* Ensure map behind overlay is still interactive */
    .cpo-fullwidth-map {
        pointer-events: auto;
    }
    
    /* Map controls should be above overlay */
    .cpo-fullwidth-map .leaflet-control-container {
        pointer-events: auto;
    }
    
    /* Overlay panel content - scrollable */
    .cpo-overlay-panel-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0;
        /* Custom scrollbar styling */
        scrollbar-width: thin;
        scrollbar-color: rgba(220, 53, 69, 0.3) transparent;
    }
    
    .cpo-overlay-panel-content::-webkit-scrollbar {
        width: 8px;
    }
    
    .cpo-overlay-panel-content::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .cpo-overlay-panel-content::-webkit-scrollbar-thumb {
        background: rgba(220, 53, 69, 0.3);
        border-radius: 4px;
    }
    
    .cpo-overlay-panel-content::-webkit-scrollbar-thumb:hover {
        background: rgba(220, 53, 69, 0.5);
    }
    
    /* Compact ancestry breakdown in overlay */
    .cpo-ancestry-overlay-panel .ancestry-breakdown-container {
        box-shadow: none;
        border-radius: 0;
        border: none;
        margin: 0;
    }
    
    .cpo-ancestry-overlay-panel .ancestry-content {
        padding: 0;
    }
    
    .cpo-ancestry-overlay-panel .region-group:first-child .region-header {
        border-radius: 16px 16px 0 0;
    }
    
    .cpo-ancestry-overlay-panel .region-group:last-child {
        border-radius: 0 0 16px 16px;
    }
    
    .cpo-ancestry-overlay-panel .region-group:last-child .ancestry-item:last-child {
        border-radius: 0 0 16px 16px;
    }
    
    /* Full-width Map Container */
    .cpo-fullwidth-map {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    
    /* External zoom controls container - positioned above overlay panel */
    .cpo-map-zoom-controls {
        position: absolute;
        top: 24px;
        right: 24px;
        z-index: 600;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .cpo-map-zoom-controls button {
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 8px;
        background: white;
        color: var(--cpo-coral, #dc3545);
        font-size: 20px;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cpo-map-zoom-controls button:hover {
        background: var(--cpo-coral, #dc3545);
        color: white;
        transform: scale(1.05);
    }
    
    .cpo-map-zoom-controls button:active {
        transform: scale(0.95);
    }
    
    /* Map element in full-width layout */
    .cpo-fullwidth-map .mapcontinental {
        width: 100%;
        height: 100%;
        border-radius: 0;
        aspect-ratio: auto;
    }
    
    /* Map loading skeleton in full-width layout */
    .cpo-fullwidth-map .map-loading-skeleton {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
    }
    
    /* Ensure Leaflet controls are visible above overlay */
    .cpo-fullwidth-map .leaflet-control {
        z-index: 600;
    }
    
    /* Map legend positioning in full-width layout */
    .cpo-fullwidth-map .map-legend {
        position: absolute;
        bottom: 24px;
        right: 24px;
        z-index: 600;
    }
    
    /* Hide Leaflet's built-in zoom controls - using custom controls instead */
    .cpo-fullwidth-map .leaflet-control-zoom {
        display: none !important;
    }
}

/* Mobile/Tablet Responsive - Revert to Stacked Layout */
@media (max-width: 991px) {
    .cpo-map-fullwidth-wrapper {
        width: 100%;
        margin-left: 0;
        height: auto;
        min-height: 500px;
        max-height: none;
        overflow-x: hidden; /* Prevent horizontal overflow */
        max-width: 100vw; /* Ensure it doesn't exceed viewport */
    }
    
    .cpo-map-fullwidth-container {
        display: flex;
        flex-direction: column;
        gap: 24px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden; /* Prevent horizontal overflow */
    }
    
    .cpo-ancestry-overlay-panel {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        margin: 0 16px;
        border-radius: 16px;
        box-shadow: var(--cpo-shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.1));
        overflow-x: hidden; /* Prevent horizontal overflow */
    }
    
    .cpo-overlay-panel-content {
        max-height: none;
        overflow-y: visible;
        overflow-x: hidden; /* Prevent horizontal overflow */
        width: 100%;
    }
    
    /* Ensure ancestry content renders at natural height on mobile */
    .cpo-main .ancestry-content {
        max-height: none;
        overflow-y: visible;
    }
    
    .cpo-main .ancestry-breakdown-container {
        height: auto;
    }
    
    .cpo-fullwidth-map {
        position: relative;
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        height: 500px;
        min-height: 500px;
        margin: 0 16px 16px;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: var(--cpo-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
    }
    
    .cpo-fullwidth-map .mapcontinental {
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Position custom zoom controls for mobile */
    .cpo-map-zoom-controls {
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 100;
    }
    
    .cpo-map-zoom-controls button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* Ancestry Breakdown Container Styling */
.cpo-main .ancestry-breakdown-container {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Override for overlay panel - remove inner border-radius and allow container to fill available space */
.cpo-main .cpo-ancestry-overlay-panel .ancestry-breakdown-container {
    flex: 1;
    min-height: 0; /* Allow flex shrinking */
    border-radius: 0;
    background: transparent; /* Use overlay panel's frosted background instead */
}

.cpo-main .ancestry-header {
    background: rgba(224, 122, 95, 0.08);
    border-left: 4px solid var(--cpo-coral);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cpo-main .ancestry-header .header-title {
    font-family: var(--cpo-font-serif);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--cpo-charcoal);
    line-height: 1.4;
}

.cpo-main .ancestry-header .header-subtitle {
    font-size: 0.8rem;
    margin: 0;
    color: var(--cpo-charcoal-soft);
    line-height: 1.4;
    opacity: 0.8;
}

/* Inline layout: title and subtitle on same line with separator */
.cpo-main .ancestry-header .header-subtitle::before {
    content: "•";
    margin-right: 8px;
    opacity: 0.5;
}

.cpo-main .ancestry-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Allow flex shrinking */
}

/* In overlay panel context, let the panel's scroll handle overflow */
.cpo-main .cpo-ancestry-overlay-panel .ancestry-content {
    overflow-y: visible; /* Panel wrapper handles scrolling */
    max-height: none;
}

/* Region Group Styling */
.cpo-main .region-group {
    border-bottom: 1px solid var(--cpo-border);
}

.cpo-main .region-group:last-child {
    border-bottom: none;
}

.cpo-main .region-header {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--cpo-transition);
}

.cpo-main .region-header:hover {
    filter: brightness(0.95);
}

.cpo-main .region-title {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpo-main .region-percentage {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Subregion Styling */
.cpo-main .subregion {
    background: var(--cpo-cream);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--cpo-border);
}

.cpo-main .subregion-name {
    font-weight: 500;
    color: var(--cpo-charcoal-soft);
    font-size: 0.9rem;
}

.cpo-main .subregion-percentage {
    font-weight: 600;
    color: var(--cpo-text);
    font-size: 0.9rem;
}

/* Population/Ancestry Item Styling */
.cpo-main .ancestry-item {
    padding: 12px 20px 12px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--cpo-border);
    cursor: pointer;
    transition: var(--cpo-transition);
}

.cpo-main .ancestry-item:hover {
    background: rgba(224, 122, 95, 0.05);
}

.cpo-main .ancestry-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--cpo-text);
}

.cpo-main .color-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.cpo-main .ancestry-percentage {
    font-weight: 600;
    color: var(--cpo-charcoal);
    font-size: 0.9rem;
}

/* ========================================
   REGION CARDS - Shared Partial Styling
   (From _AncestryRegionsCardPartial.cshtml)
   ======================================== */
.cpo-main .region-card {
    background: var(--cpo-white);
    border: 1px solid var(--cpo-border);
    border-radius: var(--cpo-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--cpo-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--cpo-shadow-md);
}

.cpo-main .region-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--cpo-shadow-lg);
}

.cpo-main .region-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.cpo-main .region-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cpo-main .region-card:hover .region-card-image img {
    transform: scale(1.08);
}

.cpo-main .region-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.cpo-main .region-percentage-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-amber) 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    z-index: 2;
    box-shadow: var(--cpo-shadow-md);
}

.cpo-main .region-card-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--cpo-white);
}

.cpo-main .region-card-title {
    font-family: var(--cpo-font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cpo-charcoal);
    margin-bottom: 10px;
}

.cpo-main .region-card-title i {
    color: var(--cpo-coral);
}

.cpo-main .continent-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.cpo-main .region-card-description {
    color: var(--cpo-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 16px;
}

.cpo-main .btn-learn-more {
    align-self: flex-start;
    font-weight: 600;
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    border: none;
    color: var(--cpo-white);
    padding: 10px 20px;
    border-radius: 50px;
    transition: var(--cpo-transition);
}

.cpo-main .btn-learn-more:hover {
    transform: translateX(4px);
    box-shadow: var(--cpo-shadow-coral);
}

/* Region Drawer Styling for CPO Theme
   NOTE: The drawer is moved to <body> by JS to avoid transform stacking context issues,
   so these styles use .cpo-region-drawer class instead of .cpo-main .region-drawer */

/* Prevent body scroll when drawer is open */
body.drawer-open {
    overflow: hidden;
}

/* CPO-themed drawer (class added by JS when opened from CPO page) */
.region-drawer.cpo-region-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1060;
    pointer-events: none;
}

.region-drawer.cpo-region-drawer.open {
    pointer-events: auto;
}

.region-drawer.cpo-region-drawer .region-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 52, 54, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1059;
    pointer-events: none;
}

.region-drawer.cpo-region-drawer.open .region-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.region-drawer.cpo-region-drawer .region-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50vw;
    max-width: 800px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px 0 0 16px;
}

.region-drawer.cpo-region-drawer.open .region-drawer-panel {
    transform: translateX(0);
}

.region-drawer.cpo-region-drawer .region-drawer-header {
    background: linear-gradient(135deg, #E07A5F 0%, #C86B4E 100%);
    color: #ffffff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.region-drawer.cpo-region-drawer .region-drawer-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #ffffff;
    margin: 0;
    flex-grow: 1;
    padding-right: 16px;
}

.region-drawer.cpo-region-drawer .region-drawer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.25rem;
    color: #ffffff;
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.region-drawer.cpo-region-drawer .region-drawer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.region-drawer.cpo-region-drawer .region-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    background: #FDF8F3;
}

/* Drawer Content Sections */
.region-drawer.cpo-region-drawer .region-detail-section {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    margin-bottom: 12px;
}

.region-drawer.cpo-region-drawer .region-detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.region-drawer.cpo-region-drawer .region-detail-section h5 {
    color: #E07A5F;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 14px;
}

.region-drawer.cpo-region-drawer .region-detail-section p {
    color: #2d3436;
    line-height: 1.7;
}

.region-drawer.cpo-region-drawer .region-detail-hero {
    position: relative;
    height: 280px;
    overflow: hidden;
    margin-bottom: 0;
}

.region-drawer.cpo-region-drawer .region-detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.region-drawer.cpo-region-drawer .region-detail-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 24px;
    color: white;
}

.region-drawer.cpo-region-drawer .region-stat-item {
    display: inline-block;
    margin-right: 28px;
}

.region-drawer.cpo-region-drawer .region-stat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    display: block;
    color: #F5C85D;
}

.region-drawer.cpo-region-drawer .region-stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Countries List */
.region-drawer.cpo-region-drawer .countries-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.region-drawer.cpo-region-drawer .country-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #FDF8F3;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.region-drawer.cpo-region-drawer .country-item:hover {
    background: #F5EBE0;
}

.region-drawer.cpo-region-drawer .country-item i {
    color: #E07A5F;
    margin-right: 10px;
    font-size: 0.9rem;
}

/* ========================================
   HISTORICAL INFLUENCES TIMELINE
   ======================================== */
.region-drawer.cpo-region-drawer .historical-timeline {
    position: relative;
    padding-left: 32px;
    margin-top: 8px;
}

.region-drawer.cpo-region-drawer .historical-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 0, 0, 0.10);
}

.region-drawer.cpo-region-drawer .timeline-item {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.region-drawer.cpo-region-drawer .timeline-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.region-drawer.cpo-region-drawer .timeline-item.timeline-item-civilization {
    border-left-color: #E07A5F;
}

.region-drawer.cpo-region-drawer .timeline-item.timeline-item-civilization:hover {
    border-left-width: 4px;
    padding-left: 19px;
}

.region-drawer.cpo-region-drawer .timeline-item.timeline-item-migration {
    border-left-color: #6B8F71;
}

.region-drawer.cpo-region-drawer .timeline-item.timeline-item-migration:hover {
    border-left-width: 4px;
    padding-left: 19px;
}

.region-drawer.cpo-region-drawer .timeline-dot {
    position: absolute;
    left: -42px;
    top: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.region-drawer.cpo-region-drawer .timeline-dot.timeline-dot-civilization {
    background: #E07A5F;
}

.region-drawer.cpo-region-drawer .timeline-dot.timeline-dot-migration {
    background: #6B8F71;
}

.region-drawer.cpo-region-drawer .timeline-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.region-drawer.cpo-region-drawer .timeline-item-title-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.region-drawer.cpo-region-drawer .timeline-item-icon {
    color: #E07A5F;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.region-drawer.cpo-region-drawer .timeline-item.timeline-item-migration .timeline-item-icon {
    color: #6B8F71;
}

.region-drawer.cpo-region-drawer .timeline-item-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #2d3436;
    margin: 0;
    line-height: 1.3;
}

.region-drawer.cpo-region-drawer .timeline-item-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.region-drawer.cpo-region-drawer .timeline-item-date-location {
    font-size: 0.9rem;
    color: #6c757d;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.region-drawer.cpo-region-drawer .timeline-item-date-location .timeline-date {
    font-weight: 600;
    color: #495057;
}

.region-drawer.cpo-region-drawer .timeline-confidence-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.region-drawer.cpo-region-drawer .timeline-confidence-pill.confidence-high {
    background: #6B8F71;
    color: #ffffff;
}

.region-drawer.cpo-region-drawer .timeline-confidence-pill.confidence-medium {
    background: #D4A373;
    color: #ffffff;
}

.region-drawer.cpo-region-drawer .timeline-confidence-pill.confidence-low {
    background: #A89F91;
    color: #ffffff;
}

.region-drawer.cpo-region-drawer .timeline-mechanisms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.region-drawer.cpo-region-drawer .timeline-mechanism-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #FDF8F3;
    color: #6B8F71;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(107, 143, 113, 0.2);
    transition: all 0.2s ease;
}

.region-drawer.cpo-region-drawer .timeline-mechanism-tag:hover {
    background: #F5EBE0;
    border-color: rgba(107, 143, 113, 0.4);
}

.region-drawer.cpo-region-drawer .timeline-genetic-impact {
    color: #495057;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-top: 8px;
}

.region-drawer.cpo-region-drawer .timeline-genetic-impact.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.region-drawer.cpo-region-drawer .timeline-expand-toggle {
    display: inline-block;
    margin-top: 8px;
    color: #E07A5F;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.region-drawer.cpo-region-drawer .timeline-expand-toggle:hover {
    color: #C86B4E;
    text-decoration: underline;
}

.region-drawer.cpo-region-drawer .timeline-expand-toggle i {
    margin-left: 4px;
    font-size: 0.75rem;
}

/* Drawer Mobile Styles */
@media (max-width: 768px) {
    .region-drawer.cpo-region-drawer .region-drawer-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        height: 90vh;
        transform: translateY(100%);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    }
    
    .region-drawer.cpo-region-drawer.open .region-drawer-panel {
        transform: translateY(0);
    }
    
    .region-drawer.cpo-region-drawer .region-drawer-header {
        border-radius: 24px 24px 0 0;
        padding: 16px 20px;
        position: relative;
    }
    
    .region-drawer.cpo-region-drawer .region-drawer-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background-color: rgba(255, 255, 255, 0.4);
        border-radius: 2px;
    }
    
    .region-drawer.cpo-region-drawer .region-drawer-title {
        font-size: 1.2rem;
        margin-top: 8px;
    }
    
    .region-drawer.cpo-region-drawer .region-detail-hero {
        height: 200px;
    }
    
    .region-drawer.cpo-region-drawer .countries-list {
        grid-template-columns: 1fr;
    }
    
    /* Historical Timeline Mobile Styles */
    .region-drawer.cpo-region-drawer .historical-timeline {
        padding-left: 24px;
    }
    
    .region-drawer.cpo-region-drawer .historical-timeline::before {
        left: 8px;
        width: 2px;
    }
    
    .region-drawer.cpo-region-drawer .timeline-item {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .region-drawer.cpo-region-drawer .timeline-dot {
        left: -36px;
        width: 20px;
        height: 20px;
        border-width: 2px;
    }
    
    .region-drawer.cpo-region-drawer .timeline-item-title {
        font-size: 1.1rem;
    }
    
    .region-drawer.cpo-region-drawer .timeline-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .region-drawer.cpo-region-drawer .timeline-confidence-pill {
        align-self: flex-start;
    }
    
    .region-drawer.cpo-region-drawer .timeline-mechanisms {
        gap: 6px;
    }
    
    .region-drawer.cpo-region-drawer .timeline-mechanism-tag {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

/* ========================================
   CHROMOSOME BROWSER - Warm Living Theme
   Override dark theme for SharedModernOrigins
   ======================================== */
.cpo-main #AncestryChromosomeExplorer {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-lg);
    padding: 32px;
    box-shadow: var(--cpo-shadow-md);
    border: 1px solid var(--cpo-border);
}

.cpo-main #AncestryChromosomeExplorer .section-header {
    text-align: center;
    margin-bottom: 28px;
}

.cpo-main #AncestryChromosomeExplorer .section-header h3 {
    font-family: var(--cpo-font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cpo-charcoal);
    margin-bottom: 10px;
}

.cpo-main #AncestryChromosomeExplorer .section-header h3 i {
    color: var(--cpo-coral);
}

.cpo-main #AncestryChromosomeExplorer .section-header p {
    color: var(--cpo-text-muted);
    font-size: 1rem;
    margin: 0;
}

.cpo-main #AncestryChromosomeExplorer .text-center.mb-4 {
    color: var(--cpo-text);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Chromosome Browser Tabs in Warm Theme */
.cpo-main #AncestryChromosomeExplorer .nav-pills {
    background: var(--cpo-cream);
    border-radius: 50px;
    padding: 6px;
    display: inline-flex;
    gap: 4px;
}

.cpo-main #AncestryChromosomeExplorer .nav-pills .nav-link {
    background: transparent;
    color: var(--cpo-text-muted);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--cpo-transition);
}

.cpo-main #AncestryChromosomeExplorer .nav-pills .nav-link:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--cpo-charcoal);
}

.cpo-main #AncestryChromosomeExplorer .nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    color: var(--cpo-white);
    box-shadow: var(--cpo-shadow-coral);
}

/* Chromosome Browser Container Override */
.cpo-main .chromosome-browser-container {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    padding: 24px;
    margin-top: 20px;
}

.cpo-main .chromosome-browser-container .section-header-v2 {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-amber) 100%);
    border-radius: var(--cpo-radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.cpo-main .chromosome-browser-container .section-header-v2 h4 {
    color: var(--cpo-white);
    font-family: var(--cpo-font-serif);
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
}

.cpo-main .chromosome-browser-container .section-header-v2 h4 i {
    color: var(--cpo-white);
    opacity: 0.9;
}

/* Population Filter in Warm Theme */
.cpo-main .population-filter {
    background: var(--cpo-cream);
    border-radius: var(--cpo-radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.cpo-main .population-filter label {
    color: var(--cpo-charcoal);
    font-weight: 600;
    font-size: 0.9rem;
}

.cpo-main .population-filter select {
    background: var(--cpo-white);
    border: 2px solid var(--cpo-border);
    border-radius: var(--cpo-radius-sm);
    padding: 10px 14px;
    color: var(--cpo-text);
    transition: var(--cpo-transition);
}

.cpo-main .population-filter select:focus {
    border-color: var(--cpo-coral);
    outline: none;
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.15);
}

/* Chromosome Explorer Layout */
.cpo-main .chromosome-explorer-layout {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.cpo-main .chromosome-bars-column {
    flex: 1;
    min-width: 300px;
}

/* Chromosome Bars Warm Theme */
.cpo-main .chromosome-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--cpo-cream);
    border-radius: var(--cpo-radius-sm);
    transition: var(--cpo-transition);
}

.cpo-main .chromosome-row:hover {
    background: var(--cpo-cream-dark);
}

.cpo-main .chromosome-label {
    font-weight: 600;
    color: var(--cpo-charcoal);
    min-width: 50px;
    font-size: 0.85rem;
}

.cpo-main .chromosome-bar-container {
    flex: 1;
    height: 20px;
    background: linear-gradient(135deg, #e8e0d6 0%, #f0e8de 100%);
    border-radius: 10px;
    overflow: hidden;
    margin-left: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cpo-main .chromosome-bar-segment {
    height: 100%;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.cpo-main .chromosome-bar-segment:first-child {
    border-radius: 10px 0 0 10px;
}

.cpo-main .chromosome-bar-segment:last-child {
    border-radius: 0 10px 10px 0;
}

/* Chromosome Data Tables Warm Theme */
.cpo-main .data-tables-column {
    flex: 1;
    min-width: 300px;
}

.cpo-main .chromosome-data-table {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    overflow: hidden;
    border: 1px solid var(--cpo-border);
}

.cpo-main .chromosome-data-table .table {
    margin: 0;
}

.cpo-main .chromosome-data-table .table thead th {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    color: var(--cpo-white);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 14px 16px;
    border: none;
}

.cpo-main .chromosome-data-table .table tbody td {
    padding: 12px 16px;
    color: var(--cpo-text);
    border-color: var(--cpo-border);
    font-size: 0.9rem;
}

.cpo-main .chromosome-data-table .table tbody tr:hover {
    background: rgba(224, 122, 95, 0.05);
}

.cpo-main .chromosome-data-table .table tbody tr:nth-child(even) {
    background: var(--cpo-cream);
}

.cpo-main .chromosome-data-table .table tbody tr:nth-child(even):hover {
    background: var(--cpo-cream-dark);
}

/* Chromosome Tooltips */
.cpo-main .chromosome-tooltip {
    background: var(--cpo-charcoal);
    color: var(--cpo-white);
    padding: 10px 14px;
    border-radius: var(--cpo-radius-sm);
    font-size: 0.85rem;
    box-shadow: var(--cpo-shadow-lg);
}

.cpo-main .chromosome-tooltip strong {
    color: var(--cpo-amber-light);
}

/* Legend for Chromosome Browser */
.cpo-main .chromosome-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    background: var(--cpo-cream);
    border-radius: var(--cpo-radius-md);
    margin-top: 20px;
}

.cpo-main .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--cpo-text);
}

.cpo-main .legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ========================================
   CHROMOSOME BROWSER - Override Dark Theme
   These target the dar-* classes from chromosome-browser-dark.css
   ======================================== */
.cpo-main .dar-chromo-container {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    padding: 24px;
    border: 1px solid var(--cpo-border);
}

/* Chromosome Browser Tabs */
.cpo-main .dar-chromo-tabs.nav-pills {
    background: var(--cpo-cream);
    border-radius: 50px;
    padding: 6px;
    gap: 4px;
}

.cpo-main .dar-chromo-tabs .nav-link {
    background: transparent;
    color: var(--cpo-text-muted);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--cpo-transition);
    border: none;
}

.cpo-main .dar-chromo-tabs .nav-link:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--cpo-charcoal);
}

.cpo-main .dar-chromo-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    color: var(--cpo-white);
    box-shadow: var(--cpo-shadow-coral);
}

/* Section Headers */
.cpo-main .dar-chromo-section-header {
    padding: 0;
    margin-bottom: 16px;
}

.cpo-main .dar-chromo-section-header h4 {
    font-family: var(--cpo-font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cpo-charcoal);
    margin: 0 0 6px 0;
}

.cpo-main .dar-chromo-section-header h4 i {
    color: var(--cpo-coral);
}

.cpo-main .dar-chromo-section-header p {
    color: var(--cpo-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Population Filter */
.cpo-main .dar-population-filter {
    background: var(--cpo-cream);
    border-radius: var(--cpo-radius-md);
    padding: 20px;
    border: 1px solid var(--cpo-border);
}

.cpo-main .dar-population-filter h4 {
    font-family: var(--cpo-font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--cpo-charcoal);
    margin: 0 0 14px 0;
}

.cpo-main .dar-population-filter h4 i {
    color: var(--cpo-coral);
}

.cpo-main .dar-population-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.cpo-main .dar-population-item {
    padding: 10px 14px;
    cursor: pointer;
    border-radius: var(--cpo-radius-sm);
    transition: var(--cpo-transition);
    margin-bottom: 4px;
    color: var(--cpo-text);
    font-size: 0.9rem;
}

.cpo-main .dar-population-item:hover {
    background: var(--cpo-white);
}

.cpo-main .dar-population-item.selected {
    background: linear-gradient(135deg, rgba(224, 122, 95, 0.15) 0%, rgba(233, 163, 25, 0.15) 100%);
    border-left: 3px solid var(--cpo-coral);
}

/* Chromosome Visualization Container */
.cpo-main .dar-chromo-visualization {
    background: var(--cpo-cream);
    border-radius: var(--cpo-radius-md);
    padding: 20px;
}

/* Chromosome Pills (for samples by chromosome) */
.cpo-main .dar-chromo-pills.nav-pills {
    background: var(--cpo-cream);
    border-radius: var(--cpo-radius-md);
    padding: 12px;
    gap: 6px;
    flex-wrap: wrap;
}

.cpo-main .dar-chromo-pills .nav-link {
    background: var(--cpo-white);
    color: var(--cpo-text-muted);
    padding: 8px 16px;
    border-radius: var(--cpo-radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--cpo-transition);
    border: 1px solid var(--cpo-border);
}

.cpo-main .dar-chromo-pills .nav-link:hover {
    background: var(--cpo-cream-dark);
    color: var(--cpo-charcoal);
}

.cpo-main .dar-chromo-pills .nav-link.active {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    color: var(--cpo-white);
    border-color: var(--cpo-coral);
    box-shadow: var(--cpo-shadow-coral);
}

/* Data Tables */
.cpo-main .dar-table-responsive {
    overflow-x: auto;
}

.cpo-main .dar-data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    overflow: hidden;
}

.cpo-main .dar-data-table thead th {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    color: var(--cpo-white);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 14px 16px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpo-main .dar-data-table tbody td {
    padding: 12px 16px;
    color: var(--cpo-text);
    border-bottom: 1px solid var(--cpo-border);
    font-size: 0.9rem;
}

.cpo-main .dar-data-table tbody tr:hover {
    background: rgba(224, 122, 95, 0.05);
}

.cpo-main .dar-data-table tbody tr:nth-child(even) {
    background: var(--cpo-cream);
}

.cpo-main .dar-data-table tbody tr:nth-child(even):hover {
    background: var(--cpo-cream-dark);
}

/* Progress Bars */
.cpo-main .dar-progress-vertical {
    width: 20px;
    height: 50px;
    background: var(--cpo-cream);
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.cpo-main .dar-progress-vertical .progress-bar {
    width: 100%;
    border-radius: 10px;
    transition: height 0.3s ease;
}

/* Chord Chart Container */
.cpo-main .dar-chord-container {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    padding: 20px;
    min-height: 400px;
}

/* Chart Container */
.cpo-main .chart-container {
    background: var(--cpo-white);
    border-radius: var(--cpo-radius-md);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hide Item Class for Population Filter */
.cpo-main .hideItem {
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

/* Chromosome Label in Warm Theme */
.cpo-main .dar-chromo-label {
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-terracotta) 100%);
    color: var(--cpo-white);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chromosome Empty Segments */
.cpo-main .dar-chromo-empty {
    background: linear-gradient(135deg, #e8e0d6 0%, #f0e8de 100%) !important;
}

/* Progress Bar Styling for Chromosomes */
.cpo-main .dar-chromo-visualization .progress {
    background: linear-gradient(135deg, #e8e0d6 0%, #f0e8de 100%);
    border-radius: 12px;
    height: 16px;
    overflow: hidden;
    margin: 2px 0;
}

.cpo-main .dar-chromo-visualization .progress-bar {
    border-radius: 0;
    transition: width 0.3s ease;
}

/* Segment shape: straight edges for middle, rounded for terminals */
.cpo-main .dar-chromo-visualization .progress-bar:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.cpo-main .dar-chromo-visualization .progress-bar:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.cpo-main .dar-chromo-visualization .progress-bar:only-child {
    border-radius: 12px;
}

/* Tooltip styling */
.cpo-main .tooltip {
    font-family: var(--cpo-font-sans);
}

.cpo-main .tooltip .tooltip-inner {
    background: var(--cpo-charcoal);
    color: var(--cpo-white);
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: var(--cpo-radius-sm);
    max-width: 300px;
    text-align: left;
}

.cpo-main .tooltip .arrow::before {
    border-top-color: var(--cpo-charcoal);
}

/* ========================================
   CARD TEXT DISCLAIMER STYLING
   ======================================== */
.cpo-main .card-text small {
    color: var(--cpo-text-muted);
}

.cpo-main .card-text small i {
    color: var(--cpo-teal);
}

/* ========================================
   CARD HIGHLIGHT ANIMATION
   ======================================== */
.cpo-main .region-card-highlight {
    animation: cpoHighlightPulse 2s ease-in-out;
}

@keyframes cpoHighlightPulse {
    0%, 100% {
        box-shadow: var(--cpo-shadow-md);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.4), var(--cpo-shadow-lg);
        border-color: var(--cpo-coral);
    }
}

/* ========================================
   ANCESTRY ITEM FOCUS STATES
   ======================================== */
.cpo-main .ancestry-item:focus,
.cpo-main .region-card:focus {
    outline: 3px solid var(--cpo-coral);
    outline-offset: 2px;
}

.cpo-main .ancestry-item:focus-visible,
.cpo-main .region-card:focus-visible {
    outline: 3px solid var(--cpo-coral);
    outline-offset: 2px;
}

/* ========================================
   ANCESTOR PREDICTIONS SECTION
   ======================================== */
.ap-section {
    background: linear-gradient(180deg, var(--cpo-cream) 0%, var(--cpo-warm-white) 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.ap-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cpo-coral-light), transparent);
}

/* Section Header */
.ap-header {
    margin-bottom: 3rem;
}

.ap-chapter-label {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--cpo-coral);
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding: 0.5rem 1.5rem;
    background: rgba(224, 122, 95, 0.1);
    border-radius: 20px;
}

.ap-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--cpo-charcoal);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.ap-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--cpo-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Featured Card - Top Prediction */
.ap-featured-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(224, 122, 95, 0.2);
}

.ap-featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cpo-coral), var(--cpo-amber), var(--cpo-teal));
}

.ap-featured-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--cpo-amber), var(--cpo-coral));
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(224, 122, 95, 0.3);
}

.ap-featured-content {
    margin-top: 1rem;
}

.ap-featured-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--cpo-charcoal);
    margin-bottom: 1rem;
}

.ap-featured-narrative {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--cpo-text);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Population Items */
.ap-featured-populations {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ap-pop-item {
    position: relative;
    background: var(--cpo-cream);
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
}

.ap-pop-bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: 12px;
    opacity: 0.2;
    transition: width 1s ease-out;
}

.ap-pop-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.ap-pop-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--cpo-charcoal);
}

.ap-pop-percent {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cpo-coral);
}

/* Score Ring */
.ap-featured-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.ap-score-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

.ap-score-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.ap-score-bg {
    fill: none;
    stroke: var(--cpo-cream-dark);
    stroke-width: 8;
}

.ap-score-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke: var(--cpo-coral);
    transition: stroke-dasharray 1.5s ease-out;
}

.ap-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ap-score-number {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cpo-coral);
    line-height: 1;
}

.ap-score-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--cpo-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

.ap-score-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--cpo-text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

/* Additional Predictions */
.ap-additional-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cpo-charcoal);
    margin-bottom: 0.5rem;
}

.ap-additional-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

/* Predictions Grid */
.ap-predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ap-prediction-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: apCardReveal 0.6s ease-out forwards;
}

.ap-prediction-card:nth-child(1) { animation-delay: 0.1s; }
.ap-prediction-card:nth-child(2) { animation-delay: 0.2s; }
.ap-prediction-card:nth-child(3) { animation-delay: 0.3s; }
.ap-prediction-card:nth-child(4) { animation-delay: 0.4s; }
.ap-prediction-card:nth-child(5) { animation-delay: 0.5s; }
.ap-prediction-card:nth-child(6) { animation-delay: 0.6s; }
.ap-prediction-card:nth-child(7) { animation-delay: 0.7s; }
.ap-prediction-card:nth-child(8) { animation-delay: 0.8s; }
.ap-prediction-card:nth-child(9) { animation-delay: 0.9s; }

@keyframes apCardReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ap-prediction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--cpo-coral-light);
}

.ap-prediction-rank {
    position: absolute;
    top: -10px;
    left: 1rem;
    background: var(--cpo-teal);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 10px;
}

.ap-prediction-populations {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.ap-mini-pop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ap-mini-pop-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ap-mini-pop-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--cpo-charcoal);
    flex: 1;
}

.ap-mini-pop-value {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cpo-text-muted);
}

.ap-prediction-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--cpo-cream-dark);
    margin-top: 0.5rem;
}

.ap-prediction-score {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.ap-prediction-score-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cpo-coral);
}

.ap-prediction-score-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: var(--cpo-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ap-prediction-continents {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ap-continent-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--cpo-teal-dark);
    background: rgba(61, 139, 139, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

/* Info Card */
.ap-info-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(61, 139, 139, 0.2);
}

.ap-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cpo-teal-light), var(--cpo-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ap-info-icon i {
    color: white;
    font-size: 1.25rem;
}

.ap-info-content h5 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cpo-charcoal);
    margin-bottom: 0.5rem;
}

.ap-info-content p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--cpo-text);
    line-height: 1.6;
    margin: 0;
}

/* Unavailable State */
.ap-unavailable-card {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.ap-unavailable-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--cpo-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.ap-unavailable-icon i {
    font-size: 2rem;
    color: var(--cpo-text-muted);
}

.ap-unavailable-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cpo-charcoal);
    margin-bottom: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ap-section {
        padding: 3rem 0;
    }
    
    .ap-title {
        font-size: 2rem;
    }
    
    .ap-featured-card {
        padding: 1.5rem;
    }
    
    .ap-featured-badge {
        position: static;
        display: inline-block;
        margin-bottom: 1rem;
    }
    
    .ap-featured-title {
        font-size: 1.5rem;
    }
    
    .ap-featured-score {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .ap-score-ring {
        width: 120px;
        height: 120px;
    }
    
    .ap-score-number {
        font-size: 2rem;
    }
    
    .ap-predictions-grid {
        grid-template-columns: 1fr;
    }
    
    .ap-info-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .ap-info-icon {
        margin: 0 auto;
    }
}

/* Print Styles for Ancestor Predictions */
@media print {
    .ap-section {
        background: white !important;
        page-break-inside: avoid;
        padding: 2rem 0;
    }
    
    .ap-featured-card,
    .ap-prediction-card,
    .ap-info-card,
    .ap-unavailable-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .ap-featured-badge {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .ap-prediction-card {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    
    .ap-predictions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .ap-pop-bar {
        opacity: 0.3 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .ap-score-fill {
        stroke: var(--cpo-coral) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ========================================
   MODERN HERITAGE TIMELINE
   Dynamic historical events based on user's ancestry
   ======================================== */

/* Timeline Container */
.cpo-timeline {
    position: relative;
    padding-left: 40px;
    max-width: 800px;
    margin: 0 auto;
}

/* Vertical Timeline Line */
.cpo-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        var(--cpo-amber) 20%, 
        var(--cpo-coral) 50%, 
        var(--cpo-amber) 80%, 
        rgba(255, 255, 255, 0.3) 100%);
    border-radius: 3px;
}

/* Timeline Item */
.cpo-timeline-item {
    position: relative;
    padding-bottom: 40px;
    padding-left: 24px;
    opacity: 0;
    transform: translateX(-20px);
    animation: cpo-timeline-fade-in 0.6s ease-out forwards;
}

.cpo-timeline-item:last-child {
    padding-bottom: 0;
}

/* Staggered Animation Delays */
.cpo-timeline-item:nth-child(1) { animation-delay: 0.1s; }
.cpo-timeline-item:nth-child(2) { animation-delay: 0.2s; }
.cpo-timeline-item:nth-child(3) { animation-delay: 0.3s; }
.cpo-timeline-item:nth-child(4) { animation-delay: 0.4s; }
.cpo-timeline-item:nth-child(5) { animation-delay: 0.5s; }
.cpo-timeline-item:nth-child(n+6) { animation-delay: 0.6s; }

@keyframes cpo-timeline-fade-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Timeline Marker (Dot) */
.cpo-timeline-marker {
    position: absolute;
    left: -34px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cpo-coral) 0%, var(--cpo-amber) 100%);
    border: 3px solid var(--cpo-charcoal);
    box-shadow: 0 0 0 4px rgba(233, 163, 25, 0.2), 
                0 4px 12px rgba(0, 0, 0, 0.3);
    transition: var(--cpo-transition);
    z-index: 2;
}

.cpo-timeline-item:hover .cpo-timeline-marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px rgba(233, 163, 25, 0.3), 
                0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Era Label */
.cpo-timeline-era {
    font-family: var(--cpo-font-serif);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cpo-amber-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    display: inline-block;
}

/* Timeline Title */
.cpo-timeline-title {
    font-family: var(--cpo-font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--cpo-white);
    margin-bottom: 12px;
    line-height: 1.3;
    transition: var(--cpo-transition);
}

.cpo-timeline-item:hover .cpo-timeline-title {
    color: var(--cpo-amber-light);
}

/* Timeline Description */
.cpo-timeline-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin: 0 0 16px 0;
}

/* Region Tags Container */
.cpo-timeline-regions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Individual Region Tag */
.cpo-timeline-region-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(233, 163, 25, 0.15);
    color: var(--cpo-amber-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(233, 163, 25, 0.25);
    transition: var(--cpo-transition);
}

.cpo-timeline-region-tag:hover {
    background: rgba(233, 163, 25, 0.25);
    border-color: rgba(233, 163, 25, 0.4);
    transform: translateY(-2px);
}

.cpo-timeline-region-tag i {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* ========================================
   TIMELINE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    .cpo-timeline {
        padding-left: 32px;
    }
    
    .cpo-timeline::before {
        left: 12px;
        width: 2px;
    }
    
    .cpo-timeline-marker {
        left: -28px;
        width: 12px;
        height: 12px;
        border-width: 2px;
    }
    
    .cpo-timeline-item {
        padding-left: 18px;
        padding-bottom: 32px;
    }
    
    .cpo-timeline-era {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }
    
    .cpo-timeline-title {
        font-size: 1.15rem;
    }
    
    .cpo-timeline-description {
        font-size: 0.9rem;
    }
    
    .cpo-timeline-region-tag {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .cpo-timeline {
        padding-left: 24px;
    }
    
    .cpo-timeline::before {
        left: 8px;
    }
    
    .cpo-timeline-marker {
        left: -22px;
        width: 10px;
        height: 10px;
    }
    
    .cpo-timeline-item {
        padding-left: 12px;
    }
    
    .cpo-timeline-title {
        font-size: 1.05rem;
    }
    
    .cpo-timeline-regions {
        gap: 6px;
    }
    
    .cpo-timeline-region-tag {
        padding: 4px 8px;
        font-size: 0.7rem;
        gap: 4px;
    }
}

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

@media print {
    .cpo-timeline {
        padding-left: 30px;
    }
    
    .cpo-timeline::before {
        background: #333;
        width: 2px;
    }
    
    .cpo-timeline-item {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        page-break-inside: avoid;
    }
    
    .cpo-timeline-marker {
        background: #333 !important;
        border-color: white !important;
        box-shadow: none !important;
    }
    
    .cpo-timeline-era {
        color: #666 !important;
    }
    
    .cpo-timeline-title {
        color: #222 !important;
    }
    
    .cpo-timeline-description {
        color: #444 !important;
    }
    
    .cpo-timeline-region-tag {
        background: #f0f0f0 !important;
        color: #333 !important;
        border-color: #ccc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ========================================
   TIMELINE REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .cpo-timeline-item {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .cpo-timeline-marker,
    .cpo-timeline-title,
    .cpo-timeline-region-tag {
        transition: none;
    }
}

/* ========================================
   Heritage Summary Card
   ======================================== */
.smo-summary-card {
    background: linear-gradient(135deg, var(--cpo-cream-dark) 0%, var(--cpo-cream) 100%);
    border: 1px solid var(--cpo-border);
    border-radius: 16px;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--cpo-shadow-md);
}

.smo-summary-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--cpo-cream);
    border-bottom: 1px solid var(--cpo-border);
}

.smo-summary-logo img {
    opacity: 0.8;
    height: 16px;
    width: auto;
    max-width: 60px;
    max-height: 16px;
}

.smo-summary-title h3 {
    font-family: var(--cpo-font-serif);
    font-size: 1.25rem;
    color: var(--cpo-text);
    margin: 0;
    font-weight: 600;
}

.smo-summary-title span {
    font-size: 0.8125rem;
    color: var(--cpo-text-muted);
    display: block;
    margin-top: 0.25rem;
}

.smo-summary-body {
    padding: 1.5rem;
}

.smo-summary-stats {
    display: flex;
    justify-content: space-around;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--cpo-border);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.smo-summary-stat {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.smo-summary-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cpo-coral);
    font-family: var(--cpo-font-sans);
    overflow-wrap: break-word;
    word-break: break-word;
}

.smo-summary-stat-value-text {
    font-size: 1rem;
}

.smo-summary-stat-value-accent {
    color: var(--cpo-coral-light);
}

.smo-summary-stat-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cpo-text-muted);
    margin-top: 0.25rem;
    display: block;
}

.smo-summary-section {
    margin-bottom: 1.5rem;
}

.smo-summary-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cpo-text-muted);
    margin: 0 0 1rem;
    font-family: var(--cpo-font-sans);
    font-weight: 600;
}

.smo-summary-regions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.smo-summary-region {
    position: relative;
    background: var(--cpo-cream);
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid var(--cpo-border);
}

.smo-summary-region-rank {
    position: absolute;
    top: -8px;
    left: 12px;
    background: var(--cpo-coral);
    color: var(--cpo-white);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: var(--cpo-font-sans);
}

.smo-summary-region-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.smo-summary-region-name {
    display: block;
    font-size: 0.875rem;
    color: var(--cpo-text);
    font-weight: 500;
    font-family: var(--cpo-font-sans);
}

.smo-summary-region-bar {
    width: 100%;
    height: 6px;
    background: var(--cpo-cream-dark);
    border-radius: 3px;
    overflow: hidden;
}

.smo-summary-region-bar-fill {
    height: 100%;
    background: var(--cpo-coral);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.smo-summary-region-pct {
    font-size: 0.75rem;
    color: var(--cpo-coral-light);
    font-weight: 600;
    font-family: var(--cpo-font-sans);
}

.smo-summary-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.smo-summary-highlight {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.smo-summary-highlight .dna-icon {
    color: var(--cpo-coral);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.smo-summary-hl-label {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cpo-text-muted);
    margin-bottom: 0.25rem;
    font-family: var(--cpo-font-sans);
    font-weight: 600;
}

.smo-summary-hl-value {
    font-size: 0.875rem;
    color: var(--cpo-text);
    display: block;
    line-height: 1.4;
    font-family: var(--cpo-font-sans);
}

.smo-summary-footer {
    padding: 1rem 1.5rem;
    background: var(--cpo-cream);
    text-align: center;
    font-size: 0.75rem;
    color: var(--cpo-text-muted);
    border-top: 1px solid var(--cpo-border);
    font-family: var(--cpo-font-sans);
}

.smo-summary-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.smo-summary-actions .smo-btn {
    min-width: 140px;
}

.smo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--cpo-font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 0.5rem;
}

.smo-btn-primary {
    background: var(--cpo-coral);
    color: var(--cpo-white);
}

.smo-btn-primary:hover {
    background: var(--cpo-coral-dark);
    transform: translateY(-2px);
    box-shadow: var(--cpo-shadow-coral);
}

.smo-btn-secondary {
    background: transparent;
    color: var(--cpo-coral);
    border: 2px solid var(--cpo-coral);
}

.smo-btn-secondary:hover {
    background: var(--cpo-coral);
    color: var(--cpo-white);
    transform: translateY(-2px);
}

.smo-btn-success {
    background: #28a745 !important;
    color: var(--cpo-white) !important;
}

/* ========================================
   Print Styles for Heritage Summary
   ======================================== */
@media print {
    .smo-summary-card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
        background: white;
    }

    .smo-summary-actions {
        display: none !important;
    }
}

/* ========================================
   Responsive Adjustments for Heritage Summary
   ======================================== */
@media (max-width: 768px) {
    .smo-summary-stats {
        gap: 0.75rem;
    }

    .smo-summary-stat {
        min-width: 70px;
    }

    .smo-summary-stat-value {
        font-size: 1.25rem;
    }

    .smo-summary-card {
        margin: 0 1rem;
    }

    .smo-summary-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .smo-summary-actions .smo-btn {
        width: 100%;
    }
}