:root {
  color-scheme: light;
  --bg: #f7f7f7;
  --panel: #ffffff;
  --panel-soft: #f1f1f1;
  --ink: #111111;
  --muted: #5f5f5f;
  --line: #dedede;
  --line-strong: #bdbdbd;
  --blue: #111111;
  --green: #111111;
  --orange: #333333;
  --red: #111111;
  --code-bg: #f2f2f2;
  --sidebar: #050505;
  --sidebar-line: rgba(255, 255, 255, 0.16);
  --sidebar-muted: #c7c7c7;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.08);
  --sidebar-width: 284px;
  --sidebar-collapsed: 78px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

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

button,
input {
  font: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

code {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--code-bg);
  padding: 0.08rem 0.34rem;
  font-size: 0.9em;
  word-break: break-word;
}

code.nowrap-code {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  vertical-align: bottom;
  white-space: nowrap;
  word-break: normal;
}

pre {
  margin: 16px 0 0;
  border: 1px solid #111111;
  border-radius: 8px;
  background: #111111;
  color: #f5f5f5;
  overflow-x: auto;
  padding: 18px;
  line-height: 1.55;
}

pre code {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  white-space: pre;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  border-right: 1px solid var(--sidebar-line);
  background: var(--sidebar);
  color: #ffffff;
  padding: 20px 16px;
  transition: width 180ms ease, transform 180ms ease;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
}

.brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #050505;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  font-size: 17px;
  line-height: 1.2;
}

.brand small {
  color: var(--sidebar-muted);
  font-size: 12px;
  line-height: 1.35;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.sidebar .icon-btn {
  border-color: var(--sidebar-line);
  background: #050505;
  color: #fff;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: var(--blue);
  outline: 0;
}

.doc-nav {
  display: grid;
  gap: 20px;
  margin-top: 28px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  padding-right: 4px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-title {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.doc-nav a {
  border-radius: 7px;
  color: var(--sidebar-muted);
  padding: 8px 10px;
}

.doc-nav a:hover,
.doc-nav a:focus-visible,
.doc-nav a.active {
  background: #ffffff;
  color: #050505;
  outline: 0;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
}

body.sidebar-collapsed .brand {
  grid-template-columns: 42px;
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .doc-nav {
  display: none;
}

body.sidebar-collapsed .sidebar-head {
  display: grid;
  justify-items: center;
}

.mobile-header {
  display: none;
}

main {
  margin-left: var(--sidebar-width);
  transition: margin-left 180ms ease;
}

body.sidebar-collapsed main {
  margin-left: var(--sidebar-collapsed);
}

.doc-section {
  border-bottom: 1px solid var(--line);
  padding: 52px clamp(22px, 4vw, 64px);
  scroll-margin-top: 20px;
}

.hero {
  background: #ffffff;
  padding-top: 36px;
  padding-bottom: 36px;
}

.hero-grid,
.section-head,
.info-grid,
.model-layout,
.faq-list,
.endpoint,
.table-wrap {
  max-width: 1180px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 42px;
  align-items: start;
}

.hero-single {
  grid-template-columns: minmax(0, 880px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
}

.lead {
  max-width: 840px;
  color: var(--muted);
  font-size: 17px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.copy-btn,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.2;
  padding: 6px 12px;
  white-space: nowrap;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.2;
  padding: 5px 10px;
  white-space: nowrap;
}

.copy-btn:hover,
.copy-btn:focus-visible,
.button-link:hover,
.button-link:focus-visible,
.pill-link:hover,
.pill-link:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: 0;
}

.button-link.muted {
  color: var(--muted);
}

.text-link {
  color: var(--blue);
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head > p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

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

.info-card,
.panel,
.endpoint {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.info-card {
  height: 100%;
}

.info-card p,
.panel p,
.endpoint p {
  margin-bottom: 0;
  color: var(--muted);
}

.search-box {
  display: grid;
  gap: 6px;
  width: min(360px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
}

.search-box input:focus {
  border-color: var(--blue);
  outline: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.table-wrap.inline-table {
  margin: 0 0 16px;
}

.business-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  max-width: 1180px;
  align-items: stretch;
}

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

.qr-panel,
.policy-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.qr-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.qr-open {
  width: fit-content;
}

.qr-panel p,
.policy-panel p {
  color: var(--muted);
}

.policy-panel {
  max-width: 1180px;
}

.policy-panel p:last-child {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}

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

th {
  background: var(--panel-soft);
  color: #333333;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

td {
  color: #222222;
}

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

.model-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin-bottom: 20px;
}

.model-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.model-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.notice {
  max-width: 1180px;
  margin: 0 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f7f7f7;
  color: var(--ink);
  padding: 14px 16px;
}

.notice.strong {
  border-color: #111111;
  background: #f3f3f3;
  color: #111111;
}

.endpoint {
  margin-bottom: 28px;
}

.endpoint:last-child {
  margin-bottom: 0;
}

.endpoint-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.method {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
}

.method.get {
  background: #111111;
}

.method.post {
  background: #111111;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0;
}

summary {
  cursor: pointer;
  font-weight: 800;
  padding: 15px 18px;
}

details p {
  margin: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 14px 18px 16px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  border-radius: 7px;
  background: #111111;
  color: #fff;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.56);
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  font-size: 20px;
}

.modal-qr {
  display: block;
  width: min(320px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
}

@media (max-width: 1040px) {
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-grid,
  .model-layout,
  .business-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .sidebar {
    transform: translateX(-100%);
    width: min(84vw, 320px);
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-collapsed .sidebar {
    width: min(84vw, 320px);
  }

  body.sidebar-collapsed .brand {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  body.sidebar-collapsed .brand-text,
  body.sidebar-collapsed .doc-nav {
    display: grid;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    padding: 12px 18px;
  }

  .mobile-header .brand small {
    color: var(--muted);
  }

  .sidebar-toggle {
    display: none;
  }

  main,
  body.sidebar-collapsed main {
    margin-left: 0;
  }

  .doc-section {
    padding: 38px 18px;
  }

  .hero {
    min-height: auto;
  }

  .section-head,
  .model-head {
    display: grid;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .doc-section {
    padding-left: 14px;
    padding-right: 14px;
  }

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

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

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

  h1 {
    font-size: 28px;
  }

  th,
  td {
    padding: 11px 12px;
  }

  .endpoint-title code {
    width: 100%;
  }
}
