:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --primary: #512bd4;
  --primary-dark: #3b1d9e;
  --accent-bg: #ede9fe;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background: linear-gradient(135deg, #1e1b4b 0%, var(--primary) 100%);
  color: #ffffff;
  padding: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-badge {
  background: #ffffff;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  letter-spacing: -0.5px;
}

.brand h1 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.tagline {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.status-pill {
  background: rgba(255, 255, 255, 0.14);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #f8fafc;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.search-box input {
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 260px;
  font-size: 0.9rem;
  background: var(--surface);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 3rem;
}

@media (max-width: 880px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.article-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.category-badge {
  background: var(--accent-bg);
  color: var(--primary);
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 5px;
}

.ai-badge {
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
}

.article-title {
  margin: 0 0 0.5rem;
  font-size: 1.18rem;
  line-height: 1.35;
}

.article-title a {
  color: var(--text);
  text-decoration: none;
}

.article-title a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.article-summary {
  margin: 0 0 0.9rem;
  color: #334155;
  font-size: 0.95rem;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #475569;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.read-more {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.read-more:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.sidebar-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0;
}

.resource-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.resource-links a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.ad-slot {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.ad-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.ad-placeholder {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.82rem;
  padding: 1.25rem;
  border-radius: 6px;
}

.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 1.75rem 0;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 0.6rem;
}

.footer-links a {
  color: #e2e8f0;
  text-decoration: none;
}
