:root {
  --color-bg: #F7F7F3;
  --color-surface: #FFFFFF;
  --color-text: #111111;
  --color-text-muted: #444444;
  --color-border: #D8D8D3;
  --color-primary: #0A8753;
  --color-primary-hover: #065C38;
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --container-max: 1200px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius: 6px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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 {
  font-size: clamp(2.25rem, 5vw + 1rem, 4rem);
  letter-spacing: -0.04em;
  font-weight: 800;
  line-height: 1.1;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem);
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.125rem, 1.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

section {
  padding: var(--space-lg) 0;
}

.grid-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

.bento-item {
  grid-column: span 4;
}

@media (max-width: 900px) {
  .bento-item { grid-column: span 6; }
}

@media (max-width: 600px) {
  .bento-item { grid-column: span 12; }
}

/* Header / Nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 247, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand img {
  height: 32px;
  width: auto;
}

nav ul {
  display: flex;
  gap: var(--space-md);
  font-size: 0.95rem;
  font-weight: 500;
}

nav a {
  padding: 0.5rem 0;
  position: relative;
}

nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--color-primary);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

nav a:hover::after, nav a:focus-visible::after {
  width: 100%;
}

nav a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  text-align: center;
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn-primary:hover, .btn-primary:focus-visible {
  background: #222;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--color-text);
  color: var(--color-text);
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-sm);
  stroke: var(--color-text);
  stroke-width: 1.5;
  fill: none;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-md) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

th {
  background: #EFEFE9;
  font-weight: 600;
  color: var(--color-text);
}

tr:last-child td {
  border-bottom: none;
}

td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

/* FAQ */
details {
  margin-bottom: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  overflow: hidden;
}

summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 600;
  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;
  font-weight: 400;
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  padding: 0 1rem 1rem;
  margin: 0;
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
}

/* Footer */
footer {
  background: var(--color-text);
  color: #999;
  padding: var(--space-xl) 0 var(--space-md);
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

footer h4 {
  color: #EEE;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

footer a {
  color: #AAA;
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

footer a:hover { color: #FFF; }

.copyright {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid #333;
  font-size: 0.85rem;
}

/* SVG Animation Utilities */
.svg-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.node-grid circle {
  animation: node-pulse 5s infinite alternate ease-in-out;
  opacity: 0.15;
}

.node-grid circle:nth-child(3n+1) { animation-delay: 0s; }
.node-grid circle:nth-child(3n+2) { animation-delay: 1.5s; }
.node-grid circle:nth-child(3n) { animation-delay: 3s; }

@keyframes node-pulse {
  0%, 100% { opacity: 0.15; fill: var(--color-text); }
  50% { opacity: 0.9; fill: var(--color-primary); }
}

.draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-move 4s ease-in-out infinite alternate;
}

@keyframes draw-move {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .node-grid circle { opacity: 0.5; animation: none; }
  .draw-line { animation: none; }
}

/* Utility */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.section-header { max-width: 720px; margin: 0 auto var(--space-md); }
