html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f8fafc;
  color: #0f172a;
}

.hero-section {
  background: radial-gradient(circle at top left, #1d4ed8 0%, #1e293b 58%, #020617 100%);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card,
.empty-state {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.5rem;
  padding: 1.5rem;
}

.empty-state {
  background: #fff;
  border: 1px solid #e2e8f0;
}

.stat-value {
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.article-card {
  border-radius: 1.25rem;
  overflow: hidden;
}

.article-image,
.article-detail-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e2e8f0;
}

.article-detail {
  max-width: 840px;
  margin: 0 auto;
}

.article-detail p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1e293b;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

.kbase-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.kbase-banner:hover {
  border-color: #2563eb;
  background: #dbeafe;
}

.kbase-banner-text {
  color: #334155;
}

.kbase-card {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
  cursor: pointer;
}

.kbase-card:hover {
  border-color: #94a3b8;
}

.kbase-card-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.kbase-chat {
  border-radius: 1rem;
  height: 70vh;
  min-height: 420px;
}

.kbase-messages {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kbase-message {
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
  max-width: 85%;
}

.kbase-message-user {
  align-self: flex-end;
  background: #2563eb;
  color: #ffffff;
  white-space: pre-wrap;
}

.kbase-message-assistant {
  align-self: flex-start;
  background: #f1f5f9;
  color: #1e293b;
}

.kbase-message-assistant :last-child {
  margin-bottom: 0;
}

.kbase-message-error {
  align-self: flex-start;
  background: #fee2e2;
  color: #991b1b;
}

.kbase-message-pending {
  align-self: flex-start;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.kbase-typing-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #64748b;
  animation: kbase-typing 1.2s infinite ease-in-out;
}

.kbase-typing-dot:nth-child(3) {
  animation-delay: 0.2s;
}

.kbase-typing-dot:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes kbase-typing {
  0%, 80%, 100% {
    opacity: 0.3;
  }

  40% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kbase-typing-dot {
    animation: none;
    opacity: 0.6;
  }
}
