/* Loanable CRM legal pages: Terms, Privacy, DPA, Cookies.
   A hero with the document switcher, a reading-progress bar, a sticky
   "On this page" list that follows the reader (scroll-spy with a sliding
   indicator), an "In short" summary, and sections that settle in as they
   scroll into view. Also used, trimmed down, inside the CRM's Terms prompt. */

.lg { --lg-accent: #4b367c; --lg-accent-2: #7c5cc4; --lg-soft: #f4f0fb; --lg-ink: #16141f; --lg-text: #34323d; --lg-muted: #6c6a78; --lg-line: rgba(22, 20, 31, .09); --lg-ease: cubic-bezier(.22, 1, .36, 1); }

/* Reading progress */
.lg-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; }
.lg-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lg-accent-2), var(--lg-accent)); box-shadow: 0 0 12px rgba(124, 92, 196, .55); border-radius: 0 3px 3px 0; transition: width .12s linear; }

/* Hero */
.lg-hero { position: relative; overflow: hidden; padding: 128px 0 34px; border-bottom: 1px solid var(--lg-line); }
.lg-hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 80% at 12% 0%, rgba(124, 92, 196, .16), transparent 70%),
    radial-gradient(50% 70% at 92% 10%, rgba(75, 54, 124, .12), transparent 70%),
    linear-gradient(180deg, #fbfaff 0%, #ffffff 100%); }
.lg-hero-bg::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(75, 54, 124, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(75, 54, 124, .06) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000 30%, transparent 75%); mask-image: radial-gradient(70% 90% at 50% 0%, #000 30%, transparent 75%); }
.lg-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.lg-eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(75, 54, 124, .16); color: var(--lg-accent); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; backdrop-filter: blur(6px); box-shadow: 0 1px 2px rgba(22, 20, 31, .05); }
.lg-ico { display: inline-block; flex: none; width: 18px; height: 18px; vertical-align: middle; }
.lg-eyebrow .lg-ico { width: 18px; height: 18px; }
.lg-hero h1 { margin: 16px 0 10px; font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.025em; color: var(--lg-ink); }
.lg-lede { max-width: 640px; margin: 0; font-size: 17px; line-height: 1.6; color: var(--lg-muted); }
.lg-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.lg-meta span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: rgba(255, 255, 255, .75); border: 1px solid var(--lg-line); color: var(--lg-text); font-size: 12.5px; font-weight: 500; }
.lg-meta .lg-ico { width: 17px; height: 17px; color: var(--lg-accent); }

/* Document switcher: pills with a sliding highlight */
.lg-tabs { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 28px; padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, .7); border: 1px solid var(--lg-line); box-shadow: 0 1px 2px rgba(22, 20, 31, .04); backdrop-filter: blur(8px); }
.lg-tabs a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; color: var(--lg-muted); font-size: 14px; font-weight: 600; text-decoration: none; transition: color .25s var(--lg-ease); white-space: nowrap; }
.lg-tabs a:hover { color: var(--lg-ink); }
.lg-tabs a[aria-current="page"] { color: #fff; }
.lg-tabs .lg-ico { width: 19px; height: 19px; transition: transform .35s var(--lg-ease); }
.lg-tabs a:hover .lg-ico { transform: translateY(-1px) rotate(-4deg); }
.lg-tabs .lg-tab-pill { position: absolute; z-index: 0; top: 5px; left: 5px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--lg-accent-2), var(--lg-accent)); box-shadow: 0 6px 18px -8px rgba(75, 54, 124, .7); transition: transform .45s var(--lg-ease), width .45s var(--lg-ease); }

/* Body: contents + document */
.lg-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 56px; padding-top: 44px; padding-bottom: 96px; }
.lg-toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; scrollbar-width: none; }
.lg-toc::-webkit-scrollbar { display: none; }
.lg-toc-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lg-muted); }
.lg-toc-list { position: relative; list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--lg-line); }
.lg-toc-list a { display: block; padding: 6px 0; color: var(--lg-muted); font-size: 13.5px; line-height: 1.35; text-decoration: none; transition: color .2s ease, transform .2s var(--lg-ease); }
.lg-toc-list a:hover { color: var(--lg-ink); transform: translateX(2px); }
.lg-toc-list a.is-active { color: var(--lg-ink); font-weight: 600; }
.lg-toc-indicator { position: absolute; left: -1.5px; top: 0; width: 2.5px; height: 0; border-radius: 3px; background: linear-gradient(180deg, var(--lg-accent-2), var(--lg-accent)); opacity: 0; transition: transform .4s var(--lg-ease), height .4s var(--lg-ease), opacity .3s ease; }
.lg-toc-actions { display: grid; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--lg-line); }
.lg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--lg-line); background: #fff; color: var(--lg-ink); font: inherit; font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .15s; }
.lg-btn:hover { border-color: rgba(75, 54, 124, .35); box-shadow: 0 6px 16px -10px rgba(75, 54, 124, .5); }
.lg-btn:active { transform: translateY(1px) scale(.99); }
.lg-btn .lg-ico { width: 19px; height: 19px; color: var(--lg-accent); }
.lg-toc-title .lg-ico { width: 18px; height: 18px; color: var(--lg-accent); }
.lg-btn-quiet { justify-content: flex-start; border-color: transparent; background: var(--lg-soft); color: var(--lg-accent); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-help { font-size: 12.5px; line-height: 1.5; color: var(--lg-muted); }
.lg-help a { color: var(--lg-accent); font-weight: 600; text-decoration: none; }
.lg-mobile-toc { display: none; }

/* The document */
.lg-doc { min-width: 0; color: var(--lg-text); font-size: 16px; line-height: 1.75; }
.lg-doc a { color: var(--lg-accent); font-weight: 600; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .3s var(--lg-ease); }
.lg-doc a:hover { background-size: 100% 1.5px; }
.lg-doc strong { color: var(--lg-ink); }
.lg-doc code { font-size: 13px; padding: 2px 7px; border-radius: 6px; background: var(--lg-soft); color: var(--lg-accent); font-weight: 600; }
.lg-intro { margin-bottom: 26px; font-size: 16.5px; }
.lg-keypoints { position: relative; margin: 0 0 34px; padding: 22px 24px 18px; border-radius: 18px; background: linear-gradient(135deg, #faf8ff, #f4f0fb); border: 1px solid rgba(75, 54, 124, .14); overflow: hidden; }
.lg-keypoints::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--lg-accent-2), var(--lg-accent)); }
.lg-keypoints h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; letter-spacing: .01em; color: var(--lg-ink); }
.lg-keypoints h2 .lg-ico { width: 22px; height: 22px; color: var(--lg-accent); }
.lg-keypoints ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lg-keypoints li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.55; }
.lg-keypoints li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.6' fill='%234b367c' opacity='.3'/%3E%3Cpath d='M7.8 12.4l2.8 2.8 5.6-6' fill='none' stroke='%234b367c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.lg-keypoints p { margin: 14px 0 0; font-size: 12.5px; color: var(--lg-muted); }

.lg-sec { padding: 6px 0 10px; border-top: 1px solid var(--lg-line); }
.lg-sec:first-of-type { border-top: 0; }
.lg-sec h2 { position: relative; display: flex; align-items: center; gap: 12px; margin: 28px 0 12px; font-size: 21px; line-height: 1.3; letter-spacing: -.01em; color: var(--lg-ink); scroll-margin-top: 96px; }
.lg-num { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9px; background: var(--lg-soft); color: var(--lg-accent); font-size: 13.5px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(75, 54, 124, .14); }
.lg-anchor { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; margin-left: 2px; color: var(--lg-muted) !important; font-weight: 500 !important; background: none !important; opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s var(--lg-ease); }
.lg-sec h2:hover .lg-anchor, .lg-anchor:focus-visible { opacity: 1; transform: none; }
.lg-anchor .lg-ico { width: 17px; height: 17px; }
.lg-anchor:hover { color: var(--lg-accent) !important; background: var(--lg-soft) !important; }
.lg-anchor.is-copied::after { content: "Link copied"; position: absolute; margin: -2px 0 0 10px; padding: 3px 8px; border-radius: 6px; background: var(--lg-ink); color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.lg-sec h3 { margin: 22px 0 6px; font-size: 16px; color: var(--lg-ink); }
.lg-sec p { margin: 0 0 14px; }
.lg-sec ul { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 9px; }
.lg-sec li { position: relative; padding-left: 22px; }
.lg-sec li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--lg-accent-2), var(--lg-accent)); box-shadow: 0 0 0 3px rgba(124, 92, 196, .12); }
.lg-caps { font-size: 14px; letter-spacing: .005em; }

/* Settle in as you scroll */
.lg-js .lg-sec { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--lg-ease), transform .6s var(--lg-ease); }
.lg-js .lg-sec.is-in { opacity: 1; transform: none; }
.lg-hero .lg-rise { opacity: 0; transform: translateY(12px); animation: lgRise .7s var(--lg-ease) forwards; }
.lg-hero .lg-rise:nth-child(2) { animation-delay: .06s; } .lg-hero .lg-rise:nth-child(3) { animation-delay: .12s; } .lg-hero .lg-rise:nth-child(4) { animation-delay: .18s; } .lg-hero .lg-rise:nth-child(5) { animation-delay: .24s; }
@keyframes lgRise { to { opacity: 1; transform: none; } }

/* Back to top */
.lg-top { position: fixed; right: 22px; bottom: 22px; z-index: 150; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--lg-line); background: rgba(255, 255, 255, .92); color: var(--lg-accent); box-shadow: 0 12px 28px -14px rgba(22, 20, 31, .4); backdrop-filter: blur(8px); cursor: pointer; opacity: 0; transform: translateY(10px) scale(.95); pointer-events: none; transition: opacity .3s, transform .3s var(--lg-ease); }
.lg-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.lg-top .lg-ico { width: 20px; height: 20px; }

/* Phones and tablets: the contents become a dropdown */
@media (max-width: 900px) {
  .lg-hero { padding-top: 104px; }
  .lg-body { grid-template-columns: 1fr; gap: 0; padding-top: 22px; }
  .lg-toc { display: none; }
  .lg-mobile-toc { display: block; margin: 0 0 22px; border: 1px solid var(--lg-line); border-radius: 14px; background: #fff; }
  .lg-mobile-toc summary > span { display: inline-flex; align-items: center; gap: 8px; }
  .lg-mobile-toc summary .lg-ico { color: var(--lg-accent); }
  .lg-mobile-toc summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--lg-ink); cursor: pointer; list-style: none; }
  .lg-mobile-toc summary::-webkit-details-marker { display: none; }
  .lg-mobile-toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--lg-muted); border-bottom: 2px solid var(--lg-muted); transform: rotate(45deg); transition: transform .25s var(--lg-ease); }
  .lg-mobile-toc[open] summary::after { transform: rotate(225deg); }
  .lg-mobile-toc ul { list-style: none; margin: 0; padding: 0 16px 12px; }
  .lg-mobile-toc a { display: block; padding: 7px 0; color: var(--lg-text); font-size: 14px; text-decoration: none; border-top: 1px solid var(--lg-line); }
  .lg-tabs { display: flex; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
}

/* Embedded in the CRM's Terms prompt */
.lg-embed { margin: 0; background: #fff; font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif; }
.lg-embed .lg-doc { padding: 22px 24px 40px; font-size: 14.5px; line-height: 1.7; }
.lg-embed .lg-embed-head { padding: 20px 24px 0; }
.lg-embed .lg-embed-head h1 { margin: 0; font-size: 22px; color: var(--lg-ink); }
.lg-embed .lg-embed-head p { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12.5px; color: var(--lg-muted); }
.lg-embed .lg-embed-head .lg-ico { width: 15px; height: 15px; color: var(--lg-accent); }
.lg-embed .lg-sec h2 { font-size: 17px; margin: 22px 0 10px; scroll-margin-top: 12px; }
.lg-embed .lg-num { min-width: 26px; height: 26px; font-size: 12px; }
.lg-embed .lg-intro { font-size: 14.5px; margin-bottom: 18px; }
.lg-embed .lg-keypoints { margin-bottom: 22px; padding: 16px 18px 14px; }
.lg-embed .lg-keypoints li { font-size: 13.5px; }
.lg-embed .lg-keypoints h2 { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .lg-js .lg-sec, .lg-hero .lg-rise { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .lg-toc-indicator, .lg-tabs .lg-tab-pill, .lg-progress span { transition: none; }
}

@media print {
  .topbar, footer, .lg-toc, .lg-tabs, .lg-progress, .lg-top, .lg-mobile-toc, .lg-hero-bg { display: none !important; }
  .lg-hero { padding: 0 0 12px; border: 0; }
  .lg-body { display: block; padding: 0; }
  .lg-js .lg-sec { opacity: 1; transform: none; }
  .lg-doc a { color: inherit; }
}
