:root {
  --sfc-ink: #15313a;
  --sfc-muted: #617077;
  --sfc-blue: #017BA0;
  --sfc-green: #09988F;
  --sfc-pink: #D452D5;
  --sfc-orange: #FF791A;
  --sfc-line: rgba(1, 123, 160, 0.18);
  --sfc-soft: rgba(255,255,255,0.92);
  --sfc-shadow: 0 22px 60px rgba(15, 49, 58, 0.20);
}

.pb-stratfit-chatbot,
.pb-stratfit-chatbot * {
  box-sizing: border-box;
}

.pb-stratfit-chatbot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--sfc-ink);
}

.pb-stratfit-chatbot[hidden] {
  display: none !important;
}

.sfc-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 20px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sfc-blue) 0%, var(--sfc-green) 100%);
  color: #fff;
  box-shadow: 0 16px 36px rgba(1, 123, 160, 0.28);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  letter-spacing: -0.035em;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.sfc-launcher:hover,
.sfc-launcher:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(1, 123, 160, 0.34);
  outline: none;
}

.sfc-launcher-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.sfc-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(430px, calc(100vw - 30px));
  height: min(690px, calc(100vh - 130px));
  display: none;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(1, 123, 160, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(212, 82, 213, 0.12), transparent 16rem),
    radial-gradient(circle at 100% 12%, rgba(255, 121, 26, 0.10), transparent 15rem),
    rgba(255, 255, 255, 0.96);
  box-shadow: var(--sfc-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.pb-stratfit-chatbot.is-open .sfc-panel {
  display: grid;
}

.pb-stratfit-chatbot.is-open .sfc-launcher {
  display: none;
}

.sfc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 15px;
  border-bottom: 1px solid var(--sfc-line);
  background: rgba(255, 255, 255, 0.74);
}

.sfc-header-copy {
  display: grid;
  gap: 4px;
}

.sfc-kicker {
  color: var(--sfc-blue);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sfc-title {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.sfc-subtitle {
  margin: 0;
  color: var(--sfc-muted);
  font-size: 0.82rem;
  line-height: 1.42;
}

.sfc-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(21, 49, 58, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--sfc-ink);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.sfc-close:hover,
.sfc-close:focus-visible {
  color: var(--sfc-blue);
  border-color: rgba(1, 123, 160, 0.32);
  outline: none;
}

.sfc-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sfc-message {
  max-width: 92%;
  border-radius: 18px;
  padding: 12px 14px;
  line-height: 1.52;
  font-size: 0.92rem;
}

.sfc-message strong {
  font-weight: 900;
}

.sfc-message p {
  margin: 0 0 10px;
}

.sfc-message p:last-child,
.sfc-message ul:last-child,
.sfc-message ol:last-child {
  margin-bottom: 0;
}

.sfc-message ul,
.sfc-message ol {
  padding-left: 20px;
  margin: 8px 0 10px;
}

.sfc-message li {
  margin: 4px 0;
}

.sfc-message-user {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(135deg, var(--sfc-blue), var(--sfc-green));
  box-shadow: 0 10px 24px rgba(1, 123, 160, 0.16);
}

.sfc-message-bot {
  align-self: flex-start;
  border: 1px solid rgba(1, 123, 160, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: var(--sfc-ink);
}

.sfc-sources {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(1, 123, 160, 0.12);
  color: var(--sfc-muted);
  font-size: 0.78rem;
}

.sfc-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 5px 0 0;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(1, 123, 160, 0.08);
  color: var(--sfc-blue);
  font-weight: 850;
}

.sfc-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(15, 49, 58, 0.08);
  background:
    linear-gradient(180deg, rgba(248, 252, 253, 0.96), rgba(255, 255, 255, 0.96));
  max-height: 88px;
  overflow-y: auto;
}

.sfc-prompt {
  appearance: none;
  border: 1px solid rgba(1, 123, 160, 0.16);
  background: rgba(1, 123, 160, 0.055);
  color: #017BA0;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.sfc-prompt:hover {
  background: rgba(1, 123, 160, 0.1);
  border-color: rgba(1, 123, 160, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(1, 123, 160, 0.10);
}

.sfc-prompt:focus-visible {
  border-color: rgba(1, 123, 160, 0.34);
  background: rgba(1, 123, 160, 0.06);
  outline: none;
}

.sfc-compose {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--sfc-line);
  background: rgba(255, 255, 255, 0.88);
}

.sfc-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.sfc-input {
  width: 100%;
  min-height: 48px;
  max-height: 120px;
  resize: none;
  border: 1px solid rgba(21, 49, 58, 0.18);
  border-radius: 16px;
  background: #fff;
  color: var(--sfc-ink);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.42;
  padding: 12px 13px;
}

.sfc-input:focus {
  border-color: rgba(1, 123, 160, 0.48);
  outline: 3px solid rgba(1, 123, 160, 0.12);
}

.sfc-send {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 0 16px;
  background: var(--sfc-ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.sfc-send:hover,
.sfc-send:focus-visible {
  background: var(--sfc-blue);
  outline: none;
}

.sfc-send:disabled,
.sfc-input:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.sfc-footnote {
  margin: 0;
  color: var(--sfc-muted);
  font-size: 0.72rem;
  line-height: 1.42;
}

.sfc-typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.sfc-typing span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sfc-blue);
  animation: sfcTyping 900ms ease-in-out infinite;
}

.sfc-scope-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(121, 82, 213, 0.09);
  border: 1px solid rgba(121, 82, 213, 0.16);
  color: #7952D5;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sfc-typing span:nth-child(2) { animation-delay: 120ms; }
.sfc-typing span:nth-child(3) { animation-delay: 240ms; }

@keyframes sfcTyping {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 700px) {
  .pb-stratfit-chatbot {
    right: 14px;
    bottom: 14px;
  }

  .sfc-panel {
    right: -2px;
    bottom: 0;
    width: calc(100vw - 24px);
    height: min(82vh, 700px);
    border-radius: 22px;
  }

  .pb-stratfit-chatbot.is-open .sfc-launcher {
    display: none;
  }
}

@media (max-width: 420px) {
    .pb-stratfit-chatbot {
      width: min(390px, calc(100vw - 28px));
    }
    
    .sfc-panel {
      width: min(390px, calc(100vw - 28px));
      max-height: min(650px, calc(100vh - 120px));
    }
}