.assistant-workspace{grid-template-columns:minmax(300px,340px) minmax(0,1fr)}
.assistant-sources-heading{display:flex;align-items:center;gap:12px;padding:22px;cursor:pointer;list-style:none;border-bottom:1px solid var(--line)}
.assistant-sources-heading::-webkit-details-marker{display:none}
.assistant-sources-heading>span:first-child{flex:1;min-width:0}
.assistant-sources-heading strong{display:block;font-size:17px}
.assistant-sources-heading small{display:block;font-size:13px;color:#5c6f63;line-height:1.6;margin-top:7px}
.assistant-sources-heading .count-badge{white-space:nowrap;font-size:12px}
.sources-chevron{font-size:22px;transition:transform .15s}
.assistant-sources[open] .sources-chevron{transform:rotate(180deg)}
.assistant-source-controls{padding:18px 20px 0}
.assistant-source-controls .field{margin:0 0 12px}
.assistant-source-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px}
.assistant-source-tools .checkbox-label{font-size:13px;line-height:1.6;cursor:pointer;margin:0;min-height:36px}
.assistant-source-tools .text-link{background:none;border:0;padding:6px 0;color:var(--green);font:inherit;font-size:13px;cursor:pointer}
.assistant-source-tools .text-link:disabled{opacity:.55;cursor:default}
.assistant-selection-feedback{font-size:13px;color:#7b4e13;line-height:1.6;margin:9px 0 0}
.assistant-selection-feedback:empty{display:none}
.assistant-source-list{max-height:min(52vh,540px);overflow:auto;overscroll-behavior:contain;padding:16px 20px}
.assistant-source-group+.assistant-source-group{margin-top:24px}
.assistant-source-list h3{font-size:14px;margin:0 0 8px}
.source-option{padding:13px 8px;gap:12px;min-height:48px}
.assistant-source-list [data-source-row]{border:1px solid transparent;border-bottom-color:var(--line);border-radius:8px;margin-bottom:4px;transition:background .15s,border-color .15s}
.assistant-source-list [data-source-row]:hover{background:#f5f8f6}
.assistant-source-list [data-source-row]:has(input:checked){background:#edf6f1;border-color:#bfd9cd}
.assistant-source-list [data-source-row]:focus-within{outline:2px solid var(--green);outline-offset:2px}
.source-note-row .source-option{border:0}
.source-option input{width:18px;height:18px;margin-top:4px}
.source-option strong{font-size:14px;line-height:1.55}
.source-option small{font-size:12px;color:#5c6f63;line-height:1.6}
.source-note-row .text-link{font-size:12px;padding:10px 8px 10px 0}
.assistant-sources-footer{padding:16px 20px 20px;border-top:1px solid var(--line)}
.assistant-sources-footer .connection-note{padding:0;margin:13px 0 0;font-size:12px;line-height:1.7;color:#5c6f63}
.assistant-examples{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:22px}
.assistant-examples .button{white-space:normal;text-align:left;font-size:13px;line-height:1.5}
.assistant-question p,.assistant-answer-text{font-size:15px;line-height:1.8}
.assistant-question small,.assistant-answer>small{font-size:13px}
.assistant-citations>strong,.source-citation{font-size:12px}
.assistant-composer-actions small{font-size:12px;line-height:1.7;color:#5c6f63}
.assistant-context-note{font-size:13px;line-height:1.8;padding:13px 15px;background:#f4f7ed;border:1px solid #dbe5cb;border-radius:8px;color:#405331;margin:0 0 18px}
.assistant-pending{display:flex;align-items:center;gap:10px;margin:18px 0 0;font-size:13px;color:#405b4b;line-height:1.7}
.assistant-spinner{width:18px;height:18px;border:2px solid #d0dfd3;border-top-color:var(--green);border-radius:50%;animation:assistant-spin .9s linear infinite;flex:none}
.assistant-previous{margin-top:24px}
.assistant-previous>summary{padding:20px 24px;cursor:pointer;font-size:15px;font-weight:600}
.assistant-previous>summary .count-badge{margin-left:8px}
.assistant-previous-body{padding:0 24px 24px;max-height:600px;overflow:auto}
.assistant-workspace [hidden],.assistant-previous [hidden]{display:none!important}
.assistant-sources-heading:focus-visible,.assistant-previous>summary:focus-visible{outline:3px solid #317b4f;outline-offset:3px;border-radius:8px}
@keyframes assistant-spin{to{transform:rotate(360deg)}}
@media(max-width:1100px){.assistant-workspace{grid-template-columns:1fr;gap:18px}.assistant-sources-heading{padding:18px;gap:10px}.assistant-source-list{max-height:350px}}
@media(max-width:800px){.assistant-workspace{grid-template-columns:1fr}.assistant-sources-heading{flex-wrap:nowrap;gap:10px}.assistant-sources-heading>span:first-child{flex-basis:auto}.assistant-sources-heading small{display:none}.assistant-source-list{max-height:350px}.assistant-messages{min-height:230px}.assistant-examples{align-items:stretch;flex-direction:column}.assistant-examples .button{text-align:center}.assistant-previous-body{padding:0 18px 18px}.assistant-composer-actions .button{width:100%}.assistant-reset .button{min-height:44px}.source-note-row .text-link{padding:14px 0}}
@media(prefers-reduced-motion:reduce){.assistant-spinner{animation:none}.sources-chevron{transition:none}}
@media(max-width:800px){.assistant-messages{min-height:0}.assistant-messages .empty-state{padding:4px 0}.assistant-messages .empty-icon{display:none}.assistant-examples{margin-top:14px;gap:8px}}

/* Bring the source picker and question controls into the initial viewport. */
.assistant-content .assistant-workspace{grid-template-columns:minmax(290px,320px) minmax(0,1fr);gap:18px}
.assistant-content .assistant-sources-heading{padding:14px 18px;gap:10px}
.assistant-content .assistant-sources-heading strong{font-size:16px}
.assistant-content .assistant-sources-heading small{font-size:12px;margin-top:4px}
.assistant-content .assistant-source-controls{padding:12px 18px 0}
.assistant-content .assistant-source-controls .field{margin-bottom:8px}
.assistant-content .assistant-source-list{padding:8px 18px}
.assistant-content .assistant-source-group+.assistant-source-group{margin-top:18px}
.assistant-content .source-option{padding:10px 8px}
.assistant-content .assistant-sources-footer{padding:12px 18px 16px}
.assistant-content .assistant-sources-footer .connection-note{margin-top:10px}
.assistant-content .assistant-messages{padding:16px 18px;min-height:220px}
.assistant-content .assistant-messages-empty{min-height:0}
.assistant-content .assistant-messages .empty-state{padding:12px 0}
.assistant-content .assistant-messages .empty-icon{width:38px;height:38px;margin-bottom:10px;font-size:22px}
.assistant-content .assistant-messages .empty-state p{margin-bottom:12px;line-height:1.7}
.assistant-content .assistant-examples{margin-top:12px;gap:8px}
.assistant-content .assistant-examples .button{min-height:40px}
.assistant-content .assistant-composer{padding:16px 18px}
.assistant-content .assistant-composer textarea{min-height:96px}
.assistant-content .assistant-composer-actions{margin-top:12px}
.assistant-content .assistant-previous{margin-top:18px}
@media(max-width:1100px){.assistant-content .assistant-workspace{grid-template-columns:1fr}}
@media(max-width:800px){.assistant-content .assistant-workspace{grid-template-columns:1fr;gap:14px}.assistant-content .assistant-messages{min-height:0}.assistant-content .assistant-messages .empty-state{padding:4px 0}.assistant-content .assistant-examples .button{min-height:44px}.assistant-content .assistant-composer-actions .button{min-height:44px}}
