/* Sofi Web chat helper (separate file so daily content refreshes never touch it) */
.sw-bubble {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 62px; height: 62px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 28px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 24px rgba(108, 99, 255, 0.4);
  transition: transform 0.15s;
}
.sw-bubble:hover { transform: scale(1.07); }
.sw-bubble:focus-visible, .sw-send:focus-visible, .sw-close:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.sw-bubble .sw-dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--sun); border: 2px solid #fff; }
.sw-panel {
  position: fixed; right: 18px; bottom: 92px; z-index: 51; width: 360px; max-width: calc(100vw - 24px);
  height: 520px; max-height: calc(100vh - 120px); display: flex; flex-direction: column;
  background: var(--card); color: var(--text); border: 2px solid var(--line); border-radius: 22px;
  box-shadow: 0 16px 48px rgba(43, 35, 64, 0.28); overflow: hidden;
}
.sw-panel[hidden] { display: none; }
.sw-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.sw-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); display: grid; place-items: center; font-size: 20px; flex: none; }
.sw-title { font-weight: 900; line-height: 1.1; }
.sw-sub { font-size: 0.78rem; opacity: 0.9; }
.sw-close { margin-left: auto; background: rgba(255, 255, 255, 0.2); color: #fff; border: 0; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.sw-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.sw-msg { max-width: 85%; padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.97rem; line-height: 1.4; }
.sw-bot { align-self: flex-start; background: var(--btn); border-bottom-left-radius: 4px; }
.sw-me { align-self: flex-end; background: var(--accent2); color: #fff; border-bottom-right-radius: 4px; }
.sw-err { align-self: center; background: transparent; color: #e63946; font-weight: 700; text-align: center; font-size: 0.9rem; }
.sw-typing { display: inline-flex; gap: 4px; align-items: center; }
.sw-typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: sw-bounce 1s infinite ease-in-out; }
.sw-typing span:nth-child(2) { animation-delay: 0.15s; }
.sw-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes sw-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-5px); opacity: 1; } }
.sw-chips[hidden] { display: none; }
.sw-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.sw-chip { border: 2px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.sw-chip:hover { border-color: var(--accent2); }
.sw-form { display: flex; gap: 8px; padding: 10px; border-top: 2px solid var(--line); }
.sw-input {
  flex: 1; min-width: 0; resize: none; font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 2px solid var(--line); border-radius: 14px; padding: 9px 12px; max-height: 110px;
}
.sw-input:focus { outline: none; border-color: var(--accent2); }
.sw-send { flex: none; border: 0; border-radius: 14px; padding: 0 16px; font: inherit; font-weight: 900; color: #fff; background: var(--accent2); cursor: pointer; }
.sw-send:disabled { opacity: 0.5; cursor: default; }
.sw-note { font-size: 0.72rem; color: var(--muted); text-align: center; padding: 0 10px 8px; }
@media (max-width: 520px) {
  .sw-panel { right: 8px; left: 8px; bottom: 84px; width: auto; max-width: none; height: auto; top: 12px; max-height: none; }
  .sw-bubble { right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { .sw-typing span { animation: none; } }
