/* Single-navigation workspace. Colors inherit the shared appearance tokens. */
.monochrome-shell {
  --sidebar-width:252px;
  --topbar-height:64px;
  --reading-width:820px;
  display:grid;
  grid-template-columns:var(--sidebar-width) minmax(0,1fr);
  min-height:100dvh;
  background:var(--surface);
}
.monochrome-shell .workspace-sidebar {
  position:fixed; inset:0 auto 0 0; z-index:40;
  display:flex; flex-direction:column; gap:0;
  width:var(--sidebar-width); height:100dvh; min-height:0;
  background:var(--sidebar); border-right:1px solid var(--line);
  color:var(--ink); overflow:hidden;
}
.monochrome-shell.sidebar-collapsed { grid-template-columns:minmax(0,1fr); }
.monochrome-shell.sidebar-collapsed .workspace-sidebar { display:none; }
.monochrome-shell .workspace { grid-column:2; min-width:0; }
.monochrome-shell.sidebar-collapsed .workspace { grid-column:1; }
.monochrome-shell .sidebar-scrim { display:none; }
.monochrome-shell .workspace-header { height:var(--topbar-height); min-height:var(--topbar-height); padding:0 26px; gap:16px; border-bottom:1px solid var(--line); background:var(--surface); }
.workspace-heading { display:flex; align-items:center; gap:11px; min-width:0; flex:1; }
.workspace-heading h1 { margin:0; font-size:15px; font-weight:600; line-height:1.5; letter-spacing:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.workspace-heading .mobile-menu,.workspace-heading #toggle-sidebar { display:inline-flex; flex-shrink:0; margin:0; width:32px; height:36px; }
.conversation-status { display:inline-flex; align-items:center; gap:5px; flex-shrink:0; padding:4px 7px; border-radius:6px; background:var(--hover); color:var(--muted); font-size:10px; line-height:1.5; }
.conversation-status svg { width:12px; height:12px; }
.monochrome-shell .topbar-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.monochrome-shell .topbar-actions .btn { min-height:34px; padding:7px 11px; font-size:12px; }
.monochrome-shell .topbar-actions .theme-trigger { background:transparent; border-color:var(--line); }
.monochrome-shell .theme-trigger:hover,.monochrome-shell .theme-trigger[aria-expanded=true] { border-color:var(--line-strong); }
.monochrome-shell #main { min-height:calc(100dvh - var(--topbar-height)); }
.monochrome-shell #main.chat-main { height:calc(100dvh - var(--topbar-height)); min-height:0; }
.monochrome-shell .demo-banner+#main.chat-main { height:calc(100dvh - var(--topbar-height) - 37px); }
.monochrome-shell .chat-work { min-height:0; background:var(--surface); }
.monochrome-shell .chat-scroll { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow:auto; padding:20px 38px 14px; scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }
.monochrome-shell .message { width:100%; max-width:var(--reading-width); margin:14px auto 20px; gap:15px; font-size:16px; }
.monochrome-shell .message.assistant { display:grid; grid-template-columns:32px minmax(0,1fr); }
.monochrome-shell .message-avatar { width:32px; height:32px; border:0; border-radius:50%; color:var(--ink); background:var(--hover); }
.monochrome-shell .message-body { min-width:0; padding-top:3px; }
.monochrome-shell .message-name { margin-bottom:12px; color:var(--ink); font-size:12px; line-height:1.8; font-weight:550; }
.monochrome-shell .message-name small { color:var(--muted); font-weight:400; }
.monochrome-shell .message .markdown { font-size:16px; line-height:1.8; color:var(--ink); }
.monochrome-shell .markdown p { line-height:inherit; margin-bottom:16px; }
.monochrome-shell .markdown p:last-child { margin-bottom:0; }
.monochrome-shell .markdown h1,.monochrome-shell .markdown h2,.monochrome-shell .markdown h3 { margin-top:24px; margin-bottom:12px; letter-spacing:-.3px; }
.monochrome-shell .markdown h1 { font-size:26px; }
.monochrome-shell .markdown h2 { font-size:23px; }
.monochrome-shell .markdown h3 { font-size:19px; }
.monochrome-shell .markdown pre { max-width:100%; font-size:13px; background:var(--sidebar); }
.monochrome-shell .message.user { display:flex; justify-content:flex-start; flex-direction:row-reverse; margin-top:10px; margin-bottom:22px; }
.monochrome-shell .message.user .message-avatar,.monochrome-shell .message.user .message-name { display:none; }
.monochrome-shell .message.user .message-body { flex:0 1 auto; max-width:85%; padding:0; }
.monochrome-shell .message.user .markdown { padding:12px 17px; border:0; border-radius:12px; background:var(--hover); }
.monochrome-shell .message-actions { gap:4px; margin-top:13px; color:var(--muted); }
.monochrome-shell .message-actions .icon-btn { width:30px; height:30px; }
.monochrome-shell .message.user .message-actions { margin-top:4px; }
.monochrome-shell .composer-zone { flex:0 0 auto; width:100%; max-width:calc(var(--reading-width) + 76px); padding:12px 38px 0; margin:0 auto; background:var(--surface); }
.monochrome-shell .composer { padding:15px 15px 12px; border:1px solid var(--line-strong); border-radius:16px; background:var(--paper); box-shadow:0 3px 14px var(--shadow-color); }
.monochrome-shell .composer:focus-within { border-color:var(--muted); box-shadow:0 0 0 2px var(--accent-faint); }
.monochrome-shell .composer textarea { display:block; width:100%; height:auto; min-height:56px; max-height:200px; padding:0; resize:none; border:0; outline:0; background:transparent; box-shadow:none; font-size:16px; line-height:1.8; }
.monochrome-shell .composer-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; min-width:0; }
.monochrome-shell .composer-tools { display:flex; align-items:center; flex-wrap:nowrap; gap:7px; min-width:0; }
.monochrome-shell .composer-tools .icon-btn { width:34px; height:34px; color:var(--ink); }
.monochrome-shell #insert-prompt { border:1px solid var(--line); border-radius:50%; }
.monochrome-shell .composer-assistant { display:inline-flex; align-items:center; gap:6px; min-width:0; max-width:185px; min-height:34px; padding:7px 10px; border:1px solid var(--line); border-radius:9px; background:transparent; color:var(--ink); font-size:12px; white-space:nowrap; }
.monochrome-shell .composer-assistant #active-assistant { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.monochrome-shell .composer-actions { display:flex; align-items:center; gap:8px; min-width:0; flex:0 1 auto; }
.monochrome-shell .composer-model { display:inline-flex; align-items:center; gap:7px; width:auto; max-width:235px; min-width:0; min-height:34px; padding:7px 10px; border:1px solid var(--line); border-radius:9px; background:transparent; color:var(--ink); font-size:12px; }
.monochrome-shell .composer-model span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.monochrome-shell .composer-model>svg { flex-shrink:0; width:14px; height:14px; color:var(--muted); }
.monochrome-shell .composer-assistant:hover,.monochrome-shell .composer-model:hover { background:var(--hover); border-color:var(--line-strong); }




.monochrome-shell .composer-meta { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:5px 10px; padding:8px 2px 7px; font-size:10px; color:var(--muted); }
.monochrome-shell .composer-hint,.monochrome-shell .composer-count,.monochrome-shell #draft-status { font-size:10px; color:var(--muted); }
.monochrome-shell .composer-disclaimer { margin:0 0 10px; font-size:10px; line-height:1.5; color:var(--muted); }
.monochrome-shell .chat-welcome { width:100%; max-width:760px; margin:auto; padding:38px 0; text-align:center; }
.monochrome-shell .welcome-kicker { font-size:12px; letter-spacing:.3px; color:var(--muted); margin-bottom:18px; }
.monochrome-shell .welcome-kicker .welcome-symbol { color:var(--ink); }
.monochrome-shell .chat-welcome h1 { font-size:29px; line-height:1.5; letter-spacing:-.7px; margin-bottom:10px; font-weight:600; }
.monochrome-shell .chat-welcome>p { font-size:14px; line-height:1.8; color:var(--muted); margin-bottom:28px; }
.monochrome-shell .assistant-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; }
.monochrome-shell .assistant-card { min-height:124px; padding:16px 14px; gap:8px; border:1px solid var(--line); border-radius:11px; background:var(--paper); box-shadow:none; transition:background .15s,border-color .15s; }
.monochrome-shell .assistant-card:hover { transform:none; box-shadow:none; background:var(--hover); border-color:var(--line-strong); }
.monochrome-shell .assistant-card.selected,.monochrome-shell .assistant-card.active { border-color:var(--line-strong); background:var(--hover); }
.monochrome-shell .assistant-card strong { font-size:13px; }
.monochrome-shell .assistant-card small,.monochrome-shell .assistant-card>span:not(.assistant-icon):not(.starter-icon):not(.assistant-card-icon) { font-size:11px; line-height:1.7; color:var(--muted); }
.monochrome-shell .assistant-card .assistant-card-icon { width:28px; height:28px; border:0; background:transparent; color:var(--ink); }
.monochrome-shell .quick-prompts { gap:7px; margin-top:18px; }
.monochrome-shell .quick-prompts button { font-size:11px; padding:7px 11px; border-color:var(--line); border-radius:8px; color:var(--muted); }
.monochrome-shell button:focus-visible,.monochrome-shell a:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }

@media(min-width:1600px) {
  .monochrome-shell { --reading-width:900px; }
}
@media(min-width:761px) and (max-width:1100px) {
  .monochrome-shell .workspace-header { padding:0 18px; }
  .monochrome-shell .conversation-status { display:none; }
  .monochrome-shell .chat-scroll { padding-left:24px; padding-right:24px; }
  .monochrome-shell .composer-zone { padding-left:24px; padding-right:24px; }
  .monochrome-shell .assistant-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .monochrome-shell .composer-model { max-width:160px; }
  .monochrome-shell .composer-assistant { max-width:135px; }
}
@media(max-width:760px) {
  .monochrome-shell,.monochrome-shell.sidebar-collapsed { display:block; --topbar-height:56px; }
  .monochrome-shell .workspace-sidebar,.monochrome-shell.sidebar-collapsed .workspace-sidebar { display:none; width:min(280px,85vw); z-index:60; }
  .monochrome-shell.menu-open .workspace-sidebar { display:flex; transform:none; box-shadow:12px 0 40px var(--shadow-color); }
  .monochrome-shell.menu-open .sidebar-scrim { display:block; position:fixed; inset:0; width:100%; height:100%; border:0; background:var(--overlay); z-index:50; }
  .monochrome-shell .workspace-header { height:var(--topbar-height); padding:0 12px; gap:8px; }
  .workspace-heading { gap:6px; }
  .workspace-heading h1 { font-size:13px; }
  .monochrome-shell .conversation-status { display:none; }
  .monochrome-shell .topbar-actions { gap:4px; }
  .monochrome-shell .topbar-actions .btn { min-width:32px; min-height:34px; padding:7px; }
  .monochrome-shell .topbar-actions .theme-trigger { min-width:34px; min-height:34px; padding:7px; gap:0; }
  .monochrome-shell .topbar-actions .theme-trigger [data-theme-icon] { display:flex; }
  .monochrome-shell .topbar-actions .theme-trigger [data-theme-label],.monochrome-shell .topbar-actions .theme-trigger>svg { display:none; }
  .monochrome-shell .chat-scroll { padding:14px 16px 8px; }
  .monochrome-shell .message { margin:12px auto 18px; gap:10px; }
  .monochrome-shell .message.assistant { grid-template-columns:28px minmax(0,1fr); }
  .monochrome-shell .message-avatar { width:28px; height:28px; }
  .monochrome-shell .message .markdown { font-size:16px; line-height:1.8; }
  .monochrome-shell .message-name { font-size:11px; margin-bottom:9px; }
  .monochrome-shell .message-name small { display:block; margin-left:0; font-size:10px; }
  .monochrome-shell .message.user .message-body { max-width:90%; }
  .monochrome-shell .message.user .markdown { padding:10px 13px; }
  .monochrome-shell .markdown h1 { font-size:23px; }
  .monochrome-shell .markdown h2 { font-size:21px; }
  .monochrome-shell .markdown h3 { font-size:18px; }
  .monochrome-shell .composer-zone { padding:9px 12px 0; padding-bottom:env(safe-area-inset-bottom,0px); }
  .monochrome-shell .composer { padding:12px; border-radius:14px; }
  .monochrome-shell .composer textarea { min-height:56px; font-size:16px; }
  .monochrome-shell .composer-bottom { display:flex; flex-wrap:wrap; gap:8px; }
  .monochrome-shell .composer-tools { flex:0 1 auto; gap:3px; }
  .monochrome-shell .composer-tools .icon-btn { width:31px; height:34px; }
  .monochrome-shell .composer-assistant { max-width:116px; padding:6px 7px; font-size:11px; gap:4px; }
  .monochrome-shell .composer-assistant>svg { width:14px; height:14px; }
  .monochrome-shell .composer-actions { flex:1 1 auto; justify-content:flex-end; margin-left:auto; gap:5px; max-width:100%; }
  .monochrome-shell .composer-model { max-width:150px; padding:6px 7px; font-size:11px; gap:4px; }

  .monochrome-shell .composer-meta { padding:7px 2px 6px; gap:4px 8px; }
  .monochrome-shell .composer-hint { font-size:9px; }
  .monochrome-shell .composer-count { display:none; }
  .monochrome-shell .composer-disclaimer { font-size:9px; margin-bottom:8px; }
  .monochrome-shell .chat-welcome { padding:22px 0; max-width:520px; }
  .monochrome-shell .welcome-kicker { font-size:11px; margin-bottom:14px; }
  .monochrome-shell .chat-welcome h1 { font-size:24px; }
  .monochrome-shell .chat-welcome>p { font-size:13px; margin-bottom:22px; max-width:none; }
  .monochrome-shell .assistant-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .monochrome-shell .assistant-card { min-height:115px; padding:13px; gap:7px; }
  .monochrome-shell .quick-prompts { gap:6px; margin-top:15px; }
  .monochrome-shell .quick-prompts button { padding:7px 9px; font-size:10px; }
}
@media(max-width:420px) {
  .monochrome-shell .composer-bottom { gap:6px; }
  .monochrome-shell .composer-assistant { max-width:94px; }
  .monochrome-shell .composer-model { max-width:130px; }
  .monochrome-shell .composer-assistant>svg { display:none; }
}
/* One sidebar column; its width is the only shell geometry. */
.monochrome-shell{--sidebar-width:272px;grid-template-columns:var(--sidebar-width) minmax(0,1fr)}
.monochrome-shell.sidebar-collapsed{grid-template-columns:minmax(0,1fr)}
.monochrome-shell.sidebar-collapsed .workspace{grid-column:1}
@media(max-width:1120px) and (min-width:761px){.monochrome-shell{--sidebar-width:248px}}
@media(max-width:760px){.monochrome-shell{--sidebar-width:min(304px,88vw);grid-template-columns:minmax(0,1fr)}.monochrome-shell .workspace{grid-column:1}.monochrome-shell .workspace-sidebar,.monochrome-shell.sidebar-collapsed .workspace-sidebar{width:var(--sidebar-width)}}

/* Bound flex descendants by the viewport; rich content owns its local scroll. */
.monochrome-shell :is(.chat-work,.chat-scroll,.message-body,.markdown){min-width:0;max-width:100%}
.monochrome-shell .message{min-width:0}
@media(max-width:760px){
 .monochrome-shell{--topbar-height:52px}
 .monochrome-shell .workspace-header{padding:0 10px}
 .monochrome-shell .chat-scroll{padding:12px 12px 6px}
 .monochrome-shell .message{margin:10px auto 16px;gap:8px}
 .monochrome-shell .message.assistant{grid-template-columns:24px minmax(0,1fr)}
 .monochrome-shell .message-avatar{width:24px;height:24px}
 .monochrome-shell .message .markdown{font-size:15px;line-height:1.7;overflow-wrap:anywhere}
 .monochrome-shell .message-name{font-size:12px;line-height:18px;margin-bottom:6px}
 .monochrome-shell .message.user .markdown{padding:8px 11px;border-radius:11px}
 .monochrome-shell .message-actions{margin-top:8px;gap:4px 8px;font-size:11px;line-height:18px}
 .monochrome-shell .message-actions .text-btn{min-height:32px}
 .monochrome-shell .composer-zone{padding:8px 10px 0;padding-bottom:env(safe-area-inset-bottom,0px)}
 .monochrome-shell .composer{padding:12px 10px 10px;box-shadow:none}
 .monochrome-shell .composer textarea{min-height:36px;font-size:16px;line-height:1.5}
 .monochrome-shell :is(.home-view,.model-chat-view) .composer-bottom{flex-wrap:nowrap;gap:4px;margin-top:8px}
 .monochrome-shell :is(.home-view,.model-chat-view) .composer-tools{flex:none;gap:0}
 .monochrome-shell :is(.home-view,.model-chat-view) :is(.attachment-add,.composer-tools .icon-btn){width:40px;height:44px;min-width:40px;min-height:44px;background:transparent}
 .monochrome-shell :is(.home-view,.model-chat-view) .chat-mode-switch{margin-left:0;padding:2px}
 .monochrome-shell :is(.home-view,.model-chat-view) .chat-mode-switch button{width:32px;height:32px;min-width:32px;min-height:32px;max-width:32px;max-height:32px;padding:0;flex:none;line-height:1}
 .monochrome-shell :is(.home-view,.model-chat-view) .chat-mode-switch button svg{width:16px;height:16px;flex:none}
 .monochrome-shell :is(.home-view,.model-chat-view) .chat-mode-switch button span{display:none}
 .monochrome-shell :is(.home-view,.model-chat-view) .composer-actions{flex:1 1 0;min-width:0;gap:4px}
 .monochrome-shell :is(.home-view,.model-chat-view) .composer-model{flex:1 1 0;min-width:0;max-width:none;min-height:44px;padding:4px;gap:3px;font-size:11px;border-color:transparent}
 .monochrome-shell .composer-model .identity-image{width:16px;height:16px}
 .monochrome-shell .send-btn{flex:0 0 44px;width:44px;height:44px;min-width:44px}
 .monochrome-shell .send-btn svg{width:22px;height:22px}
 .monochrome-shell .composer-hint{display:none}
 .monochrome-shell .composer-meta{justify-content:flex-end;padding:5px 2px 3px;font-size:10px}
 .monochrome-shell .composer-disclaimer{font-size:10px;line-height:16px;margin-bottom:5px}
}
@media(max-width:380px){
 .monochrome-shell :is(.home-view,.model-chat-view) .composer-bottom{flex-wrap:wrap;gap:2px}
 .monochrome-shell :is(.home-view,.model-chat-view) .composer-tools{flex-basis:100%}
 .monochrome-shell :is(.home-view,.model-chat-view) .composer-actions{flex-basis:100%;justify-content:space-between}
 .monochrome-shell :is(.home-view,.model-chat-view) .composer-model{flex:0 1 auto;max-width:calc(100% - 48px);font-size:12px}
}
