:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #66716c;
  --paper: #f6f3ea;
  --card: #fffdf7;
  --line: #ddd9ce;
  --sage: #cfe2d2;
  --forest: #234c3f;
  --gold: #d69d48;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 10%, rgba(207, 226, 210, .7), transparent 27rem),
    radial-gradient(circle at 95% 90%, rgba(214, 157, 72, .13), transparent 24rem),
    var(--paper);
  font-family: "DM Sans", sans-serif;
}

button, textarea { font: inherit; }

.shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  grid-template-rows: auto 1fr;
  gap: 36px 70px;
  padding: 30px 0 38px;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font: 700 18px "Manrope", sans-serif;
}

.brand-mark, .avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--forest);
  border-radius: 50%;
}

.brand-mark { width: 30px; height: 30px; }

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #4fa16f;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(79, 161, 111, .12);
}

.intro { align-self: center; padding-bottom: 44px; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
}

h1 {
  margin: 0;
  font: 700 clamp(48px, 6vw, 78px)/.98 "Manrope", sans-serif;
  letter-spacing: -.055em;
}

h1 em { color: var(--forest); font-style: normal; }

.lede {
  max-width: 440px;
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.starters { display: flex; flex-wrap: wrap; gap: 9px; }

.starters button {
  padding: 10px 13px;
  color: var(--forest);
  background: rgba(255, 253, 247, .6);
  border: 1px solid #c8d3ca;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.starters button:hover { background: var(--sage); transform: translateY(-1px); }

.chat-panel {
  min-height: 630px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 253, 247, .92);
  border: 1px solid rgba(221, 217, 206, .9);
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(43, 57, 50, .11);
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 34px;
  scroll-behavior: smooth;
}

.message {
  display: flex;
  gap: 13px;
  max-width: 86%;
  margin-bottom: 24px;
  animation: appear .25s ease-out;
}

.message p {
  margin: 5px 0 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.avatar { flex: 0 0 34px; height: 34px; font-size: 13px; }
.speaker { color: var(--muted); font-size: 12px; font-weight: 600; }

.user-message {
  margin-left: auto;
  padding: 14px 17px;
  color: #fff;
  background: var(--forest);
  border-radius: 18px 18px 4px 18px;
}

.user-message p { margin: 0; }

.typing p { color: var(--muted); }
.typing p::after { content: "…"; animation: blink 1s infinite; }

.composer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 0 22px;
  padding: 10px 10px 10px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

textarea {
  width: 100%;
  max-height: 140px;
  resize: none;
  padding: 10px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  line-height: 1.45;
}

#send-button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  color: #fff;
  background: var(--forest);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

#send-button:disabled { opacity: .55; cursor: wait; }

.disclaimer {
  margin: 10px 24px 16px;
  color: #8a928e;
  font-size: 11px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes appear { from { opacity: 0; transform: translateY(6px); } }
@keyframes blink { 50% { opacity: .25; } }

@media (max-width: 840px) {
  .shell { grid-template-columns: 1fr; gap: 28px; padding-top: 22px; }
  .intro { padding: 35px 4px 0; }
  .chat-panel { min-height: 600px; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 24px, 1180px); }
  h1 { font-size: 46px; }
  .messages { padding: 24px 20px; }
  .message { max-width: 94%; }
  .composer { margin: 0 12px; }
  #send-button span:first-child { display: none; }
}
