:root {
  --color-bg: #f6f3ee;
  --color-surface: #ffffff;
  --color-primary: #3a5a40;
  --color-primary-dark: #2c4632;
  --color-secondary: #8a7f73;
  --color-accent: #c98a65;
  --color-text: #2b2d2a;
  --color-text-muted: #6b6e69;
  --color-border: #e8e4de;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-soft: 0 6px 24px rgba(44, 46, 43, 0.05);
  --shadow-hover: 0 10px 32px rgba(44, 46, 43, 0.09);
  --font-main: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --container-max: 1180px;
  --nav-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); color: var(--color-primary-dark); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.2rem; color: var(--color-primary); }
h3 { font-size: 1.25rem; margin-bottom: 0.6rem; color: var(--color-text); }
p { margin-bottom: 1rem; color: var(--color-text-muted); font-size: 1rem; max-width: min(100%, 65ch); }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* Layout */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; position: relative; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); height: var(--nav-height);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--color-text); }
.logo img { height: 36px; width: auto; }
.nav ul { display: flex; list-style: none; gap: 28px; }
.nav a { text-decoration: none; color: var(--color-text-muted); font-weight: 500; transition: color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-primary); }
.nav a[aria-current="page"] { border-bottom: 2px solid var(--color-primary); padding-bottom: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 50px; font-weight: 600; text-decoration: none;
  transition: all 0.25s ease; cursor: pointer; border: none; font-size: 1rem;
}
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 4px 14px rgba(58, 90, 64, 0.25); }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(58, 90, 64, 0.35); }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: rgba(58, 90, 64, 0.06); }

/* Cards */
.card {
  background: var(--color-surface); border-radius: var(--radius-md); padding: 28px;
  box-shadow: var(--shadow-soft); transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--color-border); height: 100%; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-icon { width: 48px; height: 48px; margin-bottom: 16px; color: var(--color-primary); }
.card-icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.card-body { flex: 1; }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #f1ede8; font-weight: 600; color: var(--color-primary-dark); }
td { color: var(--color-text); }
tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item { background: var(--color-surface); border-radius: var(--radius-md); margin-bottom: 16px; border: 1px solid var(--color-border); overflow: hidden; }
.summary-custom {
  padding: 18px 24px; cursor: pointer; font-weight: 600; color: var(--color-text);
  display: flex; justify-content: space-between; align-items: center; list-style: none;
}
.summary-custom::-webkit-details-marker { display: none; }
.summary-custom::after { content: "+"; font-size: 1.4rem; color: var(--color-secondary); transition: transform 0.2s; }
details[open] .summary-custom::after { transform: rotate(45deg); }
.faq-answer { padding: 0 24px 20px; color: var(--color-text-muted); line-height: 1.65; }

/* Footer */
.footer { background: #ebe6df; padding: 48px 0 32px; margin-top: 60px; border-top: 1px solid var(--color-border); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer a { color: var(--color-text-muted); text-decoration: none; font-size: 0.95rem; }
.footer a:hover { color: var(--color-primary); }
.copyright { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 12px; }

/* SVG Animation Classes */
.svg-animated { will-change: transform, opacity; }
.anim-spin-slow { animation: spin-slow 20s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-spin-reverse { animation: spin-reverse 16s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-draw-stroke { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-stroke 5s ease-in-out infinite alternate; }
.anim-float { animation: float-y 4.5s ease-in-out infinite; }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spin-reverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes draw-stroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 24px; }
  .nav ul { display: none; } /* Simplified for single-file constraint */
  h1 { font-size: 2rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .grid-2, .grid-3 { gap: 16px; }
  .card { padding: 20px; }
  .summary-custom { padding: 14px 16px; }
  .faq-answer { padding: 0 16px 16px; }
  table { font-size: 0.9rem; }
  th, td { padding: 12px; }
}
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
