/* AI assistant Preview pages (omni237 AI3, AI7, AI8, AI9): layout only, on pack tokens. The components are
   SM360.UI's; nothing here restyles one. Class names start ai- so they cannot meet another Preview
   family's rules. */
.ai { display: flex; flex-direction: column; gap: 16px; }
.ai-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 0; font-size: 0.8125rem; color: var(--sm360-text-muted); }
.ai-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ai-two { display: grid; gap: 16px; align-items: start; }
.ai-two > * { min-width: 0; }
.ai-two-wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ai-two-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ai-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; justify-content: flex-end; }
.ai-actions-start { justify-content: flex-start; }
.ai-head-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-hint, .ai-muted { font-size: 0.8125rem; color: var(--sm360-text-muted); }
.ai-muted { margin: 8px 0 0; }
.ai-body { margin: 0; font-size: 0.875rem; line-height: 1.55; }
.ai-lede { margin: 0 0 4px; font-size: 1rem; }
.ai-total { margin: 8px 0 0; font-weight: 600; font-size: 0.875rem; }
.ai-h3 { margin: 16px 0 6px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sm360-text-muted); }
.ai-cell-name { display: block; font-weight: 500; font-size: 0.875rem; }
.ai-cell-sub { display: block; font-size: 0.75rem; color: var(--sm360-text-muted); }
.ai-mono { font-family: var(--sm360-font-mono, ui-monospace, monospace); }
.ai-sources { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.ai-rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; }
.ai-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 0.875rem; }
.ai-dial { margin: 8px 0; }
.ai-check { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.ai-thread { display: flex; flex-direction: column; gap: 8px; }
.ai-msg { max-width: 92%; }
.ai-msg-in { align-self: flex-start; }
.ai-msg-out { align-self: flex-end; background: var(--sm360-primary-subtle, var(--sm360-bg-secondary)); }
/* AI6 Voice: three mode cards side by side, one column on a narrow screen (omni237#2118 item 12). */
.ai-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ai-mode-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; }
/* A pressed toggle reads as the locked primary action, never a wash: the pack's action fill with its
   action ink is the contrast-checked pair (>= 4.5:1 on every pack). The old primary-subtle wash kept
   the button's own ink on a faint ground and failed AA in the dark theme (omni237#2118 item 11). */
.ai .sm360-btn[aria-pressed="true"] {
    background: var(--sm360-action, var(--sm360-primary, var(--sm360-teal)));
    border-color: var(--sm360-action, var(--sm360-primary, var(--sm360-teal)));
    color: var(--sm360-action-ink, var(--sm360-tenant-on-brand, #ffffff));
}

@media (max-width: 720px) {
    .ai-two-wide-left, .ai-two-even { grid-template-columns: minmax(0, 1fr); }
    .ai-modes { grid-template-columns: minmax(0, 1fr); }
    .ai-msg { max-width: 100%; }
}
