:root{--bg: #ffffff;--fg: #111827;--muted: #6b7280;--faint: #9ca3af;--line: #e5e7eb;--line-soft: #f3f4f6;--accent: #2563eb;--accent-soft: #eff6ff;--danger: #dc2626;--danger-soft: #fef2f2;--warn: #b45309;--warn-soft: #fffbeb;--text-xs: .6875rem;--text-sm: .75rem;--text-base: .8125rem;--text-lg: .9375rem;--text-xl: 1.125rem;--radius: .375rem;--radius-sm: .25rem}*{box-sizing:border-box}html,body{margin:0;height:100%;background:var(--bg);color:var(--fg);font-family:ui-sans-serif,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:var(--text-base);line-height:1.5;-webkit-font-smoothing:antialiased}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}code,pre,.mono{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace;font-size:var(--text-sm)}h1{font-size:var(--text-xl);font-weight:600;margin:0 0 .25rem}.lede{color:var(--muted);font-size:var(--text-sm);margin:0 0 1.5rem}table{width:100%;border-collapse:collapse;font-size:var(--text-sm)}th{text-align:left;font-weight:500;color:var(--muted);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.04em;padding:.5rem .75rem;border-bottom:1px solid var(--line)}td{padding:.625rem .75rem;border-bottom:1px solid var(--line-soft);vertical-align:middle}button{font:inherit;font-size:var(--text-sm);height:2.25rem;padding:0 .875rem;border:1px solid var(--fg);border-radius:var(--radius-sm);cursor:pointer;background:var(--fg);color:#fff;font-weight:500}button:hover{background:#000}button.secondary{background:var(--bg);color:var(--fg);border-color:var(--line)}button.secondary:hover{background:var(--line-soft)}.hint{color:var(--muted);font-size:var(--text-xs);margin:.375rem 0 0}.field{display:flex;flex-direction:column;gap:.25rem;min-width:0}.field>label{font-size:var(--text-xs);color:var(--muted)}input{font:inherit;font-size:var(--text-sm);height:2.25rem;padding:0 .625rem;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--bg);color:var(--fg)}input:focus{outline:2px solid var(--accent-soft);border-color:var(--accent)}.auth-page{height:100vh;display:flex;align-items:center;justify-content:center;background:var(--bg)}.auth-card{width:20rem}.auth-card img{height:2rem;margin-bottom:1.5rem}.auth-card .field{margin-bottom:.75rem}.auth-card button{width:100%;height:2.5rem;margin-top:.5rem}.auth-error{background:var(--danger-soft);border:1px solid #fecaca;color:var(--danger);border-radius:var(--radius-sm);padding:.5rem .625rem;font-size:var(--text-sm);margin-bottom:.75rem}.callout{border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:var(--radius);padding:.875rem 1rem;margin:1rem 0;font-size:var(--text-sm)}.callout.warn{border-left-color:var(--warn);background:var(--warn-soft)}.callout p{margin:.25rem 0}.callout .title{font-weight:600;margin-bottom:.25rem}.shell{display:flex;height:100vh}.sidebar{display:flex;flex-direction:column;width:11rem;flex:0 0 11rem;border-right:1px solid var(--line);background:var(--bg)}.sidebar .brand{padding:1rem}.sidebar .brand img{height:1.75rem;width:auto;display:block}.sidebar .sep{height:1px;background:var(--line)}.sidebar .scope{padding:.625rem 1rem;display:flex;flex-direction:column;gap:.125rem;min-width:0}.sidebar .scope .label{font-size:var(--text-xs);color:var(--faint)}.sidebar .scope .value{font-size:var(--text-sm);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar .nav-label{padding:.5rem 1rem .25rem;font-size:var(--text-xs);color:var(--muted)}.sidebar nav{flex:1;padding:.5rem;overflow-y:auto}.nav-item{display:flex;align-items:center;gap:.75rem;width:100%;height:2.75rem;padding:0 .625rem;border-radius:var(--radius-sm);color:var(--fg);font-size:var(--text-sm);font-weight:400;transition:background-color .15s ease}.nav-item:hover{background:var(--accent-soft);text-decoration:none}.nav-item.active{background:var(--accent-soft);font-weight:600}.nav-item svg{width:1.125rem;height:1.125rem;flex:0 0 auto;stroke-width:1.75}.sidebar .footer{padding:.75rem;display:flex;flex-direction:column;gap:.375rem}.who{padding:.5rem .625rem;border-radius:var(--radius);background:var(--line-soft);min-width:0}.who .name{font-size:var(--text-sm);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.who .role{font-size:var(--text-xs);color:var(--muted)}.signout{display:flex;align-items:center;gap:.75rem;width:100%;height:2.5rem;padding:0 .625rem;border:0;background:none;border-radius:var(--radius-sm);color:var(--fg);font:inherit;font-size:var(--text-sm);cursor:pointer;transition:background-color .15s ease,color .15s ease}.signout:hover{background:var(--danger-soft);color:var(--danger)}.signout svg{width:1.125rem;height:1.125rem;stroke-width:1.75}.content{flex:1;overflow:hidden}.chat{display:flex;height:100%;min-height:0}.chat-list{display:flex;flex-direction:column;width:15rem;flex:0 0 15rem;border-right:1px solid var(--line);padding:.75rem;gap:.5rem;min-height:0}.new-chat{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%}.new-chat svg{width:.875rem;height:.875rem;stroke-width:2}.threads{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:.125rem}.thread{display:flex;align-items:center;border-radius:var(--radius-sm);padding-right:.25rem}.thread:hover{background:var(--line-soft)}.thread.active{background:var(--accent-soft)}.thread a{flex:1;min-width:0;padding:.4375rem .5rem;color:var(--fg);font-size:var(--text-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thread a:hover{text-decoration:none}.thread.active a{font-weight:600}.thread .delete{height:1.5rem;width:1.5rem;padding:0;display:flex;align-items:center;justify-content:center;border:0;background:none;color:var(--faint);opacity:0}.thread:hover .delete,.thread .delete:focus{opacity:1}.thread .delete:hover{background:var(--danger-soft);color:var(--danger)}.thread .delete svg{width:.8125rem;height:.8125rem;stroke-width:1.75}.thread-pane{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}.messages{flex:1;overflow-y:auto;padding:1.5rem 2rem}.messages>*{max-width:46rem;margin-left:auto;margin-right:auto}.chat-empty{padding:4rem 0 1rem}.chat-empty h1{font-size:1.375rem;margin-bottom:.5rem}.suggestions{list-style:none;padding:0;margin:1.5rem 0 0;display:grid;gap:.5rem}.suggestions li{border:1px solid var(--line);border-radius:var(--radius);padding:.625rem .75rem;font-size:var(--text-sm);color:var(--muted)}.msg{margin-bottom:1.5rem}.msg.user{display:flex;justify-content:flex-end}.msg.user .bubble{background:var(--line-soft);border-radius:1rem;padding:.5rem .875rem;max-width:80%;white-space:pre-wrap}.msg.assistant .bubble{font-size:var(--text-base);line-height:1.65}.msg.assistant .bubble>:first-child{margin-top:0}.msg.assistant .bubble>:last-child{margin-bottom:0}.msg.assistant .bubble p{margin:0 0 .75rem}.msg.assistant .bubble ul,.msg.assistant .bubble ol{margin:0 0 .75rem;padding-left:1.25rem}.msg.assistant .bubble li{margin-bottom:.25rem}.msg.assistant .bubble table{margin:0 0 .75rem}.msg.assistant .bubble pre{background:var(--line-soft);border:1px solid var(--line);border-radius:var(--radius-sm);padding:.625rem .75rem;overflow-x:auto;margin:0 0 .75rem}.msg.assistant .bubble code{background:var(--line-soft);padding:.0625rem .25rem;border-radius:.1875rem}.msg.assistant .bubble pre code{background:none;padding:0}.bubble.thinking{color:var(--muted);font-style:italic}.bubble.error{background:var(--danger-soft);border:1px solid #fecaca;color:var(--danger);border-radius:var(--radius-sm);padding:.5rem .625rem;font-size:var(--text-sm)}.tools{display:flex;flex-wrap:wrap;gap:.25rem;margin-bottom:.5rem}.tool{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:var(--text-xs);color:var(--muted);background:var(--line-soft);border:1px solid var(--line);border-radius:9999px;padding:.0625rem .5rem}.composer{display:flex;align-items:flex-end;gap:.5rem;width:100%;max-width:46rem;margin:0 auto;padding:.75rem 2rem 1.5rem}.composer textarea{flex:1;font:inherit;font-size:var(--text-base);resize:none;padding:.625rem .75rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);color:var(--fg);max-height:12.5rem;overflow-y:auto}.composer textarea:focus{outline:2px solid var(--accent-soft);border-color:var(--accent)}.composer button{height:2.5rem;width:2.5rem;padding:0;display:flex;align-items:center;justify-content:center;border-radius:var(--radius)}.composer button svg{width:1rem;height:1rem;stroke-width:1.75}.composer button:disabled{opacity:.4;cursor:default}
