:root {
  color-scheme: light;
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #172033;
  --muted: #66758c;
  --faint: #8c9ab0;
  --line: #dce5f1;
  --line-strong: #c7d5e8;
  --blue: #2b84ff;
  --blue-strong: #146ef5;
  --violet: #9b5cff;
  --green: #24b47e;
  --shadow: 0 18px 48px rgba(33, 67, 118, 0.12);
  --shadow-soft: 0 12px 30px rgba(51, 86, 132, 0.08);
}

html.dark {
  color-scheme: dark;
  --bg: #0f141d;
  --surface: #151c28;
  --surface-soft: #101722;
  --text: #edf4ff;
  --muted: #aab8cc;
  --faint: #7f8da3;
  --line: rgba(142, 164, 193, 0.22);
  --line-strong: rgba(157, 181, 214, 0.32);
  --blue: #5fa2ff;
  --blue-strong: #7db4ff;
  --violet: #b57aff;
  --green: #38d394;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f3f7fd 0%, #f7faff 42%, #ffffff 100%),
    var(--bg);
  color: var(--text);
  font-family:
    "PingFang SC",
    "PingFang HK",
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

html.dark body {
  background:
    linear-gradient(180deg, #0d131d 0%, #0f1622 46%, #0b111a 100%),
    var(--bg);
}

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

button {
  font: inherit;
}

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

.page {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 9% 8%, rgba(43, 132, 255, 0.09), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(36, 180, 126, 0.08), transparent 30%);
}

html.dark .page {
  background:
    radial-gradient(circle at 12% 8%, rgba(43, 132, 255, 0.18), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(36, 180, 126, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(15, 22, 34, 0.96), rgba(10, 16, 25, 0.98));
}

.shell {
  width: min(calc(100% - 48px), 1344px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 8px;
  z-index: 40;
  padding: 0 8px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 64px;
  padding: 0 10px 0 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(210, 222, 238, 0.95);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(36, 67, 109, 0.1);
  backdrop-filter: blur(18px);
}

html.dark .header-inner {
  background: rgba(21, 28, 40, 0.82);
  border-color: rgba(142, 164, 193, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(43, 132, 255, 0.18);
}

.nav {
  display: flex;
  align-items: center;
  gap: 38px;
  margin-right: auto;
  color: #20304a;
  font-size: 15px;
  font-weight: 700;
}

html.dark .nav {
  color: var(--text);
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 64px;
  transition: color 160ms ease;
}

.nav a::after {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
  opacity: 0;
  transform: translateX(-50%) scaleX(0.6);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--blue-strong);
}

.nav a.active::after,
.nav a:hover::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-action-item,
.auth-area,
.user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.auth-area {
  gap: 10px;
}

.round-btn,
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: #20304a;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

html.dark .round-btn,
html.dark .auth-btn {
  background: rgba(21, 28, 40, 0.9);
  color: var(--text);
}

.round-btn,
button.auth-btn {
  cursor: pointer;
}

.round-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--blue);
}

.round-btn svg {
  width: 17px;
  height: 17px;
}

.auth-btn {
  min-width: 68px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.auth-btn.primary,
.page-btn.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, #2b84ff, #c64bff);
  box-shadow: 0 14px 30px rgba(82, 105, 255, 0.22);
}

.round-btn:hover,
.auth-btn:hover,
.page-btn:hover {
  transform: translateY(-1px);
  border-color: #b6c9e3;
  box-shadow: var(--shadow-soft);
}

.user-trigger {
  gap: 8px;
  max-width: 164px;
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  font-size: 12px;
  font-weight: 900;
}

.user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  opacity: 0.66;
}

.auth-area.is-logged-in [data-auth-guest],
.auth-area:not(.is-logged-in) [data-auth-user] {
  display: none;
}

.header-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 60;
  width: min(300px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease;
  backdrop-filter: blur(18px);
}

html.dark .header-popover {
  background: rgba(21, 28, 40, 0.96);
}

.header-action-item.is-open .header-popover,
.user-menu.is-open .header-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.popover-title {
  padding: 6px 8px 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.popover-body {
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border-radius: 8px;
  background: rgba(246, 250, 255, 0.86);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

html.dark .popover-body {
  background: rgba(16, 23, 34, 0.86);
}

.menu-list {
  display: grid;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover,
.menu-item.is-active {
  background: rgba(43, 132, 255, 0.1);
  color: var(--blue-strong);
}

.menu-check {
  width: 14px;
  height: 14px;
  opacity: 0;
}

.menu-item.is-active .menu-check {
  opacity: 1;
}

.menu-item-danger {
  color: #dc3b47;
}

.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.mobile-menu-btn svg {
  width: 18px;
  height: 18px;
}

.page-hero {
  position: relative;
  min-height: 430px;
  margin-top: -72px;
  padding: 150px 0 128px;
  background:
    linear-gradient(90deg, rgba(245, 248, 252, 0.94) 0%, rgba(245, 248, 252, 0.76) 38%, rgba(245, 248, 252, 0.2) 74%),
    linear-gradient(180deg, rgba(245, 248, 252, 0.1) 0%, rgba(245, 248, 252, 0.58) 70%, #f5f8fc 100%),
    url("/top-banner.png") center top / cover no-repeat;
}

html.dark .page-hero {
  background:
    linear-gradient(90deg, rgba(12, 18, 28, 0.94) 0%, rgba(12, 18, 28, 0.76) 42%, rgba(12, 18, 28, 0.24) 76%),
    linear-gradient(180deg, rgba(12, 18, 28, 0.1) 0%, rgba(12, 18, 28, 0.58) 70%, #0f141d 100%),
    url("/top-banner.png") center top / cover no-repeat;
}

.page-hero::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 118px;
  background: linear-gradient(180deg, rgba(245, 248, 252, 0), var(--bg));
  content: "";
  pointer-events: none;
}

html.dark .page-hero::after {
  background: linear-gradient(180deg, rgba(15, 20, 29, 0), var(--bg));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(43, 132, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

html.dark .kicker {
  background: rgba(21, 28, 40, 0.72);
}

.page-hero h1 {
  margin: 22px 0 0;
  max-width: 780px;
  color: var(--text);
  font-size: clamp(42px, 5.2vw, 72px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.page-hero p {
  margin: 24px 0 0;
  max-width: 740px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 152px;
  height: 46px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #20304a;
  font-size: 15px;
  font-weight: 900;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

html.dark .page-btn {
  background: rgba(21, 28, 40, 0.9);
  color: var(--text);
}

.section {
  position: relative;
  z-index: 2;
  padding: 56px 0 76px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.doc-aside {
  position: sticky;
  top: 92px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

html.dark .doc-aside {
  background: rgba(21, 28, 40, 0.88);
}

.doc-aside-title {
  padding: 18px 20px 12px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 900;
}

.doc-aside a {
  display: block;
  padding: 13px 20px;
  border-top: 1px solid rgba(113, 137, 176, 0.14);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.doc-aside a:hover {
  color: var(--blue-strong);
  background: rgba(43, 132, 255, 0.08);
}

.doc-content {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.doc-block,
.release-card,
.qr-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

html.dark .doc-block,
html.dark .release-card,
html.dark .qr-card,
html.dark .info-card {
  background: rgba(21, 28, 40, 0.9);
}

.doc-block {
  padding: 34px;
}

.doc-block h2,
.release-card h2,
.qr-card h2,
.info-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 27px;
  font-weight: 900;
  line-height: 1.34;
}

.doc-block h3 {
  margin: 26px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.doc-block p,
.release-card p,
.qr-card p,
.info-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.doc-list,
.release-card ul,
.soft-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.doc-list li,
.release-card li,
.soft-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.78;
}

.doc-list li::before,
.release-card li::before,
.soft-list li::before {
  position: absolute;
  left: 0;
  top: 0.12em;
  color: var(--blue);
  content: "✓";
  font-weight: 900;
}

.doc-grid,
.step-grid,
.feature-grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

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

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

.doc-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.88));
}

html.dark .doc-card {
  background: linear-gradient(180deg, rgba(20, 29, 42, 0.9), rgba(14, 21, 32, 0.9));
}

.doc-card strong {
  display: block;
  color: var(--blue-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.doc-card h3 {
  margin: 8px 0 0;
}

.doc-table {
  width: 100%;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  border-spacing: 0;
  font-size: 15px;
}

.doc-table th,
.doc-table td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(113, 137, 176, 0.14);
  color: var(--muted);
  line-height: 1.72;
  text-align: left;
  vertical-align: top;
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table th {
  color: var(--text);
  background: rgba(43, 132, 255, 0.08);
  font-weight: 900;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.release-list {
  display: grid;
  gap: 20px;
}

.release-card {
  padding: 32px;
}

.release-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.release-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #2b84ff, #9b5cff);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.qr-card {
  position: sticky;
  top: 92px;
  padding: 28px;
  text-align: center;
}

.qr-card img {
  width: 224px;
  margin: 20px auto 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(39, 72, 116, 0.11);
}

.qr-note {
  margin-top: 14px;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.7;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.info-card {
  padding: 24px;
}

.info-card h2 {
  font-size: 22px;
}

.site-footer {
  padding: 34px 0 44px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 70;
  padding: 12px 16px;
  border: 1px solid #bcd5ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

html.dark .toast {
  background: rgba(21, 28, 40, 0.96);
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1120px) {
  .nav {
    gap: 24px;
  }

  .feature-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(calc(100% - 32px), 1344px);
  }

  .header-inner {
    gap: 14px;
  }

  .nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

  html.dark .nav {
    background: rgba(21, 28, 40, 0.96);
  }

  .page.is-menu-open .nav {
    display: flex;
  }

  .nav a {
    height: 44px;
    padding: 0 12px;
  }

  .nav a::after {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .auth-area {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .page-hero {
    min-height: 390px;
    padding: 132px 0 108px;
  }

  .page-hero h1 {
    font-size: 42px;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .doc-layout,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .doc-aside,
  .qr-card {
    position: static;
  }

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

@media (max-width: 620px) {
  .page-hero {
    min-height: 420px;
    padding: 126px 0 96px;
  }

  .page-hero h1 {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: clamp(28px, 8.7vw, 34px);
    line-height: 1.14;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .page-hero p {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.78;
  }

  .brand span {
    display: none;
  }

  .header-action-item.icon-action-item:nth-child(3) {
    display: none;
  }

  .doc-block,
  .release-card,
  .qr-card {
    padding: 24px;
  }

  .doc-table {
    display: block;
    overflow-x: auto;
  }
}
