/* Article page enhancements — RV Help Now */

.author-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.25rem;
  background: var(--rh-navy-card);
  border: 1px solid var(--rh-navy-border);
  border-radius: var(--rh-radius);
  margin: 0 0 1.75rem;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.page-faq .author-box:hover {
  border-color: rgba(241, 96, 29, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.author-box__avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--rh-orange);
  color: var(--rh-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  box-shadow: var(--rh-shadow-btn);
}

.author-box p {
  margin: 0;
  color: var(--rh-text-on-dark);
  line-height: 1.55;
}

.author-box strong {
  color: var(--rh-white);
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.author-box a {
  color: var(--rh-orange);
  font-weight: 600;
  text-decoration: none;
}

.quick-ref {
  display: grid;
  gap: 0.75rem;
  background: var(--rh-navy-card);
  border: 1px solid var(--rh-navy-border);
  border-radius: var(--rh-radius);
  padding: 1.25rem 1.35rem;
  margin: 0 0 2rem;
}

.quick-ref__title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rh-orange);
  margin: 0 0 0.5rem;
}

.quick-ref dl {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.quick-ref dt {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--rh-white);
  margin-bottom: 0.2rem;
}

.quick-ref dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--rh-text-on-dark);
  line-height: 1.5;
}

.toc {
  background: var(--rh-bg-card);
  border: 1px solid #e8ecf4;
  border-radius: var(--rh-radius);
  padding: 1.15rem 1.25rem;
  margin: 0 0 1rem;
}

.toc__title {
  font-size: 0.6875rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rh-orange);
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
}

.toc li {
  margin-bottom: 0.4rem;
}

.toc a {
  color: var(--rh-navy);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.toc a:hover,
.toc a.is-active {
  color: var(--rh-orange);
}

.causes-ranked {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  counter-reset: cause;
}

.causes-ranked li {
  counter-increment: cause;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 1rem;
  padding: 1.1rem 1.15rem;
  margin-bottom: 0.65rem;
  background: var(--rh-bg);
  border: 1px solid #e8ecf4;
  border-radius: var(--rh-radius);
  align-items: start;
  transition: border-color 0.15s ease;
}

.causes-ranked li:hover {
  border-color: rgba(241, 96, 29, 0.3);
}

.causes-ranked li::before {
  content: counter(cause);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--rh-orange);
  line-height: 1.2;
}

.causes-ranked .cause-label {
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
  color: var(--rh-navy);
}

.cause-likelihood {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rh-success);
  margin-bottom: 0.35rem;
}

.cause-likelihood--medium {
  color: var(--rh-warning);
}

.cause-likelihood--low {
  color: var(--rh-text-muted);
}

.causes-ranked li > div p {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: var(--rh-text-muted);
}

.faq-section {
  margin: 2.5rem 0;
}

.faq-section > h2::after {
  display: block;
}

.faq-item {
  border: 1px solid #e8ecf4;
  border-radius: var(--rh-radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: var(--rh-bg-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(241, 96, 29, 0.4);
  box-shadow: 0 4px 16px rgba(10, 33, 98, 0.06);
}

.faq-item summary {
  padding: 1rem 1.2rem;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--rh-navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.15s ease;
}

.faq-item summary:hover {
  background: #fafbfe;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rh-orange);
  color: var(--rh-white);
  font-size: 1.1rem;
  font-weight: 400;
  border-radius: 50%;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--rh-navy);
}

.faq-item__answer {
  padding: 0 1.2rem 1.1rem;
  color: var(--rh-text-muted);
  font-size: 0.98rem;
  border-top: 1px solid #eef1f7;
}

.faq-item__answer p {
  margin: 0.85rem 0 0;
}

.takeaways {
  background: var(--rh-navy-card);
  border: 1px solid var(--rh-navy-border);
  border-radius: var(--rh-radius);
  padding: 1.35rem 1.5rem;
  margin: 2rem 0;
}

.takeaways h2 {
  margin-top: 0 !important;
  font-size: 1.15rem !important;
  color: var(--rh-white) !important;
}

.takeaways h2::after {
  background: var(--rh-orange) !important;
}

.takeaways ul {
  margin-bottom: 0;
  color: var(--rh-text-on-dark);
}

.takeaways li::marker {
  color: var(--rh-orange);
}

.takeaways a {
  color: var(--rh-orange);
}

.disclaimer {
  font-size: 0.8125rem;
  color: var(--rh-text-muted);
  border-top: 1px solid #e8ecf4;
  padding-top: 1.5rem;
  margin-top: 2rem;
  line-height: 1.6;
}

/* Layout */
.article-layout {
  display: block;
}

@media (min-width: 960px) {
  .article-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 2.5rem;
    align-items: start;
  }

  .article-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1.25rem);
  }

  .article-sidebar .btn-cta {
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    padding: 0.85rem 1rem;
  }
}

/* Mobile sticky CTA */
.sticky-cta-mobile {
  display: none;
}

@media (max-width: 767px) {
  .sticky-cta-mobile {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.65rem 1rem;
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
    background: var(--rh-navy);
    border-top: 1px solid var(--rh-navy-border);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
    z-index: 150;
  }

  .sticky-cta-mobile .btn-cta {
    flex: 1;
    padding: 0.9rem;
  }

  body.has-sticky-cta {
    padding-bottom: 5rem;
  }
}

/* Progress bar — full viewport width; fill via transform (theme-safe) */
.read-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  width: 100% !important;
  max-width: none !important;
  height: 3px;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--rh-orange);
  z-index: 201;
  transition: transform 0.1s linear;
  box-shadow: 0 0 8px var(--rh-orange-glow);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

html.admin-bar .read-progress {
  top: calc(var(--header-h) + 32px);
}

@media screen and (max-width: 782px) {
  html.admin-bar .read-progress {
    top: calc(var(--header-h) + 46px);
  }
}

.preview-banner + .read-progress {
  top: calc(var(--header-h) + 28px);
}

@media (max-width: 600px) {
  .preview-banner + .read-progress {
    top: calc(var(--header-h) + 32px);
  }
}
