/* Advisor chat markdown prose — scoped TNT-style rendering */
.th-advisor-prose,
.th-advisor-msg .tnt-markdown.tnt-prose {
  line-height: 1.62;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--th-text);
}

.th-advisor-prose > :first-child,
.th-advisor-msg .tnt-markdown.tnt-prose > :first-child {
  margin-top: 0 !important;
}

.th-advisor-prose > :last-child,
.th-advisor-msg .tnt-markdown.tnt-prose > :last-child {
  margin-bottom: 0 !important;
}

.th-advisor-prose p,
.th-advisor-prose .ai-paragraph,
.th-advisor-msg .tnt-prose p,
.th-advisor-msg .tnt-prose .ai-paragraph {
  margin: 0 0 0.55rem;
}

.th-advisor-prose h1,
.th-advisor-prose h2,
.th-advisor-prose h3,
.th-advisor-prose h4,
.th-advisor-prose .ai-header,
.th-advisor-msg .tnt-prose h1,
.th-advisor-msg .tnt-prose h2,
.th-advisor-msg .tnt-prose h3,
.th-advisor-msg .tnt-prose .ai-header {
  margin: 0.75rem 0 0.4rem;
  line-height: 1.25;
  font-weight: 650;
  color: var(--th-text);
  font-size: 1rem;
}

.th-advisor-prose h2,
.th-advisor-msg .tnt-prose h2 {
  font-size: 1.05rem;
}

.th-advisor-prose ul,
.th-advisor-prose ol,
.th-advisor-prose .ai-list,
.th-advisor-msg .tnt-prose ul,
.th-advisor-msg .tnt-prose ol {
  margin: 0.45rem 0 0.85rem;
  padding-left: 1.45rem;
}

.th-advisor-prose li,
.th-advisor-msg .tnt-prose li {
  margin: 0.2rem 0;
}

.th-advisor-prose blockquote,
.th-advisor-prose .ai-blockquote,
.th-advisor-msg .tnt-prose blockquote {
  margin: 0.55rem 0;
  padding: 0.45rem 0.75rem;
  border-left: 3px solid var(--th-accent);
  background: rgba(0, 204, 255, 0.08);
  border-radius: 4px;
}

.th-advisor-prose a,
.th-advisor-msg .tnt-prose a {
  color: var(--th-accent);
  font-weight: 600;
}

.th-advisor-prose code,
.th-advisor-prose .ai-inline-code,
.th-advisor-msg .tnt-prose code {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.th-advisor-prose pre,
.th-advisor-msg .tnt-prose pre {
  margin: 0.5rem 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  font-size: 0.9em;
}

.th-advisor-prose hr,
.th-advisor-msg .tnt-prose hr {
  border: none;
  border-top: 1px solid var(--th-border-soft);
  margin: 0.85rem 0;
}

.th-advisor-prose table,
.th-advisor-msg .tnt-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.9em;
}

.th-advisor-prose th,
.th-advisor-prose td,
.th-advisor-msg .tnt-prose th,
.th-advisor-msg .tnt-prose td {
  border: 1px solid var(--th-border-soft);
  padding: 6px 8px;
}

.th-advisor-prose th,
.th-advisor-msg .tnt-prose th {
  background: rgba(255, 255, 255, 0.05);
}

.th-advisor-prose strong,
.th-advisor-msg .tnt-prose strong {
  color: var(--th-text);
}
