#nexus-assist{--assist-muted:#526078;min-width:0;color:var(--ink,#0b1220)}
.assist-subtitle{color:var(--assist-muted);margin:0 0 28px}.assist-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:32px;min-height:65vh}.assist-sidebar{padding-right:24px;border-right:1px solid var(--divider,#e3e8ef)}.assist-list-top{display:grid;gap:16px;margin-bottom:20px}.assist-list-top h2{font-size:14px;margin:0;color:var(--assist-muted)}.assist-list-top .button{width:100%}.assist-conversation{width:100%;border:0;background:none;text-align:left;padding:12px;border-radius:8px;cursor:pointer;display:grid;gap:5px;margin-bottom:5px;min-height:64px;color:inherit;font:inherit;overflow-wrap:anywhere}.assist-conversation:hover{background:#edf3ff}.assist-conversation.selected{background:#eaf0ff;color:#0649e8}.assist-conversation span{font-weight:600}.assist-conversation small{color:var(--assist-muted)}.assist-workspace{min-width:0;max-width:880px;position:relative}.assist-thread-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:24px}.assist-thread-heading h2{font-size:20px;line-height:1.3;margin:0 0 6px;overflow-wrap:anywhere}.assist-thread-heading small,.assist-muted{color:var(--assist-muted)}.assist-thread-heading .button{flex-shrink:0}.assist-empty{min-height:470px;max-width:560px;margin:0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:16px}.assist-empty h2{font-size:30px;letter-spacing:-.025em;line-height:1.2;margin:0}.assist-empty p{font-size:16px;line-height:1.65;color:var(--assist-muted);margin:0}.assist-empty small{color:var(--assist-muted);margin-top:16px}.assist-symbol{font-size:40px;color:#0649e8}.assist-transcript{display:grid;gap:28px;padding-bottom:28px}.assist-message{font-size:15px;line-height:1.65;overflow-wrap:anywhere;min-width:0}.assist-message h3{font-size:13px;color:#0649e8;margin:0 0 10px}.assist-message h4{font-size:14px;margin:18px 0 6px}.assist-message p{white-space:pre-wrap;margin:0 0 12px}.assist-user{background:#f3f6fa;padding:18px 20px;border-radius:12px}.assist-user h3{color:#526078}.assist-message li{margin-bottom:6px}.assist-conclusion{color:#526078}.assist-sources{margin-top:16px;font-size:13px}.assist-sources summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:#0649e8}.assist-sources ul{padding:0;list-style:none}.assist-sources li{display:grid;gap:5px;padding:14px 0;border-top:1px solid #e3e8ef}.assist-sources span,.assist-sources small{color:#526078}.assist-composer{position:sticky;bottom:0;background:white;padding:18px 0 max(20px,env(safe-area-inset-bottom));border-top:1px solid #e3e8ef;z-index:2}.assist-composer>label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}.assist-composer textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:90px;max-height:260px;border:1px solid #8290a5;border-radius:10px;padding:12px;font:inherit;font-size:16px;line-height:1.5}.assist-privacy{font-size:12px;line-height:1.5;color:#526078;margin:10px 0}.assist-compose-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.assist-compose-actions>span{font-size:12px;color:#526078;flex:1}.assist-compose-actions .button{min-height:44px}.assist-file{position:relative;overflow:hidden;cursor:pointer}.assist-file input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.assist-composer>small{display:block;color:#526078;font-size:11px;margin-top:10px}.assist-drafts,.assist-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:10px;margin:12px 0;max-width:540px}.assist-drafts figure{margin:0;position:relative}.assist-drafts img,.assist-photos img{display:block;aspect-ratio:1;width:100%;object-fit:cover;border-radius:8px}.assist-drafts figure .button{position:absolute;right:-4px;top:-4px;width:44px;height:44px;min-width:44px;padding:0;border-radius:50%;background:white}.assist-drafts figcaption{font-size:11px;color:#526078}.assist-photos button{border:0;background:none;padding:0;cursor:pointer;min-height:44px}.assist-working{font-size:13px;color:#0649e8;padding:12px 0}.assist-error{padding:14px 16px;background:#fff2ee;color:#7a271a;border-radius:8px;margin-bottom:20px;line-height:1.5}.assist-retention{padding:16px;background:#f3f6fa;font-size:13px;line-height:1.6;border-radius:8px}.assist-summary{margin:24px 0 32px;padding:22px;background:#f8faff;border-radius:12px;overflow-wrap:anywhere}.assist-summary-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}.assist-summary-heading h2{font-size:20px;margin:0}.assist-summary dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0}.assist-summary dt{font-size:12px;color:#526078}.assist-summary dd{margin:5px 0 0;font-size:14px;white-space:pre-wrap}.assist-summary h3{font-size:14px}.assist-summary p{font-size:13px;white-space:pre-wrap}.assist-lightbox{display:block;max-width:100%;max-height:70dvh;object-fit:contain;margin:auto}.assist-mobile-toolbar{display:none}.assist-conversation:focus-visible,#nexus-assist button:focus-visible,.assist-file:focus-within{outline:2px solid #0649e8;outline-offset:3px}
@media(max-width:1100px){.assist-layout{display:block}.assist-sidebar{display:none}.assist-mobile-toolbar{display:flex;gap:12px;justify-content:space-between;margin:0 0 24px}.assist-mobile-toolbar .button{flex:1}.assist-workspace{max-width:none}.assist-empty{min-height:420px}}
@media(max-width:600px){.assist-subtitle{margin-bottom:18px}.assist-thread-heading{flex-direction:column;gap:12px}.assist-thread-heading .button{align-self:flex-end}.assist-empty{min-height:340px;padding:10px 0}.assist-empty h2{font-size:26px}.assist-empty p{font-size:15px}.assist-summary{padding:16px}.assist-summary-heading{align-items:flex-start;flex-direction:column}.assist-summary dl{grid-template-columns:1fr}.assist-user{padding:14px}.assist-composer{padding-top:14px}.assist-compose-actions{gap:8px}.assist-compose-actions .button{font-size:12px;padding:10px}.assist-mobile-toolbar .button{font-size:12px;padding:10px}.assist-drafts,.assist-photos{grid-template-columns:repeat(3,minmax(0,1fr));max-width:300px}}

#nexus-assist,#nexus-assist *{text-transform:none}

.assist-draft-preview{display:block;width:100%;padding:0;border:0;background:none;cursor:pointer}

.assist-workspace{display:flex;flex-direction:column}.assist-transcript{flex:1}.assist-composer{margin-top:auto}

.assist-file[aria-disabled="true"]{opacity:.55;cursor:not-allowed}

/* Phase 6B: one scrollable conversation; secondary floating plan. */
.assist-layout{height:calc(100dvh - 220px);min-height:530px;gap:24px}.assist-workspace{height:100%;max-width:none;overflow:hidden;padding-right:6px}.assist-thread-heading{margin-bottom:14px;flex:none}.assist-transcript{overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:24px;min-height:100px;padding:12px 12px 28px 0;scroll-behavior:smooth}.assist-message{max-width:780px;width:100%;align-self:center;flex:none}.assist-user{max-width:75%;width:auto;align-self:flex-end;border-radius:18px 18px 4px 18px;padding:12px 16px}.assist-speaker{display:block;font-size:12px;color:#526078;font-weight:600;margin-bottom:7px}.assist-answer-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.75}.assist-message>.button{border:0;background:transparent;font-size:12px;padding:7px 12px;min-height:40px;color:#526078}.assist-composer{position:relative;bottom:auto;flex:none;margin-top:0;border:1px solid #cbd5e1;border-radius:16px;padding:12px 16px;background:#fff;box-shadow:0 4px 20px #17385b08}.assist-composer textarea{border:0;min-height:58px;padding:5px 0;resize:none}.assist-composer textarea:focus{outline:none}.assist-composer:focus-within{border-color:#0649e8;box-shadow:0 0 0 2px #0649e814}.assist-composer>label{font-size:12px;color:#526078}.assist-privacy{margin:6px 0;font-size:11px}.assist-composer>small{font-size:10px;margin:5px 0 0}.assist-working{margin:0;font-size:12px;padding:8px 0;min-height:22px}.assist-plan{position:absolute;right:18px;bottom:240px;width:280px;max-width:calc(100% - 24px);z-index:4;background:#fff;border:1px solid #d5deea;border-radius:12px;box-shadow:0 8px 30px #10284d15;overflow:hidden}.assist-plan-toggle{display:flex;justify-content:space-between;gap:12px;align-items:center;width:100%;min-height:48px;padding:12px 14px;border:0;background:#f7f9fd;color:#17304f;font:inherit;font-size:12px;font-weight:600;text-align:left;cursor:pointer}.assist-plan ol{max-height:36dvh;overflow:auto;padding:0 16px 0 32px;margin:12px 0}.assist-plan li{padding:8px 0;border-bottom:1px solid #e3e8ef;font-size:12px}.assist-plan li small{display:block;color:#526078;margin-bottom:5px}.assist-plan li strong{font-size:13px}.assist-plan li p{line-height:1.5;margin:6px 0}.assist-plan li[data-status=DONE] small{color:#13764b}[data-assist=latest]{position:absolute;bottom:208px;align-self:center;font-size:11px;min-height:32px;background:#fff}.assist-sidebar{overflow:auto}.assist-empty{min-height:320px}.assist-summary{flex:none;max-height:45dvh;overflow:auto}.assist-retention{flex:none;margin:4px 0 10px}.assist-error{flex:none}.assist-drafts{max-height:130px;overflow:auto;grid-template-columns:repeat(9,minmax(40px,1fr));max-width:none}.assist-drafts figure .button{min-width:28px;width:28px;height:28px}.assist-drafts img{max-height:70px}.assist-thread-heading h2{font-size:17px}.assist-subtitle{margin-bottom:18px}
@media(max-width:1100px){.assist-layout{height:calc(100dvh - 285px);min-height:520px}.assist-mobile-toolbar{margin-bottom:14px}}
@media(max-width:600px){.assist-layout{height:calc(100dvh - 240px);min-height:480px}.assist-workspace{padding-right:0}.assist-thread-heading{flex-direction:row;align-items:center;gap:8px}.assist-thread-heading h2{font-size:14px}.assist-thread-heading .button{font-size:11px;padding:8px;min-height:40px}.assist-thread-heading small{font-size:10px}.assist-composer{padding:10px;border-radius:12px}.assist-user{max-width:90%;padding:10px 12px}.assist-answer-text{font-size:14px}.assist-plan{right:6px;bottom:234px;width:260px}.assist-plan.is-open{position:fixed;bottom:0;left:0;right:0;width:auto;max-width:none;border-radius:18px 18px 0 0;padding-bottom:env(safe-area-inset-bottom);z-index:30}.assist-plan.is-open ol{max-height:46dvh}.assist-drafts{grid-template-columns:repeat(5,minmax(36px,1fr));max-height:140px}[data-assist=latest]{bottom:201px}.assist-message{max-width:100%}.assist-compose-actions>span{font-size:10px}.assist-sources li{overflow-wrap:anywhere}.assist-summary{max-height:40dvh}}
@media(prefers-reduced-motion:reduce){.assist-transcript{scroll-behavior:auto}}

/* Measured composer height keeps secondary controls clear of image drafts and wrapping. */
.assist-plan{bottom:calc(var(--assist-composer-height,220px) + 50px)}
[data-assist=latest]{bottom:calc(var(--assist-composer-height,220px) + 8px)}
.assist-workspace [data-assist=latest][hidden]{display:none}
.assist-transcript{padding-bottom:112px}
@media(min-width:1101px){.assist-workspace:has(.assist-plan.is-open) .assist-transcript{padding-right:304px}}
@media(max-width:1100px){.assist-plan.is-open{position:fixed;bottom:0;left:0;right:0;width:auto;max-width:none;border-radius:18px 18px 0 0;padding-bottom:env(safe-area-inset-bottom);z-index:30}.assist-plan.is-open ol{max-height:46dvh}}
#nexus-assist #assist-text{border:0;box-shadow:none}#nexus-assist #assist-text:focus{outline:none}#assist-text::placeholder{text-transform:none}

/* Keep the compact plan in its own gap above the composer, including 320 px screens. */
.assist-workspace:has(.assist-plan) .assist-transcript{margin-bottom:72px;padding-bottom:12px}
.assist-plan{bottom:calc(var(--assist-composer-height,220px) + 12px)}
.assist-workspace [data-assist=latest]{bottom:calc(var(--assist-composer-height,220px) + 84px)}
@media(max-width:600px){.assist-layout{height:calc(100dvh - 310px);min-height:330px}.assist-transcript{min-height:56px}.assist-composer textarea{height:58px;font-size:13px;line-height:1.5}}
@media(max-width:1100px){.assist-plan.is-open{bottom:0}}

/* Empty upload trays reserve no space; keep several chat lines visible on narrow screens. */
.assist-drafts:empty{display:none}
@media(max-width:400px){#nexus-assist #assist-text{font-size:14px;min-height:44px;height:44px}.assist-transcript{min-height:88px}}

@media(max-width:400px){.assist-layout{height:calc(100dvh - 294px)}}

/* Shared QA and canonical Saved sidebar. Lucide assets are local and pinned. */
.assist-icon{display:inline-block;width:18px;height:18px;flex:none;vertical-align:middle;object-fit:contain}
:is(#nexus-kb-assist,#nexus-assist) .button,#modal .button:has(.assist-icon){display:inline-flex;align-items:center;justify-content:center;gap:8px}
.assist-symbol .assist-icon{width:32px;height:32px;filter:invert(22%) sepia(94%) saturate(5420%) hue-rotate(223deg) brightness(93%) contrast(112%)}
.assist-recent h2{font-size:11px;font-weight:500;color:#64748b;margin:18px 8px 8px}
:is(#nexus-kb-assist,#nexus-assist) .assist-sidebar .assist-list-top{margin-bottom:8px}
:is(#nexus-kb-assist,#nexus-assist,#modal) .assist-conversation{display:flex;align-items:center;gap:9px;min-height:44px;padding:9px 8px;margin:0 0 2px}
:is(#nexus-kb-assist,#nexus-assist,#modal) .assist-conversation>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;font-weight:400}
.assist-conversation small{display:block;font-size:10px;font-weight:400;margin-top:3px}
.assist-saved-section{margin-top:14px}
:is(#nexus-kb-assist,#nexus-assist,#modal) [data-kb=saved]{display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;min-height:44px;border:0;background:transparent;padding:9px 8px;text-align:left;font-size:11px;font-weight:500;color:#526078;border-radius:8px}
[data-kb=saved] .assist-icon{width:14px;height:14px;transform:rotate(-90deg);transition:transform 140ms ease}
[data-kb=saved][aria-expanded=true] .assist-icon{transform:rotate(0)}
[data-kb=saved]:hover{background:#f3f6fa}
.assist-saved-list[hidden]{display:none!important}
.assist-saved-list .assist-muted{font-size:12px;margin:8px;line-height:1.6}
#nexus-assist .assist-layout{grid-template-columns:clamp(160px,15vw,204px) minmax(0,1fr);gap:24px}
#nexus-assist .assist-sidebar{padding-right:16px}
#nexus-assist .assist-workspace{max-width:none}
@media(max-width:900px){#nexus-assist .assist-layout{display:block}}
@media(prefers-reduced-motion:reduce){[data-kb=saved] .assist-icon{transition:none}}

:is(#nexus-kb-assist,#nexus-assist) .button.primary .assist-icon{filter:invert(1)}

.assist-recent h2,:is(#nexus-kb-assist,#nexus-assist,#modal) [data-kb=saved]{font-size:12px}
