/*  ============================================================
	 BotHub — styles.css
	 Color palette:
		 --bg-deep:		#0c1520	 (darkest bg)
		 --bg-main:		#0f1c2d	 (page bg)
		 --bg-card:		#132035	 (card bg)
		 --bg-dark:		#0a1320	 (darker sections)
		 --border:		 #1e3248	 (subtle border)
		 --border-hi:	#2a4a6b	 (highlight border)
		 --text-main:	#dce8f5	 (body text)
		 --text-muted: #7a9bb5	 (secondary text)
		 --accent:		 #1aa6fd	 (brand blue)
		 --accent-dk:	#1a7fc4	 (darker blue)
	============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
	--bg-deep:		#0c1520;
	--bg-main:		#0f1c2d;
	--bg-card:		#132035;
	--bg-dark:		#0a1320;
	--border:		 #1e3248;
	--border-hi:	#2a4a6b;
	--text-main:	#dce8f5;
	--text-muted: #7a9bb5;
	--accent:		 #1aa6fd;
	--accent-dk:	#1a7fc4;
	--header-h:	 72px;
	--radius:		 12px;
	--radius-sm:	8px;
	--transition: .18s ease;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Inter', system-ui, sans-serif;
	background-color: var(--bg-main);
	color: var(--text-main);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-dk); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
	 LAYOUT UTILITY
	 ============================================================ */
.container {
	width: 100%;
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ============================================================
	 BUTTONS
	 ============================================================ */
.btn-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	background: linear-gradient(135deg, var(--accent-dk) 0%, var(--accent) 100%);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	border-radius: var(--radius-sm);
	white-space: nowrap;
	transition: filter var(--transition);
}
.btn-cta:hover { filter: brightness(1.15); }

.btn-cta-lg {
	padding: 14px 34px;
	font-size: 16px;
	border-radius: var(--radius);
}


/* ============================================================
	 HEADER
	 ============================================================ */
#site-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	height: var(--header-h);
	background: var(--bg-deep);
	border-bottom: 1px solid transparent;
	z-index: 100;
	transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

#site-header.scrolled {
	background: rgba(12, 21, 32, 0.96);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom-color: var(--border);
	box-shadow: 0 4px 24px rgba(0,0,0,.45);
}

.header-inner {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 24px;
	height: 100%;
	display: flex;
	align-items: center;
	gap: 0;
}

/* Brand */
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
.brand-logo { height: 40px; width: 40px; object-fit: contain; }
.brand-logo-sm { height: 32px; width: 32px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1; }
.brand-bot { color: #fff; }
.brand-hub { color: var(--accent); }

/* Desktop nav */
.desktop-nav {
	display: flex;
	align-items: center;
	gap: 2px;
	margin-left: 36px;
}
.nav-link {
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-muted);
	border-radius: var(--radius-sm);
	transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }

/* Header right */
.header-right {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

/* Language switcher */
.lang-switcher { position: relative; }

.lang-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-muted);
	border-radius: var(--radius-sm);
	transition: color var(--transition), background var(--transition);
}
.lang-btn:not([disabled]):hover, .lang-btn.open { color: #fff; background: rgba(255,255,255,.06); }
.lang-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.lang-arrow { font-size: 10px; transition: transform .2s ease; }
.lang-btn.open .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	min-width: 130px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: 0 8px 32px rgba(0,0,0,.5);
	overflow: hidden;
	z-index: 200;
}
.lang-dropdown.open { display: block; }

.lang-option {
	display: block;
	width: 100%;
	text-align: left;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-muted);
	transition: color var(--transition), background var(--transition);
}
.lang-option:hover { color: #fff; background: rgba(255,255,255,.06); }
.lang-option.active { color: var(--accent); background: rgba(26,166,253,.08); }

/* Hamburger */
.hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 38px;
	height: 38px;
	padding: 6px;
	margin-left: auto;
	border-radius: var(--radius-sm);
	transition: background var(--transition);
}
.hamburger:hover { background: rgba(255,255,255,.07); }
.hamburger span {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--text-muted);
	border-radius: 2px;
	transition: background var(--transition);
}
.hamburger:hover span { background: #fff; }


/* ============================================================
	 MOBILE DRAWER
	 ============================================================ */
.drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 150;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.mobile-drawer {
	position: fixed;
	top: 0; right: 0;
	width: 270px;
	height: 100%;
	background: var(--bg-deep);
	border-left: 1px solid var(--border);
	z-index: 200;
	transform: translateX(110%);
	transition: transform .3s cubic-bezier(.4,0,.2,1);
	display: flex;
	flex-direction: column;
	padding-top: 80px;
}
.mobile-drawer.open { transform: translateX(0); }

.drawer-close {
	position: absolute;
	top: 18px; right: 18px;
	width: 36px; height: 36px;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px;
	color: var(--text-muted);
	border-radius: var(--radius-sm);
	transition: color var(--transition), background var(--transition);
}
.drawer-close:hover { color: #fff; background: rgba(255,255,255,.07); }

.drawer-nav { display: flex; flex-direction: column; }
.drawer-link {
	padding: 14px 24px;
	font-size: 15px;
	font-weight: 500;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border);
	transition: color var(--transition), background var(--transition);
}
.drawer-link:hover { color: #fff; background: rgba(255,255,255,.04); }

.drawer-lang {
	display: flex;
	gap: 8px;
	padding: 20px 24px 0;
}
.drawer-lang-btn {
	flex: 1;
	padding: 9px;
	font-size: 13px;
	font-weight: 600;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	color: var(--text-muted);
	transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.drawer-lang-btn:not([disabled]):hover { color: #fff; border-color: var(--border-hi); }
.drawer-lang-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(26,166,253,.08); }
.drawer-lang-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.drawer-cta { margin: 20px 24px; justify-content: center; }


/* ============================================================
	 SECTIONS — general
	 ============================================================ */
section { padding: 80px 0; }

/* Offset for sticky header */
section[id] { scroll-margin-top: var(--header-h); }

.section-dark { background: var(--bg-dark); }

.section-head {
	text-align: center;
	margin-bottom: 52px;
}
.section-badge {
	display: inline-block;
	padding: 4px 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--accent);
	background: rgba(26,166,253,.1);
	border-radius: 100px;
	margin-bottom: 14px;
}
.section-title {
	font-size: 32px;
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
	margin-bottom: 12px;
}
.section-sub {
	font-size: 16px;
	color: var(--text-muted);
	max-width: 520px;
	margin: 0 auto;
}


/* ============================================================
	 INTRODUCTION
	 ============================================================ */
/* Hero banner */
.hero-banner {
	position: relative;
	width: 100%;
	max-height: 480px;
	overflow: hidden;
	margin-top: var(--header-h);
}
.hero-img {
	width: 100%;
	height: 100%;
	max-height: 480px;
	object-fit: cover;
	object-position: center;
	display: block;
}
.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom,
		rgba(15, 28, 45, .15) 0%,
		rgba(15, 28, 45, .55) 65%,
		var(--bg-main) 100%
	);
}

/* Intro text pairs */
.intro-pair {
	text-align: center;
	padding: 56px 0 0;
}
.intro-pair:last-of-type { padding-bottom: 8px; }

.intro-title {
	font-size: clamp(26px, 4vw, 46px);
	font-weight: 800;
	color: #fff;
	line-height: 1.18;
	margin-bottom: 16px;
	margin-left: auto;
	margin-right: auto;
}
.intro-title2 {
	font-size: clamp(22px, 3.2vw, 34px);
	font-weight: 700;
	color: #fff;
	line-height: 1.25;
	margin-bottom: 12px;
}
.intro-sub {
	font-size: 16px;
	color: var(--text-muted);
	max-width: 800px;
	margin: 0 auto;
}

/* Divider */
.section-divider {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 52px auto;
	max-width: 600px;
}
.divider-line {
	flex: 1;
	height: 1px;
	background: var(--border);
}
.divider-icon {
	width: 36px; height: 36px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--border-hi);
	color: var(--accent);
	font-size: 15px;
	flex-shrink: 0;
}

/* Feature cards */
.feature-cards {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 52px;
	padding-bottom: 16px;
}
.feature-card {
	display: flex;
	gap: 20px;
	padding: 24px 28px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color var(--transition);
}
.feature-card:hover { border-color: var(--border-hi); }

.feature-icon {
	flex-shrink: 0;
	width: 52px; height: 52px;
	display: flex; align-items: center; justify-content: center;
	background: rgba(26,166,253,.1);
	border-radius: var(--radius-sm);
	color: var(--accent);
	font-size: 22px;
	transition: background var(--transition);
}
.feature-card:hover .feature-icon { background: rgba(26,166,253,.18); }

.feature-title {
	font-size: 17px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 8px;
}
.feature-desc {
	font-size: 14px;
	color: var(--text-muted);
	line-height: 1.7;
}


/* ============================================================
	 TOOLS
	 ============================================================ */
.tools-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.tool-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 28px 24px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color var(--transition), box-shadow var(--transition);
}
.tool-card:hover {
	border-color: rgba(26,166,253,.45);
	box-shadow: 0 4px 24px rgba(26,166,253,.07);
}

.tool-card-icon {
	width: 48px; height: 48px;
	display: flex; align-items: center; justify-content: center;
	background: rgba(26,166,253,.1);
	border-radius: var(--radius-sm);
	color: var(--accent);
	font-size: 22px;
	flex-shrink: 0;
	transition: background var(--transition);
}
.tool-card:hover .tool-card-icon { background: rgba(26,166,253,.18); }

.tool-card-title {
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.tool-card-desc {
	font-size: 13px;
	color: var(--text-muted);
	line-height: 1.7;
}


/* ============================================================
	 PARTNERS
	 ============================================================ */
.partners-wrap { display: flex; justify-content: center; }
.partners-img {
	max-width: 900px;
	width: 100%;
	height: auto;
	display: block;
}


/* ============================================================
	 TELEGRAM CTA SECTION
	 ============================================================ */
.section-cta { padding: 80px 0; }

.cta-box {
	position: relative;
	max-width: 760px;
	margin: 0 auto;
	padding: 64px 48px;
	background: linear-gradient(135deg, #0f2540 0%, #132d50 100%);
	border: 1px solid var(--border-hi);
	border-radius: 20px;
	text-align: center;
	overflow: hidden;
}
.cta-glow {
	pointer-events: none;
	position: absolute;
	inset: 0;
	border-radius: 20px;
	background: radial-gradient(ellipse at 50% 0%, rgba(26,166,253,.2) 0%, transparent 65%);
}

.cta-tg-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px; height: 64px;
	border-radius: 50%;
	background: rgba(26,166,253,.15);
	border: 1px solid rgba(26,166,253,.3);
	color: var(--accent);
	font-size: 28px;
	margin-bottom: 24px;
}

.cta-title {
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 800;
	color: #fff;
	margin-bottom: 14px;
	position: relative;
}
.cta-desc {
	font-size: 16px;
	color: var(--text-muted);
	max-width: 500px;
	margin: 0 auto 32px;
	position: relative;
}

.cta-message {
	font-size: 20px;
	color: var(--text-muted);
	max-width: 500px;
	margin: 0 auto 32px;
	position: relative;
}
.cta-box .btn-cta-lg { position: relative; }

.cta-avatar {
	position: relative;
	display: block;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	border: 1px solid rgba(26,166,253,.3);
	background: rgba(26,166,253,.08);
	object-fit: cover;
	margin: 0 auto 24px;
}

.bot-page-section {
	min-height: calc(100vh - var(--header-h) - 96px);
	display: flex;
	align-items: center;
	padding-top: var(--header-h);
}


/* ============================================================
	 CONTACTS
	 ============================================================ */
.contacts-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
}

.contact-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 28px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color var(--transition), background var(--transition);
	min-width: 240px;
}
.contact-card:hover { border-color: rgba(26,166,253,.45); background: rgba(26,166,253,.04); }

.contact-icon {
	width: 44px; height: 44px;
	display: flex; align-items: center; justify-content: center;
	background: rgba(26,166,253,.1);
	border-radius: var(--radius-sm);
	color: var(--accent);
	font-size: 20px;
	flex-shrink: 0;
	transition: background var(--transition);
}
.contact-card:hover .contact-icon { background: rgba(26,166,253,.2); }

.contact-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--text-muted);
	margin-bottom: 3px;
}
.contact-value {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
}


/* ============================================================
	 FOOTER
	 ============================================================ */
#site-footer {
	background: var(--bg-deep);
	border-top: 1px solid var(--border);
	padding: 40px 0 32px;
}

.footer-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--border);
}

.footer-brand { gap: 8px; }
.footer-brand .brand-name { font-size: 18px; }

.footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 24px;
	align-items: center;
}
.footer-link {
	font-size: 14px;
	color: var(--text-muted);
	transition: color var(--transition);
}
.footer-link:hover { color: #fff; }

.footer-copy {
	padding-top: 24px;
	text-align: center;
	font-size: 13px;
	color: #3e5a72;
}


/* ============================================================
	 RESPONSIVE — Tablet	≤ 900px
	 ============================================================ */
@media (max-width: 900px) {
	.tools-grid { grid-template-columns: repeat(2, 1fr); }
	.section-title { font-size: 26px; }
}

/* ============================================================
	 RESPONSIVE — Mobile	≤ 680px
	 ============================================================ */
@media (max-width: 680px) {
	:root { --header-h: 64px; }

	/* Show hamburger, hide desktop nav + right panel */
	.desktop-nav, .header-right { display: none; }
	.hamburger { display: flex; }

	.brand-logo { height: 34px; width: 34px; }
	.brand-name { font-size: 20px; }

	/* 1 column tools grid */
	.tools-grid { grid-template-columns: 1fr; }

	/* Hero shorter on mobile */
	.hero-img { max-height: 300px; }

	/* Feature cards stack naturally */
	.feature-card { flex-direction: column; gap: 14px; }

	/* CTA box compact */
	.cta-box { padding: 40px 24px; }

	/* Footer stacks */
	.footer-top { flex-direction: column; align-items: flex-start; }
	.footer-nav { gap: 6px 16px; }

	/* Contacts full width */
	.contact-card { width: 100%; min-width: unset; }

	.intro-pair { padding-top: 40px; }
	.section-divider { margin: 36px auto; }
	.feature-cards { margin-top: 36px; }
	section { padding: 60px 0; }
	.cta-box .cta-title { font-size: 22px; } .cta-message { font-size: 16px; }
}

/* ============================================================
	 RESPONSIVE — Small mobile	≤ 420px
	 ============================================================ */
@media (max-width: 420px) {
	.container { padding: 0 16px; }
	.section-title { font-size: 22px; }
	.intro-title { font-size: 24px; }
	.intro-title2 { font-size: 20px; }
}


/* ============================================================
	 ACTIVE NAV LINK (current page)
	 ============================================================ */
.nav-link--active {
	color: var(--accent) !important;
}


/* ============================================================
	 API PAGE LAYOUT
	 ============================================================ */

/* Override general section padding for API docs */
.doc-section { padding: 0; }

.api-layout {
	display: flex;
	align-items: flex-start;
	padding-top: var(--header-h);
	min-height: 100vh;
	max-width: 1360px;
	margin: 0 auto;
	width: 100%;
}


/* ── Sidebar ─────────────────────────────────────────────── */
.api-sidebar {
	width: 230px;
	flex-shrink: 0;
	position: sticky;
	top: var(--header-h);
	height: calc(100vh - var(--header-h));
	overflow-y: auto;
	border-right: 1px solid var(--border);
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}

.api-sidebar-inner {
	padding: 2rem 0 2rem 1.5rem;
}

.api-sidebar-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--text-muted);
	margin-bottom: 1rem;
	padding-left: 0.75rem;
}

.api-sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.api-sidebar-item {
	display: block;
	padding: 0.45rem 0.75rem;
	color: var(--text-muted);
	text-decoration: none;
	border-radius: var(--radius-sm);
	font-size: 13.5px;
	font-weight: 500;
	transition: color var(--transition), background var(--transition);
	border-left: 2px solid transparent;
}

.api-sidebar-item:hover {
	color: var(--text-main);
	background: rgba(26,166,253,.06);
}

.api-sidebar-item.active {
	color: var(--accent);
	background: rgba(26,166,253,.1);
	border-left-color: var(--accent);
}


/* ── Main content ────────────────────────────────────────── */
.api-content {
	flex: 1;
	min-width: 0;
	padding: 3rem 3.5rem 5rem 3rem;
}


/* ── Section titles ──────────────────────────────────────── */
.doc-section {
	margin-bottom: 3.5rem;
	scroll-margin-top: calc(var(--header-h) + 24px);
}

.doc-section-title {
	font-size: clamp(1.4rem, 2.5vw, 2rem);
	font-weight: 800;
	color: var(--accent);
	padding-bottom: 0.75rem;
	margin-bottom: 1.25rem;
	position: relative;
}

.doc-section-title::after {
	content: '';
	position: absolute;
	bottom: 0; left: 0;
	width: 100%; height: 1px;
	background: linear-gradient(to right, rgba(26,166,253,.35), rgba(26,166,253,.06), transparent);
}

.doc-section-body {
	color: var(--text-muted);
	line-height: 1.75;
	font-size: 14px;
}

.doc-section-body p { margin-bottom: 0.75rem; }
.doc-section-body strong { color: var(--text-main); }

.doc-subtitle {
	font-size: 15px;
	font-weight: 700;
	color: var(--text-main);
	margin: 1.5rem 0 0.75rem;
}

.doc-link {
	color: var(--accent);
	text-decoration: none;
	border-bottom: 1px solid rgba(26,166,253,.35);
	transition: border-color var(--transition);
}
.doc-link:hover { border-color: var(--accent); }

.doc-inline-code {
	background: rgba(26,166,253,.12);
	color: var(--accent);
	padding: 0.1em 0.4em;
	border-radius: 4px;
	font-family: 'Courier New', monospace;
	font-size: 0.88em;
	border: 1px solid rgba(26,166,253,.2);
}


/* ── Code blocks ─────────────────────────────────────────── */
.doc-code {
	background: rgba(10, 20, 36, 0.7);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius-sm);
	padding: 1rem 1rem 1rem 1.1rem;
	margin: 0.75rem 0;
	position: relative;
	overflow: hidden;
}

.doc-code pre {
	margin: 0;
	white-space: pre-wrap;
	color: var(--text-main);
	font-family: 'Courier New', monospace;
	font-size: 13px;
	line-height: 1.65;
	max-height: 320px;
	overflow-y: auto;
	padding-right: 2.5rem;
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}

.doc-copy-btn {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	background: rgba(26,166,253,.08);
	border: 1px solid rgba(26,166,253,.2);
	color: var(--accent);
	padding: 0;
	width: 30px; height: 30px;
	border-radius: 6px;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	font-size: 14px;
	transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.doc-copy-btn:hover {
	background: rgba(26,166,253,.18);
	border-color: rgba(26,166,253,.45);
}
.doc-copy-btn.copied {
	background: rgba(26,166,253,.22);
	border-color: var(--accent);
}

.doc-copy-check { display: none; }
.doc-copy-btn.copied .fa-copy { display: none; }
.doc-copy-btn.copied .doc-copy-check {
	display: block;
	color: #4ade80;
}


/* ── API groups ──────────────────────────────────────────── */
.api-group {
	margin: 2rem 0 2.5rem;
}

.api-group-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--text-main);
	margin-bottom: 0.3rem;
}

.api-group-desc {
	font-size: 13px;
	color: var(--text-muted);
	margin-bottom: 1rem;
}


/* ── API endpoint accordion ──────────────────────────────── */
.api-endpoint {
	background: rgba(13, 25, 42, 0.6);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	margin-bottom: 8px;
	overflow: hidden;
	transition: border-color var(--transition);
}

.api-endpoint:hover {
	border-color: var(--border-hi);
}

.api-endpoint.active {
	border-color: rgba(26,166,253,.4);
}

.api-ep-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem 1.25rem;
	cursor: pointer;
	background: rgba(0,0,0,.15);
	transition: background var(--transition);
	position: relative;
}

.api-ep-header:hover {
	background: rgba(26,166,253,.06);
}

.api-ep-method {
	background: linear-gradient(135deg, var(--accent), var(--accent-dk));
	color: #fff;
	padding: 0.2rem 0.65rem;
	border-radius: 4px;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: .04em;
	min-width: 52px;
	text-align: center;
	flex-shrink: 0;
}

.api-ep-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.api-ep-path {
	font-family: 'Courier New', monospace;
	color: var(--text-main);
	font-size: 14px;
	font-weight: 600;
}

.api-ep-summary {
	color: var(--text-muted);
	font-size: 12.5px;
}

.api-ep-toggle {
	flex-shrink: 0;
}

.api-ep-toggle-icon {
	color: var(--text-muted);
	font-size: 14px;
	transition: transform var(--transition), color var(--transition);
	display: block;
}

.api-endpoint.active .api-ep-toggle-icon {
	transform: rotate(180deg);
	color: var(--accent);
}

.api-ep-body {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: opacity .2s ease;
}

.api-endpoint.active .api-ep-body {
	max-height: none;
	overflow: visible;
	opacity: 1;
	padding: 1.5rem 1.25rem;
}

.api-ep-desc {
	margin-bottom: 1.25rem;
	color: var(--text-muted);
	font-size: 13.5px;
	line-height: 1.7;
}
.api-ep-desc p { margin-bottom: 0.5rem; }
.api-ep-desc strong { color: var(--text-main); }

.api-ep-params {
	background: rgba(0,0,0,.2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 1rem 1.1rem;
	margin-bottom: 1.25rem;
	font-size: 13px;
	color: var(--text-muted);
}

.api-ep-params h4 {
	font-size: 13px;
	font-weight: 700;
	color: var(--accent);
	margin-bottom: 0.65rem;
}

.api-ep-params ul {
	margin-left: 1.2rem;
	line-height: 1.7;
}

.api-ep-params li {
	list-style: none;
	margin-bottom: 0.4rem;
}

.api-ep-params code {
	background: rgba(26,166,253,.12);
	color: var(--accent);
	padding: 0.1em 0.35em;
	border-radius: 3px;
	font-family: 'Courier New', monospace;
	font-size: 0.88em;
	border: 1px solid rgba(26,166,253,.18);
}

.api-code-block { margin-bottom: 1.25rem; }

.api-code-title {
	font-size: 12px;
	font-weight: 700;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-bottom: 0.4rem;
}


/* ── Error table ─────────────────────────────────────────── */
.doc-error-table {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 0.75rem;
}

.doc-error-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.5rem 0.85rem;
	background: rgba(0,0,0,.2);
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 13px;
}

.doc-error-code {
	font-family: 'Courier New', monospace;
	font-weight: 700;
	color: var(--accent);
	min-width: 36px;
}

.doc-error-msg {
	color: var(--text-muted);
}


/* ── Mobile sidebar: horizontal strip ────────────────────── */
@media (max-width: 900px) {
	.api-layout {
		flex-direction: column;
		align-items: stretch;
	}

	.api-sidebar {
		width: 100%;
		height: auto;
		position: static;
		border-right: none;
		border-bottom: 1px solid var(--border);
		overflow-x: auto;
		overflow-y: hidden;
	}

	.api-sidebar-inner {
		padding: 0.75rem 1rem;
		display: flex;
		align-items: center;
		gap: 0.75rem;
		white-space: nowrap;
	}

	.api-sidebar-label { display: none; }

	.api-sidebar-nav {
		flex-direction: row;
		gap: 4px;
	}

	.api-sidebar-item {
		border-left: none;
		border-bottom: 2px solid transparent;
		border-radius: 0;
		padding: 0.45rem 0.85rem;
		font-size: 13px;
	}

	.api-sidebar-item.active {
		border-bottom-color: var(--accent);
		border-left: none;
		background: transparent;
	}

	.api-content {
		padding: 2rem 1.5rem 4rem;
	}
}

@media (max-width: 680px) {
	.api-content {
		padding: 1.5rem 1rem 3rem;
	}

	.api-ep-header {
		padding: 0.75rem 1rem;
		gap: 0.75rem;
	}

	.api-ep-method {
		min-width: 44px;
		font-size: 10px;
	}

	.api-ep-path { font-size: 12.5px; }
	.api-ep-summary { font-size: 11.5px; }

	.api-endpoint.active .api-ep-body {
		padding: 1rem;
	}
}


/* ============================================================
	 TOS PAGE
	 ============================================================ */
.tos-layout {
	max-width: 990px;
	margin: 0 auto;
	padding: calc(var(--header-h) + 3.5rem) 24px 5rem;
}

.tos-head {
	margin-bottom: 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--border);
}

.tos-title {
	font-size: clamp(1.8rem, 3vw, 2.6rem);
	font-weight: 800;
	color: #fff;
	margin-bottom: 0.5rem;
}

.tos-updated {
	font-size: 13px;
	color: var(--text-muted);
}

.tos-section {
	margin-bottom: 2.75rem;
}

.tos-section-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: .06em;
	margin-bottom: 1.25rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--border);
}

.tos-clause {
	margin-bottom: 0.85rem;
	color: var(--text-muted);
	font-size: 13.5px;
	line-height: 1.8;
}

.tos-clause strong { color: var(--text-main); }

.tos-cn {
	font-weight: 700;
	color: var(--text-main);
	margin-right: 0.35em;
	white-space: nowrap;
}

.tos-list {
	margin: 0.25rem 0 1rem 1.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.tos-list li {
	list-style: disc;
	color: var(--text-muted);
	font-size: 13.5px;
	line-height: 1.75;
}

@media (max-width: 680px) {
	.tos-layout {
		padding: calc(var(--header-h) + 2rem) 16px 4rem;
	}
}

.tos-section { padding: 0; }
