:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at top left, rgba(154, 52, 18, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(20, 83, 45, 0.14), transparent 28%),
    linear-gradient(180deg, #f7f1e8 0%, #efe4d2 100%);
}

.demo-shell {
  position: relative;
}

.quick-link,
.primary-button,
.secondary-button {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.quick-link {
  display: inline-flex;
  min-width: 8rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.86);
  padding: 0.8rem 1rem;
  color: #111827;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
}

.quick-link:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.panel,
.stat-card {
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 50px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(16px);
}

.panel {
  border-radius: 28px;
  padding: 1.5rem;
}

.sticky-panel {
  top: 1.5rem;
}

@media (min-width: 1280px) {
  .sticky-panel {
    position: sticky;
  }
}

.stat-card {
  border-radius: 24px;
  padding: 1.25rem;
}

.stat-label,
.answer-label {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(17, 24, 39, 0.52);
}

.stat-value {
  display: block;
  margin-top: 0.8rem;
  font-size: 1.55rem;
  line-height: 1.1;
}

.stat-meta {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: rgba(17, 24, 39, 0.62);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel-title {
  font-family: Georgia, serif;
  font-size: 1.65rem;
  line-height: 1.2;
}

.panel-copy {
  margin-top: 0.35rem;
  max-width: 42rem;
  color: rgba(17, 24, 39, 0.62);
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field span {
  font-size: 0.88rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 18px;
  background: rgba(250, 247, 242, 0.9);
  padding: 0.95rem 1rem;
  color: #111827;
  outline: none;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(154, 52, 18, 0.6);
  box-shadow: 0 0 0 4px rgba(154, 52, 18, 0.12);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 1px solid transparent;
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%);
  color: white;
  box-shadow: 0 16px 30px rgba(154, 52, 18, 0.18);
}

.secondary-button {
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: white;
  color: #111827;
}

.source-card,
.source-chip,
.message-card,
.answer-box {
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 22px;
  background: rgba(250, 247, 242, 0.82);
}

.source-card,
.message-card {
  padding: 1rem 1.1rem;
}

.source-chip {
  padding: 0.9rem 1rem;
}

.source-card-header,
.message-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.source-title,
.message-role {
  font-size: 1rem;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status-indexed {
  background: rgba(20, 83, 45, 0.1);
  color: #14532d;
}

.status-processing,
.status-pending {
  background: rgba(154, 52, 18, 0.1);
  color: #9a3412;
}

.status-failed,
.status-deleting {
  background: rgba(127, 29, 29, 0.12);
  color: #7f1d1d;
}

.meta-row {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: rgba(17, 24, 39, 0.6);
  font-size: 0.84rem;
}

.meta-badge {
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  padding: 0.35rem 0.7rem;
}

.answer-box {
  padding: 1rem;
}

.answer-copy {
  margin-top: 0.7rem;
  white-space: pre-wrap;
  line-height: 1.65;
}

.empty-state {
  border: 1px dashed rgba(17, 24, 39, 0.14);
  border-radius: 22px;
  padding: 1rem;
  color: rgba(17, 24, 39, 0.6);
  text-align: center;
}
