/* 设计变量 */
:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-brand-start: #075e54;
  --color-brand-end: #25d366;
  --color-border: #e2e8f0;
  --color-accent: #10b981;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  --shadow-hover: 0 8px 24px rgba(7,94,84,0.12);
  --font-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --spacing-section: clamp(3rem, 6vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-family: var(--font-base); background: var(--color-bg); color: var(--color-text); }
body { margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* 排版 */
h1, h2, h3 { font-weight: 700; color: var(--color-text); margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; }
h3 { font-size: clamp(1.125rem, 1.5vw, 1.35rem); line-height: 1.3; }
p { margin: 0 0 1em; color: var(--color-text-muted); }
a { color: var(--color-brand-end); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-brand-start); }
a:focus-visible { outline: 2px solid var(--color-brand-end); outline-offset: 3px; border-radius: 2px; }
img, svg { display: block; max-width: 100%; }

/* 布局容器 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: var(--spacing-section) 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1.25rem; }
.section-header { margin-bottom: 2.5rem; max-width: 720px; }
.section-header p { max-width: 640px; line-height: 1.7; }

/* 头部与导航 */
header { background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--color-border); }
.nav-wrapper { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo-group { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; color: var(--color-text); font-size: 1.1rem; }
.logo-img { width: 36px; height: 36px; object-fit: contain; }
nav ul { display: flex; list-style: none; gap: 1.5rem; margin: 0; padding: 0; }
nav a { color: var(--color-text); font-weight: 500; padding: 0.5rem 0; position: relative; }
nav a[aria-current="page"] { color: var(--color-brand-start); font-weight: 600; }
nav a:not([aria-current="page"])::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: transparent; transition: background 0.2s; }
nav a:not([aria-current="page"]):hover::after { background: var(--color-brand-end); }

/* 页脚 */
footer { background: #0f172a; color: #94a3b8; padding: 3rem 0; margin-top: 4rem; font-size: 0.95rem; }
.footer-inner { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #cbd5e1; }
.footer-links a:hover { color: #fff; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1.75rem; background: linear-gradient(135deg, var(--color-brand-start), var(--color-brand-end)); color: #fff; font-weight: 600; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s; text-wrap: balance; font-size: 1rem; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(7,94,84,0.25); opacity: 0.95; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.btn-outline { background: transparent; border: 1.5px solid var(--color-brand-start); color: var(--color-brand-start); }
.btn-outline:hover { background: rgba(7,94,84,0.06); }

/* 卡片与组件 */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.5rem; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; display: flex; flex-direction: column; gap: 0.75rem; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--color-brand-end); }
.card-icon { width: 28px; height: 28px; color: var(--color-brand-start); margin-bottom: 0.25rem; }
.card-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--color-border); }
.card-btn { align-self: flex-start; font-size: 0.9rem; font-weight: 500; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
th, td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--color-border); text-align: left; }
th { background: #f1f5f9; font-weight: 600; color: var(--color-text); }
tr:last-child td { border-bottom: none; }

details { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 0.75rem; background: var(--color-surface); overflow: hidden; }
summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; color: var(--color-text); list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.25rem; color: var(--color-brand-end); font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { content: "−"; transform: rotate(180deg); }
details > div { padding: 0 1.25rem 1rem; color: var(--color-text-muted); line-height: 1.75; }
ol, ul { padding-left: 1.25rem; color: var(--color-text-muted); }
li { margin-bottom: 0.5rem; line-height: 1.7; }

/* SVG 动效基础 */
@keyframes draw-ring {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes pulse-slow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.02); }
}
@keyframes float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.draw-anim { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-ring 6s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; }
.pulse-anim { transform-origin: center; transform-box: fill-box; animation: pulse-slow 5s ease-in-out infinite; }
.float-anim { animation: float-up 4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .draw-anim, .pulse-anim, .float-anim { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* 响应式 */
@media (max-width: 768px) {
  .nav-wrapper { flex-direction: column; height: auto; padding: 1rem 0; gap: 0.75rem; }
  nav ul { flex-wrap: wrap; justify-content: center; }
  section { padding: 2.5rem 0; }
}
