/* ── Article Page Hero ─────────────────────────────────────── */
.article-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  padding: 48px 0; position: relative; overflow: hidden;
}
.article-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(37,99,235,.25) 0%, transparent 60%);
}
.article-hero-inner { position: relative; z-index: 1; max-width: 840px; }
.article-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  color: #475569; font-size: .78rem; margin-bottom: 18px;
}
.article-breadcrumb a { color: #64748b; transition: var(--t); }
.article-breadcrumb a:hover { color: #94a3b8; }
.article-breadcrumb svg { width: 11px; height: 11px; }
.article-page-title { color: white; font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.2; margin-bottom: 18px; }
.article-page-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.meta-item { display: flex; align-items: center; gap: 6px; color: #64748b; font-size: .78rem; }
.meta-item svg { width: 13px; height: 13px; }
.article-page-author {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-sm);
  width: fit-content;
}
.article-page-author .av-init { width: 42px; height: 42px; font-size: .8rem; border: 2px solid rgba(255,255,255,.2); }
.author-info-name { color: white; font-size: .875rem; font-weight: 600; }
.author-info-role { color: #64748b; font-size: .74rem; }

/* ── Article Layout ────────────────────────────────────────── */
.article-content-wrap {
  display: grid; grid-template-columns: 1fr 290px;
  gap: 28px; padding: 36px 0 56px;
}
@media (max-width: 1024px) { .article-content-wrap { grid-template-columns: 1fr; } }
@media (max-width: 1024px) { .article-sidebar { display: none; } }

/* ── Article Body ──────────────────────────────────────────── */
.article-body {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  padding: 36px 44px; min-width: 0;
}
@media (max-width: 600px) { .article-body { padding: 24px 20px; } }
.article-body h2 {
  font-size: 1.3rem; margin: 1.8em 0 .7em;
  padding-bottom: 8px; border-bottom: 2px solid var(--border); color: var(--text);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 1.08rem; margin: 1.4em 0 .5em; color: var(--text); }
.article-body p { color: #334155; line-height: 1.82; margin-bottom: 1.2em; }
.article-body ul { margin: 0 0 1.2em 1.5em; list-style: disc; }
.article-body ol { margin: 0 0 1.2em 1.5em; list-style: decimal; }
.article-body li { color: #334155; line-height: 1.72; margin-bottom: .4em; }
.article-body strong { color: var(--text); }
.article-body a { color: var(--primary); text-decoration: underline; text-decoration-color: #bfdbfe; }
.article-body a:hover { text-decoration-color: var(--primary); }
.article-body blockquote {
  border-left: 4px solid var(--primary); padding: 12px 18px;
  margin: 1.4em 0; background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #1e40af; font-style: italic;
}
.article-body pre {
  background: var(--code-bg); border-radius: var(--radius-sm);
  padding: 18px 22px; overflow-x: auto; margin: 1.4em 0; position: relative;
}
.article-body pre code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: .82rem; color: var(--code-text);
  background: none; padding: 0; border-radius: 0; border: none;
}
.article-body code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: .82em; background: #f1f5f9; color: var(--text);
  padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border);
}
.code-lang {
  position: absolute; top: 10px; right: 14px;
  font-size: .62rem; color: #475569;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase; letter-spacing: 1px;
}
.info-box {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm); padding: 14px 18px;
  margin: 1.4em 0; display: flex; gap: 12px;
}
.info-box svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.info-box p { margin: 0; color: #1e40af; font-size: .875rem; }
.warning-box {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius-sm); padding: 14px 18px;
  margin: 1.4em 0; display: flex; gap: 12px;
}
.warning-box svg { width: 18px; height: 18px; color: #f59e0b; flex-shrink: 0; margin-top: 2px; }
.warning-box p { margin: 0; color: #92400e; font-size: .875rem; }

/* ── Article Reactions ─────────────────────────────────────── */
.article-reactions {
  display: flex; align-items: center; gap: 10px;
  margin: 28px 0; padding: 18px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.reaction-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-muted); font-size: .8rem; font-weight: 500; transition: var(--t);
}
.reaction-btn:hover, .reaction-btn.active {
  border-color: var(--primary); color: var(--primary); background: var(--primary-light);
}
.reaction-btn svg { width: 15px; height: 15px; }
.reactions-label { margin-left: auto; color: var(--text-light); font-size: .76rem; }

/* ── Comments ──────────────────────────────────────────────── */
.comments-section { margin-top: 32px; }
.comments-title {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.comments-count {
  background: var(--primary); color: white;
  font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.comment { display: flex; gap: 12px; margin-bottom: 22px; }
.comment .av-init { width: 36px; height: 36px; font-size: .72rem; flex-shrink: 0; }
.comment-body {
  flex: 1; background: var(--bg); border-radius: var(--radius-sm);
  padding: 13px 16px; border: 1px solid var(--border);
}
.comment-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.comment-author { font-size: .84rem; font-weight: 700; color: var(--text); }
.comment-role {
  font-size: .68rem; color: var(--text-light);
  background: var(--border); padding: 1px 7px; border-radius: 10px;
}
.comment-time { font-size: .68rem; color: var(--text-light); margin-left: auto; }
.comment-text { font-size: .83rem; color: #334155; line-height: 1.65; }
.comment-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.comment-like {
  display: flex; align-items: center; gap: 4px;
  color: var(--text-light); font-size: .74rem; transition: var(--t); cursor: pointer;
}
.comment-like:hover { color: var(--primary); }
.comment-like svg { width: 12px; height: 12px; }
.comment-reply { color: var(--primary); font-size: .74rem; font-weight: 500; cursor: pointer; }
.comment-nested { margin-left: 48px; margin-top: 16px; }

/* ── Author Bio ────────────────────────────────────────────── */
.author-bio {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  padding: 24px; display: flex; gap: 16px; margin-top: 32px; align-items: flex-start;
}
.author-bio .av-init { width: 58px; height: 58px; font-size: .9rem; flex-shrink: 0; }
.author-bio-name { font-size: .95rem; font-weight: 700; margin-bottom: 3px; }
.author-bio-role { color: var(--text-muted); font-size: .78rem; margin-bottom: 10px; }
.author-bio-text { color: #334155; font-size: .83rem; line-height: 1.65; margin: 0; }

/* ── Related Posts ─────────────────────────────────────────── */
.related-posts { margin-top: 32px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  background: var(--card); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 16px; transition: var(--t);
}
.related-card:hover { border-color: #dbeafe; box-shadow: var(--shadow); }
.related-card .tag { margin-bottom: 8px; }
.related-title { font-size: .84rem; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
.related-title a:hover { color: var(--primary); }
.related-meta { display: flex; align-items: center; gap: 8px; color: var(--text-light); font-size: .72rem; }
.related-meta svg { width: 11px; height: 11px; }

/* ── Article Sidebar (sticky) ──────────────────────────────── */
.article-sidebar { display: flex; flex-direction: column; gap: 20px; }
.article-toc {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  padding: 18px; position: sticky; top: 84px;
}
.toc-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 7px;
}
.toc-title svg { width: 13px; height: 13px; color: var(--primary); }
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-item a {
  display: block; padding: 5px 8px; font-size: .78rem;
  color: var(--text-muted); border-radius: 4px;
  border-left: 2px solid transparent; transition: var(--t);
}
.toc-item a:hover, .toc-item a.active {
  color: var(--primary); border-left-color: var(--primary);
  background: var(--primary-light); padding-left: 12px;
}
.toc-item.level-3 a { padding-left: 20px; font-size: .73rem; }
.toc-item.level-3 a:hover, .toc-item.level-3 a.active { padding-left: 24px; }

.reading-now-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  padding: 18px; text-align: center;
}
.reading-now-count { font-size: 2rem; font-weight: 700; color: var(--text); }
.reading-now-label { color: var(--text-muted); font-size: .78rem; margin-top: 4px; }
.reading-pulse {
  width: 40px; height: 40px; background: #f0fdf4;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 12px auto 0;
}
.reading-pulse svg { width: 18px; height: 18px; color: var(--online); }

/* ── Share Strip ───────────────────────────────────────────── */
.share-strip {
  background: var(--card); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 14px 18px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 28px;
}
.share-label { font-size: .78rem; font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.share-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 6px; font-size: .78rem; font-weight: 500;
  border: 1px solid var(--border); color: var(--text-muted);
  transition: var(--t); background: var(--bg);
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.share-btn svg { width: 14px; height: 14px; }
