/* CubVest Help Assistant v1.1.0 | standalone, namespaced (#cv-help-root) | no external requests
   Tokens mirror the CubVest site (:root on every page). Fonts (Lexend, Lexend Exa) are loaded by the host page. */
#cv-help-root{--cv-purple:#3C0846;--cv-purple-deep:#28052F;--cv-ink:#1D0424;--cv-card:#4A1054;--cv-card-hi:#54145D;--cv-gold:#EBCE56;--cv-teal:#57B497;--cv-white:#F6F2F8;--cv-lavender:#DDD4E9;--cv-muted:#BFB0CC;--cv-font-display:'Lexend Exa',system-ui,sans-serif;--cv-font-body:'Lexend',system-ui,-apple-system,'Segoe UI',sans-serif;position:fixed;right:20px;bottom:20px;z-index:50;font-family:var(--cv-font-body);font-size:15px;line-height:1.5;color:var(--cv-white);-webkit-text-size-adjust:100%}
#cv-help-root *{box-sizing:border-box}
#cv-help-root button,#cv-help-root input{font-family:inherit;line-height:1.4}
#cv-help-root button{cursor:pointer}
#cv-help-root :focus-visible{outline:3px solid var(--cv-gold);outline-offset:3px}
#cv-help-root .cv-help-launch:focus-visible,#cv-help-root .cv-help-send:focus-visible,#cv-help-root .cv-help-link--primary:focus-visible{outline-color:var(--cv-white)}

/* Launcher: gold pill, like the site's primary buttons */
.cv-help-launch{display:flex;align-items:center;gap:10px;min-height:56px;padding:6px 22px 6px 8px;border:0;border-radius:999px;background:var(--cv-gold);color:var(--cv-ink);font-weight:700;font-size:15px;box-shadow:0 10px 30px rgba(29,4,36,.5)}
.cv-help-launch[hidden]{display:none}
.cv-help-launch:hover{background:#F2D96E}
.cv-help-launch-icon{display:block;flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:var(--cv-purple) url('/images/cubvest-icon-192.png') center/cover no-repeat}

/* Panel */
.cv-help-panel{flex-direction:column;width:min(380px,calc(100vw - 24px));height:min(580px,calc(100dvh - 40px));overflow:hidden;border:1px solid var(--cv-card-hi);border-radius:20px;background:var(--cv-purple-deep);box-shadow:0 18px 60px rgba(29,4,36,.55)}
.cv-help-panel[hidden]{display:none}
.cv-help-panel:not([hidden]){display:flex}
.cv-help-head{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--cv-purple);border-bottom:1px solid var(--cv-card-hi)}
.cv-help-avatar{display:block;flex:0 0 42px;width:42px;height:42px;border-radius:50%;background:var(--cv-purple) url('/images/cubvest-icon-192.png') center/cover no-repeat}
.cv-help-head-copy{min-width:0;flex:1}
.cv-help-title{display:block;font-family:var(--cv-font-display);font-weight:700;font-size:15px;line-height:1.3;color:var(--cv-white)}
.cv-help-sub{display:block;color:var(--cv-muted);font-size:13px}
.cv-help-close{flex:0 0 44px;width:44px;height:44px;border:0;border-radius:50%;background:var(--cv-card-hi);color:var(--cv-white);font-size:24px;line-height:1}
.cv-help-close:hover{background:var(--cv-card)}

/* Conversation */
.cv-help-log{display:flex;flex:1;flex-direction:column;gap:12px;min-height:0;padding:16px;overflow-y:auto;overscroll-behavior:contain}
.cv-help-row{display:flex;align-items:flex-end;gap:8px;max-width:100%}
.cv-help-row--user{justify-content:flex-end}
.cv-help-mini{flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:var(--cv-purple) url('/images/cubvest-icon-192.png') center/cover no-repeat}
.cv-help-msg{min-width:0;max-width:calc(100% - 36px);padding:12px 14px;border-radius:16px;overflow-wrap:anywhere;white-space:pre-wrap}
.cv-help-msg--bot{border:1px solid var(--cv-card-hi);border-bottom-left-radius:4px;background:var(--cv-card);color:var(--cv-white)}
.cv-help-msg--user{max-width:88%;border-bottom-right-radius:4px;background:var(--cv-lavender);color:var(--cv-ink)}
.cv-help-extras{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;white-space:normal}
.cv-help-chips{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 0 36px}

/* Question chips (outlined lavender) and action links (gold, like .btn--outline-gold) */
.cv-help-chip{min-height:40px;padding:6px 14px;border:1.5px solid var(--cv-lavender);border-radius:999px;background:transparent;color:var(--cv-white);font-size:14px;font-weight:500;text-align:left}
.cv-help-chip:hover{background:var(--cv-card-hi)}
.cv-help-link{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:2px solid var(--cv-gold);border-radius:999px;color:var(--cv-gold);font-size:14px;font-weight:600;text-decoration:none}
.cv-help-link:hover{background:rgba(235,206,86,.12)}
.cv-help-link--primary{background:var(--cv-gold);color:var(--cv-ink);font-weight:700}
.cv-help-link--primary:hover{background:#F2D96E}

/* Input row: pill input + gold Send, like the waiting-list form */
.cv-help-form{display:flex;gap:8px;padding:12px;border-top:1px solid var(--cv-card-hi);background:var(--cv-purple)}
.cv-help-input{flex:1;min-width:0;min-height:48px;padding:0 18px;border:2px solid var(--cv-lavender);border-radius:999px;background:var(--cv-white);color:var(--cv-ink);font-size:16px}
.cv-help-input::placeholder{color:#6B5A75;opacity:1}
.cv-help-send{flex:0 0 auto;min-height:48px;padding:0 22px;border:0;border-radius:999px;background:var(--cv-gold);color:var(--cv-ink);font-weight:700;font-size:15px}
.cv-help-send:hover{background:#F2D96E}
.cv-help-status{padding:0 16px 6px;background:var(--cv-purple);color:var(--cv-gold);font-size:13px}
.cv-help-status:empty{display:none}
.cv-help-note{padding:0 16px 12px;background:var(--cv-purple);color:var(--cv-muted);font-size:12px;line-height:1.45}
.cv-help-note a{color:var(--cv-lavender)}

.cv-help-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* Small phones */
@media(max-width:480px){#cv-help-root{right:12px;bottom:12px}.cv-help-panel{width:calc(100vw - 24px);height:min(600px,calc(100dvh - 24px))}.cv-help-launch{min-height:52px}}
/* Short screens (landscape phones): use the whole height so the header and close button stay reachable */
@media(max-height:520px){#cv-help-root{right:10px;bottom:10px}.cv-help-panel{height:calc(100dvh - 20px)}.cv-help-head{padding:8px 14px}.cv-help-avatar{flex-basis:32px;width:32px;height:32px}.cv-help-note{display:none}.cv-help-log{padding:12px}}
@media(prefers-reduced-motion:reduce){#cv-help-root *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{#cv-help-root{display:none!important}}
