/* Final QA v2: scoped fixes for reproduced contrast defects and existing budget tables. */
#knowledge-search, #downloads-search { background:#fff; color:#202124; border:1px solid #767676; color-scheme:light; }
#knowledge-search::placeholder, #downloads-search::placeholder { color:#595959; opacity:1; }
body:has(.bm-dj-profile-hero) .section-contrast .card > p[style*="var(--accent)"] { color:#ffb4ab !important; }
.bm-budget-tool { min-width:0; }
.bm-budget-tool .bm-budget-instructions, .bm-budget-tool .bm-budget-error { text-align:left; }
.bm-budget-table { width:100%; border-collapse:collapse; table-layout:fixed; color:inherit; }
.bm-budget-table caption { margin-bottom:1rem; text-align:left; font-weight:700; }
.bm-budget-table th, .bm-budget-table td { padding:.65rem .45rem; text-align:left; vertical-align:top; border-bottom:1px solid #777; overflow-wrap:anywhere; }
.bm-budget-table th:first-child { width:24%; }
.bm-budget-tool input { width:100%; min-width:0; max-width:100%; box-sizing:border-box; background:#fff; color:#202124; border:1px solid #767676; border-radius:6px; padding:.65rem; font:inherit; }
.bm-budget-tool input:focus-visible { outline:3px solid #ffb4ab; outline-offset:2px; }
.bm-budget-tool input[aria-invalid="true"] { border:2px solid #ffb4ab; }
.bm-budget-error { color:#ffb4ab; }
.bm-budget-error:empty { margin:0; }
.bm-budget-cell-label { display:none; }
.bm-budget-results { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr)); gap:1rem; margin-top:1.5rem; }
.bm-budget-results > div { padding:1rem; border:1px solid #777; border-radius:6px; min-width:0; }
.bm-budget-results dt { font-weight:700; }
.bm-budget-results dd { margin:.4rem 0 0; overflow-wrap:anywhere; }
@media (max-width:700px) {
 .bm-budget-table, .bm-budget-table tbody { display:block; }
 .bm-budget-table caption { display:block; width:100%; box-sizing:border-box; }
 .bm-budget-table thead { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
 .bm-budget-table tr { display:block; margin:0 0 1rem; border:1px solid #777; border-radius:6px; padding:.6rem; }
 .bm-budget-table th, .bm-budget-table td { display:block; width:auto !important; border:0; padding:.4rem; }
 .bm-budget-cell-label { display:block; margin-bottom:.3rem; font-weight:600; }
}
@media print {
 body:has(.bm-budget-tool) :is(h1,h2,h3,.eyebrow,.breadcrumbs a,.breadcrumbs span,.hero p) { color:#000 !important; }
 .template-shell:has(.bm-budget-tool) .template-head :is(h3,p,span) { color:#000 !important; }
 .bm-budget-tool input { border:1px solid #666; color:#000; background:#fff; }
 .bm-budget-tool, .bm-budget-error { color:#000; }
 .bm-budget-table tr, .bm-budget-results > div { break-inside:avoid; }
}
