:root {
  color-scheme: dark;
  --canvas: #070b13;
  --surface: #0d1522;
  --surface-strong: #111c2b;
  --line: rgba(160, 180, 214, 0.13);
  --line-strong: rgba(174, 195, 232, 0.22);
  --ink: #f4f7fc;
  --body: #a7b2c3;
  --muted: #78859a;
  --primary: #4b83f7;
  --primary-soft: rgba(75, 131, 247, 0.13);
  --green: #35c49a;
  --font: "Manrope", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 2%, rgba(24, 88, 146, 0.18), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(59, 77, 151, 0.12), transparent 36rem),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(120, 150, 190, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 190, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  color: inherit;
  font: inherit;
}

.legal-shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 19, 0.86);
  backdrop-filter: blur(18px);
}

.legal-header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.legal-brand img {
  width: 32px;
  height: 32px;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--body);
  font-size: 14px;
}

.legal-nav a {
  transition: color 160ms ease;
}

.legal-nav a:hover {
  color: var(--ink);
}

.language-switch {
  min-width: 64px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(16, 26, 42, 0.82);
  color: #c8d2e1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.legal-hero {
  padding: 94px 0 62px;
}

.legal-kicker {
  margin: 0 0 18px;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.legal-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.legal-meta::before {
  width: 28px;
  height: 1px;
  background: var(--primary);
  content: "";
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  padding-bottom: 112px;
}

.legal-toc {
  position: sticky;
  top: 108px;
  align-self: start;
  padding: 8px 0;
}

.legal-toc-label {
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.legal-toc a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
  transition: color 160ms ease, transform 160ms ease;
}

.legal-toc a:hover {
  color: var(--ink);
  transform: translateX(3px);
}

.legal-document {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(18, 30, 47, 0.94), rgba(9, 16, 27, 0.96));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.16);
}

.legal-section {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  padding: 38px 44px;
  border-bottom: 1px solid var(--line);
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-number {
  padding-top: 3px;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.legal-copy h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 23px;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.legal-copy h3 {
  margin: 24px 0 8px;
  color: #dce4f0;
  font-size: 15px;
}

.legal-copy p {
  margin: 0 0 14px;
  color: var(--body);
}

.legal-copy p:last-child {
  margin-bottom: 0;
}

.legal-copy ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.legal-copy li {
  position: relative;
  margin: 8px 0;
  padding-left: 18px;
  color: var(--body);
}

.legal-copy li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  content: "";
}

.legal-copy a {
  color: #7eabff;
  text-decoration: underline;
  text-decoration-color: rgba(126, 171, 255, 0.35);
  text-underline-offset: 3px;
}

.legal-note {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(75, 131, 247, 0.25);
  border-radius: 12px;
  background: var(--primary-soft);
  color: #cbd8ec;
}

.support-page .legal-hero {
  padding-bottom: 52px;
}

.support-grid-page {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 28px;
}

.support-panel {
  min-height: 340px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(18, 30, 47, 0.95), rgba(9, 16, 27, 0.97));
}

.support-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.support-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
}

.support-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.support-icon svg {
  width: 38px;
  height: 38px;
  color: #78a9ff;
}

.support-panel-index {
  color: var(--primary);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.support-panel h2 {
  margin: 0 0 10px;
  font-size: 23px;
  letter-spacing: -0.025em;
}

.support-panel p {
  min-height: 56px;
  margin: 0;
  color: var(--body);
  font-size: 14px;
}

.support-panel-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: #79a9ff;
  font-size: 14px;
  font-weight: 700;
}

.support-panel-action::after {
  content: "→";
}

.support-qr-page {
  width: 126px;
  height: 126px;
  margin: 22px 0 0;
  border-radius: 14px;
  object-fit: cover;
}

.support-faq {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 48px;
  margin: 12px 0 112px;
  padding: 46px 0 0;
  border-top: 1px solid var(--line);
}

.support-faq h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.support-faq-list {
  border-top: 1px solid var(--line);
}

.support-faq-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.support-faq-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.support-faq-item p {
  margin: 0;
  color: var(--body);
  font-size: 14px;
}

.support-faq-item a {
  color: #7eabff;
}

.legal-footer {
  border-top: 1px solid var(--line);
}

.legal-footer-inner {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}

.legal-footer-links {
  display: flex;
  gap: 22px;
}

[data-lang-block][hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .legal-shell {
    width: min(100% - 32px, 680px);
  }

  .legal-nav a {
    display: none;
  }

  .legal-hero {
    padding: 68px 0 46px;
  }

  .legal-layout {
    display: block;
    padding-bottom: 72px;
  }

  .legal-toc {
    display: none;
  }

  .legal-section {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 28px 24px;
  }

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

  .support-panel {
    min-height: 0;
  }

  .support-faq {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 72px;
  }

  .legal-footer-inner {
    min-height: 120px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .legal-hero h1 {
    font-size: 44px;
  }

  .legal-brand span {
    font-size: 18px;
  }

  .legal-section {
    border-radius: 0;
  }

  .legal-footer-links {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
