/* Familiar chat mechanics within UAEase's established Civic precision identity. */
.chat-sidebar-content{display:none}.sidebar-more{font-size:14px}.sidebar-more>summary{cursor:pointer;list-style:none;padding:12px;border-radius:8px;min-height:44px}.sidebar-more>summary::-webkit-details-marker{display:none}.sidebar-more>summary:hover{background:var(--active,#e9f1ed)}.sidebar-more[open]>summary{font-weight:500}.sidebar-more>div{display:grid;gap:2px;padding:4px}.sidebar-more a,.sidebar-more button{display:block;text-align:start;background:none;border:0;padding:10px 12px;font-size:14px;min-height:44px;color:var(--text,#18332d);border-radius:6px}.sidebar-more a:hover,.sidebar-more button:hover{background:var(--active,#e9f1ed)}.sidebar-more p{padding:12px;font-size:12px;line-height:1.6;color:var(--muted,#596b63);margin:0}.sidebar-more summary:focus-visible{outline:2px solid var(--accent,#164b45);outline-offset:2px}
body[data-view=chat]{background:#fff;overflow:hidden}body[data-view=chat] .desktop-sidebar{display:flex;inset:0;inset-inline-start:0;inset-inline-end:auto;width:248px;padding:24px 12px 12px;background:#f3f6f4;border-inline-end:0;gap:12px}body[data-view=chat] .desktop-sidebar>.brand{padding:4px 12px;margin:0 0 16px}body[data-view=chat] main{margin:0;margin-inline-start:248px;width:calc(100% - 248px);height:100dvh;min-height:0;display:flex;flex-direction:column}body[data-view=chat] #app{padding:0;flex:1;min-height:0;overflow:hidden;display:flex}body[data-view=chat] .topbar{height:64px;min-height:64px;padding-inline:28px;background:#fff;border:0;justify-content:flex-end}body[data-view=chat] #crumb,body[data-view=chat] main>footer,body[data-view=chat] #nav,body[data-view=chat] #mobileNav{display:none}body[data-view=chat] .chat-sidebar-content{display:flex;flex:1;min-height:0;flex-direction:column;overflow:hidden}body[data-view=chat] .side-end{padding:0;margin-top:auto;border:0}body[data-view=chat] #workspaceAccount{display:inline;font-size:13px;color:var(--muted,#596b63)}body[data-view=chat] .language-switch{background:transparent;border-color:transparent;font-size:13px;min-height:40px}body[data-view=chat] .new-chat{display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;border:0;background:none;text-align:start;font-size:14px;font-weight:500;border-radius:8px;color:var(--text,#18332d)}.new-chat svg{width:18px;height:18px}.new-chat:hover{background:#e6ede8}.chat-history-label{font-size:12px;color:var(--muted,#596b63);padding:24px 12px 8px;margin:0}.chat-history-list{overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#c7d5cc transparent}.chat-history-item{border:0;display:block;min-height:42px;width:100%;padding:10px 12px;background:none;text-align:start;border-radius:8px;color:var(--text,#18332d);font-size:14px;line-height:1.5}.chat-history-item>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-history-item:hover,.chat-history-item.is-active{background:#e6ede8}.chat-history-empty{font-size:13px;padding:10px 12px;color:var(--muted,#596b63);line-height:1.7}.chat-sidebar-content button:focus-visible{outline:2px solid var(--accent,#164b45);outline-offset:-2px}
.llm-stage{display:flex;flex-direction:column;width:min(800px,100%);height:100%;min-height:0;margin-inline:auto;padding-inline:24px}.llm-log{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#d4e0d8 transparent;padding:20px 4px 24px}.chat-empty{padding-block:60px 32px;text-align:center}.chat-empty h1{font-size:32px;font-weight:500;letter-spacing:-.025em;line-height:1.3;margin:0;color:var(--text,#18332d)}.llm-stage.is-empty .llm-log{flex:0 0 auto;overflow:visible;margin-top:auto;padding-bottom:0}.llm-stage.is-empty .llm-composer-area{margin-bottom:auto}.llm-stage.is-empty .chat-empty{padding-top:0;padding-bottom:32px}.llm-message{font-size:16px;line-height:1.8;overflow-wrap:anywhere;margin-bottom:28px;max-width:100%;color:var(--text,#18332d)}.llm-message-text{white-space:pre-wrap;unicode-bidi:plaintext}.llm-message.is-user{max-width:85%;width:fit-content;margin-inline-start:auto;padding:12px 18px;background:#f0f4f1;border-radius:18px}.llm-message.is-assistant{padding-block:4px}.llm-message blockquote{margin:16px 0;padding:12px 16px;border-inline-start:1px solid #aabdb0;background:#f7faf8;font-size:14px;white-space:normal}.llm-message blockquote a{text-decoration:underline;text-underline-offset:3px}.llm-message dl{font-size:14px}.llm-message dd{margin-inline-start:0;margin-bottom:10px}.llm-message dt{color:#596b63}.llm-composer-area{flex:none;background:#fff;padding-block:0 14px}.llm-composer{border:1px solid #d4e0d8;border-radius:22px;background:#fff;padding:12px 14px 10px;display:flex;flex-direction:column;gap:4px}.llm-composer:focus-within{border-color:#aabdb0}.llm-composer textarea{border:0;outline:0;box-shadow:none;background:transparent;display:block;width:100%;resize:none;min-height:56px;max-height:180px;padding:4px 4px 8px;font-size:16px;line-height:1.6;color:var(--text,#18332d);unicode-bidi:plaintext;border-radius:0}.llm-composer textarea::placeholder{color:#626f67;opacity:1}.llm-composer textarea:focus-visible{outline:0}.llm-composer-controls{display:flex;align-items:center;justify-content:space-between;gap:16px}.llm-send{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;border:0;background:#164b45;color:#fff;padding:10px;flex:none}.llm-send:hover{background:#103d37}.llm-send:disabled{background:#e9efeb;color:#7e8e84;cursor:default}.llm-send svg{width:20px;height:20px}.llm-send:focus-visible,.chat-add summary:focus-visible{outline:2px solid #164b45;outline-offset:3px}.chat-note{font-size:12px;color:#596b63;line-height:1.6;text-align:center;margin:10px 0 0}.chat-error{color:#a03838;font-size:14px;line-height:1.6;margin:0 0 12px}.chat-thinking{font-size:14px;color:#596b63;margin:12px 0}.chat-add{position:relative}.chat-add>summary{list-style:none;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;cursor:pointer}.chat-add>summary::-webkit-details-marker{display:none}.chat-add>summary:hover{background:#f0f4f1}.chat-add>summary svg{width:20px;height:20px}.chat-add-menu{position:absolute;inset-inline-start:0;bottom:calc(100% + 12px);width:260px;max-width:calc(100vw - 48px);padding:6px;border:1px solid #d4e0d8;border-radius:12px;background:#fff;z-index:10;max-height:50dvh;overflow:auto}.chat-add-menu button{border:0;background:none;display:block;width:100%;text-align:start;font-size:14px;min-height:44px;padding:10px 12px;border-radius:6px}.chat-add-menu button:hover{background:#edf5f0}.chat-add-menu button:focus-visible{outline:2px solid #164b45;outline-offset:-2px}.llm-log .conversation-action-card{margin-top:20px}.llm-log .chat-empty:has(+.conversation-action-card){display:none}html[lang=ar] .chat-empty h1{font-size:30px;line-height:1.6;letter-spacing:0}html[lang=ar] .llm-message{line-height:1.95}
@media(min-width:901px){body[data-view=chat] .mobile-identity{display:none}}
@media(max-width:900px){body[data-view=chat] .desktop-sidebar{display:none}body[data-view=chat] main{margin:0;width:100%}body[data-view=chat] .mobile-identity{display:flex;margin-inline-end:auto}body[data-view=chat] .topbar{padding-inline:16px;height:60px;min-height:60px}body[data-view=chat] .header-actions{gap:4px}body[data-view=chat] .mobile-identity .brand img{width:112px}.llm-stage{padding-inline:20px}.chat-empty h1{font-size:28px}html[lang=ar] .chat-empty h1{font-size:26px}body[data-view=chat] #mobileMenu[open]{display:flex;flex-direction:column}body[data-view=chat] #mobileConversations{min-height:120px;overflow:auto}body[data-view=chat] #mobileMenu .sidebar-more{margin-top:auto}body[data-view=chat] #mobileMenu .chat-history-item{min-height:44px}.llm-composer-area{padding-bottom:max(12px,env(safe-area-inset-bottom))}}
@media(max-width:480px){.llm-stage{padding-inline:14px}.llm-log{padding-top:12px}.llm-message{font-size:16px}.llm-message.is-user{max-width:92%;padding:10px 14px}.llm-stage.is-empty .chat-empty{padding-bottom:24px}.llm-composer{padding:10px 12px 8px;border-radius:20px}.chat-note{font-size:12px}.chat-empty h1{font-size:26px}html[lang=ar] .chat-empty h1{font-size:25px}body[data-view=chat] #workspaceAccount{font-size:12px}}
@media(prefers-reduced-motion:reduce){.llm-stage *{scroll-behavior:auto;transition:none!important}}

body[data-view=chat]:not([data-chat-mode=ai]) #app{display:block;overflow:auto}body[data-view=chat] .llm-composer{position:relative}body[data-view=chat] .sidebar-more[open]>div{max-height:50dvh;overflow:auto}
/* Authenticated identity stays quiet and anchored below the secondary tools. */
.sidebar-identity{flex:none;margin-top:8px;padding-top:8px;border-top:1px solid #d4e0d8}.sidebar-user{display:flex;align-items:center;gap:10px;padding:10px 8px;border-radius:10px;color:#18332d;min-height:68px;text-decoration:none}.sidebar-user:hover{background:#e6ede8}.sidebar-user:focus-visible{outline:2px solid #164b45;outline-offset:0}.sidebar-user-avatar{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border-radius:50%;background:#dfeae3;color:#164b45;font-size:14px;font-weight:500}.sidebar-user-details{display:flex;flex-direction:column;gap:3px;min-width:0}.sidebar-user-name{font-size:14px;font-weight:500;line-height:1.45;white-space:normal;overflow-wrap:anywhere}.sidebar-user-id{display:flex;flex-direction:column;font-size:11px;line-height:1.6;color:#596b63;gap:1px}.sidebar-user-id bdi{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}html[lang=ar] .sidebar-user-name{line-height:1.7}#mobileMenu .sidebar-identity{margin-top:12px}.sidebar-identity[hidden]{display:none!important}
body[data-view=chat] #workspaceAccount{display:none}

/* Secondary work floats above a stable conversation. Native dialogs own focus and Escape. */
#app[hidden],#workspaceAuthGate[hidden]{display:none!important}
#workspaceAuthGate{padding:24px;line-height:1.7;font-size:16px;overflow:auto}
#workspaceAuthGate button{display:block;margin-top:16px;padding:12px 18px;border:1px solid #aabdb0;border-radius:8px;background:#fff;min-height:44px}
.chat-loading{font-size:14px;color:#596b63;margin:0 0 12px}
.chat-recovery{margin:0 0 12px}
.chat-recovery button{border:0;background:#edf3ef;border-radius:8px;min-height:44px;padding:10px 14px;font-size:14px;text-align:start}
.workspace-more-trigger{width:100%;border:0;background:transparent;color:#18332d;text-align:start;min-height:44px;padding:10px 12px;border-radius:8px;font-size:14px;cursor:pointer}
.workspace-more-trigger:hover{background:#e6ede8}
.workspace-more-trigger:focus-visible{outline:2px solid #164b45;outline-offset:-2px}
.workspace-dialog{width:min(900px,calc(100% - 40px));max-width:900px;max-height:calc(100dvh - 64px);padding:0;border:1px solid #c6d4cc;border-radius:16px;background:#fff;overflow:auto;overscroll-behavior:contain}
.workspace-dialog[open]{display:flex;flex-direction:column}
.workspace-dialog[data-pane=more]{width:min(430px,calc(100% - 40px))}
.workspace-dialog::backdrop{background:rgb(8 16 12 / 68%)}
.workspace-dialog-head{display:flex;align-items:center;gap:16px;padding:18px 24px;border-bottom:1px solid #e0e8e3;flex:none;background:#fff;position:sticky;top:0;z-index:2}
.workspace-dialog-head h2{font-size:18px;line-height:1.5;font-weight:500;margin:0;flex:1}
.workspace-dialog-head .icon-btn{flex:none;min-width:44px;min-height:44px}
.workspace-dialog-head svg{width:18px;height:18px}
.workspace-back{display:flex;align-items:center;gap:6px;background:none;border:0;min-height:44px;padding:8px;color:#445e52;font-size:14px}
.workspace-back svg{transform:rotate(180deg)}
html[dir=rtl] .workspace-back svg{transform:none}
.workspace-dialog-body{padding:24px;overflow:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#bdcdc3 transparent}
.workspace-dialog-body>.page-head{padding:0 0 20px;margin:0;align-items:center;min-height:0}
.workspace-dialog-body>.page-head h1{display:none}
.workspace-dialog-body>.page-head .sub{margin:0;font-size:14px}
.workspace-dialog-body>.view-body{padding:0}
.workspace-dialog-body .settings-layout,.workspace-dialog-body .case-detail-grid,.workspace-dialog-body .document-layout,.workspace-dialog-body .reminders-layout{display:block}
.workspace-dialog-body .settings-section{grid-template-columns:minmax(0,180px) minmax(0,1fr)}
.workspace-dialog-body .settings-panel{min-width:0}
.workspace-dialog-body .settings-row{flex-wrap:wrap;gap:12px}
.workspace-dialog-body .chat-layout{display:block;min-height:0;height:auto}
.workspace-dialog-body .chat-layout>aside{display:none}
.workspace-dialog-body .messages{max-height:45dvh;overflow:auto}
.workspace-dialog-body .chat-main{min-height:0}
.workspace-dialog-body .chat-input{position:static}
.workspace-dialog-body .view-body,.workspace-dialog-body section{min-width:0}
.workspace-menu{display:grid;gap:2px}
.workspace-menu button{border:0;background:none;display:flex;align-items:center;gap:14px;min-height:48px;width:100%;padding:10px 12px;border-radius:8px;text-align:start;font-size:15px}
.workspace-menu button:hover{background:#edf3ef}
.workspace-menu button span{flex:1}
.workspace-menu svg{width:18px;height:18px;flex:none;color:#52685b}
html[dir=rtl] .workspace-menu svg:last-child{transform:rotate(180deg)}
.workspace-preview-note{margin:20px 12px 4px;color:#596b63;font-size:12px;line-height:1.7}
.workspace-account h3,.workspace-about h3{font-size:22px;font-weight:500;line-height:1.5;margin:0 0 20px}
.workspace-account p,.workspace-about p{font-size:15px;line-height:1.8;max-width:65ch;margin:0 0 24px}
.workspace-account dt{font-size:13px;color:#52685b;margin:18px 0 4px}
.workspace-account dd{margin:0;font-size:16px}
.workspace-account dl{margin:0 0 24px}
.workspace-about img{display:block;margin-bottom:28px}
@media(max-width:600px){.workspace-dialog,.workspace-dialog[data-pane=more]{width:calc(100% - 24px);max-height:calc(100dvh - 24px)}.workspace-dialog-head{padding:10px 12px;gap:8px}.workspace-dialog-head h2{font-size:16px}.workspace-dialog-body{padding:20px 16px}.workspace-back span{display:none}.workspace-dialog-body .settings-section{display:block}.workspace-dialog-body .settings-row{display:block}.workspace-dialog-body .settings-row>.btn{margin-top:12px}.workspace-dialog-body .form-grid{grid-template-columns:1fr}}

.workspace-uaepass-login{display:inline-block;border-radius:6px;max-width:100%}.workspace-uaepass-login img{display:block;max-width:100%;height:auto}.workspace-uaepass-login:focus-visible{outline:2px solid #164b45;outline-offset:4px}

/* The original sidebar menu opens a dialog with its own persistent section navigation. */
.workspace-dialog{width:min(1080px,calc(100% - 48px));max-width:1080px;height:min(740px,calc(100dvh - 64px));overflow:hidden}
.workspace-dialog-layout{display:grid;grid-template-columns:210px minmax(0,1fr);flex:1;min-height:0;overflow:hidden}
.workspace-dialog-nav{display:flex;flex-direction:column;gap:3px;padding:20px 12px;background:#f3f6f4;overflow:auto;scrollbar-width:thin;scrollbar-color:#bdcdc3 transparent;border-inline-end:1px solid #e0e8e3}
.workspace-dialog-nav button{display:flex;align-items:center;gap:12px;border:0;background:none;min-height:44px;padding:10px 12px;border-radius:8px;text-align:start;font-size:14px;flex:none;color:#18332d}
.workspace-dialog-nav button svg{width:18px;height:18px;flex:none;color:#52685b}
.workspace-dialog-nav button:hover{background:#e8eeea}
.workspace-dialog-nav button[aria-current=page]{background:#e0e8e3;font-weight:500}
.workspace-dialog-nav button:focus-visible{outline:2px solid #164b45;outline-offset:-2px}
.workspace-dialog-layout>.workspace-dialog-body{min-width:0;overflow:auto;overscroll-behavior:contain}
@media(max-width:700px){.workspace-dialog{width:calc(100% - 24px);height:calc(100dvh - 32px);max-height:calc(100dvh - 32px)}.workspace-dialog-layout{display:flex;flex-direction:column}.workspace-dialog-nav{flex:none;flex-direction:row;overflow-x:auto;padding:8px;border-inline-end:0;border-bottom:1px solid #e0e8e3;gap:4px}.workspace-dialog-nav button{white-space:nowrap;gap:8px}.workspace-dialog-layout>.workspace-dialog-body{flex:1}.workspace-dialog-body .settings-section{display:block}}

/* Repeatable synthetic reviewer guide stays inside the demo and family sections. */
.family-demo-guide{padding-bottom:24px;margin-bottom:24px;border-bottom:1px solid #e0e8e3}
.family-demo-guide h3{font-size:20px;font-weight:500;line-height:1.5;margin:0 0 12px}
.family-demo-guide>p{font-size:14px;line-height:1.8;margin:0 0 16px;max-width:68ch}
.family-demo-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.family-demo-prompts{margin-top:20px}
.family-demo-prompts summary,.demo-profile-details summary{cursor:pointer;font-size:14px;min-height:44px;padding:10px 0}
.family-demo-prompts ol{list-style:none;padding:0;margin:8px 0 0}
.family-demo-prompts li{padding:12px 0;border-bottom:1px solid #e0e8e3}
.family-demo-prompts button{border:0;background:#edf3ef;text-align:start;padding:10px 12px;border-radius:8px;min-height:44px;font-size:14px;width:100%}
.family-demo-prompts li p{margin:8px 0 0;line-height:1.7;font-size:13px;color:#52685b}
.demo-profile-details{grid-column:1/-1;flex-basis:100%;width:100%;border-top:1px solid #e0e8e3;margin-top:12px}
.demo-profile-details dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:12px 20px;font-size:14px;line-height:1.7}
.demo-profile-details dt{color:#52685b}.demo-profile-details dd{margin:0;overflow-wrap:anywhere}
.demo-profile-details p{font-size:13px;line-height:1.7;color:#52685b}
.family-record:has(.demo-profile-details){flex-wrap:wrap}
@media(max-width:600px){.demo-profile-details dl{grid-template-columns:1fr;gap:4px}.demo-profile-details dd{margin-bottom:12px}.family-demo-actions{align-items:stretch;flex-direction:column}}
