:root{--next-accent:#b33e30;--next-ink:#292e34;--next-muted:#59636d;--next-border:#cbd0d5;--next-blue:#245e91}
body.ui-test .ui-document-actions #mergePdfBtn{background:#fff!important;color:var(--next-ink)!important;border:1px solid var(--next-border)!important;box-shadow:none!important}
.next-button{font:600 12px/1.3 system-ui,sans-serif;min-height:32px;padding:7px 12px;border:1px solid var(--next-border);border-radius:5px;color:var(--next-ink);background:#fff;cursor:pointer;white-space:nowrap}.next-button:hover{background:#f0f3f6;border-color:#9aa5af}.next-button:focus-visible,.next-page-card:focus-visible{outline:3px solid #387caf;outline-offset:2px}.next-button:disabled{opacity:.45;cursor:default}.next-button.next-primary{background:var(--next-accent);color:#fff;border-color:var(--next-accent)}.next-button.next-primary:hover{background:#923429}.next-button.next-danger{color:#a22d24;border-color:#d1a09b}.next-test-badge{font:700 10px/1 system-ui;letter-spacing:.08em;padding:6px 7px;border:1px solid #b9c6d2;border-radius:4px;color:#345f82;background:#edf4fa}.next-save-status{font:500 11px/1.4 system-ui;color:#56616a}.next-organise{display:block;margin:10px;width:calc(100% - 20px)}
.next-dialog{box-sizing:border-box;width:min(660px,calc(100vw - 40px));max-height:calc(100vh - 48px);padding:0;border:1px solid #acb7c0;border-radius:10px;background:#fff;color:var(--next-ink);box-shadow:0 18px 70px #15202b44;font:13px/1.5 system-ui,sans-serif;overflow:auto}.next-dialog::backdrop{background:#101c2b65;backdrop-filter:blur(2px)}.next-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:22px 24px 18px;border-bottom:1px solid #dde1e5;background:#f7f8fa}.next-dialog h2{font-size:22px;line-height:1.3;font-weight:650;letter-spacing:-.03em;margin:0 0 6px}.next-dialog header p{margin:0;max-width:640px;color:var(--next-muted)}.next-dialog-body{padding:20px 24px}.next-dialog>footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 24px;border-top:1px solid #dde1e5;background:#f7f8fa;position:sticky;bottom:0;z-index:2}.next-dialog input,.next-dialog select{box-sizing:border-box;min-height:35px;padding:7px 9px;background:#fff;color:#252b32;border:1px solid #b6bfc8;border-radius:4px;font:13px system-ui}.next-dialog label{display:flex;flex-direction:column;gap:5px;font-weight:600;color:#343e48}.next-dialog label.next-check{flex-direction:row;align-items:center;gap:10px;font-weight:500;margin:14px 0}.next-check input{min-height:auto;width:17px;height:17px;accent-color:var(--next-blue)}.next-field-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:16px}.next-explain{color:var(--next-muted);font-size:12px;margin:12px 0 20px}.next-result{display:flex;flex-direction:column;gap:5px;padding:18px;border:1px solid #c8d9e6;border-radius:6px;background:#f3f8fc}.next-result strong{font-size:21px;font-weight:650;letter-spacing:-.02em}.next-result span{color:#425b70}.next-fine{font-size:11px;color:#68737d;margin:14px 0 0}.next-feedback{min-height:1em;font-size:12px;color:#884330;padding:0 24px;margin:0 0 12px}.next-count{margin-right:auto;font-weight:600;color:#50616e}
.next-pages{width:min(1100px,calc(100vw - 40px))}.next-page-toolbar{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap;margin-bottom:20px}.next-page-toolbar label{width:200px}#nextPageActions{display:flex;gap:6px;flex-wrap:wrap}.next-page-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px;max-height:56vh;overflow:auto;padding:4px}.next-page-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;background:#f4f5f7;border:2px solid transparent;border-radius:7px;padding:15px 12px 12px;cursor:pointer;user-select:none}.next-page-card canvas{width:auto;height:150px;max-width:100%;object-fit:contain;background:white;box-shadow:0 2px 5px #0002;margin:7px 0 8px}.next-page-card>span:last-child{font-size:11px;color:#586570}.next-page-card.selected{border-color:var(--next-blue);background:#eaf2f9}
.next-page-card[data-drop-side]::after{content:"";position:absolute;top:0;bottom:0;width:4px;background:var(--next-accent);border-radius:2px;pointer-events:none}
.next-page-card[data-drop-side="before"]::after{left:-4px}
.next-page-card[data-drop-side="after"]::after{right:-4px}.next-page-tick{position:absolute;top:8px;left:8px;width:19px;height:19px;display:grid;place-items:center;z-index:1;border:1px solid #9daab5;border-radius:3px;background:white;font-weight:700}.selected .next-page-tick{background:var(--next-blue);border-color:var(--next-blue);color:white}
.next-review{width:min(1180px,calc(100vw - 40px))}.next-review-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:15px;margin-bottom:20px}.next-table-scroll{max-height:52vh;overflow:auto;border:1px solid #d9dfe4;border-radius:5px}.next-review-table{width:100%;border-collapse:collapse;font-size:12px}.next-review-table th{background:#edf1f5;position:sticky;top:0;text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#465866;z-index:1}.next-review-table td,.next-review-table th{padding:10px;border-bottom:1px solid #e2e7ec;vertical-align:middle}.next-review-table tbody tr:nth-child(even){background:#f8fafb}.next-review-table td:nth-child(3),.next-review-table td:nth-child(6){max-width:250px;overflow-wrap:anywhere}.next-review-table select{font-size:12px;min-width:100px}.next-empty{padding:30px;text-align:center;color:#5d6974}.next-dialog [hidden]{display:none!important}
@media(max-width:950px){.next-save-status{display:none}.next-field-grid,.next-review-filters{grid-template-columns:1fr}.next-dialog>header,.next-dialog-body{padding:16px}.next-dialog>footer{padding:12px 16px}.next-page-grid{grid-template-columns:repeat(auto-fill,minmax(125px,1fr))}.next-page-card canvas{height:125px}}

/* A single file workflow; legacy handlers remain available to the core. */
body.ui-test #saveBtn,body.ui-test #mergePdfBtn,#saveEditableBtn,#ksHeaderSave,#ksHeaderExport,#mergePanelBtn{display:none!important}
.next-dialog [hidden]{display:none!important}
.next-page-toolbar{flex-wrap:wrap}.next-page-toolbar button{margin:2px}
.next-guide{position:absolute;top:12px;left:50%;transform:translateX(-50%);z-index:25;background:#fff;border:1px solid #b8cdc8;border-radius:9px;padding:10px 16px;box-shadow:0 4px 20px #153b2820;display:flex;gap:12px;align-items:center;max-width:80%}
.next-guide[hidden]{display:none}.next-scale-result{font-size:12px;color:#225c49;padding:4px 8px}.next-temp-card input{width:100%}
body.ks-commercial .k176-path-control,body.ks-commercial .k173-spline-html,body.ks-commercial .k173-spline-control,body.ks-commercial .k27-point-insert{display:none!important}

body.ui-test .ks-fi-card:has(> .ks-project-list){display:none!important}

/* Replaced by k105SelectionModifierBadge, which clears on key release and pointer leave. */
#k36SelectionBadge{display:none!important}

/* Page view stays close to the existing navigation; the editable sheet remains native. */
.next-view-controls{display:inline-flex;align-items:center;gap:8px;margin-left:8px;white-space:nowrap}.next-view-controls select{font:inherit;font-size:12px;border:1px solid #c6d0d9;border-radius:5px;padding:5px;background:#fff;color:#25342f}.next-render-quality{font-size:11px;color:#547066;min-width:56px}.next-render-quality[data-state="refreshing"]{color:#746b46}.next-render-quality[data-state="error"]{color:#a33030}
.next-scroll-page{position:absolute;z-index:1;pointer-events:auto}.next-scroll-label{position:absolute;top:-32px;left:0;height:25px;border:0;border-radius:4px;background:transparent;color:#536575;font:12px system-ui;padding:4px 8px;cursor:pointer}.is-current .next-scroll-label{background:#176d59;color:#fff}.next-scroll-sheet{position:absolute;left:0;top:0;transform-origin:0 0;background:white;box-shadow:0 2px 12px #152a402b;overflow:hidden}.next-scroll-sheet>canvas,.next-scroll-marks{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.next-scroll-marks>svg{width:100%;height:100%;pointer-events:none}.next-scroll-sheet[hidden]{display:none!important}body.next-continuous #page{z-index:2}body.next-view-export .next-scroll-page{display:none}
.next-window-status{position:fixed;z-index:2147483646;inset:0;display:grid;place-items:center;padding:32px;background:#e9eff2dd;color:#153f34;font:600 18px/1.5 system-ui;text-align:center}.next-window-status[hidden]{display:none}
@media(max-width:1100px){.next-render-quality{display:none}#nextMoveWindow{max-width:110px;white-space:normal;font-size:11px}.next-view-controls{gap:4px;margin-left:4px}}

.next-markup-choice{border:0;padding:0;margin:4px 0 12px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.next-markup-choice legend{font-weight:650;font-size:13px;margin-bottom:8px}.next-markup-choice>label{display:flex;flex-direction:row;align-items:flex-start;gap:9px;padding:12px;border:1px solid #c6d0d9;border-radius:7px;cursor:pointer}.next-markup-choice>label:has(input:checked){border:2px solid #176d59;padding:11px;background:#f0f6f3}.next-markup-choice>label:has(input:disabled){opacity:.55;cursor:default}.next-markup-choice input{width:auto!important;margin:3px 0 0;accent-color:#176d59}.next-markup-choice strong{display:block;font-size:13px}.next-markup-choice small{display:block;font-size:12px;font-weight:400;line-height:1.45;margin-top:4px;color:#52645c}#nextPdfAdvanced{margin-top:14px}#nextPdfAdvanced summary{font-size:13px;cursor:pointer}#nextPdfAdvanced .next-check{margin-top:12px}#nextPdfCopyNotice{font-size:13px;line-height:1.5}
@media(max-width:600px){.next-markup-choice{grid-template-columns:1fr}}

.next-format-guide{background:#f3f5f4;border:1px solid #d8dfdb;border-radius:7px;padding:4px 14px;margin:12px 0}.next-format-guide p{font-size:13px;line-height:1.55;margin:10px 0}.next-flatten-choice{margin-top:14px;font-weight:600}#nextProjectAdvice{border-left:3px solid #176d59;padding:8px 12px;background:#f0f6f3}.next-scope-choice{border:1px solid #ccd5d0;border-radius:6px;padding:10px 12px;display:flex;gap:24px;margin:12px 0}.next-scope-choice legend{font-weight:600;padding:0 5px}.next-scope-choice label{display:flex!important;flex-direction:row!important;align-items:center;gap:6px;margin:0!important}.next-scope-choice input{width:auto!important;margin:0!important}.k-next-follow-pages{display:flex;align-items:center;gap:5px;white-space:nowrap}.k-next-follow-pages input{width:auto}#nextOverlayPairStatus{font-size:12px;color:#42574d;max-width:190px}#uiCompareScopeHelp{font-size:13px;line-height:1.5;padding:10px 12px;background:#f1f5f3;border-radius:6px}

#nextOverlayPageField[hidden],#nextOverlayCrop[hidden],.k-next-follow-pages[hidden]{display:none!important}

/* Stable render feedback and drawing tabs in the existing document toolbar. */
#k201ViewControls .next-render-quality,.next-render-quality{display:inline-block;box-sizing:border-box;flex:0 0 72px;width:72px;min-width:72px;max-width:72px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
body.ui-test #uiTestChrome{grid-template-rows:38px 41px 38px auto}
body.ui-test.ui-comparison-document #uiTestChrome{grid-template-rows:38px 41px 38px auto auto}
body.ui-test #uiTestChrome>.ui-top{grid-row:1}
body.ui-test #uiTestChrome>.ui-doc{grid-row:2;flex-wrap:nowrap;overflow-x:auto!important;overflow-y:hidden}
body.ui-test #uiTestChrome>.ui-categories{grid-row:3}
body.ui-test #uiTestChrome>.ui-tools{grid-row:4}
body.ui-test .k202-document-strip{display:flex;align-items:center;gap:4px;flex:1 1 0;min-width:132px;height:32px;padding:0;box-sizing:border-box}
body.ui-test .k202-document-strip[hidden]{display:none!important}
body.ui-test .k202-document-strip .ui-tabs{display:flex;align-items:center;gap:4px;flex:1 1 0;max-width:none;min-width:0;overflow:hidden}
body.ui-test .k202-document-strip #docTabs{order:1;flex:1 1 0;width:0;min-width:0;height:30px;padding:0;border:0;border-radius:0;gap:3px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;background:transparent}
body.ui-test .k202-document-strip #docTabs::-webkit-scrollbar{display:none}
body.ui-test .k202-document-strip #docTabs .k100-doc-tab{flex:0 1 var(--k203-tab-width,170px);min-width:100px;max-width:170px;box-sizing:border-box;border-radius:4px}
body.ui-test .k202-document-strip #docTabs .k100-doc-tab [role=tab]{font-weight:500}
body.ui-test .k202-document-strip #docTabs .k100-doc-tab.active [role=tab]{font-weight:600}
#k202OpenDrawings{order:2;flex:0 0 30px;width:30px;min-width:30px;align-self:center;height:28px;margin:0;padding:0;border:1px solid #c8c1b8;border-radius:4px;color:#332f29;font:12px Arial,sans-serif;appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%234b443c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;cursor:pointer}
#k202OpenDrawings option{background:#fff;color:#332f29}
#k202OpenDrawings[hidden]{display:none!important}
#k202OpenDrawings:focus-visible{outline:2px solid #176d59;outline-offset:1px}
body.ui-test .ui-document-actions .k203-action-icon{display:none}
body.ui-test .ui-document-actions [data-k203-command=window]{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;min-width:32px;max-width:32px;height:30px;min-height:30px;padding:0;font-size:0!important;white-space:nowrap!important}
body.ui-test .ui-document-actions [data-k203-command=window] .k203-action-icon{display:block;flex:none}
@media(max-width:1300px){
 #k201ViewControls .next-render-quality{display:none}
 body.ui-test .ui-document-actions [data-k203-command]{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;min-width:30px;max-width:30px;height:30px;min-height:30px;padding:0;font-size:0}
 body.ui-test .ui-document-actions [data-k203-command]>span{display:none}
 body.ui-test .ui-document-actions [data-k203-command]>svg{display:block}
 body.ui-test .ui-document-actions{gap:3px;padding-right:5px}
 body.ui-test .ui-document-actions>#nextSavePdf,body.ui-test .ui-document-actions>#nextSaveAs{padding-inline:8px;font-size:12px}
}
@media(max-width:980px){
 body.ui-test #k201ViewControls .k201-wheel{font-size:0;padding-left:2px;gap:0}
 body.ui-test #k201ViewControls .k201-wheel select{font-size:11px}
 body.ui-test #k201ViewControls .next-view-controls{margin-left:2px}
 body.ui-test .k202-document-strip{min-width:118px}
}
@media print{.k202-document-strip{display:none!important}}

/* Unit-specific controls must respect hidden, including inside styled fields. */
body.ui-test .ks-field[hidden],body.ui-test .k202-field[hidden],#k213LengthFormat[hidden]{display:none!important}
#k209PageUnits small,#k213LengthFormat small{display:block;margin:5px 0 0;font:400 11px/1.45 Arial,Helvetica,sans-serif;letter-spacing:normal;text-transform:none;color:#60717d}
#k213LengthFormat{margin-top:10px;padding-top:10px;border-top:1px solid #e2e5e7;font:400 12px/1.4 Arial,Helvetica,sans-serif;letter-spacing:normal;text-transform:none;color:#35434d}
#k213LengthFormat .k213-precision{display:flex;flex-direction:column;gap:4px;font:inherit}
#k213LengthFormat select{box-sizing:border-box;width:100%;height:34px;padding:6px 8px;border:1px solid #d5dce0;border-radius:6px;background:#fff;color:#243847;font:400 12px Arial,Helvetica,sans-serif}
#k213LengthFormat .k213-zero-feet{display:flex;align-items:center;gap:7px;margin:9px 0;font:inherit}
#k213LengthFormat input[type=checkbox]{display:inline-block;box-sizing:border-box;flex:0 0 16px;width:16px!important;height:16px!important;margin:0!important;padding:0}
#k238CalibrationPrompt{position:fixed;z-index:12060;box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #93b5d9;border-left:4px solid #2563eb;border-radius:6px;background:#f7fbff;box-shadow:0 2px 8px #152a4020;color:#243847;font:12px/1.4 Arial,Helvetica,sans-serif;pointer-events:none}
#k238CalibrationPrompt strong,#k238CalibrationPrompt small{display:block}
#k238CalibrationPrompt strong{font-size:13px}
#k238CalibrationPrompt small{margin-top:3px;color:#536979;font-size:11px}
#k238CalibrationPrompt button{flex:none;pointer-events:auto;border:1px solid #b4c6d7;border-radius:4px;background:#fff;padding:5px 8px;color:#243847;font:12px Arial,Helvetica,sans-serif;cursor:pointer}
body[data-k238-calibrating=true] #page,body[data-k238-calibrating=true] #markups{cursor:crosshair!important}
@media print{#k238CalibrationPrompt{display:none!important}}

#nextAlignGuide{flex-wrap:wrap}#nextAlignGuide>span{flex:1 1 220px}#nextAlignGuide .next-align-movement:not([hidden]){display:grid;gap:3px;font-size:11px}#nextAlignMovement{max-width:170px;font:inherit;padding:4px}

/* Keep menus and workflows distinct; grow the header when a row must wrap. */
body.ui-test .ui-menus{flex:0 0 auto}
@media(max-width:1280px){body.ui-test #uiTestChrome{grid-template-rows:minmax(38px,auto) 41px 38px auto}body.ui-test.ui-comparison-document #uiTestChrome{grid-template-rows:minmax(38px,auto) 41px 38px auto auto}body.ui-test .ui-top{flex-wrap:wrap;min-height:38px;row-gap:4px}body.ui-test .ui-top-right{flex-wrap:wrap}}
