.cost-layout { display: grid; gap: var(--sp-7); align-items: start; }
.cost-form, .cost-output { min-width: 0; }
.cost-form__intro { margin-bottom: var(--sp-5); }
.cost-fields { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1rem, 3vw, 2rem); margin-bottom: var(--sp-5); }
.cost-fields > p { margin-bottom: var(--sp-5); }
.cost-field { margin-bottom: var(--sp-5); }
.cost-field:last-child { margin-bottom: 0; }
.cost-field label { display: block; font-size: 1rem; font-weight: 700; color: var(--text-strong); margin-bottom: var(--sp-2); }
.cost-field__input { display: flex; align-items: center; gap: .6rem; }
.cost-field__input input { box-sizing: border-box; min-width: 0; width: min(100%, 20rem); height: 48px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: 1.1rem; font-variant-numeric: tabular-nums; padding: .4rem .75rem; }
.cost-field__input input[aria-invalid="true"] { border-color: var(--error); }
.cost-field__input span { flex: none; }
.cost-field__help, .cost-field__error { margin: .3rem 0 0; font-size: 14px; line-height: 1.5; }
.cost-field__help { color: var(--text-muted); }
.cost-field__error { color: var(--error); }
.cost-field__error[hidden], #cost-next[hidden], #cost-detail[hidden], #cost-total[hidden], #cost-ad-disclosure[hidden] { display: none; }
.cost-mode-toggle { display: inline-block; min-height: 56px; border: 0; padding: .5rem 0; background: none; color: var(--link); font: inherit; text-decoration: underline; text-underline-offset: .17em; cursor: pointer; text-align: left; }
.cost-output { display: grid; gap: var(--sp-5); }
.cost-output .result { gap: var(--sp-5); }
.cost-result-tool { margin: 0; font-size: var(--fs-h2); color: var(--text-strong); }
.cost-input-summary { padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-alt); }
.cost-input-summary h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-small); color: var(--text-muted); }
.cost-input-summary__list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem var(--sp-4); margin: 0; font-size: var(--fs-small); }
.cost-input-summary__list dt { color: var(--text-muted); }
.cost-input-summary__list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.cost-retry { justify-self: start; border: 1px solid var(--green-700); color: var(--green-700); background: var(--surface); cursor: pointer; }
.cost-empty { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-alt); padding: var(--sp-6); margin: 0; }
.cost-output .result__figure { overflow-wrap: anywhere; }
.cost-period { margin-right: .3em; }
.cost-amount { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.cost-decade { display: block; margin-top: .5rem; }
.cost-chart, .cost-tax-note { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: var(--sp-5); }
.cost-chart__row { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(3rem, 1.5fr) minmax(0, 1fr); gap: .5rem; align-items: center; padding: .35rem 0; font-size: .875rem; }
.cost-chart__row strong { min-width: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cost-chart__track { display: block; height: .8rem; background: var(--green-50); border-radius: 99px; overflow: hidden; }
.cost-chart__fill { display: block; height: 100%; border-radius: 99px; background: var(--green-700); }
.cost-chart__fill--insurance { background: #247d58; }
.cost-chart__fill--utilities { background: #348b65; }
.cost-chart__fill--travel { background: #419a73; }
.cost-chart__fill--management { background: #54a981; }
.cost-chart__fill--repairs { background: #69b58e; }
.cost-chart__fill--other { background: #7cc19b; }
.cost-tax-note p { margin-top: var(--sp-3); }
.cost-tax-caveat { font-size: 14px; }
.cost-next-inner > p { margin-bottom: var(--sp-5); }
.cost-next-inner .offers { margin-bottom: var(--sp-5); }
@media (min-width: 64rem) { .cost-layout { grid-template-columns: minmax(0, 1fr) minmax(23rem, .86fr); } .cost-output { position: sticky; top: 1rem; } }
@media (max-width: 40rem) { .cost-output .result__figure { font-size: 1.5rem; } .cost-chart__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cost-chart__track { grid-column: 1 / -1; grid-row: 2; } }
