:root {
  --bg-dark: #141838;
  --bg-paper: #F7F5F3;
  --text-body: #151723;
  --brand: #142CEB;
  --accent: #6EAFED;
  --text-on-dark: #F7F5F3;
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --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; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg-paper);
  color: var(--text-body);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding: var(--section-y) 0; }

/* 面与卡片取色 */
.face-dark { background-color: var(--bg-dark); color: var(--text-on-dark); }
.face-dark a { color: var(--accent); }
.face-dark h1, .face-dark h2, .face-dark h3, .face-dark p, .face-dark li { color: var(--text-on-dark); }
.card-light { background-color: var(--bg-paper); color: var(--text-body); border-radius: var(--radius-card); border: var(--card-border); box-shadow: var(--card-shadow); padding: var(--gap); }
.face-dark .card-light { background-color: var(--bg-paper); color: var(--text-body); }

/* 排版 */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: 0.02em; line-height: 1.25; text-wrap: balance; }
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: 1.25rem; margin-top: calc(var(--gap) * 1.5); margin-bottom: var(--gap); }
p { margin-bottom: var(--gap); max-width: 38em; }
ul, ol { margin-left: 1.5rem; margin-bottom: var(--gap); }
li { margin-bottom: 0.5rem; }

.overline { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.5rem; color: var(--brand); }
.face-dark .overline { color: var(--accent); }
.hl { color: var(--brand); }
.face-dark .hl { color: var(--accent); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; height: 48px; padding: 0 1.5rem; border-radius: var(--radius-btn); font-weight: 600; font-size: 1rem; cursor: pointer; transition: transform .2s, filter .2s, background .2s, color .2s; border: none; }
.btn-primary { background-color: var(--accent); color: #0f172a; }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-secondary { background: transparent; border: 1px solid var(--text-body); color: var(--text-body); }
.face-dark .btn-secondary { border-color: var(--text-on-dark); color: var(--text-on-dark); }
.btn-secondary:hover { filter: brightness(0.9); transform: translateY(-2px); }

/* 导航与页脚 */
header { position: sticky; top: 0; z-index: 100; background: rgba(247, 245, 243, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(21, 23, 35, 0.08); padding: 0.75rem 0; }
.face-dark header { background: rgba(20, 24, 56, 0.95); border-color: rgba(247, 245, 243, 0.1); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.25rem; color: inherit; text-decoration: none; }
.logo img { height: 32px; width: auto; }
nav ul { display: flex; list-style: none; gap: 1.5rem; }
nav a { font-weight: 500; opacity: 0.85; }
nav a[aria-current="page"], nav a:hover { opacity: 1; color: var(--brand); }
.face-dark nav a { color: var(--text-on-dark); }
footer { padding: var(--section-y) 0; border-top: 1px solid rgba(21, 23, 35, 0.08); margin-top: var(--section-y); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }
.footer-col h4 { margin-bottom: 0.75rem; font-size: 1rem; }
.footer-col ul { list-style: none; margin-left: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.9rem; }
.copyright { text-align: center; margin-top: var(--gap); font-size: 0.85rem; opacity: 0.7; }

/* 网格与布局 */
.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); }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
@media (max-width: 768px) { .split-layout { grid-template-columns: 1fr; } }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: var(--gap) 0; min-width: 0; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid rgba(21, 23, 35, 0.1); word-break: break-word; white-space: normal; max-width: 100%; }
th { font-weight: 700; }
.face-dark table th, .face-dark table td { border-color: rgba(247, 245, 243, 0.15); }

/* FAQ */
details { margin-bottom: var(--gap); border: var(--card-border); border-radius: var(--radius-card); background: var(--bg-paper); box-shadow: var(--card-shadow); }
summary { padding: var(--gap); 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; }
details[open] summary::after { content: "−"; }
details > div { padding: 0 var(--gap) var(--gap); }

/* SVG 动效类 */
.svg-path-flow { animation: dashFlow 6s linear infinite; }
.svg-dot-flow { animation: dotMove 8s linear infinite; }
.svg-breathe { animation: breathe 4s ease-in-out infinite alternate; }
.svg-slide-in { animation: slideIn 5s ease-in-out infinite alternate; }

@keyframes dashFlow { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes dotMove { 0% { transform: translateX(0); opacity: 0.3; } 50% { transform: translateX(40px); opacity: 1; } 100% { transform: translateX(80px); opacity: 0.3; } }
@keyframes breathe { 0% { opacity: 0.5; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
@keyframes slideIn { 0%, 100% { transform: translateX(0); opacity: 1; } 50% { transform: translateX(12px); opacity: 0.85; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
