:root {
  --color-dark: #141838;
  --color-paper: #F7F5F3;
  --color-text: #151723;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;
  --color-border: rgba(21, 23, 35, 0.12);
  --surface-card-paper: #FFFFFF;
  --surface-card-dark: #1A1F4D;
  --radius-card: 8px;
  --radius-btn: 6px;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1280px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  --line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-paper);
  line-height: var(--line-height);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* Typography */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: 0.02em; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; margin-bottom: calc(var(--gap) * 0.75); }
p { margin-bottom: var(--gap); max-width: 38em; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: calc(var(--gap) * 0.5);
}
.text-brand { color: var(--color-brand); }
.text-accent { color: var(--color-accent); }
.text-paper { color: var(--color-paper); }
.hl { font-weight: 800; }

/* Layout Sections */
.section { padding-block: var(--section-y); position: relative; }
.section--dark { background-color: var(--color-dark); color: var(--color-paper); }
.section--paper { border-bottom: 1px solid var(--color-border); }
.section--paper:last-of-type { border-bottom: none; }

/* Components: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  border: none;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn--secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.section--dark .btn--secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

/* Components: Cards & Panels */
.card {
  background-color: var(--surface-card-paper);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
}
.section--dark .card { background-color: var(--surface-card-dark); }
.panel {
  background-color: var(--color-dark);
  border-radius: var(--radius-card);
  padding: var(--gap);
  overflow: hidden;
}

/* Components: Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 300px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { font-weight: 700; }
td[colspan] { text-align: center; }

/* Components: FAQ */
details {
  margin-bottom: var(--gap);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--gap);
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+";
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 4px;
  background: var(--color-border);
  font-size: 0.9rem;
}
details[open] summary::before { content: "-"; background: var(--color-brand); color: #fff; }
.faq-answer { margin-top: 8px; color: var(--color-text); }

/* Components: Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}
.step-item { counter-increment: step; min-width: 0; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  border-radius: 6px;
  margin-bottom: 8px;
}
.section--dark .step-num { background: var(--color-accent); color: var(--color-dark); }

/* Components: News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.news-card article {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.news-date { font-size: 0.85rem; color: var(--color-text); opacity: 0.7; margin-bottom: 4px; }
.section--dark .news-date { color: var(--color-paper); }

/* Components: Definition List */
.def-list dt { font-weight: 700; margin-bottom: 4px; }
.def-list dd { margin-left: 0; margin-bottom: var(--gap); color: var(--color-text); }
.section--dark .def-list dd { color: var(--color-paper); }

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
header.scrolled { border-bottom-color: var(--color-border); }
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; }
.logo img { height: 32px; width: auto; }
nav ul { display: flex; gap: 24px; }
nav a { font-weight: 500; position: relative; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); }
nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand);
}
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; }

/* Footer */
footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 48px 0;
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}
.footer-links a { display: block; padding: 4px 0; opacity: 0.8; }
.footer-links a:hover { opacity: 1; color: var(--color-accent); }
.copyright { margin-top: 32px; text-align: center; opacity: 0.6; font-size: 0.9rem; }

/* SVG Responsive & Animations */
.svg-responsive { width: 100%; height: auto; }
@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}
@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes slide-in {
  0% { transform: translateX(-10px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.svg-orbit { animation: orbit-breathe 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.svg-bubble { animation: float-gentle 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.svg-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 3s ease-in-out infinite alternate; }
.svg-panel { animation: slide-in 1.5s ease-out forwards; }

/* Responsive */
@media (max-width: 768px) {
  nav ul { display: none; }
  .mobile-menu-btn { display: block; }
  .hero-layout { flex-direction: column; }
  .magazine-layout { grid-template-columns: 1fr !important; }
  .steps-grid { grid-template-columns: 1fr; }
}

@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;
  }
  .svg-orbit, .svg-bubble, .svg-line, .svg-panel { animation: none !important; }
}

/* 兜底：裁掉横向溢出 */
div.container {
  overflow-x: clip;
}
