.budget-instructions { margin-bottom: 1.5rem; line-height: 1.65; color: #334155; }
.budget-instructions h2 { font-size: 1.35rem; color: #163a32; }
.budget-instructions p + p { margin-top: .8rem; }
.budget-category summary { cursor: pointer; font-weight: 700; color: #163a32; padding: .25rem 0; }
.budget-category summary::marker { color: #047857; }
.budget-category .category-total { float: right; margin-left: .6rem; font-size: .9rem; font-variant-numeric: tabular-nums; }
.budget-category .category-help { margin: 1rem 0 .5rem; font-size: .9rem; line-height: 1.6; color: #475569; }
.budget-category .input-row { gap: 1rem; }
.budget-category input { font-size: 16px; }
.add-budget-line, .remove-budget-line { border: 1px solid #94a3b8; border-radius: 6px; background: white; padding: .65rem .8rem; margin-top: .8rem; color: #334155; cursor: pointer; }
.budget-category summary:focus-visible, #budgetInputs button:focus-visible, #budgetInputs input:focus-visible, #budgetInputs select:focus-visible { outline: 3px solid #047857; outline-offset: 3px; }
.custom-budget-row { border-top: 1px solid #cbd5e1; padding: 1rem 0; display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; }
.custom-budget-row > div { flex: 1 1 160px; min-width: 0; }
.custom-budget-row label { display: block; font-size: .85rem; color: #475569; }
.custom-budget-row input, .custom-budget-row select { width: 100%; padding: .6rem; border: 1px solid #94a3b8; border-radius: 6px; background: white; color: #1e293b; }
.custom-budget-row .remove-budget-line { margin: 0; }
#budgetError { background: #fff1f2; border-left: 4px solid #be123c; color: #9f1239; padding: 1rem; }
.budget-result-note { line-height: 1.65; color: #475569; margin: 1rem 0 1.5rem; }
.budget-breakdown { width: 100%; border-collapse: collapse; margin: 1rem 0 2rem; font-size: .95rem; }
.budget-breakdown caption { text-align: left; font-size: .85rem; color: #475569; margin-bottom: .75rem; }
.budget-breakdown th, .budget-breakdown td { padding: .7rem .45rem; border-bottom: 1px solid #cbd5e1; text-align: right; font-variant-numeric: tabular-nums; }
.budget-breakdown th:first-child { text-align: left; }
.budget-breakdown tbody th { font-weight: 500; }
.budget-breakdown tr:last-child { background: #f1f5f9; }
#recommendations li { line-height: 1.65; margin: .75rem 0; }
.budget-coaching { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 12px; padding: 1.5rem; margin: 1.75rem 0; color: #164e3e; }
.budget-coaching p { line-height: 1.65; margin: .75rem 0; }
.budget-coaching .cta-btn { margin: .5rem 0 0; border: 1px solid #047857; }
#results { scroll-margin-top: 100px; }
@media (max-width: 600px) {
  .budget-category .category-total { float: none; display: block; margin: .25rem 0 0 1rem; }
  .budget-breakdown { font-size: .8rem; table-layout: fixed; }
  .budget-breakdown th, .budget-breakdown td { padding: .65rem .3rem; overflow-wrap: anywhere; }
  .budget-breakdown th:first-child { width: 42%; }
  .budget-coaching { padding: 1rem; }
  .budget-coaching .cta-btn { display: block; text-align: center; }
}
