.advancement-tabs{display:flex;gap:8px;margin-bottom:20px;border-bottom:1px solid var(--line);padding-bottom:12px;flex-wrap:wrap}.advancement-tabs button{background:transparent;color:var(--muted);display:flex;gap:9px;align-items:center;padding:11px 16px;border-radius:6px}.advancement-tabs button[aria-selected=true]{background:white;color:var(--navy);box-shadow:inset 0 -3px var(--orange);border:1px solid var(--line)}.advancement-tabs button>span{background:#eaf0f4;color:var(--blue);padding:2px 6px;border-radius:4px;font-size:10px}.dwg-search{width:100%;margin:0 0 12px}.dwg-empty{padding:35px;text-align:center;background:#fafcfd;border:1px dashed var(--line);border-radius:8px;margin-top:20px;color:var(--muted)}.dwg-empty .metric-icon{display:inline-flex}.dwg-empty h3{color:var(--ink)}.dwg-register{border-left-color:var(--cyan)}.dwg-attention{color:#9c5d18;font-size:11px}.dwg-dialog{width:97vw;max-width:1850px}.dwg-configuration,.dwg-preview{border:1px solid var(--line);padding:20px;border-radius:8px;margin:20px 0;background:#fafcfd}.dwg-config-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.dwg-phase-mapping{display:grid;grid-template-columns:minmax(80px,.6fr) repeat(3,minmax(120px,1fr)) auto;gap:12px;align-items:end;margin:14px 0}.dwg-phase-mapping select,.dwg-config-fields select{font-size:11px}.dwg-phase-mapping .field{min-width:0}.dwg-confirm{display:flex;align-items:center;gap:10px;margin-top:20px}.dwg-reconcile{padding:18px;background:#fff6e9;border:1px solid #f4d6ad;border-radius:8px;margin:18px 0}.dwg-reconcile .field{display:flex;margin:14px 0;max-width:100%}.dwg-reconcile select{max-width:100%}.dwg-diff-table{min-width:650px}.dwg-diff-table td{vertical-align:top}.dwg-diff-table td:first-child{width:30%}.dwg-diff-table td:nth-child(2){width:150px}.dwg-diff-table small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.dwg-change{display:inline-block;border-radius:4px;padding:4px 7px;font-size:10px;white-space:nowrap;background:#edf1f4;color:var(--muted)}.change-new{background:#e9f5ef;color:var(--green)}.change-changed{background:#fff0da;color:#956019}.change-missing{background:#fcebec;color:var(--red)}.dwg-table-tools{display:flex;gap:14px;align-items:center;margin:18px 0;flex-wrap:wrap}.dwg-table-tools .extra-search{flex:1 1 250px}.dwg-table-tools strong{font-size:11px;color:var(--muted)}.dwg-table{min-width:1100px;display:table;font-size:12px}.dwg-table th{white-space:nowrap}.dwg-table td{vertical-align:top;padding:14px 10px}.dwg-table-viewport{max-height:58vh;overflow:auto}.dwg-table th{position:sticky;top:0;z-index:1;background:#edf3f6}.dwg-title{min-width:230px;max-width:430px;line-height:1.6}.dwg-phase{margin:0;min-width:110px;font-size:11px}.dwg-phase summary{list-style:none;display:flex;align-items:center;gap:6px;color:var(--muted);padding:3px 0}.dwg-phase summary:after{content:'⌄';margin-left:4px;font-size:12px}.dwg-phase.issued summary{color:var(--green);font-weight:650}.dwg-phase.na summary,.dwg-phase.saipem summary{color:var(--red)}.phase-dot{width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.dwg-phase>div{display:flex;flex-direction:column;gap:6px;margin-top:10px;padding:10px;background:#f4f7fa;border-radius:5px;max-width:200px}.dwg-phase>div strong{font-size:10px;color:var(--red)}.dwg-missing{background:#fff8f5}.dwg-history-row{display:flex;gap:15px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:12px 0}.dwg-history-row>span:first-child{flex:1}.dwg-footer{position:sticky;bottom:-24px;padding:16px 0;background:white;border-top:1px solid var(--line);z-index:2}.dwg-dialog h2{display:flex;align-items:center;gap:12px;flex-wrap:wrap}@media(max-width:1000px){.dwg-config-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.dwg-phase-mapping{grid-template-columns:repeat(2,minmax(0,1fr))}.dwg-history-row{flex-wrap:wrap}.dwg-history-row>span:first-child{flex-basis:100%}}@media(max-width:650px){.dwg-config-fields{grid-template-columns:1fr}.dwg-configuration,.dwg-preview{padding:12px}.dwg-phase-mapping{grid-template-columns:1fr}.dwg-register .extra-numbers{flex-wrap:wrap}}

.dwg-register.extra-register{border-left-color:var(--cyan)}.dwg-preview>.table-scroll{max-height:40vh;overflow:auto}.dwg-diff-table th{position:sticky;top:0;background:#edf3f6;z-index:1}.dwg-warnings>div{max-height:260px;overflow:auto}.dwg-table td:first-child{position:sticky;left:0;z-index:1;background:white;min-width:130px;max-width:230px;overflow-wrap:anywhere}.dwg-table th:first-child{left:0;z-index:3}.dwg-missing td:first-child{background:#fff8f5}

/* Visual Excel setup, with selection directly on source rows and columns. */
.dwg-source-setup{margin-top:24px;border:1px solid var(--line);border-radius:8px;background:white;overflow:hidden}.dwg-source-setup>.section-bar{padding:20px 22px 4px}.dwg-source-setup h3{margin:0 0 8px}.dwg-source-setup>.warning{margin:12px 20px}.dwg-source-toolbar{padding:12px 22px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#f8fafb}.dwg-source-toolbar .extra-search{flex:1 1 280px}.dwg-source-toolbar button{padding:10px 12px;font-size:11px}.dwg-source-check{display:flex;gap:7px;align-items:center;font-size:12px;color:var(--muted);white-space:nowrap}.dwg-source-count{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap;padding:12px 22px;color:var(--muted);font-size:11px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.dwg-source-count strong{color:var(--navy)}.dwg-source-viewport{overflow:auto;max-height:50vh;min-height:220px;isolation:isolate}.dwg-source-table{display:table;width:max-content;min-width:100%;font-size:12px}.dwg-source-table th{position:sticky;top:0;z-index:2;background:#edf4f7;min-width:140px;max-width:260px;padding:12px;border-right:1px solid var(--line);text-transform:none;vertical-align:top;box-shadow:inset 0 3px var(--cyan)}.dwg-source-table td{min-width:140px;max-width:300px;padding:12px;border-right:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere;line-height:1.5;background:white}.dwg-source-table input{width:15px;height:15px;padding:0;accent-color:var(--cyan);cursor:pointer}.dwg-source-colflag{display:flex;gap:9px;align-items:center;margin-bottom:8px}.source-letter{font-size:10px;font-weight:600;color:#6e8493;letter-spacing:1px}.source-heading{display:block;font-weight:650;color:var(--navy);min-height:32px;max-width:240px}.source-role{display:inline-block;margin-top:8px;font-size:10px;color:var(--blue);background:#dfeef4;padding:4px 6px;border-radius:4px;white-space:nowrap}.dwg-source-table .dwg-source-rowhead{position:sticky;left:0;min-width:98px;width:98px;max-width:120px;z-index:1;background:#f5f8fa;border-right:2px solid #d9e4ea}.dwg-source-table th.dwg-source-rowhead{z-index:3}.dwg-source-rowhead label{display:flex;align-items:center;gap:10px}.dwg-source-rowhead small{display:block;font-size:9px;line-height:1.3;margin-top:6px;color:var(--muted)}.dwg-source-table td.source-column-off,.dwg-source-table th.source-column-off,.dwg-source-table .source-row-off td{background:#f2f3f5;color:#98a4ad}.dwg-source-table th.source-column-off{box-shadow:inset 0 3px #c9d1d6}.source-column-off .source-heading,.source-column-off .source-role{color:#929da5}.source-column-off .source-role{background:#e6e9ec}.dwg-source-note{margin:12px 22px;font-size:11px}.dwg-advanced{margin:16px 22px;border-top:1px solid var(--line);padding-top:14px}.dwg-advanced>summary{color:var(--blue);font-size:12px}.dwg-advanced>summary>span{color:var(--muted);margin-left:12px;font-size:10px}.dwg-advanced .dwg-configuration{margin:14px 0 0}.dwg-source-actions{padding:16px 22px;border-top:1px solid var(--line);background:#f8fafb;align-items:center}.dwg-source-actions>span{font-size:11px}@media(max-width:650px){.dwg-source-toolbar,.dwg-source-count,.dwg-source-actions{padding:12px}.dwg-source-setup>.section-bar{padding:16px 12px 4px}.dwg-source-count{flex-direction:column}.dwg-advanced{margin:14px 12px}.dwg-source-note{margin:12px}.dwg-source-viewport{max-height:46vh}.dwg-source-table td,.dwg-source-table th{min-width:130px}}

/* Explicit inclusion and recognition, with a flat emission register. */
.source-required{display:block;margin-top:7px;font-size:9px;color:var(--muted)}.dwg-source-table td.source-not-counted{color:var(--red);background:#fff3f3}.dwg-register-table .dwg-phase-group{text-align:center;height:34px;padding:8px 12px;top:0;border-left:2px solid #d7e3e9;box-shadow:inset 0 3px var(--cyan)}.dwg-register-table th.dwg-phase-subhead{top:34px;min-width:115px;max-width:180px}.dwg-register-table .dwg-meta-code{min-width:200px;max-width:200px;width:200px;position:sticky;left:0;background:white;z-index:2;overflow-wrap:anywhere}.dwg-register-table .dwg-meta-title{min-width:260px;max-width:260px;width:260px;position:sticky;left:200px;background:white;z-index:2;overflow-wrap:anywhere;border-right:2px solid #d7e3e9}.dwg-register-table .dwg-title{min-width:0;max-width:240px}.dwg-register-table th.dwg-meta-code,.dwg-register-table th.dwg-meta-title{z-index:4;background:#edf3f6}.dwg-register-table .dwg-emission-cell{min-width:115px;max-width:190px;white-space:nowrap;font-size:12px}.dwg-register-table .dwg-emission-cell small{display:block;margin-top:6px;font-size:10px;white-space:normal;line-height:1.4;min-width:100px}.dwg-register-table .dwg-not-counted{color:var(--red);background:#fff3f3}.dwg-register-table .dwg-missing td.dwg-meta-code,.dwg-register-table .dwg-missing td.dwg-meta-title{background:#fff8f5}@media(max-width:800px){.dwg-register-table .dwg-meta-title{position:static;min-width:240px;width:240px;max-width:240px}.dwg-register-table .dwg-meta-code{min-width:160px;max-width:160px;width:160px}}

/* 0.19: aligned register metrics and a larger, reversible table workspace. */
.dwg-register.extra-register{display:grid;grid-template-columns:minmax(0,1fr) 130px 225px 92px;gap:24px;align-items:center;padding:22px 24px}
.dwg-register-info{min-width:0;overflow-wrap:anywhere}.dwg-register-info h3{font-size:16px}.dwg-register-info p,.dwg-register-info small{font-size:12px;line-height:1.6}
.dwg-list-metric{align-self:center;min-width:0}.dwg-list-metric span{display:block;font-size:12px;color:var(--muted);margin-bottom:9px}.dwg-list-metric strong{display:block;color:var(--navy);font-size:25px;font-variant-numeric:tabular-nums;white-space:nowrap}.dwg-register>button{width:92px}
.dwg-view-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.dwg-view-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex-shrink:0}.dwg-size-controls{display:flex;align-items:center;gap:0;border:1px solid var(--line);border-radius:6px;background:white;overflow:hidden}.dwg-size-controls button{border:0;border-radius:0;min-width:36px;padding:7px 10px;font-size:18px;min-height:38px!important}.dwg-size-value{min-width:55px;text-align:center;font-size:12px;color:var(--navy);font-variant-numeric:tabular-nums}.dwg-expand-table{font-size:12px;min-height:40px!important;padding:10px 14px}.dwg-expand-table[aria-pressed=true]{background:#fff0df;border-color:#efc28d;color:#805121}
.dwg-focus-context{display:none}.dwg-source-context{padding:4px 20px 12px;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.dwg-source-viewport{max-height:65vh;min-height:320px;border-bottom:1px solid var(--line)}.dwg-source-table,.dwg-register-table{font-size:var(--dwg-font-size,14px);border-collapse:separate;border-spacing:0}
.dwg-source-table th{font-size:var(--dwg-font-size,14px);min-width:165px;max-width:300px;letter-spacing:0;line-height:1.5;padding:14px;box-sizing:border-box}.dwg-source-table td{font-size:var(--dwg-font-size,14px);min-width:165px;max-width:340px;padding:14px;line-height:1.6}.dwg-source-table input{width:18px;height:18px}.dwg-source-table .dwg-source-title{min-width:var(--dwg-title-width,320px);max-width:var(--dwg-title-width,320px)}.source-heading{font-size:inherit;max-width:none;min-height:42px}.source-role{font-size:12px}.source-letter{font-size:11px}.source-required{font-size:11px}.dwg-source-table .dwg-source-rowhead{min-width:100px;width:100px;max-width:100px}.dwg-source-rowhead small{font-size:11px}
.dwg-table-viewport{max-height:65vh;min-height:320px;isolation:isolate;border:1px solid var(--line);border-radius:6px}.dwg-register-table td{font-size:var(--dwg-font-size,14px);padding:16px 14px;line-height:1.6;border-right:1px solid var(--line)}.dwg-register-table th{font-size:var(--dwg-font-size,14px);letter-spacing:0;border-right:1px solid var(--line);padding:0}.dwg-register-table .column-filter-toggle{font-size:var(--dwg-font-size,14px);text-transform:none;letter-spacing:0;min-height:48px!important;padding:12px;line-height:1.5}.dwg-register-table .column-filter-toggle .line-icon{width:15px;height:15px;flex-shrink:0}.dwg-register-table .dwg-meta-code{min-width:var(--dwg-code-width,220px);max-width:var(--dwg-code-width,220px);width:var(--dwg-code-width,220px);box-sizing:border-box}.dwg-register-table .dwg-meta-title{min-width:var(--dwg-title-width,320px);max-width:var(--dwg-title-width,320px);width:var(--dwg-title-width,320px);left:var(--dwg-code-width,220px);box-sizing:border-box}.dwg-register-table .dwg-title{max-width:none}.dwg-register-table .dwg-phase-group{height:40px;font-size:var(--dwg-font-size,14px);padding:8px 12px;line-height:24px;box-sizing:border-box;white-space:nowrap}.dwg-register-table th.dwg-phase-subhead{top:40px;min-width:145px;max-width:230px}.dwg-register-table .dwg-emission-cell{font-size:var(--dwg-font-size,14px);min-width:145px;max-width:230px}.dwg-register-table .dwg-emission-cell small{font-size:12px}.dwg-register-table .dwg-change{font-size:12px}
/* Expansion changes layout only: there is no second copy of the editable table. */
#modal.dwg-focus-source[open],#modal.dwg-focus-register[open]{display:flex;flex-direction:column;position:fixed;inset:0;margin:0;max-width:none;width:100%;height:100dvh;max-height:100dvh;padding:16px 20px;border:0;border-radius:0;box-sizing:border-box;overflow:hidden}
#modal.dwg-focus-source>:not(#dwgUploadConfig):not(#modalMessage){display:none}#modal.dwg-focus-source #dwgUploadConfig{display:flex;flex:1;min-height:0}#modal.dwg-focus-source .dwg-source-setup{display:flex;flex:1;flex-direction:column;min-height:0;margin:0;border-radius:6px}#modal.dwg-focus-source .dwg-source-setup>.section-bar{flex-shrink:0;padding:12px 18px;margin:0;align-items:center}#modal.dwg-focus-source .dwg-source-setup>.section-bar p{display:none}#modal.dwg-focus-source .dwg-source-setup h3{margin:0;font-size:18px}#modal.dwg-focus-source .dwg-focus-context{display:block}#modal.dwg-focus-source .dwg-source-toolbar,#modal.dwg-focus-source .dwg-source-count,#modal.dwg-focus-source .dwg-source-actions{flex-shrink:0;padding:10px 18px;margin:0}#modal.dwg-focus-source .dwg-source-viewport{flex:1;min-height:0;max-height:none}#modal.dwg-focus-source .dwg-advanced{display:none}#modal.dwg-focus-source .dwg-source-note{flex-shrink:0;margin:8px 18px;font-size:12px}#modal.dwg-focus-source .dwg-source-actions>span{display:none}
#modal.dwg-focus-register>:not(h2):not(.dwg-table-tools):not(.dwg-table-viewport):not(.dwg-footer):not(#dwgNoRows):not(#dwgFilterPopover):not(#modalMessage){display:none}#modal.dwg-focus-register h2{flex-shrink:0;margin:0 0 8px;padding:0 0 10px;font-size:20px}#modal.dwg-focus-register h2 .dwg-focus-context{display:inline;font-size:12px;color:var(--muted);font-weight:400}#modal.dwg-focus-register .dwg-table-tools{flex-shrink:0;margin:6px 0 12px}#modal.dwg-focus-register .dwg-table-viewport{flex:1;min-height:0;max-height:none}#modal.dwg-focus-register .dwg-footer{position:static;flex-shrink:0;padding:10px 0 0;margin:0;border:0}#modal.dwg-focus-register #dwgNoRows{margin:8px 0;flex-shrink:0}
@media(max-width:1100px){.dwg-register.extra-register{grid-template-columns:minmax(0,1fr) 110px 200px 82px;gap:18px;padding:18px}.dwg-register>button{width:82px}.dwg-list-metric strong{font-size:23px}}
@media(max-width:800px){.dwg-register.extra-register{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 82px;gap:16px}.dwg-register-info{grid-column:1/-1}.dwg-list-metric span{font-size:11px}.dwg-list-metric strong{font-size:22px}.dwg-register-table .dwg-meta-code{min-width:160px;width:160px;max-width:160px}.dwg-register-table .dwg-meta-title{position:static;left:auto;min-width:var(--dwg-title-width,320px);max-width:var(--dwg-title-width,320px);width:var(--dwg-title-width,320px)}.dwg-view-controls{gap:8px}.dwg-source-setup>.section-bar{flex-wrap:wrap}.dwg-source-viewport,.dwg-table-viewport{min-height:300px}#modal.dwg-focus-source[open],#modal.dwg-focus-register[open]{padding:10px}#modal.dwg-focus-source .dwg-source-setup>.section-bar{gap:8px}#modal.dwg-focus-source .dwg-source-toolbar,#modal.dwg-focus-source .dwg-source-count,#modal.dwg-focus-source .dwg-source-actions{padding:8px 12px}#modal.dwg-focus-source .dwg-source-context{padding:0 12px 8px}#modal.dwg-focus-source .dwg-source-note{font-size:11px;margin:6px 12px}}
/* Keep the document identity beside the row flag while scrolling phase columns. */
.dwg-source-table .dwg-source-code{position:sticky;left:100px;min-width:var(--dwg-code-width,220px);max-width:var(--dwg-code-width,220px);width:var(--dwg-code-width,220px);box-sizing:border-box;z-index:1}
.dwg-source-table .dwg-source-title{position:sticky;left:calc(100px + var(--dwg-code-width,220px));box-sizing:border-box;z-index:1;border-right:2px solid #d7e3e9}
.dwg-source-table th.dwg-source-code,.dwg-source-table th.dwg-source-title{z-index:3}
@media(max-width:800px){.dwg-source-table .dwg-source-code{min-width:160px;max-width:160px;width:160px}.dwg-source-table .dwg-source-title{position:static;left:auto}}

/* 0.20: compact cells, with a smaller starting font and gradual size controls. */
.dwg-source-table th,.dwg-source-table td{min-width:130px;padding:8px 10px;line-height:1.45}.dwg-source-table .dwg-source-code{left:80px}.dwg-source-table .dwg-source-title{left:calc(80px + var(--dwg-code-width,185px))}.dwg-source-table .dwg-source-rowhead{min-width:80px;max-width:80px;width:80px}.dwg-source-table input{width:16px;height:16px}.source-heading{min-height:28px}.source-role{font-size:10.5px;margin-top:5px;padding:3px 5px}.source-letter,.source-required,.dwg-source-rowhead small{font-size:10px}.dwg-source-colflag{margin-bottom:5px}.source-required{margin-top:4px}
.dwg-register-table td{padding:8px 10px;line-height:1.45}.dwg-register-table .column-filter-toggle{min-height:38px!important;padding:8px 10px;line-height:1.4}.dwg-register-table .dwg-phase-group{height:32px;padding:6px 10px;line-height:20px}.dwg-register-table th.dwg-phase-subhead{top:32px;min-width:112px;max-width:190px}.dwg-register-table .dwg-emission-cell{min-width:112px;max-width:190px}.dwg-register-table .dwg-emission-cell small{font-size:10.5px;margin-top:4px}.dwg-register-table .dwg-change{font-size:10.5px}
@media(max-width:800px){.dwg-source-table .dwg-source-code,.dwg-register-table .dwg-meta-code{min-width:140px;max-width:140px;width:140px}.dwg-source-table .dwg-source-title{left:auto}}
.dwg-register-table .dwg-emission-cell small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:90px}

/* 0.24: resize leaf columns without changing data or selection. */
.dwg-resizable{table-layout:fixed!important}
.dwg-resizable th,.dwg-resizable td{overflow-wrap:anywhere;box-sizing:border-box}
.dwg-resizable th{position:sticky}
.dwg-resizable .column-filter-toggle{padding-right:20px;width:100%;white-space:normal}
.dwg-column-resize{position:absolute;right:0;top:0;bottom:0;width:10px;cursor:col-resize;touch-action:none;z-index:6;border-right:2px solid transparent}
.dwg-column-resize:hover,.dwg-column-resize:focus-visible{border-right-color:#ed983f;background:#ed983f33;outline:0}
.dwg-resizing,.dwg-resizing *{cursor:col-resize!important;user-select:none!important}
.dwg-resizable th.dwg-tone-idc{background:#e1edf8;color:#235379;border-top:3px solid #5b8db5}
.dwg-resizable th.dwg-tone-ifr{background:#dff1ed;color:#24685d;border-top:3px solid #4a998c}
.dwg-resizable th.dwg-tone-ifa{background:#fff0df;color:#854e1e;border-top:3px solid #eb983f}
.dwg-resizable th.dwg-tone-afc{background:#ece7f5;color:#61507e;border-top:3px solid #947bb5}
.dwg-resizable th[class*=dwg-tone-] .column-filter-toggle{color:inherit;background:transparent}
.dwg-resizable th.source-column-off{background:#edf0f2;color:#83919b;border-top-color:#c9d0d5}
.dwg-resizable .dwg-emission-cell small{max-width:100%}

.dwg-column-resize{border-right-color:#b5c9d4}.dwg-reset-columns{font-size:12px;min-height:40px!important;padding:10px 14px}
