:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-dark: #0f172a;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #f8fafc;
  --primary: #0369a1;
  --primary-hover: #075985;
  --primary-soft: #e0f2fe;
  --accent: #0284c7;
  --border: #e2e8f0;
  --surface: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --max-width: 1120px;
  --header-height: 68px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  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, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.brand-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand-logo span {
  color: var(--primary);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-soft);
  color: var(--primary-hover);
}

/* Sections & Scroll Offset */
section[id],
main[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-lg);
}

.section-header h2 {
  font-size: 1.875rem;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: var(--text-light);
  padding: var(--space-xl) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, 0.35);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.35rem;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #e2e8f0;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.hero .btn-secondary {
  background: transparent;
  color: #ffffff;
  border-color: #7dd3fc;
}

.hero .btn-secondary:hover {
  background: rgba(125, 211, 252, 0.15);
  color: #ffffff;
}

.hero-visual img {
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

/* Grids & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-icon {
  width: 120px;
  height: 80px;
  border-radius: var(--radius-sm);
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
}

.card p {
  margin: 0;
  color: var(--text-muted);
}

/* Table */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  text-align: left;
}

.pricing-table caption {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: left;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.pricing-table th,
.pricing-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.pricing-table thead th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text);
}

.pricing-table tbody tr:last-child th,
.pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.price-tag {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}

.table-note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.925rem;
  text-align: center;
}

.section-cta {
  margin-top: 2rem;
  text-align: center;
}

/* Reviews */
.review-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* FAQ */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.faq-item summary {
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.faq-answer p {
  margin: 0;
}

/* Subpages & Articles */
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) 0;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  line-height: 1.3;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 760px;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-body {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-lg) 0;
}

.article-body h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.45rem;
}

.article-body h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.15rem;
}

.article-body p {
  margin: 0 0 1.1rem;
  color: var(--text);
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.45rem;
}

.article-nav {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: var(--space-lg) 0;
  margin-top: var(--space-lg);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.footer-links a {
  color: #f8fafc;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #7dd3fc;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav {
    width: 100%;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .grid-3,
  .grid-2,
  .footer-links {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
}
