.chat-app-shell{--chat-bg:#f2f6ff;--chat-text:#111936;--chat-muted:#556088;--chat-placeholder:#6a749c;--chat-icon:#4f5fe0;--chat-online:#0a8f63;--chat-home:#2f5be8;--chat-gradient:linear-gradient(135deg,#3b6bff,#8a5cff);--chat-ring-gradient:linear-gradient(90deg,#3b6bff,#8a5cff,#14c8e8);--chat-card-bg:rgba(255,255,255,0.78);--chat-card-border:rgba(70,90,200,0.14);--chat-card-shadow:0 8px 28px rgba(60,80,170,0.08);--chat-card-hover-bg:#ffffff;--chat-chip-bg:#ffffff;--chat-chip-border:rgba(70,90,200,0.2);--chat-chip-hover-bg:rgba(80,100,255,0.1);--chat-chip-hover-border:rgba(80,100,255,0.55);--chat-row-hover:rgba(80,100,255,0.08);--chat-composer-bg:#ffffff;--chat-composer-glow:0 10px 40px rgba(90,100,255,0.22);--chat-user-bubble:linear-gradient(135deg,rgba(59,107,255,0.12),rgba(138,92,255,0.12));--chat-user-border:rgba(80,100,255,0.22);--chat-glow-top:0.16;--chat-glow-bottom:0.1;--chat-glow-left:0.1;--chat-font-body:var(--font-chat-body),"Inter","Segoe UI",sans-serif;--chat-font-display:var(--font-chat-display),var(--font-chat-body),"Segoe UI",sans-serif;--color-card:#ffffff;--color-surface:#ffffff;--color-text:var(--chat-text);--color-text-strong:var(--chat-text);position:relative;width:100%;height:100vh;height:100dvh;display:grid;grid-template-columns:280px minmax(0,1fr);grid-template-rows:minmax(0,1fr);grid-gap:12px;gap:12px;padding:16px;overflow:hidden;isolation:isolate;color:var(--chat-text);background:var(--chat-bg);font-family:var(--chat-font-body)}html[data-theme=dark] .chat-app-shell{--chat-bg:#0a0e22;--chat-text:#eef1fb;--chat-muted:#a6b0d6;--chat-placeholder:#a6b0d6;--chat-icon:#9fa9ff;--chat-online:#7cf2c0;--chat-home:#9fb4ff;--chat-card-bg:rgba(255,255,255,0.055);--chat-card-border:rgba(255,255,255,0.1);--chat-card-shadow:none;--chat-card-hover-bg:rgba(255,255,255,0.09);--chat-chip-bg:rgba(255,255,255,0.06);--chat-chip-border:rgba(255,255,255,0.14);--chat-chip-hover-bg:rgba(124,140,255,0.22);--chat-chip-hover-border:rgba(124,140,255,0.6);--chat-row-hover:rgba(255,255,255,0.07);--chat-composer-bg:#0e1330;--chat-composer-glow:0 0 40px rgba(110,100,255,0.35);--chat-user-bubble:linear-gradient(135deg,rgba(59,107,255,0.28),rgba(138,92,255,0.26));--chat-user-border:rgba(124,140,255,0.32);--chat-glow-top:0.3;--chat-glow-bottom:0.24;--chat-glow-left:0.14;--color-card:#121735;--color-card-muted:#171d44;--color-surface:#121735;--color-surface-strong:#161c40;--color-panel:#141a3b;--color-panel-soft:#171d44;--color-border:rgba(255,255,255,0.12)}body:has(.chat-app-shell){height:100vh;height:100dvh;overflow:hidden;background:var(--chat-bg,#f2f6ff)}html[data-theme=dark] body:has(.chat-app-shell){background:#0a0e22}body:has(.chat-app-shell):before{display:none}.chat-app-shell h1,.chat-app-shell h2,.chat-app-shell h3{font-family:var(--chat-font-display)}.chat-backdrop{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}.chat-glow{position:absolute;border-radius:50%}.chat-glow-top{top:-200px;left:30%;width:700px;height:700px;background:#4a5bff;opacity:var(--chat-glow-top);filter:blur(140px)}.chat-glow-bottom{bottom:-240px;right:-80px;width:600px;height:600px;background:#9a4dff;opacity:var(--chat-glow-bottom);filter:blur(140px)}.chat-glow-left{top:35%;left:-160px;width:420px;height:420px;background:#14c8e8;opacity:var(--chat-glow-left);filter:blur(130px)}.chat-overlay{display:none}.chat-sidebar-shell{position:relative;height:100%;min-height:0;display:flex;flex-direction:column;gap:22px;overflow:hidden;padding:22px 16px;color:var(--chat-text);background:var(--chat-card-bg);border:1px solid var(--chat-card-border);border-radius:28px;box-shadow:var(--chat-card-shadow);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.chat-sidebar-shell:before{display:none}.chat-sidebar-brand{display:flex;flex-direction:column;gap:10px;flex-shrink:0;padding:0 4px}.chat-sidebar-brand-top{justify-content:space-between;gap:12px}.chat-sidebar-brand-row,.chat-sidebar-brand-top{display:flex;align-items:center}.chat-sidebar-title{margin:0;font-size:16px;font-weight:600;line-height:1.3;color:var(--chat-text)}.chat-sidebar-logo{display:inline-flex;align-items:center;flex:0 1 auto;min-width:0;margin-right:auto}.chat-sidebar-logo img{display:block;width:auto;height:28px;max-width:100%}.chat-sidebar-logo .chat-sidebar-logo-dark,html[data-theme=dark] .chat-sidebar-logo .chat-sidebar-logo-light{display:none}html[data-theme=dark] .chat-sidebar-logo .chat-sidebar-logo-dark{display:block}.mobile-sidebar-button,.sidebar-close,.sidebar-home-button{width:44px;height:44px;flex:0 0 auto;display:grid;place-items:center;border-radius:12px}.sidebar-home-button{border:1px solid rgba(124,140,255,.45);background:rgba(59,107,255,.14);color:var(--chat-home)}.sidebar-home-button svg{width:18px;height:18px}.sidebar-home-button:hover{background:rgba(59,107,255,.22);transform:translateY(-1px)}.mobile-sidebar-button,.sidebar-close{display:none;border:1px solid var(--chat-chip-border);background:var(--chat-chip-bg);color:var(--chat-text);font-size:1.15rem}.chat-new-button{display:flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;min-height:46px;border:0;border-radius:14px;color:#ffffff;background:var(--chat-gradient);font-size:14px;font-weight:600;box-shadow:0 6px 22px rgba(110,100,255,.3)}.chat-new-button svg{width:16px;height:16px}.chat-new-button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 8px 26px rgba(110,100,255,.42)}.sidebar-scroll-area{flex:1 1;min-height:0;display:flex;flex-direction:column;gap:18px;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;margin:-4px;padding:4px;scrollbar-width:none}.sidebar-scroll-area::-webkit-scrollbar{display:none}.sidebar-section{display:grid;grid-gap:10px;gap:10px;flex-shrink:0;overflow:visible;border-radius:0}.sidebar-section-title{margin:0;padding-left:4px;font-size:12px;font-weight:600;color:var(--chat-muted)}.topic-cards{display:flex;flex-direction:column;gap:8px}.topic-card{display:flex;align-items:center;gap:12px;min-height:56px;padding:10px 12px;border:1px solid var(--chat-card-border);border-radius:16px;color:var(--chat-text);background:var(--chat-card-bg);box-shadow:var(--chat-card-shadow);text-align:left;transition:transform .2s,border-color .2s,background .2s}.topic-card.is-selected,.topic-card:hover:not(:disabled){transform:translateY(-3px);border-color:rgba(124,140,255,.7);background:var(--chat-card-hover-bg)}.topic-card:disabled{cursor:not-allowed;opacity:.6}.topic-card-icon{width:40px;height:40px;flex:none;display:grid;place-items:center;border-radius:12px;color:#ffffff;background:var(--chat-gradient)}.topic-card-icon svg{width:20px;height:20px}.topic-card-label{font-family:var(--chat-font-display);font-size:15px;font-weight:600;line-height:1.3}.sidebar-card{padding:14px 16px;border:1px solid var(--chat-card-border);border-radius:18px;background:var(--chat-card-bg)}.sidebar-copy{margin:0;font-size:13px;line-height:1.5;color:var(--chat-muted)}.referral-sidebar-card{border-color:rgba(15,159,135,.22)}.chat-status-card{flex-shrink:0;padding:16px;border:1px solid var(--chat-card-border);border-radius:18px;background:var(--chat-card-bg);box-shadow:var(--chat-card-shadow)}.chat-status-online{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;font-weight:500;color:var(--chat-online)}.chat-status-dot{width:8px;height:8px;border-radius:50%;background:currentColor}.chat-status-copy{margin:8px 0 0;font-size:13px;line-height:1.5;color:var(--chat-muted)}.sidebar-footer-links{flex-shrink:0;padding:0 4px}.sidebar-link{font-size:.9rem;color:var(--chat-home)}.debug-switch{position:relative;display:grid;grid-template-columns:1fr auto;grid-gap:var(--space-3);gap:var(--space-3);align-items:center;padding:.9rem 1rem;border-radius:18px;border:1px solid var(--chat-card-border);background:var(--chat-card-bg)}.debug-switch strong{display:block;color:var(--chat-text)}.debug-switch small{display:block;margin-top:.2rem;color:var(--chat-muted)}.debug-switch input{position:absolute;opacity:0;pointer-events:none}.debug-switch-track{width:54px;height:32px;position:relative;border-radius:999px;background:rgba(86,108,137,.18)}.debug-switch-track:after{content:"";position:absolute;top:4px;left:4px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:var(--shadow-soft);transition:transform .16s ease,background .16s ease}.debug-switch input:checked+.debug-switch-track{background:var(--chat-gradient)}.debug-switch input:checked+.debug-switch-track:after{transform:translateX(22px)}.chat-main-shell{position:relative;min-width:0;min-height:0;height:100%;display:flex;flex-direction:column;padding:0 16px 4px;overflow:hidden}.chat-topbar{position:relative;z-index:20;flex-shrink:0;padding:6px 0;border:0;border-radius:0;background:transparent;box-shadow:none}.chat-topbar,.chat-topbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.chat-topbar-actions{flex-wrap:wrap}.mobile-sidebar-button{margin-right:auto}.chat-topbar .locale-switcher .locale-switcher-trigger,.chat-topbar .theme-toggle{height:44px;border:1px solid var(--chat-chip-border);color:var(--chat-text);background:var(--chat-chip-bg);box-shadow:none;font-size:14px;font-weight:500}.chat-topbar .theme-toggle{width:44px}.chat-topbar .locale-switcher .locale-switcher-trigger{padding:0 16px}.chat-topbar .locale-switcher .locale-switcher-trigger:hover,.chat-topbar .locale-switcher .locale-switcher-trigger[aria-expanded=true],.chat-topbar .theme-toggle:hover{border-color:var(--chat-chip-hover-border);background:var(--chat-chip-hover-bg)}.chat-topbar .referral-cta-registration.register-button{flex:0 0 auto;min-height:44px;padding:0 22px;border:0;border-radius:999px;color:#ffffff;background:var(--chat-gradient);box-shadow:0 6px 22px rgba(110,100,255,.4);font-size:14px;font-weight:600}.chat-topbar .referral-cta-registration.register-button:hover{transform:translateY(-1px);box-shadow:0 8px 26px rgba(110,100,255,.5)}.live-status{display:inline-flex;align-items:center;gap:var(--space-2);min-height:44px;padding:0 .9rem;border-radius:999px;color:var(--chat-text);background:var(--chat-chip-bg);border:1px solid var(--chat-chip-border);font-size:13px;font-weight:600}.live-status-dot{width:10px;height:10px;border-radius:50%;background:var(--color-teal);box-shadow:0 0 0 6px rgba(19,213,192,.14)}.live-status.loading .live-status-dot{background:var(--color-warning);box-shadow:0 0 0 6px rgba(255,191,71,.14)}.chat-greeting{display:flex;align-items:center;justify-content:center;gap:14px}.chat-greeting-title{max-width:none;margin:0;font-size:30px;font-weight:600;line-height:1.25;text-align:center;color:var(--chat-text)}.chat-greeting.is-compact{margin:8px 0 28px}.chat-greeting.is-compact .chat-greeting-title{font-size:24px}.chat-welcome-stage{width:100%;max-width:760px;flex:1 1;min-height:0;margin:0 auto;display:flex;flex-direction:column;justify-content:center;gap:28px;padding:8px 0 60px;overflow-y:auto;scrollbar-width:none}.chat-welcome-stage::-webkit-scrollbar{display:none}.chat-welcome-stage .error-banner{margin:0}.chat-suggestions{padding:0 6px}.chat-suggestions-title{margin:0 0 6px 14px;font-size:13px;font-weight:600;color:var(--chat-muted)}.chat-suggestions-list{display:flex;flex-direction:column;gap:2px}.chat-suggestion{display:flex;align-items:center;gap:14px;width:100%;min-height:52px;padding:8px 14px;border:0;border-radius:14px;color:var(--chat-text);background:transparent;font-size:15px;text-align:left}.chat-suggestion svg{width:20px;height:20px;flex:none;color:var(--chat-icon);stroke-width:1.7}.chat-suggestion:hover:not(:disabled){background:var(--chat-row-hover)}.chat-surface-scroll{width:100%;flex:1 1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(110,120,255,.4) transparent}.chat-surface-scroll::-webkit-scrollbar{width:8px}.chat-surface-scroll::-webkit-scrollbar-thumb{background:rgba(110,120,255,.4);border-radius:999px}.chat-surface{position:relative;width:100%;max-width:820px;min-height:100%;margin:0 auto;display:flex;flex-direction:column;padding:16px 0 12px;border:0;border-radius:0;background:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.chat-surface:before{display:none}.chat-thread-header{position:-webkit-sticky;position:sticky;top:0;z-index:5;margin-bottom:var(--space-4);padding:.9rem 1rem;border-radius:18px;border:1px solid var(--chat-card-border);background:var(--chat-card-bg);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.thread-value{margin:.35rem 0 0;max-width:64ch;font-size:.9rem;overflow-wrap:anywhere}.thread-label,.thread-value{color:var(--chat-muted)}.surface-chip{display:inline-flex;align-items:center;min-height:28px;padding:.3rem .72rem;border-radius:999px;font-size:.75rem;font-weight:700;color:var(--chat-text);background:var(--chat-chip-bg);border:1px solid var(--chat-chip-border)}.thread-scroll{flex:1 1;min-height:0}.thread-row{display:flex;gap:var(--space-3);align-items:flex-end;margin-bottom:18px}.thread-row.user{flex-direction:row-reverse}.thread-bubble{max-width:min(720px,88%);padding:14px 18px;border-radius:22px;color:var(--chat-text)}.thread-bubble.assistant{border:1px solid var(--chat-card-border);background:var(--chat-card-bg);box-shadow:var(--chat-card-shadow);border-bottom-left-radius:8px;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.thread-bubble.user{border:1px solid var(--chat-user-border);background:var(--chat-user-bubble);border-bottom-right-radius:8px}.thread-bubble p{margin:.45rem 0 0;white-space:pre-wrap;line-height:1.7}.thread-bubble-header{align-items:center}.thread-role{margin:0;font-size:.7rem;font-weight:700;color:var(--chat-muted)}.source-list{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-4)}.source-chip{display:inline-flex;align-items:center;gap:var(--space-2);padding:.5rem .7rem;border:1px solid var(--chat-card-border);background:var(--chat-chip-bg);color:var(--chat-text);font-size:.82rem}.inline-cta{margin-top:var(--space-4);padding:.9rem 1rem;border:1px solid var(--chat-user-border);background:var(--chat-user-bubble);color:var(--chat-text)}.inline-cta strong{display:block;margin-bottom:.2rem}.message-debug{margin-top:var(--space-4);border:1px solid var(--chat-card-border);background:var(--chat-chip-bg)}.message-debug summary{padding:.8rem .9rem;cursor:pointer;color:var(--chat-home);font-size:.74rem;font-weight:800}.message-debug dl{margin:0;padding:0 .9rem .9rem}.debug-row{display:grid;grid-template-columns:minmax(140px,.75fr) minmax(0,1fr);grid-gap:var(--space-3);gap:var(--space-3);padding:.55rem 0;border-top:1px solid var(--chat-card-border)}.debug-row dd,.debug-row dt{margin:0;overflow-wrap:anywhere}.debug-row dt{color:var(--chat-muted);font-weight:700}.debug-row dd{color:var(--chat-text)}.loading-bubble{min-width:96px}.typing-indicator{display:inline-flex;gap:.35rem;padding:.3rem 0}.typing-indicator span{width:.5rem;height:.5rem;border-radius:50%;background:var(--chat-icon);animation:typingPulse 1.2s ease-in-out infinite}.typing-indicator span:nth-child(2){animation-delay:.15s}.typing-indicator span:nth-child(3){animation-delay:.3s}@keyframes typingPulse{0%,80%,to{transform:translateY(0);opacity:.38}40%{transform:translateY(-3px);opacity:1}}.chat-main-shell>.error-banner{width:100%;max-width:820px;margin:8px auto 0}.composer-shell{width:100%;max-width:820px;flex-shrink:0;margin:0 auto;padding-top:8px}.composer{display:block;padding:2px;border:0;border-radius:30px;background:var(--chat-ring-gradient);box-shadow:var(--chat-composer-glow)}.composer-input-wrap{display:flex;align-items:flex-end;gap:10px;padding:8px 8px 8px 22px;border-radius:28px;background:var(--chat-composer-bg)}.composer-input{flex:1 1;min-width:0;min-height:48px;max-height:220px;padding:12px 0;border:0;outline:0;resize:none;color:var(--chat-text);background:transparent;box-shadow:none;font-size:16px;line-height:1.5}.composer-input:focus-visible{box-shadow:none}.composer-input::placeholder{color:var(--chat-placeholder);opacity:1}.composer:focus-within{box-shadow:var(--chat-composer-glow),0 0 0 4px rgba(110,120,255,.18)}.composer-send-button{width:48px;height:48px;flex:0 0 auto;display:grid;place-items:center;border:0;border-radius:50%;color:#ffffff;background:var(--chat-gradient);transition:transform .14s ease,box-shadow .14s ease,opacity .14s ease}.composer-send-button svg{width:20px;height:20px}.composer-send-button:hover:not(:disabled){transform:scale(1.04);box-shadow:0 8px 22px rgba(110,100,255,.4)}.composer-send-button:active:not(:disabled){transform:scale(.96)}.composer-send-button:disabled{opacity:.5;cursor:not-allowed;transform:none}.composer-send-spinner{width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.4);border-top-color:#ffffff;animation:composer-send-spin .7s linear infinite}@keyframes composer-send-spin{to{transform:rotate(1turn)}}.chat-footnote{flex-shrink:0;margin:0;padding:10px 0 4px;text-align:center;font-size:12px;color:var(--chat-muted)}.chat-email-capture{display:grid;grid-gap:.9rem;gap:.9rem;margin-top:var(--space-4);padding:1rem;border:1px solid var(--chat-user-border);border-radius:14px;background:var(--chat-user-bubble)}.chat-email-capture span,.chat-email-capture strong{display:block}.chat-email-capture strong{color:var(--chat-text)}.chat-email-capture span{margin-top:.2rem;color:var(--chat-muted)}.chat-email-capture-row{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-gap:.75rem;gap:.75rem}.chat-email-capture input{min-height:48px;width:100%;border:1px solid var(--chat-chip-border);border-radius:12px;padding:.8rem .9rem;color:var(--chat-text);background:var(--chat-composer-bg)}.chat-email-capture-error,.chat-email-capture-success{margin:0;font-size:.9rem;font-weight:700}.chat-email-capture-error{color:var(--color-danger)}.chat-email-capture-success{color:var(--color-success)}@media (max-width:1080px){.chat-app-shell{grid-template-columns:minmax(0,1fr);padding:12px}.chat-sidebar-shell{position:fixed;top:0;left:0;z-index:40;width:min(320px,calc(100vw - 1.25rem));height:100vh;height:100dvh;border-radius:0 28px 28px 0;background:var(--chat-bg);transform:translateX(-102%);transition:transform .22s ease;box-shadow:0 32px 80px rgba(17,36,86,.2)}.chat-sidebar-shell.open{transform:translateX(0)}.chat-overlay{position:fixed;inset:0;z-index:30;display:block;background:rgba(0,8,18,.48);opacity:0;pointer-events:none;transition:opacity .22s ease}.chat-overlay.open{opacity:1;pointer-events:auto}.mobile-sidebar-button,.sidebar-close{display:grid}.chat-main-shell{padding:0 4px 4px}}@media (max-width:820px){.chat-topbar{flex-direction:row;align-items:center;padding:0}.chat-topbar-actions{gap:8px}.thread-bubble{max-width:100%}.chat-greeting-title{font-size:24px}.chat-greeting.is-compact .chat-greeting-title{font-size:20px}}@media (max-width:560px){.chat-app-shell{padding:8px}.chat-main-shell{padding:0 8px 2px}.chat-topbar{align-items:flex-start;gap:8px}.chat-topbar .theme-toggle,.mobile-sidebar-button{width:40px;height:40px}.chat-topbar .locale-switcher .locale-switcher-trigger{height:40px;padding:0 10px}.chat-topbar .referral-cta-registration.register-button{width:auto;min-height:40px;padding:0 14px;font-size:13px}.chat-greeting{flex-direction:column;gap:12px}.chat-greeting-title{font-size:22px}.chat-greeting.is-compact{flex-direction:row;margin-bottom:20px}.chat-greeting.is-compact .chat-greeting-title{font-size:18px;text-align:left}.chat-welcome-stage{justify-content:flex-start;gap:22px;padding:24px 0 16px}.chat-suggestions{padding:0}.chat-suggestion{font-size:14px}.composer-input-wrap{padding:6px 6px 6px 16px}.composer-input{min-height:44px;padding:10px 0}.composer-send-button{width:44px;height:44px}.thread-bubble{padding:12px 14px;border-radius:18px}.chat-email-capture-row{grid-template-columns:1fr}}@media (prefers-reduced-motion:reduce){.typing-indicator span{animation:none}.topic-card.is-selected,.topic-card:hover:not(:disabled){transform:none}}