/**
 * Metal America Knowledge Hub — shared design tokens and components.
 *
 * Tokens mirror the Metal America UI system. The font is Work Sans per the
 * internal-software convention (SOA Portal), not the system's default stack.
 * Every rule is namespaced under .kb-* so nothing leaks into theme styles.
 */

/*
 * Tokens are declared on .kb rather than :root on purpose. The theme's
 * blog-styles.css also defines --ma-* names in :root, and whichever sheet
 * loads last would otherwise win. Scoping to the hub wrapper makes these
 * values independent of stylesheet order.
 */
.kb {
	--ma-red: #ff2400;
	--ma-red-hover: #d42f4d;
	--ma-red-active: #b01c2e;
	--ma-red-light: #fff5f6;
	--ma-red-border: #ffbdc9;

	--ma-white: #ffffff;
	--ma-gray-100: #f7f7f7;
	--ma-gray-200: #ebf0f4;
	--ma-gray-300: #e4e9ec;
	--ma-gray-400: #d8dce0;
	--ma-gray-500: #babec1;
	--ma-gray-600: #989b9d;
	--ma-gray-700: #717375;
	--ma-gray-800: #5d5f61;
	--ma-gray-900: #3d3f40;
	--ma-black: #0a0a0a;

	--ma-success: #00a699;
	--ma-warning: #ffb400;
	--ma-info: #428bff;

	--ma-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.12);
	--ma-shadow-2: 0 4px 8px rgba(0, 0, 0, 0.1);
	--ma-shadow-inset: inset 1px 2px 2px rgba(0, 0, 0, 0.08);

	--ma-radius-sm: 8px;
	--ma-radius-md: 12px;
	--ma-radius-lg: 16px;
	--ma-radius-pill: 9999px;
	/* Buttons: much squarer than a pill (Logan, Nov 4). */
	--ma-radius-btn: 6px;

	--ma-font: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	font-family: var(--ma-font);
	color: var(--ma-black);
	background: var(--ma-white);
	line-height: 1.5;
}

/* ---------- Layout shell ---------- */

.kb *,
.kb *::before,
.kb *::after {
	box-sizing: border-box;
}

/*
 * Matches .header-bottom-container in the theme (1200px / 1rem) so hub content
 * lines up with the site header instead of sitting 8px inside it.
 */
.kb-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	box-sizing: border-box;
	width: 100%;
}

.kb-section {
	padding: 48px 0;
}

.kb-section--tight {
	padding: 32px 0;
}

.kb-section--gray {
	background: var(--ma-gray-100);
}

.kb-section__title {
	font-size: 26px;
	line-height: 34px;
	font-weight: 600;
	margin: 0 0 24px;
	color: var(--ma-black);
}

.kb-section__title--center {
	text-align: center;
}

/* ---------- Typography ---------- */

.kb h1,
.kb h2,
.kb h3,
.kb h4 {
	font-family: var(--ma-font);
	color: var(--ma-black);
	font-weight: 600;
	margin-top: 0;
}

.kb p {
	color: var(--ma-gray-700);
	margin: 0 0 16px;
}

.kb a {
	color: var(--ma-red);
	text-decoration: none;
}

.kb a:hover,
.kb a:focus {
	text-decoration: underline;
}

.kb-muted {
	color: var(--ma-gray-600);
	font-size: 14px;
}

/* ---------- Buttons ---------- */

.kb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 12px 24px;
	border-radius: var(--ma-radius-btn);
	font-family: var(--ma-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
	text-decoration: none;
}

.kb-btn:hover,
.kb-btn:focus {
	text-decoration: none;
}

/* Button colours are scoped so later theme sheets cannot override them. */
.kb .kb-btn--primary {
	background: var(--ma-red);
	color: var(--ma-white);
	box-shadow: var(--ma-shadow-1);
}

.kb .kb-btn--primary:hover,
.kb .kb-btn--primary:focus {
	background: var(--ma-red-hover);
	color: var(--ma-white);
}

.kb .kb-btn--primary:active {
	background: var(--ma-red-active);
}

.kb .kb-btn--secondary {
	background: transparent;
	border-color: var(--ma-black);
	color: var(--ma-black);
}

.kb .kb-btn--secondary:hover,
.kb .kb-btn--secondary:focus {
	background: var(--ma-black);
	color: var(--ma-white);
}

.kb .kb-btn[disabled] {
	background: var(--ma-gray-400);
	color: var(--ma-white);
	box-shadow: none;
	cursor: not-allowed;
}

.kb .kb-btn[disabled]:hover {
	background: var(--ma-gray-400);
}

.kb-btn--small {
	min-height: 36px;
	padding: 8px 16px;
	font-size: 14px;
}

/* ---------- Search ---------- */

.kb-search {
	position: relative;
	display: block;
	width: 100%;
	max-width: 560px;
}

.kb-search__input {
	width: 100%;
	height: 52px;
	padding: 12px 20px 12px 48px;
	font-family: var(--ma-font);
	font-size: 16px;
	color: var(--ma-black);
	background: var(--ma-white);
	border: 1px solid var(--ma-gray-300);
	border-radius: var(--ma-radius-pill);
	box-shadow: var(--ma-shadow-1);
	appearance: none;
}

.kb-search__input::placeholder {
	color: var(--ma-gray-500);
}

.kb-search__input:focus {
	outline: none;
	border-color: var(--ma-black);
	border-width: 2px;
	box-shadow: var(--ma-shadow-inset);
}

.kb-search__icon {
	position: absolute;
	top: 50%;
	left: 18px;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	color: var(--ma-gray-600);
	pointer-events: none;
	z-index: 1;
}

/* ---------- Type-ahead suggestions ---------- */

.kb-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 40;
	max-height: min(60vh, 420px);
	overflow-y: auto;
	background: var(--ma-white);
	border: 1px solid var(--ma-gray-300);
	border-radius: var(--ma-radius-md);
	box-shadow: var(--ma-shadow-2);
	text-align: left;
	overscroll-behavior: contain;
}

.kb-suggest__item {
	display: block;
	padding: 14px 20px;
	border-bottom: 1px solid var(--ma-gray-200);
	text-decoration: none;
	transition: background-color 150ms ease;
}

.kb-suggest__item:last-child {
	border-bottom: 0;
}

.kb-suggest__item:hover,
.kb-suggest__item.is-active,
.kb-suggest__item:focus {
	background: var(--ma-gray-100);
	text-decoration: none;
}

.kb-suggest__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 20px;
	color: var(--ma-black);
	margin-bottom: 2px;
}

/* One line only — the dropdown must never grow to fit a long summary. */
.kb-suggest__desc {
	display: block;
	font-size: 13px;
	line-height: 19px;
	color: var(--ma-gray-700);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kb-suggest__empty {
	margin: 0;
	padding: 18px 20px;
	font-size: 14px;
	color: var(--ma-gray-600);
}

@media (max-width: 767px) {
	.kb-suggest {
		max-height: 50vh;
	}

	.kb-suggest__item {
		padding: 12px 16px;
	}
}

/* ---------- Cards ---------- */

.kb-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.kb-grid--two {
	grid-template-columns: repeat(2, 1fr);
}

.kb-card {
	display: flex;
	flex-direction: column;
	padding: 24px;
	background: var(--ma-white);
	border: 1px solid var(--ma-gray-300);
	border-radius: var(--ma-radius-md);
	box-shadow: var(--ma-shadow-1);
	transition: box-shadow 200ms ease, transform 200ms ease;
	text-decoration: none;
	height: 100%;
}

a.kb-card:hover,
a.kb-card:focus {
	box-shadow: var(--ma-shadow-2);
	text-decoration: none;
}

/* Placeholder cards are intentionally inert, and read that way. */
.kb-card--soon {
	background: var(--ma-gray-100);
	border-style: dashed;
	box-shadow: none;
}

.kb-card--soon .kb-card__icon {
	background-color: var(--ma-gray-500);
}

.kb-card--soon .kb-card__title {
	color: var(--ma-gray-800);
}

/*
 * Icons are solid-silhouette SVG files with no fill attribute, so they are
 * painted as a mask over currentColor. That keeps them recolourable and
 * cacheable instead of inlining kilobytes of path data into every card.
 */
.kb-card__icon {
	display: block;
	width: 40px;
	height: 40px;
	margin-bottom: 16px;
	background-color: var(--ma-red);
	-webkit-mask: var(--kb-icon) no-repeat center / contain;
	mask: var(--kb-icon) no-repeat center / contain;
}

.kb-card__icon--image {
	background: none;
	-webkit-mask: none;
	mask: none;
	object-fit: contain;
}

/* Topics: a subfolder, lighter than a category card. */
.kb-card__icon--folder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-bottom: 12px;
	border-radius: 10px;
	background: var(--ma-red-light);
	color: var(--ma-red);
	-webkit-mask: none;
	mask: none;
}

.kb-card__icon--folder svg {
	width: 20px;
	height: 20px;
}

.kb-card--topic {
	padding: 20px;
}

.kb-card--topic .kb-card__title {
	font-size: 17px;
	line-height: 24px;
}

/* Who a limited folder or document is for. */
.kb .kb-lock {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	font-size: 12px;
	line-height: 16px;
	font-weight: 500;
	color: var(--ma-gray-700);
}

.kb .kb-lock svg {
	flex: none;
	width: 14px;
	height: 14px;
	color: var(--ma-gray-600);
}

.kb-folder-section {
	margin: 0 0 40px;
}

.kb .kb-folder-section__title {
	margin: 0 0 16px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--ma-gray-700);
}

.kb-card__title {
	font-size: 20px;
	line-height: 26px;
	font-weight: 600;
	margin: 0 0 8px;
	color: var(--ma-black);
}

.kb-card__desc {
	font-size: 14px;
	line-height: 20px;
	color: var(--ma-gray-700);
	margin: 0 0 16px;
}

.kb-card__meta {
	margin-top: auto;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--ma-gray-600);
}

/* ---------- Chips ---------- */

.kb-chip {
	display: inline-flex;
	align-items: center;
	padding: 6px 16px;
	border-radius: var(--ma-radius-pill);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	border: 1px solid var(--ma-gray-300);
	background: var(--ma-white);
	color: var(--ma-gray-700);
}

.kb-chip--brand {
	background: var(--ma-red-light);
	border-color: var(--ma-red-border);
	color: var(--ma-red);
}

.kb-chip--solid {
	background: var(--ma-black);
	border-color: var(--ma-black);
	color: var(--ma-white);
}

.kb-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.kb-chip-row--spaced {
	margin-bottom: 24px;
}

/* The conditional form field relies on [hidden]; a stray theme rule setting
   display on the wrapper would otherwise reveal it. */
.kb [hidden] {
	display: none !important;
}

/* ---------- Breadcrumbs ---------- */

.kb-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 20px 0;
	margin: 0;
	list-style: none;
	font-size: 14px;
}

.kb-breadcrumbs li {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ma-gray-600);
}

.kb-breadcrumbs li + li::before {
	/* Escaped, so it shows the same however the sheet is decoded (a raw one showed as three odd characters). */
	content: "\203A";
	color: var(--ma-gray-500);
}

.kb-breadcrumbs a {
	color: var(--ma-gray-700);
}

.kb-breadcrumbs a:hover {
	color: var(--ma-red);
}

.kb-breadcrumbs [aria-current="page"] {
	color: var(--ma-black);
	font-weight: 500;
}

/* ---------- Notices and empty states ---------- */

.kb-notice {
	padding: 16px 20px;
	border-radius: var(--ma-radius-md);
	border-left: 4px solid var(--ma-info);
	background: rgba(66, 139, 255, 0.05);
	font-size: 14px;
	color: var(--ma-gray-800);
}

.kb-notice--warning {
	border-left-color: var(--ma-warning);
	background: rgba(255, 180, 0, 0.05);
}

.kb-notice--internal {
	border-left-color: var(--ma-red);
	background: var(--ma-red-light);
}

.kb-empty {
	text-align: center;
	padding: 48px 24px;
	border: 1px dashed var(--ma-gray-300);
	border-radius: var(--ma-radius-md);
	background: var(--ma-white);
}

.kb-empty__title {
	font-size: 18px;
	font-weight: 600;
	color: var(--ma-gray-900);
	margin: 0 0 8px;
}

.kb-empty__text {
	font-size: 14px;
	color: var(--ma-gray-600);
	margin: 0;
}

/* No access, not found, switched off. */
/* Padding on the wrapper, not a margin on the card, so no band of the
   page behind shows above it. */
.kb .kb-refusal-wrap {
	padding-top: 48px;
	padding-bottom: 64px;
}

.kb .kb-refusal {
	max-width: 560px;
	margin: 0 auto;
	padding: 40px 24px;
}

.kb .kb-refusal .kb-empty__title {
	font-size: 22px;
	line-height: 28px;
}

.kb-refusal__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--ma-red-light);
	color: var(--ma-red);
}

.kb-refusal__icon svg {
	width: 26px;
	height: 26px;
}

.kb-refusal__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 24px;
}

.kb-refusal__actions form {
	margin: 0;
}

.kb-refusal__account {
	margin: 20px 0 0;
	font-size: 13px;
	color: var(--ma-gray-700);
}

.kb-refusal__account a {
	margin-left: 4px;
	color: inherit;
	text-decoration: underline;
}

/* ---------- Announcement banner (Settings > Banners) ---------- */

.kb-banner {
	border-bottom: 1px solid var(--ma-gray-300);
	background: var(--ma-gray-100);
}

.kb-banner--warning {
	background: #fff8e1;
	border-bottom-color: #ffe08a;
}

.kb-banner--urgent {
	background: var(--ma-red-light);
	border-bottom-color: var(--ma-red-border);
}

.kb-banner__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 16px;
	padding-top: 12px;
	padding-bottom: 12px;
	text-align: center;
}

.kb .kb-banner__text {
	margin: 0;
	font-size: 15px;
	line-height: 22px;
	color: var(--ma-gray-900);
}

.kb .kb-banner--urgent .kb-banner__text {
	color: var(--ma-black);
	font-weight: 500;
}

.kb .kb-banner__link {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

/* ---------- Pinned documents (Settings > Featured pins) ---------- */

.kb-pinned {
	margin: 0 0 32px;
}

.kb .kb-pinned__title {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--ma-gray-700);
	margin: 0 0 12px;
}

/* Document lists: Help Center categories and every Knowledge Hub library page. */
.kb-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.kb-list__item {
	border: 1px solid var(--ma-gray-300);
	border-radius: var(--ma-radius-md);
	background: var(--ma-white);
	box-shadow: var(--ma-shadow-1);
	transition: box-shadow 200ms ease;
}

.kb-list__item:hover {
	box-shadow: var(--ma-shadow-2);
}

.kb-list__link {
	display: block;
	padding: 20px 24px;
}

.kb-list__link:hover {
	text-decoration: none;
}

.kb .kb-list__title {
	font-size: 17px;
	font-weight: 600;
	color: var(--ma-black);
	margin: 0 0 4px;
}

.kb .kb-list__summary {
	font-size: 14px;
	line-height: 20px;
	color: var(--ma-gray-700);
	margin: 0;
}

.kb-list__item--pinned {
	border-left: 4px solid var(--ma-red);
}

.kb-list--grid {
	grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 767px) {
	.kb-list--grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Documents A-Z ---------- */

.kb-card__icon--az {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--ma-black);
	color: var(--ma-white);
	-webkit-mask: none;
	mask: none;
}

.kb-card__icon--az .kb-ico,
.kb-card__icon--az svg {
	width: 24px;
	height: 24px;
	flex-basis: 24px;
}

.kb-az {
	padding-bottom: 64px;
}

.kb-az__letters {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 8px 0 24px;
	padding: 10px 0;
	background: var(--ma-white);
	border-bottom: 1px solid var(--ma-gray-300);
}

.kb .kb-az__letters a,
.kb-az__letters span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	border-radius: var(--ma-radius-sm);
	font-size: 14px;
	font-weight: 600;
}

.kb .kb-az__letters a {
	background: var(--ma-gray-100);
	color: var(--ma-black);
	text-decoration: none;
}

.kb .kb-az__letters a:hover,
.kb .kb-az__letters a:focus {
	background: var(--ma-black);
	color: var(--ma-white);
	text-decoration: none;
}

.kb-az__letters span {
	color: var(--ma-gray-500);
}

.kb-az__group {
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 72px);
	margin: 0 0 28px;
}

.kb .kb-az__letter {
	margin: 0 0 8px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--ma-red);
	font-size: 22px;
	line-height: 28px;
}

.kb .kb-az__list {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kb .kb-az__list li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--ma-gray-200);
}

.kb .kb-az__list a {
	font-size: 16px;
	font-weight: 600;
	color: var(--ma-black);
}

.kb .kb-az__list span {
	font-size: 14px;
	line-height: 20px;
	color: var(--ma-gray-700);
}

.kb-az-wrap {
	padding-top: 24px;
}

@media (max-width: 600px) {
	/* On a phone, only the letters that have documents. */
	.kb-az__letters span {
		display: none;
	}
}

/* ---------- Focus visibility (never removed) ---------- */

.kb a:focus-visible,
.kb button:focus-visible,
.kb input:focus-visible {
	outline: 2px solid var(--ma-red);
	outline-offset: 2px;
}

/* Typing fields already turn black when active; a red ring on top doubles it. */
.kb input[type="text"]:focus-visible,
.kb input[type="search"]:focus-visible,
.kb input[type="email"]:focus-visible,
.kb input[type="url"]:focus-visible,
.kb input[type="number"]:focus-visible,
.kb input[type="password"]:focus-visible,
.kb input[type="date"]:focus-visible,
.kb input:not([type]):focus-visible {
	outline: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.kb-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.kb-section {
		padding: 32px 0;
	}

	.kb-grid,
	.kb-grid--two {
		grid-template-columns: 1fr;
	}

	.kb-section__title {
		font-size: 22px;
		line-height: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kb * {
		transition: none !important;
	}
}

/* ---------- Article ---------- */

/*
 * Every library's document page, public and internal. Until Oct 29 these sat
 * in help.css only, so internal documents fell back to the grey .kb p rule
 * and unstyled tables (Logan).
 */

.kb-article {
	max-width: 760px;
}

.kb-article__meta {
	font-size: 14px;
	color: var(--ma-gray-600);
	margin: 0 0 32px;
}

/* Edit, or Suggest an Edit, under the meta line (Nov 11). */
.kb-article__edit {
	margin: -16px 0 28px;
}

.kb-article__body {
	font-size: 17px;
	line-height: 1.7;
	color: var(--ma-gray-900);
}

.kb-article__body h2 {
	font-size: 24px;
	line-height: 32px;
	margin: 40px 0 12px;
}

.kb-article__body h3 {
	font-size: 20px;
	line-height: 26px;
	margin: 32px 0 8px;
}

.kb-article__body p {
	color: var(--ma-gray-900);
	margin: 0 0 20px;
}

.kb-article__body ul,
.kb-article__body ol {
	margin: 0 0 20px;
	padding-left: 24px;
}

.kb-article__body li {
	margin-bottom: 8px;
}

.kb-article__body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--ma-radius-md);
	margin: 24px 0;
}

.kb-article__body blockquote {
	margin: 24px 0;
	padding: 16px 20px;
	border-left: 4px solid var(--ma-red);
	background: var(--ma-red-light);
	border-radius: 0 var(--ma-radius-md) var(--ma-radius-md) 0;
}

.kb-article__body blockquote p:last-child {
	margin-bottom: 0;
}

.kb-article__body table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	font-size: 15px;
}

.kb-article__body th,
.kb-article__body td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--ma-gray-200);
	text-align: left;
}

/* Table text reads as dark as the paragraphs; only a header row is shaded. */
.kb-article__body td,
.kb-article__body th {
	color: var(--ma-gray-900);
}

.kb-article__body th {
	font-weight: 600;
}

.kb-article__body thead th,
.kb-article__body thead td {
	background: var(--ma-gray-200);
	font-weight: 600;
}

.kb-article__body iframe {
	max-width: 100%;
	border-radius: var(--ma-radius-md);
	margin: 24px 0;
	aspect-ratio: 16 / 9;
	width: 100%;
	height: auto;
	border: 0;
}

/* Tables and wide media must scroll inside their own container. */
.kb-scroll-x {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.kb-article__footer {
	margin-top: 48px;
	padding-top: 32px;
	padding-bottom: 48px;
	border-top: 1px solid var(--ma-gray-200);
}

@media (max-width: 767px) {
	.kb-article__body {
		font-size: 16px;
	}
}

/* Code from an imported Markdown file: wraps instead of running off the page (Nov 2). */
.kb-article__body pre {
	margin: 0 0 1.25em;
	padding: 14px 16px;
	border-radius: var(--ma-radius-sm);
	background: var(--ma-gray-100);
	font-size: 14px;
	line-height: 1.55;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.kb-article__body code {
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--ma-gray-100);
	font-size: 0.9em;
}

.kb-article__body pre code {
	padding: 0;
	background: none;
	font-size: inherit;
}

/* Page links under a long list. WordPress prints them as plain links. */
:is(.kb, .kb-reading) .kb-pages {
	margin: 28px 0 0;
}

:is(.kb, .kb-reading) .kb-pages .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

:is(.kb, .kb-reading) .kb-pages .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	color: var(--ma-gray-900);
	background: var(--ma-white);
	border: 1px solid var(--ma-gray-300);
	border-radius: var(--ma-radius-sm);
	text-decoration: none;
	transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

:is(.kb, .kb-reading) .kb-pages a.page-numbers:hover,
:is(.kb, .kb-reading) .kb-pages a.page-numbers:focus {
	border-color: var(--ma-black);
	color: var(--ma-black);
	text-decoration: none;
}

:is(.kb, .kb-reading) .kb-pages .page-numbers.current {
	color: var(--ma-white);
	background: var(--ma-black);
	border-color: var(--ma-black);
	font-weight: 600;
}

:is(.kb, .kb-reading) .kb-pages .page-numbers.dots {
	min-width: 0;
	padding: 0 4px;
	background: none;
	border: 0;
	color: var(--ma-gray-600);
}

:is(.kb, .kb-reading) .kb-pages .page-numbers.next,
:is(.kb, .kb-reading) .kb-pages .page-numbers.prev {
	font-weight: 600;
}

:is(.kb, .kb-reading) .kb-pages--top,
:is(.kb, .kb-reading) .kb-pages-top .kb-pages {
	margin: 0 0 20px;
}

/* The search box of one folder: "Search in Sales". */
:is(.kb, .kb-reading) .kb-search--folder {
	max-width: 520px;
	margin: 0 0 20px;
}

:is(.kb, .kb-reading) .kb-search--folder .kb-search__input {
	height: 46px;
	font-size: 15px;
	border-radius: var(--ma-radius-sm);
	box-shadow: none;
}

:is(.kb, .kb-reading) .kb-folder-found {
	margin: -8px 0 20px;
	font-size: 14px;
	color: var(--ma-gray-700);
}

:is(.kb, .kb-reading) .kb-folder-found a {
	margin-left: 6px;
	text-decoration: underline;
}
