.session-view:not(.terminal-mode) .output {
  white-space: normal;
  overflow: visible;
  font-size: 16px;
  line-height: 1.8;
}
.output > :first-child {
  margin-top: 0;
}
.output > :last-child {
  margin-bottom: 0;
}
.output p,
.output ul,
.output ol,
.output blockquote {
  margin: 0 0 18px;
}
.output p {
  white-space: pre-line;
}
.output h2,
.output h3,
.output h4,
.output h5 {
  line-height: 1.5;
  letter-spacing: -0.02em;
  margin: 26px 0 12px;
  font-weight: 650;
}
.output h2 {
  font-size: 22px;
}
.output h3 {
  font-size: 19px;
}
.output h4,
.output h5 {
  font-size: 17px;
}
.output ul,
.output ol {
  padding-left: 24px;
}
.output li {
  padding-left: 3px;
  margin: 7px 0;
}
.output li::marker {
  color: var(--blue);
  font-weight: 600;
}
.output a {
  color: #1259a3;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.output strong {
  font-weight: 650;
}
.output code {
  font:
    0.88em/1.65 "SFMono-Regular",
    Consolas,
    monospace;
  background: #eef2f7;
  color: #344e73;
  border-radius: 5px;
  padding: 2px 5px;
  overflow-wrap: anywhere;
}
.output blockquote {
  padding: 4px 0 4px 16px;
  border-left: 3px solid #91abc4;
  color: var(--muted);
}
.output hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.message-table {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #d5e1ed;
  border-radius: 12px;
}
.message-table:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.message-table table {
  border-collapse: collapse;
  width: 100%;
  min-width: 0;
  font-size: 14px;
  line-height: 1.65;
  text-align: left;
}
.message-table th {
  background: #edf4fb;
  color: #24486f;
  font-weight: 650;
}
.message-table table:has(tr > :nth-child(3)) {
  min-width: 520px;
}
.message-table th,
.message-table td {
  padding: 13px 16px;
  vertical-align: top;
  border-bottom: 1px solid #e1e8ef;
}
.message-table th:first-child,
.message-table td:first-child {
  width: 36%;
}
.message-table tbody tr:last-child td {
  border-bottom: 0;
}
.message-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
.message-note {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 3px solid #4179ae;
  background: #f0f6fc;
  border-radius: 0 10px 10px 0;
  color: #25496c;
  font-size: 15px;
}
.message-note.warning {
  border-color: #b58738;
  background: #fff8e9;
  color: #725322;
}
.message-code {
  margin: 18px 0;
  border: 1px solid #dce3ea;
  border-radius: 12px;
  overflow: hidden;
  background: #f6f8fa;
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px 0 14px;
  background: #edf1f5;
  color: #4b6075;
  font-size: 12px;
}
.code-toolbar button {
  font-weight: 500;
  font-size: 12px;
  border-radius: 6px;
}
.code-toolbar button:hover {
  background: #dfe7ee;
}
.message-code pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  white-space: pre;
}
.message-code code {
  display: block;
  background: none;
  padding: 0;
  color: #263c55;
  overflow-wrap: normal;
}
.terminal-context {
  margin-top: 24px;
  border-top: 1px solid #e4e9ed;
  padding-top: 6px;
  color: var(--muted);
}
.terminal-context summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  list-style: none;
}
.terminal-context summary::before {
  content: "›";
  font-size: 18px;
}
.terminal-context[open] summary::before {
  transform: rotate(90deg);
}
.terminal-context pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.8 monospace;
  padding: 12px;
  border-radius: 8px;
  background: #f5f7f9;
  margin: 0;
}
.terminal-mode .output {
  white-space: pre;
}
.terminal-mode .output.wrap {
  white-space: pre-wrap;
}
@media (max-width: 700px) {
  .session-view:not(.terminal-mode) .conversation {
    padding-left: 20px;
    padding-right: 20px;
  }
  .output h2 {
    font-size: 20px;
  }
  .message-table th,
  .message-table td {
    padding: 12px;
  }
}
