.assistant-invite {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 22px;
  margin: 26px 0 30px;
  padding: 16px 20px 16px 16px;
  color: var(--ink);
  background: linear-gradient(110deg, #fff8e9 0%, #fff 48%, #eef5ff 100%);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}
.assistant-invite[hidden] { display: none; }
.avatar-crop {
  position: relative;
  display: block;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  background: #f9ecd0;
  border: 3px solid #6f0017;
  border-radius: 50%;
}
.avatar-crop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
}
.avatar-crop-large { width: 92px; height: 92px; cursor: pointer; }
.avatar-crop-small { width: 48px; height: 48px; cursor: pointer; border-width: 2px; }
.avatar-crop-launcher { width: 56px; height: 56px; border-width: 2px; }
.assistant-invite-copy p,
.conversation-head p {
  margin: 0 0 5px;
  color: #8b1125;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}
.assistant-invite-copy h3 { margin: 0 0 6px; font: 700 23px Manrope; }
.assistant-invite-copy > span { color: #607087; font-size: 13px; }
.name-trigger {
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  border-bottom: 1px dashed currentColor;
}
.name-trigger:hover { color: #8b1125; }
.open-chat,
.profile-chat-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 9px 10px 9px 18px;
  color: #fff;
  font: 700 13px Inter;
  cursor: pointer;
  background: #8b1125;
  border: 0;
  border-radius: 13px;
  box-shadow: 0 10px 25px rgba(111, 0, 23, .2);
}
.open-chat b,
.profile-chat-cta span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #8b1125;
  background: #fff;
  border-radius: 9px;
}
.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(5, 17, 34, .52);
  backdrop-filter: blur(3px);
}
.conversation {
  position: fixed;
  z-index: 100;
  top: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(460px, calc(100vw - 36px));
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .32);
  grid-template-rows: auto minmax(180px, 1fr) auto auto auto;
  animation: chat-in .28s ease-out;
}
.conversation[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateX(26px); } }
.conversation-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  background: linear-gradient(100deg, #fff7e7, #fff);
  border-bottom: 1px solid var(--line);
}
.conversation-head h3 { margin: 0; font: 700 19px Manrope; }
.online {
  margin-left: auto;
  padding: 5px 9px;
  color: #2a7d49;
  font-size: 10px;
  font-weight: 700;
  background: #e8f8ed;
  border-radius: 99px;
}
.close-dialog {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: #52637a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, .78);
  border: 1px solid #d8e0eb;
  border-radius: 50%;
}
.messages {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 0;
  padding: 22px;
  overflow: auto;
  background: #fbfcfe;
}
.message {
  max-width: 86%;
  padding: 13px 16px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  border-radius: 16px;
}
.message.assistant {
  align-self: flex-start;
  background: #f5ead4;
  border-bottom-left-radius: 5px;
}
.message.introduction { border: 1px solid #ead8b9; }
.message.user {
  align-self: flex-end;
  color: #fff;
  background: #8b1125;
  border-bottom-right-radius: 5px;
}
.message.typing { color: #6e7e94; }
.message > span { display: block; }
.message-course-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  background: #8b1125;
  border-radius: 10px;
}
.message-course-link:hover { background: #6f0017; }
.message-bookmark {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
  padding: 8px 11px;
  color: #5e6e82;
  font: 700 11px Inter;
  cursor: pointer;
  background: rgba(255,255,255,.72);
  border: 1px solid #d8c9ac;
  border-radius: 9px;
}
.message-bookmark > span:first-child { color: #8c9aaa; font-size: 18px; }
.message-bookmark.saved { color: #0759a7; background: #edf6ff; border-color: #75a9dc; }
.message-bookmark.saved > span:first-child { color: #0759a7; }
.message-biography-link {
  display: inline-flex;
  margin-top: 9px;
  padding: 0;
  color: #7b1023;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  background: none;
  border: 0;
  border-bottom: 1px dashed currentColor;
}
.message-biography-link:hover { color: #4f0010; }
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 15px;
  background: #fbfcfe;
}
.quick-replies button {
  padding: 8px 12px;
  color: #5d3c42;
  font-size: 12px;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d4b8bd;
  border-radius: 99px;
}
.quick-replies button:hover { color: #8b1125; border-color: #8b1125; }
.rating-panel {
  margin: 0 20px 16px;
  padding: 16px 17px;
  background: linear-gradient(110deg, #fff7e7, #fff);
  border: 1px solid #ead8b9;
  border-radius: 15px;
}
.rating-panel[hidden] { display: none; }
.rating-panel p { margin: 0 0 4px; color: #8b1125; font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.rating-panel h4 { margin: 0 0 8px; font: 700 15px Manrope; }
.rating-stars { display: flex; gap: 3px; }
.rating-stars button {
  padding: 0 2px;
  color: #d6dce4;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: 0;
  transition: color .15s, transform .15s;
}
.rating-stars button.active,
.rating-stars button.selected { color: #f0aa19; transform: translateY(-1px); }
.rating-stars button:disabled { cursor: default; opacity: 1; }
#rating-thanks { display: block; margin-top: 9px; color: #66758a; font-size: 11px; }
#rating-thanks[hidden] { display: none; }
.chat-form {
  display: flex;
  gap: 10px;
  padding: 15px 18px;
  border-top: 1px solid var(--line);
}
.chat-form input {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font: 500 14px Inter;
  border: 0;
  outline: 0;
}
.chat-form button {
  width: 40px;
  height: 40px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  background: #8b1125;
  border: 0;
  border-radius: 11px;
}
.scope-note { margin: 0; padding: 0 18px 14px; color: #8794a6; font-size: 10px; }
.conversation[aria-busy="true"] .chat-form { opacity: .55; pointer-events: none; }
.ferdinando-launcher {
  position: fixed;
  z-index: 70;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  background: #fffaf0;
  border: 2px solid #6f0017;
  border-radius: 19px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .26);
  animation: launcher-in .35s ease-out;
}
.ferdinando-launcher[hidden] { display: none; }
@keyframes launcher-in { from { opacity: 0; transform: translateY(18px); } }
.ferdinando-launcher > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.ferdinando-launcher b { color: #6f0017; font-size: 14px; }
.ferdinando-launcher small { color: #52637a; font-size: 11px; }
.ferdinando-launcher i { margin-left: 3px; color: #4ec64d; font-size: 14px; font-style: normal; }
.ferdinando-launcher.has-advice {
  background: linear-gradient(110deg, #fff5df, #fff);
  box-shadow: 0 18px 48px rgba(111, 0, 23, .3);
}
.ferdinando-launcher.has-advice small { color: #7b1023; font-weight: 650; }
.ferdinando-launcher.has-advice i { animation: advice-pulse 1.6s ease-out infinite; }
@keyframes advice-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .48; transform: scale(1.35); }
}
.profile-dialog {
  width: min(650px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .4);
}
.profile-dialog::backdrop { background: rgba(5, 17, 34, .62); backdrop-filter: blur(4px); }
.profile-dialog > .close-dialog { position: absolute; z-index: 2; top: 14px; right: 14px; }
.profile-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  min-height: 225px;
  overflow: hidden;
  background: linear-gradient(115deg, #f8e6c4, #fff9ec);
}
.profile-image { align-self: stretch; overflow: hidden; }
.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.22);
  transform-origin: 50% 34%;
}
.profile-hero p { margin: 0 0 7px; color: #8b1125; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.profile-hero h2 { margin: 0 0 7px; font: 800 42px Manrope; letter-spacing: -.04em; }
.profile-hero span { color: #5d6c80; font-size: 13px; }
.profile-body { padding: 26px 30px 30px; }
.profile-intro { margin-top: 0; font-size: 16px; line-height: 1.6; }
.profile-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 26px; }
.profile-facts div { padding: 14px; background: #f5f7fb; border-radius: 13px; }
.profile-facts small { display: block; margin-bottom: 6px; color: #8b1125; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.profile-facts strong { font-size: 12px; line-height: 1.45; }
.profile-body h3 { margin-bottom: 7px; font: 700 18px Manrope; }
.profile-body p { line-height: 1.55; }
.profile-note { padding: 12px 14px; color: #6c7889; font-size: 11px; background: #f6f8fb; border-radius: 10px; }
.profile-chat-cta { margin-top: 20px; }
body.chat-open { overflow: hidden; }
@media (max-width: 720px) {
  .assistant-invite { grid-template-columns: 72px 1fr; gap: 15px; }
  .avatar-crop-large { width: 72px; height: 72px; }
  .assistant-invite-copy h3 { font-size: 19px; }
  .open-chat { grid-column: 1 / -1; justify-content: space-between; }
  .ferdinando-launcher { right: 14px; bottom: 14px; }
  .ferdinando-launcher small { display: none; }
  .conversation { inset: 0; width: 100vw; border-radius: 0; }
  .message { max-width: 92%; }
  .profile-hero { grid-template-columns: 130px 1fr; min-height: 180px; }
  .profile-hero h2 { font-size: 32px; }
  .profile-body { padding: 22px 20px 24px; }
  .profile-facts { grid-template-columns: 1fr; }
}
