/* eLink Signature — Privacy Policy + Terms of Use pages.
 *
 * These are PUBLIC pages: no session required, no auth.js, no pages.js. A
 * prospective customer, a regulator or Stripe's review team has to be able to
 * read them without an account, so nothing here may call requireAuth() and
 * nothing here may render account data.
 *
 * Loads AFTER app.css (design tokens only). Layout mirrors the reference:
 * pill badge -> big centred title -> section-nav rail | document column. */

/* the editor's app-shell scroll lock (app.css html{overflow:hidden}) must not
 * leak into these standalone pages — html is the one scroll container */
html { overflow: auto; }
body.legal {
  overflow: visible; height: auto; min-height: 100%;
  color: var(--ink);
  /* the faint engineering-grid wash behind the header */
  background:
    linear-gradient(rgba(15, 23, 42, .028) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(15, 23, 42, .028) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(900px 460px at 50% -6%, rgba(75, 147, 255, .09), transparent 62%),
    #fbfcfe;
}

/* ---------- header ---------- */
.lg-head { text-align: center; padding: 54px 24px 10px; }
.lg-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font-weight: 600; font-size: 13px; color: var(--ink);
  text-decoration: none; box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 18px rgba(15, 23, 42, .06);
  transition: border-color .15s, transform .15s;
}
.lg-pill:hover { border-color: #cfe1ff; transform: translateY(-1px); }
.lg-pill svg { color: var(--blue); flex: none; }
.lg-title {
  font-size: clamp(38px, 7vw, 74px); font-weight: 800; letter-spacing: -.035em;
  line-height: 1.04; margin: 26px 0 0;
}
/* --ink-3 (#94a3b8) measures 2.5:1 here — below the 4.5:1 AA floor at this size.
 * The effective/updated pair is the most legally operative line on the page, so
 * it uses the darker ink. (Same bump the Aug 8 review made to badges/segments.) */
.lg-dates {
  margin: 18px 0 0; font-size: 12.5px; color: var(--ink-2);
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}

/* ---------- two-column body ---------- */
.lg-wrap {
  max-width: 1240px; margin: 0 auto; padding: 34px 24px 90px;
  display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 0;
  align-items: start;
}
.lg-nav {
  position: sticky; top: 26px; padding: 8px 30px 8px 4px;
  max-height: calc(100vh - 52px); overflow-y: auto;
}
.lg-nav a {
  display: block; padding: 11px 0; font-size: 14.5px; line-height: 1.4;
  color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent;
  padding-left: 12px; margin-left: -14px; transition: color .15s, border-color .15s;
}
.lg-nav a:hover { color: var(--ink); }
.lg-nav a.active { color: var(--ink); font-weight: 600; border-left-color: var(--blue); }

.lg-doc {
  border-left: 1px solid var(--line); padding: 8px 0 0 46px;
  min-width: 0; font-size: 15.5px; line-height: 1.72; color: #263449;
}
.lg-doc h2 {
  font-size: 25px; font-weight: 800; letter-spacing: -.02em; color: var(--ink);
  margin: 46px 0 14px; scroll-margin-top: 22px;
}
.lg-doc h2:first-of-type { margin-top: 8px; }
.lg-doc h3 {
  font-size: 16px; font-weight: 700; color: var(--ink); margin: 26px 0 8px;
}
.lg-doc p { margin: 0 0 16px; }
.lg-doc ul { margin: 0 0 16px; padding-left: 22px; }
.lg-doc li { margin-bottom: 9px; }
.lg-doc a { color: var(--blue); text-decoration: none; }
.lg-doc a:hover { text-decoration: underline; }
.lg-doc strong { color: var(--ink); font-weight: 650; }
.lg-lead { font-size: 16.5px; color: var(--ink-2); }

/* callout for the plain-language notes that matter commercially */
.lg-note {
  border: 1px solid var(--line); border-left: 3px solid var(--blue);
  background: #f7faff; border-radius: 10px; padding: 14px 18px; margin: 0 0 18px;
  font-size: 14.5px;
}
.lg-note p:last-child { margin-bottom: 0; }

/* wide content must scroll inside itself, never widen the page */
.lg-tablewrap { overflow-x: auto; margin: 0 0 18px; -webkit-overflow-scrolling: touch; }
.lg-doc table {
  border-collapse: collapse; width: 100%; min-width: 540px; font-size: 13.5px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.lg-doc th, .lg-doc td {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.lg-doc th { font-weight: 650; color: var(--ink); background: #f8fafd; font-size: 12.5px; }
.lg-doc tr:last-child td { border-bottom: 0; }

/* the all-caps liability blocks read as shouting at body size */
.lg-caps { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }

/* ---------- footer ---------- */
.lg-foot {
  border-top: 1px solid var(--line); background: #fff;
  padding: 22px 24px; text-align: center; font-size: 12px; color: var(--ink-2);
}
.lg-foot a { color: var(--ink-2); text-decoration: none; margin: 0 9px; }
.lg-foot a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .lg-wrap { grid-template-columns: minmax(0, 1fr); padding-top: 18px; }
  .lg-nav {
    position: static; max-height: none; overflow: visible; padding: 0 0 18px;
    border-bottom: 1px solid var(--line); margin-bottom: 22px;
    columns: 2; column-gap: 24px;
  }
  .lg-nav a { padding: 7px 0 7px 10px; margin-left: 0; font-size: 13.5px; break-inside: avoid; }
  .lg-doc { border-left: 0; padding-left: 0; font-size: 15px; }
  .lg-head { padding-top: 34px; }
}
@media (max-width: 560px) {
  .lg-nav { columns: 1; }
  .lg-doc h2 { font-size: 21px; margin-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-pill { transition: none; }
  html { scroll-behavior: auto; }
}
