/* /birth-time-rectification/ (birth-time-rectification.php), on top of blog.css's .sp-* and .rp-prose */

/* Article with a sticky table of contents beside it */
.rc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 36px;
  max-width: 1140px;
}

.rc-layout::before,
.rc-layout::after { content: none; display: none; }

/* Hero text lines up with the article column */
.rc-hero .sp-hero__inner { max-width: 1140px; }
.rc-hero .sp-hero__inner > * { max-width: 860px; }

.rc-layout .rc-article { max-width: none; margin: -64px 0 0; }

.rc-side {
  position: sticky;
  top: 120px;
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.rc-section,
.rc-faq { scroll-margin-top: 120px; }

/* Answer-first lead */
.rp-prose .rc-lead {
  margin-bottom: 28px;
  padding-left: 18px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.3rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  color: #2D2A32;
  border-left: 3px solid #D4A574;
}

/* At a glance */
.rc-glance {
  margin: 0 0 28px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.16), rgba(212, 165, 116, 0.05));
  border: 1px solid rgba(212, 165, 116, 0.35);
  border-radius: 16px;
}

.rp-prose .rc-glance__title,
.rc-toc__title,
.rc-related__title,
.rc-side__title {
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7A5230;
}

.rp-prose .rc-glance ul { margin: 0; padding: 0; list-style: none; }

.rp-prose .rc-glance li {
  position: relative;
  padding-left: 26px;
  font-size: 0.98rem;
  line-height: 1.6;
}

.rp-prose .rc-glance li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0;
  color: #D4A574;
}

/* Table of contents: a card beside the article, a disclosure inside it on narrow screens */
.rc-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rc-toc;
}

.rc-toc li {
  margin: 0;
  counter-increment: rc-toc;
}

.rc-toc a {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: #4A4550;
  text-decoration: none;
  border-top: 1px solid #F0EDE9;
}

.rc-toc li:first-child a { border-top: 0; }

.rc-toc a::before {
  content: counter(rc-toc, decimal-leading-zero);
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.6;
  color: #D4A574;
}

.rc-toc a:hover,
.rc-toc a[aria-current] { color: #1a0f2e; }
.rc-toc a[aria-current]::before { color: #7A5230; }

.rc-toc--side,
.rc-side__cta {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #E8E4DF;
  border-radius: 16px;
}

.rc-side__cta {
  color: #fff;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(212, 165, 116, 0.24), transparent 60%),
    linear-gradient(145deg, #2a1845, #1a0f2e);
  border: 0;
}

.rc-side__cta .rc-side__title { color: #E8C9A1; }
.rc-side__cta .nf-btn { width: 100%; justify-content: center; text-align: center; }

.rp-prose .rc-toc--inline {
  display: none;
  margin: 0 0 24px;
  padding: 14px 18px;
  background: #FAF9F7;
  border: 1px solid #E8E4DF;
  border-radius: 14px;
}

.rc-toc--inline summary {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7A5230;
  cursor: pointer;
}

.rc-toc--inline nav { margin-top: 8px; }

/* Figures */
.rp-prose .rc-figure { margin: 2em 0; }
.rc-figure img { display: block; width: 100%; height: auto; }
.rc-figure--hero { margin-bottom: 36px; }

/* Where we are today */
.rp-prose .rc-note {
  margin: 1.4em 0;
  padding: 16px 20px;
  font-size: 0.98rem;
  line-height: 1.65;
  background: rgba(124, 143, 214, 0.08);
  border: 1px solid rgba(124, 143, 214, 0.3);
  border-radius: 14px;
}

/* Life events table */
.rp-prose .rc-table {
  margin: 0 0 1.1em;
  overflow-x: auto;
  border: 1px solid #E8E4DF;
  border-radius: 14px;
}

.rp-prose .rc-table table { min-width: 560px; margin: 0; font-size: 0.92rem; line-height: 1.5; }

.rp-prose .rc-table caption {
  padding: 12px 14px 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  color: #7A5230;
}

.rp-prose .rc-table thead th {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: #6B6670;
  background: #FAF9F7;
}

.rp-prose .rc-table tbody th { font-weight: 700; color: #1a0f2e; }
.rp-prose .rc-table tr:last-child > * { border-bottom: 0; }

/* Key terms */
.rp-prose .rc-terms { display: grid; gap: 12px; margin: 0 0 1.1em; }

.rc-terms div {
  padding: 12px 16px;
  background: #FAF9F7;
  border-left: 3px solid #D4A574;
  border-radius: 0 12px 12px 0;
}

.rc-terms dt { font-weight: 700; color: #1a0f2e; }
.rc-terms dd { margin: 2px 0 0; font-size: 0.96rem; line-height: 1.6; }

/* FAQ */
.rp-prose .rc-faq__item { padding: 16px 0; border-top: 1px solid #E8E4DF; }
.rp-prose .rc-faq__item:first-of-type { border-top: 0; padding-top: 0; }
.rp-prose .rc-faq__item h3 { margin: 0 0 6px; font-size: 1.3rem; }
.rp-prose .rc-faq__item p { margin: 0; }

/* Call to action inside the article */
.rp-prose .rc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  margin: 2em 0;
  padding: 26px 28px;
  color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(212, 165, 116, 0.24), transparent 60%),
    linear-gradient(145deg, #2a1845, #1a0f2e);
  border-radius: 18px;
}

.rp-prose .rc-cta p { margin: 0; font-size: 0.98rem; line-height: 1.6; }

.rp-prose .rc-cta .rc-cta__title {
  margin-bottom: 6px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.rc-cta__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
}

.rp-prose .rc-cta .nf-btn { color: #1a0f2e; text-decoration: none; }
.rp-prose .rc-cta .nf-btn:hover { color: #1a0f2e; }

.rp-prose .rc-cta .rc-cta__link {
  font-size: 0.88rem;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.rp-prose .rc-cta .rc-cta__link:hover { color: #E8C9A1; }

/* Keep reading */
.rc-related { margin-top: 40px; padding-top: 24px; border-top: 1px solid #E8E4DF; }
.rc-related ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.rc-related a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #2D2A32;
  text-decoration: none;
  background: #F4F2EF;
  border-radius: 999px;
}

.rc-related a:hover { color: #fff; background: #1a0f2e; }

@media (max-width: 1100px) {
  .rc-layout { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
  .rc-side { display: none; }
  .rp-prose .rc-toc--inline { display: block; }
}

@media (max-width: 760px) {
  .rc-layout .rc-article { margin-top: -52px; }
  .rp-prose .rc-cta { flex-direction: column; align-items: stretch; padding: 22px 20px; }
  .rc-cta__actions { align-items: stretch; text-align: center; }
  .rp-prose .rc-cta .nf-btn { justify-content: center; }
  .rc-glance { padding: 16px 18px; }
}
