/* Homepage-only assistant. All selectors are scoped to preserve the existing UI. */
.mx-chat { --chat-ink:#101114; --chat-muted:#606269; --chat-line:#e4e5e7; --chat-accent:#101114; font:400 14px/1.55 var(--font,sans-serif); color:var(--chat-ink); }
.navy-mode .mx-chat { --chat-accent:#1f4eaa; }
.mx-chat *, .mx-chat *::before, .mx-chat *::after { box-sizing:border-box; }
.mx-chat button,.mx-chat textarea { font:inherit; color:inherit; }
.mx-chat button { cursor:pointer; }
.mx-chat [hidden] { display:none !important; }
.mx-chat :is(button,a,textarea):focus-visible { outline:2px solid var(--chat-accent); outline-offset:4px; }
.mx-chat-dock { position:fixed; z-index:120; right:max(24px,env(safe-area-inset-right,0px)); bottom:max(24px,env(safe-area-inset-bottom,0px)); display:flex; align-items:center; gap:12px; }
.mx-chat-dock .site-back-to-top { position:static; flex:0 0 46px; width:46px; height:46px; color:#fff; box-shadow:none; }
.mx-chat-launch { display:flex; align-items:center; gap:11px; min-height:46px; padding:10px 15px; border:1px solid var(--chat-accent); border-radius:28px; background:var(--chat-accent); color:#fff !important; box-shadow:none; font-weight:500 !important; transition:background .2s; }
.mx-chat-launch:hover { background:#303136; box-shadow:none; }
.mx-chat-launch svg { width:21px; height:21px; }
.mx-chat-launch-arrow { margin-left:9px; font-size:18px; }
.mx-chat-panel { position:fixed; inset:auto 24px 24px auto; margin:0; padding:0; width:380px; max-width:calc(100vw - 32px); height:min(560px,calc(var(--mx-chat-height,100dvh) - 48px)); max-height:calc(var(--mx-chat-height,100dvh) - 24px); border:1px solid #d4d6da; border-radius:12px; background:#fff; color:var(--chat-ink); box-shadow:none; overflow:hidden; }
.mx-chat-panel[open] { display:flex; flex-direction:column; animation:mx-chat-reveal .2s ease-out; }
.mx-chat-panel::backdrop { background:rgb(16 17 20 / 5%); }
.mx-chat-head { flex:none; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 22px; border-bottom:1px solid var(--chat-line); }
.mx-chat-brand { display:flex; gap:11px; align-items:center; }
.mx-chat-head h2 { margin:0; font:500 16px/1.3 var(--font-d,var(--font,sans-serif)); letter-spacing:-.02em; }
.mx-chat-head .mx-logo { display:block; width:112px; height:26px; background-color:#101114; }
.mx-chat-head p { margin:6px 0 0; font-size:11px; line-height:1.5; color:var(--chat-muted); }
.mx-chat-tools { display:flex; gap:8px; }
.mx-chat-tools button { display:grid; place-items:center; width:34px; height:36px; padding:8px; background:none; border:0; border-radius:50%; }
.mx-chat-tools button:hover { background:#f2f3f4; }
.mx-chat-tools svg { width:20px; height:20px; }
.mx-chat-scroll { --chat-scroll-thumb:transparent; position:relative; min-height:0; flex:1 1 auto; overflow:auto; overscroll-behavior:contain; overflow-anchor:none; scrollbar-gutter:stable; scroll-behavior:auto; padding:24px 22px 20px; scrollbar-width:thin; scrollbar-color:var(--chat-scroll-thumb) transparent; }
.mx-chat-scroll.is-wheel-scrolling { --chat-scroll-thumb:#b8bec6; }
/* Keep the gutter fixed so revealing the thumb never moves the conversation. */
@supports selector(::-webkit-scrollbar) {
 .mx-chat-scroll { scrollbar-width:auto; scrollbar-color:auto; }
 .mx-chat-scroll::-webkit-scrollbar { width:6px; height:6px; }
 .mx-chat-scroll::-webkit-scrollbar-track,.mx-chat-scroll::-webkit-scrollbar-corner { background:transparent; }
 .mx-chat-scroll::-webkit-scrollbar-thumb { min-height:32px; border:1px solid transparent; border-radius:999px; background-color:var(--chat-scroll-thumb); background-clip:padding-box; transition:background-color .18s ease; }
 .mx-chat-scroll.is-wheel-scrolling::-webkit-scrollbar-thumb:hover { background-color:#929aa5; }
}
@media(forced-colors:active) { .mx-chat-scroll { --chat-scroll-thumb:CanvasText; scrollbar-color:auto; } }
.mx-chat-welcome { padding:0; }
.mx-chat-welcome h3 { font:500 24px/1.2 var(--font-d,var(--font,sans-serif)); letter-spacing:-.035em; margin:0 0 12px; }
.mx-chat-welcome p { color:var(--chat-muted); margin:0 0 24px; font-size:14px; line-height:1.6; }
.mx-chat-starters { border-top:1px solid var(--chat-line); }
.mx-chat-starters button { display:flex; width:100%; justify-content:space-between; align-items:center; gap:16px; border:0; border-bottom:1px solid var(--chat-line); border-radius:0; padding:13px 12px; min-height:48px; background:none; text-align:left; font-weight:500; transition:background-color .2s ease,color .2s ease; }
.mx-chat-starters button span { color:var(--chat-muted); transition:color .2s ease; }
.mx-chat-starters button:is(:hover,:focus-visible) { color:#fff; background:var(--chat-accent); }
.mx-chat-starters button:is(:hover,:focus-visible) span { color:#fff; }
.mx-chat-user { margin:0 0 24px auto; padding:12px 16px; max-width:88%; width:fit-content; border-radius:12px 12px 2px 12px; background:#000; color:#fff; overflow-wrap:anywhere; }
.navy-mode .mx-chat-user { background:var(--chat-accent); }
.mx-chat-user p { margin:0; font-size:14px; line-height:1.6; }
.mx-chat-answer { margin:0 0 28px; padding:18px 16px; border-radius:12px 12px 12px 2px; background:#f5f5f6; overflow-wrap:anywhere; }
.mx-chat-answer-label { display:block; margin:0 0 12px; color:var(--chat-accent); font-size:11px; font-weight:600; }
.mx-chat-answer p { margin:0 0 12px; font-size:14px; line-height:1.65; white-space:pre-line; letter-spacing:0; }
.mx-chat-details { list-style:disc outside; padding:0 0 0 18px; margin:12px 0; border:0; }
.mx-chat-details li { margin:0 0 8px; padding:0; border:0; font-size:14px; line-height:1.6; transition:opacity .14s ease-out; }
.mx-chat-details li:last-child { margin-bottom:0; }
.mx-chat-details strong { display:block; margin-bottom:3px; font-weight:500; color:var(--chat-ink); }
.mx-chat-details li>span { color:var(--chat-muted); }
.mx-chat-links { display:grid; gap:0; margin:18px 0 4px; border-top:1px solid var(--chat-line); }
.mx-chat-links a { display:flex; justify-content:space-between; gap:16px; padding:12px 0; color:var(--chat-ink); text-decoration:none; border-bottom:1px solid var(--chat-line); line-height:1.45; font-size:13px; font-weight:500; }
.mx-chat-links a:hover { color:var(--chat-accent); background:#f8f8f9; }
.mx-chat-links small { display:block; font-size:10px; color:var(--chat-muted); font-weight:400; margin:0 0 2px; }
.mx-chat-link-arrow { align-self:center; font-size:18px; font-weight:400; }
.mx-chat-suggestions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 4px; }
.mx-chat-suggestions button { text-align:left; border:1px solid #d9dbdf; border-radius:20px; padding:8px 11px; background:#fff; font-size:11px; line-height:1.5; }
.mx-chat-suggestions button:hover { background:#f3f4f5; border-color:#a9adb3; }
.mx-chat-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:16px 0 0; }
.mx-chat-options button { min-width:0; min-height:44px; padding:9px 10px; border:1px solid #d9dbdf; border-radius:8px; background:#fff; color:var(--chat-ink); font-size:12px; line-height:1.4; text-align:left; transition:background .16s,color .16s,border-color .16s; }
.mx-chat-options button:is(:hover,:focus-visible) { background:var(--chat-accent); border-color:var(--chat-accent); color:#fff; }
.mx-chat-status { padding:0; font-size:11px; color:var(--chat-muted); }
.mx-chat-status:not(:empty) { padding-top:7px; padding-bottom:8px; }
.mx-chat-form { flex:none; margin:0; padding:16px 22px; border-top:1px solid var(--chat-line); background:#fff; }
.mx-chat-composer { display:flex; align-items:flex-end; gap:8px; padding:9px 9px 9px 14px; border:1px solid #d6d8dd; border-radius:12px; background:#fff; }
.mx-chat-composer:focus-within { border-color:var(--chat-accent); }
.mx-chat textarea { display:block; flex:1; resize:none; min-width:0; min-height:34px; max-height:112px; padding:6px 0; border:0; background:none; border-radius:0; font-size:14px; line-height:22px; outline:none !important; box-shadow:none; }
.mx-chat textarea::placeholder { color:#757880; opacity:1; }
.mx-chat-composer button { display:grid; place-items:center; flex:none; width:34px; height:34px; padding:6px; border:0; border-radius:50%; background:var(--chat-accent); color:#fff; }
.mx-chat-composer button:disabled { cursor:default; background:#e9eaed; color:#83868d; }
.mx-chat-composer button svg { width:21px; height:21px; }
.mx-chat-foot { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; margin:12px 2px 0; font-size:10px; line-height:1.5; color:var(--chat-muted); }
.mx-chat-foot a { color:var(--chat-ink); text-decoration:none; }
.mx-chat-foot a:hover { text-decoration:underline; }
.mx-chat-sr { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@keyframes mx-chat-reveal { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:600px) {
 .mx-chat-panel { inset:calc(var(--mx-chat-top,0px) + var(--mx-chat-height,100dvh) - min(560px, var(--mx-chat-height,100dvh) - 16px) - 8px) 8px auto auto; width:min(380px,calc(100% - 16px)); max-width:none; height:min(560px,calc(var(--mx-chat-height,100dvh) - 16px)); max-height:none; border-radius:12px; }
 .mx-chat-panel::backdrop { background:rgb(16 17 20 / 5%); }
 .mx-chat-head { padding:16px 18px; }
 .mx-chat-scroll { padding:22px 18px 18px; }
 .mx-chat-form { padding:16px 18px max(16px,env(safe-area-inset-bottom)); }
 .mx-chat textarea { font-size:16px; }
 .mx-chat-suggestions button { min-height:40px; }
 .mx-chat-tools button { width:38px; height:38px; }
}
@media(max-width:650px) {
 .mx-chat-dock { bottom:calc(96px + env(safe-area-inset-bottom,0px)); right:max(16px,env(safe-area-inset-right,0px)); }
 .mx-chat-launch { justify-content:center; flex:0 0 48px; width:48px; height:48px; min-height:48px; padding:0; gap:0; border-radius:50%; }
 .mx-chat-launch > span { display:none; }
}
@media(prefers-reduced-motion:reduce) { .mx-chat-panel[open] { animation:none; } .mx-chat-launch,.mx-chat-starters button,.mx-chat-starters button span,.mx-chat-scroll::-webkit-scrollbar-thumb { transition:none; } }
@media print { .mx-chat { display:none; } }
.mx-chat-review-notice { margin:9px 0 0; color:#60656b; font-size:10px; line-height:1.5; }

/* Fade words in their final positions; never insert characters or a layout-taking caret. */
.mx-chat-word { opacity:1; transition:opacity .14s ease-out; }
.mx-chat-revealing .mx-chat-word { opacity:0; }
.mx-chat-revealing .mx-chat-word.is-visible { opacity:1; }
.mx-chat-revealing .mx-chat-details li { opacity:0; }
.mx-chat-revealing .mx-chat-details li.is-visible { opacity:1; }
.mx-chat-links,.mx-chat-suggestions,.mx-chat-options { transition:opacity .16s ease-out; }
.mx-chat-deferred { opacity:0; visibility:hidden; pointer-events:none; }
@media(prefers-reduced-motion:reduce) { .mx-chat-word,.mx-chat-details li,.mx-chat-links,.mx-chat-suggestions,.mx-chat-options,.mx-chat-options button { transition:none; } }
