/* Shared, safe formatting for AI previews and streamed reports. */
.b-result-view{min-width:0}
.b-result-mode{display:flex;gap:4px;padding:4px;margin-bottom:12px;border:1px solid #dce6f5;border-radius:10px;background:#f1f5fc}
.b-result-mode button{flex:1;min-height:36px;border:1px solid transparent;border-radius:7px;background:transparent;padding:7px 12px;font:inherit;font-size:12px;color:#526783;cursor:pointer}
.b-result-mode button[aria-pressed=true]{border-color:#dae5f5;background:#fff;color:#1d4ed8;font-weight:600;box-shadow:0 2px 5px #294d8010}
.b-result-mode button:hover{color:#1d4ed8}
.b-result-mode button:focus-visible,.b-markdown-table-wrap:focus-visible,.b-result-preview:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.b-result-view [hidden]{display:none!important}
.b-result-preview{min-width:0;max-height:clamp(390px,60vh,720px);overflow:auto;overscroll-behavior:contain;border:1px solid #d9e5f6;border-radius:10px;background:#fbfdff;padding:18px;scrollbar-width:thin;scrollbar-color:#bfd0ec #f3f7fd}
.b-markdown{min-width:0;color:#354d6d;font-size:13px;line-height:1.85;white-space:normal;overflow-wrap:anywhere}
.b-markdown>*:first-child{margin-top:0}
.b-markdown>*:last-child{margin-bottom:0}
.b-markdown p{margin:0 0 16px;font-size:inherit;line-height:inherit;color:inherit}
.b-markdown h1,.b-markdown h2,.b-markdown h3,.b-markdown h4,.b-markdown h5,.b-markdown h6{margin:24px 0 12px;color:#233e63;line-height:1.5;font-weight:650;overflow-wrap:anywhere}
.b-markdown h1{font-size:21px}.b-markdown h2{font-size:18px}.b-markdown h3{font-size:16px}.b-markdown h4,.b-markdown h5,.b-markdown h6{font-size:14px}
.b-markdown strong{color:#274568;font-weight:650}
.b-markdown ul,.b-markdown ol{margin:10px 0 18px;padding-left:24px}
.b-markdown li{padding-left:2px;margin:6px 0;line-height:1.85}
.b-markdown code{padding:2px 5px;border-radius:4px;background:#edf2fa;color:#37577d;font-size:.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
.b-markdown pre{max-width:100%;overflow:auto;margin:16px 0;padding:14px;border:1px solid #dde6f2;border-radius:8px;background:#f1f5fb;white-space:pre;line-height:1.7}
.b-markdown pre code{padding:0;background:transparent;white-space:pre;overflow-wrap:normal}
.b-markdown hr{height:1px;border:0;background:#dce6f3;margin:22px 0}
.b-markdown-table-wrap{max-width:100%;overflow:auto;overscroll-behavior-x:contain;margin:16px 0 20px;border:1px solid #d6e2f3;border-radius:9px;background:#fff;scrollbar-width:thin;scrollbar-color:#b8cce9 #f0f5fc}
.b-markdown table{width:100%;min-width:480px;border-collapse:separate;border-spacing:0;table-layout:auto;font-size:12.5px;line-height:1.75;color:#354d6d}
.b-markdown th,.b-markdown td{min-width:110px;max-width:320px;vertical-align:top;padding:12px 14px;border-right:1px solid #e0e8f3;border-bottom:1px solid #e0e8f3;text-align:left;white-space:normal;overflow-wrap:anywhere}
.b-markdown th{background:#edf4ff;color:#254d7c;font-weight:650}
.b-markdown th:last-child,.b-markdown td:last-child{border-right:0}
.b-markdown tbody tr:last-child td{border-bottom:0}
.b-markdown tbody tr:nth-child(even){background:#f8faff}
.b-markdown tbody tr:hover{background:#f0f6ff}
.b-markdown th.b-align-left,.b-markdown td.b-align-left{text-align:left}
.b-markdown th.b-align-center,.b-markdown td.b-align-center{text-align:center}
.b-markdown th.b-align-right,.b-markdown td.b-align-right{text-align:right}
.b-stream-content .b-markdown{font-size:13px;line-height:1.85}
@media(max-width:600px){.b-result-preview{padding:14px;max-height:520px}.b-markdown th,.b-markdown td{padding:10px 12px}.b-result-mode button{min-height:40px}}
