:root{color:#172033;background:#f6f9fd;--ink: #172033;--muted: #687484;--line: #dce7f3;--line-soft: #e8eef6;--panel: #ffffff;--blue: #2f6fae;--blue-soft: #eaf4ff;--blue-softer: #f4f9ff;--orange: #d97924;--orange-soft: #fff0df;--shadow: 0 10px 28px rgb(36 76 115 / 8%);font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,Segoe UI,Roboto,Arial,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,textarea{font:inherit}button{cursor:pointer}.auth-loading{display:grid;min-height:100vh;place-items:center;color:var(--muted)}.auth-page{display:grid;min-height:100vh;place-items:center;background:linear-gradient(180deg,#f8fbff,#fff8f0);padding:24px}.auth-panel{width:min(420px,100%);border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:var(--shadow)}.auth-brand{padding:28px 28px 18px}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:0 28px 22px}.auth-tabs button{height:40px;border:1px solid var(--line-soft);border-radius:8px;background:#fff;color:var(--muted);font-weight:650}.auth-tabs .active{border-color:#9bc5ee;background:var(--blue-soft);color:var(--blue)}.auth-form{display:grid;gap:16px;padding:0 28px 28px}.auth-form label{display:grid;gap:7px;color:#4c535d;font-size:14px;font-weight:650}.auth-form input{height:44px;border:1px solid var(--line);border-radius:8px;padding:0 12px;outline:none}.auth-form input:focus{border-color:#88bce9;box-shadow:0 0 0 3px #88bce933}.auth-message{margin:0;color:#9a3412;font-size:13px}.auth-submit{height:44px;border:0;border-radius:8px;background:var(--blue);color:#fff;font-weight:700}.auth-legal{display:flex;flex-wrap:wrap;gap:10px;border-top:1px solid var(--line-soft);padding:14px 28px 22px}.auth-legal button,.legal-links button{border:0;background:transparent;color:var(--blue);padding:0;font-size:13px;font-weight:650}.app-shell{display:grid;grid-template-columns:300px 1fr;min-height:100vh;background:#f6f9fd}.sidebar{display:flex;min-width:0;flex-direction:column;border-right:1px solid var(--line-soft);background:linear-gradient(180deg,#fff,#f8fbff 68%,#fffaf5)}.brand{display:flex;align-items:center;gap:12px;padding:32px 18px 18px;font-size:20px}.logo-mark,.welcome-icon{display:grid;place-items:center;background:#fff}.logo-mark{width:36px;height:36px}.logo-mark img{width:32px;height:32px;object-fit:contain}.new-chat,.history-item,.footer-link{display:flex;align-items:center;gap:10px;border:0;background:transparent;color:#24272d}.new-chat{height:42px;margin:0 18px 18px;padding:0 18px;border:1px solid #cfe0f0;border-radius:8px;background:linear-gradient(180deg,#fff,#f1f8ff);box-shadow:0 2px 8px #2f6fae14;font-weight:600}.history{display:flex;flex:1;flex-direction:column;gap:4px;overflow:hidden;border-top:1px solid var(--line-soft);padding:16px 10px}.history-item,.history-open{min-width:0}.history-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-height:42px;padding:0 10px;color:#67758a;text-align:left}.history-open{display:flex;align-items:center;gap:10px;min-height:42px;border:0;background:transparent;color:inherit;padding:0;text-align:left}.history-item.active{border-radius:8px;background:var(--blue-soft);color:#244f7c}.history-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-actions{display:flex;gap:2px}.history-actions button,.rename-form button{display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:#7890a8}.history-actions button:hover,.rename-form button:hover{background:var(--orange-soft);color:var(--orange)}.rename-form{grid-column:1 / -1;display:grid;grid-template-columns:minmax(0,1fr) 28px 28px;gap:4px;align-items:center;padding:4px 0 8px}.rename-form input{min-width:0;height:32px;border:1px solid var(--line);border-radius:8px;padding:0 8px;outline:none}.sidebar-footer{display:grid;gap:14px;border-top:1px solid var(--line-soft);padding:18px;color:var(--muted);font-size:13px}.account-row{display:flex;align-items:center;justify-content:space-between;border:0;background:transparent;color:var(--muted);padding:0;text-align:left}.legal-links{display:flex;flex-wrap:wrap;gap:9px 12px}.danger-row{display:flex;align-items:center;justify-content:space-between;border:0;background:transparent;color:#b42318;padding:0;text-align:left}.delete-account-panel{display:grid;gap:8px;border:1px solid #f4b5ad;border-radius:8px;background:#fff7f6;padding:10px;color:#7a271a}.delete-account-panel p{margin:0;font-size:12px;line-height:1.35}.delete-account-panel div{display:flex;gap:6px}.delete-account-panel button{min-height:30px;border:1px solid #f4b5ad;border-radius:8px;background:#fff;color:#7a271a;padding:0 9px;font-weight:700}.delete-account-panel button:first-child{border-color:#b42318;background:#b42318;color:#fff}.legal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10;display:grid;place-items:center;background:#17203385;padding:20px}.legal-panel{width:min(760px,100%);max-height:min(780px,calc(100vh - 40px));overflow:hidden;border-radius:8px;background:#fff;box-shadow:0 18px 50px #1720333d}.legal-header{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line-soft);padding:18px 20px}.legal-header h1{margin:0;font-size:22px;letter-spacing:0}.legal-header button{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted)}.legal-body{max-height:calc(min(780px,100vh - 40px) - 72px);overflow-y:auto;padding:20px}.legal-body section+section{margin-top:18px}.legal-body h2{margin:0 0 6px;color:#24364d;font-size:15px;letter-spacing:0}.legal-body p{margin:0;color:#4a5565;font-size:14px;line-height:1.55}.legal-note{margin-top:22px!important;color:var(--muted)!important;font-size:12px!important}.chat-area{display:grid;grid-template-rows:1fr auto;min-width:0;min-height:100vh;background:linear-gradient(180deg,#fbfdff,#fff 42%,#fffaf5)}.mobile-account-bar,.mobile-delete-account{display:none}.welcome{display:flex;align-items:center;justify-content:center;flex-direction:column;padding:56px 24px 24px;text-align:center}.welcome-icon{width:84px;height:84px;margin-bottom:22px}.welcome-icon img{width:82px;height:82px;object-fit:contain}.welcome h1{max-width:820px;margin:0 0 26px;font-size:clamp(32px,4vw,46px);line-height:1.04;letter-spacing:0}.welcome p{max-width:560px;margin:0 0 34px;color:var(--muted)}.starter-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;width:min(840px,100%)}.starter-grid button{min-height:42px;max-width:800px;border:1px solid #d9e7f5;border-radius:8px;background:var(--panel);padding:10px 18px;color:#53657a;box-shadow:0 3px 10px #2f6fae12}.conversation{overflow-y:auto;padding:38px max(24px,12vw) 18px}.message{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;margin-bottom:14px}.message.user{color:#172033}.message-avatar{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:var(--blue-soft);color:var(--blue)}.message-avatar img{width:23px;height:23px;object-fit:contain}.message-body{position:relative;max-width:920px;border:1px solid var(--line-soft);border-radius:8px;background:#fffffff0;padding:13px 15px;color:#22262d;font-size:14px;line-height:1.36;white-space:normal;box-shadow:0 4px 16px #244c730d}.answer-actions{display:flex;justify-content:flex-end;gap:4px;margin:-3px -3px 7px 0}.answer-actions button{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);transition:color .12s ease,border-color .12s ease}.answer-actions button:hover{border-color:#f0bd87;color:var(--orange)}.edit-answer{display:grid;gap:8px}.edit-answer textarea,.case-context{width:100%;min-width:0;border:1px solid var(--line);border-radius:8px;outline:none;resize:vertical}.edit-answer textarea{padding:10px;color:#22262d;line-height:1.4}.edit-actions{display:flex;gap:6px;justify-content:flex-end}.edit-actions button{min-height:32px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#425066;padding:0 10px;font-weight:650}.answer-support{display:grid;gap:9px;margin-top:12px;border-top:1px solid var(--line-soft);padding-top:10px}.sources-panel summary{cursor:pointer;color:#425066;font-size:13px;font-weight:700}.sources-list{display:grid;gap:7px;margin-top:8px}.source-item{border:1px solid var(--line-soft);border-radius:8px;background:var(--blue-softer);padding:8px}.source-item strong,.source-item span{display:block;font-size:12px}.source-item span{color:var(--muted);margin-top:2px}.source-item p{margin:6px 0 0;color:#425066;font-size:12px}.feedback-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.feedback-row button{border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted)}.feedback-row button{display:grid;place-items:center;width:28px;height:28px}.feedback-row button.active{border-color:#9bc5ee;background:var(--blue-soft);color:var(--blue)}.feedback-row span{color:var(--muted);font-size:12px}.message.user .message-body{background:#fff8f0;border-color:#f2d4b3}.message-body>:first-child{margin-top:0}.message-body>:last-child{margin-bottom:0}.message-body p,.message-body ul,.message-body ol{margin:0 0 4px}.message-body ul,.message-body ol{padding-left:19px}.message-body li+li{margin-top:1px}.message-body h1,.message-body h2,.message-body h3{margin:11px 0 5px;font-size:15px;line-height:1.25;letter-spacing:0}.message-body strong{font-weight:750}.message-body code{border:1px solid var(--line-soft);border-radius:6px;background:var(--blue-softer);padding:1px 5px;font-size:.9em}.message-body table{width:100%;border-collapse:collapse;margin:7px 0;font-size:13px}.message-body th,.message-body td{border:1px solid var(--line);padding:5px 7px;text-align:left;vertical-align:top}.message-body th{background:var(--blue-softer);color:#425066;font-weight:700}.muted{color:var(--muted)}.loading-indicator{display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:13px}.loading-indicator span{width:5px;height:5px;border-radius:999px;background:#f0a45d;animation:pulse-dot 1s infinite ease-in-out}.loading-indicator span:nth-child(2){animation-delay:.15s}.loading-indicator span:nth-child(3){animation-delay:.3s}.loading-indicator strong{margin-left:4px;font-weight:600}@keyframes pulse-dot{0%,80%,to{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.composer-wrap{width:min(840px,calc(100% - 32px));margin:0 auto 28px}.context-panel{display:grid;gap:7px;margin-bottom:8px}.context-toggle{justify-self:start;min-height:30px;border:1px solid var(--line);border-radius:8px;background:#ffffffd1;color:var(--muted);padding:0 10px;font-size:13px;font-weight:650}.context-toggle:hover{border-color:#f0bd87;color:var(--orange)}.case-context{padding:9px 12px;color:#252a32;background:#ffffffeb;box-shadow:0 2px 10px #244c730d}.error-text{margin:0 0 8px;color:#b42318;font-size:14px}.composer{display:grid;grid-template-columns:minmax(0,1fr) 36px 38px;align-items:end;gap:6px;min-height:72px;border:1px solid #cfe0f0;border-radius:14px;background:#fff;padding:10px 8px 10px 18px;box-shadow:0 7px 22px #244c731a}.composer textarea{min-width:0;max-height:180px;border:0;outline:none;color:#252a32;line-height:1.45;resize:vertical}.composer textarea::placeholder{color:#9aa8b8}.icon-button,.send-button{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px}.ghost{background:transparent;color:#9aa8b8}.send-button{background:var(--orange);color:#fff}.send-button:disabled{opacity:.6}@media(max-width:820px){.app-shell{grid-template-columns:1fr}.sidebar{display:none}.chat-area{grid-template-rows:auto auto 1fr auto}.mobile-account-bar{display:flex;align-items:center;gap:10px;overflow-x:auto;border-bottom:1px solid var(--line-soft);background:#fff;padding:10px 12px;color:var(--muted);font-size:12px;white-space:nowrap}.mobile-account-bar span{max-width:180px;overflow:hidden;text-overflow:ellipsis}.mobile-account-bar button{flex:0 0 auto;border:0;background:transparent;color:var(--blue);padding:0;font-weight:650}.mobile-account-bar button:nth-last-child(2){color:#b42318}.mobile-delete-account{display:flex;flex-wrap:wrap;align-items:center;gap:8px;border-bottom:1px solid #f4b5ad;background:#fff7f6;padding:10px 12px;color:#7a271a;font-size:12px}.mobile-delete-account button{min-height:28px;border:1px solid #f4b5ad;border-radius:8px;background:#fff;color:#7a271a;padding:0 8px;font-weight:700}.welcome{justify-content:flex-start;padding-top:42px}.conversation{padding:28px 16px}}
