:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #687084;
  --line: #dfe5ef;
  --accent: #172033;
  --user: #e9f2ff;
  --assistant: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.app {
  max-width: 980px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(20,30,60,.06);
}
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 44px); }
p { margin: 0; color: var(--muted); }
button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}
.chat {
  flex: 1;
  min-height: 54vh;
  max-height: 68vh;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.7);
}
.msg {
  max-width: 82%;
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.55;
  border: 1px solid var(--line);
  white-space: normal;
}
.msg.user {
  margin-left: auto;
  background: var(--user);
}
.msg.assistant {
  background: var(--assistant);
}
.msg.error {
  border-color: #f4b4b4;
  background: #fff4f4;
}
.composer {
  display: flex;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
}
textarea {
  flex: 1;
  resize: none;
  border: 0;
  outline: 0;
  font: inherit;
  padding: 10px;
}
@media (max-width: 640px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .msg { max-width: 96%; }
  .composer { flex-direction: column; }
}
