/* ===== Research — Light Theme ===== */
.nav-link.active { color: var(--text-primary); }
.nav-link.active::after { width: 100%; }

.report-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.report-sidebar { position: sticky; top: var(--nav-height); height: calc(100vh - var(--nav-height)); overflow-y: auto; background: var(--bg-secondary); border-right: 1px solid var(--border-primary); padding: 28px 18px; display: flex; flex-direction: column; }
.sidebar-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-primary); }
.sidebar-badge { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-blue); display: block; margin-bottom: 6px; }
.sidebar-project { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.sidebar-date { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.sidebar-toc { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.toc-link { font-size: 12px; color: var(--text-muted); padding: 7px 10px; border-radius: var(--radius-sm); border-left: 2px solid transparent; transition: all 0.2s; font-family: var(--font-mono); }
.toc-link:hover { color: var(--text-secondary); background: var(--bg-tertiary); }
.toc-link.active { color: var(--accent-blue); background: rgba(37,99,235,0.06); border-left-color: var(--accent-blue); }
.sidebar-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-primary); display: flex; flex-direction: column; gap: 8px; }

.report-main { padding: 0 48px 80px; max-width: 840px; }
.report-hero { padding: 40px 0 36px; border-bottom: 1px solid var(--border-primary); margin-bottom: 40px; }
.report-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.meta-tag { font-family: var(--font-mono); font-size: 11px; padding: 3px 10px; border-radius: 4px; background: var(--bg-secondary); color: var(--text-tertiary); }
.meta-tag strong { color: var(--text-primary); }
.meta-tag.green { background: #dcfce7; color: #166534; }
.meta-tag.red { background: #fee2e2; color: #991b1b; }
.report-title { font-size: 28px; font-weight: 800; letter-spacing: -1px; margin-bottom: 6px; line-height: 1.2; }
.report-tagline { font-size: 15px; color: var(--text-muted); font-style: italic; margin-bottom: 12px; }
.report-meta-row { display: flex; gap: 8px; font-size: 13px; color: var(--text-muted); }

.report-section { margin-bottom: 44px; scroll-margin-top: calc(var(--nav-height) + 20px); }
.section-num { font-family: var(--font-mono); font-size: 12px; color: var(--accent-blue); font-weight: 600; margin-bottom: 6px; opacity: 0.6; }
.rs-title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border-primary); }
.rs-subtitle { font-size: 15px; font-weight: 700; margin: 20px 0 10px; color: var(--text-secondary); }
.rs-content p { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 14px; }
.rs-list { padding-left: 20px; margin-bottom: 14px; }
.rs-list li { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 6px; }

.callout { padding: 18px 22px; border-radius: var(--radius-md); margin: 16px 0; border-left: 3px solid; }
.callout.positive { background: #f0fdf4; border-left-color: var(--accent-green); }
.callout.neutral { background: #eff6ff; border-left-color: var(--accent-blue); }
.callout.negative { background: #fef2f2; border-left-color: var(--accent-red); }
.callout-header { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.callout p { font-size: 14px !important; margin-bottom: 0 !important; }

.key-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
.km-item { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.km-value { display: block; font-size: 22px; font-weight: 800; font-family: var(--font-mono); line-height: 1; margin-bottom: 4px; }
.km-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.timeline { margin: 14px 0; padding-left: 18px; border-left: 2px solid var(--border-secondary); }
.timeline-item { padding: 10px 0 10px 18px; position: relative; }
.timeline-item::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); position: absolute; left: -22px; top: 14px; }
.timeline-item.highlight::before { background: var(--accent-blue); box-shadow: 0 0 6px rgba(37,99,235,0.3); }
.tl-date { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 2px; }
.tl-text { font-size: 14px; color: var(--text-secondary); }

.team-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.team-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--bg-secondary); border-radius: var(--radius-md); }
.team-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--gradient-primary); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: white; flex-shrink: 0; }
.team-card strong { font-size: 14px; }
.team-bio { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

.score-inline { display: flex; align-items: center; gap: 12px; margin: 16px 0; padding: 12px 16px; background: var(--bg-secondary); border-radius: var(--radius-sm); }
.si-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.si-bar { flex: 1; height: 4px; background: var(--border-primary); border-radius: 100px; overflow: hidden; }
.si-fill { display: block; height: 100%; border-radius: 100px; }
.si-value { font-family: var(--font-mono); font-size: 14px; font-weight: 700; white-space: nowrap; }

.tech-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tech-tag { font-family: var(--font-mono); font-size: 12px; padding: 3px 10px; border-radius: 4px; background: #eff6ff; color: var(--accent-blue); }

.market-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.ms-item { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 18px; text-align: center; }
.ms-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.ms-value { font-size: 24px; font-weight: 800; font-family: var(--font-mono); display: block; line-height: 1.2; }
.ms-desc { font-size: 11px; color: var(--text-muted); display: block; margin-top: 4px; }

.comp-table { margin: 14px 0; background: var(--bg-card); border: 1px solid var(--border-primary); border-radius: var(--radius-md); overflow: hidden; }
.comp-header, .comp-row { display: grid; grid-template-columns: 1.2fr 0.8fr 1fr 1fr 1fr; padding: 10px 16px; }
.comp-header { background: var(--bg-secondary); border-bottom: 1px solid var(--border-primary); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); }
.comp-row { font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid var(--border-primary); }
.comp-row:last-child { border-bottom: none; }
.comp-row.highlight-row { background: #eff6ff; }

.risk-matrix { display: flex; flex-direction: column; gap: 8px; }
.risk-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: var(--bg-secondary); border-radius: var(--radius-md); }
.risk-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 10px; border-radius: 4px; flex-shrink: 0; margin-top: 2px; }
.risk-badge.high { background: #fee2e2; color: #991b1b; }
.risk-badge.medium { background: #fef3c7; color: #92400e; }
.risk-badge.low { background: #dbeafe; color: #1e40af; }
.risk-row strong { display: block; font-size: 14px; margin-bottom: 4px; }
.risk-row p { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0; }

.recommendation-box { background: var(--bg-secondary); border-radius: var(--radius-lg); padding: 32px; text-align: center; margin-bottom: 20px; }
.rec-stars { font-size: 28px; display: block; margin-bottom: 6px; }
.rec-label { font-size: 16px; font-weight: 700; color: var(--accent-green); }

.report-footer { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border-primary); }
.rf-disclaimer { font-size: 12px; color: var(--text-muted); line-height: 1.6; padding: 14px; background: var(--bg-secondary); border-radius: var(--radius-sm); margin-bottom: 12px; }
.rf-meta { display: flex; gap: 24px; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* Papers */
.papers-grid { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.paper-card { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 20px; transition: background 0.2s; }
.paper-card:hover { background: var(--bg-tertiary); }
.paper-source { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.paper-venue { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.paper-type { font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
.paper-type.foundational { background: #dbeafe; color: #1e40af; }
.paper-type.applied { background: #ede9fe; color: #5b21b6; }
.paper-type.frontier { background: #dcfce7; color: #166534; }
.paper-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; line-height: 1.4; }
.paper-authors { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; font-style: italic; }
.paper-abstract { font-size: 13px; color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; }
.paper-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.paper-citations { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.paper-link { font-family: var(--font-mono); font-size: 11px; color: var(--accent-blue); }
.paper-relevance { background: rgba(37,99,235,0.04); border-radius: var(--radius-sm); padding: 10px 14px; }
.relevance-label { display: block; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent-blue); margin-bottom: 3px; font-weight: 600; }
.relevance-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

@media (max-width: 900px) {
    .report-layout { grid-template-columns: 1fr; }
    .report-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border-primary); }
    .sidebar-toc { flex-direction: row; overflow-x: auto; gap: 4px; }
    .toc-link { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
    .toc-link.active { border-left: none; border-bottom-color: var(--accent-blue); }
    .report-main { padding: 0 24px 60px; }
    .key-metrics { grid-template-columns: repeat(2, 1fr); }
    .market-sizes { grid-template-columns: 1fr; }
    .rf-meta { flex-direction: column; gap: 4px; }
}
