/* RP Helper — сайт программы. Цвета те же, что в окне помощника: тёмно-серый, красный — точечно. */
:root {
  --bg: #111113;
  --bg-2: #151518;
  --surface: #1a1a1e;
  --surface-2: #202025;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f0f0f2;
  --text-2: #b4b4bc;
  --text-3: #85858f;
  --accent: #e5484d;
  --accent-hover: #ee5a5f;
  --accent-text: #ff8589;
  --accent-bg: rgba(229, 72, 77, .12);
  --green: #4cb27a;
  --radius: 10px;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, "Segoe UI", system-ui, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
/* У кнопок рамка фокуса — по их же скруглению, а не квадратиком поверх. */
.btn:focus-visible { outline-color: rgba(255, 255, 255, .55); outline-offset: 2px; border-radius: var(--radius); }
svg { display: block; }
[hidden] { display: none !important; }

.container { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; left: 16px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #fff; }
.skip-link:focus { top: 12px; }

kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font: 700 .82em/1.5 Manrope, "Segoe UI", sans-serif;
  text-align: center;
  vertical-align: .08em;
}

/* ---------- Кнопки, метки ---------- */
.btn {
  display: inline-flex;
  background: transparent;
  color: var(--text);
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { min-height: 38px; padding: 7px 15px; font-size: 14px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: .2em;
}
.tag-no { background: var(--accent-bg); color: var(--accent-text); }
.tag-pro { background: var(--accent-bg); color: var(--accent-text); letter-spacing: .04em; }

.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--text-3); }
.dot-live { background: var(--green); }

.link { color: var(--accent-text); font-weight: 700; }
.link:hover { color: var(--text); }
.link-quiet { color: var(--text-3); font-weight: 600; font-size: 14px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(17, 17, 19, .94);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-sep { width: 1px; height: 20px; margin: 0 8px; background: var(--line-strong); }
.site-nav .btn { margin-left: 8px; }
.menu-toggle { display: none; }

/* ---------- Первый экран ---------- */
.hero { padding: 72px 0 64px; border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 56px; }
.status-line { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.hero h1 { font-size: clamp(40px, 5vw, 62px); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; margin-bottom: 22px; }
.hero-lead { max-width: 30em; color: var(--text-2); font-size: 18px; line-height: 1.65; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--text-3); font-size: 14px; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.hero-shot { margin: 0; }
.hero-shot figcaption { margin-top: 12px; color: var(--text-3); font-size: 13px; text-align: center; }

/* Скриншоты программы — в рамке окна */
.shot-frame {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: #17171a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.shot-frame img { width: 100%; }

/* ---------- Примеры ответов ---------- */
.examples { padding: 40px 0; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.examples-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qa { padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.qa-q { align-self: flex-end; max-width: 92%; padding: 7px 13px; border-radius: 12px 12px 4px 12px; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.qa-a { color: var(--text); font-size: 15px; line-height: 1.55; }
.qa-a .tag { margin-right: 4px; vertical-align: .1em; }
.qa-ref { margin-top: auto; color: var(--text-3); font-size: 13px; }

/* ---------- Секции ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.kicker { margin-bottom: 12px; color: var(--accent-text); font-size: 14px; font-weight: 700; }
.section-head h2, .video-copy h2, .cta h2, .servers h2 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; }
.section-lead { margin-top: 16px; color: var(--text-2); font-size: 17px; }
.video-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Возможности ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 56px; padding: 40px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature-flip .feature-text { order: 2; }
.feature-text h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 26px; line-height: 1.25; letter-spacing: -.02em; font-weight: 800; margin-bottom: 14px; }
.feature-text p { color: var(--text-2); font-size: 16px; margin-bottom: 20px; }
.feature-shot { margin: 0; }
.ticks { display: grid; gap: 9px; }
.ticks li { position: relative; padding-left: 26px; color: var(--text); font-size: 15px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .5em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(-45deg);
}

.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.mini { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.mini svg { width: 26px; height: 26px; margin-bottom: 16px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.mini p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.mini-soon svg { stroke: var(--text-3); }

/* ---------- Как начать ---------- */
.start { background: var(--bg-2); border-block: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.step { padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.step-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border-radius: 9px;
  background: var(--accent-bg);
  color: var(--accent-text);
  font-weight: 800;
}
.step h3 { font-size: 19px; font-weight: 800; }
.step p { color: var(--text-2); font-size: 15px; }
.step .link { margin-top: auto; padding-top: 6px; font-size: 15px; }

/* ---------- Серверы ---------- */
.servers { padding: 34px 0; border-bottom: 1px solid var(--line); }
.servers-inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.servers h2 { font-size: 20px; letter-spacing: -.01em; }
.server-list { display: flex; flex-wrap: wrap; gap: 10px; }
.server { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-3); font-size: 14px; }
.server strong { color: var(--text-2); font-size: 15px; }
.server-live { border-color: rgba(76, 178, 122, .35); color: var(--text-2); }
.server-live strong { color: var(--text); }

/* ---------- Цены ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 26px 24px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.plan h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.plan-price strong { font-size: 34px; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.plan-price span { color: var(--text-3); font-size: 14px; }
.plan-list { display: grid; gap: 10px; margin-bottom: 26px; color: var(--text-2); font-size: 15px; }
.plan-list b { color: var(--text); }
.plan .btn { margin-top: auto; width: 100%; }
.plan-main { border-color: var(--accent); }
.plan-badge { position: absolute; top: -12px; left: 22px; padding: 2px 10px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }

/* ---------- Видео ---------- */
.video { background: var(--bg-2); border-block: 1px solid var(--line); }
.video-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: center; gap: 56px; }
.video-card { position: relative; display: block; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.video-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 35%; opacity: .75; transition: opacity .2s; }
.video-card:hover img { opacity: .9; }
.video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: background .15s;
}
.video-card:hover .video-play { background: var(--accent-hover); }
.video-play svg { width: 30px; height: 30px; margin-left: 4px; fill: #fff; }
.video-label { position: absolute; left: 18px; bottom: 16px; padding: 6px 12px; border-radius: 8px; background: rgba(17, 17, 19, .85); font-size: 14px; font-weight: 700; }

/* ---------- Вопросы ---------- */
.faq-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: start; }
.faq .section-head { margin-bottom: 0; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq-list summary {
  position: relative;
  padding: 18px 52px 18px 22px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list details p { padding: 0 22px 20px; color: var(--text-2); font-size: 15.5px; }
.faq-list details a { color: var(--accent-text); font-weight: 700; }

/* ---------- Призыв ---------- */
.cta { padding: 64px 0; border-top: 1px solid var(--line); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding: 40px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cta p { margin-top: 8px; color: var(--text-2); }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Подвал ---------- */
.site-footer { padding: 48px 0 28px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-about p { margin-top: 14px; color: var(--text-3); font-size: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; font-size: 14px; color: var(--text-2); }
.footer-col strong { margin-bottom: 4px; color: var(--text); font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-col span { color: var(--text-3); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.footer-about .brand img { width: 32px; height: 32px; }

/* ---------- Помощь (мини-чат) ---------- */
.support-widget { position: fixed; right: 22px; bottom: 22px; z-index: 40; }
.support-launcher {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  transition: background .15s;
}
.support-launcher:hover { background: #2a2a30; }
.support-launcher svg { width: 24px; height: 24px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.support-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(370px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.support-panel[hidden] { display: none; }
.support-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.support-head img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.support-head div { display: flex; flex-direction: column; line-height: 1.3; }
.support-head strong { font-size: 15px; }
.support-head small { color: var(--text-3); font-size: 12px; }
.support-close { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font-size: 22px; cursor: pointer; }
.support-close:hover { background: var(--surface-2); color: var(--text); }
.support-messages { display: flex; flex-direction: column; gap: 8px; max-height: 300px; min-height: 140px; padding: 16px; overflow-y: auto; scrollbar-width: none; }
/* Ползунок прячем — переписка листается колёсиком и пальцем как обычно. */
.support-messages::-webkit-scrollbar { display: none; }
.support-message { max-width: 88%; padding: 9px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.support-message-bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.support-message-user { align-self: flex-end; background: var(--accent-bg); color: var(--text); border-bottom-right-radius: 4px; }
.support-message a { color: var(--accent-text); font-weight: 700; }
.support-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.support-quick button { padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: none; color: var(--text-2); font-size: 13px; cursor: pointer; }
.support-quick button:hover { color: var(--text); background: var(--surface-2); }
.support-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.support-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.support-form input:focus { outline: none; border-color: var(--accent); }
.support-form button { width: 42px; flex: none; display: grid; place-items: center; border: 0; border-radius: 9px; background: var(--accent); cursor: pointer; }
.support-form button svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.support-disclaimer { padding: 0 16px 14px; color: var(--text-3); font-size: 12px; }
.support-disclaimer a { color: var(--text-2); text-decoration: underline; }

/* ---------- Адаптация ---------- */
@media (max-width: 1040px) {
  .hero-inner, .feature, .video-inner, .faq-inner { grid-template-columns: 1fr; gap: 36px; }
  .feature-flip .feature-text { order: 0; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: grid;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 12px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: none;
    cursor: pointer;
  }
  .menu-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .nav-link { padding: 12px; font-size: 16px; text-align: left; }
  .nav-sep { width: auto; height: 1px; margin: 6px 0; }
  .site-nav .btn { margin: 8px 0 0; min-height: 46px; }
  .examples-grid, .steps { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .hero { padding: 44px 0 40px; }
  .hero-lead { font-size: 16.5px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .feature { padding: 28px 0; }
  .feature-text h3 { font-size: 22px; }
  .plans, .mini-grid { grid-template-columns: 1fr; }
  .servers-inner { gap: 16px; }
  .cta-inner { padding: 28px 22px; }
  .cta-actions, .cta-actions .btn { width: 100%; }
  .footer-main { grid-template-columns: 1fr; }
  .support-widget { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Личный кабинет (account.html) ---------- */
.page-account { min-height: 100vh; display: flex; flex-direction: column; }
.acc-main { flex: 1; padding: 56px 0 72px; }
.acc-nav { display: flex; align-items: center; gap: 8px; }
.acc-loading { color: var(--text-3); text-align: center; padding: 60px 0; }

.auth { max-width: 440px; margin: 0 auto; }
.auth h1, .cab-who h1 { font-size: clamp(28px, 4vw, 36px); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; }
.auth-lead { margin: 12px 0 28px; color: var(--text-2); }
.auth-card { padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tabs { display: flex; gap: 4px; padding: 3px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.tabs button { flex: 1; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--text-3); font-weight: 700; font-size: 14.5px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.fld { display: grid; gap: 6px; margin-bottom: 14px; }
.fld span { color: var(--text-2); font-size: 14px; font-weight: 600; }
.fld input, .inline-form input, .stack-form input {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.fld input:focus, .inline-form input:focus, .stack-form input:focus { outline: none; border-color: var(--accent); }
#auth-form .btn { width: 100%; margin-top: 4px; }
.form-msg { min-height: 0; margin: 4px 0 10px; color: var(--text-3); font-size: 14px; }
.form-msg:empty { margin: 0; }
.form-msg.bad { color: var(--accent-text); }
.form-msg.good { color: var(--green); }
.auth-note { margin-top: 16px; color: var(--text-3); font-size: 13.5px; }
.auth-note a { color: var(--accent-text); font-weight: 700; }

.cab-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.cab-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cab-who h1 { overflow: hidden; text-overflow: ellipsis; }
.cab-who p { color: var(--text-3); font-size: 14px; }
.cab-avatar { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 22px; font-weight: 800; }
.cab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cab-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.cab-card .btn { align-self: flex-start; }
.cab-label { color: var(--text-3); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cab-status { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.cab-sub { color: var(--text-2); font-size: 15px; }
.cab-plan.is-pro { border-color: var(--accent); }
.inline-form { display: flex; gap: 8px; margin-top: 4px; }
.inline-form .btn { flex: none; }
.stack-form { display: grid; gap: 8px; }
.key-list { display: flex; flex-wrap: wrap; gap: 6px; }
.key-list li { padding: 4px 10px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-family: Consolas, monospace; }
.cab-steps { display: grid; gap: 8px; padding-left: 20px; list-style: decimal; color: var(--text-2); font-size: 15px; }
.acc-footer { padding: 0 0 28px; }
.acc-footer .footer-bottom { display: flex; justify-content: space-between; margin-top: 0; }

@media (max-width: 760px) {
  .cab-grid { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; }
  .inline-form .btn { width: 100%; }
}
@media (max-width: 600px) {
  .acc-main { padding: 36px 0 56px; }
  .auth-card, .cab-card { padding: 20px; }
  .cab-head { flex-wrap: wrap; }
}

/* Оплата в кабинете */
.pay-banner { margin-bottom: 16px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text-2); font-size: 15px; }
.pay-banner b { color: var(--text); }
.pay-banner.good { border-color: rgba(76, 178, 122, .45); color: var(--text); }
.pay-banner.bad { border-color: var(--accent); color: var(--text); }
.pay-banner a { color: var(--accent-text); font-weight: 700; }
.pay-banner .btn { margin-left: 8px; vertical-align: middle; }
.cab-buy { grid-column: 1 / -1; }
.buy-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.buy-plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--bg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.buy-plan b { font-size: 15.5px; }
.buy-plan span { color: var(--text-2); font-size: 14px; }
.buy-plan:hover { border-color: var(--text-3); background: var(--surface-2); }
.buy-plan.main { border-color: var(--accent); }
@media (max-width: 760px) { .buy-plans { grid-template-columns: 1fr; } }

/* ---------- Окно оформления подписки (pay.js) ---------- */
html.pay-open { overflow: hidden; }
.co-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 8, 10, .75);
  overflow-y: auto;
}
.co-box {
  width: min(620px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--bg-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.co-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 18px; }
.co-head h2 { font-size: 22px; letter-spacing: -.02em; font-weight: 800; }
.co-head p { margin-top: 4px; color: var(--text-3); font-size: 14px; }
.co-close { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-2); cursor: pointer; }
.co-close svg { width: 16px; height: 16px; fill: none; stroke: var(--text-2); stroke-width: 2.2; stroke-linecap: round; }
.co-close:hover { background: #2c2c33; }

/* Тарифы — три карточки-переключателя */
.co-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 24px; }
.co-plan {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.co-plan:hover { border-color: var(--text-3); }
.co-plan[aria-checked="true"] { border-color: var(--accent); background: var(--accent-bg); }
.co-plan-top { display: flex; align-items: center; justify-content: space-between; }
.co-plan-top b { font-size: 15px; }
.co-plan-price { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.co-plan-price s { display: block; color: var(--text-3); font-size: 12px; font-weight: 600; }
.co-plan-note { color: var(--text-3); font-size: 12.5px; line-height: 1.35; }
.co-plan[aria-checked="true"] .co-plan-note { color: var(--text-2); }

/* Кружок-переключатель у тарифа и способа оплаты */
.co-dot { width: 18px; height: 18px; flex: none; border: 2px solid var(--line-strong); border-radius: 50%; transition: border-color .15s, border-width .15s; }
[aria-checked="true"] > .co-dot, [aria-checked="true"] .co-dot { border-color: var(--accent); border-width: 5px; }

/* Способы оплаты — список */
.co-label { margin: 20px 24px 8px; color: var(--text-3); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.co-methods { display: grid; gap: 0; margin: 0 24px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); overflow: hidden; }
.co-method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.co-methods > :first-child { border-top: 0; }
.co-method:hover:not(.is-soon) { background: var(--surface-2); }
.co-method[aria-checked="true"] { background: var(--surface-2); }
.co-method.is-soon { cursor: default; opacity: .55; }
.co-method-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.co-method-text b { font-size: 15px; }
.co-method-text small { color: var(--text-3); font-size: 12.5px; }
.co-mark { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--bg); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.co-mark svg { width: 19px; height: 19px; fill: none; stroke: var(--text-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.co-mark-fp { background: #4384d0; }
.co-mark-fp svg { width: auto; height: 22px; fill: #fff; stroke: none; }
.co-mark-tg { background: #229ed9; }
.co-mark-tg svg { stroke: #fff; }
.co-tag { flex: none; padding: 2px 8px; border-radius: 6px; background: var(--bg); color: var(--text-3); font-size: 12px; font-weight: 700; }
.co-tag.rec { background: var(--accent-bg); color: var(--accent-text); }

.co-offer { display: flex; align-items: center; gap: 10px; margin: 16px 24px 0; color: var(--text-2); font-size: 14px; cursor: pointer; }
.co-offer input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); cursor: pointer; }
.co-offer a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.co-msg { margin: 12px 24px 0; color: var(--text-2); font-size: 14px; }
.co-msg:empty { display: none; }
.co-msg.bad { color: var(--accent-text); }

/* Итог и кнопка */
.co-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 18px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.co-total { display: flex; flex-direction: column; }
.co-total span { color: var(--text-3); font-size: 12.5px; }
.co-total b { font-size: 24px; letter-spacing: -.02em; }
.co-go { min-width: 220px; }
.co-go:disabled { opacity: .45; cursor: not-allowed; }
.co-note { padding: 0 24px 18px; background: var(--surface); color: var(--text-3); font-size: 12.5px; }

@media (max-width: 600px) {
  .co-modal { padding: 10px; align-items: end; }
  .co-head { padding: 20px 18px 14px; }
  .co-plans { grid-template-columns: 1fr; padding: 0 18px; }
  .co-plan { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
  .co-plan-top { flex: 1; }
  .co-plan-note { width: 100%; }
  .co-label { margin: 16px 18px 8px; }
  .co-methods { margin: 0 18px; }
  .co-offer, .co-msg { margin-left: 18px; margin-right: 18px; }
  .co-foot { padding: 16px 18px; flex-wrap: wrap; }
  .co-go { flex: 1; min-width: 0; }
  .co-note { padding: 0 18px 16px; }
}

/* Оферта и другие юридические страницы */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -.03em; font-weight: 800; }
.legal-meta { margin: 8px 0 28px; color: var(--text-3); }
.legal h2 { margin: 28px 0 10px; font-size: 19px; font-weight: 800; }
.legal p { margin-bottom: 10px; color: var(--text-2); }
.legal a { color: var(--accent-text); font-weight: 700; }
.co-box:focus { outline: none; }
.co-plan-price small { color: var(--text-3); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.video-playing { aspect-ratio: 16 / 9; background: #000; }
.video-frame { display: block; width: 100%; height: 100%; border: 0; }
.acc-social { display: inline-flex; gap: 18px; }


/* Тарифы в одну линию: шесть карточек на широком экране, секция шире остальных */
@media (min-width: 1280px) {
  .pricing .container { width: min(calc(100% - 48px), 1360px); }
  .plans { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
  .plan { padding: 24px 18px 20px; }
  .plan h3 { font-size: 16px; }
  .plan-price { flex-wrap: wrap; gap: 2px 6px; }
  .plan-price strong { font-size: 28px; }
  .plan-price span { font-size: 13px; }
  .plan-list { font-size: 14px; gap: 8px; }
  .plan-badge { left: 18px; }
}

/* Живая поддержка в чате помощи */
.support-human { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.support-contact { margin: 0 16px 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.support-launcher.has-reply { position: relative; }
.support-launcher.has-reply::after { content: ''; position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }

/* ---------- Медиа ---------- */
.media-intro { max-width: 760px; margin: 0 auto; }
.media-intro h1 { font-size: clamp(28px, 4.4vw, 42px); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; }
.media-rate { color: var(--accent-text); }
.media-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0 28px; counter-reset: ms; }
.media-steps li { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; counter-increment: ms; }
.media-steps li::before { content: counter(ms); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-bg); color: var(--accent-text); font-weight: 800; font-size: 14px; }
.media-steps b { font-size: 16px; }
.media-steps span { color: var(--text-2); font-size: 14px; }
.media-apply { max-width: 520px; display: flex; flex-direction: column; gap: 4px; }
.media-apply .btn { align-self: flex-start; margin-top: 8px; }
.media-share { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 16px; }
.copy-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.copy-row code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-strong); font: 14px Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.copy-row .btn { flex: none; }
.media-code { font-size: 18px !important; font-weight: 700; letter-spacing: .08em; color: var(--accent-text); }
.media-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.media-stat { padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.media-stat b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.media-stat span { color: var(--text-3); font-size: 13.5px; }
.media-balance { border-color: var(--accent); }
.media-balance .stack-form { margin-top: 4px; }
.media-reply { padding: 10px 12px; border-radius: 9px; background: var(--surface-2); font-size: 14px; }
.media-reply b { color: var(--text); }
.media-table { display: flex; flex-direction: column; }
.media-row { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.media-row:first-child { border-top: 0; }
.media-row b { color: var(--green); white-space: nowrap; }
.media-row.off { opacity: .55; }
.media-row.off b { color: var(--text-3); }
.media-empty { color: var(--text-3); font-size: 14px; }
.cab-promo-form { margin-top: 2px; }
@media (max-width: 860px) {
  .media-steps, .media-share { grid-template-columns: 1fr; }
  .media-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.media-status { margin-bottom: 14px; }
.media-status .btn { align-self: flex-start; margin-top: 4px; }

/* ---------- Почта ---------- */
.nav-mail { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.nav-mail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-mail[aria-current="page"] { color: var(--text); background: var(--surface); }
.mail-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 800; }
.mail-wrap { max-width: 820px; }
.mail-title { font-size: clamp(28px, 4vw, 36px); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; }
.mail-sub { color: var(--text-3); font-size: 14px; }
.mail-guest { max-width: 520px; display: flex; flex-direction: column; gap: 12px; }
.mail-guest .btn { align-self: flex-start; }
.mail-list { display: flex; flex-direction: column; gap: 8px; }
.letter { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.letter.unread { border-color: var(--line-strong); background: var(--surface-2); }
.letter-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: none; border: 0; color: var(--text-2); text-align: left; cursor: pointer; font: inherit; }
.letter.unread .letter-head { color: var(--text); }
.letter-icon { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--bg-2, var(--surface-2)); font-size: 16px; }
.letter-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.letter.unread .letter-title { font-weight: 800; }
.letter.unread .letter-title::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.letter-date { flex: none; color: var(--text-3); font-size: 13px; }
.letter-body { padding: 0 16px 16px 60px; display: flex; flex-direction: column; gap: 12px; }
.letter-body p { margin: 0; color: var(--text-2); white-space: pre-wrap; line-height: 1.55; }
.letter-body .btn { align-self: flex-start; }
.mail-empty { padding: 28px 0; text-align: center; }
@media (max-width: 640px) {
  .letter-head { flex-wrap: wrap; }
  .letter-date { width: 100%; padding-left: 44px; margin-top: -8px; }
  .letter-body { padding-left: 16px; }
}
@media (max-width: 640px) {
  .acc-nav { gap: 2px; }
  .acc-nav .nav-link { padding-inline: 8px; }
  .acc-nav a[href="index.html"] { display: none; }
  .acc-nav .nav-mail span { display: none; }
}
@media (max-width: 420px) {
  .acc-nav .btn-primary { display: none; }
}
