/* Conversation typography, independent from dashboard and document previews. */
.workspace-stage>.chat-panel { --reading-width:880px; }
.chat-feed .message { margin-bottom:34px; }
.chat-feed .message.assistant { display:block; padding-top:2px; }
.chat-feed .message.assistant>.avatar { display:none; }
.chat-feed .message.assistant .bubble-wrap { width:100%; max-width:100%; }
.chat-feed .message-meta { display:flex; align-items:center; gap:9px; margin-bottom:12px; font-size:10px; color:var(--subtle); }
.chat-feed .message-meta strong { font-size:11px; color:var(--muted); font-weight:550; }
.chat-feed .message.user .message-meta { justify-content:flex-end; margin-bottom:7px; }
.chat-feed .message.user .message-meta strong { display:none; }
.chat-feed .message.user .bubble { padding:11px 17px; border:0; border-radius:19px; background:var(--surface-hover); font-size:14px; line-height:1.7; }
.chat-feed .message.assistant .bubble.md { font-size:15px; line-height:1.85; font-weight:400; letter-spacing:0; background:transparent; padding:0; border:0; box-shadow:none; }
.chat-feed .bubble.md p { margin:0 0 1.15em; line-height:1.85; }
.chat-feed .bubble.md :is(h1,h2,h3,h4) { font-weight:650; letter-spacing:-.025em; line-height:1.45; text-wrap:pretty; }
.chat-feed .bubble.md h1 { font-size:1.55em; margin:1.5em 0 .65em; }
.chat-feed .bubble.md h2 { font-size:1.3em; margin:1.65em 0 .65em; }
.chat-feed .bubble.md h3 { font-size:1.12em; margin:1.45em 0 .55em; }
.chat-feed .bubble.md h4 { font-size:1em; margin:1.3em 0 .5em; }
.chat-feed .bubble.md strong { font-weight:650; }
.chat-feed .bubble.md> :first-child { margin-top:0; }
.chat-feed .bubble.md> :last-child { margin-bottom:0; }
.chat-feed .bubble.md :is(ul,ol) { padding-left:1.65em; margin:.45em 0 1.2em; }
.chat-feed .bubble.md li { padding-left:.2em; margin:.48em 0; line-height:1.8; }
.chat-feed .bubble.md li::marker { color:var(--muted); font-variant-numeric:tabular-nums; }
.chat-feed .bubble.md li :is(ul,ol) { margin:.45em 0; }
.chat-feed .bubble.md blockquote { border-left:3px solid var(--border); margin:1.2em 0; padding:2px 0 2px 18px; color:var(--muted); }
.chat-feed .bubble.md hr { margin:1.8em 0; border-color:var(--border); }
.chat-feed .bubble.md a:not(.md-img):not(.md-file) { text-underline-offset:3px; text-decoration-thickness:1px; }
.chat-feed .bubble.md :not(pre)>code { font-size:.87em; padding:2px 6px; border:0; border-radius:5px; background:var(--surface-hover); color:var(--ink); }
.chat-feed .bubble.md .md-table { margin:1.1em 0 1.5em; overflow:auto; overscroll-behavior-x:contain; scrollbar-width:thin; border:1px solid var(--border); border-radius:11px; }
.chat-feed .bubble.md table { width:100%; border-collapse:separate; border-spacing:0; font-size:.88em; line-height:1.65; }
.chat-feed .bubble.md :is(th,td) { padding:12px 15px; min-width:110px; border:0; border-bottom:1px solid var(--border); line-height:1.65; }
.chat-feed .bubble.md :is(th,td):first-child { min-width:55px; }
.chat-feed .bubble.md th { background:var(--surface-alt); color:var(--ink); font-weight:600; white-space:nowrap; }
.chat-feed .bubble.md tr:last-child td { border-bottom:0; }
.chat-feed .bubble.md tbody tr:hover td { background:var(--surface-alt); }
.chat-feed .bubble.md .md-code-wrap { margin:1.2em 0 1.5em; border:1px solid var(--border); border-radius:12px; background:var(--surface-alt); }
.chat-feed .bubble.md .md-code-bar { min-height:40px; padding:7px 13px; background:var(--surface-hover); font-size:11px; border-bottom:1px solid var(--border); }
.chat-feed .bubble.md .md-code-lang { font-family:var(--font); font-weight:550; }
.chat-feed .bubble.md .md-code-btn { color:var(--muted); background:transparent; border:0; padding:3px 7px; font-size:11px; gap:6px; }
.chat-feed .bubble.md .md-code-btn:hover { background:var(--surface); color:var(--ink); }
.chat-feed .bubble.md .md-code-wrap pre { padding:17px 18px; border:0; margin:0; background:transparent; line-height:1.75; tab-size:2; scrollbar-width:thin; }
.chat-feed .bubble.md pre code { font-size:12.5px; line-height:1.75; color:var(--ink); }
.chat-feed .bubble.md .md-thought { margin:0 0 18px; font-size:12px; }
.chat-feed .bubble.md .response-duration { margin:0 0 18px; color:var(--muted); font-size:12px; line-height:1.6; }
.chat-feed .bubble.md .md-thought>summary { min-height:28px; gap:7px; font-size:12px; font-weight:400; }
.chat-feed .bubble.md .md-thought-body { max-height:300px; overflow:auto; margin-top:8px; padding:6px 0 6px 16px; font-size:13px; }
.chat-feed .bubble.md .md-thought-body p { line-height:1.75; }
.chat-feed .bubble.md .md-kpi-grid { gap:12px; margin:1.15em 0 1.5em; }
.chat-feed .bubble.md .md-kpi-card { background:var(--surface); box-shadow:none; border-radius:10px; padding:15px; }
.chat-feed .bubble.md .md-kpi-value { font-size:1.3em; font-weight:650; letter-spacing:-.03em; }
.chat-feed .bubble.md .md-pill { font-weight:550; font-size:.76em; }
.chat-feed .bubble.md .md-file-card { margin:.8em 0; border-radius:11px; box-shadow:none; }
.chat-feed .bubble.md .md-file-label { font-size:12px; font-weight:500; }
.chat-feed .bubble.md .md-file { font-size:12px; font-weight:550; }
.chat-feed .message-actions { display:flex; align-items:center; flex-wrap:wrap; gap:2px; margin-top:14px; margin-left:-6px; }
.chat-feed .message-actions .icon-btn { width:30px; min-width:30px; height:30px; border-radius:7px; color:var(--muted); }
.chat-feed .message-actions .icon-btn .app-icon { width:15px; height:15px; }
.chat-feed .message-actions .icon-btn:hover { color:var(--ink); background:var(--surface-hover); }
.chat-feed .message-actions .icon-btn.active { color:var(--accent); background:var(--accent-soft); }
.chat-feed .message-actions .msg-export-btn { font-size:10.5px; padding-inline:7px!important; gap:5px; }
.chat-feed .demo-inline { font-size:9px; color:var(--subtle); padding:0; background:transparent; margin-top:13px; }
.chat-feed .message.is-streaming .message-actions,.chat-feed .message.is-streaming .demo-inline { display:none; }
.chat-feed .live-message { margin-top:10px; }
.chat-feed .message.user .bubble-wrap { position:relative; }
.chat-feed .message.user .bubble { -webkit-touch-callout:none; }
.chat-feed .message.user .bubble:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.chat-feed .message.user .user-actions { position:absolute; right:0; top:100%; z-index:5; margin-top:5px; padding:3px; gap:2px; border:1px solid var(--border); border-radius:10px; background:var(--surface); box-shadow:0 4px 16px #00000012; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .12s; }
.chat-feed .message.user.user-actions-open .user-actions { opacity:1; visibility:visible; pointer-events:auto; }
.chat-feed .message.assistant + .live-message>.avatar { display:none; }
@media(max-width:760px) {
  :root[data-view="workspace"] .chat-feed .message { margin-bottom:28px; }
  :root[data-view="workspace"] .chat-feed .message.assistant .bubble.md { font-size:15px; line-height:1.8; }
  :root[data-view="workspace"] .chat-feed .message-actions .icon-btn { min-width:36px; width:36px; height:38px; }
  :root[data-view="workspace"] .chat-feed .message.user .bubble { font-size:14px; padding:10px 15px; }
  .chat-feed .bubble.md :is(th,td) { padding:10px 12px; min-width:100px; }
  .chat-feed .bubble.md .md-code-wrap pre { padding:14px; }
  .chat-feed .bubble.md .md-code-actions { gap:1px; }
}
