:root {
  --color-dark: #231334;
  --color-paper: #E9E8EA;
  --color-text: #1C1523;
  --color-brand: #7D14EB;
  --color-accent: #EDD26E;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--color-paper); color: var(--color-text); line-height: 1.75; font-size: 16px; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--color-brand); text-decoration: none; transition: opacity 0.2s ease; }
a:hover { opacity: 0.8; }
ul, ol { list-style: none; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding: var(--section-y) 0; }
section.dark { background: var(--color-dark); color: var(--color-paper); }
section.dark a { color: var(--color-accent); }
section.dark .hl { color: var(--color-accent); }

/* Typography */
h1, h2, h3 { font-weight: 700; letter-spacing: 0.02em; line-height: 1.2; margin-bottom: 1rem; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-brand); margin-bottom: 0.5rem; display: block; }
section.dark .eyebrow { color: var(--color-accent); }
.hl { color: var(--color-brand); }
section.dark .hl { color: var(--color-accent); }
p { margin-bottom: 1rem; max-width: 38em; }
strong { font-weight: 700; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0 1.5rem; height: 52px; border-radius: var(--radius-btn); font-weight: 600; font-size: 1rem; cursor: pointer; border: none; transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
section.dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-icon { width: 20px; height: 20px; stroke-width: 2; }

/* Cards */
.card { background: var(--color-paper); border: var(--card-border); border-radius: var(--radius-card); box-shadow: var(--card-shadow); padding: 1.5rem; transition: transform 0.2s ease; }
.card:hover { transform: translateY(-4px); }
section.dark .card { background: var(--color-paper); color: var(--color-text); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-text); }
th { font-weight: 700; background: rgba(125, 20, 235, 0.08); }
section.dark th { background: rgba(233, 210, 110, 0.12); }
tr:last-child td { border-bottom: none; }

/* FAQ */
details { margin-bottom: 1rem; border: var(--card-border); border-radius: var(--radius-card); background: var(--color-paper); overflow: hidden; }
summary { padding: 1rem 1.5rem; cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 2.5rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 1.2rem; font-weight: 400; }
details[open] summary::after { content: '−'; }
details > p { padding: 0 1.5rem 1rem; line-height: 1.7; }

/* Header & Footer */
header { position: sticky; top: 0; background: rgba(233, 232, 234, 0.92); backdrop-filter: blur(8px); z-index: 100; border-bottom: 1px solid rgba(28, 21, 35, 0.1); }
section.dark header { background: rgba(35, 19, 52, 0.92); border-bottom-color: rgba(233, 210, 110, 0.2); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.2rem; color: inherit; }
.brand img { height: 32px; width: auto; }
nav ul { display: flex; gap: 1.5rem; }
nav a { font-weight: 500; font-size: 0.95rem; }
nav a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
section.dark nav a[aria-current="page"] { color: var(--color-accent); }
footer { padding: 2.5rem 0; border-top: 1px solid rgba(28, 21, 35, 0.1); text-align: center; font-size: 0.9rem; }
section.dark footer { border-top-color: rgba(233, 232, 234, 0.1); }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; }

/* SVG Panel */
.svg-panel { width: 100%; height: auto; max-width: 600px; margin: 0 auto; }
.svg-group { transform-box: fill-box; transform-origin: center; }

/* Animations */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes flow { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes dotFlow { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(var(--dx, 40px)); opacity: 0; } }
.anim-float { animation: float 4s ease-in-out infinite; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-flow { animation: flow 2.5s linear infinite; stroke-dasharray: 1; stroke-dashoffset: 0; }
.dot-flow { animation: dotFlow 3.5s linear infinite; }

/* Layout Helpers */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.step-row { display: flex; gap: var(--gap); flex-wrap: wrap; }
.step-item { flex: 1; min-width: 200px; background: var(--color-paper); border: var(--card-border); border-radius: var(--radius-card); padding: 1.5rem; position: relative; }
section.dark .step-item { background: var(--color-paper); color: var(--color-text); }
.step-num { position: absolute; top: -12px; left: 1.5rem; background: var(--color-accent); color: var(--color-dark); font-weight: 800; padding: 0.25rem 0.75rem; border-radius: 8px; font-size: 0.9rem; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Responsive Tweaks */
@media (max-width: 768px) {
  .nav-inner { flex-direction: column; height: auto; padding: 1rem 0; gap: 1rem; }
  nav ul { gap: 1rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .step-row { flex-direction: column; }
}
