.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 60px;
}

.blog-empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.blog-empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.blog-empty-text {
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 480px;
  margin: 0 auto;
}

.blog-empty-text a {
  color: var(--primary);
  font-weight: 600;
}

.article-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.card-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-main);
}

.card-author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.topic-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

.article-card h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
  color: var(--text-main);
  transition: color 0.18s;
}

.article-card:hover h2 {
  color: var(--primary);
}

.article-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.read-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.read-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.article-card:hover .read-more svg {
  transform: translateX(4px);
}

.blog-cta-banner {
  background: #0b132b;
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  border: 1px solid rgba(255, 102, 0, 0.2);
}

.blog-cta-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.blog-cta-content p {
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 560px;
  line-height: 1.5;
}

.blog-cta-action {
  background: var(--primary);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.35);
  transition: background 0.18s, transform 0.18s;
}

.blog-cta-action:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  width: 0%;
  z-index: 999;
  transition: width 0.1s linear;
}

/* Author `display` rules beat the UA [hidden] stylesheet — keep hidden elements gone. */
[hidden],
#article-root[hidden],
#not-found[hidden],
#post-faq[hidden],
#post-stats[hidden] {
  display: none !important;
}

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 40px;
  margin-bottom: 80px;
}

.toc-sidebar {
  position: sticky;
  top: 32px;
  align-self: start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.toc-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-item a {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all 0.18s ease;
}

.toc-item a:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.toc-item.active a {
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
  background: var(--primary-light);
}

.article-center {
  min-width: 0;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

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

.article-breadcrumb a:hover {
  color: var(--primary);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.6px;
  color: var(--text-main);
  margin-bottom: 16px;
}

.article-prose {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #334155;
}

.article-prose p {
  margin-bottom: 24px;
}

.article-prose h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-main);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.article-prose h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-main);
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-prose ul, .article-prose ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-prose li {
  margin-bottom: 8px;
}

.article-prose blockquote {
  border-left: 3px solid var(--primary);
  background: var(--primary-light);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 28px 0;
  font-style: italic;
  color: var(--text-main);
}

.stat-callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-desc {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.article-table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.article-table th {
  background: var(--bg-subtle);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
}

.article-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
}

.article-table tr:last-child td {
  border-bottom: none;
}

.article-faq {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 2px solid var(--border-light);
}

.faq-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.faq-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.faq-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.cta-sidebar {
  position: sticky;
  top: 32px;
  align-self: start;
}

.cta-sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.cta-sidebar-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.cta-sidebar-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.cta-sidebar-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.cta-sidebar-btn {
  display: block;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.28);
  transition: background 0.18s;
}

.cta-sidebar-btn:hover {
  background: var(--primary-hover);
}

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .toc-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .cta-sidebar {
    position: static;
  }
  .article-card {
    padding: 24px 20px;
  }
}
