:root {
  --color-bg: #f7f9fb;
  --color-surface: #ffffff;
  --color-text: #1a2632;
  --color-text-secondary: #4a5568;
  --color-primary: #25d366;
  --color-primary-dark: #128c7e;
  --color-warm: #ff9f43;
  --color-warm-light: #fff3e0;
  --color-border: #e2e8f0;
  --color-heading: #0f172a;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.05);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.08);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, 'Courier New', monospace;
  --max-width: 1200px;
  --header-height: 76px;
  --gap-section: 5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }

/* 排版系统 */
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.2; font-weight: 700; color: var(--color-heading); }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); letter-spacing: -0.025em; margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -0.015em; margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1.1rem; color: var(--color-text-secondary); }
.text-mono { font-family: var(--font-mono); font-size: 0.88em; letter-spacing: 0.04em; color: var(--color-primary-dark); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.65; color: var(--color-text-secondary); }

/* 布局容器 */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
section { padding: var(--gap-section) 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.full-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
@media (max-width: 860px) { .full-split { grid-template-columns: 1fr; } }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(circle at 70% 30%, rgba(255,159,67,0.15) 0%, transparent 60%), var(--color-bg); }

/* 导航与页脚 */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--color-border); height: var(--header-height); display: flex; align-items: center; }
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo-area { display: flex; align-items: center; gap: 0.8rem; }
.logo-area img { width: 34px; height: 34px; object-fit: contain; }
.logo-text { font-weight: 700; font-size: 1.15rem; color: var(--color-text); }
nav ul { display: flex; gap: 1.6rem; }
nav a { font-size: 0.95rem; font-weight: 500; color: var(--color-text-secondary); position: relative; padding: 0.25rem 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-primary-dark); }
nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: var(--color-primary); border-radius: 2px; }
footer { background: #151b24; color: #94a3b8; padding: 4rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-col h4 { color: #f1f5f9; margin-bottom: 1.1rem; font-size: 1rem; font-weight: 600; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a:hover { color: var(--color-primary); }
.copyright { text-align: center; border-top: 1px solid #2d3748; padding-top: 1.5rem; font-size: 0.85rem; color: #64748b; }

/* 组件 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.85rem 1.8rem; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; border: none; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.btn-primary { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-warm) 100%); color: #fff; box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-primary-dark); background: var(--color-warm-light); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.6rem; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.9rem 1rem; border-bottom: 1px solid var(--color-border); text-align: left; }
th { background: #f8fafc; font-weight: 600; color: var(--color-heading); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: #fafbfd; }
details { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 1rem; background: var(--color-surface); overflow: hidden; }
summary { padding: 1.1rem 1.3rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding: 0 1.3rem 1.1rem; color: var(--color-text-secondary); line-height: 1.65; }
.tag { display: inline-block; padding: 0.2rem 0.65rem; background: var(--color-warm-light); color: var(--color-warm); border-radius: 99px; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.6rem; }
.update-date { font-family: var(--font-mono); font-size: 0.82rem; color: #64748b; margin-bottom: 0.4rem; }

/* SVG 动效系统 */
.svg-contour path { fill: none; stroke-width: 2; stroke-linecap: round; opacity: 0.65; }
.contour-flow { animation: contourDash 6s linear infinite; }
.contour-flow-alt { animation: contourDash 8s linear infinite reverse; }
.contour-wave { animation: contourWave 7s ease-in-out infinite alternate; }
.draw-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes contourDash { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes contourWave { 0% { transform: translateX(-2px); } 100% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) {
  .contour-flow, .contour-flow-alt, .contour-wave, .draw-line { animation: none !important; }
}

/* 焦点与无障碍 */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
