/* Web workspace aligned with the existing desktop: quiet surfaces, fixed navigation, compact records. */
.payment-state{display:inline-block;font-size:11px;border-radius:5px;padding:2px 7px;margin:6px 0;background:#fff3da;color:#966514}.payment-state[data-state=paid]{background:#eaf5ef;color:#31704b}.payment-state[data-state=failed]{background:#fff0ed;color:#ad4738}
:root{--primary:#386ee8;--surface:#fff;--bg:#f5f5f7;--text:#202124;--muted:#747b86;--border:#e3e5e9}
body.desktop-shell{margin:0;background:var(--bg);color:var(--text);font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei UI","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
.desktop-shell *{box-sizing:border-box}.desktop-shell [hidden]{display:none!important}.desktop-shell a{color:var(--primary)}
.desktop-shell button,.desktop-shell input,.desktop-shell select,.desktop-shell textarea{font:inherit;border-radius:8px}.desktop-shell button{padding:8px 14px;min-height:36px;border:1px solid #dce0e7;background:white;color:#424955;cursor:pointer}.desktop-shell button:hover{background:#f3f6fc;border-color:#bccbeb}.desktop-shell button.primary{background:var(--primary);color:white;border-color:var(--primary);box-shadow:none}.desktop-shell button:disabled{opacity:.5;cursor:default}.desktop-shell :focus-visible{outline:2px solid var(--primary);outline-offset:3px}
.desktop-shell input,.desktop-shell select,.desktop-shell textarea{padding:8px 10px;border:1px solid #dce0e7;background:white;color:var(--text)}.desktop-shell h1{font-size:23px;line-height:1.4;margin:0;font-weight:650}.desktop-shell h2{font-size:17px}.desktop-shell .muted,.desktop-shell small{color:#747b86}.desktop-shell strong,.desktop-shell .money{font-variant-numeric:tabular-nums}
.app-sidebar{position:fixed;inset:0 auto 0 0;width:208px;background:#fff;border-right:1px solid var(--border);display:flex;flex-direction:column;z-index:40;padding:0}.app-brand{height:76px;padding:20px 20px 12px;display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--primary)!important}.app-brand strong{font-size:17px}.app-logo{display:grid;place-items:center;width:33px;height:33px;border-radius:10px;background:#edf2fd;font-size:23px}.app-brand-caption{margin:0 22px 20px;font-size:11px;letter-spacing:2px;color:#969daa}.app-sidebar nav{display:grid;gap:5px;padding:0 10px}.app-nav-link{display:flex;align-items:center;gap:12px;padding:11px 13px;border-radius:8px;text-decoration:none;color:#616771!important}.app-nav-icon{width:20px;text-align:center;font-size:20px;line-height:1}.app-nav-link:hover{background:#f8f9fb}.app-nav-link[aria-current]{background:#edf2fd;color:#386ee8!important;font-weight:600}.app-sidebar-footer{margin-top:auto;border-top:1px solid var(--border);padding:18px 22px;display:grid;gap:10px}.app-sidebar-footer>a{color:#616771;text-decoration:none}.app-sidebar-footer>button{text-align:left;padding:0!important;border:0!important;font-size:12px!important;min-height:25px!important;color:#858d99!important}.app-user{display:grid;margin-bottom:8px}.app-user strong{font-size:13px}.app-user small{font-size:11px}
.desktop-shell>.app-sidebar~header,.desktop-shell .workspace-heading{margin:0 0 0 208px;padding:22px 32px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:16px;min-height:87px}.desktop-shell>header>div:first-of-type,.desktop-shell .workspace-heading>div{flex:1}.desktop-shell header .brand{display:none}.desktop-shell header>a{font-size:12px;text-decoration:none}.desktop-shell #identity,.desktop-shell #logout,.desktop-shell #account-settings{display:none!important}.desktop-shell .workspace{display:block;min-height:100vh}.desktop-shell>main,.desktop-shell .workspace>main{margin:0 0 0 208px;padding:24px 32px;max-width:none;width:auto;min-width:0}.desktop-shell .workspace>main>.workspace-heading{margin:-24px -32px 24px;padding:22px 32px}.desktop-shell .workspace-heading p{font-size:12px;margin:4px 0 0}.desktop-shell #environment{display:none}.desktop-shell #notice:empty,.desktop-shell #message:empty{display:none}.desktop-shell #notice:not(:empty),.desktop-shell #message:not(:empty){padding:10px 14px;border-radius:8px;background:#edf2fd;color:#285bc9}
.desktop-shell .card,.desktop-shell .task-card,.desktop-shell .cost-record,.desktop-shell .settlement-record{box-shadow:none;border:1px solid var(--border);border-radius:10px;background:#fff}.desktop-shell .cost-summary{gap:14px;margin:18px 0;grid-template-columns:repeat(2,minmax(0,1fr))}.desktop-shell .cost-summary .card{padding:16px 20px}.desktop-shell .cost-summary strong{font-size:25px;margin:5px 0}.desktop-shell .cost-summary span{font-size:12px;color:#737b88}.desktop-shell .cost-summary small{font-size:11px}.desktop-shell #project-title{font-size:16px;margin:12px 0 4px}.desktop-shell #snapshot{font-size:12px;margin:6px 0 14px}.desktop-shell #cost-workspace>label{display:flex;align-items:center;gap:12px;color:#747b86;font-size:12px}.desktop-shell #project-select{max-width:100%;width:auto;min-width:280px;font-size:14px;color:#202124}.desktop-shell .cost-location{margin:16px 0 10px}.desktop-shell .cost-location button{font-size:12px;padding:5px 10px;min-height:30px}.desktop-shell .cost-location strong{font-size:13px;color:#616771}
.cost-type-tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin:12px 0 0;overflow-x:auto;white-space:nowrap}.cost-type-tabs button,.cost-type-tabs a{background:transparent!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;padding:12px 18px!important;text-decoration:none;color:#616771}.cost-type-tabs button[aria-pressed=true]{color:#386ee8;border-bottom-color:#386ee8!important;font-weight:600}.desktop-shell .type-filter-fallback{display:none!important}.desktop-shell .cost-filters{margin:14px 0;align-items:end;gap:12px}.desktop-shell .cost-filters label{font-size:12px;color:#747b86}.desktop-shell .cost-filters input,.desktop-shell .cost-filters select{font-size:14px}.desktop-shell .cost-filters .cost-search{min-width:220px}.desktop-shell .cost-record{padding:14px 18px;margin:0 0 8px}.desktop-shell .cost-record h3{font-size:14px;font-weight:600}.desktop-shell .cost-record summary small{font-size:12px;margin-top:3px}.desktop-shell .cost-record summary .money{font-size:14px;color:#414955}.desktop-shell .cost-record .detail{border-top:1px solid #edf0f4;margin-top:12px;padding-top:16px}.desktop-shell .unit-card{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:3px 24px;align-items:center}.desktop-shell .unit-card>h3{grid-column:1;margin:0}.desktop-shell .unit-card>small{grid-column:1}.desktop-shell .unit-card>.unit-actions{grid-column:2;grid-row:1/3;margin:0}.desktop-shell .unit-card>p{grid-column:3;grid-row:1/3;font-size:13px;white-space:nowrap}.desktop-shell .unit-card>.unit-actions button{font-size:12px;background:#f8f9fb}.desktop-shell #count{font-size:12px;color:#747b86}.desktop-shell #management-actions{padding:0 0 14px;gap:8px;display:flex;flex-wrap:wrap}.desktop-shell #management-actions>*{font-size:12px}.desktop-shell #management-actions>a{padding:8px 0;margin-right:auto;text-decoration:none}.record-management-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.record-management-actions button{font-size:12px!important}.desktop-shell .detail>details{padding:12px 0}.desktop-shell .detail>details>summary{font-weight:600;color:#386ee8}.desktop-shell details.usage-note{font-size:12px;color:#747b86;margin:10px 0}.desktop-shell details.usage-note>summary{cursor:pointer}.desktop-shell details.usage-note>p{max-width:900px}
.desktop-shell .project-board{display:grid;grid-template-columns:1fr;gap:18px}.project-card-head{display:flex;justify-content:space-between;align-items:start;gap:20px}.project-card-head h2{margin:0 0 4px;font-size:16px}.project-card-head p{font-size:11px;margin:0}.project-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:22px 0 16px}.project-metric{padding-right:14px;border-right:1px solid #edf0f4}.project-metric:last-child{border:0}.project-metric span{display:block;font-size:11px;color:#747b86}.project-metric strong{display:block;font-size:22px;font-weight:600;margin-top:5px}.project-card-footer{border-top:1px solid #edf0f4;padding-top:13px;display:flex;align-items:center;gap:18px;font-size:12px}.project-card-footer a{text-decoration:none}.project-card-footer small{margin-right:auto}.desktop-shell .project-board .task-card{border-left:1px solid var(--border);padding:22px 24px}.desktop-shell #task-list{grid-template-columns:1fr}.desktop-shell #task-list .task-card{padding:18px 22px}.desktop-shell #task-list .task-card h2{font-size:15px}.desktop-shell #task-list .task-card footer{justify-content:flex-end}.desktop-shell #task-list .task-card footer button{padding:5px 12px;min-height:30px;font-size:12px}.desktop-shell .task-filters{background:white;padding:16px;border:1px solid var(--border);border-radius:10px}.desktop-shell .task-meta span{background:#f5f6f9;border-radius:5px;padding:2px 7px}.desktop-shell .task-card .description{font-size:13px}.desktop-shell dialog{box-shadow:0 20px 60px #18243b26;border-color:var(--border);border-radius:14px}.desktop-shell dialog h2{font-size:18px}.desktop-shell .cost-editor{width:min(690px,94vw);padding:24px}.desktop-shell .cost-editor form>div>label{margin-bottom:14px}.desktop-shell .cost-editor p{font-size:13px;line-height:1.7}.desktop-shell .cost-editor input[type=checkbox]{width:auto}
.sync-explainer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:24px}.sync-explainer .card{padding:20px}.sync-explainer small{display:block;margin-top:8px}.sync-ok{color:#258467}.sync-project{padding:18px 22px;margin-bottom:12px}.sync-project h2{margin:0 0 8px}.sync-project p{margin:3px 0}.app-menu,.app-nav-shade{display:none!important}.desktop-shell.app-guest>.app-sidebar~header,.desktop-shell.app-guest>main,.desktop-shell.app-guest .workspace>main{margin-left:0}.desktop-shell.app-guest #login-panel{max-width:400px;margin:70px auto;padding:30px}.desktop-shell.app-guest #login-panel h2{font-size:22px}.desktop-shell.app-guest #login-panel button{width:100%;margin-top:12px}
@media(min-width:1500px){.desktop-shell>main,.desktop-shell .workspace>main{padding-left:44px;padding-right:44px}.desktop-shell .workspace>main>.workspace-heading{margin-left:-44px;margin-right:-44px;padding-left:44px;padding-right:44px}}
@media(max-width:1100px){.desktop-shell .unit-card{grid-template-columns:minmax(160px,1fr) auto}.desktop-shell .unit-card>p{grid-column:1;grid-row:auto}.project-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.project-metric:nth-child(2){border:0}}
@media(max-width:760px){.app-sidebar{transform:translateX(-100%);transition:transform .15s}.nav-open .app-sidebar{transform:none}.desktop-shell>main,.desktop-shell .workspace>main{margin-left:0;padding:18px 16px}.desktop-shell>.app-sidebar~header{margin-left:0;padding:15px 16px;min-height:70px}.desktop-shell .workspace>main>.workspace-heading{margin:-18px -16px 18px;padding:15px 16px;min-height:70px}.desktop-shell h1{font-size:20px}.app-menu{display:block!important;padding:5px 10px!important;font-size:20px!important;flex:none}.desktop-shell.app-guest .app-menu{display:none!important}.nav-open .app-nav-shade{display:block!important;position:fixed;inset:0;background:#18243b55;border:0;border-radius:0;z-index:39}.desktop-shell header>a{display:none}.desktop-shell .cost-summary{grid-template-columns:1fr 1fr;gap:10px}.desktop-shell .cost-summary .card{padding:12px}.desktop-shell .cost-summary strong{font-size:19px;overflow-wrap:anywhere}.desktop-shell #cost-workspace>label{display:grid;gap:4px}.desktop-shell #project-select{width:100%;min-width:0;font-size:12px}.cost-type-tabs button,.cost-type-tabs a{padding:11px 13px!important;font-size:13px}.desktop-shell .cost-filters label{width:auto;flex:1}.desktop-shell .cost-filters .cost-search{min-width:0;flex-basis:100%}.desktop-shell .unit-card{display:block;padding:16px}.desktop-shell .unit-card>.unit-actions{margin:12px 0}.desktop-shell .unit-card>p{white-space:normal}.desktop-shell .cost-record summary{gap:8px}.desktop-shell .cost-record .detail{padding-top:12px}.project-card-head{display:block}.project-metrics{gap:12px}.project-metric strong{font-size:18px;overflow-wrap:anywhere}.project-card-footer{flex-wrap:wrap;gap:10px}.project-card-footer small{flex-basis:100%}.desktop-shell .project-board .task-card{padding:18px}.sync-explainer{grid-template-columns:1fr;gap:10px}.sync-explainer .card{padding:14px 18px}.desktop-shell .task-filters{padding:12px}.desktop-shell .cost-editor{padding:18px}.desktop-shell #management-actions>a{flex-basis:100%}.desktop-shell.app-guest #login-panel{margin:30px auto}}
@media(prefers-reduced-motion:reduce){.app-sidebar{transition:none}}
@media(max-width:760px){.app-sidebar{visibility:hidden}.nav-open .app-sidebar{visibility:visible}}
/* Quiet editorial hierarchy: ink headings, blue navigation, restrained financial accents. */
.cost-top-actions{display:flex;gap:8px;flex-wrap:wrap;flex:none!important}.action-link{padding:7px 13px;border:1px solid #dae3f2;border-radius:7px;background:#fff;text-decoration:none;font-size:12px}.action-link:last-child{background:#fff8e9;color:#976320;border-color:#eadbbf}
.metric-help{border:0;margin:0;padding:0;position:absolute;right:14px;top:12px;font-size:11px}.metric-help>summary{list-style:none;color:#7688a2}.metric-help p{position:relative;max-width:300px;background:white;border:1px solid #dce4f0;border-radius:8px;padding:12px;box-shadow:0 8px 20px #223a6014;color:#52637a}.desktop-shell .cost-summary .card:has(.metric-help[open]){overflow:visible;z-index:3}.desktop-shell .cost-summary .card:first-child>span{padding-right:75px}.desktop-shell .cost-filters .cost-search{order:-1}.desktop-shell #management-actions{justify-content:flex-end;margin:8px 0 14px}.business-overview{background:white;border:1px solid #dfe6ef;border-radius:10px;padding:16px;margin:14px 0 22px}.business-overview>summary{font-size:15px;font-weight:650;color:#263c59}.business-overview>small{font-size:11px;margin:8px 0}.business-budget{display:flex;gap:24px;flex-wrap:wrap;font-size:13px;color:#536982;margin:14px 0}.business-budget strong{color:#286c68}.business-kind{padding:0;border:1px solid #e2e8f0;border-radius:7px;margin:8px 0;overflow:hidden}.business-kind>summary{padding:13px;display:flex;align-items:center;gap:14px;font-size:13px}.business-kind>summary:before{content:'›';color:#8595ad}.business-kind[open]>summary:before{content:'⌄'}.business-kind>summary::-webkit-details-marker{display:none}.business-figures{display:flex;gap:14px;flex-wrap:wrap;margin-left:auto;color:#536982;font-variant-numeric:tabular-nums;font-size:12px}.business-figures>span:nth-child(2){color:#a46f23}.business-records{padding:10px;background:#f6f8fb}
@media(max-width:760px){.cost-top-actions{gap:5px}.action-link{font-size:11px;padding:5px 8px}.metric-help{position:static;margin:4px 0}.desktop-shell .cost-summary .card:first-child>span{padding:0}.metric-help p{max-width:100%;font-size:11px}.business-overview{padding:12px}.business-kind>summary{flex-wrap:wrap;gap:6px}.business-figures{flex-basis:100%;margin-left:14px;display:grid;grid-template-columns:1fr 1fr;gap:6px}.business-budget{gap:8px}.desktop-shell .cost-filters label{min-width:110px}.desktop-shell #management-actions{justify-content:flex-start}}
:root{--bg:#f3f5f9;--text:#24334b;--border:#e2e8f0;--primary:#315fc4}
.desktop-shell h1{letter-spacing:-.5px;color:#172943}.app-brand strong{color:#243d64}.app-logo{background:#eaf0fd;color:#315fc4}.app-nav-link[aria-current]{background:#eaf0fc!important;color:#234fba!important;box-shadow:inset 3px 0 #416bd6}.app-sidebar{border-right-color:#e4e9f2}.desktop-shell>.app-sidebar~header,.desktop-shell .workspace-heading{background:#ffffffed}.desktop-shell .card,.desktop-shell .task-card{box-shadow:0 2px 8px #20395704}
.desktop-shell .cost-summary .card{position:relative;overflow:hidden;padding:16px 20px;background:linear-gradient(120deg,#fff,#f9fbff)}.desktop-shell .cost-summary .card:before{content:'';position:absolute;left:0;top:20px;bottom:20px;width:3px;border-radius:3px;background:#5479d8}.desktop-shell .cost-summary .card:last-child:before{background:#36948a}.desktop-shell .cost-summary strong{color:#203956;font-size:27px;letter-spacing:-.6px}.desktop-shell .cost-summary .card:last-child strong{color:#246f69}.desktop-shell #snapshot{color:#8090a7}.desktop-shell .cost-location{margin:12px 0 4px}.desktop-shell .cost-filters{margin:12px 0;padding:14px 16px;background:white;border:1px solid var(--border);border-radius:10px}.desktop-shell #count{margin:6px 0 12px}.desktop-shell #management-actions{padding-bottom:3px}.desktop-shell .project-metric strong{color:#253e61}.desktop-shell .project-card-footer a:last-child{padding:6px 12px;background:#edf2fc;border-radius:6px}
.tree-toolbar{display:flex;align-items:center;gap:8px;margin:8px 0 12px}.tree-toolbar>span{margin-right:auto;font-size:12px;color:#7d899a}.desktop-shell .tree-toolbar button{font-size:12px;padding:5px 10px;min-height:30px}
.tree-node{border:0;margin:0}.tree-node>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:13px 16px;min-height:49px;border-bottom:1px solid #e8edf5;transition:background .12s}.tree-node>summary::-webkit-details-marker{display:none}.tree-node>summary:hover{background:#eaf0fa}.tree-name{display:flex;align-items:center;gap:10px;min-width:0}.tree-name strong{font-size:13px;font-weight:550;overflow-wrap:anywhere}.tree-arrow{font-size:22px;color:#8494ac;line-height:1;display:inline-block;transition:transform .15s;flex:none}.tree-node[open]>summary .tree-arrow{transform:rotate(90deg)}.tree-count{font-size:11px;color:#7c8da6;background:#f0f3f8;border-radius:20px;padding:1px 7px;white-space:nowrap}.tree-figures{display:flex;align-items:center;gap:9px;white-space:nowrap;flex:none}.tree-figures small{font-size:11px}.tree-figures>strong{color:#253e61;font-size:14px;font-variant-numeric:tabular-nums}.tree-warning{color:#a96a20;background:#fff5df;border:1px solid #f1ddbd;border-radius:5px;padding:1px 6px;font-size:11px}
.tree-level-0{background:white;border:1px solid #dfe6f0;border-radius:12px;overflow:hidden;margin-bottom:16px;box-shadow:0 3px 12px #223a6004}.tree-level-0>summary{background:#f8faff;padding:16px 18px;border-left:3px solid #5479d8}.tree-level-0>summary .tree-name strong{font-size:15px;font-weight:650}.tree-level-0>summary .tree-figures>strong{font-size:17px}.tree-level-0>.tree-children{padding:0 14px 10px}.tree-level-1>summary{background:#eff4fd;margin-top:1px;border-radius:5px}.tree-level-1>.tree-children{margin-left:20px;border-left:1px solid #dce5f4}.tree-level-2>summary{background:#fafbfd}.tree-level-2>.tree-children{margin-left:18px;border-left:1px solid #e7ecf4}.tree-level-3>summary{background:white}.tree-level-3>.tree-children{padding:8px 10px 8px 18px;background:#f8fafc}.desktop-shell .tree-children .cost-record{margin:0 0 6px;padding:12px 15px;box-shadow:none}.tree-archive{margin-top:10px;border:1px dashed #d5dce7;border-radius:7px;overflow:hidden}.tree-archive>summary{background:#f7f8fa}.tree-archive>summary .tree-name strong{color:#7b879b}.tree-archive .tree-figures>small{font-size:11px}.desktop-shell .tree-children .cost-record h3{font-size:13px}
@media(max-width:760px){.desktop-shell .cost-summary strong{font-size:19px}.desktop-shell .cost-summary .card{padding:12px}.desktop-shell .cost-filters{padding:12px}.tree-toolbar{flex-wrap:wrap}.tree-toolbar>span{flex-basis:100%}.tree-node>summary{padding:11px 10px;gap:5px;flex-wrap:wrap}.tree-name{flex:1 1 100%;gap:7px}.tree-figures{padding-left:20px;flex-wrap:wrap;white-space:normal;gap:6px}.tree-level-0>summary .tree-figures>strong{font-size:15px}.tree-level-0>.tree-children{padding:0 6px 6px}.tree-level-1>.tree-children,.tree-level-2>.tree-children{margin-left:8px}.tree-level-3>.tree-children{padding:6px}.tree-name strong{font-size:13px}.tree-count{margin-left:auto}.tree-level-0>summary{padding:12px}.desktop-shell .tree-children .cost-record summary{flex-wrap:wrap}.desktop-shell .tree-children .cost-record summary .money{font-size:12px}.tree-archive .tree-figures{font-size:10px}}
@media(prefers-reduced-motion:reduce){.tree-node>summary,.tree-arrow{transition:none}}
.desktop-shell .cost-summary .card{margin:0}.desktop-shell #cost-workspace>label{margin:0}.desktop-shell .cost-filters label{margin:0}.desktop-shell .cost-filters>button{margin-top:0}.tree-node{padding-top:0}.desktop-shell .cost-summary{margin:14px 0}.desktop-shell #cost-workspace .cost-location:has(#selected-unit:empty){display:none}
@media(min-width:761px){.desktop-shell:has(#cost-workspace)>header{min-height:70px;padding-top:15px;padding-bottom:15px}.desktop-shell:has(#cost-workspace)>main{padding-top:18px}.desktop-shell .cost-summary .card{padding:12px 18px}.desktop-shell .cost-summary strong{font-size:24px;line-height:1.3;margin:4px 0}.desktop-shell #cost-workspace .cost-filters{padding:10px 14px}.desktop-shell #snapshot{margin-bottom:8px}.desktop-shell #cost-workspace details.usage-note{margin:6px 0;padding-top:6px}.desktop-shell #count{margin:4px 0}.desktop-shell .tree-toolbar{margin:5px 0 8px}}
.party-field{position:relative}.party-field>label{margin-bottom:8px}.party-matches{position:absolute;z-index:20;top:100%;left:0;right:0;max-height:280px;overflow:auto;background:#fff;border:1px solid #ccd6ea;border-radius:8px;box-shadow:0 8px 24px #182f531a;padding:5px}.party-matches button{display:block;width:100%;text-align:left;border:0;border-radius:4px;padding:10px;white-space:normal}.party-matches button:hover,.party-matches button:focus{background:#edf2ff;outline:2px solid #ccd8fc}.party-matches p,.party-matches small{padding:8px;margin:0}.file-picker.drag-active{background:#e4edff;border-color:#335dcc;outline:2px solid #90acf1}#upload-feedback{font-size:13px;color:#315bb8}
.unit-detail{width:min(1260px,94vw);max-width:94vw;max-height:88vh;overflow:auto;border:1px solid #dce3ed;border-radius:14px;padding:22px;color:#20314a}.unit-detail::backdrop{background:#14223866}.unit-detail>h2{margin:0 0 6px}.unit-detail>button:last-child{display:block;margin:18px 0 0 auto}.unit-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.unit-stats section{border:1px solid #dce3ed;border-top:2px solid #507cf0;border-radius:9px;padding:14px}.unit-stats section:last-child{border-top-color:#35a58e}.unit-stats strong{display:block;font-size:22px;margin-top:6px}.unit-section{border:1px solid #e0e6ef;border-radius:9px;overflow:hidden;margin-top:12px}.unit-section h3{background:#f6f8fb;padding:12px;margin:0;font-size:14px}.unit-table-wrap{overflow:auto}.unit-section table{border-collapse:collapse;width:100%;min-width:720px}.unit-section td,.unit-section th{text-align:left;padding:12px;border-bottom:1px solid #e4e9f1;vertical-align:top;font-size:13px}.unit-section td:nth-child(2),.unit-section td:nth-child(3){white-space:nowrap}.unit-section small{display:block;color:#7b879a;margin-top:5px}.unit-section p{padding:12px}@media(max-width:600px){.unit-detail{padding:14px}.unit-stats strong{font-size:18px}}
dialog.unit-detail[open]{display:flex;flex-direction:column;overflow:hidden;padding:0}.unit-dialog-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;border-bottom:1px solid #e0e6ef;flex-shrink:0;background:#fff}.unit-dialog-bar h2{font-size:17px;margin:0;overflow-wrap:anywhere}.unit-dialog-close{flex-shrink:0;width:40px;height:40px;padding:0;font-size:26px;line-height:1;border:0;background:#f3f5f9;border-radius:8px}.unit-dialog-close:hover{background:#e4eafa}.unit-dialog-content{overflow:auto;min-height:0;padding:16px 22px 22px}@media(max-width:600px){.unit-dialog-bar{padding:12px 14px}.unit-dialog-content{padding:12px 14px}}
/* Graphite / amber: shared navigation; business styling scoped to cost only. */
.desktop-shell .app-sidebar{background:#252f39;border-right:1px solid #35414c;color:#f4f5f6}
.desktop-shell .app-brand,.desktop-shell .app-brand strong{color:#f6f7f8!important}
.desktop-shell .app-logo{color:#f2f4f7;background:#ffffff12;border:1px solid #ffffff14}
.desktop-shell .app-brand-caption{color:#a8b1bc;letter-spacing:1px}
.desktop-shell .app-nav-link{color:#d9dfe5!important;min-height:48px}
.desktop-shell .app-nav-link:hover{background:#ffffff09}
.desktop-shell .app-nav-link[aria-current]{background:#ffffff0e!important;color:#fff!important;box-shadow:inset 3px 0 #dbad5d}
.desktop-shell .app-nav-link[aria-current] .app-nav-icon{color:#e6ba6c}
.desktop-shell .app-sidebar-footer{border-color:#ffffff18;color:#f4f6f8}
.desktop-shell .app-sidebar-footer>a,.desktop-shell .app-sidebar-footer>button{background:transparent!important;color:#c4ccd5!important}
.desktop-shell .app-user small{color:#a7b0ba}
.graphite-cost.desktop-shell{--primary:#9a681e;--text:#293440;--border:#e0e4e8;--bg:#f2f4f6;background:var(--bg);color:var(--text);font-family:'Segoe UI','Microsoft YaHei',sans-serif}
.graphite-cost.desktop-shell>header{background:transparent;min-height:84px;border-bottom:0}
.graphite-cost.desktop-shell h1{font-size:29px;color:#202b36;font-weight:700;letter-spacing:-.7px}
.graphite-cost.desktop-shell>main{padding-top:8px}
.graphite-cost .action-link{font-size:13px;color:#34404c;border-color:#d7dde4;padding:10px 16px}
.graphite-cost #risk-link{background:#f4dfb3;border-color:#e6c486;color:#5e431b}
.graphite-cost #cost-workspace>label{background:#fff;border:1px solid var(--border);padding:12px 16px;border-radius:9px}
.graphite-cost.desktop-shell #project-title{font-size:14px;font-weight:500;color:#596675;margin:12px 0 4px}
.graphite-cost.desktop-shell #snapshot{color:#75808e;margin-bottom:16px}
.graphite-cost.desktop-shell .cost-summary{background:#28333e;border:1px solid #35414c;border-radius:11px;gap:0;overflow:visible;margin:18px 0 10px;box-shadow:0 4px 12px #202b3608}
.graphite-cost.desktop-shell .cost-summary .card{background:transparent;border:0;border-radius:0;padding:24px 28px;box-shadow:none;overflow:visible}
.graphite-cost.desktop-shell .cost-summary .card:before{display:none}
.graphite-cost.desktop-shell .cost-summary .card+ .card{border-left:1px solid #ffffff24}
.graphite-cost.desktop-shell .cost-summary strong,.graphite-cost.desktop-shell .cost-summary .card:last-child strong{font-size:clamp(24px,2.4vw,40px);font-weight:650;color:#fff;letter-spacing:-.8px;line-height:1.35;text-align:right;margin:10px 0 2px}
.graphite-cost.desktop-shell .cost-summary span{font-size:14px;color:#e1e5e9}
.graphite-cost.desktop-shell .cost-summary small{color:#b9c4ce;font-size:12px;text-align:right}
.graphite-cost .metric-help>summary{color:#d4be91}
.graphite-cost .metric-help p{color:#34404c}
.graphite-cost .cost-type-tabs{margin-top:8px}
.graphite-cost .cost-type-tabs button[aria-pressed=true]{color:#94631c!important;border-bottom-color:#bf8a36!important}
.graphite-cost.desktop-shell button.primary{background:#bc8737;color:#181e24;border-color:#bc8737;font-weight:650}
.graphite-cost.desktop-shell button.primary:hover{background:#ce9b4a}
.graphite-cost.desktop-shell button:hover{border-color:#c8b18b;background:#faf8f3}
.graphite-cost.desktop-shell .cost-filters{padding:14px 16px;gap:12px}
.graphite-cost.desktop-shell input:focus,.graphite-cost.desktop-shell select:focus,.graphite-cost.desktop-shell textarea:focus{outline:2px solid #ba8b42;outline-offset:2px}
.graphite-cost.desktop-shell #management-actions>*{font-size:13px}
.graphite-cost .business-overview{padding:20px;border-color:var(--border);border-radius:10px;margin:16px 0}
.graphite-cost .business-overview>summary{font-size:18px;font-weight:650;color:#26313c}
.graphite-cost .business-budget{padding:6px 0 12px;font-size:14px;gap:24px;color:#64717e}
.graphite-cost .business-budget strong{color:#14735c}
.graphite-cost .business-kind{border-color:#e3e7eb;border-radius:6px;margin:6px 0}
.graphite-cost .business-kind>summary{padding:14px 16px;color:#2c3743}
.graphite-cost .business-figures{font-size:13px;color:#35414e}
.graphite-cost .business-figures>span:nth-child(2){color:#92600f}
.graphite-cost .tree-level-0>summary{background:#f7f8fa;border-left-color:#b88b42}
.graphite-cost .tree-level-1>summary{background:#f1f3f5}
.graphite-cost .tree-level-2>summary{background:#fafbfc}
.graphite-cost .tree-node>summary:hover{background:#faf6ed}
.graphite-cost .tree-figures>strong,.graphite-cost .cost-record summary .money{color:#293541}
.graphite-cost .tree-count{color:#687581;background:#e9edf0}
.graphite-cost .tree-warning{background:#fcf1d9;color:#895d17;border-color:#e9d4ac}
.graphite-cost .detail>details>summary{color:#94631c}
.graphite-cost .unit-stats section{border-top-color:#b88b42}
.graphite-cost .unit-stats section:last-child{border-top-color:#358674}
.graphite-cost .unit-section td:nth-child(2),.graphite-cost .unit-section th:nth-child(2){text-align:right;font-variant-numeric:tabular-nums}
.graphite-cost .unit-section:has(th:nth-child(4)) td:nth-child(3){font-variant-numeric:tabular-nums}
.graphite-cost #notice:not(:empty){background:#fbf3e3;color:#805b22}
@media(min-width:1100px){
.graphite-cost .business-kind>summary{display:grid;grid-template-columns:minmax(180px,1fr) minmax(620px,2fr);position:relative;padding-left:28px}
.graphite-cost .business-kind>summary:before{position:absolute;left:12px}
.graphite-cost .business-figures{display:grid;grid-template-columns:1fr 1fr .65fr 1.2fr;width:100%;margin:0;gap:18px}
.graphite-cost .business-figures>span{text-align:right}
}
@media(max-width:760px){
.graphite-cost.desktop-shell h1{font-size:23px}
.graphite-cost.desktop-shell .cost-summary{grid-template-columns:1fr}
.graphite-cost.desktop-shell .cost-summary .card{padding:18px 20px}
.graphite-cost.desktop-shell .cost-summary .card+.card{border-left:0;border-top:1px solid #ffffff24}
.graphite-cost.desktop-shell .cost-summary strong{font-size:28px}
.graphite-cost.desktop-shell #project-select{min-width:0;width:100%}
.graphite-cost #cost-workspace>label{flex-wrap:wrap}
.graphite-cost .business-overview{padding:14px}
.graphite-cost .business-figures{font-size:12px}
}
.graphite-cost .project-context{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:6px 20px;align-items:center;background:#fff;border:1px solid var(--border);padding:14px 18px;border-radius:9px}.graphite-cost .project-context>label{white-space:nowrap;display:flex;align-items:center;gap:12px;margin:0;color:#6b7785;font-size:12px;grid-row:1/3}.graphite-cost .project-context #project-select{min-width:0;width:100%;margin:0}.graphite-cost.desktop-shell .project-context #project-title{margin:0;font-size:12px;max-width:470px}.graphite-cost.desktop-shell .project-context #snapshot{margin:0;font-size:11px}.graphite-cost .business-kind>summary .business-figures span{font-variant-numeric:tabular-nums}@media(max-width:1100px){.graphite-cost .project-context{grid-template-columns:1fr}.graphite-cost .project-context>label{grid-row:auto}.graphite-cost.desktop-shell .project-context #project-title{max-width:none}}@media(max-width:760px){.graphite-cost .project-context{padding:12px}.graphite-cost .project-context>label{display:block}.graphite-cost .project-context #project-select{margin-top:6px}}
/* Graphite / amber v2: structural hierarchy, not a data or behavior override. */
.graphite-cost.desktop-shell .cost-summary .card:first-child>.metric-icon{padding:0}
.graphite-cost .metric-copy{min-height:112px}
.graphite-cost.desktop-shell #search-form.cost-filters{padding:0;margin:12px 0}
.graphite-cost.desktop-shell #management-actions{padding-bottom:0}
.desktop-shell .app-brand strong{font-size:23px}
.desktop-shell .app-sidebar-footer>button{font-size:14px!important}
.graphite-cost.desktop-shell .project-context #snapshot{overflow-wrap:normal;word-break:normal}
.ui-icon{display:inline-block;vertical-align:middle;flex:none;width:22px;height:22px}
.app-brand .app-logo,.app-nav-icon{display:inline-flex;align-items:center;justify-content:center}
.desktop-shell .app-nav-link{font-size:16px;gap:16px;padding:16px}
.desktop-shell .app-brand{font-size:23px}
.app-sidebar-footer>a,.app-sidebar-footer>button{display:flex;align-items:center;gap:12px;font-size:14px}
.graphite-cost.desktop-shell{font-family:"Microsoft YaHei","PingFang SC","Segoe UI",sans-serif;font-size:15px}
.graphite-cost.desktop-shell h1{font-size:32px}
.graphite-cost.desktop-shell button,.graphite-cost.desktop-shell input,.graphite-cost.desktop-shell select,.graphite-cost .action-link{font-family:inherit;font-size:15px}
.graphite-cost .action-link,.graphite-cost #management-actions button{display:inline-flex;gap:9px;align-items:center;justify-content:center;min-height:42px}
.graphite-cost.desktop-shell #management-actions>*{font-size:14px}
.graphite-cost .project-context{grid-template-columns:auto minmax(220px,1fr) minmax(190px,270px);gap:18px;padding:12px 20px;min-height:68px}
.graphite-cost .project-context>label{grid-row:auto;font-size:14px;gap:16px}
.graphite-cost .project-context #project-select{width:210px;height:44px;font-size:17px;font-weight:600;padding:0 12px}
.graphite-cost.desktop-shell .project-context #project-title{font-size:14px;line-height:1.7;max-width:none;font-weight:400}
.graphite-cost.desktop-shell .project-context #snapshot{font-size:13px;line-height:1.6;text-align:right}
.graphite-cost.desktop-shell .cost-summary{margin:18px 0 10px;min-height:162px;align-items:stretch}
.graphite-cost.desktop-shell .cost-summary .card{display:flex;align-items:center;gap:24px;padding:28px 36px;position:relative}
.graphite-cost.desktop-shell .cost-summary .metric-icon{display:flex;align-items:center;justify-content:center;width:72px;height:72px;flex:0 0 72px;background:#d0a24b29;color:#e6bc69;border-radius:50%}
.graphite-cost .metric-icon .ui-icon{width:34px;height:34px}
.graphite-cost.desktop-shell .cost-summary .metric-icon-paid{background:#48a18529;color:#c9eee2}
.graphite-cost .metric-copy{min-width:0;flex:1}
.graphite-cost.desktop-shell .cost-summary .metric-label{font-size:16px;color:#f0f3f5;display:block}
.graphite-cost.desktop-shell .cost-summary strong,.graphite-cost.desktop-shell .cost-summary .card:last-child strong{display:block;text-align:left;font-size:42px;line-height:1.3;letter-spacing:-1px;margin:8px 0 0;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
.graphite-cost.desktop-shell .cost-summary small{display:block;text-align:left;font-size:13px;margin-top:3px}
.graphite-cost .metric-help{top:12px;right:16px;font-size:12px}
.graphite-cost .metric-help p{z-index:8}
.graphite-cost .cost-type-tabs{margin:8px 0 12px}
.graphite-cost.desktop-shell .cost-type-tabs button{font-size:16px;padding:14px 22px}
.graphite-cost.desktop-shell .cost-filters{display:grid;grid-template-columns:minmax(240px,2.6fr) minmax(140px,1fr) minmax(140px,1fr) 88px 88px;gap:12px;padding:0;background:transparent;border:0;border-radius:0;align-items:end}
.graphite-cost .cost-filters label{min-width:0;width:auto;font-size:13px;color:#6d7987;display:flex;flex-direction:column;gap:5px;margin:0}
.graphite-cost .cost-filters .cost-search{order:-1;min-width:0}
.graphite-cost .cost-filters input,.graphite-cost .cost-filters select,.graphite-cost .cost-filters button{height:44px;min-height:44px;width:100%;margin:0}
.graphite-cost #management-actions{margin:12px 0 18px;gap:10px}
.graphite-cost .business-overview{padding:20px 22px;margin:0 0 16px;background:#fff}
.graphite-cost .business-overview>summary{display:flex;align-items:center;gap:18px;flex-wrap:wrap;list-style:none;font-size:20px}
.graphite-cost .business-overview>summary::-webkit-details-marker{display:none}
.graphite-cost .business-overview>summary:before{content:'›';font-size:20px;color:#718091}
.graphite-cost .business-overview[open]>summary:before{transform:rotate(90deg)}
.graphite-cost .business-title{display:inline-flex;align-items:center;gap:12px}
.graphite-cost .business-title .ui-icon{color:#b98531;width:26px;height:26px}
.graphite-cost .business-overview>summary small{font-weight:400;font-size:13px;color:#748091}
.graphite-cost .business-budget{display:flex;align-items:center;flex-wrap:wrap;gap:24px;margin:18px 0 14px;padding:0;font-size:15px}
.graphite-cost .business-budget strong{color:#27333e;font-size:22px;font-weight:600;margin-left:8px}
.graphite-cost .business-available{border-left:1px solid #dfe4e9;padding-left:24px}
.graphite-cost .business-available,.graphite-cost .business-available strong{color:#11775b}
.graphite-cost .business-table-wrap{border:1px solid #e2e7ed;border-radius:8px;overflow:auto}
.graphite-cost .business-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:16px;min-width:680px;margin:0}
.graphite-cost .business-table th,.graphite-cost .business-table td{padding:14px 20px;border:0;border-bottom:1px solid #e6ebf0;border-right:1px solid #edf0f3;text-align:right;font-variant-numeric:tabular-nums;color:#293440;vertical-align:middle}
.graphite-cost .business-table thead th{background:#f3f5f7;color:#596677;font-weight:600}
.graphite-cost .business-table th:first-child{width:25%;text-align:left}
.graphite-cost .business-table thead th:nth-child(2){width:12%}
.graphite-cost .business-table tbody:last-child tr:last-child td{border-bottom:0}
.graphite-cost .business-table .pending-amount{color:#ab711e}
.graphite-cost.desktop-shell .business-toggle{display:flex;align-items:center;gap:10px;background:transparent;border:0;padding:0;color:inherit;text-align:left;font-size:16px;font-weight:600;width:100%}
.graphite-cost .business-arrow{font-size:20px;color:#8591a0;line-height:1}
.graphite-cost .business-toggle[aria-expanded=true] .business-arrow{transform:rotate(90deg)}
.graphite-cost .business-detail-row>td{padding:12px;background:#f8fafb;text-align:left}
.graphite-cost .business-detail-row[hidden]{display:none}
.graphite-cost .business-unit-table{width:100%;min-width:720px;border-collapse:collapse;table-layout:fixed;font-size:14px}
.graphite-cost .business-unit-table th:first-child{width:34%;overflow-wrap:anywhere;text-align:left}
.graphite-cost .business-unit-table th,.graphite-cost .business-unit-table td{padding:12px;text-align:right;font-variant-numeric:tabular-nums}
.graphite-cost .business-unit-table thead th{font-weight:400;font-size:12px}
.graphite-cost .business-unit-table button{white-space:nowrap}
.graphite-cost .tree-level-3>.tree-children{clear:both}
.graphite-cost .contract-linked-figure{display:block;margin-top:6px}
.graphite-cost .contract-linked-figure small{margin-right:8px}
.unit-contract-block{padding:16px 0;border-bottom:1px solid var(--ui-border,#e0e4e8)}
.unit-contract-block>.business-payment-group{margin-left:12px}
.graphite-cost .business-record-section+ .business-record-section{margin-top:24px}
.graphite-cost .business-record-section>h3{margin:4px 0 8px;font-size:16px;color:var(--ui-text,#293440)}
.graphite-cost .business-record-hint{margin:0 0 12px;font-size:13px;color:var(--ui-muted,#697685);overflow-wrap:anywhere}
.graphite-cost .business-payment-group{margin:8px 0;border:1px solid var(--ui-border,#e0e4e8);border-radius:10px;background:var(--ui-surface,#fff);overflow:hidden}
.graphite-cost .business-payment-group>summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none;padding:16px;min-height:44px;box-sizing:border-box}
.graphite-cost .business-payment-group>summary::-webkit-details-marker{display:none}
.graphite-cost .business-payment-group>summary:before{content:'›';color:var(--ui-muted,#697685)}
.graphite-cost .business-payment-group[open]>summary:before{transform:rotate(90deg)}
.graphite-cost .business-payment-group>summary:hover{background:var(--ui-amber-soft,#fbf1dc)}
.graphite-cost .business-payment-group>summary:focus-visible{outline:2px solid var(--ui-amber,#bc8737);outline-offset:-3px}
.graphite-cost .business-payment-label{min-width:0;flex:1;overflow-wrap:anywhere;text-align:left}
.graphite-cost .business-payment-label small{display:block;font-size:12px;color:var(--ui-muted,#697685);margin-top:4px}
.graphite-cost .business-payment-count{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--ui-muted,#697685)}
.graphite-cost .business-payment-items{padding:12px;background:var(--ui-bg,#f2f4f6)}
.graphite-cost .business-payment-items>.cost-record:last-child{margin-bottom:0}
@media(max-width:760px){.graphite-cost .business-records{max-width:calc(100vw - 90px);box-sizing:border-box}.graphite-cost .business-payment-items{padding:8px}.graphite-cost .business-payment-group>summary{padding:12px}}
.graphite-cost .tree-name strong,.graphite-cost .tree-figures,.graphite-cost .cost-record summary{font-size:14px}
.graphite-cost .tree-count,.graphite-cost .tree-figures small{font-size:13px}
.graphite-cost #count{font-size:14px;color:#738092}
@media(max-width:1300px){
 .graphite-cost .project-context{grid-template-columns:auto 1fr}.graphite-cost.desktop-shell .project-context #snapshot{grid-column:1/-1;text-align:left}
 .graphite-cost.desktop-shell .cost-summary .card{padding:24px;gap:16px}.graphite-cost.desktop-shell .cost-summary .metric-icon{width:54px;height:54px;flex-basis:54px}
 .graphite-cost.desktop-shell .cost-summary strong,.graphite-cost.desktop-shell .cost-summary .card:last-child strong{font-size:34px}
}
@media(max-width:900px){
 .graphite-cost.desktop-shell .cost-filters{grid-template-columns:1fr 1fr 80px 80px}.graphite-cost .cost-filters .cost-search{grid-column:1/-1}
 .graphite-cost .project-context{grid-template-columns:1fr}.graphite-cost .project-context>label{display:flex}.graphite-cost .project-context #project-select{flex:1}
}
@media(max-width:760px){
 .graphite-cost.desktop-shell>header{flex-wrap:wrap}.graphite-cost .cost-top-actions{width:100%;justify-content:flex-end}
 .graphite-cost.desktop-shell .cost-summary .card{padding:24px 18px}.graphite-cost.desktop-shell .cost-summary strong,.graphite-cost.desktop-shell .cost-summary .card:last-child strong{font-size:30px}
 .graphite-cost.desktop-shell .cost-filters{grid-template-columns:1fr 1fr}.graphite-cost .business-overview{padding:16px 12px}
 .graphite-cost .business-budget{gap:12px}.graphite-cost .business-available{padding-left:0;border:0}.graphite-cost .business-budget strong{font-size:20px}
 .graphite-cost .business-overview>summary{gap:8px}.graphite-cost .business-overview>summary small{width:100%}
}
/* WORKSPACE DESIGN SYSTEM — approved graphite/amber baseline, September 2026.
 * Public tokens + ui-* primitives; adapters below retain existing DOM/behavior.
 */
:root{
 --ui-graphite:#26323d;--ui-bg:#f2f4f6;--ui-surface:#fff;--ui-text:#293440;
 --ui-muted:#697685;--ui-border:#e0e4e8;--ui-amber:#bc8737;--ui-amber-soft:#fbf1dc;
 --ui-success:#11775b;--ui-success-soft:#edf7f1;--ui-error:#b13f39;--ui-error-soft:#fff0ee;
 --ui-radius:10px;--ui-control:44px;--ui-gap:16px;
 --primary:#98671e;--bg:var(--ui-bg);--surface:var(--ui-surface);--text:var(--ui-text);--muted:var(--ui-muted);--border:var(--ui-border);
}
body.desktop-shell,body.ui-standalone{font:15px/1.65 "Microsoft YaHei","PingFang SC","Segoe UI",sans-serif;color:var(--ui-text);background:var(--ui-bg)}
.desktop-shell:not(.graphite-cost) h1{font-size:30px;letter-spacing:-.5px;color:var(--ui-graphite)}
.desktop-shell h2,.ui-section-title{font-size:20px;color:var(--ui-text)}
.desktop-shell .workspace-heading p,.desktop-shell small,.desktop-shell .muted,.desktop-shell details.usage-note,.desktop-shell .list-footnote{font-size:13px;color:var(--ui-muted)}
.desktop-shell:not(.graphite-cost)>.app-sidebar~header,.desktop-shell .workspace-heading{background:var(--ui-bg);border-bottom:1px solid var(--ui-border)}
.desktop-shell button,.desktop-shell input,.desktop-shell select,.desktop-shell textarea,.ui-button,.ui-standalone button{font-family:inherit;font-size:15px;border-radius:8px}
.desktop-shell button,.ui-button,.ui-standalone button{min-height:40px;border:1px solid var(--ui-border);color:var(--ui-text);background:#fff}
.ui-button{display:inline-flex;gap:8px;align-items:center;justify-content:center;padding:8px 14px;text-decoration:none;cursor:pointer}
.desktop-shell button.primary,.desktop-shell .ui-primary,.ui-primary{background:var(--ui-amber);border-color:var(--ui-amber);color:#1d252c;font-weight:600}
.desktop-shell button:hover,.ui-button:hover,.ui-standalone button:hover{background:#faf6ed;border-color:#c2a375}
.desktop-shell button.primary:hover,.desktop-shell .ui-primary:hover{background:#c89649;color:#1d252c}
.desktop-shell :focus-visible,.ui-standalone :focus-visible{outline:2px solid var(--ui-amber);outline-offset:3px}
.desktop-shell button:disabled,.ui-button:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
.desktop-shell [aria-busy=true]{cursor:progress}
.ui-card{padding:24px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius)}
.ui-filterbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:16px 0}
.ui-filterbar label{flex:1;min-width:160px}
.ui-badge,.desktop-shell .status,.desktop-shell .payment-state,.desktop-shell .task-meta span{display:inline-flex;align-items:center;font-size:13px;line-height:1.5;border-radius:6px;padding:3px 9px;background:#eef1f4;color:var(--ui-muted);white-space:nowrap}
.ui-warning,.desktop-shell .state-pending,.desktop-shell .tree-warning{background:var(--ui-amber-soft);color:#91601a;border-color:#ead5af}
.ui-success,.desktop-shell .state-confirmed,.desktop-shell .payment-state[data-state=paid]{background:var(--ui-success-soft);color:var(--ui-success)}
.ui-error,.desktop-shell .state-returned,.desktop-shell .payment-state[data-state=failed],.desktop-shell .task-meta .task-overdue{background:var(--ui-error-soft);color:var(--ui-error)}
.ui-state{padding:18px 22px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:#fff;color:var(--ui-muted)}
.ui-state.ui-error{background:var(--ui-error-soft);color:var(--ui-error)}
.desktop-shell #notice:not(:empty),.desktop-shell #message:not(:empty){background:var(--ui-amber-soft);color:#845d22;font-size:14px}
.desktop-shell #notice.error:not(:empty),.desktop-shell [role=alert]{color:var(--ui-error);background:var(--ui-error-soft)}
.desktop-shell input,.desktop-shell select{min-height:var(--ui-control)}
.desktop-shell input[type=checkbox],.desktop-shell input[type=radio]{min-height:0;width:auto;accent-color:var(--ui-amber)}
.desktop-shell input:focus,.desktop-shell select:focus,.desktop-shell textarea:focus{outline-color:var(--ui-amber)}
.desktop-shell dialog{color:var(--ui-text);background:#fff;border:1px solid var(--ui-border);border-radius:12px;max-width:calc(100vw - 32px);max-height:90vh;font-size:15px;box-shadow:0 24px 70px #17232f30}
.desktop-shell dialog::backdrop{background:#17232f66}
.desktop-shell dialog h2,.desktop-shell .unit-dialog-bar h2{font-size:20px}
.desktop-shell dialog p,.desktop-shell .cost-editor p,.desktop-shell .record-body details{font-size:14px}
.desktop-shell .dialog-actions,.ui-dialog-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;padding-top:16px;border-top:1px solid var(--ui-border);margin-top:18px}
.ui-table-wrap{overflow:auto;border:1px solid var(--ui-border);border-radius:var(--ui-radius)}
.ui-table{border-collapse:collapse;width:100%}.ui-table th,.ui-table td{padding:14px 18px;border-bottom:1px solid var(--ui-border);text-align:left;font-size:14px}.ui-table th{background:#f3f5f7;color:var(--ui-muted)}.ui-money{text-align:right!important;font-variant-numeric:tabular-nums;white-space:nowrap}
.desktop-shell .unit-section th,.desktop-shell .unit-section td{font-size:14px;padding:14px}.desktop-shell .unit-section h3{font-size:16px;background:#f3f5f7}.desktop-shell .unit-stats section{border-top-color:var(--ui-amber)}.desktop-shell .unit-stats section:last-child{border-top-color:var(--ui-success)}
.desktop-shell .record-management-actions button{font-size:14px!important}.desktop-shell .detail>details>summary{color:#98671e}
/* Settlement: shared column tracks prevent party text from squeezing actions. */
@media(min-width:1201px){
 .desktop-shell[data-role=reviewer] .records-header,.desktop-shell[data-role=reviewer] .record-overview{grid-template-columns:minmax(240px,2.3fr) minmax(100px,.8fr) minmax(140px,1fr) minmax(110px,.8fr) 76px 118px;gap:20px}
}
.desktop-shell .records-header{font-size:14px;background:#edf0f3;color:#626f7e;padding:14px 20px}
.desktop-shell .record-overview{padding:20px;font-size:15px}
.desktop-shell .record-identity strong{font-size:16px}.desktop-shell .record-identity small{font-size:13px}
.desktop-shell .record-toggle{border-color:#d8bd90;color:#845b1d;background:#fcf6e9;font-weight:600;min-height:40px}
.desktop-shell .record-toggle[aria-expanded=true]{background:#f1f3f5;border-color:var(--ui-border);color:var(--ui-text)}
.desktop-shell .list-filters{grid-template-columns:minmax(240px,1fr) minmax(240px,1.4fr) 180px;gap:12px}
.desktop-shell .review-sidebar,.desktop-shell .review-paper{border-color:var(--ui-border);background:#fff;border-radius:var(--ui-radius)}
.desktop-shell .review-heading>strong{font-size:20px}.desktop-shell .review-result strong{font-size:28px;color:var(--ui-graphite)}
.desktop-shell .review-sidebar label,.desktop-shell .review-sidebar summary{font-size:14px}
.desktop-shell .file-picker{background:#faf7f0;border-color:#d8bd90;color:#845b1d}
.desktop-shell .file-picker strong{color:#845b1d}.desktop-shell .file-picker.drag-active{background:var(--ui-amber-soft);outline-color:var(--ui-amber)}
.desktop-shell .party-matches button:hover,.desktop-shell .party-matches button:focus{background:var(--ui-amber-soft);outline-color:var(--ui-amber)}
/* White project cards, aligned metrics and restrained pending notices. */
.desktop-shell .project-card-head h2{font-size:19px;line-height:1.6}
.desktop-shell .project-card-head p,.desktop-shell .project-metric span{font-size:13px}
.desktop-shell .project-metric strong{font-size:24px;color:var(--ui-graphite);font-variant-numeric:tabular-nums;white-space:nowrap}
.desktop-shell .project-metrics{margin:20px 0;gap:20px}
.desktop-shell .project-card-footer{font-size:14px;gap:14px}.desktop-shell .project-card-footer small{font-size:13px}
.desktop-shell .project-card-footer a:last-child{background:var(--ui-amber);color:#222c35;min-height:40px;padding:8px 14px}
/* Tasks: compact content with actions on the right, not an empty footer row. */
.desktop-shell #task-list .task-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 24px;padding:20px 22px}
.desktop-shell #task-list .task-card h2{font-size:18px;margin:0;grid-column:1}
.desktop-shell #task-list .task-card>.task-meta,.desktop-shell #task-list .task-card>p,.desktop-shell #task-list .task-card>a{grid-column:1;margin:0}
.desktop-shell #task-list .task-card footer{grid-column:2;grid-row:1/5;align-self:center;margin:0;align-items:center}
.desktop-shell #task-list .task-card footer button{font-size:14px;min-height:40px;padding:8px 12px}
.desktop-shell .task-card .description{font-size:15px}.desktop-shell #task-list .status-done{background:#f8faf9;border-color:#e2e7e4}.desktop-shell #task-list .status-done h2{color:#7c8780}
.desktop-shell .status-done .task-meta span:first-child{background:var(--ui-success-soft);color:var(--ui-success)}
.desktop-shell .status-in_progress .task-meta span:first-child{background:var(--ui-amber-soft);color:#91601a}
.desktop-shell .task-filters{padding:16px;margin:0 0 18px;gap:12px}.desktop-shell .task-filters label{margin:0}.desktop-shell .task-filters button{height:44px}
.desktop-shell .sync-explainer small,.desktop-shell .sync-project p{font-size:14px}.desktop-shell .sync-ok{color:var(--ui-success)}
/* Tree: one stable column grid at every directory depth; indentation remains. */
.tree-columns,.graphite-cost .tree-node>summary{display:grid;grid-template-columns:minmax(160px,1fr) 78px 140px 240px;gap:14px;align-items:center}
.tree-columns{padding:12px 20px;background:#edf0f3;color:var(--ui-muted);border-radius:8px;font-size:14px;margin-bottom:8px}
.tree-columns>span:last-child{text-align:right}
.graphite-cost .tree-node>summary .tree-count{justify-self:start;margin:0;font-size:13px}
.graphite-cost .tree-state{font-size:13px;color:var(--ui-muted);display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;overflow-wrap:anywhere}
.graphite-cost .history-note{margin:12px 16px;color:var(--ui-muted);font-size:13px}
.graphite-cost .history-contract-group{margin:0 16px 20px;min-width:0}
.graphite-cost .history-contract-group h3{font-size:15px;margin:0;padding:12px;background:var(--ui-bg);color:var(--ui-text)}
.graphite-cost .history-table-wrap{overflow-x:auto;max-width:100%}
.graphite-cost .history-contract-table{width:100%;min-width:650px;border-collapse:collapse;table-layout:fixed}
.graphite-cost .history-contract-table th,.graphite-cost .history-contract-table td{padding:12px;text-align:left;border-bottom:1px solid var(--ui-border);overflow-wrap:anywhere}
.graphite-cost .history-contract-table th{font-size:13px;font-weight:500;color:var(--ui-muted)}
.graphite-cost .history-contract-table th:nth-child(1){width:21%}.graphite-cost .history-contract-table th:nth-child(2){width:32%}
.graphite-cost .history-contract-table th:nth-child(3){width:22%;text-align:right}.graphite-cost .history-contract-table th:nth-child(4){width:15%}.graphite-cost .history-contract-table th:nth-child(5){width:10%}
.graphite-cost .history-contract-table .history-money{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.graphite-cost .unit-payment-entry.payment-inactive strong,.graphite-cost .unit-payment-entry.payment-inactive>.money{color:var(--ui-text);text-decoration:none}
.graphite-cost .unit-payment-entry.payment-inactive{background:var(--ui-bg)}
.graphite-cost .history-contract-table td small{display:block;color:var(--ui-muted);margin-top:6px}
.graphite-cost .tree-figures{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:5px 8px;white-space:normal}
.graphite-cost .tree-figures>strong{font-size:16px}.graphite-cost .tree-figures small{font-size:13px}
.graphite-cost .tree-name strong{font-size:15px}.graphite-cost .tree-level-0>summary{background:#f5f6f8}
.graphite-cost .tree-level-1>summary{background:#f1f3f5}.graphite-cost .tree-level-2>summary{background:#fafbfc}
.graphite-cost .tree-toolbar>span,.graphite-cost.desktop-shell .tree-toolbar button{font-size:14px}
.graphite-cost .tree-children .cost-record h3{font-size:15px}.graphite-cost .tree-children .cost-record summary small{font-size:13px}
.ui-standalone .preview-toolbar{padding:16px 24px;background:var(--ui-graphite);color:#fff}.ui-standalone .file-link{color:var(--ui-text);background:#fff}.ui-standalone .preview-main{margin:20px auto}
@media(max-width:1200px){
 .desktop-shell .project-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .tree-columns,.graphite-cost .tree-node>summary{grid-template-columns:minmax(120px,1fr) 66px 105px 190px;gap:8px}
}
@media(max-width:1200px){
 .desktop-shell .records-header{display:none}.desktop-shell .record-overview{grid-template-columns:1fr 1fr}.desktop-shell .record-identity{grid-column:1/-1}.desktop-shell .record-cell{display:flex;justify-content:space-between;gap:8px}.desktop-shell .mobile-label{display:inline}.desktop-shell .record-toggle{grid-column:1/-1;justify-self:end}
 .desktop-shell .list-filters{grid-template-columns:1fr 160px}.desktop-shell #list-project{grid-column:1/-1}
 .desktop-shell #task-list .task-card{display:block}.desktop-shell #task-list .task-card>.task-meta{margin:8px 0}.desktop-shell #task-list .task-card footer{margin-top:12px}
}
@media(max-width:760px){
 .desktop-shell:not(.graphite-cost) h1{font-size:24px}.desktop-shell .workspace-heading{flex-wrap:wrap}
 .tree-columns{display:none}.graphite-cost .tree-node>summary{grid-template-columns:minmax(0,1fr) auto;gap:8px}.graphite-cost .tree-count{grid-column:2}.graphite-cost .tree-state{grid-column:1}.graphite-cost .tree-figures{grid-column:2;padding:0;max-width:185px}.graphite-cost .tree-name{min-width:0}
 .desktop-shell .project-metrics{grid-template-columns:1fr;gap:14px}.desktop-shell .project-metric{border-right:0}.desktop-shell .project-metric strong{font-size:24px}
 .desktop-shell .list-filters{grid-template-columns:1fr}.desktop-shell .list-filters>*{grid-column:1}
 .desktop-shell .task-filters{flex-wrap:wrap}.desktop-shell .task-filters label:first-child{flex-basis:100%}
 .desktop-shell .unit-stats{grid-template-columns:1fr}.ui-filterbar{display:grid;grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.ui-button,.ui-state{transition:none;animation:none}}
/* Dialogs retain a readable form width; the wide business detail is intentional. */
.graphite-cost .cost-record>summary>div{flex:1}
.graphite-cost .record-toggle-hint{font-size:13px;color:#895d17;white-space:nowrap;align-self:center}
.graphite-cost .record-toggle-hint:before{content:'›';display:inline-block;margin-right:6px}
.graphite-cost .cost-record[open]>summary .record-toggle-hint:before{transform:rotate(90deg)}
@media(max-width:760px){.graphite-cost .record-toggle-hint{align-self:flex-end}}
/* Ledger finishing pass: compact metrics and explicit freshness. */
.graphite-cost .cost-ledger .tree-figures .contract-linked-figure strong{font-size:14px;font-weight:400;color:var(--ui-muted)}
.graphite-cost .snapshot-badge{display:inline-block;border-radius:5px;padding:2px 7px;font-size:12px;white-space:nowrap}
.graphite-cost .snapshot-warning{background:var(--ui-amber-soft);color:#895d17}
.graphite-cost .snapshot-success{background:var(--ui-success-soft);color:var(--ui-success)}
.graphite-cost .snapshot-time{display:block;color:var(--ui-muted);font-size:12px;margin-top:4px}
.graphite-cost .cost-ledger .search-result-note{font-size:13px;color:var(--ui-muted);margin:12px 0}
.graphite-cost .cost-ledger .ledger-search-result{border-bottom:1px solid var(--ui-border);padding:12px 0}
.graphite-cost .cost-ledger .search-result-path{font-size:13px;color:var(--ui-muted);overflow-wrap:anywhere;margin:0 0 8px;line-height:1.6}
.graphite-cost .cost-ledger .ledger-search-result .cost-record{border:0;margin:0;padding:8px 0;box-shadow:none}
.graphite-cost .cost-ledger .search-unit-detail{font-size:13px;padding:6px 10px;min-height:36px;margin-bottom:6px}
.graphite-cost .project-context #project-title{overflow-wrap:anywhere;min-width:0}
.graphite-cost .app-sidebar{height:100dvh;overflow-y:auto}
.graphite-cost .app-sidebar nav,.graphite-cost .app-sidebar-footer{flex-shrink:0}
@media(min-width:761px){
 .graphite-cost.desktop-shell .cost-summary{min-height:145px;margin:12px 0 8px}
 .graphite-cost.desktop-shell .cost-summary .card{padding:15px 28px}
 .graphite-cost .cost-type-tabs{margin:4px 0 8px}
 .graphite-cost.desktop-shell #management-actions{margin:8px 0 12px;padding-bottom:8px}
 .graphite-cost .business-overview{padding:16px 22px;margin-bottom:12px}
 .graphite-cost.desktop-shell .cost-ledger{margin-top:12px}
}
/* Cost ledger: shallow surfaces, stable right columns and explicit amount labels. */
.graphite-cost .cost-ledger{margin:20px 0;padding:22px;background:#fff;border:1px solid var(--ui-border);border-radius:10px;font-family:"Microsoft YaHei","PingFang SC","Segoe UI",sans-serif;color:var(--ui-text)}
.graphite-cost .ledger-heading{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.graphite-cost .ledger-heading h2{font-size:20px;font-weight:650;margin:0;margin-right:auto;color:var(--ui-text)}
.graphite-cost .ledger-heading h2:before{content:"";display:inline-block;width:4px;height:20px;background:var(--ui-amber);margin-right:12px;vertical-align:-3px;border-radius:2px}
.graphite-cost .ledger-heading #count{margin:0;font-size:13px;color:var(--ui-muted)}
.graphite-cost .ledger-controls{display:flex;gap:8px;flex-wrap:wrap}
.graphite-cost .ledger-controls button{font-family:inherit;font-size:13px;min-height:36px;padding:6px 10px}
.graphite-cost .ledger-description,.graphite-cost .ledger-help{font-size:13px;color:var(--ui-muted);margin:10px 0}
.graphite-cost .ledger-help>summary{cursor:pointer;width:fit-content}
.graphite-cost .ledger-help p{max-width:900px;line-height:1.7}
.graphite-cost .cost-ledger .tree-columns,.graphite-cost .cost-ledger .tree-node>summary{grid-template-columns:minmax(180px,1fr) 70px 110px 300px 96px;gap:12px;padding:12px 16px;box-sizing:border-box}
.graphite-cost .cost-ledger .tree-no-state .tree-columns,.graphite-cost .cost-ledger .tree-no-state .tree-node>summary{grid-template-columns:minmax(180px,1fr) 70px 300px 96px}
.graphite-cost .cost-ledger .tree-no-state .tree-state{display:none}
.graphite-cost .cost-ledger .tree-money-heading{text-align:right}
.graphite-cost .cost-ledger .tree-action-heading{text-align:center}
.graphite-cost .cost-ledger .tree-node{border:0;border-radius:0;box-shadow:none;margin:0;background:#fff;overflow:visible}
.graphite-cost .cost-ledger .tree-level-0{margin-top:8px}
.graphite-cost .cost-ledger .tree-node>summary{min-height:52px;border:0;border-bottom:1px solid var(--ui-border);border-radius:0;margin:0}
.graphite-cost .cost-ledger .tree-level-0>summary{background:#f5f6f8}
.graphite-cost .cost-ledger .tree-level-1>summary{background:#f8f9fa}
.graphite-cost .cost-ledger .tree-level-2>summary,.graphite-cost .cost-ledger .tree-level-3>summary{background:#fff}
.graphite-cost .cost-ledger .tree-node>summary:hover{background:var(--ui-amber-soft)}
.graphite-cost .cost-ledger .tree-children{padding:0;margin:0;border:0;background:#fff}
.graphite-cost .cost-ledger .tree-level-1>summary .tree-name{padding-left:12px}
.graphite-cost .cost-ledger .tree-level-2>summary .tree-name{padding-left:24px}
.graphite-cost .cost-ledger .tree-level-3>summary .tree-name{padding-left:36px}
.graphite-cost .cost-ledger .tree-name{gap:8px;color:var(--ui-text)}
.graphite-cost .cost-ledger .tree-name strong{font-size:15px;font-weight:500;line-height:1.6}
.graphite-cost .cost-ledger .tree-level-0>summary .tree-name strong,.graphite-cost .cost-ledger .tree-level-3>summary .tree-name strong{font-size:16px;font-weight:600}
.graphite-cost .cost-ledger .tree-name svg{width:18px;height:18px;flex:none}
.graphite-cost .cost-ledger .tree-figures{display:flex;flex-direction:column;align-items:stretch;gap:4px;max-width:none;padding:0}
.graphite-cost .cost-ledger .tree-amount-line,.graphite-cost .cost-ledger .contract-linked-figure{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:0;white-space:nowrap}
.graphite-cost .cost-ledger .tree-figures small{font-size:12px;color:var(--ui-muted);margin:0}
.graphite-cost .cost-ledger .tree-figures strong{font-size:16px;font-weight:600;color:var(--ui-text);font-variant-numeric:tabular-nums}
.graphite-cost .cost-ledger .tree-actions{display:flex;justify-content:flex-end}
.graphite-cost .cost-ledger .tree-actions button{font-family:inherit;white-space:nowrap;font-size:13px;min-height:36px;padding:6px 10px}
.graphite-cost .cost-ledger .tree-level-3>.tree-children{padding:0 16px 0 68px}
.graphite-cost .cost-ledger .tree-children .cost-record{border:0;border-bottom:1px solid var(--ui-border);border-radius:0;margin:0;padding:12px 0;background:#fff}
.graphite-cost .cost-ledger .cost-record h3{color:var(--ui-text);font-family:inherit;font-weight:500;line-height:1.6}
.graphite-cost .cost-ledger .cost-record summary small{color:var(--ui-muted)}
.graphite-cost .cost-ledger .cost-record summary .money{white-space:nowrap;font-variant-numeric:tabular-nums}
.graphite-cost .cost-ledger summary:focus-visible,.graphite-cost .cost-ledger button:focus-visible{outline:2px solid var(--ui-amber);outline-offset:2px}
@media(max-width:1200px) and (min-width:761px){
 .graphite-cost .cost-ledger .tree-columns,.graphite-cost .cost-ledger .tree-node>summary{grid-template-columns:minmax(120px,1fr) 48px 82px 235px 84px;gap:8px;padding:10px}
 .graphite-cost .cost-ledger .tree-no-state .tree-columns,.graphite-cost .cost-ledger .tree-no-state .tree-node>summary{grid-template-columns:minmax(120px,1fr) 48px 235px 84px}
 .graphite-cost .cost-ledger .tree-figures strong{font-size:14px}
}
@media(max-width:760px){
 .graphite-cost .cost-ledger{padding:14px}
 .graphite-cost .ledger-heading{gap:10px}
 .graphite-cost .ledger-heading h2{font-size:18px}
 .graphite-cost .ledger-controls{flex-basis:100%}
 .graphite-cost .cost-ledger .tree-columns{display:none}
 .graphite-cost .cost-ledger .tree-node>summary,.graphite-cost .cost-ledger .tree-no-state .tree-node>summary{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px 4px}
 .graphite-cost .cost-ledger .tree-name{grid-column:1;grid-row:1}
 .graphite-cost .cost-ledger .tree-count{grid-column:2;grid-row:1}
 .graphite-cost .cost-ledger .tree-state{grid-column:1/-1}
 .graphite-cost .cost-ledger .tree-state:empty{display:none}
 .graphite-cost .cost-ledger .tree-figures{grid-column:1/-1;min-width:0}
 .graphite-cost .cost-ledger .tree-actions{grid-column:1/-1}
 .graphite-cost .cost-ledger .tree-actions:empty{display:none}
 .graphite-cost .cost-ledger .tree-level-1>summary .tree-name{padding-left:6px}
 .graphite-cost .cost-ledger .tree-level-2>summary .tree-name{padding-left:12px}
 .graphite-cost .cost-ledger .tree-level-3>summary .tree-name{padding-left:18px}
 .graphite-cost .cost-ledger .tree-level-3>.tree-children{padding:0 4px 0 18px}
 .graphite-cost .cost-ledger .cost-record summary{display:flex;flex-direction:column;align-items:stretch}
 .graphite-cost .cost-ledger .cost-record summary .money{text-align:right}
}
.desktop-shell dialog:not(.unit-detail){width:min(680px,calc(100vw - 32px));padding:24px;overflow:auto}
.desktop-shell dialog label{margin:10px 0 6px}
.desktop-shell dialog .form-grid{gap:0 16px}
.desktop-shell dialog.ui-modal{width:min(680px,calc(100vw - 32px));max-height:min(90vh,900px);max-height:min(90dvh,900px);padding:0;overflow:hidden}
.desktop-shell dialog.ui-modal[open]{display:flex;flex-direction:column}
.desktop-shell .ui-modal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;padding:18px 24px;border-bottom:1px solid var(--ui-border);background:var(--ui-surface)}
.desktop-shell .ui-modal-header h2{margin:0;min-width:0;overflow-wrap:anywhere}
.desktop-shell .ui-modal-header>h2{flex:1}
.desktop-shell .ui-modal-header>.ui-icon{width:21px;height:21px;flex:none;color:var(--ui-amber)}
.desktop-shell .ui-modal-close{flex:none;width:40px;min-width:40px;height:40px;padding:0;font-size:22px;line-height:1}
.desktop-shell .ui-modal-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 24px;scrollbar-gutter:stable}
.desktop-shell .ui-modal-body>div{min-width:0}
.desktop-shell .ui-modal-body form{margin:0}
.desktop-shell .ui-modal-footer{display:flex;flex:none;justify-content:flex-end;gap:12px;flex-wrap:wrap;padding:16px 24px;border-top:1px solid var(--ui-border);background:var(--ui-surface)}
.desktop-shell .ui-modal-footer button{width:auto;min-width:88px;margin:0}
.desktop-shell .ui-modal-message{flex-basis:100%;margin:0;overflow-wrap:anywhere}
.desktop-shell .ui-modal-message:empty{display:none}
.desktop-shell .ui-modal .dialog-actions:empty,.desktop-shell .ui-modal .actions:empty{display:none}
.desktop-shell dialog.ui-discard-dialog{width:min(460px,calc(100vw - 32px))}
@media(max-width:600px){.desktop-shell dialog.ui-modal{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:94dvh}.desktop-shell .ui-modal-header,.desktop-shell .ui-modal-body,.desktop-shell .ui-modal-footer{padding:14px 16px}.desktop-shell .ui-modal-header h2{font-size:18px}}
.desktop-shell #task-description{min-height:86px}
/* Shared editor content: compact forms, explicit read-only information, long-form drawers. */
.desktop-shell dialog.ui-drawer{inset:0 0 0 auto;margin:0;width:min(820px,calc(100vw - 32px));height:100dvh;max-height:100dvh;border-radius:12px 0 0 12px}
.desktop-shell .ui-form{display:block}
.desktop-shell .ui-form .ui-field{display:grid;gap:8px;margin:0 0 20px;padding:0;min-width:0;font-weight:400;align-content:start}
.desktop-shell .ui-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.desktop-shell .ui-form-grid>.ui-field{margin:0}
.desktop-shell .ui-field-wide{grid-column:1/-1}
.desktop-shell .ui-field[hidden],.desktop-shell .ui-form [hidden]{display:none!important}
.desktop-shell .ui-field-label{color:var(--ui-graphite);font-size:14px;font-weight:500;line-height:1.5}
.desktop-shell .ui-field:has(>input[required],>select[required],>textarea[required])>.ui-field-label:after{content:' *';color:var(--ui-amber)}
.desktop-shell .ui-form .ui-field>input:not([type=checkbox]):not([type=radio]),.desktop-shell .ui-form .ui-field>select{height:44px;min-height:44px;padding:9px 12px;margin:0;min-width:0;width:100%;box-sizing:border-box;font:inherit;font-size:14px}
.desktop-shell .ui-form .ui-field>textarea{height:88px;min-height:88px;margin:0;padding:10px 12px;width:100%;min-width:0;box-sizing:border-box;font:inherit;font-size:14px;resize:vertical}
.desktop-shell .ui-form .ui-field:has(>input[type=checkbox]){display:flex;align-items:center;flex-wrap:wrap;grid-column:1/-1;min-height:32px}
.desktop-shell .ui-form .ui-field>input[type=checkbox]{order:-1;width:18px;height:18px;margin:0;flex:none}
.desktop-shell .ui-field-help,.desktop-shell .ui-field-error{font-size:13px;line-height:1.6;font-weight:400;white-space:normal;overflow-wrap:anywhere}
.desktop-shell .ui-field-help{color:var(--ui-muted)}
.desktop-shell .ui-field-error{color:var(--ui-error)}
.desktop-shell .ui-field-error:empty{display:none}
.desktop-shell .ui-field>[aria-invalid=true]{border-color:var(--ui-error);outline-color:var(--ui-error)}
.desktop-shell .ui-form-section{border:0;border-top:1px solid var(--ui-border);margin:24px 0 0;padding:20px 0 0}
.desktop-shell .ui-form-section:first-of-type{margin-top:0;border-top:0;padding-top:0}
.desktop-shell .ui-form-section>h3{font-size:15px;color:var(--ui-graphite);margin:0 0 16px;line-height:1.6;font-weight:600}
.desktop-shell .ui-record-info{background:#f4f6f8;border-radius:8px;padding:14px 16px;margin:0 0 16px;display:grid;gap:8px}
.desktop-shell .ui-record-info>div{display:grid;grid-template-columns:88px minmax(0,1fr);gap:12px;align-items:baseline}
.desktop-shell .ui-record-info dt{font-size:13px;color:var(--ui-muted)}
.desktop-shell .ui-record-info dd{margin:0;font-size:14px;color:var(--ui-graphite);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.desktop-shell .ui-form-note{padding:12px 14px;margin:0 0 20px;background:#f6f7f9;border-left:3px solid var(--ui-border);border-radius:4px;font-size:13px;line-height:1.65;color:var(--ui-muted)}
.desktop-shell .ui-form-warning{background:var(--ui-amber-soft);border-left-color:var(--ui-amber);color:#805715}
.desktop-shell .ui-form-disclosure{margin:16px 0;padding:0;border:0;border-top:1px solid var(--ui-border);border-bottom:1px solid var(--ui-border)}
.desktop-shell .ui-form-disclosure>summary{padding:12px 0;color:var(--ui-graphite);font-size:14px}
.desktop-shell .ui-form-disclosure>button{margin:0 8px 12px 0}
.desktop-shell .ui-member-section{border:1px solid var(--ui-border);border-radius:8px;margin:20px 0;padding:16px}
.desktop-shell .ui-member-section legend{font-size:14px;color:var(--ui-graphite);padding:0 6px;overflow-wrap:anywhere}
.desktop-shell .ui-change{margin:16px 0;border:0;padding:0}
.desktop-shell .ui-change>h4{margin:0 0 8px;font-size:14px;font-weight:500}
.desktop-shell .ui-change .ui-record-info{background:#f6f7f9;margin:0}
.desktop-shell .ui-history-entry,.desktop-shell .ui-modal .history-entry{border-bottom:1px solid var(--ui-border);padding:0 0 20px;margin:0 0 20px}
.desktop-shell .ui-history-entry>h3{font-size:15px;margin:0 0 6px}
.desktop-shell .ui-history-entry>small{display:block;color:var(--ui-muted);margin-bottom:12px}
.desktop-shell .ui-form .form-grid:empty{display:none}
@media(max-width:600px){.desktop-shell dialog.ui-drawer{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0}.desktop-shell .ui-form-grid{grid-template-columns:minmax(0,1fr)}.desktop-shell .ui-record-info>div{grid-template-columns:76px minmax(0,1fr);gap:8px}}
.desktop-shell #message.error:not(:empty){background:var(--ui-error-soft);color:var(--ui-error)}
.desktop-shell #task-list>.ui-state{margin:0}
.desktop-shell .contract-detail-table th:nth-child(3),.desktop-shell .contract-detail-table td:nth-child(3),.desktop-shell .contract-detail-table th:nth-child(4),.desktop-shell .contract-detail-table td:nth-child(4){text-align:right;font-variant-numeric:tabular-nums}
.desktop-shell:not(.graphite-cost) .cost-summary .card{background:#fff}
.desktop-shell:not(.graphite-cost) .cost-summary .card:before{background:var(--ui-amber)}
.desktop-shell:not(.graphite-cost) .cost-summary strong{color:var(--ui-graphite)}
.desktop-shell:not(.graphite-cost) .cost-summary span{font-size:14px}
.desktop-shell:not(.graphite-cost) .cost-summary .card:last-child:before{background:var(--ui-success)}
.desktop-shell:not(.graphite-cost) .cost-summary .card:last-child strong{color:var(--ui-success)}
.desktop-shell .unit-payment-toggle{display:block;margin-top:8px;padding:5px 10px;min-height:32px;font-size:13px;color:var(--ui-graphite);background:var(--ui-bg)}
.unit-payment-toggle:before{content:'›';display:inline-block;margin-right:8px}.unit-payment-toggle[aria-expanded="true"]:before{transform:rotate(90deg)}
.unit-payment-row[hidden]{display:none!important}
.desktop-shell .unit-payment-row>td{padding:0 14px 12px;background:#fafbfc}
.desktop-shell .unit-linked-payments>.business-record-hint{margin:0;padding:10px 0;font-size:13px}
.desktop-shell .unit-linked-payments>.business-payment-group{margin:0;border:0;border-top:1px solid var(--ui-border);border-radius:0;background:transparent}
.desktop-shell .unit-linked-payments>.business-payment-group>summary{padding:12px 8px;min-height:44px;color:var(--ui-graphite)}
.desktop-shell .unit-linked-payments .business-payment-items{padding:0 8px 8px}
.desktop-shell .unit-contract-archive{color:var(--ui-amber)}
.desktop-shell .unit-detail-back{margin:0 0 16px;min-height:38px}
.unit-record-intro h3{font-size:20px;margin:0 0 12px;color:var(--ui-graphite);overflow-wrap:anywhere}
.unit-record-intro p{margin:5px 0}.unit-record-intro small{color:var(--ui-muted)}
.unit-record-section{border-top:1px solid var(--ui-border);padding-top:18px;margin-top:20px}
.unit-record-section h4{font-size:16px;margin:0 0 12px;color:var(--ui-graphite)}
.desktop-shell .unit-record-intro{display:block;position:static;padding:0 0 4px;margin:0;background:transparent;border:0;min-height:0}
.desktop-shell .unit-record-page .ui-record-info{display:grid;grid-template-columns:minmax(0,1fr);margin:0;background:transparent;padding:0}
.desktop-shell .unit-record-page .ui-record-info>div{grid-template-columns:180px minmax(0,1fr)}
.unit-record-page .ui-record-info dd{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.unit-record-note{color:var(--ui-muted);font-size:13px;line-height:1.6;margin:8px 0 12px}
.unit-record-section .record-management-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.unit-payment-entry{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:16px;padding:12px 0;border-top:1px solid var(--ui-border)}
.unit-payment-entry small{display:block;color:var(--ui-muted);margin-top:5px}.unit-payment-entry .money{white-space:nowrap}
.unit-payment-status{border-top:1px solid var(--ui-border);padding:12px 0}.unit-payment-status>summary{cursor:pointer;font-weight:600;overflow-wrap:anywhere;line-height:1.7}.unit-payment-panel .unit-payment-entry strong,.unit-payment-panel .unit-payment-entry small{overflow-wrap:anywhere}.unit-payment-panel h3{margin:0 0 12px}
@media(max-width:600px){.unit-payment-entry{grid-template-columns:minmax(0,1fr)}.unit-payment-entry button{justify-self:start}.desktop-shell .unit-record-page .ui-record-info>div{grid-template-columns:minmax(0,1fr);gap:4px}.unit-record-page .ui-record-info dd{margin-bottom:10px}}
:root body>header .ui-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;font-size:15px;text-decoration:none;color:var(--ui-text);background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius)}
.graphite-cost #risk-link{background:var(--ui-amber-soft);color:var(--ui-text);border-color:var(--ui-amber)}
.graphite-cost #analysis-link{background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
/* Same-origin menu navigation retains the browser-owned old frame until data is ready.
   Reloads/unsupported browsers use the bounded initial loading state below. */
@view-transition{navigation:none}
/* Browser snapshots must not swallow a second navigation click. */
::view-transition{pointer-events:none}
.workspace-refresh{flex-shrink:0}.workspace-progress{position:fixed;top:8px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);z-index:120;padding:10px 18px;border:1px solid var(--ui-amber);border-radius:8px;background:var(--ui-amber-soft);color:var(--ui-text);box-shadow:0 3px 12px #26323d18;font-size:14px;pointer-events:none}.workspace-progress[hidden],.app-guest .workspace-refresh{display:none!important}
@media(max-width:760px){.desktop-shell>header{flex-wrap:wrap}.desktop-shell>header>.cost-top-actions{flex-basis:100%;min-width:0;flex-wrap:wrap;justify-content:flex-end}}
/* Sidebar is captured separately: only page content cross-fades. */
.app-sidebar{view-transition-name:workspace-sidebar}
::view-transition-group(root){animation-duration:180ms}
::view-transition-group(workspace-sidebar),::view-transition-old(workspace-sidebar),::view-transition-new(workspace-sidebar){animation:none;mix-blend-mode:normal}
::view-transition-old(workspace-sidebar){opacity:0}
html.app-screen-hold::view-transition-old(workspace-sidebar){opacity:1}
html.app-screen-hold::view-transition-new(workspace-sidebar){opacity:0}
html.app-screen-hold::view-transition-old(root){animation:workspace-hold-old 17s linear both;mix-blend-mode:normal}
html.app-screen-hold::view-transition-new(root){animation:workspace-hold-new 17s linear both;mix-blend-mode:normal}
html.app-screen-enter::view-transition-old(root){animation:workspace-content-out 180ms ease-out both;mix-blend-mode:normal}
html.app-screen-enter::view-transition-new(root){animation:workspace-content-in 180ms ease-out both;mix-blend-mode:normal}
@keyframes workspace-hold-old{from,to{opacity:1}}
@keyframes workspace-hold-new{from,to{opacity:0}}
@keyframes workspace-content-in{from{opacity:0}to{opacity:1}}
@keyframes workspace-content-out{from,to{opacity:1}}
/* Real headings remain in place; no full-screen replacement skeleton or fake cards. */
html.app-boot body>main,html.app-boot .workspace>main>:not(.workspace-heading){visibility:hidden!important}
html.app-boot .route-placeholder{visibility:visible!important}
html.app-boot:not(.app-shell-ready) #module-nav,html.app-boot .workspace>.sidebar{visibility:hidden!important}
html.app-boot:not(.app-shell-ready) .app-sidebar-footer{visibility:hidden}
html.app-boot body{background:var(--ui-bg)}
html.app-boot body>header{margin-left:208px}
#app-boot-notice{display:none}
html.app-boot #app-boot-notice{display:flex;align-items:center;gap:12px;position:fixed;left:252px;right:32px;top:128px;z-index:100;color:var(--ui-muted);font:14px/1.7 "Microsoft YaHei","Segoe UI",sans-serif}
#app-boot-message{margin:0}#app-boot-retry{color:var(--ui-text);background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:8px;padding:10px 16px;text-decoration:none}
html.app-data-pending #app-boot-notice{display:none}
html.app-data-pending #app-boot-retry{pointer-events:auto}
/* Background-refresh notices must not insert/remove a row above the ledger. */
body.graphite-cost #notice:not(:empty){position:fixed;left:232px;right:24px;bottom:16px;z-index:120;margin:0;padding:12px 16px;border:1px solid var(--ui-border);border-radius:8px;box-shadow:0 3px 12px #26323d18;pointer-events:none}
body.graphite-cost #notice a{pointer-events:auto}
body.graphite-cost .cost-summary strong:empty::after{content:'—'}
.route-placeholder{display:grid;gap:16px;margin:20px 0;min-height:280px}
.route-placeholder-card{border:1px solid var(--ui-border);border-radius:10px;background:var(--ui-surface);padding:24px;min-height:110px}
.route-placeholder-card span{display:block;height:14px;margin:12px 0;background:#e9edf0;border-radius:4px;width:65%}
.route-placeholder-card span:first-child{width:40%;height:20px}.route-placeholder-card span:last-child{width:85%}
.route-placeholder-cost .route-placeholder-card,.route-placeholder-settlement .route-placeholder-card{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;min-height:72px;align-items:center}
.route-placeholder-dashboard .route-placeholder-card{min-height:180px}
.route-placeholder-tasks .route-placeholder-card{min-height:130px}
.route-placeholder-sync .route-placeholder-card{min-height:96px}
.route-placeholder-card{min-width:0}.route-placeholder-card span{max-width:100%}
.app-nav-link[aria-busy]{outline:1px dashed var(--ui-amber);outline-offset:-2px}
@media(max-width:760px){.route-placeholder-cost .route-placeholder-card,.route-placeholder-settlement .route-placeholder-card{grid-template-columns:minmax(0,1fr);gap:0}.route-placeholder-card{padding:16px}}
@media(max-width:760px){body.graphite-cost #notice:not(:empty){left:16px;right:16px}}
#app-boot-retry[hidden]{display:none!important}
.page-load-indicator{width:16px;height:16px;flex-shrink:0;border:2px solid var(--ui-border);border-top-color:var(--ui-amber);border-radius:50%;animation:workspace-loading 900ms linear infinite}
@keyframes workspace-loading{to{transform:rotate(360deg)}}
.app-boot-error .page-load-indicator{display:none}
/* Reload has no old browser snapshot: do not fade readable content from white. */
@media(max-width:760px){html.app-boot body>header{margin-left:0}html.app-boot #app-boot-notice{left:16px;right:16px;top:136px;flex-wrap:wrap}}
@media(max-width:760px){.workspace-progress,html.app-data-pending #app-boot-notice{left:16px;right:16px;top:auto;bottom:16px;transform:none;width:auto;max-width:calc(100vw - 32px)}}
@media(prefers-reduced-motion:reduce){html.app-screen-enter::view-transition-old(root),html.app-screen-enter::view-transition-new(root){animation-duration:1ms}.page-load-indicator{animation:none}html.app-content-enter body>main,html.app-content-enter .workspace>main>:not(.workspace-heading){animation:none}}
/* Login-only layout: authenticated settlement pages retain their own shell. */
:root body:has(#login-panel:not([hidden])){background:var(--ui-bg);margin:0;padding:0}
:root body:has(#login-panel:not([hidden]))>header{display:none}
:root body:has(#login-panel:not([hidden]))>main{max-width:none;margin:0;padding:40px;min-height:100vh;display:grid;align-content:center}
:root body:has(#login-panel:not([hidden])) #notice:empty{display:none}
:root body #login-panel:not([hidden]){display:grid;grid-template-columns:1.1fr 1fr;width:100%;max-width:1120px;min-height:650px;margin:0 auto;padding:0;border:1px solid var(--ui-border);border-radius:20px;overflow:hidden;box-shadow:0 20px 64px #26323d0d;background:var(--ui-surface)}
:root body #login-panel .login-story h1{font-size:44px;color:#fff}:root body #login-panel h2{font-size:28px}:root body #login-panel #login-password-toggle{width:auto;margin:0}
.login-intro{background:var(--ui-graphite);color:#fff;padding:40px 48px;display:flex;flex-direction:column;min-width:0;position:relative}
.login-brand{display:flex;align-items:center;gap:12px}.login-brand strong{font-size:23px;color:#fff}.login-brand>span:last-child{font-size:12px;color:#bac5ce;border-left:1px solid #ffffff38;padding-left:12px}
.login-mark{display:grid;place-items:center;width:36px;height:36px;border:1px solid #c89a51;border-radius:9px;color:#edc586;font-size:19px}
.login-story{margin:auto 0;padding:56px 0 40px}.login-eyebrow{color:#edc586;font-size:14px;letter-spacing:2px;margin:0 0 22px}
.login-story h1{font-size:44px;line-height:1.45;letter-spacing:2px;color:#fff;margin:0 0 22px}.login-description{color:#c3cdd5;font-size:15px;line-height:1.9;margin:0}
.login-features{display:grid;gap:18px;margin-top:40px}.login-features>div{display:grid;grid-template-columns:28px 1fr;column-gap:12px}.login-features span{color:#d7ac67;font-size:12px;grid-row:span 2;padding-top:3px}.login-features strong{font-size:15px;color:#fff}.login-features p{margin:4px 0 0;color:#b6c2cc;font-size:13px}
.login-intro-footer{margin:0;padding-top:20px;border-top:1px solid #ffffff20;color:#aebbc6;font-size:12px;letter-spacing:3px}
.login-entry{padding:48px;display:flex;flex-direction:column;justify-content:center;min-width:0}.login-form-wrap{margin:auto 0;width:100%}.login-kicker{color:var(--ui-amber);font-size:14px}.login-entry h2{font-size:28px;margin:12px 0;color:var(--ui-text)}.login-help{color:var(--ui-muted);line-height:1.7;margin:0 0 32px;font-size:14px}
#login-form{display:block}#login-form label{display:block;margin:20px 0 8px;font-size:14px}#login-form input{width:100%;min-width:0;min-height:48px;margin:0;font:inherit;box-sizing:border-box}#login-form input::placeholder{color:#7b8793;font-size:14px}
.login-password-field{position:relative}#login-form .login-password-field input{padding-right:94px}#login-password-toggle{position:absolute;right:5px;top:3px;min-height:42px;padding:8px;border:0;background:transparent;color:var(--ui-muted);font-size:12px;margin:0}
#login-message{font-size:13px;line-height:1.6;margin:12px 0;overflow-wrap:anywhere}#login-message:empty{display:none}#login-submit{width:100%;min-height:48px;margin:24px 0 0;font-size:15px;font-weight:600}.login-support{color:var(--ui-muted);font-size:12px;margin:20px 0 0;line-height:1.7}.login-entry-footer{color:var(--ui-muted);font-size:12px;margin:44px 0 0;padding-top:20px;border-top:1px solid var(--ui-border)}
@media(max-width:1100px){:root body:has(#login-panel:not([hidden]))>main{padding:24px}.login-intro,.login-entry{padding:32px}.login-story h1{font-size:38px}.login-brand>span:last-child{display:none}}
@media(max-width:700px){:root body:has(#login-panel:not([hidden]))>main{padding:16px;align-content:start}:root body #login-panel:not([hidden]){grid-template-columns:minmax(0,1fr);min-height:0;border-radius:14px}.login-intro{padding:24px}.login-story,.login-intro-footer{display:none}.login-brand>span:last-child{display:block}.login-brand strong{font-size:21px}.login-entry{padding:32px 24px}.login-entry h2{font-size:25px}.login-help{margin-bottom:24px}.login-entry-footer{margin-top:32px}}
/* Review group headings remain visible; native details supports keyboard/touch. */
.review-type{margin:12px 0;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:var(--ui-surface);overflow:hidden}
.review-type>summary{display:flex;align-items:center;gap:10px;min-height:48px;padding:12px 16px;list-style:none;cursor:pointer;overflow-wrap:anywhere;color:var(--ui-text)}
.review-type>summary::-webkit-details-marker{display:none}
.review-type>summary:focus-visible{outline:2px solid var(--ui-amber);outline-offset:-2px}
.review-arrow{flex:none;color:var(--ui-amber)}
.review-type-content{padding:0 12px 12px;min-width:0}
.review-type-content .cost-record>summary{flex-wrap:wrap;overflow-wrap:anywhere}
@media(max-width:760px){.review-type>summary{padding:12px}.review-type-content{padding:0 8px 8px}}
.contract-picker{min-width:0;margin:8px 0}.contract-picker>button{width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere}.contract-picker-panel{border:1px solid var(--ui-border);border-radius:8px;background:var(--ui-surface);padding:8px;margin-top:6px}.contract-picker-panel>input{width:100%;box-sizing:border-box;margin:0 0 8px}.contract-picker-results{max-height:320px;overflow:auto;overscroll-behavior:contain}.contract-picker-results>button{display:block;width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere;margin:0 0 6px}.contract-picker-results>button[aria-pressed=true]{background:var(--ui-amber-soft);border-color:var(--ui-amber)}
.preview-canvas canvas{display:block;width:auto;max-width:100%;height:auto;margin:auto;box-shadow:0 2px 10px #0002}.preview-canvas canvas[hidden]{display:none}.preview-canvas canvas.enlarged{width:1500px;max-width:none}.preview-controls{position:sticky;top:0;background:var(--ui-bg);z-index:2;padding:6px}.review-paper.preview-expanded{position:fixed;inset:12px;z-index:1000;padding:16px;background:var(--ui-bg);border:1px solid var(--ui-border);box-shadow:0 0 0 100vmax #26323d99;display:flex;flex-direction:column;gap:8px}.preview-expanded .inline-preview{flex:1;min-height:0;height:auto;margin:0}.preview-expanded .inline-preview[hidden]{display:none}@media(max-width:760px){.review-paper.preview-expanded{inset:0;padding:8px}.contract-picker-results{max-height:260px}}
.review-paper.preview-expanded{height:calc(100dvh - 24px);align-self:stretch;box-sizing:border-box}
@media(max-width:760px){.review-paper.preview-expanded{height:100dvh}}
