:root {
  --color-dark: #19102D;
  --color-paper: #FCFCFD;
  --color-paper-light: #F4F4F6;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #D66EED;
  --color-border-subtle: #E2E2E6;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-body: 1.65;
  --lh-heading: 1.25;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: var(--lh-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Layout */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
section { padding: var(--section-y) 0; }
.bg-dark { background: var(--color-dark); color: var(--color-paper); }
.bg-paper { background: var(--color-paper); color: var(--color-text); }
.bg-paper-light { background: var(--color-paper-light); color: var(--color-text); }

/* Typography */
.milestone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.bg-dark .milestone { color: var(--color-accent); }
.bg-paper .milestone { color: var(--color-brand); }
.bg-paper-light .milestone { color: var(--color-brand); }

h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: var(--lh-heading);
  margin-bottom: 24px;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: var(--lh-heading);
  margin-bottom: 32px;
  text-wrap: balance;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: var(--lh-heading);
  margin-bottom: 16px;
}
p { margin-bottom: 16px; max-width: 38em; }
.hl { font-weight: 700; }
.bg-dark .hl { color: var(--color-accent); }
.bg-paper .hl { color: var(--color-brand); }
.bg-paper-light .hl { color: var(--color-brand); }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--color-border-subtle); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav { display: flex; gap: 24px; align-items: center; }
nav a { font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); }
.bg-dark nav a { color: var(--color-paper); }
.bg-dark nav a:hover, .bg-dark nav a[aria-current="page"] { color: var(--color-accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-1px); background: #C95EE0; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.bg-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.bg-dark .btn-secondary:hover { background: rgba(255,255,255,0.08); }

/* Cards & Panels */
.card {
  background: var(--color-paper-light);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 24px;
  border-radius: var(--radius-card);
}
.panel {
  background: var(--color-dark);
  padding: 24px;
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
}
.panel-light {
  background: var(--color-paper);
  padding: 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-subtle);
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--color-border-subtle); }
th { font-weight: 600; background: var(--color-paper-light); }
td:first-child { font-weight: 600; width: 40%; }

/* FAQ */
details { border-bottom: 1px solid var(--color-border-subtle); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { margin-top: 12px; color: var(--color-text); }

/* SVG Animation Classes */
.svg-container { width: 100%; height: auto; }
.draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.bubble { animation: float 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.input-dot { animation: breathe 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.notify { animation: slideIn 8s ease-in-out infinite; }
.flow-line { stroke-dasharray: 0.6 0.4; animation: dashFlow 2s linear infinite; }
.data-point { animation: flowDot 4s linear infinite; transform-box: fill-box; transform-origin: center; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes slideIn {
  0%, 15% { transform: translateX(20px); opacity: 0; }
  20%, 80% { transform: translateX(0); opacity: 1; }
  85%, 100% { transform: translateX(-20px); opacity: 0; }
}
@keyframes dashFlow {
  to { stroke-dashoffset: -1; }
}
@keyframes flowDot {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(120px, -60px); opacity: 0; }
}

/* 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;
  }
  .draw { stroke-dashoffset: 0; }
}

/* Utilities */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 16px; }
.mt-4 { margin-top: 32px; }
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 12px;
  flex-shrink: 0;
}
.feature-row { display: flex; flex-direction: column; gap: var(--gap); }
@media (min-width: 900px) {
  .feature-row { flex-direction: row; align-items: center; }
  .feature-row.reverse { flex-direction: row-reverse; }
  .feature-text { flex: 1; }
  .feature-visual { flex: 1; }
}
.news-card article { height: 100%; display: flex; flex-direction: column; }
.news-card h3 { font-size: 1.1rem; margin-top: 12px; }
.news-card time { font-size: 0.85rem; color: var(--color-text); opacity: 0.7; margin-bottom: 8px; display: block; }
.news-card p { font-size: 0.95rem; color: var(--color-text); flex-grow: 1; }
.scenario-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 768px) { .scenario-grid { grid-template-columns: 1fr 1fr; } }
.scenario-block { border-left: 3px solid var(--color-brand); padding-left: 16px; }
.scenario-block h3 { margin-top: 0; }
.scenario-list li { margin-bottom: 8px; padding-left: 16px; position: relative; }
.scenario-list li::before { content: "•"; position: absolute; left: 0; color: var(--color-brand); }
.cta-section { text-align: center; }
.cta-section h2 { margin-bottom: 16px; }
.cta-section p { margin: 0 auto 32px; max-width: 600px; }
.footer { background: var(--color-dark); color: var(--color-paper); padding: 48px 0; margin-top: var(--section-y); }
.footer-inner { display: flex; flex-direction: column; gap: 24px; align-items: center; text-align: center; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--color-paper); opacity: 0.8; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; color: var(--color-accent); }

/* 兜底：裁掉横向溢出 */
div.container.hero-grid {
  overflow-x: clip;
}
