/* Shared semantic surfaces and action colors for every component family. */
:root {
  --ds-color-surface-subtle: color-mix(in srgb, var(--ds-color-accent) 8%, var(--ds-color-surface));
  --ds-primary-bg: var(--ds-color-accent);
  --ds-primary-fg: var(--ds-color-inverse);
  --ds-primary-hover-bg: color-mix(in srgb, var(--ds-primary-bg) 88%, var(--ds-color-text));
  --ds-primary-active-bg: color-mix(in srgb, var(--ds-primary-bg) 78%, var(--ds-color-text));
  --ds-primary-focus-ring: color-mix(in srgb, var(--ds-primary-bg) 35%, transparent);
  --ds-send-width: calc(32px * var(--ds-space-scale));
  --ds-send-height: calc(32px * var(--ds-space-scale));
  --ds-send-radius: 50%;
  --ds-send-hover-bg: var(--ds-primary-hover-bg);
  --ds-send-hover-fg: var(--ds-primary-fg);
  --ds-send-hover-shadow: none;
  --ds-send-active-bg: var(--ds-primary-active-bg);
  --ds-send-transition: 160ms;
  --ds-send-ring-inset: 2px;
  --ds-send-ring-radius: 50%;
  --ds-recommendation-bg: color-mix(in srgb, var(--ds-color-accent) 10%, var(--ds-color-surface));
  --ds-recommendation-fg: var(--ds-color-accent);
  --ds-recommendation-border: color-mix(in srgb, var(--ds-color-accent) 25%, transparent);
  --ds-recommendation-border-style: solid;
  --ds-recommendation-radius: 999px;
  --ds-recommendation-tracking: 0;
  --ds-recommendation-case: none;
  --ds-approval-icon-bg: var(--ds-color-surface-subtle);
  --ds-approval-icon-fg: var(--ds-color-accent);
  --ds-approval-code-bg: var(--ds-color-surface-subtle);
  --ds-approval-code-fg: var(--ds-color-text);
  --ds-document-badge-bg: color-mix(in srgb, var(--ds-color-accent) 12%, var(--ds-color-surface));
  --ds-document-badge-fg: var(--ds-color-accent);
  --ds-document-badge-fold: color-mix(in srgb, var(--ds-color-accent) 28%, var(--ds-color-surface));
  --ds-document-badge-edge: color-mix(in srgb, var(--ds-color-accent) 20%, transparent);
  --ds-document-badge-radius: var(--ds-radius-3238a15d,8px);
  --ds-document-badge-fold-size: 8px;
}

/* Interaction states keep the character of each preset, beyond a color swap. */
:root[data-elements-preset="original"] {
  --ds-primary-hover-bg: color-mix(in srgb, var(--ds-color-accent) 88%, var(--ds-color-text));
  --ds-primary-active-bg: color-mix(in srgb, var(--ds-color-accent) 78%, var(--ds-color-text));
  --ds-state-hover-bg: color-mix(in srgb, var(--ds-color-accent) 8%, var(--ds-color-surface));
  --ds-state-selected-bg: color-mix(in srgb, var(--ds-color-accent) 15%, var(--ds-color-surface));
  --ds-state-ink: var(--ds-color-accent);
  --ds-state-hover-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ds-color-accent) 20%, transparent);
  --ds-state-selected-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ds-color-accent) 55%, transparent);
  --ds-state-radius: var(--ds-radius-3238a15d,8px);
}
:root[data-elements-preset="studio"] {
  --ds-document-badge-bg: color-mix(in srgb, var(--ds-color-accent) 10%, var(--ds-color-surface));
  --ds-document-badge-edge: color-mix(in srgb, var(--ds-color-accent) 65%, transparent);
  --ds-file-badge-bg: var(--ds-document-badge-bg);
  --ds-file-badge-ink: var(--ds-document-badge-fg);
  --ds-file-badge-border: var(--ds-line-width) dashed var(--ds-document-badge-edge);
  --ds-file-badge-radius: var(--ds-document-badge-radius);
  --ds-file-badge-shadow: inset 0 0 0 var(--ds-space-1) var(--ds-color-surface);
  --ds-send-width: calc(36px * var(--ds-space-scale));
  --ds-send-radius: calc(12px * var(--ds-space-scale));
  --ds-send-ring-radius: max(0px, calc(var(--ds-send-radius) - var(--ds-send-ring-inset)));
  --ds-send-transition: 220ms;
  --ds-steering-hover-bg: color-mix(in srgb, var(--ds-color-accent) 12%, transparent);
  --ds-steering-pressed-bg: color-mix(in srgb, var(--ds-color-accent) 18%, transparent);
  --ds-steering-hover-fg: var(--ds-color-accent);
  --ds-approval-icon-bg: var(--ds-color-accent);
  --ds-approval-icon-fg: var(--ds-color-inverse);
  --ds-approval-code-bg: color-mix(in srgb, var(--ds-color-accent) 7%, var(--ds-color-surface));
  --ds-recommendation-bg: color-mix(in srgb, var(--ds-color-accent) 7%, var(--ds-color-surface));
  --ds-recommendation-border: color-mix(in srgb, var(--ds-color-accent) 55%, transparent);
  --ds-recommendation-border-style: dashed;
  --ds-recommendation-radius: var(--ds-radius-sm);
  --ds-recommendation-tracking: .015em;
  --ds-primary-hover-bg: color-mix(in srgb, var(--ds-color-accent) 78%, var(--ds-color-text));
  --ds-primary-active-bg: color-mix(in srgb, var(--ds-color-accent) 68%, var(--ds-color-text));
  --ds-state-hover-bg: color-mix(in srgb, var(--ds-color-accent) 7%, var(--ds-color-surface));
  --ds-state-selected-bg: color-mix(in srgb, var(--ds-color-accent) 13%, var(--ds-color-surface));
  --ds-state-ink: var(--ds-color-text);
  --ds-state-hover-shadow: none;
  --ds-state-selected-shadow: inset 0 -2px 0 var(--ds-color-accent), inset 0 0 0 1px color-mix(in srgb, var(--ds-color-accent) 22%, transparent);
  --ds-state-radius: var(--ds-radius-md);
}
:root[data-elements-preset="ink"] {
  --ds-menu-divider-color: color-mix(in srgb, var(--ds-color-border) 30%, var(--ds-color-surface));
  --ds-document-badge-bg: var(--ds-color-surface);
  --ds-document-badge-fg: var(--ds-color-text);
  --ds-document-badge-edge: color-mix(in srgb, var(--ds-color-text) 68%, transparent);
  --ds-document-badge-fold: color-mix(in srgb, var(--ds-color-text) 16%, var(--ds-color-surface));
  --ds-document-badge-radius: 0px;
  --ds-send-radius: 0px;
  --ds-send-ring-radius: 0px;
  --ds-send-hover-bg: var(--ds-color-text);
  --ds-send-transition: 80ms;
  --ds-approval-icon-bg: color-mix(in srgb, var(--ds-color-text) 8%, var(--ds-color-surface));
  --ds-approval-icon-fg: var(--ds-color-text);
  --ds-approval-code-bg: var(--ds-color-canvas);
  --ds-recommendation-bg: color-mix(in srgb, var(--ds-color-text) 5%, var(--ds-color-surface));
  --ds-recommendation-fg: var(--ds-color-text);
  --ds-recommendation-border: var(--ds-color-border);
  --ds-recommendation-radius: 0;
  --ds-recommendation-tracking: .025em;
  --ds-primary-hover-bg: color-mix(in srgb, var(--ds-color-text) 84%, var(--ds-color-surface));
  --ds-primary-active-bg: var(--ds-color-text);
  --ds-state-hover-bg: color-mix(in srgb, var(--ds-color-text) 5%, var(--ds-color-surface));
  --ds-state-selected-bg: var(--ds-color-surface);
  --ds-state-ink: var(--ds-color-text);
  --ds-state-hover-shadow: none;
  --ds-state-selected-shadow: inset 0 -2px 0 var(--ds-color-text);
  --ds-state-radius: 0px;
}
/* Menu outlines and internal rules have separate contrast in Ink. */
:root[data-elements-preset="ink"] :is(.astryx-dropdown-menu, .ant-dropdown-menu, .slash-menu, .project-menu, .search-palette, .session-actions-menu, .sidebar-account-menu, .steering-more-menu, .streaming-response__menu, .in-composer-menu) {
  --ob-color-divider: var(--ds-menu-divider-color);
  border-color: var(--ds-color-text);
}
:root[data-elements-preset="ink"] :is([role="menu"], .astryx-dropdown-menu, .ant-dropdown-menu) :is([role="separator"], .ant-dropdown-menu-item-divider) {
  border-color: var(--ds-menu-divider-color);
}
:root[data-elements-preset="ink"] :is([role="menu"], .astryx-dropdown-menu) .astryx-divider > div {
  background-color: var(--ds-menu-divider-color);
}
:root[data-elements-preset="ink"] :is(.slash-menu-section + .slash-menu-section, .project-menu-foot) {
  border-top-color: var(--ds-menu-divider-color);
}
:root[data-elements-preset="ink"] .search-palette-input-row {
  border-bottom-color: var(--ds-menu-divider-color);
}
:root[data-elements-preset="terminal"] {
  --ds-document-badge-bg: color-mix(in srgb, var(--ds-color-accent) 10%, var(--ds-color-surface));
  --ds-document-badge-edge: color-mix(in srgb, var(--ds-color-accent) 50%, var(--ds-color-surface));
  --ds-document-badge-grid: color-mix(in srgb, var(--ds-color-accent) 9%, transparent);
  --ds-document-badge-radius: 0px;
  --ds-send-radius: 0px;
  --ds-send-ring-radius: 0px;
  --ds-send-hover-bg: var(--ds-color-surface);
  --ds-send-hover-fg: var(--ds-color-accent);
  --ds-send-hover-shadow: inset 0 0 0 var(--ds-line-width) var(--ds-color-accent);
  --ds-send-active-bg: var(--ds-color-canvas);
  --ds-send-transition: 100ms;
  --ds-approval-icon-bg: color-mix(in srgb, var(--ds-color-accent) 12%, var(--ds-color-surface));
  --ds-approval-icon-fg: var(--ds-color-accent);
  --ds-approval-code-bg: var(--ds-color-canvas);
  --ds-approval-code-fg: var(--ds-color-accent);
  --ds-recommendation-bg: color-mix(in srgb, var(--ds-color-accent) 8%, var(--ds-color-surface));
  --ds-recommendation-border: var(--ds-color-accent);
  --ds-recommendation-radius: 2px;
  --ds-recommendation-tracking: .06em;
  --ds-recommendation-case: uppercase;
  --ds-primary-hover-bg: color-mix(in srgb, var(--ds-color-accent) 82%, var(--ds-color-surface));
  --ds-primary-active-bg: color-mix(in srgb, var(--ds-color-accent) 72%, var(--ds-color-surface));
  --ds-state-hover-bg: color-mix(in srgb, var(--ds-color-accent) 12%, var(--ds-color-surface));
  --ds-state-selected-bg: color-mix(in srgb, var(--ds-color-accent) 20%, var(--ds-color-surface));
  --ds-state-ink: var(--ds-color-accent);
  --ds-state-hover-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ds-color-accent) 50%, transparent);
  --ds-state-selected-shadow: inset 0 0 0 1px var(--ds-color-accent), 0 0 12px color-mix(in srgb, var(--ds-color-accent) 22%, transparent);
  --ds-state-radius: var(--ds-radius-sm);
}

:root .elements-preset:not(.elements-preset-card):not([aria-pressed="true"]):hover,
:root .gallery-filters button:not(.is-active):hover,
:root .demo-button:not(.primary):hover,
:root .demo-icon-button:hover {
  background: var(--ds-state-hover-bg);
  color: var(--ds-state-ink);
  box-shadow: var(--ds-state-hover-shadow);
}
:root .elements-preset:not(.elements-preset-card)[aria-pressed="true"],
:root .gallery-filters button.is-active {
  background: var(--ds-state-selected-bg);
  color: var(--ds-state-ink);
  box-shadow: var(--ds-state-selected-shadow);
}
:root[data-elements-preset="ink"] .elements-preset:not(.elements-preset-card):hover,
:root[data-elements-preset="ink"] .elements-preset:not(.elements-preset-card)[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--ds-color-text) 30%, var(--ds-color-border));
}
:root[data-elements-preset="ink"] :is(.elements-preset:not(.elements-preset-card), .gallery-filters button, .demo-button, .demo-icon-button),
:root[data-elements-preset="terminal"] :is(.elements-preset:not(.elements-preset-card), .gallery-filters button, .demo-button, .demo-icon-button) {
  border-radius: var(--ds-state-radius);
}

/* Typography roles cover the shell and native previews; runtime.js maps legacy
   weight tokens so nested controls use the same preset hierarchy. */
:root body {
  font-family: var(--ds-font-sans);
  font-weight: var(--ds-weight-regular,400);
  letter-spacing: var(--ds-tracking-body,0em);
}
:root :is(.site-header, .card-meta, .elements-design-panel, .demo-product-context, .demo-canvas)
  :is(h1, h2, h3, h4, .decision-card-title, .ant-card-head-title, .thought-title, .supp-title) {
  font-family: var(--ds-font-heading,var(--ds-font-sans));
  font-weight: var(--ds-weight-heading,600);
  letter-spacing: var(--ds-tracking-heading,-0.015em);
}
:root :is(.site-header, .gallery-scenario-tabs, .elements-design-panel, .demo-product-context, .demo-canvas)
  :is(button, select, [role="tab"], [role="menuitem"]) {
  font-weight: var(--ds-weight-control,500);
  letter-spacing: var(--ds-tracking-control,0em);
}

/* Every actionable control shares the preset's hover feedback, including async menus. */
:root :is(.demo-canvas, .demo-product-context, .demo-root, .elements-design-panel, .gallery-scenario-tabs, .card-actions, .site-header, .site-footer)
  :is(button, a[href], summary, select, [role="button"], [role="option"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"]):not(:disabled):not([aria-disabled="true"]):not(:is(.primary, .ant-btn-primary, .ob-btn-primary, .btn-primary, .send, .elements-preset-card)):hover {
  background-color: var(--ds-state-hover-bg);
  color: var(--ds-state-ink);
  box-shadow: var(--ds-state-hover-shadow);
}
/* Native menu states use important fills; keep hover on the same semantic tokens. */
:root .codex-attachment-preview :is(.slash-menu-item, .app-option, [role="menuitem"]):not(:disabled):not([aria-disabled="true"]):hover {
  background: var(--ds-state-hover-bg) !important;
  color: var(--ds-state-ink);
  box-shadow: var(--ds-state-hover-shadow);
}

/* Studio keeps hover feedback flat, including legacy controls and attachments. */
:root[data-elements-preset="studio"] :is(.demo-canvas, .demo-product-context, .demo-root, .elements-design-panel, .gallery-scenario-tabs, .card-actions, .site-header, .site-footer)
  :is(button, a[href], summary, select, [role="button"], [role="option"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"], .attachment-chip):not(:disabled):not([aria-disabled="true"]):hover {
  box-shadow: var(--ds-state-hover-shadow) !important;
}

:root :is(.astryx-button.primary, .composer-wrap .astryx-chat-send-button.astryx-button.primary, .ant-btn-primary, .ob-btn-primary, .btn-primary, .row-right .send) {
  background: var(--ds-primary-bg);
  border-color: var(--ds-primary-bg);
  color: var(--ds-primary-fg);
}
:root :is(.astryx-button.primary, .composer-wrap .astryx-chat-send-button.astryx-button.primary, .ant-btn-primary, .ob-btn-primary, .btn-primary, .row-right .send):not(:disabled):not([aria-disabled="true"]):hover {
  background: var(--ds-primary-hover-bg);
  border-color: var(--ds-primary-hover-bg);
  color: var(--ds-primary-fg);
}
:root :is(.astryx-button.primary, .composer-wrap .astryx-chat-send-button.astryx-button.primary, .ant-btn-primary, .ob-btn-primary, .btn-primary, .row-right .send):not(:disabled):not([aria-disabled="true"]):active {
  background: var(--ds-primary-active-bg);
  border-color: var(--ds-primary-active-bg);
  color: var(--ds-primary-fg);
}
:root :is(.astryx-button.primary, .composer-wrap .astryx-chat-send-button.astryx-button.primary, .ant-btn-primary, .ob-btn-primary, .btn-primary, .row-right .send):focus-visible {
  outline-color: var(--ds-primary-focus-ring);
}

/* Header icons retain their semantic glyphs. */
:root .demo-product-context .handoff-card .intervention-emblem {
  background: var(--ds-approval-icon-bg);
  color: var(--ds-approval-icon-fg);
  border: 0;
  outline: none;
  box-shadow: none;
}
:root[data-elements-preset="ink"] .demo-product-context .handoff-card .intervention-emblem {
  border: var(--ds-line-width) solid var(--ds-color-text);
}
/* Content and action icons share a crisp frame, while only files fold. */
:root :is(.codex-attachment-preview .attachment-chip[data-file-kind="markdown"] .attachment-icon, .demo-product-context .decision-card-icon) {
  position: relative; overflow: hidden; isolation: isolate; box-sizing: border-box;
  background: var(--ds-document-badge-bg);
  color: var(--ds-document-badge-fg);
  border: var(--ds-line-width) solid var(--ds-document-badge-edge);
  border-radius: var(--ds-document-badge-radius);
  outline: none; box-shadow: none;
}
:root .codex-attachment-preview .attachment-chip[data-file-kind="markdown"] .attachment-icon {
  clip-path: polygon(0 0, calc(100% - var(--ds-document-badge-fold-size)) 0, 100% var(--ds-document-badge-fold-size), 100% 100%, 0 100%);
}
:root[data-elements-preset="ink"] .codex-attachment-preview .attachment-chip[data-file-kind="markdown"] .attachment-icon {
  background: linear-gradient(var(--ds-color-text), var(--ds-color-text)) 7px calc(100% - 6px) / 20px var(--ds-line-width) no-repeat, var(--ds-color-surface);
  clip-path: none;
}
:root .codex-attachment-preview .attachment-chip[data-file-kind="markdown"] .attachment-icon::after {
  content: ''; display: block; position: absolute; inset: 0 0 auto auto;
  width: var(--ds-document-badge-fold-size); height: var(--ds-document-badge-fold-size);
  background: var(--ds-document-badge-fold); border: 0;
  clip-path: polygon(0 0, 100% 100%, 0 100%); pointer-events: none;
}
:root[data-elements-preset="ink"] .codex-attachment-preview .attachment-chip[data-file-kind="markdown"] .attachment-icon::after {
  display: none;
}
/* Studio uses one material for every file type, menu glyph, and approval badge. */
:root[data-elements-preset="studio"] :is(.codex-attachment-preview .attachment-chip .attachment-icon, .codex-attachment-preview .attachment-chip .attachment-thumb, .codex-attachment-preview .slash-menu-file-type-glyph, .demo-product-context .decision-card-icon) {
  background: var(--ds-file-badge-bg);
  color: var(--ds-file-badge-ink);
  border: var(--ds-file-badge-border);
  border-radius: var(--ds-file-badge-radius);
  box-shadow: var(--ds-file-badge-shadow);
  clip-path: none;
}
:root[data-elements-preset="studio"] .codex-attachment-preview .attachment-chip .attachment-icon::after {
  display: none;
}
:root[data-elements-preset="studio"] .codex-attachment-preview .attachment-chip .attachment-thumb {
  padding: var(--ds-space-1);
  background: var(--ds-color-surface);
  box-shadow: none;
}
/* Terminal keeps its original grid paper and cursor detail. */
:root[data-elements-preset="terminal"] :is(.codex-attachment-preview .attachment-chip[data-file-kind="markdown"] .attachment-icon, .demo-product-context .decision-card-icon) {
  background-image: linear-gradient(var(--ds-document-badge-grid) var(--ds-line-width), transparent var(--ds-line-width)), linear-gradient(90deg, var(--ds-document-badge-grid) var(--ds-line-width), transparent var(--ds-line-width));
  background-size: var(--ds-space-2) var(--ds-space-2);
  clip-path: none;
}
:root[data-elements-preset="terminal"] .codex-attachment-preview .attachment-chip[data-file-kind="markdown"] .attachment-icon::after {
  inset: auto var(--ds-space-1) var(--ds-space-1) auto;
  width: var(--ds-space-2); height: calc(var(--ds-line-width) * 2);
  background: var(--ds-document-badge-fg); clip-path: none;
}
:root .demo-product-context .approval-command {
  background: var(--ds-approval-code-bg);
  border: 0;
  outline: none;
  box-shadow: none;
}
:root .demo-product-context .approval-command,
:root .demo-product-context .approval-command :is(code, pre, span) {
  color: var(--ds-approval-code-fg);
  -webkit-text-fill-color: currentColor;
}
:root[data-elements-preset="ink"] .demo-product-context .composer-astryx.is-decision > div:has(.composer-decision-surface) {
  border: var(--ds-line-width) solid var(--ds-color-text) !important;
  border-radius: 0;
  box-shadow: none !important;
}
:root[data-elements-preset="ink"] .demo-product-context :is(.decision-card.approval-card, .clarification-card.ant-card) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
:root[data-elements-preset="ink"] .demo-product-context .approval-command {
  border: var(--ds-line-width) solid var(--ds-color-border);
  border-radius: 0;
}
:root .decision-card-actions .ant-btn-default:not(:disabled):is(:hover, :focus-visible) {
  color: var(--ds-color-accent);
  border-color: var(--ds-color-accent);
}

/* Question extends the confirmation surface with theme-aware answer choices. */
/* Ant tooltips are portaled to body, outside the themed question card. */
:root .question-option-tooltip {
  --antd-arrow-background-color: var(--ds-color-surface);
}
:root .question-option-tooltip .ant-tooltip-inner {
  background: var(--ds-color-surface);
  color: var(--ds-color-text);
  border: 0;
  font-family: var(--ds-font-sans);
  -webkit-text-fill-color: currentColor;
}
:root .demo-question .clarification-card > .ant-card-head .ant-card-head-title {
  color: var(--ds-color-text);
  font-weight: var(--ds-weight-heading,600);
}
:root .demo-question .clarification-option-card-shell .clarification-option-card.ant-card {
  border-color: var(--ds-color-border);
}
:root .demo-question .clarification-option-card-shell:has(input:checked) .clarification-option-card.ant-card {
  background: var(--ds-color-surface);
  border-color: var(--ds-color-accent);
  box-shadow: none;
}
:root .demo-question .clarification-option-card-shell:not(:has(input:disabled, input:checked)):hover .clarification-option-card.ant-card {
  background: var(--ds-state-hover-bg);
  border-color: var(--ds-color-accent);
}
:root .demo-question .clarification-option-card-shell:has(input[type="radio"]:focus-visible) .clarification-option-card.ant-card {
  outline: var(--ds-line-width) solid var(--ds-color-accent);
  outline-offset: var(--ds-space-1);
}
:root .demo-question .clarification-option-label .ant-tag-processing {
  background: var(--ds-recommendation-bg);
  color: var(--ds-recommendation-fg);
  border: var(--ds-line-width) var(--ds-recommendation-border-style) var(--ds-recommendation-border);
  border-radius: var(--ds-recommendation-radius);
  padding: calc(var(--ds-space-1) / 2) var(--ds-space-2);
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-55d77ae7);
  letter-spacing: var(--ds-recommendation-tracking);
  text-transform: var(--ds-recommendation-case);
}
:root .demo-question .clarification-option-label .ant-tag-processing .ant-typography {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}
:root .demo-question [data-slot="question-freeform-input"] {
  box-sizing: border-box;
  height: calc(var(--ds-space-8) + var(--ds-space-1));
  padding: calc(var(--ds-space-1) * 1.5) var(--ds-space-3);
  background: var(--ds-color-surface);
  color: var(--ds-color-text);
  border-color: var(--ds-color-border);
}
:root .demo-question [data-slot="question-freeform-input"]::placeholder {
  color: var(--ds-color-muted);
}
:root .demo-question [data-slot="question-freeform-input"]:is(:hover, :focus) {
  border-color: var(--ds-color-accent);
  box-shadow: none;
}
:root .demo-question .clarification-actions .clarification-confirm-button.ant-btn-primary:disabled {
  background: var(--ds-color-surface-subtle);
  border-color: var(--ds-color-border);
  color: var(--ds-color-muted);
  cursor: not-allowed;
}

/* The send control has its own shape tokens; feedback never extends its bounds. */
:root .composer-wrap .astryx-chat-send-button.astryx-button {
  --radius-full: var(--ds-send-radius);
  --_button-radius: var(--ds-send-radius);
  position: relative;
  flex: 0 0 auto;
  width: var(--ds-send-width);
  min-width: var(--ds-send-width);
  height: var(--ds-send-height);
  min-height: var(--ds-send-height);
  padding: 0;
  border-radius: var(--ds-send-radius);
  transform: none;
  filter: none;
  box-shadow: none;
  transition: background-color var(--ds-send-transition) var(--ds-motion-ease), color var(--ds-send-transition) var(--ds-motion-ease), box-shadow var(--ds-send-transition) var(--ds-motion-ease);
}
:root .composer-wrap .astryx-chat-send-button.astryx-button.primary:not(:disabled):not([aria-disabled="true"]):hover {
  background: var(--ds-send-hover-bg);
  border-color: var(--ds-send-hover-bg);
  color: var(--ds-send-hover-fg);
  box-shadow: var(--ds-send-hover-shadow);
}
:root .composer-wrap .astryx-chat-send-button.astryx-button.primary:not(:disabled):not([aria-disabled="true"]):active {
  background: var(--ds-send-active-bg);
  border-color: var(--ds-send-active-bg);
  color: var(--ds-send-hover-fg);
  box-shadow: var(--ds-send-hover-shadow);
}
@media (prefers-reduced-motion: reduce) {
  :root .composer-wrap .astryx-chat-send-button.astryx-button { transition: none; }
}
:root[data-elements-motion="none"] .composer-wrap .astryx-chat-send-button.astryx-button { transition: none; }

/* Running indicator stays inside the button edge, around the pause icon. */
@property --ds-running-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.composer-wrap .astryx-chat-send-button { position: relative; }
.composer-wrap .astryx-chat-send-button .composer-running-ring {
  position: absolute;
  inset: var(--ds-send-ring-inset);
  box-sizing: border-box;
  border: var(--ds-motion-line-width) solid color-mix(in srgb, currentColor 25%, transparent);
  border-radius: var(--ds-send-ring-radius);
  pointer-events: none;
}
/* Animate the highlight around a fixed contour; never rotate a square outline. */
.composer-wrap .composer-running-ring::after {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--ds-motion-line-width));
  border-radius: inherit;
  padding: var(--ds-motion-line-width);
  background: conic-gradient(from var(--ds-running-angle), transparent 0deg 80deg, currentColor 250deg 330deg, transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: composer-running-ring var(--ds-motion-duration) linear infinite;
}
@keyframes composer-running-ring { to { --ds-running-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .composer-wrap .composer-running-ring::after { animation: none; }
}
