/* ==================== Design Tokens & Reset ==================== */
:root {
  --color-dark-bg: #13102D;
  --color-paper-bg: #F7F5F3;
  --color-body-text: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(23, 21, 35, 0.3);
  
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  
  --font-h1: clamp(2.4rem, 6vw, 4.5rem);
  --font-h2: clamp(1.6rem, 3vw, 2.4rem);
  --font-h3: clamp(1.2rem, 2vw, 1.5rem);
  --font-body: 1rem;
  --line-height-body: 1.65;
  
  --title-weight: 800;
  --title-ls: -0.02em;
  --title-lh: 1.1;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: var(--font-body);
  line-height: var(--line-height-body);
  color: var(--color-body-text);
  background-color: var(--color-paper-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 0; list-style: none; }
button, input, select, textarea { font: inherit; }

/* ==================== Layout & Containers ==================== */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
  overflow-x: hidden;
}

.section {
  padding-block: var(--section-y);
  position: relative;
  overflow-x: hidden;
}

.divider {
  border: none;
  border-top: 1px solid rgba(23, 21, 35, 0.1);
  margin-left: calc(var(--gap) * -1);
  margin-right: calc(var(--gap) * -1);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
  align-items: center;
}

.text-col { max-width: 38em; }

/* ==================== Theme Contexts ==================== */
.theme-paper { color: var(--color-body-text); }
.theme-paper a { color: var(--color-brand); }
.theme-paper a:hover { text-decoration: underline; }
.theme-paper .hl { color: var(--color-brand); }
.theme-paper .badge { color: var(--color-brand); }
.theme-paper .icon-svg { stroke: var(--color-brand); }

.theme-dark { color: var(--color-paper-bg); }
.theme-dark a { color: var(--color-accent); }
.theme-dark a:hover { text-decoration: underline; }
.theme-dark .hl { color: var(--color-accent); }
.theme-dark .badge { color: var(--color-accent); }
.theme-dark .icon-svg { stroke: var(--color-accent); }

.card-on-dark {
  background: var(--color-paper-bg);
  color: var(--color-body-text);
  border-radius: var(--radius-card);
  padding: var(--gap);
}
.card-on-dark a { color: var(--color-brand); }
.card-on-dark .hl { color: var(--color-brand); }
.card-on-dark .badge { color: var(--color-brand); }
.card-on-dark .icon-svg { stroke: var(--color-brand); }

/* ==================== Typography ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
}

h1, h2, h3 {
  font-weight: var(--title-weight);
  letter-spacing: var(--title-ls);
  line-height: var(--title-lh);
  margin: 0 0 16px 0;
}
h1 { font-size: var(--font-h1); }
h2 { font-size: var(--font-h2); }
h3 { font-size: var(--font-h3); }

p { margin: 0 0 16px 0; }
p:last-child { margin-bottom: 0; }

/* ==================== Components ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  border: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark-bg);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(137, 237, 110, 0.3);
}
.btn-secondary {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
}
.btn-secondary:hover {
  background: rgba(137, 237, 110, 0.1);
  transform: translateY(-1px);
}

.card {
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  padding: var(--gap);
  background: var(--color-paper-bg);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: 0 14px 32px -12px rgba(23, 21, 35, 0.35);
  transform: translateY(-2px);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  background: var(--color-paper-bg);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}
th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(23, 21, 35, 0.08);
}
th { font-weight: 700; background: rgba(23, 21, 35, 0.03); }
td strong { font-weight: 600; }

.faq-item {
  border-bottom: 1px solid rgba(23, 21, 35, 0.1);
}
.faq-item summary {
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 16px; color: rgba(23, 21, 35, 0.85); }

.step-list {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}
.step-item {
  counter-increment: step;
  position: relative;
  padding: 20px;
  border-radius: var(--radius-card);
  background: rgba(23, 21, 35, 0.03);
  border: 1px solid rgba(23, 21, 35, 0.06);
}
.step-item::before {
  content: "0" counter(step);
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-accent);
  background: var(--color-dark-bg);
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  border-radius: 10px;
  margin-bottom: 12px;
}

.scenario-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.scenario-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(39, 20, 235, 0.08);
  color: var(--color-brand);
  width: fit-content;
}
.theme-dark .scenario-tag { background: rgba(137, 237, 110, 0.15); color: var(--color-accent); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card time { font-size: 0.8rem; color: rgba(23, 21, 35, 0.6); margin-bottom: 8px; }
.theme-dark .news-card time { color: rgba(247, 245, 243, 0.6); }

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
}
svg { width: 100%; height: auto; }

/* ==================== SVG Animations ==================== */
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  50%, 100% { stroke-dashoffset: 0; }
}
.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 4s ease-in-out infinite;
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.anim-float { animation: floatSoft 5s ease-in-out infinite; }

@keyframes breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.anim-breathe { animation: breathe 3.5s ease-in-out infinite; }

@keyframes slideUp {
  0% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.anim-slide { animation: slideUp 0.6s ease-out both; }

.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* ==================== Header & Footer ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 243, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(23, 21, 35, 0.08);
  transition: box-shadow 0.2s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; }
.logo img { height: 28px; width: auto; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { font-size: 0.95rem; font-weight: 500; position: relative; }
.nav a:hover { color: var(--color-brand); }
.nav a[aria-current="page"] { color: var(--color-brand); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--color-brand);
  border-radius: 2px;
}
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; }

.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid rgba(23, 21, 35, 0.1);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
  margin-bottom: 32px;
}
.footer-col h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom { text-align: center; color: rgba(23, 21, 35, 0.5); font-size: 0.8rem; }

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .grid-2 { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .text-col { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .reduced-motion { animation: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* 兜底：裁掉横向溢出 */
main,
#top {
  overflow-x: clip;
}
