/* Онлайн-расчёт. Устройство эталонного калькулятора: слева конфигуратор,
   справа липкая смета. Оранжевого акцента у нас нет — везде наше золото. */
.calc {
  color-scheme: dark;        /* нативные списки формы на тёмной секции */
  background: var(--ink);
  padding: clamp(56px, 5.2083vw, 100px) var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(20px, 1.6667vw, 32px);
  color: var(--paper);
}
.calc__sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* <use> клонирует символ в теневое дерево: селектором туда не попасть, поэтому
   параметры обводки задаём на самом <svg> — они наследуются внутрь клона.
   Заданные на <symbol> они не применяются, и иконка выходит чёрным квадратом. */
.prod__icon, .opt__icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calc__head { display: flex; flex-direction: column; gap: 12px; }
.calc__eyebrow {
  font-size: 13px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 1px;
  color: var(--gold);
}
.calc__title {
  font-size: clamp(24px, 1.875vw, 36px);
  font-weight: 900;
  line-height: normal;
  letter-spacing: -0.5px;
  color: var(--paper);
}

.calc__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 25.5vw, 490px);
  gap: clamp(16px, 1.3021vw, 25px);
  width: 100%;
  align-items: start;
}

/* ——— левая колонка: три шага ——— */
.calc__panel {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 1.6667vw, 32px);
  padding: clamp(18px, 1.5625vw, 30px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-xl);
  background: #1c2128;
}
.cgroup { display: contents; }
.cgroup__head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 0.9375vw, 18px);
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.3px;
  color: var(--paper);
}
.cgroup__num {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}
/* fieldset не участвует в grid-раскладке родителя, поэтому шаг и его тело
   выкладываются как самостоятельные элементы через display: contents */
.cgroup__body { display: block; }

.calc__products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 0.7813vw, 15px);
}
.prod { display: flex; cursor: pointer; }
.prod input {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  clip-path: inset(50%);
}
.prod__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  padding: 18px 12px 16px;
  border: 1px solid var(--border-glass);
  border-radius: var(--r-l);
  background: #232830;
  text-align: center;
  transition: border-color 240ms cubic-bezier(0.4, 0, 0.2, 1),
              background 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.prod__icon { width: 32px; height: 32px; color: rgba(255, 255, 255, 0.55); transition: color 240ms cubic-bezier(0.4, 0, 0.2, 1); }
.prod__name {
  font-size: var(--t-body);
  font-weight: 600;
  line-height: normal;
  color: var(--paper);
}
.prod__note {
  margin-top: auto;
  font-size: 13px;
  line-height: normal;
  color: rgba(255, 255, 255, 0.5);
}
.prod:hover .prod__box { border-color: rgba(255, 255, 255, 0.24); }
.prod input:checked + .prod__box {
  border-color: var(--gold);
  background: rgba(207, 164, 79, 0.1);
}
.prod input:checked + .prod__box .prod__icon { color: var(--gold); }
.prod input:focus-visible + .prod__box { outline: 2px solid var(--gold); outline-offset: 2px; }

.calc__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 0.7813vw, 15px);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.field__input {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border-glass);
  border-radius: var(--r-l);
  background: #232830;
  font: inherit;
  font-size: var(--t-body);
  color: var(--paper);
}
.field__input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

.calc__opts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 0.7813vw, 15px);
}
.opt { display: flex; cursor: pointer; }
.opt input {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  clip-path: inset(50%);
}
.opt__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  padding: 16px 10px 14px;
  border: 1px solid var(--border-glass);
  border-radius: var(--r-l);
  background: #232830;
  text-align: center;
  transition: border-color 240ms cubic-bezier(0.4, 0, 0.2, 1),
              background 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.opt__icon { width: 28px; height: 28px; color: rgba(255, 255, 255, 0.55); transition: color 240ms cubic-bezier(0.4, 0, 0.2, 1); }
.opt__name { font-size: var(--t-body); font-weight: 600; line-height: normal; color: var(--paper); }
.opt__price { margin-top: auto; font-size: 13px; line-height: normal; color: rgba(255, 255, 255, 0.5); }
.opt:hover .opt__box { border-color: rgba(255, 255, 255, 0.24); }
.opt input:checked + .opt__box { border-color: var(--gold); background: rgba(207, 164, 79, 0.1); }
.opt input:checked + .opt__box .opt__icon { color: var(--gold); }
.opt input:checked + .opt__box .opt__price { color: var(--gold); }
.opt input:focus-visible + .opt__box { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ——— правая колонка: смета ——— */
.calc__summary {
  position: sticky;
  top: clamp(12px, 1.6667vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(18px, 1.5625vw, 30px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-xl);
  background: #1c2128;
}
.sum__title {
  font-size: clamp(19px, 1.3542vw, 26px);
  font-weight: 900;
  line-height: normal;
  letter-spacing: -0.3px;
  color: var(--paper);
}
.sum__cap {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.sum__conf, .sum__money { display: flex; flex-direction: column; gap: 10px; }
.sum__money { padding-top: 16px; border-top: 1px solid var(--border-glass); }
.sum__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--t-body);
  line-height: normal;
}
.sum__row dt { color: rgba(255, 255, 255, 0.6); }
.sum__row dd { color: var(--paper); text-align: end; font-variant-numeric: tabular-nums; }
.sum__row--opts dd { font-size: 14px; }
.sum__row--total {
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
}
.sum__row--total dt { font-size: clamp(16px, 1.1458vw, 22px); font-weight: 600; color: var(--paper); }
.sum__row--total dd { font-size: clamp(22px, 1.6667vw, 32px); font-weight: 900; color: var(--gold); }
[data-calc].is-updating { transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1); color: var(--gold); }

.sum__free {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--border-glass);
  border-radius: var(--r-l);
  background: #232830;
}
.sum__free-title { font-size: var(--t-body); font-weight: 600; color: var(--paper); }
.sum__free ul { display: flex; flex-direction: column; gap: 6px; }
.sum__free li {
  position: relative;
  padding-inline-start: 16px;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.66);
}
.sum__free li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.sum__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--r-l);
  font: inherit;
  font-size: var(--t-body);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: center;
  cursor: pointer;
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sum__btn--light { background: var(--paper); color: var(--ink); }
.sum__btn--gold { background: var(--gold-grad); color: var(--ink); }
.sum__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.sum__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sum__note { font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, 0.6); }

@media (max-width: 1279px) {
  .calc__form { grid-template-columns: 1fr; }
  .calc__summary { position: static; }
}
@media (max-width: 767px) {
  .calc__products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc__fields { grid-template-columns: 1fr; }
}
@media (max-width: 419px) {
  .calc__products, .calc__opts { grid-template-columns: 1fr; }
  .prod__box, .opt__box { flex-direction: row; justify-content: flex-start; gap: 12px; text-align: start; }
  .prod__box { flex-wrap: wrap; }
  .prod__note { flex-basis: 100%; padding-inline-start: 44px; }
  .opt__price { margin-inline-start: auto; }
}
