/**
 * JoinGrove docs shell — sidebar + content layout for pre-rendered HTML pages.
 */

.jg-doc-shell {
	display: grid;
	grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
	min-height: 100vh;
	background: var(--jg-docs-bg, #1e1e1e);
	color: var(--jg-docs-text, #e8e8e8);
	font-family: var(--jg-docs-font-family, system-ui, sans-serif);
}

.jg-doc-nav {
	position: sticky;
	top: 0;
	align-self: start;
	max-height: 100vh;
	overflow: auto;
	padding: 1rem 0.85rem 2rem;
	border-right: 1px solid var(--jg-docs-border, #2a2a2a);
	background: var(--vscode-sideBar-background, #252526);
}

.jg-doc-nav-head {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: 1rem;
	font-size: 13px;
	font-weight: 600;
}

.jg-doc-nav-head a {
	color: var(--jg-docs-accent-hover, #4ade80);
	text-decoration: none;
}

.jg-doc-nav-head a:hover {
	text-decoration: underline;
}

.jg-doc-search {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 1rem;
	padding: 0.5rem 0.65rem;
	border: 1px solid var(--jg-docs-border, #2a2a2a);
	border-radius: 6px;
	background: var(--jg-docs-code-bg, #252526);
	color: var(--jg-docs-text, #e8e8e8);
	font-size: 13px;
}

.jg-doc-section {
	margin-bottom: 1.1rem;
}

.jg-doc-section h2 {
	margin: 0 0 0.35rem;
	padding: 0 0.35rem;
	color: var(--jg-docs-text-muted, #9ca3af);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.jg-doc-section ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jg-doc-section li {
	margin: 0;
}

.jg-doc-section a {
	display: block;
	padding: 0.35rem 0.5rem;
	border-radius: 4px;
	color: var(--jg-docs-text, #e8e8e8);
	font-size: 13px;
	line-height: 1.35;
	text-decoration: none;
}

.jg-doc-section a:hover {
	background: rgba(45, 134, 89, 0.12);
	color: var(--jg-docs-accent-hover, #4ade80);
}

.jg-doc-section a.is-active {
	background: rgba(45, 134, 89, 0.2);
	color: var(--jg-docs-accent-hover, #4ade80);
	font-weight: 600;
}

.jg-doc-main {
	min-width: 0;
}

.jg-doc-main .docs-root {
	max-width: 860px;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}

.jg-doc-hub {
	max-width: 920px;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}

.jg-doc-hub h1 {
	margin-top: 0;
}

.jg-doc-hub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
	margin-top: 1.5rem;
}

.jg-doc-hub-card {
	display: block;
	padding: 1rem;
	border: 1px solid var(--jg-docs-border, #2a2a2a);
	border-radius: 10px;
	background: rgba(45, 134, 89, 0.06);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.jg-doc-hub-card:hover {
	border-color: rgba(74, 222, 128, 0.4);
	transform: translateY(-1px);
}

.jg-doc-hub-card strong {
	display: block;
	color: var(--jg-docs-accent-hover, #4ade80);
	font-size: 15px;
}

.jg-doc-hub-card span {
	display: block;
	margin-top: 0.35rem;
	color: var(--jg-docs-text-muted, #9ca3af);
	font-size: 12px;
	line-height: 1.45;
}

.jg-site-topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem 1.25rem;
	border-bottom: 1px solid var(--jg-docs-border, #2a2a2a);
	background: #1a2e24;
}

.jg-site-topbar a {
	color: var(--jg-docs-accent-hover, #4ade80);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.jg-site-topbar nav {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.jg-site-topbar nav a {
	font-weight: 500;
	color: var(--jg-docs-text, #e8e8e8);
}

.jg-site-topbar nav a:hover {
	color: var(--jg-docs-accent-hover, #4ade80);
}

@media (max-width: 900px) {
	.jg-doc-shell {
		grid-template-columns: 1fr;
	}

	.jg-doc-nav {
		position: relative;
		max-height: none;
		border-right: 0;
		border-bottom: 1px solid var(--jg-docs-border, #2a2a2a);
	}
}
