.va-back { color: var(--muted); display: inline-block; font-size: .86rem; font-weight: 650; margin-bottom: 24px; }
.va-back:hover, .va-rules a:hover { color: var(--ink); }
.va-workspace { display: grid; grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); gap: 18px; align-items: start; }
.va-workspace > *, .va-rules { min-width: 0; }
.va-workspace h2, .va-rules h2 { font-size: clamp(1.35rem, 2.7vw, 2rem); line-height: 1.12; }
.va-workspace form { display: grid; gap: 12px; margin-top: 20px; }
.va-workspace form .fine-print { margin: 0; }
.va-workspace button { justify-self: start; margin-top: 4px; }
.va-fields, .va-borrower, .va-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.va-fields p { grid-column: 1 / -1; }
.va-borrower { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; min-width: 0; padding: 10px; }
.va-borrower legend { padding-inline: 6px; color: var(--mint); font-weight: 680; font-size: .85rem; }
.va-borrower label:only-of-type, .va-borrower label[data-role-field] { grid-column: 1 / -1; }
.va-workspace summary, .va-rules summary { color: var(--ink); cursor: pointer; font-size: .88rem; font-weight: 680; }
.va-workspace details label { margin-top: 10px; }
.va-workspace [hidden], .va-rules [hidden] { display: none; }
.va-total { color: var(--mint); font-size: clamp(2.6rem, 6vw, 4.45rem); font-weight: 750; letter-spacing: -.065em; line-height: 1; margin: 14px 0 7px; overflow-wrap: anywhere; }
.va-result #va-summary { min-height: 2.6em; color: var(--muted); }
.va-metrics { margin-block: 15px 24px; }
.va-metrics > div { border: 1px solid var(--line); background: rgba(12, 23, 36, .6); border-radius: 8px; padding: 10px; }
.va-metrics dt { color: var(--muted); font-size: .79rem; }
.va-metrics dd { margin: 2px 0 0; color: var(--ink); font-size: .97rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.va-result h3 { margin: 0; }
.va-table-scroll { overflow-x: auto; margin-block: 12px 16px; }
.va-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.va-table th, .va-table td { padding: 8px 5px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.va-table th:first-child { text-align: left; }
.va-table thead th, .va-table tbody th span { color: var(--muted); font-size: .76rem; }
.va-table tbody th span { display: block; font-weight: 400; white-space: normal; }
.va-bar { width: 100%; height: 8px; border-radius: 5px; background: #79aaff; overflow: hidden; }
.va-bar span { display: block; height: 100%; background: var(--mint); }
.va-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 5px; color: var(--muted); font-size: .75rem; }
.va-legend span::before { content: ''; display: inline-block; width: .6em; height: .6em; margin-right: .35em; border-radius: 50%; background: var(--mint); }
.va-legend span + span::before { background: #79aaff; }
.va-rules { margin-top: 18px; }
.va-rules details { border-bottom: 1px solid var(--line); padding: 13px 0; }
.va-rules details p { color: var(--muted); margin: 8px 0 0; max-width: 90ch; }
.va-rules a { color: var(--mint); text-decoration: underline; text-underline-offset: .15em; }
.va-rules > .fine-print:last-child { margin-bottom: 0; }
@media (max-width: 800px) { .va-workspace { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .va-fields, .va-borrower { grid-template-columns: 1fr; } }
.va-workspace form { container-type:inline-size; }
@container (max-width:325px) { .va-fields, .va-borrower { grid-template-columns:minmax(0,1fr); } }
