.fcu-debt-groups {
  display: grid;
  gap: 8px;
}

.fcu-debt-card {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 9px;
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  background: #fff;
}

.fcu-debt-card legend {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--fcu-primary-soft, #eaf2ff);
  color: var(--fcu-primary-dark, #0f55d4);
  font-size: 11px;
  font-weight: 800;
}

.fcu-debt-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fcu-debt-settings {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: end;
  margin-top: 9px;
}

.fcu-debt-settings .fcu-simple-select { margin-top: 0; }

.fcu-debt-plan {
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #cfe0f5;
  border-radius: 9px;
  background: #fff;
  text-align: left;
}

.fcu-debt-plan h3 {
  margin: 0 !important;
  padding: 8px 10px;
  background: #eaf2ff;
  color: #0f55d4;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.fcu-debt-plan-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(96px, auto);
  gap: 7px;
  align-items: center;
  padding: 7px 9px;
  border-top: 1px solid #e5edf6;
  color: #344054;
  font-size: 11px;
}

.fcu-debt-plan-row > b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #0f55d4;
  color: #fff;
  font-size: 10px;
}

.fcu-debt-plan-row > span:last-child { text-align: right; }
.fcu-debt-plan-row strong { color: #047857; }
.fcu-debt-plan-row small { display: block; color: #667085; font-size: 9px; line-height: 1.35; }

.fcu-add-debt,
.fcu-remove-debt {
  border: 1px solid #9dbcf4;
  border-radius: 8px;
  background: #fff;
  color: var(--fcu-primary-dark, #0f55d4);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.fcu-add-debt {
  width: auto !important;
  min-height: 34px !important;
  margin: 8px 0 0 !important;
  padding: 6px 10px !important;
}

.fcu-remove-debt {
  position: absolute;
  top: 5px;
  right: 7px;
  min-height: 27px !important;
  margin: 0 !important;
  padding: 3px 7px !important;
  color: #b42318;
}


@media (max-width: 639px) {
  .fcu-debt-grid .fcu-simple-field--balance {
    grid-column: 1 / -1;
  }

  .fcu-debt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fcu-debt-settings {
    grid-template-columns: 1fr;
    gap: 7px;
  }

}
/* Full-width page presentation; field and result styles use the shared design system. */
.fcu-debt-main.fcu-simple-tool { max-width: 980px !important; padding: clamp(14px, 2.5vw, 28px) !important; }
.fcu-debt-main .fcu-simple-metrics { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
.fcu-debt-main .fcu-debt-card { padding: 14px; }
.fcu-debt-main .fcu-debt-groups { gap: 14px; }

.fcu-debt-main .fcu-debt-name-field { min-width:0; }
.fcu-debt-main .fcu-debt-name-field label { display:block; margin-bottom:5px; font-size:12px; font-weight:700; color:#344054; }
.fcu-debt-main .fcu-debt-name-field input { box-sizing:border-box; width:100%; min-height:40px; padding:8px 10px; border:1px solid #b8c8dc; border-radius:9px; background:#fff; font:inherit; }
.fcu-debt-main .fcu-debt-name-field input:focus { outline:2px solid #1769ff; outline-offset:1px; }
.fcu-debt-main .fcu-debt-controls { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; margin-top:18px; }
.fcu-debt-main .fcu-debt-calculate,
.fcu-debt-main .fcu-debt-download button { min-height:44px; padding:9px 18px; border:0; border-radius:9px; background:#1769ff; color:#fff; font:inherit; font-weight:700; cursor:pointer; }
.fcu-debt-main .fcu-debt-download { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:15px; }
.fcu-debt-main .fcu-debt-download span { font-size:12px; color:#667085; }
.fcu-debt-main .fcu-debt-calculate { width:min(100%, 320px) !important; text-align:center; }
.fcu-debt-main [data-fcu-dirty] { flex-basis:100%; text-align:center; }
.fcu-debt-main [data-fcu-dirty] { font-size:12px; font-weight:700; color:#a33b10; }
.fcu-debt-main .fcu-debt-stale { opacity:.45; }
.fcu-debt-main [hidden] { display:none !important; }
@media (max-width:639px) { .fcu-debt-main .fcu-debt-name-field { grid-column:1/-1; } }
.fcu-debt-main .fcu-debt-input-help { align-self:center; margin:0; font-size:12px; line-height:1.5; color:#526276; }
.fcu-debt-main .fcu-debt-strategies { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:16px; }
.fcu-debt-main .fcu-debt-strategy { min-width:0; padding:14px; border:1px solid #cfdef3; border-radius:12px; background:#fff; }
.fcu-debt-main .fcu-debt-strategy h3 { margin:0 0 10px !important; font-size:17px !important; color:#124eb3; }
.fcu-debt-main .fcu-debt-priority, .fcu-debt-main .fcu-debt-next, .fcu-debt-main .fcu-debt-source-note { margin:8px 0; font-size:12px; line-height:1.5; color:#344054; }
.fcu-debt-main .fcu-debt-plan h4 { margin:0 !important; padding:9px; background:#eaf2ff; font-size:12px !important; line-height:1.5; color:#0f55d4; }
.fcu-debt-main .fcu-debt-strategy .fcu-simple-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:720px) { .fcu-debt-main .fcu-debt-strategies { grid-template-columns:1fr; } }

.fcu-debt-main .fcu-debt-breakdown { margin-top:16px; }
.fcu-debt-main .fcu-debt-breakdown .fcu-simple-metrics { margin-top:12px; }
.fcu-debt-main .fcu-debt-breakdown-note { margin:10px 0 0; font-size:12px; line-height:1.5; color:#344054; }
.fcu-debt-main .fcu-debt-download { justify-content:center; }
.fcu-debt-main .fcu-debt-download button { width:min(100%, 320px) !important; text-align:center; }
.fcu-debt-main .fcu-debt-download span { flex-basis:100%; text-align:center; }
.fcu-debt-main .fcu-debt-mode-field { min-width:0; }
.fcu-debt-main .fcu-debt-mode-field label { display:block; margin-bottom:5px; font-size:12px; font-weight:700; color:#344054; }
.fcu-debt-main .fcu-debt-mode-field select { box-sizing:border-box; width:100%; min-height:40px; padding:7px 10px; border:1px solid #b8c8dc; border-radius:9px; background:#fff; font:inherit; color:#172033; }
.fcu-debt-main .fcu-debt-scenarios { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.fcu-debt-main .fcu-debt-scenario { min-width:0; padding:12px; border-radius:10px; background:#f7faff; }
.fcu-debt-main .fcu-debt-scenario h3 { margin:0 0 10px !important; font-size:13px !important; line-height:1.4; color:#124eb3; }
.fcu-debt-main .fcu-debt-scenario .fcu-simple-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
.fcu-debt-main .fcu-debt-scenario .fcu-simple-metric { min-width:0; }
.fcu-debt-main .fcu-debt-scenario .fcu-simple-metric strong { overflow-wrap:anywhere; }
.fcu-debt-main .fcu-debt-breakdown > .fcu-simple-action { margin-top:14px; }
@media(max-width:720px) { .fcu-debt-main .fcu-debt-scenarios { grid-template-columns:1fr; } }
@media(max-width:639px) { .fcu-debt-main .fcu-debt-mode-field { grid-column:1/-1; } }
