.kdb-page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 14px;padding:2px 2px 0}
.kdb-page-heading .eyebrow{margin-bottom:4px;font-size:9px;letter-spacing:.16em}
.kdb-page-heading h1{margin:0;color:#123938;font-size:24px;line-height:1.1;letter-spacing:-.02em}
.kdb-page-heading p{margin:6px 0 0;color:#637b76;font-size:12px;line-height:1.5}
.kdb-page-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.kdb-page-actions button{min-height:34px;padding:7px 11px;border-radius:7px;font-size:11px}

.kdb-browse{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,46%);align-items:start;margin:0 0 12px;border:1px solid #d8e4df;border-radius:10px;background:#fff;overflow:visible}
.kdb-scope-tabs{display:flex;align-self:stretch;gap:2px;overflow-x:auto;padding:4px 5px;scrollbar-width:thin}
.kdb-scope-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;min-height:38px;padding:7px 10px;border:0;border-radius:7px;background:transparent;color:#536c68;font-size:11px;white-space:nowrap}
.kdb-scope-tabs button:hover:not(:disabled){background:#f2f8f5}
.kdb-scope-tabs button.active{background:#e6f5ef;color:#143d39;font-weight:700}
.kdb-scope-tabs button span{display:grid;place-items:center;min-width:21px;height:21px;padding:0 5px;border-radius:12px;background:#e9f2ee;color:#315d56;font-size:10px;font-variant-numeric:tabular-nums}
.kdb-scope-tabs button.active span{background:#d0eddf;color:#17624f}
.kdb-browse-filter{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px;padding:5px;border-left:1px solid #e0e9e5}
.kdb-search-row{display:flex;gap:6px;min-width:0}
.kdb-search-row label{flex:1;min-width:0;margin:0}
.kdb-search-row input{height:38px;min-height:38px;padding:7px 10px;font-size:12px}
.kdb-search-row button{min-width:64px;min-height:38px;padding:7px 10px;font-size:11px}
.kdb-browse-filter details{position:relative;margin:0}
.kdb-browse-filter summary{display:inline-flex;align-items:center;min-height:38px;padding:7px 9px;border-radius:7px;color:#286d60;font-size:11px;font-weight:700;cursor:pointer;list-style:none;white-space:nowrap}
.kdb-browse-filter summary:hover{background:#f2f8f5}
.kdb-browse-filter summary::-webkit-details-marker{display:none}
.kdb-browse-filter summary:after{content:'';width:6px;height:6px;margin:-3px 1px 0 8px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .18s ease}
.kdb-browse-filter details[open] summary:after{transform:rotate(225deg)}
.kdb-advanced-fields{position:absolute;z-index:12;right:0;top:45px;display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:12px;width:min(720px,calc(100vw - 48px));padding:15px;border:1px solid #d7e4de;border-radius:10px;background:#fff;box-shadow:0 18px 44px #183b3024}
.kdb-advanced-fields label{min-width:0;margin:0;color:#193d3b;font-size:11px}
.kdb-advanced-fields label span{display:block;margin-bottom:5px}
.kdb-advanced-fields input,.kdb-advanced-fields select{min-height:38px;font-size:12px}
.kdb-advanced-actions{display:flex;align-items:flex-end;gap:7px;flex-wrap:wrap}
.kdb-advanced-actions button{min-height:38px;font-size:11px}
.kdb-browse .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.kdb-library{overflow:hidden;border:1px solid #d8e4df;border-radius:12px;background:#fff;box-shadow:0 10px 28px #132e240d}
.kdb-library-shell{display:grid;grid-template-columns:300px minmax(0,1fr);min-height:620px}
.kdb-catalog{min-width:0;border-right:1px solid #dce6e1;background:#f8faf8}
.kdb-catalog-head{height:43px;padding:0 13px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dce6e1;color:#68807a;font-size:10px}
.kdb-catalog-head strong{color:#183c39;font-size:11px}
.kdb-document-list{max-height:720px;overflow:auto;padding:5px;scrollbar-width:thin}
.kdb-library-row{display:block;width:100%;min-height:0;padding:11px 10px;text-align:left;border:1px solid transparent;border-radius:8px;background:transparent;font-weight:400}
.kdb-library-row:hover:not(:disabled){background:#fff;border-color:#d2dfda}
.kdb-library-row.active{background:#fff;border-color:#8ec5b6;box-shadow:0 3px 12px #17382e0d}
.kdb-library-row .kdb-article-number{display:block;margin-bottom:4px;color:#67817a;font-size:9px;letter-spacing:.08em}
.kdb-row-top,.kdb-row-meta,.kdb-row-foot{display:flex;justify-content:space-between;gap:7px;align-items:flex-start}
.kdb-row-top strong{font-size:12.5px;line-height:1.35;color:#173a38;overflow-wrap:anywhere}
.kdb-row-state{flex:0 0 auto;border-radius:10px;padding:2px 6px;font-size:9px;font-weight:700}
.kdb-row-state.confirmed{background:#e1f4ea;color:#287460}
.kdb-row-state.review{background:#edf1ff;color:#4b5594}
.kdb-row-state.draft{background:#fff0d7;color:#8d5c21}
.kdb-row-meta{justify-content:flex-start;margin-top:7px;color:#68807a;font-size:10px}
.kdb-row-meta b{font-family:ui-monospace,Consolas,monospace;color:#2c7466}
.kdb-row-meta .kdb-type-tag{margin-left:auto;padding:2px 5px;font-size:9px}
.kdb-row-summary{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:7px 0 8px;color:#5d736d;font-size:10.5px;line-height:1.5}
.kdb-row-foot{color:#6a7e79;font-size:9.5px}

.kdb-reading{min-width:0;padding:0;background:#fff}
.kdb-reading-layout{display:grid;grid-template-columns:minmax(0,1fr) 176px;min-height:620px}
.kdb-reading-main{min-width:0;padding:26px 32px 38px}
.kdb-reading-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 11px;padding:0;border:0}
.kdb-reading-head .eyebrow{margin-bottom:5px;font-size:9px;letter-spacing:.12em}
.kdb-reading-head h2{max-width:760px;margin:0;color:#153b39;font-size:18px;line-height:1.3;letter-spacing:-.01em;overflow-wrap:anywhere}
.kdb-reading-head>.badge{flex:none;margin-top:2px;font-size:10px}
.kdb-reading-facts{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:0 0 14px;padding-bottom:13px;border-bottom:1px solid #e1e9e5}
.kdb-reading-facts span{padding:3px 6px;border-radius:5px;background:#eff6f2;color:#416861;font-size:10px;line-height:1.35}
.kdb-reading-main>.tag-row{margin:0 0 15px}
.kdb-reading-main>.tag-row span{font-size:10px}
.kdb-reading-section{margin:0;padding:18px 0 20px;border-top:0;border-bottom:1px solid #e3ebe7}
.kdb-reading-section h3{margin:0 0 8px;color:#173d3a;font-size:13px;line-height:1.4}
.kdb-reading-section p,.kdb-reading-section .markdown-body{margin:0;color:#294c48;font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.kdb-reading-section .markdown-body h1{font-size:18px}
.kdb-reading-section .markdown-body h2{font-size:15px}
.kdb-reading-section .markdown-body h3{font-size:13px}
.kdb-reading-section .markdown-body h4{font-size:12px}
.kdb-reading-section .markdown-body p,.kdb-reading-section .markdown-body li{font-size:12px;line-height:1.65}
.kdb-reading-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:20px}
.kdb-reading-actions button{min-height:36px;font-size:11px}
.kdb-reading-toc{align-self:start;position:sticky;top:18px;display:grid;gap:3px;margin:24px 18px 24px 0;padding:12px;border-left:1px solid #dce7e2;color:#58736d;font-size:10.5px}
.kdb-reading-toc>strong{margin-bottom:5px;color:#173d3a;font-size:11px}
.kdb-reading-toc>a{padding:6px 7px;border-radius:5px;color:#41635d;text-decoration:none}
.kdb-reading-toc>a:hover{background:#eff7f3;color:#155e50}
.kdb-reading-toc>div{display:grid;gap:3px;margin-top:7px;padding:9px 7px 0;border-top:1px solid #e1e9e5}
.kdb-reading-toc>div>span{color:#7a8e89;font-size:9px}
.kdb-reading-toc .badge{justify-self:start;font-size:9px}
.kdb-reading-toc small{color:#405f59;font-size:10px}
.kdb-review-feedback{margin:0 32px 2px;padding:11px 13px;border:1px solid #ead9bd;border-radius:7px;background:#fff9ec;color:#5f4b2c}
.kdb-review-feedback strong{font-size:11px}
.kdb-review-feedback p{margin:4px 0 0;font-size:11px;line-height:1.5;white-space:pre-wrap}
.kdb-reading-empty{display:grid;place-items:center;align-content:center;min-height:620px;padding:30px;text-align:center}
.kdb-reading-empty h2{font-size:17px}
.kdb-reading-empty p{font-size:12px}

.kdb-sheet-header h2{font-size:22px}
.kdb-sheet-header p{font-size:12px}
.kdb-editor-title h2,.kdb-workbench h2{font-size:17px}
.kdb-editor-title span,.kdb-workbench p{font-size:11px}
.kdb-rich-editor .rich-prose{padding:20px 22px;font-size:14px;line-height:1.65}
.kdb-rich-editor .rich-prose h1{font-size:22px}
.kdb-rich-editor .rich-prose h2{font-size:17px}
.kdb-rich-editor .rich-prose h3{font-size:15px}
.kdb-readonly-body{font-size:14px;line-height:1.65}

.related-kdb-sheet{width:min(620px,100vw);padding:0;background:#f6f8f5;overflow-x:hidden}
.related-kdb-header{position:sticky;z-index:3;top:0;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px 26px 18px;border-bottom:1px solid #dce6e1;background:#fff}
.related-kdb-header h2{margin:0;color:#123938;font-size:22px;line-height:1.25;letter-spacing:-.02em}
.related-kdb-header p{max-width:440px;margin:6px 0 0;color:#5b746e;font-size:12px;line-height:1.55}
.related-kdb-header-actions{display:flex;align-items:center;gap:8px;flex:none}
.related-kdb-header-actions>span{padding:4px 8px;border-radius:5px;background:#e7f4ee;color:#28695c;font-size:10px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.related-kdb-header-actions button{width:36px;height:36px;min-height:36px;padding:0;border-radius:7px;font-size:18px}
.related-kdb-body{display:grid;gap:20px;padding:20px 26px 28px}
.related-kdb-context{display:flex;gap:0;margin:0;padding:11px 14px;border:1px solid #d8e4df;border-radius:8px;background:#fff;overflow-x:auto}
.related-kdb-context>div{display:flex;align-items:baseline;gap:6px;min-width:0;padding:0 14px;border-right:1px solid #e2eae6}
.related-kdb-context>div:first-child{padding-left:0}.related-kdb-context>div:last-child{padding-right:0;border-right:0}
.related-kdb-context dt{color:#78908a;font-size:9.5px;white-space:nowrap}
.related-kdb-context dd{max-width:155px;margin:0;color:#193f3b;font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.related-kdb-results{display:grid;gap:9px}
.related-kdb-results-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.related-kdb-results-head h3{margin:0;color:#173d3a;font-size:13px;line-height:1.4}
.related-kdb-results-head span{color:#768b86;font-size:10px}
.related-kdb-list{display:grid;gap:8px}
.related-kdb-card{display:grid;gap:11px;padding:15px 16px;border:1px solid #d6e2dd;border-radius:9px;background:#fff;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.related-kdb-card:hover{border-color:#96c6b9;box-shadow:0 8px 22px #173c3112;transform:translateY(-1px)}
.related-kdb-card header{display:flex;align-items:flex-start;gap:11px}
.related-kdb-mark{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:7px;background:#e3f3ed;color:#247262}
.related-kdb-mark svg,.related-kdb-empty svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.related-kdb-title{min-width:0;flex:1}
.related-kdb-title h3{margin:5px 0 2px;color:#123937;font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.related-kdb-title small{display:block;color:#78908a;font-family:ui-monospace,Consolas,monospace;font-size:9px;letter-spacing:.04em;overflow-wrap:anywhere}
.related-kdb-status{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.related-kdb-status span{padding:2px 6px;border-radius:4px;background:#edf6f2;color:#396b61;font-size:9px;font-weight:700;line-height:1.4}
.related-kdb-status span:last-child{background:#e1f4ea;color:#226d59}
.related-kdb-facts{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 0 45px;color:#496b64;font-size:10px}
.related-kdb-facts span+span:before{content:'·';margin-right:6px;color:#9bada8}
.related-kdb-summary{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin:0 0 0 45px;color:#405e59;font-size:11.5px;line-height:1.62;overflow-wrap:anywhere}
.related-kdb-card footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-left:45px;padding-top:10px;border-top:1px solid #e7eeeb}
.related-kdb-tags{display:flex;align-items:center;gap:5px;min-width:0;overflow:hidden}
.related-kdb-tags span{flex:none;padding:2px 6px;border-radius:4px;background:#f0f5f2;color:#5b766f;font-size:9px;white-space:nowrap}
.related-kdb-card footer button{flex:none;min-height:31px;padding:5px 10px;border-color:#aacbc2;background:#fff;color:#175f52;font-size:10px}
.related-kdb-card footer button:hover{background:#edf7f3}
.related-kdb-footnote{margin:0;padding-top:2px;color:#6f837e;font-size:10px;line-height:1.55}
.related-kdb-empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;border:1px dashed #cbdad4;border-radius:9px;background:#fff;text-align:center;color:#568076}
.related-kdb-empty svg{width:25px;height:25px}
.related-kdb-empty h3{margin:2px 0 0;color:#244943;font-size:14px}.related-kdb-empty p{margin:0;color:#708680;font-size:11px;line-height:1.55}

@media(min-width:721px){
 .modal-backdrop.has-draggable-sheet{align-items:center;justify-content:center;padding:24px}
  .sheet.kdb-sheet.kdb-draggable{position:relative;width:min(1180px,calc(100vw - 48px));height:min(760px,calc(100dvh - 120px));min-width:min(560px,calc(100vw - 48px));min-height:min(360px,calc(100dvh - 48px));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);border:1px solid #c8d9d3;border-radius:14px;box-shadow:0 28px 90px rgba(6,44,50,.28);will-change:transform}
 .kdb-draggable .kdb-sheet-header{position:sticky;z-index:12;top:-28px;margin:-28px -32px 23px;padding:24px 32px 18px;border-bottom:1px solid #d5e1dc;background:rgba(243,241,233,.98);box-shadow:0 8px 20px rgba(17,56,50,.05);cursor:move;touch-action:none;user-select:none}
 .kdb-draggable .kdb-sheet-header:before{content:'';position:absolute;top:9px;left:50%;width:44px;height:4px;border-radius:999px;background:#aac0b9;transform:translateX(-50%)}
 .kdb-draggable .kdb-sheet-header.is-dragging{cursor:grabbing;box-shadow:0 10px 24px rgba(17,56,50,.09)}
 .kdb-draggable .kdb-sheet-header button,.kdb-draggable .kdb-sheet-header a{cursor:pointer}
  .kdb-window-tip{display:block;margin-top:7px;color:#617d75;font-size:11px;font-weight:500;letter-spacing:.01em}
  .kdb-window-reset{flex:none;min-height:32px;margin-left:auto;padding:5px 9px;border-color:#c5d8d0;background:#f7fbf8;color:#336c5d;font-size:11px;font-weight:600}
  .kdb-window-reset:hover{background:#e9f5ee}
  .kdb-resize-grip{position:absolute;z-index:20;right:7px;top:0;display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:1px solid #b8d6ca;border-radius:8px;background:#eaf6ef;color:#1a6453;cursor:nwse-resize;touch-action:none;user-select:none;box-shadow:0 2px 9px rgba(15,60,49,.13)}
  .kdb-resize-grip:hover,.kdb-resize-grip.is-resizing{border-color:#66ae91;background:#d6efe2;color:#0e4b3d}
  .kdb-resize-grip:focus-visible{outline:3px solid #58bd9b;outline-offset:2px}
  .kdb-resize-grip svg{width:20px;height:20px;pointer-events:none}
}

@media(max-width:1100px){
 .kdb-browse{grid-template-columns:1fr}.kdb-browse-filter{border-top:1px solid #e0e9e5;border-left:0}
 .kdb-reading-layout{grid-template-columns:minmax(0,1fr)}.kdb-reading-toc{display:none}.kdb-reading-main{padding:25px 28px 36px}
}
@media(max-width:720px){
  .sheet.kdb-sheet.kdb-draggable{width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;transform:none!important}
  .kdb-resize-grip,.kdb-window-tip,.kdb-window-reset{display:none!important}
 .kdb-page-heading{align-items:flex-start;flex-direction:column;gap:10px}.kdb-page-actions{justify-content:flex-start}
 .kdb-browse{display:block}.kdb-scope-tabs{padding:5px}.kdb-scope-tabs button{min-height:36px;padding:6px 8px}
 .kdb-browse-filter{display:grid;grid-template-columns:minmax(0,1fr) auto;padding:6px}.kdb-advanced-fields{position:fixed;z-index:30;left:12px;right:12px;top:112px;width:auto;max-height:calc(100vh - 136px);overflow:auto;grid-template-columns:1fr 1fr}
 .kdb-library-shell{display:block;min-height:480px}.kdb-library-shell:not(.has-selection) .kdb-reading{display:none}.kdb-library-shell.has-selection .kdb-catalog{display:none}
 .kdb-document-list{max-height:none}.kdb-reading-main{padding:17px 18px 28px}.kdb-reading-layout{min-height:480px}.kdb-reading-head{margin-top:8px}.kdb-reading-head h2{font-size:17px}.kdb-reading-section p,.kdb-reading-section .markdown-body,.kdb-reading-section .markdown-body p,.kdb-reading-section .markdown-body li{font-size:12px}
 .kdb-review-feedback{margin:0 18px}.kdb-reading-actions{display:grid;grid-template-columns:1fr}.kdb-reading-actions button{width:100%}
 .kdb-rich-editor .rich-prose{padding:16px;font-size:13px}
 .related-kdb-sheet{width:100vw}.related-kdb-header{padding:19px 16px 15px}.related-kdb-header h2{font-size:19px}.related-kdb-header p{font-size:11px}.related-kdb-header-actions>span{display:none}.related-kdb-body{gap:17px;padding:16px}.related-kdb-context{padding:10px 12px}.related-kdb-context>div{padding:0 10px}.related-kdb-card{padding:14px 13px}.related-kdb-card footer{align-items:flex-end}.related-kdb-summary{-webkit-line-clamp:4}
}
@media(max-width:520px){
 .kdb-page-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.kdb-page-actions button:last-child:nth-child(3){grid-column:1/-1}
 .kdb-scope-tabs{display:flex;overflow-x:auto}.kdb-scope-tabs button{width:auto}
 .kdb-browse-filter{grid-template-columns:1fr}.kdb-search-row button{min-width:58px}.kdb-browse-filter summary{justify-content:center;width:100%}.kdb-advanced-fields{grid-template-columns:1fr}
 .kdb-reading-head{display:grid}.kdb-reading-head>.badge{justify-self:start}.kdb-reading-facts{align-items:flex-start}
}
@media(prefers-reduced-motion:reduce){.kdb-browse-filter summary:after{transition:none}}
