.lean-api-docs {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	margin-top: 8px;
}

.lean-api-docs__sidebar {
	position: sticky;
	top: calc(var(--lean-header-height, 92px) + 16px);
	max-height: calc(100vh - var(--lean-header-height, 92px) - 32px);
	overflow: auto;
	background: var(--lean-white);
	border: 1px solid var(--lean-border-soft);
	border-radius: var(--lean-radius-lg);
	box-shadow: var(--lean-shadow);
	padding: 16px;
}

.lean-api-docs__search input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--lean-border-soft);
	border-radius: 8px;
	font-size: 0.875rem;
}

.lean-api-docs__nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 12px;
}

.lean-api-docs__nav-intro,
.lean-api-docs__nav-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	text-decoration: none;
	color: var(--lean-text);
	font-size: 0.875rem;
	line-height: 1.35;
}

.lean-api-docs__nav-intro:hover,
.lean-api-docs__nav-link:hover,
.lean-api-docs__nav-intro.is-active,
.lean-api-docs__nav-link.is-active {
	background: rgba(240, 84, 35, 0.08);
	color: var(--lean-navy);
}

.lean-api-docs__nav-group {
	margin: 12px 0 4px;
	padding: 0 10px;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--lean-text-muted);
}

.lean-api-docs__nav-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--lean-navy);
	color: #fff;
	font-size: 0.625rem;
	font-weight: 800;
}

.lean-api-docs__method {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	padding: 2px 6px;
	border-radius: 6px;
	font-size: 0.625rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	font-family: "JetBrains Mono", monospace;
}

.lean-api-docs__method--get { background: #e8f5e9; color: #2e7d32; }
.lean-api-docs__method--post { background: #e3f2fd; color: #1565c0; }
.lean-api-docs__method--put { background: #fff3e0; color: #ef6c00; }
.lean-api-docs__method--delete { background: #ffebee; color: #c62828; }

.lean-api-docs__main {
	min-width: 0;
}

.lean-api-docs__panel {
	background: var(--lean-white);
	border: 1px solid var(--lean-border-soft);
	border-radius: var(--lean-radius-lg);
	box-shadow: var(--lean-shadow);
	padding: 24px;
}

.lean-api-docs__panel[hidden] {
	display: none !important;
}

.lean-api-docs__hero h2,
.lean-api-docs__endpoint-head h2 {
	margin: 0 0 8px;
	font-size: 1.5rem;
	color: var(--lean-heading);
}

.lean-api-docs__lead,
.lean-api-docs__summary,
.lean-api-docs__operation {
	color: var(--lean-text-muted);
	line-height: 1.6;
}

.lean-api-docs__endpoint-head {
	margin-bottom: 20px;
}

.lean-api-docs__endpoint-title {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.lean-api-docs__urlbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 14px;
	padding: 12px 14px;
	background: #0f172a;
	border-radius: 10px;
}

.lean-api-docs__url {
	color: #e2e8f0;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.8125rem;
	word-break: break-all;
}

.lean-api-docs__copy {
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
}

.lean-api-docs__copy:hover {
	background: rgba(255, 255, 255, 0.2);
}

.lean-api-docs__alert {
	margin: 0 0 12px;
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 0.875rem;
	line-height: 1.5;
}

.lean-api-docs__alert--green { background: #ecfdf5; border-left: 4px solid #10b981; }
.lean-api-docs__alert--red { background: #fef2f2; border-left: 4px solid #ef4444; }
.lean-api-docs__alert--blue { background: #eff6ff; border-left: 4px solid #3b82f6; }
.lean-api-docs__alert--yellow { background: #fffbeb; border-left: 4px solid #f59e0b; }

.lean-api-docs__section {
	margin-top: 24px;
}

.lean-api-docs__section h3,
.lean-api-docs__code-head h3 {
	margin: 0 0 12px;
	font-size: 1rem;
}

.lean-api-docs__code-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.lean-api-docs__table-wrap {
	overflow: auto;
}

.lean-api-docs__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.lean-api-docs__table th,
.lean-api-docs__table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--lean-border-soft);
	text-align: left;
	vertical-align: top;
}

.lean-api-docs__table th {
	background: #f8fafc;
	font-weight: 700;
}

.lean-api-docs__code {
	margin: 0;
	padding: 16px;
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 10px;
	overflow: auto;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.8125rem;
	line-height: 1.55;
}

.lean-api-docs__content {
	font-size: 0.9375rem;
	line-height: 1.65;
}

.lean-api-docs__content .notices,
.lean-api-docs__content .notice {
	margin: 12px 0;
	padding: 12px 14px;
	border-radius: 8px;
}

.lean-api-docs__content .notices.green,
.lean-api-docs__content .notice { background: #ecfdf5; }
.lean-api-docs__content .notices.red { background: #fef2f2; }
.lean-api-docs__content .notices.blue { background: #eff6ff; }
.lean-api-docs__content .notices.yellow { background: #fffbeb; }

.lean-api-docs__content table {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
	font-size: 0.875rem;
}

.lean-api-docs__content th,
.lean-api-docs__content td {
	padding: 8px 10px;
	border: 1px solid var(--lean-border-soft);
}

.lean-api-docs__content pre {
	background: #0f172a;
	color: #e2e8f0;
	padding: 14px;
	border-radius: 8px;
	overflow: auto;
}

.lean-api-docs__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 24px;
}

.lean-api-docs__card {
	padding: 16px;
	border: 1px solid var(--lean-border-soft);
	border-radius: 10px;
	background: #f8fafc;
}

.lean-api-docs__card h3 {
	margin: 0 0 10px;
	font-size: 0.9375rem;
}

.lean-api-docs__card ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lean-api-docs__card li + li {
	margin-top: 8px;
}

.lean-api-docs__card a {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: var(--lean-navy);
	font-size: 0.875rem;
}

.lean-api-docs__nav-link.is-hidden,
.lean-api-docs__nav-group.is-hidden {
	display: none;
}

@media (max-width: 960px) {
	.lean-api-docs {
		grid-template-columns: 1fr;
	}

	.lean-api-docs__sidebar {
		position: static;
		max-height: none;
	}
}
