:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #607078;
  --line: #dbe3e6;
  --soft: #f5f8f8;
  --cyan: #007f84;
  --cyan-soft: #e5f5f4;
  --coral: #b64f3a;
  --coral-soft: #fff0ec;
  --code: #152024;
  --code-ink: #e9f2f2;
  --header-h: 64px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body { margin: 0; color: var(--ink); background: #fff; line-height: 1.72; letter-spacing: 0; overflow-x: hidden; }
a { color: inherit; }
button, input { font: inherit; letter-spacing: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip-link:focus { top: 8px; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 760; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand small { color: var(--muted); font-size: 13px; font-weight: 520; border-left: 1px solid var(--line); padding-left: 10px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search-button, .menu-button, .console-link { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 7px 11px; border-radius: 6px; text-decoration: none; cursor: pointer; }
.search-button:hover, .menu-button:hover, .console-link:hover { border-color: var(--cyan); color: var(--cyan); }
kbd { font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); margin-left: 8px; }
.menu-button { display: none; }

.shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.sidebar { position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h)); overflow: auto; border-right: 1px solid var(--line); padding: 22px 18px 24px; background: #fbfcfc; }
.search-wrap label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.search-wrap input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; color: var(--ink); background: #fff; outline: none; }
.search-wrap input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.sidebar nav { margin-top: 20px; }
.sidebar nav a { display: block; padding: 6px 10px; margin: 1px 0; border-radius: 5px; color: #45545b; text-decoration: none; font-size: 14px; }
.sidebar nav a:hover, .sidebar nav a.active { color: var(--cyan); background: var(--cyan-soft); }
.nav-group { margin: 18px 10px 5px; color: #7b888e; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.sidebar-meta { margin: 26px 10px 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.sidebar-meta span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #269c67; }

main { min-width: 0; max-width: 100%; width: min(100%, 980px); padding: 48px 56px 72px; }
section { min-width: 0; padding: 38px 0; border-bottom: 1px solid var(--line); }
.intro { padding-top: 18px; }
.eyebrow, .section-label { margin: 0 0 7px; color: var(--cyan); font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: 0; }
h1 { font-size: 42px; max-width: 720px; }
h2 { font-size: 28px; }
h3 { font-size: 18px; margin-top: 30px; }
p { margin: 14px 0 0; }
.intro-copy, .lead { color: var(--muted); font-size: 17px; max-width: 760px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .91em; }
p code, td code, li code { background: #edf2f2; color: #245158; padding: 2px 5px; border-radius: 4px; overflow-wrap: anywhere; }

.base-url { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding: 14px 16px; background: var(--ink); color: #fff; border-radius: 6px; overflow: auto; }
.base-url span { color: #aebec3; font-size: 12px; white-space: nowrap; }
.base-url code { flex: 1; color: #fff; white-space: nowrap; }
.base-url b { color: #8fe0d5; font-size: 11px; }
.endpoint-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.endpoint-grid a { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.endpoint-grid a:hover { border-color: var(--cyan); }
.endpoint-grid code { flex: 1; width: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.get, .post { flex: 0 0 auto; font-size: 10px; font-weight: 850; }
.get { color: var(--cyan); }
.post { color: var(--coral); }
.endpoint { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 11px 13px; background: var(--soft); border-left: 3px solid var(--cyan); overflow: auto; }
.endpoint code { white-space: nowrap; }

.callout { margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--cyan); background: var(--cyan-soft); color: #31595b; }
.callout strong { display: block; color: var(--ink); margin-bottom: 3px; }
.callout.important { border-left-color: var(--coral); background: var(--coral-soft); color: #6b473f; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 30px 130px 1fr; gap: 10px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 24px; height: 24px; color: #fff; background: var(--cyan); border-radius: 50%; font-size: 12px; font-weight: 800; }
.steps span { color: var(--muted); }

.code-block { margin-top: 18px; border-radius: 6px; overflow: hidden; background: var(--code); color: var(--code-ink); }
.code-head { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; border-bottom: 1px solid #304045; color: #99adb3; font-size: 11px; text-transform: uppercase; }
.copy { border: 0; background: transparent; color: #b9cacc; cursor: pointer; padding: 4px 7px; }
.copy:hover { color: #fff; }
pre { margin: 0; padding: 18px; overflow: auto; line-height: 1.58; tab-size: 2; }
pre code { font-size: 13px; }

.table-wrap { width: 100%; overflow-x: auto; margin-top: 18px; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: 14px; }
th { text-align: left; background: var(--soft); color: #4e5d63; font-size: 12px; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
.flow { display: flex; align-items: center; gap: 10px; margin-top: 22px; overflow: auto; }
.flow span { flex: 1 0 120px; padding: 10px; text-align: center; border: 1px solid var(--line); background: var(--soft); border-radius: 5px; font-size: 13px; font-weight: 700; }
.flow i { width: 20px; height: 1px; background: var(--cyan); }
.status-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 18px; }
.status-row span { padding: 10px; background: var(--soft); border-top: 2px solid var(--cyan); font-size: 12px; color: var(--muted); }
.status-row b { display: block; color: var(--ink); }
.rule-list { padding-left: 20px; }
.rule-list li { margin: 7px 0; }
.ok, .pending { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.ok { color: #176844; background: #e7f5ed; }
.pending { color: #8a4a24; background: #fff1e5; }
[data-search-hidden="true"] { display: none; }

footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 30px; color: var(--muted); font-size: 13px; }
footer a { color: var(--cyan); }

@media (max-width: 820px) {
  .topbar { padding: 0 16px; }
  .brand small, .search-button { display: none; }
  .menu-button { display: inline-block; }
  .shell { display: block; }
  .sidebar { display: none; position: fixed; z-index: 25; top: var(--header-h); left: 0; width: min(86vw, 320px); height: calc(100vh - var(--header-h)); box-shadow: 14px 0 30px rgba(20,35,40,.13); }
  .sidebar.open { display: block; }
  main { width: 100%; padding: 32px 20px 56px; }
  h1 { font-size: 34px; }
  h2 { font-size: 25px; }
  .endpoint-grid { grid-template-columns: 1fr; }
  .endpoint-grid a { overflow: hidden; }
  .steps li { grid-template-columns: 28px 1fr; }
  .steps li span { grid-column: 2; }
  .status-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .console-link { display: none; }
}

@media (max-width: 420px) {
  main { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 30px; }
  .base-url { align-items: flex-start; flex-wrap: wrap; }
  .base-url code { width: 100%; order: 3; }
  .status-row { grid-template-columns: 1fr; }
}
