/* Solar Proof help-bot widget - served direct (no build). Pairs with js/help-bot.js */
.sphb-root { --sphb-blue:#2563eb; --sphb-blue-d:#1d4ed8; --sphb-ink:#0f172a; --sphb-mut:#64748b; --sphb-line:#e2e8f0; --sphb-bg:#ffffff; --sphb-soft:#f8fafc; --sphb-radius:14px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--sphb-ink); font-size: 14px; line-height: 1.5; }
.sphb-root *, .sphb-root *::before, .sphb-root *::after { box-sizing: border-box; }

/* Launcher */
.sphb-launcher { position: fixed; right: 24px; bottom: 24px; z-index: 1044; height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 999px;
  background: var(--sphb-ink); color: #fff; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(15,23,42,.22), 0 1px 2px rgba(15,23,42,.2); transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.sphb-launcher:hover { transform: translateY(-1px); background: #1e293b; box-shadow: 0 12px 28px rgba(15,23,42,.26); }
.sphb-launcher:focus-visible { outline: 2px solid var(--sphb-blue); outline-offset: 2px; }
.sphb-launcher svg { width: 18px; height: 18px; flex: 0 0 auto; }
.sphb-launcher.sphb-hidden { display: none; }
@media (max-width: 600px) { .sphb-launcher span { display: none; } .sphb-launcher { padding: 0 14px; width: 48px; justify-content: center; } }

/* Panel */
.sphb-panel { position: fixed; right: 24px; bottom: 24px; z-index: 1046; width: 400px; max-width: calc(100vw - 24px); height: 620px; max-height: calc(100vh - 48px);
  background: var(--sphb-bg); border: 1px solid var(--sphb-line); border-radius: var(--sphb-radius); box-shadow: 0 24px 64px rgba(15,23,42,.22), 0 2px 6px rgba(15,23,42,.08);
  display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.sphb-panel.sphb-open { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 600px) { .sphb-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; } }

/* Inline mode (public /help page) */
.sphb-root.sphb-inline .sphb-panel { position: relative; right: auto; bottom: auto; width: 100%; max-width: 100%; height: 560px; opacity: 1; transform: none; pointer-events: auto; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
.sphb-root.sphb-inline .sphb-launcher, .sphb-root.sphb-inline .sphb-close { display: none; }

.sphb-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--sphb-line); background: var(--sphb-bg); }
.sphb-avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #7c3aed); display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.sphb-avatar svg { width: 18px; height: 18px; }
.sphb-title { font-weight: 600; font-size: 14px; line-height: 1.2; }
.sphb-sub { font-size: 12px; color: var(--sphb-mut); margin-top: 2px; }
.sphb-head-actions { margin-left: auto; display: flex; gap: 4px; }
.sphb-iconbtn { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px; color: var(--sphb-mut); cursor: pointer; display: grid; place-items: center; }
.sphb-iconbtn:hover { background: var(--sphb-soft); color: var(--sphb-ink); }
.sphb-iconbtn svg { width: 16px; height: 16px; }

.sphb-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; background: var(--sphb-soft); scroll-behavior: smooth; }
.sphb-msg { display: flex; margin-bottom: 12px; animation: sphb-in .18s ease; }
@keyframes sphb-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sphb-msg.sphb-user { justify-content: flex-end; }
.sphb-bubble { max-width: 88%; padding: 10px 14px; border-radius: 14px; background: var(--sphb-bg); border: 1px solid var(--sphb-line); word-wrap: break-word; }
.sphb-user .sphb-bubble { background: var(--sphb-blue); border-color: var(--sphb-blue); color: #fff; border-bottom-right-radius: 4px; }
.sphb-bot .sphb-bubble { border-bottom-left-radius: 4px; }
.sphb-bubble p { margin: 0 0 8px; } .sphb-bubble p:last-child { margin-bottom: 0; }
.sphb-bubble ol, .sphb-bubble ul { margin: 6px 0 8px; padding-left: 20px; }
.sphb-bubble li { margin: 3px 0; }
.sphb-bubble code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }
.sphb-user .sphb-bubble code { background: rgba(255,255,255,.2); }
.sphb-bubble a { color: var(--sphb-blue); text-decoration: none; } .sphb-bubble a:hover { text-decoration: underline; }
.sphb-bubble strong { font-weight: 600; }

.sphb-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sphb-line); }
.sphb-source { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--sphb-blue-d); background: #eff6ff; border: 1px solid #dbeafe; border-radius: 999px; padding: 3px 10px 3px 8px; text-decoration: none; }
.sphb-source:hover { background: #dbeafe; text-decoration: none; }
.sphb-source svg { width: 12px; height: 12px; }

.sphb-feedback { display: flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--sphb-mut); font-size: 12px; }
.sphb-feedback button { border: 0; background: transparent; color: var(--sphb-mut); width: 26px; height: 26px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.sphb-feedback button:hover { background: var(--sphb-soft); color: var(--sphb-ink); }
.sphb-feedback button.sphb-on { color: var(--sphb-blue); background: #eff6ff; }
.sphb-feedback svg { width: 14px; height: 14px; }

.sphb-typing { display: inline-flex; gap: 4px; padding: 6px 2px; }
.sphb-typing i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: sphb-bounce 1s infinite; }
.sphb-typing i:nth-child(2) { animation-delay: .15s; } .sphb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sphb-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

.sphb-suggest { margin: 4px 0 12px; }
.sphb-suggest-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sphb-mut); margin: 0 0 8px 2px; }
.sphb-chip { display: block; width: 100%; text-align: left; background: var(--sphb-bg); border: 1px solid var(--sphb-line); border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; cursor: pointer; font: inherit; color: var(--sphb-ink); transition: border-color .12s, box-shadow .12s; }
.sphb-chip:hover { border-color: #bfdbfe; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.sphb-chip small { display: block; color: var(--sphb-mut); font-size: 12px; margin-top: 1px; }

.sphb-foot { border-top: 1px solid var(--sphb-line); padding: 12px 12px 10px; background: var(--sphb-bg); }
.sphb-form { display: flex; align-items: flex-end; gap: 8px; background: var(--sphb-soft); border: 1px solid var(--sphb-line); border-radius: 12px; padding: 6px 6px 6px 12px; transition: border-color .12s, box-shadow .12s; }
.sphb-form:focus-within { border-color: var(--sphb-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: #fff; }
.sphb-input { flex: 1 1 auto; border: 0; background: transparent; resize: none; font: inherit; color: var(--sphb-ink); outline: 0; max-height: 120px; min-height: 24px; padding: 4px 0; line-height: 1.45; }
.sphb-input::placeholder { color: #94a3b8; }
.sphb-send { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--sphb-blue); color: #fff; cursor: pointer; display: grid; place-items: center; flex: 0 0 auto; transition: background .12s, opacity .12s; }
.sphb-send:hover { background: var(--sphb-blue-d); } .sphb-send:disabled { opacity: .4; cursor: default; }
.sphb-send svg { width: 16px; height: 16px; }
.sphb-foot-links { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 0 4px; font-size: 12px; color: var(--sphb-mut); }
.sphb-foot-links a { color: var(--sphb-mut); text-decoration: none; } .sphb-foot-links a:hover { color: var(--sphb-blue); }
.sphb-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
