:root{--bg:#F5F3EE;--surface:#FFFFFF;--sidebar:#FAF8F3;--border:#E6E3DC;--tx:#1C1B19;--tx2:#5C594F;--muted:#8C887E;--accent:#C8443C;--accent-h:#A8362F;--accent-soft:#FBEDEB;--ok:#2E7D5B;--ok-soft:#E6F2EC;--warn:#B5751A;--warn-soft:#FBF0DD;--danger:#C0392B;--danger-soft:#FBE9E7;--info:#2C5F7C;--sh-sm:0 1px 2px rgba(28,27,25,.05);--sh-md:0 4px 12px rgba(28,27,25,.08);--sh-pop:0 8px 24px rgba(28,27,25,.12)}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--tx);font-family:Inter,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px;line-height:24px;-webkit-font-smoothing:antialiased}button{font-family:inherit;cursor:pointer}a{color:var(--info);text-decoration:none}a:hover{text-decoration:underline}.serif{font-family:"Source Serif 4",Georgia,serif}.app{display:flex;height:100vh;overflow:hidden}.sidebar{width:280px;flex-shrink:0;background:var(--sidebar);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:14px}.main{flex:1;display:flex;flex-direction:column;min-width:0}.header{height:56px;flex-shrink:0;border-bottom:1px solid var(--border);background:#f5f3eecc;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);display:flex;align-items:center;gap:12px;padding:0 24px}.feedwrap{flex:1;overflow-y:auto}.feed{max-width:760px;margin:0 auto;padding:28px 32px}.composerwrap{flex-shrink:0;padding:0 24px 22px}.composer{max-width:760px;margin:0 auto}.brand{display:flex;align-items:center;gap:10px;padding:6px 6px 14px}.seal{width:30px;height:30px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:700;font-size:14px;box-shadow:var(--sh-sm)}.brand b{font-size:15px;letter-spacing:.2px}.newbtn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:40px;border:none;border-radius:10px;background:var(--tx);color:#fff;font-weight:600;font-size:14px;transition:background .15s}.newbtn:hover{background:#34322a}.grp{font-size:12px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.4px;margin:18px 8px 6px}.chats{flex:1;overflow-y:auto;margin:8px -4px 0}.chat{display:flex;align-items:center;gap:9px;height:40px;padding:8px 12px;border-radius:8px;color:var(--tx2);font-size:14px;cursor:pointer;transition:background .15s;border-left:3px solid transparent}.chat:hover{background:#f0ede6}.chat.active{background:var(--accent-soft);border-left-color:var(--accent);color:var(--tx);font-weight:500}.chat .t{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sidefoot{border-top:1px solid var(--border);padding-top:12px;margin-top:8px}.seg{display:inline-flex;background:#f0ede6;border-radius:8px;padding:3px;gap:2px}.seg button{border:none;background:transparent;color:var(--tx2);font-weight:600;font-size:13px;padding:5px 12px;border-radius:6px;transition:.15s}.seg button.on{background:#fff;color:var(--tx);box-shadow:var(--sh-sm)}.msg{margin:18px 0;animation:rise .25s ease-out}@keyframes rise{0%{opacity:0;transform:translateY(6px)}to{opacity:1}}.msg.user{display:flex;justify-content:flex-end}.msg.user .body{background:var(--surface);border:1px solid var(--border);border-radius:14px 14px 4px;padding:12px 16px;max-width:80%;white-space:pre-wrap}.msg.bot{display:flex;gap:12px}.msg.bot .ava{width:26px;height:26px;border-radius:50%;background:var(--accent);color:#fff;flex-shrink:0;display:grid;place-items:center;font-size:12px;font-weight:700;margin-top:2px}.msg.bot .body{flex:1;min-width:0;white-space:pre-wrap}.stepper{margin:4px 0}.step{display:flex;align-items:center;gap:12px;height:34px;position:relative}.step .dot{width:16px;height:16px;border-radius:50%;border:2px solid var(--border);background:var(--surface);flex-shrink:0;display:grid;place-items:center;z-index:1}.step.done .dot{border-color:var(--ok);background:var(--ok);color:#fff;font-size:9px}.step.active .dot{border-color:var(--accent);background:var(--accent);animation:breathe 1.4s ease-in-out infinite}.step .line{position:absolute;left:7px;top:24px;width:2px;height:18px;background:var(--border)}.step.done .line{background:var(--ok)}.step .lbl{font-size:14px;color:var(--muted)}.step.done .lbl{color:var(--tx2)}.step.active .lbl{color:var(--tx);font-weight:500;background:linear-gradient(90deg,var(--muted),var(--tx),var(--muted));background-size:200% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:shim 2s linear infinite}@keyframes breathe{0%,to{transform:scale(1);opacity:.7}50%{transform:scale(1.15);opacity:1}}@keyframes shim{to{background-position:-200% 0}}.score{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:15px;padding:6px 14px;border-radius:999px;color:#fff}.card{background:var(--surface);border:1px solid var(--border);border-left-width:4px;border-radius:12px;padding:14px 16px;margin:10px 0;box-shadow:var(--sh-sm)}.chip{display:inline-block;font-size:11px;font-weight:700;padding:3px 10px;border-radius:999px;text-transform:uppercase;letter-spacing:.3px}.lab{font-size:13px;color:var(--muted);margin:8px 0 2px}.quote{font-family:"Source Serif 4",Georgia,serif;font-style:italic;font-size:15px;line-height:26px;background:var(--bg);border-radius:8px;padding:8px 12px;margin:6px 0}.sheet{background:#fff;border:1px solid var(--border);border-radius:8px;box-shadow:var(--sh-md);padding:32px;margin:10px 0;font-family:"Source Serif 4",Georgia,serif}.sheet h3{text-align:center;font-size:18px;margin:0 0 14px}.sheet .art{margin:10px 0}.draftwarn{background:var(--danger-soft);color:var(--danger);font-size:12px;font-weight:600;padding:8px 12px;border-radius:8px;margin-bottom:10px}textarea,input,select{width:100%;background:var(--surface);color:var(--tx);border:1px solid var(--border);border-radius:10px;padding:12px 14px;font-family:inherit;font-size:15px;outline:none;transition:border .15s}textarea:focus,input:focus{border-color:var(--accent)}textarea{min-height:54px;max-height:200px;resize:none;line-height:22px}.composer .box{display:flex;gap:8px;align-items:flex-end;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:8px 8px 8px 14px;box-shadow:var(--sh-md)}.composer textarea{border:none;padding:8px 0;box-shadow:none;flex:1}.send{width:40px;height:40px;border:none;border-radius:10px;background:var(--accent);color:#fff;font-size:18px;flex-shrink:0;transition:background .15s;display:grid;place-items:center}.send:hover{background:var(--accent-h)}.send:disabled{background:var(--border);color:var(--muted);cursor:not-allowed}.btn{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 16px;border-radius:9px;border:1px solid var(--border);background:var(--surface);color:var(--tx);font-weight:600;font-size:14px;transition:.15s}.btn:hover{background:#f0ede6}.btn.primary{background:var(--tx);color:#fff;border-color:var(--tx)}.btn.primary:hover{background:#34322a}.icon-btn{border:none;background:transparent;color:var(--info);font-size:13px;font-weight:500;display:inline-flex;gap:5px;align-items:center}.empty{text-align:center;padding:64px 20px;max-width:560px;margin:0 auto}.empty .seal{width:52px;height:52px;font-size:22px;margin:0 auto 18px}.empty h1{font-size:28px;font-weight:600;margin:0 0 8px}.empty p{color:var(--tx2);margin:0 0 22px}.examples{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}.example{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:10px 14px;font-size:14px;color:var(--tx2);cursor:pointer;transition:.15s;text-align:left}.example:hover{border-color:var(--accent);color:var(--tx);box-shadow:var(--sh-sm)}.muted{color:var(--muted);font-size:13px}.md{font-size:15px;line-height:23px;white-space:normal}.md p{margin:6px 0}.md p:first-child{margin-top:0}.md p:last-child{margin-bottom:0}.md strong{font-weight:700;color:var(--tx)}.md ul,.md ol{margin:6px 0;padding-left:20px}.md li{margin:2px 0}.md li>p{margin:0}.md ul ul,.md ul ol{margin:2px 0}.md h1,.md h2,.md h3{font-size:15px;font-weight:700;margin:12px 0 4px}.md code{font-family:ui-monospace,monospace;background:var(--bg);padding:1px 5px;border-radius:5px;font-size:13px}.md a{color:var(--info)}.md hr{border:none;border-top:1px solid var(--border);margin:10px 0}.src-n{flex-shrink:0;width:20px;height:20px;border-radius:6px;background:var(--accent-soft);color:var(--accent-h);font-weight:700;font-size:11px;display:grid;place-items:center;margin-top:1px}.srcbtn{margin-top:14px;display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 14px;border-radius:9px;border:1px solid var(--border);background:var(--surface);color:var(--tx2);font-weight:600;font-size:13px;transition:.15s}.srcbtn:hover{border-color:var(--info);color:var(--tx);background:var(--bg)}.drawer{height:100vh;width:400px;flex-shrink:0;background:var(--surface);border-left:1px solid var(--border);box-shadow:-4px 0 16px #1c1b190d;display:flex;flex-direction:column;animation:slidein .2s ease-out}@keyframes slidein{0%{transform:translate(40px);opacity:.4}to{transform:translate(0);opacity:1}}.drawer-head{display:flex;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid var(--border)}.drawer-head b{font-size:16px}.drawer-count{margin-left:auto;background:var(--accent-soft);color:var(--accent-h);font-weight:700;font-size:12px;padding:2px 9px;border-radius:999px}.drawer-x{border:none;background:transparent;font-size:15px;color:var(--muted);width:30px;height:30px;border-radius:8px;transition:.15s}.drawer-x:hover{background:var(--bg);color:var(--tx)}.drawer-body{flex:1;overflow-y:auto;padding:12px 14px}.acc{border:1px solid var(--border);border-radius:10px;margin-bottom:8px;overflow:hidden;background:var(--surface);transition:border .15s}.acc.open{border-color:var(--info)}.acc-head{display:flex;align-items:flex-start;gap:9px;width:100%;text-align:left;border:none;background:transparent;padding:11px 12px;font-size:13px;line-height:18px;color:var(--tx);transition:background .12s}.acc-head:hover{background:var(--bg)}.acc-title{flex:1;min-width:0}.acc-title b{font-weight:600}.acc-title .art{color:var(--accent-h);font-weight:700;white-space:nowrap}.acc-caret{color:var(--muted);flex-shrink:0;align-self:center;font-size:11px}.acc-body{padding:2px 12px 12px 41px;animation:rise .18s ease-out}.acc-text{font-size:13px;line-height:20px;color:var(--tx2);white-space:pre-wrap;max-height:320px;overflow-y:auto;background:var(--bg);border-radius:8px;padding:10px 12px;margin-bottom:8px}.acc-link{font-size:13px;font-weight:600;color:var(--info)}.acc.hl{border-color:var(--info);box-shadow:0 0 0 3px #2c5f7c26}@media (max-width:760px){.drawer{position:fixed;top:0;right:0;z-index:41;width:100vw;max-width:420px;box-shadow:var(--sh-pop)}}.cites{white-space:nowrap}.cite{position:relative;display:inline-flex;align-items:center;justify-content:center;height:17px;padding:0 6px;margin:0 2px;border-radius:6px;background:var(--accent-soft);color:var(--info);font-size:11px;font-weight:700;line-height:1;cursor:pointer;text-decoration:none;vertical-align:.18em}.cite:hover,.cite:focus{background:var(--info);color:#fff;outline:none}.cite-pop{display:none;position:absolute;bottom:135%;left:50%;transform:translate(-50%);background:var(--tx);color:#fff;font-size:12px;font-weight:500;line-height:17px;white-space:normal;width:max-content;max-width:260px;padding:7px 10px;border-radius:8px;box-shadow:var(--sh-pop);z-index:30;pointer-events:none}.cite:hover .cite-pop,.cite:focus .cite-pop{display:block}.cite-pop:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:5px solid transparent;border-top-color:var(--tx)}.landing{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px}.landing .seal{width:58px;height:58px;font-size:26px;margin-bottom:10px}.landing h1{font-size:30px;font-weight:600;margin:0}.landing .sub{color:var(--tx2);margin:4px 0 26px}.rolecards{display:flex;gap:20px;flex-wrap:wrap;justify-content:center}.rolecard{width:300px;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:26px;cursor:pointer;transition:.18s;box-shadow:var(--sh-sm)}.rolecard:hover{border-color:var(--accent);box-shadow:var(--sh-md);transform:translateY(-3px)}.rolecard .ic{font-size:30px;margin-bottom:12px}.rolecard h3{margin:0 0 6px;font-size:19px}.rolecard p{margin:0;color:var(--tx2);font-size:14px;line-height:21px}.landing .seg{margin-top:30px}.cursor{display:inline-block;width:7px;height:15px;background:var(--accent);margin-left:1px;animation:blink 1s steps(2) infinite;vertical-align:text-bottom}@keyframes blink{0%,50%{opacity:1}50.01%,to{opacity:0}}.dots{display:inline-flex;align-items:center;gap:6px;height:23px}.dots i{width:8px;height:8px;border-radius:50%;background:var(--info);display:inline-block;animation:wave 1.3s ease-in-out infinite}.dots i:nth-child(2){animation-delay:.18s}.dots i:nth-child(3){animation-delay:.36s}@keyframes wave{0%,60%,to{transform:translateY(0);opacity:.45}30%{transform:translateY(-7px);opacity:1}}.tabs{display:inline-flex;gap:4px;margin-bottom:8px}.tabs button{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:5px 14px;font-size:13px;font-weight:600;color:var(--tx2)}.tabs button.on{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-h)}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-thumb{background:#ddd9d0;border-radius:6px;border:3px solid var(--sidebar)}@media (prefers-reduced-motion:reduce){*{animation:none!important}}
