/* Wave CP: single semantic presentation contract; aliases resolve from the
   authoritative production/theme palettes, including system-resolved mode. */
:root{
  --bg:var(--q-canvas);
  --surface:var(--q-surface);
  --surface-elevated:var(--q-surface-elevated);
  --text:var(--q-text);
  --text-muted:var(--q-muted);
  --border:var(--q-border);
  --accent:var(--q-accent);
  --positive:var(--q-positive);
  --negative:var(--q-negative);
  --warning:var(--q-warning);
  --info:var(--q-informational);
  --focus:var(--q-focus);
  --overlay:rgba(0,0,0,.72);
  --chart-grid:var(--q-chart-grid);
  --q-ds-dialog:var(--surface-elevated);
  --q-ds-chat-assistant:var(--surface);
  --q-ds-chat-user:var(--accent);
}
:root[data-appearance="light"],
:root[data-resolved-appearance="light"]{
  --overlay:rgba(24,24,29,.38);
  --q-ds-dialog:#fff;
  --q-ds-chat-assistant:#fff;
  --q-ds-chat-user:#7d183f;
}
:root[data-appearance="high-contrast"],
:root[data-resolved-appearance="high-contrast"]{
  --overlay:rgba(0,0,0,.9);
  --q-ds-dialog:var(--q-surface);
  --q-ds-chat-assistant:var(--q-surface);
  --q-ds-chat-user:var(--q-accent);
}
/* Accessible text is inherited from semantic theme tokens, not a dark-only
   fixed color. No route or data truth-state is restyled or misrepresented. */
html[data-production-system="v8"] body #app #main{
  color:var(--text);
  background:var(--bg);
}
html[data-production-system="v8"] body #app :is(.q-product-category__menu,.q-feature-navigation,.q-product-search input){
  color:var(--text);
  border-color:var(--border);
}
html[data-production-system="v8"] body #app .q-product-category__menu{
  background:var(--q-ds-dialog);
}
html[data-production-system="v8"] body #app .q-product-category__menu :is(strong,a){
  color:var(--text);
}
html[data-production-system="v8"] body #app .q-product-category__menu small{
  color:var(--text-muted);
  font-size:12px;
  line-height:1.45;
}
html[data-production-system="v8"] body #app .q-product-context small{
  color:var(--text-muted);
  font-size:11px;
}
html[data-production-system="v8"] body #app .q-product-context strong{
  color:var(--text);
  font-size:13px;
}
/* Chat owns its presentation in ai/qelly-chat.css. Shared navigation retains keyboard focus and comfortable targets. */
html[data-production-system="v8"] body #app :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--focus);outline-offset:2px}
html[data-production-system="v8"] body #app .q-product-category__trigger{min-height:44px}
@media(prefers-reduced-motion:reduce){html[data-production-system="v8"] .q-product-category__trigger>span{animation:none!important;transition:none!important}}
