/* ==========================================================================
   I. ROOT / GLOBAL STYLES - REMOVED as these are in tea-explorer-global-styles.css
   ========================================================================== */

/* CSS Variables - REMOVED */
/* :root { ... } REMOVED (lines 2-113 roughly) */

/* General styles - REMOVED body and .container as they are in tea-global-css.css */

/* Typography */
/* REMOVED h1 and h1::after as they are in tea-global-css.css */

h2 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-lighter);
    position: relative;
}

h3 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--primary-light);
    position: relative;
}

h3::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

h4 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

h4::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary-light);
    margin-top: var(--spacing-xs);
}

h5 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

h6 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

strong {
    color: var(--primary-dark);
    font-weight: 700;
    padding: 0 2px;
}

em {
    color: var(--secondary);
    font-style: italic;
    font-weight: 500;
}

p {
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-loose);
    color: var(--text-dark);
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: all var(--transition-fast) ease;
    position: relative;
    padding: 0 1px;
    font-weight: 500;
    border-radius: 2px;
}

a:hover {
    color: var(--secondary);
    background-color: var(--primary-lighter);
}

a::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -1px;
    left: 0;
    background: #6B8E23; /* Mindstate: Data green */
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    border-radius: 0; /* Mindstate: Sharp corners */
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

a:focus {
    outline: 2px solid var(--primary-shadow);
    box-shadow: 0 0 0 3px var(--primary-shadow);
}

/* External link icon */
a[target="_blank"]::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231ca095' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    vertical-align: middle;
    position: relative;
    top: -1px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

a[target="_blank"]:hover::before {
    opacity: 1;
}

/* Card styles - REMOVED generic .card, .card:hover, .card::before. These are in tea-explorer-shared-styles.css */
/* Specific card types like .dashboard-card below will inherit from the shared .card and add their own specifics. */
/* If a general margin-bottom was needed for all cards on this page, it could be added like: */
/* .container > .card { margin-bottom: var(--spacing-lg); } or to specific card types */

/* Input Field Styles - Base .input-field removed as it's covered by .neumorphic-input in shared styles. */
/* Specific styles for select.input-field and its pseudo-classes are retained below. */
/* Consider changing class="input-field" to class="neumorphic-input" in HTML for full alignment. */

select.input-field {
    /* Basic styling inherited if HTML class changes to neumorphic-input */
    /* Specifics for <select> when .input-field class is used: */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2361677C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--spacing-md) center;
    padding-right: calc(var(--spacing-md) + 25px); /* Space for arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select.input-field option {
    background: var(--card-bg);
    color: var(--text-dark);
}

select.input-field:hover {
    border-color: var(--primary-light); /* Assuming .neumorphic-input hover provides a border */
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: #EBEBEB; /* Mindstate: Light border */
    margin: 30px 0;
    border: none;
    position: relative;
}

.section-divider::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #6B8E23; /* Mindstate: Data green */
    border-radius: 0; /* Mindstate: Sharp corners */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: none; /* Mindstate: No shadow on decorative elements */
}

/* Custom styles for this page */
.summary-container {
    margin-top: var(--spacing-xl);
    min-height: 250px;
    position: relative;
    padding: var(--spacing-md);
    border-radius: 0; /* Mindstate: Sharp corners */
    background: #FFFFFF; /* Mindstate: White background */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Mindstate: Minimal shadow */
    border: 1px solid #F4F4F4; /* Mindstate: Light border */
}

.hidden {
    display: none !important;
}

.metric {
    color: var(--primary-dark);
    font-weight: 700;
    background: #F0F8F0; /* Mindstate: Very light green tint */
    padding: 0 6px;
    border-radius: 0; /* Mindstate: Sharp corners */
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); /* Mindstate: Minimal shadow */
    transition: all var(--transition-fast) ease;
}

.metric:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06); /* Mindstate: Subtle shadow */
}

.header-with-border {
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-lighter);
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.header-with-border::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 4px;
    background: #6B8E23; /* Mindstate: Data green */
    bottom: -3px;
    left: 0;
    border-radius: 0; /* Mindstate: Sharp corners */
    box-shadow: none; /* Mindstate: No shadow on decorative elements */
}

#placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    background: #FAFAFA; /* Mindstate: Light gray */
    border-radius: 0; /* Mindstate: Sharp corners */
    box-shadow: none; /* Mindstate: No inset shadows */
    padding: var(--spacing-lg);
    border: 1px solid #F4F4F4; /* Mindstate: Light border */
}

.disorder-summary p:first-of-type {
    position: relative;
    padding-left: var(--spacing-md);
    border-left: 3px solid var(--primary-lighter);
    animation: slideInLeft 0.7s ease forwards;
}

.disorder-summary p:last-of-type {
    position: relative;
    padding-left: var(--spacing-md);
    border-left: 3px solid var(--secondary-lighter);
    animation: slideInLeft 0.9s ease forwards;
}

/* === Dashboard Content Enhancements === */
.dashboard-card {
    background: #FFFFFF; /* Mindstate: White background */
    border-radius: 0; /* Mindstate: Sharp corners */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Mindstate: Minimal shadow */
    padding: 25px;
    border: 1px solid #F4F4F4; /* Mindstate: Light border */
    position: relative;
    overflow: hidden;
    transition: all var(--transition-medium) ease;
    animation: fadeInUp 0.6s ease forwards;
    animation-fill-mode: both;
}

.dashboard-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* Mindstate: Subtle shadow */
    transform: translateY(-3px);
}

.dashboard-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #6B8E23; /* Mindstate: Data green solid */
    z-index: 1;
}

.dashboard-card h4,
.dashboard-card h5,
.dashboard-card h6,
.tab-content h3,
.tab-content h4,
.tab-content h5,
.detailed-info-box h5,
.detailed-info-box h6 {
    font-family: var(--font-body);
    color: var(--text-dark);
    font-weight: 600;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    position: relative;
}

/* Titles within dashboard cards */
.dashboard-card > h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--primary-lighter);
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.dashboard-card > div:first-child > h4 {
    margin-top: 0;
}

.dashboard-card p,
.tab-content p,
.detailed-info-box p {
    color: var(--text-medium);
    line-height: var(--line-height-normal);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.dashboard-card p strong,
.tab-content p strong,
.detailed-info-box p strong {
    color: var(--text-dark);
    font-weight: 600;
    margin-right: var(--spacing-xs);
}

.dashboard-card p.notes {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-light);
    padding: var(--spacing-sm);
    background-color: rgba(0,0,0,0.02);
    border-left: 3px solid var(--primary-lighter);
    border-radius: 0 4px 4px 0;
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.dashboard-card p:last-child,
.tab-content p:last-child,
.detailed-info-box p:last-child {
    margin-bottom: 0;
}

/* Dashboard Layout */
.treatment-dashboard {
    margin-top: 40px;
    animation: fadeIn 0.8s ease forwards;
}

.dashboard-intro {
    margin-bottom: 25px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    position: relative;
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #000000; /* Mindstate: Pure black */
}

.card-icon {
    margin-right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0F8F0; /* Mindstate: Very light green tint */
    border-radius: 0; /* Mindstate: Sharp corners */
    color: var(--primary-dark);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); /* Mindstate: Minimal shadow */
}

/* Treatment Meter Styles */
.treatment-meter-container {
    margin: 20px 0 30px 0;
}

.treatment-meter {
    margin-bottom: 20px;
}

.treatment-meter-bar {
    height: 30px;
    background: #FAFAFA; /* Mindstate: Light gray */
    border-radius: 0; /* Mindstate: Sharp corners */
    overflow: hidden;
    display: flex;
    position: relative;
    border: 1px solid #EBEBEB; /* Mindstate: Light border */
    box-shadow: none; /* Mindstate: No inset shadows */
}

.treatment-meter-segment {
    height: 100%;
    transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.treatment-meter-segment::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1); /* Mindstate: Simple overlay */
}

.meter-current {
    background: #10b981; /* Mindstate: Solid green */
    border-right: 2px solid var(--card-bg);
}

.meter-partial {
    background: #f59e0b; /* Mindstate: Solid amber */
    border-right: 2px solid var(--card-bg);
}

.meter-untreated {
    background: #dc2626; /* Mindstate: Solid red */
}

/* gradientMove and shimmerEffect animations removed - now imported from ../shared-code/animations.css */

/* Tab Navigation System - REMOVED - Now using unified components from shared-code/components/tabs.css */
/*
.tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    background: linear-gradient(145deg, var(--color-bg-dark), var(--color-bg));
    padding: var(--spacing-md);
    border-radius: 12px;
    box-shadow: inset 2px 2px 5px var(--color-shadow-dark),
                inset -2px -2px 5px var(--color-shadow-light);
}

.tab {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(145deg, var(--color-bg-light), var(--color-bg));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    box-shadow: 3px 3px 6px var(--color-shadow-dark),
                -3px -3px 6px var(--color-shadow-light);
    transition: all var(--transition-fast) ease;
    position: relative;
}

.tab:hover {
    transform: translateY(-2px);
    color: var(--primary);
    box-shadow: 4px 4px 8px var(--color-shadow-dark),
                -4px -4px 8px var(--color-shadow-light);
}

.tab.active {
    background: linear-gradient(145deg, var(--primary-lighter), var(--color-bg-light));
    color: var(--primary-dark);
    box-shadow: 6px 6px 12px var(--color-shadow-dark),
                -6px -6px 12px var(--color-shadow-light);
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}
*/

/* Tab Content Display Rules - Aligned with TEA shared */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease; /* SHARED - Ensure fadeIn is defined in global CSS */
}

.tab-content.active {
    display: block;
}

/* Treatment Funnel */
.treatment-funnel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 25px 0;
}

.funnel-step {
    background: #FFFFFF; /* Mindstate: White background */
    border: 1px solid #F4F4F4; /* Mindstate: Light border */
    border-radius: 0; /* Mindstate: Sharp corners */
    padding: 20px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Mindstate: Minimal shadow */
    transition: all var(--transition-medium) ease;
    animation: fadeInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.funnel-step:hover {
    transform: translateX(8px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* Mindstate: Subtle shadow */
}

.funnel-step h4 {
    color: var(--primary-dark);
    margin-top: 0;
    font-size: 1.15rem;
    border-bottom: none;
    margin-bottom: var(--spacing-sm);
    padding-bottom: 0;
}

.funnel-step h4::after {
    display: none;
}

.funnel-arrow {
    display: flex;
    justify-content: center;
    position: relative;
    height: 40px;
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

.funnel-arrow::before {
    content: "";
    width: 2px;
    height: 100%;
    background: #6B8E23; /* Mindstate: Data green */
    position: absolute;
    box-shadow: none; /* Mindstate: No shadow on decorative elements */
}

.funnel-arrow::after {
    content: "";
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--primary-dark);
    position: absolute;
    bottom: 0;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

/* Confidence Labels */
.confidence {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 0; /* Mindstate: Sharp corners */
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); /* Mindstate: Minimal shadow */
    transition: all var(--transition-fast) ease;
}

.confidence-high {
    background: #e6fffa; /* Mindstate: Light green tint */
    color: var(--color-green-dark);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.confidence-medium {
    background: #fffbeb; /* Mindstate: Light yellow tint */
    color: var(--color-yellow-dark);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.confidence-low {
    background: #fef2f2; /* Mindstate: Light red tint */
    color: var(--color-red-dark);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.confidence-veryLow {
    background: #fee2e2; /* Mindstate: Lighter red tint */
    color: var(--color-red-dark);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.confidence-insufficient {
    background: #f9fafb; /* Mindstate: Very light gray */
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.confidence:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06); /* Mindstate: Subtle shadow */
}

/* Metric Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    align-items: start;
}

.metric-card {
    text-align: center;
    padding: var(--spacing-lg);
    background: #FFFFFF; /* Mindstate: White background */
    border-radius: 0; /* Mindstate: Sharp corners */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Mindstate: Minimal shadow */
    transition: all var(--transition-fast) ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #F4F4F4; /* Mindstate: Light border */
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* Mindstate: Subtle shadow */
}

.metric-value {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: var(--spacing-md) 0;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px var(--color-shadow-dark);
}

.metric-label {
    color: var(--color-text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* Detailed info boxes */
.detailed-info-box {
    background: #FAFAFA; /* Mindstate: Light gray */
    border-radius: 0; /* Mindstate: Sharp corners */
    box-shadow: none; /* Mindstate: No inset shadows */
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid #EBEBEB; /* Mindstate: Light border */
    transition: all var(--transition-medium) ease;
}

.detailed-info-box:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Mindstate: Minimal shadow */
    transform: translateY(-2px);
}

.detailed-info-box h5 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.detailed-info-box h6 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.detailed-info-box ul {
    padding-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.detailed-info-box ul li {
    margin-bottom: var(--spacing-xs);
    position: relative;
}

.detailed-info-box ul li::before {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    left: -15px;
    top: 8px;
}

/* Citations Styling */
.citation-list {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(145deg, rgba(28, 160, 149, 0.03), rgba(28, 160, 149, 0.08));
    border-radius: 10px;
    font-size: 13px;
    box-shadow: 
        inset 1px 1px 2px var(--color-shadow-dark),
        inset -1px -1px 2px var(--color-shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.citation-list h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: none;
    padding-bottom: 0;
}

.citation-list h4::after {
    display: none;
}

.citations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.citation-link {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    background: linear-gradient(145deg, var(--background-light), var(--background));
    color: var(--primary-dark);
    box-shadow: 2px 2px 4px var(--color-shadow-dark),
                -2px -2px 4px var(--color-shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast) ease;
}

.citation-link:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 6px var(--color-shadow-dark),
                -3px -3px 6px var(--color-shadow-light);
    background-color: var(--primary-lighter);
}

.citation-link::after {
    display: none;
}

/* Animation Delays for Cards */
.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }

/* Animation delays for funnel steps */
.funnel-step:nth-child(1) { animation-delay: 0.1s; }
.funnel-step:nth-child(3) { animation-delay: 0.3s; }
.funnel-step:nth-child(5) { animation-delay: 0.5s; }

/* Animation delays for metric cards */
.metrics-grid .metric-card:nth-child(1) { animation-delay: 0.1s; }
.metrics-grid .metric-card:nth-child(2) { animation-delay: 0.2s; }
.metrics-grid .metric-card:nth-child(3) { animation-delay: 0.3s; }
.metrics-grid .metric-card:nth-child(4) { animation-delay: 0.4s; }

/* Animations */
/* fadeIn, fadeInUp, fadeInRight animations removed - now imported from ../shared-code/animations.css */

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Treatment list */
.treatment-list {
    padding-left: 0;
    list-style: none;
    margin-bottom: var(--spacing-md);
}

.treatment-list li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--background-dark);
    transition: all var(--transition-fast) ease;
}

.treatment-list li:hover {
    padding-left: var(--spacing-xs);
    background-color: rgba(28, 160, 149, 0.03);
}

.treatment-list li:last-child {
    border-bottom: none;
}

.treatment-list strong {
    color: var(--text-dark);
}

/* Research Pipeline Styles */
.pipeline-treatments {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.pipeline-treatments .detailed-info-box {
    animation: fadeInUp 0.6s ease forwards;
    animation-fill-mode: both;
}

.pipeline-treatments .detailed-info-box:nth-child(1) { animation-delay: 0.1s; }
.pipeline-treatments .detailed-info-box:nth-child(2) { animation-delay: 0.2s; }
.pipeline-treatments .detailed-info-box:nth-child(3) { animation-delay: 0.3s; }
.pipeline-treatments .detailed-info-box:nth-child(4) { animation-delay: 0.4s; }
.pipeline-treatments .detailed-info-box:nth-child(5) { animation-delay: 0.5s; }

/* Tab content specific styles */
#research-pipeline h4 {
    color: var(--primary-dark);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-lighter);
    padding-bottom: var(--spacing-sm);
}

#research-pipeline h4:first-of-type {
    margin-top: var(--spacing-lg);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding: var(--spacing-sm);
    }
    
    .container {
        padding: var(--spacing-md);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .disorder-summary p {
        padding-left: var(--spacing-sm);
    }
    
    strong, .metric {
        word-break: break-word;
    }
    
    a[target="_blank"]::before {
        display: none;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    /* .tab {
        padding: 10px 15px;
        font-size: 14px;
    } */
    
    .metric-card {
        padding: 15px;
    }
    
    .metric-value {
        font-size: 20px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to right, var(--background), var(--background-light));
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-light), var(--primary-dark));
    border-radius: 8px;
    border: 3px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary), var(--primary));
}

/* Enhanced CSV Preview Card Styling (from market-size-explorer, adapted for SOC) */
#csvPreviewCard {
  /* General card styling is already there, this can be for specifics if needed */
  margin-top: var(--spacing-xl); /* Ensure it has some top margin */
}

#csvPreviewCard table { /* Specifically target table within this card */
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 15px;
  font-size: 13px; 
  border-radius: 0; /* Mindstate: Sharp corners */
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Mindstate: Minimal shadow */
}

#csvPreviewCard table th, 
#csvPreviewCard table td {
  padding: 12px 14px; 
  text-align: left;
  border-bottom: 1px solid var(--border);
  word-break: break-word; /* Added for long content */
}

#csvPreviewCard table tr:last-child td {
  border-bottom: none;
}

#csvPreviewCard table th {
  background: #6B8E23; /* Mindstate: Data green */
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px; 
  letter-spacing: 0.8px;
  text-shadow: none; /* Mindstate: No text shadow */
}

#csvPreviewCard table tr:nth-child(even) {
  background-color: rgba(28, 160, 149, 0.03);
}

#csvPreviewCard table tr {
  transition: all var(--transition-fast) ease;
}

#csvPreviewCard table tr:hover {
  background-color: rgba(28, 160, 149, 0.08);
  transform: translateX(3px);
}

/* Styling for citation badges if used in preview */
a.citation-badge {
  display: inline-flex; 
  align-items: center;
  text-decoration: none; 
  background: #FFFFFF; /* Mindstate: White background */
  padding: 2px 6px; 
  border-radius: 0; /* Mindstate: Sharp corners */ 
  font-size: 0.8em; 
  margin-left: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); /* Mindstate: Minimal shadow */
  border: 1px solid #F4F4F4; /* Mindstate: Light border */
  transition: all var(--transition-fast) ease;
  position: relative;
}

a.citation-badge:hover {
  background: #FAFAFA; /* Mindstate: Light gray on hover */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06); /* Mindstate: Subtle shadow */
  transform: translateY(-1px); 
}

a.citation-badge .citation-number {
  font-weight: 600; 
  margin-right: 4px; 
  color: #6B8E23; /* Mindstate: Data green */
  transition: color var(--transition-fast) ease;
}

a.citation-badge:hover .citation-number {
  color: #AA374C; /* Mindstate: Secondary red */
}

a.citation-badge::after { /* External link icon for citation badges */
  content: "";
  display: inline-block;
  width: 9px; 
  height: 9px; 
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231ca095' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: middle;
  opacity: 0.7;
  transition: opacity 0.2s ease, background-image 0.2s ease;
}

a.citation-badge:hover::after {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aa374c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
}

/* Enhanced export buttons styling */
.preview-actions-container {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  animation: fadeIn 1s ease; /* Assuming fadeIn animation is defined */
}

.copy-md-btn {
  background: #AA374C; /* Mindstate: Secondary red */
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 0; /* Mindstate: Sharp corners */
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-medium) ease;
  font-family: var(--font-body);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Mindstate: Minimal shadow */
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.copy-md-btn:hover {
  background: #C94E65; /* Mindstate: Light secondary red */
  transform: translateY(-3px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* Mindstate: Subtle shadow */
}

.copy-md-btn:active {
  transform: translateY(1px);
  background: #8B2033; /* Mindstate: Dark secondary red */
  box-shadow: none; /* Mindstate: No shadow when selected */
}

.copy-md-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255,255,255,0.1); /* Mindstate: Simple overlay */
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.copy-md-btn:hover::after {
  opacity: 1;
  transform: scale(1);
}

.download-btn {
  background: #6B8E23; /* Mindstate: Data green */
  color: white;
  border: none;
  padding: 16px 30px; /* Adjusted padding for better icon fit */
  border-radius: 0; /* Mindstate: Sharp corners */
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-medium) ease;
  font-family: var(--font-body);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Mindstate: Minimal shadow */
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px; /* Added gap for icon spacing */
  font-size: 16px; /* Standardized font size */
  overflow: hidden;
  letter-spacing: 0.5px;
}

.download-btn:hover {
  background: #8FB339; /* Mindstate: Light data green */
  transform: translateY(-3px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* Mindstate: Subtle shadow */
}

.download-btn:active {
  transform: translateY(1px);
  background: #4A6319; /* Mindstate: Dark data green */
  box-shadow: none; /* Mindstate: No shadow when selected */
}

.download-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255,255,255,0.1); /* Mindstate: Simple overlay */
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.download-btn:hover::after {
  opacity: 1;
  transform: scale(1);
}

.download-icon {
  font-weight: bold;
  font-size: 22px;
  /* margin-right: 2px; Removed margin, gap in flexbox handles it */
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
  display: inline-block;
  animation: bounce 2s infinite;
}

/* bounce animation removed - now imported from ../shared-code/animations.css */