/* ============================================================
   Loan Payoff Race — page-specific styles
   ============================================================ */

.lp-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lp-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.lp-form-panel h2 { font-size: 20px; margin-bottom: 18px; }

.lp-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 6px;
}

.lp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lp-field span { font-size: 12.5px; font-weight: 800; color: var(--muted); }

.lp-field input,
.lp-field select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--bg);
}
.lp-field input:focus,
.lp-field select:focus {
  outline: none;
  border-color: var(--purple);
  background: var(--surface);
}

.lp-input-prefix {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}
.lp-input-prefix span {
  padding: 0 10px;
  font-weight: 800;
  color: var(--muted);
  font-size: 14px;
}
.lp-input-prefix input {
  border: none;
  background: transparent;
  padding: 10px 10px 10px 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
.lp-input-prefix input:focus { outline: none; }
.lp-input-prefix.lp-suffix input { padding: 10px 0 10px 10px; }
.lp-input-prefix:focus-within { border-color: var(--purple); background: var(--surface); }

.lp-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}
.lp-toggle input { width: 17px; height: 17px; accent-color: var(--purple); }

.lp-shock-fields { margin-top: 12px; grid-template-columns: repeat(2, 1fr); max-width: 420px; }
.lp-shock-fields[hidden] { display: none; }

.lp-run-btn { margin-top: 20px; width: 100%; }

.lp-disclaimer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.5;
}

/* ---- Results ---- */
.lp-results { display: flex; flex-direction: column; gap: 22px; }
.lp-results[hidden] { display: none; }

.lp-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.lp-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-stat-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.lp-stat-value { font-family: var(--font-display); font-weight: 800; font-size: 21px; color: var(--ink); }
.lp-stat-good { background: var(--mint); border-color: transparent; }
.lp-stat-good .lp-stat-label { color: #1f9d68; opacity: 0.85; }
.lp-stat-good .lp-stat-value { color: #0e5636; }

.lp-chart-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.lp-chart-block h3 { font-size: 17px; margin-bottom: 4px; }
.lp-chart-sub { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }

.lp-legend-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 4px;
}
.lp-legend-baseline { background: #b7b3cb; }
.lp-legend-scenario { background: var(--purple); }

.lp-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 320;
  display: block;
}

.lp-milestone {
  background: var(--lavender);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #4a2496;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .lp-form-grid { grid-template-columns: 1fr 1fr; }
  .lp-stat-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lp-form-grid { grid-template-columns: 1fr; }
  .lp-shock-fields { grid-template-columns: 1fr 1fr; }
}
