/* Страница тарифов /plans (templates/plans.html). Фон, колонка, заголовки и
   подвал -- общие с лендингом gate-страницы (.landing, .landing-section,
   .landing-title в styles.css); здесь -- только своё: карточки тарифов,
   таблица сравнения и вопросы. Цвета -- те же, что у лендинга: белое для
   главного, #a9bed6 для текста, #6ea8f0 для акцента. */

.page-plans .landing {
  min-height: 100vh;
  box-shadow: none;
}

.plans-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- шапка */
.plans-head {
  padding-top: 40px;
  padding-bottom: 32px;
  text-align: center;
}

.plans-logo {
  display: inline-block;
  margin-bottom: 36px;
  line-height: 0;
}

.plans-logo img {
  width: 190px;
  height: auto;
}

.plans-title {
  font-size: clamp(30px, 4.4vw, 48px);
}

.plans-lead {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

.plans-subtitle {
  font-size: clamp(24px, 2.8vw, 32px);
  margin-bottom: 28px;
}

/* ------------------------------------------------------------- карточки */
.landing-section.plans-cards-section {
  padding-top: 24px;
  padding-bottom: 72px;
  border-top: none;
}

.plans-cards {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 860px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.plans-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

/* Оплата по факту -- не «рекомендуемая», а вторая ступень: выделена рамкой,
   без ярлыка «популярный», которого у двух тарифов быть не может честно. */
.plans-card--accent {
  border-color: rgba(110, 168, 240, 0.55);
  background: rgba(110, 168, 240, 0.07);
}

.plans-card-name {
  margin: 0 0 18px;
  color: #fff;
  font-size: 20px;
  font-weight: 650;
}

.plans-card-price {
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #fff;
}

.plans-card-amount {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.plans-card-unit {
  color: #a9bed6;
  font-size: 16px;
}

.plans-card-for {
  margin: 0 0 22px;
  min-height: 3em;
  color: #a9bed6;
  font-size: 15px;
  line-height: 1.5;
}

.plans-card-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: grid;
  gap: 12px;
  flex: 1 0 auto;
  color: #dce6f2;
  font-size: 15px;
  line-height: 1.45;
}

.plans-card-list li {
  position: relative;
  padding-left: 26px;
}

/* Галочка рисуется рамкой, а не символом: шрифт системы тогда ей не нужен. */
.plans-card-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.35em;
  width: 10px;
  height: 5px;
  border-left: 2px solid #6ea8f0;
  border-bottom: 2px solid #6ea8f0;
  transform: rotate(-45deg);
}

.plans-card-list b {
  color: #fff;
  font-weight: 600;
}

.plans-card-cta {
  display: block;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: #2b5f92;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.plans-card-cta:hover {
  background: #f4f7fb;
}

.plans-card-cta:focus-visible {
  outline: 2px solid #8fc0ff;
  outline-offset: 3px;
}

.plans-faq a,
.plans-legal a {
  color: #8fc0ff;
}

/* ---------------------------------------------------------- возможности */
.plans-features-lead {
  margin-bottom: 28px;
}

.plans-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.plans-feature {
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.plans-feature-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

/* -------------------------------------------------------------- таблица */
/* Узкий экран прокручивает таблицу внутри рамки, а не страницу. */
.plans-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
}

.plans-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.plans-table th,
.plans-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.plans-table tbody tr:last-child th,
.plans-table tbody tr:last-child td {
  border-bottom: none;
}

.plans-table thead th {
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.04);
}

.plans-table tbody th {
  width: 34%;
  color: #dce6f2;
  font-weight: 500;
}

.plans-table td {
  width: 33%;
  color: #a9bed6;
}

.plans-table td.plans-table-span {
  text-align: center;
}

/* -------------------------------------------------------------- вопросы */
.plans-faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.plans-faq-item {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.plans-faq-item summary {
  position: relative;
  padding: 18px 52px 18px 22px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.plans-faq-item summary::-webkit-details-marker {
  display: none;
}

.plans-faq-item summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8fc0ff;
  border-bottom: 2px solid #8fc0ff;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}

.plans-faq-item[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.plans-faq-item summary:focus-visible {
  outline: 2px solid #8fc0ff;
  outline-offset: -2px;
  border-radius: 12px;
}

.plans-faq-item > p {
  margin: 0;
  padding: 0 22px 20px;
}

/* ---------------------------------------------------------- оговорка */
.landing-section.plans-legal {
  padding-top: 40px;
  padding-bottom: 40px;
  text-align: center;
}

.plans-legal .landing-card-text {
  max-width: 70ch;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- узко */
@media (max-width: 720px) {
  .plans-cards,
  .plans-features {
    grid-template-columns: minmax(0, 1fr);
  }

  .plans-card-for {
    min-height: 0;
  }

  .landing-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Кнопка «Войти» стоит в углу поверх страницы: логотип -- под ней. */
  .plans-head {
    padding-top: 64px;
  }

  /* Таблица сравнения на телефоне -- карточками: условие заголовком, под ним
     значения с подписью тарифа. Прокрутка вбок прятала правую колонку, а
     общие для обоих тарифов значения уезжали за край целиком. */
  .plans-table-wrap {
    overflow: visible;
  }

  .plans-table {
    min-width: 0;
  }

  .plans-table thead {
    display: none;
  }

  .plans-table,
  .plans-table tbody,
  .plans-table tr,
  .plans-table th,
  .plans-table td {
    display: block;
    width: auto;
  }

  .plans-table tbody tr {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .plans-table tbody tr:last-child {
    border-bottom: none;
  }

  .plans-table th,
  .plans-table td {
    padding: 0;
    border-bottom: none;
  }

  .plans-table tbody th {
    width: auto;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 600;
  }

  .plans-table td + td {
    margin-top: 6px;
  }

  .plans-table td::before {
    content: attr(data-label) ": ";
    color: #dce6f2;
  }

  .plans-table td.plans-table-span {
    text-align: left;
  }
}
