/* GEO 内容页（seo-site 静态页 + 后端案例页）共用样式。
   与 React 首页同一套视觉：色值、阴影、字号全部照抄 frontend/src/index.css 的 @theme token，
   改品牌色或字号时两边同步。字号口径同样是 16px 正文基准、12px 硬下限。 */

:root {
  --coral: #FF6B6B; --coral-soft: #FFF1F1;
  --cyan: #4ECDC4; --cyan-soft: #EDFBF9;
  --deep-space: #0A1929; --midnight: #1A237E; --navy: #0D1B2A;
  --surface: #F8FAFC; --surface-2: #F1F5F9; --hairline: #E6EBF0;
  --shadow-soft: 0 1px 2px rgba(13,27,42,.04), 0 4px 16px rgba(13,27,42,.06);
  --shadow-lift: 0 2px 6px rgba(13,27,42,.05), 0 12px 32px rgba(13,27,42,.10);
  --shadow-coral: 0 6px 20px rgba(255,107,107,.28);

  --text-h1: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --text-h2: 1.75rem; --text-h3: 1.25rem; --text-metric: 2rem; --text-lead: 1.125rem;
  --text-body: 1rem; --text-secondary: .875rem; --text-meta: .8125rem; --text-micro: .75rem;

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: #fff; color: var(--navy);
  font-family: var(--font-sans); font-size: var(--text-body); line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--coral); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.bar { max-width: 80rem; margin: 0 auto; padding: 0 24px; }
.content { max-width: 52rem; margin: 0 auto; padding: 0 24px; }
.bg-banner { background-image: linear-gradient(135deg, #0A1929 0%, #142a5c 45%, #1A237E 70%, #0A1929 100%); }

/* ---------- 页头：与首页导航一致 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .bar {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand actions" "nav nav";
  align-items: center; gap: 0 16px; padding-top: 12px; padding-bottom: 4px;
}
.brand { grid-area: brand; display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand img { height: 40px; width: auto; flex-shrink: 0; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text strong { font-size: var(--text-body); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-family: var(--font-mono); font-size: var(--text-micro); text-transform: uppercase; letter-spacing: .2em; color: rgba(13,27,42,.4); }
.pill {
  background: var(--coral); color: #fff; font-size: var(--text-secondary); font-weight: 600;
  padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow-coral); white-space: nowrap;
}
.pill:hover { text-decoration: none; filter: brightness(1.05); }
.pill .short { display: none; }
.actions { grid-area: actions; display: flex; align-items: center; gap: 8px; }
/* 透明工厂：与首页同款次级按钮（带锁），窄屏只留图标 */
.glass {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  font-size: var(--text-secondary); font-weight: 600; color: rgba(13,27,42,.55);
}
.glass:hover { color: var(--navy); background: var(--surface); text-decoration: none; }
.site-header nav { grid-area: nav; overflow-x: auto; scrollbar-width: none; margin: 6px -8px 0; }
.site-header nav::-webkit-scrollbar { display: none; }
.site-header ul { display: flex; gap: 2px; margin: 0; padding: 0 0 6px; list-style: none; white-space: nowrap; }
.site-header nav a {
  display: block; padding: 6px 12px; border-radius: 999px;
  font-size: var(--text-secondary); font-weight: 600; color: rgba(13,27,42,.55);
}
.site-header nav a:hover { color: var(--navy); background: var(--surface); text-decoration: none; }
.site-header nav a[aria-current] { color: var(--coral); background: var(--coral-soft); }

@media (min-width: 1024px) {
  .site-header .bar { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav actions"; height: 72px; padding-top: 0; padding-bottom: 0; }
  .site-header nav { margin: 0; justify-self: center; }
  .site-header ul { padding: 0; }
  .brand-text strong { font-size: var(--text-h3); }
}

/* ---------- 标题区：首页 Hero 同款深空蓝渐变 ---------- */
.hero { position: relative; overflow: hidden; color: #fff; }
.hero::after {
  content: ""; position: absolute; right: -120px; top: -160px; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(78,205,196,.18), transparent 65%); pointer-events: none;
}
.hero-in { position: relative; z-index: 1; max-width: 52rem; margin: 0 auto; padding: 28px 24px 48px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; font-size: var(--text-meta); color: rgba(255,255,255,.5); }
.crumbs a { color: rgba(255,255,255,.75); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: rgba(255,255,255,.3); }
.kicker {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px;
  font-size: var(--text-meta); font-weight: 600; letter-spacing: .04em;
  color: var(--cyan); background: rgba(78,205,196,.12); border: 1px solid rgba(78,205,196,.3);
}
.hero h1 { margin: 0; font-size: var(--text-h1); line-height: 1.2; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; }
.hero .lead { margin: 18px 0 0; font-size: var(--text-lead); line-height: 1.7; color: rgba(255,255,255,.78); max-width: 44rem; }
.hero .lead strong { color: #fff; }
.hero .lead a { color: var(--cyan); }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 32px 0 0; }
.metrics div {
  padding: 16px 18px; border-radius: 16px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px);
}
.metrics dt { font-size: var(--text-h3); font-weight: 700; line-height: 1.3; }
.metrics div:first-child dt { color: var(--coral); }
.metrics dd { margin: 6px 0 0; font-size: var(--text-meta); color: rgba(255,255,255,.6); }

/* ---------- 正文：对齐首页 .md-body ---------- */
.md-body { padding-top: 40px; padding-bottom: 16px; }
.md-body > :first-child { margin-top: 0; }
.md-body h2 {
  font-size: var(--text-h2); line-height: 1.35; letter-spacing: -.02em; font-weight: 700;
  margin: 56px 0 16px; padding-left: 14px; border-left: 4px solid var(--coral);
}
.md-body h3 { font-size: var(--text-h3); line-height: 1.45; font-weight: 700; margin: 32px 0 8px; }
.md-body p, .md-body ul, .md-body ol, .md-body table, .md-body blockquote { margin: 0 0 16px; }
.md-body ul, .md-body ol { padding-left: 1.4em; }
.md-body li { margin: 6px 0; }
.md-body li::marker { color: var(--cyan); }
.md-body strong { font-weight: 600; }
.md-body p.assert { font-size: var(--text-lead); line-height: 1.7; }
.md-body em { display: block; font-style: normal; font-size: var(--text-meta); color: rgba(13,27,42,.55); padding-left: 12px; border-left: 2px solid var(--hairline); }
.md-body code { font-family: var(--font-mono); font-size: .875em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.md-body blockquote {
  padding: 20px 24px; border-radius: 16px; background: var(--cyan-soft); border-left: 3px solid var(--cyan);
  font-size: var(--text-lead); line-height: 1.7;
}
.md-body blockquote p:last-child { margin-bottom: 0; font-size: var(--text-body); color: rgba(13,27,42,.65); }

.md-body table {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-secondary); line-height: 1.65; margin: 0;
}
/* 表格外包一层滚动容器：宽屏铺满，窄屏横向滚动，不撑破页面 */
.table-wrap { margin: 0 0 16px; overflow-x: auto; border: 1px solid var(--hairline); border-radius: 12px; box-shadow: var(--shadow-soft); }
.md-body th, .md-body td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); }
.md-body tr:last-child td { border-bottom: 0; }
.md-body th { background: var(--surface); font-weight: 600; white-space: nowrap; }
.md-body td:first-child { font-weight: 600; }
.more { margin-top: 40px !important; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: var(--text-secondary); color: rgba(13,27,42,.55); }

/* 案例页「口径与说明」在末尾，做成浅底信息块 */
.page-case h2:last-of-type { border-left-color: var(--cyan); }

/* FAQ：每个问答一张卡片（/faq/ 与案例页底部「相关问题」共用 .qa） */
.qa {
  margin: 16px 0 0; padding: 18px 22px; background: #fff;
  border: 1px solid var(--hairline); border-radius: 16px; box-shadow: var(--shadow-soft);
}
.qa:target { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft), var(--shadow-soft); }
.md-body .qa h3 { margin: 0 0 8px; font-size: var(--text-body); line-height: 1.6; }
.qa h3::before { content: "Q"; margin-right: 10px; color: var(--coral); font-family: var(--font-mono); }
.qa-a { padding-left: 22px; color: rgba(13,27,42,.78); }
.qa-a p:last-child { margin-bottom: 0; }
.qa-case { margin: 10px 0 0 22px !important; font-size: var(--text-meta); color: rgba(13,27,42,.55); }
.faq-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.faq-toc a {
  padding: 6px 14px; border-radius: 999px; font-size: var(--text-secondary); font-weight: 600;
  color: rgba(13,27,42,.65); background: var(--surface); border: 1px solid var(--hairline);
}
.faq-toc a:hover { color: var(--coral); border-color: var(--coral); text-decoration: none; }

/* 案例索引：与首页「成功案例库」卡片同款 */
.cards { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cards li { margin: 0; }
.card-link {
  display: flex; flex-direction: column; height: 100%; padding: 24px; color: var(--navy);
  background: #fff; border: 1px solid var(--hairline); border-radius: 16px; box-shadow: var(--shadow-soft);
  transition: box-shadow .3s, transform .3s, border-color .3s;
}
.card-link:hover { text-decoration: none; box-shadow: var(--shadow-lift); transform: translateY(-4px); border-color: rgba(78,205,196,.4); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-emoji { font-size: var(--text-h2); line-height: 1; }
.card-name { margin: 0 !important; font-size: var(--text-secondary); font-weight: 600; color: rgba(13,27,42,.6); }
.tag { display: inline-block; margin-top: 4px; padding: 1px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: var(--text-micro); background: var(--cyan-soft); color: rgba(13,27,42,.7); }
.card-link h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: var(--text-h3); line-height: 1.45; }
.card-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.card-metrics div { padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.card-metrics dt { font-weight: 700; font-size: var(--text-secondary); color: var(--coral); }
.card-metrics dd { margin: 2px 0 0; font-size: var(--text-micro); color: rgba(13,27,42,.55); }
.card-desc { flex: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; margin: 0 0 16px !important; font-size: var(--text-secondary); line-height: 1.65; color: rgba(13,27,42,.65); }
.card-more { font-size: var(--text-secondary); font-weight: 600; color: var(--coral); }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; margin: 48px 0 0; padding: 32px; border-radius: 24px; color: #fff; box-shadow: var(--shadow-lift); }
.cta-kicker { margin: 0 0 8px; font-family: var(--font-mono); font-size: var(--text-micro); text-transform: uppercase; letter-spacing: .2em; color: var(--cyan); }
.cta-title { margin: 0 0 8px; font-size: var(--text-h3); font-weight: 700; line-height: 1.45; }
.cta-sub { margin: 0; font-size: var(--text-secondary); color: rgba(255,255,255,.7); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 24px 0 0; }
.btn { background: var(--coral); color: #fff; font-size: var(--text-secondary); font-weight: 600; padding: 10px 20px; border-radius: 999px; box-shadow: var(--shadow-coral); }
.ghost { color: rgba(255,255,255,.85); font-size: var(--text-secondary); padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); }
.btn:hover, .ghost:hover { text-decoration: none; filter: brightness(1.08); }

/* ---------- 页脚：与首页页脚一致 ---------- */
.site-footer { margin-top: 96px; padding: 64px 0 32px; background: var(--surface); border-top: 1px solid var(--hairline); font-size: var(--text-secondary); }
.f-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 48px; }
.f-brand { max-width: 24rem; }
.f-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.f-logo img { height: 56px; width: auto; }
.f-logo span { display: flex; flex-direction: column; line-height: 1.3; }
.f-logo strong { font-size: var(--text-h3); }
.f-logo small { font-family: var(--font-mono); font-size: var(--text-micro); text-transform: uppercase; letter-spacing: .2em; color: rgba(13,27,42,.45); }
.f-brand p { margin: 0; color: rgba(13,27,42,.55); line-height: 1.65; }
.f-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 32px 28px; flex: 1 1 320px; min-width: 0; max-width: 50rem; }
.f-title { margin: 0 0 12px; font-size: var(--text-micro); font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--coral); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; color: rgba(13,27,42,.65); }
.site-footer li a { color: rgba(13,27,42,.65); }
.site-footer li a:hover { color: var(--coral); text-decoration: none; }
.f-strong { font-weight: 500; color: rgba(13,27,42,.8) !important; }
.f-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--hairline); }
.f-bottom p { margin: 0; font-size: var(--text-meta); color: rgba(13,27,42,.45); }
.f-bottom p + p { margin-top: 8px; }
.f-bottom a { color: inherit; }
.f-bottom a:hover { color: var(--coral); }
.dots { display: flex; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.dots i + i { background: var(--cyan); }

@media (max-width: 640px) {
  .hero-in { padding: 20px 20px 36px; }
  .content, .bar { padding-left: 20px; padding-right: 20px; }
  .md-body h2 { margin-top: 44px; }
  .cta { padding: 24px; }
  .brand { gap: 8px; }
  .brand img { height: 32px; }
  .brand-text strong { font-size: var(--text-secondary); }
  .brand-text small { display: none; }
  .pill { font-size: var(--text-meta); padding: 6px 12px; box-shadow: none; }
  .pill .short { display: inline; }
  .pill .full { display: none; }
  .glass { padding: 8px; }
  .glass span { display: none; }
  .qa { padding: 16px 18px; }
  .qa-a, .qa-case { padding-left: 0; margin-left: 0 !important; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metrics div { padding: 12px 14px; }
  .metrics dt { font-size: var(--text-body); }
}
