/* The current CT is a working page; composition details form one editable layer.
 * 0.5.93: compact composition workspace with a single vertical reading flow. */
.ct592-workspace,.ct592-composition,.ct592-history,.ct592-cpu-picker{--ct-bg:var(--ui67-canvas,#f3f6f9);--ct-paper:var(--ui67-paper,#fff);--ct-ink:var(--ui67-ink,#173245);--ct-muted:var(--ui67-muted,#506779);--ct-line:var(--ui67-line,#d8e2ea);--ct-action:var(--ui67-action,#086978);--ct-soft:var(--ui67-action-soft,#e9f5f6);--ct-warn:var(--ui67-warn,#805200);--ct-warn-bg:var(--ui67-warn-soft,#fff6e4);--ct-danger:var(--ui67-danger,#a12837);--ct-ok:var(--ui67-ok,#17643e);color:var(--ct-ink);min-width:0}
.ct592-workspace{border:1px solid var(--ct-line);border-radius:12px;background:var(--ct-paper);padding:18px;max-width:100%}
.ct592-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.ct592-eyebrow{font-size:10px;font-weight:750;letter-spacing:.1em;color:var(--ct-action)}.ct592-heading h2{font-size:21px;line-height:1.3;margin:5px 0 6px}.ct592-heading p{font-size:12px;line-height:1.55;max-width:770px;color:var(--ct-muted);margin:0}.ct592-heading-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto;max-width:360px}.ct592-draft-status{display:inline-flex;align-items:center;border-radius:20px;background:var(--ct-soft);color:var(--ct-action);border:1px solid var(--ct-line);padding:5px 10px;font-size:11px;font-weight:650;white-space:nowrap}.ct592-draft-status.is-dirty{background:var(--ct-warn-bg);color:var(--ct-warn)}
.ct592-filters{display:grid;grid-template-columns:minmax(180px,2fr) minmax(150px,1fr) minmax(150px,1fr) auto;align-items:end;gap:10px;padding:12px;border:1px solid var(--ct-line);border-radius:9px;background:var(--ct-bg)}.ct592-filters>label{display:grid;gap:5px;font-size:11px;color:var(--ct-muted)}.ct592-filters input,.ct592-filters select{min-width:0;width:100%;box-sizing:border-box;font:inherit;font-size:12px;min-height:36px;border:1px solid var(--ct-line);border-radius:6px;background:var(--ct-paper);color:var(--ct-ink);padding:7px 9px}.ct592-filters .btn{min-height:36px;font-size:12px}.ct592-caption{font-size:11px;color:var(--ct-muted);line-height:1.6;margin:8px 0 12px}.ct592-notice{padding:10px 12px;background:var(--ct-soft);color:var(--ct-ink);border-left:3px solid var(--ct-action);border-radius:6px;font-size:12px;margin:10px 0}.ct592-notice[hidden]{display:none}.ct592-error{color:var(--ct-danger);white-space:pre-wrap}.ct592-loading{padding:22px;color:var(--ct-muted)}
#ct592-editor,#ct592-editor #budget528-root{min-width:0;max-width:100%;color:var(--ct-ink)}#ct592-editor .b575-summary{margin:10px 0 18px}#ct592-editor .b575-summary>div{min-height:90px}#ct592-editor .b575-meta{margin-bottom:16px}#ct592-editor .b575-actions h3{font-size:16px}#ct592-editor .b575-caption{font-size:12px;max-width:880px;margin:0 0 12px}#ct592-editor .b575-scroll{max-height:600px;min-height:170px;overflow:auto;max-width:100%;scrollbar-gutter:stable;border:1px solid var(--ct-line);border-radius:8px}#ct592-editor .b575-table{min-width:1360px;font-size:11px}#ct592-editor .b575-table .b575-name{width:240px}#ct592-editor .b575-table .b575-group{width:108px}#ct592-editor .b575-table .b575-detail-col{width:74px}#ct592-editor .b575-table .b575-service-link{font-size:12px!important;font-weight:650;line-height:1.5;min-height:30px!important;color:var(--ct-action)}#ct592-editor .b575-service-link::before{content:none!important}#ct592-editor .b575-table tbody[hidden]{display:none!important}#ct592-editor .b575-table [name=s_group]{font-size:11px!important}#ct592-editor .b575-table .b575-number{font-size:11px}#ct592-editor .b575-table .b575-number small{font-size:9px}#ct592-editor .b575-table .b582-line-actions .btn{font-size:10px!important;padding:6px 4px!important;min-height:30px;margin:4px 0}#ct592-editor .b575-table td{vertical-align:middle}#ct592-editor .b575-table :is(input,textarea,select){color:var(--ct-ink)}#ct592-editor #ct592-empty-filter td{padding:25px!important;color:var(--ct-muted);text-align:center;font-size:13px}
.ct592-cpu-link{display:flex;align-items:center;gap:6px;width:auto;max-width:100%;text-align:left;padding:4px 0;margin:3px 0 1px;background:transparent;border:0;color:var(--ct-action);font:inherit;font-size:10px;cursor:pointer;line-height:1.5;white-space:normal}.ct592-cpu-link>span{font-size:9px;border:1px solid var(--ct-line);background:var(--ct-paper);border-radius:5px;padding:1px 5px;white-space:nowrap}.ct592-cpu-link:hover{text-decoration:underline}.ct592-cpu-link:focus-visible,.ct592-text-button:focus-visible,.ct592-input-choice:focus-visible{outline:2px solid var(--ct-action);outline-offset:3px;border-radius:4px}.ct592-savebar{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap;position:sticky;bottom:0;z-index:4;padding:14px 0 4px;border-top:1px solid var(--ct-line);background:var(--ct-paper);margin-top:16px}#ct592-editor .budget528-save{background:var(--ct-bg);padding:14px;border:1px solid var(--ct-line);border-radius:8px}#ct592-editor .budget528-save textarea{max-width:900px}.ct592-savebar .btn{font-size:12px}
html[data-theme] .budget574-dialog.ct592-composition{width:min(1460px,calc(100vw - 32px));max-width:calc(100vw - 24px);height:auto;max-height:94dvh;background:var(--ct-paper);color:var(--ct-ink);border-color:var(--ct-line)}html[data-theme] .budget574-dialog.ct592-composition>.b574-body{padding:16px 18px;background:var(--ct-paper)}html[data-theme] .ct592-composition>header,html[data-theme] .ct592-composition>footer{background:var(--ct-paper);border-color:var(--ct-line)}.ct592-composition h2{font-size:19px}.ct592-composition .b574-eyebrow{color:var(--ct-action)}.ct592-service-fields{display:grid;grid-template-columns:minmax(260px,2.1fr) minmax(170px,1.15fr) minmax(100px,.65fr) minmax(100px,.65fr);gap:10px 14px;background:var(--ct-bg);border:1px solid var(--ct-line);border-radius:9px;padding:13px}.ct592-service-context{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px;margin-bottom:4px}.ct592-service-context span{color:var(--ct-action);font-weight:650}.ct592-service-context b{font-weight:500;color:var(--ct-muted)}.ct592-service-fields>label{font-size:11px}.ct592-service-note,.ct592-service-conversion{grid-column:1/-1}.ct592-service-conversion{color:var(--ct-muted);font-size:11px}.ct592-service-conversion:has(>[data-service-unit-reason]:not([hidden])){display:grid;grid-template-columns:1fr 1fr;gap:12px}.ct592-service-conversion label{max-width:620px}.ct592-service-conversion [hidden]{display:none!important}.ct592-service-conversion details>summary{padding:5px 0;cursor:pointer}.ct592-service-conversion details>label{margin:6px 0}.ct592-service-conversion p{max-width:620px;font-size:11px}.ct592-composition-reference{margin:10px 0 14px;border:1px solid var(--ct-line);border-radius:7px;padding:8px 11px;font-size:11px;color:var(--ct-muted)}.ct592-composition-reference summary{cursor:pointer}.ct592-composition-reference .b574-fields{margin-top:14px}.ct592-category-totals{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:1px solid var(--ct-line);border-radius:8px;overflow:hidden;margin:10px 0 18px;background:var(--ct-bg)}.ct592-category-totals>div{padding:10px 12px;border-right:1px solid var(--ct-line);min-width:0}.ct592-category-totals>div:last-child{border:0}.ct592-category-totals span,.ct592-category-totals small{display:block;font-size:10px;color:var(--ct-muted);line-height:1.5}.ct592-category-totals strong{display:block;font-size:17px;font-weight:650;line-height:1.7;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.ct592-category-totals small{font-size:9px}.ct592-composition-caption{display:flex;gap:16px;align-items:center;justify-content:space-between}.ct592-composition-caption h3{font-size:15px;margin:0}.ct592-composition-caption>span{font-size:11px;color:var(--ct-muted)}.ct592-composition .b574-stage-tabs{padding:10px 0 12px}.ct592-composition .b574-stage-tabs .btn{min-height:34px;font-size:11px}.ct592-composition .b582-local-scroll{max-height:440px;max-width:100%;overflow:auto;border:1px solid var(--ct-line);border-radius:8px}.ct592-composition table.ct592-component-grid{width:100%;min-width:1120px;table-layout:fixed;border-collapse:collapse;font-size:12px}.ct592-composition table.ct592-component-grid th{white-space:normal;text-align:left;background:var(--ct-bg);color:var(--ct-muted);padding:10px!important;font-size:11px;position:sticky;top:0;z-index:2;line-height:1.45}.ct592-composition table.ct592-component-grid th:first-child{width:27%}.ct592-composition table.ct592-component-grid th:nth-child(2){width:12%}.ct592-composition table.ct592-component-grid th:nth-child(3){width:6%}.ct592-composition table.ct592-component-grid th:nth-child(4){width:8%}.ct592-composition table.ct592-component-grid th:nth-child(5){width:9%}.ct592-composition table.ct592-component-grid th:nth-child(6){width:9%}.ct592-composition table.ct592-component-grid th:nth-child(7){width:10%}.ct592-composition table.ct592-component-grid th:nth-child(8){width:11%}.ct592-composition table.ct592-component-grid th:last-child{width:8%}.ct592-composition table.ct592-component-grid td{padding:8px!important;border-bottom:1px solid var(--ct-line);vertical-align:middle;font-size:12px;color:var(--ct-ink);background:var(--ct-paper);white-space:normal}.ct592-composition .b574-input-link{display:block;min-width:0}.ct592-composition .b574-input-link>strong{display:block;font-size:12px;line-height:1.5;font-weight:650;overflow-wrap:anywhere}.ct592-input-status{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:10px;margin:4px 0}.ct592-input-status span[data-link-state=linked],.ct592-input-status span[data-link-state=recovered]{color:var(--ct-ok)}.ct592-input-status span[data-link-state=pending],.ct592-input-status span[data-link-state=ambiguous]{color:var(--ct-warn)}.ct592-text-button{padding:3px 0;font:inherit;font-size:11px;background:none;border:0;color:var(--ct-action);text-align:left;cursor:pointer;line-height:1.5}.ct592-text-button:hover{text-decoration:underline}.ct592-text-button.ct592-delete{color:var(--ct-danger)}.ct592-component-stage{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;margin-top:7px;color:var(--ct-muted);font-size:10px!important}.ct592-component-stage input{flex:1;max-width:230px}html[data-theme] .ct592-composition :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:var(--ct-paper);color:var(--ct-ink);border-color:var(--ct-line);font-size:12px;height:36px;min-height:36px}html[data-theme] .ct592-composition .ct592-component-stage input{height:30px;min-height:30px;font-size:11px}html[data-theme] .ct592-composition .ct592-calculated,html[data-theme] .ct592-composition [data-component-coefficient]{background:var(--ct-bg);color:var(--ct-ink);border-radius:4px;font-variant-numeric:tabular-nums;text-align:right;font-size:12px}html[data-theme] .ct592-composition [data-component-coefficient]{padding:8px;display:block;line-height:1.5;overflow-wrap:anywhere}html[data-theme] .ct592-composition .b582-component-extra td{background:var(--ct-paper);padding:2px 8px 7px!important}.ct592-composition .b582-component-extra summary{font-size:10px;color:var(--ct-muted)}.ct592-composition .b574-component-fields{padding:10px 0}.ct592-composition .b582-local-preview{background:var(--ct-soft);border-color:var(--ct-line);color:var(--ct-ink);margin-top:12px}.ct592-composition .b582-local-preview p,.ct592-composition .b582-local-preview small{color:var(--ct-muted)}.ct592-return-context{font-size:11px;color:var(--ct-muted);margin-right:auto}
.ct592-input-search{padding:10px;margin:8px 0;background:var(--ct-bg);border:1px solid var(--ct-line);border-radius:7px}.ct592-input-search>div{display:flex;gap:10px;flex-wrap:wrap;margin:7px 0}.ct592-input-search [data-input-options]{display:block;max-height:230px;overflow:auto;font-size:11px}.ct592-input-search .ct592-input-choice{display:block;width:100%;text-align:left;border:1px solid var(--ct-line);background:var(--ct-paper);color:var(--ct-ink);border-radius:5px;padding:8px;margin:5px 0;cursor:pointer;white-space:normal}.ct592-input-choice b,.ct592-input-choice small{display:block;line-height:1.5}.ct592-input-choice small{color:var(--ct-muted);font-size:10px}.ct592-input-choice:hover{background:var(--ct-soft)}
html[data-theme] .budget574-dialog.ct592-cpu-picker{width:min(720px,calc(100vw - 32px));max-height:82dvh;height:auto;background:var(--ct-paper);color:var(--ct-ink)}.ct592-cpu-picker .b574-catalog{max-height:46dvh;overflow:auto}.ct592-cpu-picker .b574-candidate{align-items:flex-start;padding:12px 8px}.ct592-cpu-picker .b574-candidate>span{flex:1 1 auto}.ct592-cpu-picker .b574-candidate>strong{font-size:12px}
html[data-theme] .budget574-dialog.ct592-history{width:min(940px,calc(100vw - 32px));background:var(--ct-paper);color:var(--ct-ink)}.ct592-history-entry{border:1px solid var(--ct-line);border-radius:7px;padding:12px;margin:8px 0}.ct592-history-entry>summary{font-size:13px;font-weight:650;cursor:pointer}.ct592-history-entry p{font-size:12px;color:var(--ct-muted);line-height:1.5}.ct592-history-lines>div{display:flex;gap:20px;justify-content:space-between;border-top:1px solid var(--ct-line);padding:9px 0;font-size:12px}.ct592-history-lines small{display:block;font-size:11px;color:var(--ct-muted);margin-top:4px}.ct592-history-lines b{white-space:nowrap;font-variant-numeric:tabular-nums}.ct592-history-pages{display:flex;gap:15px;justify-content:center;align-items:center;font-size:12px;padding-top:12px}
@media(max-width:1100px){.ct592-heading{flex-direction:column;gap:12px}.ct592-heading-actions{max-width:none;justify-content:flex-start}.ct592-service-fields{grid-template-columns:minmax(180px,1.6fr) minmax(130px,1fr) 100px 90px}.ct592-filters{grid-template-columns:2fr 1fr 1fr}.ct592-filters>.btn{grid-column:1/-1;justify-self:start}.ct592-composition-caption{align-items:flex-start}.ct592-category-totals strong{font-size:15px}}
@media(max-width:760px){.ct592-workspace{padding:12px;border-radius:9px}.ct592-heading h2{font-size:18px}.ct592-heading-actions .btn,.ct592-savebar .btn{min-height:44px}.ct592-filters{grid-template-columns:1fr 1fr;padding:10px}.ct592-filters>label:first-child{grid-column:1/-1}.ct592-filters input,.ct592-filters select{font-size:16px;min-height:44px}.ct592-filters>.btn{justify-self:stretch;min-height:44px}#ct592-editor .b575-scroll{max-height:65dvh}#ct592-editor .b575-table :is(input,select,textarea){font-size:16px!important;min-height:44px!important}#ct592-editor .b575-table .b575-service-link{font-size:14px!important;min-height:44px!important}#ct592-editor .b575-table .b582-line-actions .btn{min-height:40px;font-size:11px!important}.ct592-cpu-link{min-height:40px;font-size:11px}.ct592-savebar{justify-content:stretch;padding-bottom:8px}.ct592-savebar>.btn{flex:1 1 140px}.ct592-service-fields{grid-template-columns:1fr 1fr;padding:10px}.ct592-service-fields>.ct592-service-name,.ct592-service-fields>label:has([data-service=group]){grid-column:1/-1}.ct592-service-context{display:block}.ct592-service-context span,.ct592-service-context b{display:block}.ct592-service-context b{margin-top:4px}.ct592-service-conversion:has(>[data-service-unit-reason]:not([hidden])){display:block}.ct592-category-totals{grid-template-columns:repeat(3,minmax(0,1fr));margin:12px 0}.ct592-category-totals>div{padding:8px;border-bottom:1px solid var(--ct-line);min-height:75px}.ct592-category-totals>div:nth-child(3){border-right:0}.ct592-category-totals>div:nth-child(n+4){border-bottom:0}.ct592-category-totals strong{font-size:14px}.ct592-category-totals small{font-size:8px}.ct592-composition-caption{display:block}.ct592-composition-caption span{display:block;margin-top:4px}html[data-theme] .budget574-dialog.ct592-composition{width:100vw;max-width:100vw;max-height:96dvh;border-radius:9px}html[data-theme] .budget574-dialog.ct592-composition>.b574-body{padding:12px}.ct592-composition h2{font-size:17px}.ct592-composition .b582-local-scroll{max-height:460px}.ct592-composition .b574-stage-tabs .btn{min-height:44px;font-size:12px}html[data-theme] .ct592-composition :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px!important;height:44px;min-height:44px}html[data-theme] .ct592-composition .ct592-component-stage input{font-size:14px;min-height:40px}.ct592-composition table.ct592-component-grid{min-width:1260px}.ct592-composition .ct592-text-button{min-height:36px;font-size:12px}.ct592-composition>footer{gap:7px}.ct592-composition>footer .btn{min-height:44px;flex:1 1 130px;font-size:12px}.ct592-return-context{flex-basis:100%;font-size:10px}.ct592-cpu-picker .b574-candidate>strong{margin-left:29px}.ct592-history-lines>div{display:block}.ct592-history-lines b{display:block;margin-top:5px}}
@media print{.ct592-workspace,.ct592-composition{--ct-bg:#f2f4f5;--ct-paper:#fff;--ct-ink:#173245;--ct-muted:#506779;--ct-line:#cdd7de;--ct-action:#086978;--ct-soft:#eef7f8}.ct592-filters,.ct592-heading-actions,.ct592-savebar,.ct592-workspace .b574-actions,.ct592-cpu-link>span,.ct592-workspace .b582-line-actions,.ct592-workspace .budget528-save{display:none!important}.ct592-workspace{border:0;padding:0}#ct592-editor .b575-scroll{max-height:none;overflow:visible}.ct592-workspace input,.ct592-workspace textarea,.ct592-workspace select{border:0!important;background:#fff!important}.ct592-workspace .b575-table{min-width:0!important;font-size:8px!important}}

/* Composition density: inputs stay in their own columns; details open on demand. */
@media screen {
  .ct593-service-details{grid-column:1/-1;min-width:0;color:var(--ct-muted);font-size:11px}
  .ct593-service-details>summary{cursor:pointer;padding:3px 0;line-height:1.5}
  .ct593-service-extras{display:grid;grid-template-columns:1.4fr 1.2fr 1fr;gap:12px;padding:8px 0 2px}
  .ct593-service-extras>label,.ct593-service-extras>.ct592-service-conversion{grid-column:auto;min-width:0}
  .ct593-service-extras [hidden]{display:none!important}
  .ct593-service-extras small{display:block;font-size:10px;line-height:1.4;margin-top:4px}
  .ct593-components-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:6px 0}
  .ct593-components-toolbar .ct592-composition-caption{display:block;flex:0 1 360px;min-width:0}
  .ct593-components-toolbar .ct592-composition-caption>span{display:block;margin-top:2px;font-size:10px}
  .ct593-components-toolbar .b574-stage-tabs{padding:0;min-width:0;max-width:75%;margin:0}
  .ct593-component-actions{display:flex;flex-wrap:wrap;align-items:center;gap:0 9px}
  .ct593-optional-label{display:block;color:var(--ct-muted);font-size:10px;line-height:1.3}
  .ct593-parameter-heading{font-size:11px;font-weight:650;color:var(--ct-muted);padding:5px 0 0}
  .ct592-composition .b582-component-extra[hidden]{display:none!important}
  .ct592-composition .b582-local-scroll{max-height:none}
  .ct592-composition table.ct592-component-grid th:first-child{width:22%}
  .ct592-composition table.ct592-component-grid th:nth-child(2){width:10%}
  .ct592-composition table.ct592-component-grid th:nth-child(3){width:11%}
  .ct592-composition table.ct592-component-grid th:nth-child(4){width:5.5%}
  .ct592-composition table.ct592-component-grid th:nth-child(5){width:7%}
  .ct592-composition table.ct592-component-grid th:nth-child(6){width:8.5%}
  .ct592-composition table.ct592-component-grid th:nth-child(7){width:8.5%}
  .ct592-composition table.ct592-component-grid th:nth-child(8){width:8.5%}
  .ct592-composition table.ct592-component-grid th:nth-child(9){width:9%}
  .ct592-composition table.ct592-component-grid th:last-child{width:10%}
  .ct592-composition .ct592-component-stage{margin:0;display:block!important}
  .ct592-composition .ct592-component-stage input{max-width:none}
}
@media screen and (min-width:761px) {
  html[data-theme] .budget574-dialog.ct592-composition{width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:10px}
  html[data-theme] .budget574-dialog.ct592-composition>header{padding:8px 14px;min-height:48px;box-sizing:border-box}
  html[data-theme] .budget574-dialog.ct592-composition>header h2{font-size:17px;line-height:1.3;margin:1px 0}
  .ct592-composition>header .b574-eyebrow{font-size:9px}
  .ct592-composition>header [data-close]{height:32px;min-height:32px;width:34px;padding:3px}
  html[data-theme] .budget574-dialog.ct592-composition>.b574-body{flex:1 1 auto;padding:10px 12px}
  html[data-theme] .budget574-dialog.ct592-composition>footer{padding:8px 12px;gap:8px;min-height:50px;box-sizing:border-box}
  .ct592-composition>footer .btn{min-height:34px;font-size:12px;padding:6px 11px}
  .ct592-composition .ct592-service-fields{padding:8px 10px;gap:5px 12px;grid-template-columns:minmax(280px,2.8fr) minmax(160px,1.4fr) minmax(100px,.8fr) minmax(90px,.65fr)}
  .ct592-composition .ct592-service-context{font-size:10px;margin:0;line-height:1.3}
  .ct592-composition .ct592-service-fields>label{font-size:11px;gap:3px}
  .ct592-composition .ct592-composition-reference{margin:5px 0;padding:5px 9px;font-size:10px}
  .ct592-composition .ct592-composition-reference .b574-fields{margin:8px 0}
  .ct592-composition .ct592-category-totals{margin:5px 0 8px;border-radius:6px}
  .ct592-composition .ct592-category-totals>div{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1px 8px;padding:6px 9px;min-height:0}
  .ct592-composition .ct592-category-totals span{font-size:10px;line-height:1.3}
  .ct592-composition .ct592-category-totals strong{font-size:15px;line-height:1.35;text-align:right}
  .ct592-composition .ct592-category-totals small{grid-column:1/-1;font-size:9px;line-height:1.3}
  .ct592-composition .ct592-composition-caption h3{font-size:13px;line-height:1.4}
  .ct592-composition .b574-stage-tabs .btn{min-height:30px;padding:5px 9px;font-size:11px}
  .ct592-composition table.ct592-component-grid{min-width:1240px;font-size:12px}
  .ct592-composition table.ct592-component-grid th{padding:7px 6px!important;line-height:1.3;font-size:10px}
  .ct592-composition table.ct592-component-grid td{padding:4px 6px!important;font-size:12px}
  .ct592-composition .b574-input-link>strong{font-size:12px;line-height:1.35}
  .ct592-composition .ct592-input-status{margin:0;gap:8px;line-height:1.3}
  .ct592-composition .ct592-text-button{font-size:10px;line-height:1.4;padding:3px 0;min-height:24px}
  html[data-theme] .ct592-composition :is(input:not([type=checkbox]):not([type=radio]),select,textarea){height:32px;min-height:32px;padding:5px 7px;font-size:12px;border-radius:5px}
  html[data-theme] .ct592-composition .ct592-component-stage input{font-size:12px;height:32px;min-height:32px}
  html[data-theme] .ct592-composition [data-component-coefficient]{padding:6px 3px;line-height:1.3;font-size:11px}
  .ct592-composition .b582-component-cost{white-space:nowrap!important;font-size:11px!important}
  html[data-theme] .ct592-composition .b582-component-extra td{padding:4px 10px 8px!important}
  .ct592-composition .b574-component-fields{grid-template-columns:minmax(150px,1.2fr) minmax(100px,.65fr) minmax(100px,.65fr) minmax(220px,2fr);gap:10px;padding:6px 0 0;align-items:start}
  .ct592-composition .b574-component-fields>.b574-wide{grid-column:auto}
  .ct592-composition .b574-component-fields>p{grid-column:span 3;font-size:11px;line-height:1.4;margin:4px 0}
  .ct592-composition .b574-component-fields label{font-size:10px;gap:3px}
  .ct592-composition .b574-actions{margin:6px 0}
  .ct592-composition .b574-actions .btn{min-height:30px;padding:5px 10px;font-size:11px}
  .ct592-composition .b582-local-preview{margin-top:8px;padding:8px 10px;display:flex;gap:18px;align-items:center;justify-content:space-between}
  .ct592-composition .b582-local-preview>div{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
  .ct592-composition .b582-local-preview>div strong{font-size:17px}
  .ct592-composition .b582-local-preview p{font-size:10px;max-width:390px;margin:0}
}
@media screen and (min-width:1280px) {
  .ct592-composition .b582-local-scroll{overflow:visible}
  .ct592-composition table.ct592-component-grid{min-width:0}
}
@media screen and (max-width:760px) {
  html[data-theme] .budget574-dialog.ct592-composition{height:100dvh;max-height:100dvh;margin:0;border-radius:0}
  html[data-theme] .budget574-dialog.ct592-composition>.b574-body{flex:1 1 auto}
  .ct593-service-extras{grid-template-columns:1fr;gap:10px}
  .ct593-components-toolbar{display:block}
  .ct593-components-toolbar .b574-stage-tabs{max-width:100%;margin-top:8px}
  .ct592-composition table.ct592-component-grid{min-width:1440px}
  .ct592-composition .b574-component-fields{grid-template-columns:1fr 1fr}
  .ct592-composition .b574-component-fields>.b574-wide{grid-column:1/-1}
}

/* 0.5.95: keep the CPU action beside the service, with a floating reference. */
#budget528-form .ct595-service-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;min-width:0}
#budget528-form .ct595-service-heading>.b575-service-link{min-width:0;overflow-wrap:anywhere;white-space:normal!important}
#budget528-form .ct595-service-heading>.ct592-cpu-link{display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;max-width:none;min-height:24px!important;margin:0!important;padding:0!important;font-size:10px!important;line-height:1.2!important;white-space:nowrap!important}
#budget528-form .ct595-service-heading>.ct592-cpu-link>span{display:inline-block;padding:3px 6px;font-size:10px;line-height:1.2;border-color:var(--ui67-line,#d8e2ea);background:var(--ui67-paper,#fff)}
#budget528-form .b575-name:has(.ct592-cpu-link:is(:hover,:focus))>small{display:none!important}
.ct595-cpu-tooltip{position:fixed;z-index:10050;left:0;top:0;box-sizing:border-box;width:max-content;max-width:min(360px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:auto;padding:9px 12px;border:1px solid var(--ui67-line,#d8e2ea);border-radius:7px;background:var(--ui67-paper,#fff);color:var(--ui67-ink,#173245);box-shadow:0 5px 18px #0003;font:500 12px/1.5 system-ui,sans-serif;white-space:pre-line;overflow-wrap:anywhere;text-align:left}
@media(max-width:760px){#budget528-form .ct595-service-heading>.ct592-cpu-link{min-height:44px!important;min-width:44px}#budget528-form .ct595-service-heading>.ct592-cpu-link>span{font-size:11px;padding:5px 6px}}
@media print{.ct595-cpu-tooltip{display:none!important}#budget528-form .ct595-service-heading{display:block}#budget528-form .ct595-service-heading>.ct592-cpu-link{display:block!important;min-height:0!important;margin-top:2px!important;font-size:9px!important}#budget528-form .ct595-service-heading>.ct592-cpu-link::after{content:attr(data-cpu-reference);white-space:normal;color:#506779}}

/* 0.5.97: the stage is the group heading; retain its native edit control in
   service details and use the freed width for the remaining worksheet. */
@media screen{#ct592-editor .b575-table.stage597-table{min-width:1252px}.ct577 .ct577-table.stage597-table{min-width:1426px}}
#ct592-editor .stage597-stage-field [name=s_group]{border:1px solid var(--ct-line)!important;background:var(--ct-paper)!important;color:var(--ct-ink)!important;min-height:34px;padding:6px 8px!important}
#ct592-editor .stage597-table tfoot [data-b575-total]{overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;font-size:10px!important;padding:6px 5px!important}
#ct592-editor .stage597-table tfoot [data-b575-total="delta"]{padding-left:2px!important;padding-right:2px!important}
