.fs-simulator{
  width: 100%;
  box-sizing: border-box;
}
.fs-simulator *{ box-sizing: border-box; }

.fs-simulator .fs-block + .fs-block{ margin-top: 40px; }

.fs-simulator .fs-step-title{
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
}

/* ===== range block: [min] [====range====] [max] ===== */
.fs-simulator .fs-range-block{
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;   /* reserves room for the floating value */
}

.fs-simulator .fs-range-end{
  flex: 0 0 auto;
  white-space: nowrap;
  color: #888888;
  font-size: 14px;
}

.fs-simulator .fs-range{
  position: relative;
  flex: 1 1 auto;
  padding: 14px 0;
  touch-action: none;
  cursor: pointer;
  outline: none;
}

.fs-simulator .fs-range-track{
  position: relative;
  width: 100%;
  height: 6px;
  background-color: #e0e0e0;
  border-radius: 20px;
}

.fs-simulator .fs-range-fill{
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: #111111;
  border-radius: 20px;
}

.fs-simulator .fs-range-thumb{
  position: absolute;
  top: 50%;
  left: 0;
  width: 24px;
  height: 24px;
  background-color: #ffffff;
  border: 2px solid #111111;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: grab;
}
.fs-simulator .fs-range.is-dragging .fs-range-thumb{ cursor: grabbing; }
.fs-simulator .fs-range:focus-visible .fs-range-thumb{ outline: 2px solid currentColor; outline-offset: 2px; }

/* selected value: floats under the thumb, centred, follows it */
.fs-simulator .fs-value{
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateX(-50%);
  margin-top: 14px;
  white-space: nowrap;
  color: #111111;
  font-size: 18px;
  font-weight: 700;
  pointer-events: none;
}

/* result — three lines */
.fs-simulator .fs-result-label{
  font-size: 14px;
  color: #888888;
  margin: 0 0 8px;
}
.fs-simulator .fs-result-amount{
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  color: #111111;
  margin: 0 0 8px;
}
.fs-simulator .fs-result-duration{
  font-size: 16px;
  color: #888888;
  margin: 0;
}

/* ===== stacked bar graph ===== */
.fs-simulator .fs-bar{
  display: flex;
  height: 25px;
  border-radius: 12px;
  overflow: hidden;
  background: #eeeeee;
  margin-top: 24px;
}
.fs-simulator .fs-bar-seg{
  height: 100%;
  width: 0;
  transition: width .25s ease;
}
.fs-simulator .fs-bar-apport{ background: #a8d5ba; }
.fs-simulator .fs-bar-monthly{ background: #a2c4e6; }
.fs-simulator .fs-bar-residual{ background: #f7e4a9; }

/* legend */
.fs-simulator .fs-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
  color: #333333;
  font-size: 14px;
}
.fs-simulator .fs-legend-item{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fs-simulator .fs-dot{
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.fs-simulator .fs-dot-apport{ background: #a8d5ba; }
.fs-simulator .fs-dot-monthly{ background: #a2c4e6; }
.fs-simulator .fs-dot-residual{ background: #f7e4a9; }
.fs-simulator .fs-legend-val{ font-weight: 700; }

.fs-simulator .fs-legal{
  margin-top: 18px;
  font-size: 12px;
  opacity: .6;
}

.fs-simulator .fs-cta-wrap{ margin-top: 24px; }
.fs-simulator .fs-cta{
  appearance: none;
  display: inline-block;
  border: 0;
  cursor: pointer;
  padding: 14px 28px;
  border-radius: 4px;
  background-color: #111111;
  color: #ffffff;
  font: inherit;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
