/* =========================================================
   REFUND / CANCELLATION POLICY — page-scoped styles (rp- prefix)
   Light theme. Depends on Bootstrap 5, Font Awesome 6, and
   Inter / Space Grotesk already loaded via global_head.php.
   ========================================================= */

.rp-wrap {
  --rp-bg: #FBFAF7;
  --rp-surface: #F1EFEA;
  --rp-surface-solid: #FFFFFF;
  --rp-line: #E4E1D8;
  --rp-text: #20241F;
  --rp-body-text: #3D4136;
  --rp-muted: #6B6F63;
  --rp-accent: #3D5AF1;
  --rp-accent-soft: #3D5AF114;
  --rp-teal: #0E8F72;
  --rp-teal-soft: #0E8F7214;

  background: var(--rp-bg);
  color: var(--rp-text);
  font-size: 16px;
  line-height: 1.65;
  scroll-behavior: smooth;
}

.rp-wrap * {
  box-sizing: border-box;
}

.rp-wrap h1,
.rp-wrap h2,
.rp-wrap .rp-num {
}

.rp-wrap a {
  color: var(--rp-accent);
  text-decoration: none;
}

.rp-wrap a:hover {
  color: var(--rp-teal);
}

/* ---------- Breadcrumb ---------- */
.rp-breadcrumb {
  --bs-breadcrumb-divider: '›';
  font-size: .875rem;
  padding: 1.25rem 0 0;
}

.rp-breadcrumb a {
  color: var(--rp-muted);
}

.rp-breadcrumb a:hover {
  color: var(--rp-teal);
}

.rp-breadcrumb .active {
  color: var(--rp-text);
  font-weight: 500;
}

.rp-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: var(--rp-line);
  font-size: 1rem;
}

/* ---------- Hero ---------- */
.rp-hero {
  padding: 1.5rem 0 2.5rem;
  border-bottom: 1px solid var(--rp-line);
}

.rp-hero h1 {
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}

.rp-hero p {
  color: var(--rp-muted);
  max-width: 64ch;
  margin-bottom: 0;
}

.rp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--rp-muted);
}

.rp-meta span i {
  color: var(--rp-teal);
  margin-right: .4rem;
}

/* ---------- Layout ---------- */
.rp-layout {
  padding: 2.5rem 0 4rem;
}

.rp-sidebar {
  position: sticky;
  top: 1.5rem;
  align-self: start;
}

/* Search */
.rp-search {
  position: relative;
  margin-bottom: 1.25rem;
}

.rp-search input {
  background: var(--rp-surface-solid);
  border: 1px solid var(--rp-line);
  color: var(--rp-text);
  border-radius: 8px;
  padding: .55rem .8rem .55rem 2.2rem;
  font-size: .875rem;
  width: 100%;
}

.rp-search input:focus {
  outline: none;
  border-color: var(--rp-accent);
  box-shadow: 0 0 0 3px var(--rp-accent-soft);
}

.rp-search i {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rp-muted);
  font-size: .8rem;
}

/* Table of contents */
.rp-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--rp-line);
}

.rp-toc a {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .5rem .9rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--rp-muted);
  font-size: .875rem;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.rp-toc a:hover {
  color: var(--rp-text);
  background: var(--rp-surface);
}

.rp-toc a.active {
  color: var(--rp-text);
  border-left-color: var(--rp-teal);
  background: var(--rp-teal-soft);
  font-weight: 500;
}

.rp-toc .rp-num {
  color: var(--rp-accent);
  font-size: .75rem;
  min-width: 1.4rem;
}

.rp-toc a.active .rp-num {
  color: var(--rp-teal);
}

.rp-no-results {
  display: none;
  color: var(--rp-muted);
  font-size: .85rem;
  padding: .5rem .9rem;
}

/* Mobile TOC */
.rp-mobile-toc {
  display: none;
}

@media (max-width: 991.98px) {
  .rp-sidebar {
    display: none;
  }

  .rp-mobile-toc {
    display: block;
    margin-bottom: 2rem;
  }

  .rp-mobile-toc select {
    width: 100%;
    background: var(--rp-surface-solid);
    border: 1px solid var(--rp-line);
    color: var(--rp-text);
    border-radius: 8px;
    padding: .6rem .8rem;
    font-size: .9rem;
  }
}

/* ---------- Content sections ---------- */
.rp-section {
  padding-top: 1.5rem;
  margin-top: -1.5rem;
  border-bottom: 1px solid var(--rp-line);
  padding-bottom: 2.25rem;
  margin-bottom: 2.25rem;
}

.rp-section:last-child {
  border-bottom: none;
}

.rp-section-head {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  margin-bottom: .9rem;
}

.rp-section-head .rp-num {
  font-size: 1rem;
  color: var(--rp-teal);
  font-weight: 600;
  flex-shrink: 0;
}

.rp-section-head h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -.01em;
}

.rp-section p,
.rp-section li {
  color: var(--rp-body-text);
}

.rp-section strong {
  color: var(--rp-text);
}

.rp-section ul {
  padding-left: 1.2rem;
  margin-bottom: .75rem;
}

.rp-section li {
  margin-bottom: .4rem;
}

.rp-section li:last-child {
  margin-bottom: 0;
}

.rp-section p:last-child {
  margin-bottom: 0;
}

.rp-section .fa-solid,
.rp-section .fa-regular {
  color: var(--rp-teal);
}

.rp-highlight {
  background: var(--rp-surface);
  border: 1px solid var(--rp-line);
  border-left: 3px solid var(--rp-accent);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  font-size: .925rem;
  color: var(--rp-muted);
  margin-top: 1rem;
}

.rp-highlight strong {
  color: var(--rp-text);
}

/* ---------- Back to top ---------- */
#rpTop {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rp-accent);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(61, 90, 241, .3);
  z-index: 50;
  transition: transform .15s ease, background .15s ease;
}

#rpTop:hover {
  transform: translateY(-3px);
  background: var(--rp-teal);
}

@media (prefers-reduced-motion: reduce) {
  .rp-wrap * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}