/* Chat inherits the workspace palette; the transcript, not extra cards, is the focus. */
.chat-experience.chat-room{padding:0;overflow:hidden;background:var(--surface);max-width:1040px;margin-inline:auto}
.chat-experience .chat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px 12px;border-bottom:0}
.chat-experience .chat-toolbar h2{font:600 18px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;margin:0}
.chat-experience .chat-toolbar p{font-size:12px;color:var(--ink-3);margin:5px 0 0}
.chat-experience .chat-context{margin:0;padding:0 24px 14px;border-bottom:1px solid var(--line)}
.chat-experience .chat-context p{max-width:72ch}
.chat-experience .chat-history-bar{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;padding:10px 16px;min-height:44px;background:var(--surface-2);font-size:12px;color:var(--ink-3)}
.chat-experience .chat-messages{display:block;position:relative;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;scrollbar-gutter:stable;min-height:280px;height:clamp(320px,55vh,580px);max-height:none;margin:0;padding:8px 24px 24px;outline-offset:-3px}
.chat-experience.chat-full .chat-messages{height:clamp(360px,62vh,760px)}
.chat-experience .chat-day{text-align:center;font-size:12px;color:var(--ink-3);padding:16px 0 8px}
.chat-experience .chat-message{max-width:78ch;margin:0 auto;padding:22px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;overflow-wrap:anywhere}
.chat-experience .chat-member .chat-markdown{background:var(--surface-2);padding:14px 18px;border-radius:10px}
.chat-experience .chat-byline{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin:0 0 12px;font-size:13px}
.chat-experience .chat-byline strong{font-weight:650}
.chat-experience .chat-byline span,.chat-experience .chat-byline time{font-size:11px;color:var(--ink-3)}
.chat-experience .chat-byline time{margin-left:auto}
.chat-experience .chat-markdown{font-size:15px;line-height:1.75;min-width:0}
.chat-experience .chat-markdown>:first-child{margin-top:0}
.chat-experience .chat-markdown>:last-child{margin-bottom:0}
.chat-experience .chat-markdown p{margin:0 0 14px}
.chat-experience .chat-markdown :is(h1,h2,h3,h4,h5,h6){font-family:inherit;font-weight:650;line-height:1.35;letter-spacing:normal;margin:22px 0 12px}
.chat-experience .chat-markdown h1{font-size:24px}.chat-experience .chat-markdown h2{font-size:21px}.chat-experience .chat-markdown :is(h3,h4,h5,h6){font-size:17px}
.chat-experience .chat-markdown :is(ul,ol){padding-left:25px;margin:10px 0 16px}
.chat-experience .chat-markdown li{padding-left:3px;margin:5px 0}
.chat-experience .chat-markdown li>p{margin:0 0 6px}
.chat-experience .chat-markdown blockquote{margin:16px 0;padding:2px 0 2px 16px;border-left:3px solid var(--accent);color:var(--ink-2)}
.chat-experience .chat-markdown a{color:var(--accent-hover);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.chat-experience .chat-markdown hr{border:0;border-top:1px solid var(--line);margin:22px 0}
.chat-experience .chat-markdown code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.88em;background:var(--surface-2);padding:2px 5px;border-radius:4px}
.chat-experience .chat-code{margin:16px 0;border:1px solid var(--line-2);border-radius:8px;overflow:hidden;max-width:100%}
.chat-experience .chat-code-bar{display:flex;align-items:center;justify-content:space-between;padding:7px 12px;background:var(--surface-2);font-size:12px;color:var(--ink-2);border-bottom:1px solid var(--line)}
.chat-experience .chat-markdown pre{margin:0;padding:14px;overflow-x:auto;white-space:pre;max-width:100%;line-height:1.6;background:var(--bg)}
.chat-experience .chat-markdown pre code{padding:0;background:none;border-radius:0;font-size:13px}
.chat-experience .chat-table{overflow-x:auto;max-width:100%;margin:16px 0;border:1px solid var(--line-2);border-radius:6px}
.chat-experience .chat-table table{border-collapse:collapse;min-width:100%;font-size:13px;white-space:normal}
.chat-experience .chat-table :is(th,td){text-align:left;vertical-align:top;padding:10px 12px;border:1px solid var(--line);min-width:110px}
.chat-experience .chat-table th{background:var(--surface-2);font-weight:600}
.chat-experience .chat-message-actions{display:flex;gap:8px;margin-top:12px}
.chat-experience .text-button{font-size:12px;min-height:32px;padding:5px 8px}
.chat-experience .chat-routing{margin-top:16px;padding:12px 14px;background:var(--accent-tint);border-left:3px solid var(--accent);font-size:13px}
.chat-experience .chat-routing p{margin:6px 0}
.chat-experience .chat-message-meta .panel-caption{border:0;padding:0;margin:12px 0;font-size:12px}
.chat-experience .chat-sources{margin-top:12px;font-size:12px}
.chat-experience .chat-sources summary{cursor:pointer}
.chat-experience .chat-sources blockquote{white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0;padding-left:12px;border-left:2px solid var(--line-2);font-size:13px;line-height:1.65}
.chat-experience .chat-sources a{text-decoration:underline}
.chat-experience .chat-pending{font-size:13px;color:var(--ink-3);margin:8px 0}
.chat-experience .chat-latest-row{display:flex;justify-content:center;min-height:0;background:var(--surface)}
.chat-experience #chat-latest{margin:8px 0}
.chat-experience #chat-status{margin:0;padding:0 24px;font-size:12px;color:var(--ink-3)}
.chat-experience #chat-status:not(:empty){padding-block:10px}
.chat-experience #chat-compose{padding:16px 24px;background:var(--surface);border-top:1px solid var(--line)}
.chat-experience #chat-compose>.field{display:block;margin:0 0 8px;font-size:12px;font-weight:600}
.chat-experience #chat-draft{display:block;width:100%;min-height:80px;max-height:220px;resize:vertical;border:1px solid var(--line-2);border-radius:8px;padding:12px 14px;background:var(--bg);color:var(--ink);font-size:15px;line-height:1.6}
.chat-experience .chat-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:10px}
.chat-experience .chat-compose-footer p{font-size:11px;color:var(--ink-3);line-height:1.5;margin:0;max-width:48ch}
.chat-experience .chat-compose-footer button{flex-shrink:0}
.chat-experience .chat-copy-status{font-size:12px;color:var(--accent-hover);margin:0;padding:0 24px}
.chat-experience .chat-copy-status:not(:empty){padding-bottom:12px}
.chat-experience .chat-welcome{padding:60px 12px;text-align:center}
.chat-experience .chat-welcome h3{font-size:22px;font-family:var(--font-editorial);margin:0 0 12px}
.chat-experience .chat-welcome p{font-size:14px;line-height:1.7;max-width:42ch;margin-inline:auto}
#chat-copy-fallback{min-height:240px}
@media(max-width:650px){
 .chat-experience .chat-toolbar{padding:16px;gap:10px;align-items:flex-start}
 .chat-experience .chat-toolbar h2{font-size:16px}.chat-experience .chat-toolbar .button{font-size:12px;padding:7px 10px}
 .chat-experience .chat-context{padding:0 16px 12px}
 .chat-experience .chat-messages{padding:4px 16px 16px;height:52vh;min-height:300px}
 .chat-experience.chat-full .chat-messages{height:58vh;min-height:300px}
 .chat-experience .chat-message{padding:18px 0}.chat-experience .chat-byline{gap:5px}.chat-experience .chat-byline time{flex-basis:100%;margin:0}
 .chat-experience .chat-markdown{font-size:15px}.chat-experience .chat-member .chat-markdown{padding:12px}
 .chat-experience #chat-compose{padding:14px 16px}.chat-experience #chat-draft{font-size:16px}
 .chat-experience .chat-compose-footer{align-items:flex-end}.chat-experience .chat-compose-footer p{font-size:10px}
 .chat-experience #chat-status,.chat-experience .chat-copy-status{padding-inline:16px}
}
/* Keep the composer in view in the dedicated conversation. */
.chat-experience.chat-full{display:flex;flex-direction:column;height:calc(100dvh - 224px);min-height:480px}
.chat-experience.chat-full .chat-messages{flex:1;min-height:120px;height:auto}
.chat-experience.chat-full>:not(.chat-messages){flex-shrink:0}
@media(max-width:650px){.chat-experience.chat-full{height:calc(100dvh - 180px);min-height:480px}}
.chat-experience [hidden]{display:none!important}
.chat-experience.chat-full .chat-toolbar{padding:10px 24px}
.chat-experience.chat-full .chat-toolbar h2{font-size:14px}
.chat-experience.chat-full .chat-toolbar p{display:none}
.chat-experience.chat-full #chat-compose{padding-block:10px}
.chat-experience.chat-full #chat-draft{min-height:60px;height:60px}
.chat-experience.chat-full .chat-messages{min-height:80px}
@media(max-width:650px){.chat-experience.chat-full{height:calc(100dvh - 320px);min-height:520px;overflow:visible}}
