:root {
  --bg: #0b0d12;
  --card: #121722;
  --muted: #8a93a6;
  --text: #e7ecf3;
  --primary: #4da3ff;
  --primary-2: #2d82ff;
  --ring: rgba(77, 163, 255, 0.4);
  --border: #1e2533;
  --danger: #ff5370;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: radial-gradient(
      1200px 1200px at 80% -10%,
      rgba(77, 163, 255, 0.08),
      transparent 60%
    ),
    var(--bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed; /* фиксируем, чтобы не повторялся при скролле */
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  padding: 0;
}

/* Базовый контейнер */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

/* На маленьких экранах увеличиваем боковые отступы */
@media (max-width: 768px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .shell {
    grid-template-columns: 1fr; /* только одна колонка */
  }

  .panel {
    margin-bottom: 20px; /* чтобы блоки не слипались */
  }

  .headline {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}

/* Центровка блока с заголовком */
.headline {
  position: relative;
  margin-top: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto; /* центрируем на мобилке */
  text-align: center; /* чтобы текст был по центру */
}

@media (min-width: 981px) {
  .headline {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 32px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 23, 34, 0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}
.logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(77, 163, 255, 0.8));
  border-radius: 8px;
}
.brand h1 {
  font-size: 18px;
  margin: 0;
  letter-spacing: 0.2px;
  color: #fff !important;
  text-decoration: none !important;
}
.brand a,
.brand a:visited {
  text-decoration: none !important;
  color: inherit !important;
}
.menu {
  display: flex;
  gap: 16px;
  color: var(--muted);
}
.menu a {
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}
.menu a:hover {
  color: var(--text);
  background: rgba(77, 163, 255, 0.12);
  border-color: rgba(77, 163, 255, 0.35);
  box-shadow: 0 0 0 3px var(--ring) inset;
}

.shell {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: start;
}
.panel {
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0)
    ),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.left {
  position: relative;
  padding: 32px;
  overflow: hidden;
  min-height: 540px;
}
.right {
  padding: 28px;
}
.hero {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.orb {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.18;
}
.orb.one {
  background: #4da3ff;
  top: -60px;
  left: -60px;
}
.orb.two {
  background: #9b5cff;
  bottom: -80px;
  right: -40px;
  opacity: 0.14;
}
.headline {
  position: relative;
  margin-top: 40px;
  max-width: 560px;
}
.headline h2 {
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 14px;
}
.headline p {
  margin: 0;
  color: var(--muted);
}

.card {
  padding: 32px;
  border-radius: 16px;
  background: rgba(8, 10, 16, 0.6);
  border: 1px solid var(--border);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.tab {
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.tab.active {
  color: var(--text);
  background: rgba(77, 163, 255, 0.12);
  border-color: rgba(77, 163, 255, 0.35);
  box-shadow: 0 0 0 3px var(--ring) inset;
}

form {
  display: grid;
  gap: 14px;
}
label {
  font-size: 13px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
}
.input {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: #0f141f;
  border-radius: 12px;
  padding: 12px 14px;
  transition: box-shadow 0.15s, border-color 0.15s, background 0.15s;
  width: 100%;
}
.input:focus-within {
  border-color: rgba(77, 163, 255, 0.5);
  box-shadow: 0 0 0 4px var(--ring);
}
.input input[type="text"],
.input input[type="email"],
.input input[type="password"],
.input textarea {
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  width: 100%;
  font-size: 15px;
}
.input input[type="radio"],
.input input[type="checkbox"] {
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.row2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 700px) {
  .row2 {
    grid-template-columns: 1fr;
  }
}
.row2 .input {
  justify-content: flex-start;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
.link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
}
.btn {
  appearance: none;
  border: 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  color: #08101a;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(77, 163, 255, 0.35);
}
.btn:active {
  transform: translateY(1px);
}

/* вывод цены */
.price-box {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(77, 163, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}
.price-box strong {
  color: var(--primary);
}

.section {
  margin-top: 28px;
}
.sec-title {
  font-size: 20px;
  margin: 0 0 14px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .left {
    min-height: 320px;
  }
  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 395px) {
  .panel {
    width: 81.5vw !important;
  }
  .card {
    padding: 32px 16px;
  }
  .tabs {
    gap: 5px;
  }
  .tab {
    font-size: 14px;
    padding: 10px;
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #0f141f;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.kpi {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.kpi .n {
  font-weight: 800;
  color: var(--text);
}

.product {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(8, 10, 16, 0.5);
}
.product .price {
  color: #9ee37d;
  font-weight: 700;
  margin-left: auto;
}
.product-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.btn.secondary {
  background: #0f141f;
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 800px;
  width: 95%;
  margin: 40px auto;
  padding: 24px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* бургер */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* анимация крестика */
.burger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* мобильное меню */
@media (max-width: 768px) {
  .menu {
    position: absolute;
    top: 64px;
    right: 16px;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    gap: 12px;
    display: none;
    animation: fadeIn 0.3s ease forwards;
  }
  .menu.show {
    display: flex;
  }
  .burger {
    display: flex;
  }
}

/* анимация появления */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .panel {
    max-width: 500px; /* ограничиваем адекватной шириной */
    width: 100%; /* но оставляем возможность сжиматься */
    margin-left: auto; /* центрируем */
    margin-right: auto; /* центрируем */
    padding-left: 20px;
    padding-right: 20px;
  }

  .headline,
  .card {
    margin-left: auto;
    margin-right: auto;
    text-align: center; /* текст и форма тоже по центру */
  }
}

.consult-link {
  position: relative;
  font-weight: 600;
  color: var(--primary);
}

.badge {
  background: #ff5370;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* AI menu item glow */
.ai-link {
  color: var(--primary);
  font-weight: 600;
  transition: all .3s ease;
}
.ai-link:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(77,163,255,.8);
}
/* --- AI page spacing fix --- */
.panel.left {
  padding-bottom: 60px; /* немного воздуха, но не огромная дыра */
  margin-bottom: 40px;  /* чтобы не прилипал к следующему блоку */
}

.headline {
  position: relative;
  margin-top: 24px;   /* меньше сверху */
  margin-bottom: 0;   /* убираем лишний отступ снизу */
  max-width: 560px;
}

.headline h2 {
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 10px; /* меньше расстояние под заголовком */
}

.headline p {
  margin-bottom: 0;
  color: var(--muted);
}

/* Для мобильной версии — чтобы текст не прилипал */
@media (max-width: 768px) {
  .panel.left {
    padding: 24px;
    margin-bottom: 32px;
  }

  .headline {
    text-align: left;  /* не центрируем, как ты просил */
    margin-top: 16px;
  }
}
/* Чтобы цены не переносились */
.price.nowrap {
  white-space: nowrap;
}

/* Чтобы бейдж "New" выглядел аккуратно */
.ai-link .badge {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 8px;
  margin-left: 6px;
  text-transform: uppercase;
}
