:root {
  --color-dark: #231334;
  --color-paper: #E9E8EA;
  --color-text: #1C1523;
  --color-brand: #7D14EB;
  --color-accent: #EDD26E;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; margin-top: 0; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
p { margin-top: 0; margin-bottom: 1rem; max-width: 38em; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }
a { color: var(--color-brand); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }
svg { width: 100%; height: auto; max-width: 600px; overflow: visible; display: block; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); border-bottom: 1px solid rgba(0,0,0,0.08); }
section:last-of-type { border-bottom: none; }

.dark-section { background-color: var(--color-dark); color: var(--color-paper); }
.dark-section a { color: var(--color-accent); }
.dark-section .hl { color: var(--color-accent); }
.dark-section .marker { color: var(--color-accent); }
.paper-section { background-color: var(--color-paper); color: var(--color-text); }
.paper-section a { color: var(--color-brand); }
.paper-section .hl { color: var(--color-brand); }
.paper-section .marker { color: var(--color-brand); }

.marker {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em;
  margin-bottom: 0.5rem; text-transform: uppercase;
}
.hl { font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius-btn); font-weight: 600;
  cursor: pointer; transition: transform 0.2s, filter 0.2s; min-height: 48px;
  border: none; font-size: 1rem;
}
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background: transparent; border: 1px solid var(--color-text); color: var(--color-text); }
.dark-section .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn:hover { transform: translateY(-1px); filter: brightness(0.95); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.card {
  background: rgba(255,255,255,0.6); border-radius: var(--radius-card); padding: var(--gap);
  border: var(--card-border); box-shadow: var(--card-shadow);
}
.dark-section .card { background: rgba(255,255,255,0.08); }
.paper-section .card { background: #ffffff; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid rgba(0,0,0,0.1); }
th { font-weight: 600; }
.dark-section th, .dark-section td { border-bottom-color: rgba(255,255,255,0.15); }

details { margin-bottom: 1rem; border-radius: var(--radius-card); overflow: hidden; background: rgba(255,255,255,0.5); }
summary { padding: 1rem; cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-left: 2rem; }
summary::marker { display: none; }
summary::before { content: "+"; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--color-brand); }
details[open] summary::before { content: "-"; }
details > div { padding: 0 1rem 1rem; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); }
.step-item { display: flex; flex-direction: column; gap: 0.6rem; }
.step-badge { width: 32px; height: 32px; background: var(--color-accent); color: var(--color-dark); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }

.tab-nav { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; margin-bottom: 1.5rem; scrollbar-width: thin; }
.tab-nav a {
  padding: 0.6rem 1rem; border-radius: var(--radius-btn); background: rgba(0,0,0,0.05);
  font-weight: 500; white-space: nowrap; flex-shrink: 0;
}
.tab-nav a:hover, .tab-nav a:focus { background: rgba(0,0,0,0.1); }
.feature-panel { min-height: 400px; padding: 1.5rem; border-radius: var(--radius-card); background: rgba(0,0,0,0.03); }
.dark-section .feature-panel { background: rgba(255,255,255,0.05); }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.news-card { display: flex; flex-direction: column; justify-content: space-between; }
.news-card time { font-size: 0.85rem; opacity: 0.8; margin-top: auto; padding-top: 0.5rem; }

.hero-layout { display: flex; gap: var(--gap); align-items: center; }
.hero-text { flex: 1; max-width: 55%; min-width: 0; }
.hero-visual { flex: 1; max-width: 45%; min-width: 0; }
.flow-visual svg { width: 100%; height: auto; }
.scene-tag { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 6px; background: rgba(0,0,0,0.08); margin-right: 0.5rem; }
.dark-section .scene-tag { background: rgba(255,255,255,0.15); color: var(--color-accent); }

header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid rgba(0,0,0,0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.2rem; color: var(--color-text); text-decoration: none; }
.logo img { height: 32px; width: auto; }
nav { display: flex; gap: 1.5rem; }
nav a { font-weight: 500; color: var(--color-text); }
nav a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }

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-grid a { color: var(--color-paper); display: block; margin-bottom: 0.5rem; }
.footer-col h4 { color: var(--color-accent); margin-bottom: 0.8rem; }

/* SVG 动效 */
.grid-node { opacity: 0.15; transition: opacity 0.6s ease; }
@keyframes nodePulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}
.anim-node { animation: nodePulse 4s infinite ease-in-out; }
.anim-node:nth-child(odd) { animation-delay: 0.4s; }
.anim-node:nth-child(3n) { animation-delay: 0.8s; }
.anim-node:nth-child(5n) { animation-delay: 1.2s; }

.flow-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes dashFlow {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
.anim-flow { animation: dashFlow 3s linear infinite; }

.bubble-float { animation: floatY 5s ease-in-out infinite; transform-origin: center; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 900px) {
  .hero-layout { flex-direction: column; }
  .hero-text, .hero-visual { max-width: 100%; }
  .hero-text { text-align: center; }
  .hero-visual { margin-top: 2rem; }
  nav { display: none; } /* 移动端简化处理，实际项目可加汉堡菜单 */
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
