/* Energiephase V3 — Sparrechner (port of the V1/V2 calculator.css).
   Layout, breakpoints and behaviour are unchanged; only the palette was
   adapted to the Editorial tokens (navy / sky / paper). Loaded only on
   the Sparrechner page template. */

.calc {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(1.2rem, 3vw, 2.5rem);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(12, 30, 54, .10);
}

/* controls */
.calc__controls { display: flex; flex-direction: column; gap: 1.5rem; }
.calc__field { display: flex; flex-direction: column; gap: .6rem; }
.calc__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
}
.calc__value {
  font-size: 1.15rem;
  color: var(--sky-d);
  font-weight: 700;
}

/* range slider */
.calc__range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px;
  border-radius: 999px;
  background: var(--sky-soft);
  border: 1px solid var(--line);
  outline: none;
  cursor: pointer;
}
.calc__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--sky);
  border: 3px solid var(--white);
  box-shadow: 0 2px 10px rgba(12, 30, 54, .30);
  transition: transform .15s ease;
}
.calc__range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.calc__range::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--white);
  background: var(--sky); box-shadow: 0 2px 10px rgba(12, 30, 54, .30); cursor: pointer;
}

/* segmented toggle */
.calc__segment {
  display: flex;
  gap: .4rem;
  padding: .35rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.calc__seg-btn {
  flex: 1;
  min-height: 44px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.calc__seg-btn.is-active {
  background: var(--sky);
  color: #fff;
  box-shadow: 0 2px 8px rgba(12, 30, 54, .18);
}

/* result panel */
.calc__result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: .75rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--radius);
  background: var(--sky-soft);
  border: 1px solid var(--line);
}
.calc__result-label { font-size: .95rem; color: var(--muted); }
.calc__result-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  line-height: 1;
  color: var(--navy);
  letter-spacing: -.02em;
}
.calc__result-value.is-tick { transform: scale(1.02); }
.calc__result-sub { font-size: .85rem; color: var(--muted); max-width: 32ch; }
.calc__result .ep-btn { margin-top: .75rem; }

/* assumptions box under the calculator */
.calc__notes {
  margin-top: 2rem;
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}
.calc__notes h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 .6rem;
}
.calc__notes p, .calc__notes li { color: var(--ink); font-size: .95rem; }
.calc__notes ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.calc__notes li { margin-bottom: .3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; gap: 1.25rem; }
  .calc__result { padding: clamp(1.25rem, 5vw, 2rem); }
  .calc__result-sub { max-width: 100%; }
}

@media (max-width: 560px) {
  .calc { padding: clamp(1.1rem, 4vw, 1.5rem); border-radius: var(--radius); }
  .calc__segment { flex-wrap: wrap; }
  .calc__seg-btn { flex: 1 1 auto; min-width: calc(33.333% - .5rem); min-height: 44px; padding-inline: .5rem; font-size: .9rem; }
  .calc__label { flex-wrap: wrap; gap: .15rem .5rem; }
  .calc__value { margin-left: auto; }
  .calc__range { height: 34px; }
  .calc__result-value { font-size: clamp(2rem, 9vw, 2.6rem); }
  .calc__result .ep-btn { width: 100%; }
}

@media (max-width: 380px) {
  .calc__seg-btn { min-width: calc(50% - .4rem); }
}
