:root {
  --color-dark: #240F29;
  --color-paper: #F6F3F7;
  --color-text: #201523;
  --color-brand: #A711CF;
  --color-accent: #ED6E73;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.55; color: var(--color-text); background: var(--color-paper); }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
p { margin-bottom: var(--gap); max-width: 38em; }

/* 取色上下文 */
.paper-face { color: var(--color-text); background: var(--color-paper); }
.dark-face { color: var(--color-paper); background: var(--color-dark); }
.paper-face .hl { color: var(--color-brand); }
.dark-face .hl { color: var(--color-accent); }

.supertitle { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: var(--gap); display: block; }
.paper-face .supertitle { color: var(--color-brand); }
.dark-face .supertitle { color: var(--color-accent); }

h1, h2, h3 { font-weight: 700; letter-spacing: 0.02em; line-height: 1.25; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: var(--gap); margin-bottom: calc(var(--gap) * 0.75); }

/* 布局容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); }

/* 头部与导航 */
header { position: sticky; top: 0; z-index: 100; background: rgba(246, 243, 247, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(32, 21, 35, 0.08); }
.dark-face header { background: rgba(36, 15, 41, 0.95); border-bottom-color: rgba(246, 243, 247, 0.1); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.nav-links { display: flex; gap: var(--gap); }
.nav-links a { font-weight: 600; font-size: 0.95rem; padding: 0.5rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-brand); }
.dark-face .nav-links a:hover, .dark-face .nav-links a[aria-current="page"] { color: var(--color-accent); }

/* 页脚 */
footer { padding-block: var(--section-y); border-top: 1px solid currentColor; margin-top: var(--section-y); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--gap); }
.footer-col h4 { font-weight: 700; margin-bottom: var(--gap); font-size: 0.95rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { opacity: 0.85; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 0.75rem; height: 52px; padding: 0 24px; font-weight: 700; font-size: 1rem; cursor: pointer; border: none; transition: transform 0.2s, opacity 0.2s; }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); opacity: 0.92; }
.btn-secondary { background: transparent; border: 1px solid currentColor; color: currentColor; }
.dark-face .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn-secondary:hover { background: rgba(128,128,128,0.1); }

/* 卡片与面板 */
.card { background: rgba(128,128,128,0.06); border: var(--card-border); box-shadow: var(--card-shadow); padding: var(--gap); }
.panel { background: var(--color-dark); overflow: hidden; }
.dark-face .panel { background: rgba(246,243,247,0.04); }

/* 网格与排版辅助 */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: center; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }
.step-row { display: flex; gap: var(--gap); flex-wrap: wrap; }
.step-item { flex: 1 1 200px; counter-increment: step; position: relative; padding-left: 2.5rem; }
.step-item::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.75rem; height: 1.75rem; background: var(--color-accent); color: var(--color-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin-block: var(--gap); overflow-x: auto; }
th, td { padding: 12px var(--gap); text-align: left; border-bottom: 1px solid currentColor; }
th { font-weight: 700; }

/* FAQ */
details { border-bottom: 1px solid currentColor; padding: var(--gap) 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; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding-top: var(--gap); line-height: 1.6; }

/* 标签 */
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 4px 8px; background: rgba(128,128,128,0.15); margin-bottom: 0.5rem; }

/* SVG 响应式 */
.svg-responsive { width: 100%; height: auto; }

/* SVG 动效类 */
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 4s ease-in-out infinite alternate; }
.anim-float { animation: floatY 6s ease-in-out infinite; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-slideIn { animation: slideIn 5s ease-out infinite alternate; }
.anim-rotate { animation: rotateMatch 8s linear infinite; transform-box: fill-box; transform-origin: center; }

@keyframes drawLine { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes rotateMatch { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@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; }
}

/* 兜底：裁掉横向溢出 */
div.container {
  overflow-x: clip;
}
