:root {
  --color-dark: #21163C;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  --line-h: 1.75;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-paper);
  line-height: var(--line-h);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Layout Containers */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--section-y) 0; border-bottom: 1px solid rgba(25, 21, 35, 0.08); }
.row { display: flex; gap: var(--gap); align-items: center; }
.row.reverse { flex-direction: row-reverse; }
@media (max-width: 768px) {
  .row, .row.reverse { flex-direction: column; }
}

/* Background & Text Contexts */
.bg-dark { background: var(--color-dark); }
.bg-dark .txt-title, .bg-dark .txt-body { color: var(--color-paper); }
.bg-dark .txt-accent { color: var(--color-accent); }
.bg-dark .txt-link { color: var(--color-accent); }
.bg-dark .subtitle { color: var(--color-accent); }
.bg-dark .timeline-item::before { background: var(--color-accent); }
.bg-dark .news-card time { color: var(--color-accent); }
.bg-dark table th, .bg-dark table td { border-color: rgba(244, 243, 247, 0.1); }
.bg-dark details { border-color: rgba(244, 243, 247, 0.15); }

.bg-paper .txt-title, .bg-paper .txt-body { color: var(--color-text); }
.bg-paper .txt-accent { color: var(--color-brand); }
.bg-paper .txt-link { color: var(--color-brand); }
.bg-paper .subtitle { color: var(--color-brand); }
.bg-paper .timeline-item::before { background: var(--color-brand); }
.bg-paper .news-card time { color: var(--color-brand); }
.bg-paper table th, .bg-paper table td { border-color: rgba(25, 21, 35, 0.1); }
.bg-paper details { border-color: rgba(25, 21, 35, 0.1); }

/* Typography */
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; margin-bottom: 1.25rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; max-width: 38em; }
.subtitle { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem; display: block; }
.hl { color: inherit; }
.bg-dark .hl { color: var(--color-accent); }
.bg-paper .hl { color: var(--color-brand); }

/* Header */
header { position: sticky; top: 0; z-index: 100; background: rgba(244, 243, 247, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(25,21,35,0.1); }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.logo span { font-weight: 700; font-size: 1.1rem; }
nav { display: flex; gap: 24px; }
nav a { font-size: 0.95rem; font-weight: 500; transition: opacity 0.2s; }
nav a:hover, nav a[aria-current="page"] { opacity: 0.7; }
@media (max-width: 600px) { nav { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 0 24px; height: 52px; font-size: 1rem; font-weight: 600; border-radius: var(--radius-btn); cursor: pointer; border: none; transition: transform 0.2s, background 0.2s, box-shadow 0.2s; }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(237, 146, 110, 0.4); }
.bg-dark .btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background: transparent; border: 1px solid var(--color-text); color: var(--color-text); }
.bg-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { transform: translateY(-2px); opacity: 0.85; }

/* Cards & Panels */
.card { background: var(--color-paper); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--card-shadow); border: var(--card-border); transition: transform 0.2s, box-shadow 0.2s; }
.bg-dark .card { background: rgba(244, 243, 247, 0.05); border: 1px solid rgba(244, 243, 247, 0.1); }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }
.panel { background: var(--color-dark); border-radius: var(--radius-card); padding: 24px; position: relative; overflow: hidden; aspect-ratio: 4/3; }
.bg-dark .panel { background: rgba(244, 243, 247, 0.08); }

/* Table */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { padding: 12px 16px; text-align: left; }
th { font-weight: 600; }

/* FAQ */
details { margin-bottom: 1rem; border-radius: var(--radius-card); overflow: hidden; }
summary { padding: 16px 20px; cursor: pointer; font-weight: 600; 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; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.faq-content { padding: 0 20px 16px; }

/* News Grid */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); margin-top: 1.5rem; }
.news-card { display: flex; flex-direction: column; }
.news-card time { font-size: 0.8rem; margin-bottom: 8px; display: block; }

/* Timeline */
.timeline { position: relative; padding-left: 24px; border-left: 2px solid rgba(25, 21, 35, 0.1); margin: 1.5rem 0; }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before { content: ""; position: absolute; left: -29px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-brand); }

/* SVG Base & Animation Rules */
.svg-anim { width: 100%; height: auto; }
svg .anim-el { transform-box: fill-box; transform-origin: center; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes twinkleStar {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes floatPanel {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes slideIn {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  50% { transform: translateX(4px); opacity: 1; }
}
.anim-draw { animation: drawLine 6s ease-in-out infinite; }
.anim-star { animation: twinkleStar 4s ease-in-out infinite; }
.anim-float { animation: floatPanel 5s ease-in-out infinite; }
.anim-slide { animation: slideIn 7s ease-in-out infinite; }
.anim-delay-1 { animation-delay: 1s; }
.anim-delay-2 { animation-delay: 2s; }

@media (prefers-reduced-motion: reduce) {
  .anim-draw, .anim-star, .anim-float, .anim-slide { animation: none !important; }
  html { scroll-behavior: auto; }
}
