:root {
  color: #182239;
  background: #edf2f8;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; }
button, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.help-chat-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 56px);
  background:
    radial-gradient(circle at 12% 8%, rgba(71, 114, 246, .14), transparent 30rem),
    radial-gradient(circle at 88% 92%, rgba(50, 180, 156, .10), transparent 24rem),
    #f6f8fc;
}
.help-chat {
  width: min(100%, 780px);
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce4f0;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(35, 54, 94, .14), 0 4px 14px rgba(35, 54, 94, .06);
}
.help-chat__consent { max-width: 580px; padding: clamp(40px, 9vw, 68px) clamp(28px, 8vw, 68px); text-align: center; }
.help-chat__consent-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 18px;
  color: #205ee5;
  background: #e8efff;
  font-size: 1.4rem;
}
.help-chat__consent h1 { margin: 0; color: #19243a; font-size: clamp(1.55rem, 5vw, 2rem); letter-spacing: -.035em; }
.help-chat__consent > p { margin: 16px auto 24px; color: #5b6880; line-height: 1.58; }
.help-chat__consent a { color: #1454dc; font-weight: 700; }
.help-chat__button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 17px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #2463e8;
  box-shadow: 0 5px 12px rgba(36, 99, 232, .22);
  font-weight: 750;
  cursor: pointer;
}
.help-chat__button:hover { background: #1454dc; }
#chat-panel { display: flex; min-height: 0; flex-direction: column; }
.help-chat__messages {
  display: grid;
  gap: 18px;
  min-height: 335px;
  max-height: min(54vh, 600px);
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}
.help-chat__message {
  display: grid;
  width: min(100%, 610px);
  gap: 7px;
}
.help-chat__message--assistant, .help-chat__message--error { grid-template-columns: 32px minmax(0, 1fr); justify-self: start; }
.help-chat__message--user { justify-self: end; }
.help-chat__message-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #3578f5, #1d55cf);
  font-size: .73rem;
  font-weight: 800;
}
.help-chat__message-body { min-width: 0; }
.help-chat__message-label { margin: 0 0 5px; color: #7c899e; font-size: .72rem; font-weight: 750; }
.help-chat__message--user .help-chat__message-label { text-align: right; }
.help-chat__bubble {
  padding: 13px 15px;
  border-radius: 5px 16px 16px 16px;
  color: #26344b;
  background: #f1f4f9;
}
.help-chat__message--user .help-chat__bubble { border-radius: 16px 5px 16px 16px; color: #fff; background: #2767ec; box-shadow: 0 5px 14px rgba(39, 103, 236, .18); }
.help-chat__message--error .help-chat__bubble { color: #9a2427; background: #fff0f0; }
.help-chat__message--user .help-chat__bubble, .help-chat__message--error .help-chat__bubble { white-space: pre-wrap; }
.help-chat__markdown { display: grid; gap: 10px; }
.help-chat__markdown p, .help-chat__markdown h3, .help-chat__markdown h4, .help-chat__markdown h5 { margin: 0; line-height: 1.55; }
.help-chat__markdown h3, .help-chat__markdown h4, .help-chat__markdown h5 { color: #192b47; font-size: 1rem; }
.help-chat__markdown ul, .help-chat__markdown ol { display: grid; gap: 5px; margin: 0; padding-left: 1.25rem; line-height: 1.5; }
.help-chat__markdown strong { color: #192b47; font-weight: 800; }
.help-chat__markdown a { color: #1d58d5; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.help-chat__markdown code { padding: .08em .3em; border-radius: 4px; color: #1b4da7; background: #e4ecfa; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.help-chat__sources { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.help-chat__source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #dbe4f1;
  border-radius: 9px;
  color: #53627a;
  background: #fff;
  font-size: .77rem;
  line-height: 1.25;
}
.help-chat__source::before { content: '↗'; color: #2868ed; font-weight: 800; }
.help-chat__source a { color: #405b84; font-weight: 700; text-decoration: none; }
.help-chat__source a:hover { color: #1d58d5; text-decoration: underline; }
.help-chat__idea-label { width: fit-content; margin: 0 0 10px; padding: 4px 8px; border-radius: 999px; color: #67510b; background: #fff2bd; font-size: .72rem; font-weight: 800; }
.help-chat__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #1d58d5;
  background: #e8efff;
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
}
.help-chat__link::after { content: '→'; }
.help-chat__suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 18px; }
.help-chat__suggestions button {
  padding: 7px 10px;
  border: 1px solid #d7e0ec;
  border-radius: 999px;
  color: #51617a;
  background: #fff;
  font-size: .77rem;
  font-weight: 650;
  cursor: pointer;
}
.help-chat__suggestions button:hover { border-color: #94b6fb; color: #1c5cdb; background: #f3f7ff; }
.help-chat__form { padding: 16px 24px 18px; border-top: 1px solid #e3e9f2; background: #fff; }
.help-chat__composer {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 6px 7px 6px 14px;
  border: 1px solid #cbd6e5;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 49, 81, .04);
}
.help-chat__composer:focus-within { border-color: #5790f5; box-shadow: 0 0 0 4px rgba(59, 124, 241, .13); }
.help-chat__form textarea { width: 100%; min-height: 29px; max-height: 126px; padding: 5px 0; border: 0; outline: 0; resize: none; color: #23324a; line-height: 1.4; }
.help-chat__form textarea::placeholder { color: #8b98aa; }
.help-chat__send {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: #2767ec;
  cursor: pointer;
}
.help-chat__send:hover { background: #1454dc; }
.help-chat__send:disabled { cursor: wait; opacity: .58; }
.help-chat__send svg { width: 18px; height: 18px; fill: currentColor; }
.help-chat__privacy { margin: 8px 2px 0; color: #8a96a8; font-size: .7rem; }
.help-chat__typing { display: inline-flex; align-items: center; gap: 5px; padding: 12px 14px; border-radius: 5px 16px 16px 16px; background: #f1f4f9; }
.help-chat__typing-label { margin-right: 4px; color: #5e6d85; font-size: .83rem; font-weight: 700; }
.help-chat__typing span { width: 6px; height: 6px; border-radius: 50%; background: #8b9ab0; animation: help-chat-pulse 1.1s infinite ease-in-out; }
.help-chat__typing span:nth-child(2) { animation-delay: .14s; }
.help-chat__typing span:nth-child(3) { animation-delay: .28s; }
@keyframes help-chat-pulse { 0%, 100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-3px); opacity: 1; } }
.help-chat__button:focus-visible, .help-chat__send:focus-visible, .help-chat__suggestions button:focus-visible, .help-chat__link:focus-visible { outline: 3px solid #91b5ff; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 600px) {
  .help-chat-shell { min-height: 100svh; min-height: 100dvh; display: block; padding: 0; }
  .help-chat { height: 100svh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; border: 0; border-radius: 0; box-shadow: none; }
  #chat-panel { flex: 1 1 0; min-height: 0; }
  .help-chat__messages { min-height: 0; max-height: none; flex: 1 1 0; padding: 20px 16px; }
  .help-chat__suggestions, .help-chat__form { padding-left: 16px; padding-right: 16px; }
  .help-chat__form { flex: 0 0 auto; margin-top: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
