/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-brand-dark: #075E54;
  --color-brand-light: #25D366;
  --color-brand-gradient: linear-gradient(135deg, #075E54 0%, #1EBE9A 100%);
  --color-bg-primary: #F5F7FA;
  --color-bg-secondary: #FFFFFF;
  --color-bg-accent: #E8F5E9;
  --color-text-main: #1A1A1A;
  --color-text-muted: #5A5A5A;
  --color-border: #DCE1E6;
  --color-focus-ring: rgba(37, 211, 102, 0.45);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Consolas", "Menlo", monospace;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 24px rgba(7, 94, 84, 0.12);
  --max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text-main);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* =========================================
   排版与响应式流体字号
   ========================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section--alt {
  background-color: var(--color-bg-secondary);
}

.section--accent {
  background-color: var(--color-bg-accent);
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: var(--space-md);
  color: var(--color-brand-dark);
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-brand-dark);
}

.text-center { text-align: center; }
.grid { display: grid; gap: var(--space-md); }
.flex { display: flex; gap: var(--space-sm); align-items: center; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-0 { margin-bottom: 0; }

/* =========================================
   页头与导航
   ========================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 247, 250, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand__text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-brand-dark);
}

.nav {
  display: flex;
  gap: var(--space-md);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav__link {
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s;
}

.nav__link:hover, .nav__link:focus-visible {
  color: var(--color-brand-dark);
}

.nav__link[aria-current="page"] {
  color: var(--color-brand-light);
  font-weight: 600;
}

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand-light);
  border-radius: 1px;
}

@media (max-width: 768px) {
  .nav { display: none; }
}

/* =========================================
   组件：按钮
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(7, 94, 84, 0.15);
}

.btn:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--color-brand-gradient);
  color: #fff;
}

.btn--primary:hover {
  background: linear-gradient(135deg, #054d45 0%, #1eb08a 100%);
}

.btn--secondary {
  background: transparent;
  border-color: var(--color-brand-dark);
  color: var(--color-brand-dark);
}

.btn--secondary:hover {
  background: var(--color-bg-accent);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* =========================================
   组件：卡片与网格
   ========================================= */
.card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
  color: var(--color-brand-dark);
}

.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.update-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.update-card__meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
  font-family: var(--font-mono);
}

.update-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-sm);
}

.related-item {
  display: flex;
  flex-direction: column;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.related-item:hover {
  background: var(--color-bg-accent);
  border-color: var(--color-brand-light);
}

.related-item__title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.related-item__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* =========================================
   组件：表格
   ========================================= */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-bg-accent);
  font-weight: 600;
  color: var(--color-brand-dark);
}

tr:last-child td {
  border-bottom: none;
}

/* =========================================
   组件：FAQ (Details/Summary)
   ========================================= */
.faq {
  display: grid;
  gap: var(--space-sm);
}

details {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  transition: border-color 0.2s;
}

details[open] {
  border-color: var(--color-brand-light);
}

summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--color-brand-dark);
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  margin-top: var(--space-xs);
  font-size: 0.95rem;
}

/* =========================================
   组件：步骤指示器
   ========================================= */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-md);
}

.step {
  position: relative;
  padding-left: 2.5rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--color-brand-dark);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.9rem;
}

/* =========================================
   SVG 动效基类
   ========================================= */
.svg-flow, .svg-pulse, .svg-fade {
  transform-box: fill-box;
  transform-origin: center;
}

.flow-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dashFlow 6s linear infinite;
}

@keyframes dashFlow {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.pulse-dot {
  animation: pulseDot 3s ease-in-out infinite alternate;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 1; }
}

.fade-up {
  animation: fadeUp 4s ease-in-out infinite alternate;
}

@keyframes fadeUp {
  0% { transform: translateY(4px); opacity: 0.6; }
  100% { transform: translateY(-4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .flow-line, .pulse-dot, .fade-up {
    animation: none !important;
  }
}
