:root {
  --color-dark: #10112D;
  --color-paper: #F5F0E5;
  --color-text: #151523;
  --color-brand: #1416EB;
  --color-accent: #89ED6E;
  --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;
}

.surface-dark {
  --bg: var(--color-dark);
  --fg: var(--color-paper);
  --fg-secondary: rgba(245, 240, 229, 0.7);
  --accent: var(--color-accent);
  --link: var(--color-accent);
  --border: rgba(245, 240, 229, 0.15);
}

.surface-paper {
  --bg: var(--color-paper);
  --fg: var(--color-text);
  --fg-secondary: rgba(21, 21, 35, 0.65);
  --accent: var(--color-brand);
  --link: var(--color-brand);
  --border: rgba(21, 21, 35, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

/* Typography */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--fg); text-wrap: balance; overflow-wrap: break-word; word-break: break-word; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.25rem; line-height: 1.25; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.75rem; line-height: 1.2; }
p { color: var(--fg-secondary); margin-bottom: 1rem; max-width: 38em; overflow-wrap: break-word; word-break: break-word; }
mark, .hl { color: var(--accent); font-weight: 700; }

/* Layout */
.container { max-width: var(--content-max); margin-inline: auto; padding-inline: 1.5rem; }
section { padding-block: var(--section-y); }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-list { display: flex; gap: 1.5rem; list-style: none; }
.nav-link { color: var(--fg); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--accent); }
.logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  margin-right: 0.5rem;
  flex-shrink: 0;
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0 1.5rem; height: 48px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
  border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(137, 237, 110, 0.4); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn-secondary:hover { background: var(--fg); color: var(--bg); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Cards & Panels */
.card {
  background: var(--bg); border: var(--card-border) solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--card-shadow);
  padding: 1.5rem; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px -12px rgba(0,0,0,0.35); }
.hero-panel {
  background: var(--color-dark); border-radius: var(--radius-card);
  padding: 1.5rem; position: relative; overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

/* FAQ */
.faq details { margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--fg); list-style: none;
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+"; color: var(--accent); font-weight: 700; font-size: 1.2rem;
  transition: transform 0.2s;
}
.faq details[open] summary::before { transform: rotate(45deg); }
.faq p { margin-top: 0.75rem; font-size: 0.95rem; }

/* Table */
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.spec-table th, .spec-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.spec-table th { color: var(--fg); font-weight: 600; }
.spec-table td { color: var(--fg-secondary); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }
.news-card { display: flex; flex-direction: column; justify-content: space-between; }
.news-meta { font-size: 0.85rem; color: var(--fg-secondary); margin-bottom: 0.5rem; }
.news-title { font-weight: 700; color: var(--fg); margin-bottom: 0.5rem; line-height: 1.3; }
.news-excerpt { font-size: 0.9rem; color: var(--fg-secondary); }

/* Badge/Marker */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--accent); margin-bottom: 0.75rem; text-transform: uppercase;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent);
  color: var(--color-dark); font-weight: 800; font-size: 0.9rem; margin-right: 0.75rem;
}

/* Footer */
.site-footer {
  padding: 3rem 0; border-top: 1px solid var(--border);
  background: var(--bg); color: var(--fg-secondary); font-size: 0.9rem;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-link { color: var(--fg-secondary); text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: var(--accent); }

/* SVG Responsive */
.svg-responsive { width: 100%; height: auto; display: block; }
.svg-ui { width: 100%; max-width: 480px; margin-inline: auto; }

/* Animations */
@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.06); opacity: 0.9; }
}
@keyframes float-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes dot-breathe {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}
@keyframes slide-enter {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes flow-line {
  to { stroke-dashoffset: 1; }
}

.anim-orbit { animation: orbit-breathe 6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.anim-float { animation: float-pulse 4.5s ease-in-out infinite alternate; }
.anim-dot-1 { animation: dot-breathe 2.4s ease-in-out infinite; }
.anim-dot-2 { animation: dot-breathe 2.4s ease-in-out infinite 0.8s; }
.anim-dot-3 { animation: dot-breathe 2.4s ease-in-out infinite 1.6s; }
.anim-slide { animation: slide-enter 5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite alternate; }
.anim-draw {
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: flow-line 8s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .anim-orbit, .anim-float, .anim-dot-1, .anim-dot-2, .anim-dot-3, .anim-slide, .anim-draw { animation: none !important; }
}

/* Focus & Accessibility */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
/* factory-contrast-width */
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    --fc: #151523 !important;
  }
}
@media (max-width: 1439px) {
  [data-fc-1440="ink"] {
    --fc: #f5f0e5 !important;
  }
}
