/* AI News — matches navigator / ai-says tokens */
.ai-news {
  margin-bottom: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-sm);
}

.ai-news-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.ai-news-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.ai-news-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
  max-width: 52ch;
}

.ai-news-updated {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
}

.ai-news-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ai-news-source-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.ai-news-source-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.ai-news-source-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.ai-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.ai-news-item {
  animation: ai-news-fade-in 0.35s ease;
}

@keyframes ai-news-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-news-carousel-wrap {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.ai-news-carousel-wrap .ai-news-body {
  flex: 1;
  min-width: 0;
}

.ai-news-carousel-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 4px 0;
  align-self: center;
}

.ai-news-carousel-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.ai-news-carousel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.ai-news-carousel-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  min-width: 7em;
  text-align: center;
}


.ai-news-card {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.ai-news-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.ai-news-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 6px;
}

.ai-news-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
}

.ai-news-time {
  font-size: 11px;
  color: var(--text-muted);
}

.ai-news-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0 0 4px;
}

.ai-news-card-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-news-card-link-hint {
  font-size: 12px;
  color: var(--accent);
  margin-top: 6px;
  font-weight: 500;
}

.ai-news-loading,
.ai-news-error,
.ai-news-empty {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  padding: 8px 0;
}

.ai-news-error {
  color: #c0392b;
}

html[data-theme="dark"] .ai-news-error {
  color: #ff8a8a;
}

.ai-news-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.ai-news-footer a {
  color: var(--accent);
  text-decoration: none;
}

.ai-news-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .ai-news {
    padding: 14px 14px 12px;
  }
  .ai-news-header {
    flex-direction: column;
  }
  .ai-news-sources {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .ai-news-source-btn {
    flex: 0 0 auto;
  }
  .ai-news-carousel-wrap {
    gap: 8px;
  }
  .ai-news-carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}
