/* ==========================================================================
   WhoChanged Docs — light documentation shell (sidebar + white content)
   ========================================================================== */

body.docs-page {
	--docs-ink: #111827;
	--docs-ink-soft: #4b5563;
	--docs-ink-faint: #6b7280;
	--docs-bg: #f4f6f9;
	--docs-sidebar: #f8fafc;
	--docs-content: #ffffff;
	--docs-line: #e5e7eb;
	--docs-line-soft: #eef1f5;
	--docs-brand: #3b63e8;
	--docs-brand-soft: rgba(59, 99, 232, .1);
	--docs-warn-bg: #fffbeb;
	--docs-warn-border: #fcd34d;
	--docs-info-bg: #eff4ff;
	--docs-info-border: #93b0ff;
	--docs-sidebar-w: 260px;
	color: var(--docs-ink);
	background: var(--docs-bg);
}

body.docs-page .site-header {
	background: rgba(0, 0, 0, .92);
	backdrop-filter: saturate(180%) blur(16px);
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

body.docs-page .site-footer {
	background: #0a0a0c;
	border-top: 1px solid rgba(255, 255, 255, .08);
	margin-top: 0;
}

/* ---------- Shell: sidebar + content ---------- */
.docs-shell {
	display: grid;
	grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr);
	min-height: calc(100vh - 64px);
	align-items: stretch;
}

.docs-sidebar {
	position: sticky;
	top: 64px;
	align-self: start;
	height: calc(100vh - 64px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--docs-sidebar);
	border-right: 1px solid var(--docs-line);
	padding: 28px 18px 48px;
}

.docs-sidebar-head {
	padding: 0 10px 18px;
	border-bottom: 1px solid var(--docs-line);
	margin-bottom: 18px;
}

.docs-sidebar-kicker {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--docs-ink-faint);
	margin-bottom: 6px;
}

.docs-sidebar-title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--docs-ink);
}

.docs-sidebar-search {
	display: block;
	width: 100%;
	margin-top: 14px;
	padding: 9px 12px;
	border: 1px solid var(--docs-line);
	border-radius: 8px;
	background: #fff;
	color: var(--docs-ink);
	font: inherit;
	font-size: 13px;
}

.docs-sidebar-search::placeholder { color: var(--docs-ink-faint); }
.docs-sidebar-search:focus {
	outline: none;
	border-color: var(--docs-brand);
	box-shadow: 0 0 0 3px var(--docs-brand-soft);
}

.docs-nav-group + .docs-nav-group { margin-top: 22px; }

.docs-nav-group-label {
	display: block;
	padding: 0 10px 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--docs-ink-faint);
}

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

.docs-nav a {
	display: block;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--docs-ink-soft);
	line-height: 1.35;
	transition: background .12s ease, color .12s ease;
}

.docs-nav a:hover {
	background: rgba(17, 24, 39, .04);
	color: var(--docs-ink);
}

.docs-nav a.is-active {
	background: var(--docs-brand-soft);
	color: var(--docs-brand);
	font-weight: 600;
}

.docs-sidebar-mobile-toggle {
	display: none;
}

/* ---------- Main content (white) ---------- */
.docs-main {
	background: var(--docs-content);
	min-width: 0;
}

.docs-main-inner {
	max-width: 780px;
	margin: 0 auto;
	padding: 40px 40px 96px;
}

.docs-intro {
	padding-bottom: 32px;
	margin-bottom: 8px;
	border-bottom: 1px solid var(--docs-line);
}

.docs-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	font-size: 13px;
	color: var(--docs-ink-faint);
	margin-bottom: 18px;
}

.docs-breadcrumb a { color: var(--docs-ink-soft); }
.docs-breadcrumb a:hover { color: var(--docs-brand); }
.docs-breadcrumb-sep { opacity: .5; }

.docs-intro h1 {
	margin: 0;
	font-size: clamp(28px, 4vw, 36px);
	letter-spacing: -.03em;
	color: var(--docs-ink);
}

.docs-intro-lead {
	margin: 14px 0 0;
	font-size: 17px;
	line-height: 1.6;
	color: var(--docs-ink-soft);
	max-width: 62ch;
}

.docs-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.docs-meta-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 999px;
	border: 1px solid var(--docs-line);
	background: var(--docs-bg);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--docs-ink-soft);
}

/* ---------- Sections ---------- */
.docs-section {
	padding: 40px 0;
	border-bottom: 1px solid var(--docs-line-soft);
	scroll-margin-top: 88px;
}

.docs-section:last-child { border-bottom: none; }

.docs-section-label {
	display: inline-block;
	margin-bottom: 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--docs-brand);
}

.docs-section h2 {
	margin: 0 0 12px;
	font-size: clamp(22px, 2.4vw, 26px);
	letter-spacing: -.02em;
	color: var(--docs-ink);
}

.docs-section h3 {
	margin: 28px 0 10px;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -.015em;
	color: var(--docs-ink);
}

.docs-section p,
.docs-section li {
	font-size: 15.5px;
	line-height: 1.7;
	color: var(--docs-ink-soft);
}

.docs-section p { margin: 0 0 14px; }

.docs-section ul,
.docs-section ol {
	margin: 0 0 16px;
	padding-left: 1.2em;
	list-style: disc;
}

.docs-section ol { list-style: decimal; }
.docs-section li { margin: 0 0 8px; }
.docs-section li::marker { color: var(--docs-ink-faint); }
.docs-section li strong { color: var(--docs-ink); font-weight: 600; }

.docs-section a:not(.btn):not(.docs-btn) {
	color: var(--docs-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.docs-section a:not(.btn):not(.docs-btn):hover { color: #2748c7; }

.docs-section code {
	font-family: var(--font-mono);
	font-size: 12.5px;
	background: #f1f4f9;
	border: 1px solid var(--docs-line);
	border-radius: 6px;
	padding: 2px 7px;
	color: #1f2937;
}

/* ---------- Numbered steps ---------- */
.docs-steps {
	list-style: none;
	padding: 0;
	margin: 16px 0 18px;
	counter-reset: docs-step;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.docs-steps > li {
	position: relative;
	padding: 16px 16px 16px 56px;
	background: #fff;
	border: 1px solid var(--docs-line);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
	margin: 0;
	counter-increment: docs-step;
	list-style: none;
}

.docs-steps > li::before {
	content: counter(docs-step);
	position: absolute;
	left: 14px;
	top: 16px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--docs-brand-soft);
	color: var(--docs-brand);
	font-weight: 700;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.docs-steps > li > strong {
	display: block;
	color: var(--docs-ink);
	font-size: 15px;
	margin-bottom: 4px;
}

.docs-steps > li > p { margin: 0; }
.docs-steps > li ul {
	margin: 10px 0 0;
	padding-left: 1.1em;
	list-style: disc;
}

/* ---------- Callouts ---------- */
.docs-callout {
	display: flex;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid var(--docs-info-border);
	background: var(--docs-info-bg);
	margin: 16px 0 0;
}

.docs-callout-icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--docs-brand);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
}

.docs-callout p {
	margin: 0;
	color: #1e3a8a;
	font-size: 14.5px;
	line-height: 1.55;
}

.docs-callout-warn {
	border-color: var(--docs-warn-border);
	background: var(--docs-warn-bg);
}

.docs-callout-warn .docs-callout-icon { background: #d97706; }
.docs-callout-warn p { color: #92400e; }

/* ---------- Table ---------- */
.docs-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--docs-line);
	border-radius: 12px;
	background: #fff;
	margin: 16px 0 0;
	box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}

.docs-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 420px;
}

.docs-table th,
.docs-table td {
	padding: 13px 16px;
	text-align: left;
	border-bottom: 1px solid var(--docs-line-soft);
	font-size: 14.5px;
}

.docs-table th {
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--docs-ink-faint);
	background: var(--docs-bg);
	font-weight: 700;
}

.docs-table td { color: var(--docs-ink-soft); }
.docs-table td:first-child { color: var(--docs-ink); font-weight: 600; }
.docs-table tr:last-child td { border-bottom: none; }

/* ---------- FAQ / troubleshooting ---------- */
.docs-faq {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 8px;
}

.docs-faq details {
	border: 1px solid var(--docs-line);
	border-radius: 12px;
	background: #fff;
	padding: 0 16px;
	box-shadow: 0 1px 2px rgba(17, 24, 39, .03);
}

.docs-faq summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	color: var(--docs-ink);
	padding: 14px 28px 14px 0;
	list-style: none;
	position: relative;
}

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

.docs-faq summary::after {
	content: '+';
	position: absolute;
	right: 0;
	top: 12px;
	font-size: 20px;
	font-weight: 400;
	color: var(--docs-ink-faint);
}

.docs-faq details[open] summary::after {
	content: '−';
	color: var(--docs-brand);
}

.docs-faq details p {
	padding: 0 0 14px;
	margin: 0;
	font-size: 14.5px;
	color: var(--docs-ink-soft);
}

/* ---------- CTA card ---------- */
.docs-cta-card {
	margin-top: 8px;
	padding: 28px;
	border-radius: 16px;
	border: 1px solid var(--docs-line);
	background: linear-gradient(160deg, #f8faff 0%, #fff 55%, #f5f7fb 100%);
}

.docs-cta-card h2 { margin-bottom: 8px; }

.docs-cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.docs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 14.5px;
	line-height: 1.2;
	text-decoration: none !important;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
	white-space: nowrap;
}

.docs-btn:hover { transform: translateY(-1px); }

.docs-btn-primary {
	background: linear-gradient(135deg, #4f7cff, #6b5cff);
	color: #fff !important;
	box-shadow: 0 8px 20px rgba(79, 124, 255, .28);
}

.docs-btn-primary:hover {
	color: #fff !important;
	box-shadow: 0 10px 26px rgba(79, 124, 255, .38);
}

.docs-btn-secondary {
	background: #fff;
	color: var(--docs-ink) !important;
	border-color: #d1d5db;
	box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}

.docs-btn-secondary:hover {
	background: #f9fafb;
	border-color: #9ca3af;
	color: var(--docs-ink) !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
	.docs-shell {
		grid-template-columns: 1fr;
	}

	.docs-sidebar-mobile-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		margin: 16px 20px 0;
		padding: 10px 14px;
		border: 1px solid var(--docs-line);
		border-radius: 10px;
		background: #fff;
		color: var(--docs-ink);
		font: inherit;
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
		box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
	}

	.docs-sidebar {
		position: static;
		height: auto;
		max-height: none;
		overflow: visible;
		display: none;
		border-right: none;
		border-bottom: 1px solid var(--docs-line);
		padding: 16px 18px 22px;
	}

	.docs-shell.docs-sidebar-open .docs-sidebar {
		display: block;
	}

	.docs-main-inner {
		padding: 28px 20px 72px;
	}
}
