:root {
  color-scheme: light;
  --ink: #14211f;
  --muted: #60706d;
  --line: #dbe5e1;
  --paper: #f7faf8;
  --card: #ffffff;
  --accent: #007f73;
  --accent-dark: #006258;
  --accent-soft: #dff4ef;
  --shadow: 0 24px 80px rgba(22, 62, 56, .12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 15% 0%, #e8f4ee 0, transparent 38%), var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 40px; display: grid; grid-template-columns: .82fr 1.18fr; gap: 64px; align-items: center; min-height: calc(100vh - 72px); }
.intro { padding: 12px 0; }
.eyebrow, .chat-label { text-transform: uppercase; letter-spacing: .13em; font-size: .72rem; font-weight: 750; color: var(--accent-dark); }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #21a77d; box-shadow: 0 0 0 5px #d4f1e5; }
h1 { margin: 20px 0 18px; max-width: 600px; font-size: clamp(2.8rem, 6vw, 5.8rem); line-height: .98; letter-spacing: -.065em; font-weight: 780; }
.lede { max-width: 500px; margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.scope { max-width: 500px; margin-top: 28px; padding: 15px 17px; border: 1px solid #c5e3da; border-radius: 14px; background: rgba(223,244,239,.7); color: #315c55; font-size: .9rem; line-height: 1.45; }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.quick-prompts button { border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.65); color: var(--ink); padding: 9px 13px; font: inherit; font-size: .78rem; cursor: pointer; transition: .2s ease; }
.quick-prompts button:hover { border-color: var(--accent); color: var(--accent-dark); transform: translateY(-1px); }

.chat-card { min-height: 610px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(185, 209, 201, .75); border-radius: 24px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 25px 27px 22px; border-bottom: 1px solid var(--line); }
.chat-label { margin: 0 0 7px; color: var(--muted); font-size: .64rem; }
.chat-head h2 { margin: 0; font-size: 1.18rem; letter-spacing: -.02em; }
.model-label { margin-top: 2px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); padding: 7px 10px; font-size: .68rem; white-space: nowrap; }
.messages { flex: 1; overflow: auto; padding: 24px 27px; display: flex; flex-direction: column; gap: 18px; }
.message { display: flex; align-items: flex-start; gap: 11px; max-width: 92%; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.avatar { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 750; }
.message.user .avatar { background: var(--accent); }
.bubble { padding: 12px 14px; border-radius: 15px 15px 15px 4px; background: #f1f5f3; color: #263b37; font-size: .92rem; line-height: 1.55; white-space: pre-wrap; }
.message.user .bubble { border-radius: 15px 15px 4px 15px; background: var(--ink); color: #fff; }
.composer { padding: 18px 20px 20px; border-top: 1px solid var(--line); background: #fbfdfc; }
textarea { display: block; width: 100%; min-height: 58px; resize: vertical; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; color: var(--ink); background: #fff; font: inherit; font-size: .92rem; outline: none; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,127,115,.12); }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); font-size: .68rem; }
#send-button { border: 0; border-radius: 11px; padding: 10px 15px; color: #fff; background: var(--accent); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
#send-button:hover { background: var(--accent-dark); }
#send-button:disabled { opacity: .55; cursor: wait; }
footer { padding: 0 20px 28px; text-align: center; color: var(--muted); font-size: .72rem; }
footer a { color: var(--accent-dark); }
.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; }

@media (max-width: 850px) {
  .shell { grid-template-columns: 1fr; gap: 36px; padding-top: 46px; }
  h1 { font-size: clamp(2.8rem, 14vw, 4.7rem); }
  .chat-card { min-height: 580px; }
}
@media (max-width: 500px) {
  .shell { width: min(100% - 24px, 1120px); padding-top: 32px; }
  .chat-head, .messages { padding-left: 17px; padding-right: 17px; }
  .composer { padding-left: 13px; padding-right: 13px; }
  .composer-foot { align-items: flex-end; }
  .composer-foot span { max-width: 65%; }
}
