*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f4f7fb;
  color: #1a2332;
  min-height: 100vh;
}

.app {
  max-width: 820px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brand h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #0f3d7a;
}

.brand p {
  margin: 0.25rem 0 0;
  color: #5a6b7d;
  font-size: 0.9rem;
}

.cta-link {
  background: #0f6fff;
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.chat-container {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 61, 122, 0.08);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  min-height: 520px;
}

.messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1rem;
}

.message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.user {
  align-self: flex-end;
  background: #0f6fff;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message.assistant {
  align-self: flex-start;
  background: #eef3fa;
  color: #1a2332;
  border-bottom-left-radius: 4px;
}

.message.streaming::after {
  content: '▋';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.chat-form textarea {
  flex: 1;
  resize: vertical;
  min-height: 44px;
  max-height: 120px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c9d5e3;
  border-radius: 8px;
  font: inherit;
}

.chat-form button,
.start-btn {
  background: #0f6fff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.chat-form button:disabled,
.start-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.start-btn {
  align-self: center;
  margin-top: auto;
}

.assessment {
  background: #f0faf0;
  border: 1px solid #b8e0b8;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.assessment h3 {
  margin: 0 0 0.5rem;
  color: #1b5e20;
}

.assessment ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.hidden {
  display: none !important;
}

.footer {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #5a6b7d;
  text-align: center;
}
