:root {
  --ink: #1c241c;
  --muted: #5c675c;
  --paper: #f3efe6;
  --paper-2: #e8e1d2;
  --brand: #1f4b3f;
  --brand-2: #2f6b59;
  --accent: #c4a574;
  --danger: #8b3a3a;
  --ok: #2f6b59;
  --shadow: 0 18px 50px rgba(28, 36, 28, 0.12);
  --radius: 18px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(196,165,116,0.28), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(47,107,89,0.18), transparent 50%),
    linear-gradient(180deg, #f7f3ec 0%, #ebe4d6 100%);
  min-height: 100vh;
}

a { color: inherit; }
button, input, textarea, select {
  font: inherit;
}

.shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 0;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brand span { color: var(--brand); }
.nav-links { display: flex; gap: 1rem; align-items: center; color: var(--muted); }
.nav-links a { text-decoration: none; }
.btn {
  border: 0; border-radius: 999px; padding: 0.8rem 1.25rem;
  background: var(--brand); color: #f7f3ec; cursor: pointer;
  box-shadow: 0 10px 24px rgba(31,75,63,0.25);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--brand-2); }
.btn.secondary {
  background: transparent; color: var(--brand);
  border: 1px solid rgba(31,75,63,0.25); box-shadow: none;
}
.btn.ghost { background: rgba(255,255,255,0.55); color: var(--ink); box-shadow: none; }

.hero {
  display: grid; gap: 1rem; padding: 4.5rem 0 3rem;
  animation: rise .7s ease both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.98; letter-spacing: -0.04em; margin: 0;
  max-width: 12ch;
}
.hero p {
  max-width: 42rem; color: var(--muted); font-size: 1.1rem; line-height: 1.6; margin: 0;
}
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }

.panel {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(28,36,28,0.08);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.25rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.stepper { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0 1.25rem; }
.step {
  padding: .45rem .8rem; border-radius: 999px; font-size: .85rem;
  background: rgba(28,36,28,0.06); color: var(--muted);
}
.step.active { background: var(--brand); color: #f7f3ec; }
.step.done { background: rgba(47,107,89,0.15); color: var(--ok); }

label { display:block; font-size:.85rem; color: var(--muted); margin-bottom: .35rem; }
input, textarea, select {
  width: 100%; border-radius: 12px; border: 1px solid rgba(28,36,28,0.14);
  padding: .8rem .9rem; background: rgba(255,255,255,0.85); margin-bottom: .9rem;
}
.muted { color: var(--muted); }
.stack { display: grid; gap: .75rem; }
.kpi { font-family: var(--font-display); font-size: 2rem; margin: 0; }
.pill {
  display:inline-flex; align-items:center; gap:.35rem;
  padding:.25rem .6rem; border-radius:999px; background: rgba(196,165,116,.25); font-size:.8rem;
}
.progress {
  height: 10px; border-radius: 999px; background: rgba(28,36,28,.08); overflow: hidden;
}
.progress > span { display:block; height:100%; background: linear-gradient(90deg, var(--brand), var(--accent)); }

.chat-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 1rem; min-height: 70vh;
}
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } }
.messages { display:flex; flex-direction:column; gap:.8rem; min-height: 420px; max-height: 60vh; overflow:auto; padding:.25rem; }
.bubble {
  max-width: 85%; padding: .85rem 1rem; border-radius: 16px; line-height: 1.45;
  animation: rise .35s ease both;
}
.bubble.user { margin-left:auto; background: var(--brand); color:#f7f3ec; border-bottom-right-radius: 6px; }
.bubble.assistant { background: rgba(255,255,255,.9); border: 1px solid rgba(28,36,28,.08); border-bottom-left-radius: 6px; }
.composer { display:flex; gap:.5rem; margin-top: .75rem; }
.composer input { margin: 0; }
.starters { display:flex; flex-wrap:wrap; gap:.5rem; margin: .5rem 0 1rem; }
.starter {
  border: 1px solid rgba(28,36,28,.12); background: rgba(255,255,255,.7);
  border-radius: 999px; padding: .45rem .8rem; cursor: pointer;
}
.side h3 { font-family: var(--font-display); margin-top: 0; }
.side dl, .side-dl { margin: 0; display:grid; gap: .65rem; }
.side dt, .side-dl dt { font-size: .75rem; color: var(--muted); }
.side dd, .side-dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.side-facts { display:grid; gap: .7rem; margin-top: 1rem; }
.side-row { display:grid; gap: .15rem; }
.side-row strong { font-weight: 600; font-size: .92rem; word-break: break-word; }
.bubble.assistant { white-space: normal; }
.side input, .side textarea { width: 100%; margin: .35rem 0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
