/**
 * Lacelium Documentation & Framework Core Design System (docs.css)
 * High-tech glassmorphism, responsive documentation shell, and unified dark/light themes.
 */

:root {
	/* Brand & Accent Palette */
	--doc-primary: #6366f1;
	--doc-primary-2: #06b6d4;
	--doc-bg: #ffffff;
	--doc-sidebar-bg: #f8fafc;
	--doc-text: #0f172a;
	--doc-muted: #64748b;
	--doc-border: #e2e8f0;
	--doc-code-bg: #0f172a;
	--doc-sidebar-width: 290px;
	--doc-h1: #0f172a;
	--doc-callout-bg: #f1f5f9;
	--doc-callout-text: #1e293b;
	--doc-radius: 14px;
	--doc-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

	/* Compatibility tokens for legacy & feature components */
	--primary: var(--doc-primary);
	--text: var(--doc-text);
	--muted: var(--doc-muted);
	--border: var(--doc-border);
	--card-bg: var(--doc-sidebar-bg);
	--field-bg: #f8fafc;
	--accent: #8b5cf6;
	--accent-strong: #7c3aed;
	--hero-panel-stroke: var(--doc-border);
	--hero-panel-bg-a: var(--doc-bg);
	--hero-panel-bg-b: var(--doc-sidebar-bg);
	--feature-panel-stroke: var(--doc-border);
	--feature-panel-bg-a: var(--doc-bg);
	--feature-panel-bg-b: var(--doc-sidebar-bg);

	/* Font Stacks */
	--doc-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--doc-font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
	--doc-font-mono: 'Fira Code', 'JetBrains Mono', Consolas, Menlo, monospace;
}

body.theme-dark {
	--doc-bg: #09090b;
	--doc-sidebar-bg: #09090b;
	--doc-text: #e4e4e7;
	--doc-muted: #a1a1aa;
	--doc-border: #27272a;
	--doc-code-bg: #121215;
	--doc-h1: #ffffff;
	--doc-callout-bg: rgba(239, 68, 68, 0.06);
	--doc-callout-text: #f4f4f5;

	/* Dark mode compatibility tokens */
	--card-bg: #121215;
	--field-bg: #18181b;
	--accent: #ef4444;
	--accent-strong: #f43f5e;
	--doc-primary: #ef4444;
	--doc-primary-2: #f43f5e;
	--doc-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.7);
}

/* Base Document Setup */
*, *::before, *::after {
	box-sizing: border-box;
}

body {
	background: var(--doc-bg);
	color: var(--doc-text);
	font-family: var(--doc-font-sans);
	scroll-behavior: smooth;
	margin: 0;
	padding: 0;
	transition: background-color 0.25s ease, color 0.25s ease;
}

/* Layout Shell */
#lacelium-main {
	min-height: 100vh;
	width: 100%;
}

.doc-wrapper {
	display: flex;
	min-height: 100vh;
	position: relative;
}

.standalone-wrapper {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.standalone-content {
	flex-grow: 1;
	width: 100%;
	box-sizing: border-box;
}

/* Floating Collapse Sidebar Toggle */
.docs-collapse-toggle {
	position: fixed;
	top: 0.75rem;
	right: 0.8rem;
	z-index: 1200;
	display: none;
	align-items: center;
	gap: 0.42rem;
	min-height: 2rem;
	padding: 0.38rem 0.7rem;
	border: 1px solid color-mix(in srgb, var(--doc-border) 74%, var(--doc-primary) 26%);
	background: linear-gradient(135deg, color-mix(in srgb, var(--doc-bg) 92%, var(--doc-primary) 8%) 0%, color-mix(in srgb, var(--doc-bg) 85%, var(--doc-primary-2) 15%) 100%);
	color: var(--doc-text);
	border-radius: 999px;
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.1;
	cursor: pointer;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	box-shadow: 0 16px 30px -22px rgba(15, 23, 42, 0.45);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.docs-collapse-toggle::before {
	content: '≡';
	display: inline-grid;
	place-items: center;
	width: 1.05rem;
	height: 1.05rem;
	font-size: 0.74rem;
	font-weight: 800;
	border-radius: 999px;
	background: color-mix(in srgb, var(--doc-primary) 14%, transparent);
	color: var(--doc-primary);
}

.docs-collapse-toggle:hover {
	transform: translateY(-1px);
	filter: brightness(1.02);
	box-shadow: 0 22px 38px -24px rgba(15, 23, 42, 0.5);
}

.docs-collapse-toggle:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--doc-primary) 28%, transparent), 0 18px 36px -24px rgba(15, 23, 42, 0.5);
}

.docs-collapse-toggle[aria-expanded="false"] {
	background: linear-gradient(135deg, color-mix(in srgb, var(--doc-bg) 90%, var(--doc-primary-2) 10%) 0%, color-mix(in srgb, var(--doc-bg) 84%, var(--doc-primary) 16%) 100%);
	border-color: color-mix(in srgb, var(--doc-border) 60%, var(--doc-primary-2) 40%);
}

.docs-collapse-toggle[aria-expanded="false"]::before {
	content: '▸';
	background: color-mix(in srgb, var(--doc-primary-2) 14%, transparent);
	color: var(--doc-primary-2);
}

/* ============================================================
   Top Global Navigation Bar (Laravel Style)
   ============================================================ */
.doc-top-bar {
	position: sticky;
	top: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
	padding: 0 1.75rem;
	background: rgba(9, 9, 11, 0.92);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--doc-border);
}

.top-bar-left {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	min-width: 260px;
}

.top-bar-brand {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	text-decoration: none;
	color: #ef4444 !important;
	font-family: var(--doc-font-heading);
	font-weight: 800;
	font-size: 1.35rem;
	letter-spacing: -0.025em;
	transition: opacity 0.15s ease;
}

.top-bar-brand:hover {
	opacity: 0.9;
}

.brand-emblem-red {
	color: #ef4444;
	font-size: 1.35rem;
	line-height: 1;
}

.brand-title {
	color: #ef4444;
	letter-spacing: -0.02em;
}

.top-bar-center {
	flex: 1;
	max-width: 520px;
	margin: 0 auto;
}

.top-search-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.top-search-icon {
	position: absolute;
	left: 0.85rem;
	width: 15px;
	height: 15px;
	color: #71717a;
	pointer-events: none;
}

.top-search-input {
	width: 100%;
	height: 36px;
	padding: 0 2.2rem 0 2.4rem;
	background: #18181b;
	border: 1px solid var(--doc-border);
	border-radius: 8px;
	color: var(--doc-text);
	font-size: 0.85rem;
	font-family: inherit;
	outline: none;
	transition: all 0.2s ease;
}

.top-search-input:focus {
	border-color: #ef4444;
	box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.top-search-kbd {
	position: absolute;
	right: 0.65rem;
	padding: 0.12rem 0.4rem;
	font-size: 0.68rem;
	font-family: var(--doc-font-mono);
	background: #27272a;
	color: #a1a1aa;
	border-radius: 4px;
	pointer-events: none;
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.top-bar-right {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.version-badge {
	font-size: 0.82rem;
	font-weight: 500;
	color: #a1a1aa;
	background: #18181b;
	border: 1px solid var(--doc-border);
	padding: 0.35rem 0.65rem;
	border-radius: 6px;
	cursor: pointer;
}

.version-badge:hover {
	color: #f4f4f5;
	border-color: #3f3f46;
}

/* ============================================================
   Sidebar Navigation (Laravel Style)
   ============================================================ */
.doc-sidebar {
	width: var(--doc-sidebar-width);
	background: var(--doc-sidebar-bg);
	border-right: 1px solid var(--doc-border);
	position: sticky;
	top: 56px;
	height: calc(100vh - 56px);
	overflow-y: auto;
	padding: 1.5rem 1rem 3rem 1.75rem;
	flex-shrink: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	transition: background 0.25s ease, border-color 0.25s ease;
}

body.docs-sidebar-collapsed .doc-sidebar {
	display: none;
}

body.docs-sidebar-collapsed .doc-main {
	max-width: 100%;
}

body.is-iframe .docs-collapse-toggle {
	display: none !important;
}

/* Nav Headings & Groups */
.doc-sidebar h5 {
	font-size: 0.82rem;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: #71717a;
	margin-bottom: 0.45rem;
	margin-top: 1.45rem;
}

.doc-sidebar h5:first-of-type {
	margin-top: 0.2rem;
}

.doc-sidebar ul {
	list-style: none;
	padding: 0;
	margin: 0 0 0.5rem;
}

.doc-sidebar li {
	margin-bottom: 0.15rem;
}

.doc-sidebar a {
	color: #a1a1aa;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 450;
	transition: color 0.15s ease;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.35rem 0.5rem;
	position: relative;
	border-radius: 4px;
}

.doc-sidebar a:hover {
	color: #f4f4f5;
	background: transparent;
	transform: none;
}

.doc-sidebar a.active {
	color: #ffffff !important;
	font-weight: 600;
	background: rgba(239, 68, 68, 0.12) !important;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.doc-sidebar a.active::before {
	content: '';
	position: absolute;
	left: -0.75rem;
	top: 4px;
	bottom: 4px;
	width: 3px;
	border-radius: 3px;
	background: #ef4444;
	box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Sidebar Feature Badges */
.sidebar-badge {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.12rem 0.4rem;
	border-radius: 999px;
	line-height: 1.1;
}

.badge-studio {
	background: rgba(239, 68, 68, 0.12);
	color: #ef4444;
	border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-hot {
	background: rgba(244, 63, 94, 0.12);
	color: #f43f5e;
	border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-api {
	background: rgba(16, 185, 129, 0.12);
	color: #10b981;
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-live {
	background: rgba(245, 158, 11, 0.12);
	color: #f59e0b;
	border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-spa {
	background: rgba(139, 92, 246, 0.12);
	color: #8b5cf6;
	border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Custom Sidebar Scrollbar */
.doc-sidebar::-webkit-scrollbar {
	width: 5px;
}
.doc-sidebar::-webkit-scrollbar-track {
	background: transparent;
}
.doc-sidebar::-webkit-scrollbar-thumb {
	background: var(--doc-border);
	border-radius: 4px;
}
.doc-sidebar::-webkit-scrollbar-thumb:hover {
	background: var(--doc-muted);
}
	background: transparent;
}
.doc-sidebar::-webkit-scrollbar-thumb {
	background: var(--doc-border);
	border-radius: 4px;
}
.doc-sidebar::-webkit-scrollbar-thumb:hover {
	background: var(--doc-muted);
}

/* Theme Toggle Pill Button */
.theme-toggle {
	background: var(--doc-border);
	border: none;
	border-radius: 999px;
	width: 38px;
	height: 22px;
	position: relative;
	cursor: pointer;
	transition: background 0.25s ease;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: 2px;
}

.theme-toggle::before {
	content: '';
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.25);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

body.theme-dark .theme-toggle {
	background: linear-gradient(135deg, var(--doc-primary) 0%, var(--doc-primary-2) 100%);
}

body.theme-dark .theme-toggle::before {
	transform: translateX(16px);
}

/* ============================================================
   Content Area & Section Typography
   ============================================================ */
/* ============================================================
   Content Area & Section Typography (Laravel Style)
   ============================================================ */
.doc-main {
	flex-grow: 1;
	padding: 2.5rem clamp(1.2rem, 3vw, 3.5rem) 4rem;
	width: 100%;
	background: var(--doc-bg);
}

.doc-main-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 240px;
	gap: 3.5rem;
	align-items: flex-start;
}

.doc-content {
	max-width: 780px;
	width: 100%;
}

.doc-content-header-bar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 0.75rem;
}

.btn-copy-markdown {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	background: #18181b;
	color: #a1a1aa;
	border: 1px solid var(--doc-border);
	border-radius: 6px;
	padding: 0.35rem 0.75rem;
	font-size: 0.8rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.18s ease;
}

.btn-copy-markdown:hover {
	color: #f4f4f5;
	border-color: #ef4444;
	background: #27272a;
}

.doc-page-toc {
	position: sticky;
	top: 5rem;
	width: 240px;
	padding-top: 0.5rem;
}

.doc-toc-title {
	font-size: 0.82rem;
	font-weight: 600;
	color: #71717a;
	margin-bottom: 0.85rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.doc-toc-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.doc-toc-item {
	margin: 0;
}

.doc-toc-item a {
	display: block;
	padding: 0.28rem 0 0.28rem 0.85rem;
	border-left: 2px solid transparent;
	color: #71717a;
	font-size: 0.88rem;
	line-height: 1.45;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.doc-toc-item a:hover {
	color: #f4f4f5;
	background: transparent;
}

.doc-toc-item a.is-active {
	border-left-color: #ef4444 !important;
	color: #ffffff !important;
	font-weight: 600;
	background: transparent !important;
}

.doc-toc-sub a {
	padding-left: 1.5rem;
	font-size: 0.82rem;
	color: #52525b;
}

.doc-toc-sub a:hover {
	color: #d4d4d8;
}

.doc-toc-sub a.is-active {
	border-left-color: #ef4444 !important;
	color: #ffffff !important;
}

/* Ecosystem Promo Card (Laravel Boost / Nightwatch style) */
.doc-promo-card {
	position: relative;
	margin-top: 2rem;
	padding: 1.25rem;
	background: linear-gradient(145deg, #14161f 0%, #0d0e14 100%);
	border: 1px solid rgba(239, 68, 68, 0.25);
	border-radius: 12px;
	overflow: hidden;
}

.doc-promo-glow {
	position: absolute;
	top: -30px;
	right: -30px;
	width: 90px;
	height: 90px;
	background: radial-gradient(circle, rgba(239, 68, 68, 0.3) 0%, transparent 70%);
	pointer-events: none;
}

.doc-promo-badge {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #ef4444;
	background: rgba(239, 68, 68, 0.12);
	padding: 0.15rem 0.5rem;
	border-radius: 4px;
	margin-bottom: 0.65rem;
}

.doc-promo-icon {
	color: #ef4444;
	margin-bottom: 0.6rem;
}

.doc-promo-title {
	font-size: 0.95rem;
	font-weight: 700;
	color: #f4f4f5;
	margin: 0 0 0.4rem;
}

.doc-promo-desc {
	font-size: 0.8rem;
	color: #a1a1aa;
	line-height: 1.5;
	margin: 0 0 0.85rem;
}

.doc-promo-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.82rem;
	font-weight: 600;
	color: #ef4444;
	text-decoration: none;
	transition: color 0.15s ease;
}

.doc-promo-link:hover {
	color: #f87171;
	text-decoration: underline;
}

@media (max-width: 980px) {
	.doc-main-inner {
		grid-template-columns: 1fr;
	}
	.doc-page-toc {
		display: none;
	}
}

.doc-section {
	margin-bottom: 4rem;
	scroll-margin-top: 5rem;
	padding-bottom: 1rem;
}

.doc-section h1 {
	font-family: var(--doc-font-heading);
	font-size: clamp(2.2rem, 3vw, 3.1rem);
	font-weight: 800;
	margin-bottom: 1.5rem;
	color: #ffffff;
	letter-spacing: -0.03em;
	line-height: 1.15;
}

.doc-section h2 {
	font-family: var(--doc-font-heading);
	font-size: clamp(1.4rem, 1.8vw, 1.85rem);
	font-weight: 700;
	margin-top: 3rem;
	margin-bottom: 1rem;
	color: #f4f4f5;
	letter-spacing: -0.02em;
	border-bottom: 1px solid var(--doc-border);
	padding-bottom: 0.5rem;
}

.doc-section h3 {
	font-family: var(--doc-font-heading);
	font-size: 1.25rem;
	font-weight: 600;
	color: #f4f4f5;
	margin-top: 2.2rem;
	margin-bottom: 0.75rem;
	letter-spacing: -0.01em;
}

.doc-section p {
	line-height: 1.85;
	margin-bottom: 1.35rem;
	font-size: 1.02rem;
	color: #a1a1aa;
}

.doc-section ul,
.doc-section ol {
	line-height: 1.85;
	padding-left: 1.5rem;
	margin-bottom: 1.5rem;
	color: #a1a1aa;
}

.doc-section li {
	margin-bottom: 0.35rem;
}

a {
	color: #ef4444;
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: #f87171;
	text-decoration: underline;
}

/* Inline Code Pills (Laravel Screenshot Style: red text on subtle dark pill) */
.doc-section:not(pre) > code,
p code,
li code,
td code {
	background: rgba(239, 68, 68, 0.1) !important;
	color: #ef4444 !important;
	padding: 0.15rem 0.45rem !important;
	border-radius: 5px !important;
	font-size: 0.88em !important;
	border: 1px solid rgba(239, 68, 68, 0.22) !important;
	font-family: var(--doc-font-mono) !important;
	white-space: nowrap;
}

/* Code Blocks & Syntax Pre (Laravel Screenshot Style) */
pre {
	background: #121215 !important;
	color: #e4e4e7 !important;
	padding: 1.25rem 1.5rem !important;
	border-radius: 8px !important;
	font-size: 0.92rem !important;
	line-height: 1.65 !important;
	overflow-x: auto;
	margin-bottom: 2rem !important;
	border: 1px solid #27272a !important;
	box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.5) !important;
}

pre code {
	font-family: var(--doc-font-mono);
	font-size: 0.9rem;
}

code {
	font-family: var(--doc-font-mono);
}

body.theme-dark .doc-section:not(pre) > code,
body.theme-dark p code,
body.theme-dark li code {
	background: rgba(15, 23, 42, 0.8);
	color: #818cf8;
	border-color: rgba(255, 255, 255, 0.1);
}

/* Code Copy Button */
pre.docs-copy-ready {
	position: relative;
	padding-top: 2.15rem;
}

.docs-copy-btn {
	position: absolute;
	top: 0.55rem;
	right: 0.6rem;
	border: 1px solid color-mix(in srgb, #cbd5e1 35%, transparent);
	background: color-mix(in srgb, #0f172a 76%, #1e293b 24%);
	color: #e2e8f0;
	border-radius: 0.5rem;
	padding: 0.18rem 0.55rem;
	font-size: 0.72rem;
	line-height: 1.2;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.18s ease, filter 0.18s ease;
}

.docs-copy-btn:hover {
	transform: translateY(-1px);
	filter: brightness(1.08);
}

.docs-copy-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--doc-primary) 26%, transparent);
}

.docs-copy-toast {
	position: fixed;
	top: 0.95rem;
	right: 0.95rem;
	z-index: 2000;
	padding: 0.5rem 0.72rem;
	border-radius: 0.58rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	background: color-mix(in srgb, #0f172a 88%, #1e293b 12%);
	color: #e2e8f0;
	border: 1px solid color-mix(in srgb, var(--doc-border) 62%, var(--doc-primary) 38%);
	box-shadow: 0 16px 30px -24px rgba(2, 6, 23, 0.72);
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.docs-copy-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

hr {
	border: 0;
	border-top: 1px solid var(--doc-border);
	opacity: 1;
	margin: 2rem 0;
}

/* Callouts */
.doc-callout {
	padding: 1.5rem;
	border-left: 6px solid var(--doc-primary);
	background: var(--doc-callout-bg);
	color: var(--doc-callout-text);
	border-radius: var(--doc-radius) !important;
	margin-bottom: 2rem;
	border: 1px solid color-mix(in srgb, var(--doc-border) 84%, var(--doc-primary) 16%) !important;
	border-left: 6px solid var(--doc-primary) !important;
	box-shadow: var(--doc-shadow);
}

body.theme-dark .doc-callout {
	background: linear-gradient(180deg, color-mix(in srgb, var(--doc-sidebar-bg) 86%, var(--doc-primary) 14%) 0%, var(--doc-sidebar-bg) 100%);
}

footer {
	padding: 4rem 2rem;
	text-align: center;
	background: var(--doc-sidebar-bg);
	border-top: 1px solid var(--doc-border);
	color: var(--doc-muted);
	font-size: 0.9rem;
}

/* ============================================================
   Component Utilities: Cards, Buttons, Badges, Pills
   ============================================================ */
.card {
	background: var(--card-bg);
	border: 1px solid color-mix(in srgb, var(--doc-border) 84%, var(--doc-primary) 16%) !important;
	border-radius: var(--doc-radius) !important;
	padding: 1.25rem;
	margin-bottom: 1rem;
	box-shadow: var(--doc-shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover,
.hover-lift:hover {
	transform: translateY(-3px);
	box-shadow: 0 20px 36px -24px rgba(15, 23, 42, 0.5);
	border-color: color-mix(in srgb, var(--doc-primary) 36%, var(--doc-border));
}

.card-lg {
	padding: 1.6rem;
}

body.theme-dark .card {
	background: linear-gradient(180deg, color-mix(in srgb, var(--doc-sidebar-bg) 86%, var(--doc-primary) 14%) 0%, var(--doc-sidebar-bg) 100%);
	border-color: rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark .card-header {
	background-color: rgba(15, 21, 36, 0.85) !important;
	border-bottom-color: rgba(255, 255, 255, 0.08) !important;
	color: #94a3b8;
}

.bg-doc-sidebar {
	background: var(--doc-sidebar-bg) !important;
}

.transition-all {
	transition: all 0.3s ease;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.58rem 0.96rem;
	border-radius: var(--doc-radius) !important;
	border: 1px solid color-mix(in srgb, var(--doc-border) 72%, var(--doc-primary) 28%);
	font-weight: 650;
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
	box-shadow: 0 20px 36px -30px rgba(15, 23, 42, 0.7);
}

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

.btn-primary {
	background: linear-gradient(135deg, var(--doc-primary) 0%, var(--doc-primary-2) 100%);
	border-color: transparent !important;
	color: #fff;
}

.btn-secondary {
	background: transparent;
	color: var(--text);
	border-color: var(--border);
}

.btn-secondary:hover {
	background: color-mix(in srgb, var(--doc-sidebar-bg) 85%, var(--doc-primary) 5%);
}

.btn-sm {
	padding: 0.42rem 0.76rem;
	font-size: 0.88rem;
}

.btn-xs {
	padding: 0.2rem 0.5rem;
	font-size: 0.75rem;
	border-radius: 0.35rem !important;
}

.btn-lg {
	padding: 1rem 2rem;
	font-size: 1.1rem;
	border-radius: 1rem !important;
}

.ak-btn-studio {
	background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
	border-color: transparent;
	color: #fff;
	font-weight: 600;
}

.ak-btn-studio:hover {
	opacity: 0.92;
	transform: translateY(-1px);
	color: #fff;
}

/* Pills & Badges */
.pill {
	display: inline-flex;
	align-items: center;
	padding: 0.22rem 0.64rem;
	font-size: 0.72rem;
	border-radius: 999px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: 1px solid color-mix(in srgb, var(--doc-primary) 24%, var(--doc-border));
	background: color-mix(in srgb, var(--doc-primary) 9%, var(--doc-sidebar-bg));
	color: var(--doc-primary);
}

.pill-primary {
	background: color-mix(in srgb, var(--doc-primary) 15%, transparent);
	color: var(--doc-primary);
	border: 1px solid color-mix(in srgb, var(--doc-primary) 30%, transparent);
}

.pill-badge {
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ============================================================
   Forms & Controls (Unified Dark / Light Mode)
   ============================================================ */
.form-control,
.form-select,
textarea,
input,
select {
	border-radius: var(--doc-radius) !important;
	font-family: inherit;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark select,
body.theme-dark textarea {
	background-color: rgba(15, 23, 42, 0.75);
	border-color: rgba(255, 255, 255, 0.12);
	color: #e2e8f0;
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
	background-color: rgba(15, 23, 42, 0.95);
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
	color: #f1f5f9;
}

body.theme-dark .form-control::placeholder {
	color: #64748b;
}

body.theme-dark .form-text,
body.theme-dark .text-muted {
	color: #94a3b8 !important;
}

/* Outline Buttons */
body.theme-dark .btn-outline-secondary {
	border-color: rgba(255, 255, 255, 0.16);
	color: #94a3b8;
}

body.theme-dark .btn-outline-secondary:hover {
	background-color: rgba(255, 255, 255, 0.08);
	color: #f1f5f9;
	border-color: rgba(255, 255, 255, 0.25);
}

body.theme-dark .btn-outline-primary {
	border-color: rgba(99, 102, 241, 0.5);
	color: #818cf8;
}

body.theme-dark .btn-outline-primary:hover {
	background-color: rgba(99, 102, 241, 0.18);
	color: #a5b4fc;
}

body.theme-dark .btn-outline-danger {
	border-color: rgba(239, 68, 68, 0.4);
	color: #f87171;
}

body.theme-dark .btn-outline-danger:hover {
	background-color: rgba(239, 68, 68, 0.15);
	color: #fca5a5;
}

body.theme-dark .badge.bg-light {
	background-color: rgba(255, 255, 255, 0.08) !important;
	color: #94a3b8 !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ============================================================
   Global Table Design System
   ============================================================ */
.table-responsive,
.table-wrap {
	border: 1px solid var(--doc-border) !important;
	border-radius: var(--doc-radius) !important;
	background: var(--doc-bg) !important;
	box-shadow: var(--doc-shadow) !important;
	overflow-x: auto;
	margin-bottom: 1.5rem;
}

body.theme-dark .table-responsive,
body.theme-dark .table-wrap {
	background: rgba(17, 24, 39, 0.75) !important;
	border-color: rgba(255, 255, 255, 0.08) !important;
	backdrop-filter: blur(12px);
}

table,
.table,
.data-table,
.doc-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	color: var(--doc-text);
	font-size: 0.88rem;
}

.table > :not(caption) > * > * {
	padding: 0.8rem 0.9rem;
	border-color: color-mix(in srgb, var(--doc-border) 88%, var(--doc-primary) 12%);
}

.table thead {
	background: color-mix(in srgb, var(--doc-sidebar-bg) 85%, var(--doc-primary) 15%);
}

table thead th,
.table thead th,
.data-table thead th,
.doc-table thead th {
	background: color-mix(in srgb, var(--doc-sidebar-bg) 85%, var(--doc-primary) 15%) !important;
	color: var(--doc-text);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.8rem 1rem !important;
	border-bottom: 1px solid var(--doc-border) !important;
	white-space: nowrap;
}

body.theme-dark table thead th,
body.theme-dark .table thead th,
body.theme-dark .data-table thead th,
body.theme-dark .doc-table thead th {
	background: #111827 !important;
	color: #94a3b8 !important;
	border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

table tbody td,
.table tbody td,
.data-table tbody td,
.doc-table tbody td {
	padding: 0.75rem 1rem !important;
	vertical-align: middle;
	border-bottom: 1px solid color-mix(in srgb, var(--doc-border) 60%, transparent) !important;
	color: var(--doc-text);
}

body.theme-dark table tbody td,
body.theme-dark .table tbody td,
body.theme-dark .data-table tbody td,
body.theme-dark .doc-table tbody td {
	border-bottom-color: rgba(255, 255, 255, 0.04) !important;
}

table tbody tr,
.table tbody tr,
.data-table tbody tr,
.doc-table tbody tr {
	transition: background-color 0.15s ease;
}

table tbody tr:hover,
.table tbody tr:hover,
.data-table tbody tr:hover,
.doc-table tbody tr:hover {
	background-color: color-mix(in srgb, var(--doc-primary) 6%, transparent) !important;
}

table tbody tr:nth-of-type(odd),
.table tbody tr:nth-of-type(odd),
.data-table tbody tr:nth-of-type(odd),
.doc-table tbody tr:nth-of-type(odd) {
	background-color: color-mix(in srgb, var(--doc-primary) 1.5%, transparent);
}

table td code,
.table td code,
.data-table td code {
	font-family: var(--doc-font-mono);
	font-size: 0.82rem;
	padding: 0.2rem 0.45rem;
	border-radius: 5px;
	background: color-mix(in srgb, var(--doc-primary) 10%, transparent);
	color: var(--doc-primary);
}

body.theme-dark table td code,
body.theme-dark .table td code {
	color: #38bdf8;
	background: rgba(6, 182, 212, 0.12);
}

/* ============================================================
   Alerts & Notifications
   ============================================================ */
.alert {
	padding: 1rem 1.25rem;
	border-radius: var(--doc-radius) !important;
	margin-bottom: 1.5rem;
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	border: 1px solid transparent;
	animation: slideInDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alert-success {
	background: rgba(16, 185, 129, 0.12);
	border-color: rgba(16, 185, 129, 0.25);
	color: #10b981;
}

.alert-danger,
.alert-error {
	background: rgba(239, 68, 68, 0.12);
	border-color: rgba(239, 68, 68, 0.25);
	color: #ef4444;
}

.alert-warning {
	background: rgba(245, 158, 11, 0.12);
	border-color: rgba(245, 158, 11, 0.25);
	color: #f59e0b;
}

.alert-info {
	background: rgba(59, 130, 246, 0.12);
	border-color: rgba(59, 130, 246, 0.25);
	color: #3b82f6;
}

.alert-icon {
	font-size: 1.2rem;
	line-height: 1;
	flex-shrink: 0;
}

.alert-content {
	flex: 1;
	font-size: 0.95rem;
	font-weight: 500;
}

@keyframes slideInDown {
	from { transform: translateY(-10px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   Landing / Welcome Hero & Bento Grid
   ============================================================ */
.docs-landing {
	max-width: 1000px;
	margin: 0 auto;
	padding: 4rem 1rem;
}

.hero-section {
	text-align: center;
	margin-bottom: 6rem;
	align-items: center;
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 2rem;
	background: var(--doc-sidebar-bg);
	padding: 0.4rem 1rem;
	border-radius: 99px;
	border: 1px solid var(--doc-border);
}

.hero-title {
	font-family: var(--doc-font-heading);
	font-size: 4.5rem;
	line-height: 1.05;
	font-weight: 800;
	letter-spacing: -0.04em;
	margin-bottom: 1.5rem;
	color: var(--doc-h1);
}

.hero-lead {
	max-width: 700px;
	font-size: 1.35rem;
	color: var(--doc-muted);
	margin: 0 auto 3rem;
	line-height: 1.6;
}

.hero-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	justify-content: center;
}

.bento-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: auto auto;
	gap: 1.5rem;
}

.bento-item {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.bento-tall { grid-row: span 2; }
.bento-wide { grid-column: span 2; }

.feature-card {
	background: var(--doc-bg);
	border: 1px solid var(--doc-border);
	border-radius: 2rem;
	padding: 2.25rem;
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
	position: relative;
	overflow: hidden;
}

.feature-card:hover {
	transform: translateY(-8px) scale(1.01);
	border-color: var(--doc-primary);
	box-shadow: 0 25px 50px -12px rgba(255, 45, 32, 0.1);
}

.feature-icon-wrap {
	width: 54px;
	height: 54px;
	background: var(--doc-sidebar-bg);
	border-radius: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.5rem;
	color: var(--doc-primary);
	transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-wrap {
	background: var(--doc-primary);
	color: white;
	transform: rotate(10deg);
}

.feature-icon {
	width: 28px;
	height: 28px;
}

.feature-title {
	font-family: var(--doc-font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
	color: var(--doc-h1);
}

/* ============================================================
   Responsive Rules
   ============================================================ */
@media(max-width: 1024px) {
	.doc-wrapper {
		flex-direction: column;
	}
	.doc-sidebar {
		position: sticky;
		top: 0;
		height: auto;
		width: 100%;
		padding: 1rem 1rem 0.75rem;
		border-right: 0;
		border-bottom: 1px solid var(--doc-border);
		overflow-y: auto;
		max-height: 75vh;
	}
	.doc-sidebar h5 {
		font-size: 0.72rem;
		margin-top: 0.65rem;
		margin-bottom: 0.4rem;
		display: flex;
		align-items: center;
		justify-content: space-between;
		cursor: pointer;
		padding: 0.4rem 0.5rem;
		border-radius: 8px;
		background: color-mix(in srgb, var(--doc-primary) 4%, transparent);
	}
	.doc-sidebar h5::after {
		content: '▾';
		font-size: 0.85rem;
		font-weight: 700;
		transition: transform 0.2s ease;
	}
	.doc-sidebar h5.is-open::after {
		transform: rotate(-180deg);
	}
	.doc-sidebar ul {
		display: none;
		flex-direction: column;
		gap: 0.2rem;
		padding-bottom: 0.35rem;
		margin-bottom: 0.35rem;
	}
	.doc-sidebar h5.is-open + ul {
		display: flex;
	}
	.doc-sidebar a {
		font-size: 0.86rem;
		padding: 0.45rem 0.65rem;
	}
	.doc-main {
		padding: 1.25rem 0.95rem 1.75rem;
	}
	.docs-collapse-toggle {
		display: inline-flex;
		top: 0.62rem;
		right: 0.64rem;
		width: 2.05rem;
		height: 2.05rem;
		min-height: 2.05rem;
		padding: 0;
		gap: 0;
		justify-content: center;
		font-size: 0;
		color: transparent;
	}
	.docs-collapse-toggle::before {
		width: 1.12rem;
		height: 1.12rem;
		font-size: 0.82rem;
	}
}

@media (max-width: 900px) {
	.bento-grid {
		grid-template-columns: 1fr;
	}
	.bento-tall, .bento-wide { grid-row: auto; grid-column: auto; }
	.hero-title { font-size: 3rem; }
}

@media(max-width: 640px) {
	.doc-main {
		padding: 0.95rem 0.72rem 1.5rem;
	}
	.doc-section > header {
		margin-bottom: 1.25rem !important;
	}
	.doc-section > header .pill {
		font-size: 0.63rem;
		padding: 0.18rem 0.52rem;
	}
	.doc-section > header h1,
	.doc-section h1.text-gradient {
		font-size: 1.55rem !important;
		line-height: 1.2 !important;
		letter-spacing: -0.01em !important;
		margin-bottom: 0.7rem !important;
	}
	.doc-section > header .lead {
		font-size: 0.92rem !important;
		line-height: 1.56 !important;
		margin-bottom: 0 !important;
	}
	.doc-section h1 {
		font-size: 1.65rem;
	}
	.doc-section h2 {
		font-size: 1.25rem;
	}
	.doc-section p {
		font-size: 0.94rem;
		line-height: 1.62;
	}
	.table > :not(caption) > * > * {
		padding: 0.62rem 0.64rem;
	}
}

@media (hover: none) {
	.card:hover,
	.btn:hover,
	.doc-sidebar a:hover {
		transform: none;
	}
}

/* ============================================================
   Step Numbers (Installation, Deployment pages)
   ============================================================ */
.step-number {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--doc-sidebar-bg);
	color: var(--doc-primary);
	display: grid;
	place-items: center;
	font-weight: 800;
	font-size: 0.9rem;
	flex-shrink: 0;
}

/* ============================================================
   Lifecycle / Concepts Timeline (concepts.twig)
   ============================================================ */
.lifecycle-timeline {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.timeline-step {
	position: relative;
	padding-left: 2rem;
	border-left: 2px solid var(--doc-border);
}

.step-dot {
	position: absolute;
	left: -7px;
	top: 4px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--doc-bg);
	border: 2px solid var(--doc-primary);
}

.step-dot.active {
	background: var(--doc-primary);
	box-shadow: 0 0 10px var(--doc-primary);
}

.timeline-step:last-child {
	border-left-color: transparent;
}

/* ============================================================
   Code Block with Copy Button Overlay
   ============================================================ */
.code-block-with-copy {
	position: relative;
}

.copy-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
}

/* ============================================================
   Misc Utilities
   ============================================================ */
.cursor-pointer {
	cursor: pointer;
}

.hover-lift {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
}

/* ============================================================
   Enhanced Documentation View Components
   ============================================================ */
.doc-page-header {
	margin-bottom: 3rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--doc-border);
	position: relative;
}

.doc-page-header::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 120px;
	height: 2px;
	background: linear-gradient(90deg, var(--doc-primary), transparent);
}

.doc-h1 {
	font-family: var(--doc-font-heading);
	font-size: clamp(2.2rem, 3.5vw, 3.5rem);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1.15;
	margin-bottom: 1rem;
}

.icon-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--doc-primary) 12%, transparent);
	color: var(--doc-primary);
	flex-shrink: 0;
}

body.theme-dark .icon-pill {
	background: color-mix(in srgb, var(--doc-primary) 22%, transparent);
	color: #818cf8;
}

.section-icon {
	width: 18px;
	height: 18px;
}

.cmd-item {
	background: var(--doc-sidebar-bg);
	border: 1px solid var(--doc-border);
	border-radius: var(--doc-radius);
	padding: 1rem 1.25rem;
	transition: all 0.25s ease;
}

.cmd-item:hover {
	border-color: color-mix(in srgb, var(--doc-primary) 40%, var(--doc-border));
	transform: translateY(-2px);
	box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.12);
}

body.theme-dark .cmd-item {
	background: rgba(15, 23, 42, 0.65);
	border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .cmd-item:hover {
	background: rgba(30, 41, 59, 0.7);
	border-color: rgba(99, 102, 241, 0.4);
	box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
}

.sandbox-card {
	background: var(--card-bg);
	border: 1px solid color-mix(in srgb, var(--doc-primary) 28%, var(--doc-border));
	border-radius: var(--doc-radius);
	padding: 1.5rem;
	box-shadow: 0 12px 32px -16px color-mix(in srgb, var(--doc-primary) 20%, transparent);
	transition: border-color 0.25s ease;
}

body.theme-dark .sandbox-card {
	background: linear-gradient(180deg, color-mix(in srgb, var(--doc-sidebar-bg) 90%, var(--doc-primary) 10%) 0%, var(--doc-sidebar-bg) 100%);
	border-color: rgba(99, 102, 241, 0.35);
}

.doc-feature-row {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 1rem;
	border-radius: var(--doc-radius);
	background: var(--doc-sidebar-bg);
	border: 1px solid var(--doc-border);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.doc-feature-row:hover {
	transform: translateX(4px);
	border-color: color-mix(in srgb, var(--doc-primary) 35%, var(--doc-border));
}

body.theme-dark .doc-feature-row {
	background: rgba(30, 41, 59, 0.5);
	border-color: rgba(255, 255, 255, 0.06);
}

/* ============================================================
   Next Steps Section (Unified Modern Design)
   ============================================================ */
.doc-section h2#next-steps,
.doc-section h2.next-steps-title {
	margin-top: 3.75rem;
	border-bottom: 1px solid var(--doc-border);
	padding-bottom: 0.6rem;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.doc-section h2#next-steps::before,
.doc-section h2.next-steps-title::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 1.15em;
	background: linear-gradient(180deg, #ef4444 0%, #f43f5e 100%);
	border-radius: 4px;
}

.doc-section h2#next-steps + ul,
.doc-section h2.next-steps-title + ul,
.doc-next-steps-list {
	list-style: none;
	padding-left: 0 !important;
	margin: 1.25rem 0 2.5rem !important;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.doc-section h2#next-steps + ul > li,
.doc-section h2.next-steps-title + ul > li,
.doc-next-steps-list > li {
	margin-bottom: 0 !important;
	padding: 0.85rem 1.15rem;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--doc-border);
	color: #a1a1aa;
	font-size: 0.96rem;
	line-height: 1.6;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	transition: all 0.2s ease;
}

body.theme-dark .doc-section h2#next-steps + ul > li,
body.theme-dark .doc-section h2.next-steps-title + ul > li,
body.theme-dark .doc-next-steps-list > li {
	background: rgba(18, 18, 21, 0.6);
	border-color: rgba(255, 255, 255, 0.06);
}

.doc-section h2#next-steps + ul > li:hover,
.doc-section h2.next-steps-title + ul > li:hover,
.doc-next-steps-list > li:hover {
	background: rgba(239, 68, 68, 0.04);
	border-color: rgba(239, 68, 68, 0.3);
	transform: translateX(3px);
	color: #f4f4f5;
}

.doc-section h2#next-steps + ul > li::before,
.doc-section h2.next-steps-title + ul > li::before,
.doc-next-steps-list > li::before {
	content: '→';
	font-weight: 700;
	color: #ef4444;
	font-size: 1.1rem;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.doc-section h2#next-steps + ul > li:hover::before,
.doc-section h2.next-steps-title + ul > li:hover::before,
.doc-next-steps-list > li:hover::before {
	transform: translateX(2px);
}

.doc-section h2#next-steps + ul > li a,
.doc-section h2.next-steps-title + ul > li a,
.doc-next-steps-list > li a {
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	padding: 0.15rem 0.5rem;
	border-radius: 5px;
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.25);
	transition: all 0.18s ease;
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
}

.doc-section h2#next-steps + ul > li a:hover,
.doc-section h2.next-steps-title + ul > li a:hover,
.doc-next-steps-list > li a:hover {
	background: rgba(239, 68, 68, 0.22);
	border-color: rgba(239, 68, 68, 0.5);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.see-also-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1.25rem;
	padding: 1.25rem 1.5rem;
	border-radius: var(--doc-radius);
	background: rgba(18, 18, 21, 0.6);
	border: 1px solid var(--doc-border);
	margin-top: 3.5rem;
}

body.theme-dark .see-also-strip {
	background: rgba(18, 18, 21, 0.7);
	border-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Modern Chat App Component (Docs & Interactive WebSocket Playground)
   ========================================================================== */
.chat-app-card {
	border: 1px solid var(--doc-border);
	border-radius: var(--doc-radius);
	background: var(--doc-sidebar-bg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--doc-shadow);
	margin-bottom: 2.5rem;
}

body.theme-dark .chat-app-card {
	background: #121215;
	border-color: #27272a;
	box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
}

.chat-app-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.85rem 1.25rem;
	background: var(--doc-bg);
	border-bottom: 1px solid var(--doc-border);
	flex-wrap: wrap;
	gap: 0.75rem;
}

body.theme-dark .chat-app-header {
	background: #18181b;
	border-color: #27272a;
}

.chat-channel-tabs {
	display: flex;
	gap: 0.35rem;
	align-items: center;
}

.chat-channel-btn {
	padding: 0.35rem 0.75rem;
	font-size: 0.82rem;
	font-weight: 600;
	border-radius: 8px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--doc-muted);
	cursor: pointer;
	transition: all 0.15s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.chat-channel-btn:hover {
	color: var(--doc-text);
	background: var(--doc-border);
}

.chat-channel-btn.active {
	background: rgba(239, 68, 68, 0.12);
	color: #ef4444;
	border-color: rgba(239, 68, 68, 0.25);
}

.chat-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.76rem;
	font-weight: 600;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.15);
	color: var(--doc-muted);
	border: 1px solid var(--doc-border);
}

.chat-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #94a3b8;
}

.chat-status-pill.connected {
	background: rgba(16, 185, 129, 0.12);
	color: #10b981;
	border-color: rgba(16, 185, 129, 0.25);
}

.chat-status-pill.connected .chat-status-dot {
	background: #10b981;
	box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
	animation: pulse-dot 2s infinite ease-in-out;
}

.chat-status-pill.connecting {
	background: rgba(245, 158, 11, 0.12);
	color: #f59e0b;
	border-color: rgba(245, 158, 11, 0.25);
}

.chat-status-pill.connecting .chat-status-dot {
	background: #f59e0b;
	box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
	animation: pulse-dot 1s infinite ease-in-out;
}

.chat-status-pill.error {
	background: rgba(239, 68, 68, 0.12);
	color: #ef4444;
	border-color: rgba(239, 68, 68, 0.25);
}

.chat-status-pill.error .chat-status-dot {
	background: #ef4444;
}

@keyframes pulse-dot {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.45; transform: scale(0.85); }
}

.chat-settings-bar {
	padding: 0.65rem 1.25rem;
	background: rgba(0, 0, 0, 0.03);
	border-bottom: 1px solid var(--doc-border);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.82rem;
	flex-wrap: wrap;
}

body.theme-dark .chat-settings-bar {
	background: #151518;
	border-color: #27272a;
}

.chat-settings-input {
	background: var(--doc-bg);
	border: 1px solid var(--doc-border);
	border-radius: 6px;
	padding: 0.25rem 0.6rem;
	font-size: 0.82rem;
	color: var(--doc-text);
	font-family: var(--doc-font-mono);
}

body.theme-dark .chat-settings-input {
	background: #09090b;
	border-color: #27272a;
	color: #e4e4e7;
}

.chat-settings-input:focus {
	outline: none;
	border-color: var(--doc-primary);
}

.chat-feed-container {
	height: 380px;
	overflow-y: auto;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	background: var(--doc-sidebar-bg);
	scroll-behavior: smooth;
}

body.theme-dark .chat-feed-container {
	background: #0d0d10;
}

.chat-message-row {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	max-width: 82%;
}

.chat-message-row.outgoing {
	margin-left: auto;
	flex-direction: row-reverse;
}

.chat-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.8rem;
	color: #ffffff;
	flex-shrink: 0;
	text-transform: uppercase;
}

.chat-bubble-wrap {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.chat-message-row.outgoing .chat-bubble-wrap {
	align-items: flex-end;
}

.chat-author-line {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--doc-muted);
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.chat-bubble {
	padding: 0.65rem 0.95rem;
	border-radius: 14px;
	font-size: 0.88rem;
	line-height: 1.5;
	position: relative;
	word-break: break-word;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.chat-bubble.incoming {
	background: var(--doc-bg);
	border: 1px solid var(--doc-border);
	color: var(--doc-text);
	border-top-left-radius: 4px;
}

body.theme-dark .chat-bubble.incoming {
	background: #18181b;
	border-color: #27272a;
	color: #e4e4e7;
}

.chat-bubble.outgoing {
	background: #ef4444;
	color: #ffffff;
	border-top-right-radius: 4px;
}

.chat-bubble code {
	background: rgba(0, 0, 0, 0.15);
	padding: 0.1rem 0.35rem;
	border-radius: 4px;
	font-size: 0.82rem;
}

.chat-system-line {
	align-self: center;
	padding: 0.25rem 0.85rem;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.12);
	font-size: 0.74rem;
	color: var(--doc-muted);
	border: 1px solid var(--doc-border);
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

body.theme-dark .chat-system-line {
	background: rgba(39, 39, 42, 0.6);
	border-color: #27272a;
}

.chat-input-toolbar {
	padding: 0.85rem 1.25rem;
	background: var(--doc-bg);
	border-top: 1px solid var(--doc-border);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

body.theme-dark .chat-input-toolbar {
	background: #151518;
	border-color: #27272a;
}

.chat-input-row {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.chat-input-field {
	flex-grow: 1;
	background: var(--doc-sidebar-bg);
	border: 1px solid var(--doc-border);
	border-radius: 10px;
	padding: 0.65rem 0.95rem;
	font-size: 0.88rem;
	color: var(--doc-text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.theme-dark .chat-input-field {
	background: #09090b;
	border-color: #27272a;
	color: #e4e4e7;
}

.chat-input-field:focus {
	outline: none;
	border-color: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.chat-quick-actions {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
	align-items: center;
}

.chat-quick-btn {
	font-size: 0.74rem;
	padding: 0.2rem 0.55rem;
	border-radius: 6px;
	background: var(--doc-sidebar-bg);
	border: 1px solid var(--doc-border);
	color: var(--doc-muted);
	cursor: pointer;
	transition: all 0.15s ease;
}

.chat-quick-btn:hover {
	color: var(--doc-text);
	border-color: var(--doc-primary);
}

body.theme-dark .chat-quick-btn {
	background: #18181b;
	border-color: #27272a;
	color: #a1a1aa;
}


