:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18222f;
  background: #f4f7fb;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.demo-page { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at top left, #d9e9ff, transparent 45%), #f4f7fb; }
.demo-copy { width: min(680px, 100%); padding: 48px; border: 1px solid #d8e0ea; border-radius: 24px; background: rgba(255,255,255,.9); box-shadow: 0 24px 60px rgba(35,54,78,.12); }
.eyebrow { color: #2464d8; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
h1 { margin: 8px 0 14px; font-size: clamp(2.4rem, 7vw, 4.8rem); line-height: .95; }
.demo-copy p { line-height: 1.7; color: #536275; }
.primary-button, .composer button { border: 0; border-radius: 999px; background: #175cd3; color: white; font: inherit; font-weight: 700; padding: 12px 20px; cursor: pointer; }
.chat-panel { position: fixed; right: 24px; bottom: 24px; width: min(400px, calc(100vw - 32px)); height: min(650px, calc(100vh - 48px)); display: grid; grid-template-rows: auto auto 1fr auto auto; background: white; border: 1px solid #d8e0ea; border-radius: 20px; box-shadow: 0 28px 80px rgba(25,42,65,.25); overflow: hidden; transform: translateY(24px) scale(.98); opacity: 0; pointer-events: none; transition: .2s ease; }
.chat-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.embed-mode, .embed-mode body { width: 100%; height: 100%; min-height: 0; overflow: hidden; background: transparent; }
.embed-mode .demo-page { display: none; }
.embed-mode .chat-panel { inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 18px; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #e8edf3; }
.status-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #26a269; box-shadow: 0 0 0 4px #e4f7ed; }
.icon-button { border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: #657386; }
.chat-status { min-height: 38px; padding: 10px 18px; color: #657386; font-size: .86rem; background: #f8fafc; }
.messages { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.message { max-width: 84%; padding: 11px 14px; border-radius: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { align-self: flex-end; background: #175cd3; color: white; border-bottom-right-radius: 5px; }
.message.assistant { align-self: flex-start; background: #edf2f7; border-bottom-left-radius: 5px; }
.suggestions { padding: 0 14px 10px; display: flex; gap: 8px; overflow-x: auto; }
.suggestions button { flex: 0 0 auto; border: 1px solid #cdd9e8; border-radius: 999px; background: white; color: #28558e; padding: 8px 12px; cursor: pointer; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-top: 1px solid #e8edf3; }
.composer textarea { resize: none; border: 1px solid #cbd5e1; border-radius: 14px; padding: 11px 13px; font: inherit; min-height: 44px; max-height: 120px; }
.composer textarea:focus { outline: 3px solid rgba(23,92,211,.18); border-color: #175cd3; }
.composer button:disabled, textarea:disabled { opacity: .55; cursor: wait; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 560px) {
  .demo-page { padding: 18px; }
  .demo-copy { padding: 28px; }
  .chat-panel { inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .chat-panel { transition: none; } }
