@layer pages {
.legal-workspace{min-width:0;max-width:100%}
.legal-workspace .legal-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.legal-workspace .legal-summary>div{min-width:0;padding:15px 16px;border:1px solid var(--line);border-radius:4px;background:var(--surface);display:flex;flex-direction:column;gap:5px}
.legal-workspace .legal-summary strong{font-size:22px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.legal-workspace .legal-summary span{font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.legal-workspace .legal-status-note{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px 12px;font-size:11px;line-height:1.8;color:var(--muted);margin:10px 0 18px}
.legal-workspace .legal-status-note p{flex:1;min-width:180px}
.legal-workspace .legal-tabs{flex-wrap:wrap;overflow:visible;gap:10px 20px}
.legal-workspace .legal-tabs>button{white-space:normal;text-align:left}
.legal-workspace .legal-filters{display:grid;grid-template-columns:minmax(130px,2fr) minmax(130px,2fr) minmax(95px,1fr) auto;gap:12px;align-items:end;margin-bottom:18px;min-width:0}
.legal-workspace .legal-filters label{min-width:0}
.legal-workspace .legal-filters select{width:100%;min-width:0}
.legal-workspace .legal-filter-actions,.legal-workspace .legal-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.legal-workspace .legal-source-filters{grid-template-columns:minmax(130px,2fr) minmax(110px,1fr) auto}
.legal-workspace .legal-precedent-filters{grid-template-columns:repeat(4,minmax(100px,1fr))}
.legal-workspace .legal-precedent-filters .legal-filter-actions{grid-column:1/-1}
.legal-workspace .legal-team-filters{grid-template-columns:minmax(140px,340px) auto;justify-content:start}
.legal-workspace .legal-sources{border:1px solid var(--line);border-radius:4px;margin:0 0 20px;min-width:0}
.legal-workspace .legal-sources>summary{padding:12px 14px;font-size:12px;cursor:pointer;overflow-wrap:anywhere}
.legal-workspace .legal-sources>div{padding:0 14px 14px}
.legal-workspace .legal-source-list,.legal-workspace .legal-result-list,.legal-workspace .legal-evidence{list-style:none;margin:0;padding:0;min-width:0}
.legal-workspace .legal-source-list>li{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:12px 0;border-top:1px solid var(--line);font-size:12px;overflow-wrap:anywhere}
.legal-workspace .legal-source-list>li>div:first-child{flex:1;min-width:140px}
.legal-workspace .legal-source-list small{display:block;margin-top:5px;color:var(--muted);font-size:10px}
.legal-workspace .legal-reading-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-items:start;min-width:0}
.legal-workspace .legal-reading-layout.has-selection{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.legal-workspace .legal-results,.legal-workspace .legal-detail{min-width:0;max-width:100%}
.legal-workspace .legal-result-count{font-size:11px;color:var(--muted);margin-bottom:10px}
.legal-workspace .legal-result-list>li{padding:15px 0;border-top:1px solid var(--line);min-width:0;font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.legal-workspace .legal-result-list>li.legal-selected{background:var(--bg)}
.legal-workspace .legal-result-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:7px;min-width:0}
.legal-workspace .legal-result-title .btn{min-height:34px;max-width:100%;font-size:12px;text-align:left;white-space:normal;overflow-wrap:anywhere}
.legal-workspace .legal-result-meta{font-size:11px;color:var(--muted);margin:6px 0;overflow-wrap:anywhere}
.legal-workspace .legal-pagination{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin-top:15px}
.legal-workspace .legal-pagination>div{display:flex;gap:8px;flex-wrap:wrap}
.legal-workspace .legal-detail{border:1px solid var(--line);border-radius:4px;padding:15px;background:var(--surface)}
.legal-workspace .legal-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px;min-width:0}
.legal-workspace .legal-detail h3{font-size:13px;line-height:1.8;overflow-wrap:anywhere;min-width:0;flex:1}
.legal-workspace .legal-detail h4{font-size:12px;line-height:1.8;margin:12px 0;overflow-wrap:anywhere}
.legal-workspace .legal-document-text{font:inherit;font-size:12px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0;max-width:100%;max-height:65vh;overflow:auto;border:1px solid var(--line);border-radius:4px;background:var(--bg);padding:14px;margin:12px 0}
.legal-workspace .legal-badges{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.legal-workspace .badge{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.legal-workspace .legal-source-link{display:inline-block;color:var(--accent);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere;font-size:11px;line-height:1.8}
.legal-workspace .legal-state{padding:16px 0;font-size:12px;color:var(--muted);line-height:1.8;overflow-wrap:anywhere}
.legal-workspace .legal-error{padding-bottom:12px}
.legal-workspace .legal-error .form-error{margin-top:0}
.legal-workspace .legal-research-status{border:1px solid var(--line);border-radius:4px;padding:14px;background:var(--bg);font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.legal-workspace .legal-research-status p{margin-top:5px;color:var(--muted)}
.legal-workspace .legal-team-section{margin-top:22px;min-width:0;font-size:12px;line-height:1.8}
.legal-workspace .legal-team-section h3{font-size:13px;margin-bottom:10px}
.legal-workspace .legal-team-section>ul:not(.legal-evidence){padding-left:20px}
.legal-workspace .legal-team-section li{margin:8px 0;overflow-wrap:anywhere}
.legal-workspace .legal-team-catalogue{display:grid;gap:8px;min-width:0;max-width:100%}
.legal-workspace .legal-team-entry{border:1px solid var(--line);border-radius:4px;padding:10px 12px;min-width:0;max-width:100%;overflow-wrap:anywhere}
.legal-workspace .legal-team-entry>summary{cursor:pointer;font-weight:600;overflow-wrap:anywhere;min-width:0}
.legal-workspace .legal-team-entry p,.legal-workspace .legal-team-entry h4{margin-top:10px;overflow-wrap:anywhere}
.legal-workspace .legal-team-entry ul{padding-left:20px;min-width:0}
.legal-workspace .legal-method-publication{padding:8px 0 12px;border-bottom:1px solid var(--line);min-width:0;overflow-wrap:anywhere}
.legal-workspace .legal-evidence>li{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--line)}
.legal-workspace .legal-evidence .btn{white-space:normal;text-align:left;max-width:100%;overflow-wrap:anywhere}
.legal-workspace .legal-draft{margin-top:20px;padding-top:12px;border-top:1px solid var(--line)}
.legal-workspace button:focus-visible,.legal-workspace summary:focus-visible,.legal-workspace a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.legal-workspace .btn{max-width:100%;white-space:normal;overflow-wrap:anywhere;border-radius:4px}
.legal-workspace .legal-consultation{min-width:0;max-width:100%;font-size:12px;line-height:1.85}
.legal-workspace .legal-consultation-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:13px;margin-bottom:22px}
.legal-workspace .legal-consultation-heading>p{color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.legal-workspace .legal-consultation-welcome{max-width:850px;margin:10px 0 26px}
.legal-workspace .legal-consultation-welcome h2{font-size:19px;line-height:1.6;margin-bottom:10px}
.legal-workspace .legal-consultation-welcome>p{color:var(--muted);font-size:13px;line-height:2}
.legal-workspace .legal-consultation-method{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:22px;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:var(--muted);font-size:11px}
.legal-workspace .legal-consultation-method>span{overflow-wrap:anywhere;min-width:0}
.legal-workspace .legal-consultation-composer{border:1px solid var(--line);border-radius:4px;padding:18px;margin-top:24px;background:var(--bg);min-width:0}
.legal-workspace .legal-consultation-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:18px}
.legal-workspace .legal-consultation-options label,.legal-workspace .legal-consultation-message,.legal-workspace .legal-consultation-upload label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:11px}
.legal-workspace .legal-consultation-options select,.legal-workspace .legal-consultation-message textarea{width:100%;max-width:100%;min-width:0;border-radius:4px}
.legal-workspace .legal-consultation-message textarea{height:auto;resize:vertical;min-height:135px;line-height:1.9;padding:12px;font:inherit;font-size:13px}
.legal-workspace .legal-consultation-upload{display:flex;gap:14px;align-items:end;flex-wrap:wrap;margin-top:16px;min-width:0}
.legal-workspace .legal-consultation-upload label{flex:1;min-width:0;max-width:100%}
.legal-workspace .legal-consultation-upload input{max-width:100%;min-width:0;width:100%;font-size:11px;overflow:hidden}
.legal-workspace .legal-consultation-upload input::file-selector-button{font:inherit;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:4px;padding:8px 10px;margin-right:10px;cursor:pointer}
.legal-workspace .legal-consultation-upload p{color:var(--muted);font-size:10px;overflow-wrap:anywhere}
.legal-workspace .legal-consultation-files{list-style:none;padding:0;margin:12px 0;display:grid;gap:6px;min-width:0}
.legal-workspace .legal-consultation-files li{display:flex;align-items:start;gap:10px;justify-content:space-between;padding:8px 10px;border:1px solid var(--line);border-radius:4px;background:var(--surface);min-width:0}
.legal-workspace .legal-consultation-files span{min-width:0;overflow-wrap:anywhere}
.legal-workspace .legal-consultation-files small{flex-shrink:0;color:var(--muted);font-variant-numeric:tabular-nums}
.legal-workspace .legal-consultation-submit{display:flex;gap:12px 18px;align-items:center;flex-wrap:wrap;margin-top:20px}
.legal-workspace .legal-consultation-submit>span{font-size:10px;color:var(--muted);overflow-wrap:anywhere;flex:1;min-width:160px}
.legal-workspace .legal-conversation{display:grid;gap:12px;min-width:0;margin-bottom:24px}
.legal-workspace .legal-conversation-message{border:1px solid var(--line);border-radius:4px;padding:14px 16px;min-width:0;max-width:100%}
.legal-workspace .legal-conversation-user{background:var(--bg);margin-left:32px}
.legal-workspace .legal-conversation-assistant{margin-right:32px}
.legal-workspace .legal-conversation-message>strong{font-size:10px;color:var(--muted)}
.legal-workspace .legal-conversation-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:5px;max-height:250px;overflow:auto}
.legal-workspace .legal-conversation-message summary{font-size:11px;color:var(--muted);cursor:pointer;margin-top:5px}
.legal-workspace .legal-consultation-progress{border:1px solid var(--line);border-radius:4px;padding:16px;margin:20px 0;background:var(--bg)}
.legal-workspace .legal-consultation-progress p{color:var(--muted);margin:5px 0 12px}
.legal-workspace .legal-dossier{min-width:0;max-width:100%;margin-top:20px}
.legal-workspace .legal-consultation-section{padding:20px 0;border-top:1px solid var(--line);min-width:0;overflow-wrap:anywhere}
.legal-workspace .legal-consultation-section h3{font-size:14px;line-height:1.7;margin-bottom:12px}
.legal-workspace .legal-consultation-section h4{font-size:12px;line-height:1.8;margin-bottom:8px}
.legal-workspace .legal-dossier-subsection{min-width:0;margin:18px 0;overflow-wrap:anywhere}
.legal-workspace .legal-dossier-subsection>h4{font-size:13px;line-height:1.7;margin-bottom:10px}
.legal-workspace .legal-draft-part h5,.legal-workspace .legal-strategy h5,.legal-workspace .legal-dossier-subsection>h5{font-size:12px;line-height:1.8;margin:0 0 8px}
.legal-workspace .legal-risk-matrix{min-width:0;max-width:100%}
.legal-workspace .legal-risk-matrix table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px}
.legal-workspace .legal-risk-matrix caption{text-align:left;font-size:12px;margin-bottom:10px;color:var(--muted)}
.legal-workspace .legal-risk-matrix th,.legal-workspace .legal-risk-matrix td{padding:12px;border:1px solid var(--line);text-align:left;vertical-align:top;overflow-wrap:anywhere;word-break:break-word}
.legal-workspace .legal-risk-matrix th:first-child{width:23%}
.legal-workspace .legal-risk-matrix .badge{white-space:normal;max-width:100%}
.legal-workspace .legal-risk-matrix dl{margin:0}
.legal-workspace .legal-risk-matrix dt{font-size:10px;color:var(--muted);margin-top:8px}
.legal-workspace .legal-risk-matrix dd{margin:3px 0 0}
.legal-workspace .legal-consultation-summary{font-size:13px;line-height:2;white-space:pre-wrap}
.legal-workspace .legal-consultation-priority{border:1px solid var(--line);border-radius:4px;padding:16px;background:var(--bg);margin-bottom:10px}
.legal-workspace .legal-consultation-questions,.legal-workspace .legal-consultation-steps{padding-left:22px;margin:10px 0 0}
.legal-workspace .legal-consultation-questions li,.legal-workspace .legal-consultation-steps li{padding-left:3px;margin:12px 0;overflow-wrap:anywhere}
.legal-workspace .legal-consultation-questions li p,.legal-workspace .legal-consultation-steps li p{color:var(--muted);margin-top:4px}
.legal-workspace .legal-consultation-list{list-style:none;padding:0;margin:0;min-width:0}
.legal-workspace .legal-consultation-list>li{padding:12px 0;border-bottom:1px solid var(--line);min-width:0;overflow-wrap:anywhere}
.legal-workspace .legal-consultation-list>li:last-child{border-bottom:0;padding-bottom:0}
.legal-workspace .legal-consultation-list time{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.legal-workspace .legal-consultation-section blockquote{margin:10px 0 0;padding:8px 12px;border-left:2px solid var(--line);font-size:11px;line-height:1.9;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}
.legal-workspace .legal-consultation-citation{margin-top:10px;font-size:11px;min-width:0}
.legal-workspace .legal-consultation-citation summary{cursor:pointer;color:var(--accent);padding:4px 0}
.legal-workspace .legal-consultation-citation .btn{margin-top:7px;font-size:11px;text-align:left}
.legal-workspace .legal-strategy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.legal-workspace .legal-strategy{border:1px solid var(--line);border-radius:4px;padding:15px;min-width:0;overflow-wrap:anywhere;background:var(--surface)}
.legal-workspace .legal-strategy dl{margin:0}
.legal-workspace .legal-strategy dt{font-size:10px;color:var(--muted);margin-top:12px}
.legal-workspace .legal-strategy dd{margin:3px 0 0;font-size:12px}
.legal-workspace .legal-consultation-review{font-size:10px;color:var(--muted);line-height:1.9;padding:12px 0;overflow-wrap:anywhere}
.legal-workspace .legal-consultation-scope-note{margin-top:12px}
.legal-workspace .legal-consultation-limitations{border-top:1px solid var(--line);padding:14px 0;font-size:11px;overflow-wrap:anywhere}
.legal-workspace .legal-consultation-limitations>summary{cursor:pointer;font-weight:600}
.legal-workspace .legal-consultation :disabled{cursor:not-allowed;opacity:.65}
}
@layer responsive {
@media(max-width:600px){.legal-workspace .legal-risk-matrix caption{display:block;width:100%;box-sizing:border-box}}
@media(max-width:1100px){.legal-workspace .legal-reading-layout.has-selection{grid-template-columns:minmax(0,1fr)}.legal-workspace .legal-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.legal-workspace .legal-filter-actions{grid-column:1/-1}.legal-workspace .legal-team-filters{grid-template-columns:minmax(140px,340px) auto}.legal-workspace .legal-team-filters .legal-filter-actions{grid-column:auto}}
@media(max-width:600px){.legal-workspace .legal-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.legal-workspace .legal-summary>div{padding:12px}.legal-workspace .legal-summary strong{font-size:18px}.legal-workspace .legal-filters{grid-template-columns:minmax(0,1fr);gap:11px}.legal-workspace .legal-filter-actions,.legal-workspace .legal-team-filters .legal-filter-actions{grid-column:1}.legal-workspace .legal-tabs{gap:0 16px}.legal-workspace .legal-detail{padding:12px}.legal-workspace .legal-detail-heading h3{flex-basis:100%}.legal-workspace .legal-document-text{padding:11px}.legal-workspace .legal-sources>div{padding:0 11px 11px}.legal-workspace .legal-source-list>li>div:first-child{min-width:0;flex-basis:100%}}
@media(max-width:600px){.legal-workspace .legal-consultation-options,.legal-workspace .legal-strategy-grid{grid-template-columns:minmax(0,1fr)}.legal-workspace .legal-consultation-method{grid-template-columns:minmax(0,1fr);gap:6px}.legal-workspace .legal-consultation-composer{padding:12px}.legal-workspace .legal-conversation-user{margin-left:12px}.legal-workspace .legal-conversation-assistant{margin-right:12px}.legal-workspace .legal-conversation-message{padding:12px}.legal-workspace .legal-consultation-welcome h2{font-size:17px}.legal-workspace .legal-consultation-submit>span{min-width:0;flex-basis:100%}.legal-workspace .legal-consultation-priority{padding:12px}.legal-workspace .legal-strategy{padding:12px}}
@media(max-width:600px){.legal-workspace .legal-risk-matrix table,.legal-workspace .legal-risk-matrix tbody,.legal-workspace .legal-risk-matrix tr,.legal-workspace .legal-risk-matrix td{display:block;width:100%;box-sizing:border-box}.legal-workspace .legal-risk-matrix thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.legal-workspace .legal-risk-matrix tr{margin-bottom:12px}.legal-workspace .legal-risk-matrix td+td{border-top:0}.legal-workspace .legal-risk-matrix td::before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:6px}}
}
