:root{--sidebar:244px;--paper:#fcfcfc;--ink:#181818;--muted:#8a8a8a;--line:#ededed;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;font-size:14px}
button,input,textarea,select{font:inherit;color:inherit}
button,a,input,textarea,summary{ -webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.4}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #888;outline-offset:3px}
a{color:inherit;text-decoration:none}
button{border:0;background:none}
[hidden]{display:none!important}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.icon-definitions{position:absolute;width:0;height:0;overflow:hidden}
.icon-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:6px;border-radius:8px;color:#696969;flex-shrink:0}
.icon-button:hover{background:#ebebeb;color:#171717}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);display:flex;flex-direction:column;background:#f9f9f9;border-right:1px solid var(--line);z-index:40}
.sidebar-header{height:62px;display:flex;align-items:center;padding:0 10px 0 18px;gap:3px;flex-shrink:0}
.brand{font-size:19px;font-weight:600;letter-spacing:-.6px;margin-right:auto}
.primary-nav{padding:0 8px}
.nav-item{display:flex;align-items:center;gap:10px;width:100%;height:36px;padding:0 10px;border-radius:9px;font-size:13px;text-align:left}
.nav-item svg{width:18px;height:18px}
.nav-item:hover,.session-item:hover{background:#ededed}
.new-chat{background:#ededed;margin-bottom:3px}
.history-heading{display:flex;align-items:center;justify-content:space-between;margin:20px 12px 5px 18px;font-size:12px;color:var(--muted)}
.history-heading svg{width:15px;height:15px}
.history-search{padding:0 12px 8px}
.history-search input{width:100%;min-width:0;background:#fff;border:1px solid #dedede;border-radius:9px;padding:8px 10px;font-size:12px}
.session-list{overflow:auto;min-height:0;flex:1;padding:0 8px 12px;scrollbar-width:thin;scrollbar-color:#d2d2d2 transparent}
.session-list:empty{flex:0;padding-bottom:0}
.session-item{display:block;width:100%;padding:10px;border-radius:8px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.session-item[aria-current="page"]{background:#eaeaea}
.session-row{position:relative;display:flex;align-items:center;border-radius:8px;min-height:36px}
.session-row:hover,.session-row:focus-within,.session-row.is-current{background:#ededed}
.session-row .session-item{flex:1;min-width:0;padding-right:8px;background:none}
.session-delete{width:27px;height:28px;margin-right:4px;opacity:0;flex-shrink:0}
.session-delete svg{width:16px;height:16px}
.session-row:hover .session-delete,.session-row:focus-within .session-delete{opacity:1}
.session-row .session-delete:disabled{opacity:.25}
.session-spinner{display:block;width:12px;height:12px;flex-shrink:0;margin-right:5px;border:1.5px solid #d8d8d8;border-top-color:#555;border-radius:50%;animation:session-spin .9s linear infinite}
@keyframes session-spin{to{transform:rotate(360deg)}}
@media(hover:none){.session-delete{opacity:1}}
@media(prefers-reduced-motion:reduce){.session-spinner{animation:none;border-top-color:#333}}
.history-empty{font-size:12px;color:var(--muted);margin:8px 18px auto}
.account-area{position:relative;border-top:1px solid var(--line);padding:7px 8px;margin-top:auto}
.account-button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border-radius:10px;padding:8px 6px}
.account-button:hover{background:#eee}
.account-avatar{width:30px;height:30px;border-radius:50%;background:#e9e9e9;display:grid;place-items:center;font-size:12px;flex-shrink:0}
.account-avatar{overflow:hidden}
.account-avatar img{width:100%;height:100%;display:block;object-fit:cover}
.account-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px;font-size:12px}
.account-copy>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-copy small{font-size:11px;color:var(--muted)}
.account-button>svg{width:17px;color:#777}
.popover{background:white;border:1px solid #e6e6e6;border-radius:14px;padding:7px;box-shadow:0 7px 28px #0000000c;z-index:50;font-size:12px}
.popover>button{display:block;width:100%;padding:10px;border-radius:8px;text-align:left}
.popover>button:hover{background:#f4f4f4}
.popover>p{font-size:11px;color:#888;margin:6px 10px 9px;overflow-wrap:anywhere}
.account-menu{position:absolute;bottom:calc(100% + 6px);left:10px;right:10px}
.shell{margin-left:var(--sidebar);min-height:100dvh;padding-top:64px;position:relative}
.topbar{position:fixed;top:0;left:var(--sidebar);right:0;height:64px;display:flex;align-items:center;justify-content:center;background:var(--paper);z-index:30}
.mode-switch{display:flex;align-items:center;padding:2px;background:#f6f6f6;border-radius:24px;font-size:13px}
.mode-switch>span,.mode-switch>a{padding:7px 25px;border-radius:22px;white-space:nowrap}
.mode-switch>span{background:white;border:1px solid #e2e2e2;box-shadow:0 1px 4px #00000006}
.mode-switch>a{color:#737373}
.mode-switch>a:hover{color:#111}
.mode-switch>a>span{font-size:11px;margin-left:3px}
.sidebar-open{position:absolute;left:18px;display:none}
.conversation-menu-button{position:absolute;right:20px;top:16px}
.conversation-menu{position:absolute;right:20px;top:53px;width:245px}
.conversation-menu details{padding:10px;color:#777}
.conversation-menu summary{cursor:pointer}
.conversation-menu details p{line-height:1.8;margin-bottom:0}
.chat-view{display:none}
.shell[data-view="chat"] .chat-view{display:block}
.shell[data-view="chat"] .key-view{display:none}
.welcome{position:absolute;top:35.5dvh;left:0;width:100%;text-align:center;padding:0 20px}
.welcome h1{font-size:27px;font-weight:450;line-height:1.4;letter-spacing:-.5px;margin:0}
.composer-dock{position:fixed;left:calc(var(--sidebar) + (100% - var(--sidebar))/2);transform:translateX(-50%);bottom:0;width:min(760px,calc(100% - var(--sidebar) - 64px));padding:16px 8px 14px;z-index:25;background:linear-gradient(transparent,var(--paper) 18%)}
.conversation-empty .composer-dock{position:absolute;left:50%;top:calc(35.5dvh + 64px);bottom:auto;width:min(744px,calc(100% - 64px));padding-top:0;background:none}
.composer{display:flex;align-items:flex-end;gap:8px;min-height:54px;padding:8px 9px;border:1px solid #e8e8e8;border-radius:28px;background:#fff;box-shadow:0 3px 12px #00000004}
.composer:focus-within{border-color:#d6d6d6}
.composer-plus{margin-bottom:2px;color:#222}
.composer textarea{flex:1;width:0;min-width:0;height:36px;min-height:36px;max-height:180px;resize:none;border:0;outline:none;background:none;padding:7px 3px;line-height:22px;font-size:15px;scrollbar-width:thin}
.composer textarea::placeholder{color:#949494}
.send-button{width:36px;height:36px;flex-shrink:0;background:#171717;color:white;display:grid;place-items:center;border-radius:50%;padding:8px}
.send-button:hover:not(:disabled){background:#3b3b3b}
.send-button:disabled{opacity:1;background:#efefef;color:#b7b7b7}
.composer-footnote{text-align:center;font-size:10px;color:#929292;line-height:1.5;margin:10px 0 0}
.conversation-empty .composer-footnote{opacity:.72}
.prompt-menu{position:absolute;bottom:calc(100% - 6px);left:8px;width:235px}
.conversation-empty .prompt-menu{top:65px;bottom:auto}
.workspace-taskbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 6px 0;font-size:12px;line-height:1.6;color:#717171}
.task-actions{display:flex;gap:6px;flex-shrink:0}
.task-actions button{font-size:11px;padding:5px 8px;border:1px solid #dedede;border-radius:7px;background:white}
.messages{max-width:760px;margin:0 auto;padding:35px 12px max(160px,calc(var(--composer-height,140px) + 40px));overflow-wrap:anywhere}
.messages:empty{padding:0}
.message{margin-bottom:27px}
.message.user{display:flex;justify-content:flex-end}
.user .bubble{max-width:85%;padding:11px 19px;border-radius:22px;background:#f0f0f0;font-size:15px;line-height:1.7;white-space:pre-wrap}
.assistant .bubble{font-size:15px;line-height:1.85}
.markdown>*:first-child{margin-top:0}
.markdown>*:last-child{margin-bottom:0}
.markdown p{margin:0 0 15px}
.markdown h1,.markdown h2,.markdown h3{font-size:20px;line-height:1.5;font-weight:600;margin:26px 0 14px}
.markdown h3{font-size:17px}
.markdown ul,.markdown ol{padding-left:24px;margin:12px 0 20px}
.markdown li{margin:6px 0}
.markdown a{color:#386c9a;text-decoration:underline;text-underline-offset:3px}
.markdown pre{white-space:pre;overflow:auto;background:#f2f2f2;padding:18px;border-radius:12px;font-size:13px}
.markdown code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em;background:#f1f1f1;border-radius:4px;padding:2px 4px}
.markdown pre code{padding:0;background:none}
.markdown blockquote{margin:18px 0;padding-left:16px;border-left:3px solid #ddd;color:#666}
.markdown table{display:block;max-width:100%;overflow:auto;border-collapse:collapse;margin:20px 0;font-size:14px}
.markdown th,.markdown td{text-align:left;padding:11px 16px;border-bottom:1px solid #e7e7e7}
.markdown th:first-child,.markdown td:first-child{padding-left:0}
.markdown hr{border:0;border-top:1px solid var(--line);margin:25px 0}
.message-actions{grid-column:1;margin-top:4px;display:flex;align-items:center;gap:4px;font-size:13px;color:#6a6f78}
.action-btn{border:0;background:transparent;border-radius:999px;width:26px;height:26px;display:inline-grid;place-items:center;color:#6a6f78;padding:0;transition:transform 120ms ease,background 120ms ease,border-color 120ms ease,color 120ms ease}
.action-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.action-btn:hover{transform:translateY(-1px);background:#f9fafc}
.action-btn[aria-pressed="true"]{background:#e9efff;color:#2944af}
.workspace-chart{display:block;max-width:100%;height:auto;border-radius:12px;margin:16px 0}
.message-result,.result-artifacts{min-width:0;max-width:100%}
.result-chart{margin:18px 0 22px}
.result-chart a{display:block;width:fit-content;max-width:100%;cursor:zoom-in}
.result-chart .workspace-chart{margin:0;border:1px solid var(--line)}
.result-chart figcaption{margin-top:8px;font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.thinking{display:inline-flex;align-items:flex-start;gap:10px;color:#6f6f6b;line-height:1.72;font-size:15px;margin:2px 0 15px;animation:thinking-appear .18s ease-out}
@keyframes thinking-appear{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.thinking{animation:none}}
.thinking img{width:24px;height:24px;flex:0 0 24px;margin-top:2px}
.task-process{margin:0 0 18px;min-width:0;line-height:1.8}
.task-process summary{cursor:pointer;width:fit-content;max-width:100%;padding:3px 0;color:#777;user-select:none;font-size:13px;overflow-wrap:anywhere}
.task-process[data-state="running"]>summary{display:none}
.timeline-items{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.timeline-report,.timeline-answer_candidate{font-size:15px;color:var(--ink);line-height:1.8;margin:5px 0}
.timeline-report>:first-child,.timeline-answer_candidate>:first-child{margin-top:0}
.timeline-report>:last-child,.timeline-answer_candidate>:last-child{margin-bottom:0}
.timeline-status{font-size:13px;color:#777}
.timeline-detail{font-size:12px;color:#898989;border-left:1px solid #e6e6e6;padding:7px 12px;margin:3px 0 3px 7px;white-space:pre-wrap;overflow-wrap:anywhere}
.timeline-group>div{margin:6px 0 4px 8px;border-left:1px solid #e6e6e6;padding-left:14px}
.timeline-step[data-state="failed"]>summary,.timeline-step[data-state="interrupted"]>summary{color:#a04436}
.timeline-step[data-state="waiting_user"]>summary,.task-process[data-state="paused"]>summary{color:#946b28}
.timeline-approval{font-size:15px;margin-top:12px}
.is-latest{position:relative;overflow:hidden}
.is-latest:after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 20%,#ffffffa8 50%,transparent 80%);transform:translateX(-110%);animation:stage-shimmer 2s ease-in-out infinite;pointer-events:none}
@keyframes stage-shimmer{to{transform:translateX(110%)}}
.is-typing:after{content:"";display:inline-block;width:2px;height:1em;background:#777;vertical-align:-.1em;margin-left:3px;animation:typing-caret 1s steps(2,start) infinite}
@keyframes typing-caret{to{opacity:0}}
@media(prefers-reduced-motion:reduce){.is-latest:after,.is-typing:after{animation:none;display:none}}
.auth-checking{display:none;text-align:center;padding:30dvh 24px;color:#888}
.auth-checking button{margin-top:16px;text-decoration:underline;text-underline-offset:4px}
[data-view="checking"] .key-view,[data-view="checking"] .chat-view{display:none}
[data-view="checking"] .auth-checking{display:block}
.monitor-notices:empty{display:none}
.monitor-notices{max-width:736px;margin:10px auto;padding:0 12px;color:#765c36;font-size:12px}
.monitor-notices p{padding:10px 14px;background:#faf5ed;border-radius:10px;line-height:1.6}
.conversation-empty .monitor-notices{position:relative;z-index:1}
.key-view{text-align:center;display:flex;align-items:center;flex-direction:column;padding:23dvh 24px 60px}
.login-logo{object-fit:contain;margin-bottom:18px}
.key-view h1{font-size:27px;font-weight:450;letter-spacing:-.5px;margin:0 0 16px}
.key-view>p{color:#888;font-size:13px;line-height:1.8;margin:0 0 24px}
.login-button{background:#171717;color:white;border-radius:24px;padding:12px 30px;font-size:13px}
.auth-links{display:flex;gap:12px;font-size:12px;color:#888;margin:20px 0}
.auth-links a:hover{text-decoration:underline}
.key-view .key-error{color:#926451}
.sidebar-backdrop{display:none}
body.sidebar-collapsed{--sidebar:0px}
.sidebar-collapsed .sidebar{display:none}
.sidebar-collapsed .sidebar-open{display:flex}
@media(max-width:760px){
  :root{--sidebar:0px}
  .sidebar{display:none;width:260px}
  .sidebar-open{display:flex;left:12px}
  .sidebar-mobile-open .sidebar{display:flex}
  body.sidebar-mobile-open{overflow:hidden}
  .sidebar-mobile-open .sidebar-backdrop{display:block;position:fixed;inset:0;background:#0004;z-index:35}
  .topbar{height:58px}
  .shell{padding-top:58px}
  .conversation-menu-button{right:12px;top:13px}
  .conversation-menu{right:12px;top:50px}
  .mode-switch{font-size:12px}
  .mode-switch>span,.mode-switch>a{padding:6px 16px}
  .welcome{top:33dvh}
  .welcome h1{font-size:24px}
  .composer-dock{width:calc(100% - 24px);padding:12px 0 max(12px,env(safe-area-inset-bottom))}
  .conversation-empty .composer-dock{top:calc(33dvh + 59px);width:calc(100% - 28px)}
  .composer{gap:5px}
  .composer textarea{font-size:16px}
  .composer-footnote{font-size:9px}
  .messages{padding:23px 20px max(160px,calc(var(--composer-height,140px) + 40px))}
  .user .bubble{max-width:92%}
  .workspace-taskbar{flex-wrap:wrap;gap:7px}
  .prompt-menu{left:0}
  .key-view h1{font-size:24px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
