/* AI API guide — calm docs layout, brand #2a4365 */
.ag-hero {
	padding: 40px 0 36px;
	background:
		linear-gradient(180deg, #eef3f8 0%, #f7fafc 100%);
	border-bottom: 1px solid #e2e8f0;
}

.ag-crumb {
	margin: 0 0 16px;
	font-size: 13px;
	color: #718096;
}

.ag-crumb a {
	color: #4a5568;
	text-decoration: none;
}

.ag-crumb a:hover {
	color: #2a4365;
	text-decoration: underline;
}

.ag-crumb span {
	margin: 0 8px;
	opacity: 0.5;
}

.ag-hero h1 {
	margin: 0 0 12px;
	font-size: 30px;
	font-weight: 700;
	color: #1a365d;
	letter-spacing: -0.02em;
}

.ag-lead {
	margin: 0 0 16px;
	max-width: 42em;
	font-size: 16px;
	line-height: 1.7;
	color: #4a5568;
}

.ag-hero-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.ag-hero-links a {
	font-size: 14px;
	font-weight: 600;
	color: #2a4365;
	text-decoration: none;
}

.ag-hero-links a:hover {
	text-decoration: underline;
}

.ag-main {
	padding: 40px 0 72px;
	background: #fff;
}

.ag-layout {
	max-width: 820px;
	margin: 0 auto;
}

/* Beat Bootstrap fixed .container widths so overview/tabs can use page width */
.container.ag-layout--wide {
	width: auto;
	max-width: 1120px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

@media (min-width: 768px) {
	.container.ag-layout--wide {
		width: calc(100% - 48px);
		max-width: 1120px;
	}
}

.ag-anchor {
	display: block;
	position: relative;
	top: -96px;
	height: 0;
	width: 0;
	overflow: hidden;
	visibility: hidden;
	pointer-events: none;
}

/* —— Overview (above page tabs) —— */
.ag-overview {
	margin-bottom: 8px;
}

.ag-ov-lead {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 28px 48px;
	align-items: start;
	padding-bottom: 36px;
	margin-bottom: 36px;
	border-bottom: 1px solid #edf2f7;
}

.ag-ov-lead h2,
.ag-ov-scenes h2,
.ag-ov-activate h2 {
	margin: 0 0 14px;
	font-size: 22px;
	font-weight: 700;
	color: #1a365d;
}

.ag-ov-lead-copy .ag-intro {
	margin: 0;
	font-size: 15px;
	line-height: 1.75;
	color: #4a5568;
	max-width: 38em;
}

.ag-ov-points {
	margin: 0;
	padding: 4px 0 0;
	list-style: none;
	display: grid;
	gap: 14px;
}

.ag-ov-points li {
	position: relative;
	padding-left: 18px;
	font-size: 14px;
	line-height: 1.65;
	color: #2d3748;
}

.ag-ov-points li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #2a4365;
}

.ag-ov-scenes {
	padding-bottom: 36px;
	margin-bottom: 36px;
	border-bottom: 1px solid #edf2f7;
}

.ag-scene-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px 24px;
}

.ag-scene-item {
	padding: 18px 18px 16px;
	border-left: 3px solid #2a4365;
	background: linear-gradient(180deg, #f7fafc 0%, #fff 100%);
}

.ag-scene-item h3 {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 700;
	color: #2a4365;
}

.ag-scene-item .ag-plain-list {
	margin: 0;
	padding-left: 1.1em;
	font-size: 14px;
	line-height: 1.7;
}

.ag-ov-activate {
	padding-bottom: 36px;
	margin-bottom: 28px;
	border-bottom: 1px solid #edf2f7;
}

.ag-ov-activate-head {
	margin-bottom: 20px;
	max-width: 52em;
}

.ag-ov-activate-head .ag-intro {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: #4a5568;
}

.ag-step-strip {
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px 20px;
}

.ag-step-strip > li {
	display: grid;
	grid-template-columns: 32px 1fr;
	gap: 12px;
	align-items: start;
	padding: 4px 0;
}

.ag-step-n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #edf2f7;
	color: #2a4365;
	font-size: 13px;
	font-weight: 700;
}

.ag-step-strip strong {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
	color: #1a365d;
}

.ag-step-strip p {
	margin: 0;
	font-size: 13px;
	line-height: 1.65;
	color: #4a5568;
}

/* —— Page-level tabs (API / 开发) —— */
.ag-page-tabs {
	margin-bottom: 28px;
}

.ag-page-tablist {
	position: sticky;
	top: 110px;
	z-index: 20;
	display: flex;
	gap: 0;
	margin: 0 0 28px;
	padding: 0;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid #e2e8f0;
	backdrop-filter: blur(6px);
}

.ag-page-tablist button {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 14px 20px;
	font-size: 15px;
	font-weight: 700;
	color: #718096;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.ag-page-tablist button.is-on {
	color: #2a4365;
	border-bottom-color: #2a4365;
}

.ag-page-tablist button:hover {
	color: #2a4365;
}

.ag-page-panel[hidden] {
	display: none !important;
}

.ag-page-panel .ag-block:last-child {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: 8px;
}

.ag-block {
	margin-bottom: 40px;
	padding-bottom: 36px;
	border-bottom: 1px solid #edf2f7;
}

.ag-block:last-of-type {
	border-bottom: 0;
}

.ag-block h2 {
	margin: 0 0 16px;
	font-size: 20px;
	font-weight: 700;
	color: #1a365d;
}

.ag-intro {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.7;
	color: #4a5568;
}

.ag-kv {
	margin: 0;
	display: grid;
	gap: 0;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
}

.ag-kv > div {
	display: grid;
	grid-template-columns: 100px 1fr;
	gap: 12px;
	padding: 12px 16px;
	border-top: 1px solid #edf2f7;
	align-items: baseline;
}

.ag-kv > div:first-child {
	border-top: 0;
}

.ag-kv dt {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: #718096;
}

.ag-kv dd {
	margin: 0;
	font-size: 14px;
	color: #2d3748;
	word-break: break-all;
}

.ag-kv code,
.ag-block code,
.ag-note code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12.5px;
	padding: 1px 5px;
	border-radius: 3px;
	background: #edf2f7;
	color: #1a365d;
}

.ag-kv dd code {
	margin-right: 6px;
}

.ag-note {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.65;
	color: #718096;
}

.ag-note a {
	color: #2b6cb0;
}

.ag-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 0;
	border-bottom: 1px solid #e2e8f0;
}

.ag-tabs button {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 600;
	color: #718096;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.ag-tabs button.is-on {
	color: #2a4365;
	border-bottom-color: #2a4365;
}

.ag-code {
	margin: 0;
	padding: 16px 18px;
	overflow-x: auto;
	background: #1a202c;
	border-radius: 0 0 10px 10px;
	color: #e2e8f0;
	font-size: 12.5px;
	line-height: 1.55;
}

.ag-code[hidden] {
	display: none !important;
}

.ag-code code {
	background: transparent;
	color: inherit;
	padding: 0;
	font-size: inherit;
}

.ag-checklist,
.ag-plain-list {
	margin: 0 0 12px;
	padding-left: 1.2em;
	font-size: 15px;
	line-height: 1.75;
	color: #4a5568;
}

.ag-ide-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 28px;
	margin-top: 8px;
}

.ag-ide-grid h3 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: #2a4365;
}

.ag-ide-grid p {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: #4a5568;
}

.ag-ide-toc {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 4px 0 18px;
}

.ag-ide-toc a {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 0 10px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #2a4365;
	text-decoration: none;
	background: #f7fafc;
}

.ag-ide-toc a:hover {
	border-color: #cbd5e0;
	background: #edf2f7;
}

.ag-ide-accordion {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.ag-ide-item {
	border-top: 1px solid #edf2f7;
	margin: 0;
}

.ag-ide-item:first-child {
	border-top: 0;
}

.ag-ide-item > summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	font-size: 15px;
	font-weight: 700;
	color: #1a365d;
	background: #fff;
}

.ag-ide-item > summary::-webkit-details-marker {
	display: none;
}

.ag-ide-item > summary::after {
	content: '+';
	margin-left: auto;
	color: #a0aec0;
	font-weight: 400;
	font-size: 16px;
}

.ag-ide-item[open] > summary {
	background: #f7fafc;
	border-bottom: 1px solid #edf2f7;
}

.ag-ide-item[open] > summary::after {
	content: '−';
}

.ag-ide-item-title {
	min-width: 0;
}

.ag-ide-item-tag {
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #4a5568;
	background: #edf2f7;
	border-radius: 4px;
	padding: 2px 7px;
}

.ag-ide-item-body {
	padding: 14px 16px 18px;
}

.ag-ide-summary {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.65;
	color: #4a5568;
}

.ag-ide-steps {
	margin: 0 0 14px;
	padding-left: 1.25em;
	font-size: 14px;
	line-height: 1.75;
	color: #4a5568;
}

.ag-ide-steps li + li {
	margin-top: 8px;
}

.ag-ide-steps a {
	color: #2b6cb0;
}

.ag-ide-tips {
	margin: 0 0 10px;
	padding: 12px 14px;
	border-radius: 8px;
	background: #f7fafc;
	border: 1px solid #e2e8f0;
}

.ag-ide-tips strong {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	color: #2a4365;
}

.ag-ide-tips ul {
	margin: 0;
	padding-left: 1.15em;
	font-size: 13px;
	line-height: 1.7;
	color: #4a5568;
}

.ag-ide-tips li + li {
	margin-top: 4px;
}

.ag-ide-common {
	margin-top: 22px;
}

.ag-ide-common h3 {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 700;
	color: #2a4365;
}

.ag-faq details {
	border-top: 1px solid #edf2f7;
	padding: 12px 0;
}

.ag-faq details:first-child {
	border-top: 0;
	padding-top: 0;
}

.ag-faq summary {
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	color: #2d3748;
	list-style: none;
}

.ag-faq summary::-webkit-details-marker {
	display: none;
}

.ag-faq summary::after {
	content: '+';
	float: right;
	color: #a0aec0;
	font-weight: 400;
}

.ag-faq details[open] summary::after {
	content: '−';
}

.ag-faq p {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.7;
	color: #4a5568;
}

.ag-faq a {
	color: #2b6cb0;
}

.ag-foot-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding-top: 8px;
}

.ag-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 18px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	background: #2a4365;
	color: #fff !important;
	border: 1px solid #2a4365;
}

.ag-btn:hover {
	background: #1a365d;
}

.ag-btn--ghost {
	background: #fff;
	color: #2a4365 !important;
}

.ag-btn--ghost:hover {
	background: #edf2f7;
}

@media (min-width: 992px) and (max-width: 1200px) {
	.ag-page-tablist {
		top: 90px;
	}
}

@media (max-width: 991px) {
	.ag-page-tablist {
		top: 56px;
	}
}

@media (max-width: 767px) {
	.ag-hero h1 {
		font-size: 24px;
	}

	.ag-ov-lead {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.ag-scene-grid,
	.ag-step-strip {
		grid-template-columns: 1fr;
	}

	.ag-page-tablist button {
		flex: 1;
		padding: 12px 10px;
		font-size: 14px;
		text-align: center;
	}

	.ag-kv > div {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.ag-ide-grid {
		grid-template-columns: 1fr;
	}

	.ag-ide-item > summary {
		padding: 12px 14px;
	}

	.ag-ide-item-body {
		padding: 12px 14px 16px;
	}
}
