.cost-workspace .cost-tabs{display:flex;gap:8px;flex-wrap:wrap;padding:16px 0}
.cost-workspace .cost-tabs .selected{background:#153c66;color:white}
.cost-workspace .cost-stats{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}
.cost-workspace .cost-stats span{padding:12px 18px;background:#eef5fa;border:1px solid #b8cbdc;border-radius:8px}
.cost-workspace table th,.cost-workspace table td,.cost-detail table th,.cost-detail table td{border:1px solid #a9bbc9;vertical-align:top}
.cost-workspace .cost-warning,.cost-detail .cost-warning{color:#8d4900;background:#fff4df;border:1px solid #e8c68a;border-radius:6px;padding:8px;display:block}
.cost-detail .cost-total{font-size:1.15rem;background:#eef5fa;padding:16px;border-radius:8px}
.cost-detail table{width:100%;min-width:0;table-layout:fixed}
.cost-detail th,.cost-detail td{white-space:normal;overflow-wrap:anywhere}
.cost-detail th:first-child{width:42%}
.cost-detail .cost-formula{direction:ltr;text-align:left;unicode-bidi:isolate;white-space:normal;overflow-wrap:anywhere;font-size:.85rem}
.cost-detail .field-grid{max-height:52vh;overflow:auto;padding:8px}
.cost-workspace .cost-search{max-width:600px;margin:10px 0;display:block}
.cost-detail input[type=number]{direction:ltr;text-align:right}
.cost-workspace .cost-muted{color:#526478;font-size:.85rem}
.cost-profit-guide{background:#eef5fa;border:1px solid #b8cbdc;border-radius:8px;padding:12px;line-height:1.9}
.cost-workspace table td{white-space:normal;min-width:0;overflow-wrap:anywhere}
.cost-loss{color:#b42318;font-weight:700}
.cost-profit{color:#176341;font-weight:700}
.cost-profit-detail{padding:12px 0;border-bottom:2px solid #a9bbc9;margin-bottom:18px}
.cost-profit-detail table th:first-child{width:auto}
.cost-workspace #cost-results table{table-layout:fixed;width:100%;min-width:0}
.cost-workspace #cost-results th{white-space:normal;overflow-wrap:break-word}
.cost-workspace #cost-results th:first-child{width:28%}
.cost-workspace,.cost-detail{container-type:inline-size;min-width:0}
.cost-compact{width:100%;min-width:0}
.cost-workspace .cost-compact table,.cost-detail .cost-compact table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse}
.cost-workspace .cost-compact th,.cost-workspace .cost-compact td,.cost-detail .cost-compact th,.cost-detail .cost-compact td{min-width:0;padding:9px 7px;white-space:normal;overflow-wrap:anywhere;font-size:13px}
.cost-detail .cost-compact th:first-child{width:28%}
.cost-metric{display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px 7px;line-height:1.8}
.cost-metric>span{font-size:11px;color:#526478}
.cost-metric strong{font-size:13px;font-weight:600}
.cost-row-action button{padding:4px 0;font-size:12px}
.cost-compact td:last-child{background:#f0f7f2}
.cost-reviewed{display:block;color:#176341;background:#edf7ef;padding:6px;border-radius:5px;margin:5px 0}
.cost-builder{min-width:0}
.cost-builder h3{overflow-wrap:anywhere}
.cost-product-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:220px;overflow:auto;border:1px solid #a9bbc9;padding:10px;margin:10px 0}
.cost-product-option{border-bottom:1px solid #d3dee5;padding:5px;min-width:0;overflow-wrap:anywhere}.cost-product-option small{display:block;color:#425565}.cost-product-option button{padding:2px 6px}
.cost-product-choices label{display:flex;align-items:center;gap:7px;font-size:13px;overflow-wrap:anywhere}
.cost-product-choices input{width:auto;flex:none}
.cost-product-choices [hidden]{display:none}
.cost-build-row{border:1px solid #93a8bc;border-radius:7px;padding:10px;margin:10px 0}
.cost-build-heading{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}
.cost-build-heading small{color:#526478}
.cost-build-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cost-build-grid .wide{grid-column:1/-1}
.cost-build-grid label,.cost-builder input,.cost-builder select{min-width:0;max-width:100%}
.cost-build-total{background:#eef5fa;border-width:2px}
@media(max-width:650px){.cost-build-grid,.cost-product-choices{grid-template-columns:1fr}}
@container (max-width:760px){
 .cost-workspace .cost-compact table,.cost-detail .cost-compact table,.cost-compact tbody{display:block;width:100%}
 .cost-compact thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .cost-compact tbody{display:grid;gap:12px}
 .cost-compact tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #a9bbc9;border-radius:8px;overflow:hidden;background:white}
 .cost-workspace .cost-compact td,.cost-detail .cost-compact td{display:block;min-width:0;border:0;border-bottom:1px solid #d4dfe7;padding:9px 10px}
 .cost-compact td:before{content:attr(data-label);display:block;font-weight:700;font-size:12px;color:#344957;margin-bottom:5px}
 .cost-compact td:first-child,.cost-compact td:last-child{grid-column:1/-1}
 .cost-compact td:first-child{background:#eef5fa}
 .cost-compact td:first-child:before{display:none}
 .cost-compact td:last-child{border-bottom:0}
 .cost-compact .cost-row-action{margin-top:3px}
}
