:root{color-scheme:dark;--bg:#111817;--panel:#17201e;--line:#2a3430;--muted:#9ca9a1;--ink:#eff2e9;--accent:#c2ef9c;--error:#ffb0a5;font-family:Segoe UI,system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;display:flex;height:100dvh;background:var(--bg);color:var(--ink)}button,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}.sidebar{width:260px;flex-shrink:0;background:#0c1211;border-right:1px solid var(--line);padding:32px 22px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;font-size:25px;font-weight:650;color:var(--ink);text-decoration:none;letter-spacing:-1px}.brand-mark{display:grid;place-items:center;border:1px solid #80a75f;border-radius:11px;width:39px;height:39px;color:var(--accent);font-size:23px}.brand-light{font-weight:350}.personal-label,.section-label,.eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:600}.personal-label{color:#7d9083;margin-top:16px}.new-chat{background:#202d24;color:var(--accent);border:1px solid #364d30;border-radius:9px;padding:13px 12px;text-align:left;margin:36px 0 29px;display:flex;gap:12px;align-items:center}.section-label{color:#718077;margin-bottom:12px}#history{overflow-y:auto;flex:1}.history-item{display:block;width:100%;padding:11px 10px;border:0;background:none;color:var(--muted);border-radius:7px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.history-item.selected{background:#1b2520;color:var(--ink)}.history-item:hover{background:#1b2520}.sidebar-footer{color:#aab6ae;font-size:12px;line-height:2;margin-top:24px}.machine-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:6px}.text-button{border:0;background:none;color:var(--muted);padding:0;font-size:12px}.text-button:hover{color:var(--accent)}main{flex:1;min-width:0;display:flex;flex-direction:column}header{height:85px;border-bottom:1px solid var(--line);padding:0 42px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.header-title{font-size:15px;font-weight:600}.header-tag{font-size:9px;color:var(--muted);letter-spacing:1.3px;margin-left:20px}.conversation{flex:1;overflow:auto;padding:35px max(30px,calc((100% - 790px)/2));scroll-behavior:smooth}.welcome{padding-top:clamp(10px,5vh,70px);max-width:690px;margin:auto}.eyebrow{color:var(--accent);margin-bottom:22px}.welcome h1{font-size:clamp(34px,4.3vw,59px);font-weight:450;letter-spacing:-2px;line-height:1.08;margin:0 0 23px}.welcome p{font-size:16px;color:#acb8af;line-height:1.7}.suggestions{display:flex;gap:10px;margin-top:35px}.suggestions button{flex:1;text-align:left;color:#d6dfd5;background:#18211e;border:1px solid var(--line);padding:18px 15px;border-radius:10px;font-size:12px;line-height:1.5}.suggestions button span{float:right;color:var(--accent);margin-left:10px}.suggestions button:hover{border-color:#80a75f}.welcome-note{color:#6e8476;font-size:12px;margin-top:25px}.composer-area{width:min(790px,calc(100% - 60px));margin:16px auto 20px}#composer{background:#1c2621;border:1px solid #3c4c3d;border-radius:15px;padding:18px 18px 12px;box-shadow:0 5px 30px #0002}#composer:focus-within{border-color:#89a56d}textarea{resize:none;width:100%;max-height:160px;background:none;border:0;color:var(--ink);outline:0;font-size:15px;line-height:1.5}textarea::placeholder{color:#8b9e8e}.composer-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:12px}#activity{font-size:11px;color:#97aa97}#send{background:var(--accent);border:0;border-radius:9px;height:32px;width:34px;color:#1a2918;font-size:21px}#stop{background:#334133;border:1px solid #72816b;border-radius:8px;padding:6px 12px;color:var(--ink)}.footnote{text-align:center;color:#7d8d80;font-size:10px;line-height:1.8;margin:12px 0 0}.footnote button{font-size:10px}.message{margin:0 0 30px;line-height:1.7;font-size:15px}.message.user{margin-left:12%;background:#253126;border:1px solid #344032;border-radius:13px;padding:15px 19px}.speaker{font-size:10px;font-weight:650;letter-spacing:1.4px;color:#a4c58c;margin-bottom:9px}.user .speaker{color:#9cac99}.answer{white-space:pre-wrap;overflow-wrap:anywhere}.answer pre{white-space:pre-wrap;background:#0c1211;border:1px solid var(--line);border-radius:9px;padding:16px;overflow:auto;font-size:12px;font-family:Consolas,monospace}.answer p{margin:0 0 12px}details{border-left:2px solid #42543b;padding-left:13px;margin-bottom:18px;color:#9aac98;font-size:13px}summary{cursor:pointer;font-size:12px;color:#aec998;margin-bottom:10px}.thinking{white-space:pre-wrap;max-height:230px;overflow:auto;line-height:1.6;font-size:12px}.message-error{color:var(--error);font-size:12px;margin-top:12px}.message-meta{color:#8c9b8c;font-size:11px;margin-top:10px}.pulse::after{content:' ···';animation:pulse 1.2s infinite}@keyframes pulse{50%{opacity:.3}}#notice{margin:12px 30px 0;padding:12px 15px;border:1px solid #71624a;border-radius:8px;background:#2a281f;color:#e2d7b0;font-size:13px}dialog{max-width:520px;border:1px solid #475540;border-radius:16px;background:#18221c;color:var(--ink);padding:35px;line-height:1.6}dialog::backdrop{background:#0009}dialog h2{font-weight:500;font-size:28px}dialog p{color:#b5c2b4;font-size:13px}.dialog-close{float:right;background:none;border:0;color:var(--muted);font-size:25px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}@media(max-width:850px){.sidebar{width:200px;padding:25px 15px}.header-tag{display:none}header{padding:0 25px}.suggestions{flex-direction:column}.suggestions button{padding:12px 16px}.welcome h1{font-size:43px}}@media(max-width:600px){.sidebar{display:none}header{height:64px}.conversation{padding:25px 20px}.composer-area{width:calc(100% - 30px);margin-bottom:12px}.welcome{padding-top:12px}.welcome h1{font-size:39px}.welcome p{font-size:14px}.welcome-note{margin-top:16px}.message.user{margin-left:5%}.header-title::before{content:'K';border:1px solid #80a75f;padding:3px 7px;border-radius:5px;margin-right:10px;color:var(--accent)}header::after{content:''}.footnote{font-size:9px}.new-chat{margin:0}}@media(prefers-reduced-motion:reduce){.conversation{scroll-behavior:auto}.pulse::after{animation:none}}
.header-actions{display:flex;gap:18px}#new-chat-mobile{display:none}@media(max-width:600px){#new-chat-mobile{display:inline-block}.header-actions{gap:14px}}

/* Markdown layout shared by answers and streamed thinking. */
.answer,.thinking{white-space:normal;overflow-wrap:anywhere}
:is(.answer,.thinking)>:first-child{margin-top:0}
:is(.answer,.thinking)>:last-child{margin-bottom:0}
:is(.answer,.thinking) p{margin:0 0 .9em}
:is(.answer,.thinking) h1{font-size:1.6em}
:is(.answer,.thinking) h2{font-size:1.35em}
:is(.answer,.thinking) h3{font-size:1.15em}
:is(.answer,.thinking) h4,:is(.answer,.thinking) h5,:is(.answer,.thinking) h6{font-size:1em}
:is(.answer,.thinking) h1,:is(.answer,.thinking) h2,:is(.answer,.thinking) h3,:is(.answer,.thinking) h4,:is(.answer,.thinking) h5,:is(.answer,.thinking) h6{font-weight:600;line-height:1.35;margin:1.3em 0 .55em;color:var(--ink)}
:is(.answer,.thinking) ul,:is(.answer,.thinking) ol{padding-left:1.7em;margin:.6em 0 1em}
:is(.answer,.thinking) li{margin:.25em 0}
:is(.answer,.thinking) li p{margin:.3em 0}
:is(.answer,.thinking) li>ul,:is(.answer,.thinking) li>ol{margin:.25em 0}
:is(.answer,.thinking) blockquote{margin:1em 0;border-left:3px solid #73945d;padding:.2em 0 .2em 1em;color:var(--muted)}
:is(.answer,.thinking) blockquote p:last-child{margin-bottom:0}
:is(.answer,.thinking) a{color:var(--accent);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
:is(.answer,.thinking) code{font-family:Consolas,monospace;font-size:.9em;background:#0c1211;border-radius:4px;padding:.12em .35em;color:#d5e8c8}
:is(.answer,.thinking) pre{white-space:pre;background:#0c1211;border:1px solid var(--line);border-radius:9px;padding:16px;overflow-x:auto;max-width:100%;font-size:12px;line-height:1.6;margin:1em 0;tab-size:4}
:is(.answer,.thinking) pre code{font-size:inherit;padding:0;border-radius:0;background:none}
:is(.answer,.thinking) hr{border:0;border-top:1px solid var(--line);margin:1.4em 0}
.markdown-table{overflow-x:auto;margin:1em 0;border:1px solid var(--line);border-radius:8px}
.markdown-table table{border-collapse:collapse;width:100%;font-size:.9em}
.markdown-table th,.markdown-table td{padding:9px 12px;border-bottom:1px solid var(--line);border-right:1px solid var(--line);text-align:left;min-width:85px}
.markdown-table th{background:#233020;font-weight:600;color:#d3e5c9}
.markdown-table tr:last-child td{border-bottom:0}
.markdown-table th:last-child,.markdown-table td:last-child{border-right:0}
.markdown-table .align-center{text-align:center}
.markdown-table .align-right{text-align:right}
.markdown-table .align-left{text-align:left}
.markdown-image{font-style:italic;color:var(--muted)}
