/* 文章页公共样式 v3 — 由各文章页 <link> 引入 */

/* Hero */
.article-hero {
  padding: 80px 0 64px;
  background:
    radial-gradient(ellipse 50% 50% at 92% 18%, rgba(99,102,241,.08) 0%, transparent 60%),
    linear-gradient(160deg, #f0f6ff 0%, #f8fbff 70%, #ffffff 100%);
  border-bottom: 1px solid #f3f4f6;
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(13,31,60,.05) 1px, transparent 0);
  background-size: 26px 26px;
  opacity: .7;
  pointer-events: none;
}
.article-hero .container { position: relative; z-index: 1 }

/* Cat & H1 */
.article-cat {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #2f6be8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: 'JetBrains Mono','SF Mono','Menlo','Consolas',monospace;
}
.article-cat::before {
  content: '';
  width: 22px; height: 2px;
  background: #2f6be8;
  border-radius: 2px;
}
.article-h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 900;
  color: #0a0f1e;
  line-height: 1.22;
  letter-spacing: -.028em;
  margin-bottom: 22px;
}
.article-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: #6b7689;
  margin-bottom: 32px;
}
.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: rgba(255,255,255,.75);
  border: 1px solid #e8ecf2;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

/* AI Summary */
.ai-summary {
  background: linear-gradient(135deg, #eef4ff 0%, #f5f9ff 100%);
  border: 1px solid #c7d9fd;
  border-left: 4px solid #2f6be8;
  border-radius: 14px;
  padding: 26px 30px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.ai-summary::before {
  content: '🤖';
  position: absolute;
  top: -20px; right: 12px;
  font-size: 4.5rem;
  opacity: .08;
}
.ai-summary-label {
  font-size: .7rem;
  font-weight: 700;
  color: #2f6be8;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono','SF Mono','Menlo','Consolas',monospace;
}
.ai-summary-text {
  font-size: .96rem;
  color: #2d3548;
  line-height: 1.85;
  position: relative;
  z-index: 1;
}

/* 文章正文布局 */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
  padding: 64px 0 72px;
}

/* 文章正文排印升级 */
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0a0f1e;
  margin: 48px 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
  letter-spacing: -.018em;
  position: relative;
}
.article-body h2::before {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 44px; height: 2px;
  background: linear-gradient(90deg, #2f6be8, #6366f1);
}
.article-body h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: #0a0f1e;
  margin: 30px 0 12px;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-body h3::before {
  content: '';
  width: 4px; height: 18px;
  background: linear-gradient(180deg, #2f6be8, #6366f1);
  border-radius: 2px;
  flex-shrink: 0;
}
.article-body p {
  font-size: .98rem;
  color: #2d3548;
  line-height: 1.92;
  margin-bottom: 18px;
}
.article-body strong { color: #0a0f1e; font-weight: 700 }
.article-body em { font-style: normal; background: linear-gradient(135deg, rgba(47,107,232,.12), rgba(99,102,241,.12)); padding: 1px 6px; border-radius: 4px; color: #1746b0 }
.article-body ul, .article-body ol {
  padding-left: 0;
  margin-bottom: 22px;
  list-style: none;
}
.article-body li {
  font-size: .96rem;
  color: #2d3548;
  line-height: 1.85;
  margin-bottom: 10px;
  padding-left: 24px;
  position: relative;
}
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 4px; top: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2f6be8;
}
.article-body ol { counter-reset: ol-counter }
.article-body ol li {
  counter-increment: ol-counter;
}
.article-body ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0; top: 0;
  font-family: 'JetBrains Mono',monospace;
  font-weight: 700;
  color: #2f6be8;
  font-size: .9rem;
}

/* 表格 */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: .9rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(10,15,30,.06), 0 1px 2px rgba(10,15,30,.04);
}
.article-body th {
  background: #f4f6f9;
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  color: #0a0f1e;
  border-bottom: 2px solid #e8ecf2;
  font-size: .85rem;
  letter-spacing: -.005em;
}
.article-body td {
  padding: 12px 18px;
  border-bottom: 1px solid #f3f4f6;
  color: #2d3548;
  vertical-align: top;
  line-height: 1.7;
}
.article-body tr:last-child td { border-bottom: none }
.article-body tr:hover td { background: #fafbfc }

/* 代码 */
.article-body code {
  background: #f4f6f9;
  border: 1px solid #e8ecf2;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: .87em;
  font-family: 'JetBrains Mono','SF Mono','Menlo','Consolas',monospace;
  color: #1746b0;
}
.article-body pre {
  background: linear-gradient(135deg, #0a1628 0%, #142b54 100%);
  border-radius: 14px;
  padding: 24px 28px;
  overflow-x: auto;
  margin: 24px 0;
  position: relative;
  box-shadow: 0 12px 32px rgba(10,15,30,.15);
}
.article-body pre::before {
  content: '';
  position: absolute;
  top: 14px; left: 16px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 18px 0 0 #febc2e, 36px 0 0 #28c840;
}
.article-body pre code {
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: .88rem;
  line-height: 1.75;
  padding: 0;
  display: block;
  margin-top: 14px;
}

/* 引用块 */
.article-body blockquote {
  border-left: 3px solid #2f6be8;
  padding: 18px 22px;
  background: linear-gradient(135deg, #eef4ff 0%, #f5f9ff 100%);
  border-radius: 0 12px 12px 0;
  margin: 24px 0;
  position: relative;
}
.article-body blockquote::before {
  content: '"';
  position: absolute;
  top: 8px; left: 18px;
  font-family: 'Georgia', serif;
  font-size: 2.5rem;
  color: #2f6be8;
  opacity: .2;
  line-height: 1;
}
.article-body blockquote p {
  margin: 0;
  font-style: italic;
  color: #1a2233;
  font-size: 1rem;
  line-height: 1.8;
}

/* 侧边栏 */
.sidebar { position: sticky; top: 96px }
.sidebar-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8ecf2;
  padding: 24px;
  margin-bottom: 18px;
  transition: box-shadow .25s;
}
.sidebar-card:hover { box-shadow: 0 4px 12px rgba(10,15,30,.07), 0 2px 4px rgba(10,15,30,.04) }
.sidebar-card h4 {
  font-size: .72rem;
  font-weight: 700;
  color: #0a0f1e;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono','SF Mono','Menlo','Consolas',monospace;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: #4a5468;
  padding: 9px 0;
  border-bottom: 1px solid #f3f4f6;
  transition: all .18s;
  text-decoration: none;
}
.sidebar-link:last-child { border-bottom: none }
.sidebar-link::before {
  content: '→';
  color: #c7d9fd;
  font-weight: 700;
  transition: all .2s;
  flex-shrink: 0;
}
.sidebar-link:hover { color: #2f6be8 }
.sidebar-link:hover::before { color: #2f6be8; transform: translateX(2px) }

/* 侧边栏 CTA */
.sidebar-cta {
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(99,102,241,.25) 0%, transparent 60%),
    linear-gradient(135deg, #0a1628 0%, #142b54 100%);
  border-radius: 14px;
  padding: 26px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.sidebar-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1px, transparent 0);
  background-size: 18px 18px;
  pointer-events: none;
}
.sidebar-cta h4 {
  color: #fff;
  font-size: .95rem;
  margin-bottom: 8px;
  border: none;
  padding: 0;
  text-transform: none;
  letter-spacing: -.01em;
  font-weight: 800;
  font-family: inherit;
}
.sidebar-cta p {
  color: rgba(255,255,255,.65);
  font-size: .82rem;
  margin-bottom: 18px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}
.sidebar-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: #2f6be8;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: .86rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all .2s;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.sidebar-cta a:hover {
  background: #eef4ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
}

/* FAQ */
.faq-section {
  background: #f9fafb;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.faq-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(13,31,60,.05) 1px, transparent 0);
  background-size: 26px 26px;
  opacity: .5;
  pointer-events: none;
}
.faq-section .container { position: relative; z-index: 1 }
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ecf2;
  overflow: hidden;
  transition: all .25s;
}
.faq-item:hover { border-color: #c7d9fd; box-shadow: 0 4px 12px rgba(10,15,30,.06) }
.faq-item.open { border-color: #2f6be8; box-shadow: 0 8px 24px rgba(47,107,232,.12) }
.faq-q {
  padding: 18px 22px;
  font-size: .96rem;
  font-weight: 700;
  color: #0a0f1e;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  gap: 12px;
  letter-spacing: -.008em;
}
.faq-q::after {
  content: '+';
  font-size: 1.4rem;
  color: #2f6be8;
  transition: transform .25s;
  flex-shrink: 0;
  font-weight: 300;
  line-height: 1;
}
.faq-item.open .faq-q::after { transform: rotate(45deg) }
.faq-a {
  padding: 0 22px;
  font-size: .9rem;
  color: #4a5468;
  line-height: 1.85;
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s;
}
.faq-item.open .faq-a { max-height: 600px; padding: 0 22px 20px }

/* 相关文章 */
.related-section {
  background: #fff;
  padding: 72px 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.related-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 22px 22px;
  border: 1px solid #e8ecf2;
  transition: all .3s cubic-bezier(.16,1,.3,1);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}
.related-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2f6be8, #6366f1);
  opacity: 0;
  transition: opacity .25s;
}
.related-card:hover {
  background: #fff;
  box-shadow: 0 12px 32px rgba(10,15,30,.09);
  transform: translateY(-3px);
  border-color: transparent;
}
.related-card:hover::before { opacity: 1 }
.related-cat {
  font-size: .65rem;
  font-weight: 700;
  color: #2f6be8;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 8px;
  font-family: 'JetBrains Mono','SF Mono','Menlo','Consolas',monospace;
}
.related-title {
  font-size: .92rem;
  font-weight: 700;
  color: #0a0f1e;
  line-height: 1.5;
  letter-spacing: -.008em;
}

/* ─── 文章独有组件 ─── */

/* layer-badge — methodology 文章中标记层级用 */
.layer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 4px 12px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #eef4ff 0%, #f5f9ff 100%);
  color: #2f6be8;
  border: 1px solid #c7d9fd;
  margin: -8px 0 14px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono','SF Mono','Menlo','Consolas',monospace;
}
.layer-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* step-box — promo-film-process 文章中步骤块 */
.step-box {
  background: #fff;
  border: 1px solid #e8ecf2;
  border-left: 3px solid #2f6be8;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: all .25s cubic-bezier(.16,1,.3,1);
}
.step-box:hover {
  box-shadow: 0 8px 24px rgba(10,15,30,.07);
  transform: translateX(4px);
  border-left-color: #6366f1;
}
.step-box-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .98rem;
  font-weight: 700;
  color: #0a0f1e;
  margin-bottom: 10px;
  letter-spacing: -.01em;
  flex-wrap: wrap;
}
.step-box .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f6be8 0%, #6366f1 100%);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  font-family: 'JetBrains Mono','SF Mono','Menlo','Consolas',monospace;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(47,107,232,.3);
}
.step-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  letter-spacing: .04em;
  margin-left: auto;
}
.step-tag::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.tag-ai     { background: #eef4ff; color: #2f6be8; border: 1px solid #c7d9fd }
.tag-human  { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa }
.tag-hybrid { background: #faf5ff; color: #7c3aed; border: 1px solid #e9d5ff }

/* howto-section / howto-steps / step-content — cost-efficiency 文章 */
.howto-section {
  background: linear-gradient(135deg, #fafbfc 0%, #f4f6f9 100%);
  border: 1px solid #e8ecf2;
  border-radius: 16px;
  padding: 32px 32px 28px;
  margin: 28px 0;
  position: relative;
  overflow: hidden;
}
.howto-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 6px; bottom: 0;
  background: linear-gradient(180deg, #2f6be8, #6366f1);
}
.howto-section h3 {
  margin-top: 0 !important;
  margin-bottom: 20px !important;
  font-size: 1.12rem !important;
  color: #0a0f1e !important;
}
.howto-section h3::before {
  background: linear-gradient(180deg, #2f6be8, #6366f1) !important;
}
.howto-steps {
  counter-reset: howto-counter;
  padding-left: 0 !important;
  margin: 0 !important;
}
.howto-steps li {
  list-style: none !important;
  counter-increment: howto-counter;
  padding-left: 0 !important;
  margin-bottom: 14px !important;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 10px;
  padding: 16px 18px !important;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all .25s;
}
.howto-steps li::before {
  content: counter(howto-counter) !important;
  position: static !important;
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #2f6be8, #6366f1) !important;
  color: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono',monospace;
  font-weight: 800;
  font-size: .85rem;
  top: 0 !important;
}
.howto-steps li:hover {
  border-color: #c7d9fd;
  box-shadow: 0 4px 12px rgba(10,15,30,.06);
}
.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.step-content strong {
  font-size: .95rem;
  color: #0a0f1e;
  letter-spacing: -.005em;
}
.step-content span {
  font-size: .86rem;
  color: #4a5468;
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px }
  .sidebar { position: static }
  .related-grid { grid-template-columns: 1fr 1fr }
}
@media (max-width: 768px) {
  .article-h1 { font-size: 1.7rem }
  .related-grid { grid-template-columns: 1fr }
  .article-layout { padding: 40px 0 56px }
  .article-body pre { padding: 20px 18px; padding-top: 36px }
  .article-meta { gap: 8px }
}
