:root {
  color-scheme: light;
  --bg: #edf2f5;
  --panel: #ffffff;
  --soft: #f6f8fa;
  --text: #17212b;
  --muted: #687789;
  --line: #dce4ec;
  --brand: #13795b;
  --brand-dark: #0f6049;
  --blue: #2563a8;
  --shadow: 0 18px 48px rgba(22, 34, 46, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  min-height: 64px;
  padding: 12px 22px;
  background: #17212c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand);
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.brand p {
  margin: 3px 0 0;
  color: #a9b6c4;
  font-size: 13px;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  color: #dce7f0;
  text-decoration: none;
  border: 1px solid #34485b;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
}

.nav a.active {
  background: #223140;
  color: #ffffff;
}

.page {
  width: min(1120px, calc(100% - 28px));
  margin: 18px auto;
}

.chat-shell,
.data-shell {
  height: calc(100vh - 100px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.section-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-header h2 {
  margin: 0;
  font-size: 21px;
}

.section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.user-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.user-field input {
  width: 96px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: linear-gradient(#f9fbfc, #eef4f6);
}

.message-row {
  display: flex;
  margin-bottom: 14px;
}

.message-row.user {
  justify-content: flex-end;
}

.bubble {
  max-width: min(760px, 88%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #ffffff;
  line-height: 1.5;
}

.message-row.user .bubble {
  background: #dff5e8;
  border-color: #bfe8ce;
}

.bubble h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.bubble p {
  margin: 0 0 10px;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.composer {
  border-top: 1px solid var(--line);
  background: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
}

.composer input {
  border: 1px solid #cbd5df;
  border-radius: 8px;
  padding: 13px 14px;
}

.composer button,
.button {
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  padding: 12px 17px;
  font-weight: 800;
}

.button.secondary {
  background: var(--blue);
}

.step-list,
.faq-list {
  display: grid;
  gap: 13px;
}

.step-list {
  margin-top: 10px;
}

.step-card,
.faq-card {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 8px;
  padding: 12px;
}

.step-card strong {
  display: block;
  margin-bottom: 6px;
}

.answer-image,
.step-card img,
.faq-card img {
  display: block;
  width: min(100%, 560px);
  max-height: 340px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin-top: 10px;
}

.data-body {
  overflow-y: auto;
  padding: 18px;
}

.faq-card h3 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.faq-card p {
  margin: 0 0 10px;
  line-height: 1.5;
}

.tagline {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.empty-state {
  border: 1px dashed #c6d2dd;
  background: var(--soft);
  color: var(--muted);
  border-radius: 8px;
  padding: 16px;
}

.data-tools {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

@media (max-width: 720px) {
  .topbar,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    width: min(100% - 18px, 1120px);
    margin: 9px auto;
  }

  .chat-shell,
  .data-shell {
    height: calc(100vh - 146px);
  }

  .messages,
  .data-body {
    padding: 12px;
  }

  .bubble {
    max-width: 94%;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .composer button {
    width: 100%;
  }
}
