:root {
  color-scheme: light;
  --ink: #22201d;
  --muted: #68615a;
  --line: #ded8cf;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --mint: #c9eadf;
  --mint-dark: #1f7a62;
  --coral: #ef7d62;
  --sun: #f1c75b;
  --violet: #6f63a8;
  --shadow: 0 18px 50px rgba(53, 45, 37, 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:
    radial-gradient(circle at 15% 10%, rgba(201, 234, 223, 0.7), transparent 24rem),
    linear-gradient(135deg, #fbfaf7 0%, #f4efe7 48%, #f8f3ec 100%);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 380px;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(20px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #111;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(241, 199, 91, 0.9), rgba(239, 125, 98, 0.9)),
    #fff;
  box-shadow: 4px 4px 0 #111;
  color: #111;
  font-weight: 900;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.brand-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-button {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.nav-button.active {
  background: var(--ink);
  color: #fff;
}

.sidebar-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #eee8df;
  color: var(--muted);
  font-size: 13px;
}

.metric:last-child {
  border-bottom: 0;
}

.metric strong {
  color: var(--ink);
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
}

.page-copy {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button.danger {
  border-color: #111;
  background: var(--coral);
  color: #111;
  box-shadow: 3px 3px 0 #111;
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button svg {
  width: 17px;
  height: 17px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f7f1e9;
  color: #7a6f64;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.icon-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.icon-button:hover {
  transform: translateY(-1px);
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.icon-button.danger:hover,
.icon-button.danger:focus-visible {
  border-color: #111;
  background: var(--coral);
  color: #111;
  box-shadow: 3px 3px 0 #111;
  outline: 0;
}

.article > .action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 12px;
}

.article .button.ghost[data-delete] {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f7f1e9;
  color: #7a6f64;
  font-size: 0;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.article .button.ghost[data-delete]::before {
  content: "x";
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.article .button.ghost[data-delete]:hover,
.article .button.ghost[data-delete]:focus-visible {
  transform: translateY(-1px);
  border-color: #111;
  background: var(--coral);
  color: #111;
  box-shadow: 3px 3px 0 #111;
  outline: 0;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.stat-card strong {
  font-size: 34px;
  line-height: 1;
}

.stat-card p,
.mini-row span,
.agent-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stacked-panel {
  margin-top: 18px;
}

.toolbar-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.index-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.index-status.failed strong {
  color: #9b2f24;
}

.index-status.saving strong {
  color: var(--mint-dark);
}

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

.panel-header h2 {
  margin: 0;
  font-size: 17px;
}

.panel-body {
  padding: 16px;
}

.article-list {
  display: grid;
  gap: 10px;
  max-height: 530px;
  overflow: auto;
  padding-right: 4px;
}

.article {
  display: grid;
  gap: 10px;
  padding: 14px 12px 14px 14px;
  border: 1px solid #e7e0d7;
  border-radius: 8px;
  background: #fff;
}

.article-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 12px;
}

.article h3 {
  margin: 0;
  padding-top: 6px;
  font-size: 15px;
  line-height: 1.25;
}

.article p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.side-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.document-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.index-onboarding {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #ded8cf;
  border-radius: 8px;
  background: #fffaf1;
}

.index-onboarding.empty-index {
  border-style: dashed;
  background: #fffbf5;
}

.index-onboarding strong,
.index-onboarding span {
  display: block;
}

.index-onboarding span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(90px, auto);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px;
  border: 1px solid #e7e0d7;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.document-row.active,
.document-row:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 125, 98, 0.16);
}

.document-row strong,
.document-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-row small,
.document-row > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.document-details {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.document-details dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.document-details dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
}

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

.document-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
}

.diagnostics-card {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f3;
}

.diagnostics-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.diagnostics-card strong {
  color: var(--text);
}

.diagnostics-card.warning strong,
.diagnostics-card.failed strong {
  color: #9b2f24;
}

.diagnostics-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.diagnostics-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.diagnostics-card dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.private-demo-form,
.private-demo-session {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: #fff;
}

.private-demo-form > div,
.private-demo-session {
  color: var(--muted);
  font-size: 12px;
}

.private-demo-form strong,
.private-demo-session strong {
  display: block;
  color: var(--text);
}

.attention-list {
  display: grid;
  gap: 8px;
}

.attention-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.action-row.compact {
  justify-content: start;
}

.button:disabled,
.document-row:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1ece4;
  color: #5c5248;
  font-size: 12px;
  font-weight: 700;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

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

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.input {
  height: 42px;
  padding: 0 12px;
}

.textarea {
  min-height: 116px;
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

.input:focus,
.textarea:focus {
  border-color: var(--mint-dark);
  box-shadow: 0 0 0 3px rgba(31, 122, 98, 0.12);
}

.inbox {
  display: grid;
  gap: 12px;
}

.inbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f3;
}

.segmented-control button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.segmented-control button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(25, 22, 18, 0.08);
}

.inbox-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
  margin-top: 12px;
}

.inbox-list,
.inbox-detail {
  min-width: 0;
}

.inbox-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 580px;
  overflow: auto;
}

.conversation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid #e7e0d7;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
}

.conversation-row.active,
.conversation-row:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 125, 98, 0.16);
}

.conversation-row strong,
.conversation-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row small {
  color: var(--muted);
  font-size: 12px;
}

.inbox-detail {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e7e0d7;
  border-radius: 8px;
  background: #fff;
}

.conversation-detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.conversation-detail-header h3,
.conversation-detail-header p {
  margin: 0;
}

.conversation-detail-header h3 {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.conversation-detail-header p {
  color: var(--muted);
  font-size: 13px;
}

.transcript {
  display: grid;
  gap: 10px;
}

.transcript-message {
  display: grid;
  gap: 6px;
  max-width: 86%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f3;
}

.transcript-message.agent {
  justify-self: end;
  background: var(--mint);
}

.transcript-message.assistant {
  background: #f2f5ff;
}

.transcript-message div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.transcript-message p {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.agent-reply-form {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.agent-reply-form textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.conversation {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e7e0d7;
  border-radius: 8px;
  background: #fff;
}

.conversation-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.conversation-question {
  margin: 0;
  font-weight: 800;
}

.conversation-answer {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.compact {
  justify-self: start;
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status.open {
  background: #fff1c2;
  color: #75540a;
}

.status.resolved {
  background: var(--mint);
  color: #155845;
}

.check-list,
.mini-list,
.agent-board {
  display: grid;
  gap: 10px;
}

.check-item,
.mini-row,
.agent-card {
  border: 1px solid #e7e0d7;
  border-radius: 8px;
  background: #fff;
}

.check-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
}

.check-item span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #cfc6bb;
  border-radius: 6px;
}

.check-item span svg {
  width: 15px;
  height: 15px;
}

.check-item.done span {
  border-color: #111;
  background: var(--mint);
}

.check-item p {
  margin: 0;
  font-weight: 800;
}

.mini-row {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.mini-row strong {
  font-size: 14px;
}

.agent-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.agent-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 164px;
  padding: 14px;
}

.agent-card h3 {
  margin: 0;
  font-size: 17px;
}

.install-code {
  display: block;
  width: 100%;
  min-height: 168px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #191714;
  color: #f7f0e5;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.preview {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 28px 22px;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(20px);
}

.preview-header {
  margin-bottom: 18px;
}

.preview-header h2 {
  margin: 0;
  font-size: 18px;
}

.preview-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.browser-frame {
  display: grid;
  grid-template-rows: 38px 1fr;
  min-height: 560px;
  border: 1px solid #d9d1c7;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid #ebe4da;
  background: #f5f0e9;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

.dot:nth-child(2) {
  background: var(--sun);
}

.dot:nth-child(3) {
  background: var(--mint-dark);
}

.browser-page {
  position: relative;
  min-height: 520px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(34, 32, 29, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(34, 32, 29, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

.mock-product {
  display: grid;
  gap: 14px;
  max-width: 230px;
}

.mock-line {
  height: 12px;
  border-radius: 999px;
  background: #d9d1c7;
}

.mock-line.short {
  width: 58%;
}

.mock-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #ded8cf;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.chat-window {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(310px, calc(100% - 40px));
  height: 440px;
  border: 1px solid #111;
  border-radius: 8px;
  background: #fff;
  box-shadow: 8px 8px 0 #111;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--ink);
  color: #fff;
}

.chat-heading {
  min-width: 0;
  flex: 1;
}

.chat-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 900;
}

.chat-title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.chat-status {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-status.failed {
  color: #ffd4ca;
}

.chat-refresh {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.chat-refresh svg {
  width: 16px;
  height: 16px;
}

.chat-meta {
  padding: 7px 14px;
  border-bottom: 1px solid #e2dad1;
  background: #fff8ec;
  color: #6a6258;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #f8f4ee;
  overscroll-behavior: contain;
}

.message {
  max-width: 88%;
  padding: 10px 11px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.message p {
  margin: 3px 0 0;
}

.message-label {
  display: block;
  color: #6a6258;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.message.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2dad1;
}

.message.bot.insufficient {
  border-style: dashed;
  background: #fffbf5;
}

.message.user {
  align-self: flex-end;
  background: var(--mint-dark);
  color: #fff;
}

.message.user .message-label {
  color: rgba(255, 255, 255, 0.76);
}

.message.agent {
  align-self: flex-start;
  border: 1px solid #111;
  background: #fff7d6;
  box-shadow: 3px 3px 0 #111;
}

.message.status {
  align-self: center;
  max-width: 94%;
  border: 1px dashed #d8cfc3;
  background: #fffbf5;
  color: #6a6258;
  text-align: center;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 8px;
  color: #5f574f;
  font-size: 12px;
}

.source-list-label {
  font-weight: 900;
}

.source-pill {
  display: inline-flex;
  max-width: 100%;
  gap: 4px;
  align-items: center;
  padding: 4px 6px;
  border: 1px solid #ded8cf;
  border-radius: 7px;
  background: #fffaf1;
  color: #50483f;
  font-weight: 800;
}

.source-pill small {
  max-width: 110px;
  overflow: hidden;
  color: #7c7267;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fallback-note {
  display: block;
  color: #8a5649;
  font-weight: 800;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e2dad1;
  background: #fff;
}

.chat-form .input {
  height: 42px;
}

.send-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--coral);
  color: #111;
  font-weight: 900;
}

.send-button:disabled,
.chat-form .input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.empty {
  padding: 22px;
  border: 1px dashed #cfc6bb;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .preview {
    position: static;
    grid-column: 1 / -1;
    min-height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .browser-frame {
    min-height: 500px;
  }

  .stat-grid,
  .agent-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .layout {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-button {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .nav-button svg {
    display: none;
  }

  .sidebar-card {
    display: none;
  }

  .main,
  .preview {
    padding: 18px;
  }

  .topbar,
  .grid,
  .inbox-shell,
  .stat-grid,
  .agent-board {
    display: grid;
    grid-template-columns: 1fr;
  }

  .conversation-detail-header,
  .inbox-toolbar {
    display: grid;
  }

  .document-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .diagnostics-card dl,
  .index-onboarding,
  .attention-row {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 26px;
  }
}

@media (max-width: 520px) {
  .brand-subtitle,
  .preview-header p,
  .page-copy {
    display: none;
  }

  .chat-window {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    height: 410px;
  }

  .browser-page {
    min-height: 460px;
    padding: 14px;
  }
}
