/* ==========================================================================
   Research Reports — page-specific layout
   Uses shared tokens from main.css. No hard-coded palette hex that already
   exists as a token; rgba tints mirror the design-system badge patterns.
   ========================================================================== */

/* ---- Page hero ---- */
.rr-hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(32px, 5vw, 68px);
  align-items: center;
}
.rr-hero-copy .eyebrow { margin-bottom: var(--sp-5); }
.rr-hero-copy h1 { max-width: 16ch; }
.rr-hero-copy .lead { max-width: 640px; color: var(--text-1); }
.rr-hero-tags { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-6); }
.rr-hero-copy .hero-cta { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }

/* Floating illustrative report cover in hero */
.rr-hero-cover {
  position: relative;
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.rrc-spine {
  position: absolute; top: 0; bottom: 0; left: 0; width: 6px;
  background: var(--grad-brand);
}
.rr-hero-cover::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, rgba(59, 130, 246, 0.16), transparent 60%);
}
.rr-hero-cover > * { position: relative; z-index: 1; }
.rrc-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.rrc-kicker { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-bright); }
.rrc-title { font-size: 1.75rem; letter-spacing: -0.02em; margin-top: var(--sp-2); }
.rrc-sub { color: var(--text-2); font-size: 0.9rem; line-height: 1.6; }
.rrc-chart { border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-faint); background: var(--bg-inset); }
.rrc-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2);
  padding-top: var(--sp-4); border-top: 1px solid var(--line);
}
.rrc-meta > div { display: flex; flex-direction: column; gap: 3px; }
.rrc-k { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.rrc-v { font-size: 0.9rem; color: var(--text-0); }
.rrc-foot { display: flex; align-items: center; gap: 10px; font-size: 0.72rem; color: var(--text-3); }
.rrc-logo {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  border-radius: 8px; font-family: var(--font-display); font-weight: 700; font-size: 0.7rem;
  color: var(--bg-0); background: var(--grad-gold);
}

/* Hero quick stats */
.rr-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--line);
}
.rr-hstat .num { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 700; color: var(--text-0); letter-spacing: -0.02em; }
.rr-hstat .num .suffix { color: var(--blue-bright); }
.rr-hstat .lbl { color: var(--text-3); font-size: 0.82rem; margin-top: 4px; max-width: 24ch; }

/* ---- Report categories ---- */
.cat-grid { align-items: stretch; }
.cat-card { display: flex; flex-direction: column; gap: var(--sp-3); position: relative; overflow: hidden; }
.cat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--emerald); opacity: 0.85;
}
.cat-sector::before { background: var(--blue); }
.cat-thematic::before { background: var(--gold); }
.cat-ipo::before { background: var(--emerald-bright); }
.cat-technical::before { background: var(--blue-bright); }
.cat-macro::before { background: var(--gold-deep); }
.cat-card h3 { font-size: var(--fs-h4); }
.cat-card p { color: var(--text-2); font-size: var(--fs-sm); flex: 1; line-height: 1.65; }
.cat-fact {
  align-self: flex-start; margin-top: var(--sp-2);
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-2);
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--glass-2); border: 1px solid var(--glass-border);
}

/* ---- Featured report ---- */
.fr-card { padding: 0; overflow: hidden; }
.fr-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; }

/* Cover panel */
.fr-cover {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: clamp(24px, 3vw, 40px);
  background:
    radial-gradient(90% 70% at 10% 0%, rgba(16, 185, 129, 0.16), transparent 55%),
    linear-gradient(160deg, var(--bg-3), var(--bg-inset));
  border-right: 1px solid var(--line);
}
.fr-cover-glow {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  right: -90px; bottom: -90px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.28), transparent 70%);
  filter: blur(20px);
}
.fr-cover > * { position: relative; z-index: 1; }
.fr-cat {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--emerald-bright);
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--up-soft); border: 1px solid transparent;
}
.fr-cover-mark {
  display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 14px; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
  color: var(--bg-0); background: var(--grad-gold);
  box-shadow: var(--glow-gold);
}
.fr-cover-title h3 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); line-height: 1.02; letter-spacing: -0.03em; }
.fr-cover-title p { color: var(--text-2); font-size: 0.86rem; margin-top: var(--sp-2); font-family: var(--font-mono); }
.fr-cover-spark { margin-top: auto; border-radius: var(--r-sm); overflow: hidden; opacity: 0.9; }
.fr-cover-foot {
  display: flex; justify-content: space-between;
  font-size: 0.74rem; color: var(--text-3);
  padding-top: var(--sp-3); border-top: 1px solid var(--line-faint);
}

/* Body panel */
.fr-body { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: var(--sp-5); }
.fr-rating { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.fr-rate-chip {
  display: flex; flex-direction: column; gap: 5px;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--bg-inset); border: 1px solid var(--line-faint);
}
.frr-label { font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }
.frr-value { font-size: 1rem; font-weight: 600; color: var(--text-0); }
.fr-sub { font-size: 0.95rem; color: var(--text-0); }
.fr-bullets { display: flex; flex-direction: column; gap: var(--sp-3); }
.fr-bullets li { display: flex; gap: 12px; color: var(--text-2); font-size: 0.9rem; line-height: 1.6; }
.fr-bullets li svg { width: 19px; height: 19px; color: var(--emerald-bright); flex: none; margin-top: 2px; }
.fr-bullets strong { color: var(--text-0); }

.fr-risk {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid rgba(245, 184, 61, 0.3);
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(245, 184, 61, 0.09), transparent 60%),
    var(--glass);
}
.fr-risk-ico {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 11px;
  color: var(--gold-bright); background: rgba(245, 184, 61, 0.12);
  border: 1px solid rgba(245, 184, 61, 0.3);
}
.fr-risk-ico svg { width: 20px; height: 20px; }
.fr-risk p { color: var(--text-2); font-size: 0.82rem; line-height: 1.65; }
.fr-risk strong { color: var(--text-0); }

.fr-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-2); }
.fr-byline { font-size: 0.82rem; color: var(--text-3); margin-left: auto; }
.fr-byline strong { color: var(--text-1); }

/* ---- Report library ---- */
.lib-filters { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-8); }
.lib-grid { align-items: stretch; }
.rep-card .post-thumb { aspect-ratio: 16 / 10; }
.rep-card .post-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(4, 6, 15, 0.5));
}
.rep-card .thumb-art::before {
  content: ''; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 26px),
    radial-gradient(70% 90% at 80% 10%, rgba(255,255,255,0.08), transparent 60%);
}
.rep-badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.68rem;
  padding: 4px 9px; border-radius: var(--r-pill);
  color: var(--text-0); background: rgba(4, 6, 15, 0.55);
  border: 1px solid var(--glass-border); backdrop-filter: blur(6px);
}
.rep-analyst { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-3); }
.lib-note { text-align: center; font-size: 0.82rem; margin-top: var(--sp-10); max-width: 70ch; margin-inline: auto; }

/* ---- Methodology ---- */
.method-steps { margin-top: var(--sp-2); }
.qc-panel { padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); }
.qc-row { display: flex; gap: var(--sp-4); align-items: flex-start; }
.qc-ico {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 11px;
  color: var(--emerald-bright); background: var(--up-soft);
  border: 1px solid var(--glass-border);
}
.qc-ico svg { width: 20px; height: 20px; }
.qc-row h4 { font-size: 0.95rem; color: var(--text-0); margin-bottom: 3px; }
.qc-row p { font-size: 0.85rem; color: var(--text-2); line-height: 1.6; }

/* ---- Coverage universe ---- */
.cov-stats { margin-bottom: var(--sp-8); }
.cov-grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--sp-6);
  align-items: stretch;
}
.cov-panel { display: flex; flex-direction: column; gap: var(--sp-3); }
.cov-panel h4 { font-size: var(--fs-h4); }
.cov-panel-sub { font-size: 0.85rem; }
.cov-donut { display: flex; align-items: center; gap: var(--sp-6); margin-top: var(--sp-3); flex-wrap: wrap; }
.cov-legend { flex: 1; min-width: 160px; }
.cov-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.cov-tags .chip { cursor: default; font-size: 0.82rem; }

/* ---- Sample report anatomy ---- */
.anatomy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.doc-toc { display: flex; flex-direction: column; gap: var(--sp-4); list-style: none; }
.toc-row {
  display: flex; gap: var(--sp-5); align-items: flex-start;
  padding: var(--sp-5);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--glass);
  transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.toc-row:hover { border-color: var(--glass-hi); transform: translateX(4px); }
.toc-num { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; color: var(--emerald-bright); flex: none; }
.toc-body h4 { font-size: 1rem; color: var(--text-0); margin-bottom: 4px; }
.toc-body p { font-size: 0.86rem; color: var(--text-2); line-height: 1.6; }

/* Mock document preview */
.doc-preview {
  position: sticky; top: calc(var(--nav-h) + 24px);
  padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5);
  box-shadow: var(--shadow-lg);
}
.dp-head { display: flex; align-items: center; gap: var(--sp-3); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line); }
.dp-mark {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 11px; font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
  color: var(--bg-0); background: var(--grad-brand);
}
.dp-title { font-family: var(--font-display); font-weight: 700; color: var(--text-0); font-size: 1.05rem; }
.dp-sub { font-size: 0.72rem; color: var(--text-3); }
.dp-head .badge { margin-left: auto; }
.dp-section { display: flex; flex-direction: column; gap: 8px; }
.dp-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-bright); }
.dp-line { display: block; height: 8px; border-radius: var(--r-pill); background: var(--glass-2); }
.dp-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.dp-metric {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px; border-radius: var(--r-sm);
  background: var(--bg-inset); border: 1px solid var(--line-faint);
}
.dpm-k { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.dpm-v { font-size: 0.9rem; color: var(--text-0); font-weight: 600; }
.dp-chart { border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-faint); background: var(--bg-inset); }
.dp-scenarios { display: flex; flex-direction: column; gap: 8px; }
.dp-scn { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: var(--sp-3); }
.dps-k { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-2); }
.dps-bar { display: block; height: 10px; border-radius: var(--r-pill); background: var(--glass-2); overflow: hidden; }
.dps-bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad-emerald); }
.dp-scn:first-child .dps-bar span { background: var(--down); opacity: 0.8; }
.dp-scn:nth-child(2) .dps-bar span { background: var(--grad-brand); }
.dp-foot { font-size: 0.68rem; color: var(--text-3); text-align: center; padding-top: var(--sp-3); border-top: 1px solid var(--line-faint); }

/* ---- Subscribe CTA ---- */
.sub-panel { position: relative; overflow: hidden; padding: clamp(28px, 4vw, 56px); }
.sub-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.sub-list { display: flex; flex-direction: column; gap: 12px; margin-top: var(--sp-6); }
.sub-list li { display: flex; align-items: center; gap: 12px; color: var(--text-1); font-size: 0.92rem; }
.sub-list svg { width: 18px; height: 18px; color: var(--emerald-bright); flex: none; }
.sub-card {
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--bg-inset); border: 1px solid var(--line);
}
.sub-card-head { text-align: center; margin-bottom: var(--sp-5); }
.sub-from { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.sub-price { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 6px 0 4px; }
.sub-amt { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--text-0); letter-spacing: -0.02em; }
.sub-per { color: var(--text-3); font-size: 0.9rem; }
.sub-news { margin-top: var(--sp-4); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .rr-hero-grid { grid-template-columns: 1fr; }
  .rr-hero-cover { max-width: 440px; }
  .fr-grid { grid-template-columns: 1fr; }
  .fr-cover { border-right: 0; border-bottom: 1px solid var(--line); }
  .cov-grid { grid-template-columns: 1fr; }
  .method-layout { gap: 40px !important; }
  .anatomy-grid { grid-template-columns: 1fr; }
  .doc-preview { position: static; max-width: 520px; }
  .sub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .rr-hero-stats { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
  .fr-rating { grid-template-columns: 1fr; }
  .fr-body { gap: var(--sp-4); }
  .fr-actions { flex-direction: column; align-items: stretch; }
  .fr-byline { margin-left: 0; text-align: center; margin-top: var(--sp-2); }
  .dp-metrics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  .rr-hero-stats { grid-template-columns: 1fr; }
  .rrc-meta { grid-template-columns: 1fr 1fr; }
}
