/* Glass shell over a dark reading canvas. Original source documents keep their colors. */
.camel-chat-launcher[hidden]{display:none!important}
:root dialog.camel-chat-panel,
:root[data-theme] dialog.camel-chat-panel{
 --chat-bg:rgba(240,247,249,.94);--chat-surface:#f8fbfc;--chat-soft:#eaf2f4;--chat-canvas:#edf4f6;
 --chat-text:#193747;--chat-muted:#526b79;--chat-border:#d2dfe5;--chat-accent:#08786d;
 --chat-user-bg:#e7f3ef;--chat-input:#ffffff;--chat-header:#f6faf9;--chat-code:#e8f0f3;
 --chat-table-head:#e0eeeb;--chat-error:#fff1ea;--chat-warning:#865300;
 --chart-grid:#dce5ea;--chart-axis:#90a8b4;--chart-positive:#107f76;--chart-negative:#bb594b;
 --chat-glass:rgba(248,252,253,.78);--chat-glass-line:rgba(255,255,255,.7);--chat-glow:rgba(14,151,133,.06);
 color-scheme:light;font-family:"Segoe UI",Arial,sans-serif;
 width:min(1240px,calc(100vw - 36px));height:min(940px,calc(100dvh - 36px));
 max-width:calc(100vw - 36px);max-height:calc(100dvh - 36px);min-width:0;
 padding:0;overflow:hidden;border:1px solid var(--chat-border);border-radius:18px;
 color:var(--chat-text);background:var(--chat-bg);box-shadow:0 22px 90px #183c4b40,inset 0 1px 0 var(--chat-glass-line);
 backdrop-filter:blur(26px) saturate(125%);-webkit-backdrop-filter:blur(26px) saturate(125%);position:fixed;inset:18px;margin:auto;z-index:1000;
}
:root[data-theme=dark] dialog.camel-chat-panel{
 --chat-bg:rgba(9,19,30,.96);--chat-surface:#112332;--chat-soft:#172e40;--chat-canvas:#091522;
 --chat-text:#edf5fc;--chat-muted:#b5c9da;--chat-border:#355166;--chat-accent:#70e1c7;
 --chat-user-bg:#173b3e;--chat-input:#0c1b29;--chat-header:#112331;--chat-code:#263d50;
 --chat-table-head:#1b3547;--chat-error:#402b28;--chat-warning:#f4c778;
 --chart-grid:#304859;--chart-axis:#8aa8ba;--chart-positive:#5bd1b9;--chart-negative:#f29685;
 --chat-glass:rgba(19,40,55,.78);--chat-glass-line:rgba(157,225,230,.13);--chat-glow:rgba(41,172,163,.07);
 color-scheme:dark;box-shadow:0 22px 90px #000b,inset 0 1px 0 var(--chat-glass-line);
}
:root dialog.camel-chat-panel[open]{display:flex;flex-direction:column;gap:0}
:root dialog.camel-chat-panel [hidden]{display:none!important}
:root dialog.camel-chat-panel *{box-sizing:border-box}
:root dialog.camel-chat-panel :is(h2,h3,strong,label,summary){color:var(--chat-text)}
:root dialog.camel-chat-panel :is(p,small){color:var(--chat-muted)}
:root dialog.camel-chat-panel :focus-visible{outline:3px solid var(--chat-accent);outline-offset:3px}
:root dialog.camel-chat-panel :is(input,select,textarea){font:inherit}
:root dialog.camel-chat-panel :is(input,textarea)::placeholder{color:var(--chat-muted);opacity:.85}
:root dialog.camel-chat-panel button{cursor:pointer;min-height:38px;font-family:inherit}
:root dialog.camel-chat-panel button:disabled{opacity:.65;cursor:wait}
:root dialog.camel-chat-panel .ghost{
 color:var(--chat-text);background:var(--chat-surface);border:1px solid var(--chat-border);
 border-radius:8px;box-shadow:none;
}
:root dialog.camel-chat-panel .ghost:hover:not(:disabled){background:var(--chat-soft);border-color:var(--chat-accent)}
:root dialog.camel-chat-panel .primary{background:#08786d;color:#fff;border:1px solid #08786d;border-radius:8px}
:root dialog.camel-chat-panel .primary:hover:not(:disabled){background:#06665d}

/* Header and navigation stay in their own tracks, outside the conversation. */
:root dialog.camel-chat-panel .camel-chat-header{
 display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;
 padding:15px 22px;min-height:80px;border-bottom:1px solid var(--chat-border);
 background:var(--chat-glass);flex-shrink:0;box-shadow:inset 0 1px 0 var(--chat-glass-line);
}
.camel-chat-header h2{margin:3px 0;font-size:1.2rem;line-height:1.3}
.camel-chat-header p{margin:0;font-size:.8rem;line-height:1.5}
:root dialog.camel-chat-panel .camel-chat-eyebrow{text-transform:uppercase;letter-spacing:.1em;font-size:.65rem;font-weight:700;color:var(--chat-accent)}
.camel-chat-header-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex-shrink:0}
.camel-chat-header-actions button{height:38px;width:auto;padding:0 12px;font-size:12px;white-space:nowrap}
.camel-chat-header-actions [data-chat-close]{width:38px;min-width:38px;padding:0;font-size:24px}
.camel-chat-layout{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:0;flex:1;overflow:hidden}
:root dialog.camel-chat-panel .camel-chat-tools{
 padding:18px 16px;min-height:0;overflow-y:auto;border-right:1px solid var(--chat-border);background:var(--chat-bg);
}
.camel-chat-tools label{display:flex;flex-direction:column;gap:6px;font-size:.8rem;font-weight:600}
:root dialog.camel-chat-panel .camel-chat-tools :is(select,input),
:root dialog.camel-chat-panel .chat-chart-controls select{
 width:100%;min-height:38px;border:1px solid var(--chat-border);border-radius:8px;
 background:var(--chat-input);color:var(--chat-text);padding:8px;font-size:13px;
}
.camel-chat-tools details{padding:12px 0;border-top:1px solid var(--chat-border)}
.camel-chat-panel summary{cursor:pointer;font-size:.83rem;font-weight:650;line-height:1.5}
.camel-chat-tools details label{margin-top:12px}
.camel-chat-tools small{display:block;line-height:1.6;margin-top:8px;font-size:.74rem}
.camel-chat-scope{margin:10px 0 16px;line-height:1.6;font-size:.8rem}
.camel-chat-panel [data-tool-list] p{display:grid;gap:2px;margin:12px 0;font-size:.8rem}
.camel-chat-panel [data-tool-list] small{margin:0}
.camel-chat-suggestions{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.chat-daily-item{padding:10px 0;border-bottom:1px solid var(--chat-border)}
.chat-daily-item button{width:100%;height:auto;text-align:left;white-space:normal;font-size:12px;line-height:1.5;padding:8px 10px}
.camel-chat-daily .chat-daily-item small{font-size:12px;line-height:1.5;margin-top:6px}
:root dialog.camel-chat-panel .camel-chat-suggestions button{padding:10px;height:auto;flex:0 0 auto;width:100%;white-space:normal;text-align:left;line-height:1.5;font-size:.77rem;color:var(--chat-text);background:var(--chat-surface);border-color:var(--chat-border)}
.chat-tool-search{margin:8px 0 14px}
.camel-chat-panel[data-sidebar=closed] .camel-chat-layout{grid-template-columns:minmax(0,1fr)}
.camel-chat-panel[data-sidebar=closed] .camel-chat-tools{display:none}

/* Message text, controls, tables and evidence share the same theme. */
.camel-chat-conversation{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
:root dialog.camel-chat-panel .camel-chat-messages{
 padding:22px;min-height:80px;flex:1;overflow-y:auto;overscroll-behavior:contain;
 scrollbar-gutter:stable;scroll-behavior:smooth;background:radial-gradient(ellipse at 85% 0,var(--chat-glow),transparent 55%),var(--chat-canvas);line-height:1.65;
}
:root dialog.camel-chat-panel .camel-chat-messages article{
 margin:0 0 18px;padding:20px;border:1px solid var(--chat-border);border-radius:14px;
 background:linear-gradient(125deg,var(--chat-glass),transparent 70%),var(--chat-surface);color:var(--chat-text);max-width:100%;overflow-wrap:anywhere;box-shadow:inset 0 1px 0 var(--chat-glass-line),0 7px 24px #00000012;
}
:root dialog.camel-chat-panel .camel-chat-messages .camel-chat-user{
 width:fit-content;max-width:90%;margin-left:auto;background:var(--chat-user-bg);
}
:root dialog.camel-chat-panel .camel-chat-messages .camel-chat-error{background:var(--chat-error)}
:root dialog.camel-chat-panel .camel-chat-author{font-size:.78rem;letter-spacing:.02em;color:var(--chat-accent)}
:root dialog.camel-chat-panel .camel-chat-answer :is(p,li){color:var(--chat-text);font-size:.94rem;line-height:1.75}
.camel-chat-answer p{white-space:pre-wrap;margin:10px 0 0}
.camel-chat-answer h3{font-size:1.02rem;margin:20px 0 8px}
.camel-chat-answer ul{padding-left:22px}.camel-chat-answer li{margin:8px 0}
.camel-chat-answer code{font-size:.88em;color:var(--chat-text);background:var(--chat-code);border-radius:4px;padding:2px 5px}
.chat-source-ref{color:var(--chat-accent);font-size:.82em;white-space:nowrap;font-weight:700}
:root dialog.camel-chat-panel .camel-chat-empty{margin:35px auto;max-width:480px;padding:28px;border:1px dashed var(--chat-border);border-radius:14px;background:var(--chat-surface)}
.camel-chat-empty>strong{font-size:1.1rem}.camel-chat-empty small{display:block;line-height:1.65}
.camel-chat-results{margin-top:20px;padding-top:16px;border-top:1px solid var(--chat-border)}
.camel-chat-results h3{font-size:.95rem;margin:0 0 10px}.camel-chat-results>p{font-size:.82rem}
.chat-result-actions,.chat-chart-controls{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.chat-result-actions button,.chat-chart-controls button{font-size:12px;padding:8px 12px;white-space:normal;max-width:100%}
:root dialog.camel-chat-panel .camel-chat-limitations{color:var(--chat-muted);border-left:3px solid var(--chat-warning);padding:8px 12px;background:var(--chat-soft);border-radius:0 6px 6px 0;font-size:.82rem;line-height:1.7}
.camel-chat-sources{border-top:1px solid var(--chat-border);padding-top:14px;margin-top:18px}
.camel-chat-sources>div{padding:12px 0;border-bottom:1px solid var(--chat-border);font-size:.8rem}
.camel-chat-sources p{margin:5px 0;font-size:.78rem;line-height:1.65}
.camel-chat-table-scroll{overflow:auto;max-height:540px;border:1px solid var(--chat-border);border-radius:10px;max-width:100%;margin-top:12px;scrollbar-color:var(--chat-border) var(--chat-bg)}
.camel-chat-table-scroll table{border-collapse:collapse;min-width:850px;width:100%;font-size:13px;background:var(--chat-surface)}
:root dialog.camel-chat-panel .camel-chat-table-scroll :is(th,td){padding:11px 13px;text-align:left;border-bottom:1px solid var(--chat-border);white-space:nowrap;color:var(--chat-text)}
:root dialog.camel-chat-panel .camel-chat-table-scroll th{position:sticky;top:0;background:var(--chat-table-head);z-index:1;font-weight:650}
:root dialog.camel-chat-panel .camel-chat-table-scroll tbody tr:nth-child(even){background:var(--chat-soft)}
:root dialog.camel-chat-panel .camel-chat-table-scroll tbody tr:hover{background:var(--chat-user-bg)}
.camel-chat-table-scroll td[data-kind=text]{white-space:normal;min-width:80px;max-width:260px;overflow-wrap:anywhere}
.camel-chat-table-scroll td[data-kind=money]{font-variant-numeric:tabular-nums;text-align:right}
:root dialog.camel-chat-panel .camel-chat-image{padding:14px;border:1px solid var(--chat-border);border-radius:10px;background:var(--chat-soft)}
.camel-chat-image-viewport{overflow:auto;max-height:65dvh;margin:12px 0}
.camel-chat-image img{display:block;width:auto;max-width:100%;height:auto;margin:auto;background:#fff}
.camel-chat-image small{display:block;margin-top:8px}

/* Charts are dark on screen; the standalone SVG/PNG attributes remain print-friendly. */
:root dialog.camel-chat-panel .chat-chart{margin:18px 0;padding:18px;border:1px solid var(--chat-border);border-radius:12px;background:var(--chat-surface);max-width:100%;overflow:hidden}
.chat-chart figcaption{font-size:.95rem;line-height:1.6;font-weight:650;color:var(--chat-text);overflow-wrap:anywhere}
.chat-chart-controls select{max-width:140px}
.chat-chart-viewport{max-height:600px;overflow:auto;scrollbar-gutter:stable}
.chat-chart svg{display:block;width:100%;min-width:550px;height:auto;font-family:Arial,sans-serif}
.chat-chart svg [data-chart-role=canvas]{fill:var(--chat-surface)}
.chat-chart svg [data-chart-role=label]{fill:var(--chat-muted)}
.chat-chart svg [data-chart-role=value]{fill:var(--chat-text)}
.chat-chart svg [data-chart-role=grid]{stroke:var(--chart-grid)}
.chat-chart svg [data-chart-role=axis]{stroke:var(--chart-axis)}
.chat-chart svg [data-chart-role=positive]{fill:var(--chart-positive)}
.chat-chart svg [data-chart-role=negative]{fill:var(--chart-negative)}
.chat-chart svg [data-chart-role=series]{stroke:var(--chart-positive)}
.chat-chart small{display:block;font-size:12px;line-height:1.7;color:var(--chat-muted)}
.chat-chart details{margin-top:12px}.chat-chart table{font-size:13px;width:100%;border-collapse:collapse}
:root dialog.camel-chat-panel .chat-chart :is(th,td){text-align:left;padding:8px;border-bottom:1px solid var(--chat-border);color:var(--chat-text);background:var(--chat-surface)}
.chat-chart-viewport::after{content:'Deslize na horizontal se necessário. Os valores completos estão em “Ver valores do gráfico”.';display:block;font-size:11px;color:var(--chat-muted);line-height:1.6;margin:8px 0}

/* Progress stays visible without consuming unnecessary space after completion. */
:root dialog.camel-chat-panel .camel-chat-progress{border-top:1px solid var(--chat-border);padding:10px 22px;background:var(--chat-header);flex-shrink:0}
.chat-progress-heading{display:flex;align-items:center;gap:10px;margin-bottom:8px;font-size:13px}
.camel-chat-progress progress{display:block;width:100%;height:5px;accent-color:var(--chat-accent);margin:8px 0 10px}
.camel-chat-progress ol{display:flex;gap:16px;list-style:none;margin:0 0 5px;padding:0;font-size:.72rem;color:var(--chat-muted)}
:root dialog.camel-chat-panel .camel-chat-progress li.is-active{font-weight:700;color:var(--chat-accent)}
.camel-chat-progress li.is-active::before{content:'● ';font-size:.6rem}
.camel-chat-status{margin:0;font-size:.8rem;color:var(--chat-muted);line-height:1.6}
.chat-spinner{display:inline-block;width:17px;height:17px;flex-shrink:0;border:2px solid var(--chat-border);border-top-color:var(--chat-accent);border-radius:50%;animation:chat-spin .85s linear infinite}
:root dialog.camel-chat-panel .camel-chat-messages .camel-chat-pending{display:flex;align-items:center;gap:12px;background:var(--chat-soft)}
.camel-chat-pending p{margin:0;font-size:.85rem}
.chat-latest{align-self:center;padding:7px 12px;margin:5px;font-size:12px;border-radius:20px}
.camel-chat-panel:not([aria-busy=true]) .camel-chat-progress ol{display:none}
:root dialog.camel-chat-panel .camel-chat-composer{padding:14px 22px;border-top:1px solid var(--chat-border);background:var(--chat-glass);flex-shrink:0;box-shadow:inset 0 1px 0 var(--chat-glass-line)}
.camel-chat-composer>label{font-size:.82rem;font-weight:600;display:block;margin-bottom:7px}
:root dialog.camel-chat-panel .camel-chat-composer textarea{display:block;width:100%;min-height:68px;max-height:160px;border:1px solid var(--chat-border);border-radius:10px;padding:12px;color:var(--chat-text);background:var(--chat-input);font-size:15px;line-height:1.5;resize:vertical}
.camel-chat-composer>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:9px}
.camel-chat-composer [data-character-count]{font-size:.7rem;color:var(--chat-muted);margin-left:auto}
.camel-chat-composer small{display:block;margin-top:7px;font-size:.7rem;line-height:1.4}

/* Full means the entire browser viewport, regardless of standard size rules. */
:root dialog.camel-chat-panel[open][data-size=full]{inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0}
body.camel-chat-fullscreen{overflow:hidden}
.camel-chat-panel[data-size=full] .camel-chat-layout{grid-template-columns:260px minmax(0,1fr)}
.camel-chat-panel[data-size=full][data-sidebar=closed] .camel-chat-layout{grid-template-columns:minmax(0,1fr)}
:root dialog.camel-chat-panel[data-size=full] .camel-chat-header{padding:12px 28px;min-height:72px}
:root dialog.camel-chat-panel[data-size=full] .camel-chat-messages{padding:28px clamp(20px,4vw,72px)}
:root dialog.camel-chat-panel[data-size=full] .camel-chat-messages article{max-width:1440px;margin-left:auto;margin-right:auto;padding:24px}
:root dialog.camel-chat-panel[data-size=full] .camel-chat-messages .camel-chat-user{max-width:min(920px,85%);margin-right:max(0px,calc((100% - 1440px)/2))}
.camel-chat-panel[data-size=full] .camel-chat-answer> :is(p,ul,h3){max-width:95ch}
.camel-chat-panel[data-size=full] .camel-chat-table-scroll{max-height:65dvh}
.camel-chat-panel[data-size=full] .chat-chart-viewport{max-height:65dvh}
:root dialog.camel-chat-panel[data-size=full] .camel-chat-composer{padding:12px max(24px,calc((100% - 1200px)/2))}
.camel-chat-panel[data-size=full] .camel-chat-composer textarea{min-height:60px;max-height:130px}
.camel-chat-panel[data-size=full] .camel-chat-progress{padding:8px 28px}
:root dialog.camel-chat-panel[data-size=compact]{width:min(560px,calc(100vw - 36px))}
.camel-chat-panel[data-size=compact] .camel-chat-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
.camel-chat-panel[data-size=compact] .camel-chat-tools{max-height:180px;border-right:0;border-bottom:1px solid var(--chat-border)}
.camel-chat-panel[data-size=compact] :is(.camel-chat-toolbox,.camel-chat-promptbox){display:none}
@keyframes chat-spin{to{transform:rotate(360deg)}}
.camel-chat-table-scroll :is(th,td)[data-kind=number],.camel-chat-table-scroll th[data-kind=money]{text-align:right;font-variant-numeric:tabular-nums}
.camel-chat-table-scroll :is(th,td):first-child{position:sticky;left:0;background:var(--chat-surface);box-shadow:1px 0 var(--chat-border)}
:root dialog.camel-chat-panel .camel-chat-table-scroll th:first-child{background:var(--chat-table-head);z-index:2}
.chat-data-highlights{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;margin:16px 0 22px}
.chat-data-highlights>div{min-width:0;padding:16px;border:1px solid var(--chat-border);border-radius:12px;background:var(--chat-canvas);box-shadow:inset 0 1px 0 var(--chat-glass-line)}
:root dialog.camel-chat-panel .chat-data-highlights dt{font-size:12px;font-weight:600;color:var(--chat-muted);line-height:1.6}
:root dialog.camel-chat-panel .chat-data-highlights dd{margin:8px 0 0;font-size:1.3rem;font-weight:700;line-height:1.45;color:var(--chat-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.chat-data-highlights small{display:block;margin-top:8px;font-size:11px;line-height:1.6}
.chat-followups{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}
.chat-followups button{padding:10px 14px;font-size:12px;line-height:1.5;text-align:left;white-space:normal}
.chat-table-tools{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin:14px 0 0}
.chat-table-tools label{display:grid;gap:6px;font-size:12px;flex:1;min-width:min(220px,100%)}
:root dialog.camel-chat-panel .chat-table-tools input{width:100%;min-height:40px;padding:9px 12px;border:1px solid var(--chat-border);border-radius:8px;background:var(--chat-input);color:var(--chat-text)}
:root dialog.camel-chat-panel .chat-table-tools output{font-size:12px;color:var(--chat-muted);padding:10px 0}
@media(prefers-reduced-transparency:reduce){:root dialog.camel-chat-panel{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--chat-canvas)}:root dialog.camel-chat-panel :is(.camel-chat-header,.camel-chat-composer){background:var(--chat-header)}}
@media(prefers-reduced-motion:reduce){.chat-spinner{animation:none}:root dialog.camel-chat-panel .camel-chat-messages{scroll-behavior:auto}}
@media(max-width:850px){
 :root dialog.camel-chat-panel[open]{inset:6px;width:calc(100vw - 12px);height:calc(100dvh - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:12px}
 :root dialog.camel-chat-panel[open][data-size=full]{inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0}
 .camel-chat-panel .camel-chat-layout,.camel-chat-panel[data-size=full] .camel-chat-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 .camel-chat-panel .camel-chat-tools{display:none}
 .camel-chat-panel[data-sidebar=open] .camel-chat-layout{grid-template-rows:auto minmax(0,1fr)}
 .camel-chat-panel[data-sidebar=open] .camel-chat-tools{display:block;max-height:210px;border-right:0;border-bottom:1px solid var(--chat-border)}
 :root dialog.camel-chat-panel .camel-chat-header,:root dialog.camel-chat-panel[data-size=full] .camel-chat-header{padding:10px 12px;min-height:56px;gap:8px}
 .camel-chat-header h2{font-size:1rem}.camel-chat-header :is(p,.camel-chat-eyebrow){display:none}
 .camel-chat-header-actions{gap:5px}.camel-chat-header-actions button{min-height:34px;height:34px;font-size:11px;padding:0 8px}
 .camel-chat-header-actions [data-chat-close]{width:34px;min-width:34px}
 :root dialog.camel-chat-panel .camel-chat-messages,:root dialog.camel-chat-panel[data-size=full] .camel-chat-messages{padding:12px}
 :root dialog.camel-chat-panel .camel-chat-messages article,:root dialog.camel-chat-panel[data-size=full] .camel-chat-messages article{padding:14px}
 :root dialog.camel-chat-panel .camel-chat-messages .camel-chat-user{max-width:95%}
 :root dialog.camel-chat-panel .camel-chat-answer :is(p,li){font-size:.9rem}
 :root dialog.camel-chat-panel .chat-chart{padding:12px}
 :root dialog.camel-chat-panel .camel-chat-composer,:root dialog.camel-chat-panel[data-size=full] .camel-chat-composer{padding:10px 12px}
 :root dialog.camel-chat-panel .camel-chat-composer textarea{min-height:60px;max-height:110px;font-size:16px}
 .camel-chat-composer [data-character-count]{display:none}.camel-chat-composer small{font-size:10px}
 .camel-chat-composer button{font-size:12px;padding:8px 10px}.camel-chat-composer [data-chat-clear]{margin-right:auto}
 :root dialog.camel-chat-panel .camel-chat-progress{padding:8px 12px}
 .chat-result-actions button{flex:1 1 135px}
 .chat-data-highlights{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.chat-data-highlights>div{padding:12px}:root dialog.camel-chat-panel .chat-data-highlights dd{font-size:1.05rem}
 .chat-followups button{width:100%}.chat-table-tools{gap:4px}
}

/* The conclusion stays first; detail remains available without crowding it. */
:root dialog.camel-chat-panel .camel-chat-messages article{word-break:normal;overflow-wrap:break-word;hyphens:none;letter-spacing:normal;word-spacing:normal;text-align:left}
:root dialog.camel-chat-panel .camel-chat-answer :is(p,li){line-height:1.65}
.chat-executive-summary{max-width:95ch;margin:8px 0 12px}
:root dialog.camel-chat-panel .chat-executive-summary p{margin:0;color:var(--chat-text);font-size:1rem;line-height:1.6;white-space:normal;text-wrap:pretty}
.chat-foldout{margin-top:10px;padding-top:10px;border-top:1px solid var(--chat-border);min-width:0}
.chat-foldout>summary{padding:4px 0;min-height:32px;font-size:.82rem;color:var(--chat-muted)}
.chat-foldout[open]>summary{color:var(--chat-accent)}
.chat-foldout>.camel-chat-answer{margin-top:8px}
.chat-data-highlights{margin:10px 0 14px;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
.chat-data-highlights>div{padding:12px}
:root dialog.camel-chat-panel .chat-data-highlights dd{word-break:normal;overflow-wrap:break-word}
.chat-data-highlights dd:is([data-kind=money],[data-kind=number]){white-space:nowrap;font-size:clamp(.85rem,1.6vw,1.3rem)}
.camel-chat-header-actions button{touch-action:manipulation}

@media(max-width:850px),(max-height:600px){
 :root dialog.camel-chat-panel .camel-chat-header,:root dialog.camel-chat-panel[data-size=full] .camel-chat-header{min-height:48px;padding:5px 12px;flex-wrap:nowrap;gap:8px}
 .camel-chat-header h2{font-size:.95rem;white-space:nowrap;margin:0}
 .camel-chat-header :is(p,.camel-chat-eyebrow){display:none}
 .camel-chat-header-actions{gap:4px;flex-wrap:nowrap}
 :root dialog.camel-chat-panel .camel-chat-header-actions button{width:38px;min-width:38px;height:38px;min-height:38px;padding:0;font-size:0;line-height:1}
 .camel-chat-header-actions [data-chat-sidebar]::before{content:'\2637';font-size:22px}
 .camel-chat-header-actions [data-chat-theme]::before{content:'\25D0';font-size:22px}
 .camel-chat-header-actions [data-chat-fullscreen]::before{content:'\26F6';font-size:22px}
 .camel-chat-header-actions [data-chat-close]::before{content:'\00D7';font-size:25px}
 .camel-chat-panel .camel-chat-layout,.camel-chat-panel[data-size=full] .camel-chat-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 .camel-chat-panel .camel-chat-tools{display:none}
 .camel-chat-panel[data-sidebar=open] .camel-chat-layout{grid-template-rows:auto minmax(0,1fr)}
 .camel-chat-panel[data-sidebar=open] .camel-chat-tools{display:block;max-height:35dvh;border-right:0;border-bottom:1px solid var(--chat-border)}
 :root dialog.camel-chat-panel .camel-chat-messages,:root dialog.camel-chat-panel[data-size=full] .camel-chat-messages{padding:10px;scroll-behavior:auto;scrollbar-gutter:auto}
 :root dialog.camel-chat-panel .camel-chat-messages article,:root dialog.camel-chat-panel[data-size=full] .camel-chat-messages article{padding:12px;margin-bottom:10px;border-radius:10px}
 :root dialog.camel-chat-panel .chat-executive-summary p{font-size:.93rem;line-height:1.55}
 .chat-executive-summary{margin:5px 0 10px}
 .chat-data-highlights{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:8px 0 10px}
 .chat-data-highlights>div{padding:9px 10px}
 .chat-data-highlights>div:last-child:nth-child(odd){grid-column:1/-1}
 :root dialog.camel-chat-panel .chat-data-highlights dt{font-size:12px;line-height:1.4}
 :root dialog.camel-chat-panel .chat-data-highlights dd{font-size:1.05rem;line-height:1.3;margin-top:5px}
 .chat-data-highlights small{font-size:11px;margin-top:4px;line-height:1.4}
 .chat-foldout{margin-top:4px;padding-top:4px}
 .chat-foldout>summary{font-size:13px;line-height:1.5;min-height:38px;display:list-item;padding:8px 0}
 :root dialog.camel-chat-panel .camel-chat-composer,:root dialog.camel-chat-panel[data-size=full] .camel-chat-composer{padding:8px 12px}
 .camel-chat-composer>label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .camel-chat-composer small{display:none}
 :root dialog.camel-chat-panel .camel-chat-composer textarea{height:46px;min-height:46px;max-height:90px;padding:10px;font-size:16px;resize:none}
 .camel-chat-composer>div{margin-top:5px;gap:8px}
 :root dialog.camel-chat-panel .camel-chat-composer button{min-height:36px;padding:6px 12px}
 :root dialog.camel-chat-panel .camel-chat-progress{padding:5px 12px}
 .camel-chat-progress :is(.chat-progress-heading,progress,ol){display:none!important}
 .camel-chat-status{font-size:12px;line-height:1.45}
 .camel-chat-table-scroll{max-height:none;overflow:visible;border:0;margin-top:10px}
 .camel-chat-table-scroll :is(table,tbody,tr){display:block;width:100%;min-width:0}
 .camel-chat-table-scroll thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .camel-chat-table-scroll tr{border:1px solid var(--chat-border);border-radius:8px;margin-bottom:10px;overflow:hidden}
 :root dialog.camel-chat-panel .camel-chat-table-scroll td,:root dialog.camel-chat-panel .camel-chat-table-scroll td:first-child{display:grid;grid-template-columns:minmax(80px,35%) minmax(0,1fr);gap:10px;white-space:normal;max-width:none;min-width:0;position:static;box-shadow:none;padding:9px 10px;text-align:left;overflow-wrap:anywhere;font-size:13px}
 .camel-chat-table-scroll td::before{content:attr(data-label);font-size:12px;color:var(--chat-muted);font-weight:600;white-space:normal;line-height:1.5}
 .camel-chat-table-scroll td:last-child{border-bottom:0}
 :root dialog.camel-chat-panel .chat-chart{padding:10px;margin:8px 0}
 .chat-chart svg{min-width:0}
 .chat-chart-viewport{max-height:none;overflow:visible;scrollbar-gutter:auto}
 .chat-chart-viewport::after{content:'Abra “Ver valores do gráfico” para consultar os números completos.'}
 .chat-latest{position:absolute;bottom:112px;right:18px;z-index:3;box-shadow:0 3px 12px #0003}
}

@media(max-height:600px) and (min-width:540px){
 :root dialog.camel-chat-panel[open]{inset:6px;width:calc(100vw - 12px);height:calc(100dvh - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}
 :root dialog.camel-chat-panel[open][data-size=full]{inset:0;width:100vw;height:100dvh;max-width:none;max-height:none}
 :root dialog.camel-chat-panel .camel-chat-composer,:root dialog.camel-chat-panel[data-size=full] .camel-chat-composer{display:flex;align-items:center;gap:8px;padding:6px 12px}
 :root dialog.camel-chat-panel .camel-chat-composer textarea{flex:1;width:0;min-height:40px;height:40px;max-height:40px;padding:7px 10px}
 .camel-chat-composer>div{margin:0;flex-wrap:nowrap}
 .camel-chat-composer [data-chat-clear]{display:none}
 :root dialog.camel-chat-panel .camel-chat-messages article,:root dialog.camel-chat-panel[data-size=full] .camel-chat-messages article{padding:9px 12px}
 .chat-data-highlights{grid-template-columns:repeat(3,minmax(0,1fr));margin:7px 0}
 .chat-data-highlights>div:last-child:nth-child(odd){grid-column:auto}
 .chat-data-highlights>div{padding:7px 10px}
 .chat-executive-summary{max-width:none;margin:3px 0 7px}
 :root dialog.camel-chat-panel .chat-executive-summary p{font-size:14px;line-height:1.45}
 .chat-latest{bottom:70px}
 .camel-chat-empty{margin:8px auto!important;padding:14px!important}
}
