/* ===========================
   Global Reset
   =========================== */

.tm-mq-card *,
.tm-mq-card *::before,
.tm-mq-card *::after {
  box-sizing: border-box;
}

/* ===========================
   Page Background
   =========================== */

.tm-mq-wrap {
  padding: 24px;
  background: #f4f7f6;
}

/* ===========================
   Main Card
   =========================== */

.tm-mq-card {
  max-width: 820px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 28px;
  border: 1px solid #e2e8e5;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ===========================
   Step Indicator
   =========================== */

.tm-mq-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
}

.tm-step {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #cfd8d3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #8a9490;
  background: #ffffff;
}

.tm-step.is-active {
  background: #18b886;
  border-color: #18b886;
  color: #ffffff;
}

/* ===========================
   Headings
   =========================== */

.tm-mq-view h2 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 6px;
  color: #1f2933;
}

.tm-mq-sub {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 26px;
}

/* ===========================
   Views
   =========================== */

.tm-mq-view {
  display: none;
}

.tm-mq-view.is-active {
  display: block;
}

/* ===========================
   FORM GRID (CORE FIX)
   =========================== */

.tm-mq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Desktop layout */
@media (min-width: 900px) {
  .tm-mq-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===========================
   Labels
   =========================== */

.tm-mq-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #374151;
}

/* ===========================
   Inputs & Selects
   =========================== */

.tm-mq-grid input,
.tm-mq-grid select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #d1d5db;
  font-size: 15px;
  background: #f9fbfa;
  transition: all 0.15s ease;
}

.tm-mq-grid input::placeholder {
  color: #9ca3af;
}

.tm-mq-grid input:focus,
.tm-mq-grid select:focus {
  outline: none;
  background: #ffffff;
  border-color: #18b886;
  box-shadow: 0 0 0 3px rgba(24, 184, 134, 0.18);
}

/* ===========================
   FULL-WIDTH FIELDS
   =========================== */

/* Income */
.tm-mq-grid > label:first-child {
  grid-column: 1 / -1;
}

/* Debt section */
.tm-mq-debts {
  grid-column: 1 / -1;
}

/* ===========================
   Down Payment Group
   =========================== */

.tm-mq-dp {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .tm-mq-dp {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===========================
   Debt Box
   =========================== */

.tm-mq-debts {
  background: #f0faf6;
  border: 1px solid rgba(24, 184, 134, 0.25);
  border-radius: 20px;
  padding: 18px;
}

.tm-mq-debts button {
  margin-top: 8px;
}

/* Debt list */

.tm-mq-debt-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 6px;
}

.tm-mq-debt-list li {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  color: #1f2933;
}

.tm-mq-debt-list a {
  color: #dc2626;
  text-decoration: none;
  font-size: 12px;
}

.tm-mq-debt-total {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2933;
}

/* ===========================
   Buttons
   =========================== */

.tm-mq-actions {
  margin-top: 28px;
}

.tm-mq-btn {
  border: none;
  border-radius: 999px;
  padding: 15px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

/* Primary */
.tm-mq-primary {
  background: #18b886;
  color: #ffffff;
}

.tm-mq-primary:hover {
  background: #139a70;
}

/* Secondary */
.tm-mq-secondary {
  background: #e5f6ef;
  color: #065f46;
}

.tm-mq-secondary:hover {
  background: #d1f0e4;
}

/* Add Debt button (outlined style) */
.tm-mq-debts .tm-mq-secondary {
  background: transparent;
  border: 2px solid #18b886;
  color: #18b886;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
}

.tm-mq-debts .tm-mq-secondary:hover {
  background: #e5f6ef;
}


/* ===========================
   Preview Card
   =========================== */

.tm-mq-preview {
  margin-top: 24px;
}

.tm-mq-preview-box {
  border: 1px dashed rgba(24, 184, 134, 0.4);
  border-radius: 20px;
  padding: 20px;
  background: #f5fcf9;
}

.tm-mq-kicker {
  font-size: 12px;
  color: #047857;
}

.tm-mq-big {
  font-size: 30px;
  font-weight: 800;
  margin: 6px 0;
  color: #065f46;
}

.tm-mq-mini {
  font-size: 13px;
  color: #374151;
  margin-bottom: 10px;
}

/* ===========================
   Error
   =========================== */

.tm-mq-error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fee2e2;
  color: #7f1d1d;
  font-size: 13px;
}


/* ===========================
   STEP 3 – RESULT VIEW
   =========================== */

.tm-mq-result {
  margin-top: 10px;
}

/* Result card */
.tm-mq-result-card {
  background: #f5fcf9;
  border: 1px solid rgba(24, 184, 134, 0.35);
  border-radius: 22px;
  padding: 24px;
}

/* Qualification range (hero) */
.tm-mq-result-range {
  font-size: 34px;
  font-weight: 800;
  color: #065f46;
  margin: 8px 0 18px;
}

/* Label */
.tm-mq-result-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

/* Amortization toggle */
.tm-mq-amort {
  display: inline-flex;
  gap: 6px;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px;
  border: 1px solid #cdeee3;
  margin-bottom: 18px;
}

.tm-mq-amort button {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #047857;
  cursor: pointer;
}

.tm-mq-amort button.is-active {
  background: #18b886;
  color: #ffffff;
}

/* Result rows */
.tm-mq-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px dashed #d1fae5;
}

.tm-mq-result-row:last-child {
  border-bottom: none;
}

.tm-mq-result-value {
  font-weight: 700;
  color: #065f46;
}

/* CTA */
.tm-mq-result-cta {
  margin-top: 22px;
}

.tm-mq-result-cta .tm-mq-primary {
  padding: 16px 34px;
  font-size: 15px;
}

/* ===========================
   STEP 3 – DETAILS SECTION
   =========================== */

.tm-mq-details {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
}

.tm-mq-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px dashed rgba(0,0,0,0.06);
}

.tm-mq-detail-row:last-child {
  border-bottom: none;
}

.tm-mq-detail-row strong {
  font-weight: 700;
  color: #065f46;
}

/* ===========================
   FORM READABILITY UPGRADE
   =========================== */

/* Labels */
.tm-mq-wrap label {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

/* Inputs */
.tm-mq-wrap input,
.tm-mq-wrap select {
  font-size: 16px;
  line-height: 1.5;
}

/* Headings */
.tm-mq-wrap h2 {
  font-size: 22px;
  line-height: 1.3;
}

.tm-mq-wrap h3 {
  font-size: 18px;
  line-height: 1.35;
}

/* Buttons */
.tm-mq-btn {
  font-size: 16px;
  line-height: 1.4;
}

/* Result range (Step 3 hero) */
.tm-mq-result-range {
  font-size: 42px;
  line-height: 1.1;
}

/* Intro / helper text */
.tm-mq-intro,
.tm-mq-sub,
.tm-mq-muted,
.tm-mq-cta-note {
  font-size: 14px;
  line-height: 1.6;
}
/* ===========================
   FORM READABILITY UPGRADE
   =========================== */

/* Labels */
.tm-mq-wrap label {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

/* Inputs */
.tm-mq-wrap input,
.tm-mq-wrap select {
  font-size: 16px;
  line-height: 1.5;
}

/* Headings */
.tm-mq-wrap h2 {
  font-size: 22px;
  line-height: 1.3;
}

.tm-mq-wrap h3 {
  font-size: 18px;
  line-height: 1.35;
}

/* Buttons */
.tm-mq-btn {
  font-size: 16px;
  line-height: 1.4;
}

/* Result range (Step 3 hero) */
.tm-mq-result-range {
  font-size: 42px;
  line-height: 1.1;
}

/* Intro / helper text */
.tm-mq-intro,
.tm-mq-sub,
.tm-mq-muted,
.tm-mq-cta-note {
  font-size: 14px;
  line-height: 1.6;
}

/* ===========================
   CLEAN FORM INPUT STYLE
   =========================== */

.tm-mq-wrap label {
  font-size: 15px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 6px;
}

.tm-mq-wrap input,
.tm-mq-wrap select {
  width: 100%;
  height: 50px;
  padding: 10px 14px;
  font-size: 16px;
  font-family: inherit;
  color: #111827;

  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;

  box-shadow: none;
  outline: none;
}


/* Placeholder */
.tm-mq-wrap input::placeholder {
  color: #9ca3af;
}

/* Focus state (calm, professional) */
.tm-mq-wrap input:focus,
.tm-mq-wrap select:focus {
  border-color: #2563eb; /* calm blue */
}

/* Disabled */
.tm-mq-wrap input:disabled,
.tm-mq-wrap select:disabled {
  background-color: #f9fafb;
  color: #6b7280;
}

/* Required asterisk */
.tm-mq-wrap label span.required,
.tm-mq-wrap label .required {
  color: #dc2626;
  margin-left: 2px;
}
.tm-mq-wrap input,
.tm-mq-wrap select {
  border-radius: 4px;
}

/* ===========================
   LOCATION GROUP FIX
   =========================== */

.tm-mq-location {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .tm-mq-location {
    grid-template-columns: 1fr;
  }
}

.tm-review-card {
  margin-top: 32px;
  padding: 24px;
  border-radius: 16px;
  background: #f7faf9;
  border: 1px solid #e3f0eb;
}

.tm-review-content {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.tm-review-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1f2933;
}

.tm-review-desc {
  font-size: 15px;
  color: #4b5563;
  margin-bottom: 20px;
  line-height: 1.5;
}

.tm-review-btn {
  background: #2bb673;
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tm-review-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(43, 182, 115, 0.25);
}

.tm-review-note {
  font-size: 13px;
  color: #6b7280;
  margin-top: 12px;
}


.tm-review-alt {
  margin-top: 12px;
  font-size: 14px;
  color: #6b7280;
}

.tm-review-alt a {
  color: #2bb673;
  text-decoration: underline;
  font-weight: 500;
}


/* FSRA footer */
.tm-mq-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 12.5px;
  line-height: 1.5;
  color: #6b7280;
}

.tm-mq-trust-note {
  margin: 12px 0 8px;
  font-size: 13px;
  color: #6b7280;
}