.chat-shell{--chat-sidebar-bg:color-mix(in srgb, var(--paper-light) 55%, var(--paper));--chat-sidebar-hover:color-mix(in srgb, var(--paper) 55%, var(--line));--chat-user-bubble:color-mix(in srgb, var(--line) 24%, var(--paper-light));--chat-composer-line:color-mix(in srgb, var(--line) 80%, var(--ink) 6%);--chat-placeholder:var(--muted);--chat-content-inset:clamp(24px, 3vw, 40px);grid-template-columns:var(--chat-sidebar-width,264px) minmax(0, 1fr);height:calc(100dvh - var(--site-header-height,60px) - 40px);border-top:1px solid var(--line);min-height:0;font-family:var(--sans);display:grid}body:has(.chat-shell) .site-footer{border:0;gap:0;max-width:none;height:40px;margin:0;padding:8px 16px;display:flex}body:has(.chat-shell) .site-footer>:not(.footer-registration){display:none}:is(html:has(.chat-shell),body:has(.chat-shell)){overflow-x:clip}.chat-sidebar{background:var(--chat-sidebar-bg);border-right:1px solid var(--line);flex-direction:column;min-height:0;padding:24px 16px 16px;display:flex;position:relative;overflow:hidden auto}.chat-sidebar-actions{justify-content:space-between;align-items:center;gap:8px;display:flex}.chat-sidebar-actions .chat-new-button{flex:none;min-width:0}.chat-new-button{color:var(--ink);text-align:left;background:0 0;border:0;border-radius:6px;align-items:center;gap:8px;min-height:36px;padding:0 10px;font-size:13px;transition:background .16s,color .16s;display:flex}.chat-new-button:hover:not(:disabled){background:var(--chat-sidebar-hover);color:var(--accent)}.chat-new-button:disabled{opacity:.5}.chat-history-label{color:var(--muted);letter-spacing:.22em;margin:26px 10px 10px;font-size:10px}.chat-history-list{scrollbar-width:thin;flex:1;min-height:0;margin:0;padding:0;list-style:none;overflow-y:auto}.chat-history-list li{border-radius:4px;align-items:center;margin-bottom:2px;display:flex}.chat-history-list li:hover,.chat-history-list li.is-active{background:var(--chat-sidebar-hover)}.chat-history-list li.is-active .chat-history-item{color:var(--accent)}.chat-history-item{text-align:left;min-width:0;color:var(--ink);background:0 0;border:0;flex:1;padding:10px 12px;transition:color .16s}.chat-history-item>span{text-overflow:ellipsis;white-space:nowrap;font-size:13px;display:block;overflow:hidden}.chat-history-item small{color:var(--muted);margin-top:3px;font-size:10px;display:block}.chat-icon-button{min-width:44px;min-height:44px;color:var(--muted);background:0 0;border:0;border-radius:5px;justify-content:center;align-items:center;transition:background .16s,color .16s;display:inline-flex}.chat-icon-button:hover:not(:disabled){background:var(--chat-sidebar-hover);color:var(--accent)}.chat-delete{min-width:44px}.chat-history-empty{color:var(--muted);padding:12px;font-size:12px}.chat-history-blank{text-align:center;color:var(--muted);flex-direction:column;flex:1;justify-content:center;align-items:center;padding:30px 12px;display:flex}.chat-history-blank svg{color:var(--muted);margin-bottom:16px}.chat-history-blank h3{font-family:var(--serif);color:var(--ink);margin:0 0 10px;font-size:17px;font-weight:500}.chat-history-blank p{margin:0 0 18px;font-size:12px;line-height:1.9}.chat-workspace{background:var(--paper-light);flex-direction:column;min-width:0;min-height:0;display:flex}.chat-toolbar{flex-shrink:0;align-items:center;gap:10px;min-height:44px;padding:0 24px;display:none}.chat-toolbar.has-title,.chat-shell.is-collapsed .chat-toolbar{display:flex}.chat-toolbar.has-title{border-bottom:1px solid var(--line);min-height:44px}.chat-toolbar h1{min-width:0;font-family:var(--sans);letter-spacing:.06em;color:var(--muted);text-overflow:ellipsis;white-space:nowrap;flex:1;margin:0;font-size:13px;font-weight:400;overflow:hidden}.chat-sidebar-close,.chat-history-toggle,.chat-mobile-new,.chat-backdrop{display:none}.chat-sidebar.is-open .chat-sidebar-close{display:inline-flex}.chat-workspace .chat-icon-button:hover:not(:disabled){background:var(--chat-sidebar-hover)}.chat-viewport{overscroll-behavior:contain;min-height:0;padding:24px var(--chat-content-inset);flex:1;overflow-y:auto}.chat-viewport.is-empty{flex-direction:column;display:flex}.chat-loading{color:var(--muted);font-size:13px}.chat-welcome{flex-direction:column;flex:1;min-height:0;display:flex}.chat-welcome-intro{flex-shrink:0;padding-top:clamp(8px,3vh,24px)}.chat-welcome h1{font-family:var(--serif);letter-spacing:.04em;overflow-wrap:anywhere;min-width:0;margin:12px 0;font-size:clamp(28px,2.6vw,32px);font-style:normal;font-weight:400;line-height:1.4}.chat-welcome-copy{color:var(--muted);margin:0;font-size:14px;line-height:2}.chat-composer{border:1px solid var(--chat-composer-line);background:var(--paper-light);border-radius:10px;padding:12px 16px 8px;transition:border-color .16s}.chat-composer:focus-within{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:3px}.chat-composer textarea{width:100%;color:var(--ink);font-family:var(--sans);resize:vertical;background:0 0;border:0;outline:none;min-height:56px;max-height:160px;padding:0 2px;font-size:16px;line-height:1.7}.chat-composer textarea::placeholder{color:var(--chat-placeholder)}.chat-composer textarea:focus-visible{outline:none}.chat-composer textarea:disabled{opacity:.55}.chat-compose-actions{align-items:center;gap:12px;margin-top:8px;display:flex}.chat-compose-mark{color:var(--muted);align-items:center;gap:7px;font-size:11px;display:inline-flex}.chat-compose-mark svg{color:var(--accent)}.chat-compose-status{font-family:var(--serif);color:var(--muted);flex:1;font-size:12px}.chat-compose-status:empty{display:none}.chat-send,.chat-login-button{margin-left:auto}.chat-send{background:var(--accent);color:var(--paper-light);border:0;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;transition:background .16s,transform .16s;display:inline-flex}.chat-send:hover:not(:disabled){background:color-mix(in srgb, var(--accent) 86%, var(--ink))}.chat-send:active:not(:disabled){transform:scale(.96)}.chat-send:disabled{background:var(--line);color:var(--muted);cursor:default;opacity:1}.chat-login-button{white-space:nowrap;min-height:32px;color:var(--accent);border:0;border-radius:4px;align-items:center;gap:6px;padding:0 4px;font-size:12px;transition:color .16s;display:inline-flex}.chat-login-button:hover{color:var(--ink);text-underline-offset:4px;text-decoration:underline}.chat-compose-helper{min-height:24px;padding-top:8px}.chat-enter-hint{color:var(--muted);letter-spacing:.04em;margin:0 2px;font-size:11px}.chat-error,.chat-service-note{margin:0 0 10px;font-size:12px}.chat-service-note{color:var(--muted);margin:0 2px}.chat-compose-area{padding:16px var(--chat-content-inset);background:var(--paper-light);border-top:1px solid var(--line);flex-shrink:0}.chat-starters{margin-top:auto;padding-top:24px}.chat-starters-label{letter-spacing:.16em;color:var(--muted);margin:0 0 8px;font-size:11px}.chat-starters-row{flex-wrap:wrap;gap:8px;display:flex}.chat-starters-row button{border:1px solid var(--line);text-align:left;background:0 0;border-radius:6px;align-items:center;gap:6px;min-height:36px;padding:0 12px;transition:border-color .16s,color .16s;display:inline-flex}.chat-starter-text{color:var(--ink);font-size:13px;line-height:1.5;transition:color .16s}.chat-starter-arrow{color:var(--muted);transition:transform .18s var(--ease), color .16s;flex-shrink:0}.chat-starters-row button:hover{border-color:var(--accent)}.chat-starters-row button:hover .chat-starter-text{color:var(--accent)}.chat-starters-row button:hover .chat-starter-arrow{color:var(--accent);transform:translate(1px,-1px)}.chat-messages{width:100%;min-width:0}.chat-turn{margin-bottom:44px}.chat-turn:last-child{margin-bottom:0}.chat-user{justify-content:flex-end;margin-bottom:26px;display:flex}.chat-user p{background:var(--chat-user-bubble);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:14px 14px 4px;max-width:85%;margin:0;padding:13px 19px;font-size:14px;line-height:1.9}.chat-assistant{display:block}.chat-answer-brand{letter-spacing:.2em;color:var(--ink);align-items:center;gap:7px;margin:0 0 12px;font-size:11px;display:flex}.chat-answer-brand svg{color:var(--accent)}.chat-answer-body{min-width:0}.chat-answer-block p{font-family:var(--serif);overflow-wrap:anywhere;margin:0 0 16px;font-size:16px;line-height:1.95}.chat-answer-sources{border-top:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:22px;padding-top:12px;font-size:12px;display:flex}.chat-answer-sources>span{color:var(--muted);font-size:11px}.chat-answer-sources a{color:var(--accent)}.chat-answer-sources a:hover{text-underline-offset:3px;text-decoration:underline}.chat-copy{color:var(--muted);background:0 0;border:0;align-items:center;gap:6px;min-height:44px;margin-top:4px;padding:0;font-size:12px;transition:color .16s;display:flex}.chat-copy:hover{color:var(--accent)}.chat-stage{color:var(--muted);align-items:center;gap:8px;font-size:12px;display:flex}.chat-thinking-dot{background:var(--accent);border-radius:50%;width:6px;height:6px;animation:1.4s ease-in-out infinite chat-breathe}.chat-revision-note{color:var(--muted);margin:8px 0 0;font-size:11px}@keyframes chat-breathe{50%{opacity:.35}}.chat-shell button:focus-visible,.chat-shell a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.chat-shell button:active:not(:disabled),.chat-shell a:active{color:var(--accent)}.chat-shell .chat-send:active:not(:disabled){color:var(--paper-light)}.chat-shell button:disabled{cursor:not-allowed}.chat-shell.is-collapsed{grid-template-columns:minmax(0,1fr)}.chat-shell.is-collapsed .chat-sidebar,.chat-desktop-open{display:none}.chat-shell.is-collapsed .chat-desktop-open{display:inline-flex}.chat-shell.is-collapsed .chat-mobile-new{margin-left:auto;display:inline-flex}.chat-resize-handle{cursor:col-resize;z-index:3;touch-action:none;width:10px;position:absolute;top:0;bottom:0;right:-5px}.chat-resize-handle:after{content:"";background:var(--accent);opacity:0;width:2px;transition:opacity .15s;position:absolute;top:0;bottom:0;left:4px}.chat-resize-handle:hover:after,.chat-resize-handle:focus-visible:after{opacity:.65}.chat-shell.is-resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.chat-shell.is-resizing .chat-resize-handle:after{opacity:.65}@media (max-width:760px){.chat-shell{--chat-content-inset:16px;height:calc(100dvh - var(--site-header-height,88px) - 40px);min-height:0;display:block}.chat-workspace{height:100%}.chat-sidebar{z-index:60;width:min(300px,85vw);box-shadow:8px 0 32px color-mix(in srgb, var(--ink) 14%, transparent);display:none;position:fixed;inset:0 auto 0 0}.chat-sidebar.is-open{display:flex}.chat-sidebar-close,.chat-history-toggle,.chat-mobile-new{display:inline-flex}.chat-backdrop{background:color-mix(in srgb, var(--ink) 26%, transparent);z-index:59;border:0;display:block;position:fixed;inset:0}.chat-toolbar{min-height:52px;padding:4px 12px;display:flex}.chat-toolbar h1{flex:1}.chat-viewport{padding:16px var(--chat-content-inset)}.chat-welcome-intro{padding-top:8px}.chat-welcome h1{font-size:24px}.chat-welcome-copy{font-size:14px}.chat-composer textarea{min-height:64px;font-size:16px}.chat-login-button{min-height:44px;padding-inline:4px}.chat-new-button{min-height:44px}.chat-enter-hint{display:none}.chat-starters{padding-top:20px}.chat-starters-row{gap:8px}.chat-starters-row button{min-height:44px}.chat-starter-text{font-size:13px}.chat-compose-area{padding:12px var(--chat-content-inset) max(12px, env(safe-area-inset-bottom))}.chat-user p{max-width:92%;padding:11px 15px}.chat-answer-block p{font-size:15.5px}.chat-shell.is-collapsed{display:block}.chat-shell.is-collapsed .chat-sidebar.is-open{display:flex}.chat-desktop-collapse,.chat-desktop-open,.chat-shell.is-collapsed .chat-desktop-open,.chat-resize-handle{display:none}.chat-mobile-new{margin-left:auto}}@media (prefers-reduced-motion:reduce){.chat-thinking-dot{animation:none}.chat-shell *,.chat-shell :after{transition:none}.chat-starters-row button:hover .chat-starter-arrow,.chat-send:active:not(:disabled){transform:none}}
