/* Additions use the approved Manrope / DM Sans, neutral surfaces and existing button tokens. */
.legal-context{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:16px 0 24px;border-bottom:1px solid var(--border-default,#e7e9ee);margin-bottom:24px;flex-wrap:wrap}
.legal-context>.field{flex:1 1 300px;max-width:560px;margin:0}.legal-context-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;max-width:100%;font-size:12px}.legal-context-meta>span:first-child{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.legal-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0}.legal-actions .btn{margin:0!important}.legal-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,1fr);gap:24px;align-items:start;margin:24px 0}.legal-grid>.panel{margin:0!important;min-width:0}
.legal-grid form>.field,.legal-grid form>label,.legal-details .field,.legal-details label{margin-bottom:16px}.legal-grid input:not([type=checkbox]),.legal-grid select{min-height:44px}.legal-grid textarea{min-height:100px;resize:vertical}.legal-grid input,.legal-grid select,.legal-grid textarea{max-width:100%;box-sizing:border-box}
.legal-note{font-size:12px;line-height:1.7;color:#657080;background:#f7f8fa;border-radius:10px;padding:12px 14px;margin:14px 0}.legal-details{border:1px solid #e7e9ee;border-radius:12px;background:white;margin:16px 0;overflow:hidden}.legal-details>summary{padding:16px 18px;font-size:14px;font-weight:650;cursor:pointer}.legal-details>div{padding:0 18px 16px}.legal-details>div>p{line-height:1.7}.legal-details pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto;font-size:12px}.legal-details>summary:focus-visible{outline:2px solid var(--brand-primary);outline-offset:-3px}
.legal-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:22px 0}.legal-summary>div{padding:18px;background:#f7f8fa;border-radius:12px;min-width:0}.legal-summary small{display:block;color:#6b7280;font-size:12px;margin-bottom:8px}.legal-summary strong{font-size:15px;line-height:1.5;display:block;overflow-wrap:anywhere}
.legal-filters{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap;margin:0 0 22px}.legal-filters .field{flex:1 1 230px;margin:0}.legal-filters input,.legal-filters select,.legal-filters>.btn{min-height:44px}.legal-register{max-height:740px;overflow:auto}.legal-register>article,.legal-check-list>article,.legal-objection{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 0;border-bottom:1px solid #e7e9ee}.legal-register>article:first-child{padding-top:4px}.legal-register>article:last-child,.legal-check-list>article:last-child,.legal-objection:last-child{border-bottom:0}.legal-register h3,.legal-clock h3,.legal-objection h3{font-size:15px;margin:5px 0}.legal-register p,.legal-clock p{margin:5px 0;font-size:13px;line-height:1.6;color:#626d7d}.legal-register small,.legal-check-list small,.legal-clock small{display:block;color:#707887;font-size:12px;line-height:1.6}.legal-register>article>div:last-child,.legal-objection>div:last-child{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;flex:0 0 200px}.legal-register>article>div:first-child,.legal-objection>div:first-child{min-width:0}
.legal-check-list>article{padding:16px 0;font-size:13px;align-items:flex-start}.legal-check-list>article>div{flex:1;min-width:0}.legal-check-list .tag{max-width:120px;white-space:normal;text-align:center}.legal-check-list small{margin-top:6px;overflow-wrap:anywhere}
.legal-kicker{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#687385;font-weight:650}.legal-hash{display:block;overflow-wrap:anywhere;white-space:normal;font-size:11px;line-height:1.6;background:#f7f8fa;padding:8px 10px;border-radius:8px;margin:8px 0}
.legal-clock{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;background:#fafafb;border:1px solid #e7e9ee;border-radius:12px;margin:12px 0}.legal-clock.urgent{border-left:3px solid #b65555}.legal-clock.soon{border-left:3px solid #b78e38}.legal-clock.done{opacity:.75}.legal-clock>div:last-child{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.legal-steps{list-style:none;display:flex;flex-wrap:wrap;gap:10px;padding:0;margin:24px 0;counter-reset:step}.legal-steps li{counter-increment:step;padding:12px 14px;background:#f5f6f8;border-radius:10px;font-size:12px}.legal-steps li::before{content:counter(step);display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:white;margin-right:8px;color:#516080}
.legal-objection{align-items:flex-start}.legal-objection .tag{margin-right:8px;margin-bottom:8px}.legal-objection blockquote{margin:14px 0;padding:12px;border-left:3px solid #b7c7df;background:#f7f9fc;font-size:13px;white-space:pre-wrap}.legal-objection p{font-size:13px;line-height:1.7}.legal-rule{padding:14px 0;border-bottom:1px solid #e7e9ee}.legal-rule h3{font-size:15px}.legal-calculation{margin-top:24px;padding:18px;background:#f7f9fc;border:1px solid #e4e9f0;border-radius:12px}.legal-calculation pre{white-space:pre-wrap;font-size:12px}.legal-wave{padding:12px 0;border-bottom:1px solid #e7e9ee}.legal-wave h3{font-size:15px}.legal-language-coverage{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.legal-language-coverage>p{padding:12px;background:#f7f8fa;border-radius:10px;margin:0;font-size:12px}.legal-language-coverage span,.legal-language-coverage small{display:block;margin-top:7px;line-height:1.6}.legal-language-coverage small{color:#687385}
.legal-header-context{display:flex;align-items:center;gap:7px;border:1px solid #e7e9ee;background:#fafafb;border-radius:9px;padding:7px 10px;font:inherit;font-size:11px;max-width:260px;min-height:34px;color:#647084;cursor:pointer}.legal-header-context span{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legal-header-context small{font-size:10px;color:#7b828e}.legal-header-context .icon{width:15px;height:15px;flex-shrink:0}
.legal-home-entry{padding:24px 0;margin:0 0 32px;border-bottom:1px solid #e7e9ee}.legal-home-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.legal-home-heading h2{font-size:17px;margin:0}.legal-home-entry .legal-actions{margin-bottom:0}.legal-home-dates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px}.legal-home-date{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:14px;padding:15px;border:1px solid #e7e9ee;background:#fafafb;border-radius:12px;color:#414b5b;font:inherit;font-size:12px;cursor:pointer}.legal-home-date small{display:block;margin-top:6px;color:#77818e;font-size:10px}.legal-home-date strong{white-space:nowrap;font-size:11px}.legal-home-date.urgent{border-left:3px solid #b65555}.legal-home-date.soon{border-left:3px solid #b78e38}
.legal-paper-library{margin:24px 0 30px}.legal-paper-grid,.legal-template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.legal-paper-grid article,.legal-template-grid article{border:1px solid #e7e9ee;border-radius:12px;padding:18px;background:#fff;min-width:0}.legal-paper-grid h3,.legal-template-grid h3{font-size:14px;margin:9px 0;overflow-wrap:anywhere}.legal-paper-grid p,.legal-template-grid p{font-size:12px;color:#707887}.legal-paper-grid .btn{font-size:11px;padding:8px 11px}.legal-template-library{margin:36px 0 0}.legal-template-library>.field{max-width:660px}.legal-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.legal-template-library .legal-details>div{padding-top:8px}
.legal-pdf{display:block;width:100%;height:610px;max-height:72vh;border:1px solid #e7e9ee;border-radius:10px;background:#f1f2f5}.document-page:has(>.legal-pdf){padding:12px;background:#f6f7f9;min-height:0;overflow:visible}.legal-original-image{max-width:100%;max-height:65vh;object-fit:contain}.legal-source-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid #e7e9ee;font-size:13px}.legal-source-row span{overflow-wrap:anywhere;min-width:0}.legal-process{padding-left:20px;line-height:1.8;font-size:13px}.legal-process li{margin-bottom:12px}.legal-export-status{font-size:13px;line-height:1.6;margin-top:14px;overflow-wrap:anywhere}.legal-draft-workflows,.legal-tools-entry{margin:0 0 24px;padding:16px;border:1px solid #e7e9ee;border-radius:12px;background:#fafafb}.legal-draft-workflows h3{font-size:14px;margin:0}.editor-right .legal-draft-workflows{margin-top:24px;padding:12px}.editor-right .legal-draft-workflows .btn{width:100%;justify-content:flex-start}.legal-matter-health{margin-top:24px}
[data-legal-menu]{border-top:1px solid #e7e9ee;margin-top:14px;padding-top:10px}.clarity-more{max-height:calc(100dvh - 130px);overflow-y:auto}.legal-actions>button,.legal-actions>a{min-height:38px}body.clarity-workspace .legal-details label:has(input[type=checkbox]),.legal-grid label:has(input[type=checkbox]){line-height:1.7}
[hidden]{display:none!important}
@media(max-width:1100px){.legal-grid{grid-template-columns:minmax(0,1fr)}.legal-paper-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.legal-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.legal-home-dates{grid-template-columns:minmax(0,1fr)}.legal-header-context{max-width:160px}.legal-header-context span{max-width:85px}.legal-language-coverage{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.legal-context{padding-top:6px;gap:12px}.legal-context-meta{font-size:11px;gap:8px}.legal-context-meta>span:first-child{max-width:220px}.legal-register>article,.legal-clock,.legal-objection{flex-direction:column;align-items:stretch;gap:12px}.legal-register>article>div:last-child,.legal-objection>div:last-child{flex:initial;justify-content:flex-start}.legal-clock>div:last-child{justify-content:flex-start}.legal-check-list>article{flex-wrap:wrap;gap:10px}.legal-check-list>article>div{flex-basis:100%}.legal-summary{gap:10px}.legal-summary>div{padding:12px}.legal-summary strong{font-size:13px}.legal-paper-grid,.legal-template-grid,.legal-language-coverage{grid-template-columns:minmax(0,1fr)}.legal-filters .field{flex-basis:100%}.legal-header-context{max-width:105px;padding:6px}.legal-header-context span{max-width:55px}.legal-header-context small{display:none}.legal-home-heading{align-items:flex-start}.legal-home-heading h2{font-size:15px}.legal-pdf{height:460px;max-height:64vh}.legal-steps{gap:8px}.legal-steps li{font-size:11px;padding:9px}.legal-home-date strong{white-space:normal}.legal-grid{gap:18px}.legal-actions .btn{max-width:100%;white-space:normal;text-align:center}}
/* The original-file viewer keeps its actions visible beside a comfortable PDF canvas. */
body.clarity-workspace .dialog:has(.legal-pdf){width:min(1050px,calc(100vw - 40px));max-width:1050px}
body.clarity-workspace .dialog .legal-pdf{height:clamp(220px,calc(100dvh - 330px),650px);max-height:none}
body.clarity-workspace .dialog:has(.legal-pdf) .legal-note{margin-bottom:0}
