:root {
  --color-dark: #240F29;
  --color-paper: #F6F3F7;
  --color-text: #201523;
  --color-brand: #A711CF;
  --color-accent: #ED6E73;
  --color-white: #FFFFFF;
  --color-black: #000000;

  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
  --line-height-body: 1.65;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--color-paper);
  color: var(--color-text);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--section-y) 0; position: relative; }
.bg-dark { background: var(--color-dark); color: var(--color-paper); }
.bg-paper { background: var(--color-paper); color: var(--color-text); }

/* Typography */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: calc(var(--gap) / 2); }
p { margin-bottom: 1rem; max-width: 38em; }
.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;
}
.eyebrow::before { content: ""; display: inline-block; width: 12px; height: 2px; background: currentColor; }
.bg-dark .eyebrow, .bg-dark .hl { color: var(--color-accent); }
.bg-paper .eyebrow, .bg-paper .hl { color: var(--color-brand); }
.hl { color: inherit; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  height: 52px; padding: 0 24px; font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer; transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background: transparent; color: var(--color-text); border: 2px solid var(--color-text); }
.bg-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* Cards & Panels */
.card {
  background: var(--color-paper); border: var(--card-border); box-shadow: var(--card-shadow);
  padding: 1.5rem; border-radius: var(--radius-card);
}
.bg-dark .card { background: var(--color-dark); border-color: var(--color-paper); box-shadow: 4px 4px 0 var(--color-paper); }

/* Layout */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-row { display: flex; gap: var(--gap); align-items: center; }
.flex-row.reverse { flex-direction: row-reverse; }
@media (max-width: 768px) {
  .flex-row, .flex-row.reverse { flex-direction: column; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
  min-width: 0;
  overflow-x: auto;
}
th, td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--color-text); }
.bg-dark th, .bg-dark td { border-bottom-color: var(--color-paper); }
th { font-weight: 700; }

/* FAQ */
details { margin-bottom: 1rem; border: 2px solid var(--color-text); background: var(--color-paper); }
.bg-dark details { border-color: var(--color-paper); background: var(--color-dark); }
summary {
  padding: 1rem; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; }
details[open] summary::after { content: "-"; }
details > div { padding: 0 1rem 1rem; }

/* Header & Footer */
header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid rgba(0,0,0,0.1); }
.bg-dark header { background: var(--color-dark); border-bottom-color: rgba(255,255,255,0.1); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem var(--gap); max-width: var(--content-max); margin: 0 auto; }
nav ul { display: flex; gap: 1.5rem; }
nav a { font-weight: 600; }
nav a[aria-current="page"] { color: var(--color-brand); border-bottom: 2px solid var(--color-brand); }
.bg-dark nav a[aria-current="page"] { color: var(--color-accent); border-color: var(--color-accent); }

footer { padding: 3rem var(--gap); border-top: 1px solid rgba(0,0,0,0.1); background: var(--color-paper); }
.bg-dark footer { border-top-color: rgba(255,255,255,0.1); background: var(--color-dark); color: var(--color-paper); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; max-width: var(--content-max); margin: 0 auto; }
.footer-links a { display: block; margin-bottom: 0.5rem; }
.footer-copy { text-align: center; margin-top: 2rem; font-size: 0.85rem; opacity: 0.8; }

/* SVG Container & Animations */
.svg-wrap { width: 100%; height: auto; max-width: 100%; overflow: hidden; }
.svg-wrap svg { width: 100%; height: auto; }

@keyframes nodeLight {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes floatLayer {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathDots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slidePanel {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes dashDraw {
  to { stroke-dashoffset: -1; }
}

.anim-node { animation: nodeLight 5s ease-in-out infinite; }
.anim-float { animation: floatLayer 7s ease-in-out infinite; }
.anim-breathe { animation: breathDots 3.5s ease-in-out infinite; }
.anim-slide { animation: slidePanel 6s ease-out forwards; }
.anim-draw {
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: dashDraw 8s linear infinite;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-name: none !important;
  }
}

/* 兜底：裁掉横向溢出 */
div.container {
  overflow-x: clip;
}
