[hidden] { display: none !important; }
.tool-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); gap: 8px; max-width: 590px; }
.tool-choices a { display: grid; gap: 5px; padding: 13px; text-decoration: none; }
.tool-choices a:hover { background: #f2f7f6; }
.tool-choices span { color: #536c77; font-size: 12px; }

.document-workbench { display: grid; grid-template-columns:minmax(0,1fr); grid-template-rows: auto minmax(0, 1fr); width:100%;min-width:0;height: 100vh; height: 100dvh; overflow: hidden; }
.document-workbench>* {min-width:0;}
.tool-bar { position: relative; z-index: 2; background: #f9fbfb; border-bottom: 1px solid #dce6e5; }
.tool-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 36px; padding: 4px 10px; color: #fff; background: #182c35; }
.tool-heading h1 { margin: 0; font-size: 14px; font-weight: 700; color: inherit; }
.tool-home { display: inline-flex; align-items: center; }
.tool-home img { width: 114px; height: auto; }
.tool-heading { min-height:64px; padding:10px 18px; gap:14px; }
.tool-home img { width:180px; }
.tool-heading h1 {font-size:16px;line-height:1.5;}
.workspace-tabs {display:flex;align-items:stretch;gap:2px;overflow:auto;white-space:nowrap;background:#eef3f4;border-bottom:1px solid #c9d8dc;padding:0 12px;}
.workspace-tabs button {flex:0 0 auto;min-height:44px;border:0;border-bottom:3px solid transparent;background:transparent;padding:9px 15px;color:#48636f;font:600 14px/1.5 Arial,sans-serif;}
.workspace-tabs button[aria-selected=true] {background:#fff;color:#234b5a;border-bottom-color:#275d70;}
.tool-actions button,.tool-menu summary {font-size:14px;line-height:1.5;min-height:36px;}
#proposal-editor {width:100%;height:100%;border:0;min-height:0;background:white;}
.document-workbench[data-tools-visible] #editor-surface {display:none;}
#calculation-drawer[data-inline][open] {display:block;position:relative;grid-row:2;inset:auto;margin:0;min-height:0;width:100%;height:100%;max-height:none;border:0;}
#calculation-drawer[data-inline]>header {display:none;}
#calculation-drawer[data-inline] #calculation-ready {height:100%;}
@media(max-width:680px){.tool-heading{min-height:56px;padding:9px 12px}.tool-home img{width:144px}.workspace-tabs{padding-inline:5px}.workspace-tabs button{padding-inline:10px;font-size:13px}.tool-actions{gap:4px}.tool-actions button,.tool-menu summary{min-height:40px;font-size:13px}}
html[data-case-embedded] .tool-heading { display: none; }
.link-status { margin-left: auto; color: #d6e8eb; font-size: 12px; overflow-wrap: anywhere; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 5px 9px; }
.tool-actions button, .tool-menu summary, .tools-dialog button { min-height: 32px; border: 1px solid #bed0d2; border-radius: 5px; background: #fff; padding: 4px 8px; color: #275d70; font-size: 12px; font-weight: 600; }
.tool-actions button:not(:disabled):hover, .tool-menu summary:hover, .tools-dialog button:not(:disabled):hover { background: #edf5f4; }
.tool-actions .primary, .tools-dialog .primary { color: #fff; background: #275d70; border-color: #275d70; }
.tool-actions .primary:not(:disabled):hover, .tools-dialog .primary:not(:disabled):hover { color: #fff; background: #1d4a5b; }
.tool-actions button:disabled, .tools-dialog button:disabled { opacity: .48; }
.tool-menu { position: relative; margin: 0; padding: 0; border: 0; min-width: 0; }
.tool-menu summary { margin: 0; align-content: center; }
.tool-menu > div { position: absolute; z-index: 4; inset-inline-start: 0; top: calc(100% + 3px); display: grid; min-width: 135px; gap: 3px; padding: 4px; background: #fff; border: 1px solid #bbcace; border-radius: 6px; box-shadow: 0 4px 14px #213e4a22; }
#case-actions > div { inset-inline: auto 0; }
.tool-menu > div button { text-align: start; white-space: nowrap; }
.project-number { color: #536c77; font-size: 12px; margin-left: auto; }
#tool-status { margin: 0 9px 6px; font-size: 12px; color: #314f5c; }
#native-editor { width: 100%; height: 100%; min-height: 0; border: 0; background: #fff; }
#editor-surface { position: relative; min-height: 0; }
#editor-surface[data-loading] #native-editor { visibility: hidden; pointer-events: none; }
#editor-loading { display: none; }
#editor-surface[data-loading] #editor-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: #536b75; font-size: 13px; background: #f4f7f6; }
#invoice-workbench-status:empty { display: none; }
#calculation-drawer { box-sizing: border-box; padding: 0; margin: 0 0 0 auto; width: min(1250px, 94vw); max-width: none; height: 100dvh; max-height: 100dvh; border: 0; border-left: 1px solid #bdced1; color: #203843; background: #f4f7f6; }
#calculation-drawer::backdrop { background: #182c3580; }
#calculation-drawer > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: #182c35; color: #fff; }
#calculation-drawer h2 { margin: 0; font-size: 16px; }
#calculation-drawer button { border: 1px solid #bdced1; border-radius: 4px; padding: 6px 9px; background: #fff; color: #275d70; font: inherit; cursor: pointer; }
#calculation-ready { height: calc(100% - 50px); display: grid; grid-template-rows: auto minmax(200px, 1fr) auto; }
#rate-library-tools {grid-row:1;min-height:0;flex-wrap:wrap;align-content:center;flex:0 0 auto;}
#rate-library-tools select {width:auto;min-width:150px;max-width:460px;flex:1;}
#rate-library-tools button,#rate-library-tools a {flex:0 0 auto;white-space:nowrap;}
#rate-library-tools{padding:7px 12px;background:var(--i7-surface-soft,#f0f5f5);border-bottom:1px solid #d6e1e3;font:12px/1.4 Arial,sans-serif}
.freight-index-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:7px}
#rate-library-tools select[aria-label="Freight reference revision"]{min-width:260px;max-width:600px;flex:2}
#rate-library-tools select[aria-label="Index container type"]{min-width:85px;max-width:115px;flex:0}
.freight-container-count{display:flex;align-items:center;gap:5px;font-size:11px}.freight-container-count[hidden]{display:none}.freight-container-count input{width:80px;padding:5px;border:1px solid #b9ccd2;border-radius:4px}
.freight-index-preview{max-height:215px;overflow:auto;margin-top:7px}.freight-index-caption,.freight-index-fx{font-size:11px;color:#526e7b;padding:3px 0}
.freight-index-charges{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}.freight-index-charges :is(th,td){padding:4px 8px;text-align:left;border-bottom:1px solid #dce7e9}.freight-index-charges th{background:#e9f1f3;color:#4e6a77;font-weight:600;position:sticky;top:0}
.freight-index-status{margin:5px 0 0;color:#526d78;font-size:11px}
.freight-adoption-dialog{width:min(1000px,94vw);max-height:86vh;overflow:auto;border:1px solid #b9ccd2;border-radius:7px;padding:18px;color:#203c48;background:white;font:13px/1.5 Arial,sans-serif}.freight-adoption-dialog::backdrop{background:#142e3d60}.freight-adoption-dialog h2{font-size:20px}.freight-adoption-dialog button{padding:7px 12px;margin:8px 8px 0 0;border:1px solid #b9ccd2;border-radius:4px;color:var(--i7-action-text,#275d70);background:white;font:inherit}.freight-adoption-dialog button.primary{background:var(--i7-action,#275d70);color:white}
#calculation-editor {grid-row:2;}
.calculation-handoff {grid-row:3;}
#calculation-editor { width: 100%; height: 100%; border: 0; min-height: 0; }
.calculation-handoff { padding: 8px 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; background: #fff; border-top: 1px solid #bdced1; font-size: 12px; }
.calculation-handoff label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.calculation-handoff input, #document-picker-list input { width: auto; margin: 0; }
#calculation-rows { display: flex; gap: 7px 12px; flex-wrap: wrap; max-height: 120px; overflow: auto; }
#calculation-drawer .primary { background: #275d70; color: #fff; }
#calculation-error { margin: 5px 12px; color: #a13b25; font-size: 12px; }
#calculation-error:empty { display: none; }
#document-picker-list { display: grid; gap: 7px; max-height: 45vh; overflow: auto; font-size: 13px; }
#document-picker-list label { display: flex; gap: 7px; align-items: center; padding: 7px; border: 1px solid #dce6e5; border-radius: 4px; }
#create-proposal-option { margin-top: 10px; border-top: 1px solid #dce6e5; padding-top: 10px; }
@media (max-width: 680px) { #calculation-drawer { width: 100vw; } .calculation-handoff { padding: 7px; } }

.tools-dialog { width: min(400px, calc(100% - 22px)); max-height: calc(100% - 24px); padding: 13px; border: 1px solid #bbcace; border-radius: 8px; overflow: auto; color: #213e4a; }
.tools-dialog::backdrop { background: #172c37a6; }
.tools-dialog .dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.tools-dialog h2 { margin: 0; font-size: 16px; }
.tools-dialog form { display: grid; gap: 9px; }
.tools-dialog form label { margin: 0; }
.tools-dialog form :is(input, select) { margin: 3px 0 0; }
.tools-dialog form button { justify-self: end; width: auto; }
.tools-dialog [role="alert"] { margin: 0; color: #933b29; font-size: 12px; }
.saved-projects, .linked-documents ul { margin: 8px 0 0; padding: 0; list-style: none; }
.saved-projects:empty { display: none; }
.saved-projects li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; padding: 4px 0; border-top: 1px solid #e5ebec; }
.saved-projects button { text-align: start; overflow-wrap: anywhere; }
.saved-projects small, .linked-documents small { color: #536c77; font-size: 11px; }
.linked-documents { margin-top: 12px; padding: 9px 10px; border: 1px solid #dce6e5; border-radius: 5px; background: #fff; }
.linked-documents h3 { margin: 0; font-size: 13px; }
.linked-documents li { display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: baseline; padding-block: 3px; }
.linked-documents a { font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 390px) {
  .tool-actions { padding-inline: 6px; gap: 4px; }
  .tool-heading { padding-inline: 7px; }
  .tool-actions button, .tool-menu summary { padding-inline: 6px; }
  .tool-home img { width: 144px; }
}
@media (pointer: coarse) {
  .tool-actions button, .tool-menu summary, .tools-dialog :is(button, input, select),
  .linked-documents a { min-height: 44px; }
  .linked-documents a { display: inline-flex; align-items: center; }
  .tools-dialog :is(input, select) { font-size: 16px; }
}
.tool-actions button,.tool-menu summary {font-size:13px;min-height:36px;line-height:1.5;}
.tool-heading,.tool-heading * {box-sizing:border-box;}
#workspace-customs-label{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px;color:#536b75;margin:0 5px}#workspace-customs-label[hidden]{display:none}#workspace-customs{width:auto;margin:0}
.tool-home img {width:180px;max-width:none;}
@media(max-width:680px){.tool-heading{min-height:56px;padding:9px 12px}.tool-home img{width:144px}.tool-heading h1{font-size:14px}.tool-actions button,.tool-menu summary{min-height:40px;font-size:12px}.link-status{font-size:10px}.tool-heading{gap:8px}}

.tool-heading h1{display:none}.tool-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:6px 12px}.tool-actions #workspace-settings{margin-left:12px}.project-number{margin-left:auto;max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scope-toolbar{display:flex;gap:12px;align-items:center;margin:8px 0;font-size:13px}
.freight-cargo-grid{display:flex;flex-wrap:wrap;gap:8px;margin:9px 0}.freight-cargo-grid label{display:flex;flex-direction:column;gap:3px;font-size:11px;color:#526d78;flex:1 0 150px;max-width:250px}.freight-cargo-grid input,.freight-cargo-grid select{padding:6px;width:100%;border:1px solid #bdcfd5;border-radius:4px;box-sizing:border-box}.equipment-reference{border-top:1px solid #d8e3e7;padding:8px 0;font-size:12px}.equipment-reference summary{cursor:pointer}.freight-container-count{display:flex;gap:6px;align-items:center;font-size:12px}.freight-container-count input{width:65px}.freight-index-status{margin:8px 0;font-size:12px;line-height:1.5}.freight-index-toolbar{flex-wrap:wrap}.freight-index-toolbar>select:first-of-type{min-width:300px;flex:1}
.document-brand-notice{font-size:11px;color:#627781;margin:0;padding:4px 12px;background:#f4f7f7}.document-brand-notice[hidden]{display:none}
/* More paper and calculator space without changing paper typography. */
@media(min-width:900px){.document-workbench .tool-heading{min-height:56px;padding-block:6px}.document-workbench .workspace-tabs button{min-height:36px;padding-block:6px}.document-workbench .tool-actions{padding-block:4px}.document-workbench .tool-actions button,.document-workbench .tool-menu summary{min-height:31px}}
.freight-index-preview{max-height:128px;margin-top:5px}.equipment-reference{padding-block:5px}.freight-index-status{margin-block:4px}#rate-library-tools{padding-block:5px}
.document-workbench .work-person-bar{font-size:11px;min-height:28px}

.workspace-empty{max-width:480px;margin:50px auto;padding:24px;border:1px solid #c9d9dd;border-radius:6px;background:#fff;color:#234b5a;font:14px/1.5 Arial,sans-serif}.workspace-empty[hidden]{display:none}.workspace-empty button{padding:8px 14px;border:1px solid #bdcfd5;border-radius:4px;background:var(--i7-action,#275d70);color:var(--i7-action-ink,#fff);font:inherit}
