/* Scoped refinement; account, billing and tool policy retain their original behavior. */
@media(min-width:901px){body.chat-route .chat-reference-layout:not(.chat-sidebar-collapsed){grid-template-columns:280px minmax(0,1fr)!important}}
body.chat-route .chat-reference-layout #messages{padding-top:22px!important;padding-bottom:18px!important}
.chat-reference-layout .message,.chat-reference-layout .message.user{margin-bottom:20px!important}
.chat-reference-layout .message-body{line-height:1.85!important}
.chat-reference-layout .assistant:not(#chat-stream-preview) .message-body{white-space:normal}
.chat-reference-layout .chat-answer-section{margin:10px 0!important}
.chat-reference-layout .chat-answer-section:first-child{margin-top:0!important}
.chat-reference-layout .chat-answer-section:last-child{margin-bottom:0!important}
.chat-reference-layout .message-body>p{margin-bottom:10px!important}
.chat-reference-layout .message-actions{margin-top:8px!important;flex-wrap:wrap;gap:4px 8px!important}
.chat-reference-layout .message-actions button{font-size:12px!important;color:#465a76!important;min-height:36px!important;height:auto!important}
.chat-reference-layout .chat-message-time:empty{display:none}
.chat-reference-layout .chat-local-assets:empty{display:none}
.chat-reference-layout .chat-history-heading{font-size:13px!important}
.chat-reference-layout .chat-account-card small,.chat-reference-layout .timesai-ai-disclaimer,.chat-reference-layout .chat-information{font-size:12px!important;color:#4e607a!important;line-height:1.65}
.chat-reference-layout .chat-workspace-header{gap:16px}
.chat-reference-layout .chat-header-title{display:flex!important;align-items:center;min-width:0!important;flex:1;gap:10px!important}
.chat-reference-layout .chat-header-title .chat-current-title{display:block!important;min-width:0;max-width:100%!important;font-size:14px!important;line-height:1.6;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:right}
.chat-reference-layout .chat-header-actions{flex:none;gap:8px!important}
.chat-reference-layout #chat-history-toggle,.chat-reference-layout .chat-header-actions .chat-icon-button{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;flex:none}
.chat-reference-layout .chat-header-divider{display:none}
.chat-reference-layout #chat-more-menu button{font-size:13px;min-height:42px}
.detail-purchase-closed{opacity:1!important;filter:none!important}
.detail-purchase-closed>*:not(.detail-closed-badge){opacity:.55}
.detail-closed-badge{display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;padding:4px 10px;border:1px solid #cbd5e4;border-radius:8px;color:#42536c;background:#edf1f7;margin-bottom:8px}
.detail-access-closed{opacity:.7!important}
.detail-field-closed{color:#465a76!important;background:#f0f3f8!important}
.chat-primary-nav [data-detail-status]:not([data-detail-status=""])::after,.chat-plus-item[data-detail-status]:not([data-detail-status=""])::after,.detail-access-closed[data-detail-status]:not(input):not(textarea):not(.chat-icon-button):not(.chat-send-button):not(.chat-plus-button):not(.chat-dictation-button):not([data-detail-status=""])::after{content:attr(data-detail-status);display:inline-block;font-size:10px;line-height:1.7;padding:1px 5px;border-radius:5px;background:#e3e8f0;color:#42536c;white-space:nowrap;margin-inline-start:5px}
.details-card>p,.details-help{font-size:14px}
.details-switch b{font-size:14px}.details-switch small{font-size:12px;color:#52647e}
.details-groups{display:grid;gap:12px;margin-top:18px}
.details-group{border:1px solid #dbe6f7;border-radius:12px;background:#fff;overflow:hidden}
.details-group>summary{display:flex;align-items:center;gap:10px;cursor:pointer;padding:14px 16px;color:#263a56;font-size:15px;font-weight:700;list-style:none;background:#f7faff;min-height:48px}
.details-group>summary::-webkit-details-marker{display:none}
.details-group>summary::before{content:'+';font:20px/1 Arial;color:#1764ef}.details-group[open]>summary::before{content:'−'}
.details-group>summary>span{margin-inline-start:auto;font-size:12px;color:#52647e;font-weight:400}
.details-group>.details-grid{padding:12px}
.details-group summary:focus-visible{outline:3px solid #72a5fb;outline-offset:-3px}
.details-switch{position:relative;flex-wrap:wrap}.details-switch.is-off{background:#f0f3f8}
.details-live-status{width:100%;font-size:11px;font-style:normal;color:#52647e;padding-inline-start:30px}
.output-workspace-toolbar button,.output-workspace-exports button,#outputs-save-status{font-size:12px}
@media(max-width:900px){
 body.chat-route .chat-reference-layout #messages{padding:18px 16px 14px!important}
 .chat-reference-layout .message,.chat-reference-layout .message.user{margin-bottom:18px!important}
 .chat-reference-layout .message-body{line-height:1.8!important}
 body.chat-route .chat-reference-layout .chat-workspace-header{gap:8px;padding:7px 10px!important}
 .chat-reference-layout .chat-header-title{gap:6px!important}
 .chat-reference-layout .chat-header-title .chat-current-title{font-size:13px!important;max-width:100%!important}
 .chat-reference-layout .chat-header-actions{gap:2px!important}
 .chat-reference-layout #chat-message-search-toggle{display:flex!important}
 body.chat-route .chat-reference-layout form.chat-composer{min-height:88px!important;padding:7px 10px!important;border-radius:20px!important}
 .chat-reference-layout .chat-compose-row{grid-template-rows:auto 44px!important;gap:2px 6px!important}
 body.chat-route .chat-reference-layout .chat-composer textarea{min-height:32px!important;padding:2px 3px 4px!important;line-height:1.6!important}
 .chat-reference-layout .chat-latest{bottom:128px}
 dialog.output-workspace-dialog-v122{padding:16px 12px 12px!important}
 .output-workspace-head{padding-inline-end:30px;margin-bottom:8px}
 .output-workspace-head .eyebrow{font-size:11px}.output-workspace-head h2{font-size:17px;line-height:1.6;margin:2px 0}.output-workspace-head p{font-size:11px;line-height:1.7;margin:3px 0}
 .outputs-mobile-select{font-size:12px;margin-bottom:8px;display:flex;align-items:center;gap:8px}
 .outputs-mobile-select select{flex:1;min-width:0;width:0;margin:0;min-height:40px}
 .output-workspace-toolbar{gap:5px;margin-bottom:8px}.output-workspace-toolbar strong{display:none}
 .output-workspace-toolbar button{font-size:11px;min-height:40px;padding:6px 4px}
 .output-workspace-tabs{margin-bottom:8px;padding:3px}.output-workspace-tabs button{min-height:36px}
 .output-editor-pane>label,.output-preview-pane>b{display:none}
 #outputs-editor,.output-workspace-preview{height:clamp(180px,calc(100dvh - 280px),65dvh);min-height:180px;padding:12px}
 #outputs-save-status{margin-top:6px;min-height:18px;font-size:11px}
 .details-group>.details-grid{padding:8px}.details-group>summary{padding:12px}.details-switch{min-height:60px}
}
@media(max-height:520px){
 .output-workspace-head p{display:none}
 #outputs-editor,.output-workspace-preview{min-height:140px}
 body.chat-route .chat-reference-layout .chat-composer-area{padding-block:4px!important}
}

.chat-reference-layout #chat-stream-preview .message-body{white-space:pre-wrap}
