:root {
	--bg: #0b0c0f;
	--bg-elev: #12141a;
	--bg-soft: #181b22;
	--bg-hover: #1e222c;
	--line: rgba(255, 255, 255, 0.08);
	--line-strong: rgba(255, 255, 255, 0.14);
	--text: #f4f5f7;
	--text-muted: #9aa3b2;
	--text-faint: #6b7382;
	--accent: #1088f0;
	--accent-soft: rgba(16, 136, 240, 0.16);
	--brand: #1088f0;
	--brand-2: #0068d8;
	--radius: 12px;
	--font: "Inter", system-ui, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, monospace;
	--sidebar-w: 300px;
	--toc-w: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
	width: 100%; min-height: 100%;
	font-family: var(--font);
	background: var(--bg);
	color: var(--text);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.hidden { display: none !important; }

.gb-shell {
	min-height: 100vh;
	display: grid;
	grid-template-columns: var(--sidebar-w) 1fr;
}

.gb-sidebar {
	position: sticky; top: 0; height: 100vh;
	background: var(--bg-elev);
	border-right: 1px solid var(--line);
	display: flex; flex-direction: column;
}
/* Brand topo-esquerdo — mesmo padrão visual do zt-shop-v5 */
.gb-brand,
.sidebar-brand {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	align-items: center;
	padding: 18px 16px 12px;
}
.brand-mark {
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 12px;
	display: grid;
	place-items: center;
	overflow: hidden;
	flex-shrink: 0;
	background: var(--brand);
	box-shadow: 0 10px 24px rgba(16, 136, 240, 0.35);
}
.brand-mark img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.brand-copy strong {
	display: block;
	font-size: 0.95rem;
	letter-spacing: -0.02em;
	font-weight: 650;
	color: var(--text);
}
.brand-copy small {
	display: block;
	color: var(--text-muted);
	font-size: 0.82rem;
	font-weight: 400;
	margin-top: 2px;
}

.gb-search {
	margin: 0 14px 14px;
	display: flex; align-items: center; gap: 8px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 0 12px;
}
.gb-search svg { width: 15px; height: 15px; color: var(--text-faint); }
.gb-search input {
	flex: 1; background: transparent; border: 0;
	padding: 11px 0; font-size: 13px; outline: none;
}

.gb-nav { flex: 1; overflow: auto; padding: 0 10px 16px; }
.gb-nav-group { margin-bottom: 6px; }
.gb-nav-cat {
	width: 100%; display: flex; align-items: center; gap: 10px;
	padding: 9px 10px; border-radius: 10px;
	color: var(--text-muted); font-size: 13px; font-weight: 600;
}
.gb-nav-cat:hover, .gb-nav-cat.active { background: var(--bg-hover); color: var(--text); }
.gb-nav-dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--dot, var(--accent));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--accent)) 22%, transparent);
}
.gb-nav-cat-name { flex: 1; text-align: left; }
.gb-nav-pages { display: none; padding: 2px 0 6px 18px; }
.gb-nav-group.open .gb-nav-pages { display: block; }
.gb-nav-page {
	width: 100%; text-align: left; padding: 7px 10px;
	border-radius: 8px; font-size: 12.5px; color: var(--text-muted);
	border-left: 2px solid transparent; margin-bottom: 1px;
}
.gb-nav-page:hover { background: var(--bg-hover); color: var(--text); }
.gb-nav-page.active {
	background: var(--accent-soft); color: var(--text);
	border-left-color: var(--accent); font-weight: 600;
}
.gb-sidebar-foot {
	padding: 12px 16px; border-top: 1px solid var(--line);
	font-size: 11px; color: var(--text-faint);
}

.gb-main { min-width: 0; display: flex; flex-direction: column; }
.gb-topbar {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 28px; border-bottom: 1px solid var(--line);
	position: sticky; top: 0; background: rgba(11,12,15,.9); backdrop-filter: blur(10px); z-index: 5;
}
.gb-crumbs { font-size: 12px; color: var(--text-faint); }
.gb-top-actions { display: flex; gap: 8px; }
.gb-btn {
	padding: 8px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
	border: 1px solid var(--line); background: var(--bg-soft);
}
.gb-btn:hover { background: var(--bg-hover); }
.gb-btn.ghost { background: transparent; }

.gb-content {
	position: relative;
	padding: 36px 36px 64px;
	width: 100%;
	max-width: none;
}
.gb-content:not(.no-toc) {
	padding-right: calc(var(--toc-w) + 36px);
}
.gb-content.no-toc { padding-right: 36px; }
.gb-content-main {
	min-width: 0;
	max-width: 760px;
	width: 100%;
}

/* Glossário / TOC — extrema direita da tela */
.gb-toc {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: var(--toc-w);
	z-index: 20;
	padding: 88px 16px 24px 18px;
	border-left: 1px solid var(--line);
	background: rgba(11, 12, 15, 0.92);
	backdrop-filter: blur(10px);
	overflow: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--line-strong) transparent;
}
.gb-toc-title {
	font-size: 11px; font-weight: 700; letter-spacing: .06em;
	text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px;
}
.gb-toc-nav { display: flex; flex-direction: column; gap: 2px; }
.gb-toc-link {
	text-align: left; padding: 6px 8px; border-radius: 6px;
	font-size: 12.5px; line-height: 1.35; color: var(--text-muted);
	border-left: 2px solid transparent;
}
.gb-toc-link:hover { color: var(--text); background: var(--bg-hover); }
.gb-toc-link.active {
	color: var(--text); border-left-color: var(--accent);
	background: var(--accent-soft); font-weight: 600;
}
.gb-toc-link.nested { padding-left: 16px; font-size: 12px; }

.gb-home-hero { margin-bottom: 32px; }
.gb-home-kicker {
	font-size: 11px; font-weight: 700; letter-spacing: .08em;
	text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.gb-home-hero h1 {
	font-size: 40px; font-weight: 800; letter-spacing: -0.03em;
	line-height: 1.1; margin-bottom: 14px;
}
.gb-home-hero p { font-size: 16px; line-height: 1.65; color: var(--text-muted); max-width: 60ch; }
.gb-home-section-title {
	font-size: 13px; font-weight: 700; color: var(--text-faint);
	text-transform: uppercase; letter-spacing: .06em; margin: 8px 0 14px;
}
.gb-card-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.gb-link-card {
	text-align: left; padding: 18px; border-radius: var(--radius);
	border: 1px solid var(--line); background: var(--bg-elev); transition: .15s;
}
.gb-link-card:hover {
	border-color: color-mix(in srgb, var(--card-color, var(--accent)) 55%, var(--line));
	transform: translateY(-1px);
}
.gb-link-card-icon {
	width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
	background: color-mix(in srgb, var(--card-color, var(--accent)) 18%, transparent);
	color: var(--card-color, var(--accent)); margin-bottom: 12px; font-weight: 800;
}
.gb-link-card h3 { font-size: 15px; margin-bottom: 6px; }
.gb-link-card p { font-size: 13px; color: var(--text-muted); line-height: 1.45; }

.gb-article-meta { display: flex; gap: 8px; margin-bottom: 10px; }
.gb-badge {
	padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
	background: color-mix(in srgb, var(--badge, var(--accent)) 16%, transparent);
	color: var(--badge, var(--accent));
}
.gb-article-title {
	font-size: 36px; font-weight: 800; letter-spacing: -0.03em;
	line-height: 1.15; margin-bottom: 12px;
}
.gb-article-summary {
	font-size: 16px; color: var(--text-muted); line-height: 1.6;
	margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line);
}

.gb-prose { font-size: 15px; line-height: 1.8; color: #d6dae3; }
.gb-prose h2 { font-size: 22px; font-weight: 750; color: var(--text); margin: 30px 0 12px; }
.gb-prose h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.gb-prose p { margin: 0 0 14px; }
.gb-prose .lead {
	display: block; font-size: 17px; color: var(--text);
	font-weight: 500; margin-bottom: 16px;
}
.gb-prose ul, .gb-prose ol { margin: 0 0 16px 1.2em; }
.gb-prose li { margin: 4px 0; }
.gb-prose strong { color: var(--text); }
.gb-prose code {
	font-family: var(--mono); font-size: 12.5px;
	background: var(--bg-soft); border: 1px solid var(--line);
	padding: 1px 6px; border-radius: 5px;
}
.gb-prose table {
	width: 100%; border-collapse: collapse; margin: 0 0 18px;
	font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.gb-prose th, .gb-prose td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.gb-prose th { background: var(--bg-elev); }

.hint {
	border-radius: 12px; padding: 14px 16px; margin: 18px 0;
	border: 1px solid var(--line); background: var(--bg-elev);
}
.hint strong { display: block; margin-bottom: 4px; font-size: 13px; }
.hint p { margin: 0; font-size: 14px; color: var(--text-muted); }
.hint-info { border-color: rgba(52,109,221,.4); background: rgba(52,109,221,.1); }
.hint-info strong { color: #8eb0ff; }
.hint-tip { border-color: rgba(14,165,233,.4); background: rgba(14,165,233,.1); }
.hint-tip strong { color: #7dd3fc; }
.hint-warning { border-color: rgba(202,138,4,.4); background: rgba(202,138,4,.1); }
.hint-warning strong { color: #facc15; }
.hint-danger { border-color: rgba(220,38,38,.45); background: rgba(220,38,38,.1); }
.hint-danger strong { color: #fca5a5; }

.gb-prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.example {
	border-radius: 12px; padding: 12px 14px; margin: 12px 0 16px;
	border: 1px solid var(--line); background: var(--bg-elev);
}
.example strong { display: block; margin-bottom: 4px; font-size: 12.5px; }
.example p { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }
.example-ok { border-color: rgba(22,163,74,.4); background: rgba(22,163,74,.1); }
.example-ok strong { color: #86efac; }
.example-bad { border-color: rgba(220,38,38,.4); background: rgba(220,38,38,.1); }
.example-bad strong { color: #fca5a5; }

.gb-pager {
	display: flex; justify-content: space-between; gap: 12px;
	margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line);
}
.gb-pager-btn {
	flex: 1; text-align: left; padding: 14px 16px;
	border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-elev);
}
.gb-pager-btn.next { text-align: right; }
.gb-pager-btn span { display: block; font-size: 11px; color: var(--text-faint); margin-bottom: 4px; }
.gb-empty { margin: 80px auto; text-align: center; color: var(--text-muted); }
.gb-empty h2 { color: var(--text); margin-bottom: 8px; }

@media (max-width: 1100px) {
	.gb-toc { display: none !important; }
	.gb-content,
	.gb-content:not(.no-toc),
	.gb-content.no-toc { padding-right: 24px; }
}

@media (max-width: 900px) {
	.gb-shell { grid-template-columns: 1fr; }
	.gb-sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
	.gb-nav { max-height: 280px; }
	.gb-content { padding: 24px 18px 48px; }
	.gb-home-hero h1, .gb-article-title { font-size: 28px; }
}
