/* kejihuai.com - Modern tech media site */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --bg: #F8FAFE;
  --card-bg: #FFFFFF;
  --text: #374151;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --accent: #2563EB;
  --gradient-start: #2563EB;
  --gradient-end: #7C3AED;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 2px 6px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 6px 14px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.05);
  --orange: #ff8200;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

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

/* ==========================================
   Header (shared)
   ========================================== */
.header, .wb-header {
  background: var(--card-bg);
  border-bottom: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container, .wb-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo, .wb-header__logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  transition: opacity 0.2s;
}
.logo:hover, .wb-header__logo:hover { opacity: 0.85; }

.nav, .wb-header__nav { display: flex; gap: 28px; }
.nav a, .wb-header__nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
  font-weight: 500;
}
.nav a:hover, .nav a.active,
.wb-header__nav a:hover, .wb-header__nav a.active { color: var(--primary); }

/* ==========================================
   Main Layout (homepage)
   ========================================== */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 40px;
}

.main-content { min-width: 0; }

.sidebar { min-width: 0; }

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
  border-bottom: none;
}
.card-header h2 {
  font-size: 1.05rem;
  font-weight: 600;
  position: relative;
  padding-left: 12px;
}
.card-header h2::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}
.card-header .more {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  transition: opacity 0.2s;
}
.card-header .more:hover { opacity: 0.8; }
.card-body { padding: 8px 20px 16px; }

/* Article Item */
.article-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: none;
  transition: background 0.15s;
}
.article-item:hover { background: #f3f6fb; margin: 0 -20px; padding-left: 20px; padding-right: 20px; border-radius: 8px; }
.article-thumb {
  width: 180px; min-width: 180px; height: 110px;
  border-radius: 8px;
  overflow: hidden;
  background: #E8EAF0;
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.article-item:hover .article-thumb img { transform: scale(1.08); }
.article-info { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.article-info h3 {
  font-size: 1rem; font-weight: 600; line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-info h3:hover { color: var(--primary); }
.article-info .summary {
  font-size: 0.85rem; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.5;
}
.article-info .meta {
  font-size: 0.78rem; color: var(--text-light); margin-top: 6px;
}

/* Homepage video row */
.video-card .card-body { padding-top: 14px; }
.video-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.video-item {
  display: grid;
  grid-template-rows: auto minmax(44px, auto);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
.video-item:hover { background: #f3f6fb; }
.video-item__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #0f172a;
}
.video-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.video-item:hover .video-item__thumb img { transform: scale(1.05); }
.video-item__play,
.wb-video-cover__play {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.24);
}
.video-item__play {
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
}
.video-item__play::before,
.wb-video-cover__play::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid var(--primary);
  margin-left: 3px;
}
.video-item__info {
  min-width: 0;
  display: grid;
}
.video-item__info strong {
  font-size: 0.95rem;
  line-height: 1.42;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-item:hover .video-item__info strong { color: var(--primary); }

/* Simple list items */
.list-item { padding: 10px 0; border-bottom: none; transition: background 0.15s; border-radius: 8px; }
.list-item:hover { background: #f3f6fb; margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.list-item a { display: block; }
.list-item h4 {
  font-size: 0.92rem; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.15s;
}
.list-item h4:hover { color: var(--primary); }
.list-item .meta { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-light);
  font-size: 0.9rem;
}
.empty-state a { color: var(--primary); }
.empty-state a:hover { text-decoration: underline; }

/* Hot article sidebar items */
.hot-item .hot-views {
  color: var(--orange);
  font-weight: 600;
}

/* Sidebar */
.flash-item { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.flash-item:last-child { border-bottom: none; }
.flash-time { font-size: 0.75rem; color: var(--primary); font-weight: 600; }
.flash-text { font-size: 0.88rem; margin-top: 2px; line-height: 1.5; }

.cta-card {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; border-radius: var(--radius); padding: 28px 22px; margin-top: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.cta-card::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 60px; height: 60px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.cta-card h3 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
  position: relative;
}
.cta-card h3::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}
.cta-card p { font-size: 0.85rem; opacity: 0.9; margin-bottom: 16px; line-height: 1.6; position: relative; }
.cta-btn {
  display: inline-block; width: 100%; text-align: center; padding: 11px;
  background: #fff; color: var(--primary); border-radius: 8px;
  font-weight: 600; font-size: 0.9rem; transition: all 0.2s;
  position: relative;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* Page title (category, topic) */
.page-title {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.page-title h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  position: relative;
  padding-left: 16px;
}
.page-title h1::before {
  content: '';
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}
.page-title p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 16px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0;
}
.page-btn {
  padding: 8px 20px;
  background: var(--card-bg);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--primary);
  box-shadow: var(--shadow);
  transition: all 0.15s;
}
.page-btn:hover {
  background: var(--primary);
  color: #fff;
}
.page-info {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Error page */
.error-page, .page-404 {
  text-align: center;
  padding: 80px 20px;
}
.error-page h1, .page-404 h1 {
  font-size: 4rem;
  color: var(--primary);
  font-weight: 700;
}
.error-page p, .page-404 p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 1rem;
}
.error-page .cta-btn, .page-404 .cta-btn {
  display: inline-block;
  width: auto;
  margin-top: 20px;
  padding: 10px 32px;
  background: var(--primary);
  color: #fff;
}
.error-page .cta-btn:hover, .page-404 .cta-btn:hover {
  background: var(--primary-dark);
}

/* Topics section */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.topic-card {
  background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: box-shadow 0.25s, transform 0.25s;
}
.topic-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.topic-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.topic-info { padding: 16px 20px; }
.topic-info h3 { font-size: 1rem; margin-bottom: 6px; }
.topic-info h3:hover { color: var(--primary); }
.topic-info p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ==========================================
   Topics Page — Enhanced
   ========================================== */
.topics-hero {
  text-align: center;
  padding: 48px 0 28px;
}
.topics-hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.topics-hero p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.topic-grid--enhanced {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.topic-card--enhanced {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  padding: 28px 24px 24px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.topic-card--enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: opacity 0.25s;
}
.topic-card--enhanced:hover {
  box-shadow: 0 12px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  transform: translateY(-4px);
  border-color: var(--primary);
}
.topic-card--enhanced:hover::before {
  opacity: 1;
}

.topic-card--enhanced__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.topic-card--enhanced h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  transition: color 0.15s;
}
.topic-card--enhanced h3:hover {
  color: var(--primary);
}

.topic-card--enhanced__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.topic-card--enhanced__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-light);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.topic-card--enhanced__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topic-card--enhanced__arrow {
  position: absolute;
  right: 20px;
  top: 32px;
  width: 24px;
  height: 24px;
  color: var(--text-light);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.25s;
}
.topic-card--enhanced:hover .topic-card--enhanced__arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--primary);
}

/* Topic detail page */
.topic-detail-header {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  padding: 40px 0 32px;
  margin-bottom: 24px;
}
.topic-detail-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.topic-detail-header p {
  font-size: 0.9rem;
  opacity: 0.85;
}
.topic-detail-header .container {
  max-width: 800px;
}

.topic-breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 12px;
  opacity: 0.8;
}
.topic-breadcrumb a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.topic-breadcrumb a:hover { opacity: 0.9; }
.topic-breadcrumb span { margin: 0 6px; }

.topic-detail-stat {
  margin-top: 10px;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ==========================================
   Article Detail — Weibo-style immersive reading
   ========================================== */

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  z-index: 200;
  transition: width 0.1s linear;
}
.wb-article-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  width: 100%;
}

.wb-breadcrumb {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.5;
}
.wb-breadcrumb a { color: var(--text-secondary); transition: color 0.15s; }
.wb-breadcrumb a:hover { color: var(--primary); }
.wb-breadcrumb__sep { margin: 0 8px; opacity: 0.55; }
.wb-breadcrumb__current {
  color: var(--text-light);
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.wb-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 960px) {
  .wb-article-layout { grid-template-columns: 1fr; }
}

.wb-sidebar--hot .card { position: sticky; top: 72px; }

.wb-article {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 36px 28px;
}

.wb-article.wb-article--detail {
  box-shadow: var(--shadow);
}

/* Title */
.wb-article__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  color: #1a1a1a;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

/* Meta: author info */
.wb-article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.wb-article__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

.wb-article__author-info { display: flex; flex-direction: column; gap: 2px; }
.wb-article__author-row { display: flex; align-items: center; gap: 8px; }
.wb-article__author-name {
  font-size: 14px; font-weight: 600; color: #333; line-height: 1.3;
}
.wb-article__category {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
}
.wb-article__category:hover {
  background: var(--primary);
  color: #fff;
}
.wb-article__pub-info {
  font-size: 13px; color: #999; display: flex; align-items: center; gap: 4px;
}
.wb-article__dot { color: #ccc; }

/* Cover image */
.wb-article__cover { margin-bottom: 24px; border-radius: 6px; overflow: hidden; }
.wb-article__cover img { width: 100%; border-radius: 6px; }

.wb-video-cover {
  position: relative;
  margin: 0 0 24px;
  overflow: hidden;
  border-radius: 8px;
  background: #0f172a;
  aspect-ratio: 16 / 9;
}
.wb-video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wb-video-cover__play {
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  transition: transform 0.18s, background 0.18s;
}
.wb-video-cover__play:hover {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.05);
}
.wb-video-cover__play--disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

/* ==========================================
   Article Body — Premium Typography
   ========================================== */
.wb-article__body {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
  word-break: break-word;
  overflow-wrap: break-word;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.wb-article__body p {
  margin-bottom: 1.6em;
  text-align: justify;
}

.wb-article__body strong, .wb-article__body b {
  color: #111;
  font-weight: 700;
}

.wb-article__body em {
  font-style: italic;
  color: #555;
}

.wb-article__body img {
  display: block;
  max-width: 100%;
  margin: 20px auto;
  border-radius: 6px;
}

.wb-article__body h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 36px 0 14px;
  line-height: 1.4;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.wb-article__body h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 28px 0 12px;
  line-height: 1.4;
}

.wb-article__body h4 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 20px 0 8px;
}

.wb-article__body blockquote {
  border-left: 3px solid var(--primary);
  padding: 14px 18px;
  background: #f8faff;
  margin: 20px 0;
  color: #555;
  font-size: 15px;
  line-height: 1.8;
  border-radius: 0 6px 6px 0;
}

.wb-article__body blockquote p:last-child {
  margin-bottom: 0;
}

.wb-article__body ul, .wb-article__body ol {
  margin: 12px 0 20px 1.8em;
}
.wb-article__body li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.wb-article__body pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 20px 0;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.wb-article__body code {
  background: #f3f3f5;
  color: #e45649;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.wb-article__body pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

.wb-article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.wb-article__body th, .wb-article__body td {
  border: 1px solid #e8e8e8;
  padding: 10px 14px;
  text-align: left;
}
.wb-article__body th {
  background: #fafafa;
  font-weight: 600;
  color: #333;
}
.wb-article__body tr:hover td {
  background: #fafafa;
}

.wb-article__body a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.wb-article__body a:hover {
  border-bottom-color: var(--primary);
}

.wb-article__body hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 28px 0;
}

/* Tags */
.wb-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}
.wb-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  background: #f5f5f5;
  border-radius: 16px;
  font-size: 13px;
  color: #666;
  transition: all 0.15s;
}
.wb-tag:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* Footer */
.wb-article__footer {
  margin-top: 16px;
  padding-top: 12px;
}
.wb-article__pub-date {
  font-size: 13px;
  color: #bbb;
}

/* Engagement */
.wb-article__engagement {
  margin-top: 12px;
}
.wb-engagement__actions {
  display: flex;
  gap: 10px;
  padding: 0;
}
.wb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.wb-btn--outline {
  color: #555;
  background: #fff;
  border: 1px solid #e0e0e0;
}
.wb-btn--outline:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37,99,235,0.15);
}

/* Related articles */
.wb-related {
  margin-top: 12px;
  background: #fff;
  border-radius: 8px;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
}
.wb-related__title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 14px;
  padding-left: 14px;
  position: relative;
}
.wb-related__title::before {
  content: '';
  position: absolute;
  left: 0; top: 2px; bottom: 2px;
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.wb-related__list { list-style: none; margin: 0; padding: 0; }
.wb-related__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid #f5f5f5;
  gap: 12px;
  border-radius: 6px;
  transition: background 0.15s;
}
.wb-related__item:hover {
  background: #f8f9ff;
}
.wb-related__list li:last-child .wb-related__item { border-bottom: none; }
.wb-related__item-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-related__item:hover .wb-related__item-title { color: var(--primary); }
.wb-related__item-meta {
  font-size: 12px;
  color: #bbb;
  white-space: nowrap;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
  margin-top: auto;
  padding: 34px 0 18px;
  font-size: 0.85rem;
  color: #64748b;
  background: #f3f5f7;
  border-top: 1px solid #e2e8f0;
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) auto minmax(280px, 0.9fr);
  gap: 44px;
  align-items: flex-start;
  padding-bottom: 22px;
}
.footer__grid--no-qr {
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
}
.footer__brand {
  min-width: 0;
}
.footer__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  margin-bottom: 12px;
  color: #1f2937;
}
.footer__brand-logo {
  display: block;
  max-width: 220px;
  max-height: 56px;
  object-fit: contain;
}
.footer__brand-mark {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid #475569;
  border-radius: 2px;
  color: #1f2937;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
}
.footer__brand-text {
  display: grid;
  gap: 2px;
}
.footer__brand-text strong {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0;
}
.footer__brand-text em {
  color: #64748b;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer__slogan {
  max-width: 360px;
  margin-bottom: 14px;
  color: #64748b;
  line-height: 1.7;
}
.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-bottom: 10px;
  color: #475569;
}
.footer__legal-links a,
.footer__contact a,
.footer__section-links a,
.footer__bottom a {
  color: inherit;
  transition: color 0.15s;
}
.footer__legal-links a + a::before {
  content: "|";
  margin: 0 8px;
  color: #cbd5e1;
}
.footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: #64748b;
}
.footer__qr-list {
  display: flex;
  gap: 18px;
  justify-content: center;
}
.footer__qr {
  text-align: center;
  color: #475569;
  font-size: 0.8rem;
}
.footer__qr img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  margin-bottom: 9px;
  background: #fff;
  border: 6px solid #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.footer__meta {
  display: grid;
  gap: 18px;
}
.footer__section h4 {
  margin-bottom: 10px;
  color: #1f2937;
  font-size: 0.9rem;
  font-weight: 700;
}
.footer__section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  line-height: 1.7;
  color: #64748b;
}
.footer__friend-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer__friend-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: contain;
  background: #fff;
}
.footer__bottom {
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}
.footer__extra-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.footer__brand a:hover,
.footer__legal-links a:hover,
.footer__contact a:hover,
.footer__section-links a:hover,
.footer__bottom a:hover {
  color: #1f2937;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 4px; flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--text); border-radius: 1px;
  transition: transform 0.2s;
}

/* Channel tabs for subcategories */
.channel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.channel-tab {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.channel-tab:hover, .channel-tab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.meta-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  background: var(--primary-light);
  color: var(--primary);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
  .main-grid { grid-template-columns: 1fr; }
  .article-thumb { width: 120px; min-width: 120px; height: 80px; }
  .video-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-item { grid-template-rows: auto minmax(44px, auto); }
  .wb-video-cover__play { width: 58px; height: 58px; }

  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--card-bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px 20px;
    box-shadow: var(--shadow-md);
  }
  .nav--open { display: flex; }
  .nav a { padding: 8px 0; }

  .footer__grid,
  .footer__grid--no-qr { grid-template-columns: 1fr; gap: 24px; }
  .footer__qr-list { justify-content: flex-start; flex-wrap: wrap; }
  .footer__bottom { justify-content: center; }

  .wb-article-page { padding: 8px 0 32px; }
  .wb-article { padding: 24px 18px 20px; border-radius: 0; }
  .wb-article__title { font-size: 20px; margin-bottom: 16px; }
  .wb-article__body { font-size: 15.5px; line-height: 1.85; }
  .wb-article__body h2 { font-size: 18px; margin: 24px 0 10px; }
  .wb-article__body h3 { font-size: 16px; }
  .wb-article__body blockquote { padding: 12px 14px; font-size: 14px; }
  .wb-article__body pre { padding: 12px 14px; font-size: 13px; }
  .wb-engagement__actions { padding: 0; }
  .wb-related { padding: 18px 16px; border-radius: 0; }

  .article-item:hover {
    background: transparent;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .topics-hero { padding: 32px 0 20px; }
  .topics-hero h1 { font-size: 1.5rem; }
  .topic-grid--enhanced { grid-template-columns: 1fr; }
  .topic-card--enhanced { padding: 20px; }
}

@media (max-width: 480px) {
  .wb-header__inner { height: 48px; }
  .wb-header__logo { font-size: 1.1rem; }
  .wb-header__nav { gap: 12px; }
  .wb-header__nav a { font-size: 0.82rem; }
  .wb-article__avatar { width: 36px; height: 36px; font-size: 13px; }
}
