/* Prosper Labs — legal page typography (v9.34)
   assets/css/pl-legal.css

   The base theme styles .pl-legal-content h2 / h3 / p / a / strong and
   stops there. It never styled ul or li, so every bulleted list on the
   Refund Policy page — 18 items across four lists — fell back to browser
   defaults: 40px of indent, the wrong text colour, no spacing between
   items. Against the styled paragraphs above them they read as broken.

   Loaded only on the three legal templates, after the main stylesheet,
   so it can refine without competing with anything else on the site. */

/* ── Rhythm ─────────────────────────────────────────────────────────
   Legal text is scanned, not read start to finish, so the section
   headings need to be findable. A hairline above each h2 gives the eye
   somewhere to stop without adding a box for every clause. */
.pl-legal-content > h2 {
  padding-top: 26px;
  border-top: 1px solid var(--border, #e9e2f5);
  letter-spacing: -.01em;
}
.pl-legal-content > h2:first-child {
  padding-top: 0;
  border-top: 0;
  margin-top: 0;
}

.pl-legal-content > p:last-child { margin-bottom: 0; }

/* ── Lists — the actual gap ─────────────────────────────────────────
   Matched to .pl-legal-content p: same colour, same line-height, so a
   bulleted clause and a paragraph clause read as the same document.
   list-style is set explicitly rather than relied on, because several
   components in this theme reset it globally and load order is not
   something a legal page should depend on. */
.pl-legal-content ul,
.pl-legal-content ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: #4d4762;
  line-height: 1.7;
}
.pl-legal-content ul { list-style: disc; }
.pl-legal-content ol { list-style: decimal; }

.pl-legal-content li {
  margin-bottom: 9px;
  padding-left: 4px;
}
.pl-legal-content li:last-child { margin-bottom: 0; }
.pl-legal-content li::marker { color: var(--purple, #5421AF); }

/* Nested lists stay legible rather than marching off the left edge. */
.pl-legal-content li > ul,
.pl-legal-content li > ol { margin: 9px 0 0; }

.pl-legal-content li strong { color: var(--text, #100820); }

/* ── Links ──────────────────────────────────────────────────────────
   Underlined on purpose. The global `a { text-decoration: none }` is
   right for navigation and wrong here: in a policy document a
   cross-reference has to be visibly a cross-reference, especially the
   one pointing at the authoritative refund policy. */
.pl-legal-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}
.pl-legal-content a:hover { text-decoration-thickness: 2px; }

/* ── Editor content ─────────────────────────────────────────────────
   These pages fall back to template copy today, but the moment someone
   pastes revised terms into the WP editor the output is whatever the
   block editor emits. Cover the common blocks so that switch does not
   silently regress the page. */
.pl-legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: .92rem;
}
.pl-legal-content th,
.pl-legal-content td {
  border: 1px solid var(--border, #e9e2f5);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: #4d4762;
}
.pl-legal-content th { background: #faf7ff; color: var(--text, #100820); font-weight: 800; }

.pl-legal-content blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-left: 3px solid var(--purple, #5421AF);
  background: #faf7ff;
  border-radius: 0 12px 12px 0;
  color: #4d4762;
}
.pl-legal-content hr {
  border: 0;
  border-top: 1px solid var(--border, #e9e2f5);
  margin: 32px 0;
}
.pl-legal-content img { border-radius: 12px; margin: 0 0 18px; }

/* Long URLs and support addresses must not push the column sideways. */
.pl-legal-content { overflow-wrap: break-word; }

/* ── Mobile ─────────────────────────────────────────────────────────
   The screenshot that started this was a phone. The header's
   clamp(2.4rem, 5vw, 4rem) at line-height .9 is fine for "TERMS OF
   SERVICE" but tight for the longer "REFUND & RETURN POLICY", so the
   line-height opens up a little on small screens. */
@media (max-width: 640px) {
  .pl-legal-page { padding: 36px 0 56px; }
  .pl-legal-header { margin-bottom: 32px; padding-bottom: 24px; }
  .pl-legal-header h1 { line-height: .98; }
  .pl-legal-content > h2 { font-size: 1.2rem; margin-top: 28px; padding-top: 20px; }
  .pl-legal-content h3 { font-size: 1.02rem; }
  .pl-legal-content p,
  .pl-legal-content ul,
  .pl-legal-content ol { font-size: .95rem; }
  .pl-legal-content ul,
  .pl-legal-content ol { padding-left: 19px; }

  /* Tables cannot reflow, so they scroll inside their own box rather
     than making the whole page scroll sideways. */
  .pl-legal-content table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Printing a policy is a normal thing to do in a dispute. */
@media print {
  .pl-legal-page { padding: 0; }
  .pl-legal-content > h2 { page-break-after: avoid; }
  .pl-legal-content ul,
  .pl-legal-content ol,
  .pl-legal-content p { page-break-inside: avoid; }
  .pl-legal-content a { text-decoration: underline; }
  .pl-legal-content a::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
}


/* ════════════════════════════════════════════════════════════════════
   v10.2 — THE POLICY PAGES, DESIGNED
   Terms · Privacy · Shipping & Returns · Refund & Return Policy

   Layout comes from inc/legal-pages.php (pl_legal_tabs / pl_legal_body).
   Everything here is scoped to .pl-legal-page--v2, so a policy template
   that has not been moved over keeps the plain typography above.
   ════════════════════════════════════════════════════════════════════ */

.pl-legal-page--v2 {
  padding: 46px 0 96px;
  background: linear-gradient(180deg, #f7f3ff 0, #fbf9ff 320px, #fff 620px);
}

/* ── header ── */
.pl-legal-page--v2 .pl-legal-header {
  margin-bottom: 34px;
  padding-bottom: 0;
  border-bottom: 0;
}
.pl-legal-page--v2 .pl-legal-header h1 { line-height: .96; margin: 14px 0 14px; }

.pl-legal-page--v2 .pl-legal-header p.pl-legal-lede {
  max-width: 640px;
  margin: 0 auto 12px;
  color: #3d3654;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.55;
}
.pl-legal-page--v2 .pl-legal-header p.pl-legal-updated {
  margin: 0;
  color: #857d99;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
}

/* ── move between the policies ── */
.pl-legal-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.pl-legal-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid rgba(84, 33, 175, .16);
  border-radius: 999px;
  background: #fff;
  color: #3a2470;
  font-size: .84rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.pl-legal-tabs a:hover { border-color: rgba(84, 33, 175, .42); background: #f6f0ff; color: #33108A; }
.pl-legal-tabs a:focus-visible { outline: 3px solid rgba(155, 92, 245, .55); outline-offset: 2px; }
.pl-legal-tabs a.is-on {
  border-color: #5421AF;
  background: #5421AF;
  color: #fff;
  box-shadow: 0 8px 20px rgba(84, 33, 175, .24);
}

/* ── the policy at a glance (refund page) ── */
.pl-legal-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto 30px;
  padding: 0;
  list-style: none;
}
.pl-legal-facts li {
  padding: 20px 20px 18px;
  border: 1px solid #ece5f8;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(40, 16, 90, .06);
}
.pl-legal-facts__ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: #f1eaff;
  color: #5421AF;
}
.pl-legal-facts b {
  display: block;
  color: #120d20;
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1.1;
}
.pl-legal-facts li > span:last-child {
  display: block;
  margin-top: 6px;
  color: #5d5674;
  font-size: .86rem;
  line-height: 1.45;
}

/* ── "On this page" + the sections ── */
.pl-legal-page--v2 .pl-legal-body { max-width: 1120px; }

.pl-legal-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}
.pl-legal-layout--plain { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin: 0 auto; }

.pl-legal-toc {
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 140px);
  padding: 18px 12px 14px;
  border: 1px solid #ece5f8;
  border-radius: 20px;
  background: #fff;
  overflow: auto;
}
.pl-legal-toc__title {
  display: block;
  margin: 0 0 10px 10px;
  color: #5421AF;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.pl-legal-toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pl-legal-toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: #4d4762;
  font-size: .84rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.pl-legal-toc a:hover { background: #f6f0ff; color: #33108A; }
.pl-legal-toc a.is-on { background: #f1eaff; color: #33108A; font-weight: 800; }

/* sub-headings of a long section */
.pl-legal-toc ol.pl-legal-toc__sub { gap: 0; margin: 2px 0 6px 10px; padding-left: 8px; border-left: 2px solid #efe9f8; }
.pl-legal-toc__sub a { padding: 6px 10px; font-size: .8rem; font-weight: 600; color: #6a6280; }
.pl-legal-sec h3[id] { scroll-margin-top: 112px; }

.pl-legal-main { display: grid; gap: 14px; min-width: 0; }

.pl-legal-sec {
  padding: 26px 30px 26px;
  border: 1px solid #ece5f8;
  border-radius: 22px;
  background: #fff;
  scroll-margin-top: 112px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.pl-legal-sec--intro { background: #fbf9ff; }
.pl-legal-sec:target { border-color: #b99cf3; box-shadow: 0 0 0 4px rgba(155, 92, 245, .14); }

.pl-legal-sec.pl-legal-content > h2,
.pl-legal-sec.pl-legal-content > h2:first-child {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: #120d20;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.pl-legal-sec.pl-legal-content > h3 { margin: 22px 0 8px; }
.pl-legal-sec.pl-legal-content > h2 + h3 { margin-top: 4px; }
.pl-legal-sec > :last-child { margin-bottom: 0; }

/* ── pieces used inside sections ── */
.pl-legal-content p.pl-legal-callout {
  margin: 4px 0 0;
  padding: 14px 16px;
  border-left: 3px solid #5421AF;
  border-radius: 0 14px 14px 0;
  background: #f6f1ff;
  color: #3a3350;
}

/* things that ARE refunded: green ticks */
.pl-legal-content ul.pl-legal-checks,
.pl-legal-content ul.pl-legal-nos {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.pl-legal-content ul.pl-legal-checks li,
.pl-legal-content ul.pl-legal-nos li {
  position: relative;
  margin: 0;
  padding: 12px 14px 12px 46px;
  border-radius: 14px;
  background: #f7fbf8;
  color: #3f3a52;
  line-height: 1.55;
}
.pl-legal-content ul.pl-legal-checks li::before,
.pl-legal-content ul.pl-legal-nos li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1f8a55 no-repeat center / 12px 12px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.5l4 4 8-8'/%3E%3C/svg%3E");
}
/* things that are NOT: a neutral dash */
.pl-legal-content ul.pl-legal-nos li { background: #f7f5fb; }
.pl-legal-content ul.pl-legal-nos li::before {
  background-color: #8a829c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M5 10h10'/%3E%3C/svg%3E");
}

/* the four time limits */
.pl-legal-content ul.pl-legal-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 16px;
  padding: 0;
  list-style: none;
}
.pl-legal-content ul.pl-legal-times li {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #ece5f8;
  border-radius: 16px;
  background: #fbf9ff;
}
.pl-legal-content ul.pl-legal-times strong { display: block; color: #120d20; font-size: .95rem; font-weight: 850; line-height: 1.3; }
.pl-legal-content ul.pl-legal-times span { display: block; margin-top: 3px; color: #5d5674; font-size: .9rem; line-height: 1.45; }
.pl-legal-content ul.pl-legal-times b { color: #33108A; font-weight: 800; }

/* approved → submitted → posted */
.pl-legal-content ol.pl-legal-flow,
.pl-legal-content ol.pl-legal-steps {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: plstep;
}
.pl-legal-content ol.pl-legal-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pl-legal-content ol.pl-legal-flow li {
  position: relative;
  margin: 0;
  padding: 44px 16px 16px;
  border: 1px solid #ece5f8;
  border-radius: 16px;
  background: #fbf9ff;
  counter-increment: plstep;
}
.pl-legal-content ol.pl-legal-flow li::before,
.pl-legal-content ol.pl-legal-steps li::before {
  content: counter(plstep);
  position: absolute;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #5421AF;
  color: #fff;
  font-size: .74rem;
  font-weight: 900;
  line-height: 1;
}
.pl-legal-content ol.pl-legal-flow li::before { left: 16px; top: 14px; }
.pl-legal-content ol.pl-legal-flow strong,
.pl-legal-content ol.pl-legal-steps strong { display: block; color: #120d20; font-size: .97rem; font-weight: 850; line-height: 1.3; }
.pl-legal-content ol.pl-legal-flow span,
.pl-legal-content ol.pl-legal-steps span { display: block; margin-top: 4px; color: #5d5674; font-size: .9rem; line-height: 1.5; }
.pl-legal-content ol.pl-legal-flow b,
.pl-legal-content ol.pl-legal-steps b { color: #120d20; font-weight: 800; }

/* how to ask, as numbered steps */
.pl-legal-content ol.pl-legal-steps { display: grid; gap: 10px; }
.pl-legal-content ol.pl-legal-steps li {
  position: relative;
  margin: 0;
  padding: 14px 16px 14px 54px;
  border-radius: 16px;
  background: #f7f4fd;
  counter-increment: plstep;
}
.pl-legal-content ol.pl-legal-steps li::before { left: 16px; top: 15px; }

.pl-legal-content p.pl-legal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }

.pl-legal-btn,
.pl-legal-content a.pl-legal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1.5px solid rgba(84, 33, 175, .24);
  border-radius: 999px;
  background: #fff;
  color: #33108A;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.pl-legal-btn:hover,
.pl-legal-content a.pl-legal-btn:hover { background: #f6f0ff; border-color: rgba(84, 33, 175, .45); text-decoration: none; }
.pl-legal-btn--solid,
.pl-legal-content a.pl-legal-btn--solid {
  border-color: #5421AF;
  background: linear-gradient(135deg, #5421AF 0%, #7a3fe0 100%);
  color: #fff;
  box-shadow: 0 12px 26px rgba(84, 33, 175, .28);
}
.pl-legal-btn--solid:hover,
.pl-legal-content a.pl-legal-btn--solid:hover { background: linear-gradient(135deg, #4a1c9c 0%, #6f36d4 100%); color: #fff; transform: translateY(-1px); }
.pl-legal-btn:focus-visible { outline: 3px solid rgba(155, 92, 245, .55); outline-offset: 2px; }

/* ── "Need help?" at the foot ── */
.pl-legal-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 6px;
  padding: 24px 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, #1b0f3a 0%, #33108A 100%);
  color: #fff;
}
.pl-legal-help__copy strong { display: block; font-size: 1.12rem; font-weight: 900; letter-spacing: -.015em; line-height: 1.25; }
.pl-legal-help__copy span { display: block; margin-top: 5px; color: rgba(255, 255, 255, .78); font-size: .9rem; line-height: 1.5; }
.pl-legal-help__actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 10px; }
.pl-legal-help .pl-legal-btn { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; }
.pl-legal-help .pl-legal-btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); }
.pl-legal-help .pl-legal-btn--solid { border-color: #fff; background: #fff; color: #33108A; box-shadow: none; }
.pl-legal-help .pl-legal-btn--solid:hover { background: #f1eaff; color: #33108A; }

/* ── tablet and phone ── */
@media (max-width: 980px) {
  .pl-legal-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }

  /* "On this page" becomes a row of buttons you can swipe. */
  .pl-legal-toc {
    position: static;
    max-height: none;
    padding: 12px 0 12px 14px;
    overflow: hidden;
  }
  .pl-legal-toc__title { margin: 0 0 8px 2px; }
  .pl-legal-toc ol {
    display: flex;
    gap: 6px;
    padding-right: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .pl-legal-toc ol::-webkit-scrollbar { display: none; }
  .pl-legal-toc li { flex: 0 0 auto; }
  /* On a phone the sub-headings join the same row of buttons. */
  .pl-legal-toc > ol > li { display: contents; }
  .pl-legal-toc ol.pl-legal-toc__sub { display: contents; }
  .pl-legal-toc__sub a { font-size: .8rem; color: #4d4762; }
  .pl-legal-toc a {
    padding: 9px 13px;
    border: 1px solid rgba(84, 33, 175, .16);
    border-radius: 999px;
    font-size: .8rem;
    white-space: nowrap;
  }

  .pl-legal-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (max-width: 640px) {
  .pl-legal-page--v2 { padding: 30px 0 64px; }
  .pl-legal-page--v2 .pl-legal-header { margin-bottom: 24px; padding-bottom: 0; }
  .pl-legal-page--v2 .pl-legal-header p.pl-legal-lede { font-size: 1rem; }

  .pl-legal-tabs { gap: 6px; margin-top: 18px; }
  .pl-legal-tabs a { min-height: 38px; padding: 0 13px; font-size: .78rem; }

  .pl-legal-facts { margin-bottom: 20px; }
  .pl-legal-facts li { padding: 15px 14px 14px; border-radius: 18px; }
  .pl-legal-facts__ic { width: 36px; height: 36px; margin-bottom: 10px; border-radius: 11px; }
  .pl-legal-facts b { font-size: 1.08rem; }
  .pl-legal-facts li > span:last-child { font-size: .8rem; }

  .pl-legal-sec { padding: 20px 18px 20px; border-radius: 18px; scroll-margin-top: 96px; }
  .pl-legal-sec.pl-legal-content > h2,
  .pl-legal-sec.pl-legal-content > h2:first-child { font-size: 1.14rem; margin: 0 0 10px; padding: 0; }

  .pl-legal-content ul.pl-legal-times { grid-template-columns: minmax(0, 1fr); }
  .pl-legal-content ol.pl-legal-flow { grid-template-columns: minmax(0, 1fr); }
  .pl-legal-content ol.pl-legal-flow li { padding: 14px 16px 14px 54px; }
  .pl-legal-content ol.pl-legal-flow li::before { top: 15px; }

  .pl-legal-content p.pl-legal-actions .pl-legal-btn { flex: 1 1 100%; }

  .pl-legal-help { flex-direction: column; align-items: stretch; padding: 22px 20px; }
  .pl-legal-help__actions .pl-legal-btn { flex: 1 1 0; }
}

@media print {
  .pl-legal-page--v2 { background: none; }
  .pl-legal-tabs, .pl-legal-toc, .pl-legal-help, .pl-legal-content p.pl-legal-actions { display: none !important; }
  .pl-legal-layout { display: block; }
  .pl-legal-sec { border: 0; padding: 0 0 14px; }
  .pl-legal-facts { display: block; }
}
