:root {
  color: #17213a;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #17213a;
  font-size: 14px;
}

a {
  color: #0759d7;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
}

.site-header {
  height: 66px;
  flex: 0 0 66px;
  border-top: 1px solid #202020;
  border-bottom: 1px solid #e5e5e5;
}

.header-inner {
  width: min(1348px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #0b5cff;
  line-height: 1;
}

.brand-logo {
  display: block;
  width: 114px;
  height: 26px;
}

.brand:hover {
  text-decoration: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 12px;
}

.language-button {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0759d7;
  cursor: pointer;
  font-size: 12px;
}

.language-picker {
  position: relative;
}

.language-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 12px);
  right: -2px;
  width: 153px;
  max-height: min(612px, calc(100vh - 78px));
  overflow-y: auto;
  padding: 7px 0;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(32, 43, 60, 0.18);
}

.language-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 38px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #e1e4e8;
  border-left: 1px solid #e1e4e8;
  background: #fff;
  transform: rotate(45deg);
}

.language-menu button {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 20px;
  border: 0;
  outline: 0;
  background: #fff;
  color: #343434;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.language-menu button:hover,
.language-menu button:focus-visible {
  background: #f2f6fc;
}

.language-menu button[aria-selected="true"] {
  outline: 2px solid #202020;
  outline-offset: -2px;
  border-radius: 4px;
}

.language-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  margin: 0 0 2px 5px;
  border-top: 4px solid #0759d7;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.page-content {
  flex: 1;
  display: flex;
  justify-content: center;
}

.join-panel {
  width: 700px;
  margin-top: 221px;
  text-align: center;
}

h1 {
  margin: 0 0 70px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.action-area {
  position: relative;
  width: 400px;
  margin: 0 auto;
}

.join-app-button {
  width: 400px;
  height: 48px;
  padding: 0 20px;
  border: 1px solid #1468db;
  border-radius: 8px;
  background: #1268d9;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.join-app-button:hover {
  border-color: #0759c6;
  background: #075fc9;
}

.join-app-button:focus-visible,
.notice-close:focus-visible,
.language-button:focus-visible,
.help-button:focus-visible {
  outline: 3px solid rgba(20, 104, 219, 0.35);
  outline-offset: 3px;
}

.app-notice {
  position: absolute;
  z-index: 1;
  top: -27px;
  left: calc(100% + 10px);
  width: 360px;
  min-height: 89px;
  padding: 12px 42px 11px 12px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(24, 38, 57, 0.16);
  color: #343b46;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateX(12px);
  transition: opacity 240ms ease, transform 240ms ease, visibility 0s linear 240ms;
}

.app-notice.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.app-notice::before {
  content: "";
  position: absolute;
  top: 38px;
  left: -7px;
  width: 12px;
  height: 12px;
  border-bottom: 1px solid #d9dee7;
  border-left: 1px solid #d9dee7;
  background: #fff;
  transform: rotate(45deg);
}

.app-notice strong {
  display: block;
  font-size: 16px;
  line-height: 20px;
}

.app-notice p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 20px;
}

.notice-close {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 28px;
  height: 28px;
  padding: 0 0 3px;
  border: 1px solid #3980eb;
  border-radius: 50%;
  background: #fff;
  color: #2b73d9;
  cursor: pointer;
  font-size: 24px;
  font-weight: 300;
  line-height: 23px;
}

.download-copy {
  margin: 25px 0 0;
  color: #17213a;
  line-height: 20px;
}

.terms-copy {
  margin: 26px 0 0;
  color: #17213a;
  line-height: 20px;
}

.site-footer {
  flex: 0 0 auto;
  margin: 0 auto 86px;
  color: #64708a;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 0;
}

.site-footer span {
  margin: 0 6px;
  color: #64708a;
}

.site-footer a {
  color: #64708a;
}

.help-button {
  position: fixed;
  right: 20px;
  bottom: 26px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #4386f7;
  box-shadow: 0 2px 6px rgba(24, 47, 89, 0.2);
  cursor: pointer;
  transition: opacity 180ms ease, transform 180ms ease;
}

.help-button.is-loading {
  cursor: wait;
}

.help-button.is-loading svg {
  width: 28px;
  height: 28px;
  padding: 3px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-right-color: #fff;
  border-radius: 50%;
  transform: none;
  animation: launcher-spin 750ms linear infinite;
}

.help-button.is-loading svg path {
  display: none;
}

@keyframes launcher-spin {
  to {
    transform: rotate(360deg);
  }
}

.chat-panel {
  position: fixed;
  z-index: 5;
  right: 22px;
  bottom: 20px;
  width: 428px;
  height: 650px;
  overflow: hidden;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(34, 48, 73, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 340ms ease, transform 340ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 340ms;
}

.chat-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.chat-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 34px;
  background: linear-gradient(112deg, #0b5eff 0%, #526ee8 58%, #bd73ca 100%);
  color: #fff;
}

.chat-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -1.1px;
}

.chat-brand {
  display: block;
  width: 100px;
  height: auto;
  filter: brightness(0) invert(1);
}

.chat-controls {
  position: relative;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 15px;
  padding-top: 12px;
}

.chat-more,
.chat-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.chat-more {
  width: 18px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 20px;
}

.chat-menu {
  position: absolute;
  z-index: 10;
  top: 29px;
  right: 0;
  width: 220px;
  padding: 7px 0;
  border: 1px solid #d9dfe8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(35, 48, 70, 0.18);
  color: #202832;
}

.chat-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 15px;
  border: 0;
  background: #fff;
  color: #202832;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.chat-menu button:hover,
.chat-menu button:focus-visible {
  outline: 0;
  background: #f1f5fb;
}

.menu-icon {
  position: relative;
  flex: 0 0 17px;
  width: 17px;
  height: 20px;
  color: #1f2933;
}

.menu-mic-icon::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 5px;
}

.menu-mic-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 3px;
  width: 11px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  border-radius: 0 0 8px 8px;
}

.menu-download-icon::before {
  content: "↓";
  position: absolute;
  top: -3px;
  left: 1px;
  font-size: 23px;
  font-weight: 300;
  line-height: 20px;
}

.menu-download-icon::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-bottom: 1px solid currentColor;
}

.menu-end-icon {
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 300;
  line-height: 15px;
}

.chat-close {
  width: 16px;
  height: 22px;
  font-size: 27px;
  font-weight: 200;
  line-height: 18px;
}

.chat-body {
  position: relative;
  height: calc(100% - 88px);
  background: #fff;
}

.chat-messages {
  position: absolute;
  top: 17px;
  right: 0;
  bottom: 164px;
  left: 0;
  overflow-y: auto;
  padding: 0 12px;
  scrollbar-width: thin;
  scrollbar-color: #7d8290 transparent;
}

.message-meta {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 56px;
  color: #111d38;
  font-size: 11px;
}

.message-meta span {
  padding: 1px 4px;
  border-radius: 2px;
  background: #edf0f4;
  color: #54718f;
  font-size: 9px;
}

.message-meta time {
  color: #394454;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 1px;
}

.assistant-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, #d184c9 8%, #4f7cf3 55%, #f3bf92 56%, #4d8ae8 100%);
  font-size: 26px;
  line-height: 1;
}

.agent-content {
  max-width: 294px;
}

.message-bubble {
  width: fit-content;
  max-width: 294px;
  padding: 11px 12px;
  border-radius: 0 12px 12px 12px;
  background: #f4f4fa;
  color: #071c45;
  font-size: 14px;
  line-height: 19px;
}

.secondary-bubble {
  margin-top: 8px;
  border-radius: 12px;
}

.quick-actions {
  display: flex;
  gap: 6px;
  margin-top: 11px;
}

.quick-actions button {
  height: 35px;
  padding: 0 16px;
  border: 1px solid #367cff;
  border-radius: 18px;
  background: #fff;
  color: #0961ee;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.quick-actions button:hover {
  background: #eef5ff;
}

.user-message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0 0 14px;
}

.user-message .message-meta {
  margin: 0 4px 3px 0;
}

.user-message .message-meta strong {
  font-weight: 400;
}

.user-bubble {
  max-width: 270px;
  padding: 11px 12px;
  border-radius: 12px 0 12px 12px;
  background: #e7f1ff;
  color: #071c45;
  font-size: 14px;
  line-height: 19px;
}

.dynamic-agent {
  margin-top: 14px;
}

.dynamic-agent .message-bubble {
  white-space: pre-wrap;
}

.typing-bubble {
  color: #667080;
}

.message-composer {
  position: absolute;
  right: 16px;
  bottom: 60px;
  left: 16px;
  height: 94px;
  padding: 14px 12px 9px;
  border: 1px solid #d9dfe8;
  border-radius: 15px;
  background: #fff;
}

.message-composer textarea {
  display: block;
  width: 100%;
  height: 39px;
  resize: none;
  border: 0;
  outline: 0;
  color: #2b3440;
  font-family: inherit;
  font-size: 14px;
}

.message-composer textarea::placeholder {
  color: #667080;
  opacity: 1;
}

.composer-tools {
  height: 27px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.composer-icon {
  position: relative;
  width: 18px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #37404a;
  cursor: pointer;
}

.attach-icon::before,
.attach-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 12px;
  border: 1.5px solid #37404a;
  border-radius: 5px;
  transform: rotate(45deg);
}

.attach-icon::before {
  top: 3px;
  left: 4px;
}

.attach-icon::after {
  top: 5px;
  left: 7px;
  border-top-color: transparent;
  border-left-color: transparent;
}

.emoji-icon {
  font-size: 19px;
  line-height: 20px;
}

.send-button {
  width: 25px;
  height: 25px;
  margin-left: auto;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  background: #edf0f4;
  color: #c5cbd3;
  font-size: 20px;
  line-height: 23px;
}

.chat-disclaimer {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  margin: 0;
  color: #64708a;
  font-size: 12px;
  line-height: 17px;
  text-align: center;
}

.help-face {
  position: absolute;
  top: 17px;
  left: 17px;
  width: 22px;
  height: 18px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 5px 5px 11px 11px;
  transform: rotate(-7deg);
}

.help-face::before,
.help-face::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
}

.help-face::before {
  left: 4px;
}

.help-face::after {
  right: 4px;
}

@media (max-width: 800px) {
  .join-panel {
    width: 100%;
    margin-top: 150px;
  }

  .app-notice {
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
  }

  .app-notice::before {
    top: -7px;
    left: calc(50% - 6px);
    border-top: 1px solid #d9dee7;
    border-right: 1px solid #d9dee7;
    border-bottom: 0;
    border-left: 0;
  }

  .app-notice.is-visible {
    transform: translate(-50%, 0);
  }

  .site-footer {
    margin: 0 24px 40px;
  }
}

@media (max-width: 470px) {
  .header-inner {
    width: calc(100% - 32px);
  }

  .action-area,
  .join-app-button {
    width: min(400px, calc(100vw - 40px));
  }

  .app-notice {
    width: min(360px, calc(100vw - 32px));
  }

  .terms-copy {
    margin-right: 20px;
    margin-left: 20px;
  }

  .site-footer {
    font-size: 12px;
  }

  .chat-panel {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    height: min(650px, calc(100vh - 24px));
  }

  .chat-title {
    font-size: 25px;
  }

  .chat-header {
    padding-left: 24px;
  }
}
