:root {
  --color-dark: #19102D;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #D66EED;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: 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: color 0.2s ease; }
.dark-section a { color: var(--color-accent); }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: inherit; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
p { max-width: 38em; margin-bottom: 1em; }
ul, ol { margin-bottom: 1em; padding-left: 1.5em; }
li { margin-bottom: 0.5em; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); }
.mb-gap { margin-bottom: var(--gap); }

/* Header */
header { position: sticky; top: 0; z-index: 100; background: var(--color-dark); border-bottom: 1px solid rgba(255,255,255,0.1); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo img { height: 32px; width: auto; }
.logo span { color: var(--color-paper); font-weight: 700; font-size: 1.1rem; }
nav ul { display: flex; gap: 1.5rem; list-style: none; }
nav a { color: var(--color-paper); font-weight: 500; font-size: 0.95rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-accent); text-decoration: none; }

/* Footer */
footer { background: var(--color-dark); color: var(--color-paper); padding: var(--section-y) 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }
.footer-col h4 { color: var(--color-accent); margin-bottom: 1rem; font-size: 1rem; }
.footer-col a { display: block; color: var(--color-paper); margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-accent); text-decoration: none; }
.copyright { text-align: center; margin-top: var(--gap); padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; color: rgba(244,243,247,0.6); }

/* Components */
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.badge-brand { color: var(--color-brand); }
.badge-accent { color: var(--color-accent); }

.hl { color: var(--color-brand); }
.dark-section .hl { color: var(--color-accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 48px; padding: 0 1.5rem; font-size: 1rem; font-weight: 600; border-radius: var(--radius-btn); cursor: pointer; text-decoration: none; transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); border: 2px solid var(--color-accent); }
.btn-primary:hover { background: transparent; color: var(--color-accent); }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-text); }
.dark-section .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn-secondary:hover { background: rgba(0,0,0,0.05); }
.dark-section .btn-secondary:hover { background: rgba(255,255,255,0.1); }

.card { background: var(--color-paper); border: var(--card-border); box-shadow: var(--card-shadow); padding: var(--gap); border-radius: var(--radius-card); }
.dark-section .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); }

    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-responsive table { margin-bottom: 0; }
    table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
    th, td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(0,0,0,0.1); text-align: left; }
    th { font-weight: 700; background: rgba(0,0,0,0.02); }
    .dark-section table th, .dark-section table td { border-color: rgba(255,255,255,0.1); }

details { margin-bottom: 1rem; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 1rem; }
.dark-section details { border-color: rgba(255,255,255,0.1); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 0.5rem; margin-bottom: 0; }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid var(--color-brand); }
.timeline-item { position: relative; margin-bottom: var(--gap); }
.timeline-item::before { content: attr(data-step); position: absolute; left: -2.4rem; top: 0; width: 2rem; height: 2rem; background: var(--color-accent); color: var(--color-dark); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }

/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); }
.feature-item { padding: 1.5rem; border: 1px solid rgba(0,0,0,0.08); }
.dark-section .feature-item { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }

/* SVG Responsive */
.svg-responsive { width: 100%; height: auto; }
.svg-layer { transform-box: fill-box; transform-origin: center; }

/* SVG Animations */
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes pulse-node {
  0%, 100% { stroke-opacity: 0.2; }
  50% { stroke-opacity: 1; }
}
@keyframes float-bubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe-dots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slide-in-card {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.svg-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 6s ease forwards; }
.svg-pulse { animation: pulse-node 5s ease-in-out infinite; }
.svg-float { animation: float-bubble 4s ease-in-out infinite; }
.svg-breathe { animation: breathe-dots 2s ease-in-out infinite; }
.svg-slide { animation: slide-in-card 1.5s ease-out forwards; }
.delay-1 { animation-delay: 0.8s; }
.delay-2 { animation-delay: 1.6s; }
.delay-3 { animation-delay: 2.4s; }

@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; }
  .svg-draw, .svg-pulse, .svg-float, .svg-breathe, .svg-slide { animation: none !important; }
}
