/* ════════════════════════════════════════════════════════════════════
 * RESEARCH REPORT TEMPLATE - data-dense owned media
 * Reuses tokens.css + homepage.css + guide.css. Light editorial + charts.
 * ════════════════════════════════════════════════════════════════════ */

/* ── Report hero ── */
.rr-hero{ background:var(--bg); padding-block:var(--space-12) var(--space-8); border-bottom:1px solid var(--border-subtle); }
.rr-hero-inner{ max-width:820px; margin-inline:auto; }
.rr-eyebrow{ display:inline-flex; align-items:center; gap:var(--space-2); font-size:var(--text-caption); font-weight:var(--weight-semibold); letter-spacing:var(--tracking-wide); text-transform:uppercase; color:var(--brand-purple); margin-bottom:var(--space-4); }
.rr-eyebrow .sep{ color:var(--border-default); }
.rr-h1{ font-size:clamp(34px,5vw,52px); letter-spacing:var(--tracking-tight); line-height:1.08; margin-bottom:var(--space-5); text-wrap:balance; }
.rr-sub{ font-size:var(--text-body-lg); color:var(--text-secondary); line-height:var(--leading-relaxed); margin-bottom:var(--space-6); }
.rr-byline{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-3); font-size:var(--text-body-sm); color:var(--text-secondary); margin-bottom:var(--space-5); }
.rr-byline .av{ width:32px; height:32px; border-radius:var(--radius-full); background:linear-gradient(135deg,#8B5CF6,#3B82F6); color:#fff; display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:var(--weight-bold); font-size:13px; flex:none; }
.rr-byline .dot{ color:var(--border-default); }
.rr-byline .dl{ display:inline-flex; align-items:center; gap:var(--space-1); color:var(--brand-blue); font-weight:var(--weight-semibold); text-decoration:none; }
.rr-byline .dl:hover{ color:var(--brand-blue-hover); }
.rr-method-note{ font-size:var(--text-caption); color:var(--text-tertiary); font-style:italic; background:var(--bg-subtle); border:1px solid var(--border-subtle); border-radius:var(--radius-md); padding:var(--space-3) var(--space-4); }

/* ── TL;DR callout ── */
.tldr{ background:var(--bg-subtle); }
.tldr-card{ max-width:820px; margin-inline:auto; background:var(--bg-card); border:1px solid var(--border-subtle); border-left:4px solid var(--brand-purple); border-radius:var(--radius-lg); padding:var(--space-8); box-shadow:var(--shadow-sm); }
.tldr-card h2{ font-size:var(--text-h3); letter-spacing:var(--tracking-tight); margin-bottom:var(--space-5); }
.tldr-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:var(--space-4); }
.tldr-list li{ display:flex; gap:var(--space-3); font-size:var(--text-body); color:var(--text-secondary); line-height:var(--leading-snug); }
.tldr-list li::before{ content:''; flex:none; width:10px; height:10px; border-radius:var(--radius-full); background:var(--brand-gradient); margin-top:7px; }
.tldr-list li strong{ color:var(--text-primary); font-weight:var(--weight-semibold); }

/* ── Report prose ── */
.rr-body{ max-width:820px; margin-inline:auto; }
.rr-body h2{ font-size:clamp(26px,3.4vw,32px); letter-spacing:-0.015em; line-height:var(--leading-snug); margin:0 0 var(--space-4); }
.rr-body .lede{ font-size:var(--text-body-lg); color:var(--text-secondary); line-height:var(--leading-relaxed); margin-bottom:var(--space-6); }
.rr-body p{ font-size:18px; line-height:1.7; color:var(--text-secondary); margin-bottom:var(--space-5); }
.rr-body p strong{ color:var(--text-primary); font-weight:var(--weight-semibold); }
.rr-body ul.plain{ font-size:18px; line-height:1.7; color:var(--text-secondary); margin:0 0 var(--space-5); padding-left:var(--space-6); }
@media (max-width:560px){ .rr-body p, .rr-body ul.plain{ font-size:16px; } }
.rr-analysis{ background:var(--brand-purple-light); border-radius:var(--radius-md); padding:var(--space-5) var(--space-6); margin-top:var(--space-6); }
.rr-analysis .lbl{ font-size:var(--text-caption); font-weight:var(--weight-bold); letter-spacing:var(--tracking-wide); text-transform:uppercase; color:var(--brand-purple-hover); margin-bottom:var(--space-2); }
.rr-analysis p{ margin:0; font-size:var(--text-body); color:var(--text-primary); line-height:var(--leading-relaxed); }

/* ── Figures / charts ── */
.fig{ margin:var(--space-8) 0; }
.fig-card{ background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-lg); padding:var(--space-6); }
.fig-title{ font-size:var(--text-caption); font-weight:var(--weight-semibold); letter-spacing:var(--tracking-wide); text-transform:uppercase; color:var(--text-tertiary); margin-bottom:var(--space-5); }
.fig figcaption{ font-size:var(--text-caption); color:var(--text-tertiary); font-style:italic; margin-top:var(--space-4); text-align:center; }

/* vertical bars */
.barchart{ display:flex; align-items:flex-end; gap:var(--space-3); height:220px; }
.bc-col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:var(--space-2); height:100%; justify-content:flex-end; min-width:0; }
.bc-bar{ width:100%; max-width:72px; background:var(--brand-gradient); border-radius:var(--radius-sm) var(--radius-sm) 0 0; }
.bc-val{ font-family:var(--font-mono); font-size:var(--text-body-sm); font-weight:var(--weight-bold); color:var(--text-primary); }
.bc-cap{ font-family:var(--font-mono); font-size:10px; color:var(--text-tertiary); text-align:center; line-height:1.3; }

/* horizontal bars (niche) */
.hbars{ display:flex; flex-direction:column; gap:var(--space-3); }
.hbar-row{ display:grid; grid-template-columns:120px 1fr auto; align-items:center; gap:var(--space-3); }
@media (max-width:560px){ .hbar-row{ grid-template-columns:90px 1fr auto; } }
.hbar-label{ font-size:var(--text-body-sm); color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hbar-track{ height:18px; background:var(--bg-subtle); border-radius:var(--radius-full); overflow:hidden; }
.hbar-fill{ height:100%; background:var(--brand-gradient); border-radius:var(--radius-full); }
.hbar-val{ font-family:var(--font-mono); font-size:var(--text-body-sm); font-weight:var(--weight-bold); color:var(--text-primary); white-space:nowrap; }

/* donut + legend */
.donut-row{ display:grid; grid-template-columns:1fr; gap:var(--space-6); align-items:center; }
@media (min-width:640px){ .donut-row{ grid-template-columns:auto 1fr; } }
.donut{ width:170px; height:170px; }
.donut-legend{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:var(--space-2); }
.donut-legend li{ display:flex; align-items:center; gap:var(--space-3); font-size:var(--text-body-sm); }
.donut-legend .sw{ width:12px; height:12px; border-radius:var(--radius-sm); flex:none; }
.donut-legend .lbl{ color:var(--text-secondary); flex:1; }
.donut-legend .amt{ font-family:var(--font-mono); font-weight:var(--weight-semibold); color:var(--text-primary); }

/* line/area chart */
.areachart{ width:100%; height:220px; display:block; }
.chart-legend{ display:flex; flex-wrap:wrap; gap:var(--space-5); margin-top:var(--space-3); font-size:var(--text-caption); color:var(--text-secondary); }
.chart-legend .lg{ display:inline-flex; align-items:center; gap:var(--space-2); }
.chart-legend .sw{ width:14px; height:3px; border-radius:2px; }

/* data table */
.rr-table-wrap{ overflow-x:auto; margin-top:var(--space-5); border:1px solid var(--border-subtle); border-radius:var(--radius-lg); }
.rr-table{ width:100%; border-collapse:collapse; min-width:440px; }
.rr-table th{ text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:var(--tracking-wide); color:var(--text-tertiary); font-weight:var(--weight-semibold); padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--border-subtle); background:var(--bg-subtle); white-space:nowrap; }
.rr-table td{ padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--border-subtle); font-size:var(--text-body-sm); color:var(--text-secondary); }
.rr-table tbody tr:last-child td{ border-bottom:0; }
.rr-table .mono{ font-family:var(--font-mono); color:var(--text-primary); }
.rr-table tbody tr:hover{ background:var(--bg-subtle); }

/* references */
.refs{ max-width:820px; margin-inline:auto; }
.refs ol{ padding-left:var(--space-6); margin:0; }
.refs li{ font-size:var(--text-body); color:var(--text-secondary); line-height:var(--leading-relaxed); margin-bottom:var(--space-3); }
.refs a{ color:var(--brand-blue); text-decoration:underline; text-underline-offset:2px; }
.refs a:hover{ color:var(--brand-blue-hover); }

/* dataset download */
.dataset{ background:var(--bg-subtle); }
.dataset-card{ max-width:720px; margin-inline:auto; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-xl); padding:var(--space-8); display:flex; flex-direction:column; gap:var(--space-5); align-items:flex-start; }
@media (min-width:600px){ .dataset-card{ flex-direction:row; align-items:center; justify-content:space-between; } }
.dataset-icon{ width:52px; height:52px; border-radius:var(--radius-md); background:var(--brand-purple-light); color:var(--brand-purple); display:inline-flex; align-items:center; justify-content:center; flex:none; }
.dataset-icon svg{ width:26px; height:26px; }
.dataset-info{ flex:1; }
.dataset-info h3{ font-size:var(--text-h4); margin-bottom:var(--space-1); }
.dataset-info p{ font-size:var(--text-body-sm); color:var(--text-secondary); margin:0; }
.dataset-info .lic{ font-size:var(--text-caption); color:var(--text-tertiary); margin-top:var(--space-2); }

/* research final CTA (dark) */
.rr-cta{ position:relative; background:var(--bg-dark); color:var(--text-on-dark); padding-block:var(--space-20); text-align:center; overflow:hidden; }
.rr-cta::before{ content:''; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:900px; height:440px; background:radial-gradient(ellipse, rgba(124,58,237,.22) 0%, transparent 70%); pointer-events:none; }
.rr-cta-inner{ position:relative; z-index:1; max-width:var(--container-prose); margin-inline:auto; }
.rr-cta h2{ color:var(--text-on-dark); font-size:var(--text-h2); letter-spacing:var(--tracking-tight); margin-bottom:var(--space-4); }
.rr-cta p{ color:var(--text-mid-dark); font-size:var(--text-body-lg); line-height:var(--leading-relaxed); margin-bottom:var(--space-8); }
