/* ==========================================================================
   星云 - Article & Legal Pages Stylesheet
   Optimized for High-Value SEO, Reading Comfort & Conversion
   ========================================================================== */

.page-main {
  padding: 40px 0 80px;
}

/* Breadcrumbs */
.breadcrumb-nav {
  margin-bottom: 24px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--accent-cyan);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

.breadcrumb-item.active {
  color: var(--text-main);
  font-weight: 500;
}

/* Article Container */
.article-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

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

.article-category-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 16px;
}

.article-h1 {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  width: 15px;
  height: 15px;
  color: var(--accent-cyan);
}

/* Table of Contents */
.article-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 36px;
}

.toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.toc-item a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.toc-item a:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* Article Content Body */
.article-content {
  color: #cbd5e1;
  font-size: 1.02rem;
  line-height: 1.85;
}

.article-content p {
  margin-bottom: 22px;
}

.article-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  margin: 44px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 30px 0 14px;
}

.article-content ul, .article-content ol {
  margin: 0 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-content li {
  line-height: 1.75;
}

.article-content strong {
  color: #ffffff;
}

.article-content a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: #ffffff;
}

/* Tables */
.article-table-container {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.article-table th {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  color: #ffffff;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.article-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

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

/* Callouts / Info Boxes */
.callout {
  padding: 18px 22px;
  border-radius: var(--radius-md);
  margin: 26px 0;
  border-left: 4px solid var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.callout-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.callout p {
  margin-bottom: 0 !important;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.callout.tip {
  border-left-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.callout.tip .callout-title {
  color: #34d399;
}

/* Embedded In-Article CTA Banner */
.article-inline-cta {
  background: linear-gradient(135deg, rgba(22, 30, 48, 0.9) 0%, rgba(13, 18, 28, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin: 40px 0;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.article-inline-cta h4 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.article-inline-cta p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 20px !important;
}

/* Related Articles Box */
.related-articles-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}

.related-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 22px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.related-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-3px);
}

.related-card-tag {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.related-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 10px;
  flex-grow: 1;
}

.related-card-link {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Legal & Static Page Styles */
.legal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 768px) {
  .article-h1 {
    font-size: 1.85rem;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .legal-box {
    padding: 24px 18px;
  }
}
