/* Knowledge progress only. Existing routes, role visibility and form handlers stay authoritative. */
html[data-kb-surface=true] main>.workspace-notice{display:none}
html[data-kb-surface=true] #general-knowledge.card{background:none;border:0;box-shadow:none;padding:0;margin:0}
html[data-kb-surface=true] #kb-summary{font-size:11px;color:#8d9d7d}
html[data-kb-surface=true][data-kb-access=manager] #kb-summary{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.kp-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}
.kp-heading h2{margin:0;font-size:26px;letter-spacing:-.5px;font-weight:600}
.kp-heading .section-intro{margin:9px 0 0;font-size:12px;color:#88967c}
.kp-heading-actions{display:flex;align-items:center;gap:8px}
.kp-heading-actions button{margin:0;min-height:34px;border-radius:9px;font-size:11px;padding:7px 12px;font-weight:500;white-space:nowrap}
html[data-kb-surface=true] #kb-refresh{color:#fff;background:#236de9;border-color:#236de9;box-shadow:0 4px 9px #236de91b}
.kp-heading-actions .ui-icon{width:13px;height:13px;flex-basis:13px}
.kp-heading-actions #kp-theme{padding:4px 10px;color:#8a9d76;background:transparent;border-color:var(--line);font-size:20px;font-weight:400}
.kp-surface{background:linear-gradient(135deg,var(--kp-surface,#fff),var(--paper));border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow)}
.kp-overview{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(240px,1fr);gap:18px}
.kp-hero{padding:22px 25px 0;background:radial-gradient(ellipse at 5% 10%,#e7f4caad,transparent 75%),linear-gradient(125deg,#f4f9eb,#fbfdfa 78%);overflow:hidden}
.kp-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px}
.kp-card-top strong{font-weight:550}.kp-card-top>span{font-size:10px;color:#99a68c}
.kp-reading{display:flex;align-items:baseline;gap:5px;margin:24px 0 20px}
#kp-percent{font:56px/1 var(--kp-mono);letter-spacing:-3px;color:#354a28}
.kp-percent-unit{font:21px var(--kp-mono);color:#7c9268}
.kp-reading-note{margin-left:auto;text-align:right;display:flex;flex-direction:column;gap:5px;align-self:center}
.kp-reading-note strong{font:12px var(--kp-mono);color:#6e845a}.kp-reading-note>span{font-size:10px;color:#96a287}
.kp-progress{position:relative;height:12px;overflow:hidden;background:#e0e8d7;border-radius:3px}
.kp-progress>span{position:absolute;inset:0 auto 0 0;width:0;background:linear-gradient(90deg,#a4c66f,#88b647);border-right:2px solid #668d3d;transition:width .6s}
.kp-progress>i{position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(10% - 1px),#ffffffb0 calc(10% - 1px),#ffffffb0 10%)}
.kp-legend{display:flex;gap:18px;flex-wrap:wrap;color:#8c9c7a;font-size:10px;margin-top:12px}.kp-legend>span{display:inline-flex;align-items:center;gap:6px}.kp-legend i{width:5px;height:5px;border-radius:2px;background:#9bbb6a}.kp-legend i.kp-blue{background:#79a0d5}.kp-legend i.kp-neutral{background:#bac8ae}.kp-legend i.kp-amber{background:#c1a779}
.kp-hero-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:9px;color:#99a68c;border-top:1px solid #dee9d2;margin-top:20px;padding:12px 0}
.kp-hero-footer>span:last-child{white-space:nowrap}
.kp-worker{border-radius:15px;color:#e1ecd4;background:radial-gradient(ellipse at top right,#52634545,transparent 80%),linear-gradient(125deg,#2c392d,#243027);padding:22px 23px;box-shadow:inset 0 1px #ffffff20}
.kp-worker .kp-card-top strong{color:#c8d7b8}.kp-worker .kp-worker-symbol{font-size:20px;color:#a9bf90}
.kp-worker-state{font-size:23px;line-height:1.6;font-weight:550;letter-spacing:-.5px;margin-top:15px;color:#d4e7b8}
.kp-worker p{font-size:11px;color:#a1b18f;line-height:1.8;min-height:37px;max-height:60px;overflow:auto;margin:5px 0 16px;overflow-wrap:anywhere}
.kp-worker-footer{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#a4b793;border-top:1px solid #ffffff15;padding-top:12px}
.kp-worker-footer strong{font:10px var(--kp-mono);font-weight:400;color:#c5d7b2}
.kp-worker>small{display:block;font-size:9px;color:#849a74;margin-top:8px}
.kp-worker.kp-worker-warning .kp-worker-state{color:#e8cd9e}.kp-worker.kp-worker-warning>small{color:#b9a17a}
.kp-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:18px 0 0}
html[data-kb-surface=true] .kp-metric{margin:0;padding:18px 15px;min-width:0;display:flex;gap:12px;text-align:left;align-items:flex-start;position:relative;color:#748666;font-weight:400;transition:transform .18s,border-color .18s}
html[data-kb-surface=true] .kp-metric:hover{background:var(--paper);border-color:#bccfa9;transform:translateY(-2px)}
.kp-metric-icon{margin-top:3px;background:#f0f3eb;border:1px solid #edf0e5;border-radius:9px;width:29px;height:31px;flex-shrink:0;display:grid;place-items:center;font-size:20px;font-weight:400;color:#a0ae92}
.kp-metric-icon.kp-blue{background:#edf3fb;color:#87a6cf;border-color:#e8eff7}.kp-metric-icon.kp-red{background:#fcf0ec;color:#c59b86;border-color:#f5e7df}.kp-metric-icon.kp-amber{background:#faf3e7;color:#c5aa7c;border-color:#f2e9d7}
.kp-metric>span:not(.kp-metric-icon){display:flex;flex-direction:column;gap:7px;min-width:0}.kp-metric>span>span{font-size:11px;color:#87987a}
.kp-metric strong{font:28px/1 var(--kp-mono);color:#536a3f;letter-spacing:-1px}.kp-metric small{font-size:9px;color:#a0ad93;white-space:nowrap}
.kp-metric>b{position:absolute;right:11px;top:12px;font-size:11px;color:#b7c4aa;font-weight:400}
html[data-kb-surface=true] #kb-live-status{font-size:10px;color:#93a082;margin:12px 1px 20px;min-height:15px}
.kp-content-grid{gap:18px;align-items:start}
html[data-kb-surface=true] .kp-content-grid{grid-template-columns:minmax(0,1fr) 245px}
html[data-kb-surface=true]:not([data-kb-access=manager]) .kp-content-grid{grid-template-columns:minmax(0,1fr)}
.kp-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:19px 19px 15px}
.kp-panel-title h3{font-size:13px;font-weight:550;margin:0}.kp-panel-title>span{font-size:10px;color:#9eac90}
.kp-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:0 16px 12px}
.kp-tabs{display:flex;align-items:center;gap:2px;background:#f2f5ed;padding:3px;border-radius:8px}
#general-knowledge .kp-tabs button{background:transparent;border:0;color:#8a9a79;padding:7px 9px;font-size:10px;font-weight:400;margin:0;white-space:nowrap}
#general-knowledge .kp-tabs button[aria-pressed=true]{background:var(--kp-surface,#fff);color:#657f4d;box-shadow:0 1px 4px #2e441b0c;border-radius:6px}
.kp-state{margin:0;font-weight:400;width:119px;flex-shrink:0}.kp-state select{font-size:10px;padding:6px 7px;border-color:var(--line);min-height:30px}
#general-knowledge .kp-file-search{display:flex;align-items:center;gap:8px;margin:0 16px 13px;background:#fafcf7;border:1px solid var(--line);border-radius:8px;padding:0 9px;font-size:11px;font-weight:400;color:#9daf88}
.kp-file-search input{border:0;background:none;padding:7px 0;box-shadow:none;font-size:11px;min-width:0}.kp-file-search>span:last-child{font-size:9px;white-space:nowrap}
.kp-table-wrap{overflow:auto;position:relative}#general-knowledge table{border-collapse:collapse;width:100%;white-space:nowrap;text-align:left;font-size:11px}
#general-knowledge th{font-size:10px;font-weight:400;background:#f9fbf5;color:#98a68a;border-top:1px solid #edf0e7;border-bottom:1px solid #edf0e7;padding:11px 9px}
#general-knowledge td{padding:14px 9px;border-bottom:1px solid #eff2e9;color:#8b9b7a;vertical-align:middle}
#general-knowledge th:first-child,#general-knowledge td:first-child{padding-left:19px}#general-knowledge th:last-child,#general-knowledge td:last-child{padding-right:14px}
#general-knowledge tbody tr:hover{background:#fafcf6}
.kp-file{display:flex;gap:9px;align-items:center;min-width:0}.kp-file-mark{width:28px;height:32px;display:grid;place-items:center;flex-shrink:0;background:#f6f8f1;border:1px solid #e5eadd;border-radius:5px;font:8px var(--kp-mono);color:#a3b18f}
.kp-file-mark.kp-pdf{color:#c29c84;background:#fcf8f1}.kp-file-mark.kp-word{color:#8aa8cc;background:#f4f8fc}.kp-file>span:last-child{min-width:0;display:block}
.kp-file-name{display:block;max-width:270px;overflow:hidden;text-overflow:ellipsis;color:#5b6e4c;font-size:12px}.kp-file-folder{display:block;max-width:270px;overflow:hidden;text-overflow:ellipsis;color:#9ba98c;font-size:10px;margin-top:4px}
.kp-tag{display:inline-flex;align-items:center;gap:5px;background:#f1f4eb;color:#9baa85;border-radius:5px;padding:4px 6px;font-size:10px}.kp-tag:before{content:"";width:4px;height:4px;border-radius:50%;background:currentColor}
.kp-tag.kp-running{background:#eef4fc;color:#7a9fce}.kp-tag.kp-finished{background:#f0f6e7;color:#8ca76e}.kp-tag.kp-failed{background:#fcf0e9;color:#c79476}.kp-tag.kp-unsupported{background:#faf3e6;color:#c3a674}
.kp-review{font-size:10px;color:#9aa98a}.kp-review.kp-published{color:#82a066}.kp-table-time{font:10px var(--kp-mono);color:#9eac91}
#general-knowledge .kp-row-open{font-size:11px;font-weight:400;margin:0;padding:3px 0;background:transparent;border:0;color:#8aa171}
.kp-pagination{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:13px 18px;font-size:10px;color:#a1af94}
.kp-pagination>div{display:flex;align-items:center;gap:7px}.kp-pagination #kb-prev,.kp-pagination #kb-next{padding:1px 8px;min-height:25px;margin:0;background:transparent;border:1px solid var(--line);font-size:17px;font-weight:400;color:#8c9c7c}
.kp-pagination #kp-page-number{font:10px var(--kp-mono)}.kp-pagination #kp-page-description{line-height:1.6}
#general-knowledge .kp-list-panel{overflow:hidden}html[data-kb-surface=true][data-kb-access=manager] #kb-files{display:none}
html[data-kb-surface=true]:not([data-kb-access=manager]) .kp-tabs,html[data-kb-surface=true]:not([data-kb-access=manager]) .kp-file-search{display:none}
#general-knowledge .kp-lookup{margin-top:17px;padding:15px 18px}#general-knowledge .kp-lookup>summary{font-size:12px;color:#7e926c;cursor:pointer;display:flex;justify-content:space-between;gap:8px}
.kp-lookup>summary>span{font-size:9px;color:#a6b396}.kp-lookup>div{margin-top:15px}.kp-lookup label{font-size:11px}.kp-lookup button{font-size:11px}
.kp-side{min-width:0}.kp-side .kp-current{overflow:hidden}.kp-current>p{font-size:10px;color:#a0af91;margin:0 19px 9px}
.kp-current-row{width:100%;min-width:0;display:flex;gap:8px;align-items:flex-start;text-align:left}
#general-knowledge .kp-current-row{padding:13px 18px;margin:0;border:0;border-bottom:1px solid #eff2e8;background:none;border-radius:0;color:#91a47e;font-size:11px;font-weight:400;justify-content:start}
.kp-current-row>span:first-child{font:9px var(--kp-mono);color:#b0bda3;margin-top:3px}.kp-current-row>span:last-child{min-width:0}.kp-current-row strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:#80966a;font-weight:400}.kp-current-row small{font-size:9px;color:#a2b193}
#general-knowledge .kp-link{font-size:10px;font-weight:400;color:#91a77a;background:transparent;border:0;margin:0;padding:13px 17px;justify-content:start}
.kp-empty-current{font-size:11px;color:#a3b295;padding:12px 18px;line-height:1.9}.kp-side-note{padding:22px 7px;font-size:10px;color:#a8a082}.kp-side-note strong{font-size:11px;font-weight:500;color:#a49b7c}.kp-side-note p{font-size:10px;color:#aaa38c;line-height:1.9}.kp-side-note .kp-link{padding-left:0!important}
#kp-detail-dialog{position:fixed;inset:0 0 0 auto;margin:0;width:min(620px,100%);max-width:none;height:100dvh;max-height:100dvh;background:var(--paper);color:var(--ink);border:0;border-left:1px solid var(--line);padding:0;box-shadow:-12px 0 60px #27352115}
#kp-detail-dialog::backdrop{background:#2633262b;backdrop-filter:blur(3px)}
.kp-drawer-header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:16px 22px;border-bottom:1px solid var(--line);background:var(--paper)}
.kp-drawer-header strong{font-size:13px;font-weight:550}#general-knowledge #kp-detail-close{margin:0;padding:2px 10px;background:transparent;border:0;color:#99aa87;font-size:22px;font-weight:400}
#kp-detail-mount{padding:0 22px 25px}html[data-kb-surface=true] #kb-detail{background:none;border:0;border-bottom:1px solid var(--line);padding:15px 0;color:#7c8e6a;font-size:12px}
html[data-kb-surface=true] #kb-detail .item{margin:0 0 10px;border:0;background:none;padding:0;color:#819470;white-space:pre-wrap}
html[data-kb-surface=true] #kb-review-tools label,html[data-kb-surface=true] #kb-review-tools p{font-size:12px}html[data-kb-surface=true] #kb-review-tools input,html[data-kb-surface=true] #kb-review-tools select,html[data-kb-surface=true] #kb-review-tools textarea{font-size:12px;background:var(--paper);border-color:var(--line)}
html[data-kb-surface=true] #kb-review-tools button{font-size:11px;padding:7px 11px}
.kp-local-readonly{font-size:11px;background:#f6f3e9;border:1px solid #ece1c9;color:#a18c5c;padding:10px 12px;border-radius:8px;line-height:1.8;margin:15px 0}
.kp-preview-notice{font-size:11px;background:#f5f7ed;border:1px solid #e4ebd6;color:#8a9a76;padding:9px 13px;border-radius:8px;margin-bottom:18px}
.local-preview-banner{height:29px;display:flex;align-items:center;justify-content:center;background:#edf3e3;border-bottom:1px solid #dce5ce;color:#7a8f62;font-size:10px;position:sticky;top:0;z-index:40}
html[data-local-preview=read-only] .app-header{top:29px}
html[data-kb-surface=true][data-local-preview=read-only] .layout>aside{top:97px;height:calc(100vh - 97px)}
html[data-kb-surface=true][data-kb-theme=dark] .kp-hero{background:radial-gradient(ellipse at top left,#526f3466,transparent 80%),#2b3824}
html[data-kb-surface=true][data-kb-theme=dark] #kp-percent,html[data-kb-surface=true][data-kb-theme=dark] .kp-metric strong,html[data-kb-surface=true][data-kb-theme=dark] .kp-file-name{color:#c7dcae}
html[data-kb-surface=true][data-kb-theme=dark] .kp-tabs,html[data-kb-surface=true][data-kb-theme=dark] .kp-file-search,html[data-kb-surface=true][data-kb-theme=dark] #general-knowledge th{background:#303d28}
html[data-kb-surface=true][data-kb-theme=dark] .kp-progress{background:#415333}
html[data-kb-surface=true][data-kb-theme=dark] #general-knowledge tr:hover{background:#303e28}
html[data-kb-surface=true][data-kb-theme=dark] #general-knowledge select{background:var(--paper);color:var(--ink)}
@media(min-width:1500px){.kp-overview{grid-template-columns:minmax(0,2.2fr) minmax(270px,1fr)}.kp-hero{padding:25px 28px 0}.kp-reading{margin:30px 0 25px}#kp-percent{font-size:64px}.kp-file-name,.kp-file-folder{max-width:360px}}
@media(max-width:1250px){html[data-kb-surface=true] .layout{grid-template-columns:190px minmax(0,1fr)}html[data-kb-surface=true] main{padding:22px}.kp-overview{gap:13px}.kp-hero{padding-left:20px;padding-right:20px}.kp-metric-icon{display:none}.kp-metric strong{font-size:26px}.kp-metric small{font-size:9px}html[data-kb-surface=true] .kp-content-grid{grid-template-columns:minmax(0,1fr) 210px}.kp-file-name,.kp-file-folder{max-width:210px}.kp-toolbar{flex-wrap:wrap}.kp-state{width:100%}.kp-file-search>span:last-child{display:none}}
@media(max-width:1050px){html[data-kb-surface=true] .kp-content-grid{grid-template-columns:minmax(0,1fr)}.kp-side{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:15px}.kp-overview{grid-template-columns:minmax(0,1.7fr) minmax(230px,1fr)}.kp-hero-footer>span:last-child{display:none}.kp-current-row:nth-child(n+3){display:none}.kp-toolbar{flex-wrap:nowrap}.kp-state{width:130px}.kp-file-name,.kp-file-folder{max-width:280px}.kp-worker-state{font-size:20px}.kp-heading h2{font-size:24px}}
@media(max-width:760px){html[data-kb-surface=true] .app-header{height:auto;min-height:62px;flex-wrap:wrap;gap:8px;padding:10px 15px}html[data-kb-surface=true] .brand{min-width:0;flex:1}html[data-kb-surface=true] .brand small{font-size:7px}html[data-kb-surface=true] .header-context{display:none}html[data-kb-surface=true] .header-actions{gap:12px;font-size:10px}html[data-kb-surface=true] .header-actions a{font-size:10px}html[data-kb-surface=true] .layout{display:block}html[data-kb-surface=true] .layout>aside{position:static;height:auto;padding:9px 15px;border-right:0;border-bottom:1px solid var(--line)}html[data-kb-surface=true] .sidebar-brand,html[data-kb-surface=true] .sidebar-note{display:none}html[data-kb-surface=true] #mobile-nav-toggle{background:var(--paper);border-color:var(--line);color:#8b9d7b;font-size:11px}html[data-kb-surface=true] main{padding:18px 15px}html[data-kb-surface=true] .page-context{margin-bottom:18px}.context-note{display:none}.kp-heading{align-items:flex-start;gap:10px;margin-bottom:19px}.kp-heading h2{font-size:23px}.kp-heading .section-intro{font-size:10px;max-width:215px}.kp-heading-actions{gap:5px;padding-top:3px}.kp-heading-actions button{font-size:10px;padding:6px 9px}.kp-heading-actions #kp-theme{padding:3px 8px}.kp-overview{grid-template-columns:minmax(0,1fr)}.kp-reading{margin:22px 0}#kp-percent{font-size:55px}.kp-hero-footer{font-size:9px}.kp-legend{font-size:9px;gap:13px}.kp-worker{padding:18px 20px}.kp-worker-state{margin-top:9px}.kp-worker p{min-height:0;max-height:80px;margin-bottom:10px}.kp-worker-footer{padding-top:9px}.kp-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:13px}.kp-metric-icon{display:grid;width:26px;height:28px}html[data-kb-surface=true] .kp-metric{padding:16px 12px;gap:9px}.kp-metric small{font-size:8px}.kp-metric>span>span{font-size:10px}.kp-side{grid-template-columns:minmax(0,1fr)}.kp-side-note{padding:6px}.kp-toolbar{flex-wrap:wrap;padding:0 12px 10px}.kp-tabs{width:100%;justify-content:space-between}#general-knowledge .kp-tabs button{padding:7px 8px;font-size:10px}.kp-state{width:100%}.kp-file-search{margin-left:12px!important;margin-right:12px!important}.kp-table-wrap table{min-width:580px}.kp-file-name,.kp-file-folder{max-width:230px}.kp-panel-title{padding:16px 14px 12px}.kp-panel-title h3{font-size:12px}.kp-pagination{padding:12px 14px;font-size:9px}.kp-pagination #kp-page-number{font-size:9px}.kp-lookup>summary>span{display:none}.kp-preview-notice{font-size:10px}html[data-kb-surface=true][data-local-preview=read-only] .layout>aside{height:auto}#kp-detail-mount{padding-left:16px;padding-right:16px}.kp-drawer-header{padding:14px 16px}}
@media(prefers-reduced-motion:reduce){.kp-progress>span,html[data-kb-surface=true] .kp-metric{transition:none}}
