:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-50: #eff6ff;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --primary-700: #0944aa;
  --primary-800: #083a8f;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--slate-900);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Announcement bar */
.announce {
  background: var(--primary-700);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}
.logo img { height: 30px; width: auto; display: block; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--slate-700);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 9999px;
}
.nav a:hover { background: var(--slate-100); color: var(--slate-900); }
.nav a.active { background: var(--blue); color: #fff; }
.header-cta { display: flex; gap: 10px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 9999px;
  padding: 10px 18px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-ghost { color: var(--slate-900); background: #fff; border: 1px solid var(--slate-200); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* Hero */
.hero { text-align: center; max-width: 640px; margin: 0 auto; padding: 56px 0 24px; }
.eyebrow {
  display: inline-block;
  background: var(--blue-50);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
}
.hero h1 { font-size: 2rem; margin: 16px 0 12px; letter-spacing: -0.02em; }
.hero p { color: var(--slate-600); font-size: 1.05rem; margin: 0 0 24px; }
.search { display: flex; gap: 8px; max-width: 480px; margin: 0 auto; }
.search input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  font-size: 0.9rem;
  outline: none;
}
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
.search button {
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 9999px;
  padding: 0 22px;
  font-weight: 600;
  cursor: pointer;
}
.search button:hover { background: var(--blue-dark); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 16px 0; }
.chip {
  padding: 8px 16px;
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate-700);
  background: #fff;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.chip-active:hover { color: #fff; }

/* Sections */
.section { padding: 24px 0 8px; }
.section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  font-weight: 700;
  margin: 0 0 16px;
}

/* Badges & meta */
.badge {
  display: inline-block;
  background: var(--blue-50);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
}
.badge-light { background: var(--slate-100); color: var(--slate-700); }
.meta { font-size: 0.8rem; color: var(--slate-500); }
.muted { color: var(--slate-500); font-size: 0.8rem; }

/* Featured */
.featured-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.featured-hero { position: relative; display: block; border-radius: 18px; overflow: hidden; background: var(--slate-900); min-height: 360px; }
.featured-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.65; }
.featured-hero-body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 360px;
  padding: 24px;
  background: linear-gradient(to top, rgba(2,6,23,0.92), rgba(2,6,23,0.35) 60%, transparent);
}
.featured-hero-body .badge { background: var(--blue); color: #fff; align-self: flex-start; }
.featured-hero-body h3 { color: #fff; font-size: 1.6rem; margin: 12px 0 6px; line-height: 1.25; }
.featured-hero-body p { color: var(--slate-200); margin: 0 0 10px; font-size: 0.9rem; }
.featured-hero-body .meta { color: var(--slate-300); }
.featured-side { display: flex; flex-direction: column; gap: 16px; }
.featured-item { display: flex; gap: 14px; align-items: center; border: 1px solid var(--slate-200); border-radius: 14px; padding: 14px; }
.featured-item:hover { border-color: var(--blue); }
.featured-item img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; }
.featured-item h4 { font-size: 0.92rem; margin: 6px 0 2px; color: var(--slate-900); line-height: 1.35; }

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--slate-200); border-radius: 16px; overflow: hidden; background: #fff; transition: box-shadow 0.2s, transform 0.2s; }
.card:hover { box-shadow: 0 12px 28px rgba(2,6,23,0.08); transform: translateY(-2px); }
.card-img { display: block; aspect-ratio: 16/9; background: var(--slate-100); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img-fallback {
  display: flex; align-items: center; justify-content: center;
  height: 100%; width: 100%;
  font-size: 2rem; font-weight: 700; color: var(--blue-50);
  background: linear-gradient(135deg, var(--blue-50), var(--slate-100));
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.card-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.card-body h3 { font-size: 1.02rem; margin: 0 0 8px; line-height: 1.35; }
.card-body h3 a { color: var(--slate-900); }
.card-body h3 a:hover { color: var(--blue); }
.excerpt { color: var(--slate-600); font-size: 0.88rem; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.readmore { color: var(--blue); font-weight: 600; font-size: 0.85rem; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 28px 0 8px; }

/* Empty */
.empty { text-align: center; padding: 48px 20px; border: 1px solid var(--slate-200); border-radius: 16px; }
.empty h3 { margin: 0 0 6px; }
.empty p { color: var(--slate-500); margin: 0; }

/* ===== Article ===== */
.article-wrap { max-width: 760px; padding-bottom: 40px; }
.article { padding: 24px 0; }
.backlink { font-size: 0.9rem; font-weight: 600; color: var(--blue); }
.article-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 20px 0 12px; }
.article-title { font-size: 2.1rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; }
.article-excerpt { font-size: 1.15rem; color: var(--slate-600); margin: 0 0 20px; }

.author-bar { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--slate-100); border-bottom: 1px solid var(--slate-100); padding: 14px 0; }
.avatar { width: 42px; height: 42px; border-radius: 9999px; object-fit: cover; flex: none; }
.avatar-fallback { display: flex; align-items: center; justify-content: center; background: var(--blue-50); color: var(--blue); font-weight: 700; }
.author-name { font-weight: 600; }
.share { margin-left: auto; display: flex; gap: 12px; font-size: 0.8rem; }
.share a { color: var(--slate-500); }
.share a:hover { color: var(--blue); }

.article-hero { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 16px; margin: 20px 0 24px; }

/* Prose (article content) */
.prose { color: var(--slate-700); font-size: 1.0625rem; line-height: 1.85; word-wrap: break-word; }
.prose h2, .prose h3, .prose h4 { color: var(--slate-900); font-weight: 700; line-height: 1.3; margin: 1.8em 0 0.7em; }
.prose h2 { font-size: 1.55rem; }
.prose h3 { font-size: 1.28rem; }
.prose h4 { font-size: 1.12rem; }
.prose p { margin: 0 0 1.2em; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.prose li { margin-bottom: 0.4em; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; margin: 1.2em 0; }
.prose blockquote { margin: 1.4em 0; padding: 0.9em 1.2em; border-left: 4px solid var(--blue); background: var(--slate-50); border-radius: 0 12px 12px 0; font-style: italic; color: var(--slate-700); }
.prose blockquote p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.92rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--slate-200); padding: 9px 12px; text-align: left; }
.prose th { background: var(--slate-100); font-weight: 600; color: var(--slate-900); }
.prose hr { border: none; border-top: 1px solid var(--slate-200); margin: 2em 0; }
.prose strong { color: var(--slate-900); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.tag { font-size: 0.82rem; color: var(--slate-600); background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 9999px; padding: 6px 14px; }
.tag:hover { border-color: var(--blue); color: var(--blue); }

/* Prev / next */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.prevnext-item { border: 1px solid var(--slate-200); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.prevnext-item strong { color: var(--slate-900); }
.prevnext-next { text-align: right; }

/* Related */
.related { padding: 20px 0; }
.related .cards { grid-template-columns: repeat(3, 1fr); }

/* CTA */
.cta { text-align: center; background: var(--slate-950); color: #fff; border-radius: 22px; padding: 48px 28px; margin: 40px 0; }
.cta h2 { font-size: 1.7rem; margin: 0 0 10px; }
.cta p { color: var(--slate-300); margin: 0 0 22px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* Footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--primary-800); background: var(--primary-700); color: #dbeafe; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr 0.8fr 0.9fr; gap: 32px; padding: 48px 20px 28px; }
.footer-tagline { font-weight: 600; font-size: 0.95rem; color: #dbeafe; }
.footer-copy { font-size: 0.8rem; color: #bfdbfe; line-height: 1.7; }
.site-footer h4 { color: #bfdbfe; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.14em; margin: 0 0 14px; }
.site-footer a, .site-footer span { display: block; color: #fff; font-size: 0.875rem; margin-bottom: 10px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.15); padding: 18px 20px; font-size: 0.82rem; color: #dbeafe; }

/* Responsive */
@media (max-width: 900px) {
  .cards, .related .cards { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-hero, .featured-hero-body { min-height: 300px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .cards, .related .cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .article-title { font-size: 1.6rem; }
  .prevnext { grid-template-columns: 1fr; }
  .share { margin-left: 0; margin-top: 8px; }
  .header-cta .btn-ghost { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
