/* ================================================================
   SEO优化指南 — 静态站样式
   零外部依赖，移动优先，SEO 友好
   ================================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --radius: 8px;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.7;
}

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { font-size: 1.25rem; font-weight: 700; color: var(--blue-700); text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.logo:hover { color: var(--blue-800); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; font-size: .9rem; font-weight: 500; }
.nav-links a { color: var(--gray-600); text-decoration: none; transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--blue-600); }

/* Mobile nav */
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--gray-600); padding: .25rem; }
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-100); box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
}

/* --- Footer --- */
.site-footer { background: var(--gray-900); color: var(--gray-300); margin-top: 2rem; padding: 2rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: var(--white); font-size: .9rem; margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { color: var(--gray-400); text-decoration: none; font-size: .875rem; transition: color .15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--gray-800); padding-top: 1.5rem; text-align: center; font-size: .8rem; color: var(--gray-500); }
.footer-bottom a { color: var(--gray-400); text-decoration: none; margin: 0 .75rem; }
.footer-bottom a:hover { color: var(--white); }

/* --- Hero --- */
.hero { background: linear-gradient(135deg, var(--blue-700), #1e40af 60%, #1e3a8a); color: var(--white); padding: 4rem 0; }
.hero h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.hero h1 span { display: block; font-size: 1.25rem; font-weight: 600; opacity: .85; margin-top: .5rem; }
.hero p { font-size: 1.125rem; opacity: .9; max-width: 640px; line-height: 1.8; margin-bottom: 2rem; }
.hero strong { color: var(--white); }
@media (max-width: 640px) { .hero h1 { font-size: 1.75rem; } .hero h1 span { font-size: 1rem; } }

/* --- Buttons --- */
.btn { display: inline-block; padding: .75rem 2rem; border-radius: var(--radius); font-weight: 600; text-decoration: none; transition: all .15s; font-size: .95rem; }
.btn-primary { background: var(--white); color: var(--blue-700); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--blue-50); }
.btn-outline { border: 2px solid rgba(255,255,255,.4); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-cta { background: var(--blue-600); color: var(--white); padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-cta:hover { background: var(--blue-700); }

/* --- Sections --- */
section { padding: 2.5rem 0; }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: .75rem; }
.section-sub { text-align: center; color: var(--gray-500); margin-bottom: 2.5rem; max-width: 640px; margin-left: auto; margin-right: auto; }

/* --- Cards --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-100); padding: 1.5rem; transition: box-shadow .2s; }
.card:hover { box-shadow: var(--shadow-md); }
.card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: .5rem; color: var(--blue-700); }
.card ul { list-style: none; }
.card li { font-size: .9rem; margin-bottom: .35rem; }
.card li a { color: var(--gray-600); text-decoration: none; transition: color .15s; }
.card li a:hover { color: var(--blue-600); }

/* --- Article Cards --- */
.article-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-100); padding: 1.5rem; transition: box-shadow .2s; }
.article-card:hover { box-shadow: var(--shadow-md); }
.article-tags { display: flex; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
.tag { font-size: .75rem; background: var(--blue-50); color: var(--blue-700); padding: .25rem .75rem; border-radius: 999px; }
.article-card h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.4; }
.article-card h2 a { color: var(--gray-900); text-decoration: none; }
.article-card h2 a:hover { color: var(--blue-600); }
.article-card p { font-size: .9rem; color: var(--gray-500); margin-bottom: 1rem; line-height: 1.6; }
.article-meta { font-size: .8rem; color: var(--gray-400); display: flex; justify-content: space-between; }

/* --- FAQ Accordion --- */
.faq-list { max-width: 800px; margin: 0 auto; }
details.faq { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: .75rem; cursor: pointer; }
details.faq summary { font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '▾'; font-size: 1.2rem; color: var(--gray-400); transition: transform .2s; }
details.faq[open] summary::after { transform: rotate(180deg); }
details.faq .faq-answer { padding-top: 1rem; color: var(--gray-600); line-height: 1.8; }

/* --- Breadcrumb --- */
.breadcrumb { font-size: .85rem; color: var(--gray-400); margin-bottom: 2rem; }
.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb span { margin: 0 .5rem; }

/* --- Article Content --- */
.article { max-width: 800px; margin: 0 auto; }
.article-header { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--gray-200); }
.article-header h1 { font-size: 2rem; font-weight: 800; line-height: 1.3; margin-bottom: 1rem; }
.article-header .desc { font-size: 1.1rem; color: var(--gray-500); margin-bottom: 1rem; }
.article-header .meta { font-size: .85rem; color: var(--gray-400); display: flex; gap: 1rem; flex-wrap: wrap; }
.article-body { font-size: 1.05rem; line-height: 1.9; color: var(--gray-700); }
.article-body h2 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin: 2.5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--gray-100); }
.article-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--gray-800); margin: 2rem 0 .75rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: .5rem; }
.article-body a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 2px; }
.article-body strong { color: var(--gray-900); }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: .95rem; }
.article-body th { background: var(--gray-50); border: 1px solid var(--gray-200); padding: .75rem 1rem; text-align: left; font-weight: 600; }
.article-body td { border: 1px solid var(--gray-200); padding: .75rem 1rem; }
.article-body blockquote { border-left: 4px solid var(--blue-600); background: var(--blue-50); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0; color: var(--gray-700); font-style: italic; }

/* --- Prev/Next Nav --- */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--gray-200); }
.post-nav a { text-decoration: none; padding: 1rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--gray-100); transition: box-shadow .2s; }
.post-nav a:hover { box-shadow: var(--shadow); }
.post-nav .label { display: block; font-size: .8rem; color: var(--gray-400); margin-bottom: .25rem; }
.post-nav .title { font-weight: 600; color: var(--gray-800); font-size: .95rem; }
.post-nav .next { text-align: right; }
.post-nav .empty { visibility: hidden; }

/* --- CTA Section --- */
.cta-section { background: var(--gray-900); color: var(--white); text-align: center; padding: 2.5rem 0; }
.cta-section h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.cta-section p { color: var(--gray-300); margin-bottom: 1.5rem; font-size: 1.1rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* --- Service Cards (Large) --- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.service-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-100); padding: 2rem; transition: box-shadow .2s; }
.service-card:hover { box-shadow: var(--shadow-md); }
.service-card .svc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.service-card h2 { font-size: 1.25rem; font-weight: 700; }
.service-card .price { font-size: 1.1rem; font-weight: 700; color: var(--blue-600); white-space: nowrap; }
.service-card .svc-desc { color: var(--gray-500); margin-bottom: 1rem; font-size: .95rem; line-height: 1.6; }
.service-card .svc-list { list-style: none; }
.service-card .svc-list li { font-size: .9rem; color: var(--gray-600); margin-bottom: .4rem; padding-left: 1.25rem; position: relative; }
.service-card .svc-list li::before { content: '✓'; position: absolute; left: 0; color: #10b981; font-weight: 700; }

/* --- About --- */
.about-content { max-width: 700px; }
.about-content p { font-size: 1.05rem; color: var(--gray-600); margin-bottom: 1.25rem; line-height: 1.9; }
.contact-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 2rem; margin-top: 2rem; }

/* --- Page Header --- */
.page-header { background: var(--white); border-bottom: 1px solid var(--gray-100); padding: 3rem 0; text-align: center; }
.page-header h1 { font-size: 2rem; font-weight: 800; }
.page-header p { color: var(--gray-500); margin-top: .5rem; font-size: 1.1rem; }

/* --- Checklist --- */
.checklist { list-style: none; }
.checklist li { padding: .4rem 0 .4rem 1.75rem; position: relative; }
.checklist li::before { content: '☐'; position: absolute; left: 0; color: var(--gray-400); }
.checklist li.done::before { content: '☑'; color: #10b981; }

/* --- Sitemap --- */
.sitemap-list { columns: 2; column-gap: 2rem; }
.sitemap-list li { margin-bottom: .5rem; break-inside: avoid; }
.sitemap-list a { color: var(--blue-600); text-decoration: none; font-size: .95rem; }
.sitemap-list a:hover { text-decoration: underline; }
@media (max-width: 500px) { .sitemap-list { columns: 1; } }

/* --- Highlight Box --- */
.highlight-box {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.highlight-box strong { color: #92400e; }

/* --- Article Hero Illustration --- */
.article-illustration {
  width: 100%; max-width: 800px; margin: 0 auto 2rem;
  height: 200px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.article-illustration svg { width: 100%; height: 100%; }
@media (max-width: 640px) { .article-illustration { height: 140px; } }

/* --- Tool Page --- */
.tool-container { max-width: 800px; margin: 0 auto; }
.tool-input { width: 100%; padding: .75rem 1rem; border: 2px solid var(--gray-200); border-radius: var(--radius); font-size: 1rem; font-family: inherit; transition: border-color .2s; }
.tool-input:focus { outline: none; border-color: var(--blue-600); }
.tool-textarea { width: 100%; padding: .75rem 1rem; border: 2px solid var(--gray-200); border-radius: var(--radius); font-size: .95rem; font-family: inherit; resize: vertical; min-height: 200px; transition: border-color .2s; }
.tool-textarea:focus { outline: none; border-color: var(--blue-600); }
.tool-label { display: block; font-weight: 600; margin-bottom: .5rem; color: var(--gray-700); font-size: .95rem; }
.tool-result { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem; }
.tool-btn { display: inline-block; background: var(--blue-600); color: var(--white); border: none; padding: .75rem 2rem; border-radius: var(--radius); font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .15s; }
.tool-btn:hover { background: var(--blue-700); }
.serp-preview { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.25rem 1.5rem; max-width: 640px; font-family: Arial, sans-serif; }
.serp-preview .serp-title { color: #1a0dab; font-size: 1.2rem; line-height: 1.3; cursor: pointer; text-decoration: none; display: block; margin-bottom: .25rem; }
.serp-preview .serp-title:hover { text-decoration: underline; }
.serp-preview .serp-url { color: #006621; font-size: .85rem; margin-bottom: .25rem; display: block; }
.serp-preview .serp-desc { color: #545454; font-size: .85rem; line-height: 1.5; }
.serp-preview .serp-warning { color: #c00; font-size: .75rem; margin-top: .25rem; }

/* --- Responsive Table --- */
@media (max-width: 640px) {
  .article-body table { font-size: .8rem; }
  .article-body th, .article-body td { padding: .5rem .6rem; }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .cta-section, .post-nav { display: none; }
  body { font-size: 12pt; }
}
