:root {
  --ink: #102033;
  --muted: #60758d;
  --soft: #eef7ff;
  --line: #d8e8f6;
  --brand: #2e8cff;
  --brand-strong: #0b61cf;
  --cyan: #20c5e8;
  --mint: #18b992;
  --paper: #ffffff;
  --shadow: 0 22px 64px rgba(30, 108, 190, .14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(180deg, #f8fcff 0%, #fff 42%, #f3f9ff 100%),
    linear-gradient(90deg, rgba(46, 140, 255, .04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(46, 140, 255, .04) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  letter-spacing: 0;
}

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

code {
  color: #0b61cf;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.doc-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(46, 140, 255, .12);
  background: rgba(248, 252, 255, .92);
  box-shadow: 0 10px 40px rgba(30, 108, 190, .08);
  backdrop-filter: blur(18px);
}

.doc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.doc-brand span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  font-weight: 900;
}

.doc-brand strong,
.doc-brand small {
  display: block;
}

.doc-brand strong {
  font-size: 17px;
}

.doc-brand small {
  color: var(--muted);
  font-size: 12px;
}

.doc-topnav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #26364a;
  font-weight: 800;
}

.doc-topnav a:hover {
  color: var(--brand-strong);
}

.doc-menu {
  display: none;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-strong);
  background: #fff;
  font: inherit;
  font-weight: 900;
}

.doc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .42fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: center;
  padding: 78px clamp(18px, 5vw, 64px) 58px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(6, 28, 64, .98), rgba(18, 112, 185, .9)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 86px);
}

.eyebrow,
.section-tag {
  color: #8fe7ff;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.doc-hero h1 {
  max-width: 860px;
  margin: 12px 0 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.12;
}

.doc-hero p {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(255,255,255,.78);
  font-size: 18px;
  line-height: 1.85;
}

.doc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.doc-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.82);
  font-weight: 800;
  font-size: 13px;
}

.doc-hero-card {
  padding: 26px;
  border: 1px solid rgba(190, 230, 255, .24);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}

.doc-hero-card strong {
  display: block;
  font-size: 20px;
}

.doc-hero-card ol {
  margin: 18px 0 0;
  padding-left: 20px;
  color: rgba(255,255,255,.76);
  line-height: 1.9;
}

.doc-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  width: min(1240px, calc(100% - 36px));
  margin: 34px auto 80px;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 16px 42px rgba(30, 108, 190, .08);
  backdrop-filter: blur(16px);
}

.sidebar-title {
  padding: 4px 10px 10px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 900;
}

.doc-sidebar a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: #2a4059;
  font-weight: 800;
}

.doc-sidebar a:hover,
.doc-sidebar a.is-active {
  color: var(--brand-strong);
  background: var(--soft);
}

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

.doc-card {
  scroll-margin-top: 104px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 50px rgba(30, 108, 190, .08);
}

.doc-card h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.18;
}

.doc-card h3 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.doc-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.spec-grid,
.steps,
.channel-grid,
.api-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

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

.spec-grid div,
.steps div,
.channel-grid div,
.api-list div,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fcff, #fff);
}

.spec-grid div {
  padding: 18px;
}

.spec-grid span,
.spec-grid strong,
.api-list span,
.api-list strong,
.api-list small {
  display: block;
}

.spec-grid span,
.api-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.spec-grid strong {
  margin-top: 8px;
  color: var(--brand-strong);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.doc-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

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

.steps div {
  padding: 20px;
}

.steps b {
  color: rgba(11, 97, 207, .22);
  font-size: 32px;
}

.steps strong,
.steps span {
  display: block;
}

.steps strong {
  margin-top: 10px;
  font-size: 18px;
}

.steps span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

pre {
  position: relative;
  margin: 22px 0 0;
  overflow: hidden;
  border: 1px solid rgba(46, 140, 255, .16);
  border-radius: 8px;
  background: #071b33;
}

pre code {
  display: block;
  overflow-x: auto;
  padding: 28px;
  color: #c6f6d5;
  font-size: 14px;
  line-height: 1.75;
}

.copy-doc {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(143, 231, 255, .34);
  border-radius: 8px;
  color: #dff8ff;
  background: rgba(143, 231, 255, .1);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.copy-doc.is-copied {
  background: rgba(143, 231, 255, .2);
}

.endpoint {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(46, 140, 255, .18);
  border-radius: 8px;
  background: var(--soft);
}

.endpoint span {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 900;
}

.endpoint strong {
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--brand-strong);
  background: var(--soft);
}

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

td {
  color: #2a4059;
  line-height: 1.6;
}

.notice {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 18px;
}

.notice strong {
  color: var(--brand-strong);
}

.notice span {
  color: var(--muted);
  line-height: 1.75;
}

.api-list div {
  padding: 18px;
}

.api-list strong {
  margin-top: 8px;
  color: var(--brand-strong);
  overflow-wrap: anywhere;
}

.api-list small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

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

.channel-grid div {
  padding: 18px;
}

.channel-grid strong,
.channel-grid span {
  display: block;
}

.channel-grid strong {
  color: var(--brand-strong);
}

.channel-grid span {
  margin-top: 8px;
  color: var(--muted);
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.doc-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  font-weight: 900;
}

@media (max-width: 980px) {
  .doc-topnav {
    display: none;
  }

  .doc-menu {
    display: inline-flex;
    align-items: center;
  }

  .doc-hero,
  .doc-shell {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    position: fixed;
    top: 78px;
    left: 18px;
    right: 18px;
    z-index: 28;
    display: none;
    max-height: calc(100vh - 100px);
    overflow: auto;
  }

  .doc-sidebar.is-open {
    display: grid;
  }

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

@media (max-width: 640px) {
  .doc-header {
    min-height: 70px;
    padding: 0 16px;
  }

  .doc-brand {
    min-width: 0;
  }

  .doc-brand small {
    display: none;
  }

  .doc-hero {
    padding: 52px 18px 42px;
  }

  .doc-hero h1 {
    font-size: 36px;
  }

  .doc-shell {
    width: calc(100% - 28px);
    margin-top: 22px;
  }

  .spec-grid,
  .steps,
  .channel-grid,
  .endpoint {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
