/* ================= Design Tokens ================= */
:root {
  --bg-page: #F7F5F0;
  --bg-card: #FFFFFF;
  --bg-elevated: #FBFBF9;
  --text-primary: #0A0A0A;
  --text-secondary: #4A4A4A;
  --text-muted: #7A7A7A;
  --accent-brand: #128C7E;
  --accent-hover: #075E54;
  --border-subtle: #EAE7DF;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.06);
  --radius-base: 12px;
  --radius-lg: 20px;
  --container-max: 1180px;
  --space-section: clamp(3rem, 8vw, 6rem);
  --space-element: 1.5rem;
}

/* ================= Base & Reset ================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
  font-family: "PingFang SC", "Helvetica Neue", "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
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; }

/* ================= Typography ================= */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; color: var(--text-primary); text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 0.6em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: 0.4em; }
p { margin-bottom: 1em; color: var(--text-secondary); }
.text-large { font-size: 1.05rem; line-height: 1.75; }
.text-muted { color: var(--text-muted); font-size: 0.95rem; }

/* ================= Layout ================= */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem); }
.section { padding: var(--space-section) 0; }
.grid-auto { display: grid; gap: var(--space-element); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* ================= Header / Footer ================= */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(247, 245, 240, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-subtle); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav ul { display: flex; gap: 1.5rem; }
nav a { font-size: 0.95rem; font-weight: 500; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--accent-brand); }
.site-footer { background: var(--text-primary); color: #D6D6D6; padding: 3rem 0 2rem; font-size: 0.9rem; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #FFFFFF; margin-bottom: 1rem; font-size: 1rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-bottom { border-top: 1px solid #333; padding-top: 1.5rem; text-align: center; color: #888; }

/* ================= Components ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 99px; font-weight: 600; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--text-primary); color: #FFFFFF; border: 1px solid transparent; }
.btn-primary:hover { background: #222222; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-subtle); }
.btn-outline:hover { border-color: var(--text-primary); }
.card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tag { display: inline-block; background: #EEF7F6; color: var(--accent-brand); font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 99px; margin-bottom: 0.5rem; }

/* ================= Table ================= */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-base); }
table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { background: var(--bg-elevated); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* ================= FAQ ================= */
.faq-list details { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-base); margin-bottom: 1rem; overflow: hidden; }
.faq-list summary { padding: 1.25rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.25rem; color: var(--text-muted); transition: transform 0.2s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .faq-body { padding: 0 1.25rem 1.25rem; color: var(--text-secondary); line-height: 1.7; }

/* ================= Focus & Accessibility ================= */
:focus-visible { outline: 2px solid var(--accent-brand); outline-offset: 2px; }
.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; }

/* ================= SVG Animations ================= */
@keyframes dotPulse {
  0% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.1); filter: drop-shadow(0 0 4px rgba(18, 140, 126, 0.5)); }
  70% { opacity: 1; transform: scale(1.1); filter: drop-shadow(0 0 4px rgba(18, 140, 126, 0.5)); }
  100% { opacity: 0.3; transform: scale(0.8); }
}
@keyframes dashDraw {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.svg-grid-dot { animation: dotPulse 4s infinite ease-in-out; }
.svg-path-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: dashDraw 6s infinite ease-in-out; }
.svg-float { animation: floatSlow 8s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }
svg[aria-hidden="true"] { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
