/* Документы (/offer/, /privacy/): спокойное чтение длинного текста.
   Тот же язык, что на сайте: тёмный фон, золотые номера разделов, оглавление сбоку. */

.lg { max-width: 1240px; }
.lg-head { padding: clamp(28px, 5vh, 64px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.lg-title { hyphens: auto; overflow-wrap: break-word; margin: 0; max-width: 24ch; font: 800 clamp(1.75rem, 1rem + 2.6vw, 3.25rem)/1.08 var(--font-display); letter-spacing: -.025em; text-wrap: balance; }
.lg-sub { margin-top: 16px; font-size: 1rem; color: var(--muted); }
.lg-langnote[hidden] { display: none; }
.lg-langnote { display: inline-block; margin-top: 16px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .875rem; color: var(--gold-light); }

.lg-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding: clamp(28px, 4vw, 48px) 0 clamp(48px, 7vw, 96px); }

/* Оглавление */
.lg-layout > * { min-width: 0; }
.lg-toc { position: sticky; top: 20px; align-self: start; max-height: calc(100vh - 40px); overflow-y: auto; }
.lg-toc__h { margin: 0 0 12px; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.lg-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.lg-toc a {
  display: grid; grid-template-columns: 28px 1fr; gap: 6px; padding: 7px 10px; border-radius: 10px;
  font-size: .875rem; line-height: 1.35; color: var(--muted); text-decoration: none;
  transition: background .2s, color .2s;
}
.lg-toc a span { font: 600 .75rem/1.6 var(--font-display); color: var(--gold); }
.lg-toc a:hover, .lg-toc a.is-current { background: rgba(212, 175, 55, .08); color: var(--text); }
.lg-toc__other { display: inline-block; margin-top: 18px; padding: 0 10px; font-size: .875rem; font-weight: 600; color: var(--gold-light); text-decoration: none; }
.lg-toc__other:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Текст документа */
.lg-doc { max-width: 46rem; }
.lg-sec { padding-top: 12px; scroll-margin-top: 24px; }
.lg-sec + .lg-sec { margin-top: clamp(28px, 3vw, 40px); }
.lg-h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 16px; font: 700 clamp(1.25rem, 1rem + .7vw, 1.625rem)/1.2 var(--font-display); letter-spacing: -.015em; }
.lg-h2__n {
  flex: none; font: 800 1.5em/1 var(--font-display);
  background: linear-gradient(165deg, #fff4c4 0%, #e8c96a 28%, #c9a227 52%, #f0d878 78%, #a67c00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lg-p { margin: 0 0 12px; font-size: 1rem; line-height: 1.7; color: rgba(242, 239, 232, .88); scroll-margin-top: 24px; }
.lg-p__n { font-weight: 700; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.lg-p b, .lg-ul b { color: var(--text); }
.lg-doc a { color: var(--gold-light); text-decoration-color: rgba(212, 175, 55, .45); text-underline-offset: 3px; overflow-wrap: anywhere; }
.lg-ul { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; }
.lg-ul li { position: relative; padding-left: 22px; font-size: 1rem; line-height: 1.6; color: rgba(242, 239, 232, .88); }
.lg-ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.lg-table { margin: 6px 0 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.lg-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .9375rem; }
.lg-table th, .lg-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .06); line-height: 1.4; }
.lg-table thead th { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); background: rgba(212, 175, 55, .06); }
.lg-table tbody th { font-weight: 600; color: var(--text); }
.lg-table td { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-table tbody tr:last-child > * { border-bottom: 0; }

.lg-req { display: grid; margin: 0; padding: 8px 22px; border: 1px solid rgba(212, 175, 55, .35); border-radius: 18px; background: rgba(212, 175, 55, .04); }
.lg-req > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.lg-req > div:last-child { border-bottom: 0; }
.lg-req dt { font-size: .875rem; color: var(--muted); }
.lg-req dd { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .lg-layout { grid-template-columns: 1fr; gap: 24px; }
  .lg-toc { position: static; max-height: none; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-card); }
  .lg-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .lg-toc ol { grid-template-columns: 1fr; }
  .lg-p, .lg-ul li { font-size: .9375rem; }
  .lg-req { padding: 6px 16px; }
  .lg-table { overflow: visible; }
  .lg-table table { min-width: 0; table-layout: fixed; font-size: .8125rem; }
  .lg-table th, .lg-table td { padding: 10px 10px; white-space: normal; overflow-wrap: anywhere; }
  .lg-table thead th { font-size: .625rem; letter-spacing: .04em; }
  .lg-req > div { grid-template-columns: 1fr; gap: 2px; }
}
