.credit { padding-block: clamp(32px, 6vw, 72px); }
.credit-intro h1 { font-size: clamp(42px, 7vw, 82px); margin: 14px 0 20px; }
.demo-note { margin-top: 22px; border-left: 3px solid var(--accent); padding: 10px 14px; color: var(--dim); background: var(--panel); }
.case-picker { display: grid; gap: 8px; max-width: 440px; margin-block: 26px; }
.credit-layout, .credit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.credit-card { padding: clamp(16px, 3vw, 30px); min-width: 0; }
.credit-card h2 { font-size: clamp(25px, 3vw, 36px); margin-block: 8px 12px; }
.credit-card h3 { margin-top: 22px; }
.credit label { display: grid; align-content: start; gap: 7px; font-size: .9rem; color: var(--dim); }
.credit input, .credit select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid #557078; border-radius: 7px; min-width: 0; width: 100%; padding: 10px 12px; }
.credit :is(input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.credit-form { margin-block: 18px; }
.credit-facts { display: grid; gap: 0; margin: 14px 0; }
.credit-facts div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 10px; padding-block: 8px; border-bottom: 1px solid var(--line); }
.credit-facts dt, .credit-metric span { color: var(--dim); font-size: .86rem; }
.credit-facts dd { margin: 0; overflow-wrap: anywhere; }
.credit details { margin-block: 14px; }
.credit summary { cursor: pointer; color: var(--accent); }
.credit pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; background: var(--bg); font-size: .8rem; }
.credit-results { margin-top: 16px; }
.credit-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.credit-metric { display: grid; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.credit-metric strong { font-size: 1.25rem; }
.credit-metric strong[data-negative] { color: var(--danger); }
#findings { padding-inline-start: 20px; line-height: 1.55; }
#calculation-status:not(:empty) { color: var(--amber); margin-bottom: 10px; }
@media (max-width: 760px) { .credit-layout { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .credit-form { grid-template-columns: 1fr; } .credit .credit-facts div { grid-template-columns: 1fr; gap: 4px; } }
.credit-history { margin: 22px 0; border-block: 1px solid var(--line); padding-block: 16px; }
.credit-history h3 { margin: 0 0 8px; }
.credit-history-unit { color: var(--dim); font-size: .85rem; margin-top: 15px; }
.credit-history-chart { --plot-height: 120px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding-top: 12px; }
.credit-history-axis { height: var(--plot-height); display: flex; flex-direction: column; justify-content: space-between; font-size: .7rem; color: var(--dim); line-height: 1; }
.credit-history-bars { display: grid; grid-template-columns: repeat(var(--history-months, 12), minmax(0, 1fr)); background: repeating-linear-gradient(to top, var(--line) 0 1px, transparent 1px 33.333%); background-size: 100% var(--plot-height); background-repeat: no-repeat; }
.credit-history-column { display: grid; justify-items: center; grid-template-rows: var(--plot-height) auto; min-width: 0; }
.credit-history-mark { display: block; align-self: end; width: min(68%, 26px); min-width: 4px; height: var(--bar-height, 4px); border-radius: 4px 4px 0 0; background: var(--amber); }
.credit-history-mark[data-state="current"] { background: var(--accent); }
.credit-history-mark[data-state="missing"] { background: transparent; border: 1px dashed var(--dim); }
.credit-history-month { padding-top: 4px; color: var(--dim); font-size: clamp(.57rem, 1.1vw, .78rem); }
.credit-history-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 10px; color: var(--dim); font-size: .8rem; }
.credit-history-legend i { display: inline-block; width: .7rem; height: .55rem; margin-right: .3rem; }
.history-key-current { background: var(--accent); }
.history-key-late { background: var(--amber); }
.history-key-missing { border: 1px dashed var(--dim); }
.credit-history-table { margin-top: 8px; border-collapse: collapse; }
.credit-history-table :is(th, td) { border-bottom: 1px solid var(--line); padding: 5px 12px 5px 0; text-align: left; }
.credit-rating h3 { margin-bottom: 9px; }
.credit-rating-badge { display: inline-block; padding: 2px 10px; border: 1px solid currentColor; border-radius: 999px; margin-right: 4px; }
.credit-rating-badge[data-level="low"] { color: var(--accent); }
.credit-rating-badge[data-level="medium"] { color: var(--amber); }
.credit-rating-badge[data-level="high"] { color: var(--danger); }
#rating-factors { padding-inline-start: 20px; line-height: 1.55; }
