:root {
  color-scheme: light;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-alt: #E8EEF5;
  --text: #1E293B;
  --text-muted: #5B6778;
  --border: #DCE3EB;
  --primary: #23476A;
  --primary-hover: #193550;
  --primary-contrast: #FFFFFF;
  --navy-panel: #17283B;
  --line-highlight: #8EB5D8;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --max-width: 1120px;
  --header-height: 68px;
  --shadow-sm: 0 1px 2px rgba(23, 40, 59, 0.05);
  --shadow-md: 0 4px 14px rgba(23, 40, 59, 0.07);
}

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

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

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

h1,
h2,
h3,
h4,
strong {
  color: var(--text);
}

::selection {
  background-color: var(--primary);
  color: var(--primary-contrast);
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

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

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

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

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--primary);
  color: var(--primary-contrast);
  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-inline: auto;
  padding-inline: var(--space-sm);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: 0.65rem;
}

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

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}

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

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

.nav-list a.btn-primary,
.nav-list a.btn-primary:hover {
  color: var(--primary-contrast);
  padding-inline: 1.1rem;
}

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

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

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

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

.btn-outline:hover {
  background-color: var(--surface-alt);
  color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* Sections */
.section {
  padding-block: var(--space-xl);
}

.section-alt {
  background-color: var(--surface);
  border-block: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-top: 0;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.section-desc {
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: var(--space-lg);
  max-width: 68ch;
}

/* Hero */
.hero {
  padding-block: var(--space-xl);
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

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

.hero-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background-color: var(--surface-alt);
  color: var(--primary);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.hero h1 {
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.hero-lead {
  font-size: 1.075rem;
  color: var(--text-muted);
  margin: 0;
}

.hero-media {
  background: var(--navy-panel);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  box-shadow: var(--shadow-md);
}

.hero-media img {
  border-radius: calc(var(--radius-lg) - 6px);
}

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

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

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

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

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

.card-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--surface-alt);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

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

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

.pricing-table tbody th,
.pricing-table td:nth-child(3),
.pricing-table .btn {
  white-space: nowrap;
}

.pricing-table caption {
  padding: var(--space-sm);
  font-weight: 700;
  text-align: left;
  color: var(--text);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

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

.pricing-table th {
  color: var(--text);
}

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

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

.price-note {
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.price-highlight {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

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

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.25rem var(--space-md);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  padding-block: 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-left: 1rem;
}

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

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

/* Article & Subpage Layout */
.page-header {
  padding-block: var(--space-lg);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.3;
}

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

.prose {
  max-width: 74ch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.prose h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background: var(--navy-panel);
  color: var(--surface-alt);
  padding-block: var(--space-lg);
  margin-top: var(--space-xl);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-sm);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary-contrast);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--line-highlight);
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline: 3px solid var(--line-highlight);
  outline-offset: 2px;
}

.footer-copy {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--primary);
  font-size: 0.875rem;
  color: var(--line-highlight);
}

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

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .section,
  .hero {
    padding-block: var(--space-lg);
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-list {
    width: 100%;
    gap: 0.25rem 0.75rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .prose {
    padding: var(--space-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
