/* Тема: как страница бота на t.me — голубые «обои», белая карточка по центру, аватар над ней.
   Голубой — действия (оплата, ссылки). Всё остальное спокойное, чтобы глаз шёл к карточке. */
:root {
  --sky-1: #74c4ea;
  --sky-2: #9fdaf1;
  --sky-3: #d3f0f8;
  --surface: #ffffff;
  --ink: #1d2733;
  --muted: #6d7b88;
  --line: #e3e9ee;
  --soft: #f1f5f8;          /* поля, подложки внутри карточки */
  --blue: #3390ec;          /* кнопки Telegram */
  --blue-ink: #ffffff;
  --blue-soft: #e8f2fd;
  --ok: #4fae4e;
  --r-card: 24px;
  --r-ui: 12px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Unbounded", "Onest", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sky-1: #12304a; --sky-2: #17405f; --sky-3: #0f2335;
    --surface: #1c2733; --ink: #e9eef3; --muted: #8fa0b0; --line: #2a3a4a; --soft: #24313f;
    --blue: #4ea4f6; --blue-ink: #0b1724; --blue-soft: #1f3550; --ok: #6cc46b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font: 17px/1.6 var(--font); background: var(--sky-2); min-height: 100vh; }
/* Обои закреплены за экраном: на длинной странице градиент не растягивается */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 45% at 15% 10%, rgba(255, 255, 255, .35), transparent 70%),
    radial-gradient(50% 40% at 90% 30%, rgba(255, 255, 255, .22), transparent 70%),
    linear-gradient(170deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
}
a { color: var(--blue); text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

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

/* ---------- шапка ---------- */
.top { padding: 14px 0; }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1040px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; text-shadow: 0 1px 2px rgba(0, 40, 80, .25); }
.logo__mark { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--blue); display: grid; place-items: center; font-size: 15px; text-shadow: none; }
.top__nav a { color: #fff; text-decoration: none; font-weight: 500; opacity: .9; text-shadow: 0 1px 2px rgba(0, 40, 80, .25); }
.top__nav a:hover { opacity: 1; }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 50px; padding: 12px 20px; border: 0; border-radius: var(--r-ui); cursor: pointer;
  font: 600 16px/1.2 var(--font); text-decoration: none; background: var(--blue); color: var(--blue-ink);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--ghost { background: var(--blue-soft); color: var(--blue); }
.field {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--r-ui); border: 1px solid var(--line);
  background: var(--soft); color: var(--ink); font: 16px var(--font);
}
.field:focus { outline: none; border-color: var(--blue); background: var(--surface); }

/* ---------- главная вещь: карточка бота ---------- */
.botpage { padding-top: 70px; }
.tgcard {
  position: relative; max-width: 440px; margin: 0 auto; padding: 78px 26px 26px;
  background: var(--surface); border-radius: var(--r-card); text-align: center;
  box-shadow: 0 10px 40px rgba(20, 70, 110, .18);
}
.tgcard__ava {
  position: absolute; top: -62px; left: 50%; transform: translateX(-50%);
  width: 124px; height: 124px; border-radius: 50%; object-fit: cover; background: #8fc4e6;
  box-shadow: 0 0 0 6px var(--surface);
}
.tgcard__ava--empty { display: grid; place-items: center; color: #fff; font: 600 48px/1 var(--font-num); }
.tgcard__title { margin: 0; font-size: 25px; line-height: 1.25; font-weight: 600; letter-spacing: .01em; }
.tgcard__users { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.tgcard__desc { margin: 14px auto 0; max-width: 34ch; font-size: 16px; line-height: 1.55; }
.tgcard__desc p { margin: 0 0 4px; }
.tgcard__user { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* блок покупки внутри карточки — визуально отделён: это ваш VPN, а не бот выше */
.buy { margin: 24px -26px -26px; padding: 22px 26px 26px; background: var(--soft); border-radius: 0 0 var(--r-card) var(--r-card); text-align: left; }
.buy__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.buy__mark { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: var(--blue-ink); display: grid; place-items: center; font: 600 17px/1 var(--font-num); flex: none; }
.buy__who { font-size: 13px; color: var(--muted); line-height: 1.3; }
.buy__name { font-size: 17px; font-weight: 600; line-height: 1.3; }
.buy__title { margin: 0 0 4px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.buy__pitch { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.plans { display: grid; gap: 8px; margin: 0 0 12px; border: 0; padding: 0; }
.plans legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.plan { position: relative; display: block; cursor: pointer; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan__box {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 12px;
  padding: 12px 14px; border-radius: var(--r-ui); background: var(--surface); border: 2px solid transparent;
}
.plan input:checked + .plan__box { border-color: var(--blue); }
.plan input:focus-visible + .plan__box { outline: 2px solid var(--blue); outline-offset: 2px; }
.plan__name { font-weight: 600; }
.plan__flag { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--blue); background: var(--blue-soft); padding: 2px 8px; border-radius: 6px; vertical-align: 1px; }
.plan__note { grid-column: 1; font-size: 13px; color: var(--muted); }
.plan__price { grid-row: 1 / span 2; grid-column: 2; font: 600 17px/1.2 var(--font-num); }
a.plan__box { color: var(--ink); text-decoration: none; }
a.plan__box:hover { border-color: var(--blue); }

.buy__form { display: grid; gap: 10px; }
.buy__form[hidden] { display: none; }
.buy__fine { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.buy__alt { display: block; margin-top: 12px; text-align: center; font-size: 14px; font-weight: 500; text-decoration: none; }
.buy__error { margin: 0; color: #d64545; font-size: 14px; }

/* что появляется после «Оплатить» — прямо в карточке */
.pay { margin-top: 14px; }
.pay[hidden] { display: none; }
.pay__frame { width: 100%; min-height: 560px; border: 0; border-radius: var(--r-ui); background: var(--surface); }
.pay__qr { display: grid; justify-items: center; gap: 10px; padding: 16px; background: var(--surface); border-radius: var(--r-ui); text-align: center; }
.pay__qr canvas, .pay__qr img { width: 200px; height: 200px; }
.pay__wait { font-size: 14px; color: var(--muted); }
.pay__test { padding: 14px; border-radius: var(--r-ui); background: var(--surface); border: 1px dashed var(--muted); font-size: 14px; display: grid; gap: 10px; text-align: center; }
.done { padding: 16px; border-radius: var(--r-ui); background: var(--surface); display: grid; gap: 10px; }
.done__title { font-weight: 600; color: var(--ok); margin: 0; }
.done__key { width: 100%; min-height: 84px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; word-break: break-all; }
.done p { margin: 0; font-size: 15px; }

/* ---------- статья под карточкой ---------- */
.panel { background: var(--surface); border-radius: var(--r-card); padding: 28px clamp(18px, 4.5vw, 40px) 30px; margin-top: 18px; }
.crumbs { max-width: 720px; margin: 22px auto 0; padding: 0 16px; font-size: 14px; color: #fff; text-shadow: 0 1px 2px rgba(0, 40, 80, .3); }
.crumbs a { color: #fff; }
.panel h1 { font-size: clamp(24px, 3.8vw, 32px); line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
.panel__meta { font-size: 14px; color: var(--muted); margin: 0 0 22px; }
.panel h2 { font-size: 21px; line-height: 1.3; margin: 36px 0 12px; }
.panel p { margin: 0 0 14px; }

.facts { margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 0; font-weight: 600; font-size: 15px; text-align: right; }
.facts dd.is-empty { color: var(--muted); font-weight: 400; }

.ticks, .checks { list-style: none; padding: 0; margin: 0; }
.ticks li, .checks li { position: relative; padding: 0 0 10px 30px; }
.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--blue); font-weight: 700; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 15px; height: 15px; border: 2px solid var(--muted); border-radius: 4px; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font: 600 14px/1 var(--font-num); }
.steps li span { padding-top: 4px; }

.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
.faq[open] summary::after { content: "−"; }
.faq p { margin: -4px 0 14px; color: var(--muted); }

.others h2 { margin-top: 0; font-size: 18px; }
.others__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px; }
.others__list a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-ui); color: var(--ink); text-decoration: none; }
.others__list a:hover { background: var(--soft); }
.ava { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #8fc4e6; flex: none; }
.ava--empty { display: grid; place-items: center; color: #fff; font: 600 18px/1 var(--font-num); }
.others__name { display: block; font-weight: 600; line-height: 1.3; }
.others__user { font-size: 14px; color: var(--muted); }

/* ключевые слова — внизу, мелко, на фоне неба */
.searches { margin: 22px 0 0; padding: 0 4px; font-size: 14px; line-height: 1.6; color: #3c5568; }
.searches h2 { display: inline; font-size: 14px; font-weight: 600; margin: 0 6px 0 0; }
.searches p { display: inline; margin: 0; }
@media (prefers-color-scheme: dark) { .searches { color: var(--muted); } }

/* нижняя полоска «Оплатить», когда карточка ушла за экран (только телефон) */
.paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: none;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface);
  box-shadow: 0 -6px 24px rgba(20, 70, 110, .15); align-items: center; gap: 12px;
}
.paybar.is-on { display: flex; }
.paybar__text { flex: 1; font-size: 14px; line-height: 1.3; }
.paybar__text b { display: block; font: 600 16px/1.2 var(--font-num); }
.paybar .btn { width: auto; min-height: 44px; }
@media (min-width: 761px) { .paybar.is-on { display: none; } }

/* ---------- главная ---------- */
.hero { padding: 36px 0 22px; color: #fff; text-shadow: 0 1px 3px rgba(0, 40, 80, .3); }
.hero h1 { font-size: clamp(30px, 5.6vw, 48px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -.02em; }
.hero__lead { font-size: 19px; margin: 0 0 22px; max-width: 46ch; }
.search { width: 100%; min-height: 52px; padding: 12px 20px; border-radius: 26px; border: 0; background: var(--surface); color: var(--ink); font: 16px var(--font); box-shadow: 0 6px 24px rgba(20, 70, 110, .15); }
.catalog { display: grid; gap: 10px; padding-bottom: 8px; }
.tile { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border-radius: 18px; color: var(--ink); text-decoration: none; }
.tile:hover { box-shadow: 0 6px 24px rgba(20, 70, 110, .15); }
.tile[hidden] { display: none; }
.tile .ava { width: 56px; height: 56px; }
.tile .ava--empty { font-size: 22px; }
.tile__name { display: block; font-weight: 600; }
.tile__users { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.tile__desc { display: block; font-size: 14px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.empty { color: var(--muted); background: var(--surface); padding: 16px; border-radius: 18px; margin: 0; }

.foot { padding: 32px 0 40px; font-size: 13px; color: #4d6577; }
.foot p { margin: 0; }
@media (prefers-color-scheme: dark) { .foot { color: var(--muted); } }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .botpage { padding-top: 64px; }
  .tgcard { padding: 74px 18px 18px; }
  .buy { margin: 22px -18px -18px; padding: 20px 18px 20px; }
  .facts { grid-template-columns: 1fr; }
  body.has-paybar { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- покупка через API бота ---------- */
.shop__loading { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.buy__label { display: block; font-size: 13px; color: var(--muted); margin: 4px 0 -4px; }
.buy__tg { margin-top: 12px; }
.shop { display: grid; gap: 10px; }
.shop[hidden], .stage[hidden] { display: none; }
.plans legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.plan__desc { margin: -2px 0 0; font-size: 13px; color: var(--muted); white-space: pre-line; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs[hidden] { display: none; }
.tab { flex: 1 1 auto; min-height: 40px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 14px/1.2 var(--font); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.paybtns { display: grid; gap: 8px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); font: 500 14px/1.4 var(--font); cursor: pointer; text-align: left; }
.promo__box { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.promo__box[hidden] { display: none; }
.promo__box .btn { width: auto; }
.promo__msg { margin: 6px 0 0; font-size: 14px; }
.promo__msg.is-ok { color: var(--ok); }
.promo__msg.is-bad, .is-bad { color: #d64545; }
.who { margin: 0; font-size: 14px; }
.stage { display: grid; gap: 10px; }
.qr, .login, .done { display: grid; gap: 10px; justify-items: stretch; padding: 16px; border-radius: var(--r-ui); background: var(--surface); }
.qr { justify-items: center; text-align: center; }
.qr__title { margin: 0; font-weight: 600; font-size: 17px; }
.qr__hint, .qr__wait { margin: 0; font-size: 14px; color: var(--muted); }
.qr__img { width: 220px; height: 220px; background: #fff; border-radius: 12px; padding: 8px; justify-self: center; }
.qr__alt { text-align: center; }
.tgcode { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-ui); background: var(--soft); text-align: center; }
.tgcode p { margin: 0; font-size: 14px; }
.tgcode__code { font: 600 30px/1.2 var(--font-num) !important; letter-spacing: .12em; }
.keep { display: grid; gap: 8px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
.keep__title { margin: 0; font-weight: 600; font-size: 15px; }
.keep__msg { margin: 0; font-size: 14px; color: var(--muted); }
.keep__msg[hidden] { display: none; }
