/* Nonstop VPN: цвета как в приложении (DesignSystem.swift) */
:root {
  --navy: #0b1b3a;
  --deep: #071025;
  --teal: #1393ae;
  --teal-dark: #0f739e;
  --ice: #bfe9f6;
  --ok: #3ddc97;
  --warn: #f5a524;
  --bad: #ff5a5f;
  --gold: #f0c040;
  --silver: #ccd4de;
  --blue: #3d45ff;
  --text: #ffffff;
  --dim: rgba(255, 255, 255, 0.64);
  --line: rgba(255, 255, 255, 0.09);
  --panel: rgba(255, 255, 255, 0.06);
  --field: rgba(255, 255, 255, 0.07);
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--deep);
  background-image:
    radial-gradient(900px 600px at 100% 0%, rgba(19, 147, 174, 0.18), transparent 70%),
    radial-gradient(900px 700px at 0% 100%, rgba(61, 69, 255, 0.12), transparent 70%),
    linear-gradient(180deg, var(--navy), var(--deep));
}

a { color: var(--ice); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 6vw, 54px); letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.01em; }
h3 { font-size: 19px; }
p { margin: 0 0 14px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.dim { color: var(--dim); }
.center { text-align: center; }
.small { font-size: 14px; }
.auth .hint { margin: -6px 0 14px; }

/* Переключение языка: показываем только блоки выбранного языка */
html[lang="en"] .l-tr, html[lang="en"] .l-ru,
html[lang="tr"] .l-en, html[lang="tr"] .l-ru,
html[lang="ru"] .l-en, html[lang="ru"] .l-tr,
html[lang="tr"] .l-enru { display: none !important; }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7, 16, 37, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: auto; }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { color: var(--dim); font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.langs { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.langs button {
  border: 0; background: transparent; color: var(--dim); font: inherit; font-size: 13px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px; cursor: pointer;
}
.langs button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.menu-btn { display: none; }

@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
         background: var(--deep); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; }
  .menu-btn { display: block; margin-left: auto; border: 1px solid var(--line); background: var(--panel); color: var(--text);
              border-radius: 12px; padding: 4px 11px; font: inherit; font-size: 18px; line-height: 1.4; cursor: pointer; }
  .top .wrap { gap: 10px; }
  .top .langs { margin-left: 0; }
}
@media (max-width: 400px) {
  .brand { font-size: 16px; gap: 8px; }
  .langs button { padding: 4px 7px; }
}

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 16px; border: 0;
  font: inherit; font-weight: 650; font-size: 16px; cursor: pointer; color: #fff;
  background: linear-gradient(180deg, var(--teal), var(--teal-dark));
  box-shadow: 0 8px 24px rgba(19, 147, 174, 0.25);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn.ghost { background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
.btn.small { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn.wide { width: 100%; height: 56px; }

/* Карточки */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}

/* Главная */
.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 19px; color: var(--dim); max-width: 560px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img { width: min(260px, 60vw); height: auto; filter: drop-shadow(0 20px 60px rgba(61, 69, 255, 0.45)); }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.chip { font-size: 13px; color: var(--ice); background: rgba(191, 233, 246, 0.08); border: 1px solid rgba(191, 233, 246, 0.18);
        border-radius: 999px; padding: 5px 12px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .actions, .badge-row { justify-content: center; }
  .hero-logo { order: -1; }
}

section { padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }

.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid.three, .grid.two { grid-template-columns: 1fr; } }

.feature .icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px;
  background: rgba(19, 147, 174, 0.16); color: var(--ice);
}
.feature .icon svg { width: 24px; height: 24px; }
.feature p { color: var(--dim); margin: 0; }

/* Тарифы */
.period { display: flex; justify-content: center; margin-bottom: 24px; }
.toggle { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.toggle { flex-wrap: wrap; justify-content: center; }
.toggle button { border: 0; background: transparent; color: var(--dim); font: inherit; font-weight: 600; font-size: 15px;
                 padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.save { color: var(--ok); font-size: 13px; margin-left: 6px; }

.plan { position: relative; display: flex; flex-direction: column; gap: 14px; }
.plan .name { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.pi { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.pi img { width: 100%; height: 100%; display: block; }
.plan .pi { width: 52px; height: 52px; }
.plan.silver { border-color: rgba(204, 219, 242, 0.6); }
.plan.gold { border-color: rgba(237, 189, 69, 0.7); }
.plan .price { font-size: 38px; font-weight: 750; letter-spacing: -0.02em; }
.plan .price small { font-size: 15px; color: var(--dim); font-weight: 500; }
.plan .billed { color: var(--dim); font-size: 14px; min-height: 22px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; flex: 1; }
.plan li { padding-left: 26px; position: relative; color: var(--dim); }
.plan li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 10px; height: 6px;
                   border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan .tag { position: absolute; top: -12px; right: 18px; font-size: 12px; font-weight: 700; color: var(--deep);
             background: var(--gold); border-radius: 999px; padding: 3px 10px; }

/* Шаги */
.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 54px; }
.steps .card::before { counter-increment: step; content: counter(step); position: absolute; top: 18px; left: 22px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: rgba(19, 147, 174, 0.25); color: var(--ice); }

/* Контакты, компания */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 8px; } }

/* Подвал */
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 28px; font-size: 14px; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
footer h4 { margin: 0 0 10px; font-size: 14px; color: var(--text); }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer a { color: var(--dim); }
footer a:hover { color: var(--text); }
footer .company { color: var(--dim); margin-top: 12px; }
footer .bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
                 border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; color: var(--dim); }
@media (max-width: 860px) { footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { footer .cols { grid-template-columns: 1fr; } }

.pay-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pay-badges svg { height: 26px; width: auto; display: block; }

/* Правовые страницы */
.doc { padding-top: 48px; padding-bottom: 24px; }
.doc h1 { font-size: clamp(28px, 5vw, 40px); }
.doc h2 { font-size: 21px; margin-top: 30px; }
.doc .card { padding: 28px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--dim); margin-bottom: 24px; }
.note { border-left: 3px solid var(--teal); padding: 10px 14px; background: rgba(19, 147, 174, 0.08); border-radius: 0 12px 12px 0; margin: 0 0 20px; }

/* Оплата */
.checkout { padding-top: 40px; padding-bottom: 40px; display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.checkout h1 { font-size: clamp(28px, 5vw, 38px); }
.choose { display: grid; gap: 10px; margin-bottom: 18px; }
.option { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line);
          background: var(--field); cursor: pointer; }
.option input { accent-color: var(--teal); width: 18px; height: 18px; margin: 0; }
.option .grow { flex: 1; }
.option .grow b { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.option .pi { width: 32px; height: 32px; }
.option .grow > span { color: var(--dim); font-size: 14px; }
#card-pay .pay-badges { margin-bottom: 18px; }
html:not(.tr-visitor) .try-only { display: none !important; }
.try-price { font-size: 18px; font-weight: 650; margin-top: 2px; }
.try-price small { font-size: 13px; color: var(--dim); font-weight: 400; }
.cc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option:has(input:checked) { border-color: var(--teal); background: rgba(19, 147, 174, 0.12); }
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 14px; color: var(--dim); margin-bottom: 6px; }
input[type="email"], input[type="text"], input[type="password"] {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--field); color: var(--text); font: inherit;
}
input[type="email"]:focus, input[type="text"]:focus, input[type="password"]:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 14px; color: var(--dim); cursor: pointer; }
.check input { accent-color: var(--teal); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary .row:last-of-type { border-bottom: 0; }
.summary .total { font-size: 22px; font-weight: 750; }
.secure { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--dim); margin-top: 16px; }
.secure svg { flex: none; width: 22px; height: 22px; color: var(--ok); }
.msg { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.msg.show { display: block; }
.msg.error { background: rgba(255, 90, 95, 0.12); border: 1px solid rgba(255, 90, 95, 0.4); }
.msg.info { background: rgba(245, 165, 36, 0.10); border: 1px solid rgba(245, 165, 36, 0.4); }

/* Вход */
.auth { min-height: 60vh; display: grid; place-items: center; padding-top: 48px; padding-bottom: 48px; }
.auth .card { max-width: 460px; width: 100%; text-align: center; padding: 32px 26px; }
.auth img { width: 76px; height: auto; margin-bottom: 12px; }

/* Личный кабинет */
.auth .left { text-align: left; }
.auth [hidden] { display: none !important; }
.auth .me-plan { max-width: none; padding: 16px 18px; margin: 14px 0 18px; text-align: left; }
.me-plan [data-plan-end] { white-space: nowrap; }
.me-plan .name { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 6px; }
#acc-error [data-err] { display: none; }
#acc-error [data-err].on { display: inline; }

/* Мелкие отступы (вместо style="" в разметке: защита CSP запрещает встроенные стили) */
.m0 { margin: 0; }
.mt { margin-top: 18px; }
.pull { margin-top: -8px; }
.h-auth { font-size: 30px; }

/* Режим для приложения (?app=1): только текст документа, без ссылок на покупку и тарифы (правила App Store). */
html.in-app .nav, html.in-app .menu-btn, html.in-app .nav.open,
html.in-app footer .cols > div:not(:first-child), html.in-app .pay-badges { display: none !important; }
html.in-app footer .cols { grid-template-columns: 1fr; }
html.in-app .top .langs { margin-left: auto; }
@media (max-width: 520px) { .doc .card { padding: 20px 16px; } }
.doc { overflow-wrap: anywhere; }
