/* ============================================================
   FinancialAIvisor legal pages: /terms-of-service and /privacy-policy only (2026-10-17).
   The leadsystemsgo.com legal layout (contents panel, section anchors, "The short version"
   box, readable ALL-CAPS blocks) in FinancialAIvisor's navy, blue and type.
   Loaded after styles.css. Rules are scoped under .lg-page and .lg so nothing here reaches
   any other page. Never use text-transform here: the legal copy must display exactly as written.
   ============================================================ */

.lg-page {
  --lg-navy: #090E1A;
  --lg-navy-2: #0B1324;
  --lg-ink: #0F172A;
  --lg-body: #334155;
  --lg-muted: #64748B;
  --lg-rule: #E2E8F0;
  --lg-rule-strong: #CBD5E1;
  --lg-paper: #FFFFFF;
  --lg-page: #F4F6FA;
  --lg-tint: #EFF4FF;
  --lg-tint-rule: #C7D7FE;
  --lg-blue: #2563EB;
  --lg-blue-text: #1D4ED8;
  --lg-blue-light: #93C5FD;
  background: var(--lg-navy);
}

/* A deep link (/terms-of-service#arbitration) lands at once instead of animating through the
   whole document. Only these two pages load this file. */
html:has(.lg[data-legal-body]) { scroll-behavior: auto; }

.lg-skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--lg-ink);
  font-weight: 600;
}
.lg-skip:focus { top: 12px; }

/* ── The page's own header and footer (same content as before, in the site's colours) ── */
.lg-page .legal-page { min-height: 100vh; background: var(--lg-page); }

.lg-page .legal-header {
  background: var(--lg-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
}
.lg-page .legal-header .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lg-page .legal-header .logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.lg-page .legal-header .logo span { color: var(--lg-blue); }
.lg-page .legal-header .back-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--lg-blue-light);
}
.lg-page .legal-header .back-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.lg-page .legal-footer {
  background: var(--lg-navy);
  padding: 32px 16px 36px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #8292AA;
}
.lg-page .legal-footer .faiv-disclosure {
  max-width: 760px;
  margin: 14px auto 0;
  font-size: 0.82rem;
  color: #8292AA;
}

@media (min-width: 768px) {
  .lg-page .legal-header .container { padding: 0 24px; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.lg {
  --lg-offset: 1.5rem;
  display: block;
  background: var(--lg-page);
  color: var(--lg-body);
}
.lg .lg-hero {
  background: linear-gradient(180deg, var(--lg-navy) 0%, var(--lg-navy-2) 100%);
  padding: 56px 16px 60px;
  text-align: center;
}
.lg .lg-hero__in { max-width: 760px; margin: 0 auto; }
.lg .lg-hero h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #fff;
}
.lg .lg-hero__sub {
  max-width: 34rem;
  margin: 1rem auto 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  line-height: 1.45;
  color: #C7D2E0;
}
.lg .lg-hero__sub strong { font-weight: 500; color: inherit; }
.lg .lg-hero__date {
  margin: 1rem 0 0;
  font-size: 0.94rem;
  color: #8292AA;
}

/* ── Layout ───────────────────────────────────────────────── */
.lg .lg-body { padding: 1.5rem 0 4rem; }
.lg .lg-layout { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.lg .lg-doc {
  min-width: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--lg-body);
  overflow-wrap: break-word;
}
@media (min-width: 768px) {
  .lg .lg-hero { padding: 72px 24px 80px; }
  .lg .lg-body { padding: 3rem 0 5rem; }
  .lg .lg-layout { padding: 0 24px; }
  .lg .lg-doc {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 3.5rem 3.25rem;
    background: var(--lg-paper);
    border: 1px solid var(--lg-rule);
    border-radius: 16px;
    font-size: 1.0625rem;
    line-height: 1.75;
  }
}
@media (min-width: 1024px) {
  .lg .lg-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 820px);
    justify-content: center;
    gap: 3rem;
    align-items: start;
  }
  .lg .lg-doc { margin: 0; }
}

/* ── Text ─────────────────────────────────────────────────── */
.lg .lg-doc p { margin: 0 0 1rem; color: var(--lg-body); }
.lg .lg-doc strong { font-weight: 600; color: var(--lg-ink); }
.lg .lg-doc a {
  color: var(--lg-blue-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.lg .lg-doc a:hover { color: var(--lg-ink); }
.lg a:focus-visible,
.lg summary:focus-visible {
  outline: 2px solid var(--lg-blue);
  outline-offset: 2px;
  border-radius: 3px;
}
.lg .lg-intro p:first-child { font-size: 1.0625em; color: var(--lg-ink); }

.lg .lg-ul,
.lg .lg-ol { margin: 0 0 1.25rem; padding: 0; list-style: none; }
.lg .lg-ul > li { position: relative; padding-left: 1.375rem; margin-bottom: 0.5rem; }
.lg .lg-ul > li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lg-blue);
}
.lg .lg-ol > li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); margin-bottom: 0.5rem; }
.lg .lg-ol__n {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--lg-blue-text);
  font-variant-numeric: tabular-nums;
}

.lg .lg-rule { border: 0; border-top: 1px solid var(--lg-rule); margin: 2.25rem 0 0; }

/* ── Short version ────────────────────────────────────────── */
.lg .lg-short {
  margin: 2rem 0 0;
  padding: 1.375rem 1.25rem 1.25rem;
  background: var(--lg-tint);
  border: 1px solid var(--lg-tint-rule);
  border-radius: 14px;
  scroll-margin-top: var(--lg-offset);
}
.lg .lg-short__title {
  margin: 0 0 0.625rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--lg-ink);
}
.lg .lg-short p { font-size: 0.9688em; }
.lg .lg-short .lg-ul { margin-bottom: 0; }
.lg .lg-short .lg-ul > li { color: var(--lg-ink); }
@media (min-width: 768px) {
  .lg .lg-short { padding: 1.75rem 2rem 1.625rem; }
  .lg .lg-short__title { font-size: 1.375rem; }
}

/* ── Sections ─────────────────────────────────────────────── */
.lg .lg-sec { margin-top: 2.5rem; scroll-margin-top: var(--lg-offset); }
.lg .lg-sec + .lg-sec { border-top: 1px solid var(--lg-rule); }
.lg .lg-anchor { display: block; height: 0; scroll-margin-top: var(--lg-offset); }
.lg [id^="section-"] { scroll-margin-top: var(--lg-offset); }
.lg .lg-h2 {
  position: relative;
  margin: 0 0 1rem;
  padding-top: 2.25rem;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--lg-ink);
}
.lg .lg-rule + .lg-sec { margin-top: 2.25rem; }
.lg .lg-rule + .lg-sec .lg-h2 { padding-top: 0; }
.lg .lg-h2__num { color: var(--lg-blue-text); font-variant-numeric: tabular-nums; }
.lg .lg-h2 .lg-selflink {
  position: relative;
  margin-left: 0.25rem;
  padding: 0 0.25rem;
  font-weight: 500;
  color: #94A3B8;
  text-decoration: none;
  opacity: 0;
  transition: opacity 120ms ease, color 120ms ease;
}
.lg .lg-h2:hover .lg-selflink,
.lg .lg-h2 .lg-selflink:focus-visible { opacity: 1; }
.lg .lg-h2 .lg-selflink:hover { color: var(--lg-blue-text); }
.lg .lg-h2 .lg-selflink.is-copied { opacity: 1; color: var(--lg-blue-text); }
.lg .lg-h2 .lg-selflink.is-copied::after {
  content: "Link copied";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--lg-navy);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
}
@media (hover: none) { .lg .lg-h2 .lg-selflink { opacity: 0.6; } }
/* on a phone the "#" would wrap onto a line of its own; the contents links do the same job there */
@media (max-width: 767px) { .lg .lg-h2 .lg-selflink { display: none; } }

/* Clause numbers hang in the margin once there is room for them */
@media (min-width: 768px) {
  .lg .lg-sec { padding-left: 3.25rem; margin-left: -3.25rem; }
  .lg .lg-doc { padding-left: 6.75rem; }
  .lg .lg-sec + .lg-sec { border-top: 0; }
  .lg .lg-sec + .lg-sec .lg-h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: -3.25rem;
    right: 0;
    border-top: 1px solid var(--lg-rule);
  }
  .lg .lg-h2 { font-size: 1.5rem; }
  .lg .lg-h2__num { position: absolute; left: -3.25rem; width: 2.75rem; }
  .lg .lg-intro,
  .lg .lg-short,
  .lg .lg-doc > .lg-rule,
  .lg .lg-top { margin-left: -3.25rem; }
}

/* ── ALL-CAPS liability blocks: smaller, tracked a little, on a quiet panel so they stay readable ── */
.lg .lg-caps {
  margin: 0 0 1.25rem;
  padding: 1rem 1rem 1rem 1.125rem;
  background: #F8FAFC;
  border: 1px solid var(--lg-rule-strong);
  border-left: 3px solid var(--lg-navy);
  border-radius: 4px 10px 10px 4px;
  font-size: 0.875rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
  color: var(--lg-ink);
}
.lg .lg-caps p { color: var(--lg-ink); }
.lg .lg-caps p:last-child,
.lg .lg-caps .lg-ul:last-child { margin-bottom: 0; }
.lg .lg-caps strong { letter-spacing: 0; }
.lg .lg-caps .lg-ul > li { margin-bottom: 0.375rem; }
.lg .lg-caps .lg-ul > li::before { background: var(--lg-navy); }
@media (min-width: 768px) {
  .lg .lg-caps { padding: 1.25rem 1.5rem 1.25rem 1.375rem; font-size: 0.9375rem; letter-spacing: 0.015em; }
}

/* ── Contact block ────────────────────────────────────────── */
.lg .lg-address {
  font-style: normal;
  padding-left: 1rem;
  border-left: 3px solid var(--lg-blue);
  color: var(--lg-ink);
}

.lg .lg-top {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--lg-rule);
  font-size: 0.9375rem;
}

/* ── Contents ─────────────────────────────────────────────── */
.lg .lg-toc { margin: 0 0 1.5rem; }
.lg .lg-toc__box { background: var(--lg-paper); border: 1px solid var(--lg-rule); border-radius: 12px; }
.lg .lg-toc__summary {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--lg-ink);
}
.lg .lg-toc__summary::-webkit-details-marker { display: none; }
.lg .lg-toc__summary::after {
  content: "";
  margin-left: auto;
  align-self: center;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--lg-muted);
  border-bottom: 2px solid var(--lg-muted);
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
.lg .lg-toc__box[open] .lg-toc__summary::after { transform: rotate(-135deg); }
.lg .lg-toc__count { font-family: var(--font-body); font-weight: 400; font-size: 0.875rem; color: var(--lg-muted); }
.lg .lg-toc__list { list-style: none; margin: 0; padding: 0.25rem 0.5rem 0.75rem; border-top: 1px solid var(--lg-rule); }
.lg .lg-toc__list a {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  padding: 0.4375rem 0.5rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--lg-body);
}
.lg .lg-toc__list a:hover { background: var(--lg-page); color: var(--lg-ink); }
.lg .lg-toc__n { color: var(--lg-muted); font-variant-numeric: tabular-nums; }
.lg .lg-toc__list a[aria-current] { background: var(--lg-tint); color: var(--lg-ink); font-weight: 500; }
.lg .lg-toc__list a[aria-current] .lg-toc__n { color: var(--lg-blue-text); }

@media (min-width: 768px) {
  .lg .lg-toc { max-width: 820px; margin: 0 auto 1.5rem; }
}
@media (min-width: 1024px) {
  .lg .lg-toc { position: sticky; top: 1.5rem; margin: 0; max-width: none; }
  .lg .lg-toc__box { background: transparent; border: 0; border-radius: 0; }
  .lg .lg-toc__summary { cursor: default; padding: 0 0.5rem 0.75rem; border-bottom: 1px solid var(--lg-rule); }
  .lg .lg-toc__summary::after { display: none; }
  .lg .lg-toc__list {
    position: relative;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.5rem 0.25rem 0.5rem 0;
    border-top: 0;
    scrollbar-width: thin;
  }
  .lg .lg-toc__list a { font-size: 0.875rem; padding: 0.3125rem 0.5rem; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .lg-page .legal-header,
  .lg-page .legal-footer,
  .lg-skip,
  .lg .lg-toc,
  .lg .lg-selflink,
  .lg .lg-top { display: none !important; }
  .lg-page, .lg-page .legal-page, .lg, .lg .lg-hero { background: #fff; color: #000; }
  .lg .lg-hero { padding: 0 0 1rem; }
  .lg .lg-hero h1, .lg .lg-hero__sub, .lg .lg-hero__date { color: #000; }
  .lg .lg-layout { display: block; padding: 0; }
  .lg .lg-doc { border: 0; padding: 0; max-width: none; font-size: 11pt; }
  .lg .lg-doc a { color: #000; }
}
