/* Scoped to the lower workspace; the full-city dashboard keeps its layout. */
.cost-map-workspace {
  container-type: inline-size;
  min-width: 0;
  background: #fff;
  border-block: 1px solid #e4e7eb;
  color: #242932;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.cost-map-workspace [hidden] { display: none !important; }
.cost-map-workspace-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 24px; border-bottom: 1px solid #e8ebef; }
.cost-map-workspace-header > div:first-child { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.cost-map-workspace h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.cost-map-workspace h3 { font-size: 15px; line-height: 1.5; }
.cost-map-workspace .muted, .cost-map-subtitle { color: #707987; font-size: 12px; }
.cost-map-workspace .cost-map-toolbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(180px, 1.25fr); gap: 16px; padding: 18px 24px; margin: 0; border-bottom: 1px solid #e8ebef; }
.cost-map-workspace .cost-map-toolbar label, .cost-map-workspace .cost-map-toolbar .field-label { font-size: 12px; color: #707987; }
.cost-map-workspace .cost-map-toolbar select, .cost-map-workspace .cost-map-toolbar input { min-width: 0; height: 38px; font-size: 13px; border-radius: 4px; }
.cost-map-workspace .segmented-control { border-radius: 4px; min-height: 36px; }
.cost-map-workspace .segmented-control button { min-width: 0; font-size: 12px; padding: 8px 12px; }
.cost-map-workspace .cost-map-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0; align-items: start; }
.cost-map-workspace .cost-map-matrix-panel, .cost-map-workspace .cost-map-detail-panel { display: block; min-width: 0; min-height: 0; max-width: none; height: auto; padding: 24px; overflow: visible; }
.cost-map-workspace .cost-map-detail-panel { border-left: 1px solid #e8ebef; }
.cost-map-workspace .panel-header { gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cost-map-workspace .cost-map-matrix-panel > .panel-header { justify-content: flex-start; }
.cost-map-workspace #costMapMatrix, .cost-map-workspace #costMapDetail, .cost-map-workspace .table-wrap { min-width: 0; padding: 0; overflow: visible; height: auto; max-height: none; scrollbar-gutter: auto; }
.cost-map-workspace .cost-map-matrix { width: 100%; min-width: 0; table-layout: fixed; }
.cost-map-workspace .cost-map-matrix .col-subject { width: 26%; }
.cost-map-workspace .cost-map-matrix .col-quantity { width: 20%; }
.cost-map-workspace .cost-map-matrix .col-price { width: 18%; }
.cost-map-workspace .cost-map-matrix th, .cost-map-workspace .cost-map-matrix td { padding: 14px 10px; border-right: 0; border-bottom: 1px solid #edf0f2; font-size: 13px; vertical-align: middle; overflow-wrap: normal; word-break: normal; background: #fff; }
.cost-map-workspace .cost-map-matrix th { position: static; background: #f6f7f9; color: #616b79; font-weight: 500; }
.cost-map-workspace .cost-map-matrix th:nth-child(n+3) { text-align: right; }
.cost-map-workspace .cost-map-matrix tr.active td { background: #fff4f5; }
.cost-map-workspace .cost-map-matrix tr.active td:first-child { box-shadow: inset 3px 0 #c90018; }
.cost-map-workspace .cost-map-subject-cell { display: grid; gap: 6px; padding: 0; text-align: left; }
.cost-map-workspace .cost-map-subject-cell b { color: #242932; font-size: 14px; font-weight: 650; }
.cost-map-workspace .cost-map-subject-cell span { font-size: 11px; font-weight: 400; color: #77808d; white-space: nowrap; }
.cost-map-workspace .cost-map-metric-cell span, .cost-map-workspace .cost-map-metric-cell small { display: block; line-height: 1.6; }
.cost-map-workspace .cost-map-metric-cell small { font-size: 11px; color: #77808d; }
.cost-map-workspace .cost-map-cost-cell { padding: 6px 0; gap: 6px; border: 0; border-radius: 0; text-align: right; }
.cost-map-workspace .cost-map-cost-cell b { font-size: 15px; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.cost-map-workspace .cost-map-cost-cell small { font-size: 11px; line-height: 1.5; }
.cost-map-workspace .cost-map-cost-cell.active, .cost-map-workspace .cost-map-cost-cell:hover { background: transparent; color: #c90018; }
.cost-map-workspace .cost-map-price-empty { text-align: right; }
.cost-map-workspace .cost-map-manual-cell { background: #f5faf9 !important; }
.cost-map-workspace .cost-map-manual-quote { padding: 0; }
.cost-map-workspace .cost-map-manual-row { display: flex; flex-wrap: wrap; }
.cost-map-workspace .cost-map-manual-input { flex: 1 1 75px; width: 75px; }
.cost-map-workspace .cost-map-edit-notice { margin-bottom: 12px; }
.cost-map-workspace .cost-map-detail { gap: 0; grid-template-columns: minmax(0, 1fr); }
.cost-map-workspace .cost-map-detail > * { min-width: 0; }
.cost-map-workspace .cost-map-title-row { align-items: center; flex-wrap: wrap; gap: 12px; }
.cost-map-workspace .cost-map-title-row h2 { font-size: 22px; }
.cost-map-workspace .cost-map-subtitle { margin: 6px 0 0; overflow-wrap: anywhere; }
.cost-map-workspace .cost-map-detail-actions { justify-content: flex-end; }
.cost-map-workspace .cost-map-back { margin-right: auto; }
.cost-map-workspace .cost-map-revision-toggle { height: 34px; display: inline-flex; align-items: center; gap: 6px; color: #bd0017; }
.cost-map-workspace .cost-map-revision-toggle img { width: 15px; height: 15px; }
.cost-map-workspace .cost-map-level-switch { grid-template-columns: repeat(3, minmax(42px, 1fr)); }
.cost-map-workspace .cost-map-detail-tabs { display: flex; gap: 20px; border-bottom: 1px solid #e3e7ec; margin: 20px 0 0; }
.cost-map-workspace .cost-map-detail-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 12px 0; color: #626c7c; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.cost-map-workspace .cost-map-detail-tabs [aria-selected="true"] { color: #c90018; border-bottom-color: #c90018; font-weight: 650; }
.cost-map-workspace button:focus-visible, .cost-map-workspace summary:focus-visible { outline: 2px solid #ce4558; outline-offset: 3px; }
.cost-map-workspace .cost-map-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 20px 0; }
.cost-map-workspace .cost-map-facts div { border: 0; border-right: 1px solid #e8ebef; border-radius: 0; padding: 0 12px; }
.cost-map-workspace .cost-map-facts div:first-child { padding-left: 0; }
.cost-map-workspace .cost-map-facts div:last-child { border-right: 0; }
.cost-map-workspace .cost-map-facts dd { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.cost-map-workspace .cost-map-guide-block { padding: 18px 0; border: 0; border-top: 1px solid #e8ebef; border-radius: 0; }
.cost-map-workspace .cost-map-guide-block p { font-size: 13px; }
.cost-map-workspace .cost-map-tier-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 6px 0; }
.cost-map-workspace .cost-map-tier-prices > div { display: grid; gap: 6px; min-width: 0; padding: 0 12px; border-right: 1px solid #e8ebef; }
.cost-map-workspace .cost-map-tier-prices > div:first-child { padding-left: 0; }
.cost-map-workspace .cost-map-tier-prices > div:last-child { padding-right: 0; border-right: 0; }
.cost-map-workspace .cost-map-tier-prices span, .cost-map-workspace .cost-map-tier-prices small { color: #77808d; font-size: 11px; }
.cost-map-workspace .cost-map-tier-prices b { white-space: nowrap; font-size: 19px; font-weight: 650; }
.cost-map-workspace .cost-map-tier-prices b.active { color: #c90018; }
.cost-map-workspace .cost-map-tier-chart { display: grid; gap: 14px; }
.cost-map-workspace .cost-map-tier-chart > div { display: grid; grid-template-columns: 28px minmax(0, 1fr) 90px; gap: 14px; align-items: center; font-size: 12px; }
.cost-map-workspace .cost-map-tier-chart b { text-align: right; font-weight: 500; white-space: nowrap; }
.cost-map-workspace .cost-map-tier-track { height: 9px; background: #f2f4f6; border-radius: 2px; overflow: hidden; }
.cost-map-workspace .cost-map-tier-track i { display: block; height: 100%; background: #b6c0c8; border-radius: 2px; }
.cost-map-workspace .cost-map-tier-track i.active { background: #c90018; }
.cost-map-workspace .cost-map-standard-notes { padding: 18px 0; border-top: 1px solid #e8ebef; font-size: 13px; }
.cost-map-workspace .cost-map-standard-notes summary { cursor: pointer; font-weight: 600; }
.cost-map-workspace .cost-map-standards { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
.cost-map-workspace .cost-map-standard { border-radius: 4px; overflow-wrap: anywhere; }
.cost-map-workspace .cost-map-standard b { font-size: 12px; font-weight: 400; }
.cost-map-workspace .cost-map-text-action, .cost-map-workspace .cost-map-back { font: inherit; font-size: 12px; color: #596878; background: transparent; border: 0; padding: 10px 0; cursor: pointer; }
.cost-map-workspace .cost-map-text-action span { margin-left: 8px; }
.cost-map-workspace .cost-map-record-picker { display: flex; align-items: center; gap: 16px; font-size: 13px; margin-top: 20px; color: #626c7c; }
.cost-map-workspace .cost-map-record-picker select { flex: 1; min-width: 0; max-width: 740px; height: 38px; border: 1px solid #dfe4e9; border-radius: 4px; font: inherit; background: #fff; padding: 0 10px; }
.cost-map-workspace .cost-map-detail-wide { grid-template-columns: minmax(0, 1fr); }
.cost-map-workspace .cost-map-detail-wide .cost-map-matrix-panel { display: none; }
.cost-map-workspace .cost-map-detail-wide .cost-map-detail-panel { border-left: 0; }
.cost-map-workspace .cost-map-price-block { gap: 0; }
.cost-map-workspace .cost-map-price-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 22px 0; gap: 0; }
.cost-map-workspace .cost-map-price-summary > div { border: 0; border-right: 1px solid #e8ebef; border-radius: 0; padding: 0 16px; }
.cost-map-workspace .cost-map-price-summary > div:first-child { padding-left: 0; }
.cost-map-workspace .cost-map-price-summary > div:last-child { border: 0; }
.cost-map-workspace .cost-map-price-summary b { font-size: 20px; white-space: nowrap; }
.cost-map-workspace .cost-map-breakdown-table { min-width: 0; width: 100%; }
.cost-map-workspace .cost-map-breakdown-table th { background: #f6f7f9; font-weight: 500; }
.cost-map-workspace .cost-map-breakdown-table th, .cost-map-workspace .cost-map-breakdown-table td { padding: 12px 8px; overflow-wrap: normal; word-break: normal; }
.cost-map-workspace .cost-map-breakdown-table:not(.cost-map-component-table) td:nth-child(n+4):nth-child(-n+9) { text-align: right; white-space: nowrap; }
.cost-map-workspace .cost-map-breakdown-table .col-project { width: 16%; }
.cost-map-workspace .cost-map-breakdown-table .col-source { width: 17%; }
.cost-map-workspace .cost-map-breakdown-table .col-level, .cost-map-workspace .cost-map-breakdown-table .col-action { width: 6%; }
.cost-map-workspace .cost-map-breakdown-table .col-money { width: 9%; }
.cost-map-workspace .cost-map-breakdown-table .col-rate { width: 10%; }
.cost-map-workspace .cost-map-param-input { min-width: 0; width: 100%; border-radius: 4px; }
.cost-map-workspace .cost-map-component-table .col-drag { width: 5%; }
.cost-map-workspace .cost-map-component-table .col-category { width: 12%; }
.cost-map-workspace .cost-map-component-table .col-component { width: 23%; }
.cost-map-workspace .cost-map-component-table .col-param { width: 10.5%; }
.cost-map-workspace .cost-map-component-table .col-action { width: 7.5%; }
.cost-map-workspace .cost-map-history-item { border: 0; border-bottom: 1px solid #edf0f2; border-radius: 0; padding: 14px 0; overflow-wrap: anywhere; }
@container (max-width: 1240px) {
  .cost-map-workspace .cost-map-layout { grid-template-columns: minmax(0, 1fr); }
  .cost-map-workspace .cost-map-detail-panel { border-left: 0; border-top: 1px solid #e8ebef; }
  .cost-map-workspace .cost-map-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 1100px) {
  .cost-map-workspace .cost-map-breakdown-table:not(.cost-map-component-table), .cost-map-workspace .cost-map-breakdown-table:not(.cost-map-component-table) tbody { display: block; }
  .cost-map-workspace .cost-map-breakdown-table:not(.cost-map-component-table) colgroup, .cost-map-workspace .cost-map-breakdown-table:not(.cost-map-component-table) thead { display: none; }
  .cost-map-workspace .cost-map-breakdown-table:not(.cost-map-component-table) tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #dfe5e9; padding: 12px 0; }
  .cost-map-workspace .cost-map-breakdown-table:not(.cost-map-component-table) td { border: 0; text-align: left !important; white-space: normal !important; }
  .cost-map-workspace .cost-map-breakdown-table:not(.cost-map-component-table) td::before { content: attr(data-label); display: block; color: #77808d; font-size: 11px; margin-bottom: 5px; }
}
@container (max-width: 900px) {
  .cost-map-workspace .cost-map-component-table, .cost-map-workspace .cost-map-component-table tbody { display: block; }
  .cost-map-workspace .cost-map-component-table colgroup, .cost-map-workspace .cost-map-component-table thead { display: none; }
  .cost-map-workspace .cost-map-component-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 0; border-bottom: 1px solid #dfe5e9; }
  .cost-map-workspace .cost-map-component-table td { display: block; min-width: 0; border: 0; }
  .cost-map-workspace .cost-map-component-table td::before { content: attr(data-label); display: block; color: #77808d; font-size: 11px; margin-bottom: 5px; }
  .cost-map-workspace .cost-map-price-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
}
@container (max-width: 620px) {
  .cost-map-workspace-header, .cost-map-workspace .cost-map-matrix-panel, .cost-map-workspace .cost-map-detail-panel { padding: 18px 12px; }
  .cost-map-workspace .cost-map-toolbar { padding: 16px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cost-map-workspace .cost-map-matrix, .cost-map-workspace .cost-map-matrix tbody { display: block; }
  .cost-map-workspace .cost-map-matrix colgroup, .cost-map-workspace .cost-map-matrix thead { display: none; }
  .cost-map-workspace .cost-map-matrix tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px 0; border-bottom: 1px solid #e8ebef; }
  .cost-map-workspace .cost-map-matrix td { display: block; border: 0; min-width: 0; padding: 10px 6px; }
  .cost-map-workspace .cost-map-matrix td:first-child { grid-column: span 2; }
  .cost-map-workspace .cost-map-matrix td:nth-child(n+3)::before { content: attr(data-label); display: block; text-align: right; color: #77808d; font-size: 11px; }
  .cost-map-workspace .cost-map-detail-tabs { gap: 0; justify-content: space-between; }
  .cost-map-workspace .cost-map-detail-tabs button { font-size: 12px; }
  .cost-map-workspace .cost-map-tier-prices b { font-size: 15px; }
  .cost-map-workspace .cost-map-tier-prices > div { padding: 0 6px; }
  .cost-map-workspace .cost-map-standard-notes .cost-map-standards { grid-template-columns: minmax(0, 1fr); }
  .cost-map-workspace .cost-map-price-summary b { font-size: 16px; }
  .cost-map-workspace .cost-map-component-table tr, .cost-map-workspace .cost-map-breakdown-table:not(.cost-map-component-table) tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-map-workspace .cost-map-edit-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-map-workspace .cost-map-edit-actions textarea { grid-column: 1 / -1; min-width: 0; width: 100%; }
}
