:root {
  --bg: #f7f8fc;
  --paper: #ffffff;
  --ink: #232735;
  --muted: #6f7789;
  --line: #e4e7ef;
  --accent: #6965db;
  --accent-soft: #efefff;
  --accent-ink: #4f4bbd;
  --shadow: 0 18px 50px rgba(41, 46, 70, .08);
  --radius: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.seo-page {
  margin: 0;
  background:
    radial-gradient(900px 420px at 12% -10%, #ecebff 0%, transparent 62%),
    radial-gradient(700px 380px at 92% 0%, #eef6ff 0%, transparent 58%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.75 system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); }

.seo-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(228, 231, 239, .9);
  background: rgba(247, 248, 252, .86);
  backdrop-filter: blur(14px);
}

.seo-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.seo-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.seo-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(145deg, #7d79ee, #5b57cf);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 7px 16px rgba(105, 101, 219, .25);
}

.seo-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  flex-wrap: wrap;
}

.seo-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.seo-nav a:hover, .seo-nav a[aria-current="page"] { color: var(--accent-ink); }

.seo-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 24px 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 22px;
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-ink); }
.breadcrumb span { color: #b0b6c4; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
  gap: 38px;
  align-items: center;
  margin-bottom: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, h3 { color: var(--ink); line-height: 1.3; }

.hero h1, .article-head h1, .lib-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.4vw, 48px);
  letter-spacing: -.03em;
}

.lede {
  margin: 0;
  color: #545c70;
  font-size: 17px;
  line-height: 1.85;
}

.hero-image, .article-hero, .lib-preview {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(228, 231, 239, .9);
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-image, .article-hero { object-fit: contain; }
.lib-preview { aspect-ratio: 16 / 10; object-fit: contain; padding: 18px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: .15s ease;
}

.btn:hover { border-color: #c7c3f4; color: var(--accent-ink); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(105, 101, 219, .22); }
.btn.primary:hover { background: #5753c6; color: #fff; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: .18s ease;
}

.guide-card:hover { border-color: #cbc7f2; box-shadow: 0 12px 28px rgba(41, 46, 70, .07); transform: translateY(-2px); }
.guide-card b { font-size: 16px; line-height: 1.45; }
.guide-card span { color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.guide-card em { margin-top: auto; color: var(--accent-ink); font-style: normal; font-size: 13px; font-weight: 700; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 38px;
  align-items: start;
}

.article {
  min-width: 0;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 52px);
  box-shadow: 0 12px 34px rgba(41, 46, 70, .05);
}

.article h2 {
  margin: 36px 0 12px;
  font-size: 24px;
  letter-spacing: -.015em;
}

.article h2:first-of-type { margin-top: 0; }
.article p { margin: 0 0 14px; color: #454c5e; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 1.35em; color: #454c5e; }
.article li { margin: 7px 0; }
.article figure { margin: 26px 0; }
.article figure img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.article figcaption { margin-top: 8px; color: var(--muted); font-size: 12.5px; text-align: center; }

.faq {
  margin-top: 38px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 500; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 10px 0 0; color: #555d70; }

.aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
}

.aside-box {
  background: linear-gradient(160deg, #fff 0%, #f6f5ff 100%);
  border: 1px solid #dedbf7;
  border-radius: 16px;
  padding: 20px;
}

.aside-box h2 { margin: 0 0 8px; font-size: 16px; }
.aside-box p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.aside-links { display: grid; gap: 8px; }
.aside-links a { color: var(--accent-ink); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.aside-links a:hover { text-decoration: underline; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 12.5px;
}

.lib-detail {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 34px;
  align-items: start;
  margin-bottom: 36px;
}

.lib-panel {
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(22px, 3.4vw, 38px);
  box-shadow: 0 12px 34px rgba(41, 46, 70, .05);
}

.lib-title { font-size: clamp(28px, 4vw, 42px); }
.lib-lede { color: #4d5568; margin: 0 0 20px; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0 0 22px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta-grid div { min-width: 0; }
.meta-grid dt { color: var(--muted); font-size: 11.5px; margin: 0 0 2px; }
.meta-grid dd { margin: 0; font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere; }

.lib-section {
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 3.4vw, 36px);
  margin-top: 18px;
}
.lib-section h2 { margin: 0 0 12px; font-size: 22px; }
.lib-section p { color: #4b5264; margin: 0 0 14px; }
.lib-section ol { margin: 0 0 4px; padding-left: 1.3em; color: #4b5264; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.pill { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; text-decoration: none; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.related-card:hover { border-color: #cbc7f2; }
.related-card b { font-size: 13.5px; line-height: 1.45; }
.related-card span { color: var(--muted); font-size: 12px; }

.seo-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
}
.seo-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 24px 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--muted);
  font-size: 12.5px;
}
.seo-footer-inner a { color: var(--muted); text-decoration: none; }
.seo-footer-inner a:hover { color: var(--accent-ink); }
.seo-footer-inner .sep { color: #c2c6d2; }

@media (max-width: 860px) {
  .hero, .article-layout, .lib-detail { grid-template-columns: 1fr; }
  .aside { position: static; }
  .article { padding: 24px 20px; }
  .seo-main { padding: 24px 18px 56px; }
  .seo-header-inner { padding: 12px 18px; gap: 12px; }
  .seo-nav { gap: 12px; }
  .seo-nav a { font-size: 13px; }
}

@media (max-width: 520px) {
  .seo-brand span:last-child { display: none; }
  .hero h1, .article-head h1, .lib-title { font-size: 29px; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .cta-row .btn { width: 100%; }
}
