/* Civic precision. 12-column canvas: 8 conversation + 4 case; 16px gutter.
   At 1440px: 220px sidebar + 2*32px canvas margins + 1156px work area.
   Columns share the same edges on every route. Preparation is never official status. */
@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:400 600;font-display:swap;src:url('assets/fonts/instrument-sans.ttf') format('truetype')}
@font-face{font-family:'Noto Sans Arabic';font-style:normal;font-weight:400 600;font-display:swap;src:url('assets/fonts/noto-sans-arabic.ttf') format('truetype')}
:root{--ground:#f7faf8;--surface:#fff;--raised:#edf5f0;--active:#e9f1ed;--text:#18332d;--muted:#596b63;--faint:#626f67;--accent:#164b45;--accent-hover:#103d37;--line:#d4e0d8;--rule:#e4ebe6;--control:#aabdb0;--brass:#927a50;--positive:#326e58;--negative:#a03838;--radius:8px;--radius-control:6px;--sidebar:220px;--gap:24px;--pad:32px;--type-small:.75rem;--type-body:.875rem;--type-section:1rem;--type-subtitle:1.25rem;--type-title:1.75rem;--font:'Instrument Sans',Arial,sans-serif;--font-ar:'Noto Sans Arabic','Instrument Sans',Arial,sans-serif;--ease:cubic-bezier(.16,1,.3,1);color-scheme:light}
*{box-sizing:border-box}html{scroll-padding-top:24px}body{margin:0;background:var(--ground);color:var(--text);font:400 var(--type-body)/1.6 var(--font);-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{transition:background-color .18s var(--ease),border-color .18s var(--ease),color .18s var(--ease)}button:disabled{cursor:not-allowed;background:#e4ebe6;color:#5c6a60;border-color:#c7d4ca;opacity:1}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button svg{pointer-events:none}svg{width:18px;height:18px;flex:none;vertical-align:middle}a{color:var(--accent);text-underline-offset:3px}button:active:not(:disabled){transform:translateY(1px)}h1,h2,h3,p{margin-top:0}h1{font-size:var(--type-title);font-weight:500;letter-spacing:-.03em;line-height:1.3;margin-bottom:10px;text-wrap:balance}h2{font-size:var(--type-section);font-weight:500;letter-spacing:-.015em;line-height:1.45;margin-bottom:0}h3{font-size:var(--type-body);font-weight:500;line-height:1.5;margin-bottom:0}p{margin-bottom:16px}strong,b{font-weight:500}bdi{overflow-wrap:anywhere}.muted,.sub{color:var(--muted)}.sub{margin:0;font-size:var(--type-body)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}::selection{background:#cee5d9;color:#123c2c}input,textarea{caret-color:var(--accent)}*{scrollbar-color:#aabdb0 transparent;scrollbar-width:thin}.skip-link{position:fixed;top:-100px;left:24px;padding:12px;background:var(--surface);border:1px solid var(--control);z-index:100}.skip-link:focus{top:8px}.case-id{font-variant-numeric:tabular-nums;font-size:var(--type-small);color:var(--muted);white-space:nowrap}
/* A quiet, named shell. */
.desktop-sidebar{position:fixed;inset-block:0;inset-inline-start:0;width:var(--sidebar);display:flex;flex-direction:column;padding:30px 16px 20px;background:var(--surface);border-inline-end:1px solid var(--line);z-index:20}.brand{display:flex;align-items:center;direction:ltr;text-decoration:none;flex:none}.brand img{display:block;max-width:100%;height:auto}.desktop-sidebar>.brand{padding-inline:14px;margin-bottom:36px}.desktop-sidebar>.brand img{width:132px}nav{display:grid;gap:4px}nav button{display:flex;align-items:center;gap:12px;padding:11px 14px;min-height:44px;width:100%;border:1px solid transparent;border-radius:var(--radius-control);background:transparent;text-align:start;color:var(--muted);font-size:var(--type-body);font-weight:400;line-height:1.4}nav button:hover{background:var(--ground);color:var(--text)}nav button.active{background:var(--active);color:var(--accent);font-weight:500}.nav-icon{display:flex;color:var(--muted)}.nav-icon svg{width:16px;height:16px}.active .nav-icon{color:var(--accent)}.sidebar-workspace{padding:28px 14px}.sidebar-workspace>span,.sidebar-workspace small{font-size:var(--type-small);color:var(--muted)}.sidebar-workspace p{font-size:var(--type-body);margin:8px 0 0}.side-end{margin-top:auto}.independent-label{font-size:var(--type-small);color:var(--muted);padding:0 12px;line-height:1.7}.user{display:flex;align-items:center;gap:12px;text-align:start;width:100%;border:0;border-top:1px solid var(--line);background:none;padding:18px 8px 0;font-size:var(--type-small)}.user small{display:block;color:var(--muted);margin-top:3px}.avatar{width:34px;height:34px;flex:none;border-radius:50%;display:grid;place-items:center;border:1px solid #c4d5c9;background:#e9f2eb;color:#27583d;font-size:var(--type-small);font-weight:500}.dependent-avatar{background:#eef1f8;border-color:#d5dce8;color:#465d80}main{margin-inline-start:var(--sidebar)}.topbar{height:72px;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:0 var(--pad);background:var(--surface);border-bottom:1px solid var(--line)}#crumb{font-size:var(--type-small);color:var(--muted)}.header-actions{display:flex;align-items:center;gap:20px}.preview-label{font-size:var(--type-small);color:var(--muted)}.language-switch{min-height:36px!important;font-size:var(--type-small)!important;padding:7px 12px!important}.mobile-identity{display:none}#app{min-height:calc(100vh - 150px)}#app:focus{outline:none}.page-head{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:28px var(--pad);min-height:120px;background:var(--raised);border-bottom:1px solid var(--line)}.page-head>div{min-width:0}.page-head>.btn{flex:none}.view-body{padding:24px var(--pad) 40px;max-width:1564px;margin-inline:auto}footer{display:flex;justify-content:space-between;gap:24px;margin:0 var(--pad);padding:20px 0;border-top:1px solid var(--line);color:var(--muted);font-size:var(--type-small)}.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}.meta-divider{margin-inline:12px;color:var(--control)}
/* Native, consistent controls. */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:10px 16px;border:1px solid var(--accent);border-radius:var(--radius-control);background:var(--accent);color:#fff;font-size:var(--type-body);font-weight:500;line-height:1.4;white-space:normal;text-align:center}.btn:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}.btn.secondary{background:var(--surface);border-color:var(--control);color:var(--text)}.btn.secondary:hover:not(:disabled){background:var(--raised);border-color:#7c9c87}.btn.small{min-height:36px;padding:8px 12px}.icon-btn{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;border:1px solid var(--line);border-radius:var(--radius-control);background:var(--surface);padding:9px}.icon-btn:hover{background:var(--raised);border-color:var(--control)}.text-btn{display:inline-flex;align-items:center;gap:8px;border:0;padding:5px 0;min-height:32px;background:none;color:var(--accent);font-size:var(--type-small);font-weight:500;line-height:1.5;text-align:start}.text-btn:hover{text-decoration:underline;text-underline-offset:4px}.text-btn svg{width:14px;height:14px}.destructive{color:var(--negative)!important}.badge{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid var(--line);border-radius:4px;background:var(--surface);color:var(--muted);font-size:var(--type-small);line-height:1.5;flex:none}.badge.green{background:#eaf3ed;border-color:#cfdfd2;color:#2d6045}.progress{height:4px;background:#dce7df;border-radius:2px;overflow:hidden}.progress>div{height:100%;background:var(--positive);transition:width .25s var(--ease)}.status-dot{display:inline-block;width:6px;height:6px;background:var(--positive);border-radius:50%;flex:none}.status-dot.unavailable{background:#78877e}.status-outline{width:8px;height:8px;border:1px solid var(--muted);border-radius:50%;flex:none;margin-top:6px}.context-notice{display:flex;align-items:flex-start;gap:10px;padding:14px 16px;border:1px solid var(--line);border-radius:var(--radius-control);background:var(--surface);color:var(--muted);font-size:var(--type-small);margin-bottom:24px}.context-notice p{margin:0;max-width:92ch}.context-notice svg{width:16px;height:16px;margin-top:2px;color:var(--muted)}.alert{font-size:var(--type-small);color:#655835;background:#faf9f5;border:1px solid #ddd8c9;border-radius:var(--radius-control);padding:14px 16px;margin-block:16px;line-height:1.8}.field{display:grid;gap:8px;margin:20px 0}.field label{font-size:var(--type-body);font-weight:500}.field-help{font-size:var(--type-small);color:var(--muted);margin:0}input,select,textarea{width:100%;border:1px solid var(--control);border-radius:var(--radius-control);background:var(--surface);padding:11px 12px;line-height:1.6}input::placeholder,textarea::placeholder{color:var(--faint);opacity:1}input:hover,select:hover,textarea:hover{border-color:#7f9c88}input:disabled,select:disabled{color:var(--muted);background:var(--ground)}input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent);padding:0;flex:none}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.form-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}
/* Signature: the five real preparation tasks, each independently marked. */
.preparation-spine{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;margin-bottom:24px}.preparation-step{display:flex;align-items:center;gap:10px;min-width:0;text-align:start;padding:16px 14px;border:0;border-inline-end:1px solid var(--line);background:var(--surface);font-size:var(--type-small);line-height:1.5;color:var(--muted);position:relative}.preparation-step:last-child{border-inline-end:0}.preparation-step:hover{background:var(--raised);color:var(--text)}.preparation-step.is-current{background:#f1f6f2;color:var(--text)}.preparation-step.is-current:after{content:'';position:absolute;bottom:0;inset-inline:0;height:2px;background:var(--brass)}.step-indicator{display:grid;place-items:center;width:22px;height:22px;flex:none;border:1px solid var(--control);border-radius:50%;font-variant-numeric:tabular-nums}.step-indicator svg{width:13px;height:13px}.is-complete .step-indicator{background:var(--positive);border-color:var(--positive);color:#fff}.resident-workspace,.chat-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(288px,32%);gap:28px;align-items:start}.home-conversation{min-width:0;display:flex;flex-direction:column;min-height:490px}.home-conversation>.section-title{margin-bottom:12px}.home-history{flex:1;min-height:210px;max-height:340px;overflow:auto;margin-bottom:20px;padding-inline:2px}.conversation-intro{padding:24px 0 12px;max-width:65ch}.assistant-mark{display:inline-flex;align-items:center;justify-content:center;color:var(--accent);margin-bottom:14px}.assistant-mark svg{width:26px;height:26px}.conversation-intro h2{font-size:var(--type-subtitle);font-weight:500;letter-spacing:-.025em;margin-bottom:10px}.conversation-intro>p{font-size:var(--type-body);color:var(--muted);max-width:48ch}.goal-options{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.goal-options button,.chips button{display:inline-flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:var(--radius-control);background:var(--surface);padding:8px 10px;min-height:36px;font-size:var(--type-small);color:var(--text)}.goal-options button:hover,.chips button:hover{border-color:var(--control);background:var(--raised)}.goal-options svg{width:13px;height:13px}.command-composer{border:1px solid var(--control);border-radius:var(--radius);background:var(--surface);overflow:hidden}.command-composer:focus-within{outline:2px solid var(--accent);outline-offset:2px}.command-composer textarea{border:0;border-radius:0;resize:vertical;outline:none;padding:16px;min-height:82px;font-size:var(--type-body)}.command-composer textarea:focus-visible{outline:none}.composer-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:6px 12px 12px}.voice-unavailable{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--type-small)}.voice-unavailable svg{width:14px;height:14px}.send-button{padding:10px;min-width:40px;min-height:40px}.send-button svg{width:18px;height:18px}.conversation-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;font-size:var(--type-small);color:var(--muted)}.availability{display:inline-flex;align-items:center;gap:8px}.conversation-scope{font-size:var(--type-small);color:var(--muted);margin:6px 0 0}.case-folio{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px}.case-folio>.section-title{margin-bottom:18px}.folio-name{font-size:var(--type-subtitle);font-weight:500;letter-spacing:-.02em;margin-bottom:6px}.resident-line{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:var(--type-small);color:var(--muted);margin-bottom:20px}.resident-line>span{padding-inline-start:8px;border-inline-start:1px solid var(--line)}.folio-progress{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:var(--type-small);color:var(--muted);margin-bottom:10px;font-variant-numeric:tabular-nums}.folio-tasks{list-style:none;margin:16px 0;padding:0}.folio-tasks li{display:flex;align-items:center;gap:10px;font-size:var(--type-small);padding:8px 0;line-height:1.6}.task-state{display:grid;place-items:center;width:18px;height:18px;border:1px solid var(--control);border-radius:50%;flex:none;color:var(--muted);font-size:var(--type-small);font-variant-numeric:tabular-nums}.task-state svg{width:12px;height:12px}.task-state.complete{background:var(--positive);color:#fff;border-color:var(--positive)}.case-facts{margin:18px 0;padding:14px 0;border-block:1px solid var(--rule);font-size:var(--type-small)}.case-facts>div{display:flex;justify-content:space-between;gap:16px;margin:8px 0}.case-facts dt{color:var(--muted)}.case-facts dd{margin:0;text-align:end;max-width:60%}.official-state{display:flex;gap:8px;font-size:var(--type-small);line-height:1.6;margin:18px 0}.official-state strong{display:block;font-weight:500}.official-state p{color:var(--muted);margin:4px 0 0}.folio-action{justify-content:space-between;width:100%;font-size:var(--type-small);min-height:40px}.folio-action svg{width:14px;height:14px}.paused-note{font-size:var(--type-small);margin:12px 0 0;color:var(--muted)}.workspace-lower{display:grid;grid-template-columns:minmax(0,1fr) minmax(288px,32%);gap:28px;margin-top:32px;padding-top:24px;border-top:1px solid var(--line)}.source-entry{max-width:65ch}.source-entry .section-title{margin-bottom:10px}.source-entry .section-title>svg{color:var(--muted)}.source-entry p{color:var(--muted);font-size:var(--type-small);line-height:1.8;margin-bottom:10px}.workspace-links h2{margin-bottom:10px}.workspace-links button{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;border-bottom:1px solid var(--rule);padding:10px 0;background:none;text-align:start;font-size:var(--type-small)}.workspace-links button:hover{color:var(--accent)}.workspace-links button>span:last-child{display:flex;gap:14px;align-items:center;font-variant-numeric:tabular-nums}.workspace-links svg{width:14px;height:14px}
/* Cases and preparation. */
.list-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;font-size:var(--type-small);color:var(--muted);margin-bottom:16px}.case-list{display:grid;gap:20px}.case-record{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,.75fr);gap:40px;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}.case-record .section-title{margin-bottom:12px}.case-record h2{font-size:var(--type-subtitle);margin-bottom:4px}.case-record-main>p{font-size:var(--type-small);margin-bottom:0}.case-record .case-facts{border-bottom:0;margin-bottom:0;padding-bottom:0;max-width:460px}.case-record-progress{border-inline-start:1px solid var(--line);padding-inline-start:28px;display:flex;flex-direction:column;align-items:start}.case-record-progress .folio-progress{width:100%}.case-record-progress .progress{width:100%}.next-task{margin:20px 0}.next-task span{display:block;color:var(--muted);font-size:var(--type-small);margin-bottom:6px}.next-task strong{display:block;font-size:var(--type-body)}.case-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,30%);gap:32px}.preparation-checklist{min-width:0}.preparation-checklist>.section-title{margin-bottom:6px}.preparation-checklist>p{font-size:var(--type-small);margin-bottom:12px}.check-row{display:flex;gap:14px;align-items:center;padding:18px 0;border-bottom:1px solid var(--line)}.check-row label{flex:1;font-size:var(--type-body)}.check-row small{display:block;font-size:var(--type-small);color:var(--muted);margin-top:4px}.case-details-form{margin-top:28px;padding:24px;border:1px solid var(--line);background:var(--surface);border-radius:var(--radius)}.case-actions{border-inline-start:1px solid var(--line);padding-inline-start:24px}.action-list{display:grid;margin-top:16px}.action-list button{display:flex;align-items:center;gap:10px;padding:14px 0;border:0;border-bottom:1px solid var(--rule);background:none;text-align:start;font-size:var(--type-small)}.action-list button>svg:last-child{margin-inline-start:auto}.action-list button:hover{color:var(--accent)}.action-list svg{width:16px;height:16px}.activity-section{padding-top:24px;border-top:1px solid var(--line);margin-top:24px}.activity-section ol{margin:12px 0 0;padding:0;list-style:none}.activity-section li{font-size:var(--type-small);color:var(--muted);padding:12px 0;border-bottom:1px solid var(--rule)}
/* Conversation, with original-language evidence. */
.chat-modes{display:flex;gap:20px;border-bottom:1px solid var(--line);margin-bottom:24px;overflow-x:auto}.chat-modes .btn{position:relative;flex:none;min-height:44px;border:0;border-radius:0;background:none;color:var(--muted);padding:10px 0;font-size:var(--type-small);font-weight:400;white-space:nowrap}.chat-modes .btn:hover{background:none;color:var(--text)}.chat-modes .btn[aria-pressed=true]{color:var(--accent);font-weight:500}.chat-modes .btn[aria-pressed=true]:after{content:'';position:absolute;inset-inline:0;bottom:0;height:2px;background:var(--accent)}.chat-panel{display:flex;flex-direction:column;min-width:0;min-height:550px}.chat-panel>.section-title{margin-bottom:16px}.chat-panel .context-notice{font-size:var(--type-small);margin-bottom:16px}.messages{flex:1;min-height:220px;max-height:440px;overflow:auto;padding-inline:2px;margin-bottom:12px}.message{white-space:pre-line;unicode-bidi:plaintext;overflow-wrap:anywhere;font-size:var(--type-body);line-height:1.85;padding:16px 0;border-bottom:1px solid var(--rule);max-width:100%;text-align:start}.message.me{max-width:88%;width:fit-content;margin:12px 0 12px auto;background:#e8efea;border:1px solid #dde7df;border-radius:var(--radius);padding:12px 16px}.message dl{white-space:normal;background:var(--raised);padding:16px;border-radius:var(--radius-control);margin:16px 0}.message dt{font-size:var(--type-small);color:var(--muted);margin-bottom:4px}.message dd{margin:0 0 12px}.message dd:last-child{margin-bottom:0}.message blockquote{margin:16px 0 0;padding:16px;border:1px solid var(--line);border-radius:var(--radius-control);white-space:normal;background:var(--surface)}.message blockquote a{font-weight:500;font-size:var(--type-small)}.message blockquote p{margin:10px 0;font-size:var(--type-small);line-height:1.9}.message blockquote small{font-size:var(--type-small);color:var(--muted)}.message-speaker{display:block;color:var(--muted);font-size:var(--type-small);margin-bottom:4px}.chat-input{display:flex;gap:10px;padding-top:16px;border-top:1px solid var(--line)}.chat-input input{flex:1;min-width:0;font-size:var(--type-body)}.chat-panel>.muted,.chat-storage-note{font-size:var(--type-small);line-height:1.8;margin-top:12px}.chat-storage-note{color:var(--muted)}.chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 8px}.source-filter{display:block;max-width:680px;margin:10px 0 16px}.source-description{max-width:82ch;font-size:var(--type-small);color:var(--muted);line-height:1.9}.source-list{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:24px}.source-card{padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);min-width:0;overflow-wrap:anywhere}.source-card[hidden]{display:none}.source-card>div{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}.source-card h3{font-size:var(--type-section);font-weight:500}.source-card .badge{font-size:var(--type-small)}.source-card>p{font-size:var(--type-small);margin:10px 0;color:var(--muted)}.source-card>p a{word-break:break-word}.source-card .btn{font-size:var(--type-small);margin-top:8px}.source-card blockquote{font-size:var(--type-small);white-space:pre-wrap;line-height:1.95;border:1px solid var(--line);border-radius:var(--radius-control);padding:16px;background:var(--raised);margin:16px 0}.source-results{font-size:var(--type-small);color:var(--muted);margin:12px 0 0}
/* Document and household workspaces. */
.document-library{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:0 24px}.library-header{display:grid;grid-template-columns:minmax(0,1fr) 190px 110px;gap:16px;padding:18px 0;color:var(--muted);font-size:var(--type-small);border-bottom:1px solid var(--line)}.library-header>span:last-child{text-align:end}.document-row{display:flex;align-items:center;gap:16px;padding:22px 0;border-bottom:1px solid var(--rule)}.document-row:last-child{border-bottom:0}.document-icon{display:flex;color:var(--muted)}.document-icon svg{width:22px;height:22px}.document-info{min-width:0;flex:1}.document-info strong{display:block;overflow-wrap:anywhere;font-size:var(--type-body)}.document-info small{display:block;margin-top:5px;font-size:var(--type-small);color:var(--muted)}.document-availability{flex:0 0 190px;font-size:var(--type-small);color:var(--muted)}.row-actions{display:flex;align-items:center;justify-content:flex-end;gap:16px;flex:0 0 110px}.row-actions .icon-btn{border-color:transparent;min-width:32px;min-height:36px;padding:6px}.document-boundary{max-width:76ch;padding-top:32px}.document-boundary h2{margin-bottom:10px}.document-boundary p{font-size:var(--type-small);color:var(--muted);line-height:1.9}.family-list{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:0 24px}.family-record{display:flex;align-items:center;gap:24px;padding:24px 0;border-bottom:1px solid var(--rule)}.family-record:last-child{border-bottom:0}.person-identity{display:flex;align-items:center;gap:16px;flex:1;min-width:0}.person-identity .avatar{width:44px;height:44px;font-size:var(--type-body)}.person-identity h2{font-size:var(--type-section);margin-bottom:3px}.person-identity p{font-size:var(--type-small);color:var(--muted);margin:0}.person-preparation{display:flex;gap:24px;flex:none;font-size:var(--type-small);color:var(--muted);font-variant-numeric:tabular-nums}.person-preparation strong{color:var(--text);margin-inline-end:4px}.family-record>.text-btn{margin-inline-start:16px;flex:none}.reminder-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,28%);gap:32px}.reminder-list{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:24px}.reminder-row{display:flex;align-items:center;gap:20px;border-top:1px solid var(--line);padding:20px 0}.reminder-row:last-child{padding-bottom:0}.date-block{min-width:115px;flex:none;font-size:var(--type-small);font-variant-numeric:tabular-nums}.date-block time{display:block;direction:ltr;unicode-bidi:isolate;color:var(--text);font-size:var(--type-body)}.date-block span{display:block;color:var(--muted);margin-top:4px}.reminder-info{flex:1;min-width:0}.reminder-info p{margin:4px 0 0}.reminder-help{padding-top:8px}.reminder-help h2{margin-bottom:16px}.reminder-help p{font-size:var(--type-small);line-height:1.9;color:var(--muted)}.empty{padding:40px 20px;max-width:65ch;margin:auto;text-align:center}.empty h2{font-size:var(--type-subtitle);margin-bottom:10px}.empty p{color:var(--muted);font-size:var(--type-body)}.empty-symbol{display:inline-flex;color:var(--muted);margin-bottom:20px}.empty-symbol svg{width:28px;height:28px}.reminder-empty{padding:28px 20px 36px}.reminder-empty h2{font-size:var(--type-section)}
/* Settings: a label column beside each compact settings panel. */
.settings-layout{display:grid;gap:32px}.settings-section{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:32px;padding-bottom:32px;border-bottom:1px solid var(--line)}.settings-section:last-child{border-bottom:0;padding-bottom:0}.settings-section>div:first-child{padding-top:14px}.settings-section>div:first-child h2{font-size:var(--type-section);margin-bottom:10px}.settings-section>div:first-child p{max-width:33ch;font-size:var(--type-small);color:var(--muted);line-height:1.9}.settings-panel{padding:0 20px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);min-width:0}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0;border-bottom:1px solid var(--rule)}.settings-row:last-child{border-bottom:0}.settings-row>div{min-width:0}.settings-row h3{margin-bottom:5px}.settings-row p{font-size:var(--type-small);color:var(--muted);line-height:1.8;margin:0;max-width:48ch}.settings-row .btn{font-size:var(--type-small);flex:none}.settings-row .badge{max-width:160px;white-space:normal;text-align:center}.settings-row .text-btn{flex:none}.danger-row h3{color:var(--negative)}
/* Dialogs and lightweight state feedback; never page entrance motion. */
dialog{max-width:560px;width:calc(100% - 32px);max-height:calc(100dvh - 48px);border:1px solid var(--control);border-radius:var(--radius);padding:28px;background:var(--surface);color:var(--text);box-shadow:none}dialog::backdrop{background:#18332d66}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding-bottom:16px;margin-bottom:20px}.modal-head h2{font-size:var(--type-subtitle)}.close{padding:8px}.modal-head .close svg{width:18px;height:18px}dialog p{font-size:var(--type-small)}#toast{display:none;position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:min(520px,calc(100vw - 32px));padding:14px 20px;background:var(--accent);color:#fff;border:1px solid var(--accent);border-radius:var(--radius-control);font-size:var(--type-small);z-index:100}#mobileMenu{max-width:none;width:100%;height:100dvh;max-height:none;margin:0;padding:24px;border:0;border-radius:0}#mobileMenu .mobile-menu-head{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:32px}#mobileMenu>p{margin-bottom:16px;font-size:var(--type-small);color:var(--muted)}#mobileMenu nav{margin-bottom:32px}#mobileMenu nav button{padding:14px;min-height:48px;font-size:var(--type-section)}#mobileMenu .independent-label{padding:0}#mobileMenu .brand img{width:132px}
/* Script parity. The wordmark stays LTR; user input keeps its original script. */
html[lang=ar]{--font:var(--font-ar)}html[lang=ar] h1,html[lang=ar] h2,html[lang=ar] h3{letter-spacing:0;line-height:1.6}html[lang=ar] body{line-height:1.85}html[lang=ar] h1{font-size:1.625rem}html[lang=ar] .preparation-step{font-size:var(--type-small)}html[lang=ar] .folio-name{font-size:1.125rem}[dir=rtl] .message.me{margin-left:0;margin-right:auto}[dir=rtl] .text-btn>svg,[dir=rtl] .folio-action>svg,[dir=rtl] .goal-options button>svg,[dir=rtl] .case-record-progress .btn>svg,[dir=rtl] .workspace-links button svg{transform:scaleX(-1)}input[name=question],textarea[name=question],input[name=name],input[name=title]{unicode-bidi:plaintext}input[type=date]{direction:ltr}.folio-progress>span:last-child{direction:ltr;unicode-bidi:isolate}
/* Tablet folds navigation; phone preserves task and context without sideways scrolling. */
@media(min-width:1600px){:root{--pad:40px}.view-body{padding-top:28px}.home-conversation{min-height:520px}.home-history{max-height:380px}}
@media(max-width:1200px){:root{--sidebar:204px;--pad:24px}.desktop-sidebar{padding-inline:12px}.desktop-sidebar>.brand{padding-inline:10px}.resident-workspace,.chat-layout,.workspace-lower{gap:24px;grid-template-columns:minmax(0,1fr) 288px}.preparation-step{flex-direction:column;align-items:flex-start;gap:8px;padding:14px 12px}.case-folio{padding:18px}.folio-tasks li{font-size:var(--type-small)}.source-list{grid-template-columns:1fr}.case-record{gap:24px}.document-availability{flex-basis:155px}.library-header{grid-template-columns:minmax(0,1fr) 155px 110px}.settings-section{grid-template-columns:1fr;gap:12px}.settings-section>div:first-child p{max-width:65ch}.settings-section>div:first-child{padding-top:0}.settings-section>div:first-child p{margin-bottom:0}.person-preparation{gap:16px}}
@media(max-width:1000px){:root{--sidebar:0px}.desktop-sidebar{display:none}.mobile-identity{display:flex;align-items:center;gap:14px}.mobile-identity .brand img{width:114px}.topbar{height:64px}.preview-label{display:none}.header-actions{gap:8px}#crumb{margin-inline-end:auto}.view-body{padding-bottom:32px}.home-history{min-height:210px}.resident-workspace,.chat-layout,.workspace-lower{grid-template-columns:minmax(0,1fr) 288px;gap:24px}.case-detail-grid{gap:24px}.case-actions{padding-inline-start:20px}.reminder-layout{grid-template-columns:1fr 220px;gap:24px}.family-record{gap:16px}.person-preparation{display:grid;gap:2px}.document-library,.family-list{padding-inline:20px}.document-availability{flex-basis:135px}.library-header{grid-template-columns:minmax(0,1fr) 135px 100px}.row-actions{gap:10px;flex-basis:100px}}
@media(max-width:760px){:root{--pad:20px}.page-head{padding-block:24px;min-height:110px;align-items:flex-start}.page-head h1{font-size:1.5rem}.page-head .sub{font-size:var(--type-small);max-width:48ch}.page-head>.btn{padding:9px 12px;font-size:var(--type-small);min-height:38px;margin-top:4px}.resident-workspace,.chat-layout,.workspace-lower,.case-detail-grid,.reminder-layout{grid-template-columns:1fr}.case-folio{display:block}.home-conversation{min-height:0}.home-history{min-height:200px;max-height:330px}.case-folio .folio-tasks{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.case-folio .case-facts{margin-bottom:12px}.workspace-lower{gap:24px;margin-top:24px}.source-entry{max-width:none}.workspace-links{padding-top:24px;border-top:1px solid var(--line)}.preparation-spine{margin-bottom:24px}.preparation-step{font-size:var(--type-small);padding:12px 8px;gap:8px}.step-indicator{width:20px;height:20px}.case-actions{padding:24px 0 0;border-inline-start:0;border-top:1px solid var(--line)}.case-record{grid-template-columns:1fr;gap:20px;padding:20px}.case-record-progress{padding:20px 0 0;border-inline-start:0;border-top:1px solid var(--line)}.case-record-progress>.btn{align-self:flex-end}.case-record .case-facts{max-width:none}.next-task{margin:16px 0}.family-record{flex-wrap:wrap;gap:16px}.person-identity{flex-basis:65%}.person-preparation{margin-inline-start:auto}.family-record>.text-btn{margin-inline-start:60px}.document-library{padding-inline:16px}.library-header{display:none}.document-row{flex-wrap:wrap;gap:12px}.document-info{flex-basis:calc(100% - 44px)}.document-availability{margin-inline-start:34px;flex:1}.row-actions{flex-basis:auto}.reminder-help{padding:24px 0 0;border-top:1px solid var(--line)}.reminder-row{flex-wrap:wrap;gap:16px}.reminder-info{min-width:130px}.settings-section{padding-bottom:24px}.settings-panel{padding-inline:16px}.settings-row{gap:16px}.settings-row .badge{max-width:130px}.messages{max-height:420px}.chat-panel{min-height:480px}.chat-modes{gap:20px}.source-card{padding:18px}.source-card>div{flex-wrap:wrap;gap:10px}.source-card .badge{flex-basis:auto}.chat-storage-note{margin-top:8px}.list-heading{align-items:flex-start;font-size:var(--type-small)}footer{flex-direction:column;gap:6px;font-size:var(--type-small)}html[lang=ar] .page-head h1{font-size:1.375rem}}
@media(max-width:480px){:root{--pad:16px}.topbar{height:60px;gap:12px}.topbar #crumb{display:none}.mobile-identity{gap:10px}.mobile-identity .icon-btn{border-color:transparent;min-width:36px;padding:8px}.page-head{gap:14px}.page-head h1{font-size:1.5rem}.page-head .sub{max-width:32ch}.page-head>.btn{max-width:110px;padding:8px 10px}.page-head>.btn svg{width:14px;height:14px}.view-body{padding-top:20px}.preparation-spine{grid-template-columns:repeat(5,minmax(0,1fr));border-radius:var(--radius-control)}.preparation-step{padding:12px 5px;font-size:var(--type-small);line-height:1.5;align-items:center;text-align:center}.preparation-step>span:last-child{display:none}.preparation-step.is-current:after{height:2px}.step-indicator{width:24px;height:24px}.home-conversation>.section-title{margin-bottom:8px}.section-title{gap:10px}.conversation-intro{padding-top:12px}.conversation-intro h2{font-size:1.125rem}.conversation-intro>p{font-size:var(--type-body);max-width:32ch}.assistant-mark{margin-bottom:12px}.goal-options{margin-top:16px;gap:8px}.goal-options button{font-size:var(--type-small);min-height:40px;padding:9px 10px}.command-composer textarea{padding:14px;min-height:82px}.conversation-foot{gap:8px;font-size:var(--type-small);align-items:flex-start}.conversation-foot .text-btn{min-height:24px;padding:0}.conversation-scope{font-size:var(--type-small);margin-top:10px}.case-folio .folio-tasks{grid-template-columns:1fr}.case-folio{padding:20px}.resident-workspace{gap:24px}.chat-panel>.section-title{align-items:flex-start}.chat-panel>.section-title .badge{max-width:150px;white-space:normal}.chat-modes{gap:20px}.chat-modes .btn{font-size:var(--type-small);min-height:44px}.chat-input{gap:8px}.chat-input input{padding:10px;font-size:var(--type-body)}.messages{max-height:380px}.message{font-size:var(--type-body)}.chat-panel{min-height:460px}.list-heading{flex-direction:column;gap:4px}.case-record .section-title{margin-bottom:16px}.form-grid{grid-template-columns:1fr}.case-details-form{padding:20px}.field{margin-block:16px}.family-record{padding-block:20px}.person-identity{flex-basis:100%}.person-preparation{margin-inline:60px 0;display:flex;gap:20px}.family-record>.text-btn{margin-inline-start:60px}.person-preparation+.text-btn{margin-top:0}.document-availability{margin-inline-start:0}.document-row{gap:12px}.document-info{flex-basis:calc(100% - 40px)}.row-actions{gap:12px}.row-actions .icon-btn{min-width:40px;min-height:40px}.reminder-list{padding:20px}.reminder-empty{padding-inline:0}.reminder-row .text-btn{margin-inline-start:auto}.date-block{width:100%}.reminder-info{min-width:160px}.settings-row{flex-wrap:wrap}.settings-row>div{flex:1 0 100%}.settings-row .badge{max-width:none}.settings-row .btn,.settings-row .text-btn{min-height:40px}.context-notice{padding:12px;font-size:var(--type-small);margin-bottom:20px}.context-notice svg{width:14px;height:14px}.icon-btn,.text-btn{min-height:44px}.availability{min-height:24px}.availability .status-dot{margin-top:0}.conversation-foot .text-btn{min-height:24px}.composer-bottom{padding-inline:12px}.empty{padding:32px 12px}.message blockquote{padding:12px}.source-card blockquote{padding:12px}.source-results{font-size:var(--type-small)}dialog{padding:24px;max-height:calc(100dvh - 32px)}html[lang=ar] .conversation-intro h2{font-size:1.125rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
.spine-caption{display:none}@media(max-width:480px){.spine-caption{display:block;font-size:var(--type-small);margin:-10px 0 20px;color:var(--muted)}.spine-caption strong{display:block;color:var(--text);margin-top:3px}}
/* Compact the case folio to the approved first-viewport proportions. */
.case-folio{padding:20px}.case-folio>.section-title{margin-bottom:12px}.resident-line{margin-bottom:16px}.folio-tasks{margin:12px 0}.folio-tasks li{padding:6px 0}.case-folio .case-facts{margin:12px 0;padding:10px 0}.case-folio .case-facts>div{margin:6px 0}.case-folio .official-state{margin:14px 0}

.about-link{margin:0 12px 10px;font-size:var(--type-small)}

/* Conversation actions extend the existing Civic precision controls. */
.conversation-tools{display:flex;flex-wrap:wrap;gap:8px 20px;padding:12px 0;border-top:1px solid var(--line,#d4e0d8)}
.conversation-tools button{min-height:44px;text-align:start}.conversation-action-card{margin:20px 0;padding:20px;border:1px solid var(--line,#d4e0d8);border-radius:8px;background:#fff;min-width:0;overflow-wrap:anywhere}
.conversation-action-card h3{margin:0;font-size:16px}.conversation-action-card p{white-space:normal}.conversation-action-context{font-size:12px;color:#596b63}.conversation-action-card input[type=file]{width:100%;max-width:100%;margin-top:8px;font-size:14px}.conversation-file-result{padding-top:16px;margin-top:16px;border-top:1px solid #d4e0d8}.conversation-file-list{list-style:none;margin:12px 0;padding:0}.conversation-file-list li{display:grid;gap:6px;padding:14px 0;border-bottom:1px solid #e4ebe6}.conversation-file-list span{font-size:12px;color:#596b63}.message-action{margin-top:12px}.conversation-action-card dd{margin-inline-start:0}.conversation-action-card dt{font-size:12px;color:#596b63}.conversation-action-card .section-title{align-items:start;gap:16px}
@media(max-width:600px){.conversation-action-card{padding:16px}.conversation-tools{gap:4px 16px}.conversation-action-card .btn{white-space:normal;max-width:100%}}
