/* ==========================================================================
   像素迷宫 · 雫猫版 —— API 文档页样式
   与工具页同源 token：深蓝夜空 + 冰蓝/薰衣草/樱粉 + 玻璃拟态
   独立文件：不依赖 app.css，不使用外部字体 / CDN
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #070b16;
  --bg-2: #0b1224;
  --panel: rgba(17, 26, 48, .72);
  --panel-solid: #111a30;
  --line: rgba(140, 200, 255, .14);
  --line-strong: rgba(140, 200, 255, .3);
  --text: #e8f1ff;
  --muted: #93a6c8;
  --dim: #64769a;
  --body: #c6d6ee;
  --blue: #7cc8ff;
  --blue-deep: #3a8fd6;
  --lav: #b49cff;
  --pink: #ff9ed2;
  --ok: #6ee7b7;
  --warn: #ffd18a;
  --err: #ff8ba0;
  --radius: 20px;
  --radius-sm: 12px;
  --code-bg: #060a14;
  --header-h: 64px;
  --maxw: 1400px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
}

/* ---------- reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  background:
    radial-gradient(1000px 680px at 10% -10%, rgba(124, 200, 255, .18), transparent 62%),
    radial-gradient(860px 560px at 92% 2%, rgba(180, 156, 255, .16), transparent 64%),
    radial-gradient(760px 520px at 52% 104%, rgba(255, 158, 210, .09), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 46%, var(--bg) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(140, 200, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 200, 255, .045) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 78%);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

::selection {
  background: rgba(124, 200, 255, .32);
  color: #fff;
}

:where(h2, h3, [id]) {
  scroll-margin-top: calc(var(--header-h) + 22px);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

a {
  color: var(--blue);
  text-decoration-color: rgba(124, 200, 255, .45);
  text-underline-offset: 2px;
}

a:hover {
  color: #a8daff;
}

code {
  font-family: var(--mono);
  font-size: .88em;
  padding: .12em .38em;
  border: 1px solid rgba(124, 200, 255, .16);
  border-radius: 6px;
  background: rgba(124, 200, 255, .08);
  color: #dbe9ff;
  word-break: break-word;
}

/* ---------- skip link / decor ---------- */
.skip-link {
  position: fixed;
  top: -110px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel-solid);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 12px;
}

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-decor__paw {
  position: absolute;
  fill: rgba(140, 200, 255, .05);
  width: 180px;
  height: 180px;
}

.bg-decor__paw--a {
  top: 18%;
  left: -46px;
  transform: rotate(-18deg);
}

.bg-decor__paw--b {
  top: 58%;
  right: -54px;
  width: 230px;
  height: 230px;
  transform: rotate(22deg);
  fill: rgba(255, 158, 210, .045);
}

.bg-decor__paw--c {
  bottom: 4%;
  left: 18%;
  width: 130px;
  height: 130px;
  transform: rotate(9deg);
  fill: rgba(180, 156, 255, .045);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 22, .74);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: var(--maxw);
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.brand__logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(124, 200, 255, .2), rgba(180, 156, 255, .16) 60%, rgba(255, 158, 210, .12));
  box-shadow: 0 0 24px -10px rgba(124, 200, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .1);
}

.brand__logo svg {
  width: 22px;
  height: 22px;
  fill: url(#gBrand);
  stroke: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}

.brand__sub {
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__link {
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.site-nav__link:hover {
  color: var(--text);
  background: rgba(124, 200, 255, .08);
}

.site-nav__link.is-active {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(124, 200, 255, .1);
}

.site-header__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.version-badge {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(124, 200, 255, .07);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.toc-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(124, 200, 255, .08);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}

.toc-toggle:hover {
  background: rgba(124, 200, 255, .16);
}

.toc-toggle[aria-expanded="true"] {
  border-color: var(--blue);
  background: rgba(124, 200, 255, .2);
}

/* ---------- hero ---------- */
.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 20px;
  margin: clamp(22px, 4vw, 48px) 0 clamp(20px, 3vw, 34px);
  padding: clamp(22px, 3.6vw, 44px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(158deg, rgba(24, 35, 66, .9), rgba(13, 20, 38, .72));
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 34px 80px -52px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.hero::before {
  content: "";
  position: absolute;
  top: -55%;
  left: -12%;
  width: 70%;
  height: 130%;
  background: radial-gradient(closest-side, rgba(124, 200, 255, .22), transparent 72%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -60%;
  width: 55%;
  height: 130%;
  background: radial-gradient(closest-side, rgba(255, 158, 210, .14), transparent 72%);
  pointer-events: none;
}

.hero__main {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(110, 231, 183, .14), 0 0 14px rgba(110, 231, 183, .8);
  animation: pulse 3.4s ease-in-out infinite;
}

.hero__title {
  margin: 0 0 12px;
  font-size: clamp(30px, 5.2vw, 54px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.grad {
  background: linear-gradient(112deg, var(--blue) 8%, var(--lav) 52%, var(--pink) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0 0 18px;
  max-width: 58ch;
  color: var(--body);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.8;
}

.basebox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  max-width: 680px;
  padding: 9px 10px 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(5, 9, 18, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.basebox__label {
  flex: none;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.basebox__value {
  flex: 1 1 180px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #d8e9ff;
  font-size: 13.5px;
  white-space: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.basebox__value::-webkit-scrollbar {
  display: none;
}

.basebox__copy {
  margin-left: auto;
}

.hero__hint {
  margin: 9px 0 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.7;
}

.hero__hint code {
  font-size: .92em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips--hero {
  margin-top: 18px;
}

.chips li {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.chips li code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 1em;
}

.hero__deco {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 200px;
}

.hero__cat {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 216px;
  color: rgba(180, 156, 255, .8);
  filter: drop-shadow(0 0 26px rgba(124, 200, 255, .35));
}

.hero__ring {
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px dashed rgba(140, 200, 255, .28);
  border-radius: 50%;
  animation: spin 64s linear infinite;
}

.hero__ring::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 14px rgba(255, 158, 210, .9);
}

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
  padding-bottom: clamp(16px, 3vw, 36px);
}

.toc-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 44px);
  min-height: 0;
}

.toc {
  max-height: inherit;
  padding: 4px 4px 8px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 200, 255, .22) transparent;
}

.toc::-webkit-scrollbar {
  width: 6px;
}

.toc::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(140, 200, 255, .22);
}

.toc__title {
  margin: 0 0 10px;
  padding-left: 13px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.toc__list,
.toc__sublist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc__list {
  border-left: 1px solid var(--line);
}

.toc__sublist {
  padding: 2px 0 6px;
}

.toc__link {
  display: block;
  margin-left: -1px;
  padding: 6px 10px 6px 13px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.toc__link:hover {
  color: var(--text);
  background: rgba(124, 200, 255, .06);
}

.toc__link.is-active {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, rgba(124, 200, 255, .14), rgba(124, 200, 255, 0));
  color: var(--blue);
  font-weight: 600;
}

.toc__link--sub {
  padding: 5px 8px 5px 22px;
  font-size: 12.5px;
}

.toc__m {
  margin-right: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
}

.toc__m--get {
  color: #6ee7b7;
}

.toc__m--post {
  color: #b49cff;
}

.toc-backdrop {
  display: none;
}

.content {
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 4vw, 44px);
  min-width: 0;
  padding-bottom: 20px;
}

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

.doc-section + .doc-section {
  padding-top: clamp(22px, 3.4vw, 36px);
  border-top: 1px solid rgba(140, 200, 255, .1);
}

/* ---------- headings / text ---------- */
h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  font-size: clamp(21px, 2.6vw, 29px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.sec-num {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  opacity: .75;
}

h3 {
  margin: 26px 0 10px;
  font-size: clamp(16.5px, 1.9vw, 19.5px);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -.005em;
}

h3 code {
  font-size: .86em;
}

p {
  margin: 0 0 14px;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.85;
}

.doc-section > p:last-child,
.note p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 15.5px;
  color: #d5e4f8;
}

.bullets {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.bullets li {
  position: relative;
  margin: 8px 0;
  padding-left: 20px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.8;
}

.bullets li::before {
  content: "";
  position: absolute;
  top: .72em;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--lav));
  box-shadow: 0 0 10px rgba(124, 200, 255, .6);
}

.note {
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--lav);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(180, 156, 255, .07);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.note p {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.note code {
  font-size: .9em;
}

/* ---------- facts ---------- */
.facts {
  margin: 0 0 16px;
}

.facts--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0 26px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(11, 18, 36, .6);
}

.facts__row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(140, 200, 255, .1);
}

.facts__row:last-child {
  border-bottom: 0;
}

.facts dt {
  flex: none;
  min-width: 58px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.6;
  min-width: 0;
}

.facts dd code {
  font-size: 11.5px;
}

/* ---------- code blocks ---------- */
.code {
  position: relative;
  max-width: 100%;
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  box-shadow: 0 18px 40px -34px rgba(0, 0, 0, .9);
}

.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px 6px 14px;
  border-bottom: 1px solid rgba(140, 200, 255, .1);
  background: rgba(124, 200, 255, .045);
}

.code__lang {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

pre {
  max-width: 100%;
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  color: #d7e7ff;
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: 1.72;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 200, 255, .24) transparent;
}

pre::-webkit-scrollbar {
  height: 8px;
}

pre::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(140, 200, 255, .22);
}

pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  white-space: pre;
  word-break: normal;
}

pre:focus-visible,
.table-wrap:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.2;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(124, 200, 255, .1);
}

.copy-btn .icon {
  width: 13px;
  height: 13px;
}

.copy-btn.is-done {
  color: var(--ok);
  border-color: rgba(110, 231, 183, .45);
  background: rgba(110, 231, 183, .1);
}

.copy-btn.is-fail {
  color: var(--err);
  border-color: rgba(255, 139, 160, .45);
  background: rgba(255, 139, 160, .1);
}

/* ---------- tables ---------- */
.table-wrap {
  max-width: 100%;
  margin: 14px 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(9, 15, 29, .64);
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 200, 255, .24) transparent;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(140, 200, 255, .22);
}

table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(124, 200, 255, .055);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(140, 200, 255, .075);
  color: var(--body);
  line-height: 1.68;
  vertical-align: top;
}

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

tbody tr:hover td {
  background: rgba(124, 200, 255, .04);
}

tbody td:first-child {
  white-space: nowrap;
}

td code {
  font-size: 11.8px;
  white-space: nowrap;
}

.table-wrap--errors td:nth-child(2) {
  white-space: nowrap;
}

tr:target td {
  background: rgba(124, 200, 255, .13);
  box-shadow: inset 0 0 0 1px rgba(124, 200, 255, .2);
}

.http {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid rgba(255, 209, 138, .28);
  border-radius: 6px;
  background: rgba(255, 209, 138, .1);
  color: var(--warn);
  font-family: var(--mono);
  font-size: 11.5px;
}

.http--alert {
  border-color: rgba(255, 139, 160, .3);
  background: rgba(255, 139, 160, .1);
  color: var(--err);
}

/* ---------- api cards ---------- */
.api-card {
  position: relative;
  min-width: 0;
  margin: 22px 0;
  padding: clamp(16px, 2.6vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(164deg, rgba(21, 31, 58, .8), rgba(13, 20, 38, .68));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 60px -48px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .24s ease, transform .24s ease, box-shadow .24s ease;
}

.api-card:target {
  border-color: var(--line-strong);
}

.api-card:hover {
  border-color: var(--line-strong);
}

@media (hover: hover) {
  .api-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 32px 70px -48px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
  }
}

.api-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 23px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  flex: none;
}

.method--get {
  border-color: rgba(110, 231, 183, .32);
  background: rgba(110, 231, 183, .12);
  color: var(--ok);
}

.method--post {
  border-color: rgba(180, 156, 255, .36);
  background: rgba(180, 156, 255, .14);
  color: var(--lav);
}

.api-card__path {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(5, 9, 18, .6);
  color: #dbe9ff;
  font-size: 12.5px;
}

.api-card__tag {
  padding: 3px 9px;
  border: 1px dashed rgba(140, 200, 255, .22);
  border-radius: 999px;
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
}

.api-card__name {
  margin: 10px 0 8px;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 650;
}

.api-card__desc {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--body);
}

.api-card__returns {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.api-card__note {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 2px solid rgba(180, 156, 255, .45);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.78;
}

.api-card__errors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(140, 200, 255, .12);
}

.api-card__errors-label {
  margin-right: 2px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
}

.chip {
  padding: 3px 8px;
  border: 1px solid rgba(255, 139, 160, .26);
  border-radius: 999px;
  background: rgba(255, 139, 160, .08);
  color: #ffb9c6;
  font-family: var(--mono);
  font-size: 10.8px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.chip:hover {
  border-color: rgba(255, 139, 160, .5);
  background: rgba(255, 139, 160, .18);
  color: #ffd6de;
}

/* ---------- generator ---------- */
.gen {
  margin-top: 28px;
  padding: clamp(16px, 2.6vw, 28px);
  border-color: var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(158deg, rgba(27, 38, 70, .86), rgba(14, 21, 40, .74));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 34px 70px -52px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.gen > h3 {
  margin-top: 0;
}

.gen__intro {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13.5px;
}

.gen__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 12px 14px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field[hidden] {
  display: none;
}

.field__label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field__input {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 9, 18, .74);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.field__input:hover {
  border-color: var(--line-strong);
}

.field__input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 200, 255, .16);
}

select.field__input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393a6c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
}

select.field__input option {
  background: var(--panel-solid);
  color: var(--text);
}

.gen__tabs {
  display: flex;
  gap: 4px;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 9, 18, .6);
  scrollbar-width: none;
}

.gen__tabs::-webkit-scrollbar {
  display: none;
}

.gen__tab {
  padding: 7px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.gen__tab:hover {
  color: var(--text);
  background: rgba(124, 200, 255, .08);
}

.gen__tab.is-active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(124, 200, 255, .24), rgba(180, 156, 255, .24));
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.gen__panel[hidden] {
  display: none;
}

.gen__panel > .code {
  margin-top: 0;
}

.gen__note {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.75;
}

.gen__note code {
  font-size: .92em;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(28px, 5vw, 56px);
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 10, 20, 0), rgba(6, 10, 20, .55));
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.site-footer__line {
  margin: 0;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.75;
}

.site-footer__line a {
  color: var(--muted);
}

.site-footer__line a:hover {
  color: var(--blue);
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11.5px;
}

.site-footer__meta a {
  color: var(--blue);
  text-decoration: none;
}

.site-footer__meta a:hover {
  text-decoration: underline;
}

/* ---------- reveal ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- animation ---------- */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: .45;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .hero__ring {
    width: 176px;
    height: 176px;
  }
}

@media (max-width: 1023px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc-toggle {
    display: inline-flex;
  }

  .toc-aside {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    z-index: 40;
    max-height: calc(100vh - var(--header-h));
    padding: 0 clamp(16px, 4vw, 32px);
    border-bottom: 1px solid var(--line-strong);
    background: rgba(7, 11, 22, .97);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .95);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    pointer-events: none;
  }

  .toc {
    max-height: calc(100vh - var(--header-h) - 24px);
    padding: 14px 0 22px;
  }

  .toc__list {
    border-left: 0;
  }

  .toc__link {
    margin-left: 0;
    padding: 8px 10px 8px 12px;
    border-left: 2px solid transparent;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
  }

  .toc__link--sub {
    padding-left: 26px;
    font-size: 13px;
  }

  body.toc-open .toc-aside {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .toc-backdrop {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 39;
    background: rgba(3, 6, 12, .62);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s;
  }

  body.toc-open .toc-backdrop {
    opacity: 1;
    visibility: visible;
  }

  body.toc-open {
    overflow: hidden;
  }
}

@media (max-width: 899px) {
  .site-nav {
    display: none;
  }

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

  .hero__deco {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 58px;
  }

  .brand__logo {
    width: 34px;
    height: 34px;
  }

  .brand__sub {
    display: none;
  }

  .hero {
    margin-top: 16px;
    padding: 20px 18px;
    border-radius: var(--radius);
  }

  .hero__eyebrow {
    font-size: 9.5px;
    letter-spacing: .12em;
  }

  .basebox {
    padding: 8px 8px 8px 12px;
  }

  .basebox__value {
    font-size: 12.5px;
  }

  .chips li {
    font-size: 10.5px;
  }

  h2 {
    gap: 8px;
    font-size: 21px;
  }

  h3 {
    font-size: 16.5px;
  }

  p {
    font-size: 14px;
  }

  .lead {
    font-size: 14.5px;
  }

  .api-card {
    padding: 15px;
    border-radius: 16px;
  }

  .api-card__path {
    font-size: 12px;
  }

  pre {
    padding: 12px 13px 14px;
    font-size: 12px;
  }

  table {
    font-size: 12.5px;
    min-width: 500px;
  }

  thead th,
  tbody td {
    padding: 9px 11px;
  }

  .version-badge {
    display: none;
  }

  .gen {
    padding: 16px 14px;
  }

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

  .site-footer__meta {
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .basebox__label {
    flex-basis: 100%;
  }
}

@media (max-width: 380px) {
  .hero__title {
    font-size: 28px;
  }

  .api-card__head {
    gap: 7px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero__dot,
  .hero__ring {
    animation: none;
  }
}
