:root {
  --bg0: #080a0c;
  --bg1: #101418;
  --ink: #e7edf2;
  --muted: #8b97a3;
  --line: rgba(231, 237, 242, 0.1);
  --accent: #d6b25e;
  --accent-ink: #1c1608;
  --good: #3dba7a;
  --warn: #e0a15a;
  --exit: #e07a7a;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html:not([data-ready]) body {
  visibility: hidden;
}

html[lang="zh-CN"] {
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "IBM Plex Sans", sans-serif;
}

html[lang="zh-CN"] .hero h1 {
  max-width: 11em;
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
}

html[lang="zh-CN"] .section h2,
html[lang="zh-CN"] .close h2 {
  max-width: 14em;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(214, 178, 94, 0.14), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(61, 186, 122, 0.06), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 42%, #090c0f);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.top,
main,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  z-index: 5;
}

.top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.15rem;
  margin-right: auto;
}

.nav a,
.foot a,
.icon-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.nav a:hover,
.foot a:hover,
.icon-link:hover {
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-menu {
  position: relative;
}

button.lang-menu-btn {
  appearance: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

button.lang-menu-btn:hover,
button.lang-menu-btn:focus,
button.lang-menu-btn:active,
.lang-menu.is-open .lang-menu-btn {
  background: transparent;
  color: var(--ink);
  border-color: rgba(214, 178, 94, 0.45);
  outline: none;
  box-shadow: none;
}

.lang-menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 128px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #141a1e;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-menu-pop[hidden] {
  display: none;
}

.lang-menu-pop button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lang-menu-pop button.on,
.lang-menu-pop button:hover {
  background: rgba(214, 178, 94, 0.16);
  color: var(--accent);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.icon-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.lang-menu-btn svg {
  fill: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 3rem;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.kicker {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.section h2,
.close h2 {
  margin: 0 0 0.9rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  max-width: 14ch;
}

.lede,
.section-head p,
.close p {
  margin: 0;
  color: var(--muted);
}

.lede {
  max-width: 38rem;
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.15rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cta-sm {
  padding: 0.48rem 0.85rem;
  font-size: 0.84rem;
}

.cta-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.cta:hover {
  transform: translateY(-1px);
  background: #e4c57a;
}

.cta-ghost:hover {
  background: rgba(231, 237, 242, 0.06);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.facts li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--good);
  transform: translateY(-1px);
}

.panel {
  padding: 1.1rem 1.15rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(231, 237, 242, 0.04), rgba(8, 10, 12, 0.4));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.panel-label,
.live {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.live {
  color: var(--good);
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows li {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.62rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.sym {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.state {
  justify-self: start;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.state-buy {
  color: var(--good);
  background: rgba(61, 186, 122, 0.12);
}

.state-wait {
  color: var(--muted);
  background: rgba(139, 151, 163, 0.12);
}

.state-warn {
  color: var(--warn);
  background: rgba(224, 161, 90, 0.12);
}

.state-exit {
  color: var(--exit);
  background: rgba(224, 122, 122, 0.12);
}

.note {
  color: var(--muted);
  font-size: 0.8rem;
}

.spark {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0.35rem;
}

.spark-line {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw-line 1.5s 0.2s ease forwards;
}

.spark-fill {
  fill: rgba(214, 178, 94, 0.12);
  opacity: 0;
  animation: fade-in 0.8s 1.1s ease forwards;
}

.section,
.close {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  border-top: 1px solid var(--line);
}

.section h2,
.close h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  max-width: 18ch;
}

.section-head p {
  max-width: 38rem;
  margin-top: -0.2rem;
}

.steps,
.grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
}

.steps {
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  padding: 0;
}

.steps li,
.card {
  padding: 1.1rem 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(231, 237, 242, 0.025);
}

.step-no {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.download-card .cta {
  margin-top: 1rem;
}

.steps h3,
.card h3,
.rule-split h3 {
  margin: 0.45rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.steps p,
.card p,
.rule-split li,
.disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.grid {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.rule-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.6rem;
}

.rule-split ul {
  margin: 0;
  padding-left: 1.1rem;
}

.rule-split li + li {
  margin-top: 0.45rem;
}

.close {
  display: grid;
  gap: 1.75rem;
}

.disclaimer {
  max-width: 46rem;
  font-size: 0.84rem;
  line-height: 1.55;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.15rem 1.5rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.foot-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hero-copy > * {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.65s ease forwards;
}

.hero-copy .kicker { animation-delay: 0.05s; }
.hero-copy h1 { animation-delay: 0.12s; }
.hero-copy .lede { animation-delay: 0.22s; }
.hero-copy .cta-row { animation-delay: 0.32s; }
.hero-copy .facts { animation-delay: 0.42s; }

.panel {
  animation: panel-in 0.8s ease both;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

@media (max-width: 980px) {
  .top {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-right: 0;
  }

  .hero,
  .steps,
  .grid-3,
  .rule-split {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .rows li {
    grid-template-columns: 2.6rem 1fr;
  }

  .note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-copy > *,
  .panel,
  .spark-line,
  .spark-fill {
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}
