:root {
  color-scheme: light;
  --xn-purple: #7658d8;
  --xn-purple-soft: #9d7cff;
  --xn-purple-bg: #f7f3ff;
  --xn-cyan: #4bc0dc;
  --xn-bg: #fbfaff;
  --xn-surface: #ffffff;
  --xn-surface-soft: #f6f2ff;
  --xn-text: #272331;
  --xn-muted: #6f6a7c;
  --xn-muted-light: #918aa3;
  --xn-border: rgba(104, 88, 145, 0.14);
  --xn-shadow: 0 22px 70px rgba(66, 48, 116, 0.1);
  --xn-ok: #168767;
  --xn-warn: #a56612;
  --font-sans: Inter, "HarmonyOS Sans SC", MiSans, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--xn-bg); }
body {
  margin: 0;
  color: var(--xn-text);
  background:
    radial-gradient(circle at 88% 2%, rgba(157, 124, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 4% 18%, rgba(75, 192, 220, 0.08), transparent 24rem),
    var(--xn-bg);
  font-family: var(--font-sans);
  line-height: 1.72;
}
a { color: #6546c4; text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--font-mono); }
code {
  padding: 0.14rem 0.38rem;
  border-radius: 0.42rem;
  color: #573ba8;
  background: #f0eaff;
  overflow-wrap: anywhere;
}

.page { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 72px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 44px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--xn-text); font-weight: 760; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; box-shadow: 0 10px 24px rgba(118, 88, 216, 0.2); }
.brand-name { font-size: 17px; }
.nav { display: flex; align-items: center; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.nav a { flex: 0 0 auto; padding: 8px 12px; border-radius: 10px; color: var(--xn-muted); font-size: 14px; font-weight: 620; }
.nav a:hover { color: var(--xn-purple); background: var(--xn-surface-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: #fff; background: var(--xn-purple); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 52px;
  border: 1px solid var(--xn-border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--xn-shadow);
}
.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 124, 255, 0.22), rgba(157, 124, 255, 0));
  pointer-events: none;
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--xn-purple); font-size: 13px; font-weight: 760; letter-spacing: 0.08em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--xn-cyan); box-shadow: 0 0 0 5px rgba(75, 192, 220, 0.12); }
h1, h2, h3 { letter-spacing: -0.025em; }
h1 { position: relative; z-index: 1; margin: 0; max-width: 820px; font-size: clamp(34px, 5vw, 56px); line-height: 1.08; font-weight: 720; }
.hero p { position: relative; z-index: 1; max-width: 760px; margin: 20px 0 0; color: var(--xn-muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 17px; border: 1px solid var(--xn-border); border-radius: 12px; color: var(--xn-text); background: #fff; font-weight: 680; }
.button:hover { text-decoration: none; border-color: rgba(118, 88, 216, 0.34); }
.button.primary { border-color: transparent; color: #fff; background: var(--xn-purple); box-shadow: 0 10px 24px rgba(118, 88, 216, 0.2); }

.section { margin-top: 56px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 27px; line-height: 1.2; font-weight: 690; }
.section-head p { margin: 0; max-width: 650px; color: var(--xn-muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 25px; border: 1px solid var(--xn-border); border-radius: 20px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 12px 38px rgba(66, 48, 116, 0.06); }
.card h2, .card h3 { margin: 0 0 9px; font-size: 19px; line-height: 1.35; }
.card p { margin: 0; color: var(--xn-muted); }
.card p + p, .card p + ul, .card p + ol { margin-top: 10px; }
.card ul, .card ol { margin: 0; padding-left: 20px; color: var(--xn-muted); }
.card li + li { margin-top: 6px; }
.tag { display: inline-flex; margin-bottom: 14px; padding: 4px 9px; border-radius: 999px; color: #5e41b6; background: #f1ebff; font-size: 12px; font-weight: 720; }

.steps { display: grid; gap: 14px; counter-reset: steps; }
.step { position: relative; min-height: 102px; padding: 24px 24px 24px 76px; border: 1px solid var(--xn-border); border-radius: 20px; background: #fff; }
.step::before { counter-increment: steps; content: counter(steps); position: absolute; left: 24px; top: 24px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--xn-purple); font-weight: 760; }
.step h2, .step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--xn-muted); }
.step p + p { margin-top: 9px; }
.code-block { overflow-x: auto; margin-top: 12px; padding: 16px 18px; border: 1px solid rgba(118, 88, 216, 0.14); border-radius: 14px; color: #49348d; background: #f7f3ff; font-family: var(--font-mono); font-size: 14px; white-space: pre; }
.note { margin-top: 18px; padding: 16px 18px; border: 1px solid rgba(118, 88, 216, 0.18); border-radius: 16px; color: #5c5270; background: #f7f3ff; }
.note strong { color: var(--xn-text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--xn-border); border-radius: 18px; background: #fff; }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--xn-border); text-align: left; vertical-align: top; }
th { color: var(--xn-text); background: #faf8ff; font-size: 13px; }
td { color: var(--xn-muted); }
tr:last-child td { border-bottom: 0; }
.status { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--xn-warn); box-shadow: 0 0 0 5px rgba(165, 102, 18, 0.09); }
.status[data-state="ok"] .status-dot { background: var(--xn-ok); box-shadow: 0 0 0 5px rgba(22, 135, 103, 0.1); }
.status[data-state="bad"] .status-dot { background: #bc3b4a; box-shadow: 0 0 0 5px rgba(188, 59, 74, 0.1); }
.status-detail { margin-top: 8px; color: var(--xn-muted-light); font-size: 13px; }
.small { color: var(--xn-muted-light); font-size: 13px; }

@media (max-width: 860px) {
  .page { width: min(100% - 28px, 1120px); padding-top: 18px; }
  .topbar { align-items: flex-start; flex-direction: column; margin-bottom: 26px; }
  .nav { width: 100%; flex-wrap: wrap; overflow-x: visible; }
  .hero { padding: 34px 24px; border-radius: 22px; }
  .hero p { font-size: 16px; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  .section { margin-top: 42px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .hero { padding: 30px 20px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .card { padding: 21px; border-radius: 17px; }
  .step { padding: 66px 20px 22px; }
  .step::before { left: 20px; top: 20px; }
}
