/* NowaFit — Legal pages */

.lg-page { background: var(--bg); min-height: 100vh; }

/* NAV */
.lg-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(11,15,20,.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.lg-logo {
  font-family: var(--font-h);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-100);
  text-decoration: none;
}
.lg-logo em { font-style: normal; color: var(--mint); }
.lg-back {
  font-size: .8rem;
  color: var(--text-400);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color .2s;
}
.lg-back:hover { color: var(--mint); }

/* HERO */
.lg-hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}
.lg-hero__label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 10px;
}
.lg-hero__title {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-100);
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.lg-hero__sub {
  font-size: .9rem;
  color: var(--text-400);
}

/* LAYOUT */
.lg-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 48px 0 80px;
  align-items: flex-start;
}

/* TOC */
.lg-toc {
  position: sticky;
  top: 76px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.lg-toc__title {
  font-family: var(--font-h);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-600);
  margin-bottom: 12px;
}
.lg-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lg-toc__list a {
  font-size: .8rem;
  color: var(--text-400);
  text-decoration: none;
  display: block;
  padding: 4px 8px;
  border-radius: 5px;
  line-height: 1.4;
  transition: all .15s;
}
.lg-toc__list a:hover {
  color: var(--mint);
  background: var(--bg-2);
}

/* CONTENT */
.lg-content { min-width: 0; }

.lg-meta {
  font-size: .8rem;
  color: var(--text-600);
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.lg-intro {
  font-size: .9rem;
  color: var(--text-400);
  line-height: 1.8;
  margin-bottom: 36px;
  padding: 18px 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-mint);
  border-radius: 8px;
}

.lg-group { margin-bottom: 40px; }
.lg-group__title {
  font-family: var(--font-h);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--mint);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.lg-section { margin-bottom: 28px; scroll-margin-top: 80px; }
.lg-section__title {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 12px;
}
.lg-section p {
  font-size: .875rem;
  color: var(--text-400);
  line-height: 1.8;
  margin-bottom: 8px;
}
.lg-section ul, .lg-section ol {
  margin: 8px 0 8px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.lg-section ul li, .lg-section ol li {
  font-size: .875rem;
  color: var(--text-400);
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
}
.lg-section ul li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: var(--mint);
  font-size: 1.1rem;
  line-height: 1;
  top: 2px;
}
.lg-section ol { counter-reset: ol-counter; }
.lg-section ol li { counter-increment: ol-counter; padding-left: 20px; }
.lg-section ol li::before {
  content: counter(ol-counter) ".";
  position: absolute;
  left: 0;
  color: var(--text-600);
  font-size: .8rem;
  top: 2px;
}
.lg-section strong { color: var(--text-100); font-weight: 600; }
.lg-section a { color: var(--mint); }

/* CTA */
.lg-cta {
  margin-top: 48px;
  padding: 32px;
  background: var(--bg-1);
  border: 1px solid var(--border-mint);
  border-radius: 14px;
  text-align: center;
}
.lg-cta__title {
  font-family: var(--font-h);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 8px;
}
.lg-cta__text {
  font-size: .875rem;
  color: var(--text-400);
  margin-bottom: 20px;
}
.lg-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--mint);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: var(--font-h);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}
.lg-cta .btn:hover { background: var(--mint-dim); }

/* FOOTER */
.lg-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--text-600);
}
.lg-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.lg-footer a { color: var(--text-600); text-decoration: underline; text-decoration-color: var(--border); }
.lg-footer a:hover { color: var(--mint); }

/* RESPONSIVE */
@media (max-width: 760px) {
  .lg-layout { grid-template-columns: 1fr; gap: 0; }
  .lg-toc { position: static; margin-bottom: 28px; }
  .lg-hero { padding: 32px 0 28px; }
}

/* ── Классы оригинального legal_base.html ─────────────────────────── */

.legal-hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}
.legal-hero .container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.legal-hero__title {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-100);
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.legal-hero__subtitle { font-size: .9rem; color: var(--text-400); }

.legal-content { padding: 48px 0 80px; }
.legal-content .container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.legal-content__inner { max-width: 780px; }

.document-meta {
  font-size: .8rem;
  color: var(--text-600);
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.toc {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 36px;
}
.toc__title {
  font-family: var(--font-h);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-600);
  margin-bottom: 10px;
}
.toc__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc__list a {
  font-size: .825rem;
  color: var(--text-400);
  text-decoration: none;
  display: block;
  padding: 3px 8px;
  border-radius: 5px;
  line-height: 1.4;
  transition: all .15s;
}
.toc__list a:hover { color: var(--mint); background: var(--bg-2); }

.intro-section {
  font-size: .9rem;
  color: var(--text-400);
  line-height: 1.8;
  margin-bottom: 32px;
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-mint);
  border-radius: 8px;
}
.intro-section p + p { margin-top: 8px; }

.rules-group { margin-bottom: 40px; }
.rules-group__title {
  font-family: var(--font-h);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--mint);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.rule-item { margin-bottom: 28px; scroll-margin-top: 80px; }
.rule-item__title {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 12px;
}
.rule-item p {
  font-size: .875rem;
  color: var(--text-400);
  line-height: 1.8;
  margin-bottom: 8px;
}
.rule-item ul, .rule-item ol {
  margin: 8px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rule-item ul li, .rule-item ol li {
  font-size: .875rem;
  color: var(--text-400);
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
}
.rule-item ul li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: var(--mint);
  font-size: 1.1rem;
  line-height: 1;
  top: 2px;
}
.rule-item ol { counter-reset: li-counter; }
.rule-item ol li { counter-increment: li-counter; }
.rule-item ol li::before {
  content: counter(li-counter) ".";
  position: absolute;
  left: 0;
  color: var(--text-600);
  font-size: .8rem;
  top: 2px;
}
.rule-item strong { color: var(--text-100); font-weight: 600; }
.rule-item a { color: var(--mint); }

/* Оферта */
.legal-section { margin-bottom: 28px; scroll-margin-top: 80px; }
.legal-section__title {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 12px;
}
.legal-section p {
  font-size: .875rem;
  color: var(--text-400);
  line-height: 1.8;
  margin-bottom: 8px;
}
.legal-section ul, .legal-section ol {
  margin: 8px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.legal-section ul li, .legal-section ol li {
  font-size: .875rem;
  color: var(--text-400);
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
}
.legal-section ul li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: var(--mint);
  font-size: 1.1rem;
  line-height: 1;
  top: 2px;
}
.legal-section ol { counter-reset: li-counter; }
.legal-section ol li { counter-increment: li-counter; }
.legal-section ol li::before {
  content: counter(li-counter) ".";
  position: absolute;
  left: 0;
  color: var(--text-600);
  font-size: .8rem;
  top: 2px;
}
.legal-section strong { color: var(--text-100); font-weight: 600; }
.legal-section a { color: var(--mint); }
.legal-columns { list-style: none; }

.full-offer-link {
  margin: 24px 0;
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  color: var(--text-400);
}
.full-offer-link p + p { margin-top: 6px; }

/* CTA в правовых страницах */
.legal-cta {
  margin-top: 48px;
  padding: 32px;
  background: var(--bg-1);
  border: 1px solid var(--border-mint);
  border-radius: 14px;
  text-align: center;
}
.legal-cta__title {
  font-family: var(--font-h);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 8px;
}
.legal-cta__text {
  font-size: .875rem;
  color: var(--text-400);
  margin-bottom: 20px;
}
.legal-cta .btn--primary, .legal-cta .btn--large {
  display: inline-flex;
  align-items: center;
  padding: 11px 24px;
  background: var(--mint);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: var(--font-h);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}
.legal-cta .btn--primary:hover, .legal-cta .btn--large:hover { background: var(--mint-dim); }
