/* Scoped Assist conversation candidate. Global Dealer navigation and legacy Assist are unchanged. */
#nexus-kb-assist{--assist-muted:#526078;min-width:0;color:#14233c}
#nexus-kb-assist[hidden],#nexus-assist[hidden],#kb-return[hidden]{display:none}
#nexus-kb-assist,#nexus-kb-assist *{text-transform:none;box-sizing:border-box}
#nexus-kb-assist [hidden]{display:none!important}
#nexus-kb-assist .assist-subtitle{font-size:13px;margin:0 0 14px}
#nexus-kb-assist .assist-layout{display:grid;grid-template-columns:clamp(160px,15vw,204px) minmax(0,1fr);gap:24px;height:calc(100dvh - 208px);min-height:460px}
#nexus-kb-assist .assist-sidebar{display:block;padding-right:16px;overflow:auto;border-right:1px solid #e3e8ef;scrollbar-width:thin}
#nexus-kb-assist .assist-list-top{gap:12px;margin-bottom:14px}
#nexus-kb-assist .assist-list-top h2{font-size:12px}
#nexus-kb-assist .assist-conversation{min-height:52px;padding:10px;font-size:13px;line-height:1.45}
#nexus-kb-assist .assist-conversation span{font-weight:500}
#nexus-kb-assist .assist-conversation small{font-size:10px}
#nexus-kb-assist .assist-mobile-toolbar{display:none}
#nexus-kb-assist .assist-workspace{height:100%;min-height:0;max-width:none;display:grid;grid-template-columns:minmax(0,1fr);gap:20px;overflow:visible;padding:0}
#nexus-kb-assist .kb-chat-column{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative;height:100%}
#nexus-kb-assist .assist-thread-heading{flex:none;margin:0 0 12px;min-height:54px;align-items:center}
#nexus-kb-assist .assist-thread-heading h2{font-size:15px;line-height:1.5;margin:0 0 2px;max-height:46px;overflow:hidden}
#nexus-kb-assist .assist-thread-heading small{font-size:11px}
#nexus-kb-assist .assist-transcript{min-height:88px;min-width:0;flex:1;display:flex;flex-direction:column;gap:22px;overflow:auto;overscroll-behavior:contain;overflow-anchor:none;scroll-behavior:auto;scrollbar-width:thin;padding:8px 12px 20px 0;margin:0!important}
#nexus-kb-assist .assist-message{width:100%;max-width:84ch;flex:none;min-width:0}
#nexus-kb-assist .assist-answer{align-self:flex-start;text-align:left;padding:0}
#nexus-kb-assist .assist-user{align-self:flex-end;width:auto;max-width:84%;background:#f3f6fa;padding:12px 16px;border-radius:16px 16px 4px 16px}
#nexus-kb-assist .assist-speaker{font-size:11px;margin:0 0 5px;font-weight:500}
#nexus-kb-assist .assist-answer-text{font-size:14px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere}
#nexus-kb-assist .assist-message>.button{min-height:36px;padding:6px 8px;font-size:11px;margin:4px 0 0 -8px}
#nexus-kb-assist .assist-photos{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;margin:10px 0 2px}
#nexus-kb-assist .assist-photos button{width:76px;height:76px;flex:none;border-radius:8px;overflow:hidden}
#nexus-kb-assist .assist-photos img{width:100%;height:100%;aspect-ratio:1;object-fit:cover;max-height:none}
#nexus-kb-assist .assist-empty{flex:1;min-height:120px;max-width:560px;gap:12px;margin:0 auto;align-items:flex-start}
#nexus-kb-assist .assist-empty h2{font-size:26px}
#nexus-kb-assist .assist-empty p{font-size:14px}
#nexus-kb-assist .assist-empty small{font-size:11px;margin-top:4px}
#nexus-kb-assist .assist-symbol{font-size:32px}
#nexus-kb-assist .assist-composer{position:relative;flex:none;margin:0;border:1px solid #cbd5e1;border-radius:14px;padding:10px 12px;background:#fff;box-shadow:0 3px 18px #17385b06;z-index:2}
#nexus-kb-assist .assist-composer:focus-within{border-color:#0649e8;box-shadow:0 0 0 2px #0649e814}
#nexus-kb-assist .assist-composer>label{font-size:11px;margin-bottom:4px}
#nexus-kb-assist #kb-question{display:block;min-height:38px;max-height:180px;padding:5px 0;resize:none;border:0;box-shadow:none;font-size:16px;line-height:1.5;overflow-y:auto}
#nexus-kb-assist #kb-question:focus{outline:none}
#nexus-kb-assist .assist-privacy{margin:4px 0 8px;font-size:10px;line-height:1.45}
#nexus-kb-assist .assist-compose-actions{gap:8px}
#nexus-kb-assist .assist-compose-actions>.button{margin-left:auto}
#nexus-kb-assist .assist-compose-actions>span{font-size:10px}
#nexus-kb-assist .assist-compose-actions .button{min-height:44px;padding:8px 12px;font-size:12px}
#nexus-kb-assist .assist-drafts{display:flex;flex-wrap:wrap;gap:8px;max-height:96px;overflow:auto;margin:8px 0}
#nexus-kb-assist .assist-drafts:empty{display:none}
#nexus-kb-assist .assist-drafts figure{width:60px;flex:none;padding-top:4px}
#nexus-kb-assist .assist-drafts img{height:56px;width:56px;object-fit:cover}
#nexus-kb-assist .assist-drafts figure>.button{min-width:32px;min-height:32px;width:32px;height:32px;right:0;top:0;font-size:16px}
#nexus-kb-assist .assist-drafts figcaption{font-size:10px}
#nexus-kb-assist .kb-web-control{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:4px;margin-top:4px;font-size:10px;color:#526078}
#nexus-kb-assist .kb-web-control label{display:flex;align-items:center;gap:5px;min-height:32px}
#nexus-kb-assist .kb-web-control small{font-size:9px}
#nexus-kb-assist [data-kb=latest]{position:absolute;bottom:calc(var(--assist-composer-height,184px) + 12px);align-self:center;min-height:44px;padding:8px 14px;background:#fff;box-shadow:0 2px 10px #17385b12;font-size:12px;z-index:3}
#nexus-kb-assist .assist-working{font-size:12px;min-height:30px;padding:6px 0}
#nexus-kb-assist .assist-error{font-size:13px;padding:10px 12px;margin:0 0 10px}
#nexus-kb-assist .kb-error-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
#nexus-kb-assist .kb-error-actions span{flex:1;min-width:150px}
#nexus-kb-assist .kb-error-actions button{flex:none;min-height:44px}
#nexus-kb-assist .kb-overview-host{display:contents}
#nexus-kb-assist .kb-overview-panel{position:absolute;top:0;right:0;bottom:auto;left:auto;width:196px;max-width:100%;border:1px solid #e0e7f0;border-radius:12px;padding:0;z-index:4;background:#fff;box-shadow:none;overflow:hidden}
#nexus-kb-assist .assist-plan-toggle{min-height:54px;padding:10px 12px;line-height:1.5;background:#f8faff;font-size:12px;color:#17304f}
#nexus-kb-assist .kb-overview-progress{display:block;font-size:10px;font-weight:400;color:#64748b;margin-top:2px}
#nexus-kb-assist .kb-overview-chevron{flex:none;transition:transform 300ms cubic-bezier(.22,1,.36,1)}
#nexus-kb-assist .is-open .kb-overview-chevron{transform:rotate(180deg)}
#nexus-kb-assist .kb-overview-body{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows 320ms cubic-bezier(.22,1,.36,1),opacity 200ms ease}
#nexus-kb-assist .is-open .kb-overview-body{grid-template-rows:1fr;opacity:1}
#nexus-kb-assist .kb-overview-clip{min-height:0;overflow:hidden}
#nexus-kb-assist .kb-overview-scroll{max-height:max(80px,min(58dvh,560px,var(--kb-overview-space,560px)));overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:6px 12px 12px}
#nexus-kb-assist .kb-facts-heading,#nexus-kb-assist .kb-checklist-heading h3{font-size:11px;margin:8px 0;color:#526078;font-weight:600}
#nexus-kb-assist .kb-case-details{margin:8px 0 18px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
#nexus-kb-assist .kb-case-details>div{min-width:0;border-radius:4px}
#nexus-kb-assist .kb-case-type{grid-column:1/-1}
#nexus-kb-assist .kb-case-details dt{color:#64748b;font-size:10px;line-height:1.5}
#nexus-kb-assist .kb-case-details dd{margin:3px 0 0;color:#14233c;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#nexus-kb-assist .kb-case-type dd{font-weight:600;color:#0649e8}
#nexus-kb-assist .kb-case-value{display:block}
#nexus-kb-assist .kb-case-status{display:block;font-size:10px;color:#64748b;margin-top:2px}
#nexus-kb-assist [data-state=CONFLICT] .kb-case-status,#nexus-kb-assist [data-state=UNCLEAR] .kb-case-status{color:#925800}
#nexus-kb-assist .kb-checklist-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
#nexus-kb-assist .kb-checklist-count,#nexus-kb-assist .kb-checklist-empty{font-size:11px;color:#64748b}
#nexus-kb-assist .kb-overview-checks{list-style:none;padding:0;margin:4px 0 0;max-height:none;overflow:visible}
#nexus-kb-assist .kb-overview-checks li{display:block;border:0;padding:4px 0;margin:0}
#nexus-kb-assist .kb-check-row{display:flex;align-items:flex-start;gap:2px}
#nexus-kb-assist .kb-check-circle{display:grid;place-items:center;flex:none;width:44px;min-width:44px;height:44px;min-height:44px;border:0;border-radius:50%;padding:0;background:transparent;color:#60718b;cursor:pointer}
#nexus-kb-assist .kb-check-circle:hover{background:#edf3ff}
#nexus-kb-assist .kb-check-dot{width:14px;height:14px;border-radius:50%;border:1.5px solid #8493a8;background:transparent;transition:background-color 280ms ease,border-color 280ms ease}
#nexus-kb-assist li[data-status=DONE] .kb-check-dot{background:#8b96a7;border-color:#8b96a7}
#nexus-kb-assist .kb-check-detail-toggle{flex:1;min-width:0;min-height:44px;text-align:left;font:inherit;font-size:12px;line-height:1.5;border:0;background:none;padding:6px 0;cursor:pointer}
#nexus-kb-assist .kb-check-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#26364e;text-decoration:line-through;text-decoration-color:transparent;text-decoration-thickness:1px;transition:color 300ms ease,text-decoration-color 300ms ease}
#nexus-kb-assist li[data-status=DONE] .kb-check-text{color:#64748b;text-decoration-color:#8591a2}
#nexus-kb-assist .kb-check-status{display:block;font-size:10px;color:#64748b;margin-top:2px}
#nexus-kb-assist .kb-check-detail{margin:4px 0 6px 44px;padding:8px;border-radius:6px;background:#f7f9fc}
#nexus-kb-assist .kb-check-detail p{font-size:12px;line-height:1.6;white-space:pre-wrap;margin:0 0 6px}
#nexus-kb-assist .kb-check-detail small{font-size:10px;line-height:1.5;color:#64748b}
#nexus-kb-assist .kb-overview-announcement{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#nexus-kb-assist button:focus-visible,#nexus-kb-assist .assist-file:focus-within{outline:2px solid #0649e8;outline-offset:2px}
#nexus-assist .assist-sources{display:none}
.kb-image-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0;font-size:12px}
.kb-image-thumbs{display:flex;flex-wrap:wrap;gap:8px}
.kb-image-thumbs button{border:2px solid transparent;background:none;border-radius:8px;padding:2px;width:60px;height:60px;cursor:pointer}
.kb-image-thumbs button[aria-pressed=true]{border-color:#0649e8}
.kb-image-thumbs img{width:100%;height:100%;object-fit:cover;border-radius:4px}
.kb-image-viewer button:focus-visible{outline:2px solid #0649e8;outline-offset:2px}
.kb-image-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:55dvh;overflow:auto}
.kb-image-comparison figure{min-width:0;margin:0}
.kb-image-comparison img{width:100%;object-fit:contain;max-height:240px}
.kb-image-comparison figcaption{font-size:11px;color:#526078;margin-top:4px}
@media(min-width:1280px){
 #nexus-kb-assist .assist-workspace:has(.kb-overview-panel.is-open:not([hidden])){grid-template-columns:minmax(0,1fr) clamp(230px,19vw,280px)}
 #nexus-kb-assist .kb-overview-panel.is-open{position:relative;grid-column:2;grid-row:1;align-self:start;width:auto;max-width:none}
 #nexus-kb-assist .assist-workspace:has(.kb-overview-panel:not(.is-open):not([hidden])) .assist-thread-heading{padding-right:212px}
 #nexus-kb-assist .assist-workspace:has(.kb-overview-panel.is-open) .assist-transcript{padding-right:10px}
}
@media(max-width:1279px){
 #nexus-kb-assist .assist-layout{grid-template-columns:160px minmax(0,1fr);gap:16px}
 #nexus-kb-assist .assist-workspace{gap:0}
 #nexus-kb-assist .kb-overview-panel{position:relative;width:auto;grid-row:1;grid-column:1;margin-bottom:10px}
 #nexus-kb-assist .kb-chat-column{grid-row:2}
 #nexus-kb-assist .assist-workspace:has(.kb-overview-panel:not([hidden])){grid-template-rows:auto minmax(0,1fr)}
 #nexus-kb-assist .kb-overview-panel .assist-plan-toggle{min-height:48px}
 #nexus-kb-assist .kb-overview-scroll{max-height:max(80px,min(34dvh,260px,var(--kb-overview-space,260px)))}
 #nexus-kb-assist .kb-overview-progress{display:inline;margin-left:8px}
 #nexus-kb-assist .kb-case-details{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){
 #nexus-kb-assist .assist-layout{display:block;height:calc(100dvh - 270px);min-height:430px}
 #nexus-kb-assist .assist-sidebar{display:none}
 #nexus-kb-assist .assist-mobile-toolbar{display:flex;gap:10px;margin-bottom:12px;justify-content:space-between}
 #nexus-kb-assist .assist-mobile-toolbar .button{flex:1;min-height:44px;font-size:12px}
 #nexus-kb-assist .kb-overview-panel{grid-row:2;margin:8px 0 0;border-radius:12px}
 #nexus-kb-assist .kb-chat-column{grid-row:1}
 #nexus-kb-assist .assist-workspace:has(.kb-overview-panel:not([hidden])){grid-template-rows:minmax(0,1fr) auto}
 #nexus-kb-assist .kb-chat-column .assist-composer{order:4}
 #nexus-kb-assist .kb-overview-scroll{max-height:max(80px,min(30dvh,240px,var(--kb-overview-space,240px)))}
}
@media(max-width:600px){
 #nexus-kb-assist .assist-layout{height:calc(100dvh - 240px);min-height:420px}
 #nexus-kb-assist .assist-empty h2{font-size:23px}
 #nexus-kb-assist .assist-empty p{font-size:13px}
 #nexus-kb-assist .assist-thread-heading{min-height:40px;margin:0 0 6px}
 #nexus-kb-assist .assist-thread-heading h2{font-size:13px;max-height:36px}
 #nexus-kb-assist .assist-transcript{padding-right:0;gap:18px}
 #nexus-kb-assist .assist-answer-text{font-size:14px}
 #nexus-kb-assist .assist-user{max-width:94%;padding:10px 12px}
 #nexus-kb-assist .assist-photos button{width:64px;height:64px}
 #nexus-kb-assist .assist-message>.button{min-height:44px}
 #nexus-kb-assist .assist-composer{padding:8px 10px;border-radius:12px}
 #nexus-kb-assist #kb-question{max-height:112px;min-height:34px}
 #nexus-kb-assist .kb-web-control small{display:none}
 #nexus-kb-assist .kb-web-control label{min-height:44px;font-size:11px}
 #nexus-kb-assist .assist-drafts figure{width:64px}
 #nexus-kb-assist .assist-drafts figure>.button{width:44px;height:44px;min-width:44px;min-height:44px}
 #nexus-kb-assist .kb-case-details{grid-template-columns:1fr 1fr}
 #nexus-kb-assist .kb-overview-progress{display:block;margin:2px 0 0}
 #nexus-kb-assist .kb-overview-scroll{max-height:max(80px,min(24dvh,180px,var(--kb-overview-space,180px)))}
}
@media(prefers-reduced-motion:reduce){#nexus-kb-assist .kb-overview-body,#nexus-kb-assist .kb-overview-chevron,#nexus-kb-assist .kb-check-dot,#nexus-kb-assist .kb-check-text{transition:none}}

/* Mobile Plan is a docked, collapsible sheet immediately above the composer. */
@media(max-width:900px){
 #nexus-kb-assist .assist-workspace:has(.kb-overview-panel:not([hidden])){grid-template-rows:minmax(0,1fr)}
 #nexus-kb-assist .kb-overview-panel{flex:none;margin:6px 0 8px;grid-row:auto;max-width:100%}
 #nexus-kb-assist .kb-chat-column{grid-row:1}
 #nexus-kb-assist .kb-chat-column .assist-composer{order:0}
}

/* Reclaim the available workspace width only while the Assist QA view is active. */
.main-content:has(>#nexus-kb-assist:not([hidden])){max-width:none}

@media(max-width:900px){
 #nexus-kb-assist [data-kb=latest]{bottom:calc(var(--assist-composer-height,184px) + var(--assist-plan-height,0px) + 20px)}
}

/* Collected facts and remaining intake are distinct from physical CHECK actions. */
#nexus-kb-assist .kb-intake-section{margin-top:16px;border-top:1px solid #e1e8f3;padding-top:12px}
#nexus-kb-assist .kb-intake-section h3{font-size:12px;font-weight:600;margin:0 0 10px}
#nexus-kb-assist .kb-intake-details{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 14px}
#nexus-kb-assist .kb-intake-details div{min-width:0}
#nexus-kb-assist .kb-intake-details dt{font-size:11px;color:#64748b}
#nexus-kb-assist .kb-intake-details dd{margin:3px 0 0;font-size:12px;overflow-wrap:anywhere}
#nexus-kb-assist .kb-intake-pending{list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;margin:0;padding:0}
#nexus-kb-assist .kb-intake-pending li{font-size:11px;min-width:0;overflow-wrap:anywhere;line-height:1.5}
#nexus-kb-assist .kb-intake-pending [data-state=PROVIDED]{color:#64748b}
#nexus-kb-assist .kb-web-control{justify-content:flex-end}

#nexus-kb-assist .kb-overview-panel[data-has-checks=false] .kb-intake-section{margin:0 0 14px;border-top:0;padding-top:0}

/* All status symbols use Lucide, including collected facts and confirmed checks. */
#nexus-kb-assist .kb-check-dot{display:grid;place-items:center;width:18px;height:18px;border:0;background:none!important}
#nexus-kb-assist .kb-check-dot .assist-icon{width:18px;height:18px;opacity:.65}
#nexus-kb-assist .kb-intake-pending li{display:flex;align-items:flex-start;gap:6px}
#nexus-kb-assist .kb-intake-pending .assist-icon{width:14px;height:14px;margin-top:1px;opacity:.65}
#nexus-kb-assist .kb-overview-chevron{display:inline-flex}

#nexus-kb-assist .kb-intake-details .kb-measurement{grid-column:1 / -1}
#nexus-kb-assist .kb-intake-details .kb-measurement small{display:block;margin-top:3px;color:#64748b;font-size:10px}
