.tool-launcher{position:fixed;right:24px;bottom:22px;z-index:55;display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 14px;border:1px solid #444842;border-radius:12px;background:#20231f;color:#fffefa;box-shadow:0 6px 24px #0002;font:500 12px/1.4 var(--sans,Arial,sans-serif);cursor:pointer}
.tool-launcher kbd{font:10px monospace;color:#b4b9ac;border:1px solid #50554b;padding:3px 5px;border-radius:4px}.search-symbol{width:13px;height:13px;border:1.5px solid currentColor;border-radius:50%;position:relative;margin-right:3px}.search-symbol:after{content:'';width:6px;height:1.5px;background:currentColor;position:absolute;right:-5px;bottom:-3px;transform:rotate(45deg)}
.tool-dialog{position:fixed;inset:0;margin:auto;width:min(610px,calc(100vw - 28px));max-height:min(680px,calc(100dvh - 40px));padding:0;border:1px solid #d4d7ce;border-radius:18px;background:#fcfbf7;color:#171918;box-shadow:0 28px 100px #0004;overflow:auto}.tool-dialog::backdrop{background:#11181299;backdrop-filter:blur(5px)}
.tool-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px 12px}.tool-dialog-head h2{font-size:23px;margin:0;letter-spacing:-.04em;font-weight:500}.tool-close{padding:9px 12px;min-height:40px;border:1px solid #d8dbd1;border-radius:7px;background:transparent;color:#434a3c;font-size:12px;cursor:pointer}
.tool-dialog #toolSearch{display:block;width:calc(100% - 48px);margin:0 24px;padding:14px 16px;background:#f1f1ea;border:1px solid #dce0d4;border-radius:10px;font-size:16px;min-height:50px;color:#171918;box-sizing:border-box}.tool-result-count{font:11px/1.5 var(--mono,monospace);margin:14px 24px 8px;color:#757e69}.tool-results{padding:0 10px 10px}.tool-result{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px;border-radius:9px;color:inherit;text-decoration:none;border:1px solid transparent}.tool-result>span:first-child{min-width:0}.tool-result strong{display:block;font-size:15px;font-weight:500}.tool-result small{display:block;font-size:12px;line-height:1.5;color:#727b67;margin-top:3px}.tool-result .tool-group{font-size:10px;color:#8d583e;flex-shrink:0}.tool-result:hover,.tool-result:focus{background:#f0efe6;border-color:#deded1;outline:2px solid transparent}.tool-result:focus-visible{outline-color:#bf532e;outline-offset:-2px}.tool-dialog-foot{padding:12px 24px;border-top:1px solid #dedfd6;font-size:11px;color:#7b826f;background:#f6f5ef}.tool-empty{padding:24px;font-size:14px;line-height:1.7}.tool-launcher:focus-visible,.tool-close:focus-visible{outline:2px solid #ef673c;outline-offset:4px}
.draft-tools{border:1px solid #dedfd4;background:#f6f5ee;border-radius:10px;margin-bottom:22px}.draft-tools>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;font-size:12px;cursor:pointer;list-style:none}.draft-tools>summary>span{font:9px/1.5 var(--mono,monospace);color:#7b806e}.draft-content{padding:0 16px 16px}.draft-content label{display:block;margin-bottom:12px}.draft-content select{display:block;width:100%;margin-top:7px;min-height:44px;border:1px solid #d3d8cb;background:#fffefa;border-radius:7px;padding:9px;font-size:12px;color:#353c2d}.draft-content>.button{margin-bottom:16px}.draft-actions{display:flex;gap:14px;flex-wrap:wrap}.draft-actions button{min-height:40px}.draft-content p{font-size:11px;line-height:1.7;color:#6d7660;margin:10px 0 0}.draft-tools[open]>summary>span{transform:none}
#continueWork{margin-bottom:22px}.continue-card{border:1px solid #dddfd4;border-left:3px solid #ef673c;padding:16px 20px;background:#fff9ef;border-radius:9px;margin-bottom:8px}.continue-card p{font-size:12px;line-height:1.6}.continue-card button{min-height:40px}
body{padding-bottom:60px}
@media(max-width:700px){.tool-launcher{right:16px;bottom:max(14px,env(safe-area-inset-bottom));padding:10px 13px}.tool-launcher kbd{display:none}.tool-dialog-head{padding:18px 18px 12px}.tool-dialog-head h2{font-size:21px}.tool-dialog #toolSearch{margin:0 18px;width:calc(100% - 36px)}.tool-result{gap:10px;padding:13px 10px}.tool-result small{font-size:12px}.tool-result .tool-group{font-size:9px}.tool-dialog-foot{font-size:10px;padding:12px 18px}.draft-content select{font-size:16px}.draft-tools>summary{flex-wrap:wrap;gap:4px}.draft-tools>summary>span{font-size:9px}.continue-card{padding:14px}}
.lab-report-tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:center;gap:12px 24px;padding:20px 22px;border:1px solid #dedfd5;border-radius:12px;background:#f3f2eb;margin-bottom:22px}
.lab-report-tools label{font-size:12px;font-weight:500;display:block}.lab-report-tools input[type=file]{display:block;max-width:100%;font-size:11px;margin-top:10px}.lab-report-tools input::file-selector-button{border:1px solid #d0d6c6;border-radius:7px;padding:10px;background:#fffefa;color:#343c2e;margin-right:8px;cursor:pointer}.lab-report-tools p{font-size:12px;line-height:1.7;color:#6c7560;margin:0}#reportSource{font-size:11px;line-height:1.7;padding:12px 16px;background:#f1eee4;border-left:3px solid #c57d48;border-radius:0 8px 8px 0;margin-bottom:22px}
.lab-filter-bar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:14px 0}.lab-filter-bar label{font-size:12px;line-height:1.6;flex:1;min-width:160px}.lab-filter-bar input,.lab-filter-bar select{display:block;width:100%;box-sizing:border-box;border:1px solid #d2d9c8;border-radius:8px;padding:11px 12px;min-height:44px;background:#fffefa;color:#1f2819;font:13px var(--sans,Arial,sans-serif);margin-top:6px}.lab-filter-status{font-size:11px;color:#738064}.continue-work-item{display:flex;align-items:center;gap:20px;justify-content:space-between;padding:16px 0;border-top:1px solid #e1e3d8}.continue-work-item h3{font-size:15px;font-weight:500;margin:0}.continue-work-item .fineprint{margin:8px 0 0;max-width:700px}.continue-work-item .button{flex-shrink:0}
@media(max-width:700px){.lab-report-tools{grid-template-columns:1fr;padding:16px;gap:14px}.lab-filter-bar{display:grid;grid-template-columns:1fr}.lab-filter-bar label{min-width:0}.lab-filter-bar input,.lab-filter-bar select{font-size:16px}.continue-work-item{align-items:flex-start;flex-direction:column;gap:12px}.lab-report-tools input[type=file]{width:100%}}
/* Programmatic focus announces the new tool without framing its entire title. */
.view h1[tabindex='-1']:focus{outline:none}

/* Compact command surface, with unobstructed mobile forms. */
.tool-launcher{border-radius:7px;background:#17392a;border-color:#36523a;color:#f7f6e9;box-shadow:0 5px 18px #17312516;min-height:45px;font-size:12px}
.tool-launcher kbd{border-color:#547056;color:#b5c8ac;border-radius:3px}
.tool-dialog{border-color:#bbcdb2;border-radius:12px;background:#fbfcf4;color:#23432e;box-shadow:0 24px 100px #122f2947;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b5c5a8 transparent}
.tool-dialog::backdrop{background:#11291ec9;backdrop-filter:blur(9px)}
.tool-dialog-head{padding:22px 24px 16px}
.tool-dialog-head h2{font-size:26px;line-height:1.2;letter-spacing:-.055em;color:#214530}
.tool-close{min-width:58px;min-height:44px;border-color:#cbd8c0;border-radius:5px;color:#516e45;background:#f2f5e9}
.tool-dialog #toolSearch{background:#eef3e3;border-color:#d2dec5;border-radius:7px;min-height:52px;color:#26452e;padding:13px 16px}
.tool-dialog #toolSearch:focus-visible{outline:2px solid #698d55;outline-offset:2px}
.tool-result-count{color:#768367;font-size:10px;margin-block:15px 8px}
.tool-results{padding:0 12px 12px}
.tool-result{padding:13px 12px;border-radius:6px;min-height:72px}
.tool-result strong{font-size:15px;letter-spacing:-.015em;color:#294c31}
.tool-result small{color:#788668;font-size:12px;line-height:1.55;margin-top:4px}
.tool-result .tool-group{background:#f1eadd;border:1px solid #e7d7bf;border-radius:3px;color:#97713f;padding:4px 6px;font-size:9px}
.tool-result:hover,.tool-result:focus{background:#eef3e2;border-color:#dce5cf}
.tool-dialog-foot{background:#f0f4e7;border-color:#dce5d0;color:#788367;font-size:10px;line-height:1.6}
.draft-tools{border-color:#d9e1ce;background:#f4f6eb;border-radius:7px;margin-bottom:18px}
.draft-tools>summary{padding:13px 15px;min-height:49px;color:#5e7550;font-weight:500}
.draft-content{padding:0 15px 15px}
.draft-content select{border-color:#cfdcc1;background:#fffef6;border-radius:5px;color:#3d5a35}
.draft-actions{gap:10px 15px}
.continue-card{background:#f4f0e2;border-color:#e1dcc8;border-left-color:#db9e58;border-radius:6px}
.lab-report-tools{background:#edf2e3;border-color:#d4dfc7;border-radius:7px;padding:17px 20px;margin-bottom:18px}
.lab-report-tools p{color:#70805f;font-size:12px;line-height:1.65}
.lab-report-tools input::file-selector-button{border-color:#c5d3b6;background:#f9fbf0;color:#47623c;border-radius:4px}
#reportSource{background:#f3efe2;border-color:#c58e48;border-radius:0 5px 5px 0}
.lab-filter-bar input,.lab-filter-bar select{border-color:#cbd9bb;background:#fffef8;border-radius:5px;color:#355333}
.continue-work-item{border-color:#dce5cf;gap:18px;padding:14px 0}
@media(max-width:700px){
  body{padding-bottom:max(12px,env(safe-area-inset-bottom))}
  /* A document-flow launcher cannot cover buttons or the mobile keyboard. */
  .tool-launcher{position:static;display:flex;width:calc(100% - 32px);max-width:420px;justify-content:center;margin:20px auto 12px;min-height:48px;border-radius:6px;box-shadow:none;gap:12px}
  .tool-dialog{inset:12px 0 auto;margin:0 auto;width:calc(100vw - 20px);max-height:calc(100dvh - 24px);border-radius:10px;scroll-padding-top:12px}
  .tool-dialog-head{padding:17px 16px 13px;gap:14px}
  .tool-dialog-head h2{font-size:23px;line-height:1.2}
  .tool-close{min-height:44px;min-width:56px;padding:9px 11px;font-size:12px}
  .tool-dialog #toolSearch{width:calc(100% - 32px);margin:0 16px;min-height:50px;font-size:16px;padding:12px}
  .tool-result-count{margin:13px 17px 7px}
  .tool-results{padding:0 7px 9px}
  .tool-result{padding:12px 10px;gap:10px;align-items:flex-start;min-height:76px}
  .tool-result strong{font-size:14px;line-height:1.35}
  .tool-result small{font-size:12px;line-height:1.5}
  .tool-result .tool-group{font-size:8px;padding:3px 4px;margin-top:1px}
  .tool-dialog-foot{padding:11px 17px;font-size:10px;line-height:1.6}
  .draft-tools>summary{padding:12px 14px;min-height:48px;line-height:1.5;font-size:12px}
  .draft-content{padding:0 14px 14px}
  .draft-actions button{min-height:44px}
  .lab-report-tools{padding:14px;gap:11px}
  .lab-report-tools input[type=file]{font-size:11px;min-width:0}
  .lab-filter-bar{padding:10px 0;gap:10px}
  .continue-work-item{gap:10px}
  .continue-work-item .button{width:100%}
}

@media(max-width:500px){.tool-result{flex-wrap:wrap;gap:7px}.tool-result>span:first-child{flex-basis:100%}.tool-result .tool-group{white-space:normal;line-height:1.4}.tool-dialog-head{padding:18px 18px 12px;gap:12px}.tool-dialog-head h2{font-size:20px}.tool-close{min-height:44px}}
