/* Supplied artwork keeps its original shape; the wordmark is light on the dark header. */
.kb-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex: none;
	color: #fff;
	text-decoration: none;
}

.kb-brand__artwork {
	display: block;
	width: 156px;
	height: auto;
	flex: none;
}

.kb-brand__label {
	font-size: 16px;
	font-weight: 700;
	color: #c3ced6;
	white-space: nowrap;
}

/* Direction-aware top navigation, scoped to knowledge package pages. */
.kb-scroll-header {
	position: sticky;
	top: 0;
	z-index: 100;
	transform: translateY(0);
	opacity: 1;
}

.kb-scroll-header.is-scroll-hidden {
	transform: translateY(-100%);
	opacity: 0;
	pointer-events: none;
	transition: transform 160ms ease-out, opacity 160ms ease-out;
}

.kb-scroll-nav {
	--kb-visible-header-height: var(--kb-header-height, 76px);
}

.kb-scroll-nav.kb-header-is-hidden {
	--kb-visible-header-height: 0px;
}

.kb-scroll-nav .kb-side {
	top: var(--kb-visible-header-height) !important;
	max-height: calc(100vh - var(--kb-visible-header-height)) !important;
	max-height: calc(100dvh - var(--kb-visible-header-height)) !important;
}

.kb-scroll-nav .kb-main [id] {
	scroll-margin-top: calc(var(--kb-header-height, 76px) + 16px);
}

@media (prefers-reduced-motion: reduce) {
	.kb-scroll-header.is-scroll-hidden {
		transition: none;
	}
}

/* Keep the knowledge-page rail at its original viewport position. */
.kb-rail-anchor {
	display: contents;
}

@media (min-width: 1101px) {
	/* 248px rail + 40px gap + the page's original article width.
	 * Equal gutters centre the whole group while preserving full-width backgrounds.
	 * Share the inset with the breadcrumb/title so their left edges stay aligned.
	 */
	.kb-content > .kb-pad {
		padding-inline: max(40px, calc((100% - var(--kb-reading-width) - 288px) / 2)) !important;
	}

	.kb-rail-anchor {
		display: block;
		flex: 0 0 248px;
		min-width: 0;
		min-height: var(--kb-rail-height, 0px);
	}

	.kb-rail-anchor > .kb-rail[data-kb-fixed] {
		position: fixed !important;
		top: var(--kb-rail-top) !important;
		left: var(--kb-rail-left);
		width: 248px !important;
		max-height: calc(100vh - var(--kb-rail-top) - 16px);
		max-height: calc(100dvh - var(--kb-rail-top) - 16px);
		overflow-y: auto;
		scrollbar-width: thin;
		overscroll-behavior-y: contain;
		align-content: start;
		box-sizing: border-box;
	}
}
/* Headings break evenly. */
h1,h2,h3{text-wrap:balance}

/* Knowledge home: five equal task entries in one row; stacked rows on narrow screens. */
.kb-tiles {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
        margin-top: 28px;
}

.kb-tile {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 20px 10px 16px;
        border: 1px solid #e3e7ea;
        border-radius: 12px;
        background: #fff;
        color: #12202b;
        text-align: center;
        text-decoration: none;
        transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.kb-tile:hover {
        border-color: #1e5bd8;
        box-shadow: 0 10px 24px rgba(18, 32, 43, .08);
        transform: translateY(-2px);
}

.kb-tile svg {
        width: 28px;
        height: 28px;
}

.kb-tile__name {
        font-size: 16px;
        font-weight: 900;
        line-height: 1.4;
}

.kb-tile__count {
        font-size: 13px;
        color: #6b7882;
}

@media (max-width: 900px) {
        .kb-tiles {
                grid-template-columns: 1fr;
                gap: 8px;
        }

        .kb-tile {
                flex-direction: row;
                padding: 14px 16px;
                text-align: left;
        }

        .kb-tile svg {
                width: 24px;
                height: 24px;
        }

        .kb-tile__count {
                margin-left: auto;
        }
}

@media (prefers-reduced-motion: reduce) {
        .kb-tile { transition: none; }
        .kb-tile:hover { transform: none; }
}

/* Pages without the right rail (home, task pages) centre their text column. */
.kb-main:not(:has(.kb-rail)) {
        justify-content: center;
}

/* 2026-11-18 header centred with the reading column */
/* Pages without the left rail centre one text column; the breadcrumb/title band
   uses the same inset so both share one centred column (rail pages keep the rule above). */
@media (min-width: 761px) {
        .kb-content:not(:has(.kb-rail)) > .kb-pad {
                padding-inline: max(40px, calc((100% - var(--kb-reading-width)) / 2)) !important;
        }
}
