/* UI13 only: the answer stays readable; optional tools open on demand. */
html[data-ui-variant="13"] .messages.has-conversation :is(.welcome-block,.conversation-intro){display:none}
html[data-ui-variant="13"] .messages{padding:16px 20px 24px;scroll-padding-top:16px}
html[data-ui-variant="13"] .message{margin-bottom:28px}
html[data-ui-variant="13"] .message .bubble{font:400 16px/1.65 Onest,Arial,sans-serif;color:var(--chat-ink, #f6f2f4);overflow-wrap:anywhere}
html[data-ui-variant="13"] .message.user{margin-left:40px;margin-bottom:28px}
html[data-ui-variant="13"] .message.user .bubble{font-size:15px;line-height:1.5;padding:12px 16px}
html[data-ui-variant="13"] .answer-body{max-width:65ch}
html[data-ui-variant="13"] .answer-body p{white-space:pre-wrap;margin:0 0 16px}
html[data-ui-variant="13"] .answer-body p:last-child{margin-bottom:0}
html[data-ui-variant="13"] :is(.answer-notices,.answer-attention){color:var(--chat-warning, #efce97);font-size:14px;line-height:1.6;margin:0 0 16px;white-space:pre-wrap}
html[data-ui-variant="13"] .answer-notices p{margin:0 0 8px}
html[data-ui-variant="13"] .answer-attention{margin-top:16px}
html[data-ui-variant="13"] .answer-plan{margin-top:18px;border-block:1px solid var(--chat-line, #443c42)}
html[data-ui-variant="13"] :is(.answer-plan,.answer-rating)>summary{min-height:44px;padding:10px 0;font:550 14px/1.6 Onest,Arial,sans-serif;color:var(--chat-muted, #e4ced8);cursor:pointer;overflow-wrap:anywhere}
html[data-ui-variant="13"] .answer-plan .action-plan{border:0;margin:0;padding:4px 0 18px}
html[data-ui-variant="13"] .answer-plan .action-plan h3{font-size:16px;margin-top:0}
html[data-ui-variant="13"] .answer-plan :is(.action-plan__summary,.action-plan__steps li,.action-plan__steps span){font-size:14px;line-height:1.65}
html[data-ui-variant="13"] .answer-tools{display:flex;align-items:flex-start;flex-wrap:wrap;gap:0 14px;margin-top:12px}
html[data-ui-variant="13"] .answer-tools .response-actions{border:0;margin:0;padding:0;gap:8px;align-items:center}
html[data-ui-variant="13"] .response-action{font-size:13px;min-height:44px;margin:0;padding:8px 0;color:var(--chat-muted, #cfc4cb)}
html[data-ui-variant="13"] .response-action--share{width:44px;justify-content:center}
html[data-ui-variant="13"] .response-action--share span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
html[data-ui-variant="13"] .answer-rating{flex:1;min-width:120px}
html[data-ui-variant="13"] .answer-rating[open]{flex-basis:100%}
html[data-ui-variant="13"] .answer-feedback{border:0;margin:0;padding:0 0 8px}
html[data-ui-variant="13"] .answer-feedback__heading{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
html[data-ui-variant="13"] .answer-rating>summary{font-size:13px;font-weight:400;color:var(--chat-muted, #cfc4cb)}
html[data-ui-variant="13"] .answer-tools :is(button,summary):focus-visible,html[data-ui-variant="13"] .answer-plan>summary:focus-visible{outline:2px solid var(--chat-focus, #ecd296);outline-offset:3px}
html[data-ui-variant="13"] .composer{border-top:1px solid var(--chat-line, #383238);padding-top:12px}
html[data-ui-variant="13"] .composer textarea{border-color:var(--chat-line, #766570)}
html[data-ui-variant="13"] .ui13-privacy{font-size:11px;color:var(--chat-muted, #c7bbc3);padding-inline:20px}
@media(max-width:360px){html[data-ui-variant="13"] .messages{padding-inline:16px}html[data-ui-variant="13"] .answer-tools{gap:0 8px}}
@media(prefers-reduced-motion:reduce){html[data-ui-variant="13"] .messages{scroll-behavior:auto}}

/* One semantic palette for the entire conversation, including nested controls. */
html[data-ui-variant="13"] body.student-app{--chat-ink:#29232a;--chat-muted:#695c67;--chat-bg:#fff;--chat-soft:#f5f0f3;--chat-line:#d9cdd4;--chat-accent:#70283d;--chat-user:#642336;--chat-user-ink:#fff8fa;--chat-warning:#805018;--chat-focus:#81364f;--chat-success:#27613f}
html[data-ui-variant="13"][data-theme=dark] body.student-app{--chat-ink:#f5eff3;--chat-muted:#c5b7c2;--chat-bg:#1b191d;--chat-soft:#2b252d;--chat-line:#665560;--chat-accent:#f1bed0;--chat-user:#eed3de;--chat-user-ink:#431727;--chat-warning:#f0cc92;--chat-focus:#f1bed0;--chat-success:#afe0bd}
html[data-ui-variant="13"] body.student-app .chat-surface{color:var(--chat-ink);isolation:isolate}
html[data-ui-variant="13"] body.student-app .messages{padding:24px 22px 28px;scrollbar-width:thin;scrollbar-color:var(--chat-line) transparent}
html[data-ui-variant="13"] body.student-app .message{margin-bottom:30px;min-width:0}
html[data-ui-variant="13"] body.student-app .message.user{display:flex;justify-content:flex-end;margin-left:30px}
html[data-ui-variant="13"] body.student-app .message.user .bubble{max-width:92%;border-radius:22px 22px 6px 22px;padding:13px 17px;background:var(--chat-user)!important;color:var(--chat-user-ink)!important;box-shadow:none}
html[data-ui-variant="13"] body.student-app .message.assistant .avatar{display:grid;place-items:center;width:30px;height:30px;margin-bottom:12px;border-radius:11px;background:var(--chat-soft);color:var(--chat-accent);font:700 14px Onest,Arial,sans-serif}
html[data-ui-variant="13"] body.student-app .message.assistant .bubble{color:var(--chat-ink)!important;font-size:16px;line-height:1.7}
html[data-ui-variant="13"] body.student-app .message .bubble a{color:var(--chat-accent);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
html[data-ui-variant="13"] body.student-app .message.user .bubble a{color:inherit}
html[data-ui-variant="13"] body.student-app :is(.answer-notices,.answer-attention){color:var(--chat-warning);padding:10px 14px;border-left:3px solid currentColor;background:var(--chat-soft);border-radius:0 10px 10px 0}
html[data-ui-variant="13"] body.student-app :is(.answer-plan,.action-plan,.answer-feedback){border-color:var(--chat-line);color:var(--chat-ink);background:transparent}
html[data-ui-variant="13"] body.student-app :is(.answer-plan summary,.answer-rating summary,.response-action,.answer-feedback__details summary,.action-plan__summary,.action-plan__steps span,.action-plan__documents,.answer-feedback__details label){color:var(--chat-muted)}
html[data-ui-variant="13"] body.student-app :is(.action-plan h3,.action-plan__steps strong,.answer-feedback__heading){color:var(--chat-ink)}
html[data-ui-variant="13"] body.student-app .answer-tools{gap:6px 16px;margin-top:16px;padding-top:8px;border-top:1px solid var(--chat-line)}
html[data-ui-variant="13"] body.student-app :is(.answer-feedback__vote,.action-plan__more,.follow-up,.action-plan__save){background:var(--chat-soft);color:var(--chat-accent);border:1px solid var(--chat-line);border-radius:12px;min-height:44px}
html[data-ui-variant="13"] body.student-app .answer-feedback__vote[aria-pressed=true]{background:var(--chat-user);color:var(--chat-user-ink);border-color:var(--chat-user)}
html[data-ui-variant="13"] body.student-app .answer-feedback__status{color:var(--chat-success)}
html[data-ui-variant="13"] body.student-app .answer-feedback.has-error .answer-feedback__status{color:var(--chat-warning)}
html[data-ui-variant="13"] body.student-app .answer-feedback__details :is(textarea,select){background:var(--chat-soft)!important;color:var(--chat-ink)!important;border-color:var(--chat-line)!important}
html[data-ui-variant="13"] body.student-app .answer-feedback__details textarea::placeholder{color:var(--chat-muted)}
html[data-ui-variant="13"] body.student-app .composer{margin:0 14px 6px;padding:8px!important;gap:4px;border:1px solid var(--chat-line)!important;border-radius:28px;background:var(--chat-soft)!important;box-shadow:0 4px 20px #22101c0a;transition:border-color 160ms ease,box-shadow 160ms ease}
html[data-ui-variant="13"] body.student-app .composer:focus-within{border-color:var(--chat-focus)!important;box-shadow:0 0 0 2px var(--chat-bg),0 0 0 4px var(--chat-focus)}
html[data-ui-variant="13"] body.student-app .composer textarea{background:transparent!important;color:var(--chat-ink)!important;border:0!important;border-radius:20px;padding:12px 10px;outline:none}
html[data-ui-variant="13"] body.student-app .composer textarea::placeholder{color:var(--chat-muted);opacity:1}
html[data-ui-variant="13"] body.student-app .composer button{background:var(--chat-user);color:var(--chat-user-ink);border-radius:50%;transition:transform 160ms ease}
html[data-ui-variant="13"] body.student-app .composer button:active:not(:disabled){transform:scale(.94)}
html[data-ui-variant="13"] body.student-app .ui13-privacy{color:var(--chat-muted)!important;line-height:1.5;padding:4px 24px 12px;font-size:12px;text-align:center}
html[data-ui-variant="13"] body.student-app :is(.sources-drawer,.source-card){background:var(--chat-bg)!important;color:var(--chat-ink)!important;border-color:var(--chat-line)!important}
html[data-ui-variant="13"] body.student-app :is(.source-card p,.source-assurance,.sources-empty,.drawer-header p){color:var(--chat-muted)}
html[data-ui-variant="13"] body.student-app .source-card a{color:var(--chat-accent)}
html[data-ui-variant="13"] body.student-app .chat-surface :is(button,summary,a,select):focus-visible{outline:2px solid var(--chat-focus);outline-offset:3px}
html[data-ui-variant="13"] body.student-app :is(.action-plan__actions button,.action-plan__actions a,.action-plan__followups button){color:var(--chat-accent);border-color:var(--chat-line);background:var(--chat-soft);border-radius:12px;min-height:44px;padding:10px 12px}
html[data-ui-variant="13"] body.student-app :is(.action-plan__followups>span,.thinking-step){color:var(--chat-muted)}
html[data-ui-variant="13"] body.student-app .action-plan__prepare{border-color:var(--chat-line)}
@media(max-width:360px){html[data-ui-variant="13"] body.student-app .messages{padding-inline:16px}html[data-ui-variant="13"] body.student-app .message.user{margin-left:16px}}
@media(prefers-reduced-motion:reduce){html[data-ui-variant="13"] body.student-app .composer,html[data-ui-variant="13"] body.student-app .composer button{transition:none}}
