/* Тарифы DelRes: блок на главной и страница /tarify/. Цвета и шрифт — из основной дизайн-системы лендинга. */
.tariffs {
  --t-ink: #121720;
  --t-muted: #6C7D95;
  --t-line: #E3E9F0;
  --t-ground: #F5F7F9;
  --t-accent: #4A95FF;
  --t-accent-hover: #73AFFF;
  --t-soft: #EDF4FF;
  --t-dark: #1C232E;
  --t-dark-line: #2E3847;
  --t-yes: #1E9E62;
  --t-no: #E5484D;
  max-width: 1568px;
  margin: 0 auto 48px;
  padding: 96px 0 56px;
  background: #FFFFFF;
  border-radius: 40px;
  color: var(--t-ink);
  position: relative;
  z-index: 2;
}
.tariffs__head { display: grid; justify-items: center; gap: 16px; text-align: center; margin-bottom: 40px; }
.tariffs__title { font-weight: 500; font-size: 48px; line-height: 58px; margin: 0; text-wrap: balance; }
.tariffs__lead { color: var(--t-muted); font-size: 18px; line-height: 28px; max-width: 640px; margin: 0; }

/* Переключатель «помесячно / за год» */
.tariffs__billing { display: inline-flex; gap: 4px; padding: 4px; background: var(--t-ground); border-radius: 14px; }
.tariffs__billing button {
  height: 44px; padding: 0 20px; border-radius: 10px; font: inherit; font-weight: 500; font-size: 16px;
  color: var(--t-muted); background: transparent; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, color .2s;
}
.tariffs__billing button[aria-pressed="true"] { background: #FFFFFF; color: var(--t-ink); box-shadow: 0 1px 3px rgba(18, 23, 32, .08); }
.tariffs__save { font-size: 13px; font-weight: 600; color: var(--t-yes); background: #E6F6EE; border-radius: 6px; padding: 2px 7px; }

/* Карточки */
.tariffs__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.tariff {
  display: flex; flex-direction: column; gap: 20px; padding: 32px; border-radius: 24px;
  background: var(--t-ground); border: 1px solid transparent; position: relative;
}
.tariff--main { background: var(--t-dark); color: #FFFFFF; box-shadow: 0 24px 48px -24px rgba(28, 35, 46, .55); }
.tariff__badge {
  position: absolute; top: 24px; right: 24px; font-size: 13px; font-weight: 600; color: #FFFFFF;
  background: var(--t-accent); border-radius: 8px; padding: 4px 10px;
}
.tariff__name { font-size: 28px; line-height: 34px; font-weight: 600; margin: 0; }
.tariff__for { color: var(--t-muted); font-size: 16px; line-height: 24px; margin: 6px 0 0; min-height: 48px; }
.tariff--main .tariff__for { color: #A9B6C9; }
.tariff__price { display: grid; gap: 4px; }
.tariff__amount { font-size: 44px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tariff__per { color: var(--t-muted); font-size: 15px; line-height: 20px; }
.tariff--main .tariff__per { color: #A9B6C9; }
.tariff__year { font-size: 14px; line-height: 20px; color: var(--t-yes); min-height: 20px; }
.tariff--main .tariff__year { color: #6FD3A2; }
.tariff__cta {
  display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 12px;
  font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; border: 0; width: 100%;
  background: #FFFFFF; color: var(--t-ink); box-shadow: inset 0 0 0 1px var(--t-line); transition: background .2s, box-shadow .2s;
}
.tariff__cta:hover { box-shadow: inset 0 0 0 1px var(--t-accent); }
.tariff--main .tariff__cta { background: var(--t-accent); color: #FFFFFF; box-shadow: none; }
.tariff--main .tariff__cta:hover { background: var(--t-accent-hover); }
.tariff__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 16px; line-height: 22px; }
.tariff__list li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.tariff__list li::before {
  content: ""; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; background: var(--t-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5' stroke='%234A95FF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
}
.tariff--main .tariff__list li::before { background-color: rgba(74, 149, 255, .18); }
.tariff__limits { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--t-line); color: var(--t-muted); font-size: 14px; line-height: 20px; display: grid; gap: 4px; }
.tariff--main .tariff__limits { border-top-color: var(--t-dark-line); color: #A9B6C9; }
.tariff sup { font-size: .8em; color: var(--t-accent); font-weight: 600; }

/* Под карточками */
.tariffs__trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.tariffs__trust div { display: grid; gap: 4px; padding: 20px 24px; border-radius: 20px; border: 1px solid var(--t-line); font-size: 15px; line-height: 22px; color: var(--t-muted); }
.tariffs__trust b { color: var(--t-ink); font-weight: 600; font-size: 17px; }
.tariffs__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; color: var(--t-muted); font-size: 14px; line-height: 20px; }
.tariffs__foot p { margin: 0; max-width: 760px; }
.tariffs__more { color: var(--t-accent); font-weight: 500; font-size: 16px; text-decoration: none; white-space: nowrap; }
.tariffs__more:hover { text-decoration: underline; }

/* Страница /tarify/: сравнение, калькулятор, вопросы */
.tariffs-page__hero { padding: 56px 0 8px; text-align: center; display: grid; justify-items: center; gap: 16px; }
.tariffs-page__hero h1 { font-size: 56px; line-height: 64px; font-weight: 500; margin: 0; text-wrap: balance; }
.tariffs-page__hero p { color: #6C7D95; font-size: 18px; line-height: 28px; max-width: 680px; margin: 0; }
.tariffs__section-title { font-weight: 500; font-size: 40px; line-height: 48px; margin: 0 0 24px; text-align: center; text-wrap: balance; }
.compare { overflow-x: auto; border-radius: 24px; border: 1px solid var(--t-line); }
.compare table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 16px; line-height: 22px; }
.compare th, .compare td { padding: 14px 20px; border-bottom: 1px solid var(--t-line); text-align: left; vertical-align: top; }
.compare thead th { position: sticky; top: 0; background: #FFFFFF; font-weight: 600; font-size: 18px; z-index: 1; }
.compare thead th small { display: block; font-weight: 400; font-size: 14px; color: var(--t-muted); }
.compare thead th.is-main { color: var(--t-accent); }
.compare td.c, .compare th.c { text-align: center; width: 17%; }
.compare tr.group td { background: var(--t-ground); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--t-muted); padding-top: 18px; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare .y::before { content: "✓"; color: var(--t-yes); font-weight: 700; font-size: 18px; }
.compare .n::before { content: "✕"; color: var(--t-no); font-weight: 700; font-size: 16px; }
.compare .tag { display: inline-block; font-size: 14px; font-weight: 500; background: var(--t-ground); border-radius: 8px; padding: 2px 8px; }
.compare td.is-main { background: rgba(74, 149, 255, .05); }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: stretch; }
.calc__input { display: grid; gap: 16px; align-content: start; padding: 32px; border-radius: 24px; background: var(--t-ground); }
.calc__input label { font-size: 18px; font-weight: 500; }
.calc__stepper { display: flex; align-items: center; gap: 12px; }
.calc__stepper button { width: 52px; height: 52px; border-radius: 12px; border: 0; background: #FFFFFF; font-size: 24px; cursor: pointer; color: var(--t-ink); box-shadow: inset 0 0 0 1px var(--t-line); }
.calc__stepper button:hover { box-shadow: inset 0 0 0 1px var(--t-accent); }
.calc__stepper input { width: 96px; height: 52px; border-radius: 12px; border: 1px solid var(--t-line); text-align: center; font: inherit; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc__result { padding: 32px; border-radius: 24px; background: var(--t-dark); color: #FFFFFF; display: grid; gap: 12px; align-content: start; }
.calc__result small { color: #A9B6C9; font-size: 15px; }
.calc__sum { font-size: 48px; line-height: 52px; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc__plan { font-size: 20px; font-weight: 500; }
.calc__note { color: #A9B6C9; font-size: 15px; line-height: 22px; }
.calc__note b { color: #6FD3A2; font-weight: 600; }

.tfaq { display: grid; gap: 8px; max-width: 960px; margin: 0 auto; }
.tfaq details { background: var(--t-ground); border-radius: 20px; padding: 24px 28px; }
.tfaq summary { cursor: pointer; font-size: 20px; line-height: 28px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.tfaq summary::-webkit-details-marker { display: none; }
.tfaq summary::after { content: "+"; color: var(--t-accent); font-size: 28px; line-height: 28px; transition: transform .2s; }
.tfaq details[open] summary::after { transform: rotate(45deg); }
.tfaq p { margin: 12px 0 0; color: var(--t-muted); font-size: 17px; line-height: 26px; max-width: 72ch; }

.tariffs :focus-visible { outline: 2px solid var(--t-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tariffs * { transition: none !important; } }

@media (max-width: 1320px) {
  .tariff { padding: 24px; }
  .tariff__amount { font-size: 36px; line-height: 42px; }
  .tariffs__trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .tariffs { padding: 64px 0 40px; border-radius: 32px; }
  .tariffs__grid, .calc { grid-template-columns: 1fr; }
  /* На телефоне основной тариф — первым: до него не нужно листать через «Старт». */
  .tariff--main { order: -1; }
  .tariff__for { min-height: 0; }
  .tariffs__title, .tariffs__section-title { font-size: 36px; line-height: 44px; }
  .tariffs-page__hero h1 { font-size: 40px; line-height: 48px; }
}
@media (max-width: 575px) {
  .tariffs { padding: 48px 0 32px; border-radius: 24px; margin-bottom: 24px; }
  .tariffs__title, .tariffs__section-title { font-size: 30px; line-height: 36px; }
  .tariffs__lead, .tariffs-page__hero p { font-size: 16px; line-height: 24px; }
  .tariffs__billing button { padding: 0 14px; font-size: 15px; }
  .tariffs__trust { grid-template-columns: 1fr; }
  .tariffs-page__hero h1 { font-size: 32px; line-height: 40px; }
  .tfaq summary { font-size: 17px; line-height: 24px; }
  .tfaq details { padding: 20px; }
  .calc__input, .calc__result { padding: 24px; }
  .calc__sum { font-size: 38px; line-height: 44px; }
}
.calc__input .tariffs__billing { background: #FFFFFF; justify-self: start; }
.calc__input .tariffs__billing button[aria-pressed="true"] { background: var(--t-ground); box-shadow: none; }
