/* biomiv.com topic pages (/conditions/<slug>, /drugs/<slug>) and their indexes — the site's own theme tokens only. */
.bmt .bmb-crumb { font-size: 14px; color: var(--text-2); margin: 0 0 14px; }
.bmt .bmb-crumb a { color: var(--text-2); }

.bmt-chat { border: 1px solid var(--bm-line-strong, var(--hairline)); border-radius: 16px; background: var(--surface); margin: 0 0 28px; overflow: hidden; }
.bmt-chat-head { display: flex; gap: 10px; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--bm-line, var(--hairline)); }
.bmt-chat-head span { color: var(--text-2); font-size: 14px; }
.bmt-log { padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: none; }
.bmt-msg { max-width: 100%; border-radius: 14px; padding: 12px 14px; line-height: 1.6; overflow-wrap: anywhere; }
.bmt-msg p { margin: 0 0 10px; }
.bmt-msg p:last-child, .bmt-msg ul:last-child { margin-bottom: 0; }
.bmt-msg ul { margin: 0 0 10px; padding-left: 20px; }
.bmt-msg h2 { font-size: 17px; margin: 16px 0 6px; }
.bmt-msg h2:first-child { margin-top: 0; }
.bmt-msg.is-you { align-self: flex-end; max-width: 85%; background: var(--accent); color: var(--bg); }
.bmt-msg.is-bio { align-self: stretch; background: var(--bg); border: 1px solid var(--bm-line, var(--hairline)); }
.bmt-msg.is-wait { color: var(--text-2); font-style: italic; }
.bmt-note { font-size: 14px; color: var(--text-2); }
.bmt-refs { margin: 0 0 10px; padding-left: 22px; font-size: 14px; color: var(--text-2); }
.bmt-refs li { margin: 0 0 6px; }
.bmt-safety { border-color: var(--accent); }
.bmt-form { padding: 12px 16px 14px; border-top: 1px solid var(--bm-line, var(--hairline)); }
.bmt-label { display: block; font-weight: 600; margin: 0 0 8px; }
.bmt-row { display: flex; gap: 8px; }
.bmt-row input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--bm-line-strong, var(--hairline)); border-radius: 10px; }
.bmt-row .bma-btn { margin-top: 0; }
.bmt-fine { font-size: 13px; color: var(--text-2); margin: 8px 0 0; }

.bmt-score { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.bmt-score-n { font-size: 40px; font-weight: 600; line-height: 1; color: var(--accent); }
.bmt-table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.bmt-chips { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.bmt-chips li { border: 1px solid var(--bm-line, var(--hairline)); border-radius: 999px; padding: 3px 12px; font-size: 14px; margin: 0; }
.bmt-counts { list-style: none; padding: 0; margin: 0 0 12px; }
.bmt-counts li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--bm-line, var(--hairline)); margin: 0; }
.bmt-counts li span:last-child { color: var(--text-2); white-space: nowrap; }

.bmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.bmt-group { margin: 0; padding: 14px 16px; }
.bmt-group h3 { margin: 0 0 8px; font-size: 15px; }
.bmt-group ul { list-style: none; padding: 0; margin: 0; }
.bmt-group li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--bm-line, var(--hairline)); margin: 0; font-size: 14px; }
.bmt-group li:last-child { border-bottom: 0; }
.bmt-n { color: var(--text-2); font-variant-numeric: tabular-nums; }
.bmt-pred { font-style: normal; font-size: 12px; color: var(--text-2); border: 1px solid var(--bm-line, var(--hairline)); border-radius: 999px; padding: 0 6px; }
.bmt-spark { grid-column: 1 / -1; width: 100%; height: 22px; }
.bmt-spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.bmt-index { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.bmt-index li { margin: 0; }
.bmt-index a { display: block; padding: 10px 14px; border: 1px solid var(--bm-line, var(--hairline)); border-radius: 12px; text-decoration: none; color: var(--text); }
.bmt-index a:hover { border-color: var(--accent); }

/* phones: mobile-polish.css sizes every h2/h3, ul and section with !important — the chat keeps its own scale */
#bmTopic .bmt-msg h2 { font-size: 17px !important; line-height: 1.35 !important; margin: 16px 0 6px !important; }
#bmTopic .bmt-msg h2:first-child { margin-top: 0 !important; }
#bmTopic .bmt-group h3 { font-size: 15px !important; }

@media (max-width: 560px) {
  .bmt-row { flex-direction: column; }
  .bmt-msg.is-you { max-width: 100%; }
}
