:root {
  --c-dark: #21163C;
  --c-paper: #F4F3F7;
  --c-text: #191523;
  --c-brand: #5214EB;
  --c-accent: #ED926E;
  --c-white: #FFFFFF;
  --c-border: rgba(25, 21, 35, 0.1);

  --r-card: 20px;
  --r-btn: 12px;
  --shadow-card: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  --sec-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --max-w: 1280px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Inter", system-ui, -apple-system, sans-serif;
}

.theme-dark {
  --bg: var(--c-dark);
  --txt: var(--c-paper);
  --txt-sub: rgba(244, 243, 247, 0.8);
  --brd: rgba(244, 243, 247, 0.15);
  --brand: var(--c-accent);
  --accent: var(--c-accent);
}
.theme-paper {
  --bg: var(--c-paper);
  --txt: var(--c-text);
  --txt-sub: rgba(25, 21, 35, 0.7);
  --brd: var(--c-border);
  --brand: var(--c-brand);
  --accent: var(--c-accent);
}
.theme-dark .card-light {
  --bg: var(--c-paper);
  --txt: var(--c-text);
  --txt-sub: rgba(25, 21, 35, 0.7);
  --brd: var(--c-border);
  --brand: var(--c-brand);
  --accent: var(--c-accent);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--txt);
  background: var(--bg);
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  color: var(--txt);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; max-width: 38em; }
.subtitle { font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.6; color: var(--txt-sub); margin-bottom: 2rem; }
.hl { color: var(--brand); font-weight: 600; }
.theme-dark .hl { color: var(--accent); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap); }
section { padding: var(--sec-y) 0; border-bottom: 1px solid var(--brd); }
section:last-child { border-bottom: none; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: center; }

header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--brd);
  padding: 1rem 0; transition: background 0.3s, border 0.3s;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--txt); }
.logo img { height: 32px; width: auto; object-fit: contain; }
nav ul { list-style: none; display: flex; gap: 1.5rem; }
nav a { color: var(--txt-sub); font-weight: 500; }
nav a[aria-current="page"], nav a:hover { color: var(--txt); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--r-btn);
  font-weight: 600; text-align: center; cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s;
  font-size: 1rem;
}
.btn-primary { background: var(--accent); color: var(--c-dark); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-secondary { border: 1px solid var(--txt); color: var(--txt); background: transparent; }
.theme-dark .btn-secondary { border-color: var(--txt); color: var(--c-dark); background: var(--txt); }

.card {
  background: var(--bg); border: 1px solid var(--brd); border-radius: var(--r-card);
  padding: 1.5rem; box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }

table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--brd); }
th { font-weight: 600; color: var(--txt); }

details { margin-bottom: 1rem; border: 1px solid var(--brd); border-radius: var(--r-card); overflow: hidden; }
summary {
  padding: 1rem 1.5rem; cursor: pointer; font-weight: 600; color: var(--txt);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; color: var(--brand); }
details[open] summary::after { content: "-"; }
details[open] summary { border-bottom: 1px solid var(--brd); }
details > div { padding: 1rem 1.5rem; color: var(--txt-sub); line-height: 1.7; }

.timeline { position: relative; padding-left: 2rem; border-left: 2px solid var(--brd); }
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.55rem; top: 0.5rem;
  width: 1rem; height: 1rem; background: var(--accent); border-radius: 50%; border: 3px solid var(--bg);
}
.time-tag { font-size: 0.85rem; font-weight: 700; color: var(--brand); margin-bottom: 0.25rem; letter-spacing: 0.05em; }
.theme-dark .time-tag { color: var(--accent); }

.steps-list { counter-reset: step; list-style: none; }
.steps-list li { position: relative; padding-left: 3rem; margin-bottom: 1.5rem; }
.steps-list li::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; left: 0; top: 0; width: 2rem; height: 2rem;
  background: var(--accent); color: var(--c-dark); font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center; border-radius: 6px;
}

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.news-card h4 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.news-date { font-size: 0.8rem; color: var(--txt-sub); margin-bottom: 0.75rem; display: block; }

.svg-panel { width: 100%; height: auto; max-width: 100%; }
.svg-panel svg { width: 100%; height: auto; }

.tag { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; color: var(--brand); margin-bottom: 0.5rem; }
.theme-dark .tag { color: var(--accent); }
.text-center { text-align: center; }
.mb-2 { margin-bottom: var(--gap); }

@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes drawLine { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes slideIn { 0% { opacity: 0; transform: translateX(-10px); } 100% { opacity: 1; transform: translateX(0); } }

.anim-twinkle { animation: twinkle 4s ease-in-out infinite; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 3s ease-in-out infinite alternate; }
.anim-float { animation: float 5s ease-in-out infinite; }
.anim-slide { animation: slideIn 0.8s ease-out forwards; }
.anim-float, .anim-draw g, .anim-draw path, .anim-draw rect { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .anim-twinkle, .anim-draw, .anim-float, .anim-slide { animation: none !important; }
}

footer { padding: 3rem 0; border-top: 1px solid var(--brd); margin-top: var(--sec-y); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--txt-sub); font-size: 0.9rem; }
.copyright { color: var(--txt-sub); font-size: 0.85rem; }

/* 兜底：裁掉横向溢出 */
div {
  overflow-x: clip;
}
