.kb-home{margin:0 auto 36px;padding:26px;border:1px solid #66512c;border-radius:16px;background:linear-gradient(120deg,#302716,#211c14);text-align:left;color:#f2e4cc}.kb-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.kb-head h2,.kb-head h3{margin:0}.kb-head p,.kb-note{font-size:13px;color:#b5a587;line-height:1.7}.kb-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:18px}.kb-item{border:1px solid #54452c;border-radius:10px;padding:18px;background:#201b13}.kb-item p{overflow-wrap:anywhere}.kb-item button{margin:6px 8px 0 0}.kb-picker{margin:16px 0;padding:14px 18px;border:1px solid var(--hair2);border-radius:12px;background:var(--card,#292215);display:flex;align-items:center;gap:12px;flex-wrap:wrap}.kb-picker label{font-size:13px}.kb-picker select{min-width:220px;max-width:100%;background:#17120b;color:#e8d9be;border:1px solid #66512c;border-radius:8px;padding:10px}.kb-picker small{color:var(--txt-3);font-size:12px}.kb-dialog{width:min(680px,92vw);max-height:85vh;overflow:auto;background:#2b2315;color:#eee0c7;border:1px solid #695431;border-radius:16px;padding:26px}.kb-dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}.kb-dialog input{width:100%;box-sizing:border-box;padding:12px;background:#140f09;color:#eee0c7;border:1px solid #66512c;border-radius:8px;margin:6px 0 14px}.kb-dialog label{display:block;font-size:13px}.kb-file{display:grid;grid-template-columns:1fr auto;gap:10px;padding:12px 0;border-bottom:1px solid #55482f}.kb-file strong{overflow-wrap:anywhere}.kb-file small{display:block;color:#b5a587;margin-top:6px}.kb-error{color:#ed9393!important}.kb-ready{color:#87cba8!important}.kb-empty{padding:20px;color:#b5a587;border:1px solid #54452c;border-radius:10px;margin-top:16px}.strategy-steps{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.strategy-steps span{padding:8px 14px;border:1px solid #59482c;border-radius:30px;color:#cbb78f;font-size:13px}.strategy-paper{padding:30px;background:#fffdf9;color:#443b2c;border-radius:14px;margin:20px 0;line-height:1.8}.strategy-paper h2{color:#43361f}.strategy-action{border:1px solid #e6dac7;border-radius:10px;padding:18px;margin:14px 0}.strategy-action p{white-space:pre-wrap}.strategy-paper .btn-ghost{color:#6c542b;border-color:#c6ad80}.strategy-list{display:grid;gap:10px;margin-top:18px}.strategy-row{padding:16px;border:1px solid #59482c;border-radius:10px;display:flex;justify-content:space-between;gap:12px;align-items:center}.strategy-row small{display:block;color:#ae9c7c;margin-top:6px}.strategy-banner{padding:14px 20px;background:#332817;border:1px solid #8c6b33;border-radius:10px;margin:16px 0;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.strategy-banner span{flex:1}.kb-busy{opacity:.65;pointer-events:none}@media(max-width:600px){.kb-home,.kb-dialog{padding:18px}.kb-picker select{width:100%}.strategy-paper{padding:18px}.strategy-row{align-items:flex-start;flex-direction:column}}

.kb-home[hidden],.kb-picker[hidden],.strategy-banner[hidden],.strategy-paper[hidden]{display:none!important}

/* Explicit centering: the site's global margin reset overrides the native dialog defaults. */
.kb-dialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;max-height:85dvh;overscroll-behavior:contain;box-shadow:0 24px 100px #0008}
.kb-dialog .kb-head{margin-bottom:20px;flex-wrap:nowrap}.kb-dialog .kb-head h2{font-size:20px}.kb-dialog .kb-head .btn{flex-shrink:0}
.kb-form-fields{border:0;padding:0;min-width:0;margin-top:18px}.kb-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.kb-dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;padding:24px 16px;border:1px solid #8b6f40;border-radius:12px;background:#1e180e;color:#f0d5a1;text-align:center;cursor:pointer}
.kb-dropzone span,.kb-dropzone small{font-size:12px;line-height:1.6;color:#b8a889}.kb-dropzone:hover,.kb-dropzone.dragging{background:#3b2e19;border-color:#e7bd70}
.kb-dialog button:focus-visible,.kb-dialog input:focus-visible{outline:2px solid #e7bd70;outline-offset:3px}
.kb-selected-file{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0}.kb-selected-file p{overflow-wrap:anywhere;min-width:0}
.kb-dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:16px}.kb-dialog-actions>p{flex:1;min-width:140px}.kb-dialog .kb-error:empty{display:none}.kb-document-list{margin-top:18px}.kb-dialog .btn{white-space:nowrap}
.strategy-baseline{margin:16px 0;color:#cdbb9a;font-size:13px}.strategy-baseline summary{cursor:pointer}.strategy-baseline .kb-platforms{display:flex;flex-wrap:wrap;gap:16px;margin:14px 0}.strategy-baseline label{display:flex;align-items:center;gap:6px}
.strategy-baseline textarea{width:100%;max-width:700px;min-height:70px;padding:12px;background:#17120b;color:#e8d9be;border:1px solid #66512c;border-radius:8px;box-sizing:border-box}
.strategy-row>div:first-child{flex:1;min-width:0}.strategy-row progress{display:block;width:100%;height:6px;accent-color:#dcb364;margin:12px 0}.strategy-row .kb-row-actions{display:flex;gap:8px;flex-wrap:wrap}
.strategy-paper p{white-space:pre-wrap;overflow-wrap:anywhere}.strategy-paper h3{margin:18px 0 8px}.strategy-paper details{margin:16px 0}.strategy-paper summary{font-weight:600;cursor:pointer}
.strategy-table{width:100%;border-collapse:collapse;font-size:13px;margin:14px 0}.strategy-table th,.strategy-table td{padding:10px;border:1px solid #e6dac7;text-align:left}.strategy-table-wrap{overflow-x:auto}
.strategy-notice{padding:14px;border:1px solid #ddc493;background:#fbf4e5;border-radius:8px;color:#695331}.strategy-paper .kb-note{color:#736b5f}.strategy-paper .kb-head{margin-bottom:16px}
@media(max-width:600px){.kb-dialog{max-height:90dvh;width:94vw;padding:18px}.kb-form-grid{grid-template-columns:1fr;gap:0}.kb-file{grid-template-columns:1fr}.kb-dialog .kb-head h2{font-size:18px}.kb-dialog-actions>p{flex-basis:100%}.kb-dropzone{padding:18px 12px}.strategy-table{min-width:420px}}

/* Knowledge workspace v2: a compact home entry and a two-column editor. */
#kb-home{padding:20px 24px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.12);border-radius:14px;margin-bottom:30px;box-shadow:none}
#kb-home h2{font-size:17px;color:#ece7df}#kb-home h2 span{font-size:12px;font-weight:400;color:#b3a995}#kb-home .kb-head p{color:#9fa7b5;font-size:12px;margin-top:5px}
#kb-libraries{display:block;margin-top:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#kb-libraries p{overflow:hidden;text-overflow:ellipsis;color:#c3b393;margin:0;font-size:12px}
.kb-editor-dialog{width:min(1040px,94vw);padding:26px}.kb-editor-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px}
.kb-editor-form,.kb-editor-files{min-width:0}.kb-editor-layout h3{font-size:15px;margin:0 0 10px}.kb-editor-files{border-left:1px solid #574a32;padding-left:28px;display:flex;flex-direction:column}
.kb-editor-files .kb-document-list{overflow:auto;max-height:440px;min-height:230px;flex:1}.kb-editor-files .kb-file{grid-template-columns:minmax(0,1fr) auto;font-size:13px}.kb-editor-files .kb-file .btn{font-size:12px;padding:7px 10px}
.kb-editor-dialog .kb-dropzone{padding:16px 12px}.kb-editor-dialog .kb-form-fields{margin-top:0}.kb-editor-dialog input{margin-bottom:12px}.kb-editor-dialog .kb-selected-files{max-height:130px;overflow:auto}
.kb-directory{max-height:52vh;overflow:auto;margin-bottom:20px}.kb-directory-row{display:flex;align-items:center;gap:10px;padding:15px 0;border-bottom:1px solid #574a32}.kb-directory-row>div{flex:1;min-width:0}
.kb-picker select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23dcc18b' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;padding-right:40px}
#strategy-main[hidden]{display:none!important}#strategy-main .kb-picker{margin-bottom:12px}#strategy-main .strategy-baseline{margin:10px 0 22px}#strategy-main #strategy-status[hidden]{display:none}
.strategy-paper{max-width:1100px;margin:0 auto;padding:36px 44px}.strategy-paper>.btn:first-child{margin-bottom:28px}.strategy-paper .kb-head h2{font-size:27px;letter-spacing:-.5px}
.strategy-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:22px 0}.strategy-kpis>div{padding:16px 20px;background:#f5f0e8;border-radius:10px}.strategy-kpis p{font-size:12px;color:#887963;margin:0 0 8px}.strategy-kpis strong{font-size:19px;color:#846231}
.strategy-action{padding:24px;margin:20px 0;border:1px solid #e6dac7;border-left:4px solid #c59b55;box-shadow:0 3px 10px #49300d06}.strategy-action>h3{margin-top:0;font-size:19px}
.strategy-action-columns{display:grid;grid-template-columns:1fr 1.25fr;gap:24px}.strategy-action-columns>section:first-child{background:#faf1e9;border-radius:8px;padding:14px}.strategy-action-columns>section:last-child{padding:14px 0}
.strategy-action section h3{font-size:12px;color:#937547;margin:0 0 8px}.strategy-action section p{font-size:14px;margin:0;line-height:1.9}
.strategy-article-plan{display:grid;grid-template-columns:2fr 1fr 1fr;gap:20px;border-top:1px solid #ece4d8;margin-top:18px;padding-top:18px}.strategy-action>button{margin-top:16px}
.strategy-paper>details{padding:16px 0;border-bottom:1px solid #e6dac7}.strategy-paper>section>p{font-size:14px}.strategy-paper .strategy-notice{font-size:13px}
@media(max-width:720px){.kb-editor-layout{grid-template-columns:1fr;gap:22px}.kb-editor-files{border-left:0;border-top:1px solid #574a32;padding:20px 0 0}.kb-editor-files .kb-document-list{min-height:100px;max-height:260px}.kb-directory-row{flex-wrap:wrap}.kb-directory-row>div{flex-basis:100%}.strategy-paper{padding:22px 18px}.strategy-kpis{grid-template-columns:1fr}.strategy-action-columns,.strategy-article-plan{grid-template-columns:1fr;gap:12px}.strategy-action{padding:18px}.strategy-paper .kb-head h2{font-size:23px}}

.kb-directory-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:10px}.kb-dialog .kb-directory-toolbar input{flex:1;min-width:0;width:0;margin:0}.kb-directory-toolbar .btn{flex-shrink:0;white-space:nowrap}

.kb-editor-files .kb-selected-files{max-height:none;overflow:visible}
.kb-editor-files .kb-selected-file{padding:10px 0;border-bottom:1px solid #574a32}
.kb-editor-files .kb-selected-file p{overflow-wrap:anywhere;min-width:0}
.kb-upload-actions{margin-top:20px;justify-content:flex-end;flex-wrap:wrap}
.kb-upload-actions>p{width:100%;margin:0}.kb-upload-actions>.btn{margin-left:auto}

#strategy-main .strategy-baseline{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:13px;margin:12px 0 22px;color:var(--txt-2)}
#strategy-main .strategy-baseline .kb-platforms{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0}
.strategy-empty{padding:24px 12px;margin-top:18px;font-size:12px;line-height:1.7;color:#9ca3af;text-align:center;border:0;background:none;box-shadow:none}

/* Brand selection is managed centrally in the knowledge directory. */
#view-intel .kb-picker,#view-monitor .kb-picker,#view-content .kb-picker,#view-strategy .kb-picker,.sm-knowledge-filter{display:none!important}
.strategy-generate-toolbar{display:flex;justify-content:flex-end;margin:12px 0}
