/* Гладко VPN — страницы документов (оферта, политика, согласия, оплата и возврат).
   Тот же язык, что у мини-приложения: ночное небо, сияние, «Арка» с кромкой бирюза → фиолет.
   Главная задача страницы — читаемость: колонка ~70 знаков, крупный межстрочный, контраст ≥ 7:1. */

:root {
  --night: #080A1B;
  --night-low: #0B0A22;
  --text: #FFFFFF;
  --text-body: rgba(236, 233, 255, .9);
  --text-2: rgba(226, 222, 255, .78);
  --text-3: rgba(212, 208, 250, .68);
  --line: rgba(190, 180, 255, .16);
  --glass: rgba(150, 130, 255, .07);
  --ca: #8C5AFF;
  --cb: #C8A0FF;
  --mint: #5EF0D2;
  --font-round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--night); color-scheme: dark; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-body);
  font: 400 17px/1.62 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* тихое сияние сверху — как небо приложения, но неподвижное, чтобы не мешать чтению */
  background:
    radial-gradient(1100px 620px at 15% -160px, rgba(140, 90, 255, .30), transparent 70%),
    radial-gradient(900px 520px at 95% -120px, rgba(94, 240, 210, .13), transparent 70%),
    var(--night);
  background-repeat: no-repeat;
}

a { color: var(--cb); text-decoration: underline; text-decoration-color: rgba(200, 160, 255, .45); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(8, 10, 27, .72);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1200px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
}
@media (min-width: 900px) { .top-in { height: 72px; padding: 0 40px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 19px/1 var(--font-round); letter-spacing: -.01em; }
.arka { width: 30px; height: 28px; filter: drop-shadow(0 0 6px rgba(160, 120, 255, .55)); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 18px; border-radius: 999px;
  color: #fff; background: rgba(255, 255, 255, .08) linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 60%);
  font: 600 14px/1 var(--font-round); text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 6px 18px -8px rgba(0, 0, 12, .7);
  transition: background-color .25s ease;
}
.btn:hover { background-color: rgba(255, 255, 255, .13); }

/* ---------- документ ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 20px 40px; }
.doc h1 {
  margin: 0 0 28px; color: var(--text);
  font: 700 clamp(26px, 5vw, 40px)/1.14 var(--font-round); letter-spacing: -.02em;
  text-wrap: balance; hyphens: manual;
}
.doc h2 {
  margin: 44px 0 14px; padding-top: 4px; color: var(--text);
  font: 650 22px/1.3 var(--font-round); letter-spacing: -.01em;
}
.doc h3 { margin: 28px 0 10px; color: var(--text); font: 600 18px/1.35 var(--font-round); }
.doc h4 { margin: 22px 0 8px; color: var(--text-2); font: 600 16px/1.4 var(--font-text); }
.doc p { margin: 0 0 14px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc p.cl { position: relative; padding-left: 3.2em; }
.doc p.cl .n { position: absolute; left: 0; width: 3em; color: var(--text-3); font-variant-numeric: tabular-nums; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 1.4em; }
/* список внутри пункта — под текстом пункта, а не под его номером */
.doc p.cl ~ ul, .doc p.cl ~ ol { padding-left: calc(3.2em + 1.2em); }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: var(--text-3); }
.doc hr { border: 0; height: 1px; background: var(--line); margin: 32px 0; }
.doc code { font: 15px/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: var(--glass); padding: 1px 6px; border-radius: 6px; }
.doc blockquote {
  margin: 20px 0; padding: 14px 18px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--line); color: var(--text);
}
.doc blockquote p:last-child { margin: 0; }

.table { overflow-x: auto; margin: 8px 0 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.doc th, .doc td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc th { color: var(--text); font-weight: 600; background: rgba(150, 130, 255, .08); }
.doc tr:last-child td { border-bottom: 0; }
/* телефон: строка таблицы — карточка «подпись — значение» */
@media (max-width: 600px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; }
  .doc thead { display: none; }
  .doc tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .doc tr:last-child { border-bottom: 0; }
  .doc td { padding: 3px 0; border: 0; }
  .doc td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; color: var(--text-3); font-size: 13px; line-height: 1.4; }
  .doc td:first-child { color: var(--text); font-weight: 600; }
  .doc td:first-child::before { display: none !important; }
}

/* оглавление */
.toc {
  margin: 0 0 36px; padding: 16px 22px; border-radius: 20px;
  background: var(--glass); border: 1px solid var(--line);
}
.toc-h { color: var(--text-3); font: 600 13px/1.3 var(--font-text); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.toc-h::-webkit-details-marker { display: none; }
.toc-h::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.toc[open] .toc-h::after { transform: translateY(2px) rotate(-135deg); }
.toc ol { margin: 12px 0 2px; padding-left: 0; list-style: none; columns: 2 260px; column-gap: 28px; }
.toc li { margin: 0 0 7px; break-inside: avoid; }
.toc a { display: grid; grid-template-columns: 2em 1fr; color: var(--text-2); text-decoration: none; font-size: 15.5px; line-height: 1.35; }
.toc a .n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--text); }

/* ---------- подвал ---------- */
.foot {
  max-width: 760px; margin: 24px auto 0; padding: 28px 20px max(36px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--text-3); font-size: 14.5px; line-height: 1.6;
}
.foot-docs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 16px; padding: 0; list-style: none; }
.foot-docs a { color: var(--text-2); text-decoration: none; }
.foot-docs a[aria-current] { color: var(--text); }
.foot p { margin: 0 0 10px; }
.foot a { color: var(--text-2); }
.foot .foot-req { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; opacity: .75; }
.foot-req span, .foot-req a { white-space: nowrap; }

@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .doc { padding-top: 32px; }
  .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
  .brand span { font-size: 17px; }
  .doc p.cl { padding-left: 2.8em; }
  .doc p.cl .n { width: 2.7em; }
  .doc p.cl ~ ul, .doc p.cl ~ ol { padding-left: calc(2.8em + 1.1em); }
  .foot-docs { flex-direction: column; gap: 8px; }
}

@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .top, .toc, .foot-docs { display: none; }
  .doc h1, .doc h2, .doc h3, .doc strong { color: #000; }
  a { color: #000; }
}

/* список документов (/docs/) */
.doc-list { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 10px; }
.doc-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; font: 500 17px/1.35 var(--font-round);
}
.doc-list a:hover { background: rgba(150, 130, 255, .12); }
.doc-list a::after { content: ""; flex: none; width: 8px; height: 8px; border: solid var(--text-3); border-width: 1.6px 1.6px 0 0; transform: rotate(45deg); }
