:root {
  --ink: #1b1f24;
  --paper: #f8f4eb;
  --accent: #d95f02;
  --accent-soft: #f9c189;
  --teal: #0c7c78;
  --card: #fffefb;
  --line: #d3c9b6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #f8f4eb 0%, #f3eee2 45%, #efe6d8 100%);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(25, 35, 45, 0.09) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.25;
}

.hero {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 2rem auto 1rem;
  padding: 1rem;
}

.hero h1 {
  margin: 0.2rem 0;
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.hero p {
  margin: 0;
  max-width: 680px;
}

.eyebrow {
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.dashboard {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
  transform: translateY(8px);
  opacity: 0;
  animation: settle 0.6s ease forwards;
}

.reveal:nth-child(1) { animation-delay: 0.1s; }
.reveal:nth-child(2) { animation-delay: 0.2s; }

@keyframes settle {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.sub {
  margin-top: -0.35rem;
  color: #4a4f55;
  font-size: 0.92rem;
}

label {
  display: block;
  font-size: 0.83rem;
  margin-top: 0.65rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

input,
select,
textarea,
button {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
}

input,
select,
textarea {
  border: 1px solid #b7aa92;
  background: #fff;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

button {
  margin-top: 0.7rem;
  border: none;
  border-radius: 10px;
  padding: 0.72rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), #e28a2c);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 18px rgba(217, 95, 2, 0.3);
}

.result {
  margin-top: 0.8rem;
  background: #13161b;
  color: #d4f8d6;
  border-radius: 10px;
  padding: 0.7rem;
  min-height: 110px;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.78rem;
}

.chat-thread {
  min-height: 180px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px dashed #b8a98e;
  border-radius: 12px;
  padding: 0.65rem;
  background: #fffdf8;
  margin-bottom: 0.6rem;
}

.ui-status {
  margin: 0 0 0.6rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: #f4ecdd;
  color: #5f461f;
  font-size: 0.8rem;
  font-weight: 600;
}

.bubble {
  width: fit-content;
  max-width: 95%;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  margin-bottom: 0.45rem;
  white-space: pre-wrap;
  line-height: 1.35;
  font-size: 0.85rem;
}

.bubble.user {
  margin-left: auto;
  background: #f6b16d;
  color: #1b1f24;
}

.bubble.bot {
  margin-right: auto;
  background: #17303e;
  color: #ecf8ff;
}

@media (max-width: 980px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
}
