:root{color-scheme:light;--bg:#f6f8fb;--surface:#fff;--surface-2:#f7f9fc;--line:#e4e7ec;--line-strong:#d3dae4;--text:#202a37;--muted:#6c7a90;--navy:#243148;--accent:#24428e;--accent-strong:#1b3574;--accent-soft:#eef3fc;--danger:#a33545;--success:#176342;--warning:#866322;--sidebar-bg:#10192c;--sidebar-line:#253044;--sidebar-text:#becbde;--sidebar-muted:#8fa0b8;--sidebar-accent:#48bfe9;--status-new:#1d5bbf;--status-new-bg:#e9f1ff;--status-progress:#9a6210;--status-progress-bg:#fdf1de;--status-done:#1c7a52;--status-done-bg:#e6f6ef;--status-archived:#657183;--status-archived-bg:#eef1f5;--tone-current:#24694a;--tone-historical:#866322;--tone-case-law:#22677a;--tone-template:#6f5490;--radius-sm:6px;--radius-md:8px;--radius-lg:10px;--radius-xl:14px;--control-h:32px;--control-h-sm:28px;--shadow-sm:0 1px 3px rgba(24,50,86,.06);--shadow-lg:0 24px 70px rgba(16,25,44,.22);--focus-ring:0 0 0 3px rgba(36,66,142,.18);--font-sans:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body,html{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:var(--font-sans)}body{min-height:100vh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit;color:inherit}a,button{-webkit-tap-highlight-color:transparent}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none;box-shadow:var(--focus-ring)}.visually-hidden{display:none}.eyebrow,.section-label{color:var(--muted);font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:700}.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--control-h);border:1px solid transparent;border-radius:var(--radius-md);padding:0 12px;font-size:13px;font-weight:600;cursor:pointer;transition:background .14s,border-color .14s,color .14s}.button:disabled{opacity:.5;cursor:not-allowed}.button-primary{background:var(--accent);color:#fff}.button-primary:hover:not(:disabled){background:var(--accent-strong)}.button-quiet,.button-secondary{border-color:var(--line-strong);background:var(--surface);color:var(--navy)}.button-quiet:hover:not(:disabled),.button-secondary:hover:not(:disabled){border-color:var(--accent);background:var(--surface-2)}.button-danger{border-color:#efc6cc;background:var(--surface);color:var(--danger)}.button-danger:hover:not(:disabled){border-color:var(--danger);background:#fdf3f4}.text-button{border:0;background:transparent;padding:4px 0;font-size:12px;color:var(--accent);cursor:pointer}.text-button:hover{color:var(--accent-strong)}.notice{border:1px solid var(--line-strong);border-radius:var(--radius-md);padding:8px 12px;font-size:13px;line-height:1.45;background:var(--surface);color:var(--muted)}.notice-error{color:var(--danger);border-color:#efc6cc;background:#fdf3f4}.notice-success{color:var(--success);border-color:#bcdcC9;background:#f2faf5}.notice-warning{color:var(--warning);border-color:#e7d5a4;background:#fdf9ee}.page-header-row{display:flex;align-items:center;gap:10px;min-height:44px}.page-header-row h1{margin:0;font-size:15px;font-weight:650;letter-spacing:-.01em;color:var(--navy);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.page-header-row .eyebrow{margin-right:2px}.card{border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface)}.app-layout{display:flex;min-height:100vh}.app-sidebar{width:272px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;padding:22px 12px 0;background:var(--sidebar-bg);color:var(--sidebar-text);z-index:40}.app-brand{display:flex;align-items:center;gap:10px;padding:0 8px 22px;color:#fff;font-size:14px;flex-shrink:0}.app-brand strong{display:block;font-weight:650;line-height:1.5}.app-brand small{display:block;color:var(--sidebar-muted);font-size:11px;margin-top:2px;font-weight:400}.brand-mark{display:inline-flex;justify-content:center;align-items:center;width:36px;height:36px;background:#27344c;border:1px solid #364663;color:#fff;border-radius:var(--radius-md);font-size:22px;font-weight:700;flex-shrink:0}.sidebar-navigation{min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#35435b transparent;padding-bottom:16px}.navigation-icon{width:19px;height:19px;flex-shrink:0}.sidebar-caption{color:var(--sidebar-muted);font-size:10px;font-weight:700;letter-spacing:.12em}.sidebar-link{display:flex;align-items:center;gap:12px;width:100%;padding:11px 12px;margin:3px 0;border:0;background:transparent;color:var(--sidebar-text);font-size:13px;font-weight:500;border-radius:var(--radius-sm);text-align:left;cursor:pointer}.sidebar-link:hover{background:#1a263c;color:#fff}.sidebar-link.is-active{color:#fff;background:#263149;box-shadow:inset 3px 0 var(--sidebar-accent)}.sidebar-group{display:flex;align-items:center;margin:3px 0;border-radius:var(--radius-sm)}.sidebar-group.is-active{background:#263149;box-shadow:inset 3px 0 var(--sidebar-accent);color:#fff}.sidebar-group>a{display:flex;align-items:center;gap:12px;flex:1 1;min-width:0;padding:11px 12px;font-size:13px;color:var(--sidebar-text)}.sidebar-group>button{border:0;background:transparent;color:#a7b6cd;font-size:20px;padding:7px 12px;cursor:pointer}.sidebar-group>a:hover,.sidebar-group>button:hover{color:#fff}.sidebar-children{margin:2px 0 10px}.sidebar-child{display:flex;align-items:center;gap:10px;padding:10px 12px 10px 36px;color:#98a8bf;font-size:12px;border-radius:var(--radius-sm)}.sidebar-child span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-child.is-active{background:#19253b;color:var(--sidebar-accent)}.sidebar-child:hover{background:#1a263c;color:#d6dfec}.sidebar-count{background:var(--sidebar-accent);color:#0b1526;border-radius:999px;min-width:23px;height:23px;display:grid;place-items:center;margin-left:auto;font-size:11px;font-weight:700}.sidebar-task-tree{margin:4px 10px 12px 16px;border-left:1px solid #2b354a;padding-left:12px}.sidebar-task-tree>input{width:100%;min-width:0;background:#253047;color:#e6edf7;border:1px solid #39465c;border-radius:var(--radius-sm);padding:9px;font-size:11px;margin-bottom:10px}.sidebar-task-tree>input::placeholder{color:#9aa8bc}.sidebar-task-tree summary{display:flex;align-items:center;gap:8px;font-size:11px;padding:8px 0;cursor:pointer}.sidebar-task-tree summary:before{content:"›"}.sidebar-task-tree details[open] summary:before{content:"⌄"}.sidebar-task-tree summary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-task-tree summary .navigation-icon{width:15px;height:15px}.sidebar-task-items{border-left:1px solid #2b354a;margin:0 0 8px 10px;padding-left:10px}.sidebar-task{display:flex;gap:8px;align-items:center;padding:7px 0;font-size:11px;color:#b7c3d6}.sidebar-task>span:last-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sidebar-task>span:first-child{color:#8b9ab1}.sidebar-task.is-done>span:first-child{color:#25c99c}.sidebar-task.is-done>span:last-child{color:#77879f;text-decoration:line-through}.sidebar-all{display:block;padding:10px 0}.sidebar-all,.sidebar-empty{font-size:11px;color:#94a5bd}.sidebar-empty{line-height:1.5;margin:10px 12px}.sidebar-bottom{flex-shrink:0;margin-top:auto;border-top:1px solid var(--sidebar-line);margin-left:-12px;margin-right:-12px;padding:16px 18px}.sidebar-profile{display:flex;align-items:center;gap:12px;font-size:12px}.profile-avatar{display:grid;place-items:center;width:36px;height:36px;background:#303d53;border-radius:50%;flex-shrink:0}.sidebar-profile strong{display:block;font-weight:550;color:#eff4fc}.sidebar-profile small{display:block;color:#94a5bd;font-size:10px;margin-top:4px}.mobile-menu{display:none}.app-main{margin-left:272px;flex:1 1;min-width:0}.app-main .shell{padding:0;min-height:100dvh}.app-main .frame{border:0;border-radius:0;padding:0;background:transparent;box-shadow:none;min-height:auto;overflow:visible}.directory-frame{max-width:1200px;margin:0 auto}.settings-frame{display:grid;grid-gap:16px;gap:16px;padding:20px 28px 28px;align-content:start}.settings-frame h1{font-size:15px;letter-spacing:-.01em}.settings-frame h1,.settings-frame h2{margin:0;font-weight:650;color:var(--navy)}.settings-frame h2{font-size:14px}.settings-frame p{margin:0;line-height:1.65;font-size:13px;color:var(--muted)}.page-description{color:var(--muted);font-size:13px;line-height:1.6}.directory-header{display:flex;justify-content:space-between;align-items:center;gap:20px}.directory-header .page-description{margin:0}.directory-search{width:min(480px,100%);min-height:var(--control-h);border:1px solid var(--line-strong);background:var(--surface);border-radius:var(--radius-md);padding:0 12px;font-size:13px}.directory-list{display:grid;grid-gap:12px;gap:12px}.directory-card{display:flex;align-items:center;justify-content:space-between;gap:18px;min-width:0;padding:16px 20px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface)}.directory-card h2{margin:0;color:var(--navy);font-size:14px;font-weight:650;overflow-wrap:anywhere}.directory-card p{margin:2px 0 0;color:var(--muted);font-size:12px}.directory-card .button{flex-shrink:0}.directory-empty{border:1px dashed var(--line-strong);border-radius:var(--radius-lg);background:var(--surface);padding:40px 24px;text-align:center;color:var(--muted);font-size:13px}.dashboard-shortcuts,.library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:14px;gap:14px}.dashboard-shortcuts>a,.library-card{padding:18px 20px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);font-size:13px}.dashboard-shortcuts strong{display:block;font-size:24px;color:var(--navy);margin-bottom:8px}.library-card h2{margin:0 0 10px;font-size:14px;font-weight:650;color:var(--navy)}.library-card ol{padding-left:18px;margin:0;color:var(--muted);line-height:1.7;font-size:12.5px}.library-card li+li{margin-top:10px}.library-actions,.template-options{display:flex;flex-wrap:wrap;gap:10px}.procedures-section{margin-top:8px}.procedures-section h2{margin:0 0 10px;color:var(--navy);font-size:14px;font-weight:650}.procedure-list{margin:0;list-style:none;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);padding:6px 20px;font-size:13px}.procedure-list li{padding:11px 0;color:var(--muted);line-height:1.6}.procedure-list li+li{border-top:1px solid var(--line)}.template-label{font-size:13px;font-weight:600;color:var(--navy)}.template-editor{width:100%;min-height:420px;border:1px solid var(--line-strong);border-radius:var(--radius-lg);background:var(--surface);padding:16px;resize:vertical;font-size:13px;line-height:1.7}.artifact-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));grid-gap:14px;gap:14px}.artifact-grid h2,.manifest-id{overflow-wrap:anywhere}.empty-artifacts{border:1px dashed var(--line-strong);border-radius:var(--radius-lg);background:var(--surface);padding:60px 24px;text-align:center}.empty-artifacts>span{color:var(--accent);font-size:36px}.empty-artifacts h2{margin:8px 0 0;font-size:15px;color:var(--navy)}.empty-artifacts p{color:var(--muted);font-size:13px}.status-frame{display:grid;grid-gap:16px;gap:16px;padding:20px 28px 28px;align-content:start}.status-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.status-page-title{margin:0;font-size:15px;font-weight:650;letter-spacing:-.01em;color:var(--navy)}.status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));grid-gap:12px;gap:12px}.status-panel,.status-section{padding:16px 18px}.status-value{color:var(--navy);font-size:24px;line-height:1;font-weight:700}.status-hint,.status-value{margin:8px 0 0}.status-section{display:grid;grid-gap:10px;gap:10px}.status-empty{color:var(--muted);font-size:13px}.connector-rows,.manifest-list{display:grid;grid-gap:8px;gap:8px}.connector-row,.manifest-header{display:flex;justify-content:space-between;gap:12px;font-size:13px}.connector-row span{color:var(--muted)}.manifest-list{gap:10px}.manifest-card{display:grid;grid-gap:4px;gap:4px;padding:10px 13px;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface-2)}.manifest-header{font-size:13px;color:var(--navy);font-weight:600}.coverage-status{font-weight:700}.coverage-status.is-complete{color:var(--success)}.coverage-status.is-unavailable{color:var(--danger)}.coverage-status:not(.is-complete):not(.is-unavailable){color:var(--warning)}.manifest-id{color:var(--muted);font-size:11px}.manifest-errors{color:var(--danger);font-size:11px}.manifest-summary{color:var(--muted);font-size:12px}.auth-page{display:grid;min-height:100vh;place-items:center;padding:24px;background:radial-gradient(ellipse at top left,#e7eefb,#f6f8fb 65%)}.auth-card{max-width:460px;padding:40px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-lg)}.auth-card .brand-mark{margin-bottom:18px}.auth-card .eyebrow{display:block}.auth-card h1{margin:10px 0 0;font-size:22px;line-height:1.25;letter-spacing:-.02em;color:var(--navy)}.auth-card p{line-height:1.65;color:var(--muted);font-size:13.5px}.auth-actions{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0}.auth-card small{color:var(--muted);font-size:11px}.workspace-frame{display:grid;grid-template-rows:auto minmax(0,1fr);height:100dvh}.workspace-header{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;min-height:44px;padding:6px 16px;background:var(--surface);border-bottom:1px solid var(--line)}.workspace-header .notice{flex-basis:100%}.workspace-heading{display:flex;align-items:center;gap:16px;min-width:0;flex:1 1 140px}.workspace-title-wrap{min-width:0;max-width:100%}.case-title{margin:0;font-size:15px;line-height:1.3;font-weight:650;letter-spacing:-.01em;color:var(--navy)}.case-title,.case-title-button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.case-title-button{border:0;background:none;padding:0;font:inherit;color:inherit;text-align:left;cursor:text;max-width:100%}.case-title-input{width:min(480px,100%);min-height:var(--control-h-sm);padding:4px 9px;border:1px solid var(--line-strong);border-radius:var(--radius-md);background:var(--surface);font-size:15px;font-weight:650;color:var(--navy)}.workspace-links{flex:0 0 auto;display:flex;align-items:center;gap:8px}.workspace-links .button{white-space:nowrap;border-color:transparent;background:transparent;font-weight:500}.workspace-links .button:hover:not(:disabled){background:var(--surface-2)}.workspace-controls{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin-left:auto;min-width:0}.case-status-select{display:inline-flex;align-items:center;gap:7px;height:var(--control-h-sm);padding:0 4px 0 10px;border:1px solid transparent;border-radius:var(--radius-md);font-size:12px;font-weight:600}.case-status-select>select{border:0;background:transparent;color:inherit;font:inherit;font-size:12px;font-weight:600;height:100%;cursor:pointer;padding-right:2px}.case-status-select>select:disabled{opacity:.55;cursor:default}.case-status-select.status-new{background:var(--status-new-bg);color:var(--status-new)}.case-status-select.status-in_progress{background:var(--status-progress-bg);color:var(--status-progress)}.case-status-select.status-completed{background:var(--status-done-bg);color:var(--status-done)}.case-status-select.status-archived{background:var(--status-archived-bg);color:var(--status-archived)}.case-status-dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto;display:inline-block;background:currentColor}.case-status-dot.status-new{background:var(--status-new)}.case-status-dot.status-in_progress{background:var(--status-progress)}.case-status-dot.status-completed{background:var(--status-done)}.case-status-dot.status-archived{background:var(--status-archived)}.legal-date-control{flex:0 0 auto;min-height:var(--control-h-sm);border:1px solid var(--line-strong);border-radius:var(--radius-md);padding:0 12px;background:var(--surface);color:var(--muted);font-size:12px;white-space:nowrap;cursor:pointer}.legal-date-control strong{color:var(--text);font-weight:500}.active-scope-name,.answer-meta,.modal-detail,.source-canvas-count,.status-hint,.stream-sources{color:var(--muted);font-size:12px}.workspace-grid{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 344px}.workspace-rail{min-height:0;overflow-y:auto;border-left:1px solid var(--line);background:var(--surface-2);scrollbar-width:thin}.conversation-panel{min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;grid-gap:18px;gap:18px;padding:24px 28px;background:var(--bg)}.conversation-list,.source-list{min-height:0;overflow-y:auto;display:grid;grid-gap:18px;gap:18px;align-content:start}.conversation-list{scrollbar-width:thin;padding-right:4px}.empty-conversation{align-self:center;justify-items:center;text-align:center;padding:40px 12px 24px;display:grid;grid-gap:12px;gap:12px}.empty-conversation-symbol{width:48px;height:48px;display:grid;place-items:center;border-radius:var(--radius-lg);background:var(--accent-soft);color:var(--accent);font-size:26px}.empty-conversation h2{margin:4px 0 0;font-size:18px;font-weight:650;letter-spacing:-.02em;color:var(--navy)}.empty-conversation-copy{font-size:13.5px;line-height:1.65;max-width:430px;color:var(--muted);margin-bottom:8px}.example-action{width:min(380px,100%);padding:11px 14px;border:1px solid var(--line-strong);border-radius:var(--radius-md);background:var(--surface);color:var(--navy);font-size:13px;text-align:left;cursor:pointer;transition:border-color .14s,background .14s}.example-action:hover{border-color:var(--accent);background:var(--surface-2)}.example-action:disabled{opacity:.5;cursor:not-allowed}.message-bubble{max-width:94%;padding:12px 15px;border-radius:var(--radius-xl);line-height:1.6;overflow-wrap:anywhere}.message-user{justify-self:end;max-width:82%;background:#e8eefb;color:#243958;border-bottom-right-radius:4px;font-size:14px;white-space:pre-wrap}.message-assistant{border:1px solid var(--line);background:var(--surface);border-bottom-left-radius:4px;font-size:14px}.assistant-answer{display:grid;grid-gap:12px;gap:12px}.stream-status{display:grid;grid-gap:8px;gap:8px}.phase-chip{justify-self:start;display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:5px 11px;background:var(--accent-soft);color:var(--accent-strong);font-size:12px;font-weight:550}.phase-dot{width:7px;height:7px;border-radius:50%;background:var(--accent);animation:pulse 1.4s infinite}.stream-error{color:var(--danger);font-size:13px}@keyframes pulse{50%{opacity:.35;transform:scale(.8)}}.citation-list,.modal-actions,.modal-badges,.source-card-tags{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.citation-chip{display:inline-flex;align-items:center;gap:6px;max-width:320px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);padding:4px 9px;background:var(--surface-2);color:var(--navy);cursor:pointer;font-size:11.5px}.citation-chip:hover{border-color:var(--accent)}.citation-index{color:var(--accent);font-weight:800}.citation-label,.scope-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uncertainties{color:var(--muted);font-size:12px;line-height:1.55}.agent-steps{display:grid;grid-gap:2px;gap:2px;justify-items:start}.agent-step{position:relative;display:flex;align-items:baseline;gap:10px;padding:5px 0 5px 20px;max-width:640px}.agent-step:before{content:"";position:absolute;left:3px;top:0;bottom:0;width:2px;border-radius:2px;background:var(--line-strong)}.agent-step:first-of-type:before{top:12px}.agent-step:last-of-type:before{bottom:calc(100% - 12px)}.agent-step:only-of-type:before{display:none}.agent-step-dot{position:absolute;left:0;top:8px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px rgba(36,66,142,.12)}.agent-step:last-of-type .agent-step-dot{animation:pulse 1.4s infinite}.agent-step-text{color:var(--muted);font-size:12.5px;line-height:1.5}.composer{display:grid;grid-gap:10px;gap:10px;padding:14px 16px;border:1px solid var(--line-strong);border-radius:var(--radius-xl);background:var(--surface);box-shadow:var(--shadow-sm)}.composer:focus-within{border-color:var(--accent);box-shadow:var(--focus-ring)}.composer-input{width:100%;resize:none;border:0;outline:0;background:transparent;font-size:14px;line-height:1.6;min-height:56px;max-height:220px;overflow-y:auto}.composer-input::placeholder{color:#97a3b3}.composer-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:2px}.composer-model{margin-right:auto;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface);color:var(--text);font-size:11px;padding:3px 6px;cursor:pointer}.composer-model:disabled{opacity:.6;cursor:default}.composer-status{font-size:11px;color:var(--muted)}.composer-status.is-sending{color:var(--accent);font-weight:600}.composer-submit{min-width:86px}.source-canvas{min-height:0;display:flex;flex-direction:column;gap:12px;padding:20px;background:transparent}.source-canvas-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.source-canvas-header h2{display:flex;align-items:center;gap:10px;margin:0;font-size:14px;font-weight:650;color:var(--navy)}.source-canvas-count{font-weight:400}.source-upload-button{flex:0 0 auto}.source-filter,.source-upload-button{min-height:var(--control-h-sm);padding:0 10px;font-size:12px}.source-filter{width:100%;border:1px solid var(--line-strong);border-radius:var(--radius-md);background:var(--surface)}.source-list{gap:12px;overflow:visible;padding:0}.source-empty{padding:6px 0;color:var(--muted);font-size:12px;line-height:1.6}.case-documents{margin-top:4px}.case-documents .section-label{margin-bottom:8px}.case-document{display:block;width:100%;margin-bottom:6px;font-size:12.5px;text-align:left}.case-document .source-title{display:block;margin-bottom:4px}.case-document-open{display:block;width:100%;padding:0;border:0;background:none;text-align:left;cursor:pointer}.case-document-open:hover .source-title{color:var(--accent-strong)}.case-document-meta{display:block;color:var(--muted);font-size:11px}.case-document-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;padding-top:9px;border-top:1px solid var(--line);color:var(--muted);font-size:10.5px}.case-document-delete{border:0;border-radius:4px;background:none;padding:4px 6px;color:var(--danger);font-size:11px;font-weight:600;cursor:pointer}.case-document-delete:hover{background:#fdf3f4}.source-card{border:1px solid var(--line);border-radius:var(--radius-lg);padding:13px 14px;background:var(--surface);box-shadow:var(--shadow-sm);cursor:default}.source-card:hover{border-color:var(--line-strong)}.source-card.is-used{border-color:#c9d6ee}.source-open{display:block;width:100%;padding:0;border:0;background:none;text-align:left;cursor:pointer}.source-title{margin:0 0 8px;color:var(--text);font-size:13px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}.source-card-tags{gap:6px}.source-badge{border:1px solid var(--line-strong);border-radius:4px;padding:2px 6px;background:var(--surface);color:var(--muted);font-size:10px;font-weight:600}.source-badge.is-current{border-color:#bcd9c8;color:var(--tone-current)}.source-badge.is-historical{border-color:#e5d6a8;color:var(--tone-historical)}.source-badge.is-case-law{border-color:#b8d8de;color:var(--tone-case-law)}.source-badge.is-template{border-color:#d8c8e6;color:var(--tone-template)}.used-label{display:none}.source-meta{margin:4px 0 0;line-height:1.45}.source-meta,.source-reason{color:var(--muted);font-size:11.5px}.source-reason{margin:8px 0 0;line-height:1.5}.source-score{gap:10px}.source-card-footer,.source-score{display:flex;align-items:center;margin-top:10px}.source-card-footer{justify-content:space-between;gap:8px;padding-top:9px;border-top:1px solid var(--line);color:var(--muted);font-size:10.5px}.source-card-actions{display:flex;align-items:center;gap:6px}.pin-button{border:0;border-radius:4px;background:none;font-size:11px;color:var(--accent);cursor:pointer;padding:4px}.pin-button.is-pinned,.pin-button:hover{background:var(--accent-soft)}.scope-combobox{position:relative;width:min(320px,100%);min-width:160px;flex:0 1 auto}.scope-trigger{display:flex;align-items:center;gap:10px;width:100%;min-height:var(--control-h-sm);border:1px solid var(--line-strong);border-radius:var(--radius-md);padding:5px 11px;background:var(--surface);color:var(--navy);text-align:left;font-size:12px;cursor:pointer}.scope-trigger:hover{border-color:var(--accent)}.scope-label{flex:0 0 auto;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.scope-caret{margin-left:auto;color:var(--muted)}.scope-value{font-weight:550}.scope-menu{position:absolute;z-index:30;top:calc(100% + 6px);right:0;left:0;padding:8px;border:1px solid var(--line-strong);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-lg)}.scope-search{width:100%;margin-bottom:6px;min-height:var(--control-h-sm);padding:0 10px;border:0;border-radius:var(--radius-sm);outline:0;background:var(--surface-2);font-size:13px}.scope-options{max-height:260px;overflow-y:auto}.scope-option{display:block;width:100%;border:0;border-radius:var(--radius-sm);padding:8px 10px;background:transparent;color:var(--navy);text-align:left;font-size:13px;cursor:pointer}.scope-option.is-selected,.scope-option:hover{background:var(--accent-soft)}.scope-institution{margin-top:2px;color:var(--muted);font-size:11px}.scope-empty{padding:10px;color:var(--muted);font-size:13px}.modal-backdrop{position:fixed;z-index:60;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(16,25,44,.38);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.source-modal{width:min(860px,100%);max-height:85vh;overflow-y:auto;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-lg)}.modal-content{display:grid;grid-gap:14px;gap:14px}.modal-header{display:flex;justify-content:space-between;align-items:center;gap:10px}.modal-title{margin:0;font-size:16px;line-height:1.3;letter-spacing:-.01em;color:var(--navy)}.modal-section{padding:13px 14px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface-2)}.modal-section .section-label{margin-bottom:8px}.modal-reason{color:var(--text);font-size:13px;line-height:1.5}.provenance-item{margin-bottom:6px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}.chunk-card{margin-bottom:8px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface);cursor:pointer}.chunk-card:hover{border-color:var(--line-strong)}.chunk-card.is-highlighted{border-color:var(--accent);background:var(--accent-soft)}.chunk-path{margin-bottom:6px;color:var(--accent);font-size:11px;font-weight:700}.chunk-content{max-height:3.4em;overflow:hidden;color:var(--text);font-size:12.5px;line-height:1.55;white-space:pre-wrap}.chunk-content.is-expanded{max-height:none}.modal-loading{color:var(--muted);font-size:13px}.document-viewer-actions{display:flex;align-items:center;gap:8px}.document-viewer-frame{width:100%;height:min(64dvh,620px);border:1px solid var(--line);border-radius:var(--radius-md);background:#fff}.document-viewer-body{max-height:min(64dvh,620px);overflow-y:auto}.document-viewer-text{color:var(--text);font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.document-full-toggle{margin-left:10px;text-transform:none;letter-spacing:normal;font-weight:600}.markdown-content{color:var(--text);font-size:14px;line-height:1.6}.markdown-content h2{margin:0 0 10px;font-size:16px;line-height:1.25;color:var(--navy)}.markdown-content h3{margin:16px 0 8px;font-size:14px;line-height:1.3;color:var(--navy)}.markdown-content ol,.markdown-content p,.markdown-content ul{margin:0 0 10px}.markdown-content ol,.markdown-content ul{padding-left:20px}.markdown-content li{margin-bottom:5px}.markdown-content hr{border:0;border-top:1px solid var(--line);margin:14px 0}.markdown-content blockquote{margin:0 0 10px;padding-left:12px;border-left:2px solid var(--line-strong);color:var(--muted)}.markdown-content strong{color:var(--text);font-weight:650}.markdown-content code,.status-empty code{padding:2px 5px;border-radius:4px;background:var(--surface-2);border:1px solid var(--line);font-size:.9em}.case-tasks{padding:18px 20px;border-bottom:1px solid var(--line);background:var(--surface)}.rail-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.rail-section-heading h2{margin:0;font-size:14px;font-weight:650;color:var(--navy)}.rail-empty{font-size:12px;line-height:1.6;color:var(--muted);margin:14px 0}.task-storage-note{display:block;font-size:10px;color:var(--muted);margin-top:10px}.task-progress-copy{font-size:11px;color:var(--muted);margin-top:12px}.task-progress{display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;width:100%;height:4px;margin:8px 0 4px;background:var(--line);border-radius:4px;overflow:hidden}.task-progress::-webkit-progress-bar{background:var(--line)}.task-progress::-webkit-progress-value{background:var(--success)}.task-progress::-moz-progress-bar{background:var(--success)}.task-list{list-style:none;padding:0;margin:0;max-height:250px;overflow-y:auto}.task-row{gap:8px;border-bottom:1px solid var(--line);padding:11px 0}.task-row,.task-row label{display:flex;align-items:flex-start}.task-row label{gap:10px;flex:1 1;min-width:0;font-size:13px;line-height:1.5;cursor:pointer}.task-row span{overflow-wrap:anywhere}.task-row input{flex-shrink:0;width:15px;height:15px;margin:2px 0 0;accent-color:var(--accent)}.task-row.is-done span{text-decoration:line-through;color:var(--muted)}.task-delete{border:0;background:none;color:var(--muted);font-size:17px;cursor:pointer;padding:0 3px}.task-delete:hover{color:var(--danger)}.task-form{margin-top:12px;display:grid;grid-gap:8px;gap:8px}.task-form input{min-width:0;width:100%;min-height:var(--control-h-sm);padding:0 10px;border:1px solid var(--line-strong);border-radius:var(--radius-md);font-size:12px;background:var(--surface)}.task-form>div{display:flex;justify-content:space-between;gap:12px}.task-suggestion{border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);padding:14px 16px;margin:4px 0 14px;display:grid;grid-gap:10px;gap:10px}.task-suggestion-loading{display:flex;align-items:center;gap:9px;font-size:12.5px;color:var(--muted)}.task-suggestion-heading{display:flex;flex-direction:column;gap:3px}.task-suggestion-heading h3{margin:0;font-size:13.5px;font-weight:650;color:var(--navy)}.task-suggestion-hint{font-size:11px;line-height:1.5;color:var(--muted)}.task-suggestion-list{list-style:none;padding:0;margin:0;display:grid;grid-gap:7px;gap:7px}.task-suggestion-row{display:flex;align-items:center;gap:9px}.task-suggestion-badge{flex-shrink:0;min-width:52px;text-align:center;font-size:10.5px;font-weight:600;padding:3px 8px;border-radius:999px;border:1px solid var(--line-strong);color:var(--muted);background:var(--surface)}.task-suggestion-badge.is-new{color:var(--accent-strong);border-color:var(--accent-soft);background:var(--accent-soft)}.task-suggestion-badge.is-done{color:var(--success);border-color:#bcdcc9;background:#f2faf5}.task-suggestion-badge.is-pending{color:var(--warning);border-color:#e7d5a4;background:#fdf9ee}.task-suggestion-row input{flex:1 1;min-width:0;min-height:var(--control-h-sm);padding:0 10px;border:1px solid var(--line-strong);border-radius:var(--radius-md);font-size:12px;background:var(--surface)}.task-suggestion-actions{display:flex;justify-content:flex-end;gap:10px}.task-directory-card{border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);overflow:hidden}.task-case-title{display:block;padding:14px 20px;color:var(--navy);font-size:13.5px;font-weight:600;border-bottom:1px solid var(--line)}.task-directory-card .case-tasks{border:0}.task-directory-card .task-list{max-height:none}.case-notes{padding:18px 20px;border-bottom:1px solid var(--line);background:var(--surface)}.case-notes h2{display:flex;align-items:center;gap:10px;margin:0 0 12px;font-size:14px;font-weight:650;color:var(--navy)}.case-notes-form{display:grid;grid-gap:8px;gap:8px}.case-notes-input{width:100%;min-height:56px;padding:8px 10px;border:1px solid var(--line-strong);border-radius:var(--radius-md);font-size:12px;line-height:1.5;background:var(--surface);resize:vertical}.case-notes-add{justify-self:start}.case-notes-list{margin-top:12px;display:grid;grid-gap:8px;gap:8px}.case-notes-empty{font-size:12px;line-height:1.6;color:var(--muted)}.case-note{padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface)}.case-note-content{color:var(--text);font-size:12.5px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.case-note-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:8px}.case-note-date{color:var(--muted);font-size:10.5px}.case-note-delete{border:0;border-radius:4px;background:none;padding:3px 6px;color:var(--muted);font-size:11px;cursor:pointer}.case-note-delete:hover{color:var(--danger);background:#fdf3f4}.case-note-actions{display:flex;align-items:center;gap:2px}.case-note-editing{border-color:var(--line-strong)}.case-note-edit-input{min-height:64px;font-size:12.5px}.case-note-save{border:0;border-radius:4px;background:var(--navy);padding:3px 10px;color:#fff;font-size:11px;cursor:pointer}.case-note-save:disabled{opacity:.5;cursor:default}.case-note-save:not(:disabled):hover{opacity:.9}@media (max-width:1200px){.app-sidebar{width:248px}.app-main{margin-left:248px}.workspace-grid{grid-template-columns:minmax(0,1fr) 310px}.conversation-panel{padding:18px 20px}.dashboard-shortcuts,.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:980px){.library-grid,.workspace-grid{grid-template-columns:1fr}.workspace-frame{height:auto;min-height:100dvh}.conversation-panel{min-height:65dvh}.workspace-rail{border-left:0;border-top:1px solid var(--line);overflow:visible}.workspace-controls{flex-wrap:wrap}.scope-combobox{width:210px;min-width:150px}.scope-trigger{padding:5px 9px;gap:8px}.scope-caret,.scope-label{display:none}.legal-date-control{white-space:nowrap}.workspace-links{display:none}}@media (max-width:640px){.app-sidebar{transform:translateX(-100%);transition:transform .2s;padding-top:64px;width:272px;box-shadow:var(--shadow-lg)}.app-sidebar.is-open{transform:translateX(0)}.app-main{margin-left:0;padding-top:48px}.mobile-menu{display:inline-flex;position:fixed;top:10px;left:14px;z-index:50}.settings-frame,.status-frame{padding:16px 14px 24px}.directory-card,.directory-header{flex-direction:column;align-items:flex-start}.dashboard-shortcuts{grid-template-columns:1fr}.workspace-header{padding:6px 10px}.workspace-controls{flex-wrap:wrap;margin-left:0;width:100%;gap:8px}.scope-combobox{min-width:0;width:100%;flex-basis:100%}.conversation-panel{padding:14px}.empty-conversation{padding:20px 0}.composer-status{max-width:190px;line-height:1.5}.auth-card{padding:26px}.auth-card h1{font-size:19px}}.proc-toolbar{gap:12px;align-items:center;justify-content:space-between;margin:14px 0 18px}.proc-tabs,.proc-toolbar{display:flex;flex-wrap:wrap}.proc-tabs{gap:6px}.proc-tab{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--muted);padding:7px 14px;font-size:12px;font-weight:600;cursor:pointer}.proc-tab.is-active,.proc-tab:hover{border-color:var(--accent);color:var(--navy)}.proc-tab.is-active{background:var(--accent-soft,rgba(11,92,255,.08))}.proc-tab-count{border-radius:999px;background:var(--surface-2);color:var(--muted);padding:1px 7px;font-size:10px}.proc-toolbar-actions{display:flex;gap:8px;align-items:center}.proc-search{border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:8px 12px;font-size:12px;color:var(--navy);min-width:220px}.proc-search:focus{outline:none;border-color:var(--accent)}.proc-empty{color:var(--muted);font-size:13px;line-height:1.6;padding:12px 0}.procedure-card{cursor:pointer;display:flex;flex-direction:column;gap:8px}.procedure-card h2{font-size:14px;margin:0;color:var(--navy);line-height:1.45}.proc-card-badges{display:flex;gap:6px;align-items:center;justify-content:space-between}.proc-availability{font-size:10px;font-weight:600;color:var(--muted)}.proc-availability.is-full{color:var(--tone-current)}.proc-card-summary{margin:0;color:var(--muted);font-size:12px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.proc-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}.proc-card-council{color:var(--muted);font-size:11px}.proc-card-actions{display:flex;gap:10px}.proc-danger{color:#b3383f}.proc-editor-modal .modal-content{max-width:640px}.proc-form{gap:14px}.proc-field,.proc-form{display:flex;flex-direction:column}.proc-field{gap:6px}.proc-field input,.proc-field textarea{border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:9px 12px;font-size:13px;color:var(--navy);font-family:inherit;line-height:1.55}.proc-field textarea{resize:vertical;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.proc-field input:focus,.proc-field textarea:focus{outline:none;border-color:var(--accent)}.run-diagnostics{margin:8px 0 16px;font-size:12px;color:var(--text-muted)}.run-diagnostics summary{cursor:pointer;overflow-wrap:anywhere}.run-diagnostics .phase-chip{margin-bottom:8px}.run-event-payload{white-space:pre-wrap;overflow-wrap:anywhere;max-height:360px;overflow-y:auto}