/* ============================================================
   DSK studio — юридические страницы
   Общий стиль для privacy / terms / cookies (RU и EN).
   Шапка повторяет .nav основного сайта, логотип — фирменный
   растр из assets/images (тот же файл, что в шапке главной,
   поэтому переиспользуется браузерный кэш).
   Токены namespace-нуты под --lg-*, чтобы не конфликтовать
   с site.css, если страницы окажутся рядом.
   ============================================================ */

:root {
  --lg-ink: #0B0B10;
  --lg-paper: #FAFAFC;
  --lg-fog: #F1F3F8;
  --lg-surface: #FFFFFF;
  --lg-line: rgba(2, 6, 23, .12);
  --lg-line-soft: rgba(2, 6, 23, .07);
  --lg-muted: rgba(2, 6, 23, .62);
  --lg-muted2: rgba(2, 6, 23, .44);
  --lg-accent: #81D8D0;
  --lg-accent-deep: #1F8A80;
  --lg-shadow: 0 24px 60px rgba(11, 11, 16, .10);
  --lg-shadow-soft: 0 8px 24px rgba(11, 11, 16, .06);
  --lg-radius: 22px;
  --lg-maxw: 1248px;
  --lg-logo: url("../images/dsk-ru-black.png");
}

html.dark {
  --lg-ink: #F4F5FA;
  --lg-paper: #0B0B10;
  --lg-fog: #12131A;
  --lg-surface: #101119;
  --lg-line: rgba(241, 245, 249, .14);
  --lg-line-soft: rgba(241, 245, 249, .08);
  --lg-muted: rgba(241, 245, 249, .74);
  --lg-muted2: rgba(241, 245, 249, .52);
  --lg-accent-deep: #81D8D0;
  --lg-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  --lg-shadow-soft: 0 10px 30px rgba(0, 0, 0, .35);
  --lg-logo: url("../images/dsk-ru-white.png");
}

html[lang="en"] { --lg-logo: url("../images/dsk-en-black.png"); }
html.dark[lang="en"] { --lg-logo: url("../images/dsk-en-whtie.png"); }

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
  background: var(--lg-paper);
}

body {
  margin: 0;
  background: var(--lg-paper);
  color: var(--lg-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- Индикатор прочитанного ---------- */

.lgProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--lg-accent);
  z-index: 60;
  will-change: transform;
}

/* ---------- Шапка: повторяет .nav основного сайта ---------- */

.lgTop {
  position: sticky;
  top: 12px;
  z-index: 50;
}

.lgNav {
  width: min(var(--lg-maxw), calc(100% - 32px));
  margin: 12px auto 0;
  border: 1px solid rgba(197, 206, 222, .44);
  border-radius: 20px;
  background: rgba(255, 255, 255, .34);
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 22px 50px rgba(9, 12, 24, .16),
    inset 0 1px 0 rgba(255, 255, 255, .62),
    inset 0 -1px 0 rgba(149, 162, 186, .24);
}

html.dark .lgNav {
  border-color: rgba(226, 231, 238, .15);
  background: rgba(9, 11, 16, .88);
  backdrop-filter: blur(20px) saturate(1.04);
  -webkit-backdrop-filter: blur(20px) saturate(1.04);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .07),
    inset 0 -1px 0 rgba(255, 255, 255, .035);
}

/* кнопка «на главную» слева */
.lgBack {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 9px 15px;
  border: 1px solid var(--lg-line);
  background: rgba(255, 255, 255, .92);
  color: var(--lg-ink);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .25s ease, box-shadow .25s ease;
}

html.dark .lgBack { background: rgba(255, 255, 255, .06); }
.lgBack:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(17, 12, 46, .12); }

/* логотип */
.lgBrand {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
}

.lgMark {
  display: block;
  flex: 0 0 auto;
  /* размер как в шапке основного сайта (site.css .mark) */
  width: 112px;
  height: 74px;
  background-image: var(--lg-logo);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform: translateY(2px) scale(1.74);
  transform-origin: center center;
  transition: transform .35s ease;
}

html.dark .lgMark { filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .36)); }
.lgBrand:hover .lgMark { transform: translateY(0) scale(1.74); }

.lgBrandCopy {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding-left: 11px;
}

.lgBrandCopy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(11, 11, 16, .06), rgba(11, 11, 16, .22), rgba(11, 11, 16, .06));
  transform: translateY(-50%);
}

html.dark .lgBrandCopy::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .24), rgba(255, 255, 255, .06));
}

.lgBrandTitle {
  display: grid;
  gap: 2px;
  color: rgba(30, 36, 48, .78);
  font-size: 10px;
  line-height: .96;
  font-weight: 430;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.lgBrandTitle span { display: block; }
html.dark .lgBrandTitle { color: rgba(236, 241, 247, .88); }

/* ссылки на соседние документы */
.lgLinks {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.lgLinks::-webkit-scrollbar { display: none; }

.lgLinks a {
  color: var(--lg-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.lgLinks a:hover { color: var(--lg-ink); }

.lgLinks a[aria-current="page"] {
  color: var(--lg-ink);
  border-bottom-color: var(--lg-accent);
}

.lgActions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: none;
}

.lgLang {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--lg-line);
  background: rgba(255, 255, 255, .92);
}

html.dark .lgLang { background: rgba(255, 255, 255, .06); }

.lgLang a {
  color: var(--lg-muted);
  font-weight: 800;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.lgLang a:hover { color: var(--lg-ink); }

.lgLang a[aria-current="page"] {
  background: var(--lg-ink);
  color: var(--lg-paper);
}

.lgIconBtn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--lg-line);
  background: rgba(255, 255, 255, .92);
  color: var(--lg-ink);
  cursor: pointer;
  padding: 0;
  transition: transform .25s ease, box-shadow .25s ease;
}

html.dark .lgIconBtn { background: rgba(255, 255, 255, .06); }
.lgIconBtn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(17, 12, 46, .12); }
.lgIconBtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lgIconSun { display: none; }
html.dark .lgIconSun { display: block; }
html.dark .lgIconMoon { display: none; }

/* ---------- Обложка документа ---------- */

.lgHero {
  width: min(var(--lg-maxw), calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 26px;
}

.lgEyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lg-muted2);
  margin: 0 0 16px;
}

.lgTitle {
  font-family: "Russo One", Inter, "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 20px;
  max-width: 20ch;
}

.lgStamp {
  display: inline-block;
  padding-left: 14px;
  border-left: 2px solid var(--lg-accent);
  color: var(--lg-muted);
  font-size: 14px;
}

/* ---------- Раскладка ---------- */

.lgLayout {
  width: min(var(--lg-maxw), calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 88px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* ---------- Оглавление ---------- */

.lgToc {
  position: sticky;
  top: 118px;
  max-height: calc(100vh - 142px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}

.lgTocTitle {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lg-muted2);
  margin: 0 0 14px;
}

.lgTocList {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--lg-line);
}

.lgTocList a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--lg-muted);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.45;
  transition: color .18s ease, border-color .18s ease;
}

.lgTocList a:hover { color: var(--lg-ink); }

.lgTocList a.is-active {
  color: var(--lg-ink);
  border-left-color: var(--lg-accent);
  font-weight: 600;
}

/* ---------- Текст документа ---------- */

.lgDoc {
  background: var(--lg-surface);
  border: 1px solid var(--lg-line);
  border-radius: var(--lg-radius);
  padding: clamp(22px, 3.4vw, 46px);
  box-shadow: var(--lg-shadow);
}

.lgNote {
  padding: 15px 18px;
  margin: 0 0 32px;
  border-left: 2px solid var(--lg-accent);
  background: var(--lg-fog);
  color: var(--lg-muted);
  font-size: 14px;
  line-height: 1.65;
}

.lgDoc section { scroll-margin-top: 118px; }
.lgDoc section + section { margin-top: 40px; }

.lgDoc h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.005em;
  margin: 0 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--lg-line-soft);
}

.lgDoc section:first-of-type h2 { border-top: 0; padding-top: 0; }

.lgNum {
  flex: none;
  color: var(--lg-muted2);
  font-size: 15px;
  font-weight: 400;
  font-family: "Russo One", Inter, sans-serif;
  font-variant-numeric: tabular-nums;
}

.lgAnchor {
  margin-left: auto;
  opacity: 0;
  color: var(--lg-muted2);
  text-decoration: none;
  font-size: 15px;
  transition: opacity .18s ease, color .18s ease;
}

.lgDoc h2:hover .lgAnchor,
.lgAnchor:focus-visible { opacity: 1; }
.lgAnchor:hover { color: var(--lg-accent-deep); }

.lgDoc p { margin: 0 0 14px; max-width: 74ch; }
.lgDoc p:last-child { margin-bottom: 0; }

.lgDoc ul {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  max-width: 74ch;
}

.lgDoc li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
}

.lgDoc li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .82em;
  width: 10px;
  height: 1.5px;
  background: var(--lg-accent);
}

.lgDoc a {
  color: var(--lg-accent-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(129, 216, 208, .5);
  transition: border-color .18s ease;
}

.lgDoc a:hover { border-bottom-color: var(--lg-accent-deep); }
.lgDoc strong { font-weight: 650; color: var(--lg-ink); }

.lgDoc code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .9em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--lg-fog);
  border: 1px solid var(--lg-line-soft);
}

/* ---------- Подвал ---------- */

.lgFoot {
  border-top: 1px solid var(--lg-line-soft);
  background: var(--lg-fog);
}

.lgFootInner {
  width: min(var(--lg-maxw), calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  color: var(--lg-muted2);
  font-size: 13.5px;
}

.lgFootInner a {
  color: var(--lg-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.lgFootInner a:hover { color: var(--lg-ink); border-bottom-color: var(--lg-accent); }
.lgFootSpacer { flex: 1 1 auto; }

.lgUp {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--lg-line);
  background: var(--lg-surface);
  color: var(--lg-ink);
  cursor: pointer;
  box-shadow: var(--lg-shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  z-index: 55;
}

.lgUp.is-visible { opacity: 1; visibility: visible; transform: none; }
.lgUp:hover { transform: translateY(-2px); }
.lgUp svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Доступность ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lg-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.lgSkip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 10px 16px;
  background: var(--lg-ink);
  color: var(--lg-paper);
  border-radius: 10px;
  font-weight: 600;
  z-index: 100;
}

.lgSkip:focus { left: 20px; }

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
  .lgLinks { display: none; }
}

@media (max-width: 980px) {
  .lgLayout { grid-template-columns: minmax(0, 1fr); gap: 26px; }

  .lgToc {
    position: static;
    max-height: none;
    overflow: visible;
    border: 1px solid var(--lg-line);
    border-radius: 16px;
    background: var(--lg-surface);
    padding: 16px 18px;
  }

  .lgTocList { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); border-left: 0; }
  .lgTocList a { border-left: 0; padding-left: 0; }
  .lgTocList a.is-active { border-left: 0; }
}

@media (max-width: 720px) {
  .lgNav { gap: 10px; padding: 9px 12px; }
  .lgBack span { display: none; }
  .lgBack { padding: 9px 12px; }
  .lgBrandCopy { display: none; }
  .lgMark { width: 66px; height: 42px; transform: translateY(1px) scale(1.42); }
  .lgHero { padding: 32px 0 18px; }
  .lgUp { right: 14px; bottom: 14px; }
  .lgDoc p, .lgDoc ul { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Печать ---------- */

@media print {
  .lgTop, .lgToc, .lgUp, .lgProgress, .lgFoot { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .lgLayout { display: block; width: auto; padding: 0; }
  .lgDoc { border: 0; box-shadow: none; padding: 0; background: #fff; }
  .lgDoc a { color: #000; border: 0; }
  .lgDoc section { break-inside: avoid-page; }
  .lgTitle { font-size: 22pt; }
}
