#firm-view .section-intro{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 22px;align-items:end;padding:5px 0 22px;border-bottom:1px solid var(--line);margin-bottom:22px}
#firm-view .section-intro h1{font-size:clamp(2rem,3.3vw,3.1rem);grid-column:1;line-height:1.12;color:var(--ink)}
#firm-view .section-intro>p{margin:0;grid-column:1;max-width:65ch}
#firm-view .section-intro>.actions{grid-column:2;grid-row:1 / span 2;align-self:center;margin:0}
#firm-view .board,#firm-view .panel{border-radius:10px;box-shadow:0 2px 5px #122c4905}
.crm-case-search{display:flex;align-items:end;gap:8px;margin:0 0 20px}.crm-case-search label{max-width:32rem;flex:1}
.crm-case-row{display:grid;grid-template-columns:42px minmax(0,1fr) minmax(90px,auto) auto;align-items:center;gap:14px;border-bottom:1px solid var(--line);padding:16px 0}
.crm-case-row:first-child{padding-top:2px}.crm-case-row:last-child{border:0}.crm-case-file{border:1px solid #cfdff0;background:#edf4fc;color:#244f80;border-radius:9px;width:40px;height:40px;display:grid;place-items:center}
.crm-case-row h3 a,.crm-task h3 a,.team-row strong a{color:var(--ink);text-decoration:none;font-weight:670}.crm-case-row h3 a:hover,.team-row strong a:hover,.crm-task h3 a:hover{text-decoration:underline;color:var(--blue)}
.crm-case-row p,.crm-task p{margin:4px 0 0;font-size:.88rem;color:var(--muted)}
.crm-case-due,.crm-work-count,.crm-task-meta,.crm-task-actions{font-size:.88rem}
.crm-work-count,.crm-status{padding:4px 9px;border-radius:5px;background:#edf3f8;color:#39516b;font-weight:620}
.crm-filters{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px}
#firm-main .crm-filters button{min-height:38px;border-radius:22px;font-size:.89rem;padding:6px 13px;border:1px solid #ccd9e5;color:#3c5167}
#firm-main .crm-filters button[aria-pressed=true]{background:#143650;border-color:#143650;color:white}
.crm-task{display:grid;grid-template-columns:minmax(0,1fr) minmax(125px,.44fr) minmax(85px,auto);gap:12px;align-items:center;padding:16px 0;border-bottom:1px solid var(--line)}
.crm-task:first-child{padding-top:2px}.crm-task:last-child{border:0}
.crm-task .crm-task-kind{font-size:.78rem;font-weight:600;letter-spacing:.025em;color:#46647e;margin:0 0 4px}
.crm-task-meta,.crm-task-actions{display:grid;gap:4px;justify-items:start;color:var(--muted)}
.crm-task-actions details{position:relative}.crm-task-actions summary{font-size:.86rem}.crm-task-actions details[open]{padding:5px 0}.crm-task-actions .btn{margin:4px 0;display:block}.crm-task-meta .crm-status{display:inline-flex;font-size:.78rem}
.crm-status.attention{color:#784006;background:#fff0d8}.crm-status.done{color:#205b52;background:#e3f3ec}
#firm-view .team-row strong a{display:inline-block;padding:5px 0}
@media(max-width:760px){#firm-view .section-intro{grid-template-columns:1fr;align-items:start}#firm-view .section-intro>.actions{grid-column:1;grid-row:auto;justify-self:start;margin-top:6px}.crm-case-row{grid-template-columns:34px minmax(0,1fr) auto;gap:9px}.crm-case-file{width:32px;height:36px}.crm-case-due{grid-column:2}.crm-case-row .crm-work-count{grid-column:3;grid-row:1}.crm-task{grid-template-columns:minmax(0,1fr) auto}.crm-task-actions{grid-column:1 / -1;display:flex;gap:14px;align-items:start}.crm-task-actions details[open]{padding-top:0}}
@media(max-width:420px){.crm-task{grid-template-columns:1fr}.crm-task-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.crm-task-actions{grid-column:1}.crm-case-row{grid-template-columns:minmax(0,1fr) auto}.crm-case-file{display:none}.crm-case-row .crm-work-count{grid-column:2}.crm-case-due{grid-column:1 / -1}}
.crm-client-picker{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.crm-client-picker form{margin:10px 0}.crm-client-match{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding:7px 0}

.record-shelf{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(265px,100%),1fr));gap:14px}
.source-file{display:flex;flex-direction:column;min-width:0;padding:17px 18px 12px;background:white;border:1px solid #d6e0e9;border-radius:10px}
.source-provenance{display:flex;align-items:center;gap:8px;color:#31577a;font-size:.85rem;font-weight:650;overflow-wrap:anywhere}
.source-file-title{font-weight:650;margin:12px 0 22px;font-size:1.12rem;line-height:1.35;overflow-wrap:anywhere}
.source-file-title a{color:#17354e;text-decoration:none}.source-file-title a:hover{text-decoration:underline;color:#0757ac}
.source-details summary{cursor:pointer}.source-details p{margin:6px 0 0;font-size:.875rem;font-weight:400;color:#496379}
.source-file-foot{display:flex;flex-wrap:wrap;gap:2px 14px;align-items:baseline;justify-content:space-between;margin-top:auto;padding-top:9px;border-top:1px solid #e2e9ef;color:#496379;font-size:.875rem}
.source-file-foot details[open]{width:100%}.source-file-foot summary{cursor:pointer;font-weight:620;color:#205581}
.source-file-foot form{display:grid;gap:7px;margin-top:8px}.source-file-foot form button{justify-self:start}
#firm-view .crm-task{position:relative;border-bottom:1px solid #e2e8ef}
#firm-view .crm-task h3 a{color:#1a3854}
#firm-view .crm-task-meta>span:last-child{font-weight:560;color:#284860}
