/* Phone and tablet workspace. Desktop density stays in workspace-focus.css. */
.context-backdrop[hidden]{display:none!important}
.context-backdrop{display:none}

@media(max-width:1150px){
 body.signed-in{height:var(--workspace-viewport-height,100dvh);min-height:0;overflow:hidden}
 .signed-in .layout{height:calc(var(--workspace-viewport-height,100dvh) - var(--workspace-nav-top,80px));min-height:0}
 .signed-in dialog{max-height:calc(var(--workspace-viewport-height,100dvh) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
 .composer-tools-menu{max-height:min(420px,calc(var(--workspace-viewport-height,100dvh) - var(--workspace-nav-top,80px) - 140px));overflow-y:auto;overscroll-behavior:contain}
 .thread-menu>div{max-height:min(55dvh,calc(var(--workspace-viewport-height,100dvh) - var(--workspace-nav-top,80px) - 78px));overflow-y:auto;overscroll-behavior:contain}
 .context-backdrop:not([hidden]){display:block;position:fixed;inset:var(--workspace-nav-top,80px) 0 0;z-index:40;border:0;border-radius:0;background:#243b5245;cursor:pointer;animation:omni-mobile-fade 160ms ease-out}
 #reviewContext{position:fixed;inset:var(--workspace-nav-top,80px) 0 auto auto;z-index:41;width:min(440px,100%);height:calc(var(--workspace-viewport-height,100dvh) - var(--workspace-nav-top,80px));max-height:calc(100dvh - var(--workspace-nav-top,80px));padding:0 20px max(24px,env(safe-area-inset-bottom));border-left:1px solid #e4ebf1;background:#fbfcfe;box-shadow:-12px 0 48px #203b5220;overflow-y:auto;overscroll-behavior:contain;animation:omni-mobile-panel 220ms cubic-bezier(.2,.7,.2,1)}
 #reviewContext .context-heading{position:sticky;top:0;z-index:2;margin:0 -20px 18px;padding:16px 20px 12px;border-bottom:1px solid #e9eef3;background:#fbfcfef5;backdrop-filter:blur(12px);align-items:center}
 #reviewContext .context-heading .eyebrow{margin-bottom:4px}
 #closeContext{width:44px;min-width:44px;height:44px;border-radius:50%;background:#eef3f7;color:#4c6980}
}

@media(min-width:761px) and (max-width:1150px){
 .workspace-navigation .workspace-nav-item,.workspace-navigation .workspace-nav-browse,.workspace-nav-library .conversation-item{min-height:44px}
 .workspace-navigation .workspace-nav-heading{min-height:44px}
 .workspace-navigation .workspace-nav-toggle{width:44px;height:44px;flex-basis:44px}
 .workspace-nav-toggle,.desktop-nav-toggle{width:44px;height:44px;flex-basis:44px}
 .composer textarea{font-size:16px}
 .send{width:44px;height:44px;flex-basis:44px}
 .composer-tools>summary{width:44px;height:44px}
 #composerContext,.thread-tools>.quiet,.thread-menu>summary{min-height:44px}
 #conversationMode #messageMode{font-size:16px;min-height:44px}
 #reviewContext .cw-button,#reviewContext .context-page{min-height:44px;font-size:13px}
 #reviewContext input:not([type=checkbox]),#reviewContext select,#reviewContext textarea,.signed-in dialog input:not([type=checkbox]):not([type=radio]),.signed-in dialog select,.signed-in dialog textarea{font-size:16px;min-height:44px}
 .signed-in dialog button{min-height:44px}
}

@media(max-width:760px){
 body.signed-in{height:var(--workspace-viewport-height,100dvh);min-height:0;overflow:hidden}
 .signed-in .topbar{height:calc(56px + env(safe-area-inset-top));min-height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(10px,env(safe-area-inset-right)) 0 max(6px,env(safe-area-inset-left));gap:6px;flex-wrap:nowrap}
 .signed-in .brand{min-width:0;gap:7px;flex:1;overflow:hidden}
 .signed-in .brand>div:last-child{min-width:0}
 .signed-in .brand strong{font:550 13px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .signed-in .brand .mark{width:25px;height:25px;flex:none}
 .signed-in .top-actions{width:auto;flex:none;gap:0;flex-wrap:nowrap}
 .signed-in #mobileMenu{display:grid;place-items:center;width:44px;min-width:44px;height:44px;padding:11px;flex:none;border:0;border-radius:11px;background:transparent;color:#5f7c94}
 .signed-in #mobileMenu:hover,.signed-in #mobileMenu[aria-expanded=true]{background:#edf3f8}
 #mobileMenu>span{display:none}
 body:not(.signed-in) #mobileMenu{display:none}
 .signed-in .account-menu>summary{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:9px 10px;font-size:12px;border-radius:12px;background:#f4f7fa;color:#506f88;white-space:nowrap}
 .signed-in .account-popover{position:fixed;top:calc(56px + env(safe-area-inset-top) + 5px);right:max(10px,env(safe-area-inset-right));left:auto;width:min(300px,calc(100vw - 20px));max-height:calc(var(--workspace-viewport-height,100dvh) - 76px - env(safe-area-inset-top));overflow-y:auto;overscroll-behavior:contain;padding:8px;border-radius:16px;box-shadow:0 16px 50px #243b5224}
 .signed-in .account-popover>.quiet,.signed-in .account-popover>a{display:flex;align-items:center;min-height:44px;margin:0;padding:10px 12px;font-size:14px;line-height:1.4;border-radius:9px;white-space:normal;text-align:left}
 .signed-in .account-popover>#accountName{display:block;background:none;padding:10px 12px;font-size:12px;overflow-wrap:anywhere}
 .signed-in .safety{min-height:24px;padding:5px 12px;font-size:8px;line-height:1.6;letter-spacing:.015em;font-weight:450;overflow-wrap:anywhere}
 .signed-in .layout{height:calc(var(--workspace-viewport-height,100dvh) - var(--workspace-nav-top,80px));min-height:0;overflow:hidden}
 .signed-in .mainpanel{height:100%;min-height:0;overflow:hidden}
 .review-column{height:100%;min-height:0;padding-inline:max(14px,env(safe-area-inset-left)) max(14px,env(safe-area-inset-right))}
 .review-column:not(.has-conversation){justify-content:center;padding-block:24px max(20px,env(safe-area-inset-bottom));gap:0;overscroll-behavior:contain}
 .welcome{overflow:visible}
 .welcome .hero-mark{width:34px;height:34px;margin-bottom:20px}
 .welcome h1{font-size:29px;line-height:1.2;letter-spacing:-.9px}
 .welcome .intro{max-width:270px;margin:12px auto 24px;font-size:14px;line-height:1.6;color:#72869a}
 .composer-zone{width:100%;flex:none;padding:10px 0 max(8px,env(safe-area-inset-bottom));margin:0 auto;background:#fff}
 .composer-wrap{padding:11px 10px 6px;border-radius:23px;border-color:#dce5ed;box-shadow:0 4px 22px #294d6c06}
 .composer{gap:8px}
 .composer textarea{font-size:16px;line-height:1.5;min-width:0;min-height:44px;max-height:min(140px,24dvh);padding:9px 3px 5px;scroll-padding-block:8px}
 .send{width:44px;height:44px;min-width:44px;flex-basis:44px;font-size:24px;background:#507fa8;color:#fff}
 .composer-actions{min-height:44px;padding-top:3px;gap:4px;flex-wrap:wrap}
 .composer-tools>summary{width:44px;height:44px;padding:11px}
 #composerContext{min-height:44px;padding:10px 11px;font-size:13px;line-height:1.4;border-radius:11px}
 #conversationMode #messageMode{max-width:calc(100vw - 180px);min-height:44px;font-size:16px}
 .composer-tools-menu{left:0;bottom:calc(100% + 8px);width:260px;max-width:calc(100vw - 52px);max-height:min(420px,calc(var(--workspace-viewport-height,100dvh) - var(--workspace-nav-top,80px) - 140px));overflow-y:auto;overscroll-behavior:contain;border-radius:16px;padding:7px}
 .composer-tools-menu .cw-toolbar .cw-button{min-height:46px;font-size:14px;padding:12px;border-radius:9px;white-space:normal}
 .composer-foot{padding-top:8px;font-size:10px;line-height:1.5;color:#7d90a1;text-align:center}
 .review-starters{gap:8px;margin-top:18px}
 .review-starters .starter{min-height:44px;padding:10px 13px;border-radius:22px;font-size:12px;line-height:1.4}
 .review-starters .starter:last-child{display:inline-flex}
 .review-starters .starter svg{width:16px;height:16px;flex:none}
 .chat-view{padding:0;min-height:0}
 .chat-heading{padding:8px 0;min-height:60px;gap:8px}
 .chat-heading .eyebrow{display:none}
 .chat-heading h2{font-size:15px;line-height:1.4;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .thread-tools{gap:2px}
 .thread-tools>.quiet{min-height:44px;padding:10px 11px;font-size:12px}
 .thread-menu>summary{display:grid;place-items:center;min-width:44px;min-height:44px;padding:9px;border-radius:12px;font-size:18px;line-height:1}
 .thread-menu>div{right:0;width:240px;max-width:calc(100vw - 28px);max-height:min(55dvh,calc(var(--workspace-viewport-height,100dvh) - var(--workspace-nav-top,80px) - 78px));overflow-y:auto;overscroll-behavior:contain;border-radius:14px;padding:6px;z-index:32}
 .thread-menu>div>.quiet{min-height:44px;padding:11px 12px;font-size:14px;text-align:left}
 .messages{padding:20px 0 12px;gap:24px;overscroll-behavior-y:contain;scroll-padding-block:16px}
 .message{font-size:16px;line-height:1.7;overflow-wrap:anywhere}
 .message.user{max-width:92%;padding:11px 15px;border-radius:20px}
 .message-actions{gap:4px;flex-wrap:wrap}
 .message-actions button{min-height:44px;font-size:12px;padding:10px}
 .message table{display:block;max-width:100%;overflow-x:auto}
 .message img{max-width:100%;height:auto}
 .ct-shared-status{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
 .selection-note,#workStatus,.capture-live-controls,.cw-status{font-size:12px;line-height:1.5;overflow-wrap:anywhere}

 /* The drawer dedicates most of its height to recent conversations. */
 .sidebar.workspace-navigation{--drawer-width:min(340px,calc(100vw - 24px));width:var(--drawer-width);max-height:calc(var(--workspace-viewport-height,100dvh) - var(--workspace-nav-top,80px));padding-bottom:max(10px,env(safe-area-inset-bottom));border-radius:0 20px 20px 0;box-shadow:12px 0 40px #243b521c;transition:transform 240ms cubic-bezier(.2,.7,.2,1)}
 .workspace-nav-backdrop{background:#243b5245}
 .workspace-navigation .workspace-nav-item{min-height:44px;font-size:14px;gap:12px;line-height:1.4}
 .workspace-navigation .workspace-nav-title{font-size:13px}
 .workspace-navigation .workspace-nav-heading{min-height:44px}
 .workspace-navigation .workspace-nav-toggle{width:44px;height:44px;flex-basis:44px}
 .workspace-navigation .workspace-primary-actions{gap:3px}
 .workspace-navigation .workspace-nav-tools{gap:2px;margin-top:5px}
 .workspace-navigation .workspace-history-heading{margin-top:14px;margin-bottom:5px}
 .workspace-navigation .workspace-history-heading h2{font-size:12px}
 .workspace-navigation .workspace-nav-browse{min-height:44px;font-size:12px}
 .workspace-navigation .conversation-item{min-height:54px;padding:11px 12px;font-size:14px;line-height:1.4;border-radius:10px}
 .workspace-navigation .conversation-item small{font-size:11px;line-height:1.4;margin-top:4px}
 .workspace-navigation .history-group{font-size:11px;margin-block:15px 6px}
 .workspace-navigation .sidebar-bottom{padding-top:7px}
 .workspace-navigation .workspace-nav-connection{font-size:11px}
 .workspace-navigation input[type=search]{font-size:16px;min-height:44px}

 #reviewContext{width:100%;border:0;padding-inline:max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right));box-shadow:none}
 #reviewContext .context-heading{margin-inline:-16px;padding-inline:16px}
 #reviewContext .context-heading h2{font-size:19px}
 #reviewContext .context-explainer,#reviewContext .ct-reader-note{font-size:13px;line-height:1.65}
 #reviewContext .cw-file{padding:14px;border-radius:13px;margin-block:10px}
 #reviewContext .cw-file .cw-note,#reviewContext .cw-note,#reviewContext .cw-status{font-size:12px;line-height:1.6}
 #reviewContext .cw-file label{font-size:14px;line-height:1.5}
 #reviewContext .cw-button,#reviewContext .context-page{min-height:44px;font-size:13px;padding:10px 12px}
 #reviewContext .cw-file-tools{gap:8px}
 #reviewContext .cw-file-tools>input[type=search]{flex-basis:100%;min-width:0;min-height:44px;font-size:16px}
 #reviewContext .cw-paging{flex-wrap:wrap;gap:8px}
 #reviewContext input:not([type=checkbox]),#reviewContext select,#reviewContext textarea{font-size:16px;min-height:44px}
 #reviewContext input[type=checkbox]{width:20px;height:20px;vertical-align:middle;accent-color:#507fa8}

 /* Keep every existing workflow usable without shrinking the page to fit. */
 .signed-in dialog{width:calc(100vw - 20px);max-width:680px;max-height:calc(var(--workspace-viewport-height,100dvh) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));margin:auto;padding:20px 18px max(20px,env(safe-area-inset-bottom));border-radius:20px;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:16px}
 .signed-in dialog input:not([type=checkbox]):not([type=radio]),.signed-in dialog select,.signed-in dialog textarea{font-size:16px;min-height:44px;min-width:0;max-width:100%}
 .signed-in dialog button,.signed-in dialog summary,.signed-in dialog .quiet{min-height:44px}
 .signed-in dialog .dialog-head,.signed-in dialog .cw-dialog-head,.signed-in dialog .wi-dialog-heading{gap:12px;align-items:center}
 .signed-in dialog h2{font-size:20px;line-height:1.35;overflow-wrap:anywhere}
 .signed-in dialog p,.signed-in dialog .cw-note,.signed-in dialog .ri-note,.signed-in dialog .wi-small{font-size:12px;line-height:1.65}
 .signed-in dialog label{font-size:13px;line-height:1.5}
 .signed-in dialog .wi-form-grid,.signed-in dialog .case-form-grid{grid-template-columns:1fr;gap:0}
 .signed-in dialog fieldset{min-width:0}
 .signed-in dialog input[type=checkbox]{width:18px;height:18px;flex-basis:18px}
 .review-library,.case-workspace,.wi-workspace,.rw-queue{padding:24px 16px max(28px,env(safe-area-inset-bottom));overscroll-behavior:contain;scroll-padding-block:20px}
 .rl-heading h1,.wi-heading h1{font-size:27px}
 .rl-intro,.wi-intro{font-size:14px;line-height:1.6}
 .rl-filters input,.rl-filters select,.case-workspace input:not([type=checkbox]),.case-workspace select{font-size:16px;min-height:44px;min-width:0}
 .rl-tools .ri-button,.rl-filters .ri-button,.case-workspace .case-button,.wi-workspace .wi-button,.rw-queue .rw-button{min-height:44px;font-size:13px}
 .rl-title,.wi-row-title{font-size:15px;line-height:1.5}
 .rl-meta,.wi-row-meta{font-size:11px;line-height:1.5}
 .wi-row-next{font-size:13px;line-height:1.6}
 .wi-row-end{font-size:11px}
 .wi-tabs,.case-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:5px;overscroll-behavior-x:contain;padding-bottom:8px}
 .wi-tabs>button,.case-tabs>button{flex:none;white-space:nowrap}
 .wi-tabs::-webkit-scrollbar,.case-tabs::-webkit-scrollbar{display:none}
 .case-card,.case-list-card{padding:16px}
 .ops-tools{gap:8px}.ops-tools button,.ops-tools a,.ops-tools select{min-height:44px}.ops-form input{font-size:16px;min-height:44px}
 .toast{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));max-width:calc(100vw - 24px);width:auto;transform:none;font-size:13px}

 .signed-in.workspace-keyboard-open .review-column:not(.has-conversation){justify-content:flex-end;padding-block:12px 0}
 .signed-in.workspace-keyboard-open .welcome,.signed-in.workspace-keyboard-open .review-starters{display:none}
 .signed-in.workspace-keyboard-open .composer-zone{padding-bottom:6px}
 .signed-in.workspace-keyboard-open .composer-foot{font-size:9px;padding-top:4px}
 .signed-in.workspace-keyboard-open .messages{scroll-behavior:auto}
}
@media(max-width:360px){
 .signed-in .brand strong{font-size:12px}
 .signed-in .brand .mark{width:22px;height:22px}
 .signed-in .brand{gap:4px}
 .signed-in .account-menu>summary{font-size:11px;padding-inline:8px}
 .review-column{padding-inline:12px}
 .welcome h1{font-size:27px}
 .review-starters{gap:6px}
 .review-starters .starter{font-size:11px;padding-inline:11px}
 .rl-advanced{grid-template-columns:1fr}
}
@media(max-width:760px) and (max-height:600px){
 .review-column:not(.has-conversation){justify-content:flex-start;padding-block:16px 10px}
 .welcome .hero-mark{display:none}
 .welcome h1{font-size:25px}
 .welcome .intro{margin-block:8px 16px}
 .review-starters{margin-top:12px}
 .workspace-navigation .workspace-nav-content{overflow-y:auto}
}
@keyframes omni-mobile-fade{from{opacity:0}to{opacity:1}}
@keyframes omni-mobile-panel{from{transform:translateX(28px);opacity:.6}to{transform:translateX(0);opacity:1}}
@media(prefers-reduced-motion:reduce){
 .context-backdrop:not([hidden]),#reviewContext{animation:none}
 .workspace-navigation{transition:none}
}
