/* ==========================================================================
   BanRadar — тёмная премиум-тема
   ========================================================================== */
:root {
  --bg: #0A0D12;
  --bg-soft: #10151D;
  --card: #131922;
  --card-hi: #172030;
  --border: #202836;
  --border-hi: #2C3849;

  --text: #E8ECF3;
  --muted: #8A93A5;
  --dim: #626C7E;

  --accent: #4C7DF0;
  --accent-2: #22D3EE;
  --accent-soft: rgba(76, 125, 240, .13);
  --cyan-soft: rgba(34, 211, 238, .12);

  --danger: #FF4D57;
  --warn: #FFB020;
  --ok: #2DD4A0;

  --grad: linear-gradient(135deg, #5B8DEF 0%, #22D3EE 100%);
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --glow: 0 0 40px rgba(76, 125, 240, .25);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15.5px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Manrope, Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color .18s var(--ease); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.022em; line-height: 1.18; font-weight: 700; }
h1 { font-size: clamp(32px, 5vw, 54px); }
h2 { font-size: clamp(25px, 3.4vw, 38px); }
h3 { font-size: 17.5px; }
p { margin: 0; }

.muted { color: var(--muted); }
.micro { color: var(--dim); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.center { text-align: center; }
.danger { color: var(--danger); }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.mono, code, pre { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; }

.icon { flex-shrink: 0; vertical-align: middle; }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.landing { flex: 1; }
main.container { padding-top: 34px; padding-bottom: 60px; flex: 1; }

/* ==========================================================================
   Шапка
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(10, 13, 18, .72);
  backdrop-filter: blur(16px) saturate(160%);
  transition: border-color .25s, background .25s;
}
.topbar.is-scrolled { border-bottom-color: var(--border); background: rgba(10, 13, 18, .92); }

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; }
.brand-logo { transition: transform .5s var(--ease); }
.brand:hover .brand-logo { transform: rotate(90deg); }
.brand-accent { color: var(--accent-2); }
.brand:hover { color: var(--text); }

.nav { display: flex; gap: 24px; font-size: 14.5px; margin-right: auto; }
.nav a { color: var(--muted); position: relative; padding: 3px 0; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }
/* Пункт «Войти» нужен только в мобильном меню — в шапке для него есть кнопка */
.nav .only-mobile { display: none; }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; border-radius: 2px; background: var(--grad);
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
}
.lang-option {
  padding: 4px 10px; font-size: 12.5px; font-weight: 650;
  color: var(--dim); border-radius: 7px; transition: all .18s var(--ease);
}
.lang-option:hover { color: var(--text); }
.lang-option.is-active { background: var(--card-hi); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.3); }

.user-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; color: var(--muted);
}
.user-chip:hover { color: var(--text); }
.chip-premium {
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent-2);
}
.link-muted { color: var(--dim); font-size: 14px; }
.link-muted:hover { color: var(--text); }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 21px; height: 2px; background: var(--text); border-radius: 2px; margin: 4px 0; transition: .25s; }

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 21px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14.5px; font-weight: 650;
  cursor: pointer;
  background: var(--accent); color: #fff;
  transition: transform .18s var(--ease), box-shadow .25s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 10px 26px rgba(76,125,240,.32); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 15px; font-size: 13.5px; border-radius: 9px; }
.btn-lg { padding: 14px 27px; font-size: 16px; border-radius: 13px; }
.btn-block { width: 100%; }

.btn-tg { background: var(--grad); position: relative; overflow: hidden; }
.btn-tg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.28), transparent 70%);
  transform: translateX(-110%);
}
.btn-tg:hover::after { animation: shine .8s var(--ease); }
@keyframes shine { to { transform: translateX(110%); } }

.btn-ghost { background: transparent; border-color: var(--border-hi); color: var(--text); }
.btn-ghost:hover { background: var(--card-hi); color: var(--text); border-color: var(--accent); box-shadow: none; }
.btn-danger { background: transparent; border-color: var(--border); color: var(--danger); }
.btn-danger:hover { background: rgba(255,77,87,.1); color: var(--danger); box-shadow: none; }

/* ==========================================================================
   Первый экран
   ========================================================================== */
.hero { position: relative; padding: 62px 0 26px; overflow: hidden; }
.hero-glow {
  position: absolute; top: -320px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 640px; pointer-events: none;
  background: radial-gradient(circle, rgba(76,125,240,.20) 0%, rgba(34,211,238,.07) 42%, transparent 68%);
  filter: blur(18px);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 54px; align-items: center;
}
.hero-copy > * + * { margin-top: 20px; }
.lead { font-size: 17px; color: var(--muted); max-width: 570px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.badge-live {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 11px;
  border: 1px solid rgba(34,211,238,.3);
  background: var(--cyan-soft);
  border-radius: 999px;
  font-size: 13px; font-weight: 620; color: var(--accent-2);
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(34,211,238,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(34,211,238,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
}

/* ---------- Радар ---------- */
.hero-radar { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.radar {
  position: relative;
  width: min(360px, 78vw); aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(34,211,238,.07) 0%, transparent 62%),
    radial-gradient(circle at 50% 50%, #0E1520 0%, #090C11 72%);
  border: 1px solid var(--border-hi);
  box-shadow: inset 0 0 60px rgba(34,211,238,.07), 0 20px 60px rgba(0,0,0,.5);
  overflow: hidden;
}
.radar-rings { position: absolute; inset: 0; }
.radar-rings span {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(76,125,240,.16);
  border-radius: 50%;
}
.radar-rings span:nth-child(1) { width: 25%; height: 25%; }
.radar-rings span:nth-child(2) { width: 50%; height: 50%; }
.radar-rings span:nth-child(3) { width: 75%; height: 75%; }
.radar-rings span:nth-child(4) { width: 98%; height: 98%; animation: ringPulse 4s ease-out infinite; }
@keyframes ringPulse {
  0% { opacity: .5; transform: translate(-50%, -50%) scale(.55); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
.radar-cross::before, .radar-cross::after {
  content: ""; position: absolute; background: rgba(76,125,240,.13);
}
.radar-cross::before { left: 0; right: 0; top: 50%; height: 1px; }
.radar-cross::after { top: 0; bottom: 0; left: 50%; width: 1px; }

.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(34,211,238,.34) 0deg, rgba(34,211,238,.12) 22deg,
    rgba(34,211,238,0) 58deg, transparent 360deg);
  animation: sweep 4s linear infinite;
  mix-blend-mode: screen;
}
@keyframes sweep { to { transform: rotate(360deg); } }

.radar-core {
  position: absolute; top: 50%; left: 50%; width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 14px var(--accent-2);
}
.radar-blip {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-2); opacity: 0;
  animation: blip 4s linear infinite;
}
.radar-blip::after {
  content: ""; position: absolute; inset: -6px;
  border: 1px solid currentColor; border-radius: 50%; color: inherit; opacity: .45;
}
.radar-blip--1 { top: 26%; left: 66%; animation-delay: .55s; }
.radar-blip--2 { top: 62%; left: 74%; animation-delay: 1.35s; }
.radar-blip--3 { top: 71%; left: 33%; animation-delay: 2.5s; background: var(--danger); }
.radar-blip--4 { top: 34%; left: 27%; animation-delay: 3.35s; }
.radar-blip.is-alert { box-shadow: 0 0 16px var(--danger); }
@keyframes blip {
  0%   { opacity: 0; transform: scale(.5); }
  4%   { opacity: 1; transform: scale(1.25); }
  22%  { opacity: .85; transform: scale(1); }
  70%  { opacity: .15; }
  100% { opacity: 0; }
}

.radar-caption {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--dim);
}
.scan-line {
  width: 26px; height: 2px; border-radius: 2px;
  background: var(--grad); animation: scanline 2s ease-in-out infinite;
}
@keyframes scanline { 50% { opacity: .25; transform: scaleX(.5); } }

/* ---------- Счётчики ---------- */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; margin-top: 52px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.stat-cell { background: var(--bg-soft); padding: 22px 20px; transition: background .25s; }
.stat-cell:hover { background: var(--card-hi); }
.stat-value {
  font-size: 30px; font-weight: 750; letter-spacing: -.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* ==========================================================================
   Бегущая лента
   ========================================================================== */
.ticker-wrap {
  display: flex; align-items: center; gap: 18px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg-soft); margin-top: 44px; overflow: hidden;
}
.ticker-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2);
  border-right: 1px solid var(--border); flex-shrink: 0;
  background: var(--bg);
}
.ticker { overflow: hidden; flex: 1; }
.ticker-track { display: flex; gap: 38px; width: max-content; animation: marquee 46s linear infinite; }
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 12px 0; white-space: nowrap; }
.ticker-item b { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; }

/* ==========================================================================
   Секции
   ========================================================================== */
.section { padding: 82px 0; max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { margin-bottom: 14px; }
.section-lead { color: var(--muted); font-size: 16.5px; }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; margin-bottom: 16px;
  border: 1px solid var(--border-hi); border-radius: 999px;
  font-size: 12.5px; font-weight: 620; color: var(--accent-2);
  background: var(--bg-soft);
}

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(292px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); }

/* ---------- Карточки ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(23,32,48,.55), rgba(19,25,34,.75));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .28s var(--ease), border-color .28s, box-shadow .28s;
}
.card-feature:hover, .card-step:hover, .card-audience:hover {
  transform: translateY(-4px);
  border-color: var(--border-hi);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 9px; }
.card p { color: var(--muted); font-size: 14.5px; }

.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 16px;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid rgba(76,125,240,.24);
  color: var(--accent-2);
}
.icon-badge--soft { width: 40px; height: 40px; border-radius: 11px; }

.card-feature.is-highlight {
  border-color: rgba(34,211,238,.3);
  background: linear-gradient(180deg, rgba(34,211,238,.09), rgba(19,25,34,.8));
}
.card-feature.is-highlight .icon-badge { background: var(--cyan-soft); border-color: rgba(34,211,238,.35); }

.card-step { padding-top: 26px; }
.step-num {
  position: absolute; top: 20px; right: 22px;
  font-size: 34px; font-weight: 800; letter-spacing: -.04em;
  color: var(--border-hi); line-height: 1;
}

/* ---------- Таймлайн ---------- */
.timeline-card { margin-top: 20px; padding: 30px 28px 24px; }
.timeline-bar {
  position: relative; height: 5px; border-radius: 3px;
  background: var(--border); margin: 28px 0 22px;
}
.timeline-progress {
  position: absolute; inset: 0; width: 0; border-radius: 3px;
  background: var(--grad);
  transition: width 1.6s var(--ease);
}
.is-visible .timeline-progress { width: 100%; }
.timeline-window {
  position: absolute; left: 5%; right: 12%; top: -9px; bottom: -9px;
  border: 1px dashed rgba(34,211,238,.45);
  border-radius: 7px; background: var(--cyan-soft);
}
.timeline-window-label {
  position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
  font-size: 12px; font-weight: 640; color: var(--accent-2); white-space: nowrap;
}
.timeline-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.timeline-point { display: flex; flex-direction: column; gap: 3px; position: relative; padding-top: 4px; }
.timeline-point b { font-size: 15px; }
.timeline-dot {
  position: absolute; top: -35px; left: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border-hi);
}
.timeline-point.is-ours .timeline-dot { border-color: var(--accent-2); box-shadow: 0 0 10px rgba(34,211,238,.6); }
.timeline-point.is-ours b { color: var(--accent-2); }
.timeline-point.is-end .timeline-dot { border-color: var(--danger); }
.timeline-point.is-end b { color: var(--danger); }
.timeline-point:last-child { align-items: flex-end; text-align: right; }
.timeline-point:last-child .timeline-dot { left: auto; right: 0; }

/* ==========================================================================
   Подключение бота
   ========================================================================== */
.section-connect {
  background:
    radial-gradient(700px 320px at 15% 0%, rgba(76,125,240,.10), transparent 65%),
    var(--bg-soft);
  max-width: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding-left: 0; padding-right: 0;
}
.section-connect > * { max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

.connect-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: start; }
.connect-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.connect-step {
  display: flex; gap: 17px; padding: 18px 20px;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: background .25s, border-color .25s;
}
.connect-step:hover { background: var(--card); border-color: var(--border); }
.connect-step h3 { margin-bottom: 6px; }
.connect-step p { color: var(--muted); font-size: 14.5px; }
.connect-num {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 750; font-size: 15px;
  background: var(--accent-soft); border: 1px solid rgba(76,125,240,.3);
  color: var(--accent-2);
}

.connect-side { display: flex; flex-direction: column; gap: 16px; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 13px; }
.qr-frame {
  padding: 12px; border-radius: 14px; background: #fff;
  line-height: 0; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.qr-frame img { display: block; width: 150px; height: 150px; }

.phone-card { background: linear-gradient(180deg, rgba(23,32,48,.7), rgba(15,20,28,.9)); }
.phone-head { display: flex; align-items: center; gap: 11px; padding-bottom: 13px; border-bottom: 1px solid var(--border); }
.phone-head div { display: flex; flex-direction: column; line-height: 1.25; }
.phone-head b { font-size: 14.5px; }
.tg-bubble {
  margin-top: 14px; padding: 14px 16px;
  background: var(--card-hi); border: 1px solid var(--border);
  border-radius: 4px 14px 14px 14px;
}
.tg-bubble b { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.tg-bubble p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.tg-hint { display: flex; align-items: center; gap: 7px; color: var(--warn) !important; font-size: 13px !important; }
.tg-actions { display: flex; gap: 8px; margin-top: 10px; }
.tg-btn {
  flex: 1; text-align: center; padding: 9px;
  background: var(--card-hi); border: 1px solid var(--border);
  border-radius: 9px; font-size: 13px; color: var(--accent-2);
}

.commands-card { margin-top: 22px; }
.commands-card h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.commands-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px 26px; }
.command-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.command-row code {
  padding: 3px 9px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-2);
  font-size: 13px; font-weight: 600;
}

/* ==========================================================================
   Тарифы
   ========================================================================== */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px; max-width: 830px; margin: 0 auto;
}
.price-card { display: flex; flex-direction: column; padding: 30px 26px; }
.price-card--pro {
  border-color: rgba(76,125,240,.45);
  background: linear-gradient(180deg, rgba(76,125,240,.11), rgba(19,25,34,.85));
  box-shadow: var(--glow);
}
.price-ribbon {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  padding: 4px 14px; border-radius: 999px;
  background: var(--grad); color: #06121C;
  font-size: 11.5px; font-weight: 750; white-space: nowrap;
}
.price-amount { font-size: 46px; font-weight: 780; letter-spacing: -.04em; margin-top: 12px; line-height: 1; }
.price-amount .currency { font-size: 24px; color: var(--muted); margin-right: 2px; }
.price-period { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.price-terms { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.term {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 13px; border-radius: 10px;
  background: rgba(10,13,18,.5); border: 1px solid var(--border);
  font-size: 14px;
}
.term.is-best { border-color: rgba(45,212,160,.35); background: rgba(45,212,160,.07); }
.term .save { font-style: normal; color: var(--ok); font-size: 12.5px; font-weight: 650; margin-left: 5px; }

.price-features { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--muted); }
.price-features .icon { color: var(--ok); margin-top: 2px; }

/* ==========================================================================
   API
   ========================================================================== */
.api-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 44px; align-items: center; }
.api-layout h2 { margin-bottom: 14px; }
.api-layout .btn { margin-top: 22px; }

.code-window {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #0B0F16; overflow: hidden; box-shadow: var(--shadow);
}
.code-head {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-soft);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #FF5F57; } .dot-y { background: #FEBC2E; } .dot-g { background: #28C840; }
.code-title { margin-left: 8px; font-size: 12.5px; color: var(--dim); }
.code-body { margin: 0; padding: 20px; font-size: 13px; line-height: 1.75; overflow-x: auto; color: #C7D0DE; }
.c-cmd { color: var(--accent-2); font-weight: 600; }
.c-str { color: #7EE787; }
.c-key { color: #79B8FF; }
.c-num { color: #F0883E; }
.c-var { color: #D2A8FF; }
.c-com { color: var(--dim); }
.c-danger { color: var(--danger); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); overflow: hidden; transition: border-color .25s;
}
.faq-item[open] { border-color: var(--border-hi); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 17px 20px; cursor: pointer; font-weight: 620; font-size: 15.5px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-2); }
.faq-chevron { color: var(--dim); transition: transform .3s var(--ease); display: inline-flex; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--accent-2); }
.faq-item p { padding: 0 20px 19px; color: var(--muted); font-size: 14.8px; }

/* ==========================================================================
   Финальный призыв
   ========================================================================== */
.cta-section {
  position: relative; overflow: hidden;
  max-width: 1180px; margin: 0 auto 90px;
  padding: 62px 32px; text-align: center;
  border: 1px solid var(--border-hi); border-radius: 24px;
  background: linear-gradient(160deg, rgba(76,125,240,.14), rgba(34,211,238,.05) 55%, rgba(19,25,34,.6));
}
.cta-glow {
  position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 620px; height: 400px; pointer-events: none;
  background: radial-gradient(circle, rgba(34,211,238,.24), transparent 68%);
  filter: blur(22px);
}
.cta-section h2 { position: relative; margin-bottom: 12px; }
.cta-section p { position: relative; color: var(--muted); margin-bottom: 27px; font-size: 16.5px; }
.cta-section .btn { position: relative; }

/* ==========================================================================
   Подвал
   ========================================================================== */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: auto; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 44px 24px 30px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px;
}
.footer-brand > * + * { margin-top: 11px; }
.footer-brand p { max-width: 340px; font-size: 14px; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.footer-links h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); margin-bottom: 12px; }
.footer-links a { display: block; padding: 4px 0; color: var(--muted); font-size: 14.5px; }
.footer-links a:hover { color: var(--accent-2); }
.footer-bottom {
  max-width: 1180px; margin: 0 auto; padding: 16px 24px 26px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.footer-bottom .micro { max-width: 620px; }

/* ==========================================================================
   Появление при скролле
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease) var(--delay, 0s), transform .7s var(--ease) var(--delay, 0s);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .radar-sweep, .pulse-dot, .ticker-track, .radar-blip, .radar-rings span:nth-child(4), .scan-line { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Кабинет
   ========================================================================== */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); }

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.stat { padding: 20px; }
.stat .value { font-size: 27px; font-weight: 750; letter-spacing: -.03em; }
.stat .label { color: var(--muted); font-size: 13px; margin-top: 3px; }

input[type=text], input[type=email], input[type=search], input[type=password], textarea, select {
  width: 100%;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 14px;
  color: var(--text); font: inherit; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 96px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 210px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 630;
  border: 1px solid var(--border); background: var(--bg-soft);
}
.badge-clean, .badge-low { color: var(--ok); border-color: rgba(45,212,160,.32); background: rgba(45,212,160,.09); }
.badge-medium { color: var(--warn); border-color: rgba(255,176,32,.32); background: rgba(255,176,32,.09); }
.badge-high, .badge-severe { color: var(--danger); border-color: rgba(255,77,87,.32); background: rgba(255,77,87,.09); }
.badge-accent { color: var(--accent-2); border-color: rgba(34,211,238,.32); background: var(--cyan-soft); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.2px; }
th {
  text-align: left; padding: 11px 12px;
  color: var(--dim); font-weight: 640; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .18s; }
tbody tr:hover td { background: rgba(28,35,48,.55); }

.factor { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.factor:last-child { border-bottom: none; }
.factor .score { color: var(--danger); font-weight: 700; white-space: nowrap; }

.alert-box { border-left: 3px solid var(--danger); background: rgba(255,77,87,.08); padding: 15px 18px; border-radius: 0 12px 12px 0; margin-bottom: 18px; }
.alert-box.warn { border-color: var(--warn); background: rgba(255,176,32,.08); }
.alert-box.info { border-color: var(--accent); background: var(--accent-soft); }

.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty .ico { font-size: 30px; display: block; margin-bottom: 12px; color: var(--dim); }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.copy-box {
  background: var(--bg); border: 1px dashed var(--accent);
  border-radius: 11px; padding: 15px; word-break: break-all; font-size: 13px; line-height: 1.7;
}

/* ==========================================================================
   Подробный разбор возможностей
   ========================================================================== */
.section-caps {
  background:
    radial-gradient(680px 300px at 85% 0%, rgba(34, 211, 238, .07), transparent 62%),
    var(--bg-soft);
  max-width: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-left: 0; padding-right: 0;
}
.section-caps > * {
  max-width: 1180px; margin-left: auto; margin-right: auto;
  padding-left: 24px; padding-right: 24px;
}

.tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 30px;
}
.tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 11px; color: var(--muted);
  font: inherit; font-size: 14.5px; font-weight: 620;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.tab:hover { color: var(--text); border-color: var(--border-hi); }
.tab.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.tab.is-active .icon { color: var(--accent-2); }
.tab-count {
  padding: 1px 7px; border-radius: 6px;
  background: rgba(10, 13, 18, .55);
  font-size: 12px; color: var(--dim);
}
.tab.is-active .tab-count { color: var(--accent-2); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeUp .45s var(--ease); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.cap-card { display: flex; flex-direction: column; }
.cap-card:hover { border-color: var(--border-hi); transform: translateY(-3px); box-shadow: var(--shadow); }
.cap-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 4px;
}
.cap-head .icon-badge { margin-bottom: 12px; }
.cap-card h3 { margin-bottom: 8px; line-height: 1.35; }
.cap-card > p { color: var(--muted); font-size: 14.3px; flex: 1; }

.cap-benefit {
  margin-top: 16px; padding: 13px 15px;
  border-radius: 11px;
  background: rgba(45, 212, 160, .06);
  border: 1px solid rgba(45, 212, 160, .18);
}
.cap-benefit-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ok);
  margin-bottom: 6px;
}
.cap-benefit p { color: var(--text); font-size: 13.8px; opacity: .92; }

.cap-endpoint .endpoint-line {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.method {
  padding: 3px 9px; border-radius: 7px;
  font-size: 11.5px; font-weight: 750; letter-spacing: .04em;
}
.method--get { background: rgba(45, 212, 160, .13); color: var(--ok); }
.method--post { background: rgba(76, 125, 240, .15); color: var(--accent-2); }
.cap-endpoint code {
  font-size: 13px; color: var(--text);
  background: rgba(10, 13, 18, .6);
  padding: 4px 10px; border-radius: 7px;
  border: 1px solid var(--border);
}

/* ---------- Таблица сравнения ---------- */
.compare-card { padding: 8px 8px 4px; }
.compare-table th, .compare-table td { padding: 13px 16px; }
.compare-table td.center, .compare-table th.center { text-align: center; }
.compare-table th.is-pro, .compare-table td.is-pro {
  background: linear-gradient(180deg, rgba(76, 125, 240, .1), rgba(76, 125, 240, .04));
}
.compare-table th.is-pro { color: var(--accent-2); }
.compare-table tbody tr:hover td { background: rgba(28, 35, 48, .5); }
.compare-table tbody tr:hover td.is-pro { background: rgba(76, 125, 240, .14); }
.mark-yes { color: var(--ok); display: inline-flex; }
.mark-no { color: var(--dim); }

/* ---------- Экран входа ---------- */
.auth-wrap { max-width: 440px; margin: 50px auto; }
.auth-card { padding: 32px 30px; }
.auth-card h1 { font-size: 25px; margin-bottom: 10px; }
.auth-card > p { margin-bottom: 20px; font-size: 14.5px; }
.code-input {
  font-size: 26px; letter-spacing: .34em; text-align: center;
  font-family: ui-monospace, Menlo, monospace; padding: 14px;
}

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  /* На узком экране сначала заголовок и кнопки, радар — под ними */
  .radar { width: min(300px, 68vw); }
  .connect-layout, .api-layout { grid-template-columns: 1fr; gap: 28px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 760px) {
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 10px 24px 18px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--border); }
  .burger { display: block; margin-left: auto; }
  .topbar-inner { position: relative; gap: 10px; }
  .topbar-actions { margin-left: auto; gap: 8px; }
  /* В шапке телефона помещаются только логотип, язык и одна кнопка.
     «Войти» и имя пользователя уезжают в бургер-меню. */
  .user-chip, .link-muted, .topbar-actions .btn-ghost { display: none; }
  .topbar-actions .btn-tg { padding: 7px 12px; font-size: 12.8px; }
  .lang-option { padding: 4px 8px; font-size: 12px; }
  .nav .only-mobile { display: block; }
  .section { padding: 58px 20px; }
  .hero { padding-top: 42px; }
  .timeline-points { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .timeline-bar { display: none; }
  .timeline-dot { position: static; margin-bottom: 4px; }
  .timeline-point:last-child { align-items: flex-start; text-align: left; }
  .cta-section { margin-left: 20px; margin-right: 20px; padding: 44px 22px; }
  .ticker-label { padding: 12px 14px; font-size: 11px; }
  /* Табы в одну строку с прокруткой — иначе они съедают пол-экрана */
  .tabs {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    margin-left: -20px; margin-right: -20px; padding: 0 20px 4px;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }
}

@media (max-width: 460px) {
  .footer-links { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}

/* ==========================================================================
   Телефон: таблицы становятся карточками
   --------------------------------------------------------------------------
   Горизонтальная прокрутка таблицы на телефоне — худшее, что можно сделать:
   пользователь не видит, что колонки уехали. Поэтому каждая строка
   разворачивается в карточку, а подписи колонок берутся из data-label.
   ========================================================================== */
@media (max-width: 760px) {
  .table-wrap { overflow-x: visible; }

  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }

  tbody tr {
    background: rgba(10, 13, 18, .45);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 6px 14px 10px;
    margin-bottom: 10px;
  }
  tbody tr:last-child { margin-bottom: 0; }
  tbody tr:hover td { background: transparent; }

  td {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    text-align: left !important;
  }
  tr td:last-child { border-bottom: none; }

  td[data-label]::before {
    content: attr(data-label);
    flex-shrink: 0;
    color: var(--dim);
    font-size: 11.5px;
    font-weight: 640;
    text-transform: uppercase;
    letter-spacing: .05em;
  }

  /* Ячейки без подписи: флаг риска и кнопки — во всю ширину */
  .cell-flag { justify-content: flex-start; padding-bottom: 0; border-bottom: none; }
  .cell-actions { justify-content: stretch; }
  .cell-actions form, .cell-actions .btn { width: 100%; }

  /* Таблица тарифов остаётся таблицей: три коротких колонки читаются и так.
     Ширину раскладываем принудительно, иначе колонка Premium уезжает за край. */
  .compare-table, .compare-table thead, .compare-table tbody,
  .compare-table tr, .compare-table td { display: revert; width: auto; }
  .compare-table { display: table; width: 100%; table-layout: fixed; }
  .compare-table thead { display: table-header-group; }
  .compare-table tr { display: table-row; background: none; border: none; padding: 0; margin: 0; }
  .compare-table td { display: table-cell; border-bottom: 1px solid var(--border); }
  .compare-table td::before { content: none; }
  .compare-table th, .compare-table td { padding: 11px 6px; font-size: 12.2px; line-height: 1.35; }
  .compare-table th:first-child, .compare-table td:first-child {
    padding-left: 11px; width: 44%;
  }
  .compare-table th:not(:first-child), .compare-table td:not(:first-child) { width: 28%; }
  /* Заголовки таблиц по умолчанию nowrap, а длинные значения вроде
     «без ограничений» распирают колонку даже при table-layout: fixed */
  .compare-table th, .compare-table td { white-space: normal; overflow-wrap: break-word; }
  .compare-card { padding: 4px 2px 2px; }

  /* Статистика — плитка 2×2 вместо четырёх экранов подряд */
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card.stat { padding: 14px 15px; }
  .stat .value { font-size: 21px; }
  .stat .label { font-size: 11.5px; line-height: 1.35; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-cell { padding: 16px 15px; }
  .stat-value { font-size: 24px; }
  .stat-label { font-size: 11.5px; line-height: 1.35; }

  /* Кабинет: плотнее заголовки и карточки */
  main.container { padding-top: 22px; }
  .page-head { margin-bottom: 18px; gap: 12px; }
  .page-head h1 { font-size: 25px; }
  h2 { font-size: 21px; margin: 26px 0 12px; }
  .card { padding: 17px 16px; }
  .grid { gap: 12px; }
  .list-row { gap: 10px; font-size: 14px; }
  .factor { gap: 10px; font-size: 14px; }

  /* Формы: поля и кнопка на всю ширину, без обрезков */
  .form-row { gap: 12px; }
  .form-row > div { min-width: 100%; max-width: 100% !important; }
  .form-row .btn { width: 100%; }

  /* Длинные команды и ключи не должны рвать вёрстку */
  .copy-box { font-size: 12px; }
  .code-body { font-size: 11.5px; padding: 15px 13px; }
}

/* Совсем узкие экраны — iPhone SE и подобные */
@media (max-width: 380px) {
  .grid-4, .stats-row { grid-template-columns: 1fr; }
  .brand-name { font-size: 15px; }
  .compare-table th, .compare-table td { padding: 10px 6px; font-size: 12.3px; }
}
