:root {
  /* 基础色板 */
  --color-dark: #10112D;
  --color-paper: #F5F0E5;
  --color-text: #151523;
  --color-brand: #1416EB;
  --color-accent: #89ED6E;
  --color-white: #FFFFFF;

  /* 结构性 Token */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(21, 21, 35, 0.3);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;

  /* 排版 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-body: 1.75;
}

/* 上下文取色变量 */
.bg-paper {
  --text-color: var(--color-text);
  --link-color: var(--color-brand);
  --accent-color: var(--color-brand);
  --eyebrow-color: var(--color-brand);
  background-color: var(--color-paper);
  color: var(--text-color);
}
.bg-dark {
  --text-color: var(--color-paper);
  --link-color: var(--color-accent);
  --accent-color: var(--color-accent);
  --eyebrow-color: var(--color-accent);
  background-color: var(--color-dark);
  color: var(--text-color);
}
/* 深色面上的浅色卡片恢复纸面取色 */
.bg-dark .card-light {
  --text-color: var(--color-text);
  --link-color: var(--color-brand);
  --accent-color: var(--color-brand);
  --eyebrow-color: var(--color-brand);
  background-color: var(--color-paper);
  color: var(--text-color);
}

/* 重置与基础 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--text-color);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link-color); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
ul, ol { list-style: none; }

/* 布局系统 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.paper-section { border-bottom: 1px solid rgba(21, 21, 35, 0.08); }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.flex-row { display: flex; gap: var(--gap); align-items: center; flex-wrap: wrap; }
.flex-col { display: flex; flex-direction: column; gap: var(--gap); }
.text-center { text-align: center; }
.min-w-0 { min-width: 0; }

/* 排版层级 */
h1, h2, h3 { font-weight: 700; letter-spacing: 0.02em; line-height: 1.2; color: var(--text-color); }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.8rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--eyebrow-color); margin-bottom: 0.5rem; display: block;
}
.hl { color: var(--accent-color); }
p { max-width: 38em; margin-bottom: 1.2rem; }

/* 组件：按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; height: 52px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  border: none; outline: none; min-width: 0;
}
.btn-primary { background-color: var(--accent-color); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(137, 237, 110, 0.35); }
.btn-secondary { background: transparent; border: 1px solid var(--text-color); color: var(--text-color); }
.btn-secondary:hover { background: rgba(137, 237, 110, 0.08); }
.btn:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 2px; }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* 组件：卡片 */
.card {
  background: var(--color-paper); border-radius: var(--radius-card);
  box-shadow: var(--card-shadow); border: var(--card-border);
  padding: 1.5rem; transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px -12px rgba(21, 21, 35, 0.35); }

/* 组件：表格 */
table { width: 100%; min-width: 0; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(21, 21, 35, 0.1); text-align: left; word-break: break-word; overflow-wrap: break-word; }
th { font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* 组件：FAQ */
details { border: 1px solid rgba(21, 21, 35, 0.1); border-radius: var(--radius-card); margin-bottom: 1rem; overflow: hidden; }
summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 1.25rem; font-weight: 400; }
details[open] summary::after { content: '−'; }
details > div { padding: 0 1.25rem 1.25rem; }

/* 组件：标签 */
.tag { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; margin-right: 0.5rem; margin-bottom: 0.5rem; }
.tag-problem { background: rgba(20, 22, 235, 0.1); color: var(--color-brand); }
.tag-action { background: rgba(137, 237, 110, 0.2); color: var(--color-dark); }
.tag-result { background: rgba(21, 21, 35, 0.05); color: var(--color-text); }

/* 导航与页脚 */
header { position: sticky; top: 0; z-index: 100; background: rgba(245, 240, 229, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(21, 21, 35, 0.08); }
header .container { display: flex; justify-content: space-between; align-items: center; height: 64px; }
nav a { margin-left: 1.5rem; font-weight: 500; }
nav a[aria-current="page"] { color: var(--accent-color); font-weight: 700; }
footer { background: var(--color-dark); color: var(--color-paper); padding: var(--section-y) 0; text-align: center; }
footer a { color: var(--color-accent); }

/* SVG 容器与动效 */
.svg-panel { width: 100%; max-width: 640px; margin: 0 auto; }
.svg-panel svg { width: 100%; height: auto; }
.anim-svg { transform-box: fill-box; transform-origin: center; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes dash-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse-ring { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.15); opacity: 0.2; } }

.cls-float { animation: float 5s ease-in-out infinite; }
.cls-breathe { animation: breathe 3.5s ease-in-out infinite; }
.cls-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dash-line 4s ease-out forwards; }
.cls-spin { animation: spin-slow 18s linear infinite; }
.cls-pulse { animation: pulse-ring 4s ease-in-out infinite; }

@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; }
}
