/* Talk2Text 文章页共享样式 - 极简、暗色优先、与主站同色系 */
:root {
  --bg: #0F172A;
  --bg-soft: #1E293B;
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --border: #334155;
  --code-bg: #0B1220;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #FFFFFF;
    --bg-soft: #F8FAFC;
    --text: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --code-bg: #F1F5F9;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

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

/* 顶部导航 */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 18px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}
.nav-back {
  color: var(--text-muted);
  font-size: 14px;
}

/* Hero / 标题区 */
article header { padding: 48px 0 24px; }
article header h1 {
  font-size: 32px;
  line-height: 1.3;
  margin: 12px 0 16px;
  letter-spacing: -0.01em;
}
.meta {
  color: var(--text-muted);
  font-size: 14px;
}
.meta .tag {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  border-radius: 999px;
  margin-right: 8px;
  font-size: 12px;
  font-weight: 600;
}

/* 正文 */
article .content { padding-bottom: 64px; }
article h2 {
  font-size: 24px;
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}
article h3 {
  font-size: 19px;
  margin: 32px 0 12px;
}
article p { margin: 0 0 18px; }
article ul, article ol { margin: 0 0 18px; padding-left: 24px; }
article li { margin-bottom: 8px; }
article blockquote {
  border-left: 3px solid var(--primary);
  padding: 4px 16px;
  margin: 24px 0;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-radius: 0 8px 8px 0;
}
article code {
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
article th, article td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
article th { background: var(--bg-soft); font-weight: 600; }

/* CTA */
.cta {
  margin: 48px 0;
  padding: 32px;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(99,102,241,0.04));
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}
.cta h3 { margin-top: 0; }
.cta-button {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  margin-top: 12px;
  transition: background 0.2s;
}
.cta-button:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

/* FAQ */
.faq details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--bg-soft);
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-left: 24px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.faq details[open] summary::before { content: "−"; }

/* 相关文章 */
.related {
  border-top: 1px solid var(--border);
  padding: 32px 0 64px;
}
.related ul { list-style: none; padding: 0; }
.related li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.related li:last-child { border-bottom: none; }

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* 移动端 */
@media (max-width: 640px) {
  article header h1 { font-size: 26px; }
  article h2 { font-size: 21px; }
  .cta { padding: 24px 16px; }
}
