.knowledge-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:start}.knowledge-directory,.knowledge-reader{border:1px solid var(--app-border);border-radius:19px;background:var(--app-surface);min-width:0}.knowledge-directory{display:flex;flex-direction:column;overflow:hidden;position:sticky;top:78px;max-height:var(--knowledge-pane-height,calc(100dvh - 210px))}.knowledge-search,.knowledge-list-status,.knowledge-list-error{flex:0 0 auto}.knowledge-search{padding:17px 16px 12px;display:grid;gap:10px}.knowledge-search .field{min-width:0}.knowledge-search .field>label{font-size:11px}.knowledge-search .field input,.knowledge-search .field select{font-size:12px;min-height:40px;width:100%;min-width:0}.knowledge-filter-row{display:flex;gap:8px}.knowledge-filter-row>.field{flex:1}.knowledge-filter-row>.field:last-child:not(:first-child){max-width:103px}.knowledge-search .knowledge-find{width:100%;min-height:35px;font-size:12px}.knowledge-list-status{padding:0 16px 10px;min-height:25px;font-size:11px;color:var(--app-muted);display:flex;align-items:center;gap:7px}.knowledge-list-status.is-loading::before{content:'';width:10px;height:10px;border:1.5px solid var(--app-border);border-top-color:var(--app-accent);border-radius:50%;animation:knowledge-spin .7s linear infinite}.knowledge-list-error:not(:empty){padding:0 12px 12px}.knowledge-list-error .button{margin-top:8px}.knowledge-results{flex:1 1 auto;padding:0 10px 12px;display:flex;flex-direction:column;gap:20px;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable}.button.knowledge-result{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;gap:4px;width:100%;white-space:normal;border:1px solid transparent;background:transparent;box-shadow:none;padding:12px;border-radius:12px;font-size:12px;color:var(--app-text);height:auto;min-height:0;flex:0 0 auto;transition:background .15s,border-color .15s}.button.knowledge-result:hover{background:var(--app-surface-alt);border-color:var(--app-border);transform:none}.button.knowledge-result.is-selected{background:linear-gradient(105deg,var(--app-accent-soft),#f7faee);border-color:#d3e2c6}.knowledge-result-category{font-size:9px;font-weight:500;letter-spacing:.2px;color:var(--app-accent-strong)}.knowledge-result strong{font-weight:550;font-size:13px;line-height:1.45;overflow-wrap:anywhere}.knowledge-result-summary{font-size:11px;line-height:1.5;color:var(--app-muted);display:block;overflow:visible;white-space:normal;overflow-wrap:anywhere}.knowledge-draft{display:inline-flex;width:fit-content;border-radius:6px;padding:3px 6px;background:var(--app-warning-soft);color:var(--app-warning);font-size:10px;line-height:1.3}.knowledge-list-empty{padding:17px 13px 23px;font-size:13px}.knowledge-list-empty p{font-size:12px;color:var(--app-muted);line-height:1.6;margin-top:7px}.knowledge-reader{position:sticky;top:78px;min-height:min(490px,var(--knowledge-pane-height,calc(100dvh - 210px)));max-height:var(--knowledge-pane-height,calc(100dvh - 210px));box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable;padding:25px 30px 34px;overflow-wrap:anywhere;scroll-margin-top:78px}.knowledge-loading{padding:14px 0}.knowledge-article-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:22px}.knowledge-article-toolbar>.button:last-child{margin-left:auto;font-size:11px;min-height:32px}.knowledge-eyebrow{font-size:10px;font-weight:550;letter-spacing:.7px;text-transform:uppercase;color:var(--app-accent-strong)}.knowledge-mobile-back{display:none}.knowledge-article-header{max-width:780px;margin:0 auto 24px;padding-bottom:21px;border-bottom:1px solid var(--app-border)}.knowledge-article-header h2{font-size:28px;font-weight:550;line-height:1.25;letter-spacing:-.65px;margin:0 0 13px;color:var(--app-text)}.knowledge-article-summary{font-size:14px;line-height:1.65;color:var(--app-muted);margin:0 0 15px}.knowledge-article-meta{font-size:11px;color:var(--app-muted);margin:0}.knowledge-prose{max-width:780px;margin:0 auto;font-size:14px;line-height:1.75;color:var(--app-text)}.knowledge-prose h3{font-size:18px;line-height:1.4;letter-spacing:-.2px;font-weight:550;margin:27px 0 12px}.knowledge-prose h4{font-size:15px;font-weight:550;margin:22px 0 9px;line-height:1.5}.knowledge-prose>h3:first-child{margin-top:0}.knowledge-prose p{margin:0 0 16px}.knowledge-prose ul,.knowledge-prose ol{padding-left:21px;margin:0 0 18px}.knowledge-prose li{padding-left:4px;margin:8px 0}.knowledge-prose li::marker{color:var(--app-accent-strong)}.knowledge-prose a{color:var(--app-accent-strong);text-decoration:underline;text-decoration-color:#aac59a;text-underline-offset:3px}.knowledge-prose a:hover{text-decoration-color:currentColor}.knowledge-prose strong{font-weight:600}.knowledge-prose kbd,.knowledge-prose code{font-family:inherit;font-size:.88em;background:var(--app-surface-alt);border:1px solid var(--app-border);border-radius:6px;padding:2px 6px;box-decoration-break:clone;-webkit-box-decoration-break:clone}.knowledge-prose kbd{font-weight:500;border-bottom-width:2px;white-space:normal}.knowledge-prose blockquote{margin:20px 0;padding:13px 16px;border-left:3px solid var(--clinic-orange);border-radius:0 9px 9px 0;background:#fcfaf5;color:#665d45;font-size:13px;line-height:1.75}.knowledge-welcome{max-width:610px;margin:32px auto}.knowledge-welcome h2{font-size:30px;font-weight:550;letter-spacing:-.7px;line-height:1.3;margin:14px 0 19px}.knowledge-welcome>p{font-size:14px;line-height:1.75;color:var(--app-muted);margin-bottom:24px}.knowledge-shortcut-tip{display:flex;gap:14px;align-items:center;padding:16px;background:var(--app-surface-alt);border:1px solid var(--app-border);border-radius:13px;font-size:13px;line-height:1.6;margin:23px 0}.knowledge-shortcut-tip kbd{white-space:nowrap;flex:0 0 auto;background:var(--app-surface);border:1px solid var(--app-border);border-bottom-width:2px;border-radius:7px;padding:7px 9px;color:var(--app-accent-strong);font:inherit;font-size:12px;font-weight:550}.knowledge-welcome .knowledge-welcome-note{font-size:12px;margin-top:25px}.knowledge-editor{width:min(850px,calc(100vw - 32px));max-width:850px;padding:25px;max-height:91dvh;overflow:auto}.knowledge-editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:18px}.knowledge-editor-fields>.field:first-child,.knowledge-editor-fields>.field:last-child{grid-column:1/-1}.knowledge-editor .field>label{font-size:12px}.knowledge-editor .field input,.knowledge-editor .field select{font-size:13px;min-height:41px}.knowledge-editor-tools{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:14px 0 12px}.knowledge-editor-tools p{font-size:11px;color:var(--app-muted);line-height:1.7;margin:0;max-width:570px}.knowledge-editor-tools .button{flex-shrink:0;min-height:34px;font-size:11px}.knowledge-editor-body textarea{width:100%;box-sizing:border-box;min-height:280px;resize:vertical;font:inherit;font-size:14px;line-height:1.7;border:1px solid var(--app-border);padding:14px 15px;border-radius:12px;background:var(--app-surface);color:var(--app-text)}.knowledge-editor-preview{padding:20px;border:1px solid var(--app-border);border-radius:12px;min-height:280px}.knowledge-editor-errors:not(:empty){margin-top:13px}.knowledge-editor .dialog-actions{position:sticky;bottom:-25px;z-index:2;margin:16px -3px -3px;padding:13px 3px 3px;background:var(--app-surface);border-top:1px solid var(--app-border)}.knowledge-workspace [hidden],.knowledge-page-heading [hidden],.knowledge-editor [hidden]{display:none}@keyframes knowledge-spin{to{transform:rotate(360deg)}}
@media(max-width:1200px){.knowledge-layout{grid-template-columns:270px minmax(0,1fr);gap:14px}.knowledge-reader{padding:23px}.knowledge-search{padding:15px 12px 10px}.knowledge-search .field select{font-size:11px;padding-right:25px}.knowledge-article-header h2{font-size:25px}}
@media(max-width:900px){.knowledge-layout{grid-template-columns:250px minmax(0,1fr);gap:12px}.knowledge-filter-row{display:grid;grid-template-columns:minmax(0,1fr)}.knowledge-filter-row>.field:last-child:not(:first-child){max-width:none}.knowledge-reader{padding:20px}.knowledge-prose{font-size:14px}.knowledge-article-header h2{font-size:24px}}
@media(max-width:760px){.knowledge-layout{display:block}.knowledge-directory,.knowledge-reader{position:static;top:auto;max-height:none;overflow:visible;scrollbar-gutter:auto}.knowledge-directory{display:block}.knowledge-reader{scroll-margin-top:70px}.knowledge-reader{display:none}.knowledge-workspace.has-article .knowledge-directory{display:none}.knowledge-workspace.has-article .knowledge-reader{display:block;min-height:calc(100dvh - 190px)}.knowledge-mobile-back{display:inline-flex;font-size:11px;min-height:38px}.knowledge-article-toolbar{gap:8px;margin-bottom:19px;flex-wrap:wrap}.knowledge-article-toolbar>.knowledge-eyebrow{font-size:9px}.knowledge-article-toolbar>.button:last-child{font-size:11px;min-height:38px}.knowledge-reader{padding:18px}.knowledge-article-header h2{font-size:25px;line-height:1.3}.knowledge-article-summary{font-size:14px}.knowledge-prose{font-size:15px;line-height:1.75}.knowledge-prose h3{font-size:19px}.knowledge-prose blockquote{font-size:14px;padding:13px}.knowledge-prose p{margin-bottom:17px}.knowledge-results{max-height:none;overflow:visible;padding:0 10px 14px;gap:23px;scrollbar-gutter:auto}.button.knowledge-result{height:auto;min-height:0;padding:14px}.knowledge-result strong{font-size:14px}.knowledge-result-summary{font-size:12px}.knowledge-result-category{font-size:10px}.knowledge-search{padding:17px 16px 12px}.knowledge-search .field input,.knowledge-search .field select{font-size:16px;min-height:45px}.knowledge-filter-row{display:flex}.knowledge-search .knowledge-find{font-size:13px;min-height:42px}.knowledge-filter-row>.field:last-child:not(:first-child){max-width:120px}.knowledge-editor{padding:19px;max-height:92dvh;width:calc(100vw - 24px)}.knowledge-editor-fields{grid-template-columns:1fr;gap:12px}.knowledge-editor .field input,.knowledge-editor .field select,.knowledge-editor-body textarea{font-size:16px}.knowledge-editor-fields>.field{grid-column:1!important}.knowledge-editor-tools{flex-direction:column;align-items:flex-start;gap:10px}.knowledge-editor-tools p{font-size:11px}.knowledge-editor-tools .button{min-height:40px;font-size:12px}.knowledge-editor-body textarea{min-height:260px;padding:12px}.knowledge-editor .dialog-actions{bottom:-19px;padding-top:12px}.knowledge-editor .dialog-actions .button{min-height:44px}.knowledge-welcome{margin:15px auto}.knowledge-shortcut-tip{align-items:flex-start;flex-direction:column}.knowledge-page-heading .button{min-height:42px}}
@media(prefers-reduced-motion:reduce){.knowledge-list-status.is-loading::before{animation:none}.knowledge-result{transition:none}}

/* A course directory: the section explains the subject and each lesson keeps its complete purpose visible. */
.knowledge-learning-section{flex:0 0 auto;min-width:0}
.knowledge-section-heading{display:flex;align-items:flex-start;gap:10px;padding:13px 7px 10px;border-top:1px solid var(--app-border)}
.knowledge-learning-section:first-child .knowledge-section-heading{border-top:0;padding-top:3px}
.knowledge-section-heading>div{flex:1;min-width:0}
.knowledge-section-title{margin:0;font-size:13px;line-height:1.45;font-weight:650;letter-spacing:-.1px;color:var(--app-text)}
.knowledge-section-heading p{margin:4px 0 0;font-size:11px;line-height:1.55;color:var(--app-muted);overflow-wrap:anywhere}
.knowledge-section-count{flex:0 0 auto;min-width:22px;min-height:22px;display:grid;place-items:center;padding:1px 5px;border:1px solid var(--app-border);border-radius:7px;background:var(--app-surface-alt);font-size:10px;line-height:1;color:var(--app-accent-strong);font-variant-numeric:tabular-nums}
.knowledge-section-lessons{display:flex;flex-direction:column;gap:4px;min-width:0}
.button.knowledge-result{gap:7px;flex-shrink:0;overflow:visible;line-height:1.5}
.knowledge-result strong{display:block;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.knowledge-result-summary{display:block;white-space:normal;overflow:visible;text-overflow:clip;font-size:12px;line-height:1.65;color:var(--app-muted);overflow-wrap:anywhere}
@media(max-width:760px){.knowledge-section-title{font-size:14px}.knowledge-section-heading p{font-size:12px}.knowledge-section-count{min-width:25px;min-height:25px;font-size:11px}.knowledge-result-summary{font-size:13px;line-height:1.65}}

/* The directory follows the bot scenario tree while retaining the clinic's
   rounded cards, readable type and warm primary action. */
.knowledge-layout{grid-template-columns:280px minmax(0,1fr);gap:18px;min-width:0}
.knowledge-directory,.knowledge-reader{border-radius:var(--ui-card-radius,18px);min-width:0}
.knowledge-reader{padding:22px 24px 28px}
.knowledge-search{padding:16px 14px 12px;gap:10px}
.knowledge-search .field input,.knowledge-search .field select{min-height:var(--ui-field-height,42px);font-size:13px;border-radius:var(--ui-control-radius,10px)}
.knowledge-search .knowledge-find{min-height:var(--ui-control-height,40px);font-size:12px;border-radius:var(--ui-control-radius,10px)}
.knowledge-results{gap:5px;padding:0 9px 14px;scrollbar-gutter:auto}
.knowledge-learning-section{min-width:0}
.button.knowledge-section-heading,.button.knowledge-category-toggle{display:grid;grid-template-columns:9px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;min-width:0;min-height:39px;margin:0;padding:9px 10px;text-align:left;border:0;border-radius:10px;background:transparent;box-shadow:none;color:var(--app-text);font-family:inherit;white-space:normal;line-height:1.45}
.button.knowledge-section-heading{font-size:13px;font-weight:600}
.button.knowledge-section-heading:hover,.button.knowledge-category-toggle:hover{background:var(--app-surface-alt);transform:none;box-shadow:none}
.knowledge-section-title{font:inherit;letter-spacing:0;overflow-wrap:anywhere}
.knowledge-section-count{min-width:22px;min-height:22px;font-size:10px;color:var(--app-muted);border-color:var(--app-border);border-radius:7px;background:var(--app-surface-alt);padding:1px 5px}
.knowledge-section-children{margin:2px 0 6px 8px;padding-left:7px;border-left:1px solid var(--app-border);min-width:0}
.button.knowledge-category-toggle{min-height:33px;padding:6px 8px;font-size:11px;font-weight:550;color:var(--app-muted)}
.knowledge-category-toggle>small{font-size:10px;font-weight:400;white-space:nowrap}
.knowledge-tree-chevron{display:block;width:5px;height:5px;border-top:1.5px solid currentColor;border-right:1.5px solid currentColor;transform:rotate(45deg);flex-shrink:0}
[aria-expanded=true]>.knowledge-tree-chevron{transform:rotate(135deg)}
.knowledge-section-lessons{gap:2px;padding:1px 0 5px 7px;min-width:0}
.button.knowledge-result{display:flex;flex-direction:row;align-items:flex-start;gap:8px;padding:8px 9px;min-height:0;border-radius:10px;border-color:transparent;line-height:1.45;white-space:normal}
.knowledge-lesson-marker{display:block;flex:0 0 4px;width:4px;height:4px;border-radius:50%;margin-top:7px;background:#a8b99c}
.knowledge-lesson-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.knowledge-result strong{font-size:12px;line-height:1.5;font-weight:500;color:var(--app-text);overflow-wrap:anywhere}
.knowledge-result-summary{font-size:11px;line-height:1.5;color:var(--app-muted);overflow:visible;white-space:normal;overflow-wrap:anywhere}
.button.knowledge-result.is-selected{background:linear-gradient(105deg,var(--app-accent-soft),#f7faee);border-color:#d3e2c6;box-shadow:inset 3px 0 #89a76b}
.knowledge-result.is-selected strong{font-weight:600;color:var(--app-text)}
.knowledge-result.is-selected .knowledge-lesson-marker{background:var(--app-accent-strong)}
.knowledge-section-children[hidden],.knowledge-section-lessons[hidden]{display:none}
.knowledge-results [role=treeitem]:focus-visible{outline:2px solid var(--app-accent);outline-offset:-2px}
.knowledge-article-path{display:flex;align-items:center;flex-wrap:wrap;gap:3px 7px;margin-bottom:13px;min-width:0;color:var(--app-muted);font-size:11px;line-height:1.5}
.button.knowledge-path-link{min-height:27px;padding:2px 0;border:0;border-radius:4px;box-shadow:none;background:transparent;color:var(--app-muted);font-size:11px;font-weight:400;white-space:normal;text-align:left}
.button.knowledge-path-link:hover{background:transparent;color:var(--app-accent-strong);text-decoration:underline;transform:none;box-shadow:none}
.knowledge-article-toolbar{margin-bottom:16px;min-height:32px;justify-content:flex-end}
.knowledge-article-toolbar>.button:last-child{margin-left:0}
.knowledge-article-header{margin-bottom:22px;padding-bottom:18px}
.knowledge-article-header h2{font-size:26px;font-weight:550;line-height:1.3;letter-spacing:-.45px;margin-bottom:12px}
.knowledge-welcome{margin:18px auto}
.knowledge-welcome h2{font-size:26px;line-height:1.35;letter-spacing:-.4px}
.button.knowledge-create,.knowledge-editor .dialog-actions>.button.primary{background:var(--clinic-orange,#ee9b4d);color:#54371b;border-color:transparent;box-shadow:none}
.button.knowledge-create:hover,.knowledge-editor .dialog-actions>.button.primary:hover{background:#e99b44;color:#54371b;border-color:transparent;box-shadow:none}
.knowledge-editor{border-radius:var(--ui-card-radius,18px)}
.knowledge-editor .field input,.knowledge-editor .field select{min-height:var(--ui-field-height,42px);border-radius:var(--ui-control-radius,10px)}
.knowledge-editor .dialog-actions>.button{min-height:var(--ui-control-height,40px);font-size:12px;border-radius:var(--ui-control-radius,10px)}
@media(max-width:1200px){.knowledge-layout{grid-template-columns:250px minmax(0,1fr);gap:16px}.knowledge-reader{padding:20px}.knowledge-article-header h2{font-size:24px}}
@media(max-width:900px){.knowledge-layout{grid-template-columns:250px minmax(0,1fr);gap:14px}}
@media(max-width:760px){.knowledge-layout{display:block}.knowledge-results{gap:6px;padding:0 10px 14px;overflow:visible}.knowledge-reader{padding:18px}.knowledge-article-path{margin-bottom:10px}.knowledge-article-toolbar{justify-content:space-between;margin-bottom:16px}.knowledge-article-header h2{font-size:25px}.knowledge-search .field input,.knowledge-search .field select{font-size:16px;min-height:44px}.knowledge-search .knowledge-find,.knowledge-create,.knowledge-editor .dialog-actions>.button{min-height:44px}.knowledge-editor .field input,.knowledge-editor .field select{font-size:16px;min-height:44px}.button.knowledge-section-heading{min-height:44px;font-size:14px}.button.knowledge-category-toggle{min-height:38px;font-size:12px}.button.knowledge-result{padding:10px 9px}.knowledge-result strong{font-size:13px}.knowledge-result-summary{font-size:12px}.knowledge-section-count{min-width:25px;min-height:25px;font-size:11px}.knowledge-result.is-selected{box-shadow:inset 3px 0 #89a76b}}

.crm-shell .button.knowledge-create{background:var(--clinic-orange,#ee9b4d);border-color:transparent;color:#54371b;border-radius:10px}
.crm-shell .button.knowledge-create:hover{background:#e99b44;border-color:transparent;color:#54371b}

/* Start with the complete topic map, without an expanded branch pushing the
   other sections out of view. Article bodies keep their existing reader. */
.knowledge-welcome{max-width:780px;margin:0 auto}
.knowledge-welcome h2{margin:10px 0 9px;font-size:24px}
.knowledge-welcome>p{font-size:13px;line-height:1.6;margin-bottom:16px}
.knowledge-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}
.button.knowledge-overview-section{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:7px;min-width:0;min-height:107px;padding:13px 14px;text-align:left;white-space:normal;border:1px solid var(--app-border);border-radius:12px;background:var(--app-surface);box-shadow:none;color:var(--app-text);font-family:inherit}
.button.knowledge-overview-section:hover{background:var(--app-surface-alt);border-color:#cbdcbc;transform:none;box-shadow:none}
.knowledge-overview-heading{display:flex;align-items:flex-start;gap:9px;justify-content:space-between;min-width:0}
.knowledge-overview-heading>strong{font-size:13px;line-height:1.45;font-weight:600;overflow-wrap:anywhere}
.knowledge-overview-description{font-size:11px;line-height:1.5;color:var(--app-muted);overflow-wrap:anywhere}
.knowledge-overview-start{display:block;font-size:10px;line-height:1.45;color:var(--app-accent-strong);margin-top:auto;overflow-wrap:anywhere}
.knowledge-welcome .knowledge-shortcut-tip{margin:16px 0;padding:12px;font-size:12px}
.knowledge-welcome .knowledge-welcome-note{margin-top:16px}
@media(max-width:760px){.knowledge-overview{grid-template-columns:minmax(0,1fr)}.button.knowledge-overview-section{min-height:0;padding:13px}.knowledge-overview-description{font-size:12px}.knowledge-overview-start{font-size:11px}}

.knowledge-reader-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;min-width:0}.knowledge-reader-heading>.knowledge-article-path{flex:1;margin-bottom:0}.knowledge-reader-heading>.crm-close-button{flex-shrink:0;margin-left:auto}
