/* Credit workspace: amber liabilities, mint repaid principal, existing finance typography. */
.credit-workspace { --credit:var(--total); grid-column:1/-1; min-width:0; padding:24px; border:1px solid var(--line-strong); border-radius:16px; background:var(--surface); color:var(--ink); }
.credit-dashboard-shortcut {grid-column:1/-1;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;min-width:0;padding:16px 18px;border:1px solid color-mix(in srgb,var(--total) 28%,var(--line));border-radius:var(--radius);background:linear-gradient(105deg,color-mix(in srgb,var(--total) 6%,var(--surface)),var(--surface) 48%);color:var(--ink);}
.credit-shortcut-icon {display:grid;place-items:center;width:42px;height:42px;border:1px solid color-mix(in srgb,var(--total) 30%,var(--line));border-radius:10px;background:var(--total-dim);color:var(--total);}
.credit-shortcut-icon svg {width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.credit-shortcut-copy {min-width:0;}.credit-shortcut-copy h2 {margin:1px 0 2px;font:600 clamp(16px,1.6vw,19px)/1.35 var(--font-display);letter-spacing:-.035em;text-wrap:balance;}.credit-shortcut-copy p {margin:0;color:var(--muted);font-size:12px;line-height:1.55;overflow-wrap:anywhere;}
.credit-dashboard-shortcut>.btn {width:auto;min-height:44px;white-space:nowrap;}
.credit-heading, .credit-heading-title, .credit-card-main, .credit-card-actions, .credit-dialog-head, .credit-dialog-actions { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.credit-heading-title { justify-content:flex-start; gap:12px; }
.credit-heading-title {min-width:0;flex:1;}.credit-heading-title svg {flex-shrink:0;}
.credit-workspace .btn,.credit-dialog .btn {width:auto;flex:0 0 auto;}
.credit-heading svg, .credit-empty svg { width:24px; height:24px; fill:none; stroke:var(--credit); stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.credit-eyebrow { color:var(--muted); font:500 11px/1.6 var(--font); }
.credit-heading h2 { font:600 clamp(18px,2vw,23px)/1.3 var(--font-display); letter-spacing:-.045em; margin:2px 0 0; }
.credit-empty { display:flex; align-items:center; gap:18px; padding:24px 0 6px; }
.credit-empty-icon { border:1px solid var(--line); border-radius:12px; padding:14px; background:var(--surface-inset); flex-shrink:0; }
.credit-empty h3 { margin:0 0 6px; font-size:15px; }
.credit-empty p { margin:0; color:var(--muted); font-size:13px; line-height:1.65; max-width:65ch; }
.credit-pill { margin-left:auto; flex-shrink:0; font-size:11px; padding:7px 10px; color:var(--invest); border:1px solid color-mix(in srgb,var(--invest) 25%,var(--line)); border-radius:30px; }
.credit-footnote, .credit-subtle { color:var(--muted); font-size:12px; line-height:1.6; }
.credit-footnote { margin:16px 0 0; }
.credit-status { color:var(--spending); font-size:13px; line-height:1.6; margin:12px 0; }
.credit-status:empty { display:none; }
.credit-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:24px 0; border-block:1px solid var(--line); }
.credit-metrics>div { padding:18px; border-right:1px solid var(--line); }
.credit-metrics>div:first-child { padding-left:0; }.credit-metrics>div:last-child { border:0; }
.credit-metrics span,.credit-metrics small { display:block;color:var(--muted);font-size:12px; }
.credit-metrics strong { display:block; font:500 clamp(19px,2.4vw,28px)/1.5 var(--font-display); letter-spacing:-.04em; overflow-wrap:anywhere; }
.credit-metrics strong small { display:inline;margin-left:4px; }.credit-debt {color:var(--total);}
.credit-list { display:grid;gap:14px; }
.credit-card { min-width:0;padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--surface-inset); }
.credit-card h3 {font:600 17px/1.4 var(--font-display);margin:4px 0;letter-spacing:-.035em;}
.credit-card p {margin:6px 0;color:var(--muted);font-size:12px;}
.credit-card-balance {text-align:right;}.credit-card-balance strong {display:block;color:var(--total);font:500 24px/1.4 var(--font-display);letter-spacing:-.045em;}
.credit-card-balance span,.credit-card-actions>span {font-size:11px;color:var(--muted);}
.credit-repaid-track {height:4px;background:var(--line);border-radius:4px;overflow:hidden;margin:18px 0 14px;}.credit-repaid-track i {display:block;height:100%;background:var(--invest);}
.credit-workspace details,.credit-preview details {margin-top:14px;border-top:1px solid var(--line);padding-top:12px;}
.credit-workspace summary,.credit-preview summary {cursor:pointer;color:var(--accent);font-size:12px;padding:6px 0;}
.credit-dialog {width:min(1020px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line-strong);border-radius:18px;background:var(--surface);color:var(--ink);box-shadow:0 30px 100px #0008;}
.credit-dialog::backdrop {background:#040a14b8;backdrop-filter:blur(5px);}
.credit-dialog-head {padding:24px 28px;border-bottom:1px solid var(--line);align-items:flex-start;position:sticky;top:0;z-index:2;background:var(--surface);}
.credit-dialog {scroll-padding-top:145px;}
.credit-net-strip[hidden],.obs-debt-note[hidden] {display:none;}
:root[data-theme="light"] .credit-field input {color-scheme:light;}
.credit-dialog-head h2 {margin:5px 0;font:600 25px/1.3 var(--font-display);letter-spacing:-.05em;}
.credit-dialog-head p {margin:5px 0 0;color:var(--muted);font-size:13px;line-height:1.6;}
.credit-dialog .credit-close {min-width:44px;flex-shrink:0;font-size:23px;padding:6px;}
.credit-composer {display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);}
.credit-inputs {padding:24px 28px;}.credit-inputs fieldset {border:0;padding:0;margin:0 0 24px;min-width:0;}.credit-inputs legend {font-size:14px;font-weight:600;margin-bottom:16px;}
.credit-two,.credit-three {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}.credit-three {grid-template-columns:repeat(3,minmax(0,1fr));}
.credit-field {display:flex;flex-direction:column;gap:7px;margin-bottom:15px;min-width:0;}.credit-field label {font-size:12px;color:var(--muted);font-weight:500;}
.credit-field input,.credit-field select {width:100%;min-width:0;min-height:44px;border:1px solid var(--field-border);border-radius:7px;background:var(--surface-inset);color:var(--ink);font:500 14px var(--font);padding:10px 12px;}
.credit-field input:read-only {opacity:.7;}.credit-field small {font-size:11px;color:var(--muted);line-height:1.5;}
.credit-check {display:flex;gap:10px;font-size:12px;align-items:flex-start;line-height:1.6;}.credit-check input {width:18px;height:18px;flex-shrink:0;margin-top:2px;}.credit-check[hidden],.credit-field[hidden] {display:none;}
.credit-inputs .credit-funding-choice {margin:4px 0 0;padding:0;border:0;}.credit-inputs .credit-funding-choice[hidden]{display:none;}.credit-inputs .credit-funding-choice>legend{margin-bottom:10px;font-size:12px;color:var(--muted);font-weight:500;}
.credit-funding-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.credit-funding-option {display:flex;align-items:flex-start;gap:10px;min-width:0;min-height:78px;padding:12px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface-inset);cursor:pointer;transition:border-color .16s ease,background-color .16s ease;}
.credit-funding-option:hover {background:var(--surface-hover);}.credit-funding-option:has(input:checked){border-color:var(--cash);background:color-mix(in srgb,var(--cash) 8%,var(--surface-inset));}.credit-funding-option:focus-within{outline:2px solid var(--accent);outline-offset:2px;}
.credit-funding-option input {width:18px;height:18px;flex:0 0 auto;margin:2px 0 0;accent-color:var(--cash);}.credit-funding-option span{min-width:0;}.credit-funding-option strong,.credit-funding-option small{display:block;}.credit-funding-option strong{color:var(--ink);font-size:12px;line-height:1.45;}.credit-funding-option small{margin-top:3px;color:var(--muted);font-size:11px;line-height:1.45;}
.credit-impact-live {margin:10px 0 0;padding:11px 12px;border-left:2px solid var(--cash);background:color-mix(in srgb,var(--cash) 6%,transparent);color:var(--muted);font-size:11px;line-height:1.6;}
.credit-explanation {font-size:12px;line-height:1.7;color:var(--muted);margin:12px 0;}
.credit-preview {min-width:0;padding:26px;background:var(--surface-inset);border-left:1px solid var(--line);}
.credit-preview-amount {display:block;font:500 clamp(27px,3vw,40px)/1.3 var(--font-display);letter-spacing:-.06em;color:var(--total);margin:8px 0;overflow-wrap:anywhere;}
.credit-preview-placeholder {padding:38px 0;}.credit-preview-placeholder svg {width:36px;height:36px;fill:none;stroke:var(--total);stroke-width:1.4;}.credit-preview-placeholder h3 {font:500 20px/1.4 var(--font-display);}.credit-preview-placeholder p {font-size:13px;color:var(--muted);line-height:1.6;}
.credit-curve {width:100%;height:auto;margin-top:24px;}.credit-curve polyline {fill:none;stroke:var(--total);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}.credit-curve-grid {fill:none;stroke:var(--line);stroke-width:1;stroke-dasharray:3 5;}
.credit-preview-dates {display:flex;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted);}
.credit-split {display:flex;height:6px;gap:3px;margin:22px 0;border-radius:3px;overflow:hidden;}.credit-split i:first-child {background:var(--invest);}.credit-split i:last-child {background:var(--total);}
.credit-preview-metrics {margin:0;}.credit-preview-metrics>div {display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px;}.credit-preview-metrics dt {color:var(--muted);}.credit-preview-metrics dd {margin:0;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums;}
.credit-text-button {padding:10px 0;min-height:44px;border:0;background:transparent;color:var(--accent);font:500 12px var(--font);text-decoration:underline;text-underline-offset:3px;cursor:pointer;text-align:left;}
.credit-dialog-actions {padding:18px 28px;border-top:1px solid var(--line);justify-content:flex-end;background:var(--surface);}
.credit-dialog form>.credit-status {padding:0 28px;}.credit-payment-body {padding:24px 28px;}.credit-payment-body>.credit-explanation:first-child {margin-top:0;}
.credit-table-scroll {overflow:auto;max-height:300px;max-width:100%;border:1px solid var(--line);border-radius:6px;margin-top:12px;}
.credit-table {border-collapse:collapse;width:100%;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap;}.credit-table caption {text-align:left;color:var(--muted);padding:10px;white-space:normal;}.credit-table th,.credit-table td {padding:10px;text-align:right;border-bottom:1px solid var(--line);}.credit-table th:first-child {text-align:left;}.credit-table th {font-weight:500;color:var(--muted);}.credit-table thead {position:sticky;top:0;background:var(--surface);}
.credit-history {padding:0;list-style:none;}.credit-history li {display:flex;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--line);font-size:12px;}.credit-history small {color:var(--muted);}.credit-detail-actions {display:flex;gap:18px;}
.credit-net-strip {display:flex;gap:10px 20px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);}.credit-net-strip strong {color:var(--ink);font-variant-numeric:tabular-nums;}
.obs-debt-note {font-size:11px;color:var(--obs-muted);margin-top:12px!important;}.obs-debt-note strong {color:var(--obs-gold);}
@media(max-width:760px){.credit-workspace{padding:18px;}.credit-pill{display:none;}.credit-composer{grid-template-columns:1fr;}.credit-preview{border-left:0;border-top:1px solid var(--line);}.credit-heading{align-items:flex-start;flex-wrap:wrap;gap:12px;}.credit-dialog-head,.credit-inputs,.credit-preview,.credit-payment-body{padding:20px;}.credit-dialog-head h2{font-size:22px;}.credit-dialog-actions{padding:16px 20px;}.credit-card-main{gap:12px;}.credit-metrics>div{padding:12px;}.credit-metrics{grid-template-columns:1fr;}.credit-metrics>div{border-right:0;border-bottom:1px solid var(--line);padding:12px 0;}.credit-card-actions{flex-wrap:wrap;}.credit-card-balance strong{font-size:20px;}.credit-three,.credit-funding-options{grid-template-columns:1fr;}}
@media(max-width:420px){.credit-two{grid-template-columns:1fr;gap:0;}.credit-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);}.credit-card-main{flex-direction:column;align-items:flex-start;}.credit-card-balance{text-align:left;}.credit-empty-icon{display:none;}.credit-dialog-actions .btn{font-size:12px;padding-inline:10px;}}
@media(max-width:760px){.credit-heading-title{flex-basis:100%;}.credit-heading>.btn{max-width:100%;}.credit-dialog{scroll-padding-top:190px;}}
@media(max-width:620px){.credit-dashboard-shortcut{grid-template-columns:auto minmax(0,1fr);padding:15px;}.credit-dashboard-shortcut>.btn{grid-column:1/-1;width:100%;}.credit-shortcut-icon{align-self:start;}}
