/* ============================================================
   StarPing Reportage — shared stylesheet
   Deep-space dark theme matching starping.space's design system:
   near-black background, emerald/cyan/violet accent lights,
   orbit-ring + nebula + shooting-star motion, diorama/porthole framing.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');

:root{
  --bg: #0a0a0a;
  --bg-deep: #050505;
  --emerald: #10b981;
  --emerald-light: #6ee7b7;
  --cyan: #67f0f9;
  --violet: #a78bfa;
  --line: rgba(255,255,255,0.09);
  --line-soft: rgba(255,255,255,0.06);
  --text-1: rgba(255,255,255,0.96);
  --text-2: rgba(255,255,255,0.72);
  --text-3: rgba(255,255,255,0.52);
  --text-4: rgba(255,255,255,0.36);
  --font-fa: 'Vazirmatn', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-w: 880px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-fa);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
::selection{ background: #fff; color: #000; }

.wrap{ max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.wrap-wide{ max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- reading progress bar ---------- */
#read-progress{
  position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 90;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  width: 0%; transform-origin: right; transition: width .12s linear;
  box-shadow: 0 0 12px rgba(103,232,249,.5);
}

/* ---------- top bar ---------- */
.rp-nav{
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.rp-nav-inner{
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.rp-brand{ display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.rp-brand svg{ width: 22px; height: 22px; }
.rp-nav-links{ display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--text-3); }
.rp-nav-links a:hover{ color: var(--text-1); }
.rp-pill{
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 11.5px; color: var(--text-3);
}
.rp-pill .dot{ width: 6px; height: 6px; border-radius: 999px; background: var(--emerald); box-shadow: 0 0 6px var(--emerald); }

/* ---------- hero ---------- */
.rp-hero{
  position: relative; overflow: hidden;
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line-soft);
}
.rp-hero::before{
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 22% 15%, rgba(99,102,241,0.16) 0%, transparent 52%),
    radial-gradient(circle at 82% 30%, rgba(16,185,129,0.10) 0%, transparent 48%),
    radial-gradient(circle at 50% 92%, rgba(167,139,250,0.08) 0%, transparent 45%);
}
.rp-hero::after{
  content:'';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.05) 0.6px, transparent 0.8px);
  background-size: 3px 3px;
}
.rp-orbit{
  position: absolute; border: 1px solid rgba(163,172,185,0.18); border-radius: 999px;
  pointer-events: none; animation: rp-orbit-rotate 42s linear infinite; z-index: 0;
}
.rp-orbit.slow{ animation-duration: 70s; }
@keyframes rp-orbit-rotate{ from{ transform: rotate(0deg);} to{ transform: rotate(360deg);} }
.rp-orbit-dot{
  position: absolute; width: 7px; height: 7px; border-radius: 999px;
  background: var(--cyan); box-shadow: 0 0 10px var(--cyan), 0 0 2px #fff;
  top: -4px; right: 18%;
}
.rp-shooting{
  position: absolute; width: 100px; height: 1.5px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  opacity: .8; transform: rotate(-25deg); pointer-events: none; z-index: 0;
  animation: rp-shoot 5.5s linear infinite;
  box-shadow: 0 0 6px var(--cyan), 0 0 12px #fff;
}
@keyframes rp-shoot{
  0%{ transform: translate(-80px,0) rotate(-25deg); opacity: 0; }
  6%{ opacity: .9; } 18%{ opacity: .9; }
  26%{ transform: translate(340px,140px) rotate(-25deg); opacity: 0; }
  100%{ opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .rp-orbit, .rp-shooting{ animation: none; }
}

.rp-hero-inner{ position: relative; z-index: 2; }
.rp-eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 12px; color: var(--text-2);
  letter-spacing: 0.02em;
}
.rp-eyebrow .dot{ width: 6px; height: 6px; border-radius: 999px; background: var(--emerald); animation: rp-pulse 1.8s ease-in-out infinite; }
@keyframes rp-pulse{ 0%,100%{ opacity: 1;} 50%{ opacity: .35;} }

.rp-title{
  margin: 22px 0 0;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.6vw, 3.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.rp-title .accent{
  background: linear-gradient(90deg, var(--emerald-light), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rp-sub{
  margin-top: 18px; font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-2); max-width: 640px; line-height: 1.9;
}
.rp-meta{
  margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 14px;
  font-size: 12.5px; color: var(--text-3);
}
.rp-meta span{
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; background: rgba(255,255,255,0.02);
}
.rp-meta svg{ width: 14px; height: 14px; opacity: .85; color: var(--emerald-light); flex-shrink: 0; }

/* ---------- layout: article (single column, no sidebar TOC) ---------- */
.rp-body{
  max-width: var(--max-w); margin: 0 auto; padding: 52px 20px 0;
}

/* Plain (non-link) in-page outline, styled as an icon-chip grid — text
   only, not <a> elements, so it never counts against a platform's
   outbound-link budget. Purely visual / skimmability aid. */
.rp-outline{
  border: 1px solid var(--line); border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(103,232,249,0.05) 0%, transparent 55%),
    rgba(255,255,255,0.015);
  padding: 22px; margin-bottom: 10px;
}
.rp-outline-title{
  font-size: 11px; color: var(--text-4); letter-spacing: 0.05em; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.rp-outline-title svg{ width: 13px; height: 13px; color: var(--emerald-light); }
.rp-outline-grid{
  display: grid; grid-template-columns: 1fr; gap: 8px;
  list-style: none; margin: 0; padding: 0;
}
@media (min-width: 700px){ .rp-outline-grid{ grid-template-columns: 1fr 1fr; } }
.rp-outline-grid li{
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 12px;
  font-size: 13.5px; color: var(--text-3);
  transition: background .15s ease, color .15s ease;
  opacity: 0; transform: translateY(6px);
  animation: rp-chip-in .5s cubic-bezier(.23,1,.32,1) forwards;
}
.rp-outline-grid li:hover{ background: rgba(255,255,255,0.03); color: var(--text-1); }
.rp-outline-grid li .chip-n{
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, monospace; font-size: 11px;
  color: var(--emerald-light); background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
}
.rp-outline-grid li:nth-child(1){ animation-delay: .03s; }
.rp-outline-grid li:nth-child(2){ animation-delay: .08s; }
.rp-outline-grid li:nth-child(3){ animation-delay: .13s; }
.rp-outline-grid li:nth-child(4){ animation-delay: .18s; }
.rp-outline-grid li:nth-child(5){ animation-delay: .23s; }
.rp-outline-grid li:nth-child(6){ animation-delay: .28s; }
.rp-outline-grid li:nth-child(7){ animation-delay: .33s; }
.rp-outline-grid li:nth-child(8){ animation-delay: .38s; }
.rp-outline-grid li:nth-child(9){ animation-delay: .43s; }
@keyframes rp-chip-in{ to{ opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){
  .rp-outline-grid li{ animation: none; opacity: 1; transform: none; }
}

/* ---------- article prose ---------- */
.rp-article{ min-width: 0; }
.rp-article > *:first-child{ margin-top: 0; }
.rp-article p{ color: var(--text-2); font-size: 16.5px; margin: 0 0 20px; }
.rp-article h2{
  font-weight: 700; font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -0.01em; margin: 52px 0 18px;
  display: flex; align-items: center; gap: 12px;
  scroll-margin-top: 84px;
}
.rp-article h2 .num{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; color: var(--emerald-light);
  border: 1px solid rgba(16,185,129,0.35); background: rgba(16,185,129,0.08);
  border-radius: 8px; padding: 3px 9px; flex-shrink: 0;
}
.rp-article h2 .h2-icon{
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, rgba(103,232,249,0.12), rgba(167,139,250,0.08));
  border: 1px solid rgba(255,255,255,0.1);
}
.rp-article h2 .h2-icon svg{ width: 17px; height: 17px; color: var(--cyan); }
.rp-article h3{
  font-weight: 700; font-size: 1.12rem; margin: 30px 0 12px; color: var(--text-1);
  scroll-margin-top: 84px;
}
.rp-article ul, .rp-article ol{ margin: 0 0 22px; padding-inline-start: 22px; color: var(--text-2); }
.rp-article li{ margin-bottom: 10px; font-size: 16px; }
.rp-article li::marker{ color: var(--emerald); }
.rp-article strong{ color: var(--text-1); font-weight: 700; }
.rp-article a.inline-link{
  color: var(--emerald-light); border-bottom: 1px solid rgba(110,231,183,0.4);
  transition: border-color .15s ease;
}
.rp-article a.inline-link:hover{ border-color: var(--emerald-light); }

.rp-lead{
  font-size: 1.2rem !important; color: var(--text-1) !important;
  line-height: 1.9; margin-bottom: 28px !important;
}

/* big pull-quote — pulled from the article's own text, not attributed
   testimony; purely a typographic/visual break */
.rp-pull{
  position: relative; margin: 42px 0; padding: 6px 34px;
  border: none; font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 700; line-height: 1.55; color: var(--text-1);
  letter-spacing: -0.01em;
}
.rp-pull::before{
  content: '”'; position: absolute; top: -28px; right: -4px;
  font-size: 5rem; font-weight: 800; line-height: 1;
  background: linear-gradient(155deg, rgba(103,232,249,0.35), rgba(167,139,250,0.25));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-family: Georgia, 'Times New Roman', serif;
}
.rp-pull::after{
  content: ''; position: absolute; inset-inline-start: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 3px;
  background: linear-gradient(to bottom, var(--cyan), var(--violet));
}

/* icon-bullet list variant — swaps the default marker for a small
   filled check glyph, used for step/feature lists */
.rp-icon-list{ list-style: none; padding-inline-start: 0 !important; }
.rp-icon-list li{
  display: flex; align-items: flex-start; gap: 12px;
  padding-inline-start: 0;
}
.rp-icon-list li .li-ico{
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 9px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3);
}
.rp-icon-list li .li-ico svg{ width: 13px; height: 13px; color: var(--emerald-light); }

/* callout / stat strip */
.rp-callout{
  border: 1px solid rgba(103,232,249,0.22);
  background: linear-gradient(155deg, rgba(103,232,249,0.06) 0%, rgba(10,10,10,0.4) 60%);
  border-radius: 18px; padding: 22px 24px; margin: 30px 0;
  display: flex; gap: 14px; align-items: flex-start;
}
.rp-callout svg{ width: 22px; height: 22px; flex-shrink: 0; color: var(--cyan); margin-top: 2px; }
.rp-callout p{ margin: 0; font-size: 15px; color: var(--text-2); }
.rp-callout strong{ color: var(--text-1); }

.rp-stats{
  display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr));
  gap: 14px; margin: 30px 0;
}
.rp-stat{
  border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px;
  background: rgba(255,255,255,0.02); text-align: center;
  transition: transform .25s cubic-bezier(.23,1,.32,1), border-color .25s ease, background .25s ease;
}
.rp-stat:hover{
  transform: translateY(-3px); border-color: rgba(103,232,249,0.3);
  background: rgba(103,232,249,0.04);
}
.rp-stat .v{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.5rem; font-weight: 700; color: var(--emerald-light);
  font-variant-numeric: tabular-nums;
}
.rp-stat .l{ font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

/* table */
.rp-table-wrap{ overflow-x: auto; margin: 26px 0; border: 1px solid var(--line); border-radius: 16px; }
table.rp-table{ width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.rp-table th, table.rp-table td{ padding: 12px 16px; text-align: right; }
table.rp-table thead th{ color: var(--text-3); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--line); }
table.rp-table tbody tr + tr td{ border-top: 1px solid var(--line-soft); }
table.rp-table tbody tr:hover{ background: rgba(255,255,255,0.02); }
table.rp-table td.hl{ color: var(--emerald-light); font-weight: 600; }

/* diorama visual break */
.rp-visual{
  position: relative; border: 1px solid var(--line); border-radius: 22px;
  background: var(--bg-deep); padding: 6px; margin: 34px 0;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.rp-visual:hover{ border-color: rgba(103,232,249,0.22); box-shadow: 0 24px 48px -18px rgba(103,232,249,0.12); }
.rp-visual::after{ content:''; position: absolute; inset: 6px; border: 1px solid var(--line-soft); border-radius: 16px; pointer-events: none; }
.rp-visual-inner{
  border-radius: 16px; overflow: hidden; position: relative;
  aspect-ratio: 16/7; background: #020203;
  display: flex; align-items: center; justify-content: center;
}
.rp-visual-inner.compact{ aspect-ratio: 16/9; }
.rp-visual-caption{
  padding: 12px 6px 4px; font-size: 11.5px; color: var(--text-4); text-align: center;
}

/* mini bar-chart visual (comparison-style panels) */
.rp-barchart{ display: flex; align-items: flex-end; gap: 18px; height: 68%; padding: 0 10px; }
.rp-barchart .bar{
  flex: 1; border-radius: 8px 8px 0 0; position: relative;
  background: linear-gradient(to top, rgba(103,232,249,0.35), rgba(103,232,249,0.06));
  border: 1px solid rgba(103,232,249,0.3); border-bottom: none;
  display: flex; align-items: flex-start; justify-content: center;
  animation: rp-bar-grow 1.1s cubic-bezier(.23,1,.32,1) both;
}
.rp-barchart .bar.hl{ background: linear-gradient(to top, rgba(16,185,129,0.5), rgba(16,185,129,0.08)); border-color: rgba(16,185,129,0.5); }
.rp-barchart .bar span{ position: absolute; top: -26px; font-size: 11px; color: var(--text-2); font-family: ui-monospace, monospace; white-space: nowrap; }
.rp-barchart .bar em{ position: absolute; bottom: 8px; font-style: normal; font-size: 10px; color: var(--text-4); writing-mode: vertical-rl; }
@keyframes rp-bar-grow{ from{ transform: scaleY(0); } to{ transform: scaleY(1); } }
.rp-barchart .bar{ transform-origin: bottom; }

/* orbit svg diagram look */
.rp-orbit-diagram{ position: absolute; inset: 0; }
.rp-panel-label{ position: absolute; top: 14px; inset-inline-start: 16px; font-size: 10px; letter-spacing: .04em; color: var(--text-4); font-family: ui-monospace, monospace; }
.rp-panel-value{ position: absolute; bottom: 14px; inset-inline-end: 16px; font-size: 11px; color: var(--emerald-light); font-family: ui-monospace, monospace; text-align: end; }

/* contextual note (not attributed testimony) */
.rp-note{
  position: relative; border-inline-start: 3px solid var(--violet);
  padding: 14px 20px 14px 20px; margin: 22px 0; color: var(--text-2); font-size: 15.5px;
  border-radius: 0 14px 14px 0; background: rgba(167,139,250,0.035);
  display: flex; gap: 14px; align-items: flex-start;
}
.rp-note .note-ico{
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.3);
}
.rp-note .note-ico svg{ width: 13px; height: 13px; color: var(--violet); }
.rp-note .note-body{ flex: 1; min-width: 0; }
.rp-note .tag{ display:block; font-size: 11px; color: var(--violet); margin-bottom: 6px; letter-spacing: .03em; }

/* CTA band */
.rp-cta{
  margin: 48px 0 8px; border-radius: 22px; border: 1px solid rgba(16,185,129,0.25);
  background: linear-gradient(155deg, rgba(16,185,129,0.09), rgba(10,10,10,0.5) 65%);
  padding: 30px 28px; position: relative; overflow: hidden;
}
.rp-cta::before{
  content: ''; position: absolute; top: -40%; left: -10%; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(103,232,249,0.16) 0%, transparent 70%);
  pointer-events: none;
}
.rp-cta-icon{
  width: 42px; height: 42px; border-radius: 13px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3);
}
.rp-cta-icon svg{ width: 20px; height: 20px; color: var(--emerald-light); }
.rp-cta h4{ margin: 0 0 8px; font-size: 1.25rem; font-weight: 700; }
.rp-cta p{ margin: 0 0 18px; color: var(--text-2); font-size: 14.5px; }
.rp-cta-actions{ display: flex; flex-wrap: wrap; gap: 10px; }
.rp-btn{
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 12px; padding: 12px 22px; font-size: 14px; font-weight: 600;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.rp-btn-primary{ background: #fff; color: #000; }
.rp-btn-primary:hover{ transform: translateY(-1px); background: #f2f2f2; }
.rp-btn-ghost{ border: 1px solid var(--line); color: var(--text-1); }
.rp-btn-ghost:hover{ border-color: rgba(255,255,255,0.3); }
.rp-disclosure{ margin-top: 14px; font-size: 11px; color: var(--text-4); }

/* FAQ accordion */
.rp-faq{
  margin: 20px 0 0; border: 1px solid var(--line-soft); border-radius: 20px;
  padding: 18px; background: rgba(255,255,255,0.012);
}
.rp-faq details{
  border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px;
  background: rgba(255,255,255,0.02); overflow: hidden;
  transition: border-color .2s ease;
}
.rp-faq details:last-child{ margin-bottom: 0; }
.rp-faq details[open]{ border-color: rgba(16,185,129,0.25); }
.rp-faq summary{
  cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 600;
  font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.rp-faq summary::-webkit-details-marker{ display: none; }
.rp-faq summary .plus{ flex-shrink: 0; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-3); transition: transform .2s ease; }
.rp-faq details[open] summary .plus{ transform: rotate(45deg); color: var(--emerald-light); border-color: rgba(16,185,129,0.4); }
.rp-faq .a{ padding: 0 20px 18px; color: var(--text-3); font-size: 14.5px; line-height: 1.8; }

/* footer */
.rp-footer{ border-top: 1px solid var(--line-soft); margin-top: 70px; padding: 34px 0 50px; }
.rp-footer-inner{ max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.rp-footer p{ color: var(--text-4); font-size: 12px; margin: 0 0 8px; line-height: 1.9; }
.rp-footer a{ color: var(--text-3); border-bottom: 1px solid var(--line); }
.rp-footer a:hover{ color: var(--text-1); }

/* reveal-on-scroll */
.reveal{ opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.23,1,.32,1), transform .7s cubic-bezier(.23,1,.32,1); }
.reveal.visible{ opacity: 1; transform: none; }

/* back to top */
#back-top{
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 60;
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(10,10,10,0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
#back-top.show{ opacity: 1; pointer-events: auto; transform: none; }
#back-top svg{ width: 16px; height: 16px; }

@media (max-width: 640px){
  .rp-body{ padding-top: 36px; }
  .rp-article h2{ margin-top: 40px; }
}
