/* Resources/Finance/styles.css */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6; /* Tailwind gray-100 */
}
/* Custom Scrollbar Styles */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Chat Bubble Styles */
.chat-bubble-user { background-color: #3b82f6; color: white; }
.chat-bubble-ai { background-color: #e5e7eb; color: #1f2937; }
.chat-bubble-ai p:not(:last-child), .chat-bubble-suggestions p:not(:last-child) { margin-bottom: 0.5em; }
.chat-bubble-ai ul, .chat-bubble-ai ol,
.chat-bubble-suggestions ul, .chat-bubble-suggestions ol { margin-left: 1.5em; margin-bottom: 0.5em; list-style-position: inside; }
.chat-bubble-ai li, .chat-bubble-suggestions li { margin-bottom: 0.25em; }
.chat-bubble-ai strong, .chat-bubble-suggestions strong { font-weight: 600; }
.chat-bubble-ai em, .chat-bubble-suggestions em { font-style: italic; }
.chat-bubble-ai code { background-color: #f0f0f0; padding: 0.1em 0.3em; border-radius: 3px; font-family: monospace;}
.chat-bubble-ai pre { background-color: #f0f0f0; padding: 0.5em; border-radius: 3px; overflow-x: auto; }
.chat-bubble-ai pre code { padding: 0; background-color: transparent; }

.chat-bubble-suggestions {
    background-color: #eef2ff; /* Tailwind indigo-50 */
    color: #1f2937; /* Tailwind gray-800 */
    border-left: 3px solid #4f46e5; /* Tailwind indigo-600 */
}
.prompt-suggestion-text {
    display: block;
    padding: 0.1rem 0;
}
.prompt-suggestion-text:hover {
    background-color: rgba(96, 165, 250, 0.1); /* Tailwind blue-400 with opacity */
    border-radius: 3px;
}

/* --- New Top Navigation --- */
.top-nav-wrapper {
    position: relative;
}

.top-nav-menu {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    background-color: #f9fafb; /* gray-50 */
    border-top: 1px solid #e5e7eb; /* border-t border-gray-200 */
    border-bottom: 1px solid #e5e7eb; /* border-b border-gray-200 */
}

/* Hide scrollbar for the menu */
.top-nav-menu::-webkit-scrollbar { display: none; }
.top-nav-menu { -ms-overflow-style: none; scrollbar-width: none; }

.top-nav-menu .nav-item {
    padding: 0.75rem 1rem;
    color: #4b5563; /* gray-600 */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    flex-shrink: 0;
}

.top-nav-menu .nav-item:hover {
    color: #3b82f6; /* blue-500 */
    background-color: transparent;
}

.top-nav-menu .nav-item.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background-color: transparent;
}

/* --- Nav Scroll Buttons --- */
.nav-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #f9fafb; /* gray-50 to match nav */
    border: none;
    width: 28px;
    height: 100%; /* Full height */
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6; /* blue-500 */
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}
.nav-scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}
.nav-scroll-btn.right-0 {
    right: 0;
    background-image: linear-gradient(to right, rgba(249,250,251,0), rgba(249,250,251,1) 30%);
}


/* --- Mobile responsive adjustments --- */
@media (min-width: 769px) {
    .nav-scroll-btn {
        display: none !important; /* Hide scroll buttons on desktop */
    }
}
@media (max-width: 768px) {
    .top-nav-menu {
        justify-content: flex-start;
    }
    /* This rule was removed to fix layout inconsistency */
}


/* General Tag Style */
.tag {
    background-color: #e0e7ff; /* Tailwind indigo-100 */
    color: #4338ca; /* Tailwind indigo-700 */
    padding: 0.25rem 0.75rem; /* py-1 px-3 */
    border-radius: 9999px; /* rounded-full */
    font-size: 0.875rem; /* text-sm */
    margin: 0.125rem; /* m-0.5 */
    display: inline-block;
    white-space: nowrap;
}

/* Styles for Section Wrappers and Titles */
.section-wrapper {
    background-color: #ffffff;
    border-radius: 0.5rem; /* rounded-lg */
    padding: 1.5rem; /* p-6 */
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); /* shadow-lg */
    border: 1px solid #e5e7eb; /* border-gray-200 */
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem; /* mb-1 */
}
.section-main-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    color: #1f2937; /* gray-800 */
}
.section-subtitle {
    font-size: 0.875rem; /* text-sm */
    color: #4b5563; /* gray-600 */
    margin-bottom: 1rem; /* mb-4 */
    padding-bottom: 0.75rem; /* pb-3 */
    border-bottom: 1px solid #e5e7eb; /* border-b border-gray-200 */
}
.expand-button {
    background: none;
    border: none;
    color: #4b5563; /* gray-600 */
    cursor: pointer;
    padding: 0.25rem; /* p-1 */
}
.expand-button:hover {
    color: #1f2937; /* gray-800 */
}

/* ECharts Container Styles */
#marketTreemapContainer, #centralBankHeatmapContainer {
    width: 100%;
    position: relative;
    overflow: hidden;
}
#marketTreemapContainer { height: 550px; }
#centralBankHeatmapContainer { height: 500px; }


/* Central Bank Heatmap Specific SVG Styles */
.cb-institution-label {
    font-weight: 600; /* font-semibold */
    fill: #374151; /* gray-700 */
    text-anchor: start;
    dominant-baseline: hanging;
    pointer-events: none;
}
.cb-theme-cell rect {
    stroke: #ffffff; /* white for borders between cells */
    stroke-width: 1.5px;
    transition: opacity 0.15s ease-in-out;
}
.cb-theme-cell:hover rect { opacity: 0.80; }
.cb-theme-cell text {
    fill: white; /* Ensure text is visible on colored cells */
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
    transition: opacity 0.15s ease-in-out;
}
.cb-theme-cell .theme-name { font-weight: 600; }
.cb-theme-cell .theme-mentions { fill-opacity: 0.85; }


/* Sentiment Fill Colors (Used by ECharts JS if not using CSS classes for fill) */
.sentiment-bg-positive { fill: #16a34a; } /* green-600 */
.sentiment-bg-mostly-positive { fill: #22c55e; } /* green-500 */
.sentiment-bg-negative { fill: #dc2626; } /* red-600 */
.sentiment-bg-mostly-negative { fill: #ef4444; } /* red-500 */
.sentiment-bg-neutral { fill: #6b7280; } /* gray-500 */
.sentiment-bg-mixed { fill: #f97316; } /* orange-500 */
.sentiment-bg-na { fill: #9ca3af; } /* gray-400 */
.sentiment-bg-cautious { fill: #f59e0b; } /* amber-500 */
.sentiment-bg-measured { fill: #6366f1; } /* indigo-500 */
.sentiment-bg-optimistic { fill: #10b981; } /* emerald-500 */
.sentiment-bg-hawkish { fill: #ef4444; } /* red-500 */
.sentiment-bg-pragmatic { fill: #0ea5e9; } /* sky-500 */


/* Sentiment Tag Background/Text Colors */
.tag.sentiment-positive-bg, .text-sentiment-positive { background-color: #dcfce7; color: #15803d !important;} /* green-100 bg, green-700 text */
.tag.sentiment-mostly-positive-bg, .text-sentiment-mostly-positive { background-color: #dcfce7; color: #15803d !important;} /* green-100 bg, green-700 text */
.tag.sentiment-negative-bg, .text-sentiment-negative { background-color: #fee2e2; color: #b91c1c !important;} /* red-100 bg, red-700 text */
.tag.sentiment-mostly-negative-bg, .text-sentiment-mostly-negative { background-color: #fee2e2; color: #b91c1c !important;} /* red-100 bg, red-700 text */
.tag.sentiment-neutral-bg, .text-sentiment-neutral { background-color: #f3f4f6; color: #4b5563 !important;} /* gray-100 bg, gray-600 text */
.tag.sentiment-mixed-bg, .text-sentiment-mixed { background-color: #ffedd5; color: #c2410c !important;} /* orange-100 bg, orange-700 text */
.tag.sentiment-na-bg, .text-sentiment-na { background-color: #e5e7eb; color: #4b5563 !important;} /* gray-200 bg, gray-600 text */
.tag.sentiment-cautious-bg { background-color: #fef3c7; color: #92400e !important; } /* amber-100 bg, amber-700 text */
.tag.sentiment-measured-bg { background-color: #e0e7ff; color: #3730a3 !important; } /* indigo-100 bg, indigo-700 text */
.tag.sentiment-optimistic-bg { background-color: #d1fae5; color: #047857 !important; } /* emerald-100 bg, emerald-600 text */
.tag.sentiment-hawkish-bg { background-color: #fee2e2; color: #b91c1c !important;} /* red-100 bg, red-700 text */
.tag.sentiment-pragmatic-bg { background-color: #f0f9ff; color: #0284c7 !important; } /* sky-100 bg, sky-600 text */

/* D3 Tooltip (used by Index Snapshots for hover) */
.d3-tooltip {
    position: absolute;
    text-align: left;
    padding: 8px 12px;
    font-size: 12px;
    background: #1f2937; /* gray-800 */
    color: #fff; /* white */
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1050; 
    max-width: 280px;
    white-space: normal; 
    pointer-events: none; 
}
#q10TreeNodeTooltip { 
    background: #2d3748; 
    color: #e2e8f0; 
    border: 1px solid #4a5568; 
    max-width: 400px; 
    font-size: 11px;
    line-height: 1.5;
    padding: 6px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    white-space: normal;
    overflow-wrap: break-word;
}


.tooltip-action-button {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer !important; 
    text-align: center;
    pointer-events: auto; 
}
.tooltip-ask-ai-btn { background-color: #3b82f6; } 
.tooltip-ask-ai-btn:hover { background-color: #2563eb; } 
.tooltip-view-details-btn { background-color: #6b7280; } 
.tooltip-view-details-btn:hover { background-color: #4b5563; } 

/* ECharts Tooltip Buttons */
.echarts-tooltip-action-button {
    display: block;
    width: calc(100% - 16px); 
    margin: 8px auto 0; 
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer !important;
    text-align: center;
    box-sizing: border-box;
}
.echarts-tooltip-view-details-btn, .echarts-tooltip-view-cb-comms-btn {
    background-color: #6b7280; 
}
.echarts-tooltip-view-details-btn:hover, .echarts-tooltip-view-cb-comms-btn:hover {
    background-color: #4b5563; 
}
.echarts-tooltip-ask-ai-btn {
    background-color: #3b82f6; 
}
.echarts-tooltip-ask-ai-btn:hover {
    background-color: #2563eb; 
}


/* Daily Snapshot Card Styles */
.daily-snapshot-container {
    display: flex;
    overflow-x: auto; 
    padding-bottom: 1rem; 
    gap: 1rem; 
}
.daily-snapshot-card {
    min-width: 130px; 
    max-width: 150px; 
    flex: 0 0 auto; 
    border: 1px solid #e5e7eb; 
    border-radius: 0.375rem; 
    padding: 0.75rem; 
    text-align: center;
    background-color: #f9fafb; 
    cursor: pointer;
    transition: box-shadow 0.2s ease-in-out;
}
.daily-snapshot-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}
.card-date {
    font-size: 0.7rem; 
    color: #6b7280; 
    margin-bottom: 0.3rem; 
    font-weight: 500; 
}
.card-metric-label {
    font-size: 0.65rem; 
    color: #374151; 
    text-transform: uppercase;
    margin-bottom: 0.1rem;
    font-weight: 500; 
}
.card-metric-value {
    font-size: 1.1rem; 
    font-weight: 600; 
    line-height: 1.2;
}
.card-mention-count {
    font-size: 0.65rem;
    color: #6b7280; 
    margin-top: 0.3rem;
}

/* Index Title and "Ask AI" Button Wrapper */
.index-title-button-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem; 
}
.index-title {
    font-size: 1.125rem; 
    font-weight: 600; 
    color: #374151; 
    margin-right: 0.75rem; 
}
.index-ask-ai-button {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem; 
    font-size: 0.75rem; 
    font-weight: 500; 
    background-color: #eef2ff; 
    color: #4338ca; 
    border: 1px solid #c7d2fe; 
    border-radius: 0.375rem; 
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap; 
}
.index-ask-ai-button i { 
    margin-right: 0.25rem; 
}
.index-ask-ai-button:hover {
    background-color: #e0e7ff; 
}

/* Performance Text Colors */
.text-performance-positive { color: #1d4ed8; } 
.text-performance-negative { color: #be123c; } 

/* Card Left Borders (Market & Central Bank) */
.sentiment-positive { border-left: 4px solid #22c55e !important; } 
.sentiment-mostly-positive { border-left: 4px solid #22c55e !important; }
.sentiment-negative { border-left: 4px solid #ef4444 !important; } 
.sentiment-mostly-negative { border-left: 4px solid #ef4444 !important; }
.sentiment-neutral { border-left: 4px solid #6b7280 !important; } 
.sentiment-mixed { border-left: 4px solid #f97316 !important; } 
.sentiment-na { border-left: 4px solid #9ca3af !important; } 
.sentiment-cautious { border-left: 4px solid #f59e0b !important; } 
.sentiment-measured { border-left: 4px solid #6366f1 !important; } 
.sentiment-optimistic { border-left: 4px solid #10b981 !important; } 
.sentiment-hawkish { border-left: 4px solid #ef4444 !important; } 
.sentiment-pragmatic { border-left: 4px solid #0ea5e9 !important; } 
.sentiment-default-border { border-left: 4px solid #9ca3af !important; } 

/* Treemap Expansion Modal */
.treemap-modal {
    position: fixed; inset: 0; background-color: rgba(0,0,0,0.6); 
    overflow-y: auto; z-index: 1040; display: flex;
    align-items: center; justify-content: center; padding: 1rem;
}
.treemap-modal-content {
    background-color: white; border-radius: 0.5rem; 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); 
    width: 95vw; height: 90vh;
    display: flex; flex-direction: column;
}
.treemap-modal-header {
    padding: 1rem 1.5rem; border-bottom: 1px solid #e5e7eb; 
    display: flex; justify-content: space-between; align-items: center;
    position: relative; 
    z-index: 10; 
    flex-shrink: 0; 
}
.treemap-modal-header button { 
    padding: 0.5rem; 
    line-height: 1; 
}
.treemap-modal-title { font-size: 1.125rem; font-weight: 600; color: #1f2937; }
.treemap-modal-body {
    padding: 1rem; 
    flex-grow: 1; 
    overflow-y: auto; 
    position: relative; 
}
#expandedTreemapContainer, #expandedCBHeatmapContainer {
    width: 100%;
    height: 100%; 
}

/* Chat View Specifics */
#chatTickerInput { width: calc(100% - 110px); } 
#chatInputContainer {
    background-color: #fff; 
    border-top: 1px solid #e5e7eb; 
    border-bottom-left-radius: 0.5rem; 
    border-bottom-right-radius: 0.5rem;
    padding: 1rem; 
}
.change-chat-focus-btn {
    margin-left: 0.5rem; 
    padding: 0.25rem 0.5rem; 
    font-size: 0.75rem; 
    color: #3b82f6; 
    border: 1px solid #3b82f6; 
    border-radius: 0.375rem; 
    background-color: white;
}
.change-chat-focus-btn:hover { background-color: #dbeafe; } 

/* Base Modal Styles (for Insight & MacroComms Detail Modals) */
.modal-base {
    position: fixed; inset: 0; background-color: rgba(0,0,0,0.5); 
    z-index: 1040; display: flex;
    align-items: center; justify-content: center; padding: 1rem; 
}
.modal-content-base {
    background-color: white; border-radius: 0.5rem; 
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 20px 25px -5px rgba(0,0,0,0.1); 
    width: 100%; max-width: 48rem; 
    display: flex; flex-direction: column;
    max-height: 90vh; 
}
.modal-header-base {
    padding: 1rem 1.5rem; 
    border-bottom: 1px solid #e5e7eb; 
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0; 
}
.modal-title-base { font-size: 1.25rem; font-weight: 600; color: #1f2937; }
.modal-body-base {
    padding: 1.5rem; 
    overflow-y: auto; 
    flex-grow: 1; 
    font-size: 0.9rem; 
}
.modal-body-base p { margin-bottom: 0.5rem; line-height: 1.6; font-size: 0.9rem;}
.modal-body-base p strong { font-weight: 600; color: #374151; font-size: 0.9rem;} 
.modal-body-base .modal-section { margin-bottom: 1rem; }
.modal-body-base .modal-section-title {
    font-size: 0.875rem; 
    font-weight: 600; 
    color: #4b5563; 
    text-transform: uppercase;
    margin-bottom: 0.5rem; 
}
.modal-body-base .modal-text-block {
    background-color: #f9fafb; 
    padding: 0.75rem; 
    border-radius: 0.375rem; 
    font-size: 0.9rem;
    color: #374151; 
    line-height: 1.6;
}
.modal-body-base .modal-text-block p:not(:last-child) { margin-bottom: 0.5em; }
.modal-body-base .modal-text-block ul { list-style-type: disc; margin-left: 1.25rem; }


.modal-footer-base {
    padding: 1rem 1.5rem; 
    border-top: 1px solid #e5e7eb; 
    display: flex; justify-content: flex-end;
    flex-shrink: 0; 
}
.modal-close-button {
    background-color: #3b82f6; 
    color: white;
    padding: 0.5rem 1rem; 
    border-radius: 0.375rem; 
    font-weight: 500; 
    transition: background-color 0.2s;
}
.modal-close-button:hover { background-color: #2563eb; } 

/* Mobile Responsiveness */
@media (max-width: 768px) { 
    .treemap-modal { padding: 0; } 
    .treemap-modal-content { width: 100%; height: 100%; border-radius: 0; max-width: 100%; max-height: 100%; }
    .treemap-modal-header { padding: 0.75rem 1rem; position: -webkit-sticky; position: sticky; top: 0; background-color: white; z-index: 20; flex-shrink: 0;}
    .treemap-modal-title { font-size: 1rem; }
    .treemap-modal-body { padding: 0.5rem; -webkit-overflow-scrolling: touch; flex-grow:1; overflow-y: auto; position:relative; }
    #expandedTreemapContainer, #expandedCBHeatmapContainer { width: 100%; height: 100%; }

    .modal-content-base { max-width: 100%; max-height: 100%; }
    .modal-title-base { font-size: 1.125rem; } 
    .modal-header-base { padding: 0.75rem 1rem;  }
    .modal-body-base { padding: 1rem;  font-size: 0.85rem; }
    .modal-body-base .modal-text-block { font-size: 0.85rem; }
    .modal-footer-base { padding: 0.75rem 1rem;  }

    #chatTickerInput { width: calc(100% - 110px); }
    #chatTickerSelection .flex { flex-direction: column; }
    #chatTickerSelection #chatTickerInput { width: 100%; border-radius: 0.375rem; margin-bottom: 0.5rem; }
    #chatTickerSelection #startChatButton { width: 100%; border-radius: 0.375rem; }
    .chat-bubble-ai, .chat-bubble-user, .chat-bubble-suggestions { max-width: 90%; font-size: 0.9rem; }
    #currentChatTickerDisplay span { flex-grow: 1; margin-right: 0.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #chatInputContainer .flex { align-items: stretch; }
    #chatInput, #sendChatMessageButton { height: 2.75rem; padding-top: 0.5rem; padding-bottom: 0.5rem; } 
    #sendChatMessageButton { display: inline-flex; align-items: center; justify-content: center; padding-left: 0.75rem; padding-right: 0.75rem; } 

    #q10VisualizationContainerPage .flex.justify-between.items-center {
        padding: 0.5rem 0.75rem; 
        flex-wrap: nowrap; 
    }
    #q10TreePageTitle {
        font-size: 0.8rem; 
        flex-grow: 1;
        flex-shrink: 1; 
        min-width: 0;   
        margin-right: 0.5rem; 
    }
    #q10VisualizationContainerPage .flex.justify-between.items-center .flex.items-center.space-x-2 {
        flex-shrink: 0; 
    }
    #q10VisualizationContainerPage .flex.justify-between.items-center .flex.items-center.space-x-2 button {
        padding: 0.25rem 0.5rem; 
        font-size: 0.7rem;  
        white-space: nowrap; 
    }
    #q10TreeSvgPage { min-height: 350px; }
}

/* Custom Mobile Modals for Treemap/Heatmap Clicks (if ECharts default tooltip is disabled on mobile) */
.mobile-custom-modal { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.65); display: flex; align-items: center; justify-content: center; z-index: 10000; padding: 1rem; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
.mobile-custom-modal:not(.hidden) { opacity: 1; visibility: visible; transition: opacity 0.3s ease, visibility 0s linear 0s; }
.mobile-custom-modal-content { background-color: white; border-radius: 0.5rem; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); width: 90vw; max-width: 480px; display: flex; flex-direction: column; max-height: 85vh; color: #1f2937; transform: scale(0.95); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; }
.mobile-custom-modal:not(.hidden) .mobile-custom-modal-content { transform: scale(1); opacity: 1; }
.mobile-custom-modal-header { padding: 0.75rem 1rem; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; }
.mobile-custom-modal-header h3 { font-size: 1.1rem; font-weight: 600; color: #111827; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-custom-modal-header button { background: none; border: none; font-size: 1.75rem; font-weight: 300; line-height: 1; color: #6b7280; cursor: pointer; padding: 0.25rem; }
.mobile-custom-modal-header button:hover { color: #1f2937; }
.mobile-custom-modal-body { padding: 1rem; overflow-y: auto; font-size: 0.875rem; line-height: 1.6; }
.mobile-custom-modal-body p { margin-bottom: 0.6rem; color: #374151; }
.mobile-custom-modal-body strong { font-weight: 600; color: #1f2937; }
.mobile-modal-action-button { display: block; width: 100%; margin-top: 0.75rem; padding: 0.6rem 1rem; font-size: 0.9rem; font-weight: 500; color: white; border: none; border-radius: 0.375rem; text-decoration: none; cursor: pointer; text-align: center; transition: background-color 0.2s ease; }
.mobile-modal-action-button:not(:first-of-type) { margin-top: 0.5rem; }
.mobile-modal-view-details-btn { background-color: #6b7280; } 
.mobile-modal-view-details-btn:hover { background-color: #4b5563; } 
.mobile-modal-ask-ai-btn { background-color: #3b82f6; } 
.mobile-modal-ask-ai-btn:hover { background-color: #2563eb; } 
.mobile-modal-view-cb-comms-btn { background-color: #4f46e5; } 
.mobile-modal-view-cb-comms-btn:hover { background-color: #4338ca; } 
.hidden { display: none !important; }

/* D3 Tree Styles for 10-Q Explorer */
#q10VisualizationContainerPage { height: 100%; } 
#q10VisualizationContainerPage .overflow-auto { min-height: 350px; } 
#q10TreeSvgPage { display: block; }
.q10-node circle { fill: #fff; stroke: steelblue; stroke-width: 1.5px; transition: r 0.3s ease, fill 0.3s ease, stroke 0.3s ease; }
.q10-node circle.collapsed { stroke: #f97316; fill: #fed7aa; } 
.q10-node circle.has-children:not(.collapsed) { fill: lightsteelblue; }
.q10-node circle.leaf-node { fill: #dcfce7; stroke: #22c55e; } 
.q10-node:hover circle { r: 8; stroke-width: 2.5px; }
.q10-node text.q10-node-label { font-family: 'Inter', sans-serif; fill: #374151; paint-order: stroke; stroke: white; stroke-width: 3px; stroke-linejoin: round; transition: font-weight 0.2s ease; font-size: 11px; }
.q10-node:hover text.q10-node-label { font-weight: 600; fill: #1d4ed8; } 
.q10-node text.q10-node-icon { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: bold; pointer-events: none; user-select: none; dominant-baseline: central; text-anchor: middle; }
.q10-node .q10-chat-btn { font-family: 'Inter', sans-serif; font-size: 9.5px; fill: #3b82f6; cursor: pointer; text-decoration: none; paint-order: stroke; stroke: white; stroke-width: 2.5px; stroke-linejoin: round; text-transform: none; font-weight: 500; letter-spacing: 0; transition: fill 0.2s ease, text-decoration 0.2s ease, font-weight 0.2s ease; }
.q10-node .q10-chat-btn:hover { text-decoration: underline; fill: #2563eb; font-weight: 600; }
.q10-link { fill: none; stroke: #d1d5db; stroke-width: 1.5px; stroke-opacity: 0.8; }

@media (max-width: 768px) {
    .q10-node text.q10-node-label { font-size: 10px; }
    .q10-node .q10-chat-btn { font-size: 9px; }
}

/* Company List Card Styling */
.company-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb; 
    border-radius: 0.5rem; 
    padding: 1rem; 
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); 
    display: flex;
    flex-direction: column; 
    justify-content: space-between; 
    height: 100%; 
}

.company-card:hover {
    transform: translateY(-3px) scale(1.01); 
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.1), 0 3px 5px -2px rgba(0, 0, 0, 0.05); 
    border-color: #3b82f6; 
}

.company-card-content { 
    flex-grow: 1; 
}

.company-card-header {
    margin-bottom: 0.75rem; 
}

.company-card h4 { 
    font-size: 1.125rem; 
    font-weight: 600; 
    color: #1e3a8a; 
    line-height: 1.3; 
    margin-bottom: 0.125rem; 
}

.company-card-meta { 
    font-size: 0.75rem; 
    color: #6b7280; 
}

.company-card-teaser-content { 
    font-size: 0.875rem; 
    color: #374151; 
    line-height: 1.6; 
    margin-top: 0.25rem; 
    margin-bottom: 0.75rem; 
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(0.875rem * 1.6 * 3); 
}

.company-card-cta-link {
    display: inline-block; 
    margin-top: auto; 
    padding: 0.375rem 0; 
    font-size: 0.875rem; 
    font-weight: 500; 
    color: #3b82f6; 
    text-decoration: none; 
    border-radius: 0.25rem; 
    transition: color 0.2s ease, text-decoration 0.2s ease;
    align-self: flex-start; 
}

.company-card-cta-link:hover {
    color: #2563eb; 
    text-decoration: underline;
}

.company-card-cta-link i { 
    font-size: 0.8em; 
    margin-left: 0.25rem; 
    transition: transform 0.2s ease-in-out;
}

.company-card-cta-link:hover i {
    transform: translateX(3px);
}

@media (max-width: 768px) { 
    .company-card { padding: 0.75rem; }
    .company-card h4 { font-size: 1rem; }
    .company-card-teaser-content { -webkit-line-clamp: 2; min-height: calc(0.875rem * 1.6 * 2); font-size: 0.8rem; margin-bottom: 0.5rem;}
    .company-card-cta-link { font-size: 0.8rem; padding: 0.25rem 0; }
}
/* END Company List Card Styling */


/* AI Summary Modal specific styles */
#q10AiSummaryModal pre { 
    background-color: #f3f4f6; 
    padding: 1rem; 
    border-radius: 0.375rem; 
    font-size: 0.875rem; 
    line-height: 1.6; 
    white-space: pre-wrap; 
    word-break: break-word; 
    max-height: 60vh; 
    overflow-y: auto;
    color: #1f2937; 
    border: 1px solid #e5e7eb; 
}
#q10AiSummaryContentLoading { display: flex; align-items: center; justify-content: center; min-height: 100px; color: #4b5563; } 

/* Generic spinner */
.q10-loading-spinner, .q10-ai-spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid rgba(59, 130, 246, 0.3); border-radius: 50%; border-top-color: #3b82f6; animation: spin 1s ease-in-out infinite; }
#q10TreeLoadingIndicatorPage .q10-loading-spinner { margin-right: 0.75rem; } 
#q10AiSummaryContentLoading .q10-ai-spinner { margin-right: 0.5rem; } 

/* CORRECTED Instruction Footer Styling */
.q10-tree-instructions-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(31, 41, 55, 0.9); /* dark semi-transparent */
    color: white;
    padding: 0.5rem 1rem; /* smaller padding */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 20; /* Ensure it's above the SVG tree */
    text-align: center;
    max-width: 90%;
    font-size: 0.75rem; /* smaller font */
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    opacity: 1;
    visibility: visible;
    pointer-events: none; /* User can't click on it */
}

/* Add this new class to handle the fade-out effect */
.q10-tree-instructions-footer.fade-out {
    opacity: 0;
    visibility: hidden;
}

.q10-icon-example-plus, .q10-icon-example-minus { display: inline-block; width: 1em; height: 1em; line-height: 1em; text-align: center; border-radius: 50%; font-weight: bold; margin: 0 0.1em; vertical-align: middle; }
.q10-icon-example-plus { color: #c2410c; border: 1px solid #f97316; } 
.q10-icon-example-minus { color: #1e40af; border: 1px solid steelblue; } 

@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile Tooltip Responsiveness */
@media (max-width: 640px) { 
    #q10TreeNodeTooltip {
        max-width: calc(100vw - 40px); 
        font-size: 10px; 
    }
}

/* 10-Q Chat Modal Styles */
#q10ChatModal .bg-white { /* Modal content container */
    /* height: 85vh; /* This is handled by Tailwind class h-[85vh] */
    /* overflow: hidden; /* This is handled by Tailwind class overflow-hidden */
}

#q10ChatModalMessages {
    /* This element will handle the scrolling of chat messages */
}

#q10ChatModalInputContainer {
    flex-shrink: 0; 
}

#q10ChatModalInput { }

#q10ChatModalSendButton { }
#q10ChatModalSendButton i {
    font-size: 0.875rem; 
}

#q10ChatModalMessages .chat-bubble-ai,
#q10ChatModalMessages .chat-bubble-user,
#q10ChatModalMessages .chat-bubble-suggestions { }

#q10ChatModalMessages .chat-bubble-ai {
    max-width: 90%; 
}
#q10ChatModalMessages .chat-bubble-suggestions ul {
    padding-left: 0.5em; 
}
#q10ChatModalMessages .prompt-suggestion-text {
    padding: 0.2rem 0.25rem; 
}

#q10AiSummaryModal {
    z-index: 1045; 
}





/* Styles for Ticker Deep Dive Section */
.summary-card {
    background-color: #f9fafb; /* gray-50 */
    border: 1px solid #e5e7eb; /* gray-200 */
    border-left-width: 4px;
    border-left-color: #6b7280; /* Default border color */
    border-radius: 0.375rem; /* rounded-md */
    padding: 1rem; /* p-4 */
    margin-bottom: 1rem; /* mb-4 */
}

.summary-title {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: #374151; /* gray-700 */
    margin-bottom: 0.75rem; /* mb-3 */
}

.summary-content-prose {
    font-size: 0.875rem; /* text-sm */
    color: #4b5563; /* gray-600 */
    line-height: 1.6;
}

.summary-content-prose p {
    margin-bottom: 0.75rem;
}

.summary-content-prose ul {
    list-style-type: disc;
    padding-left: 1.25rem; /* pl-5 */
}

.summary-content-prose li {
    margin-bottom: 0.5rem;
}


/* Add this to the end of your Finance/Resources/styles.css file */

/* Grid layout for takeaways */
.takeaways-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1rem; /* Space between columns/rows */
    margin-top: 1rem;
}

@media (min-width: 768px) { /* Two columns on tablets and larger */
    .takeaways-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.takeaway-column {
    display: flex;
    flex-direction: column;
}

/* Ensure summary cards inside the grid take full height */
.takeaway-column .summary-card {
    flex-grow: 1;
}

/* Styles for Ticker Deep Dive Section (some may exist, this ensures they are correct) */
.summary-card {
    background-color: #f9fafb; /* gray-50 */
    border: 1px solid #e5e7eb; /* gray-200 */
    border-left-width: 4px;
    border-left-color: #6b7280; /* Default border color */
    border-radius: 0.375rem; /* rounded-md */
    padding: 1rem; /* p-4 */
    margin-bottom: 1rem; /* mb-4 */
}

.summary-title {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: #374151; /* gray-700 */
    margin-bottom: 0.75rem; /* mb-3 */
}

.summary-content-prose {
    font-size: 0.875rem; /* text-sm */
    color: #4b5563; /* gray-600 */
    line-height: 1.6;
}

.summary-content-prose p {
    margin-bottom: 0.75rem;
}

.summary-content-prose ul {
    list-style-type: disc;
    padding-left: 1.25rem; /* pl-5 */
}

.summary-content-prose li {
    margin-bottom: 0.5rem;
}



/* Add this to the end of your Finance/Resources/styles.css file */

/* Prevents scroll jump by fading content instead of hiding it */
#summaryContent.loading-opacity {
    opacity: 0.4;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none; /* Prevents clicking on old content while loading */
}

#loadingSummary {
    font-weight: 500;
    color: #4b5563; /* gray-600 */
}

/* Grid layout for takeaways */
.takeaways-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1rem; /* Space between columns/rows */
    margin-top: 1rem;
}

@media (min-width: 768px) { /* Two columns on tablets and larger */
    .takeaways-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.takeaway-column {
    display: flex;
    flex-direction: column;
}

.takeaway-column .summary-card {
    flex-grow: 1;
}

/* General summary card styles */
.summary-card {
    background-color: #f9fafb; /* gray-50 */
    border: 1px solid #e5e7eb; /* gray-200 */
    border-left-width: 4px;
    border-left-color: #6b7280; /* Default border color */
    border-radius: 0.375rem; /* rounded-md */
    padding: 1rem; /* p-4 */
    margin-bottom: 1rem; /* mb-4 */
}

.summary-title {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: #374151; /* gray-700 */
    margin-bottom: 0.75rem; /* mb-3 */
}

.summary-content-prose {
    font-size: 0.875rem; /* text-sm */
    color: #4b5563; /* gray-600 */
    line-height: 1.6;
}

.summary-content-prose p {
    margin-bottom: 0.75rem;
}

.summary-content-prose ul {
    list-style-type: disc;
    padding-left: 1.25rem; /* pl-5 */
}

.summary-content-prose li {
    margin-bottom: 0.5rem;
}

/* Custom styling for Choices.js */
.choices__inner {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    min-height: auto;
}

.choices__list--dropdown {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    margin-top: 4px;
}

.choices__item--choice {
    padding: 0.5rem 1rem;
}

.choices[data-type*="select-one"]::after {
    border-color: #6b7280 transparent transparent;
    border-style: solid;
    border-width: 5px;
    height: 0;
    width: 0;
    position: absolute;
    right: 11.5px;
    top: 50%;
    margin-top: -2.5px;
    pointer-events: none;
}

.choices[data-type*="select-one"].is-open::after {
    border-color: transparent transparent #6b7280;
    margin-top: -2.5px;
}



/* Styling for the Narrative Intelligence filter layout */
.narrative-header-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
    align-items: end;
}

/* On tablets and larger, switch to a 2-column layout */
@media (min-width: 768px) {
    .narrative-header-grid {
        /* First col expands, next two take only needed space */
        grid-template-columns: 1fr auto auto; 
    }
}

.narrative-header-item {
    display: flex;
    flex-direction: column;
}

.narrative-header-label {
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    color: #475569; /* slate-600 */
    margin-bottom: 0.5rem;
}

.narrative-header-control {
    width: 100%;
}

/* Custom styling for Choices.js dropdown */
.choices__inner {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    min-height: auto;
}

.choices__list--dropdown {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    margin-top: 4px;
}

.choices__item--choice {
    padding: 0.5rem 1rem;
}

.choices[data-type*="select-one"]::after {
    border-color: #6b7280 transparent transparent;
    border-style: solid;
    border-width: 5px;
    height: 0;
    width: 0;
    position: absolute;
    right: 11.5px;
    top: 50%;
    margin-top: -2.5px;
    pointer-events: none;
}

.choices[data-type*="select-one"].is-open::after {
    border-color: transparent transparent #6b7280;
    margin-top: -2.5px;
}


/* Styling for the date input */
.narrative-date-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    font-size: 1rem;
    height: 42px; /* A consistent height */
}

@media (min-width: 768px) {
    .narrative-date-input {
        width: auto;
        min-width: 200px;
    }
}

/* Additions for Narrative Intelligence Briefing */

.briefing-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.briefing-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .briefing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.briefing-narrative {
    grid-column: span 1 / span 1;
}

@media (min-width: 768px) {
    .briefing-narrative {
        grid-column: span 2 / span 2;
    }
}

.briefing-narrative p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #475569;
}

.briefing-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    text-align: center;
    border-left-width: 1px;
    border-color: #e2e8f0;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .briefing-stats {
        margin-top: 0;
    }
}


.briefing-subheader {
    font-weight: 600;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.briefing-stat-value {
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 700;
}

.briefing-hr {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-color: #e2e8f0;
}

.briefing-drivers-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem 2rem;
}

@media (min-width: 768px) {
    .briefing-drivers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.briefing-arrow {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 300;
}

.briefing-arrow.positive {
    color: #10b981; /* green-500 */
}

.briefing-arrow.negative {
    color: #ef4444; /* red-500 */
}

/* Styling for the Sentiment Chart and Tooltip */
.chart-container {
    position: relative;
    height: 350px;
    max-height: 40vh;
    width: 100%;
}

#chart-tooltip {
    position: absolute;
    text-align: left;
    padding: 8px 12px;
    font-size: 12px;
    background: #1e293b; /* bg-slate-800 */
    color: white;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    max-width: 300px;
    line-height: 1.5;
}

#chart-tooltip ul {
    padding-left: 1rem;
}

/* Add these new rules to the end of Finance/Resources/styles.css */


/* Add these utility classes to your CSS file if they don't already exist, 
   to ensure the green/red text colors render correctly. */
.text-green-600 {
    color: #16a34a;
}
.text-red-600 {
    color: #dc2626;
}

/* --- News-Driven Risk & Opportunity Matrix --- */
.risk-opp-matrix-wrapper {
    /* This class is now deprecated, you can remove it if you wish */
}

.risk-opp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .risk-opp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.risk-opp-column-title {
    font-size: 1.125rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom-width: 2px; /* Thinner underline */
}

.risk-opp-column-title.opportunities {
    border-color: #22c55e; /* green-500 */
    color: #166534; /* green-800 */
}

.risk-opp-column-title.risks {
    border-color: #ef4444; /* red-500 */
    color: #991b1b; /* red-800 */
}

.risk-opp-card {
    background-color: #ffffff; /* White background for the card */
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e2e8f0; /* slate-200 for a subtle border */
    border-left-width: 4px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.risk-opp-card-opportunity {
    border-left-color: #22c55e; /* green-500 */
}

.risk-opp-card-risk {
    border-left-color: #ef4444; /* red-500 */
}

.risk-opp-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b; /* slate-800 */
    margin-bottom: 0.5rem;
}

.risk-opp-card-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #475569; /* slate-600 */
    margin-bottom: 0.75rem;
}

.risk-opp-card-stats strong {
    color: #1e293b; /* slate-800 */
}

.risk-opp-card-description {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #475569; /* slate-600 */
    flex-grow: 1;
}


/* Custom Tooltip Styles */
.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
  vertical-align: middle; /* Helps align the icon with text */
}

.custom-tooltip {
  visibility: hidden;
  width: 220px; /* Made it slightly narrower */
  background-color: #2d3748; /* Dark Gray/Slate */
  color: #fff;
  text-align: left; /* Left-aligned text is easier to read */
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 10;
  
  /* --- MODIFIED POSITIONING --- */
  bottom: 50%;
  right: 150%; /* Position to the LEFT of the icon */
  transform: translateY(50%);
  
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.8rem;
  line-height: 1.5;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  pointer-events: none;
}

/* Tooltip Arrow - MODIFIED to point to the right */
.custom-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%; /* Arrow is now on the right side of the tooltip */
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent #2d3748;
}

/* Show the tooltip on hover */
.tooltip-container:hover .custom-tooltip {
  visibility: visible;
  opacity: 1;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex-grow: 1;
}


/* Styling for the new Narrative Intelligence date navigator */
.narrative-date-navigator {
    display: flex;
    align-items: center;
    background-color: #f9fafb; /* gray-50 */
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 0.25rem;
    width: 100%;
    max-width: 320px; /* Widened to accommodate date range display */
}

.date-nav-button {
    /* MODIFIED: Adjusted for SVG icons */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    color: #475569; /* slate-600 */
    padding: 0.5rem; /* Consistent padding */
    cursor: pointer;
    border-radius: 0.375rem; /* rounded-md */
    line-height: 1;
    transition: background-color 0.2s ease;
}

.date-nav-button:hover:not(:disabled) {
    background-color: #e5e7eb; /* gray-200 */
}

.date-nav-button:disabled {
    color: #9ca3af; /* gray-400 */
    cursor: not-allowed;
}
/* END MODIFICATION */

.date-display-container {
    flex-grow: 1;
    position: relative;
    text-align: center;
}

.date-display-button {
    background: none;
    border: none;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b; /* slate-800 */
    cursor: pointer;
}

.narrative-date-input-hidden {
    display: none;
}





/* Replace any existing .rotate-device-toast or .rotate-device-overlay styles with this */
.rotate-device-toast {
    position: fixed; /* Use fixed positioning to float above all content */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 280px;
    background-color: rgba(30, 41, 59, 0.95);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 9999; /* Ensure it's on top of everything */
    border-radius: 12px;
    padding: 1.5rem 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    pointer-events: none; /* Prevent interaction with the toast */
}

.rotate-device-toast.fade-out {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
}

.rotate-device-toast i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    animation: rotate-animation 1.5s ease-in-out infinite;
}

@keyframes rotate-animation {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}


/* Styling for Narrative Intelligence sentiment filters */
.sentiment-filter-group {
    display: flex;
    gap: 0.5rem; /* 8px */
    margin-bottom: 1rem; /* 16px */
    justify-content: center;
}

.sentiment-filter-btn {
    padding: 0.5rem 1rem; /* py-2 px-4 */
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    border-radius: 0.375rem; /* rounded-md */
    border: 1px solid #d1d5db; /* gray-300 */
    background-color: #ffffff; /* white */
    color: #374151; /* gray-700 */
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sentiment-filter-btn:hover {
    background-color: #f3f4f6; /* gray-100 */
}

.sentiment-filter-btn.active {
    background-color: #3b82f6; /* blue-500 */
    color: #ffffff; /* white */
    border-color: #3b82f6; /* blue-500 */
}

/* Styling for Narrative Intelligence Filters */
.filters-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allows filters to stack on smaller screens */
    gap: 1.5rem; /* Space between filter groups */
    margin-bottom: 1.5rem;
}

.segmented-control {
    display: flex;
    align-items: center;
    background-color: #f3f4f6; /* gray-100 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 0.25rem; /* p-1 */
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.segmented-control-label {
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    color: #4b5563; /* gray-600 */
    margin-left: 0.75rem; /* ml-3 */
    margin-right: 0.5rem; /* mr-2 */
    white-space: nowrap;
}

.segmented-control-btn {
    padding: 0.375rem 0.875rem; /* py-1.5 px-3.5 */
    font-size: 0.875rem; /* text-sm */
    font-weight: 500;
    border-radius: 0.375rem; /* rounded-md */
    border: 1px solid transparent;
    background-color: transparent;
    color: #4b5563; /* gray-600 */
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.segmented-control-btn:hover:not(.active) {
    background-color: #e5e7eb; /* gray-200 */
}

.segmented-control-btn.active {
    background-color: #ffffff; /* white */
    color: #3b82f6; /* blue-500 */
    border-color: #d1d5db; /* gray-300 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

/* --- Global Error Toast (Improved) --- */
.global-error-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fffbeb; /* amber-50 */
    color: #b45309; /* amber-700 */
    border: 1px solid #fcd34d; /* amber-300 */
    padding: 0.75rem 1.25rem; /* py-3 px-5 */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically center icon and text */
    gap: 0.75rem; /* Add space between icon and text */
    max-width: 90%; /* Ensure it doesn't overflow on mobile */
}

.global-error-toast i {
    font-size: 1.25rem; /* Make icon slightly larger */
}

.global-error-toast p {
    margin: 0; /* Remove default paragraph margin */
}

.global-error-toast.show {
    transform: translate(-50%, -10px); /* Slide up effect */
    opacity: 1;
    visibility: visible;
}
/* This already exists, but ensure it's there */
.hidden {
    display: none !important;
}


/* ========================================
   C-Suite Forum Styles
   ======================================== */

/* Forum Header */
.forum-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .forum-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.forum-branding {
    text-align: center;
}

@media (min-width: 768px) {
    .forum-branding {
        text-align: left;
    }
}

.forum-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b; /* slate-800 */
    margin-bottom: 0.25rem;
}

.forum-tagline {
    font-size: 0.75rem;
    color: #64748b; /* slate-500 */
    font-style: italic;
}

.forum-filters {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .forum-filters {
        justify-content: flex-end;
    }
}

.forum-filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: white;
    color: #374151; /* gray-700 */
    cursor: pointer;
    min-width: 150px;
}

.forum-filter-select:focus {
    outline: none;
    border-color: #3b82f6; /* blue-500 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Forum Posts Timeline - Single Column Reddit-style */
.forum-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Forum Post Card - Reddit-style timeline */
.forum-post-card {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.forum-post-card:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* Post Card Header - Author section */
.post-card-header {
    margin-bottom: 0.625rem;
}

.post-author-section {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

/* Avatar with initials */
.author-avatar-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-initials {
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.025em;
}

/* Author meta info */
.author-meta {
    flex: 1;
    min-width: 0;
}

.author-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.author-name-row .author-name {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.875rem;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 50%;
    color: white;
    font-size: 0.5rem;
}

.author-handle {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 400;
}

.author-name-row .post-time {
    color: #94a3b8;
    font-size: 0.8rem;
}

.post-community-line {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: #64748b;
}

.community-link {
    color: #3b82f6;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}

.community-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Post Body */
.post-body {
    padding: 0;
}

/* Legacy Post Header */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.community-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    background-color: #ede9fe;
    color: #6d28d9;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.post-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Author Row (for replies) */
.post-author-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.author-avatar-small {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
}

.author-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.author-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.8rem;
}

/* Emotional State Badge */
.emotional-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 9999px;
    text-transform: capitalize;
}

.emotional-state-positive {
    background-color: #dcfce7;
    color: #15803d;
}

.emotional-state-negative {
    background-color: #fee2e2;
    color: #b91c1c;
}

.emotional-state-cautious {
    background-color: #fef3c7;
    color: #b45309;
}

.emotional-state-neutral {
    background-color: #f1f5f9;
    color: #475569;
}

/* Post Title */
.post-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a; /* slate-900 */
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

/* Post Content */
.post-content {
    font-size: 0.8rem;
    color: #475569; /* slate-600 */
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Context Badges */
.context-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.context-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

.context-ticker {
    background-color: #dbeafe; /* blue-100 */
    color: #1d4ed8; /* blue-700 */
}

.context-theme {
    background-color: #fce7f3; /* pink-100 */
    color: #be185d; /* pink-700 */
}

.context-trigger {
    background-color: #fef3c7; /* amber-100 */
    color: #b45309; /* amber-700 */
}

/* Post Footer */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9; /* slate-100 */
}

/* Reactions */
.forum-reactions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    background-color: #f8fafc; /* slate-50 */
    color: #64748b; /* slate-500 */
    border: 1px solid #e2e8f0; /* slate-200 */
}

.reaction i {
    font-size: 0.7rem;
}

.reaction-views i { color: #6366f1; } /* indigo-500 */
.reaction-likes i { color: #22c55e; } /* green-500 */
.reaction-dislikes i { color: #ef4444; } /* red-500 */

/* Reaction names shown inline */
.reaction-names-inline {
    font-size: 0.7rem;
    color: #64748b; /* slate-500 */
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Expanded reactions for modal */
.forum-reactions-expanded {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.reaction-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #f8fafc; /* slate-50 */
    border-radius: 0.375rem;
    font-size: 0.8rem;
}

.reaction-row .reaction-icon {
    width: 20px;
    text-align: center;
}

.reaction-row .reaction-label {
    font-weight: 500;
    color: #64748b; /* slate-500 */
    min-width: 80px;
}

.reaction-row .reaction-names {
    color: #1e293b; /* slate-800 */
    font-weight: 500;
}

.reaction-views-expanded .reaction-icon i { color: #6366f1; }
.reaction-likes-expanded .reaction-icon i { color: #22c55e; }
.reaction-dislikes-expanded .reaction-icon i { color: #ef4444; }

/* Post Stats */
.post-stats {
    display: flex;
    gap: 1rem;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #94a3b8; /* slate-400 */
}

.stat-item i {
    font-size: 0.7rem;
}

/* Replies Section */
.post-replies {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0; /* slate-200 */
}

.replies-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b; /* slate-500 */
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.replies-header i {
    color: #3b82f6; /* blue-500 */
}

/* Reply Card */
.forum-reply {
    background-color: #f8fafc; /* slate-50 */
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #e2e8f0; /* slate-200 */
}

.nested-reply {
    background-color: #f1f5f9; /* slate-100 */
    border-left-color: #cbd5e1; /* slate-300 */
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reply-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reply-time {
    font-size: 0.7rem;
    color: #94a3b8; /* slate-400 */
}

.reply-content {
    font-size: 0.75rem;
    color: #475569; /* slate-600 */
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.nested-replies {
    margin-top: 0.5rem;
}

.show-more-replies {
    display: block;
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background-color: transparent;
    border: 1px dashed #cbd5e1; /* slate-300 */
    border-radius: 0.375rem;
    color: #64748b; /* slate-500 */
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.show-more-replies:hover {
    background-color: #f1f5f9; /* slate-100 */
    color: #3b82f6; /* blue-500 */
    border-color: #3b82f6;
}

/* Forum Post Card - Clickable */
.forum-post-card {
    cursor: pointer;
}

.forum-post-card:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Forum Modal Styles */
.forum-modal-content {
    max-width: 56rem; /* wider than default */
}

.forum-modal-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.forum-modal-header-content .community-badge {
    width: fit-content;
}

.forum-modal-author-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.forum-modal-author-row .ml-auto {
    margin-left: auto;
}

.forum-modal-full-content {
    font-size: 0.95rem;
    color: #334155; /* slate-700 */
    line-height: 1.7;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.forum-modal-context {
    margin-bottom: 1rem;
}

.forum-modal-ticker-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #dbeafe; /* blue-100 */
    color: #1d4ed8; /* blue-700 */
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.forum-modal-ticker-display i {
    font-size: 0.8rem;
}

.forum-modal-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569; /* slate-600 */
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.forum-modal-reactions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

/* Replies scroll indicator */
.forum-replies-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 0.5rem;
    color: #4338ca;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.forum-replies-indicator:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%);
    transform: translateY(-1px);
}

.forum-replies-indicator i:last-child {
    animation: bounce-down 1s ease-in-out infinite;
}

@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.forum-modal-replies {
    margin-top: 1rem;
}

.forum-modal-replies .forum-reply {
    margin-bottom: 0.75rem;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .forum-post-card {
        padding: 1rem;
    }

    .post-title {
        font-size: 1rem;
    }

    .post-content {
        -webkit-line-clamp: 3;
    }

    .author-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .post-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .forum-reactions {
        width: 100%;
    }

    .post-stats {
        width: 100%;
        justify-content: flex-start;
    }

    .forum-modal-author-row {
        flex-wrap: wrap;
    }

    .forum-modal-author-row .ml-auto {
        margin-left: 0;
        width: 100%;
        margin-top: 0.5rem;
    }

    .forum-modal-context-grid {
        grid-template-columns: 1fr;
    }

    .forum-modal-reactions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}

/* ========================================
   CEO Profile Sidebar Panel
   ======================================== */

.ceo-profile-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1060;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ceo-profile-sidebar.open {
    right: 0;
}

.ceo-profile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1055;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.ceo-profile-sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.ceo-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    flex-shrink: 0;
}

.ceo-profile-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ceo-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.ceo-profile-header-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.ceo-profile-header-info .ceo-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

.ceo-profile-close-btn {
    background: none;
    border: none;
    color: #6b7280;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: background-color 0.15s, color 0.15s;
}

.ceo-profile-close-btn:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.ceo-profile-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.ceo-profile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6b7280;
}

.ceo-profile-loading i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.ceo-profile-error {
    text-align: center;
    padding: 2rem;
    color: #dc2626;
}

.ceo-profile-error i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

/* Emotion Section */
.ceo-profile-section {
    margin-bottom: 1.5rem;
}

.ceo-profile-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ceo-profile-section-title i {
    color: #9ca3af;
}

/* Current Emotional State Card */
.ceo-emotion-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    padding: 1rem;
}

.ceo-emotion-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.emotion-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse-glow 2s infinite;
}

.emotion-indicator.positive { background-color: #22c55e; }
.emotion-indicator.negative { background-color: #ef4444; }
.emotion-indicator.neutral { background-color: #6b7280; }
.emotion-indicator.excited { background-color: #f59e0b; }
.emotion-indicator.smug { background-color: #8b5cf6; }
.emotion-indicator.defiant { background-color: #f97316; }
.emotion-indicator.confident { background-color: #3b82f6; }

@keyframes pulse-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50% { opacity: 0.8; box-shadow: 0 0 8px 2px currentColor; }
}

.emotion-state-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e40af;
    text-transform: capitalize;
}

.emotion-intensity {
    font-size: 0.75rem;
    color: #6b7280;
}

.emotion-intensity-bar {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    margin-top: 0.25rem;
    overflow: hidden;
}

.emotion-intensity-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.emotion-baseline {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Experiences Timeline */
.ceo-experiences-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ceo-experience-item {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid #e5e7eb;
}

.ceo-experience-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0.25rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3b82f6;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e5e7eb;
}

.ceo-experience-date {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.ceo-experience-event {
    font-size: 0.8rem;
    color: #374151;
    line-height: 1.4;
    margin-bottom: 0.375rem;
}

.ceo-experience-impact {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 0.375rem;
    padding-left: 0.5rem;
    border-left: 2px solid #d1d5db;
}

.ceo-experience-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.ceo-experience-action-tag {
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    background-color: #eff6ff;
    color: #1d4ed8;
    border-radius: 0.375rem;
    white-space: normal;
    line-height: 1.3;
    word-break: break-word;
}

/* Relationships Section */
.ceo-relationships-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ceo-relationship-item {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.ceo-relationship-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ceo-relationship-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.ceo-relationship-sentiment {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
}

.ceo-relationship-sentiment.positive {
    background-color: #dcfce7;
    color: #15803d;
}

.ceo-relationship-sentiment.negative {
    background-color: #fee2e2;
    color: #b91c1c;
}

.ceo-relationship-sentiment.neutral {
    background-color: #f3f4f6;
    color: #4b5563;
}

.ceo-relationship-history {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.ceo-relationship-notes {
    font-size: 0.7rem;
    color: #9ca3af;
}

.ceo-relationship-note {
    padding: 0.375rem 0;
    border-bottom: 1px dashed #e5e7eb;
}

.ceo-relationship-note:last-child {
    border-bottom: none;
}

.ceo-last-session {
    font-size: 0.7rem;
    color: #9ca3af;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Clickable CEO name/avatar in posts */
.author-clickable {
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.author-clickable:hover {
    opacity: 0.85;
}

.author-clickable .author-name {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #9ca3af;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s;
}

.author-clickable:hover .author-name {
    text-decoration-color: #3b82f6;
}

/* Icon indicator - always visible for mobile support */
.author-clickable::after {
    content: '\f630'; /* FontAwesome theater-masks icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.6rem;
    color: #a78bfa;
    margin-left: 0.35rem;
    opacity: 0.7;
    transition: opacity 0.15s, color 0.15s;
}

.author-clickable:hover::after {
    opacity: 1;
    color: #7c3aed;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .ceo-profile-sidebar {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }

    .ceo-profile-sidebar.open {
        right: 0;
    }
}