/* Astrit's quiet region of Cosmos. This file owns the workspace composition.
   Shared legacy message/tool controls remain compatible while being consolidated. */
.cosmos-astrit {
  position:relative;
  --chat-warm-bg:var(--cosmos-void);--chat-warm-carbon:var(--cosmos-night);
  --chat-warm-graphite:var(--cosmos-panel);--chat-warm-paper:var(--cosmos-paper);
  --chat-warm-muted:var(--cosmos-soft);--chat-warm-faint:var(--cosmos-muted);
  --chat-warm-border:var(--cosmos-line);--chat-warm-border-strong:var(--cosmos-line-strong);
  --chat-warm-ember:var(--cosmos-sky);--chat-warm-sky:var(--cosmos-signal);
  --chat-accent:169,206,233;
  display:grid;grid-template-columns:244px minmax(0,1fr);gap:0;
  width:100%;height:100vh;height:100dvh;min-height:0;max-height:none;
  margin:0;padding:0;overflow:hidden;background:var(--cosmos-void);color:var(--cosmos-paper);
  border:0;border-radius:0;font-family:var(--cosmos-font);isolation:isolate;
}
.cosmos-astrit :is(button,a,input,select,textarea):focus-visible {
  outline:2px solid var(--cosmos-sky);outline-offset:3px;
}
.cosmos-astrit :is(button,a) { -webkit-tap-highlight-color:transparent; }
.cosmos-astrit .chat-rail {
  position:relative;inset:auto;z-index:2;display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr) auto auto;gap:12px;
  width:100%;height:100%;min-height:0;margin:0;padding:22px 14px 14px;
  border:0;border-right:1px solid var(--cosmos-line);border-radius:0;
  background:var(--cosmos-night);box-shadow:none;backdrop-filter:none;transform:none;
}
.cosmos-astrit .chat-rail::after { display:none; }
.cosmos-astrit .chat-rail__header { display:flex;align-items:center;gap:4px;min-height:42px;margin-bottom:9px; }
.cosmos-astrit .chat-rail__brand { display:flex;flex:1;align-items:center;gap:10px;width:auto;min-width:0;height:44px;margin:0;padding:0 5px;border:0;border-radius:0;background:none;box-shadow:none; }
.cosmos-astrit .chat-rail__brand>span { display:grid;gap:4px; }
.cosmos-astrit .chat-rail__brand strong { font-size:16px;letter-spacing:-.025em; }
.cosmos-astrit .chat-rail__brand small { color:var(--cosmos-muted);font:10px/1 var(--cosmos-mono);letter-spacing:.12em;text-transform:uppercase; }
.cosmos-astrit .chat-rail__brand .logo__mark { width:26px;height:26px;color:var(--cosmos-sky); }
.cosmos-astrit .chat-rail__new { min-height:44px;gap:10px;padding:10px 12px;border:1px solid var(--cosmos-line-strong);border-radius:var(--cosmos-radius-control);background:var(--cosmos-panel);color:var(--cosmos-paper);box-shadow:none;font-size:13px; }
.cosmos-astrit .chat-rail__new:hover { background:var(--cosmos-raised); }
.cosmos-astrit .chat-rail__new kbd { margin-left:auto;color:var(--cosmos-muted);font:10px/1 var(--cosmos-mono); }
.cosmos-astrit .chat-history__search { min-height:44px;padding:0 10px;border:0;border-bottom:1px solid var(--cosmos-line);border-radius:0;background:none; }
.cosmos-astrit .chat-history__search input { color:var(--cosmos-paper);font-size:13px; }
.cosmos-astrit .chat-history__search input::placeholder { color:var(--cosmos-muted); }
.cosmos-astrit .chat-history__results { padding:12px 0; }
.cosmos-astrit .chat-history__results h3 { margin:6px 10px 10px;color:var(--cosmos-muted);font:10px/1.4 var(--cosmos-mono);letter-spacing:.1em; }
.cosmos-astrit .chat-history-item,.cosmos-astrit .chat-history-item>button { border-radius:5px; }
.cosmos-astrit .chat-history-item>button { grid-template-columns:minmax(0,1fr);min-height:48px;padding-left:10px; }
.cosmos-astrit .chat-history-item>button>span { grid-column:1;min-width:0; }
.cosmos-astrit .chat-history-item em { white-space:nowrap; }
.cosmos-astrit .chat-history-item strong { font-size:13px; }
.cosmos-astrit .chat-history-item em { font:10px/1.4 var(--cosmos-mono); }
.cosmos-astrit .chat-history-item.is-active>button { background:var(--cosmos-panel);box-shadow:inset 2px 0 var(--cosmos-sky); }
.cosmos-astrit .chat-history__empty { padding:24px 10px;text-align:left; }
.cosmos-astrit .chat-history__empty svg { display:none; }
.cosmos-astrit .chat-history__empty strong { margin:0;font-size:13px; }
.cosmos-astrit .chat-history__empty span { font-size:12px; }
.cosmos-astrit .chat-rail__footer { border-top:1px solid var(--cosmos-line);padding-top:12px; }
.cosmos-astrit .chat-rail__footer>span { font:10px/1.5 var(--cosmos-mono);color:var(--cosmos-muted); }
.cosmos-astrit .chat-rail__footer button { min-height:44px;border-radius:5px;font-size:11px; }
.cosmos-astrit .chat-rail__collapse { width:36px;min-width:36px;height:44px;border-radius:5px; }
.cosmos-astrit .chat-workspace {
  position:relative;inset:auto;z-index:1;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:68px minmax(0,1fr) auto;
  width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;padding:0;background:none;
}
.cosmos-astrit .chat-header {
  position:relative;inset:auto;z-index:12;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;
  width:100%;height:68px;min-height:0;margin:0;padding:0 28px;
  border:0;border-bottom:1px solid var(--cosmos-line);border-radius:0;
  background:var(--cosmos-void);box-shadow:none;backdrop-filter:none;transform:none;
}
.cosmos-astrit .chat-header__mobile { display:none; }
.cosmos-astrit .chat-header { grid-row:1;grid-column:1; }
.cosmos-astrit .chat-stage { grid-row:2;grid-column:1; }
.cosmos-astrit .chat-composer-dock { grid-row:3;grid-column:1; }
.cosmos-astrit[data-state] .chat-composer-dock { position:relative;inset:auto;margin-top:0;transform:none;translate:none; }
.cosmos-astrit .chat-header__identity { grid-column:2;grid-row:1;min-width:0;text-align:center; }
.cosmos-astrit .chat-title { max-width:100%;font-size:12px;color:var(--cosmos-muted); }
.cosmos-astrit .chat-title span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.cosmos-astrit[data-state="empty"] .chat-title { opacity:1; }
.cosmos-astrit .chat-model-trigger {
  position:static;grid-column:1;grid-row:1;justify-self:start;
  display:flex;justify-content:flex-start;gap:9px;min-height:44px;max-width:none;padding:6px 8px;
  border:0;border-radius:5px;background:none;box-shadow:none;transform:none;
}
.cosmos-astrit .chat-model-trigger:hover { background:var(--cosmos-panel); }
.cosmos-astrit .chat-model-trigger>i:first-child { width:24px;height:24px;border:0;background:none;color:var(--cosmos-sky); }
.cosmos-astrit .chat-model-trigger strong { font-size:14px; }
.cosmos-astrit .chat-header__tools { position:static;inset:auto;grid-column:3;grid-row:1;display:flex;gap:2px;margin:0;justify-self:end; }
.cosmos-astrit .chat-header__icon,.cosmos-astrit .chat-connection-state { width:40px;min-width:40px;height:44px;border-radius:5px;color:var(--cosmos-muted); }
.cosmos-astrit .chat-header__icon:hover { color:var(--cosmos-paper);background:var(--cosmos-panel); }
.cosmos-astrit .chat-stage { position:relative;inset:auto;display:block;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:42px 32px 26px;scrollbar-gutter:stable; }
.cosmos-astrit .chat-empty { position:relative;inset:auto;display:block;width:min(100%,var(--cosmos-reading));max-width:none;min-height:0;margin:0 auto;padding:24px 0 16px;text-align:left;opacity:1;transform:none; }
.cosmos-astrit[data-state="conversation"] .chat-empty { display:none; }
.cosmos-astrit .cosmos-astrit-horizon { position:relative;width:min(340px,80%);height:88px;margin:0 0 26px; }
.cosmos-astrit-horizon>svg { width:100%;height:100%;stroke:var(--cosmos-line-strong);stroke-width:1; }
.cosmos-astrit-horizon circle { fill:var(--cosmos-sky);stroke:none; }
.cosmos-astrit-horizon>span { position:absolute;left:24%;top:20%;color:var(--cosmos-sky); }
.cosmos-astrit-horizon .logo__mark { width:32px;height:32px; }
.cosmos-astrit .chat-empty__signal { margin:0 0 18px;color:var(--cosmos-muted);font:10px/1.4 var(--cosmos-mono);letter-spacing:.16em; }
.cosmos-astrit .chat-empty h1 { max-width:600px;margin:0 0 18px;color:var(--cosmos-paper);font-size:clamp(34px,4vw,58px);font-weight:470;line-height:1.08;letter-spacing:-.045em; }
.cosmos-astrit .chat-empty h1 { text-shadow:none; }
.cosmos-astrit .chat-empty>[data-chat-empty-copy] { max-width:480px;margin:0;color:var(--cosmos-soft);font-size:14px;line-height:1.7; }
.cosmos-astrit .chat-empty__model { display:none; }
.cosmos-astrit .chat-starters { display:flex;flex-wrap:wrap;gap:4px 18px;width:100%;max-width:640px;margin:24px 0 0;border:0;background:none; }
.cosmos-astrit .chat-starters button { display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 0;border:0;border-radius:0;background:none;color:var(--cosmos-muted);text-align:left; }
.cosmos-astrit .chat-starters button>span,.cosmos-astrit .chat-starters button small { display:none; }
.cosmos-astrit .chat-starters button strong { font-size:12px;font-weight:500; }
.cosmos-astrit .chat-starters button i { position:static;opacity:1;color:var(--cosmos-faint); }
.cosmos-astrit .chat-starters button:hover { color:var(--cosmos-paper);transform:none; }
.cosmos-astrit .chat-empty__health { justify-content:flex-start;margin:16px 0 0;color:var(--cosmos-muted);font-size:11px; }
.cosmos-astrit .chat-message-canvas { width:min(100%,var(--cosmos-reading));max-width:none;margin:0 auto;padding:0; }
.cosmos-astrit .chat-messages { width:100%;margin:0; }
.cosmos-astrit .chat-turn--user { max-width:88%;margin:0 0 36px auto;padding:14px 18px;border:1px solid var(--cosmos-line);border-radius:8px;background:var(--cosmos-night);box-shadow:none; }
.cosmos-astrit .chat-turn--user>header { color:var(--cosmos-muted);font:10px/1.4 var(--cosmos-mono); }
.cosmos-astrit .chat-user-copy { padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:var(--cosmos-paper);font-size:15px;line-height:1.7; }
.cosmos-astrit .chat-turn--assistant { width:100%;max-width:none;margin:0 0 40px;padding:0;border:0;border-radius:0;background:none;box-shadow:none; }
.cosmos-astrit .chat-response-head { margin-bottom:20px; }
.cosmos-astrit .chat-response-head>span strong { font-size:13px;color:var(--cosmos-paper); }
.cosmos-astrit .chat-response-head>span small { color:var(--cosmos-muted);font:10px/1.4 var(--cosmos-mono); }
.cosmos-astrit .chat-response-mark { width:26px;height:26px;border:0;border-radius:0;background:none;color:var(--cosmos-sky);box-shadow:none; }
.cosmos-astrit .chat-response-body { color:var(--cosmos-paper);font-size:16px;line-height:1.8;overflow-wrap:anywhere; }
.cosmos-astrit .chat-response-body :is(h1,h2,h3,h4) { color:var(--cosmos-paper);letter-spacing:-.025em; }
.cosmos-astrit .chat-response-body pre { max-width:100%;border:1px solid var(--cosmos-line);border-radius:8px;background:var(--cosmos-night);box-shadow:none; }
.cosmos-astrit .chat-response-body :is(pre,code) { font-family:var(--cosmos-mono); }
.cosmos-astrit .chat-response-body a { color:var(--cosmos-sky);text-decoration-color:var(--cosmos-line-strong); }
.cosmos-astrit .chat-response-actions button { min-height:40px;border-radius:5px;color:var(--cosmos-muted); }
.cosmos-astrit .chat-response-actions { display:flex;flex-wrap:wrap;gap:6px; }
.cosmos-astrit .chat-response-actions button span { display:inline; }
.cosmos-astrit .chat-composer-dock { position:relative;inset:auto;align-self:end;width:calc(100% - 64px);max-width:var(--cosmos-reading);min-width:0;margin:0 auto 24px;padding:0;transform:none;background:none; }
.cosmos-astrit .chat-composer-dock::before,.cosmos-astrit .chat-composer::before { display:none; }
.cosmos-astrit .chat-composer { grid-template-columns:44px minmax(0,1fr) 44px;gap:6px 12px;padding:12px;border:1px solid var(--cosmos-line-strong);border-radius:12px;background:var(--cosmos-night);box-shadow:none;backdrop-filter:none; }
.cosmos-astrit .chat-composer:focus-within { border-color:var(--cosmos-sky);box-shadow:0 0 0 1px #a9cee915; }
.cosmos-astrit .chat-composer textarea { min-height:44px;padding:10px 0;color:var(--cosmos-paper);font-size:15px;line-height:1.6; }
.cosmos-astrit .chat-composer textarea::placeholder { color:var(--cosmos-muted); }
.cosmos-astrit .chat-composer__attach { width:44px;height:44px;border:0;border-radius:6px;background:var(--cosmos-panel);color:var(--cosmos-sky);box-shadow:none; }
.cosmos-astrit .chat-composer__meta { display:flex;gap:6px;min-height:28px; }
.cosmos-astrit .chat-composer-select { color:var(--cosmos-muted); }
.cosmos-astrit .chat-composer-select select { font-size:11px; }
.cosmos-astrit .chat-send { width:44px;height:44px;border:0;border-radius:6px;background:var(--cosmos-paper);color:var(--cosmos-void);box-shadow:none; }
.cosmos-astrit .chat-composer__under { margin-top:10px;color:var(--cosmos-muted);font-size:10px; }
.cosmos-astrit .chat-attachment-strip { padding:0 0 10px; }
.cosmos-astrit :is(.chat-pending-image,.chat-cloud-file,.chat-pending-plugin) { border-color:var(--cosmos-line);border-radius:7px;background:var(--cosmos-panel); }
.cosmos-astrit :is(.chat-drawer,.chat-model-panel,.chat-connection-panel,.chat-dialog,.chat-utility-menu,.chat-attach-menu) {
  color:var(--cosmos-paper);border:1px solid var(--cosmos-line-strong);border-radius:12px;
  background:var(--cosmos-night);box-shadow:var(--cosmos-shadow);backdrop-filter:none;
}
.cosmos-astrit :is(.chat-drawer,.chat-model-panel,.chat-connection-panel) { z-index:50; }
.cosmos-astrit .chat-overlay { z-index:40;background:#0009;backdrop-filter:none; }
.cosmos-astrit .chat-rail.is-open { z-index:50; }
.cosmos-astrit .chat-model-panel { width:min(540px,calc(100% - 32px));max-height:calc(100dvh - 96px);padding:22px; }
.cosmos-astrit .chat-model-option { border-radius:7px;border-color:transparent;background:none; }
.cosmos-astrit .chat-model-option.is-active { border-color:var(--cosmos-line-strong);background:var(--cosmos-panel); }
.cosmos-astrit .chat-model-option__mark { border-radius:6px;background:var(--cosmos-raised); }
.cosmos-astrit .chat-model-option__copy>span strong { text-transform:none;font-size:14px; }
.cosmos-astrit .chat-model-option__copy small { display:block;font-size:12px;line-height:1.6;color:var(--cosmos-muted); }
.cosmos-astrit .chat-model-option__copy em { display:none; }
.cosmos-astrit .chat-model-option--max .chat-model-option__copy em { display:inline-block;color:var(--cosmos-sky);border-color:var(--cosmos-line-strong); }
.cosmos-astrit :is(.chat-model-panel,.chat-drawer,.chat-dialog)>header { background:var(--cosmos-night); }
.cosmos-astrit .chat-generation-controls { border-color:var(--cosmos-line);border-radius:7px;background:var(--cosmos-panel); }
.cosmos-astrit .chat-generation-controls select { color:var(--cosmos-paper);background:var(--cosmos-night);border:1px solid var(--cosmos-line-strong);border-radius:5px; }
.cosmos-astrit .chat-utility-menu { right:20px;top:calc(100% - 4px); }
.cosmos-astrit .chat-attach-menu { padding:8px;width:320px;max-width:calc(100vw - 32px); }
.cosmos-astrit .chat-attach-menu :is(button,a) { min-height:52px;border-radius:5px; }
.cosmos-astrit .chat-drawer { border-radius:12px 0 0 12px; }
.cosmos-astrit .chat-drawer header h2 { font-size:25px;letter-spacing:-.035em; }
.cosmos-astrit .chat-context__map { display:none; }
.cosmos-astrit .chat-dialog::backdrop { background:#000a;backdrop-filter:none; }
.cosmos-astrit .chat-cloud-picker__item { border-radius:5px;border-color:var(--cosmos-line);background:none; }
.cosmos-astrit .chat-cloud-picker__item.is-selected { background:var(--cosmos-panel);border-color:var(--cosmos-sky); }
.cosmos-astrit .chat-jump-latest { border-color:var(--cosmos-line-strong);border-radius:7px;background:var(--cosmos-panel);color:var(--cosmos-paper); }
.cosmos-astrit .chat-config-note { border:1px solid var(--cosmos-line-strong);border-radius:7px;background:var(--cosmos-panel); }
.cosmos-astrit.has-collapsed-rail { grid-template-columns:72px minmax(0,1fr); }
.cosmos-astrit.has-collapsed-rail .chat-rail { width:72px;padding:18px 10px 12px; }
.cosmos-astrit.has-collapsed-rail .chat-rail__header { flex-direction:column;gap:12px; }
.cosmos-astrit.has-collapsed-rail .chat-rail__brand { flex:none;width:44px; }
.cosmos-astrit.is-focus-mode { grid-template-columns:0 minmax(0,1fr); }
.cosmos-astrit.is-focus-mode .chat-rail { visibility:hidden;pointer-events:none; }
.cosmos-astrit.is-focus-mode .chat-header { opacity:0;visibility:hidden;pointer-events:none;transform:none; }
.cosmos-astrit.is-focus-mode .chat-workspace { grid-template-rows:40px minmax(0,1fr) auto; }
.cosmos-astrit[data-state="empty"] .chat-workspace { grid-template-rows:68px minmax(0,1fr) auto minmax(32px,.6fr); }
.cosmos-astrit[data-state="empty"] .chat-stage { align-self:end;max-height:100%;padding-bottom:20px; }
.cosmos-astrit[data-state="empty"] .chat-composer-dock { align-self:start;margin-bottom:0; }
@media (max-height:760px) {
  .cosmos-astrit[data-state="empty"] .chat-workspace { grid-template-rows:68px minmax(0,1fr) auto; }
  .cosmos-astrit[data-state="empty"] .chat-stage { align-self:stretch; }
  .cosmos-astrit[data-state="empty"] .chat-composer-dock { margin-bottom:16px; }
  .cosmos-astrit .cosmos-astrit-horizon { height:54px;margin-bottom:16px; }
}
@media (max-width:1100px) {
  .cosmos-astrit { grid-template-columns:216px minmax(0,1fr); }
  .cosmos-astrit .chat-header { padding-inline:16px;gap:8px; }
  .cosmos-astrit .chat-title { font-size:11px; }
}
@media (max-width:900px) {
  .cosmos-astrit .chat-response-actions { opacity:1; }
  .cosmos-astrit .chat-response-actions button { min-height:44px;padding:6px 8px;font-size:12px; }
  .cosmos-astrit { height:var(--mobile-viewport-height,100dvh); }
  .cosmos-astrit,.cosmos-astrit.has-collapsed-rail { grid-template-columns:minmax(0,1fr); }
  .cosmos-astrit .chat-rail { position:absolute;inset:0 auto 0 0;width:min(320px,calc(100% - 40px));height:100%;padding:20px 16px;transform:translateX(-105%);visibility:hidden;transition:transform var(--cosmos-responsive) var(--cosmos-ease),visibility var(--cosmos-responsive); }
  .cosmos-astrit .chat-rail.is-open { transform:none;visibility:visible; }
  .cosmos-astrit .chat-rail__collapse { display:none; }
  .cosmos-astrit .chat-rail__close { width:44px;height:44px; }
  .cosmos-astrit .chat-header { grid-template-columns:44px minmax(0,1fr) auto;height:60px;gap:4px;padding:0 12px; }
  .cosmos-astrit .chat-header__mobile { grid-column:1;grid-row:1;display:grid;place-items:center;width:44px;height:44px;color:var(--cosmos-paper); }
  .cosmos-astrit .chat-header__identity { display:none; }
  .cosmos-astrit .chat-header__tools>[data-chat-focus-toggle] { display:none; }
  .cosmos-astrit .chat-header__tools>[data-chat-connection-open] { display:none; }
  .cosmos-astrit .chat-model-trigger { grid-column:2;min-width:0;max-width:100%;gap:6px; }
  .cosmos-astrit .chat-model-trigger strong { font-size:13px; }
  .cosmos-astrit .chat-workspace,.cosmos-astrit[data-state="empty"] .chat-workspace { grid-template-rows:60px minmax(0,1fr) auto; }
  .cosmos-astrit .chat-stage,.cosmos-astrit[data-state="empty"] .chat-stage { padding:28px 24px 24px;align-self:stretch; }
  .cosmos-astrit .chat-empty { padding:10px 0; }
  .cosmos-astrit .chat-composer-dock,.cosmos-astrit[data-state="empty"] .chat-composer-dock { width:calc(100% - 48px);margin-bottom:max(14px,env(safe-area-inset-bottom)); }
  .cosmos-astrit .chat-composer-select,.cosmos-astrit .chat-composer-select select { height:44px;min-height:44px; }
  .cosmos-astrit .chat-model-panel { max-height:calc(100dvh - 32px);padding:18px; }
  .cosmos-astrit .chat-drawer { border-radius:12px; }
  .cosmos-astrit .chat-utility-menu { right:8px; }
}
@media (max-width:560px) {
  .cosmos-astrit .chat-header { padding:0 6px; }
  .cosmos-astrit .chat-header__icon { width:44px;min-width:44px; }
  .cosmos-astrit .chat-model-trigger>i:first-child { display:none; }
  .cosmos-astrit .chat-stage,.cosmos-astrit[data-state="empty"] .chat-stage { padding:22px 18px; }
  .cosmos-astrit .chat-empty h1 { font-size:38px; }
  .cosmos-astrit .cosmos-astrit-horizon { height:62px;margin-bottom:20px; }
  .cosmos-astrit .chat-empty>[data-chat-empty-copy] { font-size:13px; }
  .cosmos-astrit .chat-starters { gap:0 14px;margin-top:16px; }
  .cosmos-astrit .chat-starters button { min-height:40px; }
  .cosmos-astrit .chat-empty__health { margin-top:10px; }
  .cosmos-astrit .chat-composer-dock,.cosmos-astrit[data-state="empty"] .chat-composer-dock { width:calc(100% - 24px);margin-bottom:max(10px,env(safe-area-inset-bottom)); }
  .cosmos-astrit .chat-composer { gap:4px 8px;padding:8px;border-radius:10px; }
  .cosmos-astrit .chat-composer textarea { font-size:16px; }
  .cosmos-astrit .chat-composer__under { margin-top:7px;font-size:9px; }
  .cosmos-astrit .chat-composer__under>span:last-child { display:none; }
  .cosmos-astrit .chat-turn--user { max-width:94%;padding:12px;margin-bottom:28px; }
  .cosmos-astrit .chat-user-copy { font-size:14px; }
  .cosmos-astrit .chat-response-body { font-size:15px;line-height:1.8; }
  .cosmos-astrit .chat-model-panel { width:calc(100% - 20px);padding:14px; }
}
@media (prefers-reduced-motion:reduce) {
  .cosmos-astrit *,.cosmos-astrit *::before,.cosmos-astrit *::after { animation:none!important;scroll-behavior:auto!important;transition:none!important; }
}
.cosmos-astrit[data-motion="reduced"] *,.cosmos-astrit[data-motion="reduced"] *::before,.cosmos-astrit[data-motion="reduced"] *::after { animation:none!important;transition:none!important; }
.cosmos-astrit[data-visibility="hidden"] *,.cosmos-astrit[data-visibility="hidden"] *::before,.cosmos-astrit[data-visibility="hidden"] *::after { animation-play-state:paused!important; }

/* Identity entry is outside the private workspace and is never made inert. */
.cosmos-astrit[hidden],.cosmos-astrit-entry[hidden] { display:none!important; }
.cosmos-astrit-entry { min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;justify-content:center;gap:32px;padding:clamp(24px,7vw,100px);background:var(--cosmos-void);color:var(--cosmos-paper); }
.cosmos-astrit-entry>a { display:flex;align-items:center;gap:16px;color:var(--cosmos-muted);font:11px/1.5 var(--cosmos-mono);letter-spacing:.08em; }
.cosmos-astrit-entry .logo__mark { width:32px;height:32px;color:var(--cosmos-sky); }
.cosmos-astrit-entry h2 { max-width:700px;margin:0 0 18px;font-size:clamp(32px,5vw,62px);line-height:1.08;letter-spacing:-.04em; }
.cosmos-astrit-entry p { max-width:540px;color:var(--cosmos-muted);font-size:16px;line-height:1.7; }
.cosmos-astrit-entry nav { display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px; }
.cosmos-astrit-entry nav :is(button,a) { display:inline-flex;align-items:center;gap:12px;min-height:44px;font-size:14px; }

/* Astrit: a quiet instrument with a visible thread through the conversation. */
.cosmos-astrit {
  grid-template-columns: 258px minmax(0, 1fr);
  background: #080c11;
}
.cosmos-astrit .chat-rail {
  padding: 28px 16px 18px;
  gap: 15px;
  background: #0d151a;
  border-right-color: #b4cad526;
}
.cosmos-astrit .chat-rail__brand strong {
  font-size: 1.15rem;
  font-weight: 620;
}
.cosmos-astrit .chat-rail__brand small {
  font: 500 .7rem/1.2 var(--cosmos-font);
  letter-spacing: .02em;
  text-transform: none;
}
.cosmos-astrit .chat-rail__brand .logo__mark {
  width: 31px;
  height: 31px;
}
.cosmos-astrit .chat-rail__new {
  min-height: 51px;
  padding-inline: 14px;
  background: #dce9ea;
  border-color: #dce9ea;
  color: #0b151b;
  font-weight: 650;
  transition: background 160ms ease, transform 160ms ease;
}
.cosmos-astrit .chat-rail__new:hover {
  background: #fff;
  transform: translateX(3px);
}
.cosmos-astrit .chat-rail__new kbd {
  color: #40535a;
}
.cosmos-astrit .chat-history__search {
  padding-inline: 12px;
  border-bottom-color: #b4cad535;
}
.cosmos-astrit .chat-history__search input {
  font-size: .86rem;
}
.cosmos-astrit .chat-history__results h3 {
  color: #aebfc5;
  font: 500 .76rem/1.4 var(--cosmos-font);
  letter-spacing: .02em;
}
.cosmos-astrit .chat-history-item > button {
  min-height: 56px;
  padding-left: 14px;
}
.cosmos-astrit .chat-history-item strong {
  font-size: .86rem;
}
.cosmos-astrit .chat-history-item.is-active > button {
  background: #1a2a31;
  box-shadow: inset 3px 0 #a8d2e6;
}
.cosmos-astrit .chat-workspace {
  background: radial-gradient(ellipse at 83% 12%, #1b334021, transparent 40%), #080c11;
}
.cosmos-astrit .chat-header {
  border-bottom-color: #b4cad521;
  background: #080c11ed;
}
.cosmos-astrit .chat-title {
  color: #bdcbd0;
  font-size: .85rem;
}
.cosmos-astrit .chat-stage {
  padding: clamp(34px, 6vw, 88px) clamp(25px, 5vw, 78px) 36px;
}
.cosmos-astrit .chat-empty {
  width: min(100%, 1000px);
  min-height: min(660px, 70vh);
  margin-left: clamp(0px, 2vw, 36px);
  padding-top: clamp(14px, 4vh, 60px);
}
.cosmos-astrit .chat-empty::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 4%;
  right: -3%;
  width: clamp(230px, 37vw, 650px);
  height: 74%;
  border-top: 1px solid #a8d2e65a;
  border-bottom: 1px solid #a8d2e617;
  border-radius: 50%;
  transform: rotate(-35deg);
  opacity: .8;
  pointer-events: none;
}
.cosmos-astrit .cosmos-astrit-horizon {
  width: 260px;
  height: 74px;
  margin-bottom: 18px;
}
.cosmos-astrit-horizon > svg {
  stroke: #8bbad271;
}
.cosmos-astrit .chat-empty__signal {
  margin-bottom: 12px;
  font: 600 .8rem/1.3 var(--cosmos-font);
  letter-spacing: .08em;
  color: #bdd6dc;
}
.cosmos-astrit .chat-empty h1 {
  max-width: 780px;
  font-size: clamp(4.5rem, 7vw, 8rem);
  line-height: .91;
  font-weight: 470;
  letter-spacing: -.075em;
}
.cosmos-astrit .chat-empty > [data-chat-empty-copy] {
  max-width: 460px;
  font-size: 1.08rem;
  line-height: 1.55;
  color: #b9c8cd;
}
.cosmos-astrit .chat-starters {
  max-width: 690px;
  gap: 0 24px;
  margin-top: 38px;
}
.cosmos-astrit .chat-starters button {
  min-height: 50px;
  border-bottom: 1px solid #b4cad527;
  transition: color 140ms ease, padding-left 140ms ease;
}
.cosmos-astrit .chat-starters button:hover {
  padding-left: 7px;
}
.cosmos-astrit .chat-starters button strong {
  font-size: .91rem;
}
.cosmos-astrit .chat-empty__health {
  margin-top: 28px;
  font-size: .79rem;
}
.cosmos-astrit .chat-message-canvas {
  width: min(100%, 860px);
  padding-left: clamp(0px, 3vw, 45px);
  border-left: 1px solid #b3d7e026;
}
.cosmos-astrit .chat-turn--user {
  max-width: min(88%, 620px);
  margin-bottom: 42px;
  padding: 19px 24px;
  border: 0;
  border-radius: 6px 6px 2px 6px;
  background: linear-gradient(145deg, #1a303b, #17252d);
}
.cosmos-astrit .chat-turn--assistant {
  margin-bottom: 52px;
}
.cosmos-astrit .chat-response-head {
  margin-bottom: 24px;
}
.cosmos-astrit .chat-response-mark {
  width: 31px;
  height: 31px;
}
.cosmos-astrit .chat-response-body {
  font-size: 1.08rem;
  line-height: 1.75;
}
.cosmos-astrit .chat-response-body pre {
  border-radius: 5px;
  background: #111a20;
}
.cosmos-astrit .chat-composer-dock {
  width: calc(100% - 80px);
  max-width: 920px;
  margin-bottom: 24px;
}
.cosmos-astrit .chat-composer {
  padding: 13px;
  border-radius: 7px;
  background: #17242b;
  border-color: #a8d2e653;
  box-shadow: 0 20px 50px #0005;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.cosmos-astrit .chat-composer:focus-within {
  border-color: #a8d2e6;
  box-shadow: 0 20px 50px #0005, 0 0 0 3px #a8d2e622;
}
.cosmos-astrit .chat-composer textarea {
  font-size: 1rem;
}
.cosmos-astrit .chat-send {
  background: #e9f0ec;
}
.cosmos-astrit .chat-send:hover {
  background: #fff;
}
.cosmos-astrit .chat-model-panel,
.cosmos-astrit .chat-drawer,
.cosmos-astrit .cosmos-astrit-panel {
  background: #101a20;
  border-color: #b4cad543;
}
@media (max-width: 1050px) {
  .cosmos-astrit .chat-empty h1 { font-size: clamp(3.8rem, 7vw, 6rem); }
  .cosmos-astrit .chat-empty::before { right: -18%; opacity: .5; }
}
@media (max-width: 760px) {
  .cosmos-astrit .chat-stage { padding: 26px 21px; }
  .cosmos-astrit .chat-empty { min-height: 0; margin: 0; padding-top: 14px; }
  .cosmos-astrit .chat-empty h1 { font-size: clamp(3.8rem, 10vw, 6rem); }
  .cosmos-astrit .chat-empty::before { right: -30%; top: 14%; width: 390px; height: 280px; }
  .cosmos-astrit .chat-composer-dock { width: calc(100% - 36px); }
  .cosmos-astrit .chat-message-canvas { padding-left: 14px; }
}
@media (max-width: 560px) {
  .cosmos-astrit .chat-stage { padding: 20px 18px; }
  .cosmos-astrit .chat-empty h1 { font-size: clamp(3.25rem, 13vw, 4.5rem); }
  .cosmos-astrit .chat-empty > [data-chat-empty-copy] { font-size: .93rem; }
  .cosmos-astrit .chat-empty::before { width: 300px; right: -50%; opacity: .4; }
  .cosmos-astrit .chat-starters { margin-top: 24px; gap: 0; }
  .cosmos-astrit .chat-starters button { width: 100%; }
  .cosmos-astrit .chat-composer-dock { width: calc(100% - 24px); margin-bottom: max(10px, env(safe-area-inset-bottom)); }
  .cosmos-astrit .chat-composer { padding: 9px; }
  .cosmos-astrit .chat-response-body { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cosmos-astrit .chat-rail__new:hover { transform: none; }
}

/* Keep the empty stage and composer in the same viewport. */
.cosmos-astrit[data-state="empty"] .chat-workspace {
  grid-template-rows: 68px minmax(0, 1fr) auto;
}
.cosmos-astrit[data-state="empty"] .chat-stage {
  align-self: stretch;
}
.cosmos-astrit .chat-empty {
  min-height: 0;
}
@media (max-width: 900px) {
  .cosmos-astrit,
  .cosmos-astrit.has-collapsed-rail {
    grid-template-columns: minmax(0, 1fr);
  }
  .cosmos-astrit[data-state="empty"] .chat-workspace {
    grid-template-rows: 60px minmax(0, 1fr) auto;
  }
}
.cosmos-astrit-entry button { padding:10px 16px;background:var(--cosmos-paper);color:var(--cosmos-void);border-radius:var(--cosmos-radius-control); }
.cosmos-astrit-entry :is(button,a):focus-visible { outline:2px solid var(--cosmos-sky);outline-offset:4px; }
.cosmos-astrit-entry button[hidden] { display:none; }

/* Real side surfaces, independent of the retired warm chat drawer system. */
.cosmos-astrit-panel {
  position:absolute;inset:0 0 0 auto;z-index:50;width:min(520px,100%);height:100%;min-height:0;
  display:grid;grid-template-rows:auto minmax(0,1fr) auto;margin:0;padding:0;
  border:0;border-left:1px solid var(--cosmos-line-strong);border-radius:0;
  background:var(--cosmos-night);color:var(--cosmos-paper);box-shadow:var(--cosmos-shadow);
  opacity:0;visibility:hidden;pointer-events:none;transform:translateX(20px);
  transition:transform var(--cosmos-responsive) var(--cosmos-ease),opacity var(--cosmos-responsive),visibility var(--cosmos-responsive);
}
.cosmos-astrit-panel.is-open { opacity:1;visibility:visible;pointer-events:auto;transform:none; }
.cosmos-astrit-panel>header { display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:12px;padding:28px 24px 22px;border-bottom:1px solid var(--cosmos-line); }
.cosmos-astrit-panel>header>div>span { color:var(--cosmos-sky);font:10px/1.4 var(--cosmos-mono);letter-spacing:.12em; }
.cosmos-astrit-panel h2 { margin:12px 0 8px;font-size:30px;line-height:1.12;letter-spacing:-.04em;font-weight:500; }
.cosmos-astrit-panel p { margin:8px 0 0;color:var(--cosmos-muted);font-size:13px;line-height:1.65; }
.cosmos-astrit-panel>header>button { display:grid;place-items:center;width:44px;height:44px;align-self:start;color:var(--cosmos-soft);border:1px solid var(--cosmos-line);border-radius:var(--cosmos-radius-control);background:none; }
.cosmos-astrit-panel__body { display:block;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:4px 24px 24px; }
.cosmos-astrit-panel>footer { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 24px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--cosmos-line); }
.cosmos-astrit-panel>footer>span { color:var(--cosmos-muted);font-size:11px;line-height:1.5; }
.cosmos-astrit-panel :is(button,select,.cosmos-astrit-account-link) { min-height:44px;font:13px/1.4 var(--cosmos-font); }
.cosmos-astrit-panel :is(select,button:not(header>button)) { border:1px solid var(--cosmos-line-strong);border-radius:var(--cosmos-radius-control);background:var(--cosmos-panel);color:var(--cosmos-paper);padding:8px 12px; }
.cosmos-astrit-panel select { max-width:100%; }
.cosmos-astrit-panel button:not(:disabled):hover { background:var(--cosmos-raised); }
.cosmos-astrit-panel button:disabled { opacity:.55;cursor:not-allowed; }
.cosmos-astrit-panel button[aria-pressed="true"] { border-color:var(--cosmos-sky);background:var(--cosmos-raised); }
.cosmos-astrit-panel .cosmos-astrit-panel__note { margin:16px 0;color:var(--cosmos-muted);font-size:12px;line-height:1.7; }
.cosmos-astrit-settings-group { min-width:0;margin:0;padding:0 0 24px;border:0;border-bottom:1px solid var(--cosmos-line); }
.cosmos-astrit-settings-group legend { float:none;width:100%;padding:24px 0 6px;color:var(--cosmos-sky);font:11px/1.4 var(--cosmos-mono); }
.cosmos-astrit-setting { display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,174px);align-items:center;gap:18px;margin:0;padding:14px 0;background:none;border:0; }
.cosmos-astrit-setting strong { display:block;font-size:14px;font-weight:500;line-height:1.4; }
.cosmos-astrit-setting small { display:block;margin-top:6px;font-size:12px;font-weight:400;line-height:1.6;color:var(--cosmos-muted); }
.cosmos-astrit-setting button { display:flex;justify-content:center;align-items:center;gap:6px; }
.cosmos-astrit-setting--check { grid-template-columns:minmax(0,1fr) 44px; }
.cosmos-astrit-setting--check input { appearance:auto;position:static;opacity:1;justify-self:center;width:22px;height:22px;accent-color:var(--cosmos-sky);cursor:pointer; }
.cosmos-astrit-setting--check { min-height:68px;cursor:pointer; }
.cosmos-astrit-panel .cosmos-astrit-setting--danger button { color:#ffc7c2;border-color:#795452;background:none; }
.cosmos-astrit-section { margin:0;padding:24px 0;border-bottom:1px solid var(--cosmos-line); }
.cosmos-astrit-section>header { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px; }
.cosmos-astrit-section h3 { margin:0;color:var(--cosmos-sky);font:11px/1.5 var(--cosmos-mono); }
.cosmos-astrit-section>header>span { color:var(--cosmos-muted);font-size:11px; }
.cosmos-astrit-section h4 { margin:0;font-size:18px;line-height:1.5;font-weight:500;overflow-wrap:anywhere; }
.cosmos-astrit-account-link { display:inline-flex;align-items:center;gap:10px;color:var(--cosmos-paper);margin-top:8px; }
.cosmos-astrit-facts { margin:0; }
.cosmos-astrit-facts>div { display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,1.3fr);gap:12px;padding:10px 0; }
.cosmos-astrit-facts dt { color:var(--cosmos-muted);font-size:13px; }
.cosmos-astrit-facts dd { margin:0;color:var(--cosmos-paper);font-size:13px;line-height:1.5;overflow-wrap:anywhere; }
.cosmos-astrit-context-files { display:flex;flex-wrap:wrap;gap:10px; }
.cosmos-astrit-context-files>div { width:100%; }
.cosmos-astrit-context-files>div>strong { display:block;font-size:12px;font-weight:500;line-height:1.6;color:var(--cosmos-muted); }
.cosmos-astrit-local-images { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px; }
.cosmos-astrit-local-images .chat-image { width:100%;min-width:0;margin:0;border:1px solid var(--cosmos-line);border-radius:6px;background:var(--cosmos-panel); }
.cosmos-astrit-local-images .chat-image img { display:block;width:100%;height:96px;object-fit:cover; }
.cosmos-astrit-local-images .chat-image figcaption { display:block;padding:10px;font-size:11px; }
.cosmos-astrit-local-images .chat-image figcaption strong { display:block;white-space:normal;overflow-wrap:anywhere;font-weight:400; }
.cosmos-astrit-local-images .chat-image figcaption span { color:var(--cosmos-muted); }
.cosmos-astrit-context-files .chat-attachment--compact { max-width:100%; }
.cosmos-astrit-plugin-list { display:grid;gap:0; }
.cosmos-astrit-plugin { display:grid;grid-template-columns:24px minmax(0,1fr);gap:14px;padding:24px 0;border-bottom:1px solid var(--cosmos-line); }
.cosmos-astrit-plugin>span { color:var(--cosmos-sky);padding-top:2px; }
.cosmos-astrit-plugin__copy :is(strong,small,em,span) { display:block; }
.cosmos-astrit-plugin__copy strong { font-size:17px;line-height:1.4;font-weight:500; }
.cosmos-astrit-plugin__copy small { margin-top:8px;color:var(--cosmos-muted);font-size:13px;line-height:1.65; }
.cosmos-astrit-plugin__copy span { margin-top:14px;color:var(--cosmos-soft);font-size:12px;line-height:1.6; }
.cosmos-astrit-plugin__copy em { margin-top:8px;color:var(--cosmos-muted);font:10px/1.5 var(--cosmos-mono); }
.cosmos-astrit-plugin__actions { grid-column:2;display:flex;flex-wrap:wrap;gap:8px; }
.cosmos-astrit-plugin__hint { flex-basis:100%;color:var(--cosmos-muted);font-size:12px;line-height:1.6; }
.cosmos-astrit-panel [hidden] { display:none!important; }
.cosmos-astrit-tool-activity { display:flex;gap:12px;padding:20px 0;color:var(--cosmos-sky); }
.cosmos-astrit-tool-activity small { display:block;margin-top:8px;color:var(--cosmos-muted);font-size:12px;line-height:1.6; }
@media (min-width:901px) {
  body:has(.cosmos-astrit-panel.is-open) .toast-region { right:538px;max-width:calc(100vw - 558px); }
  body:has(.cosmos-astrit-panel.is-open) .toast { max-width:100%; }
}
@media (max-width:560px) {
  .cosmos-astrit-panel { border-left:0; }
  .cosmos-astrit-panel>header { padding:20px 18px 16px; }
  .cosmos-astrit-panel h2 { font-size:27px; }
  .cosmos-astrit-panel__body { padding:0 18px 24px; }
  .cosmos-astrit-panel>footer { padding-inline:18px; }
  .cosmos-astrit-setting:not(.cosmos-astrit-setting--check) { grid-template-columns:minmax(0,1fr);gap:12px; }
  .cosmos-astrit-setting>button,.cosmos-astrit-setting>select { width:100%; }
}

/* The conversation remains the lightest surface in the private workspace. */
.cosmos-astrit[data-state="empty"] .chat-workspace {
  background: radial-gradient(circle at 82% 37%, #21465737, transparent 29%), #080c11;
}
.cosmos-astrit .chat-empty::before {
  border-top-color: #b7dce36b;
  box-shadow: 0 -16px 40px -37px #b9e6f9;
}
.cosmos-astrit .chat-empty__signal {
  color: #bfd7dd;
  letter-spacing: .12em;
}
.cosmos-astrit .chat-empty__health { color: #b4c8cd; }
.cosmos-astrit .chat-message-canvas {
  border-left-color: #a9cee940;
}
.cosmos-astrit .chat-turn--user {
  border: 1px solid #a8d2e62b;
  background: linear-gradient(135deg, #1b323d, #15252d 90%);
}
.cosmos-astrit .chat-response-body {
  color: #e6e9e6;
  line-height: 1.78;
}
.cosmos-astrit .chat-response-actions {
  opacity: 1;
  transform: none;
  border-top-color: #b4cad530;
}
.cosmos-astrit .chat-response-actions button {
  color: #a9bcc2;
}
.cosmos-astrit .chat-response-actions button:is(:hover,:focus-visible) {
  color: #f0f4f1;
  background: #a8d2e613;
}
.cosmos-astrit .chat-composer {
  background: #17262e;
  border-color: #a8d2e65b;
}
.cosmos-astrit .chat-composer__attach {
  background: #0c1b24;
}
@media (max-width: 560px) {
  .cosmos-astrit[data-state="empty"] .chat-workspace {
    background: radial-gradient(circle at 96% 24%, #21465725, transparent 45%), #080c11;
  }
  .cosmos-astrit .chat-message-canvas { border-left-color: #a9cee92d; }
}
