* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: #111827;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 32px auto;
  display: grid;
  gap: 16px;
}

.narrow {
  width: min(720px, calc(100vw - 32px));
}

.nav {
  display: flex;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 40px;
}

h2 {
  font-size: 16px;
  line-height: 24px;
}

.lede {
  color: #475569;
  line-height: 22px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.card,
.panel {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.card {
  display: grid;
  gap: 6px;
  text-decoration: none;
}

.card span {
  color: #475569;
}

pre {
  overflow: auto;
  min-height: 220px;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 18px;
}

.messages {
  min-height: 360px;
  max-height: 520px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.status-panel {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.status-ready {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.status-waiting {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.status-error,
.bubble.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 20px;
}

.user {
  justify-self: end;
  background: #111827;
  color: #fff;
}

.assistant {
  justify-self: start;
  background: #e0f2fe;
  color: #0c4a6e;
}

.system {
  justify-self: center;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e5e7eb;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

input,
button {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

button {
  background: #111827;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
