/* ---- Chat assistant ---- */
.csp-chat-btn { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90; display: flex; align-items: center; gap: .6rem;
  background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: .85rem 1.25rem; font: 700 1.05rem var(--display);
  box-shadow: 0 6px 24px rgba(0,0,0,.25); cursor: pointer; }
.csp-chat-btn:hover { background: var(--accent-dark); }
.csp-chat { position: fixed; right: 1.25rem; bottom: 5.25rem; z-index: 91; width: min(400px, calc(100vw - 2.5rem)); height: min(620px, calc(100vh - 7rem));
  display: none; flex-direction: column; background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.3); overflow: hidden; font-family: var(--body); }
.csp-chat.open { display: flex; }
.csp-head { background: var(--navy-deep); color: #fff; padding: .9rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.csp-head strong { font: 700 1.2rem var(--display); display: block; }
.csp-head small { opacity: .75; }
.csp-close { background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.csp-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--paper); }
.csp-msg { max-width: 85%; padding: .65rem .9rem; border-radius: 12px; line-height: 1.45; white-space: pre-wrap; font-size: .95rem; }
.csp-msg.bot { background: #fff; color: var(--ink); border-bottom-left-radius: 3px; align-self: flex-start; }
.csp-msg.user { background: var(--accent); color: #fff; border-bottom-right-radius: 3px; align-self: flex-end; }
.csp-msg.sys { background: transparent; color: var(--muted); font-size: .85rem; align-self: center; text-align: center; }
.csp-msg a { color: inherit; }
.csp-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .5rem; background: var(--paper); }
.csp-chips button { background: #fff; border: 1px solid var(--accent); color: var(--accent-dark); border-radius: 999px; padding: .35rem .8rem; font: 600 .85rem var(--body); cursor: pointer; }
.csp-chips button:hover { background: var(--accent); color: #fff; }
.csp-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid #e3e8ee; background: #fff; }
.csp-form input { flex: 1; padding: .7rem .8rem; border: 1px solid #c9d2dc; border-radius: 8px; font: inherit; }
.csp-form button { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 0 1rem; font: 700 1rem var(--display); cursor: pointer; }
.csp-form button:disabled { opacity: .5; cursor: default; }
.csp-typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; background: var(--muted); border-radius: 50%; animation: csp-bounce 1.2s infinite; }
.csp-typing span:nth-child(2) { animation-delay: .2s } .csp-typing span:nth-child(3) { animation-delay: .4s }
@keyframes csp-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4 } 40% { transform: translateY(-5px); opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .csp-typing span { animation: none } }
@media (max-width: 560px) { .csp-chat { right: .75rem; left: .75rem; width: auto; bottom: 4.75rem; } .csp-chat-btn { right: .75rem; bottom: .75rem; } }
