.ftp-calculator {
  max-width: 900px;
  margin: 1.5rem 0;
}

.ftp-calculator p {
  line-height: 1.55;
}

.ftp-calculator__inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.ftp-calculator__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ftp-calculator__field label {
  font-weight: 600;
}

.ftp-calculator__field input,
.ftp-calculator__field select {
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  background: #ffffff;
}

.ftp-calculator__field small {
  color: #64748b;
  font-size: 0.8rem;
}

.ftp-calculator__validation {
  margin: 1rem 0;
  padding: 0.65rem 0.9rem;
  border-left: 4px solid #dc2626;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 4px;
  font-size: 0.92rem;
}

.ftp-calculator__results {
  margin-top: 1.5rem;
}

.ftp-calculator__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.ftp-calculator__card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ftp-calculator__card-header {
  background: #5b21b6;
  color: #ffffff;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  text-align: center;
}

.ftp-calculator__card input {
  width: 100%;
  border: 0;
  padding: 0.75rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  background: #f8fafc;
  color: #0f172a;
  box-sizing: border-box;
}

.ftp-calculator__chart-section {
  margin-top: 3rem;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.ftp-calculator__chart-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.ftp-calculator__slider-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ftp-calculator__slider-row label {
  font-weight: 600;
}

.ftp-calculator__slider-row input[type="range"] {
  flex: 1 1 200px;
  accent-color: #5b21b6;
}

.ftp-calculator__readout {
  font-weight: 600;
  color: #0f172a;
}

.ftp-calculator__chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.ftp-calculator__chart {
  width: 100%;
  max-width: 720px;
  height: auto;
  display: block;
}

.ftp-chart__curve {
  fill: none;
  stroke: #5b21b6;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ftp-chart__grid {
  stroke: #eef2f6;
  stroke-width: 1;
}

.ftp-chart__axis {
  stroke: #334155;
  stroke-width: 2;
  stroke-linecap: square;
}

.ftp-chart__label {
  fill: #475569;
  font-size: 11px;
}

.ftp-chart__axis-title {
  fill: #334155;
  font-size: 12px;
  font-weight: 600;
}

.ftp-chart__ftp-dot {
  fill: #5b21b6;
}

.ftp-chart__ftp-tag {
  fill: #5b21b6;
  font-size: 11px;
  font-weight: 600;
}

.ftp-chart__crosshair {
  stroke: #94a3b8;
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.ftp-chart__cursor-dot {
  fill: #ffffff;
  stroke: #5b21b6;
  stroke-width: 2.5;
}

.ftp-formula-row {
  line-height: 2.2;
}

.ftp-formula {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  margin: 0 0.15rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  vertical-align: middle;
}

.ftp-formula__var {
  font-style: italic;
}

.ftp-formula__op,
.ftp-formula__paren {
  font-style: normal;
  font-size: 1.35rem;
  line-height: 1;
}

.ftp-formula__frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  font-size: 0.92rem;
}

.ftp-formula__num {
  padding: 0 0.25rem 0.15rem;
  border-bottom: 1.5px solid #0f172a;
}

.ftp-formula__den {
  padding: 0.15rem 0.25rem 0;
}

.ftp-formula__exp {
  font-size: 0.78rem;
  margin-left: -0.15rem;
  align-self: flex-start;
  margin-top: 0.15rem;
}