/* Finance Calculators Suite — shared design system (all classes prefixed fc-) */
/* UI/UX Pro Max v1.1.0: Trust & Authority palette (navy/gold), 44px targets, visible focus */
.fc-tool {
  --fc-primary: #0f172a; --fc-secondary: #1e3a8a; --fc-accent: #a16207; --fc-accent-dark: #854d0e;
  --fc-ink: #020617; --fc-body: #1e293b; --fc-muted: #475569; --fc-line: #e2e8f0; --fc-bg: #f8fafc;
  --fc-ring: #b45309;
  --fc-ok: #15803d; --fc-ok-bg: #dcfce7; --fc-danger: #b91c1c;
  --fc-warn: #92400e; --fc-warn-bg: #fef3c7;
  max-width: 880px; margin: 0 auto; color: var(--fc-body);
  font-size: 16px; line-height: 1.6;
}
.fc-tool *, .fc-tool *::before, .fc-tool *::after { box-sizing: border-box; }
.fc-tool a { color: #1d4ed8; text-decoration: underline; text-underline-offset: 3px; }
.fc-tool a:hover { color: #1e3a8a; text-decoration-thickness: 2px; }
.fc-tool button:focus-visible, .fc-tool summary:focus-visible, .fc-tool a:focus-visible,
.fc-tool input:focus-visible, .fc-tool select:focus-visible { outline: 3px solid var(--fc-ring); outline-offset: 2px; border-radius: 4px; }
.fc-muted { color: var(--fc-muted); }

.fc-panel { background: #fff; border: 1px solid var(--fc-line); border-radius: 14px; padding: 22px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
.fc-intro { color: var(--fc-muted); margin: 0 0 16px; }
.fc-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }

.fc-field { display: block; font-size: .85rem; color: var(--fc-muted); }
.fc-field-label { display: block; font-weight: 600; color: var(--fc-ink); margin-bottom: 4px; font-size: .92rem; }
.fc-hint { display: block; font-size: .8rem; margin-top: 3px; color: var(--fc-muted); }
.fc-input-wrap { display: flex; align-items: center; border: 1px solid var(--fc-line); border-radius: 8px; background: #fff; overflow: hidden; }
.fc-input-wrap:focus-within { outline: 3px solid var(--fc-ring); outline-offset: 1px; border-color: var(--fc-secondary); }
.fc-prefix, .fc-suffix { padding: 0 4px 0 10px; color: var(--fc-muted); font-size: 15px; white-space: nowrap; }
.fc-suffix { padding: 0 10px 0 4px; }
.fc-in { width: 100%; border: 0; padding: 12px 10px; font-size: 16px; color: var(--fc-ink); background: transparent; min-height: 44px; }
.fc-in:focus { outline: none; }
select.fc-in { border: 1px solid var(--fc-line); border-radius: 8px; background: #fff; }
select.fc-in:focus { outline: 3px solid var(--fc-ring); outline-offset: 1px; }

.fc-results h4 { margin: 18px 0 8px; font-size: 1.05rem; color: var(--fc-primary); }
.fc-bignum { background: linear-gradient(135deg, #0f172a, #1e3a8a); color: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.fc-bignum-v { font-size: 2.1rem; font-weight: 800; font-family: "Lexend", "Source Sans 3", sans-serif; }
.fc-bignum-v small { font-size: 1rem; font-weight: 400; }
.fc-bignum-c { opacity: .92; margin-top: 4px; }
.fc-bignum-c .fc-muted { color: #e2e8f0; }

.fc-kvlist { background: #fff; border: 1px solid var(--fc-line); border-radius: 12px; padding: 6px 18px; margin-bottom: 14px; }
.fc-kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--fc-line); }
.fc-kv:last-child { border-bottom: 0; }
.fc-kv > span:first-child { color: var(--fc-muted); }

.fc-verdict { background: #0f172a; color: #fff; border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; font-size: 1.02rem; border-left: 5px solid var(--fc-accent); }
.fc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.fc-card { background: #fff; border: 1px solid var(--fc-line); border-radius: 12px; padding: 18px; border-top: 4px solid var(--fc-secondary); }
.fc-card.fc-c-aval { border-top-color: var(--fc-accent); }
.fc-card h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--fc-primary); }
.fc-tag { display: block; font-size: .78rem; font-weight: 400; color: var(--fc-muted); }
.fc-timeline { list-style: none; margin: 12px 0 0; padding: 0; font-size: .92rem; }
.fc-timeline li { padding: 7px 0; border-top: 1px dashed var(--fc-line); }
.fc-tl-n { display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; background: #dbeafe; color: var(--fc-secondary); font-size: .8rem; font-weight: 700; margin-right: 6px; }
.fc-c-aval .fc-tl-n { background: #fef3c7; color: var(--fc-accent-dark); }

.fc-compare { background: #fff; border: 1px solid var(--fc-line); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.fc-compare h4 { margin: 0 0 10px; color: var(--fc-primary); }
.fc-bar-row { display: grid; grid-template-columns: 150px 1fr 100px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .95rem; }
.fc-bar-label { color: var(--fc-muted); }
.fc-bar-row strong { text-align: right; }
.fc-bar { height: 14px; background: var(--fc-bg); border-radius: 7px; overflow: hidden; }
.fc-bar-fill { height: 100%; background: linear-gradient(90deg, var(--fc-secondary), var(--fc-accent)); border-radius: 7px; transition: width .35s ease; }

.fc-table-wrap { overflow-x: auto; margin-bottom: 14px; border: 1px solid var(--fc-line); border-radius: 12px; }
.fc-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: #fff; }
.fc-table th, .fc-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--fc-line); white-space: nowrap; }
.fc-table th:first-child, .fc-table td:first-child { text-align: left; }
.fc-table thead th { background: var(--fc-bg); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--fc-muted); }
.fc-table tbody tr:last-child td { border-bottom: 0; }

.fc-warn { background: var(--fc-warn-bg); border: 1px solid #fcd34d; color: var(--fc-warn); border-radius: 8px; padding: 11px 14px; font-size: .92rem; margin: 0 0 12px; }
.fc-warn-inline { background: var(--fc-warn-bg); border: 1px solid #fcd34d; color: var(--fc-warn); border-radius: 8px; padding: 11px 14px; font-size: .92rem; }
.fc-ok { background: var(--fc-ok-bg); border: 1px solid #86efac; color: var(--fc-ok); border-radius: 8px; padding: 11px 14px; font-size: .92rem; }

.fc-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.fc-stat { background: #fff; border: 1px solid var(--fc-line); border-radius: 10px; padding: 12px; text-align: center; }
.fc-stat span { display: block; font-size: .78rem; color: var(--fc-muted); text-transform: uppercase; letter-spacing: .04em; }
.fc-stat strong { font-size: 1.15rem; color: var(--fc-primary); }

.fc-steps { margin: 8px 0 14px; padding-left: 22px; }
.fc-steps li { margin-bottom: 6px; }
.fc-disclaimer { font-size: .82rem; color: var(--fc-muted); }

/* debt rows */
.fc-debt-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.fc-debt-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 44px; gap: 8px; align-items: end; }
.fc-debt-row > label { font-size: .78rem; color: var(--fc-muted); }
.fc-remove { width: 44px; height: 44px; border: 1px solid var(--fc-line); background: #fff; border-radius: 8px; font-size: 22px; color: var(--fc-muted); cursor: pointer; line-height: 1; }
.fc-remove:hover { color: var(--fc-danger); border-color: #fecaca; }
.fc-row2 { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.fc-add { border: 1px dashed #d97706; background: #fffbeb; color: var(--fc-accent-dark); border-radius: 8px; padding: 12px 18px; font-size: 16px; cursor: pointer; font-weight: 600; min-height: 44px; }
.fc-add:hover { background: #fef3c7; }
.fc-extra-wrap { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; }
.fc-extra-wrap .fc-input-wrap { width: 130px; }
.fc-input-warn { margin-top: 10px; }

/* FAQ section (in page content) */
.fc-faqs { margin-top: 26px; }
.fc-faqs h2 { font-size: 1.3rem; margin-bottom: 6px; color: var(--fc-primary); }
.fc-faqs details { border-top: 1px solid var(--fc-line); }
.fc-faqs details:last-child { border-bottom: 1px solid var(--fc-line); }
.fc-faqs summary { cursor: pointer; font-weight: 600; padding: 13px 0; color: var(--fc-primary); }
.fc-faqs details p { margin: 0 0 13px; color: #334155; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fc-tool *, .fc-tool *::before, .fc-tool *::after { transition-duration: .01ms !important; }
}

@media (max-width: 640px) {
  .fc-cards { grid-template-columns: 1fr; }
  .fc-grid4 { grid-template-columns: repeat(2, 1fr); }
  .fc-bar-row { grid-template-columns: 90px 1fr 90px; }
  .fc-debt-row { grid-template-columns: 1fr 1fr; }
  .fc-debt-row > input[data-k="name"] { grid-column: 1 / -1; }
  .fc-remove { grid-column: 1 / -1; width: 100%; }
  .fc-extra-wrap { margin-left: 0; width: 100%; }
  .fc-extra-wrap .fc-input-wrap { flex: 1; }
}

/* Share-result-as-image bar (v1.2.0) */
.fc-share-img {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 4px 0 20px;
}
.fc-share-img[hidden] { display: none; }
.fc-share-img-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #0f172a; color: #fff; border: 0; border-radius: 10px;
  padding: 12px 18px; font-size: .95rem; font-weight: 700; cursor: pointer;
  min-height: 44px;
}
.fc-share-img-btn:hover { background: #1e3a8a; }
.fc-share-img-btn svg { width: 18px; height: 18px; }
.fc-dl-img-btn {
  display: inline-flex; align-items: center;
  background: #fff; color: #0f172a; border: 1.5px solid #0f172a; border-radius: 10px;
  padding: 11px 16px; font-size: .95rem; font-weight: 600; cursor: pointer;
  min-height: 44px;
}
.fc-dl-img-btn:hover { background: #f1f5f9; }
.fc-share-img-note { font-size: .88rem; color: #475569; }
