:root {
  --ink: #1d1530;
  --muted: #5f5873;
  --line: #e7e2f2;
  --bg: #faf8ff;
  --card: #ffffff;
  --accent: #6d3bd8;
  --accent-soft: #efe8ff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.55;
}

a {
  color: var(--accent);
}

.top,
.bottom,
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.top nav {
  display: flex;
  gap: 22px;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.brand img {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 64px;
}

.kicker {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

h1 {
  font-size: 44px;
  line-height: 1.12;
  margin: 16px 0;
}

.hero-text p {
  color: var(--muted);
  font-size: 18px;
}

.cta {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.chat {
  display: flex;
  flex-direction: column;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 20px 50px rgba(61, 35, 120, 0.12);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.chat-head img {
  border-radius: 50%;
  object-fit: cover;
}

.chat-head small {
  display: block;
  color: var(--muted);
}

.badge {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.bubble.bot {
  align-self: flex-start;
  background: var(--accent-soft);
  border-bottom-left-radius: 4px;
}

.bubble.me {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble.typing::after {
  content: "…";
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

.chat-form button {
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chat-form button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.block {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.block h2 {
  font-size: 30px;
  margin: 0 0 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cards article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.cards h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.cards p,
.steps li {
  color: var(--muted);
  margin: 0;
}

.steps {
  display: grid;
  gap: 12px;
  padding-left: 22px;
  font-size: 17px;
}

.steps strong {
  color: var(--ink);
}

.bottom {
  display: flex;
  gap: 20px;
  padding: 28px 20px 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.legal {
  max-width: 760px;
  padding: 20px 0 60px;
}

.legal h1 {
  font-size: 34px;
}

.legal p,
.legal li {
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero,
  .cards {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }

  .top nav {
    display: none;
  }

  .chat {
    height: 460px;
  }
}
