/* ------------------------------------------------------------------
   Страницы документов: политика, согласие, соглашение
   (Figma «СОГЛАШЕНИЯ» 334:11909; десктоп 335:12192 / 335:12193 /
   334:11911, планшет 338:12899…12903, телефон 338:12900…12904).
   Десктоп — сцена 1600 px, масштабируется через --s (legal.js).
   ------------------------------------------------------------------ */

.lg {
  position: relative;
  overflow-x: clip;
}

.lg__glow {
  position: absolute;
  top: -360px;
  right: -200px;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: rgba(117, 32, 252, 0.2);
  filter: blur(140px);
  pointer-events: none;
  zoom: var(--s, 1);
}

.lg__in {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: 1600px;
  margin: 0 auto;
  padding: 180px 100px 120px;
  zoom: var(--s, 1);
}

/* ---------- Заголовок и вкладки ---------- */

.lg-ov,
.lg-toc__h,
.lg-rel__h {
  font: 600 12px/16px var(--font-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lg-ov { color: var(--c-lime); }

.lg-title {
  margin-top: 20px;
  font: 400 60px/66px var(--font-display);
  letter-spacing: -0.02em;
}

.lg-lead { display: none; }

.lg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.lg-tab {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 19px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: #1d1d1f;
  font: 400 16px/20px var(--font-display);
  transition: background-color .2s, border-color .2s;
}
.lg-tab:hover { border-color: rgba(255, 255, 255, 0.24); }
.lg-tab.is-active {
  border-color: var(--c-lime);
  background: var(--c-lime);
  color: var(--c-ink);
}

.lg-intro {
  color: rgba(255, 255, 255, 0.72);
  font-size: 20px;
  line-height: 30px;
}

/* ---------- Оглавление + текст ---------- */

.lg-body {
  display: grid;
  grid-template-columns: 420px 900px;
  justify-content: space-between;
  align-items: start;
}

.lg-toc,
.lg-card,
.lg-rel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #18171e;
}

.lg-toc {
  position: sticky;
  top: 120px;
  padding: 31px;
  border-radius: 24px;
}
.lg-toc__h { color: rgba(255, 255, 255, 0.55); }
.lg-toc ol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.lg-toc a {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 24px;
  transition: color .2s;
}
.lg-toc a:hover { color: #fff; }
.lg-toc a.is-active { color: var(--c-lime); }

.lg-doc {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lg-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 31px;
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 28px;
  scroll-margin-top: 12px;
}
.lg-card h2 {
  margin: 0 0 8px;
  color: #fff;
  font: 400 24px/32px var(--font-display);
}
.lg-card b { color: #fff; font-weight: 600; }

.lg-ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lg-ul li {
  position: relative;
  padding-left: 18px;
}
.lg-ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-lime);
}

.lg-a {
  color: #9f76f7;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
  transition: color .2s;
}
.lg-a:hover { color: #c3a6ff; }

.lg-ph { color: #f7cb7a; }

/* ---------- Связанные документы ---------- */

.lg-rel__h {
  margin-top: 44px;
  color: rgba(255, 255, 255, 0.55);
}

.lg-rels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.lg-rel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 104px;
  padding: 19px 27px;
  border-radius: 24px;
  font: 400 18px/24px var(--font-display);
  transition: border-color .2s;
}
.lg-rel:hover { border-color: rgba(255, 255, 255, 0.24); }
.lg-rel svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--c-lime);
  transition: transform .2s;
}
.lg-rel:hover svg { transform: translateX(4px); }

/* ---------- Планшет ---------- */

@media (max-width: 1023px) {
  .lg__glow {
    top: -240px;
    right: -240px;
    width: 560px;
    height: 560px;
    filter: blur(96px);
  }

  .lg__in {
    gap: 40px;
    width: auto;
    padding: 128px 32px 96px;
  }

  .lg-title { margin-top: 16px; font-size: 48px; line-height: 50px; }
  .lg-lead {
    display: block;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    line-height: 22px;
  }
  .lg-tabs { margin-top: 20px; }

  .lg-intro { font-size: 16px; line-height: 22px; }

  .lg-body { display: block; }
  .lg-toc { display: none; }

  .lg-card {
    gap: 10px;
    padding: 27px 31px 31px;
    font-size: 16px;
    line-height: 21px;
  }
  .lg-card h2 { margin-bottom: 6px; font-size: 22px; line-height: 28px; }
  .lg-ul li::before { top: 8px; }

  .lg-rel__h { margin-top: 32px; }
  .lg-rels { margin-top: 12px; }
  .lg-rel { min-height: 96px; padding: 19px 23px; }
}

/* ---------- Телефон ---------- */

@media (max-width: 767px) {
  .lg__in { gap: 32px; padding: 112px 16px 80px; }

  .lg-title { font-size: 27px; line-height: 30px; }
  .lg-lead { margin-top: 16px; font-size: 16px; line-height: 20px; }
  .lg-tabs { margin-top: 20px; }
  .lg-tab {
    min-height: 38px;
    padding: 8px 15px;
    font-size: 14px;
    line-height: 18px;
  }

  .lg-intro { font-size: 16px; line-height: 20px; }

  .lg-card {
    gap: 8px;
    padding: 19px 15px;
    border-radius: 20px;
    font-size: 16px;
    line-height: 19px;
  }
  .lg-card h2 { margin-bottom: 4px; font-size: 18px; line-height: 24px; }
  .lg-ul { gap: 6px; }
  .lg-ul li { padding-left: 16px; }
  .lg-ul li::before { top: 6px; }

  .lg-rel__h { margin-top: 28px; }
  .lg-rels { grid-template-columns: 1fr; }
  .lg-rel {
    min-height: 68px;
    padding: 15px;
    border-radius: 20px;
    font-size: 16px;
    line-height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-rel svg { transition: none; }
}
