/* research-article.css
   Reusable stylesheet for study-based content articles (HR, IT, Finance).
   Visual language inherited from the homepage: Segoe UI, navy accent,
   off-white grounds. CSP-safe: no inline styles required in the markup.
   Prefix: ra- (research article). Load after styles.css. */

.ra-body {
  --bg: #ffffff;
  --bg-off: #fafaf9;
  --surface: #ffffff;
  --border: #e5e5e5;
  --text: #1a1a1a;
  --text-2: #4a4a4a;
  --text-3: #8a8a8a;
  --accent: #1e3a8a;
  --accent-hover: #152843;
  --accent-light: #eff6ff;
  --red: #dc2626;
  --green: #16a34a;
  --prose-w: 720px;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.ra-wrap { max-width: var(--prose-w); margin: 0 auto; padding: 0 24px; }
.ra-wrap-wide { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ---------- ARTICLE HEADER ---------- */
.ra-head {
  padding: 56px 0 8px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-off) 100%);
}
.ra-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}
.ra-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 18px;
  max-width: 15ch;
}
.ra-dek {
  font-size: 1.18rem;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 56ch;
}
.ra-meta {
  font-size: 0.85rem;
  color: var(--text-3);
  padding-bottom: 40px;
}
.ra-meta strong { color: var(--text-2); font-weight: 600; }

/* ---------- PROSE ---------- */
.ra-article { padding: 40px 0 8px; }
.ra-article h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 44px 0 14px;
  text-wrap: balance;
}
.ra-article h2:first-child { margin-top: 0; }
.ra-article p {
  font-size: 1.08rem;
  color: var(--text);
  margin: 0 0 20px;
}
.ra-article p.ra-lead-p { font-size: 1.14rem; }
.ra-article a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.ra-article a:hover { color: var(--accent-hover); }

/* inline source tag, e.g. (McKinsey, 2012) */
.ra-src {
  white-space: nowrap;
  font-size: 0.92em;
}

/* key findings / TL;DR summary (extractable for AI answer engines) */
.ra-tldr {
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 8px 0 32px;
}
.ra-tldr h2 {
  font-size: 0.8rem !important;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  margin: 0 0 14px !important;
  font-weight: 700;
}
.ra-tldr ul { margin: 0; padding: 0; list-style: none; }
.ra-tldr li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.5;
}
.ra-tldr li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}
.ra-tldr li strong { font-weight: 700; }

/* pull-stat inside prose */
.ra-pull {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
}
.ra-pull .ra-pull-num {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ra-pull .ra-pull-txt { color: var(--text-2); font-size: 1rem; }

/* ---------- STAT ROW ---------- */
.ra-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 36px 0;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ra-stat .num {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.ra-stat .lbl { font-size: 0.85rem; color: var(--text-2); line-height: 1.4; }
.ra-stat .src { font-size: 0.75rem; color: var(--text-3); margin-top: 6px; }

/* ---------- FIGURE / CHART ---------- */
.ra-figure {
  margin: 34px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 26px 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}
.ra-figure-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; margin: 0 0 4px; }
.ra-figure-note { font-size: 0.85rem; color: var(--text-2); margin: 0 0 18px; }
.ra-figure svg { width: 100%; height: auto; display: block; }
.ra-figcap {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ra-figcap a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* chart text */
.ra-lbl { font: 600 13px 'Segoe UI', system-ui, sans-serif; fill: var(--text); }
.ra-val { font: 700 13px 'Segoe UI', system-ui, sans-serif; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.ra-seg-lbl { font: 600 12px 'Segoe UI', system-ui, sans-serif; fill: #ffffff; }

/* legend */
.ra-legend { display: flex; flex-wrap: wrap; gap: 16px 22px; margin-top: 16px; }
.ra-legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--text-2); }
.ra-swatch { width: 13px; height: 13px; border-radius: 3px; flex-shrink: 0; }
.ra-sw-email { background: #94a3b8; }
.ra-sw-find { background: #1e3a8a; }
.ra-sw-else { background: #e2e8f0; border: 1px solid #cbd5e1; }
.ra-sw-all { background: #1e3a8a; }
.ra-sw-turn { background: #dc2626; }

/* ---------- CALLOUT (what the evidence points to) ---------- */
.ra-callout {
  background: var(--accent-light);
  border: 1px solid #dbe4f5;
  border-radius: 14px;
  padding: 24px 26px;
  margin: 34px 0;
}
.ra-callout h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; color: var(--accent); }
.ra-callout p { margin: 0; color: var(--text-2); font-size: 0.98rem; }
.ra-callout a { color: var(--accent); font-weight: 600; }

/* ---------- REFERENCES ---------- */
.ra-refs { background: var(--bg-off); border-top: 1px solid var(--border); padding: 48px 0; margin-top: 48px; }
.ra-refs h2 { font-size: 1.2rem; font-weight: 700; margin: 0 0 18px; letter-spacing: -0.01em; }
.ra-ref-list { list-style: none; margin: 0; padding: 0; counter-reset: ref; }
.ra-ref-list li {
  position: relative;
  padding: 12px 0 12px 34px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.5;
}
.ra-ref-list li:last-child { border-bottom: none; }
.ra-ref-list li::before {
  counter-increment: ref;
  content: counter(ref);
  position: absolute;
  left: 0;
  top: 12px;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ra-ref-list a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.ra-ref-list .ra-ref-src { color: var(--text-3); }

/* ---------- SOFT CTA (single, non-intrusive) ---------- */
.ra-endnote { padding: 40px 0 72px; }
.ra-endnote p { font-size: 0.98rem; color: var(--text-2); margin: 0; }
.ra-endnote a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
  .ra-stats { grid-template-columns: repeat(2, 1fr); }
  .ra-article p { font-size: 1.02rem; }
}
@media (max-width: 440px) {
  .ra-stats { grid-template-columns: 1fr; }
}
