/* Credit calculator page and component. */
.credit-hero { padding: 45px 0 31px; }
.credit-hero-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: center; gap: 42px; }
.credit-hero-copy { padding: 10px 0 20px; }
.credit-hero-title { max-width: 720px; margin: 15px 0 16px; font-size: clamp(40px, 5.2vw, 62px); line-height: 1.04; letter-spacing: -.065em; font-weight: 780; }
.credit-hero-title em { color: var(--green); font-style: normal; }
.credit-hero-text { max-width: 650px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.72; }
.credit-hero-meta { display: flex; flex-wrap: wrap; gap: 12px 21px; margin-top: 22px; color: #617067; font-size: 11px; }
.credit-hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.credit-hero-meta i { width: 7px; height: 7px; border-radius: 50%; background: #66a886; box-shadow: 0 0 0 4px #e5f1e9; }
.credit-hero-art { position: relative; display: grid; place-items: center; min-height: 250px; padding: 25px; overflow: hidden; border: 1px solid #e2ebe3; border-radius: 25px; background: radial-gradient(circle at 68% 28%, #e5f1e7, #f7faf7 71%); }
.credit-hero-card { width: min(100%, 330px); padding: 23px; border: 1px solid rgba(255,255,255,.95); border-radius: 19px; background: rgba(255,255,255,.92); box-shadow: 0 16px 38px rgba(25,55,39,.1); transform: rotate(-2deg); }
.credit-hero-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #728078; font-size: 10px; font-weight: 750; }
.credit-hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; color: var(--green); background: #edf6ef; font-size: 9px; }
.credit-hero-badge svg { width: 13px; height: 13px; }
.credit-hero-amount { margin: 20px 0 4px; color: var(--ink); font-size: 31px; font-weight: 800; letter-spacing: -.055em; }
.credit-hero-subtitle { color: #87938a; font-size: 10px; }
.credit-hero-bars { display: flex; height: 9px; gap: 4px; margin-top: 17px; overflow: hidden; border-radius: 99px; }
.credit-hero-bars i { display: block; border-radius: inherit; background: #23775a; }
.credit-hero-bars i:first-child { width: 62%; background: #23775a; }
.credit-hero-bars i:last-child { flex: 1; background: #d9eadc; }
.credit-hero-summary { display: flex; justify-content: space-between; gap: 15px; margin-top: 12px; color: #819087; font-size: 9px; }
.credit-page-shell { padding-bottom: 8px; }
.credit-calculator { --credit-ink: #1d2b25; --credit-muted: #718078; --credit-green: #23775a; color: var(--credit-ink); }
.credit-calculator *, .credit-calculator *::before, .credit-calculator *::after { box-sizing: border-box; }
.credit-widget-head { margin-bottom: 16px; }
.credit-widget-head h2 { margin: 5px 0 5px; font-size: clamp(22px, 2.7vw, 29px); line-height: 1.2; letter-spacing: -.045em; }
.credit-widget-head p { max-width: 760px; margin: 0; color: var(--credit-muted); font-size: 12px; line-height: 1.65; }
.credit-eyebrow { color: var(--credit-green); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.credit-layout { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr); align-items: start; gap: 15px; }
.credit-form-card, .credit-results-card, .credit-schedule { min-width: 0; padding: clamp(17px, 2.5vw, 25px); border: 1px solid #e4ebe5; border-radius: 20px; background: #fff; box-shadow: 0 13px 38px rgba(25,55,39,.045); }
.credit-card-title { margin: 0 0 16px; font-size: 15px; font-weight: 780; letter-spacing: -.025em; }
.credit-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.credit-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.credit-field > span, .credit-field-label { color: #59685f; font-size: 10px; font-weight: 760; }
.credit-field.full, .credit-field-rate { grid-column: 1 / -1; }
.credit-input, .credit-select { display: block; width: 100%; min-width: 0; height: 43px; padding: 0 11px; border: 1px solid #dce6dd; border-radius: 10px; color: #24352b; background: #fbfdfb; font: inherit; font-size: 12px; font-weight: 670; outline: none; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.credit-input:hover, .credit-select:hover { border-color: #aecbb5; background: #fff; }
.credit-input:focus, .credit-select:focus { border-color: #62a47a; box-shadow: 0 0 0 3px rgba(35,119,90,.13); background: #fff; }
.credit-input[type="date"] { color-scheme: light; }
.credit-input:disabled, .credit-select:disabled { opacity: .55; }
.credit-control-row { display: grid; grid-template-columns: minmax(0, 1fr) 125px; gap: 7px; }
.credit-control-row.rate-row { grid-template-columns: minmax(0, 1fr) 145px; }
.credit-control-row.term-row { grid-template-columns: minmax(0, 1fr) 110px; }
.credit-help { color: #87938a; font-size: 9px; line-height: 1.55; }
.credit-advanced { margin-top: 14px; border: 1px solid #e5ece5; border-radius: 12px; background: #fbfdfb; }
.credit-advanced summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; color: #42564a; cursor: pointer; list-style: none; font-size: 11px; font-weight: 780; }
.credit-advanced summary::-webkit-details-marker { display: none; }
.credit-advanced summary::after { content: "+"; display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 7px; color: var(--green); background: #eaf4ec; font-size: 16px; font-weight: 500; }
.credit-advanced[open] summary::after { content: "−"; }
.credit-advanced-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 0 13px 13px; }
.credit-advanced-note { grid-column: 1 / -1; margin: -1px 0 0; color: #87938a; font-size: 9px; line-height: 1.55; }
.credit-error { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid #c56d52; border-radius: 0 9px 9px 0; color: #8a4e3c; background: #fff5f1; font-size: 10px; line-height: 1.55; }
.credit-error[hidden], [data-credit-mode-field][hidden] { display: none !important; }
.credit-primary-result { position: relative; overflow: hidden; padding: 20px; border-radius: 16px; color: #fff; background: linear-gradient(115deg, #174e3b 0%, #23775a 100%); box-shadow: 0 12px 28px rgba(23,78,59,.14); }
.credit-primary-result::after { content: ""; position: absolute; top: -128px; right: -60px; width: 255px; height: 255px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 23px rgba(255,255,255,.025), 0 0 0 49px rgba(255,255,255,.018); pointer-events: none; }
.credit-primary-label, .credit-primary-value, .credit-primary-caption { position: relative; z-index: 1; }
.credit-primary-label { color: rgba(255,255,255,.75); font-size: 10px; font-weight: 740; letter-spacing: .035em; }
.credit-primary-value { display: block; margin-top: 7px; color: #fff; font-size: clamp(30px, 3.4vw, 43px); line-height: 1.05; font-weight: 820; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.credit-primary-caption { max-width: 440px; margin: 8px 0 0; color: rgba(255,255,255,.7); font-size: 9px; line-height: 1.5; }
.credit-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.credit-metric { min-width: 0; padding: 11px 12px; border: 1px solid #e7ede7; border-radius: 11px; background: #fbfdfb; }
.credit-metric-label { display: block; color: #839087; font-size: 9px; line-height: 1.4; }
.credit-metric-value { display: block; margin-top: 5px; color: #26382d; font-size: 13px; line-height: 1.3; font-weight: 780; letter-spacing: -.02em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.credit-metric.is-wide { grid-column: 1 / -1; }
.credit-result-note { margin: 11px 0 0; color: #87938a; font-size: 9px; line-height: 1.55; }
.credit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.credit-action { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 0 11px; border: 1px solid #dfe8e0; border-radius: 9px; color: #52695a; background: #f9fbf9; font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .15s; }
.credit-action:hover { transform: translateY(-1px); border-color: #abcab2; color: #1f694b; background: #fff; }
.credit-action:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.credit-action svg { width: 14px; height: 14px; }
.credit-schedule { margin-top: 15px; padding: 0; overflow: hidden; }
.credit-schedule-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 17px 19px 12px; }
.credit-schedule-head h3 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.credit-schedule-head span { color: #87938a; font-size: 9px; text-align: right; }
.credit-table-scroll { max-width: 100%; overflow: auto; border-top: 1px solid #edf1ed; }
.credit-table { width: 100%; min-width: 760px; border-collapse: collapse; color: #526158; font-size: 10px; font-variant-numeric: tabular-nums; }
.credit-table th { position: sticky; top: 0; z-index: 1; padding: 10px 11px; color: #728078; background: #f8faf8; text-align: right; white-space: nowrap; font-size: 9px; font-weight: 760; }
.credit-table td { padding: 9px 11px; border-top: 1px solid #f0f3f0; text-align: right; white-space: nowrap; }
.credit-table th:first-child, .credit-table td:first-child { padding-left: 17px; text-align: center; }
.credit-table tbody tr:hover { background: #f8fbf8; }
.credit-number-cell { color: #849087; }
.credit-table td:nth-child(3) { color: #1e694b; font-weight: 760; }
.credit-table td:last-child { color: #293a30; font-weight: 680; }
.credit-calculator .note-box { margin-top: 13px; }
.credit-toast { position: fixed; z-index: 100; left: 50%; bottom: 23px; max-width: calc(100vw - 32px); padding: 11px 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; color: #fff; background: #183f31; box-shadow: 0 10px 30px rgba(17,44,32,.25); font-size: 11px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 9px); transition: opacity .18s ease, transform .18s ease; }
.credit-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.credit-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.credit-info-card { padding: 21px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.credit-info-number { display: grid; place-items: center; width: 33px; height: 33px; margin-bottom: 12px; border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 800; }
.credit-info-card h3 { margin: 0 0 7px; font-size: 14px; letter-spacing: -.02em; }
.credit-info-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

@media (max-width: 900px) {
  .credit-hero-inner { grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; }
  .credit-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, .95fr); gap: 11px; }
  .credit-control-row.rate-row { grid-template-columns: minmax(0, 1fr) 128px; }
}
@media (max-width: 760px) {
  .credit-hero { padding: 37px 0 23px; }
  .credit-hero-inner { display: block; }
  .credit-hero-copy { padding: 0; }
  .credit-hero-title { font-size: clamp(38px, 10vw, 54px); }
  .credit-hero-text { font-size: 14px; }
  .credit-hero-art { display: none; }
  .credit-layout { grid-template-columns: 1fr; }
  .credit-form-card, .credit-results-card { padding: 17px 14px; }
  .credit-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .credit-fields-grid, .credit-advanced-content { grid-template-columns: 1fr; }
  .credit-field.full, .credit-advanced-note { grid-column: auto; }
  .credit-control-row { grid-template-columns: minmax(0, 1fr) 108px; }
  .credit-control-row.term-row { grid-template-columns: minmax(0, 1fr) 98px; }
  .credit-control-row.rate-row { grid-template-columns: minmax(0, 1fr) 117px; }
  .credit-primary-result { padding: 17px 15px; }
  .credit-metric { padding: 10px; }
  .credit-metric-value { font-size: 12px; }
  .credit-actions { display: grid; grid-template-columns: 1fr; }
  .credit-action { width: 100%; }
  .credit-schedule-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .credit-schedule-head span { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .credit-input, .credit-select, .credit-action, .credit-toast { transition: none; }
  .credit-action:hover { transform: none; }
}
