.nv-ai-chat-history{display:flex;flex-direction:column;gap:12px;min-width:0;width:100%}
.nv-ai-chat-turn{padding:12px 14px;border-radius:12px;background:var(--nuvile-paper,#fff);color:var(--nuvile-ink,#17354c);border:1px solid var(--nuvile-border,#d5e0ec);max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
.nv-ai-chat-turn.is-user{margin-left:24px;background:#eaf1ff;color:#17354c}
.nv-ai-chat-turn strong{font-size:12px}.nv-ai-chat-turn p{margin:6px 0 0;white-space:pre-wrap;line-height:1.5}
.nv-home .nv-home-ai-search.nv-ai-chat{display:flex!important;flex-direction:column!important;min-height:0}
.nv-home .nv-ai-chat [data-smart-home-results]{order:2!important;display:block!important;position:static!important;max-height:60dvh;overflow:auto;min-height:0;padding:8px!important}
.nv-home .nv-ai-chat [data-smart-home-form]{order:4!important;position:static!important;inset:auto!important;margin:8px 0 0!important;flex-shrink:0;box-sizing:border-box}
#nv-ai-dock .nv-ai-body{display:flex;flex-direction:column;min-height:0;overflow:hidden!important;flex:1}
#nv-ai-dock .nv-home-ai-search{display:flex!important;flex-direction:column!important;min-height:0;height:100%;width:100%;overflow:hidden}
#nv-ai-dock [data-smart-home-results]{order:2!important;flex:1 1 auto!important;overflow:auto!important;min-height:0;max-height:none!important;margin:0!important;padding:8px!important}
#nv-ai-dock [data-smart-home-form]{order:4!important;position:static!important;inset:auto!important;flex:0 0 auto!important;margin:6px 0 0!important;z-index:auto!important}
#nv-ai-dock .nv-home-ai-search>img,#nv-ai-dock .nv-home-ai-search>h1{display:none}
#nv-ai-dock .nv-home-ai-search>div:not([data-smart-home-results]){order:3}
#nv-ai-dock .nv-ai-context{font-size:12px;margin:8px 12px;flex-shrink:0}
#nv-ai-dock [data-smart-home-form] #nv-home-query{min-width:0;width:100%;font-size:16px;box-sizing:border-box}
#nv-ai-dock [data-smart-home-form]>button{min-height:38px;padding:7px}
html[data-nuvile-theme=dark] .nv-ai-chat-turn.is-user{background:#30465f;color:#f4f8ff}
@media(max-width:600px){#nv-ai-dock{max-height:calc(100dvh - 64px)!important}#nv-ai-dock [data-smart-home-form]{padding:6px!important}#nv-ai-dock .nv-home-conversation{padding:10px 2px!important}.nv-ai-chat-turn.is-user{margin-left:16px}}

/* A long conversation owns the available workspace height. Only its messages
   scroll; the composer remains in the flex footer, including at desktop scale. */
#home-page:has(#dashboard .nv-ai-chat [data-smart-home-results]:not([hidden])){display:flex;flex-direction:column;overflow:hidden}
#home-page #dashboard:has(.nv-ai-chat [data-smart-home-results]:not([hidden])){display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden;padding-bottom:8px}
#dashboard:has(.nv-ai-chat [data-smart-home-results]:not([hidden]))>.nv-home-main{width:100%;display:flex;flex-direction:column;flex:1 1 0;min-height:0}
#dashboard:has(.nv-ai-chat [data-smart-home-results]:not([hidden])) .nv-home-block,
#dashboard:has(.nv-ai-chat [data-smart-home-results]:not([hidden]))>.nv-home-foot{display:none}
#dashboard.nv-home .nv-home-ai-search.nv-ai-chat{flex:1 1 0;min-height:0;max-height:100%;width:100%;margin:8px auto 0;overflow:hidden;box-sizing:border-box}
#dashboard.nv-home .nv-ai-chat>.nv-home-wordmark{width:100px;height:34px;flex:none}
#dashboard.nv-home .nv-ai-chat>h1{font-size:18px;margin:2px 0;flex:none}
#dashboard.nv-home .nv-ai-chat [data-smart-home-results]{flex:1 1 0!important;min-height:0;max-height:none!important;overflow:auto!important;width:100%;margin:4px 0 0!important;overscroll-behavior:contain}
#dashboard.nv-home .nv-ai-chat [data-smart-home-form]{flex:0 0 auto!important;width:100%;max-width:900px;margin:8px auto 0!important;background:#fff}

/* Keep the query in exactly the same position before and during a conversation. */
#dashboard.nv-home .nv-home-ai-search{width:100%;margin:8px auto 0;box-sizing:border-box}
#dashboard.nv-home .nv-home-ai-search>.nv-home-wordmark{width:100px;height:34px;flex:none;order:0}
#dashboard.nv-home .nv-home-ai-search>h1{font-size:18px;margin:2px 0;flex:none;order:0}
#dashboard.nv-home .nv-home-ai-search [data-smart-home-form]{order:1!important;position:relative!important;inset:auto!important;flex:0 0 auto!important;width:100%;max-width:900px;margin:8px auto 0!important;background:#fff}
#dashboard.nv-home .nv-home-ai-search .nv-home-ideas{order:2;flex:none}
#dashboard.nv-home .nv-home-ai-search [data-smart-home-results]{order:3!important}
#nv-ai-dock [data-smart-home-form]{order:1!important}
#nv-ai-dock [data-smart-home-results]{order:3!important}

#dashboard.nv-home .nv-home-ai-search [data-smart-home-form]{padding:5px 6px 5px 42px;gap:9px}
#dashboard.nv-home .nv-home-ai-search>h1{text-align:center}

#dashboard.nv-home .nv-home-ai-search{gap:7px;padding:7px 16px 0}
#dashboard.nv-home .nv-home-ai-search>.nv-home-wordmark,#dashboard.nv-home .nv-home-ai-search>h1{display:block}
@media(max-width:720px){#dashboard.nv-home .nv-home-ai-search [data-smart-home-form] button{padding:0 11px;font-size:11px}}
