/* Site assistant. Sandstone, warm umber and gold; follows the site's focus and reduced-motion rules. */
.mtd-chat{--c-umber:#3A2A18;--c-ink:#1E1710;--c-sand:#F6EFE3;--c-line:#E3D3B8;--c-gold:#CFA14E;--c-tan-ink:#8F6418;--c-muted:#5C5547;position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));z-index:60;font-family:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;line-height:1.45;color:var(--c-ink)}
.mtd-chat *{box-sizing:border-box}
.mtd-chat button,.mtd-chat input{font:inherit}
.mtd-chat-fab{display:flex;align-items:center;gap:10px;margin-left:auto;min-height:48px;padding:0 18px 0 14px;border:0;border-radius:999px;background:var(--c-umber);color:#fff;font-weight:700;cursor:pointer;box-shadow:0 6px 22px rgba(58,42,24,.28);transition:transform .2s cubic-bezier(.3,1.4,.5,1),box-shadow .2s}
.mtd-chat-fab:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(58,42,24,.34)}
.mtd-chat-fab svg{width:22px;height:22px;fill:none;stroke:var(--c-gold);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.mtd-chat :focus-visible{outline:2px solid var(--c-tan-ink);outline-offset:2px}
.mtd-chat-fab:focus-visible,.mtd-chat-head :focus-visible{outline-color:var(--c-gold)}
.mtd-chat-panel{position:absolute;right:0;bottom:62px;width:380px;max-width:calc(100vw - 32px);height:540px;max-height:calc(100vh - 112px);max-height:calc(100dvh - 112px);display:none;flex-direction:column;background:#fff;border:1px solid var(--c-line);border-radius:16px;overflow:hidden;box-shadow:0 18px 56px rgba(58,42,24,.26)}
.mtd-chat.is-open .mtd-chat-panel{display:flex;animation:mtdChatIn .22s cubic-bezier(.2,.7,.2,1)}
.mtd-chat.is-open .mtd-chat-fab{display:none}
.mtd-chat-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:var(--c-umber);color:#fff;flex:none}
.mtd-chat-title{font-weight:800;font-size:16px;letter-spacing:.01em}
.mtd-chat-sub{font-size:12.5px;color:#EBDCC0;margin-top:1px}
.mtd-chat-close{display:grid;place-items:center;width:40px;height:40px;margin:-6px -8px -6px 0;border:0;border-radius:50%;background:transparent;color:#fff;cursor:pointer}
.mtd-chat-close:hover{background:rgba(255,255,255,.12)}
.mtd-chat-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.mtd-chat-log{flex:1;overflow-y:auto;padding:16px 14px;background:var(--c-sand);display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.mtd-chat-msg{max-width:86%;padding:10px 13px;border-radius:14px;overflow-wrap:anywhere;white-space:pre-wrap}
.mtd-chat-msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--c-line);border-bottom-left-radius:4px}
.mtd-chat-msg.me{align-self:flex-end;background:var(--c-umber);color:#fff;border-bottom-right-radius:4px}
.mtd-chat-msg a{color:var(--c-tan-ink);font-weight:600;text-underline-offset:2px}
.mtd-chat-msg.err{border-color:#E7B8B2;background:#FFF5F3}
.mtd-chat-typing{align-self:flex-start;display:none;gap:5px;padding:12px 14px;background:#fff;border:1px solid var(--c-line);border-radius:14px;border-bottom-left-radius:4px}
.mtd-chat.is-busy .mtd-chat-typing{display:flex}
.mtd-chat-typing i{width:7px;height:7px;border-radius:50%;background:var(--c-tan-ink);opacity:.35;animation:mtdChatDot 1.1s infinite ease-in-out}
.mtd-chat-typing i:nth-child(2){animation-delay:.15s}.mtd-chat-typing i:nth-child(3){animation-delay:.3s}
.mtd-chat-form{display:flex;gap:8px;padding:12px 14px 6px;background:#fff;border-top:1px solid var(--c-line);flex:none}
.mtd-chat-input{flex:1;min-width:0;min-height:44px;padding:0 13px;border:1.5px solid #CDBB9C;border-radius:12px;background:#fff;color:var(--c-ink)}
.mtd-chat-input::placeholder{color:#6B6354}
.mtd-chat-send{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:12px;background:var(--c-gold);color:#0B0B0A;cursor:pointer;transition:transform .15s}
.mtd-chat-send:hover:not(:disabled){transform:translateY(-1px)}
.mtd-chat-send:disabled,.mtd-chat-input:disabled{opacity:.55;cursor:not-allowed}
.mtd-chat-send svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.mtd-chat-note{margin:0;padding:2px 14px 12px;background:#fff;color:var(--c-muted);font-size:12px;text-align:center;flex:none}
.mtd-chat-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@keyframes mtdChatIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@keyframes mtdChatDot{0%,80%,100%{opacity:.3;transform:none}40%{opacity:1;transform:translateY(-3px)}}
@media (max-width:520px){.mtd-chat-panel{position:fixed;right:8px;left:8px;bottom:8px;width:auto;max-width:none;height:min(78dvh,620px);max-height:calc(100dvh - 16px)}}
@media (prefers-reduced-motion:reduce){.mtd-chat-fab,.mtd-chat-send{transition:none}.mtd-chat.is-open .mtd-chat-panel{animation:none}.mtd-chat-typing i{animation:none;opacity:.7}}
