:root {
  color-scheme: dark;
  --ink: #07120b;
  --panel: #0d1811;
  --panel-soft: #122018;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f7f4;
  --muted: #a4b0a7;
  --green: #37ca37;
  --blue: #188bf6;
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 17% 16%, rgba(55, 202, 55, 0.14), transparent 30rem),
    radial-gradient(circle at 92% 84%, rgba(24, 139, 246, 0.12), transparent 28rem),
    var(--ink);
  color: var(--text);
}

button, textarea { font: inherit; }

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(440px, 0.74fr);
  gap: clamp(36px, 7vw, 112px);
  align-items: stretch;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 64px);
}

.intro {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.16em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(55, 202, 55, 0.5);
  border-radius: 11px;
  color: var(--green);
  font-size: 12px;
  letter-spacing: -0.04em;
  background: rgba(55, 202, 55, 0.07);
}

.intro-copy {
  margin: auto 0;
  padding: 56px 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 28px;
  height: 1px;
  background: var(--green);
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(48px, 6.2vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.065em;
  font-weight: 680;
}

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

.intro-copy > p {
  max-width: 600px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.6;
}

.privacy-note {
  margin: 0;
  color: #718076;
  font-size: 12px;
}

.chat-panel {
  height: clamp(620px, calc(100vh - clamp(48px, 8vw, 128px)), 800px);
  height: clamp(620px, calc(100dvh - clamp(48px, 8vw, 128px)), 800px);
  align-self: center;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(13, 24, 17, 0.93);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.chat-header {
  display: flex;
  align-items: center;
  flex: none;
  gap: 13px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.agent-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), #1f8e2f);
  color: #041207;
  font-weight: 850;
}

.chat-header h2 {
  margin: 0 0 4px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.chat-header p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(55, 202, 55, 0.09);
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 26px 22px;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.message {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  animation: rise 180ms ease-out both;
}

.assistant-message {
  border: 1px solid var(--line);
  border-top-left-radius: 5px;
  background: var(--panel-soft);
}

.user-message {
  margin-left: auto;
  border-bottom-right-radius: 5px;
  background: var(--green);
  color: #041207;
}

.message-label {
  margin-bottom: 7px;
  color: var(--green);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.13em;
}

.user-message .message-label { color: rgba(4, 18, 7, 0.58); }

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

.typing { display: flex; gap: 5px; padding: 18px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: pulse 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 120ms; }
.typing i:nth-child(3) { animation-delay: 240ms; }

.quick-prompts {
  display: flex;
  flex: none;
  gap: 7px;
  overflow-x: auto;
  padding: 0 22px 12px;
  scrollbar-width: none;
}

.quick-prompts::-webkit-scrollbar { display: none; }

.quick-prompts button {
  flex: none;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.quick-prompts button:hover,
.quick-prompts button:focus-visible {
  border-color: rgba(55, 202, 55, 0.45);
  color: var(--text);
  background: rgba(55, 202, 55, 0.05);
  outline: none;
}

.composer {
  display: flex;
  align-items: center;
  flex: none;
  gap: 10px;
  margin: 0 22px;
  padding: 9px 9px 9px 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(2, 8, 4, 0.5);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.composer:focus-within {
  border-color: rgba(55, 202, 55, 0.55);
  box-shadow: 0 0 0 3px rgba(55, 202, 55, 0.07);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 38px;
  max-height: 126px;
  margin: 0;
  padding: 9px 0;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  line-height: 20px;
}

.composer textarea::placeholder { color: #718076; }

.composer button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border: 0;
  border-radius: 12px;
  color: #041207;
  background: var(--green);
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease;
}

.composer button:hover { transform: translateY(-1px); }
.composer button:disabled { opacity: 0.45; cursor: wait; transform: none; }
.composer svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.disclaimer {
  flex: none;
  margin: 10px 22px 17px;
  color: #657269;
  text-align: center;
  font-size: 9px;
  line-height: 1.4;
}

.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 rise { from { opacity: 0; transform: translateY(5px); } }
@keyframes pulse { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 24px;
  }

  .intro-copy { padding: 64px 0 20px; }
  .privacy-note { display: none; }
  .chat-panel { height: 680px; }
}

@media (max-width: 560px) {
  .page-shell { padding: 16px; gap: 28px; }
  .intro-copy { padding: 48px 0 10px; }
  h1 { font-size: clamp(44px, 14vw, 66px); }
  .intro-copy > p { margin-top: 24px; font-size: 16px; }
  .chat-panel {
    height: min(650px, calc(100vh - 32px));
    height: min(650px, calc(100dvh - 32px));
    min-height: 560px;
    border-radius: 20px;
  }
  .chat-header, .messages { padding-left: 17px; padding-right: 17px; }
  .quick-prompts { padding-left: 17px; padding-right: 17px; }
  .composer { margin-left: 17px; margin-right: 17px; }
  .message { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
