:root {
  color-scheme: light;
  --bg: #f6f8f6;
  --surface: #ffffff;
  --surface-alt: #edf2ee;
  --ink: #142019;
  --muted: #647169;
  --line: #dce4de;
  --green: #0ba76b;
  --green-dark: #087a50;
  --green-soft: #e5f8ef;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --amber: #a85f00;
  --amber-soft: #fff5df;
  --charcoal: #101713;
  --code: #101a22;
  --code-ink: #dceaf0;
  --shadow: 0 14px 35px rgba(23, 46, 33, 0.08);
  --radius: 8px;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.7; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
code { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 68px;
  display: grid;
  grid-template-columns: 268px minmax(260px, 620px) 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  color: #f4fbf7;
  background: rgba(13, 23, 19, 0.97);
  border-bottom: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: var(--green); color: white; font-weight: 800; font-size: 13px; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-copy strong { font-size: 14px; }
.brand-copy small { margin-top: 3px; color: #91a198; font-size: 11px; }

.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap > svg { position: absolute; left: 13px; width: 17px; color: #8da198; }
.search-wrap input { width: 100%; height: 40px; padding: 0 42px 0 40px; color: #eef8f2; background: #1a2520; border: 1px solid #324039; border-radius: 7px; outline: none; }
.search-wrap input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(11,167,107,0.16); }
.search-wrap input::placeholder { color: #7f9188; }
.search-key { position: absolute; right: 12px; width: 22px; height: 22px; display: grid; place-items: center; color: #9aacA3; border: 1px solid #425249; border-radius: 5px; font-size: 12px; }
.search-results { position: absolute; top: 48px; left: 0; right: 0; max-height: 340px; overflow: auto; padding: 8px; background: #17211c; border: 1px solid #35443c; border-radius: 8px; box-shadow: 0 18px 45px rgba(0,0,0,0.28); }
.search-results a { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 6px; color: #dce9e1; font-size: 13px; }
.search-results a:hover { background: #223029; }
.search-results span { color: #789087; font-size: 11px; }
.search-empty { padding: 12px; color: #93a69c; font-size: 13px; }

.top-actions { justify-self: end; display: flex; align-items: center; gap: 20px; font-size: 13px; }
.top-actions > a:first-child { color: #b9c8c0; }
.primary-link { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--green); border-radius: 6px; font-weight: 650; }
.primary-link svg { width: 15px; }

.page-shell { display: grid; grid-template-columns: 268px minmax(0, 900px) 220px; gap: 44px; max-width: 1490px; margin: 0 auto; padding: 68px 28px 0; }
.sidebar { position: sticky; top: 68px; height: calc(100vh - 68px); padding: 24px 16px 18px 0; overflow-y: auto; border-right: 1px solid var(--line); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { margin: 17px 12px 6px; color: #98a69e; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.nav-label:first-child { margin-top: 0; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 11px; border-radius: 6px; color: #56655d; font-size: 13px; font-weight: 520; }
.sidebar-nav a svg { width: 16px; height: 16px; }
.sidebar-nav a:hover { color: var(--ink); background: #edf1ee; }
.sidebar-nav a.active { color: var(--green-dark); background: var(--green-soft); font-weight: 680; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin: 22px 11px 0; padding-top: 15px; border-top: 1px solid var(--line); color: #8b9991; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(11,167,107,0.12); }

.content { min-width: 0; padding: 54px 0 60px; }
.doc-section { margin-bottom: 82px; }
.doc-hero { padding: 34px 0 54px; border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--green-dark); font-size: 12px; font-weight: 750; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.doc-hero h1 { margin: 24px 0 16px; max-width: 760px; font-size: 48px; line-height: 1.12; letter-spacing: 0; }
.doc-hero h1 span { color: var(--green); }
.lead { max-width: 700px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.button svg { width: 16px; }
.button.primary { color: white; background: var(--green); }
.button.secondary { background: var(--surface); border: 1px solid var(--line); }
.button:hover, .primary-link:hover { transform: translateY(-1px); }
.service-facts { display: grid; grid-template-columns: 1fr 1.45fr 1fr; margin: 38px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.service-facts div { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--line); }
.service-facts div:last-child { border-right: 0; }
.service-facts dt { color: #8b9991; font-size: 11px; }
.service-facts dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 700; }

.section-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 26px; }
.section-number { flex: 0 0 38px; margin-top: 4px; color: var(--green); font: 700 11px/1.3 "Cascadia Code", monospace; }
.section-heading p { margin: 0 0 3px; color: var(--green-dark); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.section-heading h2 { margin: 0; font-size: 29px; line-height: 1.25; }
.doc-section > p { color: var(--muted); }
.doc-section h3 { margin: 25px 0 10px; font-size: 17px; }

.step-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.step-card { position: relative; min-height: 190px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step-card > svg { width: 22px; color: var(--green); }
.step-card h3 { margin: 18px 0 6px; font-size: 16px; }
.step-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.step-card a { display: inline-flex; align-items: center; gap: 6px; color: var(--green-dark); font-size: 12px; font-weight: 700; }
.step-card a svg { width: 14px; }
.step-index { position: absolute; right: 16px; top: 14px; color: #a9b4ae; font: 700 10px "Cascadia Code", monospace; }

.instruction-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.instruction-list li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 21px 22px; border-bottom: 1px solid var(--line); }
.instruction-list li:last-child { border-bottom: 0; }
.instruction-list li > span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--green-dark); background: var(--green-soft); border-radius: 50%; font: 700 11px "Cascadia Code", monospace; }
.instruction-list h3 { margin: 1px 0 5px; font-size: 15px; }
.instruction-list p { margin: 0; color: var(--muted); font-size: 13px; }
.instruction-list a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.instruction-list.compact li { padding-top: 17px; padding-bottom: 17px; }
.numbered-detail { margin-top: 18px; }

.notice { display: flex; gap: 12px; margin-top: 16px; padding: 15px 17px; border-radius: 7px; font-size: 13px; }
.notice > svg { flex: 0 0 18px; margin-top: 3px; }
.notice strong { display: block; margin-bottom: 2px; }
.notice p { margin: 0; color: inherit; opacity: 0.82; }
.notice.info { color: #174a8d; background: var(--blue-soft); border: 1px solid #cbdcff; }
.notice.warning { color: #70460b; background: var(--amber-soft); border: 1px solid #f2d59b; }

.workflow-band { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 16px; padding: 20px; color: #eef9f2; background: var(--charcoal); border-radius: var(--radius); }
.workflow-band > div { display: flex; flex-direction: column; min-width: 0; }
.workflow-band span { color: #51d39f; font: 700 10px "Cascadia Code", monospace; }
.workflow-band strong { margin: 5px 0 2px; font-size: 14px; }
.workflow-band small { color: #8fa198; font-size: 11px; }
.workflow-band > svg { width: 16px; color: #52635a; }

.field-demo { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px 18px; background: var(--charcoal); color: white; border-radius: var(--radius); }
.field-label { color: #91a198; font-size: 12px; }
.field-demo code { overflow: hidden; text-overflow: ellipsis; color: #b6ead5; }
.field-demo span { display: flex; align-items: center; gap: 7px; color: #91a198; font-size: 11px; }
.field-demo svg { width: 16px; color: #4bd39d; }

.download-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.download-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 17px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.download-item:hover { border-color: #9edabb; box-shadow: var(--shadow); }
.download-item > svg:first-child { width: 22px; color: var(--green); }
.download-item > svg:last-child { width: 15px; color: #97a59d; }
.download-item span { display: flex; flex-direction: column; }
.download-item strong { font-size: 14px; }
.download-item small { color: var(--muted); font-size: 11px; }

.config-table { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.config-table > div { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; min-height: 52px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.config-table > div:last-child { border-bottom: 0; }
.config-table span { color: var(--muted); font-size: 12px; }
.config-table code { overflow-wrap: anywhere; color: var(--green-dark); font-size: 12px; }

.copy-button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 5px; font-size: 11px; }
.copy-button svg { width: 13px; }
.config-table .copy-button { width: 30px; justify-content: center; padding: 0; color: #839188; border-color: var(--line); }

.endpoint-list { margin-bottom: 28px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.endpoint-list > div { display: grid; grid-template-columns: 58px 1.3fr 1fr; align-items: center; min-height: 54px; gap: 12px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.endpoint-list > div:last-child { border-bottom: 0; }
.endpoint-list code { font-size: 13px; font-weight: 650; }
.endpoint-list small { color: var(--muted); font-size: 11px; }
.method { display: inline-grid; place-items: center; width: 44px; height: 23px; border-radius: 4px; font: 800 9px "Cascadia Code", monospace; }
.method.get { color: #205dca; background: #e8f0ff; }
.method.post { color: #087a50; background: var(--green-soft); }

.code-block { margin: 14px 0 18px; overflow: hidden; color: var(--code-ink); background: var(--code); border: 1px solid #263844; border-radius: var(--radius); }
.code-head { display: flex; justify-content: space-between; align-items: center; min-height: 43px; padding: 0 13px; color: #8fa4af; background: #15232c; border-bottom: 1px solid #263844; font: 700 10px "Cascadia Code", monospace; }
.code-head .copy-button { color: #a8bbc4; border-color: #354a56; }
pre { margin: 0; padding: 18px; overflow-x: auto; }
pre code { color: #dceaf0; font-size: 12px; line-height: 1.75; white-space: pre; }
.muted { color: var(--muted); font-size: 12px; }

.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; justify-content: space-between; align-items: center; min-height: 60px; padding: 0 4px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 680; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary svg { width: 16px; color: #8e9b94; transition: transform 0.2s ease; }
.faq-list details[open] summary svg { transform: rotate(180deg); }
.faq-list details p { margin: -2px 0 18px; padding-right: 36px; color: var(--muted); font-size: 13px; }
.faq-list code { color: var(--green-dark); }

.security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.security-grid article { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.security-grid svg { width: 21px; color: var(--green); }
.security-grid h3 { margin: 15px 0 5px; font-size: 14px; }
.security-grid p { margin: 0; color: var(--muted); font-size: 12px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.qr-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.qr-title { display: flex; align-items: center; gap: 11px; }
.qr-title > svg { width: 21px; color: var(--green); }
.qr-title h3 { margin: 0; font-size: 14px; }
.qr-title p { margin: 1px 0 0; color: var(--muted); font-size: 11px; }
.qr-image { width: min(100%, 300px); aspect-ratio: 0.68; display: block; margin: 16px auto 12px; padding: 0; overflow: hidden; background: #f6f6f6; border: 0; border-radius: 7px; }
.qr-image img { width: 100%; height: 100%; display: block; object-fit: contain; }
.qr-card > span { display: block; color: var(--muted); text-align: center; font-size: 11px; }

.doc-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc-footer > div:first-child { display: flex; flex-direction: column; }
.doc-footer strong { font-size: 13px; }
.doc-footer span, .doc-footer a { color: var(--muted); font-size: 11px; }
.doc-footer > div:last-child { display: flex; gap: 18px; }

.right-rail { position: sticky; top: 68px; height: calc(100vh - 68px); padding-top: 58px; }
.toc-block { padding-left: 16px; border-left: 1px solid var(--line); }
.toc-block p { margin: 0 0 10px; color: #8b9991; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.toc-block a { display: block; padding: 5px 0; color: var(--muted); font-size: 11px; }
.toc-block a:hover { color: var(--green-dark); }
.support-mini { margin-top: 28px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.support-mini img { width: 100%; aspect-ratio: 0.67; object-fit: contain; border-radius: 5px; }
.support-mini strong, .support-mini span { display: block; text-align: center; }
.support-mini strong { margin-top: 7px; font-size: 12px; }
.support-mini span { color: var(--muted); font-size: 10px; }

.icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; color: inherit; background: transparent; border: 0; border-radius: 6px; }
.icon-button svg { width: 19px; }
.mobile-menu { display: none; }
.sidebar-backdrop { display: none; }
.back-top { position: fixed; right: 22px; bottom: 22px; z-index: 20; width: 40px; height: 40px; display: grid; place-items: center; color: white; background: var(--charcoal); border: 0; border-radius: 50%; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: 0.2s ease; }
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top svg { width: 17px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 100; padding: 8px 13px; color: white; background: var(--charcoal); border-radius: 6px; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: 0.2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.image-dialog { width: min(92vw, 520px); padding: 0; background: white; border: 0; border-radius: 8px; box-shadow: 0 25px 70px rgba(0,0,0,0.3); }
.image-dialog::backdrop { background: rgba(8,15,11,0.76); backdrop-filter: blur(4px); }
.image-dialog img { width: 100%; display: block; border-radius: 8px; }
.dialog-close { position: absolute; top: 8px; right: 8px; color: white; background: rgba(0,0,0,0.58); }

@media (max-width: 1180px) {
  .page-shell { grid-template-columns: 248px minmax(0, 1fr); gap: 34px; }
  .right-rail { display: none; }
  .topbar { grid-template-columns: 244px minmax(260px, 560px) 1fr; }
}

@media (max-width: 820px) {
  .topbar { grid-template-columns: auto 1fr auto; height: 62px; padding: 0 14px; gap: 10px; }
  .mobile-menu { display: grid; }
  .brand-copy small, .top-actions > a:first-child, .search-wrap { display: none; }
  .top-actions { gap: 0; }
  .primary-link { width: 38px; padding: 0; justify-content: center; font-size: 0; }
  .primary-link svg { width: 17px; }
  .page-shell { display: block; padding: 62px 18px 0; }
  .sidebar { position: fixed; z-index: 60; top: 62px; bottom: 0; left: 0; width: min(82vw, 300px); height: auto; padding: 20px 16px; background: var(--surface); transform: translateX(-105%); transition: transform 0.2s ease; box-shadow: 15px 0 40px rgba(0,0,0,0.12); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 55; inset: 62px 0 0; display: block; background: rgba(8,15,11,0.48); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .content { padding: 34px 0 50px; }
  .doc-hero { padding-top: 14px; }
  .doc-hero h1 { font-size: 36px; }
  .lead { font-size: 15px; }
  .service-facts { grid-template-columns: 1fr; }
  .service-facts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .service-facts div:last-child { border-bottom: 0; }
  .doc-section { margin-bottom: 62px; }
  .step-grid, .download-row, .security-grid, .contact-grid { grid-template-columns: 1fr; }
  .workflow-band { grid-template-columns: 1fr; }
  .workflow-band > svg { transform: rotate(90deg); justify-self: center; }
  .endpoint-list > div { grid-template-columns: 50px 1fr; padding: 12px 14px; }
  .endpoint-list small { grid-column: 2; }
  .field-demo { grid-template-columns: 1fr; }
  .config-table > div { grid-template-columns: 1fr auto; align-items: start; gap: 5px; padding: 12px 14px; }
  .config-table code { grid-column: 1; }
  .config-table .copy-button { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .doc-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .page-shell { padding-left: 14px; padding-right: 14px; }
  .doc-hero h1 { font-size: 31px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .section-heading { gap: 7px; }
  .section-number { flex-basis: 28px; }
  .section-heading h2 { font-size: 24px; }
  .instruction-list li { grid-template-columns: 30px 1fr; gap: 10px; padding: 17px 14px; }
  .step-card { min-height: 170px; }
  .qr-image { max-width: 280px; }
  pre { padding: 15px 13px; }
  pre code { font-size: 11px; }
}

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