/* Карточки тарифов: главная и /buy. На телефоне — слайдер, первым идёт популярный тариф */
.plans { position: relative; z-index: 2; display: grid; gap: 16px; margin-top: 0; }

.plan {
  position: relative; display: flex; flex-direction: column;
  padding: 24px 22px 22px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.plan--hot {
  border-color: var(--accent);
  background: linear-gradient(180deg, #12205a 0%, #0c1230 46%, var(--bg-2) 100%);
  box-shadow:
    0 0 0 1px var(--accent),
    0 0 36px rgba(58, 104, 255, .38),
    0 0 90px rgba(58, 104, 255, .22);
}

.plan__tag {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  color: var(--accent-ink); font: 600 .75rem/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase;
}
.plan__tag::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.plan--hot .plan__tag { padding: 6px 10px; border-radius: 8px; background: var(--accent); color: #fff; }
.plan--hot .plan__tag::before { background: #fff; }
.plan--hot .plan__list { border-top-color: rgba(157, 184, 255, .22); }
.plan__term { margin: 0 0 6px; font: 500 1.0625rem/1.2 var(--display); color: var(--text-2); letter-spacing: 0; }
.plan__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; margin: 0; }
.plan__num { font: 800 clamp(2.75rem, 9vw, 3.25rem)/1 var(--display); letter-spacing: -0.04em; }
.cur { font: 600 1.625rem/1 var(--body); color: var(--text-2); }
.plan__old { margin-left: 8px; color: var(--muted); font: 500 1.0625rem/1 var(--body); text-decoration-thickness: 1.5px; text-decoration-color: rgba(255, 120, 120, .8); }
.plan__per { margin: 10px 0 18px; color: var(--muted); font-size: .9375rem; }
.plan__per b { color: var(--ok); font-weight: 600; }

.plan__list { margin: 0 0 22px; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.plan__list li { position: relative; padding-left: 26px; color: #d3d9ea; font-size: .9688rem; line-height: 1.4; }
.plan__list li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 16px; height: 16px;
  background: var(--accent-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9.5 16.6-4.3-4.3 1.4-1.4 2.9 2.9 7.3-7.3 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9.5 16.6-4.3-4.3 1.4-1.4 2.9 2.9 7.3-7.3 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan__cta { margin-top: auto; width: 100%; }

.dots { display: none; justify-content: center; gap: 8px; margin: 14px 0 0; position: relative; z-index: 3; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: background-color .2s, width .2s; }
.dots i.is-on { width: 22px; border-radius: 4px; background: var(--accent); }

.plans__note { margin: 18px auto 0; max-width: 46em; color: var(--muted); font-size: .8125rem; text-align: center; }

@media (max-width: 859px) {
  .plans {
    grid-auto-flow: column; grid-auto-columns: min(84%, 380px);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
    /* запас сверху и снизу, чтобы свечение популярного тарифа не обрезалось краем слайдера */
    margin: -24px calc(var(--gutter) * -1) -56px; padding: 38px var(--gutter) 64px;
    scrollbar-width: none;
  }
  .plans::-webkit-scrollbar { display: none; }
  .plan { scroll-snap-align: start; }
  /* первым — самый популярный */
  .plan--3 { order: 1; }
  .plan--6 { order: 2; }
  .plan--1 { order: 3; }
  .dots { display: flex; }
}

@media (min-width: 860px) {
  .plans { grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; margin-top: 24px; }
  .plan--hot { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .plan--hot { transform: none; }
}
