/* =========================================================
   HeyRafi Authority Page Styles (Premium Editorial Layout)
   ========================================================= */

:root {
  --rp-ink: #0c1f1a;
  --rp-ink-2: #1a2a25;
  --rp-body: #2a3a35;
  --rp-muted: #5a6b66;
  --rp-line: #e3ecea;
  --rp-line-2: #eef2f1;
  --rp-bg: #f7fbf9;
  --rp-bg-2: #f4faf7;
  --rp-green: #15725a;
  --rp-green-soft: #e3f3ec;
  --rp-mint: #7EDFC0;
  --rp-mint-soft: #d6f5e8;
  --rp-amber: #b9802b;
  --rp-amber-soft: #fdf3e0;
  --rp-rose: #b04545;
  --rp-rose-soft: #fdecec;
}

.rp {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(126,223,192,0.18), transparent 60%),
    radial-gradient(700px 400px at -10% 10%, rgba(31,143,108,0.10), transparent 60%),
    linear-gradient(180deg, #f7fbf9 0%, #ffffff 55%);
  padding: 110px 0 60px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--rp-body);
}
.rp-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.rp-narrow { max-width: 780px; margin: 0 auto; }

/* Breadcrumbs */
.rp-crumbs { font-size: 0.85rem; color: var(--rp-muted); margin-bottom: 14px; }
.rp-crumbs a { color: var(--rp-green); text-decoration: none; font-weight: 600; }
.rp-crumbs a:hover { text-decoration: underline; }
.rp-crumbs span { margin: 0 6px; opacity: 0.5; }

/* ===== HERO ===== */
.rp-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 28px 0 50px;
  border-bottom: 1px solid var(--rp-line);
  margin-bottom: 50px;
}
.rp-hero-content { max-width: 620px; }
.rp-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rp-green-soft); color: var(--rp-green);
  padding: 6px 14px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 18px;
}
.rp-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rp-green); }
.rp-h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  line-height: 1.08; letter-spacing: -0.01em;
  margin: 0 0 18px; color: var(--rp-ink);
  font-weight: 400;
}
.rp-subhead {
  font-size: 1.15rem; line-height: 1.55;
  color: var(--rp-body); margin: 0 0 26px;
}
.rp-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.rp-hero-trust {
  display: flex; flex-wrap: wrap; gap: 14px 22px;
  font-size: 0.9rem; color: var(--rp-muted);
}
.rp-hero-trust span {
  display: inline-flex; align-items: center; gap: 6px;
}
.rp-hero-trust span::before {
  content: "✓"; color: var(--rp-green); font-weight: 800;
}

/* Hero visual */
.rp-hero-visual {
  position: relative;
  background: linear-gradient(160deg, #0c1f1a 0%, #133a2f 100%);
  border-radius: 20px; padding: 28px;
  color: #eaf6f0;
  box-shadow: 0 30px 60px -30px rgba(12,31,26,0.35);
  overflow: hidden;
}
.rp-hero-visual::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 80% 0%, rgba(126,223,192,0.25), transparent 60%);
  pointer-events: none;
}
.rp-hv-label {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--rp-mint); font-weight: 700;
  margin-bottom: 14px;
}
.rp-hv-rows { display: flex; flex-direction: column; gap: 10px; position: relative; }
.rp-hv-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 12px 14px;
  font-size: 0.92rem;
}
.rp-hv-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rp-mint); flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(126,223,192,0.15);
}
.rp-hv-row strong { color: #fff; font-weight: 600; }
.rp-hv-row em { font-style: normal; color: var(--rp-mint); margin-left: auto; font-size: 0.78rem; }

/* ===== Buttons / CTAs ===== */
.rp-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rp-ink); color: #fff !important;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 700; text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
  border: 1px solid var(--rp-ink);
}
.rp-cta:hover { background: var(--rp-green); border-color: var(--rp-green); transform: translateY(-1px); }
.rp-cta-mint { background: var(--rp-mint); color: var(--rp-ink) !important; border-color: var(--rp-mint); }
.rp-cta-mint:hover { background: #a3ecd2; border-color: #a3ecd2; color: var(--rp-ink) !important; }
.rp-cta-ghost {
  background: transparent; color: var(--rp-ink) !important;
  border: 1px solid var(--rp-ink);
}
.rp-cta-ghost:hover { background: var(--rp-ink); color: #fff !important; }
.rp-cta-lg { padding: 16px 30px; font-size: 1.02rem; }

/* ===== Quick answer card ===== */
.rp-answer {
  background: #fff; border: 1px solid var(--rp-line);
  border-left: 4px solid var(--rp-green);
  border-radius: 14px; padding: 22px 26px; margin: 0 0 50px;
  box-shadow: 0 12px 30px -20px rgba(12,31,26,0.18);
}
.rp-answer-label {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--rp-green); font-weight: 700; margin-bottom: 8px;
}
.rp-answer p { font-size: 1.05rem; line-height: 1.6; margin: 0; color: var(--rp-ink-2); }

/* ===== Sections ===== */
.rp-section { margin: 60px 0; scroll-margin-top: 100px; }
.rp-section > h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  color: var(--rp-ink); margin: 0 0 8px; font-weight: 400;
  letter-spacing: -0.005em; line-height: 1.15;
}
.rp-eyebrow {
  display: block; font-family: 'Inter', sans-serif;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--rp-green); font-weight: 700; margin-bottom: 10px;
}
.rp-section > p { font-size: 1.02rem; line-height: 1.7; margin: 0 0 14px; color: var(--rp-body); max-width: 760px; }
.rp-section-intro { font-size: 1.08rem; color: var(--rp-muted); margin: 0 0 28px; max-width: 720px; line-height: 1.6; }

/* ===== Key takeaways grid ===== */
.rp-takeaways {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; list-style: none; padding: 0; margin: 0;
}
.rp-takeaways li {
  background: #fff; border: 1px solid var(--rp-line);
  border-radius: 12px; padding: 18px 20px;
  font-size: 0.97rem; line-height: 1.55; color: var(--rp-ink-2);
  position: relative; padding-left: 50px;
  transition: border-color 0.2s, transform 0.2s;
}
.rp-takeaways li:hover { border-color: var(--rp-green); transform: translateY(-2px); }
.rp-takeaways li::before {
  content: "✓"; position: absolute; left: 16px; top: 16px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--rp-green-soft); color: var(--rp-green);
  font-weight: 800; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}

/* ===== Pain points ===== */
.rp-pains {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px; list-style: none; padding: 0; margin: 0;
}
.rp-pains li {
  background: var(--rp-rose-soft); border: 1px solid #f4d4d4;
  border-radius: 12px; padding: 16px 18px 16px 46px;
  position: relative; font-size: 0.95rem; line-height: 1.5;
  color: #7a2c2c;
}
.rp-pains li::before {
  content: "✕"; position: absolute; left: 14px; top: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--rp-rose); color: #fff;
  font-size: 0.78rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ===== Benefits grid ===== */
.rp-benefits {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; list-style: none; padding: 0; margin: 0;
}
.rp-benefits li {
  background: linear-gradient(180deg, #fff 0%, var(--rp-bg-2) 100%);
  border: 1px solid var(--rp-line);
  border-radius: 14px; padding: 20px 22px;
  font-size: 0.97rem; line-height: 1.55; color: var(--rp-ink-2);
}
.rp-benefits li strong { display: block; color: var(--rp-ink); font-size: 1rem; margin-bottom: 4px; }

/* ===== Two-column "fit" panel (Who / When / Not for) ===== */
.rp-fit {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; margin-top: 14px;
}
.rp-fit-card {
  background: #fff; border: 1px solid var(--rp-line);
  border-radius: 14px; padding: 24px;
}
.rp-fit-card h3 {
  font-family: 'Inter', sans-serif; font-size: 1.05rem;
  color: var(--rp-ink); margin: 0 0 12px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.rp-fit-card.is-yes h3::before { content: "✓"; color: var(--rp-green); font-weight: 800; }
.rp-fit-card.is-no h3::before { content: "—"; color: var(--rp-amber); font-weight: 800; }
.rp-fit-card ul { margin: 0; padding: 0 0 0 4px; list-style: none; }
.rp-fit-card li {
  position: relative; padding: 6px 0 6px 20px;
  font-size: 0.94rem; line-height: 1.5; color: var(--rp-body);
  border-bottom: 1px solid var(--rp-line-2);
}
.rp-fit-card li:last-child { border-bottom: none; }
.rp-fit-card li::before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rp-green);
}
.rp-fit-card.is-no li::before { background: var(--rp-amber); }

/* ===== Process steps ===== */
.rp-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; counter-reset: step; list-style: none; padding: 0; margin: 0;
}
.rp-steps li {
  background: #fff; border: 1px solid var(--rp-line);
  border-radius: 14px; padding: 24px 22px 22px;
  position: relative; counter-increment: step;
}
.rp-steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem; color: var(--rp-green);
  margin-bottom: 8px;
}
.rp-steps li strong { display: block; color: var(--rp-ink); font-size: 1.02rem; margin-bottom: 6px; }
.rp-steps li span { display: block; color: var(--rp-body); font-size: 0.93rem; line-height: 1.55; }

/* ===== HeyRafi callout ===== */
.rp-rafi {
  background: linear-gradient(135deg, #0c1f1a 0%, #143b30 100%);
  color: #eaf6f0; border-radius: 18px; padding: 34px 36px;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  box-shadow: 0 30px 60px -30px rgba(12,31,26,0.4);
}
.rp-rafi h2 { color: #fff; margin: 0 0 10px !important; }
.rp-rafi p { color: #cfe6dc; margin: 0; font-size: 1rem; line-height: 1.6; max-width: 600px; }
.rp-rafi .rp-cta { background: var(--rp-mint); border-color: var(--rp-mint); color: var(--rp-ink) !important; white-space: nowrap; }
.rp-rafi .rp-cta:hover { background: #a3ecd2; border-color: #a3ecd2; }

/* ===== Mid-page CTA band (lighter) ===== */
.rp-mid-cta {
  background: var(--rp-green-soft); border: 1px solid #cfead8;
  border-radius: 16px; padding: 26px 28px; margin: 50px 0;
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
}
.rp-mid-cta h3 {
  font-family: 'DM Serif Display', serif; font-size: 1.3rem;
  color: var(--rp-ink); margin: 0 0 4px; font-weight: 400;
}
.rp-mid-cta p { color: var(--rp-body); margin: 0; font-size: 0.95rem; }

/* ===== Comparison table ===== */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--rp-line);
  border-radius: 14px; background: #fff;
}
.rp table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.rp caption {
  caption-side: top; text-align: left;
  padding: 14px 18px; font-weight: 600; color: var(--rp-muted);
  border-bottom: 1px solid var(--rp-line-2);
}
.rp th, .rp td {
  padding: 14px 16px; border-bottom: 1px solid var(--rp-line-2);
  text-align: left; vertical-align: top;
}
.rp tr:last-child td, .rp tr:last-child th { border-bottom: none; }
.rp thead th { background: var(--rp-bg-2); color: var(--rp-ink); font-weight: 700; }
.rp tbody th { font-weight: 600; color: var(--rp-ink); background: #fafdfc; }
.rp tbody td:last-child { color: var(--rp-green); font-weight: 600; }
.rp tbody td:nth-child(2) { color: var(--rp-muted); }

/* ===== Scenario cards ===== */
.rp-scenarios {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.rp-scenario {
  background: #fff; border: 1px solid var(--rp-line);
  border-radius: 14px; padding: 22px;
}
.rp-scenario-tag {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--rp-green); font-weight: 700;
  background: var(--rp-green-soft); padding: 4px 10px; border-radius: 999px;
  margin-bottom: 10px;
}
.rp-scenario h3 {
  font-family: 'Inter', sans-serif; font-size: 1.02rem;
  color: var(--rp-ink); margin: 0 0 8px; font-weight: 700;
}
.rp-scenario p { font-size: 0.94rem; line-height: 1.6; color: var(--rp-body); margin: 0; }

/* ===== FAQ accordion ===== */
.rp-faq { display: flex; flex-direction: column; gap: 10px; }
.rp-faq details {
  border: 1px solid var(--rp-line); border-radius: 12px;
  padding: 0; background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.rp-faq details[open] { border-color: var(--rp-green); box-shadow: 0 12px 30px -20px rgba(31,143,108,0.3); }
.rp-faq summary {
  font-weight: 600; color: var(--rp-ink); cursor: pointer;
  padding: 18px 22px; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1rem;
}
.rp-faq summary::-webkit-details-marker { display: none; }
.rp-faq summary::after {
  content: "+"; font-size: 1.4rem; color: var(--rp-green);
  font-weight: 400; line-height: 1;
}
.rp-faq details[open] summary::after { content: "−"; }
.rp-faq details > p, .rp-faq details > div {
  padding: 0 22px 20px; margin: 0; color: var(--rp-body);
  font-size: 0.96rem; line-height: 1.65;
}

/* ===== Related resources ===== */
.rp-related-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; list-style: none; padding: 0; margin: 0;
}
.rp-related-grid li { margin: 0; }
.rp-related-grid a {
  display: block; padding: 18px 20px;
  background: #fff; border: 1px solid var(--rp-line);
  border-radius: 12px; text-decoration: none;
  color: var(--rp-ink); font-weight: 600; font-size: 0.98rem;
  line-height: 1.4; transition: all 0.2s;
}
.rp-related-grid a:hover {
  border-color: var(--rp-green); background: var(--rp-bg-2);
  transform: translateY(-2px);
}
.rp-related-grid a::after {
  content: " →"; color: var(--rp-green); font-weight: 700;
}

/* ===== Final CTA band ===== */
.rp-cta-band {
  background: linear-gradient(135deg, #0c1f1a 0%, #143b30 100%);
  color: #fff; padding: 50px 40px; border-radius: 20px;
  text-align: center; margin: 60px 0 40px;
  box-shadow: 0 30px 60px -30px rgba(12,31,26,0.4);
}
.rp-cta-band h2 {
  color: #fff !important; margin: 0 0 10px !important;
  font-size: clamp(1.6rem, 3vw, 2.2rem) !important;
}
.rp-cta-band p { color: #cfe6dc; max-width: 560px; margin: 0 auto 24px; font-size: 1.05rem; line-height: 1.55; }
.rp-cta-band .rp-cta { background: var(--rp-mint); color: var(--rp-ink) !important; border-color: var(--rp-mint); }
.rp-cta-band .rp-cta:hover { background: #a3ecd2; border-color: #a3ecd2; }

/* ===== Footnote ===== */
.rp-updated { color: var(--rp-muted); font-size: 0.85rem; margin: 30px 0 8px; }
.rp-disclaimer {
  color: var(--rp-muted); font-size: 0.82rem; line-height: 1.6;
  border-top: 1px solid var(--rp-line); padding-top: 18px; margin-top: 18px;
}

/* ===== Resources hub ===== */
.rp-hub-hero {
  text-align: center; max-width: 760px; margin: 0 auto 50px;
}
.rp-hub-hero .rp-tag { margin-bottom: 18px; }
.rp-hub-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.rp-hub-list li { margin: 0; }
.rp-hub-list a {
  display: block; height: 100%; padding: 22px 24px;
  background: #fff; border: 1px solid var(--rp-line);
  border-radius: 14px; text-decoration: none; color: var(--rp-ink);
  transition: all 0.2s;
}
.rp-hub-list a:hover {
  border-color: var(--rp-green); transform: translateY(-3px);
  box-shadow: 0 20px 40px -25px rgba(31,143,108,0.3);
}
.rp-hub-list strong {
  display: block; font-size: 1.05rem; line-height: 1.35;
  margin-bottom: 8px; color: var(--rp-ink);
}
.rp-hub-list span {
  display: block; color: var(--rp-muted); font-size: 0.92rem; line-height: 1.55;
}
.rp-hub-list a::after {
  content: "Read →"; display: inline-block; margin-top: 12px;
  font-size: 0.85rem; font-weight: 700; color: var(--rp-green);
}

/* ===== Mobile ===== */
@media (max-width: 880px) {
  .rp { padding: 90px 0 40px; }
  .rp-hero { grid-template-columns: 1fr; gap: 32px; padding: 18px 0 36px; margin-bottom: 36px; }
  .rp-fit { grid-template-columns: 1fr; }
  .rp-rafi { grid-template-columns: 1fr; padding: 28px; }
  .rp-mid-cta { grid-template-columns: 1fr; padding: 22px; text-align: left; }
  .rp-mid-cta .rp-cta { justify-self: start; }
  .rp-cta-band { padding: 36px 22px; }
  .rp-section { margin: 44px 0; }
}
@media (max-width: 560px) {
  .rp-hero-ctas { flex-direction: column; align-items: stretch; }
  .rp-hero-ctas .rp-cta { justify-content: center; }
}

/* ===== Page-specific additions (lead-management upgrade) ===== */
.rp-quote {
  margin: 32px 0; padding: 26px 30px; border-left: 4px solid var(--rp-green);
  background: linear-gradient(90deg, rgba(31,143,108,0.06), rgba(31,143,108,0));
  border-radius: 6px; font-family: 'DM Serif Display', serif;
  font-size: 1.35rem; line-height: 1.4; color: var(--rp-ink); font-style: italic;
}
.rp-quote::before { content: "“"; font-size: 2.2rem; color: var(--rp-green); margin-right: 6px; line-height: 0; vertical-align: -0.3em; }
.rp-answers-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.rp-answers-list li {
  padding: 14px 18px; background: #fff; border: 1px solid var(--rp-border);
  border-radius: 10px; font-size: 0.98rem; line-height: 1.55; color: var(--rp-ink);
  border-left: 3px solid var(--rp-green);
}
.rp-workflow {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin: 24px 0; padding: 28px 22px; background: var(--rp-ink);
  border-radius: 16px; color: #fff; align-items: stretch;
}
.rp-wf-step {
  position: relative; padding: 18px 14px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; text-align: center;
}
.rp-wf-step .rp-wf-num {
  display: inline-block; width: 28px; height: 28px; line-height: 28px;
  background: var(--rp-green); color: #fff; border-radius: 50%;
  font-weight: 800; font-size: 0.85rem; margin-bottom: 10px;
}
.rp-wf-step strong { display: block; font-size: 0.95rem; margin-bottom: 4px; color: #fff; }
.rp-wf-step span { display: block; font-size: 0.78rem; color: rgba(255,255,255,0.65); line-height: 1.4; }
.rp-wf-step:not(:last-child)::after {
  content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  color: var(--rp-green); font-weight: 700; font-size: 1.2rem; z-index: 2;
}
.rp-trust-block {
  margin: 32px 0; padding: 22px 26px; background: #fffaf0;
  border: 1px solid #f0d68a; border-left: 4px solid #d49a1a;
  border-radius: 10px; font-size: 0.95rem; line-height: 1.6; color: #5b4400;
}
.rp-trust-block strong { color: #3d2c00; }
.rp-section-body p { margin: 14px 0; line-height: 1.7; color: var(--rp-ink); font-size: 1rem; }
@media (max-width: 880px) {
  .rp-workflow { grid-template-columns: 1fr; gap: 10px; }
  .rp-wf-step:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -14px; transform: translateX(50%); }
  .rp-quote { font-size: 1.1rem; padding: 20px 22px; }
}
