:root {
  --color-dark: #141838;
  --color-paper: #FCFCFD;
  --color-text: #151723;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.6em; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--color-text); }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; }
p { margin-bottom: 1em; max-width: 38em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* Layout */
.container { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gap); overflow-x: hidden; }
.section { padding-block: var(--section-y); position: relative; overflow-x: hidden; }
.section--dark { background-color: var(--color-dark); }
.section--paper { background-color: var(--color-paper); }
.section--light-alt { background-color: #F4F5F8; }
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Badge & Highlight */
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.5em; }
.paper .badge { color: var(--color-brand); }
.dark .badge { color: #FFFFFF; }
.hl { font-weight: 800; }
.paper .hl { color: var(--color-brand); }
.dark .hl { color: #FFFFFF; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0 1.25em; height: 48px; border-radius: var(--radius-btn);
  font-weight: 700; font-size: 1rem; cursor: pointer; border: none;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn--primary { background-color: var(--color-accent); color: var(--color-dark); }
.btn--primary:hover { transform: translateY(-2px); background-color: #5A9BD8; }
.btn--secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-text); }
.dark .btn--secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn--secondary:hover { transform: translateY(-2px); background-color: rgba(0,0,0,0.05); }
.dark .btn--secondary:hover { background-color: rgba(255,255,255,0.08); }
.btn svg { width: 20px; height: 20px; stroke-width: 2; }

/* Cards */
.card {
  background: var(--color-paper); border: var(--card-border);
  box-shadow: var(--card-shadow); border-radius: var(--radius-card);
  padding: 1.5rem; position: relative;
}
.dark .card { background: #1C204A; }
.section--light-alt .card { background: #FFFFFF; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 400px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); }
.dark th, .dark td { border-bottom-color: rgba(255,255,255,0.1); }
th { font-weight: 700; }
td:first-child { font-weight: 600; }

/* FAQ */
details { margin-bottom: 1rem; border-radius: var(--radius-card); border: var(--card-border); background: var(--color-paper); }
.dark details { background: #1C204A; }
.summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.summary::-webkit-details-marker { display: none; }
.summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; transition: transform 0.2s; }
details[open] .summary::after { transform: rotate(45deg); }
.summary p { margin: 0; }
details[open] > div { padding: 0 1.25rem 1rem; }

/* Header & Footer */
.header { position: sticky; top: 0; z-index: 100; background: rgba(252, 252, 253, 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(0,0,0,0.05); height: var(--header-h); }
.dark .header { background: rgba(20, 24, 56, 0.9); border-bottom-color: rgba(255,255,255,0.08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav { display: flex; gap: 1.5rem; }
.nav a { font-weight: 600; font-size: 0.95rem; padding: 0.5rem 0; position: relative; }
.nav a:hover { color: var(--color-brand); }
.dark .nav a:hover { color: var(--color-accent); }
.nav a[aria-current="page"] { color: var(--color-brand); }
.dark .nav a[aria-current="page"] { color: var(--color-accent); }
.footer { background: var(--color-dark); color: var(--color-paper); padding: 3rem 0; margin-top: auto; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--gap); }
.footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__links a { color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.footer__links a:hover { color: var(--color-accent); }

/* SVG Animation Base */
.svg-panel { width: 100%; height: auto; max-width: 100%; }
.anim-orbit { animation: orbit-breathe 6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.anim-float { animation: float-up 4.5s ease-in-out infinite; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 3s ease forwards; }
.anim-draw-delay { animation-delay: 0.8s; }
.anim-pulse { animation: pulse-opacity 3s ease-in-out infinite; }

@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.06); opacity: 0.7; }
}
@keyframes float-up {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(-6px); opacity: 1; }
}
@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@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-draw, .anim-pulse { animation: none !important; }
}

/* Magazine Layout for Deep Dive */
.magazine { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 800px) { .magazine { grid-template-columns: 1fr 240px; } }
.toc { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--color-brand); }
.dark .toc ul { border-left-color: var(--color-accent); }
.toc li { margin-bottom: 0.75rem; }
.toc a { display: block; padding-left: 0.75rem; font-size: 0.9rem; color: var(--color-text); opacity: 0.8; transition: opacity 0.2s; }
.dark .toc a { color: var(--color-paper); }
.toc a:hover { opacity: 1; color: var(--color-brand); }
.dark .toc a:hover { color: var(--color-accent); }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid rgba(0,0,0,0.1); }
.dark .timeline { border-left-color: rgba(255,255,255,0.15); }
.step { position: relative; margin-bottom: 2.5rem; }
.step:last-child { margin-bottom: 0; }
.step__num {
  position: absolute; left: -2.5rem; top: 0;
  width: 2rem; height: 2rem; border-radius: var(--radius-card);
  background: var(--color-accent); color: var(--color-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem;
}
.step__content h3 { margin-bottom: 0.3rem; }
.step__content p { margin-bottom: 0; opacity: 0.85; }

/* News Grid */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.news-card { display: flex; flex-direction: column; }
.news-card time { font-size: 0.8rem; opacity: 0.7; margin-bottom: 0.5rem; display: block; }
.news-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.news-card p { font-size: 0.95rem; opacity: 0.85; margin-bottom: 0; }

/* Hero specific */
.hero { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1fr; } }
.hero__text { max-width: 540px; }
.hero__visual { width: 100%; max-width: 560px; margin-inline: auto; }
.fact-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; font-size: 0.9rem; opacity: 0.8; }

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
