/*
 * Стили страниц документов: политики конфиденциальности и пользовательского
 * соглашения.
 *
 * Отдельным файлом, а не блоком <style> в каждой странице: тема и типографика
 * нужны обеим, а дублировать двести строк в двух местах значит гарантированно
 * однажды поправить только одно из них.
 *
 * Токены те же, что в index.html, чтобы документы не выбивались из сайта.
 * Светлая тема оставлена, потому что переключатель темы работает и здесь:
 * значение читает legal.js из того же ключа rad_theme, что и панель.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #070a1c;
  --bg-2: #0a0f28;
  --surface: #111735;
  --surface-2: #161d3f;
  --border: #232c57;
  --border-soft: #1a2147;
  --accent: #3747ff;
  --accent-2: #aeb6ff;
  --accent-3: #22d3ee;
  --accent-dim: rgba(55, 71, 255, 0.16);
  --text: #e6e9f7;
  --text-muted: #8c93b5;
  --text-dim: #5b6188;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f6ff; --bg-2: #eceffd;
    --surface: #ffffff; --surface-2: #f1f4ff;
    --border: #dde3f8; --border-soft: #e9edfb;
    --accent: #2a37d6; --accent-2: #1e29b0; --accent-3: #0891b2;
    --accent-dim: rgba(42, 55, 214, 0.10);
    --text: #0f1430; --text-muted: #5f6684; --text-dim: #9096ad;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f6ff; --bg-2: #eceffd;
  --surface: #ffffff; --surface-2: #f1f4ff;
  --border: #dde3f8; --border-soft: #e9edfb;
  --accent: #2a37d6; --accent-2: #1e29b0; --accent-3: #0891b2;
  --accent-dim: rgba(42, 55, 214, 0.10);
  --text: #0f1430; --text-muted: #5f6684; --text-dim: #9096ad;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #070a1c; --bg-2: #0a0f28;
  --surface: #111735; --surface-2: #161d3f;
  --border: #232c57; --border-soft: #1a2147;
  --accent: #3747ff; --accent-2: #aeb6ff; --accent-3: #22d3ee;
  --accent-dim: rgba(55, 71, 255, 0.16);
  --text: #e6e9f7; --text-muted: #8c93b5; --text-dim: #5b6188;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 50% -10%, var(--accent-dim), transparent 70%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 55%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, 'Courier New', monospace; }

/* Переливание «Radiance»: тот же приём, что на главной. Без белого блика,
   потому что в документе бегущий по тексту свет мешает читать. */
.shine-sm {
  background: linear-gradient(100deg,
    var(--accent-2) 0%, var(--accent-3) 35%, var(--accent-2) 70%, var(--accent-3) 100%);
  background-size: 240% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shine 8s linear infinite;
  font-weight: 600;
}
@keyframes shine { to { background-position: 240% center; } }
@media (prefers-reduced-motion: reduce) { .shine-sm { animation: none; } }

.wrap { max-width: 820px; margin: 0 auto; padding-inline: 16px; }

/* ------------------------------- шапка ------------------------------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 22px 0; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em;
  text-decoration: none; color: var(--text);
}
.brand-mark { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: block; }

.nav-right { display: flex; align-items: center; gap: 8px; }
.pill-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text); text-decoration: none;
  font-size: 0.8125rem; font-weight: 500;
  transition: border-color .35s cubic-bezier(.16,1,.3,1), transform .45s cubic-bezier(.16,1,.3,1);
}
.pill-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.pill-link:active { transform: scale(.95); transition-duration: .09s; }

.theme-toggle {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border); border-radius: 999px;
  width: 38px; height: 38px; display: grid; place-items: center;
  cursor: pointer; color: var(--text-muted); transition: all .18s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--text); }
.theme-toggle:active { transform: scale(.95); transition-duration: .09s; }
.theme-toggle svg { width: 17px; height: 17px; }

/* ------------------------------- документ ------------------------------- */
.doc-head { padding: 26px 0 30px; text-align: center; }
.doc-kicker {
  display: block; font-size: .66rem; letter-spacing: .18em;
  color: var(--accent-3); margin-bottom: 12px;
}
.doc-head h1 {
  font-size: clamp(1.6rem, 4.6vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
}
.doc-meta { margin-top: 14px; font-size: .8125rem; color: var(--text-dim); line-height: 1.7; }

.doc {
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 34px 32px; margin-bottom: 28px;
}
@media (max-width: 560px) { .doc { padding: 24px 18px; } }

/* Вводный абзац над первым разделом. */
.doc > p.lead {
  color: var(--text-muted); font-size: .9375rem; line-height: 1.75;
  padding-bottom: 22px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border-soft);
}

.doc h2 {
  font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em;
  margin-top: 30px; margin-bottom: 12px;
  /* Номер раздела считает счётчик, а не руки: при вставке нового пункта
     нумерация ниже не разъезжается. */
  counter-increment: sec;
}
.doc { counter-reset: sec; }
.doc h2::before {
  content: counter(sec) '. ';
  color: var(--accent-2); font-weight: 700;
}
.doc h3 {
  font-size: .9375rem; font-weight: 700;
  margin-top: 20px; margin-bottom: 8px;
}

.doc p, .doc li {
  font-size: .9rem; line-height: 1.75; color: var(--text-muted);
}
.doc p + p { margin-top: 11px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--accent-2); text-decoration: none; }
.doc a:hover { text-decoration: underline; }

.doc ul, .doc ol { margin: 11px 0 0 0; display: grid; gap: 9px; }
.doc ul { list-style: none; }
.doc ul li { position: relative; padding-left: 18px; }
.doc ul li::before {
  content: ''; position: absolute; left: 0; top: .66em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.doc ol { padding-left: 22px; }
.doc ol li::marker { color: var(--accent-2); font-weight: 600; }

/* Выноска для того, что клиент должен прочитать до оплаты: возвраты,
   отсутствие гарантий результата. */
.callout {
  margin-top: 16px; padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
}
.callout p { font-size: .875rem; }

/* Таблица контактов и реквизитов. */
.kv { margin-top: 14px; display: grid; gap: 0; }
.kv-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}
.kv-row:last-child { border-bottom: none; }
.kv-k { font-size: .8125rem; color: var(--text-dim); flex-shrink: 0; }
.kv-v { font-size: .875rem; color: var(--text); text-align: right; word-break: break-word; }
.kv-v a { color: var(--accent-2); text-decoration: none; }
.kv-v a:hover { text-decoration: underline; }

/* ------------------------------- подвал ------------------------------- */
.foot {
  border-top: 1px solid var(--border-soft);
  padding: 26px 0 40px; text-align: center;
  color: var(--text-dim); font-size: .8125rem; line-height: 1.9;
}
.foot a { color: var(--text-muted); text-decoration: none; }
.foot a:hover { color: var(--accent-2); }
.foot .sep { color: var(--text-dim); opacity: .5; }
