/* ===== RESET ===== */
.dc-wrap *, .dc-wrap *::before, .dc-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== BASE ===== */
.dc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(13px, 1.5vw, 15px);
  color: #1e293b; max-width: 1060px; margin: 0 auto;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 16px; overflow: hidden;
}

/* ===== HEADER ===== */
.dc-header {
  padding: clamp(14px, 2vw, 22px) clamp(14px, 2.5vw, 24px);
  background: #7f1d1d;
  display: flex; align-items: center; gap: clamp(10px, 1.5vw, 14px);
}
.dc-header-icon {
  width: clamp(40px, 5vw, 50px); height: clamp(40px, 5vw, 50px);
  border-radius: 12px; background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: #fca5a5; flex-shrink: 0;
}
.dc-title    { font-size: clamp(16px, 2vw, 20px); font-weight: 700; color: #fff; margin-bottom: 3px; }
.dc-subtitle { font-size: clamp(11px, 1.3vw, 13px); color: rgba(255,255,255,0.7); line-height: 1.4; }

/* ===== BODY — default stacked ===== */
.dc-body    { display: flex; flex-direction: column; }
.dc-form    { padding: 16px; display: flex; flex-direction: column; gap: 13px; width: 100%; }
.dc-results { padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fff9f9; width: 100%; border-top: 1px solid #e2e8f0; }

/* ===== SECTION LABELS ===== */
.dc-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #64748b;
  padding-bottom: 4px; border-bottom: 1px solid #f1f5f9;
  margin-top: 2px; display: flex; align-items: center; gap: 8px;
}
.dc-section-tag {
  font-size: 9.5px; font-weight: 600; background: #fee2e2; color: #991b1b;
  padding: 2px 7px; border-radius: 20px; text-transform: none; letter-spacing: 0;
}

/* ===== DEBT ROWS ===== */
.dc-debt-row {
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.dc-debt-header {
  display: flex; justify-content: space-between; align-items: center;
}
.dc-debt-num  { font-size: 12px; font-weight: 700; color: #7f1d1d; }
.dc-debt-del  {
  background: none; border: none; color: #94a3b8;
  font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.dc-debt-del:hover { color: #dc2626; }
.dc-debt-fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.dc-debt-label  { font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 3px; }

/* ===== ADD BUTTON ===== */
.dc-add-btn {
  padding: 10px 16px; border: 1.5px dashed #cbd5e1;
  border-radius: 8px; background: transparent;
  font-size: 13px; font-weight: 600; color: #64748b;
  cursor: pointer; transition: all .15s; width: 100%; text-align: center;
}
.dc-add-btn:hover { border-color: #7f1d1d; color: #7f1d1d; background: #fff9f9; }

/* ===== OPTION CARDS ===== */
.dc-option-card {
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.dc-option-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dc-option-icon   { font-size: 18px; }
.dc-option-title  { font-size: 13px; font-weight: 700; color: #334155; }
.dc-option-badge  {
  font-size: 10.5px; font-weight: 600; background: #f1f5f9; color: #64748b;
  padding: 2px 8px; border-radius: 20px;
}

/* ===== FIELDS ===== */
.dc-field      { display: flex; flex-direction: column; gap: 5px; }
.dc-label      { font-size: 12.5px; font-weight: 600; color: #334155; }
.dc-field-hint { font-size: 11.5px; color: #64748b; line-height: 1.5; }
.dc-row-2      { display: grid; grid-template-columns: 1fr; gap: 8px; }

/* ===== INPUTS ===== */
.dc-prefix-wrap, .dc-suffix-wrap {
  display: flex; align-items: center;
  border: 1.5px solid #cbd5e1; border-radius: 8px;
  overflow: hidden; background: #fff; min-width: 0;
}
.dc-prefix-wrap:focus-within, .dc-suffix-wrap:focus-within { border-color: #7f1d1d; }
.dc-prefix, .dc-suffix {
  padding: 0 10px; height: 40px;
  display: flex; align-items: center;
  font-size: 13px; font-weight: 600; color: #64748b;
  background: #f1f5f9; white-space: nowrap; flex-shrink: 0;
}
.dc-prefix { border-right: 1px solid #e2e8f0; }
.dc-suffix { border-left: 1px solid #e2e8f0; }
.dc-input {
  flex: 1; border: none; background: transparent;
  padding: 0 10px; height: 40px;
  font-size: 13.5px; color: #1e293b; outline: none; min-width: 0;
  -moz-appearance: textfield;
}
.dc-input::-webkit-outer-spin-button,
.dc-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* debt row inline input */
.dc-debt-input {
  width: 100%; height: 38px; padding: 0 10px;
  border: 1.5px solid #cbd5e1; border-radius: 7px;
  font-size: 13px; color: #1e293b; outline: none;
  background: #fff; -moz-appearance: textfield;
}
.dc-debt-input:focus { border-color: #7f1d1d; }
.dc-debt-input::-webkit-outer-spin-button,
.dc-debt-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ===== TERM BUTTONS ===== */
.dc-btn-group { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.dc-term-btn {
  padding: 9px 4px; border: 1.5px solid #cbd5e1;
  border-radius: 7px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; background: #fff; color: #475569; transition: all .15s;
  white-space: nowrap;
}
.dc-term-btn.active { background: #7f1d1d; border-color: #7f1d1d; color: #fff; }
.dc-term-btn:hover:not(.active) { border-color: #7f1d1d; color: #ffffff; }

/* ===== DISCLAIMER ===== */
.dc-disclaimer {
  background: #fefce8; border: 1px solid #fde68a;
  border-radius: 8px; padding: 12px 14px;
  font-size: 12px; color: #78350f; line-height: 1.5;
}

/* ===== CURRENT CARD ===== */
.dc-current-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 14px 16px;
}
.dc-current-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-bottom: 12px; }
.dc-current-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.dc-current-item  { background: #f8fafc; border-radius: 8px; padding: 10px 12px; }
.dc-current-label { font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 3px; }
.dc-current-val   { font-size: clamp(14px, 1.8vw, 17px); font-weight: 700; color: #1e293b; }
.dc-red   { color: #dc2626; }
.dc-green { color: #16a34a; }
.dc-amber { color: #d97706; }

/* ===== 3-WAY COMPARE ===== */
.dc-compare-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 16px;
}
.dc-compare-title { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 3px; }
.dc-compare-hint  { font-size: 12px; color: #64748b; margin-bottom: 12px; }
.dc-compare-cols  { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
.dc-col           { border-radius: 10px; padding: 12px 10px; text-align: center; border: 1.5px solid #e2e8f0; }
.dc-col-diy       { background: #f8fafc; }
.dc-col-pl        { background: #f0fdf4; border-color: #bbf7d0; }
.dc-col-bt        { background: #eff6ff; border-color: #bfdbfe; }
.dc-col.dc-col-best { border-width: 2px; border-color: #16a34a; }
.dc-col-label     { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin-bottom: 6px; }
.dc-col-amount    { font-size: clamp(17px, 2.5vw, 22px); font-weight: 800; color: #1e293b; }
.dc-col-sub       { font-size: 10.5px; color: #94a3b8; margin-top: 3px; margin-bottom: 8px; }
.dc-col-stat      { display: flex; justify-content: space-between; font-size: 11px; color: #64748b; padding: 3px 0; border-top: 1px solid rgba(0,0,0,.05); }
.dc-col-stat span:last-child { font-weight: 600; color: #1e293b; }
.dc-col-save      { margin-top: 8px; font-size: 12px; font-weight: 700; color: #16a34a; padding: 4px 8px; background: #dcfce7; border-radius: 6px; }
.dc-winner-strip  { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #f0fdf4; border-radius: 8px; font-size: 13px; }
.dc-winner-label  { color: #64748b; }
.dc-winner-val    { font-weight: 700; color: #15803d; }

/* ===== TRAP WARNING ===== */
.dc-trap-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff7ed; border: 1.5px solid #fed7aa;
  border-radius: 12px; padding: 14px 16px;
}
.dc-trap-icon  { font-size: 22px; flex-shrink: 0; }
.dc-trap-title { font-size: 13px; font-weight: 700; color: #c2410c; margin-bottom: 4px; }
.dc-trap-text  { font-size: 13px; color: #9a3412; line-height: 1.5; }

/* ===== BREAKDOWN CARD ===== */
.dc-breakdown-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 16px;
}
.dc-breakdown-title { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 3px; }
.dc-breakdown-hint  { font-size: 12px; color: #64748b; margin-bottom: 12px; }
.dc-breakdown-row   {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px; align-items: center;
}
.dc-breakdown-row:last-child { border-bottom: none; }
.dc-breakdown-head  { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; padding-bottom: 6px; border-bottom: 1px solid #e2e8f0; margin-bottom: 4px; }
.dc-bd-name  { font-weight: 600; color: #334155; }
.dc-bd-val   { text-align: right; font-weight: 600; }
.dc-bd-save  { text-align: right; font-weight: 700; color: #16a34a; }
.dc-bd-rate  { text-align: right; color: #dc2626; font-weight: 600; }

/* ===== VERDICT ===== */
.dc-verdict-card {
  display: flex; align-items: flex-start; gap: 12px;
  border-radius: 12px; padding: 14px 16px; border: 1.5px solid #e2e8f0;
  background: #fff;
}
.dc-verdict-card.verdict-yes   { background: #f0fdf4; border-color: #bbf7d0; }
.dc-verdict-card.verdict-no    { background: #fff5f5; border-color: #fecaca; }
.dc-verdict-card.verdict-maybe { background: #fffbeb; border-color: #fde68a; }
.dc-verdict-icon  { font-size: 24px; flex-shrink: 0; }
.dc-verdict-title { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.dc-verdict-text  { font-size: 13px; color: #475569; line-height: 1.5; }

/* ==============================================
   SCREEN 1 — MOBILE: max 480px
   ============================================== */
@media (max-width: 480px) {
  .dc-wrap   { font-size: 13px; border-radius: 12px; }
  .dc-header { padding: 14px; gap: 10px; }
  .dc-header-icon { width: 38px; height: 38px; }
  .dc-title  { font-size: 15px; }
  .dc-subtitle { font-size: 11px; }
  .dc-form, .dc-results { padding: 14px; gap: 12px; }
  .dc-body   { flex-direction: column; }
  .dc-row-2  { grid-template-columns: 1fr; }
  .dc-debt-fields { grid-template-columns: 1fr; }
  .dc-compare-cols { grid-template-columns: 1fr; }
  .dc-current-grid { grid-template-columns: 1fr; }
  .dc-breakdown-row { grid-template-columns: 1fr 1fr; }
  .dc-breakdown-head { grid-template-columns: 1fr 1fr; }
}

/* ==============================================
   SCREEN 2 — TABLET: 481px – 899px
   ============================================== */
@media (min-width: 481px) and (max-width: 899px) {
  .dc-wrap   { font-size: 14px; }
  .dc-header { padding: 18px 20px; }
  .dc-form, .dc-results { padding: 18px; gap: 14px; }
  .dc-body   { flex-direction: column; }
  .dc-results { border-top: 1px solid #e2e8f0; }
  .dc-row-2  { grid-template-columns: 1fr 1fr; }
  .dc-debt-fields { grid-template-columns: 2fr 1fr 1fr; }
  .dc-compare-cols { grid-template-columns: repeat(3,1fr); }
  .dc-current-grid { grid-template-columns: repeat(4,1fr); }
}

/* ==============================================
   SCREEN 3 — DESKTOP: 900px+
   ============================================== */
@media (min-width: 900px) {
  .dc-wrap   { font-size: 15px; }
  .dc-header { padding: 22px 24px; }
  .dc-form, .dc-results { padding: 20px; gap: 14px; }
  .dc-body   { flex-direction: row; align-items: flex-start; }
  .dc-form   { width: 50%; border-right: 1px solid #e2e8f0; border-top: none; }
  .dc-results { width: 50%; border-top: none; }
  .dc-row-2  { grid-template-columns: 1fr 1fr; }
  .dc-debt-fields { grid-template-columns: 2fr 1fr 1fr; }
  .dc-compare-cols { grid-template-columns: repeat(3,1fr); }
  .dc-current-grid { grid-template-columns: 1fr 1fr; }
}
