/* VectorXS 0.8: neutral floating materials, with one blue-purple action accent. */
/* VectorXS R5: right-anchored bubble, LEFT-aligned text, centered vertically. */
#chat-workspace .message-user .message-body {
  display:flex; flex-direction:column; justify-content:center; align-items:stretch;
  box-sizing:border-box; padding:16px 21px;
  line-height:1.65; text-align:left !important;
}
#chat-workspace .message-user .message-body :where(.answer-prose,.answer-prose p,.answer-prose li,.answer-prose div) {
  text-align:left !important; margin-left:0;
}
#chat-workspace .message-user .message-body .answer-prose > :last-child { margin-bottom:0; }
#chat-workspace .message-user .message-body .answer-prose > p:not(:last-child) { margin-bottom:9px; }

:root {
  --bg:#f5f5f7; --surface:#fff; --sidebar:#fcfcfd; --surface-2:#eeeef2;
  --ink:#202024; --muted:#63636e; --subtle:#6b6b76; --line:#dfdfe6;
  --accent:#5850ce; --accent-hover:#4841b6; --accent-soft:#eeecff; --accent-ink:#fff;
  --focus:#5850ce; --brand:#5850ce; --brand-ink:#fff; --success:#5148bc;
  --nav-bg:#fcfcfd; --nav-ink:#26262b; --nav-muted:#666670; --nav-line:#e4e4ea;
  --nav-hover:#f0f0f5; --nav-selected:#eae8fa; --option-hover:#eeecff;
  --void-near:rgba(122,117,200,.13); --void-far:rgba(160,159,190,.06); --void-line:rgba(113,107,177,.15);
  --overlay:rgba(20,20,28,.4); --lift:0 12px 36px rgba(26,26,42,.07);
  --rail-shadow:0 5px 22px rgba(26,26,42,.055); --workbench-shadow:var(--lift);
  --shadow:0 26px 90px rgba(20,20,34,.2); --radius:16px;
}
:root[data-theme=dark] {
  --bg:#171719; --surface:#222225; --sidebar:#202023; --surface-2:#2d2d32;
  --ink:#f3f3f5; --muted:#b2b2bd; --subtle:#aaaab6; --line:#3c3c44;
  --accent:#b1a8ff; --accent-hover:#c9c2ff; --accent-soft:#35304f; --accent-ink:#211a40;
  --focus:#b1a8ff; --brand:#b1a8ff; --brand-ink:#211a40; --success:#b1a8ff;
  --nav-bg:#202023; --nav-ink:#f3f3f5; --nav-muted:#b2b2bd; --nav-line:#383840;
  --nav-hover:#2b2b31; --nav-selected:#343043; --option-hover:#302d40;
  --void-near:rgba(147,136,224,.12); --void-far:rgba(90,85,120,.04); --void-line:rgba(161,151,218,.16);
  --overlay:rgba(0,0,0,.6); --lift:0 15px 42px rgba(0,0,0,.21);
  --rail-shadow:0 5px 24px rgba(0,0,0,.15); --workbench-shadow:var(--lift);
  --shadow:0 26px 90px rgba(0,0,0,.45);
}
::selection { background:var(--accent-soft); color:var(--ink) }
html { accent-color:var(--accent); scrollbar-color:var(--line) transparent }
body { background:var(--bg) }
.app-shell,.app-main,body:not([data-page=chat]) .app-main { background:var(--bg) }
.app-sidebar { background:var(--nav-bg); border:0 }
.primary,.secondary,button.danger,.search-control,.search-control input { border-radius:12px }
input:not([type=checkbox]):not([type=radio]),textarea,select { border-radius:12px }
.primary { box-shadow:0 4px 12px rgba(65,56,150,.12) }
button:disabled { cursor:not-allowed }
.welcome h1,.hub-heading h1,body:not([data-page=chat]) .page-header h1 { font:550 2rem/1.2 var(--font); letter-spacing:-.03em }
.welcome-heading p { margin-top:13px }
.topbar,body:not([data-page=chat]) .topbar { background:var(--surface); border-radius:20px; margin:0 8px; box-shadow:var(--rail-shadow); border:0 }
body:not([data-page=chat]) .page-canvas { border-radius:26px; margin-top:20px; background:var(--surface); box-shadow:var(--lift) }
.workspace-switch { border:0; background:var(--surface-2); border-radius:14px; padding:11px }
.sidebar-compose { border:0; border-radius:12px; background:var(--surface); box-shadow:0 3px 10px rgba(24,24,35,.05); min-height:42px }
.nav-item,.conversation-row,.conversation-open { border-radius:12px }
.nav-item { min-height:40px }
.schedule-nav { width:100%; margin-top:3px; border:0; text-align:left; background:transparent }
.schedule-nav>span:first-of-type { flex:1 }
.schedule-count { min-width:20px; height:20px; display:grid; place-items:center; border-radius:50%; font-size:.65rem; background:var(--accent); color:var(--accent-ink) }
.app-sidebar .profile-row { margin-bottom:0 }
.chat-workspace { margin:10px 8px 0; border-radius:24px; background:var(--surface); box-shadow:var(--lift); overflow:hidden }
.chat-subbar { padding:12px 30px; min-height:45px }
.messages { background:var(--surface); gap:32px; padding-block:26px 30px }
.messages>* { width:min(100%,790px) }
.message-user .message-body { border-radius:24px; padding:13px 20px; background:var(--surface-2) }
.message-assistant .message-label { font-size:.84rem; color:var(--ink); margin-bottom:15px }
.message-assistant .message-label::before { background:var(--accent) }
.message-assistant .message-body { max-width:76ch }
.answer-prose { font-size:.98rem; line-height:1.8 }
.answer-prose strong { font-weight:650 }
.answer-prose h2 { font:650 1.25rem/1.4 var(--font); margin:28px 0 12px }
.answer-prose h3 { font:650 1.08rem/1.5 var(--font); margin:24px 0 10px }
.prose-table { border:0; border-radius:0; margin:22px 0 26px }
.prose-table th { background:transparent; font-size:.81rem; color:var(--muted); font-weight:550 }
.prose-table th,.prose-table td { padding:12px 13px 12px 0; overflow-wrap:normal; word-break:normal }
.prose-table table { min-width:480px }
.prose-table th:last-child,.prose-table td:last-child { padding-right:0 }
.answer-prose blockquote { border-left:2px solid var(--line); border-radius:2px; padding-left:16px; color:var(--ink) }
.answer-worked { font-size:.74rem; color:var(--muted); margin:0 0 12px }
.composer-dock { padding:10px 26px 16px; background:var(--surface) }
.composer { border:0; border-radius:28px; box-shadow:0 6px 30px rgba(25,25,46,.09); padding:15px 17px 10px; background:var(--surface) }
:root[data-theme=dark] .composer { background:var(--surface-2); box-shadow:0 6px 30px rgba(0,0,0,.22) }
.rich-writing--chat .rich-editor { min-height:40px; padding:4px 5px 8px }
.composer-note { margin-top:11px }
.send-button { background:var(--accent); color:var(--accent-ink) }
.orbit-option { border-radius:16px }
.quick-dock { border:0; border-radius:24px; box-shadow:var(--lift); background:var(--surface) }
.chat-consent { border-radius:22px }
.memory-entry { padding:24px 12px; border-radius:16px }
.memory-entry:hover { background:var(--nav-hover) }
.memory-library { display:flex; flex-direction:column; gap:14px; margin-top:18px }
.memory-entry { background:var(--surface-2); border:0; padding:22px; border-radius:22px }
.memory-entry:hover { background:var(--nav-hover) }
.memory-file-mark { border-radius:14px }
.memory-download { border-radius:12px }
.connection-row { padding:22px 18px; border-radius:20px; margin-block:12px; background:var(--surface-2); border:0 }
.connection-row:hover { background:var(--nav-hover) }
.task-assist { border-radius:18px!important }
.schedule-chip { display:inline-flex; align-items:center; gap:9px; padding:10px 15px; min-height:42px; margin-top:18px; border:1px solid var(--line); border-radius:999px; color:var(--ink); background:var(--surface); font-size:.8rem; text-align:left; line-height:1.5 }
.schedule-chip svg { width:17px; height:17px; flex:none }
.schedule-card { display:flex; align-items:center; gap:13px; padding:17px 18px; margin-top:16px; border:1px solid var(--line); border-radius:20px; min-width:0 }
.schedule-card>.icon { width:23px; height:23px; flex:none; color:var(--muted) }
.schedule-card-copy { flex:1; min-width:0 }
.schedule-card strong { display:block; font-size:.86rem; font-weight:600; overflow-wrap:anywhere }
.schedule-card small { display:block; color:var(--muted); font-size:.75rem; margin-top:4px; line-height:1.6; overflow-wrap:anywhere }
.schedule-card .secondary { min-height:38px; padding:7px 12px; flex:none; font-size:.79rem }
.schedule-dialog { width:min(640px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); overflow-y:auto; padding:26px; border:0; border-radius:28px; box-shadow:var(--shadow); background:var(--surface); color:var(--ink) }
.schedule-dialog::backdrop { background:var(--overlay) }
.schedule-dialog .dialog-header { margin-bottom:20px }
.schedule-dialog .dialog-header h2 { font-size:1.1rem; font-weight:650 }
.schedule-dialog .form-stack { gap:17px }
.schedule-dialog label { font-size:.79rem; line-height:1.6 }
.schedule-dialog input,.schedule-dialog textarea,.schedule-dialog select { margin-top:6px; background:var(--surface-2); border:0; border-radius:14px; padding:12px 14px; min-height:46px; width:100%; font-size:.9rem }
.schedule-dialog textarea { resize:vertical; line-height:1.7 }
.schedule-fields { display:grid; grid-template-columns:1fr 1fr; gap:15px }
.schedule-fields label { min-width:0 }
.schedule-dialog .schedule-check { display:flex; flex-direction:row; gap:11px; align-items:flex-start; font-size:.77rem; line-height:1.7; margin-top:14px }
.schedule-dialog .schedule-check input { margin:4px 0 0; min-height:18px; width:18px; height:18px; flex:none }
.schedule-account { padding:16px; background:var(--accent-soft); border-radius:16px }
.schedule-local-note { display:flex; align-items:flex-start; gap:9px; color:var(--muted); font-size:.73rem; line-height:1.75; margin:0 }
.schedule-local-note>.icon { width:17px; height:17px; margin-top:3px; flex:none }
.schedule-error { color:var(--danger); font-size:.8rem; line-height:1.6; margin:0 }
.schedule-error:empty,#schedule-clarification:empty { display:none }
.schedule-footer { display:flex; gap:9px; justify-content:flex-end; flex-wrap:wrap; padding-top:5px }
.schedule-footer>.text-button { margin-right:auto; color:var(--danger) }
.schedule-library-heading { display:flex; justify-content:space-between; align-items:center; gap:15px; margin-bottom:14px }
.schedule-library-heading p { color:var(--muted); font-size:.82rem }
.schedule-library-heading .primary { min-height:40px; padding:9px 13px; font-size:.78rem }
.schedule-list { display:flex; flex-direction:column; gap:12px; margin:18px 0 24px }
.schedule-list .schedule-card { margin:0 }
.schedule-empty { padding:30px 14px; color:var(--muted); font-size:.85rem; text-align:center; line-height:1.8 }
.schedule-updates a { display:block; padding:12px 0; color:var(--accent); font-size:.8rem; text-decoration:none; border-bottom:1px solid var(--line) }
@media(min-width:761px) {
  .app-shell,body:not([data-page=chat]) .app-shell { padding:12px; gap:12px; grid-template-columns:236px minmax(0,1fr) }
  .app-sidebar,body:not([data-page=chat]) .app-sidebar { border-radius:24px; box-shadow:var(--rail-shadow) }
  .app-main { min-height:calc(100dvh - 24px) }
  .quick-dock { left:calc(50% + 124px) }
}
@media(hover:hover) and (pointer:fine) {
  .schedule-chip:hover { background:var(--accent-soft); border-color:var(--accent); color:var(--accent) }
  .nav-item:hover { background:var(--nav-hover) }
}
@media(max-width:760px) {
  .app-shell { padding:0; gap:0 }
  .topbar,body:not([data-page=chat]) .topbar { margin:9px 10px 0; border-radius:18px; padding-inline:13px }
  .chat-workspace { margin:10px 0 0; border-radius:22px 22px 0 0; box-shadow:none }
  .chat-subbar { padding-inline:18px }
  .messages { padding-inline:18px }
  .welcome h1,.hub-heading h1,body:not([data-page=chat]) .page-header h1 { font-size:1.7rem }
  .composer-dock { padding:10px 12px 14px }
  .composer { border-radius:24px; padding:13px 12px 8px }
  body:not([data-page=chat]) .page-canvas { border-radius:22px }
  .schedule-dialog { padding:22px 18px; width:calc(100vw - 20px); border-radius:24px }
  .schedule-dialog input,.schedule-dialog select,.schedule-dialog textarea { font-size:1rem }
  .schedule-fields { grid-template-columns:1fr }
  .schedule-card { padding:14px; gap:10px; border-radius:18px }
  .schedule-card .secondary,.schedule-chip { min-height:44px }
  .schedule-card>.icon { width:20px; height:20px }
  .schedule-card small { font-size:.72rem }
  .schedule-footer button { min-height:44px }
}
@media(prefers-reduced-motion:reduce) { .schedule-chip,.schedule-card { transition:none } }
