:root {
  --ink: #1c1915;
  --muted: #5e574e;
  --line: #e3d9cc;
  --paper: #f6f1e8;
  --card: #fffdf9;
  --green: #0e6b52;
  --green-dark: #0a4d3c;
  --clay: #9a4328;
  --shadow: 0 16px 40px rgba(48, 32, 14, 0.08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.5 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-weight: 620; letter-spacing: -0.02em; }
.gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 48px;
  align-items: center;
  padding: 56px 8vw;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--green);
  margin: 0 0 12px;
}
h1 { font-size: 42px; line-height: 1.15; margin: 0 0 16px; }
.lead, .flow { color: var(--muted); }
.flow { padding-left: 18px; }
.flow li { margin: 8px 0; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.login-card h2 { margin: 0 0 16px; }
label { display: grid; gap: 6px; font-size: 14px; margin-bottom: 14px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { min-height: 120px; resize: vertical; }
button[type="submit"], .primary, .nav-on {
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
}
button[type="submit"]:hover, .primary:hover { background: var(--green-dark); }
.ghost, .danger, .secondary {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}
.danger { color: var(--clay); }
.error { color: var(--clay); }
.app { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
aside {
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fbf7f1;
}
.brand { font-weight: 700; padding: 0 8px; }
nav { display: grid; gap: 6px; }
nav button {
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
}
nav button.active { background: #e7f3ee; color: var(--green-dark); }
main { padding: 28px 32px 64px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #efe7dc;
  font-size: 12px;
}
.pill.human { background: #f8e4dc; color: var(--clay); }
.pill.bot { background: #e5f3ec; color: var(--green-dark); }
.article, .thread {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--card);
}
.messages { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.bubble { padding: 8px 12px; border-radius: 12px; max-width: 80%; }
.bubble.in { background: #fff; border: 1px solid var(--line); }
.bubble.out { background: #e7f3ee; margin-left: auto; }
.split { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.person { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.person.on { border-color: var(--green); }
code { font-size: 13px; }
@media (max-width: 900px) {
  .gate, .app, .grid, .split { grid-template-columns: 1fr; }
  .gate { padding: 28px 18px; }
  h1 { font-size: 32px; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); }
  main { padding: 18px; }
}
