/* ── СЕКЦИЯ ────────────────────────────── */

#calculator {

  position: relative;
  background: transparent;

}

#calculator .container {

  position: relative;
  z-index: 1;

}

#calculator .calc__wrapper::before {

  content: '';
  position: absolute;
  inset: -40px -20px;
  background:
    radial-gradient(ellipse 70% 50% at 75% 30%, color-mix(in srgb, var(--color-gold) 8%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, color-mix(in srgb, var(--color-gold) 5%, transparent), transparent 65%);
  pointer-events: none;
  z-index: -1;

}

@media (prefers-reduced-motion: reduce) {

  #calculator .calc__wrapper::before {

    display: none;

  }

}

/* ── ОБЁРТКА ──────────────────────────── */

.calc__wrapper {

  display: block;
  position: relative;

}

/* ── ОСНОВНАЯ ЧАСТЬ ───────────────────── */

.calc__main {

  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  --calc-touch-min: 44px;
  --calc-section-gap: 10px;
  --calc-section-radius: 14px;
  --calc-section-pad: 14px;
  --calc-action-bar-bg: var(--color-surface-elevated);

}

/* ── UNIFIED SECTION CARD ─────────────── */

.calc__section-card {

  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--calc-section-radius);
  padding: var(--calc-section-pad);
  box-shadow: var(--shadow-xs);

}

/* ── UNIFIED OPTION ROW ───────────────── */

.calc__option-row {

  display: block;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;

}

.calc__option-row:focus-within .calc__type-card-inner,
.calc__option-row:focus-within .product-card__inner {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

/* Цены в сайдбаре — только на шаге 4 */
.calc__main:not(.calc__main--on-result) .calc__sidebar-item-price,
.calc__main:not(.calc__main--on-result) .calc__sidebar-total-panel {

  display: none;

}

.calc__main:not(.calc__main--on-result) .calc__sidebar-divider {

  display: none;

}

.calc__main-body {
  grid-column: 1;
  min-width: 0;
}

.calc__main .calc__sidebar {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

/* ── ПРОГРЕСС (компактный степпер) ─────── */

.calc__progress {

  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  --calc-node-size: 32px;
  padding: 20px 32px 24px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  contain: layout style;

}

.calc__progress-stepper {

  order: 1;
  position: relative;
  margin-bottom: 14px;
  padding: 0; /* rail + equal flex items now fill the full allocated width of the progress area */

}

/* Full-width progress rail (base for desktop + tablet). 
   Replaces previous narrow ::after segments. Line now spans the entire allocated stepper area.
   Dots are placed evenly via flex:1 on items; rail sits behind. */
.calc__progress-rail {

  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  background: color-mix(in srgb, var(--color-dark) 10%, transparent);
  transform: translateY(-50%);
  z-index: 0;
  /* inset so line runs between centers of first/last dots */
  margin-left: calc(var(--calc-node-size) / 2);
  margin-right: calc(var(--calc-node-size) / 2);
  border-radius: 1px;
  pointer-events: none;

}

.calc__progress-rail-track {

  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;

}

#calcProgressRailFill {

  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--calc-progress, 0%);
  background: var(--color-gold);
  border-radius: 1px;
  transition: width 200ms ease;

}

.calc__steps-nav {

  width: 100%;
  position: relative;
  z-index: 1;

}

.calc__steps-track {

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;

}

/* Equal distribution so dots + rail fill the entire allocated width of .calc__progress */
.calc__step-nav-item {

  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;

}

/* Old segment ::after lines are replaced by the full-width rail+fill below.
   Hidden in base (mobile rail already primary). Dots still get completed/active treatment. */
.calc__step-nav-item:not(:last-child)::after {
  display: none;
}

.calc__step-nav-btn {

  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

}

.calc__step-nav-btn[disabled],
.calc__step-nav-btn[aria-disabled="true"] {

  cursor: default;
  pointer-events: none;

}

@media (hover: hover) {

  .calc__step-nav-btn:not([disabled]):not(.active):hover .calc__step-nav-num {

    border-color: color-mix(in srgb, var(--color-dark) 35%, transparent);
    transform: scale(1.05);

  }

  .calc__step-nav-btn.completed:not([disabled]):hover .calc__step-nav-num {

    border-color: var(--color-dark);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--color-dark) 15%, transparent);

  }

}

.calc__step-nav-btn:not([disabled]):active .calc__step-nav-num {

  transform: scale(0.96);

}

.calc__step-nav-btn.active:active .calc__step-nav-num {

  transform: scale(1);

}

.calc__step-nav-btn:focus-visible {

  outline: none;

}

.calc__step-nav-btn:focus-visible .calc__step-nav-num {

  outline: 2px solid var(--color-gold);
  outline-offset: 3px;

}

.calc__step-nav-node {

  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  z-index: 2;
  background: var(--color-surface-muted); /* cover rail line under the dot */
  border-radius: 50%;

}

.calc__step-nav-node::after {

  display: none;

}

.calc__step-nav-num {

  width: var(--calc-node-size);
  height: var(--calc-node-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  transition:
    background var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);

}

/* Pending */
.calc__step-nav-btn:not(.active):not(.completed) .calc__step-nav-num,
.calc__step-nav-btn.reachable:not(.active):not(.completed) .calc__step-nav-num {

  background: transparent;
  color: color-mix(in srgb, var(--color-dark) 30%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--color-dark) 20%, transparent);
  box-shadow: none;

}

/* Active */
.calc__step-nav-item.active .calc__step-nav-num,
.calc__step-nav-btn.active .calc__step-nav-num {

  background: var(--color-gold);
  color: var(--color-dark);
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-dim), 0 4px 16px color-mix(in srgb, var(--color-gold) 35%, transparent);
  transform: none;

}

/* Completed */
.calc__step-nav-item.completed .calc__step-nav-num,
.calc__step-nav-btn.completed .calc__step-nav-num {

  background: var(--color-dark);
  color: var(--color-white);
  border-color: var(--color-dark);
  font-size: 0;
  box-shadow: none;

}

.calc__step-nav-item.completed .calc__step-nav-num::after,
.calc__step-nav-btn.completed .calc__step-nav-num::after {

  content: '';
  display: block;
  width: 13px;
  height: 13px;
  background-color: var(--color-white);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;

}

/* Подписи шагов скрыты — название в meta-блоке */
.calc__step-nav-label,
.calc__step-nav-label--short,
.calc__step-nav-item:nth-child(3) .calc__step-nav-label,
.calc__step-nav-item:nth-child(3) .calc__step-nav-label--short {

  display: none;

}

/* Подпись под точками: «Шаг N из 4 · Название» */
.calc__progress-meta {

  order: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: color-mix(in srgb, var(--color-dark) 50%, transparent);
  line-height: 1.4;
  text-align: center;

}

.calc__progress-step {

  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: inherit;

}

.calc__progress-step #calcProgressStep {

  font-weight: 700;
  color: inherit;

}

.calc__progress-meta-sep {

  display: inline;
  margin: 0 6px;
  color: inherit;

}

.calc__progress-current {

  flex: none;
  min-width: 0;
  font-weight: 400;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

}

/* ── VIEWPORT КОНТЕНТА ШАГОВ ─────────── */

.calc__step-viewport {

  position: relative;
  overflow: hidden;

}

/* ── ШАГ ──────────────────────────────── */

.calc__step {

  padding: 36px 28px;

}

.calc__step--entering {

  opacity: 0;
  animation: calcStepIn 250ms var(--ease-out) 120ms forwards;

}

.calc__step--leaving {

  animation: calcStepOut 200ms ease-in forwards;

}

@keyframes calcStepIn {

  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }

}

@keyframes calcStepOut {

  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-20px);
  }

}

.calc__step-header {

  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);

}

.calc__step-icon {

  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-gold-dim-soft);
  border: 1px solid var(--color-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-dark);
  flex-shrink: 0;

}

.calc__step-icon svg {

  width: 28px;
  height: 28px;

}

.calc__step-title {

  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;

}

.calc__step-desc {

  font-family: var(--font-body);
  color: var(--color-text-muted);
  line-height: 1.45;

}

/* Шаг 4: та же шапка, что у шагов 1–3 */
.calc__result-header.calc__step-header {

  text-align: left;
  align-items: flex-start;

}

.calc__result-header.calc__step-header .calc__result-icon {

  margin-bottom: 0;

}

.calc__result-badge {

  display: inline-flex;
  align-items: center;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-success-dim);
  border: 1px solid color-mix(in srgb, var(--color-success) 28%, transparent);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-success);

}

/* ── ПОЛЯ ПРОДУКТА (ШАГ 2) ─────────── */

.calc__product-fields {

  margin-bottom: 24px;

}

/* ── ШАГ 1: ВЫБОР ПРОДУКТА ────────────── */

.product-grid--picker {

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;

}

.product-grid--picker .product-card {

  position: relative;
  cursor: pointer;
  flex: 1 1 calc(33.333% - 8px);
  min-width: 148px;
  max-width: calc(33.333% - 8px);

}

.product-card input {

  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;

}

.product-card__inner {

  background: var(--color-surface-muted);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 148px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;

}

.product-card:hover .product-card__inner {

  border-color: var(--color-border-strong);
  transform: translateY(-2px);

}

.product-card input:checked + .product-card__inner,
.product-card--selected .product-card__inner {

  background: var(--color-white);
  border-color: var(--color-gold);
  color: var(--color-text);
  box-shadow: var(--shadow-gold);

}

.product-card input:checked + .product-card__inner::after,
.product-card--selected .product-card__inner::after {

  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 0 2px var(--color-white);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  background-color: var(--color-gold);
  z-index: 1;

}

.product-card input:checked + .product-card__inner .product-card__title,
.product-card--selected .product-card__inner .product-card__title,
.product-card input:checked + .product-card__inner .product-card__price,
.product-card--selected .product-card__inner .product-card__price {

  color: var(--color-text);

}

.product-card input:checked + .product-card__inner .product-card__price,
.product-card--selected .product-card__inner .product-card__price {

  color: var(--color-gold-dark);

}

.product-card input:checked + .product-card__inner .product-card__desc,
.product-card--selected .product-card__inner .product-card__desc {

  color: var(--color-text-muted);

}

.product-card input:checked + .product-card__inner .product-card__icon,
.product-card--selected .product-card__inner .product-card__icon {

  background: var(--color-gold-dim);
  border-color: var(--color-border-accent);
  color: var(--color-gold-dark);

}

.product-card input:focus-visible + .product-card__inner {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

.product-card__badge {

  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  color: var(--color-surface-inverse);
  line-height: 1.2;

}

.product-card__icon {

  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base);
  margin-bottom: 4px;

}

.product-card__icon i {

  width: 22px;
  height: 22px;

}

.product-card__content {

  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;

}

.product-card__title {

  display: block;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;

}

.product-card__desc {

  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;

}

.product-card__price {

  display: block;
  margin-top: auto;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-gold);
  padding-top: 4px;
  line-height: 1.25;
  overflow-wrap: anywhere;

}

.product-card:active .product-card__inner {

  transform: scale(0.98);

}

@media (hover: none) {

  .product-card:hover .product-card__inner {
    transform: none;
  }

}

/* ── ПОЛЯ ─────────────────────────────── */

.calc__fields {

  display: flex;
  flex-direction: column;
  gap: 20px;

}

.calc__fields--two-cols {

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;

}

.calc__label {
display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: 12px;
}

/* Тултип */

.calc__tooltip {
width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  font-weight: 700;
  color: var(--color-text-subtle);
  cursor: help;
  position: relative;
  flex-shrink: 0;
}

.calc__tooltip::after {
content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  
  font-weight: 400;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  white-space: normal;
  max-width: 200px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.calc__tooltip:hover::after,
.calc__tooltip:focus-visible::after,
.calc__tooltip--open::after {

  opacity: 1;

}

@media (hover: none) {

  .calc__tooltip::after {

    max-width: min(200px, 70vw);

  }

}

.calc__tooltip:focus-visible {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

/* Слайдер: layout */

.calc__slider-wrapper {

  width: 100%;

}

.calc__slider-row {

  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;

}

.calc__slider-visual {

  flex-shrink: 0;

}

.calc__slider-controls {

  flex: 1;
  min-width: 0;

}

/* Счётчик букв */

.calc__counter {

  display: flex;
  align-items: center;
  gap: 0;
  background: var(--color-surface-muted);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  overflow: hidden;
  width: fit-content;
  transition: border-color var(--transition-fast);

}

.calc__counter:focus-within {

  border-color: var(--color-border-strong);

}

.calc__counter-btn {

  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;

}

.calc__counter-btn:hover {

  color: var(--color-text);
  background: var(--color-border);

}

.calc__counter-btn:focus-visible {

  outline: 2px solid var(--color-gold);
  outline-offset: -2px;

}

.calc__counter-btn svg {

  width: 16px;
  height: 16px;

}

.calc__counter-input {
width: 72px;
  height: 44px;
  text-align: center;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-heading);
  
  font-weight: 800;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  -moz-appearance: textfield;
}

.calc__counter-input::-webkit-outer-spin-button,
.calc__counter-input::-webkit-inner-spin-button {

  -webkit-appearance: none;
  margin: 0;

}

/* Слайдер */

.calc__range {

  width: 100%;
  height: 4px;
  appearance: none;
  background: var(--color-border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 14px 0;

}

.calc__range::-webkit-slider-runnable-track {

  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--color-surface-inverse) 0%,
    var(--color-surface-inverse) var(--range-progress, 25%),
    var(--color-border) var(--range-progress, 25%)
  );

}

.calc__range::-webkit-slider-thumb {

  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-surface-elevated);
  border: 2px solid var(--color-surface-inverse);
  box-shadow: var(--shadow-sm);
  cursor: grab;
  margin-top: -9px;
  transition: all var(--transition-fast);

}

.calc__range:active::-webkit-slider-thumb {

  cursor: grabbing;
  transform: scale(1.15);
  box-shadow: var(--shadow-md);

}

.calc__range::-moz-range-track {

  height: 4px;
  border-radius: 2px;
  background: var(--color-border);

}

.calc__range::-moz-range-progress {

  height: 4px;
  border-radius: 2px;
  background: var(--color-surface-inverse);

}

.calc__range::-moz-range-thumb {

  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-surface-elevated);
  border: 2px solid var(--color-surface-inverse);
  box-shadow: var(--shadow-sm);
  cursor: grab;

}

.calc__range:focus-visible {

  outline: 2px solid var(--color-gold);
  outline-offset: 4px;

}

.calc__range-labels {
display: flex;
  justify-content: space-between;
  
  color: var(--color-text-subtle);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Пресеты */

.calc__range-presets {

  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;

}

.calc__preset {
padding: 5px 12px;
  border-radius: var(--radius-full);
  
  font-weight: 600;
  background: var(--color-surface-muted);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calc__preset:hover {

  border-color: var(--color-border-strong);
  color: var(--color-text);

}

.calc__preset.active {

  background: var(--color-gold-dim);
  border-color: var(--color-border-accent);
  color: var(--color-gold-dark);

}

.calc__preset:focus-visible {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

/* Превью буквы */

.calc__letter-preview {

  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 18px;
  min-height: 92px;
  background: var(--color-dark);
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--color-gold) 25%, transparent);
  box-shadow:
    inset 0 0 28px color-mix(in srgb, var(--color-gold) 7%, transparent),
    0 4px 14px color-mix(in srgb, var(--color-dark) 18%, transparent);

}

.calc__letter-preview-letter {

  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--letter-size, 60px);
  color: var(--color-gold-light);
  transition: font-size 0.3s var(--ease-out);
  line-height: 1;
  letter-spacing: -0.05em;
  text-shadow:
    0 0 18px color-mix(in srgb, var(--color-gold) 52%, transparent),
    0 0 36px color-mix(in srgb, var(--color-gold) 24%, transparent);

}

.calc__letter-preview-arrow {

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;

}

.calc__letter-preview-arrow::before {

  content: '';
  display: block;
  width: 1px;
  height: 20px;
  background: color-mix(in srgb, var(--color-gold) 35%, transparent);

}

.calc__letter-preview-size {
font-family: var(--font-heading);
  
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Числовой инпут высоты буквы */

.calc__height-input {
flex-shrink: 0;
  width: 72px;
  padding: 8px 12px;
  background: var(--color-surface-muted);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-heading);
  
  font-weight: 800;
  text-align: center;
  -moz-appearance: textfield;
  transition: border-color var(--transition-fast);
}

.calc__height-input::-webkit-outer-spin-button,
.calc__height-input::-webkit-inner-spin-button {

  appearance: none;
  margin: 0;

}

.calc__height-input:focus-visible {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-color: var(--color-border-strong);

}

.calc__height-unit {
flex-shrink: 0;
  font-family: var(--font-heading);
  
  font-weight: 700;
  color: var(--color-text-subtle);
}

/* Размерные инпуты (логотип) */

.calc__size-input-group {

  display: flex;
  align-items: center;
  background: var(--color-surface-muted);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
  transition: border-color var(--transition-fast);

}

.calc__size-input-group:focus-within {

  border-color: var(--color-border-strong);

}

.calc__size-input {
flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-heading);
  
  font-weight: 800;
  width: 80px;
  text-align: center;
  -moz-appearance: textfield;
}

.calc__size-input::-webkit-outer-spin-button,
.calc__size-input::-webkit-inner-spin-button {

  -webkit-appearance: none;
  margin: 0;

}

.calc__size-input:focus-visible {

  outline: none;

}

.calc__size-unit {
padding: 0 14px;
  
  font-weight: 700;
  color: var(--color-text-subtle);
  border-left: 1px solid var(--color-border);
  font-family: var(--font-heading);
}

/* Превью логотипа */

.calc__logo-visual {

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;

}

.calc__logo-preview-box {

  width: 260px;
  height: 180px;
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;

}

.calc__logo-preview-inner {

  background: var(--color-gold-dim);
  border: 2px dashed var(--color-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
  position: relative;
  min-width: 20px;
  min-height: 20px;

}

.calc__logo-preview-label {
position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  
  font-weight: 700;
  color: var(--color-gold);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* Карточки сложности */

.calc__complexity-grid {

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;

}

.calc__complexity-card {

  position: relative;
  cursor: pointer;

}

.calc__complexity-card input {

  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;

}

.calc__complexity-card-inner {

  padding: 18px 14px;
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  transition: all var(--transition-base);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

}

.calc__complexity-card:hover .calc__complexity-card-inner {

  border-color: var(--color-border-strong);

}

.calc__complexity-card input:checked + .calc__complexity-card-inner,
.calc__complexity-card--active .calc__complexity-card-inner {

  background: var(--color-surface-inverse);
  border-color: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);

}

.calc__complexity-card input:focus-visible + .calc__complexity-card-inner {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

.calc__complexity-icon {
line-height: 1;
}

.calc__complexity-card input:checked + .calc__complexity-card-inner .calc__complexity-desc,
.calc__complexity-card--active .calc__complexity-card-inner .calc__complexity-desc {

  color: rgba(248, 245, 240, 0.55);

}

.calc__complexity-name {
font-family: var(--font-heading);
  
  font-weight: 700;
}

.calc__complexity-desc {
color: var(--color-text-subtle);
  text-align: center;
}

.calc__complexity-coeff {
font-family: var(--font-heading);
  
  font-weight: 800;
  color: var(--color-gold);
}

/* Карточки опций монтажа */

.calc__options-grid {

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;

}

.calc__option-card {

  cursor: pointer;
  position: relative;

}

.calc__option-card input {

  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;

}

.calc__option-card-inner {

  padding: 18px 14px;
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  transition: all var(--transition-base);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;

}

.calc__option-card:hover .calc__option-card-inner {

  border-color: var(--color-border-strong);

}

.calc__option-card input:checked + .calc__option-card-inner {

  background: var(--color-gold-dim);
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-gold);

}

.calc__option-card input:focus-visible + .calc__option-card-inner {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

.calc__option-icon {
line-height: 1;
}

.calc__option-name {
font-family: var(--font-heading);
  
  font-weight: 700;
}

.calc__option-desc {
color: var(--color-text-subtle);
}

.calc__option-price {
font-family: var(--font-heading);
  
  font-weight: 700;
  color: var(--color-gold);
}

/* Переключатели да/нет */

.calc__toggle-group {

  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px;
  width: fit-content;
  flex-wrap: wrap;

}

.calc__toggle-btn {
display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
}

.calc__toggle-btn svg {

  width: 16px;
  height: 16px;

}

.calc__toggle-btn--active {

  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);

}

.calc__toggle-btn:focus-visible {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

/* Мини-итог шага */

.calc__step-result {

  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 16px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-gold);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
  gap: 8px;
  /* Neat bottom anchor, unified with gold accent for price importance */

}

.calc__step-result-formula {

  font-size: var(--text-sm);
  color: var(--color-text-muted);
  flex: 1;
  min-width: 0;

}

.calc__step-result-price {

  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-gold-dark);
  letter-spacing: -0.02em;
  white-space: nowrap;

}

/* Навигация по шагам */

.calc__step-actions {

  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);

}

/* Подсказка */

.calc__hint {
color: var(--color-text-subtle);
  margin-top: 6px;
}

/* ── ИТОГОВЫЙ ШАГ ─────────────────────── */

.calc__step--result {

  padding: 36px 28px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition-base), transform var(--transition-base);

}

.calc__step--result.calc__step--visible {

  opacity: 1;
  transform: translateY(0);

}

.calc__result-header:not(.calc__step-header) {

  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border);

}

.calc__result-icon {
  line-height: 1;
  margin-bottom: 12px;
}

.calc__result-header:not(.calc__step-header) h3 {
  margin-bottom: 6px;
}

.calc__result-header:not(.calc__step-header) p {
  color: var(--color-text-muted);
}

/* CTA hierarchy — шаг 4 */
.calc__result-footer--hierarchy .calc__result-actions--primary {

  display: flex;
  flex-direction: column;
  gap: 10px;

}

.calc__result-cta--primary {

  width: 100%;
  max-width: 100%;
  min-height: var(--calc-touch-min);
  box-shadow: var(--shadow-gold);
  overflow-wrap: anywhere;

}

.calc__result-cta--secondary {

  width: 100%;
  min-height: 48px;

}

.calc__result-footer--hierarchy .tg-calc-hint {

  order: 3;
  margin: 0;

}

.calc__result-footer--hierarchy .tg-consent-hint--result {

  order: 4;
  margin: 0;
  text-align: center;

}

.calc__result-footer--hierarchy .calc__result-secondary {

  margin-top: 4px;

}

.calc__result-breakdown {

  background: var(--color-surface-muted);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 20px;

}

.calc__result-row {

  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);

}

.calc__result-row:last-child {

  border-bottom: none;

}

.calc__result-row:hover {

  background: var(--color-surface-subtle);

}

.calc__result-row--clickable {

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

}

.calc__result-row--clickable:focus-visible {

  outline: 2px solid var(--color-gold);
  outline-offset: -2px;

}

.calc__result-row-edit {

  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-gold-dark);
  opacity: 0.85;

}

.calc__result-row-icon {
flex-shrink: 0;
  
  line-height: 1;
}

.calc__result-row-info {

  flex: 1;
  min-width: 0;

}

.calc__result-row-name {
font-weight: 600;
  
  margin-bottom: 2px;
}

.calc__result-row-formula {
color: var(--color-text-subtle);
}

.calc__result-row-price {
font-family: var(--font-heading);
  
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.01em;
  flex-shrink: 1;
  min-width: 0;
  white-space: nowrap;
}

.calc__result-total {

  background: var(--color-surface-inverse);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  margin-bottom: 24px;
  color: var(--color-text-inverse);

}

.calc__result-total-label {
font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(248, 245, 240, 0.45);
  margin-bottom: 10px;
}

.calc__result-total-price {

  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;

}

.calc__result-tilde {
color: rgba(248, 245, 240, 0.3);
}

.calc__result-total-num {
font-family: var(--font-heading);
  
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--color-gold);
  line-height: 1;
}

.calc__result-total-currency {
font-family: var(--font-heading);
  
  font-weight: 700;
  color: rgba(212, 168, 83, 0.7);
}

.calc__result-disclaimer {
margin-top: 12px;
  
  color: rgba(248, 245, 240, 0.35);
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.calc__result-disclaimer a,
.calc__sidebar-disclaimer a {
  color: color-mix(in srgb, var(--color-gold) 70%, transparent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.calc__result-disclaimer a:hover,
.calc__sidebar-disclaimer a:hover {
  color: var(--color-gold);
}

@media (max-width: 767px) {
  .calc__result-disclaimer,
  .calc__sidebar-disclaimer {
    max-width: none;
    text-align: center;
  }

  .calc__result-disclaimer .legal-disclaimer-mobile,
  .calc__sidebar-disclaimer .legal-disclaimer-mobile {
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
    line-height: 1.4;
  }
}

.calc__result-actions {

  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;

}

.calc__result-actions .calc__result-cta {

  flex: 1 1 100%;

}

.calc__result-actions .btn-outline,
.calc__result-actions .btn-ghost {

  flex: 1 1 auto;

}

.calc__result-secondary {

  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;

}

.calc__result-back,
.calc__result-share {
display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  
  cursor: pointer;
  transition: color var(--transition-fast);
}

.calc__result-back:hover,
.calc__result-share:hover {

  color: var(--color-text);

}

.calc__result-back:focus-visible,
.calc__result-share:focus-visible {

  outline: 2px solid var(--color-gold);
  outline-offset: 4px;
  border-radius: 4px;

}

/* Тост копирования ссылки */

.calc__share-toast {

  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-bottom, 0px));
  transform: translateX(-50%) translateY(16px);
  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  max-width: min(92vw, 360px);
  text-align: center;
  z-index: var(--z-toast);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  box-shadow: var(--shadow-md);
  pointer-events: none;

}

#calculator .calc__share-toast {

  position: fixed;

}

.calc__share-toast--visible,
.calc__share-toast.visible {

  opacity: 1;
  transform: translateX(-50%) translateY(0);

}

/* ── САЙДБАР ──────────────────────────── */

.calc__sidebar {

  background: var(--color-dark);
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--color-gold) 22%, transparent);
  padding: 24px;
  position: sticky;
  top: 100px;
  box-shadow:
    var(--shadow-lg),
    0 0 48px color-mix(in srgb, var(--color-gold) 10%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--color-gold) 28%, transparent);

}

.calc__sidebar-header {

  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-light) 12%, transparent);

}

.calc__sidebar-header h4 {

  font-weight: 700;
  color: var(--color-text-inverse);

}

.calc__sidebar-status {

  color: color-mix(in srgb, var(--color-light) 45%, transparent);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;

}

.calc__sidebar-status::before {

  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ADE80;
  flex-shrink: 0;
  animation: pulseGreen 2s ease-in-out infinite;

}

@media (prefers-reduced-motion: reduce) {

  .calc__sidebar-status::before,
  .calc__total-number.updating {

    animation: none;

  }

}

@keyframes pulseGreen {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }

}

.calc__sidebar-items {

  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;

}

.calc__sidebar-item {

  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-light) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-light) 8%, transparent);
  transition: all var(--transition-fast);

}

.calc__sidebar-item--clickable {

  cursor: pointer;

}

.calc__sidebar-item--clickable:hover {

  border-color: color-mix(in srgb, var(--color-gold) 30%, transparent);
  background: color-mix(in srgb, var(--color-light) 9%, transparent);

}

.calc__sidebar-item--clickable:focus-visible {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

.calc__sidebar-item[hidden] {

  display: none;

}

.calc__sidebar-hint {

  margin: 0 0 12px;
  padding: 8px 12px;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: color-mix(in srgb, var(--color-light) 45%, transparent);
  background: color-mix(in srgb, var(--color-light) 4%, transparent);
  border-radius: var(--radius-sm);
  border: 1px dashed color-mix(in srgb, var(--color-light) 12%, transparent);

}

.calc__main--on-result .calc__sidebar-hint {

  display: none;

}

.calc__sidebar-item--inactive {

  opacity: 0.4;

}

.calc__sidebar-item--inactive.calc__sidebar-item--active {

  opacity: 1;

}

.calc__sidebar-item-icon {

  flex-shrink: 0;
  line-height: 1;
  color: var(--color-gold);

}

.calc__sidebar-item-info {

  flex: 1;
  min-width: 0;

}

.calc__sidebar-item-name {

  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-inverse);

}

.calc__sidebar-item-detail {

  color: color-mix(in srgb, var(--color-light) 45%, transparent);
  display: block;
  font-size: var(--text-sm);

}

.calc__sidebar-item-price {

  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-gold-light);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
  margin-left: auto;

}

.calc__price--agreement,
.calc__result-row--agreement .calc__result-row-price {
  color: var(--color-text-subtle);
  font-weight: 600;
}

.calc__sidebar-price--free {

  color: var(--color-success);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;

}

.calc__sidebar-divider {

  height: 1px;
  background: color-mix(in srgb, var(--color-light) 12%, transparent);
  margin: 14px 0;

}

.calc__sidebar-total-panel {

  background: color-mix(in srgb, var(--color-light) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-light) 10%, transparent);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;

}

.calc__sidebar-total {

  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0;

}

.calc__sidebar-total-label {

  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-xs);
  color: color-mix(in srgb, var(--color-light) 45%, transparent);

}

.calc__sidebar-total-value {

  display: flex;
  align-items: baseline;
  gap: 3px;

}

.calc__sidebar-tilde {

  color: color-mix(in srgb, var(--color-gold) 70%, transparent);

}

.calc__total-number {

  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--color-gold-light);
  text-shadow: 0 0 20px color-mix(in srgb, var(--color-gold) 25%, transparent);
  transition: color 0.3s var(--ease-out);
  display: inline-block;
  font-variant-numeric: tabular-nums;

}

.calc__sidebar-currency {

  font-family: var(--font-heading);
  font-weight: 700;
  color: color-mix(in srgb, var(--color-gold) 70%, transparent);

}

.calc__sidebar-disclaimer {

  color: color-mix(in srgb, var(--color-light) 38%, transparent);
  font-size: var(--text-sm);
  margin-bottom: 16px;
  line-height: 1.5;

}

.tg-calc-hint {

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 0;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: color-mix(in srgb, var(--color-gold) 85%, var(--color-light));
  background: color-mix(in srgb, var(--color-gold) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-gold) 22%, transparent);
  border-radius: var(--radius-md);

}

.tg-calc-hint[hidden] {

  display: none;

}

.tg-calc-hint svg,
.tg-calc-hint i {
  flex-shrink: 0;
  color: var(--color-gold);
}

.tg-consent-hint {
  margin-top: 8px;
  color: color-mix(in srgb, var(--color-light) 38%, transparent);
  font-size: 0.6875rem;
  line-height: 1.45;
  text-align: center;
}

.tg-consent-hint a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.calc__result-actions .tg-calc-hint {
  flex: 1 1 100%;
  width: 100%;
  margin: 4px 0 0;
}

.calc__result-actions .tg-consent-hint--result {
  flex: 1 1 100%;
  width: 100%;
  margin: 0 0 6px;
  color: color-mix(in srgb, var(--color-text-muted) 85%, transparent);
}

.calc__sidebar-actions {

  display: flex;
  flex-direction: column;
  gap: 8px;

}

.calc__sidebar-cta {

  width: 100%;
  justify-content: center;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: var(--text-sm);
  min-height: 48px;
  padding: 12px 20px;

}

.calc__tg-btn {

  width: 100%;
  justify-content: center;

}

.calc__tg-btn svg {

  width: 18px;
  height: 18px;

}

.calc__phone-link {

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: color-mix(in srgb, var(--color-light) 55%, transparent);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: 8px;

}

.calc__phone-link:hover {

  color: var(--color-gold-light);

}

.calc__phone-link svg {

  width: 16px;
  height: 16px;

}

/* Анимация обновления цены */

@keyframes priceUpdate {

  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
    color: var(--color-gold);
  }

  100% {
    transform: scale(1);
  }

}

.calc__total-number.updating {

  animation: priceUpdate 0.4s ease;

}

/* ── СЕТКА ТИПОВ (подсветка, тип короба и т.д.) ── */

.calc__type-grid {

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;

}

.calc__type-grid--3 {
 grid-template-columns: repeat(3, 1fr); 
}

.calc__type-grid--2 {
 grid-template-columns: repeat(2, 1fr); 
}

.calc__type-card {

  position: relative;
  cursor: pointer;

}

.calc__type-card input {

  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;

}

.calc__type-card-inner {

  background: var(--color-surface-muted);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  min-height: 110px;

}

.calc__type-card:hover .calc__type-card-inner {

  border-color: var(--color-border-strong);

}

.calc__type-card input:checked + .calc__type-card-inner {

  background: var(--color-gold-dim);
  border-color: var(--color-border-accent);
  color: var(--color-text);
  box-shadow: var(--shadow-gold);

}

.calc__type-card input:checked + .calc__type-card-inner::after {

  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--color-gold);
  box-shadow: 0 0 0 2px var(--color-surface-elevated);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;

}

.calc__type-card input:checked + .calc__type-card-inner .calc__type-desc {

  color: var(--color-text-muted);

}

.calc__type-card input:focus-visible + .calc__type-card-inner {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

.calc__type-name {

  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;

}

.calc__type-desc {

  color: var(--color-text-subtle);
  line-height: 1.3;
  font-size: var(--text-sm);

}

.calc__type-price {
margin-top: auto;
  font-family: var(--font-heading);
  
  font-weight: 800;
  color: var(--color-gold);
}

.calc__type-grid--no-price .calc__type-card-inner {
  min-height: 88px;
  justify-content: center;
}

.calc__hint--inline {
  margin-top: -2px;
  margin-bottom: 10px;
}

.calc__type-badge {
position: absolute;
  top: -8px;
  right: -8px;
  
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  background: var(--color-coral);
  color: var(--color-text-inverse);
}

/* ── СЕКЦИИ ВНУТРИ ШАГА ─────────── */

.calc__section {
 margin-bottom: 24px; 
}

.calc__section-title {
display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: 20px;
}

.calc__section-title i {

  color: var(--color-gold);
  width: 18px;
  height: 18px;

}

.calc__section-divider {

  height: 1px;
  background: var(--color-border);
  margin: 32px 0;

}

.calc__addons-grid {

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;

}

.calc__free-delivery-notice {
margin-top: 16px;
  padding: 14px 18px;
  background: var(--color-gold-dim);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  
  color: var(--color-gold-dark);
}

.calc__free-delivery-notice i {

  color: var(--color-gold);
  width: 18px;
  height: 18px;
  flex-shrink: 0;

}

/* ── ЧЕКБОКС-ОПЦИЯ ─────────────── */

.calc__addon-checkbox {

  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--color-surface-muted);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);

}

.calc__addon-checkbox:hover {

  border-color: var(--color-border-strong);

}

.calc__addon-checkbox input {

  position: absolute;
  opacity: 0;
  pointer-events: none;

}

.calc__addon-box {

  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--color-surface-elevated);
  border: 1.5px solid var(--color-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);

}

.calc__addon-box i {

  width: 14px;
  height: 14px;
  color: var(--color-text-inverse);
  opacity: 0;
  transition: opacity var(--transition-fast);

}

.calc__addon-checkbox input:checked ~ .calc__addon-box {

  background: var(--color-surface-inverse);
  border-color: var(--color-surface-inverse);

}

.calc__addon-checkbox input:checked ~ .calc__addon-box i {
 opacity: 1; 
}

.calc__addon-checkbox input:focus-visible ~ .calc__addon-box {

  outline: 2px solid var(--color-gold);
  outline-offset: 2px;

}

.calc__addon-content {

  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;

}

.calc__addon-name {
font-weight: 600;
  color: var(--color-text);
}

.calc__addon-desc {
color: var(--color-text-subtle);
}

.calc__addon-price {
font-family: var(--font-heading);
  
  font-weight: 800;
  color: var(--color-gold);
  flex-shrink: 0;
}

/* ── REDUCED MOTION ───────────────────── */

@media (prefers-reduced-motion: reduce) {

  .calc__step--entering,
  .calc__step--leaving {
    animation: none;
  }

  .calc__step--result {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .calc__step-nav-num,
  .calc__letter-preview-letter,
  .calc__logo-preview-inner,
  .calc__total-number {
    transition: none;
  }

  .calc__share-toast {
    transition: none;
  }

  .calc__sidebar-status::before {
    animation: none;
  }

  .calc__total-number.updating {
    animation: none;
  }

  .product-card:hover .product-card__inner {
    transform: none;
  }

  .calc__type-card-inner,
  .calc__addon-checkbox,
  .calc__addon-box,
  .calc__addon-box i,
  .calc__delivery-progress-fill {
    transition: none;
  }

}

/* ── MOBILE HELPERS (activated in responsive) ── */

.calc__delivery-progress {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.calc__delivery-progress-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.calc__delivery-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-gold);
  border-radius: 2px;
  transition: width var(--transition-base);
}

.calc__delivery-progress-text {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
}



/* Desktop sync — typography + touch targets */
@media (min-width: 768px) and (max-width: 1199px) {

  .calc__main {
    --calc-touch-min: 44px;
    --calc-section-radius: var(--radius-lg);
    --calc-section-pad: 16px;
  }

  .calc__step-nav-btn {
    min-width: var(--calc-touch-min);
    min-height: var(--calc-touch-min);
  }

  .calc__step-title { font-size: 20px; }
  .calc__step-desc { font-size: 13px; }
  .calc__result-header.calc__step-header .calc__step-title { font-size: 22px; }
  .calc__result-header.calc__step-header .calc__step-desc { font-size: 14px; }
  .product-card__badge { font-size: 10px; }
  .product-card__title { font-size: 15px; }
  .product-card__desc { font-size: 12px; }
  .product-card__price { font-size: 14px; }
  .calc__label { font-size: 13px; }
  /* Тултип */

.calc__tooltip { font-size: 10px; }
  .calc__tooltip::after { font-size: 12px; }
  .calc__counter-input { font-size: 24px; }
  .calc__range-labels { font-size: 11px; }
  .calc__preset { font-size: 12px; }
  .calc__letter-preview-letter { font-size: var(--letter-size, 60px); }
  .calc__letter-preview-size { font-size: 12px; }
  /* Числовой инпут высоты буквы */

.calc__height-input { font-size: 20px; }
  .calc__height-unit { font-size: 15px; }
  .calc__size-input { font-size: 22px; }
  .calc__size-unit { font-size: 15px; }
  .calc__logo-preview-label { font-size: 11px; }
  .calc__complexity-icon { font-size: 24px; }
  .calc__complexity-name { font-size: 13px; }
  .calc__complexity-desc { font-size: 11px; }
  .calc__complexity-coeff { font-size: 16px; }
  .calc__option-icon { font-size: 24px; }
  .calc__option-name { font-size: 13px; }
  .calc__option-desc { font-size: 11px; }
  .calc__option-price { font-size: 14px; }
  .calc__toggle-btn { font-size: 13px; }
  .calc__step-result-formula { font-size: 13px; }
  .calc__step-result-price { font-size: 22px; }
  /* Подсказка */

.calc__hint { font-size: 12px; }
  .calc__result-icon { font-size: 40px; }
  .calc__result-header:not(.calc__step-header) h3 { font-size: 26px; }
  .calc__result-header:not(.calc__step-header) p { font-size: 14px; }
  .calc__result-cta--primary { min-height: var(--calc-touch-min); }
  .calc__share-toast { bottom: calc(24px + var(--safe-bottom, 0px)); }
  .calc__result-row-icon { font-size: 20px; }
  .calc__result-row-name { font-size: 14px; }
  .calc__result-row-formula { font-size: 12px; }
  .calc__result-row-price { font-size: 16px; }
  .calc__result-total-label { font-size: 11px; }
  .calc__result-tilde { font-size: 28px; }
  .calc__result-total-num { font-size: 56px; }
  .calc__result-total-currency { font-size: 28px; }
  .calc__result-disclaimer { font-size: 12px; }
  .calc__result-back,
.calc__result-share { font-size: 13px; }
  /* Тост копирования ссылки */

.calc__share-toast { font-size: 13px; }
  .calc__sidebar-header h4 { font-size: 15px; }
  .calc__sidebar-status { font-size: 10px; }
  .calc__sidebar-item-icon { font-size: 18px; }
  .calc__sidebar-item-name { font-size: 12px; }
  .calc__sidebar-item-detail { font-size: 11px; }
  .calc__sidebar-item-price { font-size: 13px; }
  .calc__sidebar-total-label { font-size: 12px; }
  .calc__sidebar-tilde { font-size: 14px; }
  .calc__total-number { font-size: 32px; }
  .calc__sidebar-currency { font-size: 18px; }
  .calc__sidebar-disclaimer { font-size: 11px; }
  .calc__phone-link { font-size: 14px; }
  .calc__type-name { font-size: 13px; }
  .calc__type-desc { font-size: 11px; }
  .calc__type-price { font-size: 13px; }
  .calc__type-badge { font-size: 9px; }
  .calc__section-title { font-size: 14px; }
  .calc__free-delivery-notice { font-size: 13px; }
  .calc__addon-name { font-size: 14px; }
  .calc__addon-desc { font-size: 12px; }
  .calc__addon-price { font-size: 14px; }
}

@media (min-width: 1200px) {

  .calc__main {
    --calc-touch-min: 44px;
    --calc-section-radius: var(--radius-lg);
    --calc-section-pad: 16px;
  }

  .calc__step-nav-btn {
    min-width: var(--calc-touch-min);
    min-height: var(--calc-touch-min);
  }

  .calc__step-title { font-size: 20px; }
  .calc__step-desc { font-size: 13px; }
  .calc__result-header.calc__step-header .calc__step-title { font-size: 22px; }
  .calc__result-header.calc__step-header .calc__step-desc { font-size: 14px; }
  .product-card__badge { font-size: 10px; }
  .product-card__title { font-size: 15px; }
  .product-card__desc { font-size: 12px; }
  .product-card__price { font-size: 14px; }
  .calc__label { font-size: 13px; }
  /* Тултип */

.calc__tooltip { font-size: 10px; }
  .calc__tooltip::after { font-size: 12px; }
  .calc__counter-input { font-size: 24px; }
  .calc__range-labels { font-size: 11px; }
  .calc__preset { font-size: 12px; }
  .calc__letter-preview-letter { font-size: var(--letter-size, 60px); }
  .calc__letter-preview-size { font-size: 12px; }
  /* Числовой инпут высоты буквы */

.calc__height-input { font-size: 20px; }
  .calc__height-unit { font-size: 15px; }
  .calc__size-input { font-size: 22px; }
  .calc__size-unit { font-size: 15px; }
  .calc__logo-preview-label { font-size: 11px; }
  .calc__complexity-icon { font-size: 24px; }
  .calc__complexity-name { font-size: 13px; }
  .calc__complexity-desc { font-size: 11px; }
  .calc__complexity-coeff { font-size: 16px; }
  .calc__option-icon { font-size: 24px; }
  .calc__option-name { font-size: 13px; }
  .calc__option-desc { font-size: 11px; }
  .calc__option-price { font-size: 14px; }
  .calc__toggle-btn { font-size: 13px; }
  .calc__step-result-formula { font-size: 13px; }
  .calc__step-result-price { font-size: 22px; }
  /* Подсказка */

.calc__hint { font-size: 12px; }
  .calc__result-icon { font-size: 40px; }
  .calc__result-header:not(.calc__step-header) h3 { font-size: 26px; }
  .calc__result-header:not(.calc__step-header) p { font-size: 14px; }
  .calc__result-cta--primary { min-height: var(--calc-touch-min); }
  .calc__share-toast { bottom: calc(24px + var(--safe-bottom, 0px)); }
  .calc__result-row-icon { font-size: 20px; }
  .calc__result-row-name { font-size: 14px; }
  .calc__result-row-formula { font-size: 12px; }
  .calc__result-row-price { font-size: 16px; }
  .calc__result-total-label { font-size: 11px; }
  .calc__result-tilde { font-size: 28px; }
  .calc__result-total-num { font-size: 56px; }
  .calc__result-total-currency { font-size: 28px; }
  .calc__result-disclaimer { font-size: 12px; }
  .calc__result-back,
.calc__result-share { font-size: 13px; }
  /* Тост копирования ссылки */

.calc__share-toast { font-size: 13px; }
  .calc__sidebar-header h4 { font-size: 15px; }
  .calc__sidebar-status { font-size: 10px; }
  .calc__sidebar-item-icon { font-size: 18px; }
  .calc__sidebar-item-name { font-size: 12px; }
  .calc__sidebar-item-detail { font-size: 11px; }
  .calc__sidebar-item-price { font-size: 13px; }
  .calc__sidebar-total-label { font-size: 12px; }
  .calc__sidebar-tilde { font-size: 14px; }
  .calc__total-number { font-size: 32px; }
  .calc__sidebar-currency { font-size: 18px; }
  .calc__sidebar-disclaimer { font-size: 11px; }
  .calc__phone-link { font-size: 14px; }
  .calc__type-name { font-size: 13px; }
  .calc__type-desc { font-size: 11px; }
  .calc__type-price { font-size: 13px; }
  .calc__type-badge { font-size: 9px; }
  .calc__section-title { font-size: 14px; }
  .calc__free-delivery-notice { font-size: 13px; }
  .calc__addon-name { font-size: 14px; }
  .calc__addon-desc { font-size: 12px; }
  .calc__addon-price { font-size: 14px; }
}
