@m6d/cortex-angular 1.8.1 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -239,7 +239,8 @@ function newestAssistantMessage(messages) {
239
239
 
240
240
  // src/internal/client/src/chat-connection.ts
241
241
  function toUiMessage(message) {
242
- return { id: message.id, role: message.role, parts: message.parts };
242
+ const role = message.role === "trigger" ? "user" : message.role;
243
+ return { id: message.id, role, parts: message.parts };
243
244
  }
244
245
  function newestUnsent(messages) {
245
246
  for (let index = messages.length - 1;index >= 0; index -= 1) {
@@ -680,6 +681,28 @@ function appendTokenToUrl(wsUrl, headers) {
680
681
  parsed.searchParams.set("token", authHeader.slice(7));
681
682
  return parsed.toString();
682
683
  }
684
+ // src/internal/client/src/capabilities.ts
685
+ function loadCapabilities(api, onLoaded, delay = wsBackoffDelay) {
686
+ let stopped = false;
687
+ let timer;
688
+ let attempt = 0;
689
+ function ask() {
690
+ api.getCapabilities().then((capabilities) => {
691
+ if (!stopped)
692
+ onLoaded(capabilities);
693
+ }, () => {
694
+ if (stopped)
695
+ return;
696
+ attempt += 1;
697
+ timer = setTimeout(ask, delay(attempt));
698
+ });
699
+ }
700
+ ask();
701
+ return function stop() {
702
+ stopped = true;
703
+ clearTimeout(timer);
704
+ };
705
+ }
683
706
  // src/internal/client/src/threads.ts
684
707
  function sortThreads(threads) {
685
708
  return [...threads].sort((left, right) => {
@@ -865,7 +888,10 @@ var ar_default = {
865
888
  translate_client_tool_loading: "جارٍ تجهيز خطوة آمنة...",
866
889
  translate_client_tool_failed: "تعذّر تحميل هذه الخطوة",
867
890
  translate_client_tool_retry: "حاول مرة أخرى",
868
- translate_client_tool_cancel: "إلغاء"
891
+ translate_client_tool_cancel: "إلغاء",
892
+ translate_trigger_fired: "تم التشغيل بواسطة",
893
+ translate_trigger_payload: "الحمولة",
894
+ translate_messages_disabled: "يعمل هذا الوكيل من مشغّلاته فقط."
869
895
  };
870
896
  // src/internal/client/src/i18n/en.json
871
897
  var en_default = {
@@ -982,7 +1008,10 @@ var en_default = {
982
1008
  translate_client_tool_loading: "Preparing a secure step...",
983
1009
  translate_client_tool_failed: "This step could not be loaded",
984
1010
  translate_client_tool_retry: "Try again",
985
- translate_client_tool_cancel: "Cancel"
1011
+ translate_client_tool_cancel: "Cancel",
1012
+ translate_trigger_fired: "Triggered by",
1013
+ translate_trigger_payload: "Payload",
1014
+ translate_messages_disabled: "This agent only runs from its triggers."
986
1015
  };
987
1016
 
988
1017
  // src/internal/client/src/i18n.ts
@@ -1369,14 +1398,23 @@ class CortexChatService {
1369
1398
  wasAborted = false;
1370
1399
  pendingThreadCreation = undefined;
1371
1400
  refreshing = Promise.resolve();
1401
+ stopCapabilities = undefined;
1372
1402
  constructor() {
1373
- this.destroyRef.onDestroy(() => this.chatInjector?.destroy());
1403
+ this.destroyRef.onDestroy(() => {
1404
+ this.chatInjector?.destroy();
1405
+ this.stopCapabilities?.();
1406
+ });
1374
1407
  }
1375
1408
  start() {
1376
1409
  this.threadService.start();
1377
1410
  this.subscribeToWsEvents();
1378
1411
  this.subscribeToWsConnections();
1379
- this.api.getCapabilities().then((capabilities) => this.capabilities.set(capabilities)).catch(() => {});
1412
+ this.loadCapabilities();
1413
+ }
1414
+ loadCapabilities() {
1415
+ this.stopCapabilities?.();
1416
+ this.capabilities.set(undefined);
1417
+ this.stopCapabilities = loadCapabilities(this.api, (capabilities) => this.capabilities.set(capabilities));
1380
1418
  }
1381
1419
  get events$() {
1382
1420
  return this.events.asObservable();
@@ -1624,6 +1662,7 @@ class CortexChatService {
1624
1662
  }
1625
1663
  subscribeToWsConnections() {
1626
1664
  this.wsService.opened.pipe(skip(1), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
1665
+ this.loadCapabilities();
1627
1666
  this.threadService.reload().subscribe(() => this.reattach());
1628
1667
  });
1629
1668
  }
@@ -2083,6 +2122,8 @@ class ChatLandingComponent {
2083
2122
  translateService = inject(TranslateService);
2084
2123
  greeting = computed(() => localized(this.config().greeting, this.config().locale ?? "en"), ...ngDevMode ? [{ debugName: "greeting" }] : []);
2085
2124
  suggestions = computed(() => localized(this.config().suggestions, this.config().locale ?? "en"), ...ngDevMode ? [{ debugName: "suggestions" }] : []);
2125
+ ready = computed(() => this.chatService.capabilities() !== undefined, ...ngDevMode ? [{ debugName: "ready" }] : []);
2126
+ headless = computed(() => this.chatService.capabilities()?.messages === false, ...ngDevMode ? [{ debugName: "headless" }] : []);
2086
2127
  sendSuggestion(suggestion) {
2087
2128
  this.chatService.send(suggestion).subscribe();
2088
2129
  }
@@ -2107,7 +2148,7 @@ class ChatLandingComponent {
2107
2148
  {{ greeting() ?? ('translate_greeting' | translate) }}
2108
2149
  </p>
2109
2150
 
2110
- @if (suggestions()?.length) {
2151
+ @if (ready() && !headless() && suggestions()?.length) {
2111
2152
  <div class="cortex-widget__landing-chips">
2112
2153
  @for (suggestion of suggestions(); track $index) {
2113
2154
  <button
@@ -2121,7 +2162,11 @@ class ChatLandingComponent {
2121
2162
  </div>
2122
2163
  }
2123
2164
 
2124
- <cortex-chat-composer />
2165
+ @if (headless()) {
2166
+ <p class="cortex-widget__messages-disabled">{{ 'translate_messages_disabled' | translate }}</p>
2167
+ } @else if (ready()) {
2168
+ <cortex-chat-composer />
2169
+ }
2125
2170
 
2126
2171
  @let recentThreads = threadService.threads()?.slice(0, 2);
2127
2172
  @if (recentThreads?.length) {
@@ -2164,7 +2209,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
2164
2209
  {{ greeting() ?? ('translate_greeting' | translate) }}
2165
2210
  </p>
2166
2211
 
2167
- @if (suggestions()?.length) {
2212
+ @if (ready() && !headless() && suggestions()?.length) {
2168
2213
  <div class="cortex-widget__landing-chips">
2169
2214
  @for (suggestion of suggestions(); track $index) {
2170
2215
  <button
@@ -2178,7 +2223,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
2178
2223
  </div>
2179
2224
  }
2180
2225
 
2181
- <cortex-chat-composer />
2226
+ @if (headless()) {
2227
+ <p class="cortex-widget__messages-disabled">{{ 'translate_messages_disabled' | translate }}</p>
2228
+ } @else if (ready()) {
2229
+ <cortex-chat-composer />
2230
+ }
2182
2231
 
2183
2232
  @let recentThreads = threadService.threads()?.slice(0, 2);
2184
2233
  @if (recentThreads?.length) {
@@ -4343,6 +4392,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
4343
4392
  ` }]
4344
4393
  }], propDecorators: { usage: [{ type: i0.Input, args: [{ isSignal: true, alias: "usage", required: true }] }], modelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "modelId", required: false }] }] } });
4345
4394
 
4395
+ class TriggerBlockComponent {
4396
+ firing = input.required(...ngDevMode ? [{ debugName: "firing" }] : []);
4397
+ debugMode = input(false, ...ngDevMode ? [{ debugName: "debugMode" }] : []);
4398
+ config = inject(CORTEX_CLIENT_CONFIG);
4399
+ firedAgo = computed(() => relativeTimeLabel(this.firing().firedAt, this.config().locale ?? "en"), ...ngDevMode ? [{ debugName: "firedAgo" }] : []);
4400
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TriggerBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4401
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: TriggerBlockComponent, isStandalone: true, selector: "cortex-trigger-block", inputs: { firing: { classPropertyName: "firing", publicName: "firing", isSignal: true, isRequired: true, transformFunction: null }, debugMode: { classPropertyName: "debugMode", publicName: "debugMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cortex-trigger-block--debug": "debugMode()" }, classAttribute: "cortex-trigger-block" }, ngImport: i0, template: `<div class="cortex-trigger-block__head">
4402
+ <svg class="cortex-trigger-block__icon" width="12" height="12" viewBox="0 0 12 12" fill="none">
4403
+ <path d="M6.75 1 2.5 6.75h3l-.25 4.25L9.5 5.25h-3z" fill="currentColor" />
4404
+ </svg>
4405
+ @if (debugMode()) {
4406
+ <span>{{ 'translate_trigger_fired' | translate }}</span>
4407
+ }
4408
+ <span class="cortex-trigger-block__name">{{ firing().name }}</span>
4409
+ <time class="cortex-trigger-block__time" [attr.datetime]="firing().firedAt">{{
4410
+ firedAgo()
4411
+ }}</time>
4412
+ </div>
4413
+ @if (debugMode()) {
4414
+ <details class="cortex-trigger-block__payload">
4415
+ <summary>{{ 'translate_trigger_payload' | translate }}</summary>
4416
+ <cortex-json-tree [data]="firing().payload" [expandDepth]="2" />
4417
+ </details>
4418
+ }
4419
+ `, dependencies: [{ kind: "component", type: JsonTreeComponent, selector: "cortex-json-tree", inputs: ["data", "expandDepth"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4420
+ }
4421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: TriggerBlockComponent, decorators: [{
4422
+ type: Component,
4423
+ args: [{ selector: "cortex-trigger-block", changeDetection: ChangeDetectionStrategy2.OnPush, encapsulation: ViewEncapsulation2.None, imports: [JsonTreeComponent, TranslatePipe], host: {
4424
+ class: "cortex-trigger-block",
4425
+ "[class.cortex-trigger-block--debug]": "debugMode()"
4426
+ }, template: `<div class="cortex-trigger-block__head">
4427
+ <svg class="cortex-trigger-block__icon" width="12" height="12" viewBox="0 0 12 12" fill="none">
4428
+ <path d="M6.75 1 2.5 6.75h3l-.25 4.25L9.5 5.25h-3z" fill="currentColor" />
4429
+ </svg>
4430
+ @if (debugMode()) {
4431
+ <span>{{ 'translate_trigger_fired' | translate }}</span>
4432
+ }
4433
+ <span class="cortex-trigger-block__name">{{ firing().name }}</span>
4434
+ <time class="cortex-trigger-block__time" [attr.datetime]="firing().firedAt">{{
4435
+ firedAgo()
4436
+ }}</time>
4437
+ </div>
4438
+ @if (debugMode()) {
4439
+ <details class="cortex-trigger-block__payload">
4440
+ <summary>{{ 'translate_trigger_payload' | translate }}</summary>
4441
+ <cortex-json-tree [data]="firing().payload" [expandDepth]="2" />
4442
+ </details>
4443
+ }
4444
+ ` }]
4445
+ }], propDecorators: { firing: [{ type: i0.Input, args: [{ isSignal: true, alias: "firing", required: true }] }], debugMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "debugMode", required: false }] }] } });
4446
+
4346
4447
  class MessageComponent {
4347
4448
  message = input.required(...ngDevMode ? [{ debugName: "message" }] : []);
4348
4449
  debugMode = input(false, ...ngDevMode ? [{ debugName: "debugMode" }] : []);
@@ -4357,10 +4458,11 @@ class MessageComponent {
4357
4458
  isAssistant = computed(() => this.message().role === "assistant", ...ngDevMode ? [{ debugName: "isAssistant" }] : []);
4358
4459
  streamingPartIndex = computed(() => this.isStreaming() ? this.visibleParts().length - 1 : -1, ...ngDevMode ? [{ debugName: "streamingPartIndex" }] : []);
4359
4460
  metadata = computed(() => this.chatService.messageMetadata().get(this.message().id), ...ngDevMode ? [{ debugName: "metadata" }] : []);
4461
+ trigger = computed(() => this.metadata()?.trigger, ...ngDevMode ? [{ debugName: "trigger" }] : []);
4360
4462
  isAborted = computed(() => Boolean(this.metadata()?.isAborted), ...ngDevMode ? [{ debugName: "isAborted" }] : []);
4361
4463
  tokenUsage = computed(() => this.metadata()?.tokenUsage, ...ngDevMode ? [{ debugName: "tokenUsage" }] : []);
4362
4464
  modelId = computed(() => this.metadata()?.modelId, ...ngDevMode ? [{ debugName: "modelId" }] : []);
4363
- attachments = computed(() => this.message().role === "user" ? this.metadata()?.attachments ?? [] : [], ...ngDevMode ? [{ debugName: "attachments" }] : []);
4465
+ attachments = computed(() => this.metadata()?.attachments ?? [], ...ngDevMode ? [{ debugName: "attachments" }] : []);
4364
4466
  showsDebugZone = computed(() => {
4365
4467
  if (!this.debugMode() || this.isStreaming())
4366
4468
  return false;
@@ -4375,7 +4477,10 @@ class MessageComponent {
4375
4477
  });
4376
4478
  }, ...ngDevMode ? [{ debugName: "visibleParts" }] : []);
4377
4479
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: MessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4378
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: MessageComponent, isStandalone: true, selector: "cortex-message", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, debugMode: { classPropertyName: "debugMode", publicName: "debugMode", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cortex-message" }, ngImport: i0, template: `@if (visibleParts().length) {
4480
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: MessageComponent, isStandalone: true, selector: "cortex-message", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, debugMode: { classPropertyName: "debugMode", publicName: "debugMode", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cortex-message" }, ngImport: i0, template: `<!-- fallow-ignore-file complexity -- the message template branches once per envelope kind, trigger included -->
4481
+ @if (trigger(); as firing) {
4482
+ <cortex-trigger-block [firing]="firing" [debugMode]="debugMode()" />
4483
+ } @else if (visibleParts().length || attachments().length) {
4379
4484
  <div class="cortex-message-parts">
4380
4485
  @for (part of visibleParts(); track $index) {
4381
4486
  <cortex-message-part
@@ -4408,7 +4513,7 @@ class MessageComponent {
4408
4513
  }
4409
4514
  </div>
4410
4515
  }
4411
- `, dependencies: [{ kind: "component", type: MessageAbortedFlagComponent, selector: "cortex-message-aborted-flag" }, { kind: "component", type: MessageAttachmentsComponent, selector: "cortex-message-attachments", inputs: ["attachments"] }, { kind: "component", type: MessageLlmInspectorComponent, selector: "cortex-message-llm-inspector", inputs: ["messageId"] }, { kind: "component", type: MessagePartComponent, selector: "cortex-message-part", inputs: ["message", "part", "debugMode", "animate", "streaming"] }, { kind: "component", type: MessageTokenUsageComponent, selector: "cortex-message-token-usage", inputs: ["usage", "modelId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4516
+ `, dependencies: [{ kind: "component", type: MessageAbortedFlagComponent, selector: "cortex-message-aborted-flag" }, { kind: "component", type: MessageAttachmentsComponent, selector: "cortex-message-attachments", inputs: ["attachments"] }, { kind: "component", type: MessageLlmInspectorComponent, selector: "cortex-message-llm-inspector", inputs: ["messageId"] }, { kind: "component", type: MessagePartComponent, selector: "cortex-message-part", inputs: ["message", "part", "debugMode", "animate", "streaming"] }, { kind: "component", type: MessageTokenUsageComponent, selector: "cortex-message-token-usage", inputs: ["usage", "modelId"] }, { kind: "component", type: TriggerBlockComponent, selector: "cortex-trigger-block", inputs: ["firing", "debugMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4412
4517
  }
4413
4518
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: MessageComponent, decorators: [{
4414
4519
  type: Component,
@@ -4417,8 +4522,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
4417
4522
  MessageAttachmentsComponent,
4418
4523
  MessageLlmInspectorComponent,
4419
4524
  MessagePartComponent,
4420
- MessageTokenUsageComponent
4421
- ], host: { class: "cortex-message" }, template: `@if (visibleParts().length) {
4525
+ MessageTokenUsageComponent,
4526
+ TriggerBlockComponent
4527
+ ], host: { class: "cortex-message" }, template: `<!-- fallow-ignore-file complexity -- the message template branches once per envelope kind, trigger included -->
4528
+ @if (trigger(); as firing) {
4529
+ <cortex-trigger-block [firing]="firing" [debugMode]="debugMode()" />
4530
+ } @else if (visibleParts().length || attachments().length) {
4422
4531
  <div class="cortex-message-parts">
4423
4532
  @for (part of visibleParts(); track $index) {
4424
4533
  <cortex-message-part
@@ -5031,7 +5140,8 @@ class CortexChatWidgetComponent {
5031
5140
  fallbackLang: "en",
5032
5141
  loader: provideTranslateLoader(CortexClientTranslateLoader)
5033
5142
  })
5034
- ], viewQueries: [{ propertyName: "composer", first: true, predicate: ChatComposerComponent, descendants: true, isSignal: true }], ngImport: i0, template: `<div
5143
+ ], viewQueries: [{ propertyName: "composer", first: true, predicate: ChatComposerComponent, descendants: true, isSignal: true }], ngImport: i0, template: `<!-- fallow-ignore-file complexity -- the widget shell branches on every view state; the headless notice is one more -->
5144
+ <div
5035
5145
  class="cortex-widget__container"
5036
5146
  [class.cortex-widget__container--full]="viewMode() === 'full'"
5037
5147
  [class.cortex-widget__container--sidebar-open]="sidebarOpen()"
@@ -5162,15 +5272,25 @@ class CortexChatWidgetComponent {
5162
5272
  }
5163
5273
 
5164
5274
  <!-- Chat input (inside the landing on a blank chat; hidden during pending tool calls) -->
5165
- @if (chatService.selectedThread() && !chatService.hasPendingToolCalls()) {
5166
- <cortex-chat-composer />
5275
+ @if (
5276
+ chatService.selectedThread() &&
5277
+ !chatService.hasPendingToolCalls() &&
5278
+ chatService.capabilities() !== undefined
5279
+ ) {
5280
+ @if (chatService.capabilities()?.messages === false) {
5281
+ <p class="cortex-widget__messages-disabled">
5282
+ {{ 'translate_messages_disabled' | translate }}
5283
+ </p>
5284
+ } @else {
5285
+ <cortex-chat-composer />
5286
+ }
5167
5287
  }
5168
5288
  </div>
5169
5289
 
5170
5290
  <!-- Sidebar overlay backdrop (full mode, small screens) -->
5171
5291
  <div class="cortex-widget__sidebar-backdrop" (click)="closeSidebar()"></div>
5172
5292
  </div>
5173
- `, styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__back-btn,.cortex-widget__history-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__back-btn:hover,.cortex-widget__history-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}@keyframes cortex-working-slide-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes cortex-dot-wave{0%,60%,to{transform:translateY(0) scale(1);opacity:.45}30%{transform:translateY(-5px) scale(1.2);opacity:1}}@keyframes cortex-working-shimmer{0%{background-position:-200% center}to{background-position:200% center}}.cortex-widget__working{flex-shrink:0;padding:.5rem 1rem;display:flex;align-items:center;gap:.5rem;animation:cortex-working-slide-in .25s ease-out both}.cortex-widget__working-dots{display:flex;align-items:center;gap:4px}.cortex-working-dot{display:block;width:6px;height:6px;border-radius:9999px;background:var(--cortex-color-success);animation:cortex-dot-wave 1.4s ease-in-out infinite}.cortex-working-dot:nth-child(2){animation-delay:.15s}.cortex-working-dot:nth-child(3){animation-delay:.3s}.cortex-widget__working-text{font-size:.75rem;font-weight:500;letter-spacing:.01em;color:var(--cortex-color-success)}cortex-chat-composer{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;transition:border-color .15s,background-color .15s}.cortex-widget__input-box--disabled{background:var(--cortex-color-surface-muted)}.cortex-widget__input-box--enabled{background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface))}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea{flex:1;background:transparent;resize:none;border:0;outline:none;font-size:var(--cortex-font-size);padding:.375rem .5rem;min-height:28px;max-height:120px;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed;border:0}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-border);color:var(--cortex-color-text-muted)}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}.cortex-widget__container--full .cortex-widget__chat-title{font-size:.875rem}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}.cortex-widget__container--full .cortex-widget__working{padding:.5rem 2rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}.cortex-widget__container--full .cortex-widget__working{padding:.5rem 1rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-chat-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:.9375rem;font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;width:100%;display:flex;flex-direction:column;gap:.5rem;padding:1rem}.cortex-message:empty{display:none}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:block}.cortex-message-part:empty{display:none}.cortex-message-part--animated{animation:cortex-part-fade-in-up .2s cubic-bezier(.34,1.56,.64,1) both}@keyframes cortex-part-fade-in-up{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;font-size:var(--cortex-font-size);line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-text-heading);border-radius:var(--cortex-radius);overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-border)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-message-attachments{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.375rem}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.dbg-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.dbg-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.dbg-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.dbg-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.dbg-tool[data-state=awaiting-input],.dbg-tool[data-state=input-streaming],.dbg-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.dbg-tool[data-state=approval-requested],.dbg-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.dbg-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.dbg-tool__summary::-webkit-details-marker{display:none}.dbg-tool__header{display:flex;align-items:flex-start;gap:.75rem}.dbg-tool__meta{flex:1;min-width:0}.dbg-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.dbg-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.dbg-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.dbg-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.dbg-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.dbg-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.dbg-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.dbg-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.dbg-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.dbg-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.dbg-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.dbg-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .dbg-tool__chevron{transform:rotate(180deg)}.dbg-tool__body{padding:0 .875rem .75rem 1.125rem}.dbg-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.dbg-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.dbg-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.dbg-tool__section-label--success{color:var(--cortex-color-success)}.dbg-tool__section-label--error{color:var(--cortex-color-danger)}.dbg-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.dbg-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.dbg-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.dbg-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.dbg-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.dbg-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.dbg-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.dbg-tool__section--success .dbg-tool__tree{background:light-dark(#f0fdf4,#052e16)}.dbg-tool__section--error .dbg-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.jt-indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.jt-line{position:relative}.jt-toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.jt-toggle:hover .jt-arrow{color:var(--cortex-color-text)}.jt-arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.jt-arrow--collapsed{transform:rotate(-90deg)}.jt-bracket{color:var(--cortex-color-text-secondary)}.jt-key{color:light-dark(#6366f1,#818cf8)}.jt-colon{color:var(--cortex-color-text-secondary)}.jt-comma{color:var(--cortex-color-text-muted)}.jt-string{color:var(--cortex-color-success)}.jt-number{color:light-dark(#2563eb,#60a5fa)}.jt-boolean{color:light-dark(#d97706,#fbbf24)}.jt-null{color:var(--cortex-color-text-muted);font-style:italic}.jt-collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.jt-collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n'], dependencies: [{ kind: "component", type: ChatComposerComponent, selector: "cortex-chat-composer", inputs: ["text"], outputs: ["textChange"] }, { kind: "component", type: ChatLandingComponent, selector: "cortex-chat-landing", outputs: ["threadSelected"] }, { kind: "component", type: MessageListComponent, selector: "cortex-message-list", inputs: ["debugMode"] }, { kind: "component", type: ThreadListComponent, selector: "cortex-thread-list", outputs: ["threadSelected", "newChatRequested", "backRequested"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5293
+ `, styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__back-btn,.cortex-widget__history-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__back-btn:hover,.cortex-widget__history-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}@keyframes cortex-working-slide-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes cortex-dot-wave{0%,60%,to{transform:translateY(0) scale(1);opacity:.45}30%{transform:translateY(-5px) scale(1.2);opacity:1}}@keyframes cortex-working-shimmer{0%{background-position:-200% center}to{background-position:200% center}}.cortex-widget__working{flex-shrink:0;padding:.5rem 1rem;display:flex;align-items:center;gap:.5rem;animation:cortex-working-slide-in .25s ease-out both}.cortex-widget__working-dots{display:flex;align-items:center;gap:4px}.cortex-working-dot{display:block;width:6px;height:6px;border-radius:9999px;background:var(--cortex-color-success);animation:cortex-dot-wave 1.4s ease-in-out infinite}.cortex-working-dot:nth-child(2){animation-delay:.15s}.cortex-working-dot:nth-child(3){animation-delay:.3s}.cortex-widget__working-text{font-size:.75rem;font-weight:500;letter-spacing:.01em;color:var(--cortex-color-success)}cortex-chat-composer{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;transition:border-color .15s,background-color .15s}.cortex-widget__input-box--disabled{background:var(--cortex-color-surface-muted)}.cortex-widget__input-box--enabled{background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface))}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea{flex:1;background:transparent;resize:none;border:0;outline:none;font-size:var(--cortex-font-size);padding:.375rem .5rem;min-height:28px;max-height:120px;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed;border:0}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-border);color:var(--cortex-color-text-muted)}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}.cortex-widget__container--full .cortex-widget__chat-title{font-size:.875rem}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}.cortex-widget__container--full .cortex-widget__working{padding:.5rem 2rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}.cortex-widget__container--full .cortex-widget__working{padding:.5rem 1rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-chat-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:.9375rem;font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;width:100%;display:flex;flex-direction:column;gap:.5rem;padding:1rem}.cortex-message:empty{display:none}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:block}.cortex-message-part:empty{display:none}.cortex-message-part--animated{animation:cortex-part-fade-in-up .2s cubic-bezier(.34,1.56,.64,1) both}@keyframes cortex-part-fade-in-up{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;font-size:var(--cortex-font-size);line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-text-heading);border-radius:var(--cortex-radius);overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-border)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.375rem}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.dbg-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.dbg-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.dbg-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.dbg-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.dbg-tool[data-state=awaiting-input],.dbg-tool[data-state=input-streaming],.dbg-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.dbg-tool[data-state=approval-requested],.dbg-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.dbg-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.dbg-tool__summary::-webkit-details-marker{display:none}.dbg-tool__header{display:flex;align-items:flex-start;gap:.75rem}.dbg-tool__meta{flex:1;min-width:0}.dbg-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.dbg-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.dbg-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.dbg-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.dbg-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.dbg-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.dbg-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.dbg-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.dbg-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.dbg-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.dbg-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.dbg-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .dbg-tool__chevron{transform:rotate(180deg)}.dbg-tool__body{padding:0 .875rem .75rem 1.125rem}.dbg-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.dbg-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.dbg-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.dbg-tool__section-label--success{color:var(--cortex-color-success)}.dbg-tool__section-label--error{color:var(--cortex-color-danger)}.dbg-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.dbg-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.dbg-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.dbg-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.dbg-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.dbg-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.dbg-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.dbg-tool__section--success .dbg-tool__tree{background:light-dark(#f0fdf4,#052e16)}.dbg-tool__section--error .dbg-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.jt-indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.jt-line{position:relative}.jt-toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.jt-toggle:hover .jt-arrow{color:var(--cortex-color-text)}.jt-arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.jt-arrow--collapsed{transform:rotate(-90deg)}.jt-bracket{color:var(--cortex-color-text-secondary)}.jt-key{color:light-dark(#6366f1,#818cf8)}.jt-colon{color:var(--cortex-color-text-secondary)}.jt-comma{color:var(--cortex-color-text-muted)}.jt-string{color:var(--cortex-color-success)}.jt-number{color:light-dark(#2563eb,#60a5fa)}.jt-boolean{color:light-dark(#d97706,#fbbf24)}.jt-null{color:var(--cortex-color-text-muted);font-style:italic}.jt-collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.jt-collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n'], dependencies: [{ kind: "component", type: ChatComposerComponent, selector: "cortex-chat-composer", inputs: ["text"], outputs: ["textChange"] }, { kind: "component", type: ChatLandingComponent, selector: "cortex-chat-landing", outputs: ["threadSelected"] }, { kind: "component", type: MessageListComponent, selector: "cortex-message-list", inputs: ["debugMode"] }, { kind: "component", type: ThreadListComponent, selector: "cortex-thread-list", outputs: ["threadSelected", "newChatRequested", "backRequested"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5174
5294
  }
5175
5295
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: CortexChatWidgetComponent, decorators: [{
5176
5296
  type: Component,
@@ -5194,7 +5314,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
5194
5314
  fallbackLang: "en",
5195
5315
  loader: provideTranslateLoader(CortexClientTranslateLoader)
5196
5316
  })
5197
- ], changeDetection: ChangeDetectionStrategy2.OnPush, encapsulation: ViewEncapsulation2.None, host: { class: "cortex-widget", "[attr.data-cortex-theme]": "config().theme ?? null" }, template: `<div
5317
+ ], changeDetection: ChangeDetectionStrategy2.OnPush, encapsulation: ViewEncapsulation2.None, host: { class: "cortex-widget", "[attr.data-cortex-theme]": "config().theme ?? null" }, template: `<!-- fallow-ignore-file complexity -- the widget shell branches on every view state; the headless notice is one more -->
5318
+ <div
5198
5319
  class="cortex-widget__container"
5199
5320
  [class.cortex-widget__container--full]="viewMode() === 'full'"
5200
5321
  [class.cortex-widget__container--sidebar-open]="sidebarOpen()"
@@ -5325,15 +5446,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
5325
5446
  }
5326
5447
 
5327
5448
  <!-- Chat input (inside the landing on a blank chat; hidden during pending tool calls) -->
5328
- @if (chatService.selectedThread() && !chatService.hasPendingToolCalls()) {
5329
- <cortex-chat-composer />
5449
+ @if (
5450
+ chatService.selectedThread() &&
5451
+ !chatService.hasPendingToolCalls() &&
5452
+ chatService.capabilities() !== undefined
5453
+ ) {
5454
+ @if (chatService.capabilities()?.messages === false) {
5455
+ <p class="cortex-widget__messages-disabled">
5456
+ {{ 'translate_messages_disabled' | translate }}
5457
+ </p>
5458
+ } @else {
5459
+ <cortex-chat-composer />
5460
+ }
5330
5461
  }
5331
5462
  </div>
5332
5463
 
5333
5464
  <!-- Sidebar overlay backdrop (full mode, small screens) -->
5334
5465
  <div class="cortex-widget__sidebar-backdrop" (click)="closeSidebar()"></div>
5335
5466
  </div>
5336
- `, styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__back-btn,.cortex-widget__history-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__back-btn:hover,.cortex-widget__history-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}@keyframes cortex-working-slide-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes cortex-dot-wave{0%,60%,to{transform:translateY(0) scale(1);opacity:.45}30%{transform:translateY(-5px) scale(1.2);opacity:1}}@keyframes cortex-working-shimmer{0%{background-position:-200% center}to{background-position:200% center}}.cortex-widget__working{flex-shrink:0;padding:.5rem 1rem;display:flex;align-items:center;gap:.5rem;animation:cortex-working-slide-in .25s ease-out both}.cortex-widget__working-dots{display:flex;align-items:center;gap:4px}.cortex-working-dot{display:block;width:6px;height:6px;border-radius:9999px;background:var(--cortex-color-success);animation:cortex-dot-wave 1.4s ease-in-out infinite}.cortex-working-dot:nth-child(2){animation-delay:.15s}.cortex-working-dot:nth-child(3){animation-delay:.3s}.cortex-widget__working-text{font-size:.75rem;font-weight:500;letter-spacing:.01em;color:var(--cortex-color-success)}cortex-chat-composer{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;transition:border-color .15s,background-color .15s}.cortex-widget__input-box--disabled{background:var(--cortex-color-surface-muted)}.cortex-widget__input-box--enabled{background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface))}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea{flex:1;background:transparent;resize:none;border:0;outline:none;font-size:var(--cortex-font-size);padding:.375rem .5rem;min-height:28px;max-height:120px;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed;border:0}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-border);color:var(--cortex-color-text-muted)}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}.cortex-widget__container--full .cortex-widget__chat-title{font-size:.875rem}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}.cortex-widget__container--full .cortex-widget__working{padding:.5rem 2rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}.cortex-widget__container--full .cortex-widget__working{padding:.5rem 1rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-chat-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:.9375rem;font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;width:100%;display:flex;flex-direction:column;gap:.5rem;padding:1rem}.cortex-message:empty{display:none}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:block}.cortex-message-part:empty{display:none}.cortex-message-part--animated{animation:cortex-part-fade-in-up .2s cubic-bezier(.34,1.56,.64,1) both}@keyframes cortex-part-fade-in-up{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;font-size:var(--cortex-font-size);line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-text-heading);border-radius:var(--cortex-radius);overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-border)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-message-attachments{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.375rem}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.dbg-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.dbg-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.dbg-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.dbg-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.dbg-tool[data-state=awaiting-input],.dbg-tool[data-state=input-streaming],.dbg-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.dbg-tool[data-state=approval-requested],.dbg-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.dbg-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.dbg-tool__summary::-webkit-details-marker{display:none}.dbg-tool__header{display:flex;align-items:flex-start;gap:.75rem}.dbg-tool__meta{flex:1;min-width:0}.dbg-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.dbg-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.dbg-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.dbg-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.dbg-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.dbg-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.dbg-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.dbg-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.dbg-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.dbg-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.dbg-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.dbg-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .dbg-tool__chevron{transform:rotate(180deg)}.dbg-tool__body{padding:0 .875rem .75rem 1.125rem}.dbg-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.dbg-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.dbg-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.dbg-tool__section-label--success{color:var(--cortex-color-success)}.dbg-tool__section-label--error{color:var(--cortex-color-danger)}.dbg-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.dbg-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.dbg-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.dbg-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.dbg-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.dbg-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.dbg-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.dbg-tool__section--success .dbg-tool__tree{background:light-dark(#f0fdf4,#052e16)}.dbg-tool__section--error .dbg-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.jt-indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.jt-line{position:relative}.jt-toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.jt-toggle:hover .jt-arrow{color:var(--cortex-color-text)}.jt-arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.jt-arrow--collapsed{transform:rotate(-90deg)}.jt-bracket{color:var(--cortex-color-text-secondary)}.jt-key{color:light-dark(#6366f1,#818cf8)}.jt-colon{color:var(--cortex-color-text-secondary)}.jt-comma{color:var(--cortex-color-text-muted)}.jt-string{color:var(--cortex-color-success)}.jt-number{color:light-dark(#2563eb,#60a5fa)}.jt-boolean{color:light-dark(#d97706,#fbbf24)}.jt-null{color:var(--cortex-color-text-muted);font-style:italic}.jt-collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.jt-collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n'] }]
5467
+ `, styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__back-btn,.cortex-widget__history-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__back-btn:hover,.cortex-widget__history-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}@keyframes cortex-working-slide-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes cortex-dot-wave{0%,60%,to{transform:translateY(0) scale(1);opacity:.45}30%{transform:translateY(-5px) scale(1.2);opacity:1}}@keyframes cortex-working-shimmer{0%{background-position:-200% center}to{background-position:200% center}}.cortex-widget__working{flex-shrink:0;padding:.5rem 1rem;display:flex;align-items:center;gap:.5rem;animation:cortex-working-slide-in .25s ease-out both}.cortex-widget__working-dots{display:flex;align-items:center;gap:4px}.cortex-working-dot{display:block;width:6px;height:6px;border-radius:9999px;background:var(--cortex-color-success);animation:cortex-dot-wave 1.4s ease-in-out infinite}.cortex-working-dot:nth-child(2){animation-delay:.15s}.cortex-working-dot:nth-child(3){animation-delay:.3s}.cortex-widget__working-text{font-size:.75rem;font-weight:500;letter-spacing:.01em;color:var(--cortex-color-success)}cortex-chat-composer{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;transition:border-color .15s,background-color .15s}.cortex-widget__input-box--disabled{background:var(--cortex-color-surface-muted)}.cortex-widget__input-box--enabled{background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface))}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea{flex:1;background:transparent;resize:none;border:0;outline:none;font-size:var(--cortex-font-size);padding:.375rem .5rem;min-height:28px;max-height:120px;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed;border:0}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-border);color:var(--cortex-color-text-muted)}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}.cortex-widget__container--full .cortex-widget__chat-title{font-size:.875rem}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}.cortex-widget__container--full .cortex-widget__working{padding:.5rem 2rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}.cortex-widget__container--full .cortex-widget__working{padding:.5rem 1rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-chat-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:.9375rem;font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;width:100%;display:flex;flex-direction:column;gap:.5rem;padding:1rem}.cortex-message:empty{display:none}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:block}.cortex-message-part:empty{display:none}.cortex-message-part--animated{animation:cortex-part-fade-in-up .2s cubic-bezier(.34,1.56,.64,1) both}@keyframes cortex-part-fade-in-up{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;font-size:var(--cortex-font-size);line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-text-heading);border-radius:var(--cortex-radius);overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-border)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.375rem}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.dbg-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.dbg-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.dbg-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.dbg-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.dbg-tool[data-state=awaiting-input],.dbg-tool[data-state=input-streaming],.dbg-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.dbg-tool[data-state=approval-requested],.dbg-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.dbg-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.dbg-tool__summary::-webkit-details-marker{display:none}.dbg-tool__header{display:flex;align-items:flex-start;gap:.75rem}.dbg-tool__meta{flex:1;min-width:0}.dbg-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.dbg-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.dbg-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.dbg-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.dbg-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.dbg-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.dbg-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.dbg-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.dbg-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.dbg-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.dbg-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.dbg-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .dbg-tool__chevron{transform:rotate(180deg)}.dbg-tool__body{padding:0 .875rem .75rem 1.125rem}.dbg-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.dbg-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.dbg-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.dbg-tool__section-label--success{color:var(--cortex-color-success)}.dbg-tool__section-label--error{color:var(--cortex-color-danger)}.dbg-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.dbg-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.dbg-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.dbg-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.dbg-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.dbg-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.dbg-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.dbg-tool__section--success .dbg-tool__tree{background:light-dark(#f0fdf4,#052e16)}.dbg-tool__section--error .dbg-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.jt-indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.jt-line{position:relative}.jt-toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.jt-toggle:hover .jt-arrow{color:var(--cortex-color-text)}.jt-arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.jt-arrow--collapsed{transform:rotate(-90deg)}.jt-bracket{color:var(--cortex-color-text-secondary)}.jt-key{color:light-dark(#6366f1,#818cf8)}.jt-colon{color:var(--cortex-color-text-secondary)}.jt-comma{color:var(--cortex-color-text-muted)}.jt-string{color:var(--cortex-color-success)}.jt-number{color:light-dark(#2563eb,#60a5fa)}.jt-boolean{color:light-dark(#d97706,#fbbf24)}.jt-null{color:var(--cortex-color-text-muted);font-style:italic}.jt-collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.jt-collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n'] }]
5337
5468
  }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], composer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ChatComposerComponent), { isSignal: true }] }] } });
5338
5469
  export {
5339
5470
  CortexChatWidgetComponent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m6d/cortex-angular",
3
- "version": "1.8.1",
3
+ "version": "1.10.0",
4
4
  "description": "Reusable AI agent chat UI library for Angular",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
@@ -12,13 +12,19 @@ declare const ATTACHMENT_STATUSES: readonly [
12
12
  "failed",
13
13
  "skipped"
14
14
  ];
15
+ declare const ATTACHMENT_ORIGINS: readonly [
16
+ "upload",
17
+ "tool"
18
+ ];
15
19
  export type AttachmentStatus = (typeof ATTACHMENT_STATUSES)[number];
20
+ export type AttachmentOrigin = (typeof ATTACHMENT_ORIGINS)[number];
16
21
  export type AttachmentSummary = {
17
22
  id: string;
18
23
  filename: string;
19
24
  contentType: string;
20
25
  sizeBytes: number;
21
26
  status: AttachmentStatus;
27
+ origin: AttachmentOrigin;
22
28
  description?: string;
23
29
  };
24
30
  export type ThreadSummary = {
@@ -27,6 +33,10 @@ export type ThreadSummary = {
27
33
  createdAt: string;
28
34
  updatedAt: string;
29
35
  isRunning: boolean;
36
+ /** Present on a headless thread a trigger owns. Widgets never list these. */
37
+ trigger?: {
38
+ name: string;
39
+ };
30
40
  };
31
41
  export type TokenUsage = {
32
42
  input: {
@@ -51,6 +61,8 @@ export type ClientToolBinding = {
51
61
  toolId: string;
52
62
  surface: "inline" | "modal";
53
63
  embedOrigin: string;
64
+ /** Variables the initiate call's input reads. */
65
+ variables: string[];
54
66
  };
55
67
  /**
56
68
  * What the server offers this agent's clients, fetched once at widget startup.
@@ -58,6 +70,8 @@ export type ClientToolBinding = {
58
70
  */
59
71
  export type AgentCapabilities = {
60
72
  attachments: boolean;
73
+ /** False when the agent's `message` trigger is off: the widget hides its composer. */
74
+ messages: boolean;
61
75
  };
62
76
  export type MessageMetadata = {
63
77
  modelId?: string;
@@ -66,6 +80,14 @@ export type MessageMetadata = {
66
80
  tokenUsage?: TokenUsage;
67
81
  attachments?: AttachmentSummary[];
68
82
  clientTools?: Record<string, ClientToolBinding>;
83
+ /** Set on `trigger` messages: the firing that wrote them. */
84
+ trigger?: TriggerFiringSummary;
85
+ };
86
+ export type TriggerFiringSummary = {
87
+ name: string;
88
+ firingId: string;
89
+ firedAt: string;
90
+ payload: unknown;
69
91
  };
70
92
  export type CortexHeaders = Record<string, string>;
71
93
  /**
@@ -161,13 +183,19 @@ declare const ATTACHMENT_STATUSES$1: readonly [
161
183
  "failed",
162
184
  "skipped"
163
185
  ];
186
+ declare const ATTACHMENT_ORIGINS$1: readonly [
187
+ "upload",
188
+ "tool"
189
+ ];
164
190
  type AttachmentStatus$1 = (typeof ATTACHMENT_STATUSES$1)[number];
191
+ type AttachmentOrigin$1 = (typeof ATTACHMENT_ORIGINS$1)[number];
165
192
  type AttachmentSummary$1 = {
166
193
  id: string;
167
194
  filename: string;
168
195
  contentType: string;
169
196
  sizeBytes: number;
170
197
  status: AttachmentStatus$1;
198
+ origin: AttachmentOrigin$1;
171
199
  description?: string;
172
200
  };
173
201
  declare class AttachmentQueueService {
@@ -249,6 +277,7 @@ declare class CortexChatService {
249
277
  private wasAborted;
250
278
  private pendingThreadCreation;
251
279
  private refreshing;
280
+ private stopCapabilities;
252
281
  constructor();
253
282
  /**
254
283
  * Kicked off by the widget once its `config` input is bound. This cannot happen in
@@ -256,6 +285,13 @@ declare class CortexChatService {
256
285
  * Angular runs before it binds inputs, so the transport is not knowable yet.
257
286
  */
258
287
  start(): void;
288
+ /**
289
+ * Capability-gated controls stay hidden until the handshake answers, so it
290
+ * is asked until it does, and afresh after every reconnect: the old answer
291
+ * may be stale (a trigger toggled while the socket was down), so it is
292
+ * forgotten first.
293
+ */
294
+ private loadCapabilities;
259
295
  get events$(): Observable<"onFinish" | "onError" | "onThreadSelected" | "onSend">;
260
296
  selectThread(thread: ThreadSummary, options?: {
261
297
  skipLoadingMessages?: boolean;