/* === Command Results Canvas (inline agentic router) === */
.command-results-section {
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 28px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    background: linear-gradient(135deg, rgba(14, 18, 28, 0.92), rgba(9, 12, 20, 0.88));
    box-shadow: 0 25px 60px rgba(5, 8, 16, 0.4);
}

/* Nanoverse logo sizing to match icon font sizes */
.nv-logo, img.nv-logo {
    width: 1.05em;
    height: 1.05em;
    vertical-align: middle;
    display: inline-block;
    object-fit: contain;
}
.nv-logo-inline, img.nv-logo-inline {
    width: 0.95em;
    height: 0.95em;
    vertical-align: middle;
    display: inline-block;
    object-fit: contain;
    margin-right: 6px;
}

.command-results-header h2 {
    font-family: var(--font-logo);
    letter-spacing: 0.08em;
    font-size: 1.6rem;
}

.command-results-eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--accent-nanoverse);
    margin-bottom: 0.4rem;
}

.command-results-reason {
    color: var(--text-secondary-dark);
}

.command-reason-bar {
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.85rem;
    color: var(--text-secondary-dark);
}

.command-core-card,
.command-route-card {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition-smooth);
}

.command-core-card {
    margin-top: 1.75rem;
}

.command-core-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.command-core-card .route-summary {
    color: var(--text-secondary-dark);
    margin-bottom: 1rem;
}

.command-route-detail-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.command-route-detail-list li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary-dark);
}

.command-route-detail-list strong {
    font-size: 1rem;
    color: var(--text-primary-dark);
}

.command-route-card {
    cursor: pointer;
}

.command-route-card.primary-suggestion {
    border-color: rgba(0, 240, 255, 0.35);
}

.command-route-card .route-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary-dark);
}

.command-route-card .route-target {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.command-alt-section {
    margin-top: 2rem;
}

.command-alt-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.command-alt-header h3 {
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary-dark);
}

.command-routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.command-refine-section {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.command-refine-section textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(10, 12, 20, 0.6);
    color: var(--text-primary-dark);
    resize: vertical;
}

.command-route-action {
    margin-top: 1rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: var(--transition-fast);
}

.command-route-action.primary {
    background: linear-gradient(120deg, var(--accent-nanoverse), #6366f1);
    color: #050608;
    border-color: transparent;
}

.command-route-card.active,
.command-core-card {
    border-color: var(--accent-nanoverse);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
}

.command-results-footer {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.command-results-footer p {
    flex: 1 1 260px;
    color: var(--text-secondary-dark);
}

.command-main-action {
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(120deg, var(--accent-nanoverse), #6366f1);
    color: #050608;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.command-route-card[data-target-app="aura-labs"] { border-color: rgba(192, 132, 252, 0.4); }
.command-route-card[data-target-app="vector-labs"] { border-color: rgba(125, 211, 252, 0.4); }
.command-route-card[data-target-app="vision-board"] { border-color: rgba(250, 204, 21, 0.4); }
.command-route-card[data-target-app="studio"] { border-color: rgba(251, 113, 133, 0.4); }
.command-route-card[data-target-app="search"] { border-color: rgba(56, 189, 248, 0.4); }

.command-route-card.active[data-target-app="aura-labs"] { box-shadow: 0 0 18px rgba(192, 132, 252, 0.5); }
.command-route-card.active[data-target-app="vector-labs"] { box-shadow: 0 0 18px rgba(125, 211, 252, 0.5); }
.command-route-card.active[data-target-app="vision-board"] { box-shadow: 0 0 18px rgba(250, 204, 21, 0.45); }
.command-route-card.active[data-target-app="studio"] { box-shadow: 0 0 18px rgba(251, 113, 133, 0.5); }
.command-route-card.active[data-target-app="search"] { box-shadow: 0 0 18px rgba(56, 189, 248, 0.5); }

@media (max-width: 768px) {
    .command-results-section {
        padding: 1.5rem;
    }

    .command-results-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .command-main-action {
        width: 100%;
        text-align: center;
    }
}
/* --- START OF FILE /static/new-style.css --- */

/* === 1. Root Variables & Global Styles === */
:root {
    /* Mobile-First (Dark Theme) Palette */
    --bg-primary-dark: #1c1c1c; 
    --bg-secondary-dark: #2e2e2e;
    --bg-search-dark: #383838;
    --text-primary-dark: #e8e8e8;
    --text-secondary-dark: #c0c0c0;
    --text-subtle-dark: #9e9e9e;

    /* Global Accent Palette */
    --accent-nanoverse: #00f0ff; /* NANOVERSE Cyan */
    --accent-deep-research: #c77dff; /* A rich purple for Deep Research *//* === 7. DESKTOP & WIDESCREEN STYLES === */
@media (min-width: 992px) {
    .desktop-main-header {
        display: flex;
    }
    
    .mobile-main-header {
        display: none;
    }
    
    .homepage-content-wrapper {
        padding: 2rem;
    }
}

/* Tablet Adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .mobile-main-header {
        padding: 0 1.5rem;
        height: 70px;
    }
    
    .profile-link-mobile {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
}

/* Small Screen Adjustments */
@media (max-width: 767px) {
    .mobile-main-header {
        padding: 0 1rem;
    }
    
    .homepage-content-wrapper {
        padding: 0.75rem;
    }
}

    --accent-deep-research-glow: rgba(199, 125, 255, 0.7);
    --accent-innovation-nexus: #f0ff00; /* A vibrant yellow/lime for Innovation */
    --accent-innovation-nexus-glow: rgba(240, 255, 0, 0.5);
    --accent-aura: #c084fc;
    --accent-vector: #7dd3fc;
    --accent-vision: #facc15;
    --accent-studio: #fb7185;
    --accent-search: #38bdf8;


    /* UI Sizing & Fonts */
    --font-logo: 'Orbitron', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --border-radius-main: 24px;
    --border-radius-search: 32px;
    --border-radius-kp: 12px; /* For knowledge panel */


    /* Glassmorphism Variables */
    --glass-bg-color: rgba(46, 46, 46, 0.6);
    --glass-border-color: rgba(255, 255, 255, 0.15);
    --glass-backdrop-blur: 8px;
    --glass-shadow: 0 4px 20px rgba(0,0,0,0.25);
    
    /* Knowledge Canvas Variables */
    --canvas-node-bg: rgba(36, 36, 36, 0.8);

    --transition-fast: all 0.2s ease-out;
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; height: 100%; }
body { background-color: var(--bg-primary-dark); color: var(--text-primary-dark); font-family: var(--font-body); -webkit-font-smoothing: antialiased; height: 100%; margin: 0; }
a { color: var(--accent-nanoverse); text-decoration: none; }
button { background: none; border: none; cursor: pointer; font-family: inherit; color: inherit; }

/* === TARGETED MINIMALIST SCROLLBAR STYLES === */
/* This style applies ONLY to the elements that are designated to scroll. */

/* For Firefox */
.main-content, #innovation-nexus-container, #search-history-container {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-search-dark) transparent;
}

/* For WebKit browsers (Chrome, Safari, Edge) */
.main-content::-webkit-scrollbar,
#innovation-nexus-container::-webkit-scrollbar,
#search-history-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.main-content::-webkit-scrollbar-track,
#innovation-nexus-container::-webkit-scrollbar-track,
#search-history-container::-webkit-scrollbar-track {
  background-color: transparent; /* Makes the track invisible */
}

.main-content::-webkit-scrollbar-thumb,
#innovation-nexus-container::-webkit-scrollbar-thumb,
#search-history-container::-webkit-scrollbar-thumb {
  background-color: var(--bg-search-dark); /* The draggable part */
  border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb:hover,
#innovation-nexus-container::-webkit-scrollbar-thumb:hover,
#search-history-container::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-subtle-dark);
}


/* === 2. Mobile-First Homepage Styles === */
.homepage-view { 
    background-color: var(--bg-primary-dark); 
    background-image: url('/static/images/NV-mobile-wallpaper.png'); 
    background-size: cover; 
    background-position: center center; 
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* --- MODIFICATION START --- */
/* Desktop Header Styles */
.desktop-main-header { 
    display: none; 
    padding: 1rem 2rem;
    justify-content: flex-end;
    gap: 0.5rem; /* MODIFIED: Reduced gap between icons */
}
/* --- MODIFICATION END --- */

.desktop-main-header .profile-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary-dark);
    font-size: 1.3rem;
    border-radius: 50%;
    transition: var(--transition-fast);
    background-color: var(--glass-bg-color);
    border: 1px solid var(--glass-border-color);
}

.desktop-main-header .profile-link:hover {
    color: var(--text-primary-dark);
    background-color: var(--bg-tertiary);
    border-color: var(--accent-nanoverse);
    transform: translateY(-2px);
}

.desktop-center-box, .desktop-logo-center { display: none; }

/* Mobile Header Styles */
.homepage-content-wrapper { 
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}

/* --- MODIFICATION START --- */
.mobile-main-header { 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    height: 50px; 
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
    gap: 0.5rem; /* MODIFIED: Reduced gap between icons */
    flex-shrink: 0;
}
/* --- MODIFICATION END --- */

.profile-link-mobile { 
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary-dark);
    background-color: var(--glass-bg-color);
    border: 1px solid var(--glass-border-color);
    border-radius: 50%;
    font-size: 1.3rem;
    transition: var(--transition-fast);
}

.profile-link-mobile:hover,
.profile-link-mobile:focus {
    color: var(--text-primary-dark);
    background-color: var(--bg-tertiary);
    border-color: var(--accent-nanoverse);
    transform: translateY(-2px);
}

/* Dynamic Logo Color Animation */
@property --logo-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes logo-color-shift {
    0% { --logo-angle: 0deg; }
    100% { --logo-angle: 360deg; }
}

.mobile-logo-top { 
    font-family: var(--font-logo); 
    font-size: 1.75rem; 
    text-align: center; 
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    background: linear-gradient(
        var(--logo-angle),
        #f3dcff 0%,      /* light lavender pink */
        #d9b9ff 14%,     /* light purple */
        #c5a0ff 28%,     /* medium purple */
        #a6b4ff 42%,     /* light indigo */
        #7fc9ff 56%,     /* sky blue */
        #63d5ff 70%,     /* bright cyan */
        #7fb7ff 84%,     /* soft blue */
        #f3dcff 100%     /* light lavender pink */
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: logo-color-shift 28s linear infinite, logo-gradient-move 39s ease-in-out infinite;
}

@keyframes logo-gradient-move {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}


/* === 3. UNIFIED SEARCH FORM STYLES (MOBILE-FIRST) === */

.homepage-view .search-form-container {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

#search-form-home, #search-form-results {
    position: relative;
    display: flex;
    flex-direction: column; 
    gap: 0.75rem;
    background-color: var(--glass-bg-color); 
    -webkit-backdrop-filter: blur(var(--glass-backdrop-blur)); 
    backdrop-filter: blur(var(--glass-backdrop-blur)); 
    border: 1px solid var(--glass-border-color); 
    box-shadow: var(--glass-shadow);
    overflow: hidden; 
    width: 100%;
    border-radius: var(--border-radius-main);
    padding: 1rem;
    height: auto;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#search-query-home, #search-query-results { 
    flex-grow: 1; 
    background: none; 
    border: none; 
    outline: none; 
    color: var(--text-primary-dark); 
    font-size: 1rem; 
    padding: 0;
    width: 100%;
}

/* Override browser autofill styles to match dark theme */
#search-query-home:-webkit-autofill,
#search-query-results:-webkit-autofill,
#search-query-home:-webkit-autofill:hover,
#search-query-results:-webkit-autofill:hover,
#search-query-home:-webkit-autofill:focus,
#search-query-results:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary-dark);
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    box-shadow: 0 0 0 1000px transparent inset;
    transition: background-color 5000s ease-in-out 0s;
    background-color: transparent !important;
    caret-color: var(--text-primary-dark);
}

/* Custom Autocomplete Dropdown */
.nv-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 6px;
    background: rgba(30, 30, 36, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 6px 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.nv-autocomplete-dropdown.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.nv-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: var(--text-secondary-dark);
    font-size: 0.88rem;
    border-radius: 0;
    text-decoration: none;
}
.nv-autocomplete-item:first-child { border-radius: 10px 10px 0 0; }
.nv-autocomplete-item:last-child { border-radius: 0 0 10px 10px; }
.nv-autocomplete-item:only-child { border-radius: 10px; }
.nv-autocomplete-item:hover,
.nv-autocomplete-item.selected {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary-dark);
}
.nv-autocomplete-item i {
    font-size: 0.8rem;
    color: var(--text-subtle-dark);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.6;
}
.nv-autocomplete-item:hover i,
.nv-autocomplete-item.selected i {
    opacity: 1;
    color: var(--accent-nanoverse);
}
.nv-autocomplete-item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nv-autocomplete-item-text mark {
    background: none;
    color: var(--text-primary-dark);
    font-weight: 600;
}
.nv-autocomplete-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 12px;
}

#search-query-home::placeholder, #search-query-results::placeholder { color: var(--text-subtle-dark); }
.search-icon-home { display: none; }

.search-bar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}


.deep-research-btn, .mic-button-home, .mic-button-results {
    position: static;
    transform: none;
}
.deep-research-btn { order: 1; }
.mic-button-home, .mic-button-results { order: 2; }

#search-form-home .deep-research-btn, 
#search-form-results .deep-research-btn {
    position: static;
    transform: none;
}
#search-form-home .mic-button-home, 
#search-form-results .mic-button-results {
    position: static;
    transform: none;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-subtle-dark); font-size: 1.2rem;
    transition: var(--transition-fast);
}

.mic-button-home:hover, .mic-button-results:hover {
    background-color: var(--glass-border-color);
}


/* === 4. CINEMATIC GLOW EFFECT === */
#search-form-home::before, #search-form-results::before,
#search-form-home::after, #search-form-results::after { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; z-index: -1; opacity: 0; transition: opacity 0.5s ease-in-out; }
#search-form-home::before, #search-form-results::before { background: conic-gradient(transparent, var(--accent-deep-research), transparent 30%); animation: rotate-border 6s linear infinite; }
#search-form-home::after, #search-form-results::after { width: 20%; height: 100%; background: radial-gradient(ellipse at center, var(--accent-deep-research-glow) 0%, transparent 80%); animation: orbit-light 8s ease-in-out infinite; }
@keyframes rotate-border { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes orbit-light { 0% { transform: translate(0, 0); } 25% { transform: translate(150%, 0); } 50% { transform: translate(150%, 75%); } 75% { transform: translate(0, 75%); } 100% { transform: translate(0, 0); } }

.search-form-container.deep-research-active #search-form-home::before,
.search-form-container.deep-research-active #search-form-results::before,
.search-form-container.deep-research-active #search-form-home::after,
.search-form-container.deep-research-active #search-form-results::after { opacity: 0 !important; }

.search-form-container.deep-research-active #search-form-home,
.search-form-container.deep-research-active #search-form-results { border: 1px solid rgba(46, 76, 255, 0.3); box-shadow: 0 0 20px rgba(46, 76, 255, 0.08); background: var(--glass-bg-color); }
/* Deep Research Button — Minimal Professional Style */
.deep-research-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 36px;
    padding: 0 12px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-subtle-dark);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 10px;
    gap: 6px;
    box-shadow: none;
    transform: none;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
    overflow: hidden;
    cursor: pointer;
}
.deep-research-btn i {
    flex-shrink: 0;
    font-size: 0.9rem;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.deep-research-btn span {
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 1;
    width: auto;
    transform: none;
    transition: opacity 0.3s ease;
}
.deep-research-btn:hover {
    background-color: rgba(46, 76, 255, 0.08);
    border-color: rgba(46, 76, 255, 0.35);
    color: #5b7cfa;
}
.deep-research-btn:hover i {
    transform: rotate(-8deg) scale(1.1);
}
.deep-research-btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}
.search-form-container.deep-research-active .deep-research-btn {
    color: #7b9cff;
    background-color: rgba(46, 76, 255, 0.12);
    border-color: rgba(46, 76, 255, 0.4);
    box-shadow: 0 0 12px rgba(46, 76, 255, 0.1);
}
.search-form-container.deep-research-active .deep-research-btn i {
    transform: rotate(0deg) scale(1);
}
.search-form-container.deep-research-active .deep-research-btn span {
    opacity: 1;
}


/* Other Homepage Styles */
.shortcuts-container {
    background-color: var(--glass-bg-color);
    -webkit-backdrop-filter: blur(var(--glass-backdrop-blur));
    backdrop-filter: blur(var(--glass-backdrop-blur));
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-main);
    padding: 1rem 0.75rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: min(100%, 640px);
    margin: 0 auto 0.75rem;
    flex-shrink: 0;
}
.shortcut-item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-primary-dark); width: 100%; }
.shortcut-icon-wrapper { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; position: relative; background: transparent; border-radius: 0; padding: 0; transition: var(--transition-fast); }
.shortcut-icon-wrapper::after { content: ''; position: absolute; inset: 8%; background: radial-gradient(circle at 35% 30%, rgba(231, 212, 255, 0.35), transparent 55%), radial-gradient(circle at 70% 75%, rgba(114, 190, 255, 0.45), transparent 60%); filter: blur(14px); opacity: 0.85; z-index: 0; animation: shortcut-icon-aurora-glow 9s ease-in-out infinite; }
.shortcut-icon-wrapper i { font-size: 2rem; display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; color: transparent; background-image: conic-gradient(from var(--shortcut-rotate) at 50% 50%, #f3dcff 0deg, #d9b9ff 40deg, #c5a0ff 90deg, #a6b4ff 150deg, #7fc9ff 210deg, #63d5ff 270deg, #7fb7ff 320deg, #f3dcff 360deg); -webkit-background-clip: text; background-clip: text; animation: shortcut-icon-aurora-spin 7s linear infinite; filter: drop-shadow(0 0 6px rgba(130, 170, 255, 0.8)); transition: transform var(--transition-fast), filter var(--transition-fast); }
.shortcut-item:hover .shortcut-icon-wrapper i {
    transform: scale(1.05);
    background-image: conic-gradient(from var(--shortcut-rotate) at 50% 50%, #705aab 0deg, #7760b8 70deg, #5b69ba 150deg, #374964 230deg, #2e3f5a 320deg, #7760b8 360deg);
    filter: drop-shadow(0 0 12px rgba(18, 28, 46, 0.9));
}

.shortcut-item:hover .shortcut-icon-wrapper::after {
    filter: blur(18px) brightness(0.7);
    opacity: 0.9;
}
@property --shortcut-rotate { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes shortcut-icon-aurora-spin { from { --shortcut-rotate: 0deg; } to { --shortcut-rotate: 360deg; } }
@keyframes shortcut-icon-aurora-glow { 0% { transform: rotate(0deg) scale(0.92); opacity: 0.55; } 50% { transform: rotate(180deg) scale(1.04); opacity: 0.95; } 100% { transform: rotate(360deg) scale(0.92); opacity: 0.55; } }
.shortcut-label {
    font-family: var(--font-logo);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-secondary-dark);
    display: inline-block;
    padding-top: 0.35rem;
    transition: color 0.2s ease;
    min-height: 1.35rem;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}
.shortcut-item:hover .shortcut-label {
    color: transparent;
    background-image: linear-gradient(120deg, #1a1c3f, #0d1235, #1c2d63);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    animation:
        shortcut-label-disperse 0.18s forwards,
        shortcut-label-reveal 0.85s 0.18s steps(6, end) forwards,
        shortcut-label-spectrum 2.6s 1.05s linear infinite;
}
@keyframes shortcut-label-disperse {
    0% { opacity: 1; transform: translateY(0); filter: blur(0); }
    100% { opacity: 0; transform: translateY(30%); filter: blur(2px); }
}
@keyframes shortcut-label-reveal {
    0% { opacity: 0; filter: blur(2px); }
    100% { opacity: 1; filter: blur(0); }
}
@keyframes shortcut-label-spectrum {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.discover-section { padding: 0.5rem; transition: opacity 0.5s ease-in-out; }
.discover-section.hidden { opacity: 0; display: none; }
.discover-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.discover-header h2 { 
    font-size: 1.2rem; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.discover-refresh-btn {
    background: var(--glass-bg-color);
    border: 1px solid var(--glass-border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-subtle-dark);
    transition: all 0.3s ease;
}
.discover-refresh-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: rotate(180deg);
}
.discover-refresh-btn.loading i {
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Discover Toggle Button */
.discover-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0.5rem auto;
    padding: 8px 20px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(0, 217, 255, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 50px;
    color: var(--text-primary-dark);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.discover-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.25), rgba(0, 217, 255, 0.2));
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3), 0 0 40px rgba(0, 217, 255, 0.1);
    transform: translateY(-2px);
}
.discover-toggle-btn i {
    color: var(--accent-secondary);
}
.discover-toggle-btn.active {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(0, 217, 255, 0.2));
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

/* Discover Cards Grid */
.discover-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.discover-card {
    background: var(--glass-bg-color);
    backdrop-filter: blur(var(--glass-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--glass-backdrop-blur));
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-main);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.discover-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px rgba(138, 43, 226, 0.2);
}
.discover-card-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(0, 217, 255, 0.05));
}
.discover-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}
.discover-card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-secondary);
    font-weight: 600;
}
.discover-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.discover-card-snippet {
    font-size: 0.85rem;
    color: var(--text-subtle-dark);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.discover-card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--glass-border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
}
.discover-card-source-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}
.discover-loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-subtle-dark);
    gap: 1rem;
}
.discover-loading-placeholder i {
    font-size: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.discover-empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-subtle-dark);
}
.discover-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

#discover-source-link { display: block; text-decoration: none; color: inherit; }
.discover-card-placeholder { display: flex; gap: 1rem; background-color: var(--glass-bg-color); -webkit-backdrop-filter: blur(var(--glass-backdrop-blur)); backdrop-filter: blur(var(--glass-backdrop-blur)); border: 1px solid var(--glass-border-color); box-shadow: var(--glass-shadow); border-radius: var(--border-radius-main); padding: 1rem; }
.discover-text-content { flex: 1; }
.discover-image-placeholder { flex-basis: 35%; display: flex; align-items: center; justify-content: center; }
#discover-image { width: 100%; height: 100%; max-height: 120px; object-fit: cover; border-radius: calc(var(--border-radius-main) / 2); }
.card-footer { display: flex; align-items: center; gap: 0.5em; font-size: 0.8em; color: var(--text-subtle-dark); margin-top: 1em; }


/* === 5. Results View (Shared & Single-Column Styles) === */
.hidden { display: none !important; }

/* Desktop-only shortcuts - hidden on mobile */
.desktop-only-shortcut {
    display: none;
}

#results-view .container { display: flex; flex-direction: column; }

/* Mobile sidebar - scrolls out of view with page content */
.sidebar { 
    background-color: var(--glass-bg-color); 
    -webkit-backdrop-filter: blur(var(--glass-backdrop-blur)); 
    backdrop-filter: blur(var(--glass-backdrop-blur)); 
    padding: 0.75rem 1rem; 
    border-bottom: 1px solid var(--glass-border-color); 
    position: relative; /* Scrolls with content on mobile */
    z-index: 10;
}
.sidebar #sidebar-logo-back { 
    display: block; 
    font-family: var(--font-logo); 
    font-size: 1.2rem; 
    text-align: center; 
    color: var(--text-primary-dark); 
    margin-bottom: 0.75rem; 
    cursor: pointer;
    width: 100%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.sidebar .search-form-container { 
    margin-bottom: 1rem; 
    margin-top: 3rem; 
}
.sidebar .desktop-only-sidebar-content { display: none; }
.main-content { padding: 1rem; }


/* PRECISE GOOGLE-LIKE KNOWLEDGE PANEL STYLES */
/* This is a logical container, not a visual one. It has no background or padding. */
.knowledge-panel {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Increased gap for better separation of elements */
}


/* Panel Header: Title and Subtitle */
.panel-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border-color);
}
.panel-title {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0.5rem; /* Add space between title and subtitle row */
}

/* This new rule styles the container for the subtitle and the button */
.panel-subtitle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.panel-subtitle {
    font-size: 1rem;
    color: var(--text-secondary-dark);
    /* Remove margin from the p tag itself as the parent handles spacing */
    margin: 0; 
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.panel-actions .panel-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-subtle-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.panel-actions .panel-action-btn:not([disabled]):hover {
    color: var(--accent-nanoverse);
    border-color: var(--accent-nanoverse);
    box-shadow: 0 0 8px rgba(129, 92, 255, 0.4);
    transform: translateY(-1px);
}

.panel-actions .panel-action-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.export-pdf-btn:not([disabled]):hover {
    color: var(--accent-innovation-nexus);
    border-color: var(--accent-innovation-nexus);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

/* Knowledge Panel Title Section Styles */
.kp-title-header {
    margin-bottom: 0.25rem;
}

.kp-title-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-primary-dark);
}

/* This is a legacy selector, the new one is .panel-subtitle-row */
.kp-subtitle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
}

.kp-subtitle-row p {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary-dark);
}

.lightbook-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-subtle-dark);
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.lightbook-btn:not([disabled]) {
    cursor: pointer;
}

.lightbook-btn:not([disabled]):hover {
    color: var(--accent-nanoverse);
    background-color: var(--glass-bg-color);
    transform: translateY(-2px);
}

.lightbook-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Panel Body: The main two-column grid */
.panel-body {
    display: grid;
    /* On mobile, stack. On desktop, create two columns. */
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Panel Gallery: Grid for images on the left */
.panel-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid for images */
    gap: 0.5rem;
    grid-template-rows: auto;
}
.gallery-item-main {
    grid-column: 1 / -1; /* The main image takes the full width */
}
.gallery-item-main, .gallery-item-thumb {
    border-radius: var(--border-radius-kp);
    overflow: hidden;
    background: var(--bg-secondary-dark);
}
.gallery-item-main img, .gallery-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Facts Column: Container for text and fact cards */
.panel-facts-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* The description paragraph */
.panel-description {
    line-height: 1.6;
    font-size: 0.9rem;
    color: var(--text-secondary-dark);
}

/* Individual fact cards */
.fact-card {
    background: var(--canvas-node-bg);
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-kp);
    padding: 1rem;
}
.fact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-subtle-dark);
    margin-bottom: 0.25rem;
}
.fact-value {
    font-size: 1.1rem;
    color: var(--text-primary-dark);
    line-height: 1.4;
}

/* Knowledge Canvas Styling */
.knowledge-canvas {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

#kp-image-gallery {
    margin-bottom: 2rem;
}

#kp-title-section {
    margin-bottom: 2rem;
}

.kp-title-header h2 {
    font-family: var(--font-logo);
    font-size: 2.5rem;
    color: var(--text-primary-dark);
    margin-bottom: 1rem;
}

/* This is a legacy selector, the new one is .panel-subtitle-row */
#kp-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary-dark);
    margin-bottom: 2rem;
}

#kp-related-entities {
    margin-top: 3rem;
}

#kp-related-entities h3 {
    font-family: var(--font-logo);
    font-size: 1.5rem;
    color: var(--text-primary-dark);
    margin-bottom: 1.5rem;
}

/* Web Results and Containers styling */
.result-section { 
    background-color: var(--glass-bg-color); 
    -webkit-backdrop-filter: blur(var(--glass-backdrop-blur)); 
    backdrop-filter: blur(var(--glass-backdrop-blur)); 
    border: 1px solid var(--glass-border-color); 
    box-shadow: var(--glass-shadow); 
    border-radius: var(--border-radius-main); 
    padding: 1.25rem; 
    margin-bottom: 1.5rem; 
}

#web-results-section h2 { 
    font-size: 1.25rem; 
    font-weight: 500; 
    margin-bottom: 1rem; 
    padding-bottom: 0.75rem; 
    border-bottom: 1px solid var(--glass-border-color); 
}
#web-results-section ul { list-style: none; }
#web-results-section li { margin-bottom: 1.25rem; }
#web-results-section li a:hover h3 { text-decoration: underline; }
#web-results-section li h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: 0.25rem; }
.link-url {
    color: var(--text-secondary-dark);
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    overflow-wrap: break-word;
    word-break: break-all;
}
.link-snippet { color: var(--text-primary-dark); font-size: 0.95rem; }
#loading-indicator { padding: 3rem 1rem; text-align: center; border: none; background: none; box-shadow: none; }
.spinner { width: 48px; height: 48px; border-radius: 50%; display: inline-block; border-top: 3px solid var(--accent-nanoverse); border-right: 3px solid transparent; animation: spin 1s linear infinite; margin-bottom: 1rem; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#error-message { background-color: rgba(255, 77, 106, 0.1); border: 1px solid rgba(255, 77, 106, 0.5); color: #ff4d6a; padding: 1.25rem; border-radius: var(--border-radius-main); text-align: center; }


/* === 6. SIDEBAR TOGGLE HEADER STYLES (UNIVERSAL) === */
.sidebar-toggle-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; margin-top: 1rem; border-bottom: 1px solid var(--glass-border-color); }
#sidebar-view-title { font-family: var(--font-logo); font-size: 1.1rem; color: var(--text-primary-dark); display: flex; align-items: center; gap: 0.6rem; position: absolute; left: 50%; transform: translateX(-50%); }
.sidebar-view-btn { width: 40px; height: 40px; border: 1px solid var(--glass-border-color); background-color: transparent; border-radius: 50%; color: var(--text-secondary-dark); font-size: 1.1rem; transition: var(--transition-fast); }
.sidebar-view-btn.active, .sidebar-view-btn:hover { background-color: var(--accent-nanoverse); color: var(--bg-primary-dark); border-color: var(--accent-nanoverse); box-shadow: 0 0 8px var(--accent-nanoverse); }
#nexus-view-btn.active, #nexus-view-btn:hover { background-color: var(--accent-innovation-nexus); border-color: var(--accent-innovation-nexus); box-shadow: 0 0 8px var(--accent-innovation-nexus-glow);}
.sidebar-content-panel { display: none; padding-top: 1rem; animation: fadeInPanel 0.4s ease-out; }
.sidebar-content-panel.active { 
    display: block; 
    max-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling for content panels (innovation nexus, search history) */
.sidebar-content-panel.active::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content-panel.active::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar-content-panel.active::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-content-panel.active::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
@keyframes fadeInPanel { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
#innovation-nodes-grid, #search-history-list { display: flex; flex-direction: column; gap: 1rem; }
.innovation-node { background: rgba(var(--accent-innovation-nexus-glow), 0.1); border: 1px solid rgba(var(--accent-innovation-nexus-glow), 0.3); border-radius: var(--border-radius-kp); padding: 1rem; animation: nexus-pulse 5s infinite ease-in-out; }
@keyframes nexus-pulse { 0% { box-shadow: 0 0 5px rgba(var(--accent-innovation-nexus-glow), 0.2); } 50% { box-shadow: 0 0 12px rgba(var(--accent-innovation-nexus-glow), 0.5); } 100% { box-shadow: 0 0 5px rgba(var(--accent-innovation-nexus-glow), 0.2); } }
.innovation-node-title { font-weight: 600; color: var(--text-primary-dark); margin-bottom: 0.5rem; }
.innovation-node-spark { font-size: 0.9rem; color: var(--text-secondary-dark); line-height: 1.5; margin-bottom: 1rem; display: block; }
.innovation-node-button { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; color: var(--bg-primary-dark); background-color: var(--accent-innovation-nexus); padding: 0.5rem 1rem; border-radius: 8px; width: 100%; text-align: center; transition: all 0.2s ease-out; }
.innovation-node-button:hover { background-color: #fff; color: #000; transform: translateY(-2px); }
.nexus-placeholder, .history-placeholder { font-style: italic; font-size: 0.9rem; color: var(--text-subtle-dark); text-align: center; padding: 1rem; }
#search-history-list { list-style: none; padding-left: 0; }
.search-history-item { background-color: var(--glass-bg-color); border: 1px solid var(--glass-border-color); border-radius: var(--border-radius-search); padding: 0.75rem 1rem; color: var(--text-secondary-dark); font-size: 0.9rem; cursor: pointer; transition: var(--transition-fast); }
.search-history-item:hover { background-color: var(--accent-nanoverse); color: var(--bg-primary-dark); border-color: var(--accent-nanoverse); }

/* --- MODIFICATION START (Step 6) --- */

/* Deep Research Knowledge Panel specific styling */
.deep-research-panel {
    background-color: var(--glass-bg-color);
    -webkit-backdrop-filter: blur(var(--glass-backdrop-blur));
    backdrop-filter: blur(var(--glass-backdrop-blur));
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--glass-shadow);
}
.deep-research-panel .panel-title {
    color: var(--accent-deep-research);
    text-shadow: 0 0 8px var(--accent-deep-research-glow);
}
.deep-research-panel .fact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
/* Deep Research Gallery Styling (up to 10 images) */
.gallery-thumbnails-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
/* Deep Research Timeline Styling */
.timeline-section {
    margin-top: 1.5rem;
}
.timeline-section h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border-color);
}
.timeline-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.timeline-item {
    display: flex;
    gap: 1rem;
    background: var(--canvas-node-bg);
    border-left: 3px solid var(--accent-deep-research);
    padding: 1rem;
    border-radius: var(--border-radius-kp);
}
.timeline-date {
    font-weight: 600;
    color: var(--text-secondary-dark);
    flex-basis: 120px;
    flex-shrink: 0;
}
.timeline-event {
    line-height: 1.6;
    color: var(--text-primary-dark);
}

/* Original Codex (Legacy) Styles preserved for backward compatibility/other uses */
.codex-container { background: var(--bg-primary-dark); border: 1px solid rgba(var(--accent-deep-research-glow), 0.2); border-radius: var(--border-radius-main); padding: 1rem; animation: fadeInCodex 0.8s ease-out; }
/* NEW: Add margin to separate it from the new canvas */
.deep-research-panel + .codex-container {
    margin-top: 2rem;
}
@keyframes fadeInCodex { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.codex-header { text-align: center; padding: 2rem 1rem; border-bottom: 1px solid var(--glass-border-color); margin-bottom: 2rem; }
.codex-header i { font-size: 2.5rem; color: var(--accent-deep-research); text-shadow: 0 0 15px var(--accent-deep-research-glow); margin-bottom: 1rem; }
.codex-header h1 { font-family: var(--font-logo); font-size: 2rem; color: var(--text-primary-dark); }
.codex-section { background: var(--glass-bg-color); border-radius: var(--border-radius-kp); padding: 1.5rem; margin-bottom: 2rem; border: 1px solid var(--glass-border-color); }
.codex-section h2 { font-family: var(--font-logo); font-size: 1.5rem; font-weight: 500; color: var(--accent-deep-research); margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--glass-border-color); }
.codex-prose { line-height: 1.8; color: var(--text-secondary-dark); }
.codex-prose p { margin-bottom: 1rem; }

/* --- MODIFICATION END (Step 6) --- */


/* === 7. DESKTOP & WIDESCREEN STYLES === */
@media (min-width: 992px) {
    .mobile-main-header, .mobile-logo-top { display: none; }
    .discover-section { display: none; }
    .desktop-main-header, .desktop-center-box { display: flex; }
    .homepage-view { 
        background-image: url('/static/images/THE-NANOVERSE-Light-background01.png'); 
        background-size: cover; 
        background-position: center center;
    }
    /* --- MODIFICATION START --- */
    .desktop-main-header { 
        position: absolute; 
        top: 1rem; 
        right: 0.5rem; /* MODIFIED: Moved closer to the right edge */
        align-items: center; 
    }
    /* --- MODIFICATION END --- */
    .homepage-content-wrapper { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 1rem; width: 100%; overflow: hidden; min-height: 0; }
    .desktop-logo-center { 
        display: block; 
        font-family: var(--font-logo); 
        font-size: 3.5rem; 
        margin-bottom: 1rem;
        flex-shrink: 0;
       background: linear-gradient(
        var(--logo-angle),
        #f3dcff 0%,      /* light lavender pink */
        #d9b9ff 14%,     /* light purple */
        #c5a0ff 28%,     /* medium purple */
        #a6b4ff 42%,     /* light indigo */
        #7fc9ff 56%,     /* sky blue */
        #63d5ff 70%,     /* bright cyan */
        #7fb7ff 84%,     /* soft blue */
        #f3dcff 100%     /* light lavender pink */
    );
        background-size: 300% 300%;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        animation: logo-color-shift 24s linear infinite, logo-gradient-move 36s ease-in-out infinite;
        text-shadow: none;
        filter: drop-shadow(0 3px 10px rgba(0,0,0,0.4));
    }
    .homepage-view .search-form-container { width: 80%; max-width: 1400px; margin-left: auto; margin-right: auto; margin-bottom: 1rem; }
    #search-form-home { flex-direction: column; align-items: stretch; height: auto; padding: 1rem 1.25rem; border-radius: var(--border-radius-main); gap: 0.75rem; }
    #search-form-home .search-bar-toolbar { position: static; width: 100%; }
    #search-query-home { font-size: 1.15rem; padding: 0; }
    .shortcuts-container {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.85rem;
        width: min(110%, 760px);
        transform: translateX(-40px);
    }
    
    /* Show all shortcuts on desktop */
    .desktop-only-shortcut {
        display: flex;
    }
    
    #results-view .container {
        flex-direction: row;
        height: 100vh;
        overflow: hidden; /* This is critical */
    }
    .sidebar {
        width: 350px;
        flex-shrink: 0;
        padding: 1.5rem;
        border-bottom: none;
        border-right: 1px solid var(--glass-border-color);
        position: static;
        display: flex;
        flex-direction: column;
        overflow: hidden; /* Ensure sidebar itself doesn't try to scroll */
    }
    .sidebar #sidebar-logo-back { font-size: 1.5rem; flex-shrink: 0; } /* Prevent shrinking */
    .sidebar .search-form-container { flex-shrink: 0; } /* Prevent shrinking */

    .desktop-only-sidebar-content {
        display: flex; /* Make it a flex container for its own children */
        flex-direction: column;
        flex: 1; /* Allow it to grow to fill space */
        min-height: 0; /* A flexbox trick to allow scrolling in a flex item */
    }

    #innovation-nexus-container,
    #search-history-container {
        flex: 1; /* The active panel will grow */
        overflow-y: auto;
        min-height: 0;
        padding-right: 0.5rem; /* Space for the scrollbar so content isn't cramped */
    }

    .credits { flex-shrink: 0; margin-top: auto; padding-top: 1.5rem; border-top: 1px solid #333; text-align: center; color: var(--text-subtle-dark); font-size: 0.8rem; }
    .main-content {
        flex-grow: 1;
        overflow-y: auto; /* The main content area scrolls independently */
        padding: 2rem;
        background-color: #111;
    }
    .main-content #results-display-area { max-width: 900px; margin: 0 auto; width: 100%; }
    #search-query-results { font-size: 1.15rem; }
    
    /* --- DESKTOP KNOWLEDGE PANEL --- */
    .panel-body {
        /* The definitive fix: Wider for facts, narrower for images */
        grid-template-columns: 3fr 2fr;
    }
    .panel-gallery {
        order: 2; /* Move the image gallery to the right on desktop */
    }
    .panel-facts-column {
        order: 1;
    }

    /* --- MODIFICATION START (Step 6 - Desktop) --- */
    .deep-research-panel .panel-body {
        grid-template-columns: 1fr; /* Override to stack info and images vertically */
    }
    .deep-research-panel .panel-gallery {
        order: 1; /* Images first */
    }
    .deep-research-panel .panel-facts-column {
        order: 2; /* Info second */
    }
    .deep-research-panel .fact-grid, .deep-research-panel .timeline-grid {
        grid-template-columns: 1fr 1fr; /* Two-column grid for facts and timeline on desktop */
    }
    .deep-research-panel .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }
    /* --- MODIFICATION END (Step 6 - Desktop) --- */

}

 /* Wikipedia Panel Desktop Adjustments */
    .wiki-panel-container {
        max-width: 720px;
    }
    .wiki-main-card {
        grid-template-columns: 180px 1fr;
    }
    .wiki-facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wiki-related-pills {
        grid-template-columns: repeat(2, 1fr);
    }


/* =============================================================================
   WIKIPEDIA KNOWLEDGE PANEL - UNIFIED WITH RESULT VIEW
   Professional Glassmorphic Design with Subtle Futuristic Accents
   ============================================================================= */

/* Container & Entrance Animation */
.wiki-panel-container {
    margin: 1.5rem 0 3rem 0; /* Large bottom margin for clear gap from web results */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.wiki-panel-container.wiki-panel-enter {
    opacity: 1;
    transform: translateY(0);
}

.wiki-panel-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Subtle Ambient Glow - Toned Down */
.wiki-ambient-glow {
    display: none; /* Hidden for cleaner look matching result view */
}

/* Glass Card Base - Matching Result Sections (No holographic on large containers) */
.wiki-glass-card {
    position: relative;
    background-color: var(--glass-bg-color);
    backdrop-filter: blur(var(--glass-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--glass-backdrop-blur));
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wiki-glass-card:first-child {
    border-radius: var(--border-radius-kp) var(--border-radius-kp) 0 0;
    border-bottom: none;
}

.wiki-glass-card:last-child {
    border-radius: 0 0 var(--border-radius-kp) var(--border-radius-kp);
}

.wiki-glass-card:only-child {
    border-radius: var(--border-radius-kp);
    border: 1px solid var(--glass-border-color);
}

/* Connected cards in the middle */
.wiki-main-card {
    border-radius: 0;
    border-top: none;
    border-bottom: none;
}

.wiki-related-card {
    border-radius: 0;
    border-top: none;
    border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.wiki-header-card {
    padding: 1.25rem 1.5rem;
}

/* Subtle top accent line - monochrome */
.wiki-header-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.25) 30%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0.25) 70%, 
        transparent 100%);
    opacity: 0.7;
}

.wiki-header-content {
    position: relative;
    z-index: 1;
}

.wiki-entity-badge-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

/* Entity Type Badges - Monochrome Professional */
.wiki-entity-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary-dark);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.25s ease;
}

.wiki-type-icon::before {
    content: '';
    display: none;
}

/* Unified badge colors - subtle tints */
.wiki-type-person { 
    background: rgba(255, 255, 255, 0.1); 
    color: var(--text-primary-dark);
}
.wiki-type-person .wiki-type-icon::before { content: ''; }

.wiki-type-place { 
    background: rgba(255, 255, 255, 0.1); 
    color: var(--text-primary-dark);
}

.wiki-type-organization { 
    background: rgba(255, 255, 255, 0.1); 
    color: var(--text-primary-dark);
}

.wiki-type-media, .wiki-type-music { 
    background: rgba(255, 255, 255, 0.1); 
    color: var(--text-primary-dark);
}

.wiki-type-work { 
    background: rgba(255, 255, 255, 0.1); 
    color: var(--text-primary-dark);
}

.wiki-type-concept { 
    background: rgba(255, 255, 255, 0.1); 
    color: var(--text-primary-dark);
}

/* Confidence Badge - Subtle */
.wiki-confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 500;
    background: transparent;
    color: var(--text-subtle-dark);
    border: none;
}

.wiki-confidence-high { color: var(--text-secondary-dark); }
.wiki-confidence-medium { color: var(--text-subtle-dark); }
.wiki-confidence-low { color: var(--text-subtle-dark); opacity: 0.7; }

/* Panel Title & Subtitle */
.wiki-panel-title {
    font-family: var(--font-logo);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary-dark);
    margin: 0 0 0.35rem 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.wiki-panel-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary-dark);
    margin: 0;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT CARD (Image + Facts)
   ═══════════════════════════════════════════════════════════════════════════ */

.wiki-main-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
}

/* Image Section */
.wiki-image-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.wiki-image-frame {
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.wiki-image-circular {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.wiki-image-rounded {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Remove colorful glow */
.wiki-image-glow {
    display: none;
}

.wiki-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    transition: transform 0.4s ease;
}

.wiki-image-frame:hover .wiki-main-image {
    transform: scale(1.03);
}

.wiki-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
    z-index: 2;
}

.wiki-image-credit {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.55rem;
    z-index: 3;
    cursor: help;
    transition: background 0.2s ease;
}

.wiki-image-credit:hover {
    background: rgba(0, 0, 0, 0.75);
}

.wiki-image-error .wiki-image-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.03);
}

.wiki-image-error .wiki-main-image { display: none; }

/* Facts Section */
.wiki-facts-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wiki-facts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* Fact Cards - Professional Holographic Style */
.wiki-fact-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    animation: wiki-fact-enter 0.35s ease forwards;
    animation-delay: calc(var(--fact-index, 0) * 0.05s);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Holographic shimmer for fact cards */
.wiki-fact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 45%,
        rgba(200, 200, 200, 0.08) 50%,
        rgba(255, 255, 255, 0.05) 55%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Holographic sweep for fact cards */
.wiki-fact-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 30%,
        rgba(220, 220, 220, 0.08) 50%,
        rgba(255, 255, 255, 0.02) 70%,
        transparent 100%
    );
    transform: skewX(-20deg);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.wiki-fact-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wiki-fact-card:hover::before {
    opacity: 1;
}

.wiki-fact-card:hover::after {
    opacity: 1;
    animation: wiki-fact-sweep 0.7s ease-out;
}

@keyframes wiki-fact-sweep {
    0% { left: -100%; opacity: 0; }
    10% { opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

@keyframes wiki-fact-enter {
    to { opacity: 1; transform: translateY(0); }
}

/* Hide the inline shine element (using pseudo-elements instead) */
.wiki-fact-shine {
    display: none;
}

.wiki-fact-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-subtle-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wiki-fact-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary-dark);
    line-height: 1.4;
}

/* Extract Container */
.wiki-extract-container {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0.5rem;
}

.wiki-extract-text {
    font-size: 0.92rem;
    color: var(--text-secondary-dark);
    line-height: 1.7;
    margin: 0;
}

.wiki-extract-truncated {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wiki-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary-dark);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.wiki-expand-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

.wiki-expand-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-primary-dark);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wiki-expand-btn:hover::after {
    opacity: 1;
    animation: wiki-btn-sweep 0.6s ease-out;
}

@keyframes wiki-btn-sweep {
    0% { left: -100%; opacity: 0; }
    10% { opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

.wiki-expand-icon {
    transition: transform 0.25s ease;
}

.wiki-expand-btn.wiki-expanded .wiki-expand-icon {
    transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RELATED ENTITIES CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.wiki-related-card {
    padding: 1rem 1.5rem 1.25rem;
}

.wiki-related-header {
    margin-bottom: 0.75rem;
}

.wiki-related-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-subtle-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

.wiki-related-title svg {
    color: var(--text-subtle-dark);
    opacity: 0.7;
}

.wiki-related-pills {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* Related Entity Buttons - Professional Holographic Style */
.wiki-related-pill {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    animation: wiki-pill-enter 0.3s ease forwards;
    animation-delay: calc(var(--pill-index, 0) * 0.04s + 0.2s);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Holographic shimmer layer for pills */
.wiki-related-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 20%,
        rgba(255, 255, 255, 0.04) 40%,
        rgba(200, 200, 200, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 60%,
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Holographic sweep shine for pills */
.wiki-related-pill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(220, 220, 220, 0.1) 50%,
        rgba(255, 255, 255, 0.03) 75%,
        transparent 100%
    );
    transform: skewX(-15deg);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

@keyframes wiki-pill-enter {
    to { opacity: 1; transform: translateY(0); }
}

/* Pill Hover - Holographic Activation */
.wiki-related-pill:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wiki-related-pill:hover::before {
    opacity: 1;
}

.wiki-related-pill:hover::after {
    opacity: 1;
    animation: wiki-pill-sweep 0.8s ease-out;
}

@keyframes wiki-pill-sweep {
    0% {
        left: -100%;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    100% {
        left: 150%;
        opacity: 0;
    }
}

.wiki-related-pill:focus {
    outline: none;
    border-color: var(--accent-nanoverse);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.15);
}

.wiki-pill-clicked {
    animation: wiki-pill-press 0.2s ease;
}

@keyframes wiki-pill-press {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.wiki-pill-avatar {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.wiki-pill-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wiki-pill-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary-dark);
    background: rgba(255, 255, 255, 0.08);
}

.wiki-pill-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.wiki-pill-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wiki-pill-desc {
    font-size: 0.7rem;
    color: var(--text-subtle-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wiki-pill-arrow {
    flex-shrink: 0;
    color: var(--text-subtle-dark);
    opacity: 0.5;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.wiki-related-pill:hover .wiki-pill-arrow {
    transform: translateX(2px);
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ATTRIBUTION BAR
   ═══════════════════════════════════════════════════════════════════════════ */

.wiki-attribution-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 var(--border-radius-kp) var(--border-radius-kp);
    border: 1px solid var(--glass-border-color);
    border-top: none;
}

.wiki-source-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--text-secondary-dark);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.wiki-source-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

.wiki-source-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary-dark);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wiki-source-btn:hover::after {
    opacity: 1;
    animation: wiki-btn-sweep 0.6s ease-out;
}

.wiki-logo {
    flex-shrink: 0;
    opacity: 0.8;
}

.wiki-external-icon {
    flex-shrink: 0;
    opacity: 0.5;
}

.wiki-license-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.65rem;
    color: var(--text-subtle-dark);
}

.wiki-license-badge a {
    color: var(--text-subtle-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.wiki-license-badge a:hover {
    color: var(--text-secondary-dark);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN - FULL WIDTH MATCHING RESULT SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 520px) {
    .wiki-facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wiki-related-pills {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .wiki-panel-container {
        /* Full width to match result sections */
        max-width: none;
    }
    
    .wiki-main-card {
        grid-template-columns: 140px 1fr;
        gap: 1.5rem;
    }
    
    .wiki-image-section {
        position: sticky;
        top: 1rem;
    }
    
    .wiki-image-circular {
        width: 130px;
        height: 130px;
    }
    
    .wiki-related-pills {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .wiki-panel-title {
        font-size: 2rem;
    }
    
    .wiki-facts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wiki-related-pills {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wiki-image-circular {
        width: 150px;
        height: 150px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY & REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .wiki-panel-container {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .wiki-fact-card,
    .wiki-related-pill {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .wiki-main-image,
    .wiki-expand-icon,
    .wiki-pill-arrow {
        transition: none;
    }
}

/* Focus Visible for Keyboard Navigation */
.wiki-expand-btn:focus-visible,
.wiki-related-pill:focus-visible,
.wiki-source-btn:focus-visible {
    outline: 2px solid var(--accent-nanoverse);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .wiki-glass-card {
        background: rgba(30, 30, 30, 0.95);
        border: 2px solid rgba(255, 255, 255, 0.4);
    }
    
    .wiki-fact-label {
        color: rgba(255, 255, 255, 0.75);
    }
    
    .wiki-fact-value {
        color: #ffffff;
    }
}

.wiki-license-text a {
    color: var(--text-subtle-dark);
    text-decoration: none;
}

.wiki-license-text a:hover {
    text-decoration: underline;
    color: var(--text-secondary-dark);
}

/* ==============================================================================
   ENHANCED DEEP RESEARCH REPORT - LITHOGRAPHIC STYLES
   Professional, pixel-perfect report view with glassmorphic UI elements
   ============================================================================== */

/* === Report Container === */
.enhanced-research-report {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    font-family: var(--font-body);
    color: var(--text-primary-dark);
}

/* === Report Cover Section === */
.research-cover {
    position: relative;
    padding: 3rem 2.5rem;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, rgba(46, 46, 46, 0.8) 0%, rgba(28, 28, 28, 0.9) 100%);
    border-radius: var(--border-radius-main);
    border: 1px solid var(--glass-border-color);
    backdrop-filter: blur(var(--glass-backdrop-blur));
    overflow: hidden;
}

.research-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-deep-research), var(--accent-nanoverse), var(--accent-deep-research));
    background-size: 200% 100%;
    animation: shimmer-gradient 3s ease infinite;
}

@keyframes shimmer-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cover-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(199, 125, 255, 0.15);
    border: 1px solid rgba(199, 125, 255, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-deep-research);
    margin-bottom: 1.5rem;
}

.cover-badge i {
    font-size: 0.875rem;
}

.cover-title {
    font-family: var(--font-logo);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-nanoverse) 50%, var(--accent-deep-research) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cover-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary-dark);
    margin-bottom: 1.5rem;
}

.cover-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-subtle-dark);
}

.cover-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cover-meta-item i {
    color: var(--accent-deep-research);
}

.confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.confidence-badge.high {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.confidence-badge.medium {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.confidence-badge.low {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* === Agent Traces (Collapsible) === */
.agent-traces-section {
    margin-bottom: 2rem;
}

.agent-traces-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(46, 46, 46, 0.5);
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-kp);
    cursor: pointer;
    transition: var(--transition-fast);
}

.agent-traces-toggle:hover {
    background: rgba(56, 56, 56, 0.6);
    border-color: var(--accent-deep-research);
}

.agent-traces-toggle h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary-dark);
}

.agent-traces-toggle i.toggle-icon {
    transition: transform 0.3s ease;
}

.agent-traces-toggle.expanded i.toggle-icon {
    transform: rotate(180deg);
}

.agent-traces-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.agent-traces-content.expanded {
    max-height: 500px;
}

.agent-traces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.agent-trace-card {
    padding: 1rem;
    background: rgba(36, 36, 36, 0.6);
    border: 1px solid var(--glass-border-color);
    border-radius: 10px;
    transition: var(--transition-fast);
}

.agent-trace-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-nanoverse);
    box-shadow: 0 8px 24px rgba(0, 240, 255, 0.1);
}

.agent-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--accent-nanoverse);
}

.agent-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.agent-duration {
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
}

/* === Executive Summary === */
.executive-summary-section {
    margin-bottom: 2.5rem;
}

.section-glass-card {
    padding: 2rem;
    background: var(--glass-bg-color);
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-main);
    backdrop-filter: blur(var(--glass-backdrop-blur));
    transition: var(--transition-smooth);
}

.section-glass-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--glass-shadow);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header i {
    font-size: 1.25rem;
    color: var(--accent-deep-research);
}

.section-header h3 {
    font-family: var(--font-logo);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.executive-overview {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary-dark);
    margin-bottom: 1.5rem;
}

.executive-overview p {
    margin-bottom: 1rem;
}

.key-takeaways-list {
    list-style: none;
    padding: 0;
}

.key-takeaway-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: rgba(199, 125, 255, 0.05);
    border-left: 3px solid var(--accent-deep-research);
    border-radius: 0 10px 10px 0;
    transition: var(--transition-fast);
}

.key-takeaway-item:hover {
    background: rgba(199, 125, 255, 0.1);
    transform: translateX(4px);
}

.takeaway-priority {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent-deep-research);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
}

.takeaway-content {
    flex: 1;
}

.takeaway-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary-dark);
}

.takeaway-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
}

.bottom-line {
    padding: 1.25rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(199, 125, 255, 0.1));
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: var(--border-radius-kp);
}

.bottom-line-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-nanoverse);
    margin-bottom: 0.5rem;
}

.bottom-line-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary-dark);
}

/* === Top Findings Section === */
.top-findings-section {
    margin-bottom: 2.5rem;
}

.findings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.finding-card {
    position: relative;
    padding: 1.5rem;
    background: var(--canvas-node-bg);
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-kp);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.finding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-nanoverse), var(--accent-deep-research));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.finding-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-nanoverse);
    box-shadow: 0 12px 32px rgba(0, 240, 255, 0.15);
}

.finding-card:hover::before {
    opacity: 1;
}

.finding-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-nanoverse);
}

.finding-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-right: 2.5rem;
    color: var(--text-primary-dark);
}

.finding-summary {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary-dark);
    margin-bottom: 1rem;
}

.finding-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.finding-confidence,
.finding-significance {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 10px;
}

.finding-confidence {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.finding-significance.high {
    background: rgba(250, 204, 21, 0.1);
    color: #facc15;
}

.finding-significance.medium {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

.finding-implications {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border-color);
    font-size: 0.85rem;
    color: var(--text-subtle-dark);
    font-style: italic;
}

/* === Knowledge Canvas (Enhanced) === */
.knowledge-canvas-section {
    margin-bottom: 2.5rem;
}

.canvas-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.canvas-image-item {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: var(--border-radius-kp);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.canvas-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.canvas-image-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.canvas-image-item:hover img {
    transform: scale(1.1);
}

.verified-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.verified-fact-card {
    padding: 1.25rem;
    background: rgba(36, 36, 36, 0.7);
    border: 1px solid var(--glass-border-color);
    border-radius: 10px;
    transition: var(--transition-fast);
}

.verified-fact-card:hover {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.05);
}

.fact-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-nanoverse);
    margin-bottom: 0.5rem;
}

.fact-statement {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary-dark);
    margin-bottom: 0.75rem;
}

.fact-verification {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
}

.fact-confidence-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.fact-confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, var(--accent-nanoverse));
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* === Timeline Section === */
.timeline-section {
    margin-bottom: 2.5rem;
}

.timeline-container {
    position: relative;
    padding-left: 2.5rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-deep-research), var(--accent-nanoverse), var(--accent-deep-research));
}

.timeline-event {
    position: relative;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--canvas-node-bg);
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-kp);
    transition: var(--transition-fast);
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -2.25rem;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent-nanoverse);
    border: 2px solid var(--bg-primary-dark);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-nanoverse);
}

.timeline-event:hover {
    border-color: var(--accent-nanoverse);
    transform: translateX(4px);
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-nanoverse);
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary-dark);
}

.timeline-description {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary-dark);
}

.timeline-significance {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(250, 204, 21, 0.1);
    border-radius: 6px;
    font-size: 0.7rem;
    color: #facc15;
}

/* === Primary Narrative Section === */
.narrative-section {
    margin-bottom: 2.5rem;
}

.narrative-introduction {
    margin-bottom: 2rem;
}

.narrative-hook {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--accent-deep-research);
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-deep-research);
    padding-left: 1.25rem;
}

.narrative-context,
.narrative-thesis {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary-dark);
    margin-bottom: 1rem;
}

.narrative-body {
    margin-bottom: 2rem;
}

.narrative-body-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border-color);
}

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

.narrative-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.narrative-section-title::before {
    content: '';
    width: 4px;
    height: 1.125rem;
    background: var(--accent-nanoverse);
    border-radius: 2px;
}

.narrative-section-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary-dark);
}

.narrative-key-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.key-point-tag {
    padding: 0.375rem 0.75rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 16px;
    font-size: 0.75rem;
    color: var(--accent-nanoverse);
}

.narrative-conclusion {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.08), rgba(0, 240, 255, 0.08));
    border: 1px solid rgba(199, 125, 255, 0.2);
    border-radius: var(--border-radius-kp);
}

.conclusion-synthesis,
.conclusion-implications {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary-dark);
    margin-bottom: 1rem;
}

.conclusion-implications:last-child {
    margin-bottom: 0;
}

/* === Alternative Perspectives Section === */
.perspectives-section {
    margin-bottom: 2.5rem;
}

.perspectives-intro {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary-dark);
    margin-bottom: 1.5rem;
}

.perspectives-grid {
    display: grid;
    gap: 1.25rem;
}

.perspective-card {
    padding: 1.5rem;
    background: var(--canvas-node-bg);
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-kp);
    transition: var(--transition-fast);
}

.perspective-card:hover {
    border-color: var(--accent-deep-research);
    box-shadow: 0 8px 24px rgba(199, 125, 255, 0.1);
}

.perspective-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-deep-research);
    margin-bottom: 0.5rem;
}

.perspective-source {
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
    margin-bottom: 1rem;
}

.perspective-summary {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary-dark);
}

.perspective-evidence {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1rem;
    padding: 0.25rem 0.625rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
}

.perspective-evidence.strong {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.perspective-evidence.moderate {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
}

.perspective-evidence.weak {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.perspectives-synthesis {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(199, 125, 255, 0.05);
    border-left: 3px solid var(--accent-deep-research);
    border-radius: 0 10px 10px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary-dark);
}

/* === Source Bibliography === */
.bibliography-section {
    margin-bottom: 2rem;
}

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

.bibliography-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(36, 36, 36, 0.5);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.bibliography-item:hover {
    background: rgba(46, 46, 46, 0.7);
}

.bibliography-number {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-subtle-dark);
}

.bibliography-link {
    font-size: 0.875rem;
    color: var(--accent-nanoverse);
    word-break: break-all;
    transition: color 0.2s ease;
}

.bibliography-link:hover {
    color: var(--accent-deep-research);
    text-decoration: underline;
}

/* === Research Metadata Footer === */
.research-metadata-section {
    padding: 1.5rem;
    background: rgba(28, 28, 28, 0.8);
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-kp);
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.metadata-item {
    text-align: center;
}

.metadata-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-nanoverse);
    margin-bottom: 0.25rem;
}

.metadata-label {
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* === Holographic Hover Effects === */
@keyframes holographic-shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.holographic-card {
    position: relative;
    overflow: hidden;
}

.holographic-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 60%
    );
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.holographic-card:hover::after {
    opacity: 1;
    animation: holographic-shimmer 1.5s ease infinite;
}

/* === Print-Ready Typography === */
@media print {
    .enhanced-research-report {
        max-width: 100%;
        padding: 1rem;
        color: #000;
        background: #fff;
    }
    
    .research-cover,
    .section-glass-card,
    .finding-card,
    .perspective-card,
    .timeline-event,
    .verified-fact-card {
        background: #fff;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    .cover-title,
    .section-header h3 {
        background: none;
        -webkit-text-fill-color: #000;
        color: #000;
    }
    
    .agent-traces-section {
        display: none;
    }
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .enhanced-research-report {
        padding: 1rem;
    }
    
    .research-cover {
        padding: 1.5rem;
    }
    
    .cover-title {
        font-size: 1.5rem;
    }
    
    .cover-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .section-glass-card {
        padding: 1.25rem;
    }
    
    .findings-grid,
    .canvas-images-gallery {
        grid-template-columns: 1fr;
    }
    
    .timeline-container {
        padding-left: 1.5rem;
    }
    
    .timeline-event::before {
        left: -1.25rem;
    }
}

/* ==============================================================================
   DEEP RESEARCH REPORT V2 - STUDIO-GRADE LITHOGRAPHIC STYLES
   Professional typesetting engine with glassmorphic UI and holographic effects
   ============================================================================== */

/* === Base Report Container === */
.deep-research-report-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary-dark);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.deep-research-report-container.drr-report-enter {
    opacity: 1;
    transform: translateY(0);
}

/* === Typography Foundation === */
.deep-research-report-container h1,
.deep-research-report-container h2,
.deep-research-report-container h3,
.deep-research-report-container h4 {
    font-family: var(--font-logo), 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.deep-research-report-container p {
    margin: 0 0 1rem 0;
    line-height: 1.75;
}

.deep-research-report-container p:last-child {
    margin-bottom: 0;
}

.report-paragraph {
    text-indent: 0;
    margin-bottom: 1.25em;
    text-align: justify;
    hyphens: auto;
}

/* === Glass Card Base === */
.drr-glass-card {
    background: var(--glass-bg-color);
    backdrop-filter: blur(var(--glass-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--glass-backdrop-blur));
    border: 1px solid var(--glass-border-color);
    border-radius: var(--border-radius-main);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.drr-glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--glass-shadow);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   COVER SECTION - Title, Authors, Date, Version, Confidence
   ═══════════════════════════════════════════════════════════════════════════════ */

.drr-cover-section {
    margin-bottom: 2.5rem;
}

.drr-cover-glass {
    position: relative;
    padding: 2.5rem 2rem;
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.95), rgba(20, 20, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.drr-cover-accent-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--accent-deep-research) 0%, 
        var(--accent-nanoverse) 50%, 
        var(--accent-deep-research) 100%);
    background-size: 200% 100%;
    animation: drr-gradient-shift 4s ease infinite;
}

@keyframes drr-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.drr-cover-badge-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.drr-cover-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.2), rgba(199, 125, 255, 0.1));
    border: 1px solid rgba(199, 125, 255, 0.4);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-deep-research);
}

.drr-cover-type-badge i {
    font-size: 0.8rem;
}

.drr-cover-version {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-subtle-dark);
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.drr-cover-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 40%, var(--accent-nanoverse) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.drr-cover-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary-dark);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Cover Meta Grid */
.drr-cover-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.drr-meta-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.drr-meta-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.drr-meta-card i {
    font-size: 1.25rem;
    color: var(--accent-nanoverse);
    opacity: 0.9;
}

.drr-meta-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.drr-meta-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-subtle-dark);
}

.drr-meta-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary-dark);
}

.drr-meta-query {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Confidence Panel with Gauge */
.drr-confidence-panel {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.drr-confidence-main {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.drr-confidence-gauge {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.drr-gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.drr-gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.drr-gauge-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}

.drr-gauge-fill.high {
    stroke: #22c55e;
    filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.5));
}

.drr-gauge-fill.medium {
    stroke: #facc15;
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.5));
}

.drr-gauge-fill.low {
    stroke: #ef4444;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
}

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

.drr-gauge-percent {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary-dark);
    line-height: 1;
}

.drr-gauge-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle-dark);
    margin-top: 0.25rem;
}

.drr-confidence-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.drr-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.drr-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-nanoverse);
    line-height: 1;
}

.drr-stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle-dark);
}

/* Uncertainty Drivers */
.drr-uncertainty-drivers {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drr-uncertainty-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #facc15;
    margin-bottom: 0.75rem;
}

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

.drr-uncertainty-tag {
    padding: 0.35rem 0.75rem;
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 12px;
    font-size: 0.75rem;
    color: #facc15;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   KNOWLEDGE CANVAS - Executive Summary (Left) + Images Grid (Right)
   ═══════════════════════════════════════════════════════════════════════════════ */

.drr-knowledge-canvas {
    margin-bottom: 2.5rem;
}

.drr-canvas-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.drr-canvas-header i {
    font-size: 1.25rem;
    color: var(--accent-deep-research);
}

.drr-canvas-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.drr-canvas-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

/* Executive Summary Column */
.drr-executive-column {
    padding: 1.75rem;
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.drr-executive-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drr-exec-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-deep-research), rgba(199, 125, 255, 0.6));
    border-radius: 8px;
    font-size: 1rem;
}

.drr-exec-badge i {
    color: white;
}

.drr-executive-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.drr-executive-content p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary-dark);
    text-align: justify;
}

/* Findings List (Multi-Agent Council Verified) */
.drr-findings-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drr-findings-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.drr-findings-header i {
    color: #22c55e;
    font-size: 0.9rem;
}

.drr-findings-header span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle-dark);
}

.drr-findings-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.drr-finding-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.drr-finding-item:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateX(4px);
}

.drr-finding-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

.drr-finding-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary-dark);
}

/* Images Grid Column */
.drr-images-column {
    position: sticky;
    top: 1rem;
}

.drr-images-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.drr-images-header i {
    color: var(--accent-nanoverse);
    font-size: 0.9rem;
}

.drr-images-header span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle-dark);
}

.drr-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.drr-image-card {
    position: relative;
    aspect-ratio: 1 / 0.75;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.drr-image-card:hover {
    transform: scale(1.05) translateY(-4px);
    border-color: var(--accent-nanoverse);
    box-shadow: 0 12px 30px rgba(0, 240, 255, 0.2),
                0 0 20px rgba(0, 240, 255, 0.1);
    z-index: 10;
}

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

.drr-image-card:hover img {
    transform: scale(1.1);
}

.drr-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
}

.drr-image-card:hover .drr-image-overlay {
    opacity: 1;
}

.drr-image-overlay span {
    font-size: 0.7rem;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.drr-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
}

.drr-image-placeholder i {
    font-size: 1.5rem;
    color: var(--text-subtle-dark);
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   KEY FACTS - Interactive Data Cards with Holographic Hover Effects
   ═══════════════════════════════════════════════════════════════════════════════ */

.drr-facts-section {
    margin-bottom: 2.5rem;
}

.drr-facts-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.drr-facts-header i {
    font-size: 1.25rem;
    color: #f97316;
}

.drr-facts-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.drr-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.drr-fact-card {
    position: relative;
    padding: 1.25rem 1.5rem;
    background: rgba(30, 30, 40, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.drr-fact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-nanoverse) 50%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drr-fact-card:hover::before {
    opacity: 1;
}

.drr-fact-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(0, 240, 255, 0.1);
}

/* Interactive Card Enhancements */
.drr-interactive-card {
    cursor: pointer;
}

.drr-interactive-card::after {
    content: '';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drr-interactive-card:hover::after {
    opacity: 1;
}

.drr-click-indicator {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 8px;
    opacity: 0;
    transform: translateX(5px);
    transition: all 0.3s ease;
}

.drr-interactive-card:hover .drr-click-indicator {
    opacity: 1;
    transform: translateX(0);
}

.drr-click-indicator i {
    font-size: 0.6rem;
    color: var(--accent-nanoverse);
}

.drr-click-indicator span {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--accent-nanoverse);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.drr-fact-category {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f97316;
    margin-bottom: 0.75rem;
}

.drr-fact-category i {
    font-size: 0.6rem;
}

.drr-fact-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.drr-fact-value {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary-dark);
}

.drr-fact-value strong {
    color: var(--accent-nanoverse);
    font-weight: 600;
}

/* Holographic Card Effect */
.drr-holographic-card {
    position: relative;
    overflow: hidden;
}

.drr-holographic-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(0, 240, 255, 0.03) 60deg,
        rgba(199, 125, 255, 0.05) 120deg,
        transparent 180deg,
        rgba(0, 240, 255, 0.03) 240deg,
        rgba(199, 125, 255, 0.05) 300deg,
        transparent 360deg
    );
    animation: drr-holographic-spin 8s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.drr-holographic-card:hover::before {
    opacity: 1;
}

@keyframes drr-holographic-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.drr-holographic-card > * {
    position: relative;
    z-index: 1;
}

/* Rainbow shimmer effect on hover */
.drr-holographic-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: skewX(-15deg);
    transition: none;
}

.drr-holographic-card:hover::after {
    animation: drr-shimmer-sweep 1.2s ease forwards;
}

@keyframes drr-shimmer-sweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TIMELINE - Deterministic Chronological Events Display
   ═══════════════════════════════════════════════════════════════════════════════ */

.drr-timeline-section {
    margin-bottom: 2.5rem;
    padding: 1.75rem;
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.drr-timeline-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.drr-timeline-header i {
    font-size: 1.25rem;
    color: #10b981;
}

.drr-timeline-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.drr-timeline-container {
    position: relative;
    padding-left: 2.5rem;
}

.drr-timeline-line {
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, 
        var(--accent-nanoverse) 0%, 
        var(--accent-deep-research) 50%,
        var(--accent-nanoverse) 100%);
    border-radius: 1px;
}

.drr-timeline-event {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.drr-timeline-event:last-child {
    margin-bottom: 0;
}

.drr-timeline-event:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.2);
    transform: translateX(4px);
}

.drr-timeline-dot {
    position: absolute;
    left: -2.5rem;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--accent-nanoverse);
    border: 3px solid rgba(20, 20, 28, 1);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    transition: all 0.3s ease;
}

.drr-timeline-event:hover .drr-timeline-dot {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

.drr-timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 0.75rem;
}

.drr-timeline-date i {
    font-size: 0.6rem;
}

.drr-timeline-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.drr-timeline-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary-dark);
}

.drr-timeline-significance {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.drr-timeline-significance i {
    font-size: 0.7rem;
    color: var(--accent-deep-research);
}

.drr-timeline-significance span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-deep-research);
    font-style: italic;
}

/* Empty Timeline State */
.drr-timeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.drr-timeline-empty i {
    font-size: 2.5rem;
    color: var(--text-subtle-dark);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.drr-timeline-empty span {
    font-size: 0.875rem;
    color: var(--text-subtle-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRIMARY NARRATIVE - PhD-Level Academic Writing with Typography Engine
   ═══════════════════════════════════════════════════════════════════════════════ */

.drr-narrative-section {
    margin-bottom: 2.5rem;
}

.drr-narrative-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.drr-narrative-header i {
    font-size: 1.25rem;
    color: var(--accent-deep-research);
}

.drr-narrative-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.drr-narrative-article {
    padding: 2rem 2.25rem;
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    position: relative;
}

/* Drop Cap Initial Letter */
.drr-narrative-article > .drr-narrative-content > p:first-of-type::first-letter {
    float: left;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 0.85;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
    color: var(--accent-deep-research);
    font-family: 'Georgia', serif;
}

/* Thesis Statement Box */
.drr-thesis-box {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem 1.25rem 2.5rem;
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.08), rgba(199, 125, 255, 0.03));
    border: 1px solid rgba(199, 125, 255, 0.25);
    border-left: 4px solid var(--accent-deep-research);
    border-radius: 0 12px 12px 0;
}

.drr-thesis-box::before {
    content: '';
    position: absolute;
    top: 1.25rem;
    left: 1rem;
    width: 4px;
    height: calc(100% - 2.5rem);
    background: linear-gradient(180deg, var(--accent-deep-research), transparent);
    border-radius: 2px;
    opacity: 0;
}

.drr-thesis-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-deep-research);
    margin-bottom: 0.75rem;
}

.drr-thesis-label i {
    font-size: 0.7rem;
}

.drr-thesis-content {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.7;
    color: var(--text-primary-dark);
    font-style: italic;
}

/* Narrative Content Typography */
.drr-narrative-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-secondary-dark);
}

.drr-narrative-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    word-spacing: 0.05em;
}

.drr-narrative-content p:last-child {
    margin-bottom: 0;
}

/* Typography Formatting Classes */
.drr-narrative-content strong,
.drr-narrative-content b {
    font-weight: 700;
    color: var(--text-primary-dark);
}

.drr-narrative-content em,
.drr-narrative-content i:not(.fa):not(.fas):not(.far):not(.fab) {
    font-style: italic;
    color: var(--text-secondary-dark);
}

.drr-narrative-content u {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--accent-nanoverse);
}

.drr-narrative-content s,
.drr-narrative-content del {
    text-decoration: line-through;
    text-decoration-color: rgba(255, 255, 255, 0.4);
}

.drr-narrative-content sup {
    font-size: 0.7em;
    vertical-align: super;
    color: var(--accent-nanoverse);
}

.drr-narrative-content sub {
    font-size: 0.7em;
    vertical-align: sub;
    color: var(--accent-deep-research);
}

.drr-narrative-content mark,
.drr-narrative-content .highlight {
    background: linear-gradient(120deg, rgba(250, 204, 21, 0.3), rgba(250, 204, 21, 0.15));
    padding: 0.1em 0.3em;
    border-radius: 4px;
}

/* List Styling in Narrative */
.drr-narrative-content ul,
.drr-narrative-content ol {
    margin: 1.25rem 0;
    padding-left: 1.75rem;
}

.drr-narrative-content ul {
    list-style-type: none;
}

.drr-narrative-content ul li {
    position: relative;
    margin-bottom: 0.5rem;
    padding-left: 0.75rem;
}

.drr-narrative-content ul li::before {
    content: '▸';
    position: absolute;
    left: -0.75rem;
    color: var(--accent-nanoverse);
    font-size: 0.8em;
}

.drr-narrative-content ol {
    list-style-type: decimal;
    counter-reset: item;
}

.drr-narrative-content ol li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.drr-narrative-content ol li::marker {
    color: var(--accent-deep-research);
    font-weight: 600;
}

/* Section Headers in Narrative */
.drr-narrative-content h3,
.drr-narrative-content h4 {
    margin: 2rem 0 1rem 0;
    color: var(--text-primary-dark);
}

.drr-narrative-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
}

.drr-narrative-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-deep-research);
}

/* Blockquote Styling */
.drr-narrative-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--accent-deep-research);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary-dark);
}

.drr-narrative-content blockquote cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-subtle-dark);
    font-style: normal;
}

.drr-narrative-content blockquote cite::before {
    content: '— ';
}

/* Code/Technical Terms */
.drr-narrative-content code {
    padding: 0.2em 0.5em;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--accent-nanoverse);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ALTERNATIVE PERSPECTIVES - Ethnic, Religious, Cultural, Expert Views
   ═══════════════════════════════════════════════════════════════════════════════ */

.drr-perspectives-section {
    margin-bottom: 2.5rem;
}

.drr-perspectives-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.drr-perspectives-header i {
    font-size: 1.25rem;
    color: #8b5cf6;
}

.drr-perspectives-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.drr-perspectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.drr-perspective-card {
    position: relative;
    padding: 1.5rem;
    background: rgba(30, 30, 40, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.drr-perspective-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--perspective-color, var(--accent-deep-research));
    border-radius: 2px 0 0 2px;
}

.drr-perspective-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.15);
}

/* Perspective Type Indicators */
.drr-perspective-card[data-type="ethnic"]::before {
    --perspective-color: #f97316;
}

.drr-perspective-card[data-type="religious"]::before {
    --perspective-color: #a855f7;
}

.drr-perspective-card[data-type="cultural"]::before {
    --perspective-color: #06b6d4;
}

.drr-perspective-card[data-type="expert"]::before {
    --perspective-color: #22c55e;
}

.drr-perspective-card[data-type="historical"]::before {
    --perspective-color: #eab308;
}

.drr-perspective-type {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.drr-perspective-card[data-type="ethnic"] .drr-perspective-type {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: #f97316;
}

.drr-perspective-card[data-type="religious"] .drr-perspective-type {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #a855f7;
}

.drr-perspective-card[data-type="cultural"] .drr-perspective-type {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #06b6d4;
}

.drr-perspective-card[data-type="expert"] .drr-perspective-type {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.drr-perspective-card[data-type="historical"] .drr-perspective-type {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #eab308;
}

.drr-perspective-type i {
    font-size: 0.6rem;
}

.drr-perspective-viewpoint {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.drr-perspective-content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary-dark);
    text-align: justify;
}

.drr-perspective-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
}

.drr-perspective-source i {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Empty Perspectives State */
.drr-perspectives-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: rgba(30, 30, 40, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    text-align: center;
}

.drr-perspectives-empty i {
    font-size: 2.5rem;
    color: var(--text-subtle-dark);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.drr-perspectives-empty span {
    font-size: 0.9rem;
    color: var(--text-subtle-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   AGENT TRACES (Collapsible) & SOURCE BIBLIOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Agent Traces Section */
.drr-agents-section {
    margin-bottom: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
}

.drr-agents-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: rgba(30, 30, 40, 0.8);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drr-agents-toggle:hover {
    background: rgba(30, 30, 40, 0.95);
}

.drr-agents-toggle-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drr-agents-toggle-left i {
    font-size: 1rem;
    color: #6366f1;
}

.drr-agents-toggle-left span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.drr-agent-count {
    padding: 0.2rem 0.5rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6366f1;
}

.drr-agents-toggle-icon {
    font-size: 0.875rem;
    color: var(--text-subtle-dark);
    transition: transform 0.3s ease;
}

.drr-agents-toggle[aria-expanded="true"] .drr-agents-toggle-icon {
    transform: rotate(180deg);
}

.drr-agents-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(20, 20, 28, 0.8);
}

.drr-agents-content.expanded {
    max-height: 2000px;
}

.drr-agents-list {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.drr-agent-trace {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.drr-agent-trace:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.2);
}

.drr-agent-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.drr-agent-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
}

.drr-agent-icon i {
    font-size: 0.875rem;
    color: #6366f1;
}

.drr-agent-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.drr-agent-role {
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
    margin-left: auto;
}

.drr-agent-output {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary-dark);
    padding-left: 2.75rem;
}

/* Bibliography Section */
.drr-bibliography-section {
    margin-bottom: 2.5rem;
}

.drr-bibliography-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.drr-bibliography-header i {
    font-size: 1.25rem;
    color: #ec4899;
}

.drr-bibliography-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.drr-sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.drr-source-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(30, 30, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.drr-source-item:hover {
    background: rgba(30, 30, 40, 0.9);
    border-color: rgba(236, 72, 153, 0.2);
    transform: translateX(4px);
}

.drr-source-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ec4899;
}

.drr-source-content {
    flex: 1;
}

.drr-source-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary-dark);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.drr-source-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
}

.drr-source-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.drr-source-meta i {
    font-size: 0.65rem;
    opacity: 0.7;
}

.drr-source-link {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    color: var(--accent-nanoverse);
    text-decoration: none;
    transition: all 0.3s ease;
}

.drr-source-link:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: rgba(0, 240, 255, 0.4);
    transform: scale(1.1);
}

.drr-source-link i {
    font-size: 0.8rem;
}

/* Empty Sources State */
.drr-sources-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(30, 30, 40, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

.drr-sources-empty i {
    font-size: 2rem;
    color: var(--text-subtle-dark);
    opacity: 0.3;
    margin-bottom: 0.75rem;
}

.drr-sources-empty span {
    font-size: 0.875rem;
    color: var(--text-subtle-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FACT DETAIL MODAL - Interactive Card Popup
   ═══════════════════════════════════════════════════════════════════════════════ */

.fact-detail-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fact-detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.fact-modal-content {
    position: relative;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    padding: 2rem;
    background: linear-gradient(145deg, rgba(35, 35, 50, 0.98), rgba(25, 25, 35, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6),
                0 0 40px rgba(0, 240, 255, 0.1);
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fact-detail-modal.active .fact-modal-content {
    transform: scale(1) translateY(0);
}

.fact-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.fact-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-secondary-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fact-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.fact-modal-header {
    margin-bottom: 1.5rem;
    padding-right: 2.5rem;
}

.fact-modal-category {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f97316;
    margin-bottom: 1rem;
}

.fact-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary-dark);
    line-height: 1.3;
}

.fact-modal-body {
    margin-bottom: 1.5rem;
}

.fact-modal-value {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary-dark);
    text-align: justify;
}

.fact-modal-value strong {
    color: var(--accent-nanoverse);
    font-weight: 600;
}

.fact-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fact-modal-confidence {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fact-modal-confidence i {
    font-size: 0.875rem;
    color: #22c55e;
}

.fact-modal-confidence span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #22c55e;
}

.fact-modal-source {
    font-size: 0.8rem;
    color: var(--text-subtle-dark);
}

.fact-modal-statement {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary-dark);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.fact-modal-explanation {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary-dark);
    margin-bottom: 1rem;
}

.fact-modal-sources {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.fact-modal-sources h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary-dark);
    margin-bottom: 0.75rem;
}

.fact-modal-sources h4 i {
    color: var(--accent-nanoverse);
}

.fact-modal-sources ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fact-modal-sources li {
    margin-bottom: 0.5rem;
}

.fact-modal-sources a {
    font-size: 0.8rem;
    color: var(--accent-nanoverse);
    text-decoration: none;
    word-break: break-all;
}

.fact-modal-sources a:hover {
    text-decoration: underline;
}

.fact-modal-verification {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: var(--accent-deep-research);
}

.fact-modal-verification i {
    font-size: 0.9rem;
}

/* Report Footer */
.drr-report-footer {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(20, 20, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.drr-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drr-footer-brand i {
    font-size: 1.25rem;
    color: var(--accent-nanoverse);
}

.drr-footer-brand span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary-dark);
}

.drr-footer-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-subtle-dark);
}

.drr-footer-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.drr-footer-meta i {
    font-size: 0.7rem;
    opacity: 0.7;
}

.drr-report-id {
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--accent-deep-research);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN - Mobile & Tablet Breakpoints
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .drr-canvas-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .drr-images-column {
        position: static;
        order: -1;
    }
    
    .drr-images-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .deep-research-report-container {
        padding: 0 0.5rem;
    }
    
    .drr-cover-glass {
        padding: 1.75rem 1.25rem;
    }
    
    .drr-cover-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .drr-cover-title {
        font-size: 1.5rem;
    }
    
    .drr-confidence-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .drr-confidence-gauge {
        align-self: center;
    }
    
    .drr-images-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .drr-facts-grid {
        grid-template-columns: 1fr;
    }
    
    .drr-perspectives-grid {
        grid-template-columns: 1fr;
    }
    
    .drr-executive-column {
        padding: 1.25rem;
    }
    
    .drr-narrative-article {
        padding: 1.5rem 1.25rem;
    }
    
    .drr-timeline-container {
        padding-left: 2rem;
    }
    
    .drr-report-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .drr-cover-meta-grid {
        grid-template-columns: 1fr;
    }
    
    .drr-images-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .drr-finding-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .drr-finding-number {
        align-self: flex-start;
    }
    
    .drr-source-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .drr-source-link {
        align-self: flex-start;
    }
    
    .fact-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .drr-footer-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRINT STYLES - Professional Document Output
   ═══════════════════════════════════════════════════════════════════════════════ */

@media print {
    .deep-research-report-container {
        max-width: 100%;
        padding: 0;
        color: #000;
        background: #fff;
    }
    
    .drr-cover-glass,
    .drr-executive-column,
    .drr-narrative-article,
    .drr-timeline-section,
    .drr-fact-card,
    .drr-perspective-card,
    .drr-source-item {
        background: #fff !important;
        border-color: #ddd !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }
    
    .drr-cover-accent-line,
    .drr-click-indicator,
    .drr-agents-section,
    .fact-detail-modal {
        display: none !important;
    }
    
    .drr-cover-title,
    .drr-executive-header h3,
    .drr-narrative-header h2,
    .drr-perspectives-header h2 {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
    
    .drr-narrative-content,
    .drr-perspective-content,
    .drr-fact-value {
        color: #333 !important;
    }
    
    .drr-images-column {
        display: none;
    }
    
    .drr-canvas-layout {
        grid-template-columns: 1fr;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    .drr-holographic-card::before,
    .drr-holographic-card::after {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ADDITIONAL ANIMATIONS & MICRO-INTERACTIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Staggered entrance animation for cards */
.drr-facts-grid .drr-fact-card,
.drr-perspectives-grid .drr-perspective-card {
    opacity: 0;
    transform: translateY(20px);
    animation: drr-card-entrance 0.5s ease forwards;
}

.drr-facts-grid .drr-fact-card:nth-child(1) { animation-delay: 0.1s; }
.drr-facts-grid .drr-fact-card:nth-child(2) { animation-delay: 0.15s; }
.drr-facts-grid .drr-fact-card:nth-child(3) { animation-delay: 0.2s; }
.drr-facts-grid .drr-fact-card:nth-child(4) { animation-delay: 0.25s; }
.drr-facts-grid .drr-fact-card:nth-child(5) { animation-delay: 0.3s; }
.drr-facts-grid .drr-fact-card:nth-child(6) { animation-delay: 0.35s; }

.drr-perspectives-grid .drr-perspective-card:nth-child(1) { animation-delay: 0.1s; }
.drr-perspectives-grid .drr-perspective-card:nth-child(2) { animation-delay: 0.15s; }
.drr-perspectives-grid .drr-perspective-card:nth-child(3) { animation-delay: 0.2s; }
.drr-perspectives-grid .drr-perspective-card:nth-child(4) { animation-delay: 0.25s; }

@keyframes drr-card-entrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Timeline entrance animation */
.drr-timeline-event {
    opacity: 0;
    transform: translateX(-20px);
    animation: drr-timeline-entrance 0.4s ease forwards;
}

.drr-timeline-event:nth-child(1) { animation-delay: 0.2s; }
.drr-timeline-event:nth-child(2) { animation-delay: 0.3s; }
.drr-timeline-event:nth-child(3) { animation-delay: 0.4s; }
.drr-timeline-event:nth-child(4) { animation-delay: 0.5s; }
.drr-timeline-event:nth-child(5) { animation-delay: 0.6s; }

@keyframes drr-timeline-entrance {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Gauge fill animation */
.drr-gauge-fill {
    stroke-dasharray: 0, 251.2;
    animation: drr-gauge-animate 1.2s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes drr-gauge-animate {
    to {
        stroke-dasharray: var(--gauge-value, 180), 251.2;
    }
}

/* Finding items entrance */
.drr-finding-item {
    opacity: 0;
    transform: translateX(-15px);
    animation: drr-finding-entrance 0.35s ease forwards;
}

.drr-finding-item:nth-child(1) { animation-delay: 0.3s; }
.drr-finding-item:nth-child(2) { animation-delay: 0.4s; }
.drr-finding-item:nth-child(3) { animation-delay: 0.5s; }
.drr-finding-item:nth-child(4) { animation-delay: 0.6s; }
.drr-finding-item:nth-child(5) { animation-delay: 0.7s; }

@keyframes drr-finding-entrance {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse effect for confidence gauge */
.drr-gauge-fill.high {
    animation: drr-gauge-animate 1.2s ease-out forwards, drr-pulse-green 2s ease-in-out infinite;
    animation-delay: 0.5s, 2s;
}

@keyframes drr-pulse-green {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.5)); }
    50% { filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.8)); }
}

/* --- END OF FILE /static/new-style.css --- */