:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  color: #212338;
  background: #f6f7fb;
  --ink: #212338;
  --muted: #515971;
  --border: #dfe2ed;
  --accent: #4935b6;
  --surface: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, select, summary { touch-action: manipulation; }
button:not(:disabled), summary { cursor: pointer; }
a { color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #6750f0; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 4; background: white; padding: 8px 12px; border-radius: 6px; }
.shell { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100vh; }
.rail {
  background: #181831; color: #f2f0ff; padding: 27px 16px 20px;
  display: flex; flex-direction: column; gap: 24px; align-self: start; min-height: 100vh;
  position: sticky; top: 0;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; font-size: 1.14rem; line-height: 1.25; }
.brand-mark {
  background: #694de2; color: white; border-radius: 11px; width: 38px; height: 38px; display: grid;
  place-items: center; font-weight: 800; font-size: .77rem; letter-spacing: .06em;
}
.brand small { display: block; color: #c1bed9; font-size: .78rem; font-weight: 500; margin-top: 3px; }
.rail nav { display: grid; gap: 5px; }
.rail nav a {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 43px; padding: 8px 11px;
  text-align: left; color: #dddaf0; background: transparent; border: 1px solid transparent; border-radius: 8px;
}
.rail nav a:hover { background: #282743; }
.rail nav [aria-current] { background: #332753; border-color: #4a3a73; color: white; font-weight: 650; }
.rail :focus-visible { outline-color: #c2afff; }
.source-label {
  margin-top: auto; border-top: 1px solid #3a3855; padding: 15px 6px 0; display: grid; gap: 4px;
  color: #d4d0e7; font-size: .78rem; overflow-wrap: anywhere;
}
.source-label strong { color: white; }
.stage { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(14px, 3vw, 44px); border-bottom: 1px solid var(--border); background: var(--surface);
}
.topbar p { margin: 0; font-size: .83rem; color: var(--muted); }
main { max-width: 1500px; margin: 0 auto; padding: 30px clamp(14px, 3vw, 44px) 48px; }
.page-heading { margin: 3px 0 23px; }
h1 { margin: 0 0 4px; font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.16; letter-spacing: -.045em; }
.page-heading p { margin: 6px 0 0; color: var(--muted); }
h2 { margin: 0 0 13px; font-size: 1.11rem; letter-spacing: -.018em; }
h3 { font-size: .96rem; margin: 14px 0 8px; }
.stack { display: grid; gap: 17px; }
.stack > :where(p, section) { margin: 0; }
.owner-auth-form { display: grid; gap: 14px; max-width: 30rem; }
.owner-auth-form .actions { justify-content: start; }
.mcp-permission { display: flex; align-items: start; gap: 8px; margin: 10px 0; overflow-wrap: anywhere; }
.mcp-permission small { display: block; margin-top: 2px; color: var(--muted); }
.panel, .metric {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 2px 5px #242a4c09; min-width: 0;
}
.panel { padding: clamp(13px, 2.2vw, 21px); overflow-wrap: anywhere; }
.panel > :last-child { margin-bottom: 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric { display: flex; align-items: center; gap: 11px; padding: 13px 15px; }
.metrics strong { display: block; overflow-wrap: anywhere; font-size: 1.55rem; letter-spacing: -.035em; line-height: 1.2; }
.metric-label { color: var(--muted); font-size: .81rem; font-weight: 600; display: block; margin-bottom: 3px; }
.budget-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.money-metric { display: block; padding: 15px 17px; border-top: 3px solid #7461d9; }
.money-metric.reserved { border-top-color: #b8731b; }
.money-metric.remaining { border-top-color: #22816e; }
.money-metric .muted { margin: 6px 0 0; }
.filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.field { min-width: min(100%, 7rem); max-width: 100%; display: grid; gap: 4px; color: var(--muted); font-size: .81rem; font-weight: 650; }
.field.search { flex: 1 1 210px; }
.field input, .field select, .field textarea, .button {
  min-height: 40px; border: 1px solid #cdd1e1; border-radius: 7px; background: #fff; color: var(--ink); padding: 7px 10px;
}
.field input, .field select { width: 100%; font-weight: 500; }
.button { font-weight: 650; font-size: .85rem; }
.button:hover:not(:disabled) { border-color: #8878c5; background: #f4f1ff; }
.button:disabled { opacity: .55; }
.segmented { display: flex; border: 1px solid #dcd9eb; background: #f5f2fc; padding: 2px; border-radius: 8px; gap: 2px; }
.segmented .button { border: 1px solid transparent; min-height: 34px; background: transparent; }
.segmented .button[aria-pressed="true"] { background: white; color: var(--accent); border-color: #e0d8fb; box-shadow: 0 1px 3px #22204212; }
.result-count { font-size: .78rem; color: var(--muted); margin: 0 0 8px; }
.graph-viewport {
  overflow: auto; max-height: 510px; border: 1px solid #dfe2ee; border-radius: 9px; background: #f8f9fd;
}
.graph-surface {
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(146px, 1fr)); gap: 28px;
  min-height: 244px; min-width: 877px; padding: 13px 15px 20px;
  background-image: radial-gradient(#d1d5e5 0.8px, transparent 0.8px); background-size: 13px 13px;
}
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lane { position: relative; min-width: 0; }
.lane h3 {
  min-height: 38px; margin: 0 0 20px; padding: 5px 7px; display: flex; align-items: center; justify-content: space-between;
  gap: 4px; font-size: .78rem; color: #484964; background: #eff0f8; border-radius: 6px;
}
.lane h3 span { background: white; padding: 0 5px; border-radius: 4px; }
.lane-empty { margin: 0; color: #5d657c; font-size: .77rem; padding: 4px 7px; }
.node {
  display: grid; grid-template-columns: 29px minmax(0, 1fr) 8px; align-items: center; gap: 6px;
  width: 100%; min-height: 54px; margin-bottom: 17px; padding: 6px;
  background: white; border: 1px solid #d8dcec; border-radius: 8px; text-align: left; color: var(--ink);
  box-shadow: 0 2px 5px #2220420e; line-height: 1.2;
}
.node:last-child { margin-bottom: 0; }
.node:hover, .node:focus-visible { border-color: #8675cd; background: #f9f6ff; }
.node-label { display: block; font-size: .8rem; font-weight: 700; overflow-wrap: anywhere; }
.node-kind { display: flex; flex-wrap: wrap; gap: 3px; font-size: .69rem; color: var(--muted); margin-top: 3px; }
.node-kind .chip { padding: 2px 4px; font-size: .63rem; }
.node-status { color: #655993; }
.node-icon {
  display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px;
  background: #eeebf9; color: #55478a; font-size: .64rem; font-weight: 800; letter-spacing: .03em;
}
.metric .node-icon { width: 35px; height: 35px; flex: 0 0 35px; }
.node-brain { background: #ebe3ff; color: #4f269d; }
.node-engine { background: #f8eadb; color: #864910; }
.node-job { background: #e3ecff; color: #28498c; }
.node-project { background: #e1f2eb; color: #146548; }
.node-executor { background: #f5e6f5; color: #793b73; }
.node-machine { background: #e0eff5; color: #365975; }
.graph-legend, .legend-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.graph-legend { margin-top: 10px; color: var(--muted); font-size: .78rem; }
.graph-legend .muted { margin: 0; }
.chip { display: inline-block; padding: 2px 8px; font-weight: 650; font-size: .73rem; border-radius: 999px; }
.chip-neutral { background: #eeedf6; color: #48425f; }
.chip-amber { background: #fff1d6; color: #713f12; }
.chip-green { background: #def4e7; color: #195a43; }
.muted { color: var(--muted); margin: 0 0 10px; font-size: .84rem; }
.legend-chips + .muted { margin-top: 9px; }
.notice { padding: 10px 13px; border: 1px solid #e0e3ee; border-radius: 7px; color: #4a526a; background: #f6f7fb; font-size: .87rem; }
.notice.warning { color: #713f12; background: #fff6e5; border-color: #ecd3a6; }
.table-scroll { overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .84rem; }
thead { background: #f0f1f8; }
td, th { padding: 8px 9px; vertical-align: top; border-bottom: 1px solid #e6e7ef; }
thead th { color: #434a65; font-size: .77rem; }
tbody th { font-weight: 600; }
.text-button {
  background: transparent; color: var(--accent); border: none; padding: 0; border-radius: 2px;
  text-align: left; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere;
}
.text-button:hover { color: #28156f; }
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: .82rem; }
.meter { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
meter { width: 48px; }
meter::-webkit-meter-optimum-value { background: #6954cb; }
meter::-moz-meter-bar { background: #6954cb; }
details { margin: 10px 0; padding: 8px 10px; border: 1px solid var(--border); background: #fafaff; border-radius: 6px; }
summary { font-weight: 650; color: var(--accent); }
pre { margin: 8px 0 0; padding: 9px; max-height: 300px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #f3f3fa; font-size: .79rem; }
.facts { display: grid; gap: 1px; margin: 9px 0; }
.facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: 8px; padding: 5px 0; border-bottom: 1px solid #ececf4; }
.facts dt { color: var(--muted); font-size: .81rem; font-weight: 650; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: .86rem; }
.facts ul { margin: 0; padding-left: 17px; }
.inspector {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(580px, 100%); height: 100%; max-width: none; max-height: none; overflow: auto;
  border: 0; color: var(--ink);
  padding: 0 clamp(12px, 3vw, 23px) 24px; background: #fff; border-left: 1px solid var(--border);
  box-shadow: -14px 0 44px #1c19343d; overflow-wrap: anywhere;
}
.inspector::backdrop { background: #1c19344d; }
.inspector-head {
  position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 0; background: white; border-bottom: 1px solid var(--border); z-index: 1; margin-bottom: 9px;
}
.inspector-head h2 { margin: 0; font-size: 1.3rem; }
.inspector-head > div { display: flex; gap: 6px; justify-content: end; flex-wrap: wrap; }

@media (max-width: 1050px) {
  .shell { grid-template-columns: 185px minmax(0, 1fr); }
  .rail { padding-inline: 12px; }
}
@media (max-width: 820px) {
  .shell { display: block; }
  .rail { position: static; min-height: 0; gap: 12px; padding: 12px 14px; }
  .brand strong small { display: inline; padding-left: 6px; }
  .rail nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rail nav a { padding: 6px; justify-content: center; text-align: center; font-size: .84rem; }
  .source-label { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 7px 1px 0; }
  main { padding-top: 18px; }
}
@media (max-width: 570px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .budget-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { padding: 9px; gap: 7px; }
  .money-metric strong { font-size: 1.05rem; }
  .rail nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail nav a { justify-content: start; text-align: left; }
  .field { flex: 1 1 140px; }
}
@media (max-width: 350px) {
  .budget-metrics { grid-template-columns: 1fr; }
}

.nav-group { display: grid; gap: 2px; }
.nav-group + .nav-group { margin-top: 10px; }
.nav-caption { margin: 0 11px 3px; color: #c1bed9; font-size: .72rem; font-weight: 650; }
.rail nav a { text-decoration: none; min-height: 39px; }
.rail nav { gap: 7px; }
.view-nav {
  display: flex; flex-wrap: wrap; gap: 5px; width: fit-content; max-width: 100%;
  margin: 0 0 20px; padding: 4px; border: 1px solid #dcd9eb; border-radius: 9px; background: #f5f2fc;
}
.view-nav a {
  min-height: 38px; display: inline-flex; align-items: center; padding: 6px 11px;
  color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 650;
  border-radius: 6px; border: 1px solid transparent;
}
.view-nav a:hover { color: var(--accent); }
.view-nav [aria-current] { background: var(--surface); border-color: #e0d8fb; color: var(--accent); box-shadow: 0 1px 3px #22204212; }
.view-content { display: grid; gap: 14px; min-width: 0; }
.view-content > * { min-width: 0; }
.view-content > :where(p, h2, ul) { margin: 0; }
.view-content > .button, .view-content > div > .button { justify-self: start; width: fit-content; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.section-actions { margin-top: 15px; }
.button:is(a) { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover:not(:disabled) { color: #fff; background: #3c298f; }
h1, h2, h3, h4 { overflow-wrap: anywhere; }
.notice.success { color: #195a43; background: #e8f5ee; border-color: #b5d9c7; }
.records { list-style: none; padding: 0; display: grid; gap: 8px; }
.records > li, .view-content article {
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  padding: 12px 15px; min-width: 0; overflow-wrap: anywhere;
}
.records > li { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.records > li > div + div { display: flex; flex-wrap: wrap; gap: 6px; }
.records p, .view-content article p { color: var(--muted); font-size: .85rem; margin: 3px 0; }
.view-content article + article { margin-top: 8px; }
.view-content article h4 { margin: 0 0 5px; }

.editor { display: grid; gap: 14px; }
.editor > div { min-width: 0; }
.editor > :last-child { justify-self: start; }
.editor fieldset {
  min-width: 0; margin: 0 0 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: clamp(12px, 2.2vw, 20px);
}
.editor fieldset > :last-child { margin-bottom: 0; }
.editor legend { padding: 0 7px; font-size: .91rem; font-weight: 700; color: var(--ink); }
.editor .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 13px 16px; align-items: start; }
.editor .field { margin: 0; }
.editor .field.wide { grid-column: 1 / -1; }
.editor :where(.grid, .field) + :where(.grid, .field) { margin-top: 10px; }
.editor .grid > .field { margin: 0; }
.field textarea { width: 100%; font: inherit; font-size: .92rem; min-height: 7rem; resize: vertical; line-height: 1.55; }
.field.wide textarea { min-height: 8rem; }
.field small { font-weight: 450; font-size: .78rem; }
.field :is(input, select, textarea):disabled { background: #eef0f7; }
.check { display: flex; align-items: flex-start; gap: 8px; min-height: 40px; padding: 7px 0; font-size: .88rem; }
.check input { accent-color: var(--accent); inline-size: 1.05rem; block-size: 1.05rem; flex: none; }
.row-editor { border-bottom: 1px solid var(--border); padding: 10px 0; margin-bottom: 10px; }
.row-editor > button { margin-top: 7px; }
.confirmation {
  width: min(38rem, calc(100% - 24px)); max-height: calc(100% - 24px);
  border: 1px solid var(--border); border-radius: 12px; padding: clamp(14px, 3vw, 24px);
  color: var(--ink); box-shadow: 0 14px 48px #1c19343d; overflow-wrap: anywhere;
}
.confirmation::backdrop { background: #1c193481; }
.confirmation .actions { margin-top: 15px; justify-content: end; }
@media (min-width: 821px) {
  .rail { max-height: 100dvh; overflow: auto; }
}
@media (max-width: 820px) {
  .rail nav { grid-template-columns: 1fr 1.35fr .7fr; gap: 12px; }
  .nav-group + .nav-group { margin-top: 0; }
  .nav-caption { margin-inline: 6px; }
  .rail nav a { justify-content: start; text-align: start; min-height: 36px; }
}
@media (max-width: 450px) {
  .rail nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .rail nav a { padding-inline: 5px; line-height: 1.2; overflow-wrap: anywhere; }
}

/* Roundtable: fixed message sides, independent paragraph bidi direction. */
.rt-chat { display: flex; flex-direction: column; gap: 24px; width: min(100%, 900px); margin: 4px auto 16px; direction: ltr; }
.rt-chat-row { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.rt-chat-user { flex-direction: row-reverse; justify-content: flex-start; }
.rt-chat-agent { justify-content: flex-start; }
.rt-avatar { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #ebe8f8; color: #4935b6; font-weight: 750; }
.rt-avatar[data-provider="anthropic"] { background: #f3e3d5; color: #874c31; }
.rt-avatar[data-provider="deepseek"] { background: #e0eaff; color: #244fb4; }
.rt-avatar[data-provider="openai"] { background: #dff4e9; color: #126044; }
.rt-avatar[data-provider="google"] { background: #e5efff; color: #315b9d; }
.rt-chat-bubble { min-width: 0; max-width: min(85%, 740px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px 17px; overflow-wrap: anywhere; }
.rt-chat-user .rt-chat-bubble { background: #e9e5fc; border-color: #dcd3fc; }
.rt-chat-decision { border-color: #bdb0ec; box-shadow: 0 2px 12px #4935b60b; }
.rt-chat-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; margin-bottom: 9px; }
.rt-chat-header small, .rt-chat-body small { font-size: .77rem; color: var(--muted); }
.rt-chat-body { display: grid; gap: 9px; color: var(--ink); line-height: 1.8; }
.rt-chat-body p { margin: 0; text-align: start; unicode-bidi: plaintext; white-space: pre-wrap; font-size: 1rem; }
.rt-chat-bubble details { margin-top: 8px; color: var(--muted); font-size: .8rem; }
.rt-chat-bubble pre { direction: ltr; text-align: left; }
textarea[dir="auto"] { text-align: start; unicode-bidi: plaintext; }
@media (max-width: 600px) { .rt-chat-row { gap: 6px; } .rt-avatar { flex-basis: 27px; height: 27px; } .rt-chat-bubble { max-width: calc(100% - 35px); padding: 10px 12px; } .rt-chat { gap: 18px; } }

.rt-mode-notice { background: #f8f7fd; border: 1px solid #e2ddf2; border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: .88rem; color: var(--muted); }
.rt-mode-notice strong { color: var(--ink); }
.rt-mode-notice p { flex-basis: 100%; margin: 0; line-height: 1.6; }

/* Mobile navigation: closed by default; all links and account actions remain reachable. */
.mobile-menu { display: none; }
@media (max-width: 820px) {
  .rail { gap: 9px; padding: 9px 14px; }
  .brand { padding: 0; min-height: 42px; }
  .brand-mark { width: 34px; height: 34px; flex: 0 0 34px; }
  .mobile-menu { display: inline-flex; align-items: center; gap: 7px; margin-inline-start: auto; min-height: 40px; padding: 6px 10px; color: #fff; background: #282743; border: 1px solid #4a3a73; border-radius: 8px; font-size: .84rem; }
  .mobile-menu span { font-size: 1.25rem; line-height: 1; }
  .rail:not(:has(.mobile-menu[aria-expanded="true"])) #visual-nav,
  .rail:not(:has(.mobile-menu[aria-expanded="true"])) #visual-source { display: none; }
  .shell:not(:has(.mobile-menu[aria-expanded="true"])) #console-actions > :not(#visual-refresh) { display: none; }
  .shell:has(.mobile-menu[aria-expanded="true"]) #visual-nav { grid-template-columns: 1fr; gap: 9px; }
  .shell:has(.mobile-menu[aria-expanded="true"]) .nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
  .shell:has(.mobile-menu[aria-expanded="true"]) .nav-caption { flex-basis: 100%; }
  .shell:has(.mobile-menu[aria-expanded="true"]) #visual-nav a { flex: 1 1 130px; min-height: 40px; padding: 6px 9px; }
  .topbar { padding: 5px 14px; gap: 8px; }
  .topbar .button { min-height: 34px; padding: 4px 10px; }
  main { padding-top: 12px; }
  .page-heading { margin-bottom: 12px; }
  .page-heading h1 { font-size: 1.5rem; }
  .page-heading p { font-size: .84rem; }
}
/* Portable Markdown presentation, adapted for native DOM chat bubbles. */
.rt-chat-body { min-width: 0; line-height: 1.8; }
.rt-chat-body :is(.mk-p,.mk-h,.mk-list,.mk-quote,.mk-callout) { margin: 0; text-align: start; overflow-wrap: anywhere; }
.rt-chat-body .mk-p { white-space: pre-wrap; unicode-bidi: plaintext; }
.rt-chat-body .mk-h { line-height: 1.5; font-size: 1.05rem; font-weight: 750; }
.rt-chat-body :is(.mk-h1,.mk-h2) { font-size: 1.15rem; }
.rt-chat-body strong { font-weight: 750; }
.rt-chat-body .mk-list { padding-inline-start: 1.4em; }
.rt-chat-body .mk-list li { padding-inline-start: .2em; margin-block: .2em; }
.rt-chat-body .mk-list.is-loose > li { margin-block: .65em; }
.rt-chat-body .mk-list .mk-list { margin-block: .3em; }
.rt-chat-body .mk-code { font: .86em ui-monospace, Consolas, monospace; background: #efedf5; border-radius: 4px; padding: .1em .28em; unicode-bidi: isolate; }
.rt-chat-body .mk-pre { max-width: 100%; overflow-x: auto; background: #202136; color: #f5f5fc; border: 1px solid #35364a; border-radius: 9px; padding: 12px; margin: 2px 0; white-space: pre; text-align: left; font: .86rem/1.65 ui-monospace, Consolas, monospace; }
.rt-chat-body .mk-quote { border-inline-start: 3px solid #aaa0d7; padding: 5px 12px; color: var(--muted); }
.rt-chat-body .mk-callout { border: 1px solid #d4ddf0; border-radius: 8px; background: #f0f5ff; padding: 9px 12px; }
.rt-chat-body .mk-callout-warning,.rt-chat-body .mk-callout-caution { background: #fff6e4; border-color: #eed7a4; }
.rt-chat-body .mk-callout-tip { background: #edf9f2; border-color: #c2e5d2; }
.rt-chat-body .mk-callout-title { display: block; margin-bottom: 4px; font-size: .85rem; }
.rt-chat-body .mk-rule { border: 0; border-top: 1px solid var(--border); width: 100%; margin: 4px 0; }
.rt-chat-body .mk-table-wrap { overflow-x: auto; max-width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 7px; }
.rt-chat-body .mk-table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.rt-chat-body .mk-table :is(th,td) { padding: 7px 10px; text-align: start; border-bottom: 1px solid var(--border); min-width: 72px; white-space: normal; }
.rt-chat-body .mk-table th { background: #f1eff8; font-weight: 700; }
.rt-chat-body .mk-table tr:last-child td { border-bottom: 0; }
.rt-chat-body .mk-table .mk-align-left { text-align: left; }
.rt-chat-body .mk-table .mk-align-right { text-align: right; }
.rt-chat-body .mk-table .mk-align-center { text-align: center; }
.rt-chat-body .mk-link { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .rt-chat-bubble { max-width: calc(100% - 33px); }
  .rt-chat-body { font-size: .96rem; gap: 10px; }
  .rt-chat-body .mk-p { font-size: inherit; }
  .rt-chat-body .mk-table :is(th,td) { padding: 7px; }
}

/* Comfortable chat reading size on desktop and phones. */
.rt-chat-body { font-size: 1.12rem; line-height: 1.85; }
.rt-chat-body .mk-p { font-size: inherit; }
.rt-chat-body .mk-table { font-size: .98rem; }
.rt-chat-body .mk-h { font-size: 1.16rem; }
.rt-chat-body :is(.mk-h1,.mk-h2) { font-size: 1.25rem; }
@media (max-width: 600px) {
  .rt-chat-body { font-size: 1.13rem; line-height: 1.85; }
}
