/* Theo — shared assistant UI for Maison Stratégique
:root{--theo-ink:#211f2e;--theo-muted:#696579;--theo-indigo:#312b78;--theo-indigo-dark:#1c1a3e;--theo-gold:#c9a24b;--theo-paper:#fbf9f4;--theo-line:rgba(33,31,46,.14);--theo-shadow:0 24px 80px rgba(23,20,54,.22)}
#theo-root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--theo-ink);font-size:14px;line-height:1.45;z-index:2147483000}
#theo-root *{box-sizing:border-box}#theo-root button,#theo-root input{font:inherit}#theo-root button{cursor:pointer}
.theo-launcher{position:fixed;right:26px;bottom:24px;display:flex;align-items:center;gap:11px;padding:11px 17px 11px 12px;border:1px solid rgba(255,255,255,.3);border-radius:999px;background:linear-gradient(135deg,var(--theo-indigo-dark),var(--theo-indigo));color:#fff;box-shadow:0 12px 34px rgba(28,26,62,.3);transition:transform .18s,box-shadow .18s}
.theo-launcher:hover{transform:translateY(-2px);box-shadow:0 16px 40px rgba(28,26,62,.34)}.theo-launcher:focus-visible,.theo-root button:focus-visible{outline:3px solid #c9a24b;outline-offset:3px}
.theo-launcher-mark{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.23);color:#e7c779}.theo-launcher-copy{display:flex;flex-direction:column;text-align:left;line-height:1.15}.theo-launcher-copy strong{font-family:Fraunces,Georgia,serif;font-size:18px;font-weight:500;letter-spacing:.01em}.theo-launcher-copy small{font-size:10px;opacity:.8;letter-spacing:.08em;text-transform:uppercase;margin-top:4px}
/* .theo-panel{position:fixed;right:24px;bottom:90px;width:min(420px,calc(100vw - 28px));height:min(690px,calc(100dvh - 116px));min-height:440px;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(28,26,62,.16);border-radius:20px;background:#fff;box-shadow:var(--theo-shadow);transform-origin:bottom right;animation:theo-in .18s ease-out} */
/*.theo-panel{position:fixed;right:24px;bottom:90px;width:min(360px,calc(100vw - 28px));height:min(520px,calc(100dvh - 116px));min-height:360px;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(28,26,62,.16);border-radius:20px;background:#fff;box-shadow:var(--theo-shadow);transform-origin:bottom right;animation:theo-in .18s ease-out}
.theo-panel{position:fixed;right:24px;bottom:40px;width:min(420px,calc(100vw - 28px));height:min(460px,calc(100dvh - 116px));min-height:320px;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(28,26,62,.16);border-radius:20px;background:#fff;box-shadow:var(--theo-shadow);transform-origin:bottom right;animation:theo-in .18s ease-out}
@keyframes theo-in{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
.theo-panel[hidden],.theo-launcher[hidden]{display:none!important}.theo-header{padding:18px 18px 16px;background:radial-gradient(circle at 100% 0%,rgba(201,162,75,.17),transparent 42%),linear-gradient(125deg,#1c1a3e,#312b78);color:#fff;display:flex;align-items:center;gap:12px}.theo-avatar{width:42px;height:42px;flex:0 0 42px;border-radius:14px;display:grid;place-items:center;color:#e8cb82;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18)}.theo-heading{flex:1;min-width:0}.theo-heading strong{display:block;font:500 23px/1.05 Fraunces,Georgia,serif;letter-spacing:.015em}.theo-heading span{display:block;font-size:10px;letter-spacing:.105em;text-transform:uppercase;color:#e6d9b7;margin-top:6px}.theo-status{display:flex;align-items:center;gap:6px;color:#e4e0f2;font-size:11px;margin-top:7px}.theo-status-dot{width:6px;height:6px;border-radius:50%;background:#9dc9a4}.theo-close{width:34px;height:34px;border:1px solid rgba(255,255,255,.22);border-radius:10px;background:rgba(255,255,255,.08);color:#fff;display:grid;place-items:center;font-size:21px;line-height:1}
.theo-context{padding:9px 17px;background:#f7f5ef;border-bottom:1px solid #e9e4d8;display:flex;align-items:center;gap:8px;font-size:11px;color:#656176}.theo-context svg{color:var(--theo-indigo);flex-shrink:0}.theo-context strong{color:#39344f;font-weight:600}.theo-messages{flex:1;overflow-y:auto;padding:17px 15px 12px;background:linear-gradient(180deg,#fff 0%,#fcfbf8 100%);scroll-behavior:smooth}.theo-welcome{padding:2px 2px 8px}.theo-eyebrow{font-size:10px;text-transform:uppercase;letter-spacing:.13em;color:#8a6a20;font-weight:700;margin-bottom:8px}.theo-welcome h3{font:500 23px/1.12 Fraunces,Georgia,serif;color:#242047;margin:0 0 9px}.theo-welcome p{font-size:12.5px;line-height:1.6;color:#666174;margin:0 0 15px}.theo-section-label{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:#858092;font-weight:700;margin:13px 0 8px}.theo-prompt-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.theo-prompt{min-height:65px;text-align:left;border:1px solid #e4dfd4;border-radius:12px;background:#fff;padding:10px 11px;color:#39354d;display:flex;flex-direction:column;justify-content:space-between;gap:8px;transition:border-color .15s,background .15s,transform .15s}.theo-prompt:hover{border-color:#c9a24b;background:#fffdf7;transform:translateY(-1px)}.theo-prompt-icon{color:#8a6a20;font-size:16px;line-height:1}.theo-prompt-label{font-size:11.5px;font-weight:600;line-height:1.3}.theo-message{display:flex;flex-direction:column;gap:5px;margin:13px 0;max-width:94%}.theo-message.user{align-items:flex-end;margin-left:auto}.theo-message.assistant{align-items:flex-start}.theo-message-name{font-size:10px;color:#8a8497;padding:0 4px}.theo-bubble{padding:11px 13px;border-radius:14px;font-size:12.5px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.theo-message.user .theo-bubble{background:#312b78;color:#fff;border-bottom-right-radius:4px}.theo-message.assistant .theo-bubble{background:#f2f0f8;border:1px solid #e7e3f1;color:#312d42;border-bottom-left-radius:4px}.theo-bubble strong{font-weight:700}.theo-bubble ul{padding-left:18px;margin:7px 0}.theo-recommendation{margin-top:9px;padding:9px 10px;border-left:2px solid #c9a24b;background:#fffdf7;border-radius:0 8px 8px 0;font-size:11.5px}.theo-typing{display:flex;gap:4px;padding:5px 2px}.theo-typing i{width:5px;height:5px;border-radius:50%;background:#8c86a9;animation:theo-bounce 1s infinite ease-in-out}.theo-typing i:nth-child(2){animation-delay:.12s}.theo-typing i:nth-child(3){animation-delay:.24s}@keyframes theo-bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)}}
.theo-compose-wrap{border-top:1px solid #e9e5dc;padding:11px 13px 12px;background:#fff}.theo-compose{display:flex;align-items:flex-end;gap:8px;border:1px solid #dcd7e7;border-radius:14px;padding:6px 6px 6px 12px;background:#fff}.theo-compose:focus-within{border-color:#8278bb;box-shadow:0 0 0 3px rgba(49,43,120,.08)}.theo-input{border:0!important;outline:0!important;box-shadow:none!important;resize:none;min-width:0;flex:1;min-height:35px;max-height:100px;padding:8px 0!important;background:transparent!important;color:#27243a;font-size:12px!important}.theo-input::placeholder{color:#9691a2}.theo-send{width:35px;height:35px;flex:0 0 35px;display:grid;place-items:center;border:0;border-radius:10px;background:#312b78;color:#fff}.theo-send:disabled{opacity:.45;cursor:not-allowed}.theo-footnote{text-align:center;color:#9994a3;font-size:9.5px;margin:8px 0 0}.theo-error{padding:8px 10px;margin:0 0 8px;background:#fff6e9;border:1px solid #f0dfc4;border-radius:9px;color:#795c28;font-size:11px;line-height:1.5}.theo-action{display:inline-flex;align-items:center;gap:7px;margin-top:9px;padding:8px 10px;border:1px solid #d9d3e8;border-radius:9px;background:#fff;color:#312b78;text-decoration:none;font-size:11px;font-weight:600}.theo-action:hover{background:#f6f4fb}.theo-disclaimer{margin-top:7px;color:#8a8497;font-size:10px;line-height:1.45}
@media(max-width:560px){.theo-launcher{right:15px;bottom:15px;padding:9px 13px 9px 9px}.theo-launcher-mark{width:32px;height:32px}.theo-launcher-copy strong{font-size:16px}.theo-panel{right:8px;bottom:8px;width:calc(100vw - 16px);height:calc(100dvh - 16px);min-height:0;border-radius:18px}.theo-panel:not([hidden])~.theo-launcher{display:none}.theo-header{padding:15px}.theo-messages{padding:14px 12px}.theo-prompt{min-height:62px;padding:9px}.theo-prompt-label{font-size:11px}}
@media(prefers-reduced-motion:reduce){.theo-panel{animation:none}.theo-launcher,.theo-prompt{transition:none}.theo-typing i{animation:none}}

.theo-header-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}
.theo-new-chat{width:34px;height:34px;border:1px solid rgba(255,255,255,.22);border-radius:10px;background:rgba(255,255,255,.08);color:#fff;display:grid;place-items:center;transition:background .15s}
.theo-new-chat:hover{background:rgba(255,255,255,.18)}
.theo-new-chat:focus-visible{outline:3px solid #c9a24b;outline-offset:3px}


.theo-message.assistant .theo-bubble{white-space:normal}
.theo-md-h{display:block;font-weight:700;color:#1c1a3e;margin:10px 0 4px;font-size:12px;letter-spacing:.02em}
.theo-md-h:first-child{margin-top:2px}
.theo-md-li{display:flex;align-items:baseline;gap:7px;margin:3px 0}
.theo-md-bullet{color:#c9a24b;font-size:14px;flex-shrink:0;line-height:1}


.theo-section-label--secondary{margin-top:16px;color:#6a5a9e}
.theo-prompt-grid--compact{grid-template-columns:1fr}
.theo-prompt-grid--compact .theo-prompt{min-height:44px;flex-direction:row;align-items:center;gap:10px}
.theo-prompt-grid--compact .theo-prompt-icon{font-size:14px}
.theo-prompt-grid--compact .theo-prompt-label{font-size:11px}
.theo-mascot-icon{width:28px;height:28px;object-fit:contain;object-position:center bottom;display:block}
.theo-avatar .theo-mascot-icon{width:34px;height:34px}
.theo-launcher-mark{background:transparent!important;border:none!important} */
/* Theo — shared assistant UI for Maison Stratégique */
/* :root{--theo-ink:#211f2e;--theo-muted:#696579;--theo-indigo:#312b78;--theo-indigo-dark:#1c1a3e;--theo-gold:#c9a24b;--theo-paper:#fbf9f4;--theo-line:rgba(33,31,46,.14);--theo-shadow:0 24px 80px rgba(23,20,54,.22)}
#theo-root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--theo-ink);font-size:14px;line-height:1.45;z-index:2147483000}
#theo-root *{box-sizing:border-box}#theo-root button,#theo-root input{font:inherit}#theo-root button{cursor:pointer}
/* .theo-launcher{position:fixed;right:26px;bottom:24px;display:flex;align-items:center;gap:11px;padding:11px 17px 11px 12px;border:1px solid rgba(255,255,255,.3);border-radius:999px;background:linear-gradient(135deg,var(--theo-indigo-dark),var(--theo-indigo));color:#fff;box-shadow:0 12px 34px rgba(28,26,62,.3);transition:transform .18s,box-shadow .18s}
.theo-launcher:hover{transform:translateY(-2px);box-shadow:0 16px 40px rgba(28,26,62,.34)}.theo-launcher:focus-visible,.theo-root button:focus-visible{outline:3px solid #c9a24b;outline-offset:3px}
.theo-launcher-mark{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.23);color:#e7c779}.theo-launcher-copy{display:flex;flex-direction:column;text-align:left;line-height:1.15}.theo-launcher-copy strong{font-family:Fraunces,Georgia,serif;font-size:18px;font-weight:500;letter-spacing:.01em}.theo-launcher-copy small{font-size:10px;opacity:.8;letter-spacing:.08em;text-transform:uppercase;margin-top:4px} */
/* .theo-panel{position:fixed;right:24px;bottom:90px;width:min(420px,calc(100vw - 28px));height:min(690px,calc(100dvh - 116px));min-height:440px;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(28,26,62,.16);border-radius:20px;background:#fff;box-shadow:var(--theo-shadow);transform-origin:bottom right;animation:theo-in .18s ease-out} */
/*.theo-panel{position:fixed;right:24px;bottom:90px;width:min(360px,calc(100vw - 28px));height:min(520px,calc(100dvh - 116px));min-height:360px;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(28,26,62,.16);border-radius:20px;background:#fff;box-shadow:var(--theo-shadow);transform-origin:bottom right;animation:theo-in .18s ease-out}
.theo-panel{position:fixed;right:24px;bottom:40px;width:min(420px,calc(100vw - 28px));height:min(460px,calc(100dvh - 116px));min-height:320px;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(28,26,62,.16);border-radius:20px;background:#fff;box-shadow:var(--theo-shadow);transform-origin:bottom right;animation:theo-in .18s ease-out}
@keyframes theo-in{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
.theo-panel[hidden],.theo-launcher[hidden]{display:none!important}.theo-header{padding:18px 18px 16px;background:radial-gradient(circle at 100% 0%,rgba(201,162,75,.17),transparent 42%),linear-gradient(125deg,#1c1a3e,#312b78);color:#fff;display:flex;align-items:center;gap:１２px}
.theo-avatar {
    width: 72px;
    height: 72px;

    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theo-avatar img,
.theo-avatar video {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.theo-heading{flex:1;min-width:0}.theo-heading strong{display:block;font:500 23px/1.05 Fraunces,Georgia,serif;letter-spacing:.015em}.theo-heading span{display:block;font-size:10px;letter-spacing:.105em;text-transform:uppercase;color:#e6d9b7;margin-top:6px}.theo-status{display:flex;align-items:center;gap:6px;color:#e4e0f2;font-size:11px;margin-top:7px}.theo-status-dot{width:6px;height:6px;border-radius:50%;background:#9dc9a4}.theo-close{width:34px;height:34px;border:1px solid rgba(255,255,255,.22);border-radius:10px;background:rgba(255,255,255,.08);color:#fff;display:grid;place-items:center;font-size:21px;line-height:1}
.theo-context{padding:9px 17px;background:#f7f5ef;border-bottom:1px solid #e9e4d8;display:flex;align-items:center;gap:8px;font-size:11px;color:#656176}.theo-context svg{color:var(--theo-indigo);flex-shrink:0}.theo-context strong{color:#39344f;font-weight:600}.theo-messages{flex:1;overflow-y:auto;padding:17px 15px 12px;background:linear-gradient(180deg,#fff 0%,#fcfbf8 100%);scroll-behavior:smooth}.theo-welcome{padding:2px 2px 8px}.theo-eyebrow{font-size:10px;text-transform:uppercase;letter-spacing:.13em;color:#8a6a20;font-weight:700;margin-bottom:8px}.theo-welcome h3{font:500 23px/1.12 Fraunces,Georgia,serif;color:#242047;margin:0 0 9px}.theo-welcome p{font-size:12.5px;line-height:1.6;color:#666174;margin:0 0 15px}.theo-section-label{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:#858092;font-weight:700;margin:13px 0 8px}.theo-prompt-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.theo-prompt{min-height:65px;text-align:left;border:1px solid #e4dfd4;border-radius:12px;background:#fff;padding:10px 11px;color:#39354d;display:flex;flex-direction:column;justify-content:space-between;gap:8px;transition:border-color .15s,background .15s,transform .15s}.theo-prompt:hover{border-color:#c9a24b;background:#fffdf7;transform:translateY(-1px)}.theo-prompt-icon{color:#8a6a20;font-size:16px;line-height:1}.theo-prompt-label{font-size:11.5px;font-weight:600;line-height:1.3}.theo-message{display:flex;flex-direction:column;gap:5px;margin:13px 0;max-width:94%}.theo-message.user{align-items:flex-end;margin-left:auto}.theo-message.assistant{align-items:flex-start}.theo-message-name{font-size:10px;color:#8a8497;padding:0 4px}.theo-bubble{padding:11px 13px;border-radius:14px;font-size:12.5px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.theo-message.user .theo-bubble{background:#312b78;color:#fff;border-bottom-right-radius:4px}.theo-message.assistant .theo-bubble{background:#f2f0f8;border:1px solid #e7e3f1;color:#312d42;border-bottom-left-radius:4px}.theo-bubble strong{font-weight:700}.theo-bubble ul{padding-left:18px;margin:7px 0}.theo-recommendation{margin-top:9px;padding:9px 10px;border-left:2px solid #c9a24b;background:#fffdf7;border-radius:0 8px 8px 0;font-size:11.5px}.theo-typing{display:flex;gap:4px;padding:5px 2px}.theo-typing i{width:5px;height:5px;border-radius:50%;background:#8c86a9;animation:theo-bounce 1s infinite ease-in-out}.theo-typing i:nth-child(2){animation-delay:.12s}.theo-typing i:nth-child(3){animation-delay:.24s}@keyframes theo-bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)}}
.theo-compose-wrap{border-top:1px solid #e9e5dc;padding:11px 13px 12px;background:#fff}.theo-compose{display:flex;align-items:flex-end;gap:8px;border:1px solid #dcd7e7;border-radius:14px;padding:6px 6px 6px 12px;background:#fff}.theo-compose:focus-within{border-color:#8278bb;box-shadow:0 0 0 3px rgba(49,43,120,.08)}.theo-input{border:0!important;outline:0!important;box-shadow:none!important;resize:none;min-width:0;flex:1;min-height:35px;max-height:100px;padding:8px 0!important;background:transparent!important;color:#27243a;font-size:12px!important}.theo-input::placeholder{color:#9691a2}.theo-send{width:35px;height:35px;flex:0 0 35px;display:grid;place-items:center;border:0;border-radius:10px;background:#312b78;color:#fff}.theo-send:disabled{opacity:.45;cursor:not-allowed}.theo-footnote{text-align:center;color:#9994a3;font-size:9.5px;margin:8px 0 0}.theo-error{padding:8px 10px;margin:0 0 8px;background:#fff6e9;border:1px solid #f0dfc4;border-radius:9px;color:#795c28;font-size:11px;line-height:1.5}.theo-action{display:inline-flex;align-items:center;gap:7px;margin-top:9px;padding:8px 10px;border:1px solid #d9d3e8;border-radius:9px;background:#fff;color:#312b78;text-decoration:none;font-size:11px;font-weight:600}.theo-action:hover{background:#f6f4fb}.theo-disclaimer{margin-top:7px;color:#8a8497;font-size:10px;line-height:1.45}
@media(max-width:560px){.theo-launcher{right:15px;bottom:15px;padding:9px 13px 9px 9px}.theo-launcher-mark{width:32px;height:32px}.theo-launcher-copy strong{font-size:16px}.theo-panel{right:8px;bottom:8px;width:calc(100vw - 16px);height:calc(100dvh - 16px);min-height:0;border-radius:18px}.theo-panel:not([hidden])~.theo-launcher{display:none}
.theo-header{padding:15px}.theo-messages{padding:14px 12px}.theo-prompt{min-height:62px;padding:9px}.theo-prompt-label{font-size:11px}}
@media(prefers-reduced-motion:reduce){.theo-panel{animation:none}.theo-launcher,.theo-prompt{transition:none}.theo-typing i{animation:none}}

/* ── Patch: header actions (new-chat + close grouped together) ──────── 
.theo-header-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}
.theo-new-chat{width:34px;height:34px;border:1px solid rgba(255,255,255,.22);border-radius:10px;background:rgba(255,255,255,.08);color:#fff;display:grid;place-items:center;transition:background .15s}
.theo-new-chat:hover{background:rgba(255,255,255,.18)}
.theo-new-chat:focus-visible{outline:3px solid #c9a24b;outline-offset:3px}

/* ── Patch: markdown rendering inside assistant bubbles ─────────────── 
.theo-message.assistant .theo-bubble{white-space:normal}
.theo-md-h{display:block;font-weight:700;color:#1c1a3e;margin:10px 0 4px;font-size:12px;letter-spacing:.02em}
.theo-md-h:first-child{margin-top:2px}
.theo-md-li{display:flex;align-items:baseline;gap:7px;margin:3px 0}
.theo-md-bullet{color:#c9a24b;font-size:14px;flex-shrink:0;line-height:1}

/* ── Patch: secondary strategic-intelligence prompt section ─────────── 
.theo-section-label--secondary{margin-top:16px;color:#6a5a9e}
.theo-prompt-grid--compact{grid-template-columns:1fr}
.theo-prompt-grid--compact .theo-prompt{min-height:44px;flex-direction:row;align-items:center;gap:10px}
.theo-prompt-grid--compact .theo-prompt-icon{font-size:14px}
.theo-prompt-grid--compact .theo-prompt-label{font-size:11px}
.theo-mascot-icon{width:28px;height:28px;object-fit:contain;object-position:center bottom;display:block}
.theo-avatar .theo-mascot-icon{width:34px;height:34px}
.theo-launcher-mark{background:transparent!important;border:none!important}


/* ── Theo animated mascot refresh ───────────────────────────────────── 
.theo-launcher{gap:10px;padding:5px 17px 5px 5px;min-height:76px;border:1px solid rgba(255,255,255,.22);background:linear-gradient(135deg,#171632 0%,#302a75 72%,#3b347f 100%)}
.theo-launcher-mark{width:64px;height:66px;flex:0 0 64px;display:block;overflow:hidden;border-radius:12px;background:#0b1932!important;border:1px solid rgba(231,199,121,.35)!important;box-shadow:inset 0 0 18px rgba(201,162,75,.12)}
.theo-launcher-mark .theo-mascot-icon{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.theo-avatar{overflow:hidden;border-radius:12px;background:#0b1932;border:1px solid rgba(231,199,121,.45)}
.theo-avatar .theo-mascot-icon{width:100%;height:100%;object-fit:cover;object-position:center}
.theo-header-actions{gap:12px}
.theo-new-chat,.theo-close{width:30px;height:30px;padding:0;border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;color:rgba(255,255,255,.86)}
.theo-new-chat:hover,.theo-close:hover{background:rgba(255,255,255,.13)!important;color:#fff}
.theo-new-chat:focus-visible,.theo-close:focus-visible{outline:2px solid #e7c779!important;outline-offset:3px}
.theo-welcome-hero{display:flex;align-items:center;gap:12px;margin:3px 0 14px;padding:8px 10px 8px 8px;border:1px solid rgba(201,162,75,.22);border-radius:15px;background:linear-gradient(110deg,#111d38 0%,#24205b 72%,#302b70 100%);box-shadow:0 8px 22px rgba(28,26,62,.10);overflow:hidden}
.theo-welcome-mascot{display:block;width:76px;height:78px;flex:0 0 76px;object-fit:cover;object-position:center;border-radius:10px}
.theo-welcome-caption{display:flex;flex-direction:column;gap:4px;color:#fff;min-width:0}
.theo-welcome-caption strong{font:500 17px/1.15 Fraunces,Georgia,serif;color:#f4d58b}
.theo-welcome-caption span{font-size:11px;line-height:1.45;color:#e1deef}
.theo-welcome h3{font-size:22px}
@media(max-width:560px){.theo-launcher{right:12px;bottom:12px;min-height:68px;padding:4px 12px 4px 4px;gap:8px}.theo-launcher-mark{width:56px;height:58px;flex-basis:56px}.theo-launcher-copy strong{font-size:15px}.theo-launcher-copy small{font-size:9px;max-width:185px}.theo-welcome-mascot{width:66px;height:70px;flex-basis:66px}.theo-welcome-caption strong{font-size:16px}.theo-welcome-caption span{font-size:10.5px}.theo-new-chat,.theo-close{width:28px;height:28px}}


/* ── Layout fix: keep Theo inside the viewport and avoid duplicate welcome mascot ── 
#theo-root{position:static!important;width:0!important;height:0!important;overflow:visible!important;pointer-events:none!important}
#theo-root > .theo-panel,#theo-root > .theo-launcher{pointer-events:auto!important;max-width:calc(100vw - 24px)!important}
 */
 
:root {
  --theo-ink: #211f2e;
  --theo-muted: #696579;
  --theo-indigo: #312b78;
  --theo-indigo-dark: #1c1a3e;
  --theo-gold: #c9a24b;
  --theo-paper: #fbf9f4;
  --theo-line: rgba(33, 31, 46, .14);
  --theo-shadow: 0 24px 80px rgba(23, 20, 54, .22);
}

#theo-root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--theo-ink);
  font-size: 14px;
  line-height: 1.45;
  z-index: 2147483000;
}

#theo-root * {
  box-sizing: border-box;
}

#theo-root button,
#theo-root input {
  font: inherit;
}

#theo-root button {
  cursor: pointer;
}

.theo-panel {
  position: fixed;
  right: 24px;
  bottom: 40px;
  width: min(420px, calc(100vw - 28px));
  height: min(460px, calc(100dvh - 116px));
  min-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(28, 26, 62, .16);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--theo-shadow);
  transform-origin: bottom right;
  animation: theo-in .18s ease-out;
}

@keyframes theo-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.theo-panel[hidden],
.theo-launcher[hidden] {
  display: none !important;
}

/* Chat header */
.theo-header {
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 162, 75, .17), transparent 42%),
    linear-gradient(110deg, #1D1A40 0%, #211E4B 55%, #242052 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.theo-avatar {
  width: 72px;
  height: 72px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theo-avatar img,
.theo-avatar video {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}

.theo-heading {
  flex: 1;
  min-width: 0;
}

.theo-heading strong {
  display: block;
  font: 500 23px/1.05 Fraunces, Georgia, serif;
  letter-spacing: .015em;
}

.theo-heading span {
  display: block;
  font-size: 10px;
  letter-spacing: .105em;
  text-transform: uppercase;
  color: #e6d9b7;
  margin-top: 6px;
}

.theo-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e4e0f2;
  font-size: 11px;
  margin-top: 7px;
}

.theo-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9dc9a4;
}

.theo-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.theo-new-chat,
.theo-close {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, .86);
  display: grid;
  place-items: center;
  font-size: 21px;
  line-height: 1;
}

.theo-new-chat:hover,
.theo-close:hover {
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.theo-new-chat:focus-visible,
.theo-close:focus-visible,
.theo-launcher:focus-visible,
#theo-root button:focus-visible {
  outline: 2px solid #e7c779;
  outline-offset: 3px;
}

/* Workspace bar */
.theo-context {
  padding: 9px 17px;
  background: #f7f5ef;
  border-bottom: 1px solid #e9e4d8;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #656176;
}

.theo-context svg {
  color: var(--theo-indigo);
  flex-shrink: 0;
}

.theo-context strong {
  color: #39344f;
  font-weight: 600;
}

/* Chat conversation */
.theo-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 17px 15px 12px;
  background: linear-gradient(180deg, #fff 0%, #fcfbf8 100%);
  scroll-behavior: smooth;
}

.theo-welcome {
  padding: 2px 2px 8px;
}

.theo-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: #8a6a20;
  font-weight: 700;
  margin-bottom: 8px;
}

.theo-welcome h3 {
  font: 500 23px/1.12 Fraunces, Georgia, serif;
  color: #242047;
  margin: 0 0 9px;
}

.theo-welcome p {
  font-size: 12.5px;
  line-height: 1.6;
  color: #666174;
  margin: 0 0 15px;
}

.theo-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #858092;
  font-weight: 700;
  margin: 13px 0 8px;
}

.theo-section-label--secondary {
  margin-top: 16px;
  color: #6a5a9e;
}

.theo-prompt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.theo-prompt-grid--compact {
  grid-template-columns: 1fr;
}

.theo-prompt {
  min-height: 65px;
  text-align: left;
  border: 1px solid #e4dfd4;
  border-radius: 12px;
  background: #fff;
  padding: 10px 11px;
  color: #39354d;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: border-color .15s, background .15s, transform .15s;
}

.theo-prompt:hover {
  border-color: #c9a24b;
  background: #fffdf7;
  transform: translateY(-1px);
}

.theo-prompt-grid--compact .theo-prompt {
  min-height: 44px;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.theo-prompt-icon {
  color: #8a6a20;
  font-size: 16px;
  line-height: 1;
}

.theo-prompt-label {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}

.theo-prompt-grid--compact .theo-prompt-label {
  font-size: 11px;
}

.theo-message {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 13px 0;
  max-width: 94%;
}

.theo-message.user {
  align-items: flex-end;
  margin-left: auto;
}

.theo-message.assistant {
  align-items: flex-start;
}

.theo-message-name {
  font-size: 10px;
  color: #8a8497;
  padding: 0 4px;
}

.theo-bubble {
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.theo-message.user .theo-bubble {
  background: #312b78;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.theo-message.assistant .theo-bubble {
  background: #f2f0f8;
  border: 1px solid #e7e3f1;
  color: #312d42;
  border-bottom-left-radius: 4px;
  white-space: normal;
}

.theo-bubble strong {
  font-weight: 700;
}

.theo-md-h {
  display: block;
  font-weight: 700;
  color: #1c1a3e;
  margin: 10px 0 4px;
  font-size: 12px;
  letter-spacing: .02em;
}

.theo-md-h:first-child {
  margin-top: 2px;
}

.theo-md-li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 3px 0;
}

.theo-md-bullet {
  color: #c9a24b;
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
}

.theo-recommendation {
  margin-top: 9px;
  padding: 9px 10px;
  border-left: 2px solid #c9a24b;
  background: #fffdf7;
  border-radius: 0 8px 8px 0;
  font-size: 11.5px;
}

.theo-typing {
  display: flex;
  gap: 4px;
  padding: 5px 2px;
}

.theo-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8c86a9;
  animation: theo-bounce 1s infinite ease-in-out;
}

.theo-typing i:nth-child(2) { animation-delay: .12s; }
.theo-typing i:nth-child(3) { animation-delay: .24s; }

@keyframes theo-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* Message composer */
.theo-compose-wrap {
  flex-shrink: 0;
  border-top: 1px solid #e9e5dc;
  padding: 11px 13px 12px;
  background: #fff;
}

.theo-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border: 1px solid #dcd7e7;
  border-radius: 14px;
  padding: 6px 6px 6px 12px;
  background: #fff;
}

.theo-compose:focus-within {
  border-color: #8278bb;
  box-shadow: 0 0 0 3px rgba(49, 43, 120, .08);
}

.theo-input {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  resize: none;
  min-width: 0;
  flex: 1;
  min-height: 35px;
  max-height: 100px;
  padding: 8px 0 !important;
  background: transparent !important;
  color: #27243a;
  font-size: 12px !important;
}

.theo-input::placeholder { color: #9691a2; }

.theo-send {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #312b78;
  color: #fff;
}

.theo-send:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.theo-footnote {
  text-align: center;
  color: #9994a3;
  font-size: 9.5px;
  margin: 8px 0 0;
}

.theo-error {
  padding: 8px 10px;
  margin: 0 0 8px;
  background: #fff6e9;
  border: 1px solid #f0dfc4;
  border-radius: 9px;
  color: #795c28;
  font-size: 11px;
  line-height: 1.5;
}

.theo-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid #d9d3e8;
  border-radius: 9px;
  background: #fff;
  color: #312b78;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
}

.theo-action:hover { background: #f6f4fb; }

.theo-disclaimer {
  margin-top: 7px;
  color: #8a8497;
  font-size: 10px;
  line-height: 1.45;
}

/* Mascot images and animation */
.theo-mascot-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.theo-avatar .theo-mascot-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* Floating launcher: mascot only, still clickable */
.theo-launcher {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 2147483001;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 76px;
  height: 76px;
  min-height: 76px;
  padding: 0;
  gap: 0;

  color: #fff;
  background: transparent;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  transition: transform .18s ease;
}

.theo-launcher:hover {
  transform: translateY(-3px);
  box-shadow: none;
}

/* Hide only the launcher's text, not chatbot text */
.theo-launcher .theo-launcher-copy {
  display: none !important;
}

.theo-launcher-mark {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  overflow: visible;
  background: transparent !important;
  border: none !important;
  border-radius: 50%;
  box-shadow: none !important;
}

.theo-launcher-mark .theo-mascot-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Keep the root from creating an oversized layout */
#theo-root {
  position: static !important;
  width: 0 !important;
  height: 0 !important;
  overflow: visible !important;
  pointer-events: none !important;
}

#theo-root > .theo-panel,
#theo-root > .theo-launcher {
  pointer-events: auto !important;
  max-width: calc(100vw - 24px) !important;
}

/* Responsive layout */
@media (max-width: 560px) {
  .theo-launcher {
    right: 15px;
    bottom: 15px;
    width: 66px;
    height: 66px;
    min-height: 66px;
  }

  .theo-launcher-mark {
    width: 66px;
    height: 66px;
    flex-basis: 66px;
  }

  .theo-panel {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    min-height: 0;
    border-radius: 18px;
  }

  .theo-panel:not([hidden]) ~ .theo-launcher {
    display: none;
  }

  .theo-header { padding: 15px; }
  .theo-avatar { width: 58px; height: 58px; }
  .theo-avatar .theo-mascot-icon { width: 54px; height: 54px; }
  .theo-messages { padding: 14px 12px; }
  .theo-prompt { min-height: 62px; padding: 9px; }
  .theo-prompt-label { font-size: 11px; }
  .theo-new-chat,
  .theo-close { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .theo-panel { animation: none; }
  .theo-launcher,
  .theo-prompt { transition: none; }
  .theo-typing i { animation: none; }
}

/* Theo launcher: soft rounded corners */
.theo-launcher {
    border-radius: 22px !important;
    overflow: hidden;
}

.theo-launcher-mark {
    border-radius: 22px !important;
    overflow: hidden;
}

.theo-launcher-mark .theo-mascot-icon {
    border-radius: 22px !important;
    object-fit: contain;
}

/* Slightly softer hover effect */
.theo-launcher:hover {
    transform: translateY(-3px) scale(1.03);
}

