/* =========================================================
   HostRainbow Blog & KB — main stylesheet
   Sections: fonts, tokens, reset, layout, header, hero, cards,
   buttons/pills, single post, KB, footer, utilities, dark mode,
   responsive, print, accessibility.
   ========================================================= */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../fonts/plus-jakarta-sans-variable.woff2') format('woff2-variations'), url('../fonts/plus-jakarta-sans-variable.woff2') format('woff2');
}

/* ---------- Design tokens ---------- */
:root {
	--font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--color-bg: #ffffff;
	--color-bg-alt: #f8fafc;
	--color-surface: #ffffff;
	--color-text: #0f172a;
	--color-text-muted: #64748b;
	--color-border: #e6eaf0;

	--color-primary: #4f46e5;
	--color-primary-hover: #4338ca;
	--color-primary-light: #eef2ff;
	--color-on-primary: #ffffff;

	--color-accent-green: #16a34a;
	--color-accent-blue: #2563eb;
	--color-accent-purple: #8b5cf6;

	--color-footer-bg: #0f172a;
	--color-footer-text: #b9c2d0;
	--color-footer-heading: #ffffff;
	--color-footer-border: #1e293b;

	--shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .06);
	--shadow-card-hover: 0 8px 16px rgba(15, 23, 42, .06), 0 24px 48px rgba(15, 23, 42, .12);
	--shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);

	--radius-lg: 20px;
	--radius-md: 14px;
	--radius-sm: 10px;
	--radius-full: 999px;

	--container: 1240px;
	--header-height: 76px;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--color-bg: #0b1120;
		--color-bg-alt: #0f172a;
		--color-surface: #141d2e;
		--color-text: #e6eaf2;
		--color-text-muted: #94a3b8;
		--color-border: #223047;
		--color-primary-light: #1b1e3d;
		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--color-bg: #0b1120;
	--color-bg-alt: #0f172a;
	--color-surface: #141d2e;
	--color-text: #e6eaf2;
	--color-text-muted: #94a3b8;
	--color-border: #223047;
	--color-primary-light: #1b1e3d;
	color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
ul, ol { padding-left: 1.2em; }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 .5em;
	letter-spacing: -0.01em;
}
p { margin: 0 0 1.2em; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

.hrb-container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--color-primary);
	color: #fff;
	padding: 12px 20px;
	z-index: 10000;
	border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* ---------- Buttons & pills ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: .95rem;
	padding: 12px 22px;
	border-radius: var(--radius-md);
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
	white-space: nowrap;
}
.btn-primary {
	background: var(--color-primary);
	color: var(--color-on-primary);
	box-shadow: 0 8px 20px rgba(79, 70, 229, .25);
}
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; transform: translateY(-1px); }
.btn-secondary {
	background: var(--color-surface);
	color: var(--color-text);
	border-color: var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--color-primary-light);
	color: var(--color-primary);
	border: 1px solid rgba(79, 70, 229, .15);
	border-radius: var(--radius-full);
	padding: 6px 14px;
	font-size: .8rem;
	font-weight: 700;
}
.pill-muted {
	background: var(--color-bg-alt);
	color: var(--color-text-muted);
	border-color: var(--color-border);
}

.gradient-text {
	background: linear-gradient(90deg, var(--color-accent-green), var(--color-accent-blue) 55%, var(--color-accent-purple));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* =========================================================
   Header
   ========================================================= */

.hrb-promo-bar {
	background: linear-gradient(90deg, #4f46e5, #6d28d9);
	color: #fff;
	text-align: center;
	font-size: .875rem;
	font-weight: 600;
	padding: 10px 16px;
}
.hrb-promo-bar a { color: #fff; text-decoration: underline; margin-left: 6px; }

.hrb-header {
	position: sticky;
	top: 0;
	z-index: 200;
	border-bottom: 1px solid var(--color-border);
	transition: box-shadow .2s ease;
}
.hrb-header.is-stuck { box-shadow: var(--shadow-sm); }
/* The frosted background lives on a pseudo-element, not .hrb-header itself,
   because backdrop-filter on an ancestor makes it the containing block for
   position:fixed descendants — which would break the fixed mobile nav panel. */
.hrb-header::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--color-bg) 92%, transparent);
	backdrop-filter: saturate(180%) blur(10px);
}

.hrb-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: var(--header-height);
}

.site-branding { display: flex; align-items: center; }
.site-logo-link { display: flex; align-items: center; gap: 10px; }
.site-logo-link img { max-height: 40px; width: auto; }
.site-title {
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: 1.3rem;
	color: var(--color-text);
	margin: 0;
}
.site-description { font-size: .8rem; color: var(--color-text-muted); margin: 0; }

.primary-navigation { flex: 1; display: flex; justify-content: center; }
.primary-navigation > .menu {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.primary-navigation .menu-item { position: relative; }
.primary-navigation .menu-link {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	color: var(--color-text);
	font-weight: 600;
	font-size: .95rem;
}
.primary-navigation .menu-link:hover,
.primary-navigation .menu-item.current-menu-item > .menu-link {
	background: var(--color-bg-alt);
	color: var(--color-primary);
}
.menu-caret { transition: transform .15s ease; }
.menu-item-has-children:hover > .menu-link .menu-caret { transform: rotate(180deg); }

.primary-navigation .sub-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 220px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-card-hover);
	list-style: none;
	margin: 0;
	padding: 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
	z-index: 50;
}
.primary-navigation .menu-item-has-children:hover > .sub-menu,
.primary-navigation .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.primary-navigation .sub-menu .menu-link { padding: 10px 12px; border-radius: var(--radius-sm); }
.primary-navigation .sub-menu .sub-menu { top: 0; left: calc(100% + 6px); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-full);
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-text);
	cursor: pointer;
}
.theme-toggle:hover { border-color: var(--color-primary); color: var(--color-primary); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle {
	display: none;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
	content: '';
	display: block;
	width: 18px;
	height: 2px;
	background: var(--color-text);
	position: relative;
	transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 960px) {
	.primary-navigation {
		position: fixed;
		inset: var(--header-height) 0 0 0;
		background: var(--color-bg);
		flex-direction: column;
		justify-content: flex-start;
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform .25s ease;
		padding: 12px 20px 40px;
	}
	.primary-navigation.is-open { transform: translateX(0); }
	.primary-navigation > .menu { flex-direction: column; align-items: stretch; width: 100%; gap: 2px; }
	.primary-navigation .menu-link { padding: 14px 10px; font-size: 1.05rem; justify-content: space-between; }
	.primary-navigation .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		background: var(--color-bg-alt);
		display: none;
		margin: 4px 0 8px;
	}
	.primary-navigation .menu-item-has-children.is-open > .sub-menu { display: block; }
	.menu-toggle { display: inline-flex; }
	.header-cta { display: none; }
}

/* =========================================================
   Hero
   ========================================================= */

.hrb-hero { padding: 72px 0 56px; text-align: center; background: radial-gradient(circle at 50% 0%, var(--color-primary-light), transparent 60%); }
.hrb-hero-badge { margin-bottom: 20px; }
.hrb-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 900px; margin-left: auto; margin-right: auto; }
.hrb-hero-sub { font-size: 1.15rem; color: var(--color-text-muted); max-width: 640px; margin: 0 auto 32px; }

/* Search */
.hrb-search { position: relative; max-width: 620px; margin: 0 auto 20px; }
.hrb-search-form { display: flex; gap: 8px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: 6px 6px 6px 20px; box-shadow: var(--shadow-card); }
.hrb-search-form input[type="search"] { flex: 1; border: none; background: transparent; outline: none; color: var(--color-text); }
.hrb-search-form button { border-radius: var(--radius-full); }
.hrb-search-suggestions {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-card-hover);
	text-align: left;
	overflow: hidden;
	z-index: 40;
	display: none;
}
.hrb-search-suggestions.is-visible { display: block; }
.hrb-search-suggestions a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; color: var(--color-text); border-bottom: 1px solid var(--color-border); }
.hrb-search-suggestions a:last-child { border-bottom: none; }
.hrb-search-suggestions a:hover { background: var(--color-bg-alt); }
.hrb-search-suggestions .suggestion-type { font-size: .75rem; color: var(--color-text-muted); }

.hrb-hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* =========================================================
   Sections & Grid Cards
   ========================================================= */

.hrb-section { padding: 56px 0; }
.hrb-section-alt { background: var(--color-bg-alt); }
.hrb-section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.hrb-section-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.hrb-section-head p { color: var(--color-text-muted); }
.hrb-section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.hrb-section-head-row h2 { margin: 0; text-align: left; }

.hrb-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}
@media (max-width: 980px) { .hrb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .hrb-grid { grid-template-columns: 1fr; } }

.hrb-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
	height: 100%;
}
.hrb-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); border-color: transparent; }
.hrb-card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--color-bg-alt); }
.hrb-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hrb-card:hover .hrb-card-media img { transform: scale(1.05); }
.hrb-card-category {
	position: absolute;
	top: 14px;
	left: 14px;
	background: rgba(255,255,255,.92);
	color: var(--color-primary);
	font-size: .72rem;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: var(--radius-full);
	text-transform: uppercase;
	letter-spacing: .03em;
}
.hrb-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hrb-card-title { font-size: 1.15rem; margin: 0; }
.hrb-card-title a { color: var(--color-text); }
.hrb-card-title a:hover { color: var(--color-primary); }
.hrb-card-excerpt { color: var(--color-text-muted); font-size: .92rem; margin: 0; flex: 1; }
.hrb-card-meta { display: flex; align-items: center; gap: 14px; font-size: .8rem; color: var(--color-text-muted); margin-top: 6px; }
.hrb-card-meta .dot::before { content: '\2022'; margin-right: 14px; }

/* KB category cards */
.hrb-kb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 980px) { .hrb-kb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .hrb-kb-grid { grid-template-columns: 1fr; } }
.hrb-kb-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	padding: 26px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: transform .2s ease, box-shadow .2s ease;
}
.hrb-kb-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.card-icon-glyph {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--radius-md);
	background: var(--color-primary-light);
	color: var(--color-primary);
	font-size: 1.4rem;
}
.hrb-kb-card h3 { font-size: 1.05rem; margin: 0; }
.hrb-kb-card p { color: var(--color-text-muted); font-size: .88rem; margin: 0; }
.hrb-kb-card .kb-count { font-size: .78rem; color: var(--color-primary); font-weight: 700; margin-top: auto; }

/* =========================================================
   Breadcrumbs
   ========================================================= */
.hrb-breadcrumbs { padding: 18px 0; font-size: .85rem; color: var(--color-text-muted); }
.hrb-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hrb-breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.hrb-breadcrumbs li:not(:last-child)::after { content: '/'; color: var(--color-border); margin-left: 6px; }
.hrb-breadcrumbs a { color: var(--color-text-muted); }
.hrb-breadcrumbs a:hover { color: var(--color-primary); }
.hrb-breadcrumbs [aria-current="page"] { color: var(--color-text); font-weight: 600; }

/* =========================================================
   Single post
   ========================================================= */

.hrb-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0%;
	background: linear-gradient(90deg, var(--color-accent-green), var(--color-accent-blue), var(--color-accent-purple));
	z-index: 999;
	transition: width .1s linear;
}

.hrb-post-header { padding: 8px 0 32px; max-width: 820px; margin: 0 auto; text-align: center; }
.hrb-post-header h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.hrb-post-meta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; color: var(--color-text-muted); font-size: .9rem; margin-top: 18px; }
.hrb-post-meta .author { display: flex; align-items: center; gap: 8px; }
.hrb-post-meta img.avatar { border-radius: 50%; }

.hrb-post-thumbnail { max-width: 980px; margin: 0 auto 40px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }

.hrb-post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; max-width: 1100px; margin: 0 auto; }
.hrb-post-layout.no-toc { grid-template-columns: minmax(0, 820px); justify-content: center; }
@media (max-width: 960px) { .hrb-post-layout, .hrb-post-layout.no-toc { grid-template-columns: 1fr; } }

.hrb-toc-wrap { position: sticky; top: calc(var(--header-height) + 24px); }
.hrb-toc { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px 20px; }
.hrb-toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); margin-bottom: 10px; }
.hrb-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .87rem; }
.hrb-toc ul ul { padding-left: 14px; margin-top: 6px; }
.hrb-toc a { color: var(--color-text-muted); display: block; padding: 3px 0; border-left: 2px solid transparent; padding-left: 10px; }
.hrb-toc a.is-active { color: var(--color-primary); border-color: var(--color-primary); font-weight: 600; }
@media (max-width: 960px) { .hrb-toc-wrap { position: static; margin-bottom: 24px; } }

.hrb-content { font-size: 1.08rem; }
.hrb-content h2 { font-size: 1.5rem; margin-top: 2em; }
.hrb-content h3 { font-size: 1.2rem; margin-top: 1.6em; }
.hrb-content p { margin-bottom: 1.3em; }
.hrb-content ul, .hrb-content ol { margin-bottom: 1.3em; }
.hrb-content li { margin-bottom: .4em; }
.hrb-content img { border-radius: var(--radius-md); box-shadow: var(--shadow-card); margin: 1.5em 0; }
.hrb-content blockquote {
	margin: 1.6em 0;
	padding: 18px 22px;
	border-left: 4px solid var(--color-primary);
	background: var(--color-bg-alt);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	color: var(--color-text-muted);
	font-style: italic;
}
.hrb-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .95rem; }
.hrb-content th, .hrb-content td { border: 1px solid var(--color-border); padding: 10px 14px; text-align: left; }
.hrb-content th { background: var(--color-bg-alt); }
.hrb-content code { background: var(--color-bg-alt); padding: .15em .4em; border-radius: 6px; font-size: .9em; }
.hrb-content pre {
	position: relative;
	background: #0f172a;
	color: #e2e8f0;
	padding: 20px 22px;
	border-radius: var(--radius-md);
	overflow-x: auto;
	margin: 1.6em 0;
}
.hrb-content pre code { background: transparent; padding: 0; color: inherit; }
.hrb-copy-code {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(255,255,255,.1);
	color: #e2e8f0;
	border: 1px solid rgba(255,255,255,.2);
	border-radius: var(--radius-sm);
	padding: 5px 10px;
	font-size: .72rem;
	cursor: pointer;
}
.hrb-copy-code:hover { background: rgba(255,255,255,.2); }

.hrb-faq { margin: 1.6em 0; display: flex; flex-direction: column; gap: 10px; }
.hrb-faq-item { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 14px 18px; }
.hrb-faq-item summary { font-weight: 700; cursor: pointer; }
.hrb-faq-answer { margin-top: 10px; color: var(--color-text-muted); }

.hrb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; }

.hrb-author-box {
	display: flex;
	gap: 18px;
	background: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 24px;
	margin: 40px 0;
}
.hrb-author-box img { border-radius: 50%; width: 64px; height: 64px; }
.hrb-author-box h3 { margin: 0 0 6px; font-size: 1rem; }
.hrb-author-box p { margin: 0; color: var(--color-text-muted); font-size: .92rem; }

.hrb-related { margin-top: 56px; }
.hrb-related h2 { font-size: 1.4rem; margin-bottom: 24px; }

.hrb-share { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 32px 0; padding: 18px 22px; background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.hrb-share-label { font-size: .85rem; font-weight: 700; color: var(--color-text-muted); }
.hrb-share-links { display: flex; gap: 8px; }
.hrb-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	color: var(--color-text-muted);
	cursor: pointer;
}
.hrb-share-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.hrb-share-btn.is-copied { border-color: var(--color-accent-green); color: var(--color-accent-green); }

.hrb-adjacent-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; }
@media (max-width: 600px) { .hrb-adjacent-nav { grid-template-columns: 1fr; } }
.hrb-adjacent-link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 20px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}
.hrb-adjacent-link:hover { border-color: var(--color-primary); }
.hrb-adjacent-link.is-next { text-align: right; align-items: flex-end; }
.hrb-adjacent-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); }
.hrb-adjacent-title { font-weight: 700; color: var(--color-text); }

.hrb-freshness { color: var(--color-text-muted); }

.hrb-featured-badge {
	position: absolute;
	top: 14px;
	right: 14px;
	background: linear-gradient(90deg, var(--color-accent-green), var(--color-accent-blue));
	color: #fff;
	font-size: .7rem;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: var(--radius-full);
	text-transform: uppercase;
	letter-spacing: .03em;
}

/* =========================================================
   Knowledge Base
   ========================================================= */

.hrb-kb-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr) 240px; gap: 40px; align-items: start; }
.hrb-kb-layout.no-toc { grid-template-columns: 280px minmax(0, 1fr); }
@media (max-width: 1100px) {
	.hrb-kb-layout, .hrb-kb-layout.no-toc { grid-template-columns: 260px minmax(0, 1fr); }
	.hrb-kb-layout .hrb-toc-wrap { display: none; }
}
@media (max-width: 820px) {
	/* .no-toc must be repeated here: as a two-class selector it's more specific
	   than the bare .hrb-kb-layout above, so without this it wins even on mobile
	   and the sidebar+content grid never collapses to a single column. */
	.hrb-kb-layout, .hrb-kb-layout.no-toc { grid-template-columns: 1fr; }
}

.hrb-kb-sidebar { position: sticky; top: calc(var(--header-height) + 24px); background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 20px; max-height: calc(100vh - var(--header-height) - 48px); overflow-y: auto; }
@media (max-width: 820px) { .hrb-kb-sidebar { position: static; max-height: none; } }
.hrb-kb-sidebar-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); margin-bottom: 10px; }
.hrb-kb-tree { list-style: none; margin: 0; padding: 0; }
.hrb-kb-tree > li { margin-bottom: 16px; }
.hrb-kb-tree .kb-cat-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; color: var(--color-text); margin-bottom: 6px; }
.hrb-kb-tree ul { list-style: none; margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.hrb-kb-tree a { display: block; padding: 6px 10px; border-radius: var(--radius-sm); font-size: .88rem; color: var(--color-text-muted); }
.hrb-kb-tree a:hover { background: var(--color-surface); color: var(--color-primary); }
.hrb-kb-tree a.is-current { background: var(--color-primary-light); color: var(--color-primary); font-weight: 600; }

.hrb-helpful { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; margin: 48px 0; text-align: center; }
.hrb-helpful h3 { margin: 0 0 14px; font-size: 1.05rem; }
.hrb-helpful-actions { display: flex; justify-content: center; gap: 12px; }
.hrb-helpful-thanks { display: none; color: var(--color-accent-green); font-weight: 600; }
.hrb-helpful.is-voted .hrb-helpful-actions { display: none; }
.hrb-helpful.is-voted .hrb-helpful-thanks { display: block; }

.hrb-kb-last-updated { font-size: .85rem; color: var(--color-text-muted); margin-bottom: 24px; }

/* =========================================================
   Search / 404
   ========================================================= */

.hrb-search-page-header { text-align: center; padding: 48px 0 32px; }
.hrb-no-results { text-align: center; padding: 60px 20px; background: var(--color-bg-alt); border-radius: var(--radius-lg); }
.hrb-404 { text-align: center; padding: 100px 20px; }
.hrb-404 .code { font-size: 5rem; font-weight: 800; }

/* =========================================================
   Pagination & comments
   ========================================================= */

.hrb-pagination { margin: 48px 0 0; display: flex; justify-content: center; }
.hrb-pagination ul { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; }
.hrb-pagination a, .hrb-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--color-border); color: var(--color-text); }
.hrb-pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.hrb-pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); }

.comments-area { max-width: 820px; margin: 48px auto 0; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-body { background: var(--color-bg-alt); border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px; }
.comment-form input, .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); margin-bottom: 14px; }

/* =========================================================
   Footer
   ========================================================= */

.hrb-footer { background: var(--color-footer-bg); color: var(--color-footer-text); padding: 64px 0 0; margin-top: 80px; }
.hrb-footer a { color: var(--color-footer-text); }
.hrb-footer a:hover { color: #fff; }
.hrb-footer-grid { display: flex; flex-wrap: wrap; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--color-footer-border); }
.hrb-footer-brand { flex: 1 1 260px; max-width: 340px; }
.hrb-footer-links-grid {
	flex: 3 1 600px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 32px;
}
@media (max-width: 600px) { .hrb-footer-brand { max-width: none; } .hrb-footer-links-grid { grid-template-columns: repeat(2, 1fr); } }

.hrb-footer-brand img { max-height: 36px; margin-bottom: 16px; }
.hrb-footer-brand p { color: var(--color-footer-text); font-size: .9rem; max-width: 320px; }
.hrb-footer-contact { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.hrb-footer-contact li { display: flex; align-items: center; gap: 10px; }

.footer-widget-title { color: var(--color-footer-heading); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }
.hrb-footer-col ul, .footer-widget ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hrb-footer-col a, .footer-widget a { font-size: .92rem; }
.hrb-footer-col h3 a { font-size: inherit; color: var(--color-footer-heading); }

.hrb-footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; flex-wrap: wrap; font-size: .85rem; }
.hrb-footer-social { display: flex; gap: 14px; }
.hrb-footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--color-footer-border); }
.hrb-footer-social a:hover { border-color: var(--color-primary); color: #fff; background: var(--color-primary); }

.hrb-back-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--color-primary);
	color: #fff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(79, 70, 229, .3);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, background-color .15s ease;
	z-index: 150;
}
.hrb-back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.hrb-back-to-top:hover { background: var(--color-primary-hover); }
@media (max-width: 600px) { .hrb-back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; } }

/* =========================================================
   Utilities
   ========================================================= */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hrb-widget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.widget-title { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); margin-bottom: 14px; }

/* =========================================================
   Print (KB articles)
   ========================================================= */
@media print {
	.hrb-header, .hrb-promo-bar, .hrb-footer, .hrb-kb-sidebar, .hrb-toc-wrap, .hrb-helpful, .hrb-related, .hrb-reading-progress, .menu-toggle { display: none !important; }
	.hrb-kb-layout { grid-template-columns: 1fr !important; }
	body { color: #000; background: #fff; }
}

.translera-switcher{
    position: fixed;
    top: 120px;      /* fixed px instead of % */
    right: 10px;
    z-index: 999;
}

@media (max-width: 768px) {
    .translera-switcher{
        top: 80px;
        right: 5px;
    }
}