/* R010: official screen VI and shared presentation tokens. Loaded last in both documents. */
:root{
 --brand-blue:#096CFF;--brand-cyan:#1DCAD3;--brand-gray:#9FA0A0;--black:#000000;--white:#FFFFFF;
 --surface:#EFF4FA;--text:#22354A;--muted:#52657C;--line:#DFE7F1;
 --ds-input:#F7F9FC;--ds-readonly:#EDF2F8;--ds-error:#AB3036;--ds-warning:#78500C;
 --ds-font:system-ui,-apple-system,"Segoe UI","Microsoft YaHei","PingFang SC",sans-serif;
 --ds-space-1:4px;--ds-space-2:8px;--ds-space-3:12px;--ds-space-4:16px;--ds-space-5:24px;
 --ds-radius-sm:9px;--ds-radius:16px;--ds-control:40px;--ds-shadow:0 4px 18px #23406006;
 --radius:var(--ds-radius);--font:15px;font-family:var(--ds-font);line-height:1.55;
}
body{font-family:var(--ds-font);color:var(--text);background:var(--surface)}
body>main{max-width:1540px;padding:20px 28px 36px}h1,h2,h3{letter-spacing:.015em}h1{font-size:24px}h2{font-size:20px}p{line-height:1.6}
.card,.business-card{background:var(--white);border:1px solid var(--line);border-radius:var(--ds-radius);box-shadow:var(--ds-shadow)}
.card{padding:22px;margin:16px 0}.business-card{padding:18px;margin:12px 0}
input:not([type=checkbox]):not([type=radio]),select,textarea{font-family:var(--ds-font);color:var(--text);background:var(--ds-input);border:1px solid #CBD7E5;border-radius:var(--ds-radius-sm);min-height:var(--ds-control);padding:8px 10px;font-size:15px;font-variant-numeric:tabular-nums;box-shadow:none}
input[type=checkbox],input[type=radio]{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;padding:0!important;flex:0 0 18px!important;vertical-align:middle;accent-color:var(--brand-blue)}
input:not([type=checkbox]):not([type=radio]):focus,select:focus,textarea:focus{outline:3px solid #096CFF22;outline-offset:1px;border-color:var(--brand-blue);background:white}
input[readonly]:not([type=checkbox]):not([type=radio]),textarea[readonly]{background:var(--ds-readonly);border-style:dashed;color:#3E5570}
input:disabled:not([type=checkbox]):not([type=radio]),select:disabled,textarea:disabled{background:#EAF0F6;color:#617187;border-color:#D7DFE9;opacity:1;cursor:not-allowed}
input[aria-invalid=true],select[aria-invalid=true],input:user-invalid{border-color:var(--ds-error);background:#FFF6F6}
button,.measurement-root button{font:inherit;min-height:var(--ds-control);padding:8px 14px;border-radius:var(--ds-radius-sm);background:#F0F5FC;color:#245688;border:1px solid #CFDCEB;box-shadow:none;line-height:1.4}
button:hover:not(:disabled){background:#E7F0FC;border-color:#A6C2E8}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #096CFF55;outline-offset:3px}
button.primary,button.primary:hover:not(:disabled),.measurement-root button.primary,.table-view-controls button[aria-pressed=true]{background:var(--brand-blue);border-color:var(--brand-blue);color:var(--white)!important;font-weight:650}
button:disabled,.measurement-root button:disabled{background:#EAF0F6;color:#617187!important;border-color:#D7DFE9;cursor:not-allowed;opacity:1}
button[aria-busy=true]{cursor:progress}label{font-weight:550;color:var(--text)}.muted,.mini,.help,small{color:var(--muted)}
.top{gap:12px;padding:14px 28px;background:white;border-bottom:1px solid var(--line)}
.brand-lockup{display:flex;align-items:center;gap:10px;min-width:0}.brand-full{display:block;width:222px;height:auto}.brand-mobile{display:none}.brand-caption{font-size:13px;color:var(--muted);padding-left:14px;border-left:1px solid var(--line);white-space:nowrap}
.top #version-label{font-size:11px;color:var(--muted)}.top #environment-label{font-size:12px;border-radius:6px;padding:3px 7px;background:#FFF4D9;color:#78500C}.top #identity{font-size:13px}.top #logout{min-height:36px;padding:6px 12px}
#navigation{background:var(--surface);gap:8px;padding:10px 0 14px;z-index:30}#navigation>button,#navigation>.nav-more>summary{border:1px solid transparent;background:white;color:#45617E;min-width:92px;min-height:40px;border-radius:10px;padding:9px 16px;text-align:center}
#navigation button.active,#navigation button.active:hover,#navigation button.active:focus-visible,#navigation .nav-more.active>summary,#navigation .nav-more.active>summary:hover,#navigation .nav-more.active>summary:focus-visible{background:var(--brand-blue)!important;border-color:var(--brand-blue)!important;color:white!important}
#navigation .active svg{color:white;fill:currentColor}.nav-menu{border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px #203D6012}
#login-panel{max-width:480px;margin:36px auto;padding:28px;overflow:hidden}#login-panel .login-brand{margin:-28px -28px 24px;padding:24px 28px;background:var(--brand-blue);color:white}.login-brand img{display:block;width:270px;max-width:100%;height:auto}.login-brand p{font-size:14px;margin:10px 0 0;color:white}.login-intro{font-size:14px;color:var(--muted)}#login-form .primary{width:100%;margin-top:14px;min-height:44px}
.grid{gap:14px}.actions{gap:8px;align-items:center}.tag{background:#EDF4FF;color:#30567D;border-radius:6px;font-size:12px}.error,.bad{color:var(--ds-error)}.warn{color:var(--ds-warning)}
.measurement-layout{gap:20px}.measurement-root{padding:0 0 20px!important;background:transparent;max-width:none}
.measurement-root .card{padding:20px;margin-bottom:16px;border:1px solid var(--line);border-radius:var(--ds-radius);box-shadow:var(--ds-shadow)}
.measurement-root h1,.measurement-root h2{font-size:20px;margin:0 0 14px}.measurement-root h3{font-size:15px}.measurement-root p{font-size:13px;margin:8px 0}
.measurement-root .field{padding:0;background:transparent;border:0;border-radius:0}.measurement-root #defaults.param-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 22px;align-items:start}
.measurement-root .param-grid{gap:14px}.measurement-root .field>label:first-child{font-size:14px;margin-bottom:6px}.measurement-root .field label{font-size:13px}
.measurement-root input:not([type=checkbox]):not([type=radio]),.measurement-root select,.measurement-root textarea{min-height:var(--ds-control);font-size:15px}
.measurement-root .field input[inputmode]{max-width:23ch}.measurement-root .field .inline-grid{gap:6px;grid-template-columns:minmax(65px,90px) minmax(95px,125px);margin-top:6px}
.measurement-root #param-default-0-truck{background:#F4F8FE;border-radius:12px;padding:12px;grid-column:1/-1}.truck-fields{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}.truck-fields label{font-size:13px}.truck-fields input{max-width:100%!important}
.measurement-root .field[id$='-customs'] .inline-grid,.measurement-root .field[id$='-domestic'] .inline-grid{display:flex;gap:6px}.measurement-root .field[id$='-customs'] .inline-grid>span,.measurement-root .field[id$='-domestic'] .inline-grid>span{display:none}
.field-heading{display:flex;gap:4px;align-items:center;flex-wrap:wrap;min-height:28px;line-height:1.35}.field-heading .field-unit{font-size:11px;font-weight:500;color:var(--muted);white-space:normal}.field-heading .label-text{min-width:0}
.help-trigger,.measurement-root .help-trigger{display:inline-grid!important;place-items:center;flex:0 0 24px;width:24px!important;height:26px!important;min-width:24px!important;min-height:26px!important;max-width:24px!important;padding:0!important;background:transparent!important;border:0!important;border-radius:50%;color:#59728C!important;vertical-align:middle}
.help-trigger>span{display:grid;place-items:center;width:17px;height:17px;border:1px solid #91A7BE;border-radius:50%;font-size:11px;line-height:1;font-weight:650}.help-trigger:hover>span,.help-trigger[aria-expanded=true]>span{border-color:var(--brand-blue);color:var(--brand-blue);background:#EAF2FF}
.ui-popover{position:fixed;z-index:2000;width:max-content;max-width:min(330px,calc(100vw - 24px));max-height:min(260px,calc(100dvh - 24px));overflow:auto;border:1px solid #D5DFEC;border-radius:12px;padding:13px 15px;background:white;color:var(--text);box-shadow:0 8px 28px #1C3A6020;font:14px/1.65 var(--ds-font);overflow-wrap:anywhere}
.ui-popover .popover-title{display:block;font-size:14px;margin-bottom:5px;color:#1F3F61}.ui-popover p{margin:0}.ui-popover.unit-menu{padding:5px;width:150px}.unit-menu button{display:flex;justify-content:space-between;width:100%;border:0;background:white;text-align:left;min-height:42px;padding:8px 11px}.unit-menu button[aria-checked=true]{background:#ECF3FF;color:var(--brand-blue);font-weight:650}
.measurement-root #notice{background:#F1F6FF;border-radius:9px;margin-top:12px;border-left:3px solid #B5CDFA;padding:9px 12px;font-size:12px}.measurement-root #notice[data-save-state=unsaved]{border-left-color:#E1B459;background:#FFFAEE}.measurement-root #notice[data-save-state=saved]{border-left-color:var(--brand-cyan)}
.measurement-root .summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px}.measurement-root .metric{border-radius:10px;background:#F3F7FC;padding:10px;min-width:0}.measurement-root .metric span{font-size:12px;color:var(--muted)}.measurement-root .metric strong{font-size:22px;line-height:1.4;font-weight:650;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.weight-metric .weight-heading{display:flex;align-items:center;gap:4px}.weight-metric .weight-reading{display:flex;align-items:center;justify-content:space-between;gap:6px}.measurement-root .weight-metric .weight-unit{min-height:30px;padding:3px 8px;font-size:12px;background:white;white-space:nowrap}.weight-state{display:block;margin-top:3px;font-size:11px!important}
.measurement-root .cost-save-actions{margin:12px 0 0;padding-top:12px}.measurement-aside{width:auto}.measurement-aside .measurement-profit-grid article{background:#F4F7FC;border-radius:10px;padding:12px}.measurement-aside .measurement-profit-grid strong{font-size:23px}.measurement-aside .profit-after{border-left:3px solid var(--brand-cyan);background:#EBF4FF}.measurement-aside p{font-size:12px}
.measurement-root .allocation-tools,.measurement-root .allocation-context{gap:12px}.allocation-add-panel{background:#F5F8FC;border:0;padding:10px 12px;border-radius:10px}.allocation-add-panel .actions{margin:0}.allocation-toolbar label{font-size:12px}.allocation-toolbar{gap:12px;margin:12px 0}.allocation-toolbar select{min-width:90px}
.client-record{border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;margin:0!important;padding:12px 5px!important}.client-record:last-child{border-bottom:0!important}.client-record>details[open]{background:#F5F8FC;border:0;border-radius:9px;padding:12px;margin-top:10px}.client-line{gap:8px}.client-line .client-identity strong{font-size:14px}.client-line .client-actions{gap:4px}.client-line .field-heading{gap:1px;min-height:26px}.client-line .field-unit{font-size:10px}.client-line .help-trigger{flex-basis:20px;width:20px!important;min-width:20px!important;max-width:20px!important;height:24px!important;min-height:24px!important}.client-line label{font-size:12px}.client-line input{background:var(--ds-input);border-color:#CBD7E5;border-radius:8px}.client-number span{font-size:11px}.client-number strong{font-weight:600}.client-record .tag{background:#F0F5FC;color:#4E6581;font-size:11px;padding:2px 5px}
.profit-strip article{border-radius:9px;background:#F3F7FC}.profit-strip .profit-after{border-left:3px solid var(--brand-cyan);background:#EBF4FF}.allocation-source-note{background:#F1F6FF;border-radius:8px;font-size:12px}.measurement-root .allocation-saving{gap:8px}.measurement-bottom{background:#FFFFFFF5;border-top:1px solid var(--line);box-shadow:0 -3px 14px #28405A08;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
@media(min-width:1101px){.measurement-layout{grid-template-columns:minmax(0,1fr) 230px}.measurement-aside{top:75px}}
@media(min-width:701px){.measurement-root .main-table{font-size:14px;table-layout:fixed;min-width:0}.measurement-root .main-table th,.measurement-root .main-table td{padding:7px 5px;line-height:1.5}.measurement-root .main-table th{font-size:12px;background:#F1F6FC;white-space:normal}.measurement-root .main-table th:nth-child(2){width:55px}.measurement-root .main-table th:nth-child(3){width:74px}.measurement-root .main-table th:nth-child(4){width:76px}.measurement-root .main-table th:nth-child(5){width:94px}.measurement-root .main-table th:nth-child(7){width:96px}.measurement-root .main-table th:nth-child(8){width:92px}.measurement-root .main-table th:nth-child(9){width:85px}.measurement-root .main-table th:nth-child(10){width:100px}.measurement-root .main-table th:nth-child(11){width:72px}.measurement-root .main-table input:not([type=checkbox]):not([type=radio]){min-height:36px;height:36px;padding:5px 7px;font-size:14px}.measurement-root .main-table .status-cell{width:auto;max-width:none}.measurement-root .main-table .status-cell button{min-height:32px;padding:4px 8px;font-size:12px}.measurement-root .details-panel{padding:14px;background:#F8FAFD}.measurement-root .details-panel .param-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.measurement-root .main-table .details-row td{padding:12px}.client-line{grid-template-columns:minmax(130px,1fr) 72px 68px 92px 68px 68px 92px 98px 82px}}
@media(max-width:1100px){.brand-caption{display:none}.measurement-root .card{padding:18px}.measurement-root .summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.client-line{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.client-line .help-trigger{flex-basis:30px;width:30px!important;min-width:30px!important;max-width:30px!important;height:36px!important;min-height:36px!important}.client-line .field-heading{min-height:36px}.measurement-root .client-line input{min-height:44px!important;height:44px!important;font-size:16px}.client-line .label-text{font-size:14px}}
@media(max-width:700px){:root{--ds-control:44px;--font:16px}.top{padding:10px 12px;gap:8px;align-items:center}.brand-full{display:none}.brand-mobile{display:flex;align-items:center;gap:5px}.brand-mobile img{display:block;width:39px;height:auto}.brand-mobile strong{font-size:17px;width:auto;white-space:nowrap}.top #version-label{margin-left:auto;font-size:10px}.top #identity{margin-left:0;font-size:11px;flex:1}.top #environment-label{font-size:10px}.top #logout{min-height:34px}.top .brand-lockup{margin-right:0}body>main{padding:8px 10px 28px!important}#navigation{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;position:sticky;top:0;padding:8px 0 10px;z-index:30}#navigation>button,#navigation>.nav-more>summary{min-width:0;min-height:44px;font-size:14px;padding:9px 3px}.nav-more{min-width:0}.nav-menu{width:min(300px,calc(100vw - 24px))}.card{padding:16px}.grid{grid-template-columns:1fr;gap:12px}h1{font-size:22px}h2{font-size:20px}input:not([type=checkbox]):not([type=radio]),select,textarea,.measurement-root input:not([type=checkbox]):not([type=radio]),.measurement-root select,.measurement-root textarea{font-size:16px;min-height:44px}button.primary,.measurement-root button.primary{min-height:48px}#login-panel{margin:20px auto;padding:22px}#login-panel .login-brand{margin:-22px -22px 20px;padding:22px}.login-brand img{width:230px}.measurement-root .card{padding:14px!important;margin-bottom:12px}.measurement-root #defaults.param-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}.measurement-root #param-default-0-air{grid-column:1/-1}.measurement-root .field input[inputmode]{max-width:100%}.measurement-root .field .inline-grid{grid-template-columns:minmax(62px,1fr) minmax(80px,1fr)}.measurement-root .field .inline-grid select{width:100%;font-size:14px;padding:6px}.measurement-root .field-heading{min-height:32px}.help-trigger,.measurement-root .help-trigger{width:30px!important;min-width:30px!important;max-width:30px!important;height:36px!important;min-height:36px!important;flex-basis:30px}.field-heading .field-unit{font-size:11px}.measurement-root .truck-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.measurement-root .truck-fields label{min-width:0}.measurement-root .truck-fields select{font-size:14px;width:100%;max-width:100%}.measurement-root .truck-fields button{min-width:0;padding:5px 7px;font-size:12px}.measurement-root .truck-fields .field-heading{flex-wrap:wrap}.measurement-root .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.measurement-root .metric{padding:9px}.measurement-root .metric strong{font-size:21px}.measurement-root .weight-metric .weight-unit{min-height:36px;padding:4px 7px}.measurement-root .table-view-controls{gap:6px;margin:10px 0}.table-view-controls label{min-width:100%;width:100%}.table-view-controls button{font-size:13px;padding:7px 9px}.measurement-root .main-table>tbody>tr:not(.details-row){padding:9px;gap:4px;border:1px solid var(--line);border-radius:12px;margin-top:10px}.measurement-root .main-table>tbody>tr:not(.details-row)>td{padding:6px!important;font-size:15px}.measurement-root .main-table .code{background:#EEF5FF}.measurement-root .details-panel .param-grid{grid-template-columns:minmax(0,1fr)}.allocation-context{gap:8px}.allocation-add-panel{padding:8px}.allocation-toolbar{gap:8px}.allocation-toolbar label{min-width:80px;font-size:12px}.allocation-toolbar select{min-width:0;width:100%;font-size:14px;padding:6px}.client-number strong{font-size:15px}.client-actions button{min-height:44px!important}.measurement-root .cost-save-actions{gap:8px}.pdf-export-action{max-width:100%;flex-wrap:wrap}.measurement-root .profit-strip article{padding:7px 9px}.ui-popover{font-size:14px;max-height:min(260px,calc(100dvh - 28px))}.unit-menu button{min-height:44px}}
@media(max-width:500px){.client-line{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.client-identity{grid-column:1/-1}.client-actions{grid-column:1/-1;grid-row:auto}.measurement-root #param-default-0-handling{grid-column:1/-1}.measurement-root .client-line .field-heading{min-height:36px}.client-number span{font-size:12px}.client-number strong{font-size:16px}.measurement-root .client-record{padding:12px 2px!important}.measurement-root .allocation-saving button{min-width:0!important}.measurement-bottom .bottom-actions{gap:8px}.measurement-bottom button{font-size:13px;padding:8px 6px}.measurement-bottom p{font-size:11px}.measurement-root .allocation-toolbar{gap:6px}.measurement-root .allocation-toolbar label{min-width:75px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.control-with-unit{display:flex;align-items:center;max-width:26ch;min-width:0;margin-top:5px;border:1px solid #CBD7E5;border-radius:var(--ds-radius-sm);background:var(--ds-input);overflow:hidden}.measurement-root .control-with-unit input:not([type=checkbox]):not([type=radio]){width:100%;min-width:0;max-width:none!important;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;margin:0!important;text-align:right;border-radius:0}.control-with-unit:focus-within{outline:3px solid #096CFF22;outline-offset:1px;border-color:var(--brand-blue);background:white}.control-with-unit:has(input[readonly]){background:var(--ds-readonly);border-style:dashed}.control-with-unit:has(input:disabled){background:#EAF0F6}.input-unit{flex:0 0 auto;padding:0 8px 0 2px;font-size:12px;color:var(--muted);font-weight:500;white-space:nowrap}.truck-fields .control-with-unit{max-width:100%}.client-line input[inputmode]{text-align:right}
@media(max-width:700px){.control-with-unit{max-width:100%}.measurement-root .help-trigger,.measurement-root .client-line .help-trigger{position:relative;flex-basis:36px;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important}.help-trigger::after{content:'';position:absolute;inset:-4px}.measurement-root input:not([type=checkbox]):not([type=radio]),.measurement-root select,.measurement-root textarea{scroll-margin-top:100px;scroll-margin-bottom:140px}}
@media print{.help-trigger,.ui-popover,.weight-unit{display:none!important}.brand-mobile{display:none}.brand-full{display:block;width:210px}.top{padding:10px;background:white}}
.top #environment-label{width:auto;flex:0 0 auto}#message{font-size:13px;padding:5px 0}
.top #identity{min-width:0;overflow-wrap:anywhere}
.measurement-layout,.measurement-frame,.measurement-root{overflow-anchor:none}

/* R010 mobile follow-up: local batch navigation, not a replacement for business navigation.
   Screen only: no PDF/print or calculation styles are changed. Original controls stay mounted. */
.batch-workspace-nav{display:none}.batch-fields>summary,.allocation-history-picker>summary{cursor:pointer;color:var(--brand-blue);font-size:14px;padding:6px 0}.batch-fields[open]>.grid{margin-top:10px}.workspace-state{overflow-wrap:anywhere}
@media screen and (max-width:900px){
 .batch-workspace-nav:not([hidden]){display:block;background:white;border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:12px;scroll-margin-top:70px}
 .batch-workspace-nav>strong{font-size:14px;overflow-wrap:anywhere}.workspace-switch{display:flex;gap:8px;margin:8px 0}.workspace-switch button{flex:1;min-height:44px}.workspace-switch button[aria-pressed=true],.cost-step-switch button[aria-pressed=true]{background:var(--brand-blue);color:white;border-color:var(--brand-blue)}
 .cost-step-switch{display:flex;gap:6px}.cost-step-switch button{flex:1;min-height:44px;min-width:0;font-size:14px;padding:7px 3px}.batch-workspace-nav[data-workspace=allocation] .cost-step-switch{display:none}.workspace-state{font-size:12px;margin:6px 0 10px;color:var(--text);line-height:1.5}
 .measurement-root[data-mobile-workspace=true][data-workspace=cost]>#allocation-section,.measurement-root[data-mobile-workspace=true][data-workspace=cost]>#calculator-trades,
 .measurement-root[data-mobile-workspace=true][data-workspace=allocation]>#editor,.measurement-root[data-mobile-workspace=true][data-workspace=allocation]>#spec-cost-section,.measurement-root[data-mobile-workspace=true][data-workspace=allocation]>#batch-summary-section{display:none!important}
 .measurement-root[data-mobile-workspace=true][data-workspace=cost]:not([data-cost-step=parameters])>#editor,
 .measurement-root[data-mobile-workspace=true][data-workspace=cost]:not([data-cost-step=specs])>#spec-cost-section,
 .measurement-root[data-mobile-workspace=true][data-workspace=cost]:not([data-cost-step=result])>#batch-summary-section{display:none!important}
 .measurement-root[data-mobile-workspace=true] .workspace-verbose,.measurement-root[data-mobile-workspace=true] #cost-summary-state,.measurement-root[data-mobile-workspace=true]>.footnote{display:none}.measurement-root #batch-info{padding:8px 14px!important}.measurement-root[data-mobile-workspace=true] #batch-info h1{display:none}.measurement-root #batch-info #notice{font-size:12px;padding:7px;margin:5px 0 0}.measurement-root #workspace-save-details>summary{font-size:13px;padding:4px 0;color:var(--muted)}.measurement-root[data-mobile-workspace=true] #param-default-0-truck>p.mini{display:none}
 .measurement-root #allocation-section[data-has-source] #allocation-precondition,.measurement-root .source-already-bound{display:none}.measurement-root #allocation-section>h2{font-size:18px}.measurement-root .allocation-context{grid-template-columns:1fr;padding:0}.measurement-root .allocation-history-picker{margin:0}.measurement-root #allocation-source{font-size:12px}
 .measurement-root #calculator-trades{padding:10px 14px!important}.measurement-root #calculator-trades h2{font-size:16px}.measurement-root #calculator-trades p{display:none}
 .measurement-root .cost-save-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.measurement-root .cost-save-actions>button{width:100%;min-height:48px;white-space:nowrap;padding:8px;font-size:15px}.measurement-root .cost-save-actions .pdf-export-action{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.measurement-root .pdf-export-action button{min-height:48px;flex:1;font-size:15px}.measurement-root #cost-revision-options{font-size:13px;margin:8px 0}.measurement-root #cost-revision-options button{font-size:14px;margin-top:8px}
 .measurement-root input:not([type=checkbox]):not([type=radio]),.measurement-root textarea{scroll-margin-top:90px;scroll-margin-bottom:32px}
 .measurement-bottom{display:none!important}.measurement-active{padding-bottom:0!important}
}
@media(max-width:700px){.top{gap:6px;padding:8px 12px}.brand-mobile img{width:32px;height:auto}.brand-mobile strong{font-size:16px}.top #logout{min-height:32px;padding:5px 10px}.top #environment-label{max-width:100%}.top #identity{flex:1 1 calc(100% - 70px)}#navigation{display:flex}#navigation>button,#navigation>.nav-more{flex:1 1 0}#navigation>.nav-more>summary{width:100%}}

/* R011 mobile follow-up: explicit groups prevent auto-placement interleaving.
   Screen only; desktop list, print/PDF and business state remain unchanged. */
.client-remove-dialog{max-width:min(440px,calc(100vw - 32px));box-sizing:border-box;border:1px solid var(--line);border-radius:12px;padding:16px;overflow-wrap:anywhere}.client-remove-dialog::backdrop{background:#10203066}
.cost-step-switch{display:none}
@media screen and (max-width:900px){
 #navigation{position:sticky;top:0;z-index:40;background:var(--surface)}
 .batch-workspace-nav:not([hidden]){position:sticky;top:var(--global-nav-height,64px);z-index:30;padding:6px 10px;margin-bottom:8px;border-radius:10px;scroll-margin-top:var(--global-nav-height,64px)}
 .batch-workspace-nav>strong{display:none}.batch-workspace-nav .workspace-state{font-size:11px;line-height:1.4;margin:4px 0;max-height:3em;overflow:auto}
 .batch-workspace-nav .workspace-switch{margin:0 0 5px;gap:6px}.batch-workspace-nav .workspace-switch button,.batch-workspace-nav .cost-step-switch button{min-height:40px;padding:6px 4px}
 .workspace-switch button[aria-pressed=true],.workspace-switch button[aria-pressed=true]:is(:hover,:focus-visible,:active),.cost-step-switch button[aria-pressed=true],.cost-step-switch button[aria-pressed=true]:is(:hover,:focus-visible,:active){background:var(--brand-blue)!important;border-color:var(--brand-blue)!important;color:var(--white)!important}
 .workspace-switch button[aria-pressed=true] *, .cost-step-switch button[aria-pressed=true] *{color:inherit!important}
 .keyboard-editing .batch-workspace-nav .workspace-state{display:none}
 .measurement-root .client-record{container-type:inline-size;padding:10px 0!important}
 .measurement-root .client-line{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-areas:'identity identity identity identity identity identity' 'ratio ratio water water death death' 'quantity quantity quantity amount amount amount' 'comp comp comp net net net' 'actions actions actions actions actions actions';gap:7px 8px;align-items:stretch}
 .client-line>.client-identity{grid-area:identity;display:flex;align-items:start;gap:8px;padding:0}.client-line .client-name{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.5}
 .client-line .feedback-tag{flex:0 0 auto;align-self:start;font-size:11px;line-height:1.5;background:#F0F5FC;color:#4E6581;padding:2px 5px;border-radius:5px}
 .client-line>label:nth-child(2){grid-area:ratio}.client-line>label:nth-child(5){grid-area:water}.client-line>label:nth-child(6){grid-area:death}
 .client-line>label{display:flex;flex-direction:column;min-width:0;gap:0}.measurement-root .client-line .field-heading{flex:1;min-height:32px;align-items:center;flex-wrap:wrap;gap:1px}
 .client-line .label-text{font-size:14px;line-height:1.4}.measurement-root .client-line .help-trigger{flex-basis:24px;width:24px!important;min-width:24px!important;max-width:24px!important;min-height:32px!important;height:32px!important;padding:2px!important}
 .measurement-root .client-line .control-with-unit{width:100%;max-width:none;margin-top:2px}.measurement-root .client-line input{font-size:max(16px,1rem)!important;height:42px!important;min-height:42px!important;padding:6px!important}
 .client-line .input-unit{padding:0 5px 0 0;font-size:12px}
 .client-line>.client-number:nth-child(3){grid-area:quantity}.client-line>.client-number:nth-child(4){grid-area:amount}.client-line>.client-number:nth-child(7){grid-area:comp}.client-line>.client-number:nth-child(8){grid-area:net}
 .client-line>.client-number{padding:3px 0;line-height:1.4;min-width:0;text-align:right}.client-line .client-number span{font-size:12px;line-height:1.5}.client-line .client-number strong{font-size:max(16px,1rem);line-height:1.4;overflow-wrap:anywhere}
 .client-line>.client-actions{grid-area:actions;display:flex;justify-content:flex-end;gap:8px;margin-top:1px}.client-line .client-actions button{min-height:44px!important;min-width:60px;padding:5px 10px!important;font-size:14px}
 .measurement-root .allocation-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0}.measurement-root .allocation-toolbar>label{min-width:0;display:flex;flex-direction:column;gap:4px;font-size:13px}.allocation-toolbar>label:first-child{grid-column:1/-1}
 .measurement-root .allocation-toolbar :is(input,select){width:100%;min-width:0;max-width:100%;min-height:44px;font-size:16px;margin:0}
 .measurement-root .allocation-add-panel{padding:8px;margin:8px 0}.measurement-root .allocation-add-panel .actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}.measurement-root .allocation-add-panel label{min-width:0;font-size:13px}.measurement-root .allocation-add-panel :is(input,select){min-width:0;max-width:100%;width:100%;font-size:16px;min-height:44px}.measurement-root .allocation-add-panel button{min-height:44px;font-size:14px;padding:6px 10px}
 @container (max-width:14rem){.measurement-root .client-line{grid-template-areas:'identity identity identity identity identity identity' 'ratio ratio ratio water water water' 'death death death . . .' 'quantity quantity quantity quantity quantity quantity' 'amount amount amount amount amount amount' 'comp comp comp comp comp comp' 'net net net net net net' 'actions actions actions actions actions actions'}}
}
/* R012 correction: only this cost-group row sticks; global and batch menus flow. */
@media screen and (max-width:900px){
 #navigation{position:static!important}
 .batch-workspace-nav:not([hidden]){position:static!important;scroll-margin-top:8px}
 .cost-step-switch:not([hidden]){display:flex;position:sticky;top:0;z-index:30;gap:6px;padding:6px 10px;background:var(--white);border:1px solid var(--line);border-radius:10px;margin:0 0 8px;scroll-margin-top:0}
 .cost-step-switch button{flex:1;min-width:0;min-height:40px;padding:6px 3px;font-size:14px}
}
/* R013 phone density only. Keep 16px entry text (iOS focus zoom), no print/PDF change. */
@media screen and (max-width:900px){
 body>main{padding:10px 10px 18px}.measurement-root{padding-bottom:10px!important}
 .measurement-root .card{padding:10px 12px!important;margin:0 0 8px;border-radius:12px}
 .measurement-root h1,.measurement-root h2{font-size:18px;margin-bottom:8px}
 .measurement-root p{margin:5px 0;line-height:1.45}.measurement-root .grid{gap:8px}
 .measurement-root #defaults.param-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
 .measurement-root .field>label:first-child{margin-bottom:2px}
 .measurement-root .field .inline-grid{gap:4px;margin-top:4px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .measurement-root :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px!important;min-height:42px;padding:6px 8px;max-width:100%;min-width:0}
 .measurement-root button:not(.help-trigger):not(.weight-unit){min-height:44px;padding:6px 10px}
 .measurement-root .field-heading{min-height:26px}.measurement-root .control-with-unit{margin-top:3px}
 .measurement-root .help-trigger{height:28px!important;min-height:28px!important;flex-basis:26px;width:26px!important;min-width:26px!important;max-width:26px!important}
 .measurement-root #param-default-0-truck{padding:8px;border-radius:9px}.measurement-root .truck-fields{gap:6px 8px;grid-template-columns:repeat(2,minmax(0,1fr))}
 .measurement-root .truck-fields label:has(select){grid-column:auto}
 .measurement-root .summary-grid{gap:6px}.measurement-root .metric{padding:7px 8px}.measurement-root .metric strong{font-size:21px}
 .measurement-root .cost-save-actions{margin-top:8px;padding-top:6px;gap:8px}.measurement-root .cost-save-actions>button,.measurement-root .pdf-export-action button{min-height:44px}
 .measurement-root .table-view-controls{margin:6px 0;gap:6px}.measurement-root .main-table>tbody>tr:not(.details-row){padding:6px;margin-top:6px;gap:2px}
 .measurement-root .main-table>tbody>tr:not(.details-row)>td{padding:4px!important}
 .measurement-root .client-record{padding:7px 0!important}.measurement-root .client-line{gap:4px 8px}
 .measurement-root .client-line .field-heading{min-height:28px}.measurement-root .client-line .client-number{padding:1px 0}
 .measurement-root .client-line .client-actions{margin-top:0}.measurement-root .allocation-toolbar{margin:6px 0;gap:6px}
 .measurement-root .allocation-add-panel{margin:6px 0;padding:6px 8px}.measurement-root .profit-strip article{padding:5px 8px}
 .batch-workspace-nav:not([hidden]){margin-bottom:6px}.batch-workspace-nav .workspace-switch{margin-bottom:3px}
 .cost-step-switch:not([hidden]){padding:4px 6px;margin-bottom:6px}
 .measurement-root .field :is(input,select){width:100%}
}
@media screen and (max-width:350px){
 .measurement-root #defaults.param-grid{column-gap:8px}.measurement-root .field .inline-grid{grid-template-columns:minmax(0,1fr)}
 .measurement-root .truck-fields{grid-template-columns:minmax(0,1fr)}
}
