/* Shared product experience. Scoped selectors also cover legacy Blade styles. */
html body { --qx-bg:#f7f8fc; --qx-line:#e6e8f0; --qx-muted:#667085; }
html[data-qfx-theme="dark"] body { --qx-bg:#10121a; --qx-surface:#181b25; --qx-surface-2:#202430; --qx-line:#303545; --qx-ink:#f0f2f8; --qx-muted:#a5adbf; }
html body :is(button,a,input,select,textarea,summary):focus-visible { outline:3px solid #818cf8; outline-offset:3px; }
html body:not(.qfx-user-workspace) :is(.qx-card,.dash-card,.aim-card,.aim-model,.imglib-card) { border-radius:18px!important; box-shadow:0 4px 20px rgba(16,24,40,.035)!important; }
html body:not(.qfx-user-workspace) :is(.qx-btn,.qfp-btn,.aim-btn) { font-weight:650!important; transition:background .18s,box-shadow .18s,transform .18s; }
html body:not(.qfx-user-workspace) :is(.qx-btn,.qfp-btn,.aim-btn):hover { transform:translateY(-1px); }
html body:not(.qfx-user-workspace) .qx-shell-topbar { background:var(--qx-surface)!important; border-bottom:1px solid var(--qx-line); box-shadow:none!important; }
html body:not(.qfx-user-workspace) .qx-sidebar { border-radius:18px!important; background:var(--qx-surface)!important; border:1px solid var(--qx-line)!important; }
html body:not(.qfx-user-workspace) .qx-sidebar-link { font-weight:600!important; border-radius:10px!important; }
html body:not(.qfx-user-workspace) .qx-sidebar-link.active { background:color-mix(in srgb,var(--qx-blue) 9%,var(--qx-surface))!important; box-shadow:none!important; }
/* Preserve the established user shell; make its main destination easy to find. */
html body.qfx-user-workspace .qx-sidebar-link.qfx-sidebar-chat { border-color:color-mix(in srgb,var(--qx-blue) 28%,var(--qx-line)); background:color-mix(in srgb,var(--qx-blue) 7%,var(--qx-surface)); }
html body.qfx-user-workspace .qx-sidebar-link.qfx-sidebar-chat .label { color:var(--qx-blue); }
html body.qfx-user-workspace .qx-mobile-tabbar .qfx-mobile-chat:not(.active) { color:var(--qx-blue); background:color-mix(in srgb,var(--qx-blue) 9%,var(--qx-surface)); border:1px solid color-mix(in srgb,var(--qx-blue) 22%,var(--qx-line)); }
@media(max-width:575px) {
    html body.qfx-user-workspace .user-top-inner { padding:0 10px; gap:8px; }
    html body.qfx-user-workspace .user-top-inner .qfx-tool-finder-trigger { display:none; }
    html body.qfx-user-workspace .qfx-primary-chat-link { padding:8px 10px; white-space:nowrap; font-size:13px; }
    html body.qfx-user-workspace .user-top-inner .dropdown-toggle { padding:5px; }
    html body.qfx-user-workspace .user-top-inner .dropdown-toggle:after { display:none; }
}
/* Public homepage: quieter typography and a clearer primary action. */
html body .qfp-home .qfp-hero-immersive { background:#111c34!important; }
html body .qfp-home .qfp-hero-backdrop { opacity:.2!important; filter:saturate(.4); }
html body .qfp-home .qfp-title-xl { font-size:clamp(38px,5.3vw,72px)!important; line-height:1.08!important; letter-spacing:-.05em!important; font-weight:650!important; max-width:790px; }
html body .qfp-home .qfp-lead { font-weight:400!important; line-height:1.75; max-width:640px; }
html body .qfp-home :is(.qfp-product-card,.qfp-info-card,.qfp-plan) { border-radius:18px!important; box-shadow:0 4px 24px rgba(16,24,40,.04)!important; }
/* Account pages keep the existing authentication and security controls. */
html body.qfp-auth-route .qfp-auth-shell { max-width:1120px; border-radius:24px!important; box-shadow:0 24px 80px rgba(16,24,40,.08)!important; overflow:hidden; }
html body.qfp-auth-route .qfp-auth-story { background:linear-gradient(145deg,#121d35,#303668)!important; padding:48px!important; }
html body.qfp-auth-route .qfp-auth-story h1 { font-size:clamp(30px,3vw,44px)!important; letter-spacing:-.04em; line-height:1.15; font-weight:600!important; }
html body.qfp-auth-route .qfp-auth-story p { font-weight:400!important; line-height:1.8; color:#c9cfdf!important; }
html body.qfp-auth-route .qfp-auth-panel { padding:44px!important; }
html body.qfp-auth-route .qfp-auth-panel h2 { font-size:29px!important; font-weight:650!important; letter-spacing:-.035em; }
html body.qfp-auth-route .qfp-auth-panel .qfp-control { border-radius:12px!important; font-weight:450!important; min-height:50px; }
html body.qfp-auth-route .qfp-auth-panel .qfp-label { text-transform:none!important; font-weight:600!important; letter-spacing:0!important; font-size:13px; }
html body.qfp-auth-route .qfp-auth-panel .sub { font-weight:400!important; line-height:1.65; }
html body .qfxAuthCaps { font-size:12px; color:#b45309; margin-top:6px; }
html body .qfxAuthCaps[hidden] { display:none; }
/* Chat: spacious readable thread, restrained chrome, stable composer. */
html body.qfx-chat-mode .qfxChatWrap { --qfx-chat-line:min(880px,100%); }
html body .qfxChatWrap :is(.qfxChatShell,.qfxMain,.qfxMsgs) { background:var(--qx-surface,#fff)!important; }
html body .qfxChatWrap .qfxSide { background:var(--qx-bg)!important; border-color:var(--qx-line)!important; }
html body .qfxChatWrap .qfxSideList { display:flex!important; flex-direction:column; gap:6px; justify-content:flex-start!important; }
html body .qfxChatWrap .qfxConv { flex:0 0 auto!important; min-height:0!important; padding:12px!important; }
html body .qfxChatWrap .qfxConvGroupLabel { flex:0 0 auto; margin:8px 0 2px; }
html body .qfxChatWrap .qfxTop { box-shadow:none!important; background:var(--qx-surface)!important; border-color:var(--qx-line)!important; }
html body .qfxChatWrap .qfxTopTitle { font-size:16px!important; font-weight:650!important; }
html body .qfxChatWrap :is(.qfxBubble,.qfxBubble p,.qfxBubble li) { font-weight:400!important; line-height:1.8!important; font-size:15px; }
html body .qfxChatWrap .qfxMeta { opacity:.78; font-weight:450!important; }
html body .qfxChatWrap .qfxWorkspaceEmpty h2 { font-size:clamp(26px,3vw,38px)!important; letter-spacing:-.035em; font-weight:600!important; }
html body .qfxChatWrap :is(.qfxStarter,.qfx-chat-companion-action) { border-radius:14px!important; box-shadow:none!important; font-weight:550!important; }
html body .qfxChatWrap .qfxComposer { background:var(--qx-surface)!important; padding-top:12px!important; }
html body .qfxChatWrap #qfxForm.qfx-compact-composer { border-radius:22px!important; background:var(--qx-surface)!important; border:1px solid var(--qx-line)!important; box-shadow:0 6px 28px rgba(16,24,40,.06)!important; }
html body .qfxChatWrap #qfxForm.qfx-compact-composer:focus-within { border-color:#a5b4fc!important; box-shadow:0 0 0 3px rgba(99,102,241,.07)!important; }
html body .qfxChatWrap #qfxInput { background:transparent!important; color:var(--qx-ink)!important; font-weight:400!important; line-height:1.6!important; }
html body .qfc :is(.panel,.msgs) { background:var(--qx-surface)!important; }
html body .qfc #qfcFrm.qfc-compact-composer { border-radius:22px!important; background:var(--qx-surface)!important; border-color:var(--qx-line)!important; box-shadow:0 6px 28px rgba(16,24,40,.06)!important; }
html body .qfc #qfcInp { background:transparent!important; font-weight:400!important; line-height:1.6!important; }
/* Marketing brief folds away so long threads keep their writing space. */
html body .qfxCreativeBrief { width:min(880px,100%); margin:0 auto 10px; border:1px solid var(--qx-line); border-radius:14px; background:var(--qx-surface); color:var(--qx-ink); }
html body .qfxCreativeBrief summary { display:flex; align-items:center; gap:9px; padding:11px 14px; font-size:13px; font-weight:600; cursor:pointer; list-style:none; }
html body .qfxCreativeBrief summary::-webkit-details-marker { display:none; }
html body .qfxCreativeBrief summary i { color:#6366f1; }
html body .qfxCreativeBrief summary span { margin-left:auto; font-size:11px; color:var(--qx-muted); font-weight:400; }
html body .qfxBriefBody { padding:0 14px 14px; max-height:38dvh; overflow:auto; }
html body .qfxBriefBody p { font-size:12px; color:var(--qx-muted); margin:10px 0; line-height:1.6; }
html body .qfxBriefPresets { display:flex; flex-wrap:wrap; gap:6px; }
html body .qfxBriefPresets button { background:var(--qx-surface-2); color:var(--qx-ink); border:1px solid var(--qx-line); padding:7px 10px; border-radius:8px; font-size:12px; }
html body .qfxBriefPresets button:hover { border-color:#818cf8; }
html body .qfxBriefGrid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
html body .qfxBriefGrid label { display:grid; gap:4px; min-width:0; font-size:11px; font-weight:600; }
html body .qfxBriefGrid :is(input,select) { width:100%; min-width:0; border:1px solid var(--qx-line); color:var(--qx-ink); background:var(--qx-surface); padding:8px 10px; border-radius:8px; font-size:13px; font-weight:400; }
html body .qfxBriefGrid input[type="color"] { height:36px; padding:4px; }
html body .qfxBriefWide { grid-column:1/-1; }
html body .qfxBriefFooter { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:10px; font-size:11px; color:var(--qx-muted); }
html body .qfxBriefFooter button { border:0; background:transparent; color:var(--qx-blue); white-space:nowrap; }
html body .aim-model-summary { line-height:1.6; }
html body .aim-live-dot { background:#94a3b8; box-shadow:none; }
html body .aim-discovery-status:has(.aim-model-pills) .aim-live-dot { background:#10b981; }
@media(max-width:600px) { html body.qfp-auth-route .qfp-auth-panel { padding:24px!important; } html body .qfxCreativeBrief summary span { display:none; } html body .qfxBriefBody { max-height:25dvh; } }
@media(prefers-reduced-motion:reduce) { html body *,html body *::before,html body *::after { scroll-behavior:auto!important; transition:none!important; animation-duration:.01ms!important; animation-iteration-count:1!important; } }
