.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.shell:has(.chat-page){width:min(1440px,100%);padding:0;height:calc(100vh - 78px);overflow:hidden}
.chat-page{display:grid;grid-template-columns:270px minmax(0,1fr);height:100%;background:rgba(247,245,241,.78);border-inline:1px solid var(--line)}
.chat-sidebar{display:flex;flex-direction:column;min-width:0;padding:18px 12px;border-right:1px solid var(--line);background:rgba(235,232,226,.88)}
.chat-sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:2px 8px 14px}.chat-sidebar-head strong{font-size:16px}.chat-icon-button{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:var(--ink-soft);cursor:pointer}.chat-icon-button:hover{background:rgba(255,255,255,.8)}.chat-icon-button svg,.chat-new svg,.chat-message-actions svg,.chat-sources svg,.chat-send svg,.chat-prompts svg{width:19px;height:19px;flex:none}
.chat-new{display:flex;align-items:center;gap:9px;min-height:46px;padding:0 13px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-weight:750;cursor:pointer}.chat-conversation-list{display:flex;flex-direction:column;gap:4px;margin-top:14px;overflow-y:auto}.chat-conversation{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;align-items:center;border-radius:11px}.chat-conversation.active{background:rgba(255,255,255,.86)}.chat-conversation>button:first-child{min-width:0;padding:10px;border:0;background:transparent;text-align:left;cursor:pointer}.chat-conversation strong,.chat-conversation span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-conversation strong{font-size:13px}.chat-conversation span{margin-top:2px;color:var(--muted);font-size:11px}.chat-row-action{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:9px;background:transparent;color:var(--muted);cursor:pointer;opacity:0}.chat-row-action svg{width:16px;height:16px}.chat-conversation:hover .chat-row-action,.chat-row-action:focus-visible{opacity:1}.chat-no-history{padding:20px 10px;color:var(--muted);font-size:12px}
.chat-main{position:relative;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;min-width:0;background:rgba(255,255,255,.54)}.chat-header{display:flex;align-items:center;gap:10px;min-height:65px;padding:9px 22px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.72);backdrop-filter:blur(14px)}.chat-header strong,.chat-header span{display:block}.chat-header strong{font-size:14px}.chat-header span{color:var(--muted);font-size:11px}.chat-mobile-menu,.chat-mobile-close{display:none}.chat-status{min-height:28px;padding:5px 24px;color:var(--muted);font-size:12px;text-align:center}
.chat-feed{min-height:0;padding:20px max(22px,calc((100% - 820px)/2)) 42px;overflow-y:auto;scroll-padding-bottom:150px;overscroll-behavior:contain}.chat-empty{display:grid;place-items:center;max-width:700px;margin:9vh auto 0;text-align:center}.chat-empty-mark{display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:linear-gradient(135deg,#35414b,#69747e);color:#fff;font-size:14px;font-weight:850;letter-spacing:.12em;box-shadow:0 12px 28px rgba(46,53,62,.18)}.chat-empty h1{margin:18px 0 8px;font-size:clamp(26px,4vw,40px);line-height:1.2;letter-spacing:-1px}.chat-empty>p{margin:0;color:var(--ink-soft)}.chat-prompts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;margin-top:28px}.chat-prompts button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;padding:12px 15px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.76);color:var(--ink-soft);text-align:left;cursor:pointer}.chat-prompts button:hover{border-color:rgba(201,98,43,.45);background:#fff}
.chat-message{max-width:820px;margin:0 auto 30px;overflow-wrap:anywhere}.chat-user{display:flex;justify-content:flex-end}.chat-user>div{max-width:75%;padding:10px 15px;border-radius:16px 16px 4px 16px;background:#e9e4dd;color:var(--ink)}.chat-message p{margin:0 0 12px}.chat-message p:last-child{margin-bottom:0}.chat-message ul{margin:5px 0 14px;padding-left:22px}.chat-message li{margin:4px 0}.chat-assistant{font-size:16px;line-height:1.75}.chat-assistant>header{display:flex;align-items:center;gap:10px;margin-bottom:9px}.chat-assistant>header>span{font-size:13px;font-weight:850}.chat-answer h3{margin:18px 0 8px;font-size:17px}.chat-thinking{display:inline-flex;align-items:center;color:var(--muted)}.chat-thinking:after{content:' ';width:16px;height:16px;margin-left:9px;border:2px solid #d8d5cf;border-top-color:var(--orange-deep);border-radius:50%;animation:spin .8s linear infinite}.chat-paragraph-gap{height:5px}.chat-inline-citation{padding:0 2px;border:0;background:transparent;color:var(--blue);font-size:.8em;font-weight:750;cursor:pointer}.chat-safety-badge{padding:3px 8px;border-radius:999px;background:#fff1df;color:#9a5420;font-size:11px}.chat-safety-badge.blocked{background:var(--red-bg);color:var(--red)}.chat-message-note{color:var(--muted);font-size:12px}.chat-message-note.error{color:var(--red)}
.chat-sources{display:flex;flex-wrap:wrap;gap:7px;margin-top:16px}.chat-sources button{display:flex;align-items:center;gap:6px;max-width:260px;min-height:36px;padding:6px 9px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.74);color:var(--ink-soft);font-size:11px;cursor:pointer}.chat-sources span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-analysis{margin-top:14px;border:1px solid var(--line);border-radius:12px;background:rgba(248,246,242,.72)}.chat-analysis summary{display:flex;align-items:center;gap:10px;min-height:44px;padding:9px 12px;cursor:pointer;font-size:12px;font-weight:750}.chat-analysis summary span{margin-left:auto;color:var(--muted);font-weight:500}.chat-analysis dl{display:grid;gap:0;margin:0;padding:0 12px 12px}.chat-analysis dl>div{display:grid;grid-template-columns:110px 1fr;gap:12px;padding:9px 0;border-top:1px solid var(--line)}.chat-analysis dt{color:var(--muted);font-size:11px;font-weight:700}.chat-analysis dd{margin:0;color:var(--ink-soft);font-size:12px}.chat-message-actions{display:flex;gap:8px;margin-top:10px}.chat-message-actions button{display:flex;align-items:center;gap:6px;min-height:36px;padding:5px 8px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:12px;cursor:pointer}.chat-message-actions button:hover{background:#eeebe6;color:var(--ink)}
.chat-composer{width:min(820px,calc(100% - 36px));margin:0 auto max(16px,env(safe-area-inset-bottom));padding:10px 12px 7px;border:1px solid rgba(66,73,81,.18);border-radius:18px;background:rgba(255,255,255,.94);box-shadow:0 16px 36px rgba(43,48,54,.13)}.chat-composer textarea{display:block;width:100%;max-height:200px;padding:2px 3px;border:0;outline:0;resize:none;background:transparent;color:var(--ink);font-size:16px;line-height:1.55}.chat-composer-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:5px}.chat-composer-foot>span{color:var(--muted);font-size:10px}.chat-send{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:12px;background:var(--ink);color:#fff;cursor:pointer}.chat-send:hover{background:#3b424b}.chat-composer:focus-within{border-color:var(--orange);box-shadow:0 0 0 3px rgba(237,139,69,.12),0 16px 36px rgba(43,48,54,.13)}
.chat-source-drawer{position:fixed;z-index:70;top:78px;right:0;bottom:0;width:min(390px,100%);padding:18px 22px;background:#fff;box-shadow:-20px 0 50px rgba(43,48,54,.16);transform:translateX(105%);transition:transform .2s ease;overflow-y:auto}.chat-source-drawer.open{transform:translateX(0)}.chat-source-drawer>.chat-icon-button{margin-left:auto}.chat-source-drawer h2{font-size:20px}.chat-source-drawer p{color:var(--ink-soft);font-size:13px;overflow-wrap:anywhere}.chat-source-drawer blockquote{margin:18px 0;padding:14px;border-left:4px solid var(--orange);background:#f6f3ee;color:var(--ink-soft);font-size:13px}.chat-sidebar-backdrop{display:none}
.chat-loading{padding:80px 20px;justify-content:center}.chat-icon-button:focus-visible,.chat-new:focus-visible,.chat-conversation button:focus-visible,.chat-prompts button:focus-visible,.chat-send:focus-visible,.chat-sources button:focus-visible,.chat-message-actions button:focus-visible,.chat-analysis summary:focus-visible,.chat-inline-citation:focus-visible{outline:2px solid var(--orange-deep);outline-offset:2px}
@media(max-width:800px){.shell:has(.chat-page){width:100%;height:calc(100dvh - 68px)}.chat-page{grid-template-columns:1fr}.chat-sidebar{position:fixed;z-index:80;top:68px;bottom:0;left:0;width:min(310px,86vw);transform:translateX(-105%);transition:transform .2s ease;box-shadow:18px 0 45px rgba(43,48,54,.2)}.chat-page.sidebar-open .chat-sidebar{transform:translateX(0)}.chat-sidebar-backdrop{position:fixed;z-index:75;inset:68px 0 0;display:block;border:0;background:rgba(24,28,33,.32);opacity:0;pointer-events:none;transition:opacity .2s}.chat-page.sidebar-open .chat-sidebar-backdrop{opacity:1;pointer-events:auto}.chat-mobile-menu,.chat-mobile-close{display:grid}.chat-header{padding-inline:10px}.chat-feed{padding:16px 14px 30px}.chat-composer{width:calc(100% - 20px);margin-bottom:max(10px,env(safe-area-inset-bottom))}.chat-empty{margin-top:5vh}.chat-prompts{grid-template-columns:1fr}.chat-user>div{max-width:88%}.chat-source-drawer{top:68px}.chat-analysis dl>div{grid-template-columns:1fr;gap:2px}.chat-sources button,.chat-message-actions button{min-height:44px}}
@media(max-width:480px){.chat-empty h1{font-size:27px}.chat-empty>p{font-size:14px}.chat-prompts button{min-height:58px}.chat-message{margin-bottom:24px}.chat-assistant{font-size:15px}.chat-status{padding-inline:10px}}
@media(hover:none){.chat-row-action{opacity:1}}
@media(prefers-reduced-motion:reduce){.chat-sidebar,.chat-sidebar-backdrop,.chat-source-drawer{transition:none}.chat-thinking:after{animation-duration:1.8s}}
.shell:has(.chat-page),.chat-page,.chat-sidebar,.chat-main,.chat-conversation-list{min-height:0}
.chat-page,.chat-sidebar,.chat-main{overflow:hidden}
.chat-main{width:100%;height:100%}
.chat-composer{position:relative;z-index:2}
@media print{.chat-page{display:block}.chat-sidebar,.chat-composer,.chat-message-actions,.chat-header button,.chat-source-drawer{display:none!important}.shell:has(.chat-page){height:auto;overflow:visible}.chat-feed{overflow:visible}}
