:root {
  --ink: #0b1515;
  --ink-2: #182524;
  --paper: #fbfcfa;
  --surface: #ffffff;
  --muted: #61706e;
  --line: #dce5e1;
  --soft: #eff5f2;
  --mint: #69e0bb;
  --mint-dark: #08735a;
  --cyan: #68d4dd;
  --warning: #c17024;
  --code: #101b1b;
  --sidebar-w: 272px;
  --topbar-h: 68px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 24px); }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink-2);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }
code, pre, kbd { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 8px 14px; background: var(--mint); color: var(--ink); border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgba(251, 252, 250, .88);
  border-bottom: 1px solid rgba(220, 229, 225, .9);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--ink); border-radius: 11px; box-shadow: 0 6px 18px rgba(11, 21, 21, .18); }
.brand-mark svg { width: 30px; height: 30px; fill: var(--mint); }
.brand-mark circle { fill: var(--ink); }
.brand > span:last-child { display: flex; align-items: baseline; gap: 8px; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand em { color: var(--muted); font-size: 13px; font-style: normal; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.search-trigger { width: 260px; height: 40px; display: flex; align-items: center; gap: 9px; color: #697674; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; cursor: pointer; box-shadow: 0 1px 2px rgba(11,21,21,.04); }
.search-trigger:hover { border-color: #aebdb8; }
.search-trigger svg, .search-input-wrap svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-trigger span { flex: 1; text-align: left; font-size: 14px; }
kbd { min-width: 25px; padding: 2px 6px; border: 1px solid #d7e0dd; border-bottom-width: 2px; background: #f6f8f7; border-radius: 5px; color: #75817f; font-size: 11px; text-align: center; }
.top-link { padding: 8px 10px; color: #334340; font-size: 14px; font-weight: 600; text-decoration: none; }
.top-link:hover { color: var(--mint-dark); }
.menu-button { display: none; width: 40px; height: 40px; padding: 10px; border: 0; background: transparent; cursor: pointer; }
.menu-button span { display: block; height: 2px; margin: 4px 0; background: var(--ink); border-radius: 2px; }

.page-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  z-index: 30;
  width: var(--sidebar-w);
  padding: 27px 22px 20px 30px;
  overflow-y: auto;
  background: #f5f8f6;
  border-right: 1px solid var(--line);
}
.nav-group { margin-bottom: 23px; }
.nav-group p { margin: 0 0 6px 11px; color: #8b9794; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-group a { display: block; padding: 6px 11px; margin: 2px 0; border-radius: 7px; color: #53615f; font-size: 13.5px; text-decoration: none; transition: .15s ease; }
.nav-group a:hover { color: var(--ink); background: #e9efec; }
.nav-group a.active { color: #075f4b; background: #ddf5ec; font-weight: 700; box-shadow: inset 3px 0 var(--mint-dark); }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 14px 10px 0; margin-top: 8px; color: #7b8885; font-size: 11px; border-top: 1px solid var(--line); }
.status-dot { width: 7px; height: 7px; background: #18a873; border-radius: 50%; box-shadow: 0 0 0 3px rgba(24,168,115,.12); }

.content { margin-left: var(--sidebar-w); display: grid; grid-template-columns: minmax(0, 820px) 150px; justify-content: center; gap: 70px; padding: calc(var(--topbar-h) + 58px) 64px 0; }
article { min-width: 0; }
.doc-section { padding-bottom: 92px; border-bottom: 1px solid var(--line); margin-bottom: 80px; }
.hero-section { position: relative; padding: 44px 0 86px; }
.hero-section::before { content: ""; position: absolute; width: 440px; height: 280px; right: -80px; top: -40px; z-index: -1; background: radial-gradient(circle, rgba(105,224,187,.20) 0, rgba(105,224,187,0) 68%); }
.eyebrow, .section-kicker { color: var(--mint-dark); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { max-width: 720px; margin: 15px 0 20px; color: var(--ink); font-size: clamp(42px, 5.1vw, 67px); line-height: 1.1; letter-spacing: -.055em; }
h2 { margin: 10px 0 17px; color: var(--ink); font-size: 34px; line-height: 1.23; letter-spacing: -.035em; }
h3 { margin: 34px 0 12px; color: var(--ink); font-size: 20px; letter-spacing: -.02em; }
p { margin: 0 0 18px; }
.lead { max-width: 690px; color: #566462; font-size: 19px; line-height: 1.75; }
.hero-actions { display: flex; gap: 11px; margin: 30px 0 43px; }
.button { display: inline-flex; align-items: center; gap: 24px; min-height: 46px; padding: 0 18px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 750; }
.button.primary { background: var(--ink); color: white; box-shadow: 0 8px 26px rgba(11,21,21,.15); }
.button.primary:hover { background: #1b2b2a; transform: translateY(-1px); }
.button.secondary { background: white; border: 1px solid var(--line); }
.button.secondary:hover { border-color: #aebdb8; }
.path-strip { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 19px; padding: 21px 23px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 35px rgba(22,43,40,.06); }
.path-strip div { display: grid; grid-template-columns: 30px 1fr; }
.path-strip span { grid-row: 1 / 3; color: #8aa09a; font-size: 11px; font-weight: 700; }
.path-strip strong { color: var(--ink); font-size: 13px; }
.path-strip small { color: var(--muted); font-size: 11px; }
.path-strip i { color: #91a09c; font-style: normal; }

.doc-section > p { max-width: 750px; color: #53615f; }
.doc-section code:not(pre code) { padding: 2px 6px; color: #075f4b; background: #e9f5f0; border: 1px solid #d2eae1; border-radius: 5px; font-size: .87em; overflow-wrap: anywhere; }
.steps { list-style: none; padding: 0; margin: 31px 0; counter-reset: none; }
.steps li { display: flex; gap: 16px; padding: 10px 0 15px; }
.steps li > span { flex: 0 0 31px; height: 31px; display: grid; place-items: center; color: #075f4b; background: #dff5ed; border: 1px solid #c5eadd; border-radius: 50%; font-size: 12px; font-weight: 800; }
.steps strong { color: var(--ink); font-size: 15px; }
.steps p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.code-panel, .tabs { margin: 26px 0; overflow: hidden; color: #d8e4e1; background: var(--code); border: 1px solid #293837; border-radius: var(--radius); box-shadow: 0 14px 32px rgba(10,22,21,.10); }
.code-panel.compact { margin: 20px 0; }
.code-head { height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px 0 18px; color: #8fa4a0; background: #142120; border-bottom: 1px solid #263633; font-size: 11px; }
.copy-button { padding: 5px 9px; color: #9cb0ac; background: transparent; border: 1px solid #354744; border-radius: 6px; font-size: 11px; cursor: pointer; }
.copy-button:hover { color: var(--mint); border-color: #527167; }
pre { margin: 0; padding: 20px 23px 23px; overflow: auto; line-height: 1.68; tab-size: 2; }
pre code { color: #d8e4e1; font-size: 12.5px; }
.callout { margin: 25px 0; padding: 17px 20px 17px 48px; border-radius: 10px; position: relative; }
.callout::before { position: absolute; left: 18px; top: 17px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 800; }
.callout strong { display: block; color: var(--ink); font-size: 14px; }
.callout p { margin: 3px 0 0; color: #52615e; font-size: 13px; }
.callout.success { background: #eaf8f2; border: 1px solid #ceeee2; }
.callout.success::before { content: "✓"; color: #07644d; background: #c5ebdd; }
.callout.info { background: #edf7f8; border: 1px solid #d4edef; }
.callout.info::before { content: "i"; color: #176069; background: #cfecef; }
.callout.warning { background: #fff6e9; border: 1px solid #f1dfc4; }
.callout.warning::before { content: "!"; color: #8b5018; background: #f3d8b5; }

.concept-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.concept-card { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.concept-icon { width: 30px; height: 30px; display: grid; place-items: center; color: #075f4b; background: #ddf5ec; border-radius: 8px; font-weight: 800; }
.concept-card h3 { margin: 15px 0 5px; font-size: 16px; }
.concept-card p { margin: 0; color: var(--muted); font-size: 13px; }
.flow-card { display: grid; grid-template-columns: 1fr auto 1.25fr auto 1fr; align-items: center; gap: 15px; margin: 28px 0; padding: 24px; background: var(--ink); border-radius: var(--radius); color: white; }
.flow-card div { display: flex; flex-direction: column; gap: 2px; }
.flow-card b { color: var(--mint); font-size: 13px; }
.flow-card span { color: #b5c6c2; font-size: 11px; line-height: 1.45; }
.flow-card i { color: #73958c; font-style: normal; }
.number-list { padding-left: 22px; color: #53615f; }
.number-list li { margin: 9px 0; padding-left: 5px; }

.table-wrap { margin: 25px 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: white; font-size: 13px; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e7ecea; vertical-align: top; }
th { color: #70807c; background: #f3f7f5; font-size: 11px; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td { color: #4f5e5b; }
.install-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 18px; margin: 22px 0; background: #eff6f3; border: 1px solid #dbe9e4; border-radius: 10px; }
.install-line code { padding: 0 !important; border: 0 !important; background: transparent !important; }
.install-line .copy-button { color: #50615d; border-color: #bfcdc8; }
.tabs .tab-list { display: flex; gap: 4px; padding: 8px 10px 0; overflow-x: auto; background: #142120; border-bottom: 1px solid #263633; }
.tab-list button { padding: 8px 11px; color: #8fa4a0; background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 11px; }
.tab-list button[aria-selected="true"] { color: var(--mint); border-color: var(--mint); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.small-note { font-size: 13px; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 28px 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 12px; }
.feature-list > div { display: flex; gap: 13px; padding: 20px; background: white; }
.feature-list > div > span { flex: 0 0 27px; height: 27px; display: grid; place-items: center; color: #08735a; background: #e4f6ef; border-radius: 7px; font-weight: 800; }
.feature-list strong { color: var(--ink); font-size: 14px; }
.feature-list p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.two-col > div { padding: 23px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.two-col h3 { margin: 0 0 8px; font-size: 16px; }
.two-col p { margin: 0; color: var(--muted); font-size: 13px; }

.endpoint-group { margin: 30px 0; }
.endpoint-group h3 { margin-bottom: 11px; font-size: 15px; }
.endpoint { min-height: 55px; display: grid; grid-template-columns: 64px minmax(220px, 1fr) 1.5fr; align-items: center; gap: 12px; padding: 8px 13px; background: white; border: 1px solid var(--line); border-bottom: 0; }
.endpoint:first-of-type { border-radius: 10px 10px 0 0; }
.endpoint:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.endpoint:only-of-type { border-bottom: 1px solid var(--line); border-radius: 10px; }
.endpoint p { margin: 0; color: #677572; font-size: 11.5px; }
.endpoint code { padding: 0 !important; color: #263532 !important; background: transparent !important; border: 0 !important; font-size: 12px !important; }
.method { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 23px; border-radius: 5px; font-size: 9px; font-weight: 900; letter-spacing: .04em; }
.method.get { color: #08666e; background: #dceff1; }
.method.post { color: #07604a; background: #d9f2e8; }
.method.patch { color: #7b5412; background: #f8ebcb; }
.method.delete { color: #8d3030; background: #f7dfdf; }
.download-card { display: flex; align-items: center; gap: 15px; padding: 17px 18px; margin-top: 30px; color: inherit; background: white; border: 1px solid var(--line); border-radius: 11px; text-decoration: none; }
.download-card:hover { border-color: #aebdb8; box-shadow: 0 8px 26px rgba(11,21,21,.06); }
.download-card > span { width: 43px; height: 43px; display: grid; place-items: center; color: #095c48; background: #dff5ed; border-radius: 8px; font-size: 10px; font-weight: 900; }
.download-card > div { flex: 1; }
.download-card strong { color: var(--ink); font-size: 14px; }
.download-card p { margin: 1px 0 0; color: var(--muted); font-size: 12px; }
.download-card > b { color: #71817d; }
.faq-list { margin-top: 27px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 2px; color: var(--ink); font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: #79908a; font-size: 20px; font-weight: 400; transition: transform .2s; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list details p { padding: 0 32px 20px 2px; margin: 0; color: var(--muted); font-size: 13px; }
.doc-footer { display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 0 52px; color: var(--muted); }
.doc-footer strong { color: var(--ink); font-size: 15px; }
.doc-footer p { margin: 2px 0 0; font-size: 12px; }
.doc-footer > div:last-child { display: flex; gap: 17px; }
.doc-footer a { font-size: 12px; text-decoration: none; }
.doc-footer a:hover { color: var(--mint-dark); }

.toc { position: sticky; top: calc(var(--topbar-h) + 45px); align-self: start; padding-left: 18px; border-left: 1px solid var(--line); }
.toc p { margin: 0 0 9px; color: #8a9794; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.toc a { display: block; padding: 4px 0; color: #7a8784; font-size: 11.5px; text-decoration: none; }
.toc a:hover { color: var(--mint-dark); }

.search-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: start center; padding-top: 12vh; background: rgba(7,16,15,.58); backdrop-filter: blur(5px); }
.search-modal[hidden] { display: none; }
.search-box { width: min(620px, calc(100vw - 32px)); overflow: hidden; background: white; border: 1px solid #cad6d2; border-radius: 14px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.search-input-wrap { height: 58px; display: flex; align-items: center; gap: 11px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); color: #6b7b78; }
.search-input-wrap input { flex: 1; height: 100%; color: var(--ink); background: transparent; border: 0; outline: 0; }
.search-results { max-height: 420px; overflow-y: auto; padding: 8px; }
.search-hint, .search-empty { padding: 24px; margin: 0; color: #8b9795; text-align: center; font-size: 13px; }
.search-result { display: block; padding: 12px 14px; border-radius: 8px; text-decoration: none; }
.search-result:hover, .search-result:focus { background: var(--soft); outline: none; }
.search-result strong { display: block; color: var(--ink); font-size: 14px; }
.search-result span { display: block; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.search-result mark { color: #064f3f; background: #c9f1e2; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; padding: 8px 14px; color: white; background: var(--ink); border-radius: 8px; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: .2s ease; font-size: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1120px) {
  .content { grid-template-columns: minmax(0, 800px); gap: 0; }
  .toc { display: none; }
}
@media (max-width: 820px) {
  :root { --topbar-h: 62px; }
  .topbar { padding: 0 17px; }
  .brand em, .top-link { display: none; }
  .search-trigger { width: 42px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .menu-button { display: block; }
  .sidebar { width: min(300px, 84vw); transform: translateX(-100%); transition: transform .22s ease; box-shadow: 18px 0 50px rgba(0,0,0,.12); }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; display: block; padding: calc(var(--topbar-h) + 36px) 24px 0; }
  .hero-section { padding-top: 28px; }
  h1 { font-size: 44px; }
  h2 { font-size: 29px; }
  .path-strip { grid-template-columns: 1fr; gap: 13px; }
  .path-strip i { display: none; }
}
@media (max-width: 580px) {
  .content { padding-left: 18px; padding-right: 18px; }
  .doc-section { padding-bottom: 68px; margin-bottom: 58px; }
  h1 { font-size: 38px; word-break: break-all; }
  .lead { font-size: 17px; overflow-wrap: anywhere; }
  .concept-grid, .feature-list, .two-col { grid-template-columns: 1fr; }
  .flow-card { grid-template-columns: 1fr; }
  .flow-card i { transform: rotate(90deg); justify-self: start; }
  .endpoint { grid-template-columns: 60px 1fr; }
  .endpoint p { grid-column: 1 / 3; padding-bottom: 5px; }
  .doc-footer { align-items: flex-start; flex-direction: column; gap: 20px; }
  pre { padding: 18px; }
  pre code { font-size: 11.5px; }
}

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