/* ═══════════════════════════════════════════
   RSK23 CALCULATOR — CSS v14
   ═══════════════════════════════════════════ */

/* ── Animated border custom property ── */
@property --kangle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes kalk-border-spin {
  to { --kangle: 360deg; }
}
@keyframes kbtn-ripple {
  to { transform: scale(4); opacity: 0; }
}
@keyframes kbtn-pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(91,168,181,.32); }
  50%       { box-shadow: 0 6px 24px rgba(91,168,181,.55); }
}

/* ── Hide junk/leftover elements ── */
.ld-sub, .ld-bar,
#global-canvas { display: none !important; }

/* ── Hide post-calculator sections ── */
.cta-big,
.pagenavigation,
.item-page-navigation { display: none !important; }

/* ── Hero section — dark, matching site ── */
.hero-inner {
  background: rgba(10, 18, 24, 0.97) !important;
  border-bottom: 1px solid rgba(91, 168, 181, .18);
  padding: 90px 48px 40px !important;
  margin: 0 !important;
}
.hero-inner .hero-ov,
.hero-inner .h-eye,
.hero-inner .hero-sub { display: none !important; }

.kalk-page-title {
  font-family: 'Montserrat', 'Jost', sans-serif;
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.15;
  text-shadow: 0 2px 16px rgba(91,168,181,.35);
}
.kalk-page-title em {
  color: #5BA8B5;
  font-style: normal;
}

/* ── Main layout — dark background ── */
.kalk-section {
  padding: 0 0 80px;
  background-color: #0a1218;
  

}
.kalk-root {
  max-width: 1780px;
  margin: 0 auto;
  padding: 0 16px;
}
.kalk-head {
  text-align: center;
  padding: 44px 20px 32px;
}
.kalk-head h2 {
  font-family: 'Montserrat', 'Jost', sans-serif;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
  line-height: 1.2;
}
.kalk-head h2 em {
  color: #5BA8B5;
  font-style: normal;
}
.kalk-head p {
  font-size: 14px;
  color: rgba(255,255,255,.55);
  margin: 0;
}

/* ── Grid ── */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
  margin-top: 4px;
  min-height: 700px;
}

/* ── Both panels — animated 4px border ── */
.kalk-left,
.kalk-right {
  --kangle: 0deg;
  border: 4px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    conic-gradient(from var(--kangle),
      #5BA8B5 0%,
      #7ecad6 12%,
      #E8873A 25%,
      #f0a060 38%,
      #5BA8B5 50%,
      #7ecad6 62%,
      #E8873A 75%,
      #f0a060 88%,
      #5BA8B5 100%
    ) border-box;
  animation: kalk-border-spin 6s linear infinite;
  border-radius: 22px;
  box-shadow:
    0 12px 40px rgba(0,0,0,.45),
    0 4px 16px rgba(91,168,181,.15),
    inset 0 1px 0 rgba(255,255,255,.9);
  overflow: hidden;
  color: #1a2535;
}

/* ── LEFT PANEL ── */
.kalk-left {
  padding: 28px;
  background:
    linear-gradient(#ffffff, #f8fafc) padding-box,
    conic-gradient(from var(--kangle),
      #5BA8B5 0%, #7ecad6 12%, #E8873A 25%, #f0a060 38%,
      #5BA8B5 50%, #7ecad6 62%, #E8873A 75%, #f0a060 88%, #5BA8B5 100%
    ) border-box;
}
.k-step {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #5BA8B5;
  margin-bottom: 8px;
  margin-top: 16px;
}
.k-step:first-child { margin-top: 0 }
.k-divider { height: 1px; background: #e0e8ed; margin: 20px 0 0 }

/* option cards */
.k-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.k-opt {
  --kangle: 0deg;
  border: 2px solid transparent;
  background:
    linear-gradient(#f4f8fa, #f4f8fa) padding-box,
    conic-gradient(from var(--kangle),
      #5BA8B5 0%, #7ecad6 25%, #E8873A 50%, #7ecad6 75%, #5BA8B5 100%
    ) border-box;
  animation: kalk-border-spin 4s linear infinite;
  border-radius: 14px;
  padding: 6px 8px 5px;
  min-height: 62px;
  cursor: pointer;
  transition: box-shadow .2s ease, transform .15s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  user-select: none;
  overflow: visible;
}
.k-opt:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(91,168,181,.22);
}
.k-opt:active { transform: translateY(-1px); }
.k-opt.active {
  border: 2.5px solid rgba(232, 135, 58, 0.85);
  background: rgba(232, 135, 58, 0.07);
  animation: none;
  box-shadow: 0 4px 18px rgba(232,135,58,.28);
}

/* ripple */
.k-opt .k-ripple,
.k-chip .k-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(91,168,181,.35);
  width: 20px; height: 20px;
  transform: scale(0);
  animation: kbtn-ripple .5s linear;
  pointer-events: none;
}
.k-opt.active .k-ripple { background: rgba(255,255,255,.35); }

/* icons — SVG line-art */
.k-ico {
  width: 26px; height: 26px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, color .2s ease;
  color: #4a7585;
}
.k-ico svg { width: 100%; height: 100%; }
.k-opt:hover .k-ico { transform: scale(1.15); color: #5BA8B5; }
.k-opt.active .k-ico { transform: scale(1.05); color: #d0620a; }

.k-lbl {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  color: #1a2535;
  letter-spacing: -.2px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.1em;
}
.k-opt.active .k-lbl { color: #b85d14; }
.k-opt:hover .k-lbl { color: #3a8e9e; }

.k-hit {
  position: absolute; top: -1px; right: -1px;
  background: #E8873A; color: #fff;
  font-size: 9px; font-weight: 800;
  padding: 2px 7px;
  border-radius: 0 12px 0 8px;
  line-height: 1.5;
  letter-spacing: .3px;
}

/* 5-column work grid */
#k-work-grid { grid-template-columns: repeat(5, 1fr); gap: 6px }

/* area slider */
.k-area-row {
  display: flex; justify-content: space-between; align-items: center;
  margin: 8px 0 4px;
}
.k-area-lbl { font-size: 13px; color: #6b7f8e; font-weight: 500; }
.k-area-val {
  font-size: 24px; font-weight: 900;
  font-family: 'Jost', sans-serif;
  color: #5BA8B5; letter-spacing: -1px;
}
.k-slider {
  width: 100%; height: 6px; border-radius: 4px;
  background: linear-gradient(90deg, #5BA8B5 var(--p, 22%), #dce6eb var(--p, 22%));
  appearance: none; cursor: pointer; outline: none;
}
.k-slider::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #5BA8B5, #4a91a0);
  box-shadow: 0 2px 12px rgba(91,168,181,.5);
  border: 3px solid #fff;
  transition: transform .2s; cursor: pointer;
}
.k-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }
.k-area-range {
  display: flex; justify-content: space-between;
  font-size: 11px; color: #9ba8b5; margin-top: 5px;
}

/* extras chips — chips row never wraps, subs float absolutely below */
.k-extras {
  display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 4px;
  align-items: center;
}
/* Контейнер для sub-панелей — рендерится под чипами, в потоке документа */
.k-sub-wrap { display: block; }
.k-chip {
  --kangle: 0deg;
  border: 2px solid transparent;
  background:
    linear-gradient(#f4f8fa, #f4f8fa) padding-box,
    conic-gradient(from var(--kangle),
      #5BA8B5 0%, #7ecad6 25%, #E8873A 50%, #7ecad6 75%, #5BA8B5 100%
    ) border-box;
  animation: kalk-border-spin 4s linear infinite;
  border-radius: 26px; padding: 6px 12px;
  display: flex; align-items: center; gap: 7px;
  height: 34px !important; max-height: 34px !important; flex-shrink: 0;
  cursor: pointer;
  transition: box-shadow .2s ease, transform .15s ease;
  font-size: 12px; font-weight: 600; color: #1a2535;
  user-select: none;
  position: relative; overflow: hidden;
}
.k-chip:hover {
  color: #3a8e9e;
  box-shadow: 0 4px 14px rgba(91,168,181,.2);
}
.k-chip:active { transform: none; }
.k-chip.active {
  border: 2px solid #E8873A;
  background: rgba(232, 135, 58, 0.14);
  animation: none;
  color: #d0620a;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(232,135,58,.3);
}
.k-chip-ico {
  width: 20px; height: 20px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #4a7585;
  transition: color .2s ease;
}
.k-chip-ico svg { width: 100%; height: 100%; }
.k-chip.active .k-chip-ico { color: #d0620a; }
.k-chip-lbl { font-weight: 700; white-space: nowrap; }

/* sub-options panel — relative position, visible inside overflow:hidden parent */
.k-sub {
  display: none;
  position: relative;
  margin-top: 8px;
  z-index: 50;
  background: #f0f6f8; border: 1.5px solid #ccdde4;
  border-radius: 14px; padding: 14px 16px;
  animation: kSubOpen .2s ease-out;
  box-shadow: 0 4px 20px rgba(91,168,181,.15);
}
@keyframes kSubOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.k-sub.open { display: block }
.k-sub-title {
  font-size: 11px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; color: #8fa8b5; margin-bottom: 10px;
}
.k-sub-opts { display: flex; flex-direction: column; gap: 6px }
.k-sub-opt {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; color: #1a2535;
  cursor: pointer; padding: 5px 0;
  transition: color .15s;
}
.k-sub-opt:hover { color: #5BA8B5 }
.k-sub-opt.active { color: #5BA8B5; font-weight: 700 }
.k-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #ccdde4; flex-shrink: 0;
  transition: all .15s;
}
.k-sub-opt.active .k-dot { background: #5BA8B5; border-color: #5BA8B5; }

/* ── RIGHT PANEL ── */
.kalk-right {
  color: #1a2535;
  position: relative !important;
  background:
    linear-gradient(#ffffff, #f8fafc) padding-box,
    conic-gradient(from var(--kangle),
      #5BA8B5 0%, #7ecad6 12%, #E8873A 25%, #f0a060 38%,
      #5BA8B5 50%, #7ecad6 62%, #E8873A 75%, #f0a060 88%, #5BA8B5 100%
    ) border-box;
}

/* Remove the old green top bar */
.kr-top { display: none !important; }

.kr-body { padding: 28px 30px 30px }
.kr-title {
  font-family: 'Jost', sans-serif;
  font-size: 19px; font-weight: 900;
  color: #0c1a24; margin-bottom: 20px;
  letter-spacing: -.3px;
}

/* lines */
.k-lines { margin-bottom: 16px }
.kl {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #e4edf2;
}
.kl-k { font-size: 13px; color: #5a7080; font-weight: 500; }
.kl-v { font-size: 13.5px; font-weight: 700; color: #0c1a24; }
.kl-v.accent { color: #4a91a0; }
.kl-total {
  background: linear-gradient(135deg, rgba(91,168,181,.1), rgba(91,168,181,.06));
  border: 1.5px solid rgba(91,168,181,.25) !important;
  border-radius: 12px;
  padding: 14px 16px !important;
  margin-top: 10px;
  border-bottom: 1.5px solid rgba(91,168,181,.25) !important;
}
.kl-total .kl-k { color: #5a7080; font-weight: 700; font-size: 13px; }
.kl-total .kl-v {
  font-family: 'Jost', sans-serif;
  font-size: 24px; font-weight: 900;
  color: #0c1a24; letter-spacing: -1.5px;
}

/* range block */
.k-range {
  background: #f0f6f8;
  border: 1px solid #dce8ed;
  border-radius: 14px; padding: 14px; margin-bottom: 16px;
}
.k-range-lbl {
  font-size: 10.5px; color: #8fa8b5; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px;
}
.k-range-cols { display: flex; align-items: center; gap: 0 }
.k-range-col { flex: 1; text-align: center }
.k-range-col.mid .k-range-col-val { color: #4a91a0; font-weight: 900; }
.k-range-col-lbl { font-size: 10px; color: #8fa8b5; font-weight: 600; margin-bottom: 4px }
.k-range-col-val { font-size: 13.5px; font-weight: 700; color: #1a2535; }
.k-range-sep { width: 1px; height: 32px; background: #ccdde4; flex-shrink: 0; }

/* disclaimer */
.k-disc {
  display: flex; gap: 10px; align-items: flex-start;
  background: #f0f6f8; border: 1px solid #dce8ed;
  border-radius: 12px;
  padding: 12px; margin-bottom: 16px;
}
.k-disc-icon { font-size: 16px; flex-shrink: 0; line-height: 1.4 }
.k-disc-text { font-size: 12px; color: #5a7080; line-height: 1.5 }
.k-disc-text strong { color: #0c1a24; }

/* CTA button */
.k-cta {
  --kangle: 0deg;
  width: 100%; padding: 15px;
  border: 3px solid transparent;
  background:
    linear-gradient(135deg, #5BA8B5 0%, #4a91a0 50%, #3e7d8a 100%) padding-box,
    conic-gradient(from var(--kangle),
      #5BA8B5 0%, #7ecad6 25%, #E8873A 50%, #7ecad6 75%, #5BA8B5 100%
    ) border-box;
  animation: kalk-border-spin 4s linear infinite;
  color: #fff; border-radius: 14px;
  font-size: 15px; font-weight: 800;
  font-family: 'Jost', 'Montserrat', sans-serif;
  cursor: pointer;
  transition: box-shadow .25s ease, transform .15s ease;
  box-shadow: 0 8px 24px rgba(91,168,181,.42);
  letter-spacing: .3px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 12px;
  position: relative; overflow: hidden;
}
.k-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(91,168,181,.55);
}
.k-cta:active { transform: scale(.97); box-shadow: 0 4px 12px rgba(91,168,181,.3); }

/* messenger links */
.k-msg-row { display: flex; gap: 8px }
.k-msg {
  flex: 1; text-align: center;
  padding: 10px 8px; border-radius: 12px;
  font-size: 12px; font-weight: 700;
  text-decoration: none;
  transition: all .2s;
}
/* WhatsApp — фирменный зелёный */
.k-msg.wa { background: rgba(37,211,102,.14); color: #18a450; border: 2px solid rgba(37,211,102,.45); }
.k-msg.wa:hover { background: rgba(37,211,102,.25); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(37,211,102,.3); }
/* Telegram — фирменный синий */
.k-msg.tg { background: rgba(42,165,224,.14); color: #2A9DD8; border: 2px solid rgba(42,165,224,.45); }
.k-msg.tg:hover { background: rgba(42,165,224,.25); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(42,165,224,.3); }
/* ВКонтакте — фирменный синий */
.k-msg.mx { background: rgba(0,119,255,.14); color: #0077FF; border: 2px solid rgba(0,119,255,.45); }
.k-msg.mx:hover { background: rgba(0,119,255,.25); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,119,255,.3); }

/* ── Modal ── */
.k-modal-ov {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center;
}
.k-modal-ov.open { display: flex }
.k-modal {
  background: #fff; border-radius: 22px;
  padding: 34px 30px; max-width: 420px; width: 90%;
  position: relative;
  box-shadow: 0 28px 72px rgba(0,0,0,.3);
}
.k-modal-cls {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: #8fa8b5;
  transition: color .15s;
}
.k-modal-cls:hover { color: #1a2535; }
.k-modal-title { font-family: 'Jost', sans-serif; font-size: 20px; font-weight: 900; color: #0c1a24; margin-bottom: 6px; }
.k-modal-sub { font-size: 13px; color: #5a7080; margin-bottom: 14px; }
.k-modal-sum { font-size: 13px; color: #4a91a0; font-weight: 700; margin-bottom: 16px; }
.k-field { margin-bottom: 12px }
.k-field label { display: block; font-size: 12px; font-weight: 700; color: #5a7080; margin-bottom: 5px; }
.k-field input, .k-field textarea {
  width: 100%; padding: 11px 14px; border: 2px solid #e4edf2;
  border-radius: 12px; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .2s; box-sizing: border-box;
  color: #0c1a24;
}
.k-field input:focus, .k-field textarea:focus { border-color: #5BA8B5; }
.k-field textarea { resize: vertical; min-height: 70px; }
.k-modal-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #5BA8B5, #4a91a0);
  color: #fff; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 800; font-family: inherit;
  cursor: pointer; transition: all .2s;
  box-shadow: 0 6px 20px rgba(91,168,181,.4);
}
.k-modal-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(91,168,181,.55); }
.k-thanks { text-align: center; padding: 10px 0; }
.k-ticon { font-size: 44px; margin-bottom: 12px; }
.k-thanks h3 { font-size: 20px; font-weight: 900; color: #0c1a24; margin-bottom: 8px; }
.k-thanks p { font-size: 14px; color: #5a7080; line-height: 1.6; }
.k-thanks strong { color: #4a91a0; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .calc-layout { grid-template-columns: 1fr }
  .kalk-right { position: static }
  #k-work-grid { grid-template-columns: repeat(3, 1fr) }
}
@media (max-width: 600px) {
  .k-grid { grid-template-columns: repeat(4, 1fr); gap: 6px }
  #k-work-grid { grid-template-columns: repeat(5, 1fr); gap: 5px }
  .k-opt { padding: 10px 2px 9px; min-height: 82px; gap: 3px }
  .k-lbl { font-size: 10px; line-height: 1.1; letter-spacing: -.3px; min-height: 2.2em }
  .k-ico { width: 20px; height: 20px }
  .k-step { font-size: 9.5px; letter-spacing: 1px }
  .k-extras { flex-wrap: nowrap !important; gap: 5px !important; justify-content: space-between }
  .k-chip { flex: 1 1 0 !important; min-width: 0 !important; padding: 6px 4px !important; font-size: 10.5px !important; letter-spacing: -.2px !important; gap: 3px !important; height: 38px !important; max-height: 38px !important; justify-content: center }
  .k-chip-ico { width: 14px !important; height: 14px !important; flex-shrink: 0 }
  .k-chip-lbl { white-space: nowrap; overflow: visible; font-size: 10.5px }
  .calc-layout { min-height: auto !important }
  .kalk-left { padding: 14px 10px !important }
  .kr-body { padding: 14px 12px 18px !important }
  .kalk-left, .kalk-right { width: 100% !important; max-width: 100% !important; box-sizing: border-box }
  .hero-inner { padding: 96px 16px 24px !important }
  .kalk-left, .kalk-right { border-width: 3px; }
  .kalk-root { padding: 0 4px }
  .k-msg-row { flex-wrap: wrap }
  .k-msg { min-width: calc(50% - 4px) }
  .kalk-head { padding: 28px 12px 20px }
}

/* ── Ультра-мобильный — только подменю и компактный финальный расчёт ── */
@media (max-width: 480px) {
  .k-sub { position: relative !important; top: auto !important; left: auto !important; right: auto !important; flex: 0 0 100%; width: 100%; margin-top: 4px; box-sizing: border-box; }
  .kl-total .kl-v { font-size: 20px; }
  .k-chip { font-size: 9.5px !important; padding: 5px 3px !important; gap: 2px !important }
  .k-chip-ico { width: 13px !important; height: 13px !important }
  .k-lbl { font-size: 9px }
}

/* Кнопка Позвонить */
.k-msg.call { background: rgba(91,168,181,.14); color: #5BA8B5; border: 2px solid rgba(91,168,181,.45); }
.k-msg.call:hover { background: rgba(91,168,181,.25); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(91,168,181,.3); }

/* ══════════════════════════════════════════════════════════
   v15 — FORCE equal columns, no truncation (desktop + mobile)
   ══════════════════════════════════════════════════════════ */

/* Шаг 2: 5 одинаковых кнопок, без обрезки */
#k-work-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
}
#k-work-grid .k-opt {
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 8px 2px 7px !important;
}
#k-work-grid .k-lbl {
  font-size: 11px !important;
  letter-spacing: -.3px !important;
  white-space: nowrap !important;
  line-height: 1.15 !important;
  padding: 0 1px !important;
  width: 100% !important;
  text-align: center !important;
  overflow: visible !important;
  min-height: 1em !important;
}

/* Шаг 4: 4 одинаковых чипа без обрезки */
.k-extras {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  flex-wrap: unset !important;
}
.k-extras .k-chip {
  width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
  padding: 6px 6px !important;
  justify-content: center !important;
  gap: 5px !important;
}
.k-extras .k-chip-lbl {
  font-size: 11px !important;
  letter-spacing: -.2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}
.k-extras .k-chip-ico {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
}

/* Оба блока строго одинаковой ширины и высоты */
.calc-layout {
  grid-template-columns: 1fr 1fr !important;
  align-items: stretch !important;
}
.calc-layout > .kalk-left,
.calc-layout > .kalk-right {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  height: auto !important;
}

/* МОБИЛЬНЫЙ — та же логика: равные колонки, весь текст виден */
@media (max-width: 600px) {
  #k-work-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }
  #k-work-grid .k-opt {
    padding: 8px 1px 7px !important;
    min-height: 68px !important;
  }
  #k-work-grid .k-lbl {
    font-size: 7.5px !important;
    letter-spacing: -.4px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    min-height: 1em !important;
    overflow: visible !important;
  }
  #k-work-grid .k-ico {
    width: 18px !important;
    height: 18px !important;
  }
  #k-work-grid .k-hit {
    font-size: 7px !important;
    padding: 1px 3px !important;
  }

  .k-extras {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }
  .k-extras .k-chip {
    padding: 5px 2px !important;
    font-size: 9px !important;
    height: 32px !important;
    max-height: 32px !important;
    gap: 2px !important;
  }
  .k-extras .k-chip-lbl {
    font-size: 9px !important;
    letter-spacing: -.3px !important;
  }
  .k-extras .k-chip-ico {
    width: 12px !important;
    height: 12px !important;
  }

  .kalk-left { padding: 14px 10px !important; }
  .kalk-right { padding: 14px 12px !important; }
}

/* ══════════════════════════════════════════
   v16 — override parent container width
   ══════════════════════════════════════════ */
body:has(.kalk-section) .site-inner,
body:has(.kalk-section) #main-content,
body:has(.kalk-section) main,
body:has(.kalk-section) .item-page {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.kalk-section .kalk-root {
  max-width: min(1780px, 98vw) !important;
}

/* Текст всегда помещается — уменьшаем шрифт до гарантированно влезающего */
#k-work-grid .k-lbl {
  font-size: 10.5px !important;
  letter-spacing: -.3px !important;
  white-space: nowrap !important;
  line-height: 1.1 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  width: 100% !important;
  text-align: center !important;
  padding: 0 !important;
  font-weight: 700 !important;
}
#k-work-grid .k-opt {
  padding: 8px 2px 7px !important;
  min-height: 72px !important;
  overflow: hidden !important;
}

/* Шаг 4 — чипы тоже с гарантией */
.k-extras .k-chip {
  padding: 6px 4px !important;
  gap: 4px !important;
}
.k-extras .k-chip-lbl {
  font-size: 10.5px !important;
  letter-spacing: -.3px !important;
  white-space: nowrap !important;
  overflow: visible !important;
}
.k-extras .k-chip-ico {
  width: 14px !important;
  height: 14px !important;
}

@media (max-width: 600px) {
  body:has(.kalk-section) .site-inner,
  body:has(.kalk-section) #main-content,
  body:has(.kalk-section) .item-page {
    padding: 0 !important;
  }
  .kalk-section .kalk-root {
    padding: 0 6px !important;
  }
}

/* ══════════════════════════════════════════
   v18 — по ширине шире, по высоте ниже
   ══════════════════════════════════════════ */

/* Блоки — максимум ширины, снимаем ограничения контейнера */
body:has(.kalk-section) .site-inner,
body:has(.kalk-section) #main-content,
body:has(.kalk-section) main,
body:has(.kalk-section) .item-page {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.kalk-section .kalk-root {
  max-width: min(1820px, 99vw) !important;
  padding: 0 10px !important;
}
.calc-layout {
  gap: 20px !important;
  min-height: auto !important;
}
.kalk-left { padding: 26px 20px !important; }
.kalk-right { padding: 26px 20px !important; }

/* Шаг 1 — кнопки ниже, шире (grid уже 2 колонки) */
.k-grid {
  gap: 10px !important;
}

/* Шаг 2 — 5 кнопок равны, НИЖЕ, шире (весь блок), текст в кнопке */
#k-work-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
#k-work-grid .k-opt {
  padding: 7px 2px 6px !important;
  min-height: 64px !important;
  overflow: hidden !important;
  gap: 2px !important;
}
#k-work-grid .k-ico {
  width: 22px !important;
  height: 22px !important;
}
#k-work-grid .k-lbl {
  font-size: 10.5px !important;
  letter-spacing: -.3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  min-height: 0 !important;
  text-overflow: clip !important;
}

/* Шаг 4 — чипы ШИРЕ (4 равных), высота нормальная 40px */
.k-extras {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
.k-extras .k-chip {
  width: 100% !important;
  padding: 9px 6px !important;
  height: 40px !important;
  max-height: 40px !important;
  gap: 5px !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.k-extras .k-chip-lbl {
  font-size: 11px !important;
  letter-spacing: -.2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}
.k-extras .k-chip-ico {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
}

/* Отступы между шагами компактнее */
.k-step { margin-top: 18px !important; }
.k-divider { margin: 18px 0 0 !important; }

/* Мобильный */
@media (max-width: 600px) {
  .kalk-section .kalk-root { padding: 0 6px !important; }
  .kalk-left, .kalk-right { padding: 14px 10px !important; }
  #k-work-grid { gap: 4px !important; }
  #k-work-grid .k-opt { padding: 6px 1px 5px !important; min-height: 58px !important; gap: 2px !important; }
  #k-work-grid .k-ico { width: 18px !important; height: 18px !important; }
  #k-work-grid .k-lbl { font-size: 8.5px !important; letter-spacing: -.4px !important; }
  .k-extras { gap: 5px !important; }
  .k-extras .k-chip { padding: 6px 3px !important; height: 34px !important; gap: 3px !important; }
  .k-extras .k-chip-lbl { font-size: 9.5px !important; letter-spacing: -.3px !important; }
  .k-extras .k-chip-ico { width: 12px !important; height: 12px !important; }
}

/* ══════════════════════════════════════════
   v19 — левый блок ШИРЕ правого (Шаг 2 и 4 шире)
   ══════════════════════════════════════════ */

/* Подложка — максимум ширины */
.kalk-section .kalk-root {
  max-width: min(1920px, 99vw) !important;
  padding: 0 8px !important;
}

/* Левый блок = 1.35fr, правый = 1fr (левый на 35% шире) */
.calc-layout {
  grid-template-columns: 1.35fr 1fr !important;
  gap: 16px !important;
}

/* Шаг 2 — шрифт побольше раз теперь шире */
#k-work-grid .k-lbl {
  font-size: 11.5px !important;
  letter-spacing: -.2px !important;
}
#k-work-grid .k-opt {
  padding: 8px 3px 7px !important;
  min-height: 68px !important;
}
#k-work-grid .k-ico {
  width: 24px !important;
  height: 24px !important;
}

/* Шаг 4 — чипы шире, шрифт побольше */
.k-extras .k-chip {
  padding: 9px 10px !important;
  gap: 6px !important;
}
.k-extras .k-chip-lbl {
  font-size: 12px !important;
  letter-spacing: -.1px !important;
}
.k-extras .k-chip-ico {
  width: 17px !important;
  height: 17px !important;
}

/* Мобильный — на узких экранах блок один над другим, чтобы обеим было достаточно ширины */
@media (max-width: 960px) {
  .calc-layout {
    grid-template-columns: 1fr !important;
  }
}

/* ══════════════════════════════════════════
   v20 — подложка шире/выше, отступ лево=право=низ
   ══════════════════════════════════════════ */

/* Секция калькулятора — одинаковые отступы со всех сторон */
.kalk-section {
  padding: 40px 40px 40px !important;
  background-color: #0a1218 !important;
}

/* Подложка калькулятора (kalk-root) — на всю ширину, без внутренних отступов */
.kalk-section .kalk-root {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Содержимое калькулятора — с одинаковыми отступами до краёв подложки */
.kalk-head {
  padding: 36px 0 28px !important;
}
.calc-layout {
  margin: 0 !important;
}

/* Мобильный — компактные симметричные отступы */
@media (max-width: 600px) {
  .kalk-section {
    padding: 20px 12px 20px !important;
  }
  .kalk-head {
    padding: 24px 0 20px !important;
  }
}
@media (min-width: 601px) and (max-width: 960px) {
  .kalk-section {
    padding: 28px 20px 28px !important;
  }
}

/* ══════════════════════════════════════════
   v21 — МОБИЛЬНЫЙ: текст помещается в кнопки
   расширяем блок в мобильном до края экрана
   ══════════════════════════════════════════ */

@media (max-width: 600px) {
  /* Подложка — до самых краёв экрана */
  .kalk-section {
    padding: 16px 0 16px !important;
  }
  .kalk-section .kalk-root {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .kalk-head {
    padding: 18px 12px 14px !important;
  }

  /* Блоки — почти до краёв, компактный padding */
  .calc-layout {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 0 6px !important;
  }
  .kalk-left, .kalk-right {
    padding: 14px 8px !important;
    border-width: 3px !important;
  }

  /* Шаг 1 — 2 колонки */
  .k-grid:not(#k-work-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .k-grid:not(#k-work-grid) .k-opt {
    padding: 8px 4px 6px !important;
    min-height: 60px !important;
  }
  .k-grid:not(#k-work-grid) .k-lbl {
    font-size: 11px !important;
    white-space: normal !important;
    line-height: 1.1 !important;
  }

  /* Шаг 2 — 5 кнопок, текст гарантированно в кнопке */
  #k-work-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }
  #k-work-grid .k-opt {
    padding: 7px 1px 6px !important;
    min-height: 58px !important;
    gap: 2px !important;
    overflow: hidden !important;
  }
  #k-work-grid .k-ico {
    width: 16px !important;
    height: 16px !important;
  }
  #k-work-grid .k-lbl {
    font-size: 8px !important;
    letter-spacing: -.45px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    width: 100% !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
  #k-work-grid .k-hit {
    font-size: 6.5px !important;
    padding: 1px 2px !important;
    top: -2px !important;
    right: -2px !important;
  }

  /* Шаг 4 — 4 чипа, Черновые мат. помещается */
  .k-extras {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }
  .k-extras .k-chip {
    padding: 6px 3px !important;
    height: 34px !important;
    max-height: 34px !important;
    gap: 3px !important;
    justify-content: center !important;
    overflow: hidden !important;
  }
  .k-extras .k-chip-ico {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
  }
  .k-extras .k-chip-lbl {
    font-size: 9px !important;
    letter-spacing: -.35px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  /* Заголовки шагов — чуть меньше */
  .k-step {
    font-size: 11px !important;
    margin-top: 14px !important;
  }
  .k-divider {
    margin: 14px 0 0 !important;
  }

  /* Шаг 3 — слайдер */
  .k-area-row {
    font-size: 13px !important;
  }
  .k-area-val {
    font-size: 22px !important;
  }
}

/* Совсем узкие экраны — iPhone SE и подобные */
@media (max-width: 380px) {
  #k-work-grid { gap: 2px !important; }
  #k-work-grid .k-opt { padding: 6px 1px 5px !important; }
  #k-work-grid .k-ico { width: 14px !important; height: 14px !important; }
  #k-work-grid .k-lbl { font-size: 7.2px !important; letter-spacing: -.5px !important; }

  .k-extras .k-chip { padding: 5px 2px !important; height: 32px !important; gap: 2px !important; }
  .k-extras .k-chip-ico { width: 11px !important; height: 11px !important; }
  .k-extras .k-chip-lbl { font-size: 8px !important; letter-spacing: -.4px !important; }
}
