:root {
  --ink: #0e1116;
  --ink-2: #161b22;
  --line: #2a3340;
  --text: #e8edf2;
  --muted: #9aa7b5;
  --accent: #2bb8a8;
  --accent-dim: #1a7a70;
  --user: #1c2430;
  --bot: #121820;
  --radius: 10px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(43, 184, 168, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(80, 120, 180, 0.1), transparent 50%),
    linear-gradient(180deg, #0b0d11 0%, var(--ink) 40%, #0a0c10 100%);
}

.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.header { margin-bottom: 1.5rem; }

.brand {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 40rem;
}

.panel {
  background: color-mix(in srgb, var(--ink-2) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.log {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 320px;
  max-height: min(55vh, 520px);
  overflow-y: auto;
  padding: 0.25rem 0.25rem 1rem;
}

.bubble {
  max-width: 92%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
}

.bubble.user {
  align-self: flex-end;
  background: var(--user);
  border: 1px solid var(--line);
}

.bubble.assistant {
  align-self: flex-start;
  background: var(--bot);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.15rem 0.25rem;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.suggestions-label {
  flex: 1 0 100%;
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.suggestion {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  background: color-mix(in srgb, var(--bot) 80%, transparent);
  color: var(--text);
  font: 500 0.85rem/1.3 var(--font);
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.suggestion:hover,
.suggestion:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--bot));
  color: #eefaf8;
  outline: none;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.composer button {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.1rem;
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  color: #041210;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.composer button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 3rem;
  max-height: 8rem;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0a0d12;
  color: var(--text);
  font: inherit;
}

textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
}

.status {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: #e07a7a;
}

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

@media (max-width: 520px) {
  .composer { grid-template-columns: 1fr; }
  .composer button { width: 100%; }
  .suggestion { flex: 1 1 auto; text-align: left; }
}
