/* Native answer illustrations: extend the host's Chart/Table/Text/Disclosure/State
   families, not a second theme. All presentation stays in this governed asset. */
:is(#mmb-root,.mmb-visual-surface) .mmb-v{box-sizing:border-box;min-width:0;max-width:100%;margin:26px 0;padding:24px 0 12px;color:var(--mmb-text);font-family:var(--mmb-font,var(--font-ui));border-top:1px solid var(--mmb-line);font-size:14px;line-height:1.55;overflow-wrap:anywhere}
:is(#mmb-root,.mmb-visual-surface) .mmb-v *{box-sizing:border-box;min-width:0}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-title{margin:0;font-size:18px;font-weight:650;letter-spacing:-.015em;line-height:1.4;color:var(--mmb-hi)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-subtitle{margin:5px 0 0;font-size:13px;color:var(--mmb-muted)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-basis{margin:9px 0 18px;font-size:12px;line-height:1.45;color:var(--mmb-muted)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-plot{width:100%;max-width:100%;min-height:260px;overflow:hidden}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-plot svg{display:block;max-width:100%;font-family:var(--mmb-font,var(--font-ui));overflow:visible}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-grid{stroke:var(--mmb-line);stroke-width:1;stroke-dasharray:2 4}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-zero{stroke:var(--mmb-muted);stroke-width:1}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-axis{fill:var(--mmb-muted);font-size:10px;font-variant-numeric:tabular-nums}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-total{fill:var(--mmb-hi);font-size:22px;font-weight:600;font-variant-numeric:tabular-nums}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-series-0{color:var(--mmb-info);fill:currentColor;stroke:currentColor}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-series-1{color:var(--mmb-muted);fill:currentColor;stroke:currentColor}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-series-2{color:var(--mmb-hi);fill:currentColor;stroke:currentColor}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-series-3{color:var(--mmb-violet);fill:currentColor;stroke:currentColor}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-series-4{color:var(--mmb-glow);fill:currentColor;stroke:currentColor}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-line{fill:none;stroke-linecap:round;stroke-linejoin:round}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-line.mmb-v-series-1{stroke-dasharray:5 4}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-line.mmb-v-series-2{stroke-dasharray:2 3}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-line.mmb-v-series-3{stroke-dasharray:8 3 2 3}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-line.mmb-v-series-4{stroke-dasharray:10 4}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-area{fill-opacity:.1;stroke:none}
:is(#mmb-root,.mmb-visual-surface) circle.mmb-v-ring{fill:none}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;margin:4px 0 18px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-legend-item{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:var(--mmb-text);font:inherit;font-size:12px;padding:4px;min-height:44px;cursor:pointer;text-align:left;max-width:100%}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-legend-item[aria-pressed=false]{opacity:.45;text-decoration:line-through}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-swatch{font-size:18px;flex:0 0 14px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;margin:12px 0;border-radius:var(--r-ctl,8px)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table{width:100%;border-collapse:collapse;text-align:left;font-size:14px;line-height:1.55}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table th,:is(#mmb-root,.mmb-visual-surface) .mmb-v-table td{padding:11px 12px;border-bottom:1px solid var(--mmb-line);vertical-align:top;min-width:86px;max-width:300px;overflow-wrap:anywhere}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table th:first-child,:is(#mmb-root,.mmb-visual-surface) .mmb-v-table td:first-child{padding-left:0}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table th{font-weight:550;color:var(--mmb-hi)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table thead th{font-size:12px;color:var(--mmb-muted)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table tbody tr:last-child th,:is(#mmb-root,.mmb-visual-surface) .mmb-v-table tbody tr:last-child td{border-bottom:0}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;font-family:var(--font-mono)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:22px 0}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-label{font-size:12px;color:var(--mmb-muted);font-weight:500}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-metric{font-size:22px;font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:-.02em;line-height:1.3;margin-top:6px;color:var(--mmb-hi)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-detail{font-size:12px;color:var(--mmb-muted);margin:6px 0 0;line-height:1.6}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-status .mmb-v-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:10px 0;border-bottom:1px solid var(--mmb-line);align-items:baseline}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-status .mmb-v-row-body{text-align:right}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-state{display:inline-block;font-size:13px;color:var(--mmb-text);font-weight:550}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-scenarios .mmb-v-row{padding:17px 0;border-bottom:1px solid var(--mmb-line)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-scenarios .mmb-v-label{font-size:14px;color:var(--mmb-hi);margin-bottom:6px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-row-title{font-size:14px;line-height:1.6}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-timeline,:is(#mmb-root,.mmb-visual-surface) .mmb-v-flow{list-style:none;margin:18px 0;padding:0}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-timeline .mmb-v-row{display:grid;grid-template-columns:80px minmax(0,1fr);gap:18px;padding:17px 0;border-bottom:1px solid var(--mmb-line)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-timeline .mmb-v-label{font-variant-numeric:tabular-nums}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-flow .mmb-v-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:20px;padding:15px 0;position:relative}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-flow .mmb-v-label{color:var(--mmb-hi);font-size:14px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-flow .mmb-v-label:after{content:' →';color:var(--mmb-muted)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-takeaway{margin:18px 0 12px;font-size:14px;color:var(--mmb-hi)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-details{margin-top:12px;font-size:12px;color:var(--mmb-muted)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-details summary{cursor:pointer;min-height:44px;line-height:44px;width:fit-content;max-width:100%}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-export{border:1px solid var(--mmb-line);border-radius:var(--r-ctl,8px);padding:8px 12px;min-height:44px;margin-top:12px;background:transparent;color:var(--mmb-text);font:inherit;cursor:pointer}
:is(#mmb-root,.mmb-visual-surface) .mmb-v :is(button,summary,[tabindex]):focus-visible{outline:2px solid var(--mmb-info);outline-offset:3px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* Light is a paper inset with separation by shadow rather than luminous depth. */
html[data-theme=light] :is(#mmb-root,.mmb-visual-surface) .mmb-v{background:var(--mmb-panel);border:1px solid var(--mmb-line);border-radius:var(--r-panel,14px);padding:18px;box-shadow:var(--mmb-shadow-pop)}
html[data-theme=light] :is(#mmb-root,.mmb-visual-surface) .mmb-v-grid{stroke-dasharray:none;opacity:.65}
html[data-theme=light] :is(#mmb-root,.mmb-visual-surface) .mmb-v-area{fill-opacity:.06}
@media(max-width:540px){:is(#mmb-root,.mmb-visual-surface) .mmb-v{margin:18px 0;font-size:13px}:is(#mmb-root,.mmb-visual-surface) .mmb-v-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}:is(#mmb-root,.mmb-visual-surface) .mmb-v-metric{font-size:20px}:is(#mmb-root,.mmb-visual-surface) .mmb-v-timeline .mmb-v-row{grid-template-columns:62px minmax(0,1fr);gap:12px}html[data-theme=light] :is(#mmb-root,.mmb-visual-surface) .mmb-v{padding:12px}:is(#mmb-root,.mmb-visual-surface) .mmb-v-legend-item{min-height:44px}:is(#mmb-root,.mmb-visual-surface) .mmb-v-details summary{min-height:44px;line-height:44px}}
@media(prefers-reduced-motion:reduce){:is(#mmb-root,.mmb-visual-surface) .mmb-v *{scroll-behavior:auto}}

/* Local interactions and downloadable answer snapshots share the existing host theme. */
:is(#mmb-root,.mmb-visual-surface) .mmb-v-data-controls{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:12px;margin:16px 0 4px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-filter-label{display:flex;flex-direction:column;gap:6px;max-width:100%;font-size:12px;color:var(--mmb-muted)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-filter{width:240px;max-width:100%;min-height:44px;padding:9px 12px;border:1px solid var(--mmb-line);border-radius:var(--r-ctl,8px);background:var(--mmb-panel);color:var(--mmb-text);font:inherit;font-size:14px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-count{font-size:12px;color:var(--mmb-muted);padding-bottom:10px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-sort{display:flex;align-items:center;gap:8px;min-height:44px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:inherit;cursor:pointer}
:is(#mmb-root,.mmb-visual-surface) [aria-sort=ascending] .mmb-v-sort:after{content:'↑'}
:is(#mmb-root,.mmb-visual-surface) [aria-sort=descending] .mmb-v-sort:after{content:'↓'}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-actions .mmb-v-export{margin-top:0}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-export-status{font-size:12px;color:var(--mmb-muted)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-export:disabled{opacity:.6;cursor:wait}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-slice{stroke:var(--mmb-panel);stroke-width:2}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-waterfall-connector{stroke:var(--mmb-muted);stroke-width:1;stroke-dasharray:3 3}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-entity{fill:var(--mmb-panel);stroke:var(--mmb-line);stroke-width:1}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-entity-label{fill:var(--mmb-hi);font-size:12px;font-weight:550}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-edge{stroke:var(--mmb-info);stroke-width:1.5;fill:none}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-relation{fill:var(--mmb-muted);font-size:11px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-relationships{margin-top:14px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-filter:focus-visible{outline:2px solid var(--mmb-info);outline-offset:3px}
@media(max-width:540px){:is(#mmb-root,.mmb-visual-surface) .mmb-v-data-controls{align-items:stretch}:is(#mmb-root,.mmb-visual-surface) .mmb-v-filter-label,:is(#mmb-root,.mmb-visual-surface) .mmb-v-filter{width:100%}:is(#mmb-root,.mmb-visual-surface) .mmb-v-actions .mmb-v-export{flex:1}}


/* Answer cards respond to the chat panel, including a compact panel on a wide desktop. */
:is(#mmb-root,.mmb-visual-surface) .mmb-v{container-type:inline-size;container-name:brain-visual}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table-wrap{max-block-size:min(28rem,60vh);overflow:auto;scrollbar-gutter:stable}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table thead th{position:sticky;top:0;z-index:3;background:var(--mmb-panel);box-shadow:0 1px 0 var(--mmb-line)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-relationships{max-block-size:min(34rem,65vh);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-reset{min-height:44px;padding:8px 12px;border:1px solid var(--mmb-line);border-radius:var(--r-ctl,8px);background:transparent;color:var(--mmb-text);font:inherit;font-size:12px;cursor:pointer}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-reset:disabled{opacity:.45;cursor:default}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-data-controls .mmb-v-count{margin-left:auto}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-details summary{line-height:1.55;padding:12px 0}
:is(#mmb-root,.mmb-visual-surface) .mmb-visual-notice{margin:16px 0;line-height:1.6}
:is(#mmb-root,.mmb-visual-surface) .mmb-visual-notice button:focus-visible{outline:2px solid var(--mmb-info);outline-offset:3px}
@container brain-visual (max-width:480px){
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-metric{font-size:20px}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-data-controls{align-items:stretch;gap:8px}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-filter-label,:is(#mmb-root,.mmb-visual-surface) .mmb-v-filter{width:100%}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-table{font-size:13px}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-table th,:is(#mmb-root,.mmb-visual-surface) .mmb-v-table td{padding:9px 10px}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-table th:first-child,:is(#mmb-root,.mmb-visual-surface) .mmb-v-table td:first-child{padding-left:0}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-actions .mmb-v-export{flex:1}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-flow .mmb-v-row{grid-template-columns:minmax(0,1fr);gap:5px}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-status .mmb-v-row{grid-template-columns:minmax(0,1fr);gap:4px}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-status .mmb-v-row-body{text-align:left}
  :is(#mmb-root,.mmb-visual-surface) .mmb-v-timeline .mmb-v-row{grid-template-columns:62px minmax(0,1fr);gap:12px}
}

:is(#mmb-root,.mmb-visual-surface) .mmb-v-table .mmb-v-prose{min-width:220px;max-width:320px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-sort{overflow-wrap:normal}

/* Keep row identity in view while comparing a wide, source-backed table. */
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table th.mmb-v-identity{position:sticky;inset-inline-start:0;z-index:2;inline-size:clamp(8.5rem,30cqi,12rem);min-inline-size:8.5rem;max-inline-size:12rem;padding-inline:10px;background:var(--mmb-panel);box-shadow:1px 0 0 var(--mmb-line);white-space:normal}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table thead th.mmb-v-identity{z-index:4;box-shadow:1px 0 0 var(--mmb-line),0 1px 0 var(--mmb-line)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-row-identity{display:flex;align-items:flex-start;gap:5px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-row-choice{display:flex;align-items:center;justify-content:center;flex:0 0 36px;min-height:44px;cursor:pointer;margin:-5px 0 -5px -6px}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-row-select{appearance:auto;flex:none;width:17px;height:17px;margin:0;accent-color:var(--mmb-info);cursor:pointer}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-row-name{padding-block:5px;overflow-wrap:anywhere;white-space:normal}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-table .mmb-v-row-selected :is(th,td){background:color-mix(in srgb,var(--mmb-info) 9%,var(--mmb-panel))}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-compare-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0 0}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-selection-count{flex:1 1 100%;font-size:12px;color:var(--mmb-muted);padding:3px 0}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-compare[data-active=true]{border-color:var(--mmb-info);background:color-mix(in srgb,var(--mmb-info) 10%,var(--mmb-panel));color:var(--mmb-hi)}
:is(#mmb-root,.mmb-visual-surface) .mmb-v-empty .mmb-v-reset{margin-top:9px}

/* Shared answer typography. Owned here; the widget and standalone chat load the
   same content-addressed stylesheet. Host palette/font tokens remain authoritative. */
#mmb-panel, #chat-main { container-type:inline-size; container-name:brain-answer; }
:is(.mmb-txt,.msg-prose).mmb-answer {
  min-width:0; max-width:100%; color:var(--mmb-text); font-family:var(--mmb-font);
  font-size:16px; line-height:1.65; overflow-wrap:anywhere; word-break:normal;
  font-variant-numeric:tabular-nums; text-align:start;
}
#mmb-panel.max .mmb-answer, #chat-main .mmb-answer { font-size:17px; }
.mmb-answer > :is(p,ul,ol,blockquote,h1,h2,h3,h4,h5,h6) { max-width:70ch; }
.mmb-answer > p { margin:0 0 16px; text-wrap:pretty; }
.mmb-answer > p:first-child { font-size:1.065em; line-height:1.6; margin-bottom:22px; color:var(--mmb-hi); }
.mmb-answer > p:only-child { margin-bottom:0; font-size:1em; }
.mmb-answer > :last-child { margin-bottom:0; }
:is(.mmb-txt,.msg-prose).mmb-answer :is(h1,h2,h3,h4,h5,h6) {
  font-family:var(--mmb-font); font-weight:650; color:var(--mmb-hi);
  text-wrap:pretty; letter-spacing:-.018em; scroll-margin-block:24px;
}
:is(.mmb-txt,.msg-prose).mmb-answer :is(h1,h2), #mmb-panel.max .mmb-answer :is(h1,h2) {
  font-size:1.38em; line-height:1.3; margin:30px 0 11px;
}
:is(.mmb-txt,.msg-prose).mmb-answer h3 { font-size:1.12em; line-height:1.4; margin:26px 0 9px; }
:is(.mmb-txt,.msg-prose).mmb-answer :is(h4,h5,h6) { font-size:1em; line-height:1.45; margin:23px 0 8px; }
.mmb-answer > :is(h1,h2,h3,h4,h5,h6):first-child { margin-top:0; }
.mmb-answer strong { color:var(--mmb-hi); font-weight:650; }
.mmb-answer .mmb-answer-label { font-weight:650; }
.mmb-answer :is(ul,ol) { margin:12px 0 18px; padding-inline-start:24px; }
.mmb-answer li { margin:7px 0; padding-inline-start:3px; }
.mmb-answer li::marker { color:var(--mmb-muted); font-variant-numeric:tabular-nums; }
.mmb-answer li :is(ul,ol) { margin:7px 0; }
.mmb-answer li p { margin:0 0 8px; }
.mmb-answer li > :last-child { margin-bottom:0; }
.mmb-answer a { color:var(--mmb-info); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
.mmb-answer a:hover { color:var(--mmb-hi); }
.mmb-answer a:focus-visible, .mmb-answer button:focus-visible, .mmb-answer [tabindex="0"]:focus-visible {
  outline:2px solid var(--mmb-info); outline-offset:3px;
}
.mmb-answer .mmb-hr { border:0; border-top:1px solid var(--mmb-line); margin:25px 0; }
.mmb-answer :is(.mmb-bq,.mmb-callout) {
  margin:18px 0; padding:14px 16px; border:1px solid var(--mmb-line); border-radius:10px;
  background:color-mix(in srgb,var(--mmb-text) 3%,transparent); color:var(--mmb-text); font-size:.94em; line-height:1.6;
}
.mmb-answer :is(.mmb-bq,.mmb-callout) > :last-child { margin-bottom:0; }
.mmb-answer .mmb-callout-title { margin:0 0 6px; font:650 .84em/1.4 var(--mmb-font); color:var(--mmb-hi); }
.mmb-answer .mmb-table-wrap { margin:20px 0 24px; min-width:0; max-width:100%; border:1px solid var(--mmb-line); border-radius:12px; overflow:hidden; }
.mmb-answer .mmb-table-tools {
  display:flex; justify-content:flex-end; align-items:center; gap:12px; min-height:37px;
  padding:2px 8px; border-bottom:1px solid var(--mmb-line); background:color-mix(in srgb,var(--mmb-text) 3%,transparent);
}
.mmb-answer .mmb-copy-status { font:400 12px/1.4 var(--mmb-font); color:var(--mmb-muted); }
.mmb-answer :is(.mmb-table-copy,.mmb-code-copy) {
  display:inline-flex; align-items:center; justify-content:center; min-height:34px;
  padding:6px 10px; border:1px solid transparent; border-radius:6px; cursor:pointer;
  background:transparent; color:var(--mmb-muted); font:550 12px/1.4 var(--mmb-font); white-space:nowrap;
}
.mmb-answer :is(.mmb-table-copy,.mmb-code-copy):hover { color:var(--mmb-hi); background:color-mix(in srgb,var(--mmb-text) 6%,transparent); }
.mmb-answer .mmb-table-scroll { overflow:auto; max-width:100%; overscroll-behavior-inline:contain; scrollbar-width:thin; scrollbar-color:var(--mmb-muted) transparent; }
:is(.mmb-txt,.msg-prose).mmb-answer .mmb-table {
  display:table; width:100%; max-width:none; margin:0; border:0; border-spacing:0; border-collapse:separate;
  border-radius:0; font-size:.88em; line-height:1.55; font-variant-numeric:tabular-nums;
}
:is(.mmb-txt,.msg-prose).mmb-answer .mmb-table :is(th,td) {
  padding:11px 14px; min-width:84px; max-width:34ch; vertical-align:top; text-align:start;
  border:0; border-bottom:1px solid var(--mmb-line); white-space:normal; overflow-wrap:normal;
}
.mmb-answer .mmb-table th { font-weight:600; color:var(--mmb-hi); background:color-mix(in srgb,var(--mmb-text) 3%,transparent); }
.mmb-answer .mmb-table td { color:var(--mmb-text); }
.mmb-answer .mmb-table tbody tr:nth-child(even) { background:color-mix(in srgb,var(--mmb-text) 2%,transparent); }
.mmb-answer .mmb-table tbody tr:last-child td { border-bottom:0; }
.mmb-answer .mmb-table :is(th,td)[data-align="right"] { text-align:right; }
.mmb-answer .mmb-table :is(th,td)[data-align="center"] { text-align:center; }
.mmb-answer .mmb-table :is(th,td)[data-align="left"] { text-align:left; }
.mmb-answer code { font:.85em/1.55 var(--mmb-mono); padding:2px 5px; border-radius:4px; background:color-mix(in srgb,var(--mmb-text) 6%,transparent); }
.mmb-answer .mmb-code { margin:18px 0; border:1px solid var(--mmb-line); border-radius:10px; overflow:hidden; background:color-mix(in srgb,var(--mmb-text) 3%,transparent); }
.mmb-answer .mmb-code-bar { display:flex; align-items:center; justify-content:space-between; min-height:38px; padding:2px 8px 2px 14px; border-bottom:1px solid var(--mmb-line); }
.mmb-answer .mmb-code-lang { color:var(--mmb-muted); font:500 12px/1.4 var(--mmb-font); letter-spacing:0; text-transform:none; }
.mmb-answer .mmb-code pre { padding:14px 16px; margin:0; overflow:auto; font:13px/1.65 var(--mmb-mono); tab-size:2; }
.mmb-answer .mmb-code pre code { font:inherit; padding:0; background:none; white-space:pre; overflow-wrap:normal; }
.mmb-answer [data-mmb-math="display"] { display:block; max-width:100%; margin:20px 0; padding-block:8px; overflow:auto; }
.mmb-answer .mmb-open { white-space:pre-wrap; }
:is(#mmb-root,#chat-main) .mmb-sugg { display:flex; flex-direction:column; gap:3px; margin:24px 0 12px; padding-top:14px; border-top:1px solid var(--mmb-line); }
:is(#mmb-root,#chat-main) .mmb-sugg-label { margin:0 0 5px; font:600 11px/1.5 var(--mmb-font); letter-spacing:.04em; color:var(--mmb-muted); }
:is(#mmb-root,#chat-main) .mmb-sugg .mmb-sug {
  display:flex; align-items:center; justify-content:space-between; gap:14px; width:100%; min-height:44px;
  padding:10px 11px; border:1px solid transparent; border-radius:8px; background:transparent;
  color:var(--mmb-text); font:400 14px/1.5 var(--mmb-font); text-align:start; white-space:normal; cursor:pointer;
  transition:background .15s,color .15s;
}
:is(#mmb-root,#chat-main) .mmb-sugg .mmb-sug .g { flex:none; margin:0; color:var(--mmb-muted); }
:is(#mmb-root,#chat-main) .mmb-sugg .mmb-sug:hover { background:color-mix(in srgb,var(--mmb-text) 5%,transparent); border-color:transparent; color:var(--mmb-hi); transform:none; }
:is(#mmb-root,#chat-main) .mmb-sugg .mmb-sug:active { transform:none; }
:is(#mmb-root,#chat-main) .mmb-sugg .mmb-sug:focus-visible { outline:2px solid var(--mmb-info); outline-offset:2px; }
:is(#mmb-root,#chat-main) .mmb-sugg .mmb-sug:disabled { opacity:.55; cursor:default; }
#chat-main .msg.assistant .msg-bubble { padding:6px 0; background:none; border:0; border-radius:0; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
#chat-main .msg.assistant { margin-bottom:18px; }
html[data-lang="zh"] .mmb-answer :is(h1,h2,h3,h4,h5,h6), html[data-lang="zh"] :is(#mmb-root,#chat-main) .mmb-sugg-label { letter-spacing:0; text-transform:none; }
@container brain-answer (max-width:520px) {
  :is(.mmb-txt,.msg-prose).mmb-answer, #mmb-panel.max .mmb-answer, #chat-main .mmb-answer { font-size:15.5px; line-height:1.65; }
  .mmb-answer > p:first-child { font-size:1.04em; margin-bottom:18px; }
  .mmb-answer .mmb-table :is(th,td) { padding:10px 12px; }
  .mmb-answer .mmb-table-wrap { margin:17px 0 21px; }
  :is(#mmb-root,#chat-main) .mmb-sugg .mmb-sug { padding-inline:8px; font-size:13px; }
}
@media (pointer:coarse) { .mmb-answer :is(.mmb-table-copy,.mmb-code-copy) { min-height:44px; } }
@media (prefers-reduced-motion:reduce) { :is(#mmb-root,#chat-main) .mmb-sugg .mmb-sug { animation:none; transition:none; } }


/* Brain workspace composition.
   Dark: a quiet reading plane with one raised composer and restrained luminance.
   Light: a paper reading plane, cool navigation and a bordered, lightly lifted input.
   Existing host tokens own color; the widget's portable aliases remain the fallback.
   This asset owns presentation; JavaScript owns states, focus and interaction. */
/* Bind the existing portable aliases to the host design system. Literal fallback
   values are retained from the widget's incumbent palette for embed hosts which
   do not expose theme.css; this adds no independent palette or token family. */
html body #mmb-root, html[data-theme] body #mmb-root {
  --mmb-info:var(--ink-info,var(--info,#a0adff));
  --mmb-text:var(--text,#e8edf5); --mmb-hi:var(--text,#fff);
  --mmb-muted:var(--muted,#a0aabd); --mmb-panel:var(--panel,#171c26);
  --mmb-panel2:var(--panel2,#202735); --mmb-plate:var(--bg,#10151e);
  --mmb-line:var(--line,color-mix(in srgb,var(--mmb-text) 14%,transparent));
  --mmb-reading-plane:var(--bg,var(--mmb-plate));
  --mmb-font:var(--font-ui,Inter,-apple-system,"Segoe UI",Roboto,sans-serif);
  --mmb-mono:var(--font-mono,ui-monospace,SFMono-Regular,Menlo,monospace);
  --mmb-ok:var(--ink-ok,var(--ok,#3da564));
  --mmb-warn:var(--ink-warn,var(--warn,#e0a030));
  --mmb-danger:var(--ink-act,var(--act,#e05555));
}
html[data-theme=light] body #mmb-root {
  --mmb-info:var(--ink-info,var(--info,#4d5fc5));
  --mmb-text:var(--text,#1c2430); --mmb-hi:var(--text,#080d16);
  --mmb-muted:var(--muted,#5d6b7e); --mmb-panel:var(--panel,#fff);
  --mmb-panel2:var(--panel2,#eef1f6); --mmb-plate:var(--bg,#e7ebf2);
  --mmb-reading-plane:var(--mmb-panel);
  --mmb-ok:var(--ink-ok,var(--ok,#2f8a52));
  --mmb-warn:var(--ink-warn,var(--warn,#b9791a));
  --mmb-danger:var(--ink-act,var(--act,#cf4040));
}
#mmb-root #mmb-panel {
  border-radius:var(--r-panel,14px); background:var(--mmb-reading-plane);
  -webkit-backdrop-filter:none; backdrop-filter:none;
  box-shadow:var(--mmb-shadow-panel);
}
#mmb-root .mmb-main { min-height:0; container-type:inline-size; container-name:brain-workspace; }
#mmb-root .mmb-rail { width:56px; padding:var(--sp-4,16px) 0; gap:var(--sp-2,8px); background:var(--mmb-panel); }
#mmb-root .mmb-rail .logo { width:32px; height:32px; border:1px solid var(--mmb-line); border-radius:var(--r-ctl,8px); background:var(--mmb-panel2); }
#mmb-root .mmb-rail .logo svg { fill:var(--mmb-text); }
#mmb-root .mmb-icon { width:44px; height:44px; border-radius:var(--r-ctl,8px); }
#mmb-root .mmb-icon:hover { background:color-mix(in srgb,var(--mmb-text) 6%,transparent); }
#mmb-root #mmb-panel.max .mmb-rail, #mmb-root #mmb-panel.max .mmb-threads { animation:none; }
#mmb-root #mmb-panel.max .mmb-threads { width:264px; }
#mmb-root .mmb-threads .mmb-th-h { min-height:68px; padding:var(--sp-3,12px) var(--sp-4,16px); }
#mmb-root .mmb-threads .mmb-th-h span { font-size:12px; line-height:1.5; font-weight:600; letter-spacing:0; text-transform:none; }
#mmb-root .mmb-history-new { min-height:44px; margin:0 var(--sp-3,12px) var(--sp-4,16px); background:var(--mmb-panel2); border-radius:var(--r-btn,10px); }
#mmb-root .mmb-history-new:hover { border-color:color-mix(in srgb,var(--mmb-text) 25%,transparent); }
#mmb-root .mmb-search { min-height:44px; padding:0 10px; border-radius:var(--r-ctl,8px); background:transparent; }
#mmb-root .mmb-search:focus-within { outline:2px solid var(--mmb-info); outline-offset:2px; }
#mmb-root .mmb-search input { min-height:42px; }
#mmb-root .mmb-search .x { min-width:32px; min-height:40px; }
#mmb-root .mmb-history-group { margin:var(--sp-5,20px) var(--sp-4,16px) var(--sp-2,8px); font-size:11px; line-height:1.4; letter-spacing:0; text-transform:none; font-weight:500; }
#mmb-root .mmb-ti { margin:2px var(--sp-2,8px); padding:4px var(--sp-2,8px); border-radius:var(--r-ctl,8px); }
#mmb-root .mmb-ti.on { background:color-mix(in srgb,var(--mmb-text) 7%,transparent); border-color:transparent; }
#mmb-root .mmb-ti-body { min-height:48px; padding:6px 2px; }
#mmb-root .mmb-ti .tt { font-size:13px; font-weight:500; line-height:1.5; }
#mmb-root .mmb-ti.on .tt { font-weight:600; color:var(--mmb-hi); }
#mmb-root .mmb-ti .tm { margin-top:3px; font-size:11px; font-weight:400; line-height:1.4; }
#mmb-root .mmb-ti-act, #mmb-root .mmb-ti-yes, #mmb-root .mmb-ti-no { width:32px; height:40px; border-radius:var(--r-ctl,8px); }
#mmb-root .mmb-ti-input { min-height:44px; }
#mmb-root .mmb-history-more { min-height:44px; border-radius:var(--r-btn,10px); background:transparent; }
#mmb-root .mmb-th-empty { padding:var(--sp-4,16px); font-size:13px; line-height:1.6; }
#mmb-root .mmb-head { position:relative; min-height:68px; padding:10px var(--sp-4,16px); gap:var(--sp-1,4px); background:var(--mmb-reading-plane); }
#mmb-root .mmb-head .ttl { gap:var(--sp-3,12px); }
#mmb-root .mmb-chat-title { font-size:14px; line-height:1.4; font-weight:600; letter-spacing:-.01em; }
#mmb-root .mmb-chat-subtitle { font-size:11.5px; line-height:1.4; }
#mmb-root .mmb-head .dot { width:6px; height:6px; background:var(--mmb-muted); box-shadow:none; }
#mmb-root .mmb-head .dot.busy { background:var(--mmb-info); box-shadow:none; }
#mmb-root .mmb-head-more[aria-expanded=true] { background:var(--mmb-panel2); color:var(--mmb-hi); }
#mmb-root .mmb-head-menu { position:absolute; top:calc(100% - 4px); right:var(--sp-4,16px); z-index:12; display:flex; flex-direction:column; gap:2px; width:248px; max-width:calc(100% - 24px); padding:6px; border:1px solid var(--mmb-line); border-radius:var(--r-card,12px); background:var(--mmb-panel); box-shadow:var(--mmb-shadow-pop); }
#mmb-root .mmb-head-menu[hidden] { display:none; }
#mmb-root .mmb-head-menu [role=menuitem] { display:flex; align-items:center; gap:var(--sp-3,12px); min-height:44px; width:100%; padding:10px var(--sp-3,12px); border:0; border-radius:var(--r-ctl,8px); background:transparent; color:var(--mmb-text); font:500 13px/1.45 var(--mmb-font); text-align:start; cursor:pointer; }
#mmb-root #mmb-panel .mmb-head-menu .mmb-template-trigger { width:100%; padding:10px var(--sp-3,12px); justify-content:flex-start; }
#mmb-root #mmb-panel .mmb-head-menu .mmb-template-trigger-label { display:inline; }
#mmb-root .mmb-jump[hidden] { display:none; }
#mmb-root .mmb-head-menu [role=menuitem]:hover { background:color-mix(in srgb,var(--mmb-text) 6%,transparent); }
#mmb-root .mmb-head-menu svg { width:18px; height:18px; flex:none; stroke:currentColor; fill:none; stroke-width:1.7; }
#mmb-root .mmb-head-menu [role=menuitem]:focus-visible { outline:2px solid var(--mmb-info); outline-offset:-2px; }
#mmb-root .mmb-find { padding:var(--sp-2,8px) var(--sp-4,16px) var(--sp-3,12px); }
#mmb-root .mmb-find input { min-height:44px; font-size:14px; background:var(--mmb-reading-plane); }
#mmb-root .mmb-find-scope { margin-top:var(--sp-2,8px); font-size:11.5px; }
#mmb-root .mmb-scroll { padding:var(--sp-6,24px); gap:var(--sp-7,32px); scrollbar-color:color-mix(in srgb,var(--mmb-muted) 50%,transparent) transparent; }
#mmb-root #mmb-panel.max .mmb-scroll { padding:var(--sp-7,32px) max(28px,calc((100% - 780px)/2)); gap:var(--sp-7,32px); }
#mmb-root .mmb-scroll::-webkit-scrollbar-thumb { background:color-mix(in srgb,var(--mmb-muted) 35%,transparent); background-clip:padding-box; }
#mmb-root .mmb-empty { max-width:740px; padding:var(--sp-5,20px) 0 var(--sp-6,24px); }
#mmb-root .mmb-empty-kicker { margin-bottom:var(--sp-4,16px)!important; color:var(--mmb-muted); font-size:12px; font-weight:500; line-height:1.5; text-transform:none; letter-spacing:0; }
#mmb-root .mmb-hero h1 { max-width:20ch; font-size:clamp(28px,2.5vw,36px); line-height:1.18; letter-spacing:-.035em; font-weight:600; animation:none; }
#mmb-root .mmb-hero p { font-size:14px; line-height:1.65; margin-top:var(--sp-4,16px); max-width:49ch; animation:none; }
#mmb-root .mmb-cards { margin-top:var(--sp-7,32px); gap:var(--sp-3,12px); }
#mmb-root .mmb-cardp, #mmb-root #mmb-panel:not(.max) .mmb-cardp { min-height:76px; padding:var(--sp-4,16px); gap:var(--sp-3,12px); background:transparent; border-radius:var(--r-card,12px); transition:background var(--t-fast,.16s),border-color var(--t-fast,.16s); animation:none; }
#mmb-root .mmb-cardp:hover { transform:none; background:color-mix(in srgb,var(--mmb-text) 4%,transparent); border-color:color-mix(in srgb,var(--mmb-text) 22%,transparent); }
#mmb-root .mmb-cardp .ci { width:32px; height:32px; border-radius:var(--r-ctl,8px); background:var(--mmb-panel2); color:var(--mmb-text); }
#mmb-root .mmb-cardp .cp strong { font-size:14px; line-height:1.4; font-weight:550; }
#mmb-root .mmb-cardp .cp .desc { font-size:12.5px; line-height:1.5; }
#mmb-root .mmb-empty-foot { margin-top:var(--sp-4,16px); font-size:12px; gap:var(--sp-2,8px) var(--sp-4,16px); }
#mmb-root .mmb-empty-foot button { min-height:44px; font-size:12px; }
#mmb-root .mmb-msg.user { max-width:min(88%,640px); }
#mmb-root .mmb-msg.user .mmb-bub { border-radius:var(--r-card,12px); padding:var(--sp-3,12px) var(--sp-4,16px); font-size:15px; line-height:1.6; background:var(--mmb-panel2); }
#mmb-root .mmb-msg.assistant .mmb-bub { padding:0; }
#mmb-root .mmb-msg.assistant .mmb-orbmark { display:none; }
#mmb-root .mmb-actions { gap:var(--sp-1,4px); margin-top:var(--sp-4,16px); }
#mmb-root .mmb-abtn { border-radius:var(--r-ctl,8px); font-size:12px; }
#mmb-root .mmb-recap { margin-bottom:var(--sp-4,16px); }
#mmb-root .mmb-chip { min-height:32px; font-size:12px; line-height:1.5; }
#mmb-root .mmb-think { padding:var(--sp-4,16px); border-radius:var(--r-card,12px); background:var(--mmb-panel); box-shadow:none; }
#mmb-root .mmb-think .mmb-intent-text { font-size:14px; }
#mmb-root .mmb-think .mmb-intent-steps, #mmb-root .mmb-think .mmb-tk-row .rl { font-size:12px; }
#mmb-root .mmb-think .mmb-tk-h .sb { font-size:12px; }
#mmb-root :is(.mmb-recovery,.mmb-save-warning,.mmb-draft-offer) { padding:var(--sp-3,12px) var(--sp-4,16px); border-radius:var(--r-btn,10px); font-size:13px; line-height:1.6; background:color-mix(in srgb,var(--mmb-text) 3%,transparent); }
#mmb-root :is(.mmb-retry,.mmb-draft-offer button,.mmb-copy-feedback button) { min-height:44px; padding:10px var(--sp-3,12px); border-radius:var(--r-ctl,8px); font-size:12px; }
#mmb-root .mmb-comp { padding:var(--sp-3,12px) var(--sp-6,24px) var(--sp-4,16px); background:var(--mmb-reading-plane); }
#mmb-root #mmb-panel.max .mmb-comp { padding:var(--sp-3,12px) max(28px,calc((100% - 780px)/2)) var(--sp-6,24px); }
#mmb-root .mmb-box { border-radius:var(--r-panel,14px); background:var(--mmb-panel); border-color:color-mix(in srgb,var(--mmb-text) 17%,transparent); box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
#mmb-root .mmb-box:focus-within { border-color:var(--mmb-info); box-shadow:0 0 0 3px color-mix(in srgb,var(--mmb-info) 11%,transparent); }
#mmb-root .mmb-box.mmb-sent { animation:none; }
#mmb-root .mmb-ta { display:block; padding:var(--sp-4,16px) var(--sp-4,16px) var(--sp-2,8px); min-height:60px; font-size:16px; line-height:1.55; }
#mmb-root .mmb-tools { padding:var(--sp-1,4px) var(--sp-2,8px) var(--sp-2,8px); gap:var(--sp-1,4px); }
#mmb-root .mmb-seg { padding:2px; border-radius:var(--r-btn,10px); border:0; background:color-mix(in srgb,var(--mmb-text) 4%,transparent); }
#mmb-root .mmb-seg button { min-height:40px; padding:8px 10px; border-radius:var(--r-ctl,8px); font-size:12px; line-height:1.4; font-weight:550; }
#mmb-root .mmb-seg button.on, #mmb-root .mmb-seg button.on:hover { background:var(--mmb-panel2); color:var(--mmb-hi); box-shadow:0 1px 2px color-mix(in srgb,var(--mmb-ink) 6%,transparent); }
#mmb-root .mmb-tbtn { width:44px; height:44px; flex:none; border-radius:var(--r-ctl,8px); }
#mmb-root .mmb-tbtn[aria-pressed=true] { background:color-mix(in srgb,var(--mmb-info) 12%,transparent); color:var(--mmb-info); }
#mmb-root .mmb-send { flex:none; width:44px; height:44px; border-radius:var(--r-btn,10px); background:var(--mmb-hi); color:var(--mmb-reading-plane); box-shadow:none; }
#mmb-root .mmb-send:not(:disabled):hover { transform:none; box-shadow:none; background:color-mix(in srgb,var(--mmb-hi) 85%,var(--mmb-muted)); }
#mmb-root .mmb-send.mmb-stop { background:var(--mmb-hi); color:var(--mmb-reading-plane); box-shadow:none; }
#mmb-root .mmb-compose-meta { min-height:46px; padding:5px var(--sp-3,12px); gap:var(--sp-3,12px); }
#mmb-root .mmb-mode-description { font-size:11.5px; line-height:1.5; }
#mmb-root .mmb-research-toggle { min-height:36px; border-radius:var(--r-ctl,8px); padding:8px 10px; background:transparent; border-color:transparent; font-size:11.5px; font-weight:550; }
#mmb-root .mmb-research-toggle[aria-pressed=true] { border-color:var(--mmb-line); background:var(--mmb-panel2); color:var(--mmb-hi); }
#mmb-root .mmb-composer-status { margin:var(--sp-2,8px) 2px 0; padding:0; color:var(--mmb-muted); font:12px/1.5 var(--mmb-font); overflow-wrap:anywhere; }
#mmb-root .mmb-composer-status[hidden], #mmb-root .mmb-composer-status:empty { display:none; }
#mmb-root .mmb-composer-status:is([data-kind=error],[data-kind=offline]) { color:var(--ink-warn,var(--mmb-warn)); }
#mmb-root .mmb-jump { min-height:44px; padding:10px var(--sp-4,16px); gap:var(--sp-2,8px); border:1px solid var(--mmb-line); color:var(--mmb-text); background:var(--mmb-panel); font-size:12px; box-shadow:var(--mmb-shadow-pop); }
#mmb-root .mmb-ctx { padding:var(--sp-3,12px) var(--sp-3,12px) 0; }
#mmb-root .mmb-ctx .chip { min-height:28px; border-radius:var(--r-ctl,8px); background:color-mix(in srgb,var(--mmb-text) 4%,transparent); border-color:var(--mmb-line); color:var(--mmb-text); }
#mmb-root .mmb-ctx .chip .cx { animation:none; }
#mmb-root .mmb-ctx .chip.pin { color:var(--mmb-text); background:var(--mmb-panel2); border-color:var(--mmb-line); }
#mmb-root .mmb-ctx-pin { width:40px; height:40px; border-radius:var(--r-ctl,8px); }
#mmb-root .mmb-ctx-pin.on { color:var(--mmb-text); background:var(--mmb-panel2); border-color:var(--mmb-line); }
#mmb-root .mmb-ctxinsp-card, #mmb-root .mmb-template-dialog, #mmb-root .mmb-answer-menu { border-radius:var(--r-card,12px); }
#mmb-root .mmb-ctxinsp-h .x { width:44px; height:44px; }
#mmb-root .mmb-template-choice { border-radius:var(--r-btn,10px); }
#mmb-root .mmb-template-choice[aria-pressed=true] { border-color:color-mix(in srgb,var(--mmb-text) 36%,transparent); background:var(--mmb-panel2); }
#mmb-root .mmb-template-apply { border-color:transparent; }
#mmb-root .mmb-template-dialog::backdrop, #mmb-root .mmb-source-dialog::backdrop { background:color-mix(in srgb,var(--mmb-scrim) 55%,transparent); }
#mmb-root #mmb-launch { padding:6px 14px 6px 6px; border-radius:var(--r-pill,999px); background:var(--mmb-panel); border-color:var(--mmb-line); box-shadow:var(--mmb-shadow-pop); }
#mmb-root #mmb-launch::before { display:none; }
#mmb-root #mmb-launch:hover { box-shadow:var(--mmb-shadow-pop); transform:translateY(-1px); }
#mmb-root #mmb-launch .lk { display:none; }
#mmb-root .mmb-orb { width:34px; height:34px; background:var(--mmb-panel2); box-shadow:none; animation:none; }
#mmb-root .mmb-orb::after { display:none; }
#mmb-root .mmb-orb svg { fill:var(--mmb-hi); filter:none; }
#mmb-root .mmb-gate h2 { background:none; -webkit-text-fill-color:currentColor; color:var(--mmb-hi); font-weight:600; }
#mmb-root .mmb-signin { min-height:44px; border-radius:var(--r-btn,10px); background:var(--mmb-hi); color:var(--mmb-panel); box-shadow:none; }

/* Light material treatment: cool navigation, a white sheet and one lifted input. */
html[data-theme=light] #mmb-root .mmb-rail, html[data-theme=light] #mmb-root .mmb-threads { background:var(--mmb-panel2); }
html[data-theme=light] #mmb-root .mmb-history-new { background:var(--mmb-panel); box-shadow:var(--card-shadow,var(--mmb-shadow-box)); }
html[data-theme=light] #mmb-root .mmb-ti.on { background:var(--mmb-panel); border-color:var(--mmb-line); box-shadow:var(--card-shadow,none); }
html[data-theme=light] #mmb-root .mmb-search { background:var(--mmb-panel); }
html[data-theme=light] #mmb-root .mmb-box { background:var(--mmb-panel); box-shadow:var(--mmb-shadow-box); border-color:var(--mmb-line); }
html[data-theme=light] #mmb-root .mmb-box:focus-within { border-color:var(--mmb-info); box-shadow:var(--mmb-shadow-box),0 0 0 3px color-mix(in srgb,var(--mmb-info) 10%,transparent); }
html[data-theme=light] #mmb-root .mmb-seg button.on { background:var(--mmb-panel); box-shadow:var(--card-shadow,var(--mmb-shadow-pop)); }
html[data-theme=light] #mmb-root .mmb-cardp { background:var(--mmb-panel); box-shadow:var(--card-shadow,none); }
html[data-theme=light] #mmb-root .mmb-cardp:hover { background:var(--mmb-panel2); box-shadow:none; }
html[data-theme=light] #mmb-root .mmb-think { background:var(--mmb-panel2); border-color:transparent; }
html[data-theme=light] #mmb-root .mmb-head-menu, html[data-theme=light] #mmb-root .mmb-answer-menu { background:var(--mmb-panel); box-shadow:var(--popover-shadow,var(--mmb-shadow-pop)); }

@media(min-width:1100px) {
  #mmb-root #mmb-panel.max .mmb-cardp { min-height:136px; padding:var(--sp-4,16px); }
}
@container brain-workspace (max-width:620px) {
  #mmb-root .mmb-head { padding-inline:var(--sp-2,8px); }
  #mmb-root .mmb-head .dot { display:none; }
  #mmb-root .mmb-chat-title { font-size:13px; }
  #mmb-root .mmb-chat-subtitle { font-size:11px; }
  #mmb-root .mmb-scroll, #mmb-root #mmb-panel.max .mmb-scroll { padding:var(--sp-6,24px) var(--sp-5,20px); gap:var(--sp-6,24px); }
  #mmb-root .mmb-comp, #mmb-root #mmb-panel.max .mmb-comp { padding:var(--sp-2,8px) var(--sp-4,16px) var(--sp-4,16px); }
  #mmb-root .mmb-cards, #mmb-root #mmb-panel.max .mmb-cards { grid-template-columns:1fr; margin-top:var(--sp-6,24px); gap:var(--sp-2,8px); }
  #mmb-root #mmb-panel.max .mmb-cardp { min-height:76px; flex-direction:row; align-items:center; }
  #mmb-root #mmb-panel.max .mmb-prompt-arrow { display:block; }
  #mmb-root .mmb-hero h1, #mmb-root #mmb-panel:not(.max) .mmb-hero h1 { font-size:28px; }
  #mmb-root .mmb-ta { min-height:58px; }
}
@media(max-width:960px) {
  #mmb-root #mmb-panel.max .mmb-threads { width:min(320px,calc(100% - 48px)); }
}
@media(max-width:560px) {
  #mmb-root #mmb-panel, #mmb-root #mmb-panel.max { border-radius:0; }
  #mmb-root .mmb-head { padding-top:max(10px,env(safe-area-inset-top)); }
  #mmb-root .mmb-comp, #mmb-root #mmb-panel.max .mmb-comp { padding-bottom:max(var(--sp-3,12px),env(safe-area-inset-bottom)); }
  #mmb-root .mmb-tools { display:flex; flex-wrap:wrap; gap:var(--sp-1,4px); }
  #mmb-root .mmb-tools .sp { display:block; flex:1; }
  #mmb-root .mmb-seg { max-width:100%; flex:none; }
  #mmb-root .mmb-seg button { min-height:44px; padding:8px; }
  #mmb-root .mmb-tools .mmb-q:not(:empty) { display:inline-flex; flex-basis:auto; order:0; min-height:24px; justify-content:flex-end; padding:0 2px; font-size:11.5px; line-height:1.4; white-space:nowrap; }
  #mmb-root .mmb-compose-meta { min-height:48px; }
  #mmb-root .mmb-research-toggle { min-height:44px; }
  #mmb-root .mmb-ctx-pin { width:44px; height:44px; }
  #mmb-root .mmb-ti-act, #mmb-root .mmb-ti-yes, #mmb-root .mmb-ti-no { min-width:44px; min-height:44px; }
  #mmb-root .mmb-search .x { min-width:44px; min-height:44px; }
  #mmb-root .mmb-template-dialog { width:calc(100vw - 24px); padding:var(--sp-4,16px); }
  #mmb-root .mmb-source-dialog { border-radius:var(--r-panel,14px) var(--r-panel,14px) 0 0; }
}
@media(max-width:360px) {
  #mmb-root .mmb-head .ttl { gap:0; }
  #mmb-root .mmb-chat-subtitle { max-width:12ch; }
  #mmb-root .mmb-tools { gap:0; }
  #mmb-root .mmb-seg button { padding-inline:6px; }
  #mmb-root .mmb-mode-description { font-size:11px; }
}
@media(pointer:coarse) {
  #mmb-root .mmb-ti-act, #mmb-root .mmb-ti-yes, #mmb-root .mmb-ti-no { min-width:44px; min-height:44px; }
  #mmb-root .mmb-chip { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) {
  #mmb-root :is(.mmb-cardp,.mmb-head-menu,.mmb-send,.mmb-tbtn,.mmb-jump) { animation:none; transition:none; }
}

/* On a roomy empty workspace, the first question and the input form one group.
   Short and compact views retain their independently scrolling conversation. */
@media(min-width:961px) and (min-height:780px) {
  #mmb-root #mmb-panel.max .mmb-main:has(.mmb-empty) .mmb-scroll { flex:0 1 auto; margin-top:auto; padding-bottom:0; }
  #mmb-root #mmb-panel.max .mmb-main:has(.mmb-empty) .mmb-empty { flex:0; padding-bottom:var(--sp-2,8px); }
  #mmb-root #mmb-panel.max .mmb-main:has(.mmb-empty) .mmb-comp { margin-bottom:auto; padding-top:var(--sp-2,8px); }
}

/* Compact composer: retain every action and meter without a permanent explanatory
   paragraph. The description stays available through aria-describedby. */
#mmb-root .mmb-ta { min-height:44px; padding:10px var(--sp-4,16px); line-height:1.5; }
#mmb-root .mmb-tools { padding:0 var(--sp-2,8px) var(--sp-1,4px); }
#mmb-root .mmb-compose-meta { justify-content:space-between; min-height:44px; padding:0 var(--sp-2,8px); border-top:0; }
#mmb-root #mmb-panel .mmb-compose-meta .mmb-key-caption { display:inline; }
#mmb-root .mmb-mode-description { position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#mmb-root .mmb-research-toggle { min-height:44px; padding:8px 10px; font-size:12px; }
#mmb-root .mmb-comp, #mmb-root #mmb-panel.max .mmb-comp { padding-top:var(--sp-2,8px); padding-bottom:var(--sp-3,12px); }
@media(max-width:560px) {
  #mmb-root .mmb-ta { min-height:44px; }
  #mmb-root .mmb-tools { flex-wrap:nowrap; gap:2px; }
  #mmb-root .mmb-tools .mmb-q { flex:none; }
  #mmb-root .mmb-seg button { padding-inline:7px; }
  #mmb-root .mmb-comp, #mmb-root #mmb-panel.max .mmb-comp { padding-bottom:max(var(--sp-2,8px),env(safe-area-inset-bottom)); }
}
@media(max-width:360px) {
  #mmb-root .mmb-tools { flex-wrap:wrap; }
  #mmb-root .mmb-tools .mmb-q:not(:empty) { flex-basis:100%; order:5; min-height:20px; padding:0 4px; }
}
