/* One reading treatment for answers in Explore, expert, and method dialogues. */
.chat-message.assistant.ai-reading-message { max-width: 900px; }
.chat-message.assistant > .ai-answer-surface {
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px 17px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
}

:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
}
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body > :first-child { margin-top: 0; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body > :last-child { margin-bottom: 0; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body :is(h1, h2, h3) {
    color: #1e293b;
    line-height: 1.4;
    margin: 1.25em 0 .55em;
    font-weight: 700;
}
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body h1 { font-size: 1.25rem; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body h2 { font-size: 1.1rem; padding-bottom: 6px; border-bottom: 1px solid #e2e8f0; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body h3 { font-size: 1rem; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body p { margin: .65em 0; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body :is(ul, ol) { margin: .55em 0 .8em; padding-left: 1.5em; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body li { margin: .38em 0; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body blockquote {
    margin: .8em 0;
    padding: 9px 12px;
    border-left: 3px solid #818cf8;
    border-radius: 0 8px 8px 0;
    background: #eef2ff;
    color: #475569;
}
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body hr { border: 0; border-top: 1px solid #e2e8f0; margin: 1.1em 0; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body code { padding: 2px 5px; border-radius: 5px; background: #e2e8f0; color: #be123c; font-size: .9em; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body pre { overflow-x: auto; padding: 12px; border-radius: 9px; background: #1e293b; color: #e2e8f0; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body pre code { padding: 0; background: transparent; color: inherit; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body { overflow-x: auto; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body table {
    display: table;
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: .9em 0;
    font-size: 13px;
}
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body :is(th, td) {
    padding: 8px 9px;
    border: 1px solid #dbe3ef;
    text-align: left;
    vertical-align: top;
    white-space: normal;
}
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body th { background: #eef2ff; color: #3730a3; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body a { color: #4f46e5; text-decoration: none; }
:is(.topic-message.assistant, .chat-bubble, .method-artifact-host, .trial-output) .ai-answer-body a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .chat-message.assistant > .ai-answer-surface { padding: 13px 12px; }
}
