:root{
  --bg:#f4f6f8;--surface:#fff;--surface-soft:#f8fafb;--text:#17202a;--muted:#697586;--border:#dfe4ea;--border-strong:#cbd2d9;
  --accent:#174ea6;--accent-soft:#edf4ff;--accent-strong:#103a7c;--green:#18794e;--green-soft:#edf8f2;--amber:#9a6700;--amber-soft:#fff7d6;
  --red:#b42318;--red-soft:#fff0ee;--shadow:0 14px 36px rgba(24,34,48,.10);--sidebar:238px;--detail:460px
}
*{box-sizing:border-box}html,body{min-height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px}
button,input,textarea,select{font:inherit}button{color:inherit}.hidden{display:none!important}.muted{color:var(--muted)}.eyebrow{font-size:11px;line-height:1.2;text-transform:uppercase;letter-spacing:.11em;color:#7b8794;font-weight:750}
.btn{border:1px solid transparent;border-radius:9px;padding:9px 13px;font-weight:700;cursor:pointer;transition:.15s ease;background:var(--surface)}.btn:hover{transform:translateY(-1px)}.btn.primary{background:var(--text);color:#fff}.btn.primary:hover{background:#293442}.btn.ghost{border-color:var(--border);background:#fff}.btn.danger{background:var(--red);color:#fff}.btn.ghost-danger{background:#fff;color:var(--red);border-color:#f1c4bf}.btn.small{padding:6px 9px;font-size:12px}.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}.icon-btn{width:36px;height:36px;border:1px solid var(--border);background:#fff;border-radius:9px;display:inline-grid;place-items:center;cursor:pointer;font-size:18px}.icon-btn:hover{background:#f6f8fa}
.input,.select{width:100%;border:1px solid var(--border-strong);border-radius:9px;padding:10px 11px;background:#fff;color:var(--text);outline:none}.input:focus,.select:focus,.global-search:focus,.tag-editor:focus-within{border-color:#8eb3eb;box-shadow:0 0 0 3px rgba(23,78,166,.10)}.label{font-size:12px;font-weight:750;margin-bottom:6px;display:block;color:#4a5565}.stack{display:grid;gap:14px}.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-message{min-height:18px;font-size:13px}.field-hint{margin-top:5px;font-size:11px;color:#7b8794;line-height:1.45}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 10%,#edf4ff 0,transparent 34%),var(--bg)}.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--border);border-radius:18px;padding:30px;box-shadow:var(--shadow)}.login-mark,.brand-mark{display:grid;place-items:center;background:var(--text);color:#fff;font-weight:800}.login-mark{width:48px;height:48px;border-radius:12px;margin-bottom:22px;font-size:20px}.login-card h1{margin:5px 0 5px;font-size:29px}.login-form{margin-top:24px}
.app{min-height:100vh}.app-header{height:72px;position:sticky;top:0;z-index:20;display:grid;grid-template-columns:270px minmax(300px,720px) 1fr;align-items:center;gap:20px;padding:0 24px;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-bottom:1px solid var(--border)}.brand-block{display:flex;align-items:center;gap:11px}.brand-mark{width:36px;height:36px;border-radius:9px}.brand-title{font-weight:800;font-size:17px;margin-top:2px}.global-search-wrap{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:13px;color:#7b8794;font-size:19px}.global-search{width:100%;height:42px;border:1px solid var(--border);border-radius:10px;background:#f8fafb;padding:0 52px 0 40px;outline:none}.global-search-wrap kbd{position:absolute;right:11px;border:1px solid var(--border);border-bottom-color:#b8c1ca;background:#fff;border-radius:5px;padding:2px 7px;color:#7b8794;font:11px ui-monospace,SFMono-Regular,Menlo,monospace}.header-actions{justify-self:end;display:flex;align-items:center;gap:8px}.role-badge{font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.05em;padding:6px 8px;border-radius:7px;background:var(--green-soft);color:var(--green)}
.workspace{display:grid;grid-template-columns:var(--sidebar) minmax(380px,1fr) var(--detail);max-width:1600px;margin:0 auto;min-height:calc(100vh - 72px)}.sidebar{padding:22px 16px 30px 20px;border-right:1px solid var(--border);background:#f8fafb;position:sticky;top:72px;height:calc(100vh - 72px);overflow:auto}.filter-section{padding-bottom:20px;margin-bottom:18px;border-bottom:1px solid var(--border)}.filter-section:last-child{border-bottom:0}.section-title{font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:#7b8794;margin:0 0 8px 7px}.section-title-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.section-title-row .section-title{margin-bottom:0}.text-btn{background:none;border:0;color:var(--accent);font-size:11px;font-weight:700;cursor:pointer}.nav-list{display:grid;gap:3px}.nav-item{border:0;background:transparent;border-radius:8px;padding:8px 9px;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;text-align:left;color:#4a5565;font-weight:620}.nav-item:hover{background:#eef1f4}.nav-item.active{background:#e9edf2;color:#182230;font-weight:760}.quality-main{border-top:1px dashed var(--border);margin-top:3px;padding-top:10px}.quality-section .nav-item.active{background:var(--amber-soft);color:#765300}.count-pill{min-width:24px;text-align:center;padding:2px 6px;border-radius:999px;background:#eef1f4;color:#7b8794;font-size:11px;font-weight:750}.active .count-pill{background:#fff;color:#596574}.maintenance-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#d4a72c;margin-right:7px}.tag-cloud{display:flex;gap:6px;flex-wrap:wrap;padding:0 3px}.cloud-tag{border:1px solid var(--border);background:#fff;color:#52606f;border-radius:999px;padding:5px 8px;cursor:pointer;font-size:calc(11px + (var(--weight,0) * .8px));font-weight:650;line-height:1}.cloud-tag span{opacity:.6;margin-left:3px;font-size:10px}.cloud-tag:hover{border-color:#a9b7c5}.cloud-tag.active{background:var(--accent-soft);border-color:#b9d0f5;color:var(--accent-strong)}
.results-pane{padding:24px 22px 50px;min-width:0}.results-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px}.result-heading-row{display:flex;align-items:center;gap:9px}.result-heading-row h1{font-size:21px;margin:0}.result-count{font-size:12px;color:#7b8794;background:#e9edf2;padding:3px 7px;border-radius:999px}.sort-wrap{display:flex;align-items:center;gap:8px}.sort-wrap label{font-size:12px;color:var(--muted);white-space:nowrap}.compact-select{width:auto;padding:8px 30px 8px 10px}.active-filters{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.filter-chip{border:1px solid #cbd8ea;background:#f4f8ff;color:#244f88;border-radius:999px;padding:4px 8px;display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:650;cursor:pointer}.filter-chip .x{font-weight:900;opacity:.55}.clear-all{border:0;background:none;color:var(--accent);font-size:11px;font-weight:700;cursor:pointer;padding:4px}.entry-list{display:grid;gap:8px}.entry-card{position:relative;background:#fff;border:1px solid var(--border);border-radius:11px;padding:14px 15px;cursor:pointer;transition:.14s ease;outline:none}.entry-card:hover{border-color:#bcc6d1;box-shadow:0 5px 16px rgba(24,34,48,.05);transform:translateY(-1px)}.entry-card.selected{border-color:#8eb3eb;box-shadow:0 0 0 2px rgba(23,78,166,.07)}.entry-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.entry-card h2{font-size:15px;line-height:1.35;margin:0;font-weight:760}.entry-card-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:7px;font-size:11px;color:#7b8794}.entry-preview{margin:10px 0 0;color:#52606f;line-height:1.52;font-size:13px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.entry-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}.mini-tag{border:0;background:#f0f3f6;color:#596574;border-radius:999px;padding:4px 7px;font-size:10px;font-weight:680;cursor:pointer}.mini-tag:hover{background:#e5eaf0}.entry-signals{display:flex;align-items:center;gap:7px;color:#7b8794;font-size:11px;white-space:nowrap}.quality-signal{color:#d4a72c;font-size:12px}.type-badge,.status-badge{display:inline-flex;align-items:center;border-radius:6px;padding:3px 6px;font-size:10px;font-weight:780}.type-source{background:#edf4ff;color:#174ea6}.type-wording{background:#f4efff;color:#6537a5}.type-note{background:#eef7f0;color:#277044}.status-current{background:#edf8f2;color:#18794e}.status-review{background:var(--amber-soft);color:var(--amber)}.status-outdated{background:var(--red-soft);color:var(--red)}.status-archived{background:#eef1f4;color:#697586}.empty-results{border:1px dashed var(--border-strong);border-radius:12px;padding:42px 24px;text-align:center;color:var(--muted);background:#fafbfc}.empty-results h2{color:var(--text);font-size:17px;margin:0 0 7px}.loading-card{background:#fff;border:1px solid var(--border);border-radius:11px;padding:17px}.skeleton{height:11px;background:#eef1f4;border-radius:5px;margin:10px 0;width:67%;animation:pulse 1.2s infinite alternate}.skeleton.wide{height:17px;width:88%}.skeleton.short{width:40%}@keyframes pulse{to{opacity:.45}}
.detail-pane{border-left:1px solid var(--border);background:#fff;position:sticky;top:72px;height:calc(100vh - 72px);overflow:auto}.detail-empty{height:100%;display:grid;place-content:center;text-align:center;padding:36px;color:var(--muted)}.detail-empty-icon{width:46px;height:46px;display:grid;place-items:center;border:1px solid var(--border);border-radius:12px;margin:0 auto 14px;background:#fafbfc;font-size:20px}.detail-empty h2{color:var(--text);font-size:16px;margin:0 0 6px}.detail-empty p{margin:0;line-height:1.5;max-width:280px}.detail-content{padding:24px 26px 50px}.detail-topline{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.detail-content h1{font-size:23px;line-height:1.28;margin:9px 0 10px}.detail-actions{display:flex;gap:6px}.detail-meta{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.detail-submeta{font-size:11px;color:#7b8794;margin-top:11px;display:flex;gap:12px;flex-wrap:wrap}.quality-alert{margin:15px 0 0;padding:9px 10px;border:1px solid #efd79b;background:#fff9e7;border-radius:8px;color:#735b16;font-size:11px;display:flex;gap:7px;align-items:flex-start;flex-direction:column}.quality-alert strong{font-size:10px;text-transform:uppercase;letter-spacing:.06em}.detail-tags{display:flex;gap:6px;flex-wrap:wrap;margin:18px 0}.detail-tag{border:1px solid #d6e1ef;background:#f6f9fd;color:#315f93;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:680;cursor:pointer}.detail-section{border-top:1px solid var(--border);padding-top:18px;margin-top:18px}.detail-section-title{font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:#7b8794;margin-bottom:10px}.detail-body{font-size:14px;line-height:1.68;color:#303b48}.detail-body p{margin:0 0 12px}.detail-body h2,.detail-body h3,.detail-body h4{color:var(--text);line-height:1.35;margin:20px 0 9px}.detail-body h2{font-size:19px}.detail-body h3{font-size:16px}.detail-body h4{font-size:14px}.detail-body .bullet{display:flex;gap:8px;margin:5px 0}.detail-body .bullet-mark{color:#7b8794;min-width:12px}.detail-note{background:#fff9e9;border:1px solid #f0dfaa;border-radius:9px;padding:11px 12px;line-height:1.5;color:#665314}.source-link{display:inline-flex;align-items:center;gap:6px;text-decoration:none;border:1px solid var(--border);border-radius:8px;padding:8px 10px;color:var(--accent);font-weight:700;background:#fff}.source-link:hover{background:#f8fafc}.document-list{display:grid;gap:7px}.document-card{border:1px solid var(--border);border-radius:9px;padding:10px 11px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fafbfc}.document-name{font-size:12px;font-weight:690;overflow-wrap:anywhere}.document-meta{font-size:10px;color:#7b8794;margin-top:3px}.doc-open-btn{border:0;background:#e9edf2;border-radius:7px;padding:6px 8px;font-size:11px;font-weight:730;cursor:pointer}.detail-close-mobile{display:none!important}
.modal{position:fixed;inset:0;background:rgba(16,24,40,.54);display:grid;place-items:center;padding:18px;z-index:50}.panel{width:min(900px,100%);max-height:94vh;overflow:auto;background:#fff;border-radius:16px;padding:0;box-shadow:0 24px 70px rgba(16,24,40,.28)}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;padding:22px 24px 17px;border-bottom:1px solid var(--border);position:sticky;top:0;background:#fff;z-index:5;border-radius:16px 16px 0 0}.modal-head h2{margin:4px 0 0;font-size:21px}.edit-panel form{padding:0 24px 0}.editor-section{display:grid;gap:13px;padding:20px 0;border-bottom:1px solid var(--border)}.editor-section-title{font-size:11px;text-transform:uppercase;letter-spacing:.09em;color:#7b8794;font-weight:800}.content-editor{min-height:310px;line-height:1.55;resize:vertical}.editor-footer{position:sticky;bottom:0;background:rgba(255,255,255,.97);backdrop-filter:blur(8px);border-top:1px solid var(--border);margin:0 -24px;padding:13px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px}.modal-actions{display:flex;gap:8px;flex-shrink:0}
.tag-editor{min-height:44px;border:1px solid var(--border-strong);border-radius:9px;background:#fff;padding:6px;display:flex;gap:5px;align-items:center;flex-wrap:wrap;transition:.12s}.selected-tags{display:contents}.edit-tag-chip{display:inline-flex;align-items:center;gap:4px;padding:5px 7px;border-radius:999px;background:var(--accent-soft);color:var(--accent-strong);font-size:11px;font-weight:700}.edit-tag-chip button{border:0;background:none;padding:0;width:15px;height:15px;border-radius:50%;cursor:pointer;color:inherit;opacity:.65;line-height:1}.edit-tag-chip button:hover{background:#d8e7fb;opacity:1}.tag-input-wrap{position:relative;flex:1;min-width:190px}.tag-input{width:100%;border:0;outline:0;padding:5px 4px;background:transparent;min-width:160px}.tag-suggestions{position:absolute;left:-6px;right:-6px;top:calc(100% + 8px);z-index:20;background:#fff;border:1px solid var(--border);border-radius:10px;padding:5px;box-shadow:0 12px 30px rgba(24,34,48,.14);max-height:230px;overflow:auto}.tag-suggestions button{width:100%;border:0;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 9px;border-radius:7px;text-align:left;cursor:pointer}.tag-suggestions button:hover{background:#f3f6f9}.tag-suggestions small{color:#8a96a3;font-size:10px}.file-drop{border:1px dashed #b9c4cf;background:#fafbfc;border-radius:10px;padding:15px;display:flex;align-items:center;gap:11px;cursor:pointer;transition:.15s}.file-drop:hover{border-color:#8ba8cb;background:#f7faff}.file-drop input{display:none}.file-drop-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:#edf1f5;font-size:18px;color:#52606f}.file-drop strong{display:block;font-size:12px}.file-drop small{display:block;color:#7b8794;margin-top:2px;font-size:10px}.file-queue{display:grid;gap:5px}.file-queue>div{display:flex;justify-content:space-between;gap:10px;border:1px solid var(--border);border-radius:8px;background:#fafbfc;padding:7px 9px;font-size:11px}.file-queue small{color:#7b8794}.edit-docs{display:grid;gap:0}.doc-edit-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid var(--border);padding:9px 0}.doc-edit-row:first-child{border-top:0}.doc-edit-actions{display:flex;gap:5px}
.mobile-only{display:none!important}
@media(max-width:1250px){:root{--detail:400px}.app-header{grid-template-columns:220px minmax(280px,1fr) auto}.workspace{grid-template-columns:220px minmax(340px,1fr) var(--detail)}}
@media(max-width:1020px){.workspace{grid-template-columns:220px minmax(0,1fr)}.detail-pane{position:fixed;right:0;top:72px;width:min(520px,92vw);z-index:15;box-shadow:-18px 0 44px rgba(24,34,48,.14);transform:translateX(102%);transition:.2s ease}.detail-pane.open{transform:translateX(0)}.detail-close-mobile{display:inline-grid!important}}
@media(max-width:760px){.mobile-only{display:inline-flex!important}.app-header{height:auto;min-height:66px;grid-template-columns:1fr auto;padding:11px 14px;gap:10px}.brand-block .eyebrow{display:none}.brand-mark{width:32px;height:32px}.global-search-wrap{grid-column:1/-1;grid-row:2}.global-search-wrap kbd{display:none}.header-actions{grid-column:2;grid-row:1;gap:5px}.header-actions .btn{padding:8px 10px}.role-badge{display:none}.workspace{display:block;min-height:calc(100vh - 118px)}.sidebar{position:fixed;z-index:30;top:0;left:0;width:min(320px,88vw);height:100vh;box-shadow:18px 0 42px rgba(24,34,48,.18);transform:translateX(-105%);transition:.2s ease;padding:18px;background:#fff}.sidebar.open{transform:translateX(0)}.sidebar-mobile-head{display:flex!important;align-items:center;justify-content:space-between;margin-bottom:20px}.results-pane{padding:18px 13px 40px}.results-toolbar{align-items:flex-start;gap:12px}.sort-wrap{display:block}.sort-wrap label{display:none}.compact-select{max-width:150px}.entry-card{padding:13px}.entry-preview{-webkit-line-clamp:2}.detail-pane{top:0;height:100vh;width:100vw;z-index:40}.detail-content{padding:20px 18px 44px}.detail-content h1{font-size:21px}.row{grid-template-columns:1fr}.panel{border-radius:12px;max-height:96vh}.modal{padding:8px}.modal-head{padding:17px 18px 14px}.edit-panel form{padding:0 18px}.editor-footer{margin:0 -18px;padding:11px 18px;align-items:flex-end;flex-direction:column}.modal-actions{width:100%;justify-content:flex-end}.login-card{padding:24px}.brand-title{font-size:16px}.tag-input-wrap{min-width:150px}}
