/* Unays AI "Calm" design (2026-12-01), based on current AI-chat UI conventions:
   neutral surfaces, one accent (Unays teal), 768px reading column, 16px/1.65 answers,
   plain assistant text, soft user bubbles, quiet sidebar, 3-4 suggestion buttons.
   One layer over the existing markup; scoped to body.ux27 so it can be switched off in one line. */

body.ux27[data-theme=light]{
  --bg:#faf8f4;--panel:#ffffff;--sidebar:#f3f0ea;--text:#1d2a28;--ink:#1d2a28;--muted:#5f6d6a;
  --border:#e6e1d8;--line:#e6e1d8;--gold:#0d6b60;--accent:#0d6b60;--accent-soft:#e7f2ee;--soft:#efece6;
  --surface:#ffffff;--text-muted:#5f6d6a;
  --c-hover:#ebe7df;--c-active:#e4ded3;--c-bubble:#efebe3;--c-shadow:0 1px 2px #1d2a280a,0 4px 16px #1d2a280d;
  color-scheme:light;
}
body.ux27[data-theme=dark]{
  --bg:#141817;--panel:#1b201f;--sidebar:#101413;--text:#e8eeec;--ink:#e8eeec;--muted:#9aa8a4;
  --border:#2a3230;--line:#2a3230;--gold:#6fd0b8;--accent:#6fd0b8;--accent-soft:#1d302c;--soft:#222826;
  --surface:#1b201f;--text-muted:#9aa8a4;
  --c-hover:#1c2321;--c-active:#232b29;--c-bubble:#252c2a;--c-shadow:0 1px 2px #0005,0 4px 16px #0004;
  color-scheme:dark;
}

body.ux27{font-family:'DM Sans',Inter,system-ui,-apple-system,'Segoe UI',sans-serif;font-size:15px;background:var(--bg);color:var(--text);--chat-width:768px}
body.ux27 .app,body.ux27 .main{background:var(--bg)}
body.ux27 :is(button,a,select,textarea,input,summary):focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Sidebar: quiet, 272px, items 14px */
@media (min-width:1101px){body.ux27 .app{grid-template-columns:272px minmax(0,1fr)}}
body.ux27 .sidebar{background:var(--sidebar);border-right:1px solid var(--border);padding:18px 12px 12px}
body.ux27 .sidebar .brand-row{margin-bottom:14px}
body.ux27 .sidebar .brand-symbol{color:var(--accent)}
body.ux27 .sidebar .new-chat{background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:12px;min-height:42px;font-size:14px;font-weight:600;box-shadow:var(--c-shadow);transition:background .15s ease}
body.ux27 .sidebar .new-chat:hover{background:var(--c-hover)}
body.ux27 .sidebar .new-chat .shortcut{color:var(--muted);font-weight:500}
body.ux27 .sidebar .nav-item{min-height:38px;padding:8px 10px;border-radius:10px;font-size:14px;color:var(--muted);font-weight:500}
body.ux27 .sidebar .nav-item svg{width:18px;height:18px}
body.ux27 .sidebar .nav-item:hover{background:var(--c-hover);color:var(--text)}
body.ux27 .sidebar .nav-item.active,body.ux27[data-theme=dark] .sidebar .nav-item.active{background:var(--c-active);color:var(--text);font-weight:600}
body.ux27 .sidebar .nav-item.active::before{display:none}
body.ux27 .sidebar .section-label{font-size:12px;font-weight:600;color:var(--muted);letter-spacing:.02em}
body.ux27 .sidebar input[type=search]{background:var(--panel);border:1px solid var(--border);border-radius:10px;font-size:14px;color:var(--text)}
body.ux27 .sidebar :is(.history-item,.history-list button,.history-list a){border-radius:8px;font-size:14px}
body.ux27 .sidebar :is(.history-item,.history-list button,.history-list a):hover{background:var(--c-hover)}
body.ux27 .sidebar .guest-card{background:var(--panel);border:1px solid var(--border);border-radius:14px;box-shadow:none}
body.ux27 .sidebar .quota-track{background:var(--c-active)}
body.ux27 .sidebar .quota-track>*{background:var(--accent)}

/* Top bar */
body.ux27 .topbar{background:transparent;border-bottom:0}
body.ux27 :is(.signin-button,#top-signin){background:var(--text);color:var(--bg);border:0;border-radius:999px;padding:8px 16px;font-size:14px;font-weight:600}
body.ux27[data-theme=dark] :is(.signin-button,#top-signin){background:var(--text);color:var(--bg)}

/* Empty state: small mark, clear headline, short line */
body.ux27 .welcome{padding-top:clamp(24px,10vh,96px);text-align:center}
body.ux27 .welcome .hero-mark{width:48px;height:48px;margin:0 auto 16px}
body.ux27 .welcome .hero-mark :is(.orb-halo,.orb-ring,.orb-satellite,.orb-caption,.unays-workspace-art){display:none}
body.ux27 .welcome .hero-mark .orb-core{inset:0;width:48px;height:48px;border:1px solid var(--border);border-radius:14px;background:var(--panel);box-shadow:var(--c-shadow);animation:none}
body.ux27 .welcome .hero-mark .orb-core svg{width:24px;height:24px;color:var(--accent)}
body.ux27 .welcome .greeting{margin:0 0 6px;font-size:15px;color:var(--muted);font-weight:500}
body.ux27 .welcome h1{font-family:'DM Sans',Inter,system-ui,sans-serif;font-size:clamp(28px,3.2vw,36px);font-weight:600;line-height:1.2;letter-spacing:-.02em;margin:0 auto 10px;max-width:20ch;color:var(--text)}
body.ux27 .welcome h1 span{color:inherit;font-style:normal}
body.ux27 .welcome .welcome-intro{font-size:16px;line-height:1.6;color:var(--muted);max-width:52ch;margin:0 auto}
body.ux27 .welcome>.welcome-actions{display:none}

/* Composer: the main object on the page */
body.ux27 .composer,body.ux27[data-theme=dark] .composer{background:var(--panel);border:1px solid var(--border);border-radius:24px;box-shadow:var(--c-shadow);transition:border-color .15s ease,box-shadow .15s ease}
body.ux27 .composer:focus-within{border-color:color-mix(in srgb,var(--accent) 55%,var(--border));box-shadow:0 0 0 3px var(--accent-soft),var(--c-shadow)}
body.ux27 #question{font-size:16px;line-height:1.5;color:var(--text);background:transparent}
body.ux27 #question::placeholder{color:var(--muted)}
body.ux27 .composer-toolbar{border-top:0}
body.ux27 .composer-tools :is(.web-button,.capability-trigger,.auto-routing){min-height:34px;border-radius:999px;border:1px solid var(--border);background:transparent;color:var(--muted);font-size:13px;font-weight:500}
body.ux27 .composer-tools :is(.web-button,.capability-trigger):hover{background:var(--c-hover);color:var(--text)}
body.ux27 .composer-tools .web-button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
body.ux27 .composer-tools .icon-button{border-radius:999px;color:var(--muted)}
body.ux27 .composer-tools .tool-divider{display:none}
body.ux27 .send-button,body.ux27[data-theme=dark] .send-button{width:36px;height:36px;min-width:36px;border:0;border-radius:999px;background:var(--text);color:var(--bg);box-shadow:none;transition:opacity .15s ease}
body.ux27 .send-button:hover{opacity:.85;transform:none}
body.ux27 .send-button:disabled{opacity:.3}
body.ux27 .composer-footnote{font-size:12px;color:var(--muted)}
body.ux27 #remaining-label{color:var(--muted);font-weight:500}
body.ux27 .accuracy-note{font-size:12px;color:var(--muted);text-align:center}
body.ux27 .capability-menu{border:1px solid var(--border);border-radius:16px;background:var(--panel);box-shadow:0 8px 30px #1d2a281f}

/* Suggestions: 4 quiet buttons, 2x2 */
body.ux27 #welcome-actions .suggestions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-width:var(--chat-width);margin-inline:auto}
body.ux27 #welcome-actions .suggestions button{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;min-height:0;padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:var(--panel);color:var(--text);text-align:left;box-shadow:none;transition:background .15s ease,border-color .15s ease}
body.ux27 #welcome-actions .suggestions button:hover{background:var(--c-hover);border-color:var(--c-active);transform:none}
body.ux27 #welcome-actions .suggestion-icon{grid-row:1 / 3;display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--accent-soft);color:var(--accent)}
body.ux27 #welcome-actions .suggestions strong{font-family:inherit;font-size:14px;font-weight:600;line-height:1.3}
body.ux27 #welcome-actions .suggestions button>span:not(.suggestion-icon){font-size:13px;line-height:1.35;color:var(--muted)}
body.ux27 #welcome-actions .suggestions button>svg:last-child{display:none}
body.ux27 .about-workspace{border:0;background:transparent;text-align:center;color:var(--muted);font-size:13px}
body.ux27 .about-workspace summary{color:var(--muted);font-weight:500}
body.ux27 .open-signature{display:none}
@media (max-width:560px){body.ux27 #welcome-actions .suggestions{grid-template-columns:1fr}body.ux27 #welcome-actions .suggestions button>span:not(.suggestion-icon){display:none}}

/* Conversation: plain assistant text, soft user bubbles */
body.ux27 .message.assistant{font-size:16px;line-height:1.65}
body.ux27 .message.assistant .ai-avatar{background:var(--panel);color:var(--accent);border:1px solid var(--border);border-radius:10px;box-shadow:none}
body.ux27 .message.assistant .message-heading{font-size:14px;font-weight:600;color:var(--text)}
body.ux27 .message.assistant :is(p,li){max-width:72ch}
body.ux27 .message.assistant pre{border:1px solid var(--border);border-radius:12px;font-size:13.5px;line-height:1.55}
body.ux27 .message.assistant :not(pre)>code{background:var(--soft);border-radius:6px;padding:.1em .35em;font-size:.9em}
body.ux27 .message.assistant a{color:var(--accent);text-underline-offset:3px}
body.ux27 .message.user>*:not(.message-actions){max-width:78%;background:var(--c-bubble);color:var(--text);border:0;border-radius:20px;padding:10px 16px;font-size:16px;line-height:1.55;box-shadow:none}
body.ux27 .message-actions button{border-radius:8px;color:var(--muted)}
body.ux27 .message-actions button:hover{background:var(--c-hover);color:var(--text)}
body.ux27 .thinking-dots>*{background:var(--muted)}

/* Shared controls and dialogs */
body.ux27 .primary-button,body.ux27[data-theme=dark] .primary-button{background:var(--text);color:var(--bg);border:0;border-radius:12px;font-weight:600}
body.ux27 .secondary-button{background:var(--panel);border:1px solid var(--border);color:var(--text);border-radius:12px;font-weight:600}
body.ux27 .modal{border:1px solid var(--border);border-radius:20px;background:var(--panel);color:var(--text);box-shadow:0 24px 70px #1d2a2833}
body.ux27 .modal::backdrop{background:#10161599}
body.ux27 .modal :is(input,textarea){border:1px solid var(--border);border-radius:10px;background:var(--bg);color:var(--text);font-size:16px}
body.ux27 .modal :is(input,textarea):focus{border-color:var(--accent)}
body.ux27 .notice{border:1px solid var(--border);border-radius:14px;background:var(--panel);box-shadow:0 8px 30px #1d2a281f}
body.ux27 :is(.tool-card,.project-card,.model-card,.knowledge-card){border:1px solid var(--border);border-radius:16px;background:var(--panel);box-shadow:none}
body.ux27 :is(.tool-card,.project-card,.model-card,.knowledge-card):hover{border-color:var(--c-active);background:var(--c-hover)}

/* Code workspace: same neutral surfaces */
body.ux27 :is(.code-project-bar,.code-body,.code-editing){background:var(--panel)}
body.ux27 .code-project-bar{border-bottom:1px solid var(--border)}
body.ux27 .code-files{background:var(--sidebar);border-right:1px solid var(--border)}
body.ux27 :is(.code-button,.code-action-bar button,.code-preview-toolbar button){border-radius:8px}
body.ux27 #code-apply{background:var(--text);color:var(--bg);border:0;border-radius:10px;font-weight:600}
body.ux27 .code-statusbar{background:var(--sidebar);border-top:1px solid var(--border);color:var(--muted)}
body.ux27 .CodeMirror{font-size:13.5px;line-height:1.6}

@media (prefers-reduced-motion:reduce){body.ux27 *{transition:none!important}}

/* v2 fixes from screenshot review */
body.ux27 .welcome{background:none!important;border:0!important;box-shadow:none!important;min-height:0!important;padding-bottom:8px}
body.ux27 .welcome::before,body.ux27 .welcome::after{display:none!important}
body.ux27 .welcome :is(.welcome-intro,h1,.greeting){margin-left:auto;margin-right:auto}
body.ux27 .sidebar .main-nav{display:grid;grid-template-columns:1fr;gap:2px}
body.ux27 .sidebar .main-nav .nav-item{width:100%;justify-content:flex-start}
body.ux27 .sidebar .workspace-links{display:flex;flex-wrap:wrap;gap:4px 12px}
body.ux27 .sidebar .workspace-links a{border:0;background:none;padding:2px 0;font-size:13px;color:var(--muted)}
body.ux27 .sidebar .workspace-links a:hover{color:var(--text);text-decoration:underline}
body.ux27 .welcome{width:100%;max-width:var(--chat-width);margin-left:auto!important;margin-right:auto!important;box-sizing:border-box}
body.ux27 .welcome h1,body.ux27 .welcome h1 *{font-weight:600!important;font-family:'DM Sans',Inter,system-ui,sans-serif!important}
body.ux27 .sidebar .workspace-links{flex-direction:row!important;align-items:center}
body.ux27 .sidebar .workspace-links a{display:inline-block!important;min-height:0!important;box-shadow:none!important;font-weight:500!important}
body.ux27 .sidebar .community-link{display:flex;margin-top:6px}
body.ux27 #welcome-actions .suggestions button>span:not(.suggestion-icon){max-width:none!important;width:auto!important}
body.ux27 .welcome{min-height:auto!important;flex-shrink:0!important}
body.ux27.coding-workspace #welcome-actions .suggestions{grid-template-columns:1fr}body.ux27.coding-workspace #welcome-actions .suggestions button>span:not(.suggestion-icon){display:none}
body.ux27 .chat-view{background:none!important}body.ux27 .welcome{row-gap:0!important;padding-bottom:20px!important}body.ux27 .welcome>.welcome-intro{margin-bottom:0!important}body.ux27 .welcome>*:empty{display:none}
body.ux27 .welcome{justify-items:center!important;text-align:center!important}body.ux27 .welcome>*{justify-self:center!important}
body.ux27 .welcome{grid-template-columns:minmax(0,1fr)!important}body.ux27 .welcome :is(h1,.welcome-intro,.greeting){margin-left:auto!important;margin-right:auto!important;text-align:center!important}
