/* Loop Calculator — futuristic 5-step configurator =================== */
.calc {
  position: relative;
  padding: 140px 0;
  background: linear-gradient(180deg, var(--bg) 0%, #f0ede6 100%);
  overflow: hidden;
}
.calc__bg {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(10,10,10,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,10,10,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, black, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, black, transparent 90%);
}

.calc__shell {
  position: relative;
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  z-index: 1;
}
@media (max-width: 1000px) {
  .calc__shell { grid-template-columns: 1fr; }
}

.calc__main {
  background: rgba(255,255,252,0.62);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(10,10,10,0.07);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 30px 80px -30px rgba(10,10,10,0.18);
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.calc__steps {
  display: flex;
  gap: 4px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.calc__steps::-webkit-scrollbar { display: none; }
.calc__step {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: all .3s;
  cursor: none;
  border: 1px solid transparent;
}
.calc__step.active { background: var(--ink); color: var(--bg); }
.calc__step.done { color: var(--ink); border-color: var(--line-2); }
.calc__step__n {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(10,10,10,0.06);
  display: grid; place-items: center;
  font-size: 10px;
  color: var(--ink);
}
.calc__step.active .calc__step__n { background: rgba(255,255,255,0.18); color: var(--bg); }
.calc__step.done .calc__step__n { background: var(--ink); color: var(--bg); }

.calc__body { flex: 1; padding: 32px 4px; }
.calc__h {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.calc__h .serif { color: var(--accent-deep); font-family: 'Fraunces', serif; font-style: italic; font-weight: 300; }
.calc__lead { color: var(--muted); margin-top: 12px; font-size: 15px; max-width: 560px; }

.calc__cards {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 700px) { .calc__cards { grid-template-columns: 1fr; } }

.calc__card {
  position: relative;
  padding: 22px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: none;
  transition: all .3s cubic-bezier(.2,.8,.2,1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}
.calc__card:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: var(--shadow-md); }
.calc__card.on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.calc__card.on .calc__card__d, .calc__card.on .calc__card__price { color: rgba(255,255,255,0.65); }
.calc__card.locked {
  background: var(--bg-2);
  cursor: not-allowed;
}
.calc__card__t { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.calc__card__d { color: var(--muted); font-size: 13px; line-height: 1.45; }
.calc__card__price {
  margin-top: auto;
  padding-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: flex; justify-content: space-between;
  text-transform: uppercase;
}
.calc__card__price strong { color: var(--ink); font-weight: 500; }
.calc__card.on .calc__card__price strong { color: var(--bg); }
.calc__card__check {
  position: absolute; top: 16px; right: 16px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  transition: all .3s;
  font-size: 11px;
}
.calc__card.on .calc__card__check {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.calc__card.locked .calc__card__check {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  font-size: 10px;
}
.calc__lock-hint { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

.calc__row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px;
}
.calc__chip {
  padding: 10px 16px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  font: inherit;
  font-size: 13px;
  cursor: none;
  transition: all .25s;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
}
.calc__chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.calc__chip-hint { color: var(--muted); font-size: 12px; margin-top: 8px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.08em; }

.calc__nav {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.calc__nav button {
  padding: 12px 22px;
  border-radius: 100px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: none;
  transition: all .25s;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
}
.calc__btn-back { background: transparent; color: var(--ink); border-color: var(--line-2); }
.calc__btn-back:hover { background: rgba(10,10,10,0.04); }
.calc__btn-next { background: var(--ink); color: var(--bg); }
.calc__btn-next:hover { background: var(--ink-2); }
.calc__btn-reset { background: transparent; color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 12px 14px; }
.calc__btn-reset:hover { color: var(--ink); }

/* ── Live summary panel ─────────────────────────── */
.calc__side {
  position: sticky;
  top: 100px;
  align-self: start;
  background: var(--ink);
  color: var(--bg);
  border-radius: 28px;
  padding: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 600px;
}
.calc__side::before {
  content: '';
  position: absolute; inset: -50% -10% auto auto;
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--accent-soft), transparent 60%);
  pointer-events: none;
  filter: blur(40px);
}
.calc__side__h {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.calc__side__price {
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-top: 16px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.calc__side__price small { font-size: 0.4em; opacity: 0.6; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.1em; }
.calc__side__time {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
}
.calc__side__time strong { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.calc__side__time span { color: rgba(255,255,255,0.55); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 4px; }

.calc__side__list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
  max-height: 240px;
}
.calc__side__list::-webkit-scrollbar { width: 4px; }
.calc__side__list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.calc__side__item {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  animation: slideIn .35s cubic-bezier(.2,.8,.2,1);
}
.calc__side__item span { color: rgba(255,255,255,0.85); }
.calc__side__item small { color: rgba(255,255,255,0.45); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.calc__side__share {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.calc__side__share button {
  padding: 12px 16px;
  border-radius: 100px;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .25s;
}
.calc__btn-share { background: var(--bg); color: var(--ink); }
.calc__btn-share:hover { transform: translateY(-2px); }
.calc__btn-tg { background: rgba(255,255,255,0.08); color: var(--bg); border: 1px solid rgba(255,255,255,0.18) !important; }
.calc__btn-tg:hover { background: rgba(255,255,255,0.14); }

/* ── Holographic loop badge ─────────────────── */
.calc__holo {
  position: absolute;
  top: -20px; right: -20px;
  width: 220px; height: 132px;
  opacity: 0.18;
  pointer-events: none;
}
.calc__holo path { animation: spin-slow 30s linear infinite; transform-origin: center; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ── Result step (s6) ─────────────────────── */
.calc__result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
}
@media (max-width: 700px) { .calc__result { grid-template-columns: 1fr; } }
.calc__result__big {
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.calc__result__big small { font-size: 0.3em; opacity: 0.4; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.1em; vertical-align: super; }
.calc__result__list {
  display: flex; flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.calc__result__list > div {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.calc__result__list > div small { color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.calc__disclaimer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
  letter-spacing: 0.04em;
}
