/* Business context controls and read-only diagnosis drawer. */
.sy-kb-context-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 10px;min-width:0;font-size:12px}
.sy-kb-context-tools>button,.sy-kb-context-chip button,.sy-kb-entry{height:29px;min-height:29px;width:auto;padding:0 9px;border:1px solid #dde6f2;border-radius:6px;background:#f7faff;color:#5578a5;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}
.sy-kb-context-hint{color:#99a4b5;font-size:11px}.sy-kb-context-chip{display:flex;align-items:center;gap:6px;max-width:100%;padding:3px 5px 3px 9px;border:1px solid #dbe8f7;background:#f0f6ff;border-radius:7px;color:#4f719e;font-size:11px}.sy-kb-context-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px}.sy-kb-context-chip button{height:24px;min-height:24px;padding:0 5px;border:0;background:transparent;font-size:11px}.sy-kb-context-chip button:last-child{font-size:18px;line-height:1}
.review-header .sy-kb-entry{margin-left:auto;font-size:11px;height:27px;min-height:27px}.ledger-detail-summary .sy-kb-entry{margin-left:auto;font-size:12px}.sy-kb-context-tools button:disabled{opacity:.45;cursor:default}
body.sy-kb-open{overflow:hidden}.sy-kb-overlay{position:fixed;inset:0;z-index:16100;display:flex;justify-content:flex-end;background:rgba(19,31,50,.35);color:var(--sy-text,#344054);font:13px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
.sy-kb-overlay *{box-sizing:border-box}.sy-kb-dialog{display:flex;flex-direction:column;width:min(680px,100%);height:100dvh;min-width:0;background:var(--sy-surface,#fff);box-shadow:-8px 0 40px #10213a20;outline:none}
.sy-kb-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 24px 18px;border-bottom:1px solid var(--sy-border,#e7ebf2)}.sy-kb-header h2{font-size:18px;line-height:1.5;font-weight:600;margin:0;color:var(--sy-text,#283a53)}.sy-kb-header p{font-size:12px;margin:5px 0 0;color:var(--sy-muted,#8b97aa)}
.sy-kb-dialog button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:0;height:32px;min-height:32px;padding:0 10px;margin:0;border:1px solid var(--sy-border,#dce3ed);border-radius:6px;background:var(--sy-surface,#fff);color:var(--sy-text,#526781);font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}.sy-kb-dialog button:disabled{opacity:.45;cursor:default}.sy-kb-dialog button:hover:not(:disabled){background:var(--sy-surface-alt,#f6f9fd);border-color:#bed0eb}.sy-kb-dialog button:focus-visible,.sy-kb-dialog input:focus-visible,.sy-kb-dialog select:focus-visible,.sy-kb-dialog summary:focus-visible,.sy-kb-context-tools button:focus-visible,.sy-kb-entry:focus-visible{outline:2px solid #3b82f6;outline-offset:3px}
.sy-kb-dialog .sy-kb-close{width:30px;height:30px;min-height:30px;padding:0;flex:none;border:0;background:transparent;color:#8a98ab;font-size:24px;line-height:1}.sy-kb-content{min-height:0;flex:1;overflow:auto;padding:20px 24px 28px;overscroll-behavior:contain}
.sy-kb-search{display:grid;grid-template-columns:120px minmax(0,1fr) auto;align-items:end;gap:10px;margin:0 0 16px}.sy-kb-search label{display:block;min-width:0;color:#8491a4;font-size:11px}.sy-kb-search input,.sy-kb-search select{display:block;width:100%;height:34px;min-height:34px;margin:6px 0 0;padding:6px 9px;border:1px solid var(--sy-border,#dce3ed);border-radius:6px;background:var(--sy-surface,#fff);color:var(--sy-text,#465a74);font:inherit;font-size:12px}.sy-kb-search button{height:34px;min-height:34px}
.sy-kb-error,.sy-kb-notice{margin:0 0 14px;padding:9px 11px;border:1px solid #f0dad6;border-radius:7px;background:#fff6f4;color:#ae5650;font-size:12px;overflow-wrap:anywhere}.sy-kb-notice{background:#f3f8ff;border-color:#dae8fa;color:#4b79ac}
.sy-kb-options{display:flex;flex-direction:column;gap:7px;margin-bottom:20px;max-height:230px;overflow:auto}.sy-kb-options>button{display:grid;grid-template-columns:64px minmax(0,1fr) auto;justify-content:start;text-align:left;height:auto;min-height:46px;white-space:normal;gap:10px;padding:9px 11px}.sy-kb-options span,.sy-kb-options small{color:#8c9aad;font-size:11px}.sy-kb-options strong{font-size:12px;font-weight:500;overflow-wrap:anywhere}
.sy-kb-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:220px;padding:30px 24px;text-align:center;border:1px dashed #dce5f1;border-radius:9px;color:#98a4b7}.sy-kb-empty strong{font-size:14px;font-weight:500;color:#60758f}.sy-kb-empty p{font-size:12px;line-height:1.9;max-width:340px;margin:8px 0 0}.sy-kb-spinner{width:20px;height:20px;border:2px solid #dbe6f4;border-top-color:#6b94cb;border-radius:50%;margin-bottom:14px;animation:sy-kb-spin .8s linear infinite}@keyframes sy-kb-spin{to{transform:rotate(360deg)}}
.sy-kb-summary{padding:15px 17px;border:1px solid #dde7f4;border-radius:9px;background:#f7faff}.sy-kb-summary>span{font-size:11px;color:#7092bc}.sy-kb-summary h3{font-size:15px;line-height:1.7;font-weight:500;color:#405a7b;margin:5px 0;overflow-wrap:anywhere}.sy-kb-summary p{font-size:11px;color:#91a1b6;margin:0;overflow-wrap:anywhere}.sy-kb-section{margin-top:24px}.sy-kb-section>h3{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:13px;font-weight:600;margin:0 0 12px;color:#526982}.sy-kb-section h3 small{font-size:11px;font-weight:400;color:#9aa5b5}
.sy-kb-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;margin:0;border-top:1px solid #e9edf4}.sy-kb-facts>div{min-width:0;padding:11px 0;border-bottom:1px solid #e9edf4}.sy-kb-facts dt{font-size:11px;color:#98a4b5;margin-bottom:4px}.sy-kb-facts dd{margin:0;font-size:12px;color:#5a6d86;overflow-wrap:anywhere}
.sy-kb-findings{display:flex;flex-direction:column;gap:9px}.sy-kb-finding{padding:11px 13px;border:1px solid #e0e8f3;border-radius:7px;background:#f7faff}.sy-kb-finding strong{font-size:12px;font-weight:500;color:#5a7da8}.sy-kb-finding p{font-size:12px;line-height:1.8;color:#7b8fa9;margin:5px 0 0;overflow-wrap:anywhere}.sy-kb-finding.is-warning{background:#fffbf2;border-color:#ede2c5}.sy-kb-finding.is-warning strong{color:#987b44}.sy-kb-finding.is-warning p{color:#a39170}.sy-kb-finding.is-blocked{background:#fff6f4;border-color:#efd9d5}.sy-kb-finding.is-blocked strong{color:#ae655f}.sy-kb-finding.is-blocked p{color:#b08682}
.sy-kb-related{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.sy-kb-related li{display:flex;align-items:center;gap:8px;padding:10px 11px;border:1px solid #e4eaf3;border-radius:7px}.sy-kb-related li>div{min-width:0;flex:1}.sy-kb-related span{display:block;color:#9aa7b9;font-size:10px}.sy-kb-related strong{display:block;color:#637893;font-size:12px;font-weight:500;overflow-wrap:anywhere}.sy-kb-related button{font-size:11px;height:29px;min-height:29px;padding:0 8px}
.sy-kb-drafts{display:flex;flex-direction:column;gap:12px}.sy-kb-draft{border:1px solid #e0e7f0;border-radius:8px;overflow:hidden}.sy-kb-draft>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;background:#f8fafc;border-bottom:1px solid #e8edf4}.sy-kb-draft h4{font-size:12px;line-height:1.6;font-weight:500;color:#5a6f8a;margin:0}.sy-kb-draft header>span{font-size:10px;white-space:nowrap;color:#a48b5a;background:#fff4dc;border-radius:4px;padding:2px 6px}.sy-kb-draft dl{margin:0;padding:5px 13px}.sy-kb-draft dl>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;padding:7px 0;border-bottom:1px solid #edf1f6}.sy-kb-draft dt{font-size:11px;color:#95a2b5}.sy-kb-draft dd{font-size:12px;color:#637995;margin:0;overflow-wrap:anywhere}.sy-kb-draft>p{margin:9px 13px 12px;font-size:11px;line-height:1.9;color:#91a0b5;overflow-wrap:anywhere}.sy-kb-required{padding:9px 13px 0}.sy-kb-required b{font-size:11px;font-weight:500;color:#9a845d}.sy-kb-required ul{display:flex;flex-wrap:wrap;gap:4px 16px;list-style:none;margin:6px 0 0;padding:0;font-size:11px;color:#a3957c}.sy-kb-draft>footer{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:10px 13px;border-top:1px solid #edf1f6}.sy-kb-draft footer button{font-size:11px;height:29px;min-height:29px;padding:0 8px}
.sy-kb-muted{color:#99a6b8;font-size:12px;line-height:1.9;margin:8px 0}.sy-kb-source{margin-top:20px;padding:12px 14px;background:#f8fafc;border:1px solid #e6ecf4;border-radius:7px}.sy-kb-source summary{cursor:pointer;font-size:11px;color:#8295ad}.sy-kb-source>strong{display:block;font-size:12px;font-weight:500;color:#6e819b;margin-top:10px}.sy-kb-source p{font-size:11px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;color:#93a1b5;margin:5px 0}
.sy-kb-footer{flex:none;padding:14px 24px 18px;border-top:1px solid #e4ebf4;background:var(--sy-surface,#fff)}.sy-kb-footer>p{font-size:11px;line-height:1.8;margin:0 0 10px;color:#95a3b6}.sy-kb-footer>div{display:flex;justify-content:flex-end;gap:9px}.sy-kb-dialog button.sy-kb-primary{background:#376fc2;border-color:#376fc2;color:#fff}.sy-kb-copy-helper{position:fixed;left:-10000px;top:0}
@media(max-width:650px){.sy-kb-context-hint{display:none}.sy-kb-context-tools{gap:7px}.sy-kb-context-chip{width:100%}.sy-kb-context-chip>span{flex:1;max-width:none}.sy-kb-header{padding:17px 16px 14px}.sy-kb-header h2{font-size:16px}.sy-kb-content{padding:16px 16px 22px}.sy-kb-search{grid-template-columns:110px minmax(0,1fr);gap:9px}.sy-kb-search button{grid-column:1/-1;width:100%}.sy-kb-options>button{grid-template-columns:1fr auto;gap:3px 8px}.sy-kb-options span{grid-column:1/-1}.sy-kb-facts{grid-template-columns:1fr}.sy-kb-related li{flex-wrap:wrap}.sy-kb-related li>div{flex-basis:100%}.sy-kb-draft dl>div{grid-template-columns:84px minmax(0,1fr);gap:8px}.sy-kb-footer{padding:12px 16px 15px}.review-header .sy-kb-entry{margin-left:0}.sy-kb-summary{padding:12px 13px}}
@media(prefers-reduced-motion:reduce){.sy-kb-spinner{animation:none}}
.sy-kb-context-tools{margin-bottom:8px}.sy-kb-context-chip{padding:2px 4px 2px 6px;gap:3px;width:auto;max-width:100%;border-color:#e2e9f3;background:#f7faff}.sy-kb-context-chip .sy-kb-chip-open{display:flex;align-items:center;gap:4px;max-width:min(360px,calc(100vw - 118px));padding:0 3px;font-size:11px;min-height:24px;height:24px}.sy-kb-chip-open>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sy-kb-chip-open svg{width:13px;height:13px;flex:none;color:#8ea3bd}.sy-kb-context-chip .sy-kb-chip-open:hover{color:#4675b3;background:transparent}.sy-kb-context-chip>button:last-child{width:23px;min-width:23px;padding:0;color:#92a5bc}
.sy-kb-type-picker{position:relative;min-width:0}.sy-kb-type-label{display:block;color:#8491a4;font-size:11px}.sy-kb-search #syKnowledgeBusinessKind{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;height:34px;min-height:34px;margin:6px 0 0;padding:6px 9px;border:1px solid var(--sy-border,#dce3ed);border-radius:6px;background:var(--sy-surface,#fff);color:var(--sy-text,#465a74);font:inherit;font-size:12px;text-align:left}.sy-kb-search #syKnowledgeBusinessKind[aria-expanded=true]{border-color:#a9c1e1;box-shadow:0 0 0 2px #3975c608}.sy-kb-search #syKnowledgeBusinessKind svg{width:13px;height:13px;color:#91a4be;flex:none;transition:transform .15s}.sy-kb-search #syKnowledgeBusinessKind[aria-expanded=true] svg{transform:rotate(180deg)}
.sy-kb-type-options{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:30;padding:5px;border:1px solid var(--sy-border,#dce5f1);border-radius:8px;background:var(--sy-surface,#fff);box-shadow:0 8px 25px #1b3b6520}.sy-kb-type-options[hidden]{display:none}.sy-kb-search .sy-kb-type-options>button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;height:33px;min-height:33px;margin:0;padding:5px 7px;border:0;border-radius:5px;background:transparent;color:var(--sy-text,#667d9b);font:inherit;font-size:12px;text-align:left}.sy-kb-search .sy-kb-type-options>button:hover,.sy-kb-search .sy-kb-type-options>button.is-active{background:var(--sy-primary-soft,#f0f6ff);color:#5d85b8}.sy-kb-search .sy-kb-type-options>button[aria-selected=true]{color:#4b79b2;font-weight:500}.sy-kb-type-options i{font-style:normal;font-size:11px;color:#7095c2}
@media(max-width:650px){.sy-kb-context-chip{width:auto}.sy-kb-context-chip .sy-kb-chip-open{max-width:calc(100vw - 112px)}.sy-kb-type-options{min-width:130px;right:auto;width:100%}.sy-kb-type-label{font-size:11px}}
