/* ============================================================
   Tool Styles — Down Payment Calculator v2.1
   File: /assets/css/modules/calculators/financialcalculators/down-payment-calculator.v2.1.css
   Purpose:
   - Tool-only layout polish (hero grid, KPI tiles, work box formatting)
   - Mobile-first, 44x44 touch targets, clamp typography
   - No changes to ub-toolkit.v2.1.css
   ============================================================ */

/* Tool-scoped tokens */
:root{
  --dpc-radius: 16px;
  --dpc-gap: 14px;
  --dpc-soft: rgba(0,0,0,.06);
}

/* Header row */
.dpc-head{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}
.dpc-title{ margin:0; font-size: var(--ub-fs-5); }
.dpc-sub{ margin:6px 0 0; }

/* How-to list */
.dpc-ol{
  margin:0;
  padding-left:18px;
}

/* Hero layout: KPIs + form */
.dpc-hero{
  display:grid;
  grid-template-columns: 1.0fr 1.0fr;
  gap: var(--dpc-gap);
  align-items:start;
}
@media (max-width: 980px){
  .dpc-hero{ grid-template-columns: 1fr; }
}

/* KPI grid */
.dpc-kpis{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content:start;
}
@media (max-width: 520px){
  .dpc-kpis{ grid-template-columns: 1fr; }
}

.dpc-kpi{
  border: 1px solid var(--ub-border);
  background: linear-gradient(180deg, var(--ub-card-bg), var(--ub-surface-2));
  border-radius: var(--dpc-radius);
  padding: 12px;
  box-shadow: var(--ub-shadow);
  min-height: 92px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.dpc-kpi .k{
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ub-muted);
}

.dpc-kpi .v{
  font-family: var(--ub-mono);
  font-weight: 950;
  font-size: clamp(18px, 1.2rem + .4vw, 22px);
  margin-top: 6px;
}

.dpc-kpi .s{
  margin-top: 6px;
  font-size: 12px;
  color: var(--ub-muted);
  min-height: 16px;
}

/* Form card tweaks */
.dpc-form .ub-card-title{ margin-bottom: 6px; }
.dpc-form .ub-card-subtitle{ margin-bottom: 12px; }

/* Collapsible spacing */
.dpc-collapsible summary{
  cursor:pointer;
  font-weight: 950;
  min-height: 44px;
  display:flex;
  align-items:center;
}

/* Actions row */
.dpc-actions{
  margin-top: 12px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
}

/* Work box */
.dpc-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 14px;
  padding: 12px;
  background: var(--ub-surface-2);
}
html.ub-theme-dark .dpc-work{
  border-color: rgba(255,255,255,.18);
}
.dpc-work-note{
  margin-top: 10px;
  color: var(--ub-muted);
  font-size: 12px;
}

/* Reference list */
.dpc-ul{
  margin:0;
  padding-left:18px;
}

/* FAQ typography */
.dpc-h3{
  margin: 12px 0 6px;
  font-size: var(--ub-fs-2);
  font-weight: 950;
}
.dpc-p{
  margin: 0 0 10px;
}

/* Minor: make selects and inputs feel consistent if toolkit changes */
.dpc-form select,
.dpc-form input{
  border-color: var(--ub-border);
}

/* Ensure rail buttons are full width (tool-only helper) */
.ub-btn--block{ width: 100%; }