/* The public (/docs) and internal (/docs/internal) documentation pages, rendered by docs.js. Tokens are the
   Figma variables (Documentation Design, Light and Dark modes); :root.dark (set by the theme toggle) swaps them.
   PUT and PATCH have no Figma token and are derived from the warning and syntax-command colors. */
:root {
	--sidebar-width: 288px;
	--topbar-height: 56px;
	--font-ui: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--font-code: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;

	--color-bg-page: #ffffff;
	--color-bg-surface: #ffffff;
	--color-bg-sidebar: #f8fafc;
	--color-bg-subtle: #f8fafc;
	--color-bg-inset: #f1f5f9;
	--color-border-default: #e2e8f0;
	--color-border-subtle: #f1f5f9;

	--color-text-primary: #0f172a;
	--color-text-secondary: #475569;
	--color-text-tertiary: #64748b;
	--color-text-required: #dc2626;

	--color-accent-default: #2563eb;
	--color-accent-subtle: #eff6ff;

	--color-method-get-bg: #dcfce7;
	--color-method-get-fg: #15803d;
	--color-method-post-bg: #dbeafe;
	--color-method-post-fg: #1d4ed8;
	--color-method-put-bg: #fef3c7;
	--color-method-put-fg: #b45309;
	--color-method-patch-bg: #ede9fe;
	--color-method-patch-fg: #6d28d9;
	--color-method-delete-bg: #fee2e2;
	--color-method-delete-fg: #b91c1c;

	--color-status-success-fg: #15803d;
	--color-status-error-fg: #b91c1c;
	--color-status-info-bg: #eff6ff;
	--color-status-info-border: #bfdbfe;

	--color-bg-code: #0f172a;
	--color-bg-code-header: #1e293b;
	--color-border-code: #334155;
	--color-text-code: #e2e8f0;
	--color-text-code-muted: #94a3b8;

	--color-syntax-prompt: #4ade80;
	--color-syntax-command: #c4b5fd;
	--color-syntax-flag: #fcd34d;
	--color-syntax-string: #86efac;
	--color-syntax-variable: #93c5fd;
	--color-syntax-key: #93c5fd;
	--color-syntax-number: #fcd34d;
	--color-syntax-punct: #94a3b8;
}

:root.dark {
	--color-bg-page: #121212;
	--color-bg-surface: #232323;
	--color-bg-sidebar: #1e1e1e;
	--color-bg-subtle: #1e1e1e;
	--color-bg-inset: #272727;
	--color-border-default: #2e2e2e;
	--color-border-subtle: #252525;

	--color-text-primary: #e0e0e0;
	--color-text-secondary: #a0a0a0;
	--color-text-tertiary: #8d8d8d;
	--color-text-required: #fca5a5;

	--color-accent-default: #93c5fd;
	--color-accent-subtle: #242b33;

	--color-method-get-bg: #223128;
	--color-method-get-fg: #86efac;
	--color-method-post-bg: #242b33;
	--color-method-post-fg: #93c5fd;
	--color-method-put-bg: #332d1a;
	--color-method-put-fg: #fcd34d;
	--color-method-patch-bg: #2c2738;
	--color-method-patch-fg: #c4b5fd;
	--color-method-delete-bg: #332727;
	--color-method-delete-fg: #fca5a5;

	--color-status-success-fg: #86efac;
	--color-status-error-fg: #fca5a5;
	--color-status-info-bg: #242b33;
	--color-status-info-border: #3b4b5d;

	--color-bg-code: #252525;
	--color-bg-code-header: #2c2c2c;
	--color-border-code: #383838;
}

* {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: var(--color-bg-page);
	color: var(--color-text-primary);
	font-family: var(--font-ui);
	-webkit-font-smoothing: antialiased;
}
svg {
	flex: none;
	width: 16px;
	height: 16px;
}
code,
kbd,
pre {
	font-family: var(--font-code);
}

/* ---- topbar ---- */

.docs-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	height: var(--topbar-height);
}
.docs-topbar-brand {
	display: flex;
	flex: none;
	align-items: center;
	width: var(--sidebar-width);
	padding: 0 24px;
	background: var(--color-bg-sidebar);
	border-right: 1px solid var(--color-border-default);
}
.docs-logo {
	max-width: 100%;
	height: 32px;
}
.docs-topbar-main {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	min-width: 0;
	padding: 0 32px;
	background: var(--color-bg-page);
	border-bottom: 1px solid var(--color-border-default);
}
.docs-topbar-left {
	display: flex;
	align-items: center;
	gap: 12px;
}
.docs-title {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}
.docs-chip {
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--color-bg-inset);
	font-family: var(--font-code);
	font-size: 12px;
}
.docs-topbar-right {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	min-width: 0;
	margin-left: 16px;
}
.docs-theme-toggle {
	display: flex;
	gap: 2px;
	padding: 2px;
	border-radius: 6px;
	background: var(--color-bg-inset);
}
.docs-theme-toggle button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid transparent;
	border-radius: 4px;
	background: transparent;
	color: var(--color-text-tertiary);
	cursor: pointer;
}
.docs-theme-toggle button.active {
	border-color: var(--color-border-default);
	background: var(--color-bg-surface);
	color: var(--color-text-primary);
}

/* ---- search ---- */

.docs-search {
	position: relative;
	flex: 0 1 320px;
	min-width: 0;
}
.docs-search-field {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	background: var(--color-bg-surface);
	color: var(--color-text-tertiary);
}
.docs-search-field:focus-within {
	border-color: var(--color-accent-default);
	box-shadow: 0 0 0 3px var(--color-accent-subtle);
}
.docs-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--color-text-primary);
	font: 13px var(--font-ui);
}
.docs-search kbd,
.sr-foot kbd {
	padding: 1px 6px;
	border: 1px solid var(--color-border-default);
	border-radius: 4px;
	color: var(--color-text-tertiary);
	font-size: 11px;
}
.docs-search-panel {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: max(100%, 420px);
	overflow: hidden;
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	background: var(--color-bg-surface);
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.sr-list {
	max-height: 360px;
	overflow-y: auto;
	padding: 6px;
}
.sr-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
}
.sr-item.active {
	background: var(--color-accent-subtle);
}
.sr-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.sr-title {
	font-size: 13px;
	font-weight: 500;
}
.sr-sub {
	overflow: hidden;
	color: var(--color-text-tertiary);
	font: 12px var(--font-code);
	text-overflow: ellipsis;
	white-space: nowrap;
}
.sr-kind {
	min-width: 46px;
	color: var(--color-text-tertiary);
	font-size: 11px;
}
.sr-empty {
	padding: 24px;
	color: var(--color-text-secondary);
	font-size: 13px;
	line-height: 20px;
	text-align: center;
}
.sr-empty p {
	margin: 0 0 12px;
}
.sr-empty .sr-empty-title {
	color: var(--color-text-primary);
	font-size: 14px;
	font-weight: 500;
}
.sr-clear {
	padding: 6px 12px;
	border: 0;
	border-radius: 6px;
	background: var(--color-text-primary);
	color: var(--color-bg-page);
	font: 500 13px var(--font-ui);
	cursor: pointer;
}
.sr-foot {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-top: 1px solid var(--color-border-subtle);
	color: var(--color-text-tertiary);
	font-size: 12px;
}

/* ---- layout + sidebar ---- */

.docs-layout {
	display: flex;
}
.docs-sidebar {
	position: sticky;
	top: var(--topbar-height);
	flex: none;
	width: var(--sidebar-width);
	height: calc(100vh - var(--topbar-height));
	overflow-y: auto;
	padding: 16px 16px 48px;
	background: var(--color-bg-sidebar);
	border-right: 1px solid var(--color-border-default);
}
.docs-main {
	flex: 1;
	min-width: 0;
}
.docs-loading {
	padding: 48px;
	color: var(--color-text-tertiary);
}
.nav-block + .nav-block {
	margin-top: 20px;
}
/* An area heading (internal docs: Customer, Backoffice, ...) above its domain sections. */
.nav-area {
	margin: 28px 0 14px;
	padding: 16px 12px 0;
	border-top: 1px solid var(--color-border-default);
	color: var(--color-text-primary);
	font-size: 14px;
	font-weight: 600;
}
.nav-block:first-child + .nav-area,
.nav-area:first-child {
	margin-top: 20px;
}
.nav-area:first-child {
	padding-top: 0;
	border-top: 0;
}
.nav-section {
	padding: 0 12px 6px;
	color: var(--color-text-tertiary);
	font-size: 13px;
	font-weight: 600;
}
.nav-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 6px;
	color: var(--color-text-secondary);
	font-size: 13px;
	line-height: 18px;
	text-decoration: none;
}
.nav-link:hover {
	color: var(--color-text-primary);
}
.nav-link.active {
	background: var(--color-accent-subtle);
	color: var(--color-accent-default);
}
.nav-tag-link {
	justify-content: space-between;
}
.nav-chev {
	display: flex;
	padding: 2px;
	margin: -2px;
	color: var(--color-text-tertiary);
}
.chevron {
	transition: transform 0.22s ease;
}
.nav-tag.open .chevron,
.resp.open .chevron {
	transform: rotate(90deg);
}
/* Collapsibles (sidebar groups, responses) animate their real height: a grid row going 0fr -> 1fr, no JS and
   no fixed max-height. Collapsed content is also hidden from keyboard focus once the transition ends. */
.nav-ops,
.resp-body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.22s ease;
}
.nav-tag.open .nav-ops,
.resp.open .resp-body {
	grid-template-rows: 1fr;
}
.collapse-inner {
	min-height: 0;
	overflow: hidden;
	visibility: hidden;
	opacity: 0;
	transition:
		opacity 0.18s ease,
		visibility 0s linear 0.22s;
}
.nav-tag.open .collapse-inner,
.resp.open .collapse-inner {
	visibility: visible;
	opacity: 1;
	transition:
		opacity 0.22s ease 0.04s,
		visibility 0s;
}
/* Spacing lives on the children, not as padding on .collapse-inner: padding would stay visible when collapsed. */
.nav-ops .collapse-inner > :first-child {
	margin-top: 2px;
}
.nav-ops .collapse-inner > :last-child {
	margin-bottom: 4px;
}
@media (prefers-reduced-motion: reduce) {
	.nav-ops,
	.resp-body,
	.collapse-inner,
	.chevron {
		transition: none !important;
	}
}
.nav-op {
	padding-left: 24px;
}
.nav-op .badge {
	min-width: 46px;
	font-size: 9.5px;
}

/* ---- content blocks ---- */

/* Offscreen sections are not laid out or painted until scrolled near: the internal page has hundreds. */
.block {
	content-visibility: auto;
	contain-intrinsic-size: auto 900px;
	scroll-margin-top: var(--topbar-height);
	border-top: 1px solid var(--color-border-subtle);
}
.block:first-child {
	border-top: 0;
}
.block-group {
	contain-intrinsic-size: auto 240px;
}
.block-inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 784px;
	margin: 0 auto;
	padding: 48px 32px;
}
.block-group .block-inner {
	gap: 16px;
	padding-bottom: 40px;
}
h1,
h2,
h3 {
	margin: 0;
	font-weight: 600;
}
h1 {
	font-size: 30px;
	line-height: 38px;
	letter-spacing: -0.36px;
}
h2 {
	font-size: 22px;
	line-height: 30px;
	letter-spacing: -0.18px;
}
h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	line-height: 24px;
}
.overline {
	color: var(--color-accent-default);
	font-size: 12px;
	font-weight: 600;
}
.muted {
	margin: 0;
	color: var(--color-text-tertiary);
	font-size: 13px;
}
.part {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* ---- markdown ---- */

.md {
	color: var(--color-text-secondary);
	font-size: 14px;
	line-height: 22px;
}
.md > :first-child {
	margin-top: 0;
}
.md > :last-child {
	margin-bottom: 0;
}
.md p,
.md ul,
.md ol {
	margin: 0 0 12px;
}
.md ul,
.md ol {
	padding-left: 21px;
}
.md li ul {
	margin: 4px 0;
}
.md strong {
	color: var(--color-text-primary);
	font-weight: 600;
}
.md a {
	color: var(--color-accent-default);
}
.md h2,
.md h3 {
	margin: 24px 0 12px;
	color: var(--color-text-primary);
}
.md :not(pre):not(.codefield) > code,
.row-desc code {
	padding: 1px 6px;
	border-radius: 4px;
	background: var(--color-bg-inset);
	color: var(--color-text-primary);
	font-size: 12.5px;
}
.md table {
	width: 100%;
	margin: 0 0 16px;
	overflow: hidden;
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	border-spacing: 0;
	font-size: 13px;
	line-height: 20px;
}
.md th {
	padding: 12px 16px;
	background: var(--color-bg-subtle);
	color: var(--color-text-tertiary);
	font-size: 12px;
	font-weight: 500;
	text-align: left;
}
.md td {
	padding: 12px 16px;
	border-top: 1px solid var(--color-border-subtle);
	vertical-align: top;
}
.md blockquote {
	position: relative;
	margin: 0 0 16px;
	padding: 16px 16px 16px 44px;
	border: 1px solid var(--color-status-info-border);
	border-radius: 8px;
	background: var(--color-status-info-bg);
	font-size: 13px;
	line-height: 20px;
}
.md blockquote::before {
	content: '';
	position: absolute;
	top: 18px;
	left: 16px;
	width: 16px;
	height: 16px;
	background: center / 16px no-repeat
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232563eb' stroke-width='1.5'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M8 7.5v4M8 5v.5'/%3E%3C/svg%3E");
}
.md blockquote p {
	margin: 0;
}
.md blockquote strong:first-child {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 500;
}

/* ---- code ---- */

.codeblock {
	margin: 0 0 16px;
	overflow: hidden;
	border: 1px solid var(--color-border-code);
	border-radius: 8px;
	background: var(--color-bg-code);
}
.part .codeblock,
.codeblock:last-child {
	margin-bottom: 0;
}
.codeblock-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 40px;
	padding: 0 8px 0 16px;
	border-bottom: 1px solid var(--color-border-code);
	background: var(--color-bg-code-header);
	color: var(--color-text-code-muted);
	font: 12px var(--font-code);
}
.codeblock-head > span {
	display: flex;
	align-items: center;
	gap: 12px;
}
.codeblock pre {
	margin: 0;
	padding: 16px;
	overflow-x: auto;
	color: var(--color-text-code);
	font-size: 13px;
	line-height: 21px;
}
.docs-copy {
	display: flex;
	align-items: center;
	gap: 4px;
	height: 28px;
	padding: 0 8px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--color-text-code-muted);
	font: 500 12px var(--font-ui);
	text-decoration: none;
	cursor: pointer;
}
.docs-copy:hover {
	color: var(--color-text-primary);
}
.docs-copy.copied {
	color: var(--color-status-success-fg);
}
.codefield,
.endpoint {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	padding: 8px 8px 8px 12px;
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	background: var(--color-bg-subtle);
}
.endpoint {
	margin: 0;
}
.codefield code,
.endpoint code {
	flex: 1;
	min-width: 0;
	overflow-wrap: anywhere;
	color: var(--color-text-primary);
	font-size: 13px;
	line-height: 21px;
}
.codefield .docs-copy,
.endpoint .docs-copy {
	color: var(--color-text-secondary);
}

/* highlight.js tokens mapped to the Figma syntax colors */
.hljs-meta,
.sx-prompt {
	color: var(--color-syntax-prompt);
}
.sx-flag {
	color: var(--color-syntax-flag);
}
.hljs-keyword,
.hljs-built_in,
.hljs-title {
	color: var(--color-syntax-command);
}
.hljs-string {
	color: var(--color-syntax-string);
}
.hljs-variable,
.hljs-template-variable,
.hljs-property {
	color: var(--color-syntax-variable);
}
.hljs-attr {
	color: var(--color-syntax-key);
}
.hljs-number,
.hljs-literal,
.hljs-params,
.hljs-subst {
	color: var(--color-syntax-number);
}
.hljs-comment,
.hljs-punctuation {
	color: var(--color-syntax-punct);
}

/* ---- endpoint parts ---- */

.badge {
	display: inline-flex;
	justify-content: center;
	padding: 4px 8px;
	border-radius: 4px;
	font: 700 11px/14px var(--font-code);
}
.badge-get {
	background: var(--color-method-get-bg);
	color: var(--color-method-get-fg);
}
.badge-post {
	background: var(--color-method-post-bg);
	color: var(--color-method-post-fg);
}
.badge-put {
	background: var(--color-method-put-bg);
	color: var(--color-method-put-fg);
}
.badge-patch {
	background: var(--color-method-patch-bg);
	color: var(--color-method-patch-fg);
}
.badge-delete {
	background: var(--color-method-delete-bg);
	color: var(--color-method-delete-fg);
}
.meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.meta-row,
.row-meta,
.schema-label {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
}
.label {
	color: var(--color-text-tertiary);
	font-size: 12px;
	line-height: 16px;
}
.chip {
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--color-bg-inset);
	color: var(--color-text-primary);
	font: 12px/18px var(--font-code);
	overflow-wrap: anywhere;
}
.chip-outline {
	border: 1px solid var(--color-border-default);
	background: transparent;
	color: var(--color-text-secondary);
	font-weight: 400;
}
h3 .chip {
	font-weight: 400;
}
.rows {
	border-bottom: 1px solid var(--color-border-subtle);
}
.row {
	display: flex;
	gap: 16px;
	padding: 16px 0;
	border-top: 1px solid var(--color-border-subtle);
}
.row-name {
	display: flex;
	flex: none;
	flex-direction: column;
	gap: 2px;
	width: 168px;
	overflow-wrap: anywhere;
}
.row-name code {
	font-size: 13px;
	font-weight: 500;
	line-height: 20px;
}
.req {
	color: var(--color-text-required);
	font-size: 12px;
	line-height: 16px;
}
.row-detail {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}
.type {
	color: var(--color-text-secondary);
	font: 12px/18px var(--font-code);
}
.row-desc {
	color: var(--color-text-secondary);
	font-size: 13px;
	line-height: 20px;
}
.rows-nested {
	margin-left: 16px;
	padding-left: 16px;
	border-bottom: 0;
	border-left: 2px solid var(--color-border-subtle);
}
.rows-nested > .rows-nested {
	margin-left: 0;
}
.tabs {
	display: flex;
	overflow-x: auto;
	border-bottom: 1px solid var(--color-border-default);
}
.tab {
	height: 36px;
	padding: 0 12px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: transparent;
	color: var(--color-text-secondary);
	font: 500 13px var(--font-ui);
	white-space: nowrap;
	cursor: pointer;
}
.tab[aria-selected='true'] {
	border-bottom-color: var(--color-accent-default);
	color: var(--color-text-primary);
}
.resps {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.resp-head {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	background: transparent;
	color: var(--color-text-primary);
	font: 14px/22px var(--font-ui);
	text-align: left;
	cursor: pointer;
}
.resp.open .resp-head {
	background: var(--color-bg-subtle);
}
.resp-head .chevron {
	color: var(--color-text-tertiary);
}
.resp-code {
	font: 500 13px/20px var(--font-code);
}
.resp-ok {
	color: var(--color-status-success-fg);
}
.resp-err {
	color: var(--color-status-error-fg);
}
.resp-info,
.resp-muted {
	color: var(--color-text-tertiary);
}
.resp-desc {
	flex: 1;
}
.resp-body > .collapse-inner > :first-child {
	margin-top: 12px;
}
.resp-body > .collapse-inner > :last-child {
	margin-bottom: 4px;
}
.schema-label {
	margin-bottom: 4px;
}

/* ---- Try API: the button in the request samples, and the drawer it opens ---- */

.codeblock-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}
/* Always the solid Figma blue with white text: it sits on the dark code header in both themes. */
.btn-try {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 28px;
	padding: 0 10px;
	border: 0;
	border-radius: 6px;
	background: #2563eb;
	color: #ffffff;
	font: 500 12px var(--font-ui);
	cursor: pointer;
}
.btn-try:hover {
	background: #1d4ed8;
}
.btn-try svg {
	width: 14px;
	height: 14px;
}

/* The panel is the layout's third column: the page makes room for it (body padding) while it slides in
   (transform), both on the same curve so they move as one. Only the visible blocks re-lay out while the content
   narrows, thanks to content-visibility on the rest. */
:root {
	--panel-width: 460px;
	--panel-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}
body {
	transition: padding-right 0.32s var(--panel-ease);
}
.drawer-open body {
	padding-right: var(--panel-width);
}
.drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 30;
	display: flex;
	flex-direction: column;
	width: var(--panel-width);
	border-left: 1px solid var(--color-border-default);
	background: var(--color-bg-page);
	transform: translateX(100%);
	visibility: hidden;
	/* its own GPU layer from the start, so the first open doesn't pay to create one mid-animation */
	will-change: transform;
	transition:
		transform 0.32s var(--panel-ease),
		visibility 0s linear 0.32s;
}
.drawer-open .drawer {
	transform: none;
	visibility: visible;
	transition: transform 0.32s var(--panel-ease);
}
/* No room for three columns: the panel covers the page instead. */
@media (max-width: 900px) {
	.drawer-open body {
		padding-right: 0;
	}
	.drawer {
		width: 100vw;
	}
}
.drawer-head {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	height: var(--topbar-height);
	padding: 0 20px;
	border-bottom: 1px solid var(--color-border-default);
	font-size: 14px;
	font-weight: 600;
}
.drawer-close {
	display: flex;
	padding: 6px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--color-text-tertiary);
	cursor: pointer;
}
.drawer-close:hover {
	background: var(--color-bg-inset);
	color: var(--color-text-primary);
}
.drawer-url {
	display: flex;
	flex: none;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 20px;
	border-bottom: 1px solid var(--color-border-default);
}
.drawer-url code {
	min-width: 0;
	overflow: hidden;
	color: var(--color-text-secondary);
	font-size: 13px;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.drawer-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 16px;
	min-height: 0;
	overflow-y: auto;
	padding: 16px 20px 24px;
}
.drawer-request > summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	color: var(--color-text-secondary);
	font-size: 13px;
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}
.drawer-request > summary::-webkit-details-marker {
	display: none;
}
.drawer-request[open] > summary .chevron {
	transform: rotate(90deg);
}
.drawer-request .tryit-form {
	margin-top: 10px;
}
.tryit-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px;
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	background: var(--color-bg-subtle);
}
.drawer-response:empty {
	display: none;
}
.drawer-response.loading {
	opacity: 0.5;
	transition: opacity 0.15s;
}
.drawer-response .codeblock pre {
	min-height: 240px;
}
.resp-summary {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	font-size: 13px;
}
.status-chip {
	padding: 3px 8px;
	border-radius: 4px;
	font: 600 12px/18px var(--font-code);
}
.status-ok {
	background: var(--color-method-get-bg);
	color: var(--color-method-get-fg);
}
.status-info {
	background: var(--color-method-post-bg);
	color: var(--color-method-post-fg);
}
.status-err {
	background: var(--color-method-delete-bg);
	color: var(--color-method-delete-fg);
}
.send-again {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	padding: 4px 6px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--color-text-secondary);
	font: 500 13px var(--font-ui);
	cursor: pointer;
}
.send-again:hover {
	color: var(--color-text-primary);
}
.send-again:disabled {
	opacity: 0.5;
	cursor: progress;
}
.drawer-response .tabs {
	margin-bottom: 12px;
}
.tab-count {
	margin-left: 4px;
	color: var(--color-text-tertiary);
	font-size: 11px;
}
.hdr-list {
	overflow: hidden;
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
}
.hdr-row {
	display: flex;
	gap: 12px;
	padding: 8px 12px;
	border-top: 1px solid var(--color-border-subtle);
	font-size: 12px;
	line-height: 18px;
}
.hdr-row:first-child {
	border-top: 0;
}
.hdr-name {
	flex: none;
	width: 40%;
	color: var(--color-text-secondary);
	overflow-wrap: anywhere;
}
.hdr-value {
	flex: 1;
	min-width: 0;
	color: var(--color-text-primary);
	overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
	body,
	.drawer {
		transition: none !important;
	}
}

/* form controls (the drawer's Request section) */

.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.field-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 500;
}
.field-label code {
	font-size: 13px;
}
.field-group {
	margin-top: 2px;
	color: var(--color-text-tertiary);
	font-size: 12px;
	font-weight: 600;
}
.field-hint {
	color: var(--color-text-tertiary);
	font-size: 12px;
	line-height: 16px;
}
.input {
	width: 100%;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	background: var(--color-bg-surface);
	color: var(--color-text-primary);
	font: 13px var(--font-ui);
}
.input:focus {
	outline: 0;
	border-color: var(--color-accent-default);
	box-shadow: 0 0 0 3px var(--color-accent-subtle);
}
textarea.input {
	height: auto;
	padding: 10px 12px;
	line-height: 20px;
	resize: vertical;
}
.input-code,
input.input[data-in] {
	font-family: var(--font-code);
}
.tryit-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.btn-primary {
	height: 36px;
	padding: 0 16px;
	border: 0;
	border-radius: 6px;
	background: #2563eb;
	color: #ffffff;
	font: 500 13px var(--font-ui);
	white-space: nowrap;
	cursor: pointer;
}
.btn-primary:hover {
	background: #1d4ed8;
}
.btn-primary:disabled {
	opacity: 0.6;
	cursor: progress;
}
.tryit-error {
	padding: 10px 12px;
	border: 1px solid var(--color-status-error-fg);
	border-radius: 6px;
	color: var(--color-status-error-fg);
	font-size: 13px;
}

/* ---- narrow screens: the sidebar gives way to the content ---- */

@media (max-width: 900px) {
	.docs-sidebar {
		display: none;
	}
	.docs-topbar-brand {
		width: auto;
		background: var(--color-bg-page);
		border-right: 0;
		border-bottom: 1px solid var(--color-border-default);
	}
	.docs-topbar-main {
		padding: 0 16px;
	}
	.docs-title,
	.docs-chip {
		display: none;
	}
	.block-inner {
		padding: 32px 16px;
	}
	.row {
		flex-direction: column;
		gap: 8px;
	}
	.row-name {
		width: auto;
	}
}
