/* Документы и тарифы Protocol (/legal/*, /pricing, /delivery, /contacts).
   Визуальный язык чата: монохром, Inter, синий акцент #3D78CC, Фемида.
   Раскладка: слева разделы по группам, по центру текст (~70 знаков),
   справа оглавление длинного документа. На телефоне разделы — шторка снизу. */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/protocolrag/fonts/inter-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/protocolrag/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Тёмная тема по умолчанию (как в чате), светлая — по data-theme. */
:root {
  --bg: #000;
  --surface: #0a0a0a;
  --raise: #111;
  --hover: #161616;
  --line: #161616;
  --line-strong: #262626;
  --ink: #fff;
  --ink-2: #d4d4d4;
  --mute: #8a8a8a;
  --faint: #5c5c5c;
  --accent: #3D78CC;
  --accent-soft: rgba(61, 120, 204, .14);
  --accent-line: rgba(61, 120, 204, .45);
  --link: #9ecbff;
  --invert-bg: #fff;
  --invert-ink: #000;
  --ok: #7fb58a;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -24px rgba(0, 0, 0, .8);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --top-h: 60px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f5f7;
  --surface: #fff;
  --raise: #fafafa;
  --hover: #eeeef1;
  --line: #e5e5ea;
  --line-strong: #d1d1d6;
  --ink: #111;
  --ink-2: #333;
  --mute: #666;
  --faint: #8a8a8f;
  --accent: #26599B;
  --accent-soft: rgba(38, 89, 155, .08);
  --accent-line: rgba(38, 89, 155, .35);
  --link: #0066cc;
  --invert-bg: #111;
  --invert-ink: #fff;
  --ok: #2f7d43;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 16px 32px -20px rgba(0, 0, 0, .18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 24px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15.5px/1.7 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

.lg-skip { position: absolute; left: -9999px; top: 8px; padding: 8px 12px; background: var(--surface); border-radius: 8px; z-index: 30; }
.lg-skip:focus { left: 12px; }

/* ── Верхняя панель ─────────────────────────────────────────────── */
.lg-top {
  position: sticky; top: 0; z-index: 20;
  /* Без backdrop-filter: прилипшая панель с размытием пересчитывалась при каждой прокрутке (08.10.2026). */
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.lg-top-in {
  max-width: 1280px; margin: 0 auto; height: var(--top-h);
  padding-inline: max(20px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 14px;
}
.lg-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.lg-mark { width: 28px; height: 28px; display: block; }
.lg-mark-light { display: none; }
:root[data-theme="light"] .lg-mark-light { display: block; }
:root[data-theme="light"] .lg-mark-dark { display: none; }
.lg-word { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.lg-top-label {
  font-size: 13.5px; color: var(--mute); padding-left: 14px; border-left: 1px solid var(--line-strong);
  line-height: 18px;
}
.lg-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lg-icon-btn {
  all: unset; cursor: pointer; width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center; color: var(--mute); transition: color .2s, background .2s;
}
.lg-icon-btn:hover { color: var(--ink); background: var(--hover); }
.lg-icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lg-ico-moon { display: none; }
:root[data-theme="light"] .lg-ico-sun { display: none; }
:root[data-theme="light"] .lg-ico-moon { display: block; }
.lg-cta {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 16px;
  border-radius: 999px; background: var(--invert-bg); color: var(--invert-ink);
  font-size: 13.5px; font-weight: 600; text-decoration: none; transition: transform .2s var(--ease), opacity .2s;
}
.lg-cta:hover { opacity: .9; }
.lg-cta:active { transform: scale(.97); }
.lg-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.lg-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.lg-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* Переключатель раздела — только на телефоне */
.lg-switch { display: none; }

/* ── Каркас ─────────────────────────────────────────────────────── */
.lg-shell {
  max-width: 1280px; margin: 0 auto;
  padding: 40px max(20px, env(safe-area-inset-left, 0px)) 96px;
  display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 56px;
}
.lg-shell.has-toc { grid-template-columns: 252px minmax(0, 1fr) 220px; }

/* ── Навигация по разделам ──────────────────────────────────────── */
.lg-nav { position: sticky; top: calc(var(--top-h) + 32px); align-self: start; display: grid; gap: 26px; }
.lg-nav-head { display: none; }
.lg-nav-title {
  font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 8px 12px;
}
.lg-nav-group { display: grid; gap: 2px; }
.lg-nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px;
  font-size: 14px; line-height: 1.3; color: var(--mute); text-decoration: none;
  transition: color .2s, background .2s;
}
.lg-nav a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.lg-nav a:hover { color: var(--ink); background: var(--hover); }
.lg-nav a.active { color: var(--ink); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line-strong); }
.lg-nav a.active svg { color: var(--accent); opacity: 1; }
.lg-backdrop { display: none; }

/* ── Основная колонка ───────────────────────────────────────────── */
.lg-main { min-width: 0; max-width: 760px; outline: none; overflow-wrap: break-word; }
/* Пока содержимое грузится — блок скрыт; готово — плавно проявляется вместе с оглавлением (legal.js, reveal) */
.lg-main[aria-busy="true"], .lg-main[aria-busy="true"] ~ .lg-toc { opacity: 0; }
.lg-main[aria-busy="false"] { animation: lg-in .6s var(--ease) both; }
.lg-main[aria-busy="false"] ~ .lg-toc { animation: lg-fade .7s ease .12s both; }
.lg-nav { animation: lg-fade .5s ease both; }
@keyframes lg-fade { from { opacity: 0; } to { opacity: 1; } }
.lg-shell:not(.has-toc) .lg-main.wide { max-width: 980px; }
@keyframes lg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.lg-skeleton { display: grid; gap: 14px; }
.lg-skeleton i { display: block; height: 14px; border-radius: 7px; background: var(--raise); }
.lg-skeleton i:first-child { height: 34px; width: 64%; margin-bottom: 12px; }
.lg-skeleton i:nth-child(3) { width: 92%; } .lg-skeleton i:nth-child(5) { width: 70%; }

/* Шапка страницы */
.lg-head { margin: 0 0 34px; }
.lg-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
:root:not([data-theme="light"]) .lg-eyebrow { color: #7ea8e6; }
.lg-head h1 {
  font-size: clamp(28px, 4vw, 40px); line-height: 1.12; font-weight: 650; letter-spacing: -.025em;
  margin: 0; text-wrap: balance;
}
.lg-lead a { color: var(--link); text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); }
.lg-lead { margin: 16px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 64ch; text-wrap: pretty; }
.lg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.lg-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px;
  border-radius: 999px; font-size: 12.5px; color: var(--mute);
  background: var(--raise); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.lg-chip b { color: var(--ink); font-weight: 600; }
.lg-meta-actions { margin-left: auto; display: flex; gap: 4px; }
.lg-act {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px;
  border-radius: 999px; font-size: 12.5px; color: var(--mute); transition: color .2s, background .2s;
}
.lg-act:hover { color: var(--ink); background: var(--hover); }
.lg-act svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── Текст документа ────────────────────────────────────────────── */
.lg-doc h2 {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 20px; line-height: 1.35; font-weight: 600; letter-spacing: -.012em;
  margin: 52px 0 16px; padding-top: 28px; border-top: 1px solid var(--line); text-wrap: balance;
  position: relative;
}
.lg-doc > h2:first-child, .lg-doc > .lg-toc-m + h2 { margin-top: 0; border-top: 0; padding-top: 0; }
.lg-num {
  flex: none; min-width: 28px; height: 24px; padding: 0 7px; border-radius: 7px;
  display: inline-grid; place-items: center; transform: translateY(-2px);
  font-size: 12.5px; font-weight: 600; color: var(--mute); background: var(--raise);
  border: 1px solid var(--line-strong); font-variant-numeric: tabular-nums;
}
.lg-anchor {
  margin-left: auto; opacity: 0; color: var(--faint); text-decoration: none; font-weight: 400;
  font-size: 15px; transition: opacity .2s, color .2s;
}
.lg-doc h2:hover .lg-anchor, .lg-anchor:focus-visible { opacity: 1; }
.lg-anchor:hover { color: var(--accent); }
.lg-doc h3 { font-size: 16.5px; font-weight: 600; margin: 32px 0 10px; }
.lg-doc p, .lg-doc li { color: var(--ink-2); }
.lg-doc p { margin: 0 0 14px; text-wrap: pretty; }
.lg-doc strong { color: var(--ink); font-weight: 600; }
.lg-doc ul, .lg-doc ol { padding-left: 22px; margin: 0 0 16px; }
.lg-doc li { margin: 5px 0; padding-left: 2px; }
.lg-doc li::marker { color: var(--faint); }
.lg-doc a, .lg-link {
  color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent);
  text-underline-offset: 3px; transition: text-decoration-color .2s;
}
.lg-doc a:hover, .lg-link:hover { text-decoration-color: var(--link); }
.lg-doc hr { display: none; }
.lg-doc code { font-size: .88em; background: var(--raise); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.lg-doc blockquote {
  margin: 18px 0; padding: 14px 18px; border-radius: 14px;
  background: var(--accent-soft); color: var(--ink-2); border: 0;
}
.lg-doc blockquote p:last-child { margin-bottom: 0; }

/* Таблицы: в своей прокрутке; «ключ — значение» (пустая шапка) — как список полей */
.lg-table { margin: 8px 0 24px; border: 1px solid var(--line-strong); border-radius: 14px; overflow-x: auto; background: var(--surface); }
.lg-doc table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.lg-doc th, .lg-doc td { padding: 11px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.lg-doc thead th { border-top: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); background: var(--raise); }
.lg-doc tbody tr:first-child td { border-top: 0; }
.lg-doc thead + tbody tr:first-child td { border-top: 1px solid var(--line); }
.lg-doc td { color: var(--ink-2); }
.lg-table.kv thead { display: none; }
.lg-table.kv td:first-child { width: 30%; min-width: 130px; color: var(--mute); font-size: 13px; }
.lg-table.kv td:last-child { color: var(--ink); }

/* Оглавление внутри текста — на узком экране */
.lg-toc-m { display: none; }

/* ── Оглавление справа ──────────────────────────────────────────── */
.lg-toc { display: none; }
.lg-shell.has-toc .lg-toc:not([hidden]) {
  display: block; position: sticky; top: calc(var(--top-h) + 32px); align-self: start;
  max-height: calc(100vh - var(--top-h) - 64px); overflow: auto; scrollbar-width: thin;
}
.lg-toc-title { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.lg-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-strong); }
.lg-toc a {
  display: block; font-size: 13px; line-height: 1.4; color: var(--mute); text-decoration: none;
  padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; transition: color .2s, border-color .2s;
}
.lg-toc a:hover { color: var(--ink); }
.lg-toc a.on { color: var(--ink); border-left-color: var(--accent); }

/* ── Общие блоки служебных страниц ──────────────────────────────── */
.lg-section { margin-top: 56px; }
.lg-section > h2 { font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; margin: 0 0 8px; }
.lg-section > .lg-sub { margin: 0 0 22px; color: var(--mute); font-size: 15px; max-width: 62ch; }
.lg-card {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px;
  padding: 22px 24px;
}
.lg-note { font-size: 13.5px; line-height: 1.6; color: var(--mute); }
.lg-note a { color: var(--link); }
.lg-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.lg-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 13.5px; text-decoration: none;
  transition: background .2s, border-color .2s, color .2s;
}
.lg-pill:hover { background: var(--hover); color: var(--ink); }
.lg-pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Тарифы ─────────────────────────────────────────────────────── */
.lg-bill {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--raise); border: 1px solid var(--line-strong); margin: 0 0 22px;
}
.lg-bill button {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; color: var(--mute);
  transition: background .25s var(--ease), color .2s;
}
.lg-bill button[aria-pressed="true"] { background: var(--invert-bg); color: var(--invert-ink); font-weight: 600; }
.lg-save {
  font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px;
  color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent);
}
.lg-bill button[aria-pressed="true"] .lg-save { color: inherit; background: color-mix(in srgb, var(--invert-ink) 14%, transparent); }

.lg-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.lg-plan {
  position: relative; display: flex; flex-direction: column; gap: 18px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 20px; padding: 24px 22px 22px;
  transition: border-color .25s, transform .25s var(--ease);
}
.lg-plan:hover { border-color: color-mix(in srgb, var(--ink) 22%, var(--line-strong)); }
.lg-plan.featured { border-color: var(--accent-line); box-shadow: var(--shadow); background: linear-gradient(180deg, var(--accent-soft), transparent 46%), var(--surface); }
.lg-plan-badge {
  position: absolute; top: 20px; right: 18px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px; color: #fff; background: var(--accent);
}
.lg-plan-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.lg-plan-tag { margin-top: 3px; font-size: 13.5px; color: var(--mute); line-height: 1.45; min-height: 2.9em; }
.lg-price { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.lg-price b { font-size: 34px; line-height: 1; font-weight: 650; letter-spacing: -.03em; }
.lg-price span { font-size: 14px; color: var(--mute); }
.lg-price-sub { min-height: 20px; margin-top: 6px; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.lg-price-sub em { font-style: normal; color: var(--ok); }
.lg-feat { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; flex: 1; }
.lg-feat li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.lg-feat li svg { width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
:root:not([data-theme="light"]) .lg-feat li svg { stroke: #7ea8e6; }
.lg-feat li.muted { color: var(--faint); }
.lg-feat li.muted svg, :root:not([data-theme="light"]) .lg-feat li.muted svg { stroke: var(--faint); }
.lg-plan-btn {
  display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 12px;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: opacity .2s, background .2s, transform .2s var(--ease);
  border: 1px solid var(--line-strong); color: var(--ink); background: transparent;
}
.lg-plan-btn:hover { background: var(--hover); }
.lg-plan-btn:active { transform: scale(.98); }
.lg-plan.featured .lg-plan-btn { background: var(--invert-bg); color: var(--invert-ink); border-color: transparent; }
.lg-plan.featured .lg-plan-btn:hover { opacity: .9; }
.lg-plan-cond { font-size: 12.5px; color: var(--faint); line-height: 1.5; margin-top: -6px; }
.lg-plans-note { margin: 16px 2px 0; }

.lg-packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lg-pack { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lg-pack-title { font-size: 16px; font-weight: 600; }
.lg-pack-meta { margin-top: 3px; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.lg-pack-price { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.lg-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lg-point { display: flex; gap: 14px; }
.lg-point-ico {
  flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
:root:not([data-theme="light"]) .lg-point-ico { color: #7ea8e6; }
.lg-point-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lg-point h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.lg-point p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--mute); }

.lg-rows { padding: 6px 0; }
.lg-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 24px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2);
}
.lg-row:first-child { border-top: 0; }
.lg-row b { flex: none; width: 92px; text-align: right; font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lg-row-bar { flex: none; width: 120px; height: 4px; border-radius: 2px; background: var(--line-strong); overflow: hidden; }
.lg-row-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.lg-row-label { flex: 1; min-width: 0; }

.lg-methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.lg-method {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--raise); border: 1px solid var(--line-strong); font-size: 13.5px; color: var(--ink-2);
}
.lg-method svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--mute); }
.lg-callout {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 16px; padding: 18px 22px; border-radius: 16px; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.lg-callout b { display: block; font-weight: 600; color: var(--ink); font-size: 15px; }
.lg-callout span { font-size: 13.5px; color: var(--mute); }

/* ── Контакты ───────────────────────────────────────────────────── */
.lg-contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lg-contact { display: flex; flex-direction: column; gap: 14px; }
.lg-contact-top { display: flex; align-items: center; gap: 12px; color: var(--mute); font-size: 13px; }
.lg-contact-value { font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); user-select: all; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.lg-contact-acts { display: flex; gap: 8px; margin-top: auto; }
.lg-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer;
  font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background .2s, transform .2s var(--ease);
}
.lg-btn:hover { background: var(--hover); }
.lg-btn:active { transform: scale(.97); }
.lg-btn.primary { background: var(--invert-bg); color: var(--invert-ink); border-color: transparent; }
.lg-btn.primary:hover { opacity: .9; }
.lg-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.lg-req { padding: 0; overflow: hidden; }
.lg-req-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.lg-req-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.lg-req dl { margin: 0; }
.lg-req-row {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) 36px; align-items: center; gap: 12px;
  padding: 10px 12px 10px 24px; border-top: 1px solid var(--line);
}
.lg-req-row:first-child { border-top: 0; }
.lg-req-row dt { font-size: 13px; color: var(--mute); }
.lg-req-row dd { margin: 0; font-size: 14.5px; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lg-copy {
  all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  color: var(--faint); opacity: 0; transition: opacity .2s, color .2s, background .2s;
}
.lg-req-row:hover .lg-copy, .lg-copy:focus-visible { opacity: 1; }
.lg-copy:hover { color: var(--ink); background: var(--hover); }
.lg-copy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg-copy.done { color: var(--ok); opacity: 1; }

.lg-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lg-docs a {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-strong); transition: border-color .2s, background .2s;
}
.lg-docs a:hover { background: var(--hover); }
.lg-docs a > svg:first-child { width: 20px; height: 20px; fill: none; stroke: var(--mute); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lg-docs b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.lg-docs span { display: block; font-size: 12.5px; color: var(--mute); margin-top: 1px; line-height: 1.45; }
.lg-docs .lg-arrow { margin-left: auto; width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.lg-docs a:hover .lg-arrow { transform: translateX(3px); stroke: var(--ink); }

/* ── Оплата и доступ: шаги и разделы-карточки ───────────────────── */
.lg-doc.service h2 { border-top: 0; padding-top: 0; margin: 0 0 12px; font-size: 18px; }
.lg-doc.service .lg-block { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; padding: 24px 26px 12px; margin: 0 0 14px; }
.lg-doc.service .lg-block.accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.lg-steps { list-style: none; counter-reset: st; padding: 4px 0 0 !important; margin: 0 0 14px !important; display: grid; gap: 0; }
.lg-steps li {
  counter-increment: st; position: relative; padding: 0 0 18px 46px !important; margin: 0 !important;
}
.lg-steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--raise); border: 1px solid var(--line-strong);
}
.lg-steps li::after {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 1px; background: var(--line-strong);
}
.lg-steps li:last-child::after { display: none; }
.lg-steps li:last-child { padding-bottom: 6px !important; }

/* ── Подвал ─────────────────────────────────────────────────────── */
.lg-foot { border-top: 1px solid var(--line); padding: 28px 0 calc(36px + env(safe-area-inset-bottom, 0px)); }
.lg-foot-in { max-width: 1280px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)); display: grid; gap: 10px; }
.lg-foot-brand { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.lg-foot-brand .lg-mark { width: 20px; height: 20px; }
.lg-foot-req { font-size: 12.5px; line-height: 1.75; color: var(--faint); max-width: 900px; }

/* ── Кнопка «наверх» и уведомление ──────────────────────────────── */
.lg-up {
  all: unset; cursor: pointer; position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; z-index: 15;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--mute); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease), color .2s;
}
.lg-up.show { opacity: 1; transform: none; pointer-events: auto; }
.lg-up:hover { color: var(--ink); }
.lg-up svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lg-toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  background: var(--invert-bg); color: var(--invert-ink); transition: opacity .25s, transform .25s var(--ease);
}
.lg-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Средняя ширина: оглавление уходит в текст ─────────────────── */
@media (max-width: 1180px) {
  .lg-shell.has-toc { grid-template-columns: 252px minmax(0, 1fr); }
  .lg-shell.has-toc .lg-toc:not([hidden]) { display: none; }
  .lg-toc-m { display: block; }
}
@media (max-width: 1040px) {
  .lg-plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
}

/* ── Телефон и узкий планшет: разделы — шторка ─────────────────── */
@media (max-width: 860px) {
  :root { --top-h: 56px; }
  html { scroll-padding-top: calc(var(--top-h) + 72px); }
  body { font-size: 15px; }
  .lg-top-label { display: none; }
  .lg-cta { height: 34px; padding: 0 12px 0 14px; font-size: 13px; }
  .lg-switch {
    all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 10px max(20px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); font-size: 14px;
  }
  .lg-switch-group { color: var(--mute); font-size: 12.5px; }
  .lg-switch-group::after { content: "·"; margin-left: 8px; color: var(--faint); }
  .lg-switch-title { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lg-switch svg { margin-left: auto; width: 18px; height: 18px; fill: none; stroke: var(--mute); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .lg-shell, .lg-shell.has-toc { grid-template-columns: minmax(0, 1fr); padding-top: 28px; gap: 0; }
  .lg-nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; gap: 18px;
    max-height: 82vh; overflow: auto; padding: 8px 12px calc(24px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--line-strong); border-radius: 22px 22px 0 0;
    transform: translateY(105%); transition: transform .35s var(--ease); box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .6);
  }
  .lg-nav.open { transform: none; }
  .lg-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 0 12px; font-weight: 600; font-size: 15px; }
  .lg-nav a { padding: 12px; font-size: 15px; }
  .lg-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .5); animation: lg-fade .25s both; }
  @keyframes lg-fade { from { opacity: 0; } }
  .lg-head { margin-bottom: 26px; }
  .lg-lead { font-size: 16px; }
  .lg-meta-actions { margin-left: 0; width: 100%; }
  .lg-doc h2 { font-size: 18px; margin-top: 40px; padding-top: 24px; }
  .lg-anchor { display: none; }
  .lg-section { margin-top: 44px; }
  .lg-packs, .lg-points, .lg-contacts, .lg-docs { grid-template-columns: minmax(0, 1fr); }
  .lg-plans { max-width: none; }
  .lg-card { padding: 20px; }
  .lg-row { padding: 12px 20px; }
  .lg-row-bar { display: none; }
  .lg-row b { width: auto; }
  .lg-plan-tag { min-height: 0; }
  .lg-req-head { padding: 16px 20px; }
  .lg-req-row { grid-template-columns: minmax(0, 1fr) 36px; padding: 10px 8px 10px 20px; gap: 2px 8px; }
  .lg-req-row dt { grid-column: 1; }
  .lg-req-row dd { grid-column: 1; }
  .lg-req-row .lg-copy { grid-column: 2; grid-row: 1 / span 2; opacity: 1; }
  .lg-table.kv td { display: block; width: auto; border-top: 0; padding: 2px 16px; }
  .lg-table.kv tr { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
  .lg-table.kv tbody tr:first-child { border-top: 0; }
  .lg-doc.service .lg-block { padding: 20px 20px 8px; }
  .lg-up { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}

.lg-toc-m {
  margin: -6px 0 30px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface);
}
.lg-toc-m summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  font-size: 14px; font-weight: 600;
}
.lg-toc-m summary::-webkit-details-marker { display: none; }
.lg-toc-m summary span { color: var(--mute); font-weight: 400; }
.lg-toc-m summary svg { margin-left: auto; width: 16px; height: 16px; fill: none; stroke: var(--mute); stroke-width: 1.8; transition: transform .25s var(--ease); }
.lg-toc-m[open] summary svg { transform: rotate(180deg); }
.lg-toc-m ol { margin: 0; padding: 4px 16px 12px 36px; border-top: 1px solid var(--line); }
.lg-toc-m li { margin: 0; padding: 5px 0; font-size: 14px; }
.lg-toc-m li::marker { color: var(--faint); font-variant-numeric: tabular-nums; }
.lg-toc-m a { color: var(--ink-2); text-decoration: none; }
.lg-toc-m a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .lg-top, .lg-nav, .lg-toc, .lg-toc-m, .lg-skip, .lg-up, .lg-meta-actions, .lg-anchor, .lg-backdrop { display: none !important; }
  .lg-shell { display: block; padding: 0; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .lg-doc p, .lg-doc li, .lg-doc td { color: #000; }
  .lg-doc a { color: #000; }
}

/* Телефон (08.10.2026): в переключателе разделов — только название документа (группа видна в самом
   документе), печать на телефоне не нужна. */
@media (max-width: 560px) {
  .lg-switch-group { display: none; }
  .lg-switch-title { flex: 1; min-width: 0; }
}
@media (pointer: coarse) and (max-width: 768px) { .lg-print { display: none; } }
