/**
 * EvidenX v4 — Component Styles
 * Additional styles for specific components
 */

/* ═══════════════════════════════════════════════════════════════════════════
   WATCHTOWER WIDGET
   ═══════════════════════════════════════════════════════════════════════════ */
.watchtower-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(34,211,238,0.1) 0%, rgba(139,92,246,0.1) 100%);
    border: 1px solid rgba(34,211,238,0.3);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.watchtower-widget:hover {
    background: linear-gradient(135deg, rgba(34,211,238,0.15) 0%, rgba(139,92,246,0.15) 100%);
    border-color: rgba(34,211,238,0.5);
    transform: translateY(-1px);
}

.wt-icon {
    font-size: 1.25rem;
}

.wt-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wt-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.wt-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.625rem;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wt-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.wt-dot.pulse {
    animation: wtPulse 2s infinite;
}

@keyframes wtPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.wt-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 12px;
    padding: 0 6px;
}

/* Watchtower Panel */
.wt-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.wt-panel.open {
    right: 0;
}

.wt-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wt-panel-overlay.open {
    opacity: 1;
    visibility: visible;
}

.wt-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.wt-panel-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.wt-panel-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.wt-panel-close:hover {
    background: var(--bg-tertiary);
}

.wt-panel-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.wt-status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.05) 100%);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.wt-status-icon {
    font-size: 1.5rem;
}

.wt-status-text {
    display: flex;
    flex-direction: column;
}

.wt-status-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wt-status-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--success);
}

.wt-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.wt-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wt-meta-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.wt-meta-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.wt-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.wt-stat {
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.wt-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.wt-stat-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.wt-alerts {
    margin-bottom: 16px;
}

.wt-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(34,211,238,0.1);
    border: 1px solid rgba(34,211,238,0.3);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.wt-alert-icon {
    font-size: 1rem;
}

.wt-alert-text {
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.wt-alert-empty {
    color: var(--text-muted);
    justify-content: center;
    background: var(--bg-tertiary);
    border-color: var(--border);
}

/* Watchtower Sections */
.wt-section {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.wt-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Lexicon Progress */
.wt-lexicon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wt-lexicon-pct {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
}

.wt-progress-bar {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.wt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, var(--accent) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.wt-lexicon-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.wt-stat-mini {
    text-align: center;
}

.wt-stat-mini .wt-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.wt-stat-mini .wt-stat-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Collection Grid */
.wt-collection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wt-collection-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wt-collection-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.wt-collection-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Lexicon Progress Container */
.wt-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.wt-progress-container .wt-progress-bar {
    flex: 1;
    margin-bottom: 0;
}

.wt-progress-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--success);
    min-width: 40px;
    text-align: right;
}

/* Recent Terms */
.wt-recent-terms {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.wt-recent-terms-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.wt-terms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wt-term-tag {
    display: inline-block;
    padding: 4px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

/* Extractions List */
.wt-extractions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wt-extraction-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.wt-extraction-source {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 70px;
}

.wt-extraction-type {
    color: var(--text-muted);
    flex: 1;
}

.wt-extraction-count {
    color: var(--success);
    font-weight: 600;
}

.wt-extraction-time {
    color: var(--text-muted);
    font-size: 0.6875rem;
    min-width: 50px;
    text-align: right;
}

/* Stat Mini - Updated */
.wt-stat-mini-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.wt-stat-mini-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANGUAGE SELECTOR
   ═══════════════════════════════════════════════════════════════════════════ */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.lang-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
}

.lang-option:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.lang-option:hover {
    background: var(--bg-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NUDGES
   ═══════════════════════════════════════════════════════════════════════════ */
.nudges-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

.nudge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 380px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
    margin-bottom: 10px;
}

.nudge-visible {
    opacity: 1;
    transform: translateX(0);
}

.nudge-bottom-right {
    position: fixed;
    bottom: 100px;
    right: 20px;
}

.nudge-top-right {
    position: fixed;
    top: 80px;
    right: 20px;
}

.nudge-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nudge-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.nudge-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.nudge-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Nudge variants */
.nudge-info {
    border-left: 4px solid var(--info);
}

.nudge-success {
    border-left: 4px solid var(--success);
    background: linear-gradient(90deg, rgba(16,185,129,0.05) 0%, var(--bg-secondary) 100%);
}

.nudge-warning {
    border-left: 4px solid var(--warning);
    background: linear-gradient(90deg, rgba(245,158,11,0.05) 0%, var(--bg-secondary) 100%);
}

.nudge-tip {
    border-left: 4px solid var(--accent);
    background: linear-gradient(90deg, rgba(139,92,246,0.05) 0%, var(--bg-secondary) 100%);
}

.nudge-watchtower {
    border-left: 4px solid #22d3ee;
    background: linear-gradient(90deg, rgba(34,211,238,0.05) 0%, var(--bg-secondary) 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════
   METRIC TOOLTIPS
   ═══════════════════════════════════════════════════════════════════════════ */

.has-metric-tooltip {
    position: relative;
    cursor: help;
}

.metric-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    text-align: left;
}

.has-metric-tooltip:hover .metric-tooltip {
    opacity: 1;
    visibility: visible;
}

.metric-tooltip strong {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.metric-tooltip p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.metric-tooltip-scale {
    display: flex;
    gap: 4px;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.metric-tooltip-scale span {
    flex: 1;
    padding: 4px 6px;
    border-radius: 4px;
    text-align: center;
}

.scale-low {
    background: rgba(239,68,68,0.1);
    color: #dc2626;
}

.scale-med {
    background: rgba(245,158,11,0.1);
    color: #d97706;
}

.scale-high {
    background: rgba(16,185,129,0.1);
    color: #059669;
}

/* Tooltip arrow */
.metric-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--bg-primary);
}

.metric-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-top-color: var(--border);
}

/* Scope item inline tooltips */
.has-tooltip-inline {
    position: relative;
    cursor: help;
}

.tooltip-inline {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    z-index: 50;
}

.has-tooltip-inline:hover .tooltip-inline {
    display: block;
}

/* Scope Value Colors */
.scope-value.success {
    color: var(--success);
}

.scope-value.warning {
    color: #d97706;
}

.scope-value.danger {
    color: #dc2626;
}

.scope-value.muted {
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH MODES & MESH RESOLUTION
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mode Indicator */
.mesh-mode-indicator {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.mesh-mode-indicator.exploratory {
    background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(245,158,11,0.05) 100%);
    border: 1px solid rgba(245,158,11,0.3);
}

.mesh-mode-indicator.anchored {
    background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.05) 100%);
    border: 1px solid rgba(16,185,129,0.3);
}

.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
}

.mode-badge.exploratory {
    background: rgba(245,158,11,0.2);
    color: #d97706;
}

.mode-badge.anchored {
    background: rgba(16,185,129,0.2);
    color: #059669;
}

.mode-icon {
    font-size: 1rem;
}

.mode-explanation {
    margin: 8px 0 0 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Coverage Display */
.mesh-coverage-display {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.coverage-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.coverage-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coverage-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

.coverage-value.muted {
    color: var(--text-muted);
    font-size: 1rem;
}

.coverage-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Resolved Terms */
.mesh-resolved-terms {
    margin-bottom: 16px;
}

.mesh-resolved-terms h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

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

.mesh-tag {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.mesh-tag.valid {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.3);
    color: var(--success);
}

.mesh-tag.semantic {
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.3);
    color: var(--accent);
}

/* MeSH Suggestions */
.mesh-suggestions {
    padding: 16px;
    background: linear-gradient(135deg, rgba(139,92,246,0.05) 0%, rgba(34,211,238,0.05) 100%);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.suggestions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.suggestions-icon {
    font-size: 1.25rem;
}

.suggestions-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.suggestions-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
}

.suggestion-original {
    color: var(--text-muted);
    font-style: italic;
}

.suggestion-arrow {
    color: var(--accent);
}

.suggestion-mesh {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.suggestion-confidence {
    font-size: 0.6875rem;
    padding: 2px 8px;
    background: rgba(16,185,129,0.1);
    color: var(--success);
    border-radius: 10px;
}

.suggestions-actions {
    display: flex;
    gap: 10px;
}

/* Extrapolation Risk */
.extrapolation-risk {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

.extrapolation-risk.low {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
}

.extrapolation-risk.medium {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
}

.extrapolation-risk.high {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
}

.risk-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-value {
    font-weight: 700;
    font-size: 0.875rem;
}

.extrapolation-risk.low .risk-value { color: var(--success); }
.extrapolation-risk.medium .risk-value { color: #d97706; }
.extrapolation-risk.high .risk-value { color: #dc2626; }

.risk-explanation {
    flex: 1;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Watchtower Empty State */
.wt-empty-state {
    text-align: center;
    padding: 24px 16px;
}

.wt-empty-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.wt-empty-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.wt-empty-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Search Modes Radio Buttons */
.search-modes {
    display: flex;
    justify-content: center;
}

.search-mode-group {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.search-mode {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-mode input {
    position: absolute;
    opacity: 0;
}

.search-mode:hover {
    background: var(--bg-secondary);
}

.search-mode:has(input:checked) {
    background: var(--accent);
}

.search-mode:has(input:checked) .mode-label,
.search-mode:has(input:checked) .mode-desc {
    color: white;
}

.search-mode .mode-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.search-mode .mode-desc {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.search-mode .mode-desc.has-tooltip {
    position: relative;
}

.search-mode .mode-desc .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

.search-mode .mode-desc.has-tooltip:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Register Topic Button */
.register-topic-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(34,211,238,0.1) 0%, rgba(139,92,246,0.1) 100%);
    border: 1px solid rgba(34,211,238,0.3);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.register-topic-btn:hover {
    background: linear-gradient(135deg, rgba(34,211,238,0.2) 0%, rgba(139,92,246,0.2) 100%);
    border-color: rgba(34,211,238,0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN CONFIG BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */
.admin-config-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
    z-index: 999;
}

.admin-config-btn:hover {
    transform: scale(1.1);
    border-color: var(--accent);
}

.admin-config-btn.admin-active {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.admin-config-btn .lock-icon {
    font-size: 1.25rem;
}

.admin-login-error {
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #ef4444;
    font-size: 0.8125rem;
    margin-bottom: 16px;
}

.admin-config-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
}

.admin-config-notice span:first-child {
    font-size: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT WIDGET - COIN LOGO
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Chat FAB Button */
.chat-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.chat-fab-icon {
    width: 32px;
    height: 32px;
    color: white;
    animation: fabSpin 8s infinite linear;
}

@keyframes fabSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chat-fab:hover .chat-fab-icon {
    animation-play-state: paused;
}

.chat-fab-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent);
    animation: fabPulse 2s infinite;
    z-index: -1;
}

@keyframes fabPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.chat-coin {
    width: 40px;
    height: 40px;
    position: relative;
    transform-style: preserve-3d;
    animation: coinSpin 4s infinite linear;
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.chat-toggle:hover .chat-coin {
    animation-play-state: paused;
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin-front {
    transform: rotateY(0deg);
}

.coin-back {
    transform: rotateY(180deg);
}

.coin-logo {
    width: 32px;
    height: 32px;
    color: white;
}

.coin-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Chat Panel */
.chat-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-widget.open .chat-panel {
    display: flex;
}

.chat-panel.minimized {
    height: 50px;
}

.chat-panel.minimized .chat-messages,
.chat-panel.minimized .chat-input-container {
    display: none;
}

.chat-panel.expanded {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: auto;
    height: auto;
    z-index: 1001;
}

.chat-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 14px 16px !important;
    background: linear-gradient(135deg, #0891b2 0%, #8b5cf6 100%) !important;
    color: white !important;
    font-weight: 600;
}

.chat-controls {
    display: flex !important;
    gap: 6px;
}

.chat-ctrl-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    border-radius: 5px !important;
    background: rgba(255,255,255,0.3) !important;
    border: 2px solid rgba(255,255,255,0.5) !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
    padding: 0 !important;
}

.chat-ctrl-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.05);
}

.chat-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.chat-message {
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-message.user {
    background: var(--accent);
    color: white;
    margin-left: 20%;
}

.chat-message.assistant {
    background: var(--bg-tertiary);
    margin-right: 20%;
}

.chat-message p {
    margin: 0;
}

.chat-message code {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8125rem;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.15s;
}

.chat-send:hover {
    background: #7c3aed;
}

/* Chat Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    color: white;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-avatar svg {
    width: 24px;
    height: 24px;
    color: white;
}

.chat-title {
    display: flex;
    flex-direction: column;
}

.chat-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.chat-status {
    font-size: 0.75rem;
    opacity: 0.8;
}

.chat-actions {
    display: flex;
    gap: 6px;
}

.chat-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.chat-btn:hover {
    background: rgba(255,255,255,0.3);
}

.chat-btn.chat-close:hover {
    background: #ef4444;
}

/* Chat Welcome */
.chat-welcome {
    text-align: center;
    padding: 24px 16px;
}

.chat-welcome-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.chat-welcome h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.chat-welcome p {
    margin: 0 0 16px 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.chat-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-suggestion {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8125rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.chat-suggestion:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.chat-input-area .chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    resize: none;
    min-height: 42px;
    max-height: 100px;
}

.chat-input-area .chat-send {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--accent);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.chat-input-area .chat-send svg {
    width: 20px;
    height: 20px;
}

.chat-input-area .chat-send:hover {
    background: #7c3aed;
}

/* Chat Configuration Panel */
.chat-config {
    padding: 20px;
    text-align: center;
}

.chat-config-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.chat-config h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.chat-config p {
    margin: 0 0 16px 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.chat-config-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.chat-config-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: -8px;
}

.chat-config-select,
.chat-config-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.chat-config-select:focus,
.chat-config-input:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-config-btn {
    width: 100%;
    padding: 12px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 8px;
}

.chat-config-btn:hover {
    background: #7c3aed;
}

.chat-config-btn-secondary {
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.15s;
}

.chat-config-btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.chat-config-note {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 12px;
    opacity: 0.8;
}

.chat-config-inline-btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.chat-config-inline-btn:hover {
    background: #7c3aed;
}

.chat-config-inline-btn-small {
    margin-top: 12px;
    padding: 6px 14px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.chat-config-inline-btn-small:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.chat-settings-btn {
    position: absolute;
    bottom: 70px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 0.875rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.chat-settings-btn:hover {
    opacity: 1;
    background: var(--bg-secondary);
}

.chat-messages {
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGAL PROOF MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.legal-proof-content {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
}

.legal-proof-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.legal-proof-label {
    width: 140px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.legal-proof-value {
    flex: 1;
    color: var(--text-primary);
    word-break: break-all;
}

.legal-proof-checklist {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.legal-proof-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.8125rem;
}

.legal-proof-check.verified {
    color: var(--success);
}

.legal-proof-check.not-verified {
    color: var(--text-muted);
}

.legal-proof-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.legal-proof-source-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.wt-readonly-badge {
    font-size: 0.625rem;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   METHODOLOGY STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
.methodology-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.methodology-list li {
    position: relative;
    padding: 8px 0 8px 24px;
    border-bottom: 1px solid var(--border);
}

.methodology-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

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

.methodology-watchtower {
    padding: 16px;
    background: linear-gradient(135deg, rgba(34,211,238,0.05) 0%, rgba(139,92,246,0.05) 100%);
    border: 1px solid rgba(34,211,238,0.2);
    border-radius: var(--radius-md);
}

.methodology-watchtower h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    font-size: 0.6875rem;
    color: var(--text-muted);
    cursor: help;
    position: relative;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    white-space: nowrap;
    max-width: 280px;
    white-space: normal;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROVIDER SELECTOR
   ═══════════════════════════════════════════════════════════════════════════ */
.provider-selector {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.provider-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.provider-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-dark);
}

.provider-btn.active {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Header */
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .watchtower-widget {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 10px;
        margin-top: 6px;
    }
    
    .wt-info {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .lang-selector {
        order: 2;
    }
    
    /* Watchtower Panel */
    .wt-panel {
        width: 100%;
        right: -100%;
    }
    
    /* Stepper */
    .stepper {
        overflow-x: auto;
        padding: 0 10px;
        gap: 8px;
    }
    
    .stepper-label {
        font-size: 0.625rem;
    }
    
    /* Phases */
    .phase-content {
        padding: 16px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
    }
    
    /* Cards */
    .card {
        padding: 16px;
    }
    
    /* Nudges */
    .nudge {
        max-width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }
    
    .nudge-bottom-right,
    .nudge-top-right {
        left: 20px;
        right: 20px;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Track selector */
    .track-selector {
        flex-direction: column;
    }
    
    .track-option {
        width: 100%;
    }
    
    /* Universe declaration */
    .universe-declaration {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Article cards */
    .article-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-status {
        position: absolute;
        top: 12px;
        right: 12px;
    }
    
    .article-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }
    
    /* Metrics */
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    /* Modals */
    .modal {
        width: 95%;
        max-height: 90vh;
    }
    
    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 4px;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .wt-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .wt-stat {
        padding: 12px 8px;
    }
    
    .wt-stat-value {
        font-size: 1.25rem;
    }
    
    .phase-content {
        padding: 12px;
    }
    
    .search-input {
        font-size: 0.875rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONFIDENCE BADGE
   ═══════════════════════════════════════════════════════════════════════════ */
.confidence-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
    margin-left: 0.25rem;
}

.confidence-badge.high {
    background: var(--success-bg);
    color: var(--success);
}

.confidence-badge.medium {
    background: var(--warning-bg);
    color: var(--warning);
}

.confidence-badge.low {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LICENSE BADGE
   ═══════════════════════════════════════════════════════════════════════════ */
.article-badge.license {
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.6875rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGAL PROOF MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.legal-proof-modal {
    padding: 1rem;
}

.legal-proof-modal h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.legal-proof-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.proof-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.proof-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.proof-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
    text-align: right;
    max-width: 60%;
}

.proof-value.confidence-high { color: var(--success); }
.proof-value.confidence-medium { color: var(--warning); }
.proof-value.confidence-low { color: var(--danger); }

.proof-checklist {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.proof-checklist h4 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.8125rem;
}

.check-item.pass { color: var(--success); }
.check-item.fail { color: var(--text-muted); }
.check-item.warn { color: var(--warning); }
.check-item.neutral { color: var(--text-secondary); }

.proof-sources {
    margin-top: 1rem;
}

.proof-sources h4 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.source-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.legal-proof-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE STATUS ENHANCED
   ═══════════════════════════════════════════════════════════════════════════ */
.article-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 40px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UNIVERSE DECLARATION
   ═══════════════════════════════════════════════════════════════════════════ */
.universe-declaration {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
}

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

.universe-label {
    color: var(--text-muted);
}

.universe-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RULE EXPLANATION
   ═══════════════════════════════════════════════════════════════════════════ */
.rule-explanation {
    padding: 0.625rem 1rem;
    background: var(--accent-bg);
    border-left: 3px solid var(--accent);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATS VALIDATION NOTE
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-validation-note {
    width: 100%;
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE LIST INFO
   ═══════════════════════════════════════════════════════════════════════════ */
.article-list-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.article-list-info small {
    font-size: 0.6875rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CORPUS HINT TEXT
   ═══════════════════════════════════════════════════════════════════════════ */
.corpus-hint-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.corpus-hint-text small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TRACK BADGE ALT (for secondary track)
   ═══════════════════════════════════════════════════════════════════════════ */
.track-badge-alt {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.5625rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATS SUMMARY (Compact)
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-total {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stats-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.stats-access-hint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.access-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.access-badge.oa { background: var(--oa-bg); color: var(--oa-color); }
.access-badge.accessible { background: var(--accessible-bg); color: var(--accessible-color); }
.access-badge.paywall { background: var(--paywall-bg); color: var(--paywall-color); }

.access-link {
    font-size: 0.8125rem;
    color: var(--accent);
    cursor: pointer;
    font-weight: 500;
}

.access-link:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TRACK SELECTION (Refined)
   ═══════════════════════════════════════════════════════════════════════════ */
.track-selection h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
}

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

.track-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    position: relative;
}

.track-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Secondary track (Analyze) - more subtle */
.track-card.secondary {
    background: var(--bg-secondary);
    border-color: var(--border);
}

.track-card.secondary:hover {
    border-color: var(--border-strong);
    background: var(--bg-card);
}

.track-card.secondary .track-action {
    color: var(--text-muted);
}

/* Primary track (Corpus) - featured */
.track-card.featured {
    border-color: var(--accent);
    background: var(--accent-bg);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

.track-card.featured:hover {
    box-shadow: var(--shadow-lg), 0 0 0 3px var(--accent-bg);
    transform: translateY(-4px);
}

.track-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: var(--accent);
    color: var(--text-inverse);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

.track-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

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

.track-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.track-action {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
}

.track-action.secondary {
    color: var(--text-muted);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-section {
    text-align: center;
    padding: 2rem 0;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.quick-mode-hint {
    margin-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH MODES
   ═══════════════════════════════════════════════════════════════════════════ */
.search-modes {
    display: flex;
    justify-content: center;
}

.search-mode-group {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.375rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.search-mode {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-mode:hover {
    background: var(--bg-hover);
}

.search-mode input {
    display: none;
}

.search-mode input:checked + .mode-label {
    color: var(--accent);
    font-weight: 600;
}

.search-mode:has(input:checked) {
    background: var(--accent-bg);
}

.mode-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.mode-desc {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DISCLAIMER BOX
   ═══════════════════════════════════════════════════════════════════════════ */
.disclaimer-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.disclaimer-box p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.disclaimer-box strong {
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INFO GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.info-card.success {
    border-color: var(--success);
    background: var(--success-bg);
}

.info-card.danger {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.info-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.info-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PIPELINE VISUAL
   ═══════════════════════════════════════════════════════════════════════════ */
.pipeline-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    max-width: 700px;
    margin: 0 auto;
}

.pipeline-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.pipeline-num {
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: var(--text-inverse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.pipeline-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pipeline-arrow {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.phase-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.phase-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.phase-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.phase-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MESH TAGS
   ═══════════════════════════════════════════════════════════════════════════ */
.mesh-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mesh-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
}

.mesh-tag.success {
    background: var(--success-bg);
    border-color: var(--success);
}

.mesh-tag.accent {
    background: var(--accent-bg);
    border-color: var(--accent);
}

.mesh-term {
    font-weight: 500;
    color: var(--text-primary);
}

.mesh-type {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.mesh-coverage {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.8125rem;
}

.mesh-coverage-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mesh-coverage-label {
    color: var(--text-muted);
}

.mesh-coverage-value {
    font-weight: 600;
    color: var(--accent);
}

.mesh-coverage-value.warning {
    color: var(--warning);
}

.mesh-semantic-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--warning-bg);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mesh-semantic-icon {
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MESH LIST
   ═══════════════════════════════════════════════════════════════════════════ */
.mesh-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mesh-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.mesh-list-item:last-child {
    border-bottom: none;
}

.mesh-icon {
    font-size: 0.875rem;
}

.mesh-list-item.mapped .mesh-icon {
    color: var(--success);
}

.mesh-original {
    font-weight: 500;
    color: var(--text-primary);
}

.mesh-mapped {
    color: var(--accent);
    font-size: 0.8125rem;
}

.mesh-fallback {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STUDY TYPE BARS
   ═══════════════════════════════════════════════════════════════════════════ */
.study-type-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.study-type-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.study-type-label {
    width: 120px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.study-type-bar-bg {
    flex: 1;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.study-type-bar {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
}

.study-type-bar.layer-a { background: var(--success); }
.study-type-bar.layer-b { background: var(--accent); }
.study-type-bar.layer-c { background: var(--secondary); }
.study-type-bar.layer-d { background: var(--warning); }
.study-type-bar.layer-e { background: var(--text-muted); }

.study-type-count {
    width: 80px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TERM PRESENCE
   ═══════════════════════════════════════════════════════════════════════════ */
.term-presence-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.term-header,
.term-row {
    display: grid;
    grid-template-columns: 1fr 100px 100px;
    gap: 1rem;
    padding: 0.5rem 0;
}

.term-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.term-row {
    border-bottom: 1px solid var(--border-light);
}

.term-name {
    font-weight: 500;
    color: var(--text-primary);
}

.term-value {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCOPE METRICS
   ═══════════════════════════════════════════════════════════════════════════ */
.scope-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.scope-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.scope-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.scope-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.scope-value.low { color: var(--success); }
.scope-value.moderate { color: var(--warning); }
.scope-value.high { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════════════════
   VIABILITY GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.viability-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.viability-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.viability-item.success {
    background: var(--success-bg);
}

.viability-item.warning {
    background: var(--warning-bg);
}

.viability-item.danger {
    background: var(--danger-bg);
}

.viability-icon {
    font-size: 1.25rem;
}

.viability-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DECISION BOX
   ═══════════════════════════════════════════════════════════════════════════ */
.decision-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.decision-message {
    padding: 1rem;
    border-radius: var(--radius-md);
}

.decision-message.success {
    background: var(--success-bg);
    border-left: 4px solid var(--success);
}

.decision-message.warning {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning);
}

.decision-message.info {
    background: var(--accent-bg);
    border-left: 4px solid var(--accent);
}

.decision-message strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.decision-message p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CORPUS / ANALYSIS HINTS
   ═══════════════════════════════════════════════════════════════════════════ */
.corpus-hint,
.analysis-hint {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.corpus-hint-content,
.analysis-hint-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.corpus-hint-icon,
.analysis-hint-icon {
    font-size: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COVERAGE BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.coverage-info {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.coverage-bar-container {
    margin-bottom: 0.5rem;
}

.coverage-bar {
    height: 12px;
    background: var(--danger-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    display: flex;
}

.coverage-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.coverage-fill.oa {
    background: var(--oa-color);
}

.coverage-fill.accessible {
    background: var(--accessible-color);
}

.coverage-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTERS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-select {
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-primary);
    cursor: pointer;
}

.filter-checkboxes {
    display: flex;
    gap: 0.75rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.filter-checkbox input {
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE LIST CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */
.article-list-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.article-list {
    max-height: 600px;
    overflow-y: auto;
}

.article-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.article-card:hover {
    background: var(--bg-hover);
}

.article-card.selected {
    background: var(--accent-bg);
}

.article-checkbox {
    padding-top: 0.25rem;
}

.article-badges {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.article-badge.rct { background: var(--accent-bg); color: var(--accent); }
.article-badge.meta-analysis { background: var(--success-bg); color: var(--success); }
.article-badge.systematicreview { background: var(--success-bg); color: var(--success); }
.article-badge.cohort { background: var(--secondary-bg); color: var(--secondary); }
.article-badge.source { background: var(--bg-tertiary); color: var(--text-muted); }

.load-more,
.all-loaded {
    padding: 1rem;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTION BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.action-bar-left {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.action-bar-right {
    display: flex;
    gap: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL ARTICLE
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-article {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.modal-article:last-child {
    border-bottom: none;
}

.modal-article-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.modal-article-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   METHODOLOGY MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.methodology-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.methodology-content p,
.methodology-content ul {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.methodology-content ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.methodology-content li {
    margin: 0.375rem 0;
}

.methodology-quote {
    background: var(--accent-bg);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.settings-field {
    margin-bottom: 0.75rem;
}

.settings-field label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.settings-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.settings-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

.settings-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT WIDGET
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-accent);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-fast);
}

.chat-toggle:hover {
    transform: scale(1.05);
}

.chat-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    max-height: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-panel.open {
    display: flex;
}

/* chat-header já definido acima - não duplicar */

.chat-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
}

.chat-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    max-width: 85%;
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-message.assistant {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    align-self: flex-start;
}

.chat-message.user {
    background: var(--accent);
    color: var(--text-inverse);
    align-self: flex-end;
}

.chat-message p {
    margin: 0;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.chat-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-send {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-size: 1.125rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.chat-send:hover {
    background: var(--accent-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.875rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    color: var(--text-primary);
    z-index: 10000;
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    border-color: var(--success);
    background: var(--success-bg);
}

.toast-warning {
    border-color: var(--warning);
    background: var(--warning-bg);
}

.toast-error {
    border-color: var(--danger);
    background: var(--danger-bg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HIDE MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .pipeline-visual {
        flex-wrap: wrap;
    }
    
    .track-cards {
        grid-template-columns: 1fr;
    }
    
    .viability-grid {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-bar-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .chat-panel {
        width: calc(100vw - 2rem);
        right: -0.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEXICON STATUS (Phase 1 - below search)
   ═══════════════════════════════════════════════════════════════════════════ */

.lexicon-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 20px;
    margin: 0 auto;
}

.lexicon-active-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: lexiconPulse 2s ease-in-out infinite;
}

@keyframes lexiconPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.lexicon-active-text {
    font-size: 13px;
    font-weight: 500;
    color: #059669;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HIDE SEARCH MODES (Phase 1 simplification)
   Radio buttons still exist for JS, just hidden from user
   ═══════════════════════════════════════════════════════════════════════════ */

.search-modes {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HIDE MESH UI (keep HTML for JS, just hide visually)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hide MeSH-X Resolution card */
#meshResolutionCard {
    display: none !important;
}

/* Hide MeSH Terms Used accordion */
#meshTermsAccordion {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FINAL DOWNLOAD BUTTON & MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

/* Final Download Button */
.final-download-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.btn-final-download {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.btn-final-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-final-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.final-download-icon {
    font-size: 1.5rem;
}

.final-download-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.final-download-text strong {
    font-size: 0.9375rem;
    font-weight: 600;
}

.final-download-text small {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* Modal Large */
.modal-lg {
    max-width: 600px;
}

/* Final Steps */
.final-step {
    display: none;
}

.final-step.active {
    display: block;
}

/* Final Form */
.final-form {
    margin-top: 16px;
}

.final-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.final-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
}

.final-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.final-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Checkboxes */
.final-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.final-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.final-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* Preview Stats */
.final-preview-header {
    margin-bottom: 16px;
}

.final-preview-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.final-stat {
    text-align: center;
}

.final-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.final-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Preview List */
.final-preview-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.final-preview-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
}

.final-preview-item:last-child {
    border-bottom: none;
}

.final-preview-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.final-preview-info {
    flex: 1;
    min-width: 0;
}

.final-preview-title {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.final-preview-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.final-preview-layer {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.final-preview-layer.layer-a { background: #dcfce7; color: #166534; }
.final-preview-layer.layer-b { background: #dbeafe; color: #1e40af; }
.final-preview-layer.layer-c { background: #fef3c7; color: #92400e; }

/* Package Info */
.final-package-info {
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
}

.final-package-info h4 {
    margin: 0 0 8px 0;
    font-size: 0.8125rem;
}

.final-package-info ul {
    margin: 0;
    padding-left: 20px;
}

.final-package-info li {
    margin: 4px 0;
    color: var(--text-secondary);
}

.final-package-info code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Generating State */
.final-generating {
    text-align: center;
    padding: 40px 20px;
}

.final-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.final-generating h4 {
    margin: 0 0 8px 0;
}

.final-generating p {
    color: var(--text-muted);
    margin: 0 0 16px 0;
}

.final-progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    max-width: 300px;
    margin: 0 auto;
}

.final-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #10b981 100%);
    transition: width 0.3s;
}

/* Complete State */
.final-complete {
    text-align: center;
    padding: 40px 20px;
}

.final-complete-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.final-complete h4 {
    margin: 0 0 8px 0;
    color: var(--success);
}

.final-complete p {
    color: var(--text-secondary);
    margin: 0;
}

/* Utilities */
.mt-3 {
    margin-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMING SOON BOX
   ═══════════════════════════════════════════════════════════════════════════ */

.coming-soon-box {
    padding: 14px;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-md);
    opacity: 0.85;
}

.coming-soon-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.coming-soon-icon {
    font-size: 1.25rem;
}

.coming-soon-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coming-soon-title strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.coming-soon-badge {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    background: var(--accent);
    color: white;
    border-radius: 10px;
}

.coming-soon-features {
    margin: 0;
    padding: 0;
    list-style: none;
}

.coming-soon-features li {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 4px 0;
    padding-left: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   METHODOLOGY MODAL - CENTERED & STYLED
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-methodology {
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
}

/* Force center */
.modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    margin: auto;
}

/* Methodology sections */
.method-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.method-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.method-section h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.method-section p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
}

.method-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.method-section li {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 6px 0;
}

.method-section li strong {
    color: var(--text-primary);
}

/* Highlight boxes */
.method-highlight {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-left: 3px solid var(--accent);
    padding: 10px 14px;
    margin: 12px 0;
    font-style: italic;
    font-size: 0.8125rem;
    color: var(--text-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Scrollable content */
.methodology-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;
}

.methodology-content::-webkit-scrollbar {
    width: 6px;
}

.methodology-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.methodology-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.methodology-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EXPORT MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-export {
    max-width: 520px;
}

/* Preview Stats */
.export-preview {
    margin-bottom: 20px;
}

.export-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.export-stat {
    text-align: center;
    min-width: 80px;
}

.export-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.export-stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Sample List */
.export-sample-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.export-sample-list {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 120px;
    overflow-y: auto;
}

.export-sample-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
}

.export-sample-item:last-child {
    border-bottom: none;
}

.export-sample-title {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.export-sample-meta {
    color: var(--text-muted);
    margin-top: 2px;
}

/* Format Grid */
.export-formats {
    margin-bottom: 16px;
}

.export-format-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.export-format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.export-format-option {
    cursor: pointer;
}

.export-format-option input {
    display: none;
}

.export-format-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.15s;
    text-align: center;
}

.export-format-option input:checked + .export-format-card {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.05);
}

.export-format-card:hover {
    border-color: var(--text-muted);
}

.export-format-icon {
    font-size: 1.25rem;
}

.export-format-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.export-format-desc {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Filters */
.export-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.export-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.export-filter input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SOURCE TYPE BADGES (Core, Expanded, Contextual)
   ═══════════════════════════════════════════════════════════════════════════ */

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.source-core {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.source-expanded {
    background: rgba(234, 179, 8, 0.15);
    color: #854d0e;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.source-contextual {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Dark mode adjustments */
[data-theme="dark"] .source-core {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

[data-theme="dark"] .source-expanded {
    background: rgba(234, 179, 8, 0.2);
    color: #fde047;
}

[data-theme="dark"] .source-contextual {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

/* Coming Soon Stats */
.coming-soon-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 12px 0;
}

.coming-soon-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.coming-soon-stat .stat-icon {
    font-size: 0.875rem;
}

.coming-soon-stat .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.coming-soon-stat .stat-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.coming-soon-note {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-align: center;
    margin: 8px 0 0 0;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW VALUE PROPOSITION GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.value-grid-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.value-item-new {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
}

.value-icon-new {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.value-text-new {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Supporting text */
.supporting-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ONBOARDING MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-onboarding {
    max-width: 440px;
    border-radius: var(--radius-xl);
}

.modal-onboarding .modal-body {
    padding: 32px 28px;
}

.onboarding-step {
    display: none;
    text-align: center;
}

.onboarding-step.active {
    display: block;
}

.onboarding-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.onboarding-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.onboarding-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.onboarding-highlight {
    font-size: 0.875rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.onboarding-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 16px 0;
}

/* Metrics list in step 2 */
.onboarding-metrics {
    text-align: left;
    margin: 16px 0;
}

.onboarding-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.onboarding-metric .metric-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.onboarding-metric .metric-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* AI rules in step 3 */
.onboarding-ai-rules {
    text-align: left;
    margin: 16px 0;
}

.ai-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.ai-rule .rule-icon {
    font-size: 1rem;
    font-weight: 700;
    width: 24px;
    text-align: center;
}

.ai-rule:nth-child(1) .rule-icon {
    color: #22c55e;
}

.ai-rule:nth-child(2) .rule-icon,
.ai-rule:nth-child(3) .rule-icon {
    color: #ef4444;
}

.ai-rule .rule-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Dots navigation */
.onboarding-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.onboarding-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.2s;
}

.onboarding-dots .dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 480px) {
    .modal-onboarding .modal-body {
        padding: 24px 20px;
    }
    
    .onboarding-metric {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .onboarding-metric .metric-desc {
        text-align: left;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UX REFACTOR — NEW COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Live Indicator — Lexicon + Watchtower */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    margin-top: 12px;
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.live-indicator:hover {
    background: var(--bg-hover);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
}

.live-dot.pulse {
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
        opacity: 0.8;
    }
}

.live-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.live-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
}

.live-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--border);
}

.live-indicator:hover .live-tooltip {
    opacity: 1;
    visibility: visible;
}

.tooltip-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
}

.tooltip-block:first-child {
    padding-top: 0;
}

.tooltip-block:last-child {
    padding-bottom: 0;
}

.tooltip-block:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.tooltip-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tooltip-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Dark theme adjustments */
[data-theme="dark"] .live-dot {
    background: #34d399;
}

[data-theme="dark"] .live-dot.pulse {
    animation: livePulseDark 2s ease-in-out infinite;
}

@keyframes livePulseDark {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
    }
}

/* Mobile - hide tooltip, tap opens panel */
@media (max-width: 768px) {
    .live-indicator {
        justify-content: center;
    }
    
    .live-tooltip {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVIDENCE STRUCTURE BAR
   ═══════════════════════════════════════════════════════════════════════════ */

.evidence-structure {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.structure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.structure-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.structure-total {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.structure-bar {
    display: flex;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 12px;
}

.structure-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.structure-fill.open {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.structure-fill.closed {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.structure-labels {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.structure-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.structure-label strong {
    color: var(--text-primary);
}

.label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.label-dot.open {
    background: #10b981;
}

.label-dot.closed {
    background: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVIDENCE STAGE INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */

.evidence-stage {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.stage-icon {
    font-size: 1rem;
}

.stage-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.stage-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent);
}

.stage-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* Stage colors */
.evidence-stage[data-stage="exploratory"] .stage-value { color: #8b5cf6; }
.evidence-stage[data-stage="emerging"] .stage-value { color: #06b6d4; }
.evidence-stage[data-stage="consolidating"] .stage-value { color: #10b981; }
.evidence-stage[data-stage="mature"] .stage-value { color: #f59e0b; }
.evidence-stage[data-stage="saturated"] .stage-value { color: #ef4444; }

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE NUMBERING
   ═══════════════════════════════════════════════════════════════════════════ */

.article-card {
    position: relative;
}

.article-number {
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.6;
}

.corpus-list {
    counter-reset: article-counter;
}

.article-card::before {
    counter-increment: article-counter;
    content: "#" counter(article-counter);
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.5;
}

/* Adjust article content to make room for number */
.article-card .article-content {
    margin-left: 32px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACQUISITION SIDEBAR REDESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

.corpus-ready-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(34, 211, 238, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
}

.corpus-ready-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.corpus-ready-info {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.corpus-ready-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.corpus-ready-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.corpus-ready-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.export-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.export-buttons .btn {
    flex: 1;
}

.export-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.export-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.source-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: help;
}

.coming-soon-section {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 8px;
}

.coming-soon-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.coming-soon-list li {
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: 4px 0;
}

.notify-btn {
    border: 1px dashed var(--border);
}

.notify-btn:hover {
    border-style: solid;
    background: var(--bg-hover);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER COUNTS IN CHIPS
   ═══════════════════════════════════════════════════════════════════════════ */

.filter-chip span {
    font-weight: 500;
}

/* Mobile responsive for structure bar */
@media (max-width: 640px) {
    .structure-labels {
        flex-direction: column;
        gap: 8px;
    }
    
    .evidence-stage {
        flex-wrap: wrap;
    }
    
    .stage-desc {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ETAPA 1: LANDING MINIMAL — ABOVE THE FOLD (ZERO SCROLL)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Phase 1 — fit viewport */
/* Phase 1 — fit viewport */
#phase1 {
    min-height: calc(100vh - 70px); /* Só header, sem stepper */
    display: flex;
    align-items: center;
}

#phase1 .phase-content {
    width: 100%;
}

.search-phase-minimal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    gap: 12px;
}

/* Esconder stepper na landing */
body.landing-mode .stepper {
    display: none;
}

/* Hero editorial compact */
.hero-minimal {
    text-align: center;
    margin-bottom: 0.75rem;
}

.hero-minimal .hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.hero-minimal .hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent);
    margin-top: 0.25rem;
}

/* Search container compact */
.search-phase-minimal .search-container {
    margin-top: 0;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH RING — ANEL PULSANTE (COMPACTO)
   ═══════════════════════════════════════════════════════════════════════════ */

.search-ring {
    position: relative;
    padding: 0.25rem;
}

.search-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 60px;
    animation: ringPulse 3s ease-in-out infinite;
}

.search-ring::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 56px;
    animation: ringPulse 3s ease-in-out infinite 0.5s;
}

@keyframes ringPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.6;
        border-color: rgba(16, 185, 129, 0.2);
    }
    50% { 
        transform: scale(1.02); 
        opacity: 1;
        border-color: rgba(16, 185, 129, 0.4);
    }
}

.search-ring .search-box {
    position: relative;
    z-index: 1;
    background: var(--bg-primary);
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   VALUE PILLS — COMPACT HORIZONTAL
   ═══════════════════════════════════════════════════════════════════════════ */

.value-section-compact {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s both;
    position: relative;
    z-index: 10;
}

.value-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: help;
    transition: all 0.2s ease;
}

.value-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.value-pill-icon {
    font-size: 0.875rem;
}

.value-pill-icon-svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

.value-pill-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Value pill tooltip */
.value-pill[data-tooltip] {
    position: relative;
}

.value-pill[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    white-space: normal;
    max-width: 240px;
    min-width: 180px;
    text-align: center;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.value-pill[data-tooltip]::before {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--border);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.value-pill[data-tooltip]:hover::after,
.value-pill[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   TRUST LINE — COMPACT
   ═══════════════════════════════════════════════════════════════════════════ */

.trust-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.6875rem;
    color: var(--text-muted);
    animation: fadeInUp 0.6s ease 0.5s both;
}

.trust-dot {
    opacity: 0.4;
}

/* Live indicator mais compacto */
.search-phase-minimal .live-indicator {
    margin-top: 4px;
    padding: 6px 12px;
}

.search-phase-minimal .live-text {
    font-size: 0.6875rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MINI STATS INLINE (replaces Evidence Structure bar)
   ═══════════════════════════════════════════════════════════════════════════ */

.corpus-mini-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-stat-divider {
    color: var(--text-muted);
}

.mini-checking-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FSS FAB (Floating Action Button)
   ═══════════════════════════════════════════════════════════════════════════ */

.fss-fab {
    position: fixed;
    bottom: 100px;
    left: 24px;
    width: 56px;
    height: 56px;
    background: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    z-index: 90;
}

.fss-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.fss-fab-icon {
    font-size: 1.5rem;
}

.fss-fab-pulse {
    position: absolute;
    inset: -4px;
    border: 2px solid var(--orange);
    border-radius: 50%;
    animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FSS POPUP
   ═══════════════════════════════════════════════════════════════════════════ */

.fss-popup {
    position: fixed;
    bottom: 170px;
    left: 24px;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 91;
    animation: popupSlideIn 0.3s ease;
}

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

.fss-popup-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.fss-popup-icon {
    font-size: 1.5rem;
}

.fss-popup-title {
    flex: 1;
}

.fss-popup-title strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.fss-popup-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.fss-popup-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.fss-popup-close:hover {
    color: var(--text-primary);
}

.fss-popup-body {
    padding: 16px;
}

.fss-popup-reason {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.fss-popup .fss-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fss-popup-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-tertiary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.fss-popup-actions .btn {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SUMMARY HINT (positive framing)
   ═══════════════════════════════════════════════════════════════════════════ */

.summary-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--accent);
    padding: 8px 16px;
    background: var(--accent-bg);
    border-radius: var(--radius-md);
    margin: 12px 16px 0;
}

/* Hide old viability badges */
.summary-viability {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   META-ANALYSIS FEASIBILITY CARD (Compact)
   ═══════════════════════════════════════════════════════════════════════════ */

.ma-feasibility-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-bottom: 12px;
}

.ma-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ma-card-icon {
    font-size: 1rem;
}

.ma-card-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    flex: 1;
}

.ma-card-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.ma-card-status.feasible {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.ma-card-status.possible {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
}

.ma-card-status.limited {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.ma-card-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.ma-card-stat {
    flex: 1;
    text-align: center;
}

.ma-card-stat.muted {
    opacity: 0.5;
}

.ma-card-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ma-card-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.ma-card-issue {
    font-size: 0.75rem;
    color: var(--orange);
    padding: 6px 10px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.ma-card-hint {
    font-size: 0.75rem;
    color: var(--accent);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   META-ANALYSIS ELIGIBILITY SCORE (MES) BADGES
   ═══════════════════════════════════════════════════════════════════════════ */

.mes-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: help;
}

.mes-badge.mes-high {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.mes-badge.mes-moderate {
    background: rgba(245, 158, 11, 0.15);
    color: var(--orange);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.mes-badge.mes-low {
    background: rgba(239, 68, 68, 0.1);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.mes-badge.mes-very-low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CORPUS META-ANALYSIS ANALYSIS CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.corpus-ma-analysis {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 16px;
}

.corpus-ma-analysis h4 {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.ma-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.ma-stat {
    text-align: center;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.ma-stat.highlight {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ma-stat.muted {
    opacity: 0.6;
}

.ma-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ma-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.ma-issues {
    margin-bottom: 12px;
}

.ma-issue {
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.ma-issue.severity-high {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--error);
    color: var(--error);
}

.ma-issue.severity-medium {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--orange);
    color: var(--orange);
}

.ma-recommendation {
    background: var(--accent-bg);
    border-radius: var(--radius-md);
    padding: 12px;
}

.ma-rec {
    font-size: 0.85rem;
}

.ma-rec strong {
    color: var(--text-primary);
}

.ma-rec-action {
    display: block;
    font-size: 0.75rem;
    color: var(--accent);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PICO INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */

.pico-indicator {
    display: inline-flex;
    gap: 2px;
    margin-left: 8px;
}

.pico-letter {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.pico-letter.detected {
    background: var(--accent-bg);
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HIDE OLD EVIDENCE STRUCTURE BAR
   ═══════════════════════════════════════════════════════════════════════════ */

.evidence-structure {
    display: none !important;
}

.wt-header-live {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wt-header-live:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.wt-header-live:hover .wt-header-icon-svg {
    color: var(--accent);
}

.wt-header-icon {
    font-size: 0.875rem;
}

.wt-header-icon-svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER ICON BUTTONS — MODERN SVG STYLE (COMPACT)
   ═══════════════════════════════════════════════════════════════════════════ */

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-icon-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.header-icon-btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   THEME TOGGLE PILL — MODERN SWITCH
   ═══════════════════════════════════════════════════════════════════════════ */

.theme-toggle-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-pill:hover {
    border-color: var(--accent);
}

.theme-toggle-track {
    position: relative;
    width: 28px;
    height: 16px;
    background: var(--border);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

/* Light mode */
.theme-toggle-pill .theme-icon-sun {
    color: var(--accent);
}

.theme-toggle-pill .theme-icon-moon {
    color: var(--text-muted);
}

/* Dark mode */
[data-theme="dark"] .theme-toggle-track {
    background: var(--accent);
}

[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(12px);
}

[data-theme="dark"] .theme-toggle-pill .theme-icon-sun {
    color: var(--text-muted);
}

[data-theme="dark"] .theme-toggle-pill .theme-icon-moon {
    color: var(--accent);
}

/* Hide old theme toggle */
.theme-toggle:not(.theme-toggle-pill) {
    display: none;
}

.wt-header-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.wt-header-total {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 24px;
}

.wt-header-delta {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #10b981;
    animation: deltaFlash 2s ease infinite;
}

@keyframes deltaFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPINNER RING — SEARCH BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */

.spinner-ring {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   ETAPA 3: PROGRESS VISUAL — SEARCH PROGRESS
   ═══════════════════════════════════════════════════════════════════════════ */

.search-progress-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.search-progress-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px 48px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    width: 90%;
}

.search-progress-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.search-progress-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.search-progress-status {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    min-height: 20px;
}

.search-progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 16px;
}

.search-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #34d399);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    animation: progressShine 2s ease infinite;
}

@keyframes progressShine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.search-progress-fill {
    background-size: 200% 100%;
    background-image: linear-gradient(
        90deg,
        var(--accent) 0%,
        #34d399 50%,
        var(--accent) 100%
    );
}

.search-progress-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.search-progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.search-progress-step.active {
    color: var(--text-primary);
    font-weight: 500;
}

.search-progress-step.done {
    color: #10b981;
}

.search-progress-step .step-icon {
    width: 18px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ETAPA 4: EVIDENCE SUMMARY CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.evidence-summary-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    animation: summarySlideIn 0.5s ease;
}

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

.summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.summary-icon {
    font-size: 1.25rem;
}

.summary-title {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.summary-stage {
    margin-left: auto;
    padding: 4px 12px;
    background: var(--accent);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.summary-stage[data-stage="exploratory"] { background: #8b5cf6; }
.summary-stage[data-stage="emerging"] { background: #06b6d4; }
.summary-stage[data-stage="consolidating"] { background: #10b981; }
.summary-stage[data-stage="mature"] { background: #f59e0b; }
.summary-stage[data-stage="saturated"] { background: #ef4444; }

.summary-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.summary-metric {
    text-align: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
}

.summary-metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.summary-metric-value.animating {
    animation: countUp 0.5s ease;
}

@keyframes countUp {
    from { transform: scale(0.8); opacity: 0.5; }
    to { transform: scale(1); opacity: 1; }
}

.summary-metric-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.summary-viability {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.viability-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.viability-badge.viable {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.viability-badge.viable .viability-icon::before {
    content: '✅';
}

.viability-badge.not-viable {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.viability-badge.not-viable .viability-icon::before {
    content: '❌';
}

.viability-badge.conditional {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.viability-badge.conditional .viability-icon::before {
    content: '⚠️';
}

.summary-actions {
    display: flex;
    justify-content: flex-end;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .summary-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .summary-viability {
        flex-direction: column;
    }
}

/* Evidence Summary - Analyzing State */
.evidence-summary-card.analyzing {
    background: var(--bg-tertiary);
    border-color: var(--border);
}

.summary-analyzing {
    padding: 20px;
    text-align: center;
}

.analyzing-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.analyzing-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.analyzing-badge {
    background: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
    animation: pulse 1.5s ease infinite;
}

/* Viability badges with icons */
.viability-badge .viability-icon {
    font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ETAPA 2: SIDEBAR GLOW — HAS DATA INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */

.sidebar-toggle.has-data {
    background: rgba(16, 185, 129, 0.1);
    animation: sidebarGlow 2s ease-in-out infinite;
}

.sidebar-toggle.has-data .sidebar-toggle-icon {
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes sidebarGlow {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3);
        background: rgba(16, 185, 129, 0.1);
    }
    50% { 
        box-shadow: 0 0 12px 4px rgba(16, 185, 129, 0.15);
        background: rgba(16, 185, 129, 0.15);
    }
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WTD NOTIFICATION — TERM DISCOVERY
   ═══════════════════════════════════════════════════════════════════════════ */

.wtd-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 380px;
    width: calc(100% - 40px);
    z-index: 1001;
    animation: wtdSlideIn 0.4s ease;
    overflow: hidden;
}

@keyframes wtdSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wtd-notification.hiding {
    animation: wtdSlideOut 0.3s ease forwards;
}

@keyframes wtdSlideOut {
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

.wtd-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    border-bottom: 1px solid var(--border);
}

.wtd-icon {
    font-size: 1.25rem;
}

.wtd-title {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.wtd-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.wtd-body {
    padding: 16px;
}

.wtd-term-original {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.wtd-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.wtd-warning-icon {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.wtd-warning-text {
    font-size: 0.75rem;
    color: #b45309;
    line-height: 1.4;
}

[data-theme="dark"] .wtd-warning-text {
    color: #fbbf24;
}

.wtd-discovery {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
}

.wtd-discovery-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.wtd-discovery-term {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.wtd-discovery-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.wtd-related {
    margin-bottom: 12px;
}

.wtd-related-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.wtd-related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wtd-related-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.wtd-confidence {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.wtd-confidence-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.wtd-confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: var(--radius-full);
}

.wtd-actions {
    display: flex;
    gap: 8px;
}

.wtd-actions .btn {
    flex: 1;
}

.wtd-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Mobile */
@media (max-width: 640px) {
    .wtd-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .wt-header-label {
        display: none;
    }
    
    /* Landing minimal mobile */
    .search-phase-minimal {
        min-height: calc(100vh - 80px);
        padding: 16px;
        gap: 20px;
    }
    
    .search-ring {
        padding: 12px;
        width: 100%;
    }
    
    .search-ring .search-box {
        flex-direction: column;
        gap: 8px;
        border-radius: var(--radius-lg);
    }
    
    .search-ring .search-btn {
        width: 100%;
        border-radius: var(--radius-md);
    }
    
    .value-section-compact {
        gap: 8px;
    }
    
    .value-pill {
        padding: 6px 12px;
    }
    
    .value-pill-text {
        font-size: 0.75rem;
    }
    
    .hero-minimal .hero-title {
        font-size: 1.375rem;
    }
    
    .hero-minimal .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Header Watchtower mobile */
    .wt-header-live {
        padding: 4px 8px;
    }
    
    .wt-header-total {
        font-size: 0.75rem;
    }
    
    .wt-header-delta {
        display: none;
    }
    
    /* Search progress mobile */
    .search-progress-card {
        padding: 24px;
    }
    
    .search-progress-icon {
        font-size: 2.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FSS PANEL — FAST SEMANTIC SIGNAL
   ═══════════════════════════════════════════════════════════════════════════ */

.fss-panel {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.fss-panel.fss-visible {
    opacity: 1;
    transform: translateY(0);
}

.fss-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(251, 191, 36, 0.1);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.fss-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.fss-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fss-title strong {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.fss-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.fss-count {
    font-weight: 600;
    color: #d97706;
}

.fss-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.fss-close:hover {
    opacity: 1;
}

.fss-body {
    padding: 16px;
}

.fss-reason {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.fss-suggestion {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px;
}

.fss-suggestion-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 10px 0;
}

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

.fss-term {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.fss-term:hover {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
}

.fss-term input {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
}

.fss-term input:checked + span {
    color: var(--accent);
    font-weight: 500;
}

.fss-actions {
    display: flex;
    gap: 12px;
    padding: 0 16px 16px;
}

.fss-actions .btn {
    flex: 1;
}

.fss-actions .btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #d97706;
}

.fss-actions .btn-primary:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.fss-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(251, 191, 36, 0.05);
    border-top: 1px solid rgba(251, 191, 36, 0.1);
}

.fss-details-link {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.fss-details-link:hover {
    color: var(--text-secondary);
}

.fss-note {
    font-size: 0.6875rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* FSS Modal */
.fss-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.fss-modal {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    box-shadow: var(--shadow-xl);
}

.fss-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.fss-modal .modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.fss-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.fss-modal .modal-body {
    padding: 20px;
}

.fss-details-content h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.fss-details-section {
    margin-bottom: 20px;
}

.fss-details-section h5 {
    margin: 0 0 8px 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.fss-details-section ul {
    margin: 0;
    padding-left: 20px;
}

.fss-details-section li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.fss-details-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.fss-details-note {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.fss-details-note strong {
    color: #10b981;
}

/* Dark theme adjustments */
[data-theme="dark"] .fss-panel {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
    border-color: rgba(251, 191, 36, 0.25);
}

[data-theme="dark"] .fss-header {
    background: rgba(251, 191, 36, 0.08);
}

[data-theme="dark"] .fss-count {
    color: #fbbf24;
}

[data-theme="dark"] .fss-actions .btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .fss-header {
        flex-wrap: wrap;
    }
    
    .fss-actions {
        flex-direction: column;
    }
    
    .fss-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .fss-terms {
        flex-direction: column;
    }
    
    .fss-term {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WATCHTOWER TERM EXPLORER
   ═══════════════════════════════════════════════════════════════════════════ */

.wt-explorer {
    padding: 12px;
}

.wt-explorer-input-wrap {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.wt-explorer-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wt-explorer-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.wt-explorer-input::placeholder {
    color: var(--text-muted);
}

.wt-explorer-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.wt-explorer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.wt-explorer-results {
    margin-top: 16px;
}

.wt-explorer-loading,
.wt-explorer-error {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.wt-explorer-error {
    color: #ef4444;
}

.wt-explorer-result {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.wt-explorer-result.wt-explorer-indexed {
    border-color: rgba(16, 185, 129, 0.3);
}

.wt-explorer-result.wt-explorer-emerging {
    border-color: rgba(251, 191, 36, 0.3);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), transparent);
}

.wt-explorer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.wt-explorer-term {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.wt-explorer-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.wt-explorer-indexed .wt-explorer-status {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.wt-explorer-emerging .wt-explorer-status {
    background: rgba(251, 191, 36, 0.15);
    color: #f59e0b;
}

.wt-explorer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.wt-explorer-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wt-explorer-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.wt-explorer-value {
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.wt-explorer-curve {
    margin-bottom: 16px;
}

.wt-explorer-bars {
    display: flex;
    gap: 8px;
    height: 60px;
    align-items: flex-end;
    margin-top: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.wt-explorer-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.wt-explorer-bar {
    width: 100%;
    max-width: 30px;
    background: linear-gradient(to top, #6366f1, #8b5cf6);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
}

.wt-explorer-bar-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.wt-explorer-related {
    margin-bottom: 16px;
}

.wt-explorer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.wt-explorer-tag {
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.wt-explorer-tag small {
    color: #10b981;
    margin-left: 4px;
}

.wt-explorer-insight {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
    border-radius: 10px;
    margin-bottom: 16px;
}

.wt-explorer-insight-icon {
    font-size: 1.25rem;
}

.wt-explorer-insight-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.wt-explorer-action {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.wt-explorer-action:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    color: #6366f1;
}

.wt-explorer-action-done {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    border-style: solid;
    color: #10b981;
    cursor: default;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .wt-explorer-grid {
        grid-template-columns: 1fr;
    }
    
    .wt-explorer-input-wrap {
        flex-direction: column;
    }
    
    .wt-explorer-bars {
        height: 50px;
    }
}

/* Badge Coming Soon */
.badge-coming {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    color: #6366f1;
    border-radius: 12px;
    vertical-align: middle;
}

[data-theme="dark"] .badge-coming {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.15));
    color: #818cf8;
}

/* Method anchor styling */
.method-anchor {
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.03));
    border-left: 3px solid #10b981;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
}

/* Chat Axis One Teaser */
.chat-axis-teaser {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
    border-radius: 8px;
    border: 1px dashed rgba(99, 102, 241, 0.2);
}

.chat-axis-badge {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 10px;
}

.chat-axis-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

[data-theme="dark"] .chat-axis-teaser {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    border-color: rgba(99, 102, 241, 0.3);
}
