:root {
	--blue: #0b6fb8;
	--blue-deep: #084f85;
	--blue-soft: #e7f1fa;
	--green: #5fa82e;
	--green-soft: #e8f4dc;
	--ink: #15232d;
	--muted: #5a6b75;
	--line: #e3e9ee;
	--bg: #f7f9fb;
	--warn: #c98512;
	--danger: #c0392b;
	--code-bg: #0f1c26;
	--code-ink: #d8e4ec;
	--font: 'Outfit', 'Nunito', system-ui, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	--top: 60px;
	--nav: 280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 12px); }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; font-size: 15px; line-height: 1.6; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .86em; background: var(--blue-soft); color: var(--blue-deep); padding: .1em .35em; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); font-weight: 400; }

/* header */
.top { position: fixed; inset: 0 0 auto 0; height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); z-index: 20; }
.top__menu { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink); }
.top__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.top__brand img { height: 28px; }
.top__brand span { background: var(--blue); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; }
.top__brand:hover { text-decoration: none; }
.top__version select { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: #fff; color: var(--ink); }
.top__key { flex: 1; display: flex; gap: 6px; max-width: 460px; margin-left: auto; }
.top__key input { flex: 1; font: inherit; font-size: 13px; font-family: var(--mono); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--bg); }
.top__key input:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
.top__key.has-key input { border-color: var(--green); background: var(--green-soft); }
.top__key[data-mode="live"] input { border-color: #d64545; background: #fdecec; }
.key-mode { align-self: center; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: #fff4e0; color: #9a5b00; }
.top__key[data-mode="live"] .key-mode { background: #fde8e8; color: #b42318; }
.top__links { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--blue); background: var(--blue); color: #fff; border-radius: 8px; padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--blue-deep); text-decoration: none; }
.btn--ghost { background: #fff; color: var(--muted); border-color: var(--line); font-weight: 500; }
.btn--ghost:hover { background: var(--bg); }
.btn:disabled { opacity: .6; cursor: progress; }

/* layout */
.layout { display: flex; padding-top: var(--top); }
.nav { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--nav); overflow-y: auto; padding: 16px 12px 40px; border-right: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.nav__search { width: 100%; font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; background: #fff; }
.nav__group { margin-bottom: 18px; }
.nav__title { text-transform: uppercase; font-size: 11px; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 0 8px 6px; }
.nav a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--ink); }
.nav a:hover, .nav a.is-active { background: var(--blue-soft); color: var(--blue-deep); text-decoration: none; }
.nav__res summary { list-style: none; cursor: pointer; }
.nav__res summary::-webkit-details-marker { display: none; }
.nav__res summary a { font-weight: 500; }
.nav__ep { font-size: 13px; padding-left: 12px !important; display: flex !important; gap: 6px; align-items: baseline; color: var(--muted) !important; }
.nav__ep .m { flex: 0 0 44px; font-size: 9px; }
.is-hidden { display: none !important; }

.content { margin-left: var(--nav); flex: 1; min-width: 0; }
.doc { padding: 40px 48px; border-bottom: 1px solid var(--line); max-width: 1400px; }
.doc h1 { font-size: 38px; line-height: 1.15; margin: 0 0 12px; }
.doc h2 { font-size: 26px; margin: 0 0 12px; }
.doc h3 { font-size: 18px; margin: 26px 0 8px; }
.doc h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
.doc p, .doc li { max-width: 820px; }
.eyebrow { color: var(--blue); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; }
.lead { font-size: 18px; color: var(--muted); }
.note { background: var(--green-soft); border-left: 3px solid var(--green); padding: 8px 12px; border-radius: 6px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.stats div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; min-width: 130px; }
.stats strong { display: block; font-size: 22px; color: var(--blue); }
.stats span { color: var(--muted); font-size: 13px; }
.steps li { margin-bottom: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.change { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-top: 12px; }
.change__head { font-weight: 600; }
.res__path { font-size: 15px; vertical-align: middle; }

/* tables */
.tbl { width: 100%; max-width: 900px; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px; }
.tbl td { border-bottom: 1px solid var(--line); padding: 8px; vertical-align: top; }
.tbl--fields td:first-child { white-space: nowrap; width: 1%; }
.tbl td.type { color: var(--muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; width: 1%; }
.obj { border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; margin: 12px 0; max-width: 900px; }
.obj summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.tag { display: inline-block; margin-left: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; vertical-align: middle; }
.tag--req { color: var(--danger); border-color: #f3c6c0; background: #fdf1ef; }
.tag--write { color: #7a4f00; border-color: #f0d9a8; background: #fff6e3; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); }
.pill--ok { background: var(--green-soft); color: #3d7a16; }
.pill--off { background: var(--bg); color: var(--muted); }
.st { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 4px; }
.st--2 { background: var(--green-soft); color: #3d7a16; }
.st--4 { background: #fff6e3; color: #7a4f00; }
.st--5 { background: #fdf1ef; color: var(--danger); }
.st--0 { background: #fdf1ef; color: var(--danger); }

/* methods */
.m { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; text-align: center; color: #fff; }
.m--get { background: var(--blue); }
.m--post { background: var(--green); }
.m--put, .m--patch { background: var(--warn); }
.m--delete { background: var(--danger); }

/* code */
.code { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow: auto; font-size: 13px; line-height: 1.55; margin: 8px 0; max-width: 900px; }
.code code { background: none; padding: 0; color: inherit; font-size: inherit; white-space: pre; }
.code--dark { background: var(--code-bg); color: var(--code-ink); border-color: var(--code-bg); }
.code--resp { max-height: 420px; }

/* endpoints */
.ep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px dashed var(--line); }
.ep:first-of-type { border-top: 0; }
.ep__doc h3 { margin-top: 0; }
.ep__line { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ep__line code { font-size: 14px; background: var(--bg); color: var(--ink); }
.ep__side { position: sticky; top: calc(var(--top) + 16px); align-self: start; }
.tabs { display: flex; gap: 2px; background: var(--code-bg); border-radius: 10px 10px 0 0; padding: 6px 6px 0; }
.tabs button { font: inherit; font-size: 12px; border: 0; background: transparent; color: #8da2b1; padding: 6px 12px; border-radius: 6px 6px 0 0; cursor: pointer; }
.tabs button.is-on { color: #fff; background: #1a2b38; }
.tabs .tabs__copy { margin-left: auto; }
.tabs + .code, .tabs ~ .code[data-pane] { margin-top: 0; border-radius: 0 0 10px 10px; background: #1a2b38; border-color: #1a2b38; }

/* try it */
.try { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
.try__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.try__warn { font-size: 12px; font-weight: 600; color: #7a4f00; background: #fff6e3; border-radius: 999px; padding: 2px 10px; }
.try__row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.try__row span { flex: 0 0 70px; font-family: var(--mono); color: var(--muted); }
.try__row input { flex: 1; font: inherit; font-family: var(--mono); font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.try__body { width: 100%; font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; padding: 8px; resize: vertical; margin-bottom: 8px; background: var(--bg); }
.try__check { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.btn--send { width: 100%; }
.try__out { margin-top: 10px; }
.try__status { font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.try__status small { color: var(--muted); font-family: var(--mono); }
.try__out .code { max-height: 360px; }
.try__out .code:has(code:empty) { display: none; }

.foot { padding: 30px 48px 60px; color: var(--muted); font-size: 14px; }

@media (max-width: 1100px) {
	.ep { grid-template-columns: 1fr; }
	.ep__side { position: static; }
	.top__links a:not(.btn) { display: none; }
}
@media (max-width: 820px) {
	.top__menu { display: block; }
	.top__key, .top__version { display: none; }
	.nav { transform: translateX(-100%); transition: transform .2s; z-index: 15; background: #fff; }
	.nav.is-open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.15); }
	.content { margin-left: 0; }
	.doc { padding: 28px 18px; }
	.split { grid-template-columns: 1fr; }
}
