:root {
  --c-dark: #251943;
  --c-paper: #DBD4ED;
  --c-text: #191523;
  --c-brand: #5214EB;
  --c-accent: #ED6E89;
  --c-white: #F8F6FC;

  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;

  --font-main: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --lh-body: 1.55;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  background-color: var(--c-paper);
  color: var(--c-text);
  line-height: var(--lh-body);
  font-size: 16px;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Layout */
.container {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gap);
  padding-right: var(--gap);
}
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section.dark { background-color: var(--c-dark); color: var(--c-paper); }
.section.dark .hl { color: var(--c-accent); }
.section.paper { background-color: var(--c-paper); color: var(--c-text); }

/* Typography */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; line-height: 1.2; margin-bottom: 0.75rem; }
p { margin-bottom: var(--gap); max-width: 38em; }
.hl { font-weight: 800; }
.section.paper .hl { color: var(--c-brand); }
.section.dark .hl { color: var(--c-accent); }

/* Badge / Eyebrow */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section.paper .badge { color: var(--c-brand); }
.section.dark .badge { color: var(--c-accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border: none;
}
.btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background-color: var(--c-accent);
  color: var(--c-dark);
}
.btn-secondary {
  background: transparent;
  border: 1px solid currentColor;
}
.section.paper .btn-secondary { color: var(--c-text); border-color: var(--c-text); }
.section.dark .btn-secondary { color: var(--c-paper); border-color: var(--c-paper); }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Cards */
.card {
  background: var(--c-paper);
  border: 1px solid rgba(25, 21, 35, 0.12);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.section.dark .card { background: var(--c-paper); color: var(--c-text); }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }
.card-grid { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--gap) 0; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(25, 21, 35, 0.15); }
th { font-weight: 700; }
td:first-child { font-weight: 600; }
.section.dark table th, .section.dark table td { border-color: rgba(219, 212, 237, 0.2); color: var(--c-paper); }

/* FAQ */
.faq-item { margin-bottom: var(--gap); border-bottom: 1px solid rgba(25, 21, 35, 0.1); padding-bottom: var(--gap); }
.faq-item summary { cursor: pointer; font-weight: 700; list-style: none; position: relative; padding-left: 1.5rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; position: absolute; left: 0; color: var(--c-brand); font-weight: 800; }
.faq-item[open] summary::before { content: "-"; }
.faq-item p { margin-top: 0.75rem; }

/* Steps */
.steps { display: flex; flex-direction: column; gap: var(--gap); counter-reset: step; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 32px; height: 32px;
  background: var(--c-accent); color: var(--c-dark);
  font-weight: 800; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-btn);
}
.step p { margin: 0; }

/* News */
.news-grid { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .news-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.article-card { height: 100%; display: flex; flex-direction: column; }
.article-card time { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; opacity: 0.8; }
.article-card p { flex-grow: 1; }

/* Header & Footer */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(219, 212, 237, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.2rem; }
.logo img { width: 32px; height: 32px; }
.nav { display: none; gap: 1.5rem; }
@media (min-width: 768px) { .nav { display: flex; } }
.nav a { font-weight: 600; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--c-brand); }
.footer {
  background: var(--c-dark); color: var(--c-paper);
  padding: var(--section-y) 0;
}
.footer-grid { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .footer-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.footer-col h4 { margin-bottom: 0.75rem; color: var(--c-accent); }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom { margin-top: var(--gap); padding-top: var(--gap); border-top: 1px solid rgba(219, 212, 237, 0.15); text-align: center; font-size: 0.85rem; opacity: 0.8; }

/* SVG Animation Classes */
.anim-float-slow { animation: float-slow 6s ease-in-out infinite; }
.anim-float-fast { animation: float-fast 4s ease-in-out infinite; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 2.5s ease forwards; }
.anim-pulse { animation: pulse-dots 2s ease-in-out infinite; }
svg .anim-group { transform-box: fill-box; transform-origin: center; }

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes float-fast {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes draw-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes pulse-dots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@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;
  }
  .anim-float-slow, .anim-float-fast, .anim-draw, .anim-pulse { animation: none !important; }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
