.finance-steps,
html,
body { max-width: 100%; }

html,
body { overflow-x: clip; }

.finance-steps {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid rgba(244, 189, 70, .42);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(21, 20, 15, .96), rgba(18, 16, 27, .96));
  color: #edf1f7;
  overflow-wrap: anywhere;
}

.finance-steps[hidden] { display: none !important; }

.finance-steps h3 {
  margin: 0 0 18px;
  color: #f4bd46;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.2;
}

.finance-step-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: finance-step;
}

.finance-step-list li {
  counter-increment: finance-step;
  padding: 15px 16px 15px 20px;
  border-left: 4px solid #e4b92f;
  border-radius: 0 12px 12px 0;
  background: rgba(5, 7, 10, .44);
  color: #dce4ef;
  font-size: .98rem;
  line-height: 1.65;
}

.finance-step-list li::before {
  content: "Step " counter(finance-step) " — ";
  color: #f4bd46;
  font-weight: 900;
}

.finance-step-equation {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .94em;
  white-space: pre-wrap;
}

.finance-precision {
  margin: 16px 0 0;
  color: #aeb9c9;
  font-size: .84rem;
  line-height: 1.55;
}

#calculator-form select,
#retirement-form select,
#k-form select,
#apr-form select { color-scheme: dark; }

#calculator-form select option,
#calculator-form select optgroup,
#retirement-form select option,
#k-form select option,
#apr-form select option {
  background: #0b0f14;
  color: #f4f5f7;
}

#calculator-form select option:checked,
#retirement-form select option:checked,
#k-form select option:checked,
#apr-form select option:checked {
  background: #9a6a08;
  color: #fff;
}

@media (max-width: 640px) {
  .finance-steps { margin-top: 22px; padding: 16px 13px; }
  .finance-step-list li { padding: 13px 12px 13px 15px; font-size: .92rem; }
  .finance-step-equation { font-size: .88em; }
}
