/* Страница калькулятора appfox.ru/calculator/: блок цен под калькулятором и кнопки шаблонов.
   Префикс kc- (на сайте не занят), плюс одно правило для ссылки «к блоку цен» из вводного текста (.calculator-text).
   Цвета и тени из стилей сайта: кнопка #F3712F, акцент #FFAA33, серый текст #5F6368, тень карточек 0 5px 35px -9px,
   скругление карточек 25px. Заголовки h2 берут классы сайта heading heading--h2, как «Что рассчитать?» на этой же
   странице. Unbounded только 400: на сайте подключены 300 и 400, другой вес браузер рисует искусственно. */

.kc {
  --kc-o: #F3712F;
  --kc-o-dark: #D85A1C;
  --kc-amber: #FFAA33;
  --kc-ink: #040404;
  --kc-mute: #5F6368;
  --kc-line: #ECECEC;
  --kc-soft: #FFF6F0;
  --kc-mint: #A8DDB5;
  --kc-shadow: 0 5px 35px -9px rgba(0, 0, 0, .1);
  --kc-r: 25px;
  padding: 24px 0 80px;
  font-family: Ubuntu, sans-serif;
  color: var(--kc-ink);
}
.kc *, .kc *::before, .kc *::after { box-sizing: border-box; }
/* ссылка из вводного текста над калькулятором на блок цен: стили сайта ссылки в этом абзаце не выделяют */
.calculator-text a[href="#kc-ceny"] { color: #F3712F; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.calculator-text a[href="#kc-ceny"]:hover { color: #D85A1C; }
#kc-ceny { scroll-margin-top: 130px; }   /* переход по якорю не прячет заголовок под закреплённой шапкой */
.kc a { color: var(--kc-o); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.kc a:hover { color: var(--kc-o-dark); }
.kc ul, .kc ol { margin: 0; padding: 0; list-style: none; }
.kc p { margin: 0; }

.kc-sec { padding-top: 64px; }
.kc-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.kc-ico { flex: none; width: 72px; height: 72px; object-fit: contain; }
.kc .kc-h2 { margin: 0; }
.kc-lead { max-width: 860px; margin-bottom: 28px !important; font-size: 17px; line-height: 1.6; color: var(--kc-mute); }
.kc-note { margin-top: 18px !important; font-size: 15px; line-height: 1.55; color: var(--kc-mute); }

/* ----- уровни продукта ----- */
.kc-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.kc-tier {
  position: relative;
  display: flex; flex-direction: column;
  padding: 30px 28px 28px;
  border-radius: var(--kc-r);
  background: #fff;
  box-shadow: var(--kc-shadow);
}
.kc-tier::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 4px;
  border-radius: 0 0 4px 4px; background: var(--kc-amber);
}
.kc-tier:nth-child(2)::before { background: var(--kc-o); }
.kc-tier:nth-child(3)::before { background: var(--kc-ink); }
.kc-tier__name { font: 500 15px/1.3 Ubuntu, sans-serif; letter-spacing: .02em; text-transform: uppercase; color: var(--kc-mute); }
.kc-tier__price { margin-top: 14px !important; font: 400 30px/1.15 Unbounded, sans-serif; color: var(--kc-o); }
.kc-tier__term { align-self: flex-start; margin-top: 12px !important; padding: 5px 12px; border-radius: 999px; background: var(--kc-soft); font-size: 14px; color: #9A4A1C; }
.kc-tier__text { margin-top: 18px !important; font-size: 15px; line-height: 1.55; color: var(--kc-mute); }

/* ----- таблицы ----- */
.kc-table-wrap { border-radius: 20px; background: #fff; box-shadow: var(--kc-shadow); overflow: hidden; }
.kc-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.kc-table th, .kc-table td { padding: 15px 22px; text-align: left; vertical-align: middle; }
.kc-table thead th { background: #FAFAFA; font-weight: 500; font-size: 14px; color: var(--kc-mute); border-bottom: 1px solid var(--kc-line); }
.kc-table tbody tr + tr td { border-top: 1px solid var(--kc-line); }
.kc-table--tpl td:nth-child(2), .kc-table--tpl td:nth-child(3), .kc-table--tpl th:nth-child(2), .kc-table--tpl th:nth-child(3) { text-align: right; white-space: nowrap; }
.kc-table--tpl td:nth-child(2) { font-weight: 500; color: var(--kc-o); }
.kc-td-btn { width: 1%; white-space: nowrap; text-align: right !important; }
.kc-open {
  padding: 8px 16px; border: 1px solid var(--kc-o); border-radius: 999px; background: #fff;
  font: 500 14px/1.2 Ubuntu, sans-serif; color: var(--kc-o); cursor: pointer; transition: background .2s, color .2s;
}
.kc-open:hover, .kc-open:focus-visible { background: var(--kc-o); color: #fff; outline: none; }
.kc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- полоса сметы ----- */
.kc-bar { display: flex; height: 22px; margin-bottom: 26px; border-radius: 999px; overflow: hidden; background: var(--kc-line); }
.kc-bar__seg { flex: 0 0 var(--w); min-width: 4px; }
.kc-bar__seg + .kc-bar__seg { box-shadow: inset 2px 0 0 #fff; }
.kc-c1 { background: #FFE0A9; }
.kc-c2 { background: var(--kc-amber); }
.kc-c3 { background: var(--kc-o); }
.kc-c4 { background: var(--kc-mint); }
.kc-c5 { background: #6FA8DC; }
.kc-c6 { background: #3A3D42; }
.kc-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; }
.kc-legend__item { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 12px; padding: 18px 20px; border-radius: 18px; background: #FAFAFA; }
.kc-legend__dot { grid-row: 1 / span 3; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; }
.kc-legend__name { font-weight: 500; font-size: 16px; }
.kc-legend__sum { margin-top: 4px !important; font: 400 18px/1.3 Unbounded, sans-serif; }
.kc-legend__sum span { margin-left: 8px; font: 400 14px Ubuntu, sans-serif; color: var(--kc-mute); }
.kc-legend__text { margin-top: 8px !important; font-size: 14px; line-height: 1.5; color: var(--kc-mute); }

.kc-smeta { margin-top: 22px; }
.kc-smeta__sum {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; background: var(--kc-soft);
  font-weight: 500; color: #9A4A1C; cursor: pointer; list-style: none;
}
.kc-smeta__sum::-webkit-details-marker { display: none; }
.kc-smeta__sum::after { content: ""; width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.kc-smeta[open] .kc-smeta__sum::after { margin-top: 4px; transform: rotate(-135deg); }
.kc-smeta .kc-table-wrap { margin-top: 18px; }
.kc-table--smeta { font-size: 15px; }
.kc-table--smeta td:nth-child(1) b { display: block; font-weight: 500; }
.kc-table--smeta td:nth-child(2) { font-size: 14px; color: var(--kc-mute); }
.kc-table--smeta td:nth-child(3), .kc-table--smeta .kc-smeta__group td, .kc-table--smeta tfoot td { text-align: right; white-space: nowrap; }
.kc-smeta__group th, .kc-smeta__group td { padding-top: 18px; background: #FFFBF7; font-weight: 500; border-top: 1px solid var(--kc-line); }
.kc-table--smeta tfoot th, .kc-table--smeta tfoot td { border-top: 2px solid var(--kc-ink); font-weight: 600; }

/* ----- функции и ставки ----- */
.kc-feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.kc-feat__item { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; border-bottom: 1px dashed #DCDCDC; font-size: 16px; }
.kc-feat__name { flex: 1 1 auto; }
.kc-feat__price { flex: none; font-weight: 500; white-space: nowrap; }
.kc-rates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kc-rate { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; border-radius: 18px; background: #fff; box-shadow: var(--kc-shadow); }
.kc-rate__role { font-size: 15px; color: var(--kc-mute); }
.kc-rate__val { font: 400 22px/1.2 Unbounded, sans-serif; color: var(--kc-ink); }
.kc-rate__val small { margin-left: 4px; font: 400 14px Ubuntu, sans-serif; color: var(--kc-mute); }

/* ----- факторы ----- */
.kc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kc-card { padding: 24px 24px 26px; border: 1px solid var(--kc-line); border-radius: 20px; background: #fff; }
.kc .kc-card__h { margin: 0 0 10px; font: 500 18px/1.35 Ubuntu, sans-serif; color: var(--kc-ink); }
.kc-card__t { font-size: 15px; line-height: 1.6; color: var(--kc-mute); }

/* ----- кейсы ----- */
.kc-table--cases td:nth-child(3), .kc-table--cases th:nth-child(3) { white-space: nowrap; font-weight: 500; }
.kc-table--cases td:nth-child(4) { white-space: nowrap; }

/* ----- шаги и кнопки ----- */
.kc-steps { counter-reset: kcstep; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kc-step { position: relative; padding: 60px 24px 24px; border-radius: 20px; background: #FAFAFA; font-size: 16px; line-height: 1.55; counter-increment: kcstep; }
.kc-step::before {
  content: counter(kcstep); position: absolute; left: 24px; top: 20px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--kc-o); font: 400 14px/30px Unbounded, sans-serif; color: #fff; text-align: center;
}
.kc-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.kc-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 32px;
  border: 1px solid var(--kc-o); border-radius: 5px; background: var(--kc-o);
  font: 400 18px/1.2 Ubuntu, sans-serif; color: #fff; cursor: pointer; transition: background .2s, color .2s;
}
.kc-btn:hover, .kc-btn:focus-visible { background: var(--kc-o-dark); border-color: var(--kc-o-dark); color: #fff; outline: none; }
.kc-btn--ghost { background: #fff; color: var(--kc-o); }
.kc-btn--ghost:hover, .kc-btn--ghost:focus-visible { background: var(--kc-soft); color: var(--kc-o-dark); }

/* ----- вопросы ----- */
.kc-faq { display: grid; gap: 12px; max-width: 900px; }
.kc-faq__item { border-radius: 18px; background: #fff; box-shadow: var(--kc-shadow); }
.kc-faq__q {
  position: relative; padding: 20px 60px 20px 24px; font-weight: 500; font-size: 17px; line-height: 1.4; cursor: pointer; list-style: none;
}
.kc-faq__q::-webkit-details-marker { display: none; }
.kc-faq__q::after {
  content: "+"; position: absolute; right: 22px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
  background: var(--kc-soft); font: 400 22px/27px Ubuntu, sans-serif; color: var(--kc-o); text-align: center; transition: transform .2s;
}
.kc-faq__item[open] .kc-faq__q::after { transform: rotate(45deg); }
.kc-faq__a { padding: 0 24px 22px; font-size: 16px; line-height: 1.6; color: var(--kc-mute); }

/* ----- планшет ----- */
@media (max-width: 991px) {
  .kc-tiers, .kc-cards, .kc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-rates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ----- телефон: таблицы становятся карточками, подпись колонки из data-l ----- */
@media (max-width: 575px) {
  .kc { padding-bottom: 56px; }
  .kc-sec { padding-top: 48px; }
  .kc-head { gap: 12px; }
  .kc-ico { width: 56px; height: 56px; }
  .kc-lead { font-size: 16px; }
  .kc-tiers, .kc-cards, .kc-steps, .kc-legend, .kc-feat { grid-template-columns: minmax(0, 1fr); }
  .kc-rates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kc-rate { padding: 16px; }
  .kc-rate__val { font-size: 18px; }
  .kc-tier__price { font-size: 26px; }
  .kc-table-wrap { border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .kc-table, .kc-table tbody, .kc-table tr, .kc-table td { display: block; width: 100%; }
  .kc-table thead { display: none; }
  .kc-table tbody tr { margin-bottom: 12px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: var(--kc-shadow); }
  .kc-table tbody tr + tr td { border-top: 0; }
  .kc-table td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; text-align: right !important; white-space: normal !important; }
  .kc-table td::before { content: attr(data-l); flex: none; max-width: 45%; font-size: 13px; color: var(--kc-mute); text-align: left; }
  .kc-table td:first-child { display: block; padding-bottom: 8px; font-weight: 500; text-align: left !important; }
  .kc-table td:first-child::before { display: none; }
  .kc-td-btn { width: 100%; padding-top: 10px !important; }
  .kc-td-btn::before { display: none !important; }
  .kc-open { width: 100%; padding: 10px 16px; }
  .kc-table--smeta tr.kc-smeta__group { display: flex; justify-content: space-between; margin: 18px 0 8px; padding: 0 4px; background: none; box-shadow: none; }
  .kc-table--smeta tr.kc-smeta__group th, .kc-table--smeta tr.kc-smeta__group td { display: inline; width: auto; padding: 0; background: none; border: 0; }
  .kc-table--smeta tr.kc-smeta__group td::before { display: none; }
  .kc-table--smeta tfoot, .kc-table--smeta tfoot tr { display: flex; justify-content: space-between; width: 100%; }
  .kc-table--smeta tfoot th, .kc-table--smeta tfoot td { display: inline; width: auto; padding: 12px 4px 0; }
  .kc-btn, .kc-cta .kc-btn { width: 100%; }
  .kc-faq__q { padding: 16px 52px 16px 18px; font-size: 16px; }
  .kc-faq__a { padding: 0 18px 18px; font-size: 15px; }
}

/* ----- меньше движения ----- */
@media (prefers-reduced-motion: reduce) {
  .kc-open, .kc-btn, .kc-faq__q::after, .kc-smeta__sum::after { transition: none; }
}
