:root{
  --bg:#fff;
  --surface:#fff;
  --sidebar:#f9f9f9;
  --hover:#ececec;
  --line:#e3e3e3;
  --line-strong:#d1d1d1;
  --text:#0d0d0d;
  --muted:#6f6f6f;
  --soft:#f4f4f4;
  --accent:#111;
  --danger:#b42318;
  --font:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --aw-chat-column-width:720px;
  --aw-chat-side-padding:24px;
  --aw-bg:var(--bg);
  --aw-surface:var(--surface);
  --aw-surface-strong:#efeff1;
  --aw-text:var(--text);
  --aw-text-muted:var(--muted);
  --aw-border:rgba(23,23,25,.11);
  --aw-code-bg:#111113;
  --aw-accent:#2563eb;
  --aw-danger:var(--danger);
  --aw-radius:14px;
  --aw-shadow-soft:0 8px 30px rgba(0,0,0,.06);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
  -webkit-font-smoothing:antialiased;
}
button,select,textarea,input{font:inherit}
button{cursor:pointer}
code,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.app-shell{
  min-height:100dvh;
  display:flex;
  background:#fff;
  overflow:hidden;
}
.sidebar-backdrop{display:none}
.sidebar{
  width:260px;
  flex:0 0 260px;
  height:100dvh;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:8px;
  background:var(--sidebar);
  color:#202123;
}
.sidebar-top{display:grid;gap:8px}
.sidebar-brand{
  min-height:44px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 8px;
  border-radius:10px;
}
.brand-mark{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:#111;
  color:#fff;
  font-size:12px;
  font-weight:750;
}
.brand-title{font-size:14px;font-weight:650;line-height:1.2}
.brand-subtitle{display:none!important}
.new-chat-btn{
  height:40px;
  display:flex;
  align-items:center;
  gap:8px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#111;
  padding:0 10px;
  font-size:14px;
  font-weight:500;
  text-align:left;
}
.new-chat-btn::before{
  content:"+";
  width:18px;
  display:inline-grid;
  place-items:center;
  color:#111;
  font-size:22px;
  line-height:1;
  font-weight:350;
}
.new-chat-btn:hover,.recent-item:hover,.recent-chat:hover,.sidebar-settings summary:hover{background:var(--hover)}
.sidebar-section{
  min-height:0;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding-top:172px;
}
.sidebar-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px;
}
.sidebar-section-title{
  font-size:12px;
  font-weight:650;
  color:#8a8a8a;
  letter-spacing:0;
  text-transform:none;
}
.sidebar-section-meta{display:none}
.recent-chats{
  display:grid;
  gap:1px;
  min-height:0;
  overflow:auto;
  scrollbar-width:thin;
}
.recent-empty{display:none!important}
.recent-item,.recent-chat{
  min-height:36px;
  width:100%;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#202123;
  padding:8px 10px;
  text-align:left;
}
.recent-title{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:14px;
  font-weight:450;
}
.recent-meta,.recent-group-title{display:none}
.sidebar-footer{
  display:grid;
  gap:4px;
  padding:4px 0;
}
.sidebar-runtime{display:none}
.sidebar-settings summary{
  height:38px;
  display:flex;
  align-items:center;
  border-radius:10px;
  color:#444;
  padding:0 10px;
  list-style:none;
  font-size:14px;
  font-weight:500;
}
.sidebar-settings summary::-webkit-details-marker{display:none}
.sidebar-settings-body{
  display:grid;
  gap:8px;
  padding:8px;
}
.sidebar-field{
  display:grid;
  gap:4px;
  color:var(--muted);
  font-size:12px;
}
.sidebar-field select,.sidebar-field input{
  width:100%;
  min-height:34px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--text);
  padding:0 9px;
}
.sidebar-check{
  min-height:32px;
  display:flex;
  align-items:center;
  gap:8px;
  color:#444;
  font-size:13px;
}
.sidebar-check input{
  width:15px;
  height:15px;
  accent-color:#111;
}
.main-panel{
  min-width:0;
  flex:1;
  width:100%;
  height:100dvh;
  display:flex;
  flex-direction:column;
  position:relative;
  background:#fff;
}
.main-topbar{
  height:56px;
  min-height:56px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 16px;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(12px);
  z-index:12;
}
.sidebar-toggle{
  display:none;
  width:36px;
  height:36px;
  border:0;
  border-radius:10px;
  background:transparent;
  padding:0;
}
.sidebar-toggle:hover{background:var(--hover)}
.sidebar-toggle span{
  display:block;
  width:16px;
  height:2px;
  margin:3px auto;
  border-radius:999px;
  background:#111;
}
.main-headline{min-width:0;flex:1}
.main-title{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#2f2f2f;
  font-size:18px;
  line-height:1.2;
  font-weight:650;
}
.main-subtitle{display:none}
.main-pill,.account-pill{
  border:0;
  background:transparent;
}
.account-pill{
  width:32px;
  height:32px;
  min-width:32px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#111;
  color:#fff;
  font-size:12px;
  font-weight:750;
}
.main-panel:not(:has(#turns .turn)) .account-pill{
  display:none;
}
.debug-toggle{display:none!important}
.transcript{
  width:100%;
  max-width:none;
  flex:1;
  margin:0;
  padding:28px 18px var(--composer-safe-bottom,178px);
  scroll-padding-bottom:var(--composer-safe-bottom,178px);
  overflow:auto;
  scrollbar-width:thin;
}
.empty-state{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  gap:0;
  text-align:center;
}
.is-active-chat .empty-state,
.transcript:has(#turns .turn) .empty-state{display:none}
.empty-logo{display:none!important}
.empty-state h1{
  margin:0;
  color:#2f2f2f;
  font-size:28px;
  line-height:1.2;
  font-weight:650;
  letter-spacing:0;
}
.empty-quick-actions{
  display:none;
}
.empty-quick-actions button{
  min-height:38px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:#444;
  padding:0 14px;
  font-size:13px;
  font-weight:520;
}
.empty-quick-actions button:hover{background:#f7f7f7}
.turns{
  display:grid;
  gap:28px;
  width:100%;
}
.main-panel:has(#turns .turn) .turns,
.main-panel.is-active-chat .turns{
  width:min(var(--aw-chat-column-width),calc(100% - (var(--aw-chat-side-padding) * 2)));
  max-width:var(--aw-chat-column-width);
  margin:0 auto;
}
.turn{
  display:flex;
  flex-direction:column;
  min-width:0;
  width:100%;
}
.turn.user{align-items:flex-end}
.turn.assistant{align-items:stretch}
.turn .bubble{
  max-width:100%;
  color:#0d0d0d;
  font-size:15.5px;
  line-height:1.72;
  overflow-wrap:anywhere;
}
.turn.user .bubble{
  max-width:min(72%,640px);
  padding:10px 16px;
  border-radius:20px;
  background:var(--soft);
  white-space:pre-wrap;
}
.turn.assistant .bubble{
  background:transparent;
  padding:0;
}
.bubble p{margin:0 0 12px}
.bubble p:last-child{margin-bottom:0}
.bubble h1,.bubble h2,.bubble h3,.bubble h4{margin:18px 0 8px;line-height:1.28}
.bubble h1{font-size:1.35rem}
.bubble h2{font-size:1.22rem}
.bubble h3{font-size:1.1rem}
.bubble h4{font-size:1rem}
.bubble ul,.bubble ol{margin:8px 0 14px 1.28rem;padding:0}
.bubble li{margin:5px 0;padding-left:2px}
.bubble blockquote{margin:10px 0 14px;padding:8px 12px;border-left:3px solid var(--line);color:#4f4f4f;background:#fafafa}
.bubble a{color:#0b57d0;text-decoration:none}
.bubble a:hover{text-decoration:underline}
.bubble pre,.code-block{
  overflow:auto;
  border:1px solid var(--aw-border);
  border-radius:12px;
  background:var(--aw-code-bg);
  color:#f8f8f8;
  padding:12px;
}
.bubble code:not(pre code){
  border-radius:5px;
  background:#f1f1f1;
  padding:1px 4px;
  font-size:.94em;
}
.comparison-table-frame{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:10px;
}
.comparison-table-frame table{
  width:100%;
  border-collapse:collapse;
}
.comparison-table-frame th,.comparison-table-frame td{
  border-bottom:1px solid var(--line);
  padding:8px 10px;
  text-align:left;
  vertical-align:top;
}
.assistant-status-line,.compact-status{
  width:max-content;
  max-width:100%;
  margin:0 0 10px;
  color:#4b5563;
  font-size:14px;
  line-height:1.45;
}
.assistant-status-line.is-active{
  display:inline-flex!important;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}
.assistant-status-line.aw-force-visible-status{
  display:flex!important;
  width:auto;
  max-width:100%;
  margin:0 0 .85rem;
  opacity:1!important;
  visibility:visible!important;
}
.assistant-status-line.aw-force-visible-status .assistant-activity-compact{
  flex-basis:100%;
}
.status-dots{
  display:inline-flex;
  align-items:center;
  gap:3px;
  margin-left:1px;
}
.status-dots span{
  width:4px;
  height:4px;
  border-radius:999px;
  background:#7d7d7d;
  animation:chatgptStatusDot 1.2s infinite ease-in-out;
}
.status-dots span:nth-child(2){animation-delay:.16s}
.status-dots span:nth-child(3){animation-delay:.32s}
@keyframes chatgptStatusDot{
  0%,80%,100%{opacity:.28;transform:translateY(0)}
  40%{opacity:1;transform:translateY(-2px)}
}
.message-actions{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:8px;
  color:#676767;
}
.message-action{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#676767;
}
.message-action:hover{background:#f2f2f2}
.message-action.active{
  background:#ececec;
  color:#111;
}
.message-action-source-stack{
  width:auto;
  min-width:34px;
  padding:0 5px;
}
.message-action-source-stack.has-sources{
  min-width:38px;
}
.source-stack-icon{
  display:inline-flex;
  align-items:center;
  min-width:26px;
  height:22px;
}
.source-stack-dot{
  position:relative;
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid #fff;
  border-radius:999px;
  background:#f1f3f4;
  color:#555;
  font-size:10px;
  font-weight:650;
  box-shadow:0 1px 2px rgba(0,0,0,.10);
}
.source-stack-dot + .source-stack-dot{margin-left:-6px}
.source-stack-dot img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:2;
}
.source-stack-letter{z-index:1}
.source-stack-dot.has-image .source-stack-letter,
.inline-citation-dot.has-image .inline-citation-letter,
.aw1-stream-source-logo.has-image .aw1-stream-source-initial{
  display:none;
}
.source-stack-more{
  height:18px;
  min-width:18px;
  display:inline-grid;
  place-items:center;
  margin-left:-4px;
  padding:0 4px;
  border:1px solid #fff;
  border-radius:999px;
  background:#ededed;
  color:#555;
  font-size:10px;
  font-weight:650;
}
.source-action-label{
  margin-left:6px;
  font-size:12px;
  font-weight:560;
  color:#444;
  white-space:nowrap;
}
.message-action-source-stack{
  min-width:34px;
  width:auto;
  padding-inline:7px;
  cursor:pointer;
}
.message-action-source-stack .source-stack-icon{
  min-width:30px;
}
.inline-citation-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:18px;
  margin:0 2px;
  padding:0 3px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:999px;
  background:#f7f7f7;
  color:#333;
  vertical-align:-3px;
}
.inline-citation-chip:hover,
.inline-citation-chip:focus-visible{
  background:#ededed;
  outline:0;
}
.inline-citation-stack{display:inline-flex;align-items:center}
.inline-citation-dot{
  position:relative;
  width:15px;
  height:15px;
  display:inline-grid;
  place-items:center;
  overflow:hidden;
  border:1px solid #fff;
  border-radius:999px;
  background:#eceff3;
  color:#555;
  font-size:8px;
  font-weight:700;
}
.inline-citation-dot + .inline-citation-dot{margin-left:-5px}
.inline-citation-dot img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.inline-citation-letter{z-index:1}
.inline-citation-more,
.inline-citation-fallback{
  min-width:14px;
  height:14px;
  display:inline-grid;
  place-items:center;
  margin-left:-3px;
  padding:0 3px;
  border-radius:999px;
  background:#e9e9e9;
  font-size:8px;
  font-weight:700;
}
.domain-search-icon{
  display:inline-flex;
  align-items:center;
  min-width:22px;
}
.domain-search-dot{
  width:14px;
  height:14px;
  display:inline-grid;
  place-items:center;
  border:1px solid #d1d5db;
  border-radius:999px;
  background:#fff;
  color:#4b5563;
  font-size:8px;
  font-weight:700;
  line-height:1;
}
.domain-search-dot + .domain-search-dot{margin-left:-5px}
.source-status-card,.source-card,.source-confidence-note{
  margin:10px 0;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:#333;
  padding:10px 12px;
  font-size:13px;
  line-height:1.45;
}
.source-status-card{
  width:max-content;
  max-width:100%;
  border:0;
  border-radius:0;
  background:transparent;
  padding:0;
  color:#5f6368;
}
.source-status-card--answer-chips{display:none!important}
.source-status-head{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:22px;
}
.source-status-dot{
  width:7px;
  height:7px;
  border-radius:999px;
  background:#10a37f;
  box-shadow:0 0 0 3px rgba(16,163,127,.12);
}
.source-status-title{
  font-size:13px;
  font-weight:500;
}
.source-status-domain-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin-top:7px;
}
.source-domain-pill{
  height:28px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  max-width:190px;
  padding:3px 10px 3px 4px;
  border:1px solid #e5e5e5;
  border-radius:999px;
  background:#fff;
  color:#333;
  box-shadow:0 1px 1px rgba(0,0,0,.03);
}
.source-domain-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}
.source-chip-logo{
  position:relative;
  width:20px;
  height:20px;
  flex:0 0 20px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:999px;
  background:#f1f3f4;
  color:#555;
  font-size:10px;
  font-weight:650;
}
.source-chip-logo img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.source-chip-logo .source-chip-fallback{display:none}
.source-chip-logo.is-fallback .source-chip-fallback{display:block}
.source-status-chips{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:7px;
}
.source-status-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 7px;
  border-radius:999px;
  background:#f7f7f7;
  color:#6b6f76;
  font-size:11px;
}
.source-status-chip b{
  color:#3f3f46;
  font-weight:600;
}
.source-panel,.debug-panel{
  position:fixed;
  top:56px;
  bottom:92px;
  left:50%;
  width:min(640px,calc(100vw - 28px));
  z-index:40;
  display:none;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 18px 50px rgba(0,0,0,.16);
  transform:translateX(-50%);
  overflow:hidden;
}
.source-panel-open .source-panel[aria-hidden="false"],
.debug-panel-open .debug-panel[aria-hidden="false"]{display:flex}
.source-panel[hidden],.debug-panel[hidden],
.source-panel[aria-hidden="true"],.debug-panel[aria-hidden="true"]{
  display:none!important;
  width:0!important;
  min-width:0!important;
  max-width:0!important;
  flex:0 0 0!important;
  border:0!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
}
.source-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-bottom:1px solid var(--line);
}
.source-panel-title{font-size:14px;font-weight:650}
.source-panel-count{margin-top:2px;color:var(--muted);font-size:12px}
.source-panel-close{
  width:32px;
  height:32px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#444;
  font-size:22px;
}
.source-panel-close:hover{background:var(--hover)}
.source-panel-list,.debug-panel-json{
  overflow:auto;
  padding:12px;
}
.source-panel-section-title{
  margin:2px 0 10px;
  color:#777;
  font-size:12px;
  font-weight:650;
  text-transform:none;
}
.source-item{
  display:flex;
  gap:10px;
  padding:11px;
  margin-bottom:9px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  background:#fff;
}
.source-item--selected,
.source-item--citation-selected,
.source-item--active{
  border-color:rgba(37,99,235,.45);
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}
.source-favicon{
  width:22px;
  height:22px;
  flex:0 0 22px;
  border-radius:6px;
  background:#f2f2f2;
}
.source-item-body{min-width:0;display:grid;gap:6px}
.source-item-title{
  color:#202124;
  font-size:14px;
  font-weight:650;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.source-item-meta{
  display:flex;
  flex-wrap:wrap;
  gap:5px 8px;
  color:#6b7280;
  font-size:12px;
  line-height:1.35;
}
.source-item-meta a{color:#2563eb;text-decoration:none;overflow-wrap:anywhere}
.source-item-status{
  padding:1px 6px;
  border-radius:999px;
  background:#f1f1f1;
  color:#555;
}
.source-item-status--used{background:#eaf7ed;color:#176b35}
.source-item-status--rejected,
.source-item-status--failed{background:#fff1f0;color:#a33b32}
.source-item-snippet,
.source-reject-reason,
.source-citation-row{
  color:#666;
  font-size:12px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.source-key-facts,
.source-passages{
  margin:0;
  padding-left:18px;
  color:#333;
  font-size:13px;
  line-height:1.45;
}
.source-passage{
  margin-top:5px;
  padding-left:8px;
  border-left:2px solid #e5e7eb;
  color:#4b5563;
}
.runtime-panel-card{
  display:grid;
  gap:8px;
}
.runtime-kv{
  display:grid;
  grid-template-columns:minmax(118px,auto) minmax(0,1fr);
  align-items:start;
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid var(--line);
  color:#5f6368;
  font-size:13px;
  line-height:1.4;
}
.runtime-kv:last-child{border-bottom:0}
.runtime-kv b{
  min-width:0;
  color:#1f1f1f;
  font-weight:550;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.runtime-domain-row{
  display:grid;
  grid-template-columns:minmax(78px,auto) minmax(0,1fr);
  align-items:start;
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid var(--line);
  color:#5f6368;
  font-size:13px;
  line-height:1.4;
}
.runtime-domain-row:last-child{border-bottom:0}
.runtime-domain-row > span:first-child{
  color:#1f1f1f;
  font-weight:550;
}
.runtime-domain-chips{
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.runtime-domain-chip{
  max-width:100%;
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 8px 3px 4px;
  border:1px solid #e5e5e5;
  border-radius:999px;
  background:#fff;
  color:#333;
  line-height:1.2;
}
.runtime-domain-logo{
  position:relative;
  width:18px;
  height:18px;
  flex:0 0 18px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:999px;
  background:#f1f3f4;
  color:#555;
  font-size:9px;
  font-weight:650;
}
.runtime-domain-logo img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.runtime-domain-fallback{display:none}
.runtime-domain-logo.is-fallback .runtime-domain-fallback{display:block}
.runtime-domain-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow-wrap:anywhere;
}
.assistant-status-line.is-final{
  display:inline-flex!important;
  align-items:center;
  gap:8px;
  margin:0 0 8px;
}
.assistant-status-line.is-final .status-label{
  border:0;
  background:transparent;
  color:#6f6f6f;
  padding:0;
  font-size:13px;
}
.status-shimmer{
  width:42px;
  height:1px;
  border-radius:999px;
  background:linear-gradient(90deg,transparent,#d0d0d0,transparent);
  animation:statusShimmer 1.8s ease-in-out infinite;
}
@keyframes statusShimmer{
  0%,100%{opacity:.25;transform:scaleX(.72)}
  50%{opacity:1;transform:scaleX(1)}
}
.debug-panel-json{
  margin:0;
  white-space:pre-wrap;
  font-size:12px;
  line-height:1.5;
}
.attachment-strip{
  width:100%;
  max-width:none;
  margin:0 0 8px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.attachment-strip[hidden]{display:none!important}
.file-input{display:none}
.composer-shell{
  position:fixed;
  left:260px;
  right:0;
  bottom:0;
  z-index:16;
  padding:18px 16px 20px;
  background:linear-gradient(180deg,rgba(255,255,255,0),#fff 34%,#fff);
}
.composer{
  width:100%;
  max-width:none;
  min-height:108px;
  margin:0;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
  border:1px solid var(--line-strong);
  border-radius:26px;
  background:#fff;
  padding:12px;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
}
.main-panel:has(#turns .turn) .attachment-strip,
.main-panel.is-active-chat .attachment-strip,
.main-panel:has(#turns .turn) .composer,
.main-panel.is-active-chat .composer,
.main-panel:has(#turns .turn) .composer-disclaimer,
.main-panel.is-active-chat .composer-disclaimer{
  width:min(var(--aw-chat-column-width),calc(100% - (var(--aw-chat-side-padding) * 2)));
  max-width:var(--aw-chat-column-width);
  margin-left:auto;
  margin-right:auto;
}
.composer textarea{
  width:100%;
  min-height:42px;
  max-height:180px;
  resize:none;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  padding:4px 4px 0;
  font-size:16px;
  line-height:1.5;
}
.composer textarea::placeholder{color:#8f8f8f}
.composer-bottom-row{
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.composer-actions{
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
}
.composer-actions-right{flex:0 0 auto}
.composer-model-picker{
  height:34px;
  display:inline-flex;
  align-items:center;
  position:relative;
  flex:0 0 auto;
  border-radius:999px;
}
.composer-model-picker select{
  min-width:112px;
  max-width:152px;
  height:34px;
  border:0;
  border-radius:999px;
  appearance:none;
  background:transparent;
  box-shadow:none;
  color:#2f2f2f;
  cursor:pointer;
  padding:0 30px 0 10px;
  font-size:13px;
  font-weight:650;
  line-height:34px;
}
.composer-model-picker:hover{background:#f2f2f2}
.composer-model-picker::after{
  content:"";
  position:absolute;
  right:12px;
  top:50%;
  width:7px;
  height:7px;
  border-right:1.7px solid #666;
  border-bottom:1.7px solid #666;
  transform:translateY(-62%) rotate(45deg);
  pointer-events:none;
}
.model-profile-meta{
  width:min(860px,calc(100% - 32px));
  margin:8px auto 0;
  color:#6f6f76;
  font-size:12px;
  line-height:1.45;
  text-align:left;
}
.home-prompt-card{
  min-height:46px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:3px;
  text-align:left;
}
.home-prompt-title{
  font-weight:650;
}
.home-prompt-mode{
  color:#6f6f76;
  font-size:11px;
}
.composer .action-btn,.composer #send{
  width:34px;
  min-width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#4f4f4f;
  padding:0;
}
.composer .action-btn:hover{background:#f2f2f2}
.tool-pill{
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#4f4f4f;
  padding:0 11px;
  font-size:13px;
  font-weight:560;
  white-space:nowrap;
}
.tool-pill:hover,.tool-pill.active{
  background:#f2f2f2;
  color:#111;
}
.tool-pill.active{
  box-shadow:inset 0 0 0 1px #d8d8d8;
}
.composer svg{width:18px;height:18px}
.composer #send{
  background:#111;
  color:#fff;
}
.composer #send:disabled{
  background:#d7d7d7;
  color:#fff;
  cursor:default;
}
.composer #send.is-stop{background:#111}
.composer-disclaimer{
  width:100%;
  max-width:none;
  margin:8px 0 0;
  color:#8a8a8a;
  text-align:center;
  font-size:12px;
  line-height:1.35;
}
body.is-empty-chat .main-panel,
.main-panel:not(:has(#turns .turn)){
  justify-content:flex-start;
}
body.is-empty-chat .main-panel .transcript,
.main-panel:not(:has(#turns .turn)) .transcript{
  flex:0 0 auto;
  height:auto;
  min-height:calc(46dvh - 56px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  padding:0 24px 18px;
  overflow:visible;
}
body.is-empty-chat .main-panel .empty-state,
.main-panel:not(:has(#turns .turn)) .empty-state{
  width:min(var(--aw-chat-column-width),100%);
  max-width:var(--aw-chat-column-width);
  margin:0 auto;
}
body.is-empty-chat .main-panel .composer-shell,
.main-panel:not(:has(#turns .turn)) .composer-shell{
  position:static;
  left:auto;
  right:auto;
  bottom:auto;
  z-index:1;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:0 24px 0;
  background:transparent;
}
body.is-empty-chat .main-panel .composer,
.main-panel:not(:has(#turns .turn)) .composer{
  width:min(var(--aw-chat-column-width),100%);
  min-height:104px;
  border-radius:28px;
  box-shadow:0 2px 14px rgba(0,0,0,.08);
}
body.is-empty-chat .main-panel .attachment-strip,
.main-panel:not(:has(#turns .turn)) .attachment-strip{
  width:min(var(--aw-chat-column-width),100%);
}
body.is-empty-chat .main-panel .empty-quick-actions,
.main-panel:not(:has(#turns .turn)) .empty-quick-actions{
  width:min(var(--aw-chat-column-width),100%);
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
body.is-empty-chat .main-panel .composer-disclaimer,
.main-panel:not(:has(#turns .turn)) .composer-disclaimer{
  width:min(var(--aw-chat-column-width),100%);
  margin-top:12px;
}
.main-panel:has(#turns .turn) .empty-quick-actions,
.main-panel.is-active-chat .empty-quick-actions{
  display:none!important;
}
.media-results,.artifact-file-frame,.aw-file-card{
  margin:12px 0;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.media-card{margin:0}
.media-card img,.media-card video,.aw-artifact-image,.aw-artifact-video{
  display:block;
  max-width:100%;
  height:auto;
}
.workspace-panels,.workspace-panels-shell,[data-workspace-panels]{
  display:none!important;
}
@media (max-width:900px){
  body.sidebar-open{overflow:hidden}
  .sidebar{
    position:fixed;
    inset:0 auto 0 0;
    z-index:30;
    transform:translateX(-100%);
    transition:transform .2s ease;
    box-shadow:18px 0 40px rgba(15,23,42,.18);
  }
  body.sidebar-open .sidebar{transform:translateX(0)}
  .sidebar-backdrop{
    position:fixed;
    inset:0;
    z-index:24;
    display:block;
    background:rgba(0,0,0,.22);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
  }
  body.sidebar-open .sidebar-backdrop{
    opacity:1;
    pointer-events:auto;
  }
  .sidebar-toggle{display:block}
  .main-topbar{padding:0 12px}
  .composer-shell{left:0}
  .transcript{padding:20px 14px var(--composer-safe-bottom,154px)}
  .main-panel:has(#turns .turn) .turns,
  .main-panel.is-active-chat .turns,
  .main-panel:has(#turns .turn) .attachment-strip,
  .main-panel.is-active-chat .attachment-strip,
  .main-panel:has(#turns .turn) .composer,
  .main-panel.is-active-chat .composer,
  .main-panel:has(#turns .turn) .composer-disclaimer,
  .main-panel.is-active-chat .composer-disclaimer{
    width:calc(100% - 20px);
    max-width:none;
  }
  .turn.user .bubble{max-width:86%}
  body.is-empty-chat .main-panel .transcript,
  .main-panel:not(:has(#turns .turn)) .transcript{
    min-height:calc(45dvh - 56px);
    padding:0 14px 16px;
  }
  body.is-empty-chat .main-panel .composer-shell,
  .main-panel:not(:has(#turns .turn)) .composer-shell{
    padding:0 14px;
  }
}
@media (max-width:640px){
  .main-title{font-size:17px}
  .empty-state h1{font-size:24px}
  .composer-shell{padding:12px 10px}
  .composer{min-height:102px;border-radius:24px;padding:10px}
  .composer textarea{min-height:40px;font-size:16px}
  .composer-model-picker select{min-width:98px;max-width:136px;font-size:12px}
  .model-profile-meta{width:calc(100% - 20px);font-size:11px;margin-top:6px}
  .empty-quick-actions{overflow-x:auto;justify-content:flex-start;padding-bottom:2px}
  .home-prompt-card{min-width:156px;max-width:210px}
  .tool-pill{height:32px;padding:0 9px;font-size:12px}
  .composer .tool-pill[data-profile]{display:none}
  .composer .action-btn,.composer #send{width:32px;min-width:32px;height:32px}
  .composer-disclaimer{margin-top:6px;font-size:11px}
  body.is-empty-chat .main-panel .transcript,
  .main-panel:not(:has(#turns .turn)) .transcript{
    min-height:calc(43dvh - 56px);
    padding-bottom:14px;
  }
  body.is-empty-chat .main-panel .composer,
  .main-panel:not(:has(#turns .turn)) .composer{
    min-height:102px;
    width:100%;
  }
  body.is-empty-chat .main-panel .empty-quick-actions,
  .main-panel:not(:has(#turns .turn)) .empty-quick-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .empty-quick-actions button{
    min-height:40px;
    padding:0 10px;
  }
  .source-panel,.debug-panel{
    top:54px;
    right:10px;
    bottom:88px;
    left:10px;
    width:auto;
    transform:none;
    border-radius:16px;
  }
}

html[data-aw1-stream-ui-candidate] body{
  background:#07090f;
}
html[data-aw1-stream-ui-candidate] .app-shell,
html[data-aw1-stream-ui-candidate] .chat-shell,
html[data-aw1-stream-ui-candidate] .transcript{
  color-scheme:dark;
}
html[data-aw1-stream-ui-candidate] .assistant-stage,
html[data-aw1-stream-ui-candidate] .aw1-multilayer-sse-v2-activity,
html[data-aw1-stream-ui-candidate] [data-aw1-stream-activity]{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html[data-aw1-stream-ui-candidate] [data-aw1-stream-state="RUNNING"] .success-icon,
html[data-aw1-stream-ui-candidate] [data-aw1-stream-state="STREAMING_ACTIVITY"] .success-icon,
html[data-aw1-stream-ui-candidate] [data-aw1-stream-state="STREAMING_ACTIVITY_AND_ANSWER"] .success-icon{
  display:none!important;
}
html[data-aw1-stream-ui-candidate] .stream-stop-button,
html[data-aw1-stream-ui-candidate] #send.is-stop,
html[data-aw1-stream-ui-candidate] [data-aw1-stop-button]{
  min-width:44px;
  min-height:44px;
  border-radius:999px;
  background:#fff;
  color:#020617;
  border:1px solid rgba(255,255,255,.78);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
html[data-aw1-stream-ui-candidate] .stream-stop-button::before,
html[data-aw1-stream-ui-candidate] #send.is-stop::before,
html[data-aw1-stream-ui-candidate] [data-aw1-stop-button]::before{
  content:"";
  width:14px;
  height:14px;
  border-radius:3px;
  background:#020617;
  display:block;
}
html[data-aw1-stream-ui-candidate] .composer-shell{
  padding-bottom:max(env(safe-area-inset-bottom), 10px);
}
@media (max-width:640px){
  html[data-aw1-stream-ui-candidate] .turns,
  html[data-aw1-stream-ui-candidate] #turns{
    padding-inline:10px;
  }
  html[data-aw1-stream-ui-candidate] .assistant-bubble,
  html[data-aw1-stream-ui-candidate] .user-bubble{
    max-width:min(100%, 680px);
    overflow-wrap:anywhere;
  }
  html[data-aw1-stream-ui-candidate] .attachment-chip{
    max-width:min(92vw, 260px);
  }
  html[data-aw1-stream-ui-candidate] .attachment-name,
  html[data-aw1-stream-ui-candidate] .attachment-chip-title{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    display:block;
  }
}

/* AW1 responsive shell refresh, v279. Presentation-only: model/API/SSE contracts remain unchanged. */
:root{
  --aw-shell-sidebar:264px;
  --aw-shell-header:54px;
  --aw-shell-content:820px;
  --aw-shell-composer:780px;
  --aw-shell-gap:16px;
  --aw-shell-radius:26px;
  --aw-shell-border:rgba(17,24,39,.12);
  --aw-shell-shadow:0 12px 32px rgba(15,23,42,.10);
  --aw-shell-muted:#6b7280;
  --aw-shell-chip:#f7f7f8;
}
html,body{
  min-height:100%;
  overflow:hidden;
}
.app-shell{
  min-height:100dvh;
  height:100dvh;
  overflow:hidden;
  background:#fff;
}
.sidebar{
  width:var(--aw-shell-sidebar);
  flex-basis:var(--aw-shell-sidebar);
  padding:10px;
  border-right:1px solid var(--aw-shell-border);
  background:#f7f7f8;
}
.sidebar-brand{
  min-height:46px;
  padding:7px 8px;
}
.brand-mark{
  width:30px;
  height:30px;
  border-radius:9px;
}
.brand-title{
  font-size:14px;
  letter-spacing:0;
}
.new-chat-btn{
  height:42px;
  border-radius:12px;
  padding:0 11px;
}
.sidebar-section{
  padding-top:8px;
  overflow:hidden;
}
.sidebar-section-head{
  padding:7px 8px 5px;
}
.recent-chats{
  padding-right:2px;
}
.recent-chats::-webkit-scrollbar,
.transcript::-webkit-scrollbar{
  width:8px;
}
.recent-chats::-webkit-scrollbar-thumb,
.transcript::-webkit-scrollbar-thumb{
  background:rgba(17,24,39,.18);
  border-radius:999px;
}
.sidebar-footer{
  border-top:1px solid rgba(17,24,39,.08);
  padding-top:8px;
}
.main-panel{
  height:100dvh;
  min-height:0;
  overflow:hidden;
}
.main-topbar{
  height:var(--aw-shell-header);
  min-height:var(--aw-shell-header);
  padding:0 18px;
  border-bottom:1px solid rgba(17,24,39,.06);
}
.main-title{
  font-size:17px;
  font-weight:620;
}
.transcript{
  min-height:0;
  flex:1 1 auto;
  padding:24px 18px calc(var(--composer-safe-bottom,178px) + 22px);
}
.main-panel:has(#turns .turn) .turns,
.main-panel.is-active-chat .turns{
  width:min(var(--aw-shell-content),calc(100% - 48px));
  max-width:var(--aw-shell-content);
}
body.is-empty-chat .main-panel,
.main-panel:not(:has(#turns .turn)){
  display:grid;
  grid-template-rows:var(--aw-shell-header) minmax(116px,34dvh) auto 1fr;
}
body.is-empty-chat .main-panel .transcript,
.main-panel:not(:has(#turns .turn)) .transcript{
  grid-row:2;
  min-height:0;
  height:auto;
  justify-content:end;
  padding:0 24px 18px;
}
body.is-empty-chat .main-panel .empty-state,
.main-panel:not(:has(#turns .turn)) .empty-state{
  width:min(var(--aw-shell-composer),100%);
}
.empty-state h1{
  font-size:31px;
  font-weight:620;
  letter-spacing:-.01em;
}
.composer-shell{
  left:var(--aw-shell-sidebar);
  padding:18px 18px calc(18px + env(safe-area-inset-bottom));
  background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.96) 34%,#fff 72%);
}
body.is-empty-chat .main-panel .composer-shell,
.main-panel:not(:has(#turns .turn)) .composer-shell{
  grid-row:3;
  padding:0 24px;
}
.composer,
body.is-empty-chat .main-panel .composer,
.main-panel:not(:has(#turns .turn)) .composer{
  width:min(var(--aw-shell-composer),100%);
  max-width:var(--aw-shell-composer);
  min-height:112px;
  border:1px solid var(--aw-shell-border);
  border-radius:28px;
  padding:13px;
  box-shadow:var(--aw-shell-shadow);
}
.main-panel:has(#turns .turn) .composer,
.main-panel.is-active-chat .composer,
.main-panel:has(#turns .turn) .attachment-strip,
.main-panel.is-active-chat .attachment-strip,
.main-panel:has(#turns .turn) .composer-disclaimer,
.main-panel.is-active-chat .composer-disclaimer{
  width:min(var(--aw-shell-composer),calc(100% - 48px));
  max-width:var(--aw-shell-composer);
}
.composer textarea{
  min-height:44px;
  max-height:min(190px,34dvh);
  padding:4px 6px 0;
}
.composer-bottom-row{
  min-height:38px;
  align-items:center;
}
.composer-actions{
  align-items:center;
  gap:7px;
}
.composer-actions:first-child{
  flex:1 1 auto;
}
.aw-native-mode-select{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}
.composer-model-picker{
  position:relative;
  height:36px;
}
.composer-model-picker::after,
.composer-model-picker select{
  display:none!important;
}
.mode-menu-button{
  height:36px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#2f2f2f;
  padding:0 10px;
  font-size:13px;
  font-weight:640;
  white-space:nowrap;
}
.mode-menu-button:hover,
.mode-menu-button[aria-expanded="true"]{
  background:#f1f1f2;
}
.mode-menu-button svg{
  width:16px;
  height:16px;
}
.mode-menu{
  position:absolute;
  left:0;
  bottom:44px;
  z-index:70;
  width:min(310px,calc(100vw - 28px));
  padding:7px;
  border:1px solid var(--aw-shell-border);
  border-radius:16px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.18);
}
.mode-menu[hidden]{
  display:none!important;
}
.mode-menu button{
  position:relative;
  width:100%;
  min-height:58px;
  display:grid;
  gap:2px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:#111827;
  padding:9px 34px 9px 10px;
  text-align:left;
}
.mode-menu button:hover,
.mode-menu button:focus-visible{
  background:#f5f5f6;
  outline:0;
}
.mode-menu button[aria-checked="true"]::after{
  content:"✓";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  color:#111827;
  font-weight:700;
}
.mode-menu span{
  font-size:13.5px;
  font-weight:650;
}
.mode-menu small{
  color:var(--aw-shell-muted);
  font-size:12px;
  line-height:1.35;
}
.tool-pill,
.composer .action-btn,
.composer #send{
  height:36px;
  min-height:36px;
}
.composer .action-btn,
.composer #send{
  width:36px;
  min-width:36px;
}
.tool-pill{
  padding:0 12px;
}
body.is-empty-chat .main-panel .empty-quick-actions,
.main-panel:not(:has(#turns .turn)) .empty-quick-actions{
  width:min(var(--aw-shell-composer),100%);
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}
.home-prompt-card,
.empty-quick-actions button{
  min-height:58px;
  border-radius:16px;
  padding:11px 12px;
  align-items:flex-start;
  justify-content:flex-start;
  border:1px solid rgba(17,24,39,.10);
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.home-prompt-title{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  font-size:13.5px;
  line-height:1.32;
  width:100%;
}
.home-prompt-mode{
  display:none!important;
}
.composer-disclaimer,
.model-profile-meta{
  width:min(var(--aw-shell-composer),calc(100% - 48px));
  max-width:var(--aw-shell-composer);
  font-size:11.5px;
  line-height:1.45;
  color:#73737c;
  text-align:center;
}
body.is-empty-chat .main-panel .composer-disclaimer,
.main-panel:not(:has(#turns .turn)) .composer-disclaimer{
  width:min(var(--aw-shell-composer),100%);
  margin-top:11px;
}
button:focus-visible,
.recent-item:focus-visible,
.recent-chat:focus-visible{
  outline:2px solid #2563eb;
  outline-offset:2px;
}
@media (min-width:901px){
  .sidebar{
    transform:none!important;
  }
  .sidebar-backdrop{
    display:none!important;
  }
}
@media (max-width:900px){
  :root{
    --aw-shell-sidebar:286px;
    --aw-shell-header:52px;
    --aw-shell-composer:760px;
  }
  html,body{
    overflow:hidden;
  }
  .main-topbar{
    height:var(--aw-shell-header);
    min-height:var(--aw-shell-header);
    padding:0 12px;
  }
  .sidebar{
    width:min(86vw,318px);
    max-width:318px;
    z-index:80;
    border-right:1px solid var(--aw-shell-border);
  }
  body.sidebar-open{
    overflow:hidden;
  }
  body.sidebar-open .sidebar-backdrop{
    z-index:70;
  }
  .composer-shell{
    left:0;
    padding:12px 12px calc(12px + env(safe-area-inset-bottom));
  }
  .main-panel:has(#turns .turn) .turns,
  .main-panel.is-active-chat .turns,
  .main-panel:has(#turns .turn) .composer,
  .main-panel.is-active-chat .composer,
  .main-panel:has(#turns .turn) .attachment-strip,
  .main-panel.is-active-chat .attachment-strip,
  .main-panel:has(#turns .turn) .composer-disclaimer,
  .main-panel.is-active-chat .composer-disclaimer{
    width:calc(100% - 24px);
    max-width:none;
  }
  body.is-empty-chat .main-panel,
  .main-panel:not(:has(#turns .turn)){
    grid-template-rows:var(--aw-shell-header) minmax(92px,30dvh) auto 1fr;
  }
  body.is-empty-chat .main-panel .transcript,
  .main-panel:not(:has(#turns .turn)) .transcript{
    padding:0 14px 14px;
  }
  body.is-empty-chat .main-panel .composer-shell,
  .main-panel:not(:has(#turns .turn)) .composer-shell{
    padding:0 12px;
  }
  .empty-state h1{
    font-size:26px;
  }
  body.is-empty-chat .main-panel .empty-quick-actions,
  .main-panel:not(:has(#turns .turn)) .empty-quick-actions{
    width:100%;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
}
@media (max-width:640px){
  .main-title{
    font-size:16px;
  }
  .account-pill{
    width:30px;
    height:30px;
    min-width:30px;
  }
  .composer,
  body.is-empty-chat .main-panel .composer,
  .main-panel:not(:has(#turns .turn)) .composer{
    min-height:104px;
    border-radius:24px;
    padding:10px;
  }
  .composer-bottom-row{
    gap:8px;
  }
  .composer-actions:first-child{
    overflow-x:auto;
    scrollbar-width:none;
    padding-bottom:1px;
  }
  .composer-actions:first-child::-webkit-scrollbar{
    display:none;
  }
  .mode-menu-button,
  .tool-pill{
    height:34px;
    min-height:34px;
  }
  .tool-pill span{
    max-width:84px;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .mode-menu{
    position:fixed;
    left:12px;
    right:12px;
    bottom:calc(82px + env(safe-area-inset-bottom));
    width:auto;
    border-radius:18px;
  }
  .home-prompt-card,
  .empty-quick-actions button{
    min-height:62px;
    padding:10px;
  }
  .turn.user .bubble{
    max-width:92%;
  }
}
@media (max-width:374px){
  body.is-empty-chat .main-panel .empty-quick-actions,
  .main-panel:not(:has(#turns .turn)) .empty-quick-actions{
    grid-template-columns:1fr;
  }
  .tool-pill{
    padding:0 10px;
  }
}
@media (prefers-reduced-motion:reduce){
  .sidebar,
  .sidebar-backdrop,
  .mode-menu{
    transition:none!important;
    animation:none!important;
  }
}

/* AW1 layered stream UI: execution narrative is presentation-only and
   separate from the markdown answer. Rows are rendered from backend SSE
   operations, never from a frontend timer. */
.aw1-layered-stream{
  margin:0 0 .9rem;
  color:var(--aw-text-muted);
  font-size:13px;
  line-height:1.45;
}
.aw1-layered-stream summary,
.aw1-layered-summary-button{
  display:inline-flex;
  align-items:center;
  gap:7px;
  cursor:pointer;
  color:#4b5563;
  list-style:none;
  user-select:none;
  font:inherit;
  border:0;
  background:transparent;
}
.aw1-layered-stream summary::-webkit-details-marker{display:none}
.aw1-layered-stream summary::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#2563eb;
  box-shadow:0 0 0 4px color-mix(in srgb,#2563eb 13%,transparent);
}
.aw1-layered-stream.is-collapsed summary::before{
  background:#22a06b;
  box-shadow:none;
}
.aw1-layered-stream-body{
  display:grid;
  gap:8px;
  margin-top:8px;
  max-width:min(760px,100%);
}
.aw1-stream-orientation,
.aw1-stream-plan,
.aw1-stream-progress,
.aw1-stream-verification{
  padding:0;
  background:transparent;
  border:0;
}
.aw1-stream-layer-title{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  color:#374151;
  font-weight:560;
}
.aw1-stream-layer-title span{
  width:16px;
  flex:0 0 16px;
  text-align:center;
  color:#2563eb;
}
.aw1-stream-layer-summary{
  margin:2px 0 0 24px;
  color:#6b7280;
}
.aw1-stream-plan ul{
  margin:4px 0 0 42px;
  padding:0;
}
.aw1-stream-progress-list{
  display:grid;
  gap:5px;
  margin-top:5px;
}
.aw1-stream-item{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
}
.aw1-stream-item-icon{
  width:16px;
  flex:0 0 16px;
  color:#2563eb;
  text-align:center;
}
.aw1-stream-item.is-completed .aw1-stream-item-icon{
  color:#22a06b;
}
.aw1-stream-item.is-failed .aw1-stream-item-icon,
.aw1-stream-item.is-rejected .aw1-stream-item-icon{
  color:#b45309;
}
.aw1-stream-item-main{
  display:grid;
  min-width:0;
}
.aw1-stream-item-title{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.aw1-stream-item-meta{
  color:#8a8f98;
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media (prefers-reduced-motion:reduce){
  .aw1-layered-stream summary::before{
    box-shadow:none;
  }
}
@media (max-width:640px){
  .aw1-layered-stream{
    font-size:12.5px;
  }
  .aw1-stream-layer-summary{
    margin-left:22px;
  }
  .aw1-stream-item-title{
    white-space:normal;
  }
}

/* ChatGPT-style content polish: keep this as a narrow presentation layer so
   streaming, SSE reconciliation, and source contracts remain untouched. */
:root{
  --aw-chat-column-width:768px;
  --aw-prose-size:16px;
  --aw-prose-line:1.72;
  --aw-code-bg:#0d0d0d;
  --aw-table-head:#f7f7f7;
}
.main-panel:has(#turns .turn) .turns,
.main-panel.is-active-chat .turns{
  gap:30px;
}
.turn.assistant .bubble{
  max-width:100%;
  color:#0d0d0d;
  font-size:var(--aw-prose-size);
  line-height:var(--aw-prose-line);
  word-break:normal;
  overflow-wrap:break-word;
}
.turn.assistant .bubble.answer-compact{
  max-width:min(760px,100%);
  font-size:15.5px;
  line-height:1.58;
}
.turn.assistant .bubble.answer-structured{
  line-height:1.7;
}
.turn.assistant .bubble.answer-source-rich{
  border-left:0;
  padding-left:0;
}
.turn.assistant .bubble.answer-table-rich,
.turn.assistant .bubble.answer-code-rich,
.turn.assistant .bubble.answer-media-rich{
  max-width:100%;
}
.turn.assistant .bubble.answer-list-rich li{
  margin:.42em 0;
}
.turn.assistant .bubble.answer-heading-heavy h2,
.turn.assistant .bubble.answer-heading-heavy h3{
  margin-top:1.05em;
}
.turn.assistant .bubble.answer-heading-heavy h2 + p,
.turn.assistant .bubble.answer-heading-heavy h3 + p{
  margin-top:.2em;
}
.turn.user .bubble{
  border-radius:18px;
  background:#f4f4f4;
  line-height:1.55;
}
.bubble > *:first-child{margin-top:0!important}
.bubble > *:last-child{margin-bottom:0!important}
.bubble p{
  margin:0 0 1em;
}
.bubble h1,.bubble h2,.bubble h3,.bubble h4{
  color:#0d0d0d;
  letter-spacing:0;
  font-weight:700;
}
.bubble h1{
  margin:1.45em 0 .62em;
  font-size:1.55rem;
  line-height:1.22;
}
.bubble h2{
  margin:1.35em 0 .58em;
  font-size:1.32rem;
  line-height:1.26;
}
.bubble h3{
  margin:1.2em 0 .48em;
  font-size:1.12rem;
  line-height:1.32;
}
.bubble h4{
  margin:1.05em 0 .42em;
  font-size:1rem;
  line-height:1.36;
}
.bubble strong{font-weight:700}
.bubble em{font-style:italic}
.bubble ul,.bubble ol{
  margin:.45em 0 1em 1.35rem;
  padding:0;
}
.bubble ol{list-style-position:outside}
.bubble li{
  margin:.32em 0;
  padding-left:.12rem;
}
.bubble li > p{margin:.35em 0}
.bubble li > ul,.bubble li > ol{
  margin:.28em 0 .45em 1.15rem;
}
.bubble blockquote{
  margin:1em 0;
  padding:.72em 1em;
  border-left:3px solid #d9d9d9;
  border-radius:0 8px 8px 0;
  background:#fafafa;
  color:#444;
}
.bubble hr{
  height:1px;
  margin:1.35em 0;
  border:0;
  background:#e5e5e5;
}
.bubble a{
  color:#0b57d0;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.bubble code:not(pre code){
  border:1px solid var(--aw-border);
  border-radius:6px;
  background:var(--aw-surface);
  color:var(--aw-text);
  padding:.08em .34em;
  font-size:.92em;
  white-space:break-spaces;
}
.bubble pre,.code-block{
  position:relative;
  margin:1em 0;
  border:1px solid var(--aw-border);
  border-radius:12px;
  background:var(--aw-code-bg);
  color:#f8f8f8;
  line-height:1.58;
  box-shadow:none;
}
.bubble > pre{
  padding:14px 16px;
  overflow:auto;
}
.code-block{
  overflow:hidden;
  padding:0;
}
.code-block .code-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:38px;
  border-bottom:1px solid var(--aw-border);
  background:var(--aw-surface);
  color:var(--aw-text);
  padding:8px 12px;
  font-size:12px;
  font-weight:650;
}
.code-block .code-head button{
  border:1px solid var(--aw-border);
  border-radius:8px;
  background:#fff;
  color:var(--aw-text);
  padding:5px 10px;
  font-size:12px;
  font-weight:650;
  cursor:pointer;
}
.code-block .code-head button:hover,
.code-block .code-head button.active{
  background:#111;
  border-color:#111;
  color:#fff;
}
.code-block pre{
  margin:0;
  border:0;
  border-radius:0;
  background:var(--aw-code-bg);
  color:#f8f8f8;
  padding:14px 16px;
  overflow:auto;
  box-shadow:none;
}
.bubble pre code,.code-block code{
  display:block;
  min-width:max-content;
  color:#111;
  background:transparent;
  font-size:13.5px;
  white-space:pre;
  tab-size:2;
}
.bubble table{
  width:100%;
  min-width:560px;
  border-collapse:separate;
  border-spacing:0;
  font-size:14px;
  line-height:1.45;
}
.bubble table th,
.bubble table td{
  border-right:1px solid #e6e6e6;
  border-bottom:1px solid #e6e6e6;
  padding:10px 12px;
  text-align:left;
  vertical-align:top;
}
.bubble table th:first-child,
.bubble table td:first-child{border-left:1px solid #e6e6e6}
.bubble table th{
  border-top:1px solid #e6e6e6;
  background:var(--aw-table-head);
  color:#202020;
  font-weight:650;
}
.bubble table th:first-child{border-top-left-radius:10px}
.bubble table th:last-child{border-top-right-radius:10px}
.bubble table tr:last-child td:first-child{border-bottom-left-radius:10px}
.bubble table tr:last-child td:last-child{border-bottom-right-radius:10px}
.comparison-table-frame,
.bubble .table-wrapper,
.bubble:has(table){
  max-width:100%;
}
.comparison-table-frame{
  margin:1em 0;
  border:0;
  border-radius:10px;
  overflow:auto;
}
.bubble img,
.bubble video{
  max-width:100%;
  border-radius:10px;
}
.answer-compact .content-stream{
  display:block;
}
.answer-compact p{
  margin-bottom:.72em;
}
.answer-source-rich .source-status-card,
.answer-source-rich .source-confidence-note{
  margin-top:12px;
}
.answer-table-rich .comparison-table-frame,
.answer-table-rich .table-wrapper{
  margin:1.15em 0;
}
.answer-code-rich .code-block,
.answer-code-rich pre{
  margin:1.15em 0;
}
.message-actions{
  margin-top:10px;
  min-height:34px;
  opacity:.72;
  transition:opacity .15s ease;
}
.turn:hover .message-actions,
.message-actions:focus-within{
  opacity:1;
}
.message-action{
  width:32px;
  height:32px;
  border-radius:10px;
}
.message-action:hover{
  background:#f0f0f0;
  color:#111;
}
.message-action-source-stack.has-sources{
  padding-inline:6px 8px;
  border-radius:12px;
  background:#f7f7f7;
}
.message-action-source-stack.has-sources:hover{
  background:#eeeeee;
}
.source-stack-dot{
  width:21px;
  height:21px;
}
.source-panel,.debug-panel{
  border-radius:16px;
}
.source-panel-list .source-card,
.source-panel-list .source-status-card{
  border-radius:12px;
}
.assistant-status-line{
  color:#777;
}
.assistant-status-line.is-active{
  min-height:24px;
}
@keyframes aw1-stream-spin{to{transform:rotate(360deg)}}
.assistant-activity-compact{
  display:grid;
  gap:4px;
  margin-top:8px;
  max-width:min(680px,100%);
  color:#5f6368;
  font-size:.86rem;
  line-height:1.35;
  max-height:5.2em;
  overflow:hidden;
}
.aw1-quick-answer,
.aw1-final-answer{
  display:block;
  min-width:0;
  overflow-wrap:anywhere;
}
.aw1-quick-answer{
  margin:0 0 .5rem;
}
.aw1-final-answer{
  margin:.2rem 0 0;
}
.answer-live-activity{
  margin:.45rem 0 .85rem;
  color:var(--muted);
  font-size:.9rem;
  line-height:1.45;
}
.aw1-live-activity{
  display:block;
  min-width:0;
}
.answer-live-activity .assistant-status-line{
  margin:0;
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
.answer-live-activity .status-label{
  padding:0;
  color:inherit;
  background:transparent;
  border:0;
}
.answer-live-activity .assistant-activity-compact{
  margin-top:0;
  max-height:3.6em;
}
.assistant-activity-row{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.assistant-activity-more{
  justify-self:start;
  border:0;
  background:transparent;
  color:#3f6fba;
  font:inherit;
  padding:2px 0;
  cursor:pointer;
}
.assistant-activity-more:hover{
  text-decoration:underline;
}
.model-profile-meta span[title]{
  text-decoration:underline dotted;
  text-underline-offset:3px;
  cursor:help;
}
@media (prefers-reduced-motion:reduce){
  .status-dots span,
  .aw1-stream-loading,
  .aw1-layered-stream.is-running .aw1-layered-summary-text::after{
    animation:none;
  }
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#171719;
    --surface:#202023;
    --sidebar:#202023;
    --hover:#29292d;
    --line:rgba(255,255,255,.11);
    --text:#f2f2f3;
    --muted:#a6a6ad;
    --soft:#29292d;
    --accent:#7aa2ff;
    --aw-bg:#171719;
    --aw-surface:#202023;
    --aw-surface-strong:#29292d;
    --aw-text:#f2f2f3;
    --aw-text-muted:#a6a6ad;
    --aw-border:rgba(255,255,255,.11);
    --aw-code-bg:#111113;
    --aw-shadow-soft:none;
  }
  .app-shell{background:var(--bg)}
  .sidebar{color:var(--text)}
  .new-chat-btn,.new-chat-btn::before{color:var(--text)}
  .turn .bubble{color:var(--text)}
  .bubble blockquote{color:var(--aw-text-muted);background:var(--aw-surface)}
  .bubble code:not(pre code){background:var(--aw-surface-strong)}
  .composer{background:var(--aw-surface);color:var(--text)}
}
.composer{
  border-color:#d9d9d9;
  box-shadow:0 2px 14px rgba(0,0,0,.08);
}
.composer:focus-within{
  border-color:#c7c7c7;
  box-shadow:0 3px 18px rgba(0,0,0,.10);
}
.transcript{
  padding-bottom:calc(var(--composer-safe-bottom,178px) + 20px);
}
@media (max-width:640px){
  :root{--aw-prose-size:15.5px}
  .turn.assistant .bubble{line-height:1.68}
  .assistant-activity-compact{font-size:.82rem;max-height:6.8em;overflow:hidden}
  .bubble h1{font-size:1.38rem}
  .bubble h2{font-size:1.22rem}
  .bubble table{min-width:520px}
  .bubble pre{border-radius:10px;padding:12px}
  .code-block{border-radius:10px;padding:0}
}

/* V6 media-quality/light-stream UI hardening.
   Keep this as presentation-only: SSE event handling and model behavior are not changed here. */
:root{
  color-scheme:light;
  --bg:#ffffff;
  --surface:#ffffff;
  --sidebar:#f7f7f8;
  --hover:#eeeeef;
  --line:#e5e7eb;
  --line-strong:#d4d4d8;
  --text:#171719;
  --muted:#686872;
  --soft:#f4f4f5;
  --accent:#2563eb;
  --aw-bg:#ffffff;
  --aw-surface:#f8f8f9;
  --aw-surface-strong:#efeff1;
  --aw-text:#171719;
  --aw-text-muted:#686872;
  --aw-border:rgba(23,23,25,.12);
  --aw-code-bg:#0f1115;
  --aw-code-text:#f8fafc;
  --aw-chat-column-width:860px;
  --aw-chat-side-padding:28px;
  --aw-shadow-soft:0 10px 28px rgba(15,23,42,.07);
}
body,
.app-shell{
  background:var(--aw-bg);
  color:var(--aw-text);
}
.main-panel{
  background:linear-gradient(180deg,#fff 0%,#fbfbfc 100%);
}
.main-panel:has(#turns .turn) .turns,
.main-panel.is-active-chat .turns{
  width:min(var(--aw-chat-column-width),calc(100% - (var(--aw-chat-side-padding) * 2)));
  max-width:var(--aw-chat-column-width);
  gap:32px;
}
.turn .bubble{
  color:var(--aw-text);
  font-size:16px;
  line-height:1.7;
  letter-spacing:0;
}
.turn.assistant .bubble{
  background:transparent;
  padding:0;
}
.turn.user .bubble{
  background:#f4f4f5;
  border:1px solid rgba(23,23,25,.07);
  border-radius:20px;
  box-shadow:none;
}
.bubble h1,.bubble h2,.bubble h3,.bubble h4{
  color:var(--aw-text);
  letter-spacing:0;
}
.bubble p{
  margin:0 0 .9em;
}
.bubble blockquote{
  background:#f8fafc;
  border-left-color:#cbd5e1;
  color:#475569;
}
.bubble a{
  color:#1d4ed8;
}
.bubble pre,
.code-block{
  background:var(--aw-code-bg);
  color:var(--aw-code-text);
  border-color:rgba(15,23,42,.14);
}
.bubble pre code,
.code-block code{
  color:var(--aw-code-text);
  background:transparent;
}
.code-block .code-head{
  background:#f7f7f8;
  color:#3f3f46;
  border-bottom-color:#e4e4e7;
}
.code-block .code-head button{
  background:#fff;
  border-color:#d4d4d8;
  color:#27272a;
}
.code-block .code-head button:hover,
.code-block .code-head button.active{
  background:#18181b;
  border-color:#18181b;
  color:#fff;
}
.assistant-status-line,
.compact-status,
.assistant-activity-compact{
  color:#4b5563;
}
.turn.assistant .bubble > .assistant-status-line{
  margin:0 0 .75rem;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.assistant-status-line .status-label{
  position:relative;
  overflow:hidden;
  border:0;
  background:transparent;
  color:#374151;
  padding:0;
  font:inherit;
  cursor:pointer;
  text-align:left;
}
.assistant-status-line .status-label::after{
  content:"";
  position:absolute;
  inset:0 auto 0 -45%;
  width:38%;
  pointer-events:none;
  background:linear-gradient(100deg,transparent,color-mix(in srgb,currentColor 34%,transparent),transparent);
  animation:awStatusTextSheen 1.9s ease-in-out infinite;
}
@keyframes awStatusTextSheen{
  0%{transform:translateX(0);opacity:0}
  24%{opacity:.9}
  68%{opacity:.55}
  100%{transform:translateX(360%);opacity:0}
}
.assistant-status-line .status-label:hover,
.assistant-status-line .status-label:focus-visible{
  color:var(--aw-accent, #2563eb);
  outline:none;
}
.assistant-status-line .status-label:focus-visible{
  box-shadow:0 2px 0 currentColor;
}
.assistant-stream-status,
.assistant-processing-status{
  display:inline-flex;
  align-items:center;
  gap:7px;
  width:max-content;
  max-width:100%;
  min-height:22px;
  margin:10px 0 0 0;
  color:var(--text-secondary, #64748b);
  font-size:13px;
  line-height:20px;
  user-select:none;
}
.assistant-stream-spinner,
.assistant-processing-spinner{
  width:14px;
  height:14px;
  flex:0 0 14px;
  border:2px solid color-mix(in srgb,var(--text-secondary, #64748b) 22%,transparent);
  border-top-color:var(--accent-color, var(--accent, #2563eb));
  border-radius:999px;
  animation:aw1-stream-spin .8s linear infinite;
}
.assistant-stream-status-text,
.assistant-processing-label{
  white-space:nowrap;
}
.turn.assistant:not(.is-streaming) .assistant-stream-status,
.assistant-message:not(.is-streaming) .assistant-stream-status,
.bubble:not(.is-streaming) + .assistant-stream-status{
  display:none;
}
@media (prefers-reduced-motion:reduce){
  .assistant-stream-spinner,
  .assistant-processing-spinner{
    animation-duration:1.8s;
  }
}
.assistant-activity-compact{
  margin:.45rem 0 .7rem;
  max-width:min(720px,100%);
  max-height:6.8em;
  padding:0;
  gap:3px;
}
.assistant-activity-row{
  display:flex;
  align-items:center;
  gap:7px;
  color:#4b5563;
  min-width:0;
}
.assistant-activity-dot{
  width:6px;
  height:6px;
  flex:0 0 6px;
  border-radius:999px;
  background:#9ca3af;
}
.assistant-activity-row.is-current .assistant-activity-dot{
  background:var(--accent);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 14%,transparent);
}
.assistant-activity-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.assistant-status-line.is-after-fast-answer{
  margin:.2rem 0 .45rem;
  font-size:13px;
  opacity:1;
}
.assistant-status-line.is-after-fast-answer .assistant-activity-compact{
  display:grid;
  margin:.35rem 0 0;
}
.assistant-status-line.is-after-fast-answer .status-dots{
  transform:scale(.82);
  transform-origin:left center;
}
.assistant-activity-more{
  color:#2563eb;
  font-size:12px;
  text-decoration:none;
}
.media-results,
.artifact-file-frame,
.aw-file-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  box-shadow:var(--aw-shadow-soft);
}
.media-card img,
.media-card video,
.aw-artifact-image,
.aw-artifact-video{
  width:100%;
  max-height:560px;
  object-fit:contain;
  background:#f8fafc;
}
.artifact-quality-meta{
  display:inline-flex;
  flex-wrap:wrap;
  gap:4px;
  color:#64748b;
  font-size:12px;
  line-height:1.35;
}
.artifact-file-info .artifact-quality-meta{
  margin-top:3px;
}
.media-card figcaption .artifact-quality-meta{
  display:inline;
  font-size:12px;
}

/* AW1 compact stream UX polish. These rules intentionally override the older
   open details/timeline styling while keeping the same data model. */
.aw1-layered-stream{
  position:relative;
  width:100%;
  max-width:100%;
  margin:.2rem 0 .65rem;
  z-index:4;
}
.aw1-layered-stream summary,
.aw1-layered-summary-button{
  min-height:0;
  display:inline-flex;
  align-items:center;
  gap:6px;
  max-width:min(620px,100%);
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#4b5563;
  font:inherit;
  font-size:13px;
  line-height:1.35;
  box-shadow:none;
  cursor:pointer;
  text-align:left;
}
.aw1-layered-stream summary::before{display:none}
.aw1-layered-summary-icon{
  display:none;
}
.aw1-layered-stream.is-running .aw1-layered-summary-icon{
  animation:none;
}
.aw1-layered-stream.is-collapsed .aw1-layered-summary-icon{
  display:none;
}
.aw1-layered-summary-text{
  position:relative;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.aw1-research-activity-icon-stack{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  max-width:54px;
  margin-right:2px;
}
.aw1-research-activity-icon-stack .source-stack-icon{
  display:inline-flex;
  width:auto;
  min-width:18px;
  height:18px;
  align-items:center;
}
.aw1-research-activity-icon-stack .source-stack-dot{
  width:18px;
  height:18px;
  border-radius:50%;
  border:1px solid rgba(17,24,39,.12);
  background:#fff;
}
.aw1-research-activity-icon-stack .source-stack-dot + .source-stack-dot{margin-left:-6px}
.aw1-research-activity-icon-stack .source-stack-more{
  min-width:18px;
  height:18px;
  padding:0 4px;
  font-size:10px;
}
.message-actions .message-action-source-stack,
.message-actions [data-source-drawer-action="true"]{
  display:none!important;
}
.source-status-card--answer-chips[data-answer-source-chips="true"]{
  display:flex!important;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  margin-top:10px;
}
.source-status-card--answer-chips[data-answer-source-chips="true"] .source-status-head{
  display:none;
}
.message-actions .message-action-source-stack.has-sources,
.message-actions .message-action[data-source-drawer-action="true"].has-sources,
.message-actions .message-action-source-stack[data-source-drawer-action="true"]{
  display:inline-flex!important;
}
.aw1-layered-stream.is-running .aw1-layered-summary-text::after{
  content:"";
  position:absolute;
  inset:0 auto 0 -40%;
  width:36%;
  background:linear-gradient(100deg,transparent,color-mix(in srgb,currentColor 28%,transparent),transparent);
  pointer-events:none;
  animation:awStatusTextSheen 1.9s ease-in-out infinite;
}
.aw1-layered-summary-meta{
  color:#6b7280;
  white-space:nowrap;
}
.aw1-layered-chevron{
  display:none;
}
.aw1-layered-stream[open] .aw1-layered-chevron,
.aw1-layered-summary-button[aria-expanded="true"] .aw1-layered-chevron{transform:rotate(180deg)}
.aw1-answer-region{
  min-width:0;
}
.aw1-inline-activity-region{
  margin:.15rem 0 .65rem;
}
.aw1-layered-summary-button:hover .aw1-layered-summary-text,
.aw1-layered-summary-button:focus-visible .aw1-layered-summary-text{
  text-decoration:underline;
  text-underline-offset:3px;
}
.aw1-layered-summary-button:focus-visible{
  outline:2px solid color-mix(in srgb,var(--accent) 46%,transparent);
  outline-offset:3px;
}
.aw1-layered-stream.is-running{
  margin:.35rem 0 .75rem;
}
.aw1-layered-stream.is-collapsed{
  margin:.15rem 0 .55rem;
}
.aw1-layered-stream.is-running .aw1-layered-summary-button{
  color:var(--text);
  font-size:14px;
  font-weight:520;
}
.aw1-layered-stream.is-running .aw1-layered-summary-text::before{
  content:"";
  display:inline-block;
  width:12px;
  height:12px;
  margin-right:8px;
  border:2px solid color-mix(in srgb,var(--accent) 24%,transparent);
  border-top-color:var(--accent);
  border-radius:999px;
  vertical-align:-2px;
  animation:awStreamSpin .82s linear infinite;
}
.aw1-layered-stream.is-collapsed .aw1-layered-summary-button{
  color:#6b7280;
  font-size:13px;
}
.aw1-layered-stream.is-collapsed .aw1-layered-summary-text::before{
  content:"▸";
  display:inline-block;
  margin-right:6px;
  color:#8a8f98;
}
.aw1-layered-stream.is-collapsed[open] .aw1-layered-summary-text::before{
  transform:rotate(90deg);
}
.aw1-layered-stream-body-inline{
  max-width:min(620px,100%);
  margin:.55rem 0 0;
}
.aw1-stream-step-list{
  list-style:none;
  display:grid;
  gap:9px;
  margin:0;
  padding:0;
}
.aw1-stream-step{
  position:relative;
  display:grid;
  grid-template-columns:18px minmax(0,1fr);
  column-gap:9px;
  min-width:0;
  color:#374151;
}
.aw1-stream-step:not(:last-child)::after{
  content:"";
  position:absolute;
  left:8px;
  top:22px;
  bottom:-7px;
  width:1px;
  background:color-mix(in srgb,var(--line) 86%,transparent);
}
.aw1-stream-step-icon{
  width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  font-size:13px;
  line-height:1;
  z-index:1;
  background:var(--bg);
  color:#9ca3af;
}
.aw1-stream-step.is-running .aw1-stream-step-icon{
  color:var(--accent);
  animation:awStreamPulse 1.1s ease-in-out infinite;
}
.aw1-stream-step.is-completed{
  opacity:.64;
}
.aw1-stream-step.is-completed .aw1-stream-step-icon{
  color:#16a34a;
}
.aw1-stream-step.is-failed .aw1-stream-step-icon,
.aw1-stream-step.is-warning .aw1-stream-step-icon{
  color:#b45309;
}
.aw1-stream-step-copy{
  min-width:0;
  display:grid;
  gap:2px;
}
.aw1-stream-step-title{
  font-size:14px;
  line-height:1.42;
  overflow-wrap:anywhere;
}
.aw1-stream-step-detail{
  color:#6b7280;
  font-size:13px;
  line-height:1.4;
  overflow-wrap:anywhere;
}
@keyframes awStreamSpin{to{transform:rotate(360deg)}}
@keyframes awStreamPulse{
  0%,100%{transform:scale(1);opacity:1}
  50%{transform:scale(.82);opacity:.62}
}
.aw1-stage-disclosure{
  display:grid;
  gap:2px;
  margin:.42rem 0 0;
  max-width:min(620px,100%);
}
.aw1-stage-link{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:baseline;
  gap:14px;
  padding:3px 0;
  border:0;
  background:transparent;
  color:#4b5563;
  font:inherit;
  font-size:12.5px;
  text-align:left;
  cursor:pointer;
}
.aw1-stage-link:hover span,
.aw1-stage-link:focus-visible span{
  text-decoration:underline;
  text-underline-offset:3px;
}
.aw1-stage-link:focus-visible{
  outline:2px solid color-mix(in srgb,var(--accent) 42%,transparent);
  outline-offset:2px;
}
.aw1-stage-link time{
  color:#8a8f98;
  font-variant-numeric:tabular-nums;
}
.answer-body.has-pending-answer{
  min-height:20px;
  display:flex;
  align-items:center;
}
.aw1-stream-loading{
  width:16px;
  height:16px;
  display:inline-block;
  border-radius:999px;
  border:2px solid color-mix(in srgb,currentColor 20%,transparent);
  border-top-color:currentColor;
  opacity:.58;
  animation:aw1-stream-spin .82s linear infinite;
}
.aw1-background-learning-row{
  margin:.2rem 0 .65rem;
  color:#6b7280;
  font-size:12.5px;
}
.aw1-activity-drawer-portal{
  position:fixed;
  inset:0;
  z-index:80;
  pointer-events:none;
}
.aw1-activity-drawer-portal.is-open{pointer-events:auto}
.aw1-activity-drawer-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.16);
}
.aw1-activity-drawer{
  position:absolute;
  top:0;
  right:0;
  width:min(460px,40vw);
  height:100%;
  display:flex;
  flex-direction:column;
  border-left:1px solid #e5e7eb;
  background:#fff;
  box-shadow:-18px 0 42px rgba(15,23,42,.18);
  outline:none;
}
.aw1-activity-drawer-head{
  min-height:62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid #e5e7eb;
}
.aw1-activity-drawer-title{
  color:#111827;
  font-size:15px;
  font-weight:700;
}
.aw1-activity-drawer-subtitle{
  margin-top:2px;
  color:#6b7280;
  font-size:12px;
}
.aw1-activity-drawer-body{
  flex:1;
  overflow:auto;
  padding:14px 16px 18px;
}
.aw1-activity-drawer-tabs{
  display:flex;
  gap:6px;
  padding:10px 16px 0;
  border-bottom:1px solid #eef0f3;
}
.aw1-activity-drawer-tab{
  appearance:none;
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  color:#6b7280;
  cursor:pointer;
  font:inherit;
  font-size:13px;
  font-weight:650;
  padding:8px 4px 10px;
}
.aw1-activity-drawer-tab.is-active{
  border-bottom-color:#111827;
  color:#111827;
}
.aw1-activity-drawer-tabpanel{
  display:none;
}
.aw1-activity-drawer-tabpanel.is-active{
  display:block;
}
.aw1-activity-live-empty{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  margin:2px 0 12px;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#f9fafb;
  color:#4b5563;
  font-size:13px;
}
.aw1-dynamic-stage-list{
  display:grid;
  gap:4px;
  margin:0 0 14px;
}
.aw1-stage-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:start;
  width:100%;
  padding:8px 10px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#374151;
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.aw1-stage-row:hover,
.aw1-stage-row:focus-visible,
.aw1-stage-row.is-selected{
  background:#f3f4f6;
  outline:none;
}
.aw1-stage-row-title{
  min-width:0;
  overflow-wrap:anywhere;
}
.aw1-stage-row-meta{
  color:#8a8f98;
  font-size:12px;
  white-space:nowrap;
}
.aw1-stage-detail{
  padding-top:12px;
  border-top:1px solid #e5e7eb;
}
.aw1-stage-detail h3{
  margin:0 0 10px;
  color:#111827;
  font-size:15px;
}
.aw1-stage-detail dl{
  display:grid;
  gap:8px;
  margin:0;
}
.aw1-stage-detail dl div{
  display:grid;
  gap:2px;
}
.aw1-stage-detail dt,
.aw1-stage-detail-heading{
  color:#6b7280;
  font-size:12px;
}
.aw1-stage-detail dd{
  margin:0;
  color:#1f2937;
  font-size:13px;
  overflow-wrap:anywhere;
}
.aw1-stage-detail-timeline{
  margin-top:14px;
}
.aw1-stage-detail-timeline ol{
  position:relative;
  display:grid;
  gap:8px;
  margin:8px 0 0;
  padding:0 0 0 14px;
  list-style:none;
}
.aw1-stage-detail-timeline ol::before{
  content:"";
  position:absolute;
  left:3px;
  top:4px;
  bottom:4px;
  width:1px;
  background:#e5e7eb;
}
.aw1-stage-detail-timeline li{
  position:relative;
  color:#374151;
  font-size:13px;
}
.aw1-stage-detail-timeline li::before{
  content:"";
  position:absolute;
  left:-14px;
  top:.42em;
  width:7px;
  height:7px;
  border-radius:999px;
  background:#9ca3af;
}
.aw1-stage-detail-timeline small{
  display:block;
  margin-top:1px;
  color:#8a8f98;
}
.aw1-layered-stream-body{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  width:min(420px,calc(100vw - 32px));
  max-height:min(520px,70vh);
  overflow:auto;
  display:block;
  padding:12px 12px 12px 14px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 44px rgba(15,23,42,.16);
}
.aw1-source-count-summary{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 10px;
}
.aw1-source-count-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  max-width:100%;
  padding:3px 8px;
  border:1px solid #e5e7eb;
  border-radius:999px;
  background:#f8fafc;
  color:#4b5563;
  font-size:12px;
  line-height:1.2;
}
.aw1-stream-group{
  position:relative;
  padding:0 0 12px 24px;
}
.aw1-stream-group:not(:last-child)::before{
  content:"";
  position:absolute;
  left:7px;
  top:17px;
  bottom:-1px;
  width:1px;
  background:#e5e7eb;
}
.aw1-stream-group-head{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  font-size:13px;
  font-weight:650;
  color:#1f2937;
}
.aw1-stream-group-marker{
  position:absolute;
  left:0;
  top:1px;
  width:15px;
  height:15px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#fff;
  border:1px solid #d1d5db;
  color:#2563eb;
  font-size:10px;
}
.aw1-stream-group.is-running .aw1-stream-group-marker{
  color:transparent;
  border:2px solid #dbeafe;
  border-top-color:#2563eb;
  animation:aw1-spin .85s linear infinite;
}
.aw1-stream-group.is-completed .aw1-stream-group-marker{
  background:#16a34a;
  border-color:#16a34a;
  color:#fff;
}
.aw1-stream-layer-summary{
  margin:4px 0 0;
  color:#6b7280;
  font-size:12.5px;
}
.aw1-stream-progress-list{
  display:grid;
  gap:6px;
  margin-top:8px;
}
.aw1-main-source-rows{
  display:grid;
  gap:5px;
  margin-top:6px;
}
.aw1-stream-item{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
  font-size:12.5px;
  color:#4b5563;
}
.aw1-stream-item-icon{
  width:14px;
  flex:0 0 14px;
  color:#2563eb;
  text-align:center;
}
.aw1-stream-item.is-completed .aw1-stream-item-icon{color:#16a34a}
.aw1-stream-item.is-failed .aw1-stream-item-icon,
.aw1-stream-item.is-rejected .aw1-stream-item-icon{color:#b45309}
.aw1-stream-item-title{
  white-space:normal;
  overflow-wrap:anywhere;
}
.aw1-stream-item-title a{
  color:#2563eb;
  text-decoration:none;
}
.aw1-stream-item-title a:hover{text-decoration:underline}
.aw1-stream-item-meta{
  display:block;
  color:#8a8f98;
  font-size:12px;
  overflow-wrap:anywhere;
}
.aw1-stream-source-logo{
  width:20px;
  height:20px;
  flex:0 0 20px;
  display:inline-grid;
  place-items:center;
  border:1px solid #e5e7eb;
  border-radius:6px;
  background:#fff;
  color:#4b5563;
  overflow:hidden;
  font-size:10px;
  font-weight:650;
  line-height:1;
}
.aw1-stream-source-logo img{
  width:16px;
  height:16px;
  display:block;
  object-fit:contain;
}
.aw1-stream-source-logo .aw1-stream-source-initial{
  display:none;
}
.aw1-stream-source-logo.is-fallback .aw1-stream-source-initial,
.aw1-stream-source-logo:not(:has(img)) .aw1-stream-source-initial{
  display:block;
}
.aw1-drawer-source-details{
  border-top:1px solid #edf0f3;
  margin-top:12px;
  padding-top:12px;
}
.aw1-drawer-source-details-title{
  color:#374151;
  font-size:12.5px;
  font-weight:650;
  margin-bottom:8px;
}
.aw1-drawer-source-list{
  display:grid;
  gap:8px;
}
.aw1-drawer-source-card{
  display:grid;
  grid-template-columns:20px minmax(0,1fr);
  gap:9px;
  align-items:flex-start;
  min-width:0;
  padding:6px;
  border-radius:10px;
}
.aw1-drawer-source-card.is-selected{
  background:#f3f4f6;
  outline:1px solid #dbe2ea;
}
.aw1-drawer-source-main{
  display:grid;
  gap:2px;
  min-width:0;
}
.aw1-drawer-source-title{
  color:#1f2937;
  font-size:12.5px;
  font-weight:560;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.aw1-drawer-source-title a{
  color:#2563eb;
  text-decoration:none;
}
.aw1-drawer-source-title a:hover{
  text-decoration:underline;
}
.aw1-drawer-source-action{
  color:#4b5563;
  font-size:12px;
  line-height:1.35;
}
.aw1-drawer-source-meta{
  color:#8a8f98;
  font-size:11.5px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
@keyframes aw1-spin{to{transform:rotate(360deg)}}

.comparison-table-frame{
  position:relative;
  margin:1rem 0;
  max-width:100%;
  overflow:visible;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
}
.comparison-table-actions{
  position:absolute;
  top:8px;
  right:8px;
  z-index:2;
}
.aw-inline-icon-btn,
.comparison-table-actions button,
.code-block .code-head button{
  width:32px;
  height:32px;
  min-width:32px;
  display:inline-grid;
  place-items:center;
  padding:0;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  color:#374151;
  cursor:pointer;
}
.aw-inline-icon-btn svg,
.comparison-table-actions button svg,
.code-block .code-head button svg,
.artifact-file-download svg{
  width:17px;
  height:17px;
  stroke-width:1.8;
}
.aw-inline-icon-btn:hover,
.comparison-table-actions button:hover,
.code-block .code-head button:hover,
.aw-inline-icon-btn.active,
.comparison-table-actions button.active,
.code-block .code-head button.active{
  background:#111827;
  border-color:#111827;
  color:#fff;
}
.comparison-table-scroll{
  max-width:100%;
  overflow:auto;
  border-radius:12px;
}
.comparison-table{
  min-width:560px;
  border-collapse:separate;
  border-spacing:0;
  font-size:13.5px;
}
.comparison-table th,
.comparison-table td{
  padding:10px 12px;
  border-right:1px solid #e5e7eb;
  border-bottom:1px solid #e5e7eb;
  vertical-align:top;
}
.comparison-table th{
  padding-right:46px;
  background:#f8fafc;
  color:#111827;
  font-weight:620;
}
.comparison-table tr:last-child td{border-bottom:0}
.comparison-table th:last-child,
.comparison-table td:last-child{border-right:0}

.code-block{
  margin:1rem 0;
  overflow:hidden;
  border:1px solid #1f2937;
  border-radius:12px;
  background:#0f172a;
  color:#e5e7eb;
}
.code-block .code-head{
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:7px 8px 7px 12px;
  border-bottom:1px solid rgba(255,255,255,.1);
  background:#111827;
  color:#e5e7eb;
  font-size:12px;
}
.code-block pre{
  margin:0;
  padding:14px 16px;
  overflow:auto;
  background:#0f172a;
  color:#e5e7eb;
}
.code-block code,
.bubble pre code,
.code-block pre code{
  display:block;
  min-width:max-content;
  color:#e5e7eb;
  background:transparent;
  white-space:pre;
  tab-size:2;
  font-size:13.5px;
  line-height:1.55;
}

.artifact-file-frame{
  margin:.8rem 0;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  box-shadow:0 2px 12px rgba(15,23,42,.06);
}
.artifact-file-header{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px 12px;
}
.artifact-file-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:10px;
  font-weight:750;
  letter-spacing:.02em;
}
.artifact-file-title{
  font-weight:650;
  color:#111827;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.artifact-file-meta,
.artifact-file-subtle{
  margin-top:2px;
  color:#6b7280;
  font-size:12px;
}
.artifact-file-actions{
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}
.artifact-file-download,
.artifact-file-open{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:32px;
  padding:0 10px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  color:#111827;
  text-decoration:none;
  font-size:12.5px;
  font-weight:650;
}
.artifact-file-download:hover,
.artifact-file-open:hover{
  background:#111827;
  border-color:#111827;
  color:#fff;
}
@media (max-width:640px){
  .aw1-layered-stream{width:100%}
  .aw1-layered-stream summary{max-width:100%; width:100%}
  .aw1-layered-stream.is-running .aw1-layered-summary-button,
  .aw1-stream-step-title{font-size:13.5px}
  .aw1-stream-step-detail{font-size:12.5px}
  .aw1-layered-stream-body{
    position:fixed;
    left:12px;
    right:12px;
    bottom:78px;
    top:auto;
    width:auto;
    max-height:55vh;
  }
  .artifact-file-header{
    grid-template-columns:auto minmax(0,1fr);
  }
  .artifact-file-actions{
    grid-column:1 / -1;
    justify-content:flex-end;
  }
}
@media (prefers-reduced-motion:reduce){
  .aw1-layered-stream.is-running .aw1-layered-summary-icon,
  .aw1-stream-group.is-running .aw1-stream-group-marker,
  .aw1-layered-stream.is-running .aw1-layered-summary-text::before,
  .aw1-stream-step.is-running .aw1-stream-step-icon{
    animation:none;
  }
}
.composer{
  background:#fff;
  border:1px solid #d9d9df;
  border-radius:26px;
  box-shadow:0 8px 26px rgba(15,23,42,.10);
}
.composer:focus-within{
  border-color:#bfc3ca;
  box-shadow:0 10px 30px rgba(15,23,42,.13);
}
.composer textarea{
  color:var(--aw-text);
}

/* AW1 responsive shell hardening: prevent mobile intrinsic widths from
   exceeding the visual viewport while keeping desktop centered in main. */
.app-shell,
.main-panel,
.main-topbar,
.transcript,
.empty-state,
.composer-shell,
.composer,
.empty-quick-actions,
.composer-disclaimer{
  box-sizing:border-box;
}
.main-panel{
  min-width:0;
  width:100%;
}
.main-topbar{
  width:100%;
  max-width:none;
}
body.is-empty-chat .main-panel .empty-state,
.main-panel:not(:has(#turns .turn)) .empty-state{
  width:min(var(--aw-shell-composer),calc(100% - 32px));
  max-width:var(--aw-shell-composer);
}
body.is-empty-chat .main-panel .composer-shell,
.main-panel:not(:has(#turns .turn)) .composer-shell{
  width:min(var(--aw-shell-composer),calc(100% - 32px));
  max-width:var(--aw-shell-composer);
  padding-left:0;
  padding-right:0;
  margin-left:auto;
  margin-right:auto;
}
body.is-empty-chat .main-panel .composer,
.main-panel:not(:has(#turns .turn)) .composer,
body.is-empty-chat .main-panel .empty-quick-actions,
.main-panel:not(:has(#turns .turn)) .empty-quick-actions,
body.is-empty-chat .main-panel .composer-disclaimer,
.main-panel:not(:has(#turns .turn)) .composer-disclaimer{
  width:100%;
  max-width:100%;
}
@media (max-width:900px){
  .app-shell{
    display:block;
    width:100%;
    min-width:0;
  }
  .main-panel,
  .main-topbar,
  .transcript{
    width:100%;
    max-width:100%;
    min-width:0;
  }
  body.is-empty-chat .main-panel .empty-state,
  .main-panel:not(:has(#turns .turn)) .empty-state,
  body.is-empty-chat .main-panel .composer-shell,
  .main-panel:not(:has(#turns .turn)) .composer-shell{
    width:calc(100vw - 24px);
    max-width:calc(100vw - 24px);
  }
  body.is-empty-chat .main-panel .empty-state h1,
  .main-panel:not(:has(#turns .turn)) .empty-state h1{
    width:100%;
    max-width:100%;
  }
  .main-panel:has(#turns .turn) .composer-shell,
  .main-panel.is-active-chat .composer-shell{
    left:0;
    right:0;
    width:100%;
    max-width:100%;
  }
  .main-panel:has(#turns .turn) .composer,
  .main-panel.is-active-chat .composer,
  .main-panel:has(#turns .turn) .attachment-strip,
  .main-panel.is-active-chat .attachment-strip,
  .main-panel:has(#turns .turn) .composer-disclaimer,
  .main-panel.is-active-chat .composer-disclaimer{
    width:calc(100vw - 24px);
    max-width:calc(100vw - 24px);
  }
  .composer-bottom-row{
    min-width:0;
  }
  .composer-actions:first-child{
    min-width:0;
    flex:1 1 auto;
  }
  .composer-actions-right{
    flex:0 0 auto;
  }
}
@media (prefers-color-scheme:dark){
  :root{
    color-scheme:light;
    --bg:#ffffff;
    --surface:#ffffff;
    --sidebar:#f7f7f8;
    --hover:#eeeeef;
    --line:#e5e7eb;
    --text:#171719;
    --muted:#686872;
    --soft:#f4f4f5;
    --aw-bg:#ffffff;
    --aw-surface:#f8f8f9;
    --aw-surface-strong:#efeff1;
    --aw-text:#171719;
    --aw-text-muted:#686872;
    --aw-border:rgba(23,23,25,.12);
    --aw-code-bg:#0f1115;
    --aw-shadow-soft:0 10px 28px rgba(15,23,42,.07);
  }
  .app-shell,
  .main-panel,
  body{
    background:var(--aw-bg);
    color:var(--aw-text);
  }
  .sidebar,
  .turn .bubble,
  .composer{
    color:var(--aw-text);
  }
}
@media (max-width:900px){
  :root{
    --aw-chat-side-padding:18px;
  }
  .main-panel:has(#turns .turn) .turns,
  .main-panel.is-active-chat .turns,
  .main-panel:has(#turns .turn) .attachment-strip,
  .main-panel.is-active-chat .attachment-strip,
  .main-panel:has(#turns .turn) .composer,
  .main-panel.is-active-chat .composer,
  .main-panel:has(#turns .turn) .composer-disclaimer,
  .main-panel.is-active-chat .composer-disclaimer{
    width:calc(100% - 24px);
    max-width:none;
  }
}
@media (max-width:640px){
  :root{
    --aw-prose-size:15.5px;
    --aw-chat-side-padding:12px;
  }
  .turn .bubble{
    font-size:15.5px;
  }
  .turn.user .bubble{
    max-width:88%;
  }
  .assistant-activity-compact{
    max-height:4.1em;
  }
  .aw1-activity-drawer{
    top:auto;
    right:0;
    bottom:0;
    left:0;
    width:100%;
    max-width:none;
    height:min(78dvh,720px);
    border-left:0;
    border-top:1px solid #e5e7eb;
    border-radius:18px 18px 0 0;
  }
  .aw1-stage-row{
    grid-template-columns:minmax(0,1fr);
    gap:3px;
    padding:10px 8px;
  }
  .aw1-stage-row-meta{
    white-space:normal;
  }
  .aw1-layered-summary-text{
    white-space:normal;
  }
  .media-card img,
  .media-card video,
  .aw-artifact-image,
  .aw-artifact-video{
    max-height:62dvh;
  }
}

/* AW1 production shell fix v249:
   The empty-state main panel must occupy the full area after the sidebar.
   Keep centering scoped to the empty-state content, not to MainShell/Header. */
@media (min-width:901px){
  :root{
    --aw-shell-sidebar:260px;
    --aw-shell-composer:860px;
    --aw-shell-header:52px;
  }
  html,
  body{
    width:100%;
    min-width:0;
  }
  .app-shell{
    display:grid;
    grid-template-columns:var(--aw-shell-sidebar) minmax(0,1fr);
    width:100%;
    min-width:0;
  }
  .sidebar{
    width:var(--aw-shell-sidebar);
    min-width:var(--aw-shell-sidebar);
    flex:0 0 var(--aw-shell-sidebar);
  }
  .main-panel{
    width:100%;
    min-width:0;
    max-width:none;
    margin:0;
  }
  body.is-empty-chat .main-panel,
  .main-panel:not(:has(#turns .turn)){
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:var(--aw-shell-header) minmax(112px,30dvh) auto minmax(0,1fr);
    justify-content:stretch;
    align-items:stretch;
    width:100%;
    min-width:0;
    max-width:none;
  }
  .main-topbar,
  body.is-empty-chat .main-panel .main-topbar,
  .main-panel:not(:has(#turns .turn)) .main-topbar{
    grid-column:1 / -1;
    width:100%;
    min-width:0;
    max-width:none;
  }
  body.is-empty-chat .main-panel .transcript,
  .main-panel:not(:has(#turns .turn)) .transcript{
    grid-column:1 / -1;
    grid-row:2;
    width:100%;
    min-width:0;
    max-width:none;
    display:grid;
    place-items:end center;
    justify-content:normal;
    padding:0 24px 18px;
  }
  body.is-empty-chat .main-panel .empty-state,
  .main-panel:not(:has(#turns .turn)) .empty-state{
    width:min(var(--aw-shell-composer),calc(100% - 32px));
    max-width:var(--aw-shell-composer);
    margin-inline:auto;
    align-items:stretch;
  }
  body.is-empty-chat .main-panel .empty-state h1,
  .main-panel:not(:has(#turns .turn)) .empty-state h1{
    width:100%;
    text-align:center;
  }
  body.is-empty-chat .main-panel .composer-shell,
  .main-panel:not(:has(#turns .turn)) .composer-shell{
    grid-column:1 / -1;
    grid-row:3;
    justify-self:center;
    width:min(var(--aw-shell-composer),calc(100% - 32px));
    max-width:var(--aw-shell-composer);
    min-width:0;
    padding:0;
    margin:0;
  }
  body.is-empty-chat .main-panel .composer,
  .main-panel:not(:has(#turns .turn)) .composer,
  body.is-empty-chat .main-panel .empty-quick-actions,
  .main-panel:not(:has(#turns .turn)) .empty-quick-actions,
  body.is-empty-chat .main-panel .composer-disclaimer,
  .main-panel:not(:has(#turns .turn)) .composer-disclaimer{
    width:100%;
    max-width:100%;
    margin-inline:0;
  }
}

/* AW1 home polish v250: compact modern homepage cards and sidebar rhythm. */
:root{
  --aw-home-card-radius:14px;
  --aw-home-card-border:rgba(17,24,39,.09);
  --aw-home-card-hover:#f6f6f7;
}
.sidebar{
  overflow:hidden;
}
.recent-chats{
  overflow-x:hidden;
}
.recent-item,
.recent-chat{
  min-width:0;
}
.recent-title{
  max-width:100%;
}
body.is-empty-chat .main-panel .empty-quick-actions,
.main-panel:not(:has(#turns .turn)) .empty-quick-actions{
  gap:12px;
  margin-top:18px;
}
.home-prompt-card,
.empty-quick-actions button{
  min-height:64px;
  height:64px;
  border-radius:var(--aw-home-card-radius);
  border:1px solid var(--aw-home-card-border);
  background:#fff;
  box-shadow:none;
  transition:background-color .14s ease,border-color .14s ease,transform .14s ease;
}
.home-prompt-card:hover,
.empty-quick-actions button:hover{
  background:var(--aw-home-card-hover);
  border-color:rgba(17,24,39,.14);
  transform:translateY(-1px);
}
.home-prompt-card:active,
.empty-quick-actions button:active{
  transform:translateY(0);
}
.home-prompt-card--loading{
  color:transparent;
  pointer-events:none;
  background:linear-gradient(90deg,#f4f4f5,#fafafa,#f4f4f5);
  background-size:220% 100%;
  animation:aw-home-card-loading 1.1s ease-in-out infinite;
}
@keyframes aw-home-card-loading{
  from{background-position:0 0}
  to{background-position:220% 0}
}
.home-prompt-title{
  font-size:14px;
  line-height:1.35;
  font-weight:540;
  color:#303036;
}
.composer-disclaimer,
.model-profile-meta{
  font-size:12px;
  line-height:1.42;
}
@media (max-width:900px){
  .home-prompt-card,
  .empty-quick-actions button{
    min-height:62px;
    height:auto;
  }
}
@media (prefers-reduced-motion:reduce){
  .home-prompt-card,
  .empty-quick-actions button,
  .home-prompt-card--loading{
    transition:none;
    animation:none;
  }
}

/* AW1 home suggestions v251: text-first prompts, no card chrome, staggered reveal. */
body.is-empty-chat .main-panel .empty-quick-actions,
.main-panel:not(:has(#turns .turn)) .empty-quick-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  align-items:start;
  margin-top:12px;
}
.home-prompt-card,
.empty-quick-actions button{
  min-width:0;
  width:100%;
  min-height:48px;
  height:auto;
  padding:9px 10px;
  border:1px solid rgba(24,24,27,.09)!important;
  border-radius:8px;
  background:rgba(255,255,255,.78)!important;
  box-shadow:0 1px 2px rgba(24,24,27,.04)!important;
  color:#3f3f46;
  justify-content:flex-start;
  text-align:left;
  opacity:0;
  transform:translateY(4px);
  animation:aw-home-suggestion-reveal .22s ease forwards;
  animation-delay:calc(var(--home-suggestion-index,0) * 55ms);
}
.home-prompt-card:hover,
.empty-quick-actions button:hover{
  background:rgba(17,24,39,.045)!important;
  color:#111827;
  transform:translateY(0);
}
.home-prompt-card:focus-visible,
.empty-quick-actions button:focus-visible{
  outline:2px solid rgba(17,24,39,.28);
  outline-offset:2px;
}
.home-prompt-card--loading{
  opacity:.58;
  transform:none;
  color:#8b8b94;
  pointer-events:none;
  animation:none;
}
.home-prompt-card--loading .home-prompt-skeleton-line{
  display:block;
  width:100%;
  height:10px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(24,24,27,.08),rgba(24,24,27,.14),rgba(24,24,27,.08));
}
.home-prompt-card--loading .home-prompt-skeleton-line + .home-prompt-skeleton-line{
  margin-top:7px;
}
.home-prompt-card--loading .home-prompt-skeleton-line.is-short{
  width:62%;
}
.home-prompt-title{
  display:-webkit-box;
  max-width:100%;
  overflow:hidden;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  white-space:normal;
  font-size:14px;
  line-height:1.42;
  font-weight:520;
}
@keyframes aw-home-suggestion-reveal{
  to{
    opacity:1;
    transform:translateY(0);
  }
}
@media (max-width:900px){
  body.is-empty-chat .main-panel .empty-quick-actions,
  .main-panel:not(:has(#turns .turn)) .empty-quick-actions{
    grid-template-columns:1fr;
    gap:6px;
    margin-top:10px;
  }
}
@media (prefers-reduced-motion:reduce){
  .home-prompt-card,
  .empty-quick-actions button{
    opacity:1;
    transform:none;
    animation:none;
  }
}

/* AW1 ChatGPT-style chat shell cleanup, v304.
   Presentation only: answer text/activity content still comes from AW1-SSE. */
:root{
  --aw-shell-sidebar:240px;
  --aw-shell-header:52px;
  --aw-chat-column-width:800px;
  --aw-shell-content:800px;
  --aw-shell-composer:800px;
  --aw-chat-side-padding:18px;
  --composer-safe-bottom:142px;
}
html,
body{
  width:100%;
  min-width:0;
}
.app-shell{
  display:grid;
  grid-template-columns:var(--aw-shell-sidebar) minmax(0,1fr);
  width:100%;
  min-width:0;
  min-height:100dvh;
}
.sidebar{
  width:var(--aw-shell-sidebar);
  min-width:var(--aw-shell-sidebar);
  flex-basis:var(--aw-shell-sidebar);
  overflow:hidden;
}
.recent-chats{
  overflow-x:hidden;
}
.recent-item,
.recent-chat,
.recent-title{
  min-width:0;
  max-width:100%;
}
.main-panel{
  width:100%;
  min-width:0;
  min-height:100dvh;
}
.main-topbar{
  width:100%;
  height:var(--aw-shell-header);
  min-height:var(--aw-shell-header);
  border-bottom:1px solid rgba(17,24,39,.055);
}
.transcript{
  width:100%;
  min-width:0;
  padding:18px 0 calc(var(--composer-safe-bottom) + 12px);
}
.turns,
.main-panel:has(#turns .turn) .turns,
.main-panel.is-active-chat .turns{
  width:min(var(--aw-chat-column-width),calc(100% - 36px));
  max-width:var(--aw-chat-column-width);
  margin:0 auto;
  gap:16px;
}
.turn{
  min-width:0;
}
.turn .role{
  display:none;
}
.turn.user{
  align-items:flex-end;
}
.turn.assistant{
  align-items:flex-start;
}
.turn .bubble{
  font-family:var(--font);
  font-size:16px;
  line-height:1.62;
  font-synthesis-weight:none;
  text-rendering:optimizeLegibility;
}
.bubble.markdown,
.assistant-answer,
.answer-body,
.aw1-answer-region,
.content-stream{
  font-family:var(--font);
}
.turn.user .bubble{
  max-width:min(72%,560px);
  padding:9px 14px;
  border-radius:19px;
  background:#f4f4f4;
}
.turn.assistant .bubble{
  width:100%;
  max-width:100%;
}
.content-stream{
  max-width:100%;
}
.aw1-answer-region{
  width:100%;
  min-width:0;
}
.aw1-inline-activity-region{
  margin:.1rem 0 .55rem;
}
.aw1-layered-stream{
  margin:.15rem 0 .45rem;
}
.aw1-layered-stream.is-running,
.aw1-layered-stream.is-collapsed{
  margin:.1rem 0 .45rem;
}
.aw1-layered-summary-button,
.aw1-layered-stream summary{
  min-height:22px;
  max-width:100%;
  color:#5f6368;
  font-size:13.5px;
  line-height:1.35;
}
.aw1-layered-summary-icon{
  display:none!important;
}
.aw1-layered-stream.is-running .aw1-layered-summary-text::before{
  width:13px;
  height:13px;
  margin-right:7px;
  border-width:2px;
}
.aw1-layered-stream.is-running .aw1-layered-summary-text:empty::after,
.aw1-layered-stream.is-running .aw1-layered-summary-text[data-aw1-neutral-pending="true"]::after{
  display:none;
}
.aw1-layered-stream.is-running .aw1-layered-summary-text[data-aw1-neutral-pending="true"]{
  width:20px;
  min-width:20px;
  height:18px;
  overflow:visible;
  white-space:normal;
}
.aw1-layered-stream.is-running .aw1-layered-summary-text[data-aw1-neutral-pending="true"]::before{
  margin-right:0;
}
.aw1-layered-stream.is-waiting-text .aw1-layered-summary-button{
  color:#6b7280;
}
.aw1-layered-stream.is-waiting-text .aw1-layered-summary-text::before,
.aw1-layered-summary-text[data-aw1-thinking-shimmer="true"]::before{
  display:none!important;
}
.aw1-layered-summary-text[data-aw1-thinking-shimmer="true"]{
  display:inline-block;
  position:relative;
  max-width:100%;
  overflow:hidden;
  color:#6b7280;
  background:linear-gradient(100deg,#6b7280 0%,#6b7280 32%,#111827 46%,#6b7280 62%,#6b7280 100%);
  background-size:240% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  animation:aw1-thinking-sheen 1.55s ease-in-out infinite;
}
@keyframes aw1-thinking-sheen{
  0%{background-position:140% 0}
  100%{background-position:-80% 0}
}
.aw1-layered-stream-body-inline{
  display:block;
  margin-top:6px;
}
.message-actions{
  margin-top:6px;
  min-height:30px;
}
.composer-shell{
  left:var(--aw-shell-sidebar);
  right:0;
  bottom:0;
  padding:10px 18px calc(12px + env(safe-area-inset-bottom));
  background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.95) 30%,#fff 68%);
}
.main-panel:has(#turns .turn) .composer,
.main-panel.is-active-chat .composer,
.main-panel:has(#turns .turn) .attachment-strip,
.main-panel.is-active-chat .attachment-strip,
.main-panel:has(#turns .turn) .composer-disclaimer,
.main-panel.is-active-chat .composer-disclaimer{
  width:min(var(--aw-shell-composer),calc(100% - 36px));
  max-width:var(--aw-shell-composer);
}
.composer{
  min-height:86px;
  border-radius:24px;
  padding:10px 12px;
  box-shadow:0 7px 24px rgba(15,23,42,.08);
}
.composer textarea{
  min-height:34px;
  max-height:min(170px,32dvh);
  padding:2px 4px 0;
  line-height:1.45;
}
.composer-bottom-row{
  min-height:34px;
}
.composer .action-btn,
.composer #send,
.tool-pill,
.mode-menu-button{
  height:34px;
  min-height:34px;
}
.composer .action-btn,
.composer #send{
  width:34px;
  min-width:34px;
}
.composer-disclaimer{
  margin-top:5px;
  font-size:11px;
}
body.is-empty-chat .main-panel,
.main-panel:not(:has(#turns .turn)){
  grid-template-rows:var(--aw-shell-header) minmax(94px,30dvh) auto 1fr;
}
body.is-empty-chat .main-panel .transcript,
.main-panel:not(:has(#turns .turn)) .transcript{
  padding:0 18px 14px;
  justify-content:flex-end;
}
body.is-empty-chat .main-panel .empty-state,
.main-panel:not(:has(#turns .turn)) .empty-state,
body.is-empty-chat .main-panel .composer-shell,
.main-panel:not(:has(#turns .turn)) .composer-shell{
  width:min(var(--aw-shell-composer),calc(100% - 36px));
  max-width:var(--aw-shell-composer);
}
body.is-empty-chat .main-panel .composer,
.main-panel:not(:has(#turns .turn)) .composer{
  min-height:98px;
}
@media (max-width:900px){
  :root{
    --aw-shell-sidebar:286px;
    --aw-chat-side-padding:14px;
    --composer-safe-bottom:132px;
  }
  .app-shell{
    display:block;
  }
  .sidebar{
    width:min(86vw,var(--aw-shell-sidebar));
    min-width:0;
  }
  .composer-shell{
    left:0;
    padding:9px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .turns,
  .main-panel:has(#turns .turn) .turns,
  .main-panel.is-active-chat .turns,
  .main-panel:has(#turns .turn) .composer,
  .main-panel.is-active-chat .composer,
  .main-panel:has(#turns .turn) .attachment-strip,
  .main-panel.is-active-chat .attachment-strip,
  .main-panel:has(#turns .turn) .composer-disclaimer,
  .main-panel.is-active-chat .composer-disclaimer{
    width:calc(100% - 24px);
    max-width:none;
  }
  .transcript{
    padding-top:14px;
    padding-bottom:calc(var(--composer-safe-bottom) + 10px);
  }
  .turns{
    gap:14px;
  }
}
@media (max-width:640px){
  .turn .bubble{
    font-size:15.5px;
    line-height:1.58;
  }
  .turn.user .bubble{
    max-width:86%;
    padding:8px 13px;
  }
  .composer{
    min-height:82px;
    border-radius:22px;
  }
  body.is-empty-chat .main-panel .empty-state,
  .main-panel:not(:has(#turns .turn)) .empty-state,
  body.is-empty-chat .main-panel .composer-shell,
  .main-panel:not(:has(#turns .turn)) .composer-shell{
    width:calc(100vw - 24px);
    max-width:calc(100vw - 24px);
  }
}

/* AW1 welcome alignment + stream renderer restore, v305.
   Keeps AW1-SSE as the only answer/activity data source. */
:root{
  --aw-welcome-container:760px;
  --aw-shell-composer:760px;
}
body.is-empty-chat .main-panel,
.main-panel:not(:has(#turns .turn)){
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  width:100%;
  min-width:0;
}
body.is-empty-chat .main-panel .main-topbar,
.main-panel:not(:has(#turns .turn)) .main-topbar{
  flex:0 0 var(--aw-shell-header);
}
body.is-empty-chat .main-panel .transcript,
.main-panel:not(:has(#turns .turn)) .transcript{
  flex:0 0 auto;
  width:100%;
  min-height:0;
  padding:clamp(70px,18dvh,150px) 0 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  overflow:visible;
}
body.is-empty-chat .main-panel .empty-state,
.main-panel:not(:has(#turns .turn)) .empty-state,
body.is-empty-chat .main-panel .composer-shell,
.main-panel:not(:has(#turns .turn)) .composer-shell,
body.is-empty-chat .main-panel .composer-disclaimer,
.main-panel:not(:has(#turns .turn)) .composer-disclaimer,
body.is-empty-chat .main-panel .model-profile-meta,
.main-panel:not(:has(#turns .turn)) .model-profile-meta,
body.is-empty-chat .main-panel .empty-quick-actions,
.main-panel:not(:has(#turns .turn)) .empty-quick-actions{
  width:min(calc(100% - 32px),var(--aw-welcome-container));
  max-width:var(--aw-welcome-container);
  margin-inline:auto;
  transform:none;
}
body.is-empty-chat .main-panel .empty-state,
.main-panel:not(:has(#turns .turn)) .empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
body.is-empty-chat .main-panel .empty-state h1,
.main-panel:not(:has(#turns .turn)) .empty-state h1{
  width:100%;
  margin:0;
  text-align:center;
}
body.is-empty-chat .main-panel .composer-shell,
.main-panel:not(:has(#turns .turn)) .composer-shell{
  position:static;
  inset:auto;
  left:auto;
  right:auto;
  bottom:auto;
  z-index:1;
  padding:0;
  background:transparent;
  display:flex;
  flex-direction:column;
  align-items:stretch;
}
body.is-empty-chat .main-panel .composer,
.main-panel:not(:has(#turns .turn)) .composer,
body.is-empty-chat .main-panel .attachment-strip,
.main-panel:not(:has(#turns .turn)) .attachment-strip{
  width:100%;
  max-width:100%;
  margin-inline:0;
}
body.is-empty-chat .main-panel .empty-quick-actions,
.main-panel:not(:has(#turns .turn)) .empty-quick-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  padding:0;
}
@media (max-width:900px){
  body.is-empty-chat .main-panel .empty-quick-actions,
  .main-panel:not(:has(#turns .turn)) .empty-quick-actions{
    grid-template-columns:1fr;
    gap:6px;
  }
}
body.is-empty-chat .main-panel .composer-disclaimer,
.main-panel:not(:has(#turns .turn)) .composer-disclaimer{
  margin-top:9px;
  text-align:center;
}
.answer-body.has-pending-answer:empty{
  min-height:0;
  margin:0;
  padding:0;
}
.aw1-answer-region:empty,
.aw1-answer-region .answer-body.has-pending-answer:empty{
  display:block;
}
.aw1-inline-activity-region .aw1-layered-stream.is-running .aw1-layered-summary-text::before{
  content:"";
  display:inline-block;
}
.aw1-layered-summary-icon,
.answer-body.has-pending-answer .aw1-stream-loading{
  display:none!important;
}
.aw1-inline-activity-region .aw1-layered-stream.is-running:not(.is-waiting-text) .aw1-layered-summary-text:not([data-aw1-thinking-shimmer="true"])::before{
  content:"";
  display:inline-block!important;
  width:13px;
  height:13px;
  margin-right:7px;
  border:2px solid color-mix(in srgb,var(--accent) 24%,transparent);
  border-top-color:var(--accent);
  border-radius:999px;
  vertical-align:-2px;
  animation:awStreamSpin .82s linear infinite;
}
@media (min-width:901px){
  body.is-empty-chat .main-panel,
  .main-panel:not(:has(#turns .turn)){
    margin-left:0;
  }
}
@media (max-width:900px){
  body.is-empty-chat .main-panel .empty-state,
  .main-panel:not(:has(#turns .turn)) .empty-state,
  body.is-empty-chat .main-panel .composer-shell,
  .main-panel:not(:has(#turns .turn)) .composer-shell,
  body.is-empty-chat .main-panel .composer-disclaimer,
  .main-panel:not(:has(#turns .turn)) .composer-disclaimer,
  body.is-empty-chat .main-panel .model-profile-meta,
  .main-panel:not(:has(#turns .turn)) .model-profile-meta,
  body.is-empty-chat .main-panel .empty-quick-actions,
  .main-panel:not(:has(#turns .turn)) .empty-quick-actions{
    width:min(calc(100vw - 32px),var(--aw-welcome-container));
    max-width:min(calc(100vw - 32px),var(--aw-welcome-container));
  }
}
@media (max-width:520px){
  body.is-empty-chat .main-panel .empty-quick-actions,
  .main-panel:not(:has(#turns .turn)) .empty-quick-actions{
    grid-template-columns:1fr;
  }
}
@media (prefers-reduced-motion:reduce){
  .aw1-layered-summary-text[data-aw1-thinking-shimmer="true"]{
    animation:none;
    background:none;
    -webkit-text-fill-color:currentColor;
    color:#6b7280;
  }
}

/* AW1 GPT-5.6 style activity/source side panel, v331.
   Desktop is a real side panel that shrinks chat instead of a modal overlay.
   Mobile keeps the existing sheet behavior. */
:root{
  --aw1-activity-drawer-width:clamp(360px,28vw,420px);
}
@media (min-width:901px){
  body.aw1-activity-drawer-open{
    overflow:auto;
  }
  body.aw1-activity-drawer-open .app-shell{
    padding-right:var(--aw1-activity-drawer-width);
    transition:padding-right .18s ease;
  }
  body.aw1-activity-drawer-open .composer-shell{
    right:var(--aw1-activity-drawer-width);
    transition:right .18s ease;
  }
  body.aw1-activity-drawer-open .aw1-activity-drawer-portal{
    pointer-events:none;
  }
  body.aw1-activity-drawer-open .aw1-activity-drawer-backdrop{
    display:none!important;
  }
  body.aw1-activity-drawer-open .aw1-activity-drawer{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    left:auto;
    width:var(--aw1-activity-drawer-width);
    max-width:var(--aw1-activity-drawer-width);
    height:100dvh;
    border-radius:0;
    box-shadow:none;
    pointer-events:auto;
  }
}
@media (max-width:900px){
  body.aw1-activity-drawer-open .aw1-activity-drawer-backdrop{
    display:block;
    background:rgba(15,23,42,.18);
  }
}

.aw1-multilayer-sse-v2-activity{margin:.28rem 0 .18rem;padding:0;border:0;border-radius:0;background:transparent;font-size:.9rem;line-height:1.35;max-width:100%;overflow:hidden}
.aw1-multilayer-sse-v2-activity .activity-current{display:block;min-width:0}
.aw1-multilayer-sse-v2-activity .assistant-activity-row{display:flex;align-items:center;gap:.45rem;min-width:0;color:var(--muted,#64748b)}
.aw1-multilayer-sse-v2-activity .assistant-activity-label{min-width:0;overflow-wrap:anywhere}
.aw1-multilayer-sse-v2-activity .assistant-activity-check{color:#15803d;font-weight:700;line-height:1}
.aw1-multilayer-sse-v2-activity .assistant-stream-spinner{width:.85rem;height:.85rem;flex:0 0 auto}
@media (max-width: 640px){.aw1-multilayer-sse-v2-activity{font-size:.84rem}.aw1-multilayer-sse-v2-activity .assistant-activity-row{gap:.35rem}}

.attachment-strip{
  max-height:150px;
  overflow-x:auto;
  overflow-y:hidden;
  flex-wrap:nowrap;
  align-items:stretch;
  padding:2px 0 4px;
  scrollbar-width:thin;
}
.attachment-chip{
  position:relative;
  display:grid;
  grid-template-columns:84px minmax(130px,220px);
  grid-template-rows:auto auto;
  column-gap:10px;
  row-gap:3px;
  align-items:center;
  flex:0 0 auto;
  max-width:326px;
  min-height:88px;
  padding:8px 34px 8px 8px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.06);
}
.attachment-chip-thumb{
  grid-row:1 / span 2;
  width:84px;
  height:72px;
  border-radius:9px;
  object-fit:cover;
  background:#f3f4f6;
  color:#475569;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.attachment-chip-thumb--file{
  cursor:default;
}
.attachment-name,
.attachment-chip-title{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:normal;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  font-size:13px;
  font-weight:600;
  line-height:1.25;
  color:#111827;
}
.attachment-status,
.attachment-chip-meta{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  line-height:1.25;
  color:#64748b;
}
.attachment-chip-remove{
  position:absolute;
  top:5px;
  right:5px;
  width:24px;
  height:24px;
  border:0;
  border-radius:999px;
  background:rgba(15,23,42,.08);
  color:#0f172a;
  font-size:18px;
  line-height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.attachment-chip-remove:hover,
.attachment-chip-remove:focus-visible{
  background:rgba(15,23,42,.14);
  outline:2px solid rgba(37,99,235,.28);
}
.user-attachment-preview{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.user-attachment-preview .attachment-chip{
  grid-template-columns:72px minmax(120px,190px);
  min-height:76px;
  padding-right:8px;
}
.user-attachment-preview .attachment-chip-thumb{
  width:72px;
  height:60px;
}
.attachment-lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:rgba(15,23,42,.72);
}
.attachment-lightbox-image{
  max-width:calc(100vw - 56px);
  max-height:calc(100dvh - 56px);
  object-fit:contain;
  border-radius:10px;
  background:#fff;
}
.attachment-lightbox-close{
  position:fixed;
  top:16px;
  right:16px;
  width:38px;
  height:38px;
  border:0;
  border-radius:999px;
  background:#fff;
  color:#0f172a;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}
@media (max-width:640px){
  .attachment-strip{
    max-height:132px;
  }
  .attachment-chip{
    grid-template-columns:64px minmax(112px,176px);
    min-height:72px;
    padding:7px 32px 7px 7px;
  }
  .attachment-chip-thumb{
    width:64px;
    height:56px;
  }
  .attachment-name,
  .attachment-chip-title{
    font-size:12px;
  }
  .attachment-status,
  .attachment-chip-meta{
    font-size:11px;
  }
}

html[data-aw1-stream-ui-candidate="frontier-answer-surface-v3-capability-runtime-20260808"] .main-topbar{
  border-bottom:1px solid rgba(20,184,166,.22);
  box-shadow:0 1px 0 rgba(15,23,42,.05), inset 0 -2px 0 rgba(20,184,166,.14);
}

html[data-aw1-stream-ui-candidate="frontier-answer-surface-v3-capability-runtime-20260808"] .brand-mark{
  background:#0f766e;
  color:#ecfeff;
}

html[data-aw1-stream-ui-candidate="frontier-answer-surface-v3-capability-runtime-20260808"] .assistant-processing-status,
html[data-aw1-stream-ui-candidate="frontier-answer-surface-v3-capability-runtime-20260808"] .assistant-stream-status{
  border-color:rgba(20,184,166,.32);
  background:rgba(240,253,250,.88);
}

html[data-aw1-stream-ui-candidate="frontier-answer-surface-v3-capability-runtime-20260808"] .inline-citation-chip,
html[data-aw1-stream-ui-candidate="frontier-answer-surface-v3-capability-runtime-20260808"] .source-chip{
  border-color:rgba(20,184,166,.38);
}
.math-inline{display:inline-block;max-width:100%;vertical-align:middle}
.math-block{display:block;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:.35rem 0}
.math-block .katex-display{margin:.35rem 0;overflow-x:auto;overflow-y:hidden}
.mermaid-rendered{max-width:100%;overflow:auto;padding:.5rem;border-radius:10px;background:var(--surface-subtle,#f8fafc)}
.mermaid-rendered svg{display:block;max-width:100%;height:auto;margin:auto}
.has-mermaid-preview pre{margin-top:.5rem;max-height:12rem}
.message-source-logo-stack{display:inline-flex;align-items:center;margin-right:.35rem}
.message-source-logo{width:20px;height:20px;border-radius:50%;display:inline-grid;place-items:center;overflow:hidden;background:#eef2f7;border:1px solid #fff;font-size:10px;margin-left:-4px}
.message-source-logo:first-child{margin-left:0}.message-source-logo img{width:100%;height:100%;object-fit:contain}.message-source-count{white-space:nowrap}
