/* BrioDocs frontend styles. */

/* Structural tokens only (dimensions, radius, shadows, fonts).
   ALL color + typography tokens, plus the three layout widths, are injected at
   runtime via wp_add_inline_style() from brio_docs_get_design_tokens()
   (includes/functions.php) so the appearance settings drive everything.
   The fallbacks here keep the layout sane if that inline block ever misses. */
.brio-docs-body {
	--brio-content-width: 1280px;
	--brio-sidebar-width: 280px;
	--brio-toc-width: 240px;
	--brio-theme-spacing-top: 40px;
	--brio-theme-spacing-bottom: 56px;
	--brio-header-height: 60px;
	--brio-radius: 8px;
	--brio-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	--brio-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
	--brio-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	--brio-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
/* data-theme sits on <html> in standalone and on #brio-docs-root in theme mode,
   hence both selectors. The light rule that follows re-asserts at the same
   specificity but later in source, so a theme that sets its own
   data-theme="dark" on <html> cannot drag the docs wrapper dark with it. */
.brio-docs-body[data-theme="dark"],
[data-theme="dark"] .brio-docs-body {
	--brio-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
	--brio-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.brio-docs-body[data-theme="light"] {
	--brio-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	--brio-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Reset (scoped). overflow: visible keeps the Standalone body from ever
   being a scroll container (D9-507, Decisions 1046 and 1051): a site rule
   such as html, body { overflow-x: hidden } (Additional CSS reaches these
   pages through wp_head()) made the body one that never scrolls, and the
   header, sidebar and TOC stopped sticking. The html rule alone still hides
   sideways overflow at the window. With no such rule this is the body's
   default, so nothing changes; clip would not do that (a body's clip goes to
   the window as hidden). In Theme mode .brio-docs-body is the root div,
   already visible. */
.brio-docs-body {
	margin: 0;
	padding: 0;
	overflow: visible;
	font-family: var(--brio-font);
	background: var(--brio-bg);
	color: var(--brio-text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.brio-docs-body *,
.brio-docs-body *::before,
.brio-docs-body *::after { box-sizing: border-box; }

/* Headings must be told the family, not left to inherit it. Everything else in
   the docs inherits `font-family` from .brio-docs-body above, but a theme's own
   `h1, h2, … { font-family: … }` rule overrides inheritance, and it still
   loads in standalone, because our templates call wp_head(). That left the body
   in the docs font and the headings in Blocksy's Inter.
   This is safe in both shells: --brio-font is the system stack in standalone,
   and in theme mode it resolves to `inherit`, which makes var() invalid at
   computed-value time, so font-family falls back to the inherited value: the
   theme's font, exactly as before. Covers .brio-article-title, .brio-hub-title,
   .brio-related-title, .brio-sidebar-popular-title, .brio-feedback-title,
   .brio-product-card-name and every heading inside .brio-prose. */
.brio-docs-body h1,
.brio-docs-body h2,
.brio-docs-body h3,
.brio-docs-body h4,
.brio-docs-body h5,
.brio-docs-body h6 { font-family: var(--brio-font); }

/* Core's links styled as buttons (Buttons and File blocks) keep the colors
   the block or the theme gives them (D8d1, audit A55); :where() keeps the
   rule at .brio-docs-body a's weight. */
.brio-docs-body a:where(:not(.wp-block-button__link, .wp-element-button, .wp-block-file__button)) { color: var(--brio-link); }
.brio-docs-body button { font: inherit; }

/* Why every button/control rule below carries a .brio-docs-body prefix.
   Two different things outrank a lone class on a <button>:
     1. The two rules directly above. `.brio-docs-body a` and
        `.brio-docs-body button` are 0,1,1: they beat `.brio-social-link` and
        `.brio-btn-primary-sm` at 0,1,0, so those classes silently lost their
        color, font-size and font-weight to the reset they were meant to refine.
     2. The active theme. Blocksy styles `.button, .ct-button, [type="submit"],
        button…`: `[type="submit"]` is also 0,1,0, and its stylesheet loads
        after ours, so the tie went to the theme: the Send Feedback button came
        out Blocksy blue at 3px radius.
   The prefix lifts each control to 0,2,0, which wins on specificity alone and
   no longer depends on stylesheet order. Hover / :disabled / .is-active
   variants are prefixed too, so their relative order is unchanged. */

/* Header */
.brio-docs-header {
	height: var(--brio-header-height);
	background: var(--brio-header-bg);
	border-bottom: 1px solid var(--brio-border);
	position: sticky;
	top: var(--brio-admin-bar-height, 0px);
	/* Above anything an article can position (D9-506, Decision 1047): core's
	   Image block lightbox button is 100 and a sticky Group 10. Below
	   WordPress's toolbar (99999) and the feedback dialog (160000); core's
	   overlays (100000 and up) cover it. Standalone only (Theme mode has no
	   docs header). */
	z-index: 1000;
}

/* WordPress's admin bar (D9-470, Decision 967). For a logged-in user with the
   toolbar on, core prints its bar fixed at the top of the window (32 px tall,
   46 px from 601 to 782 px wide; 600 px and narrower it scrolls away with the
   page), with the admin-bar body class and the --wp-admin--admin-bar--height
   property. Every BrioDocs part that sticks to the window's top, or is as tall
   as the window, counts this property: the bar's height while the bar is
   fixed, else nothing (logged out, toolbar off, print, 600 px and narrower).
   Core's own class and property only, never a theme's header. Heading jumps
   take the bar's height from core's own property too: see the page's scroll
   padding at the Anchor headings rules (D9-494, Decision 1047).
   The condition is the exact opposite of core's (screen and max-width 600px
   makes the bar scroll away), so no width between 600 and 601 px (a browser
   zoom) leaves the bar fixed with no offset (the D12c4i review's nit,
   Decision 977): the range query reads every width above 600 px, and a
   browser that cannot read it drops that query alone and keeps min-width
   601px. */
@media screen and (min-width: 601px), screen and (width > 600px) {
	.admin-bar.brio-docs-body,
	.admin-bar .brio-docs-body {
		--brio-admin-bar-height: var(--wp-admin--admin-bar--height, 32px);
	}
}
.brio-header-inner {
	max-width: var(--brio-content-width);
	margin: 0 auto;
	padding: 0 24px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.brio-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
/* Structural links (logo, breadcrumb, sidebar, TOC) carry a .brio-docs-body
   prefix so their neutral tokens win over the generic `.brio-docs-body a`
   accent default; their :hover / .is-active rules stay later in source and
   keep overriding at equal specificity. */
.brio-docs-body .brio-header-logo {
	font-weight: 600;
	font-size: 15px;
	color: var(--brio-header-title);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}
.brio-header-logo:hover { color: var(--brio-accent); }
.brio-header-logo img {
	height: 28px;
	width: auto;
	display: block;
}
.brio-header-sep {
	margin: 0;
	color: var(--brio-text-muted);
}
.brio-docs-body .brio-header-breadcrumb {
	font-size: var(--brio-breadcrumb-size);
	color: var(--brio-breadcrumb);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.brio-header-breadcrumb:hover { color: var(--brio-breadcrumb-hover); }
/* A title box that cuts with an ellipsis carries dir="auto" itself (D8e, audit
   A31), so a name in the other script is cut at its own end; its alignment still
   follows the page (Chrome and Safari read the prefixed value, Firefox the
   standard one; each drops the one it does not know). */
.brio-docs-body .brio-header-breadcrumb[dir="auto"],
.brio-docs-body .brio-sidebar-cat-name[dir="auto"] {
	text-align: -webkit-match-parent;
	text-align: match-parent;
}

/* Theme toggle */
.brio-docs-body .brio-theme-toggle {
	background: none;
	border: 1px solid var(--brio-border);
	border-radius: 6px;
	padding: 6px 8px;
	cursor: pointer;
	color: var(--brio-text-secondary);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.brio-docs-body .brio-theme-toggle:hover {
	background: var(--brio-bg-secondary);
	border-color: var(--brio-border-strong);
	color: var(--brio-text);
}
.brio-docs-body .brio-theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .brio-icon-moon { display: none; }
[data-theme="dark"] .brio-icon-sun { display: none; }
/* When the docs wrapper declares its own mode it wins over an ancestor's,
   so the toggle icon always reflects the docs, not the surrounding theme. */
.brio-docs-body[data-theme="light"] .brio-icon-sun { display: block; }
.brio-docs-body[data-theme="light"] .brio-icon-moon { display: none; }
.brio-docs-body[data-theme="dark"] .brio-icon-moon { display: block; }
.brio-docs-body[data-theme="dark"] .brio-icon-sun { display: none; }

/* Hub */
.brio-hub-main {
	max-width: 1024px;
	margin: 0 auto;
	padding: 64px 24px 80px;
}
.brio-hub-hero {
	text-align: center;
	margin-bottom: 56px;
}
.brio-hub-title {
	font-size: 40px;
	font-weight: 700;
	color: var(--brio-heading);
	margin: 0 0 12px;
	letter-spacing: -0.5px;
}
.brio-hub-subtitle {
	font-size: 18px;
	color: var(--brio-text-secondary);
	margin: 0 0 32px;
}

/* Search */
.brio-search-wrap {
	display: flex;
	justify-content: center;
}
.brio-search-box {
	position: relative;
	width: 100%;
	max-width: 520px;
}
/* The .brio-docs-body prefix on these three is load-bearing, not decoration.
   Themes style bare inputs through selectors like
   `input:is([type="text"], [type="search"], …)`, whose :is() takes the
   specificity of an attribute selector (0,1,1), which outranks a lone class.
   Blocksy does exactly that and was winning background, padding, radius and
   font-size. Unprefixed, the field renders with the theme's own chrome, which
   only became obvious once the wrapper stopped painting white behind it. */
.brio-docs-body .brio-search-input {
	width: 100%;
	/* Logical sides (D8e, audit A32): the icon's room sits at the start in
	   either direction. Left to right reads 12px 16px 12px 44px as before. */
	padding-block: 12px;
	padding-inline: 44px 16px;
	font-size: 15px;
	/* The field's edge (D8c3, audit A16): 3:1 on every background a field
	   sits on; border stays for decorative edges. */
	border: 1px solid var(--brio-field-border);
	border-radius: 10px;
	background: var(--brio-surface);
	color: var(--brio-text);
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
	font-family: inherit;
}
/* :focus is handled once, for every docs text field, in the accessibility
   section at the bottom of this file. */
/* Placeholders read text_muted at full strength (D8c3, audit A17): a theme's
   ::placeholder opacity (Blocksy's 0.7) would take them under 4.5:1. */
.brio-docs-body .brio-search-input::placeholder,
.brio-docs-body .brio-feedback-input::placeholder,
.brio-docs-body .brio-feedback-textarea::placeholder { color: var(--brio-text-muted); opacity: 1; }
.brio-search-icon {
	position: absolute;
	inset-inline-start: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: var(--brio-text-muted);
	pointer-events: none;
}
.brio-search-results {
	position: absolute;
	top: calc(100% + 6px);
	inset-inline: 0;
	background: var(--brio-surface);
	border: 1px solid var(--brio-border);
	border-radius: var(--brio-radius);
	box-shadow: var(--brio-shadow-md);
	z-index: 200;
	max-height: 360px;
	overflow-y: auto;
}
/* Standalone's lists stay above the docs header, as at 100 (D9-506, Decision
   1047); Theme mode's body has no .brio-docs-body, so its lists keep 200. */
body.brio-docs-body .brio-search-results { z-index: 1001; }

/* Product grid */
.brio-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}
.brio-docs-body .brio-product-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px;
	background: var(--brio-surface);
	border: 1px solid var(--brio-border);
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.brio-product-card:hover {
	border-color: var(--brio-accent);
	box-shadow: var(--brio-shadow-md);
	transform: translateY(-2px);
}
.brio-product-card-logo {
	width: 52px;
	height: 52px;
	border-radius: 10px;
	overflow: hidden;
	flex-shrink: 0;
	background: var(--brio-accent-soft);
	display: flex;
	align-items: center;
	justify-content: center;
}
/* The prefix keeps a theme's global img rules (and theme mode's own
   img { height: auto } below) from changing the box: the logo prints at
   medium, uncropped, and is contained, never cropped (D5b, Decision 85). */
.brio-docs-body .brio-product-card-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.brio-product-card-logo-initials {
	font-size: 18px;
	font-weight: 700;
	color: var(--brio-accent);
}
.brio-product-card-body { flex: 1; min-width: 0; }
.brio-product-card-name {
	font-size: 16px;
	font-weight: 600;
	color: var(--brio-text);
	margin: 0 0 4px;
}
.brio-product-card-meta {
	font-size: calc(var(--brio-meta-size) - 1px);
	color: var(--brio-meta-text);
	margin: 0;
}
.brio-product-card-arrow {
	color: var(--brio-text-muted);
	font-size: 18px;
	flex-shrink: 0;
	transition: transform 0.15s, color 0.15s;
}
.brio-product-card:hover .brio-product-card-arrow {
	transform: translateX(3px);
	color: var(--brio-accent);
}
/* Right to left (D8e, audit A33): the arrow points and moves toward the reading
   direction, as the overview chevron does. A transform has no logical form, so
   the mirror is a :dir(rtl) rule, at rest and hovered. */
.brio-product-card-arrow:dir(rtl) { transform: scaleX(-1); }
.brio-product-card:hover .brio-product-card-arrow:dir(rtl) { transform: translateX(-3px) scaleX(-1); }

/* Product page layout: centred on the content width so the sidebar column
   lines up with the header inner. Standalone pages scroll as one page (D9-467,
   Decision 956, Sazzad's ruling): see the block after the Mobile rules. */
.brio-product-layout {
	display: flex;
	max-width: var(--brio-content-width);
	margin: 0 auto;
}

/* Sidebar */
.brio-sidebar {
	width: var(--brio-sidebar-width);
	min-width: var(--brio-sidebar-width);
	background: var(--brio-sidebar-bg);
	border-inline-end: 1px solid var(--brio-border);
	overflow-y: auto;
	overflow-x: hidden;
	flex-shrink: 0;
	padding: 0 0 40px;
}
.brio-sidebar-inner { padding: 16px 0; }
.brio-sidebar-search { padding: 0 12px 12px; }
/* The sidebar search's list sits in the flow under its field (D9-495,
   Decision 1048): the aside (Fit content, and every width up to 768 px) and
   the Full height inner are scroll boxes, so an absolute list on a short
   sidebar was cut at the box's end, an arrow-key choice with it. In flow, the
   box grows to hold the list, or scrolls to it, and keeps its own scroll; the
   list keeps its own scroll, at most 360 px or the window's room under the
   field. While it shows, the field's box is a grid, so the search icon stays
   centered on the field, not on the field and list together; the cap keeps
   at least 120 px on a very short window. With the list hidden none of this
   applies, and a browser without :has() keeps the absolute list. */
@supports selector(:has(*)) {
	.brio-docs-body .brio-sidebar .brio-search-results {
		position: static;
		grid-area: 2 / 1;
		margin-top: 6px;
		max-height: min(360px, max(120px, calc(100vh - 140px - var(--brio-admin-bar-height, 0px))));
	}
	.brio-docs-body .brio-sidebar .brio-search-box:has(> .brio-search-results:not([hidden])) { display: grid; }
	.brio-docs-body .brio-sidebar .brio-search-box:has(> .brio-search-results:not([hidden])) > .brio-search-input { grid-area: 1 / 1; }
	.brio-docs-body .brio-sidebar .brio-search-box:has(> .brio-search-results:not([hidden])) > .brio-search-icon {
		position: static;
		grid-area: 1 / 1;
		align-self: center;
		margin-inline-start: 10px;
		transform: none;
		z-index: 1;
	}
}
.brio-search-box--sm .brio-search-input {
	padding-block: 8px;
	padding-inline: 36px 12px;
	font-size: 14px;
	border-radius: 6px;
}
.brio-search-box--sm .brio-search-icon {
	width: 14px;
	height: 14px;
	inset-inline-start: 10px;
}

.brio-sidebar-empty {
	padding: 8px 16px;
	color: var(--brio-text-muted);
	font-size: 13px;
}

/* Popular articles: sits under the category tree, borrows sidebar tokens. */
.brio-sidebar-popular {
	margin-top: 20px;
	padding: 16px 16px 0;
	border-top: 1px solid var(--brio-border);
}
.brio-sidebar-popular-title {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--brio-toc-title);
}
.brio-sidebar-popular-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.brio-sidebar-popular-list li { margin: 0; }
.brio-docs-body .brio-sidebar-popular-link {
	display: block;
	padding: 5px 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--brio-sidebar-text);
	text-decoration: none;
	transition: color 0.1s;
}
.brio-sidebar-popular-link:hover { color: var(--brio-sidebar-hover-text); }

.brio-sidebar-category { margin-bottom: 2px; }
.brio-docs-body .brio-sidebar-category-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 16px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: start;
	color: var(--brio-sidebar-category);
	font-size: var(--brio-sidebar-size);
	font-weight: 600;
	border-radius: 6px;
	transition: background 0.1s, color 0.1s;
}
.brio-docs-body .brio-sidebar-category-toggle:hover {
	background: var(--brio-sidebar-hover-bg);
	color: var(--brio-sidebar-hover-text);
}
.brio-docs-body .brio-sidebar-category-toggle:hover .brio-sidebar-cat-icon,
.brio-docs-body .brio-sidebar-category-toggle:hover .brio-chevron {
	color: var(--brio-sidebar-hover-text);
}
.brio-sidebar-cat-icon {
	display: inline-flex;
	color: var(--brio-text-secondary);
	flex-shrink: 0;
}
.brio-sidebar-cat-icon svg { display: block; }
.brio-sidebar-cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brio-chevron {
	width: 14px;
	height: 14px;
	color: var(--brio-text-muted);
	flex-shrink: 0;
	transition: transform 0.2s;
}
.brio-sidebar-category.is-open .brio-chevron {
	transform: rotate(180deg);
}

.brio-sidebar-articles {
	list-style: none;
	margin: 0;
	padding: 0 0 4px;
}
.brio-docs-body .brio-sidebar-article-link {
	display: block;
	/* Logical (D3), so the View all link under the list mirrors with it in RTL;
	   left to right reads 7px 16px 7px 40px as before. */
	padding-block: 7px;
	padding-inline: 40px 16px;
	font-size: var(--brio-sidebar-size);
	color: var(--brio-sidebar-text);
	text-decoration: none;
	border-radius: 4px;
	transition: background 0.1s, color 0.1s;
	line-height: 1.4;
}
.brio-sidebar-article-link:hover {
	background: var(--brio-sidebar-hover-bg);
	color: var(--brio-sidebar-hover-text);
}
.brio-sidebar-article-link.is-active {
	background: var(--brio-sidebar-active-bg);
	color: var(--brio-sidebar-active-text);
	font-weight: 500;
}
.brio-sidebar-article-empty {
	display: block;
	padding-block: 6px;
	padding-inline: 40px 16px;
	font-size: 12px;
	color: var(--brio-text-muted);
	font-style: italic;
}

/* Content area.
   Deliberately NOT a `container-type` query container. That would let the TOC
   react to this column's width, but per css-contain-3 `container-type` applies
   layout containment, and a layout-contained element is the containing block for
   its fixed-position descendants, which includes .brio-feedback-modal-overlay.
   Chrome happens not to trap it today; other engines may. The equivalent guard
   is computed from the saved widths in brio_docs_render_tokens_css() instead. */
.brio-content-area {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
}
.brio-content-area.is-loading {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.2s;
}
.brio-content-area.is-loading::after {
	content: "";
	display: block;
	width: 24px;
	height: 24px;
	border: 2px solid var(--brio-border);
	border-top-color: var(--brio-accent);
	border-radius: 50%;
	animation: brio-spin 0.6s linear infinite;
	margin: 60px auto;
}
@keyframes brio-spin {
	to { transform: rotate(360deg); }
}

/* Article (used standalone if rendered without TOC wrapper) */
.brio-article {
	max-width: 780px;
	margin: 0 auto;
	padding: 48px 48px 80px;
}

/* Article + TOC two-column wrapper.
   No max-width of its own: --brio-content-width already bounds the grid, and a
   second cap here would silently ignore any content width above ~1440px. The
   article keeps its own 780px measure and the pair centres in whatever space
   the content width leaves. */
.brio-article-with-toc {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	justify-content: center;
	margin: 0 auto;
	padding: 48px 48px 80px;
}
.brio-article-with-toc .brio-article {
	flex: 1;
	min-width: 0;
	/* D9-509 (Decision 1058): never wider than the wrapper. Up to 1024 px
	   the wrapper is a column that sizes the article to its content,
	   so a wide table or frame once made the article (and the page) wider
	   than the window; with room to spare this reads as 780px did. */
	max-width: min(780px, 100%);
	margin: 0;
	padding: 0;
}
.brio-article-header { margin-bottom: 32px; }
.brio-article-title {
	font-size: var(--brio-h1-size);
	font-weight: 700;
	color: var(--brio-heading);
	margin: 0 0 8px;
	letter-spacing: -0.3px;
	line-height: 1.25;
}
/* The six meta places (the hub card, the overview, the article, the category
   page and its items, the search results) take --brio-meta-text and
   --brio-meta-size, the Appearance tab's Meta text colours and size (D5b,
   Decision 88); the smaller ones sit 1 and 2 px below it, so the default 14
   gives 0.18.0's 14, 13 and 12 px. The separator dot keeps border_strong and
   print keeps its own rule.
   Article meta row: author · updated · reading time · print.
   Every part is optional (one settings toggle each), so the dot separators are
   real elements emitted between the survivors rather than ::before hooks that
   would strand a leading dot when the first part is switched off. */
.brio-article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: var(--brio-meta-size);
	color: var(--brio-meta-text);
	margin: 0;
}
.brio-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
/* A meta phrase sits in a bdi (D8e, audit A34); the bdi lays its parts out as
   the item did, so "Updated" and its date keep their 6 px gap, and run in the
   phrase's own direction, not the page's. */
.brio-meta-item > bdi {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.brio-meta-sep {
	color: var(--brio-border-strong);
	user-select: none;
}
.brio-meta-avatar {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: block;
}
.brio-docs-body .brio-print-btn {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	/* Part of the article meta row, so it takes the meta colour (D5b). */
	color: var(--brio-meta-text);
	font-size: inherit;
	transition: color 0.15s;
}
.brio-docs-body .brio-print-btn:hover { color: var(--brio-link); }
.brio-docs-body .brio-print-btn:focus-visible {
	outline: 2px solid var(--brio-accent);
	outline-offset: 2px;
	border-radius: 3px;
}

/* Revealed only by the print stylesheet at the bottom of this file. */
.brio-print-site-name { display: none; }

/* Prose content */
.brio-prose { color: var(--brio-text); font-size: var(--brio-content-size); line-height: var(--brio-line-height); }
.brio-prose h1 {
	font-size: var(--brio-h1-size);
	font-weight: 700;
	margin: 36px 0 14px;
	color: var(--brio-heading);
	line-height: 1.3;
}
.brio-prose h2 {
	font-size: var(--brio-h2-size);
	font-weight: 600;
	margin: 40px 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--brio-border);
	color: var(--brio-heading);
	line-height: 1.35;
}
.brio-prose h3 {
	font-size: var(--brio-h3-size);
	font-weight: 600;
	margin: 30px 0 10px;
	color: var(--brio-heading);
	line-height: 1.4;
}
.brio-prose h4 {
	font-size: 15px;
	font-weight: 600;
	margin: 24px 0 8px;
	color: var(--brio-heading);
}
.brio-prose p { margin: 0 0 16px; }
.brio-prose a { text-decoration: none; }
/* Text links in prose take the link color and are underlined, so they never
   depend on color alone (D8c3, audit A13); the offset clears descenders.
   :where() keeps these rules at .brio-prose a's weight (and its :hover's), so
   the heading anchor gets no underline at rest and core's links styled as
   buttons (Buttons and File blocks) keep the block's or the theme's colors,
   at rest and hovered (D8d1, audit A55); every prose link, buttons included,
   still underlines on hover, as before. */
.brio-prose a:where(:not(.wp-block-button__link, .wp-element-button, .wp-block-file__button)) {
	color: var(--brio-link);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}
.brio-prose a:hover { text-decoration: underline; }
.brio-prose a:where(:not(.wp-block-button__link, .wp-element-button, .wp-block-file__button)):hover { color: var(--brio-link-hover); }
/* An outline Button in prose under dark docs (D8d2, audit A59, amending
   Decision 191): its theme gives it the theme's text color for a light page,
   which on the docs' dark page reads 1.42:1 (Twenty Twenty-One) or 4.38:1
   (Blocksy). With no color of its own from the block, it takes the docs' link
   color for its text at rest (and on focus); its edge stays the theme's (a
   currentColor edge follows the text; Blocksy's own reads 4.38:1, above the
   3:1 an edge needs), and hovered, the theme's own hover shows. Light docs,
   the fill style, the File button, a button whose block sets its colors and a
   button inside a block that paints its own background (a colored Group,
   Column or Media and text, a Cover, or a block with a style variation, such
   as a theme's section styles, which paint without has-background) keep the
   theme's or the block's colors: the docs' dark page is not behind those. */
.brio-docs-body[data-theme="dark"] .brio-prose :is(.wp-block-button.is-style-outline .wp-block-button__link, .wp-block-button__link.is-style-outline):not(.has-text-color, .has-background, .brio-prose .has-background *, .brio-prose .wp-block-cover *, .brio-prose [class*="is-style-"]:not(.wp-block-button) *):not(:hover),
[data-theme="dark"] .brio-docs-body:not([data-theme="light"]) .brio-prose :is(.wp-block-button.is-style-outline .wp-block-button__link, .wp-block-button__link.is-style-outline):not(.has-text-color, .has-background, .brio-prose .has-background *, .brio-prose .wp-block-cover *, .brio-prose [class*="is-style-"]:not(.wp-block-button) *):not(:hover) {
	color: var(--brio-link);
}
.brio-prose ul, .brio-prose ol { margin: 0 0 16px; padding-inline-start: 24px; }
.brio-prose li { margin-bottom: 6px; }
.brio-prose code {
	background: var(--brio-bg-tertiary);
	border: 1px solid var(--brio-border);
	border-radius: 4px;
	padding: 1px 6px;
	font-size: 0.875em;
	font-family: var(--brio-mono);
}
.brio-prose pre {
	background: var(--brio-bg-secondary);
	border: 1px solid var(--brio-border);
	border-radius: var(--brio-radius);
	padding: 16px 20px;
	overflow-x: auto;
	margin: 0 0 20px;
}
.brio-prose pre code {
	background: none;
	border: none;
	padding: 0;
	font-size: 13px;
}
.brio-prose blockquote {
	border-inline-start: 3px solid var(--brio-accent);
	margin: 0 0 16px;
	padding: 8px 16px;
	color: var(--brio-text-secondary);
	background: var(--brio-accent-soft);
	border-radius: 0;
	border-start-end-radius: 6px;
	border-end-end-radius: 6px;
}
.brio-prose img {
	max-width: 100%;
	border-radius: var(--brio-radius);
	border: 1px solid var(--brio-border);
}
.brio-prose table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
	font-size: 14px;
}
/* D9-509 (Decision 1058): wide article content stays inside the article, so
   the window never scrolls sideways and nothing is cut off (since 0.125.0 a
   site's rule on the body alone no longer hides it at the window, Decision
   1051). A long unbroken string breaks (break-word leaves every min-content
   width as it was); an embedded frame fits the column; a table outside core's
   Table block scrolls in its own box (brio_docs_table_boxes()), the table's
   bottom margin moved onto the box, so a table that fits looks as before.
   Core's Table block and pre blocks already scroll in their own boxes. */
.brio-prose { overflow-wrap: break-word; }
.brio-prose iframe { max-width: 100%; }
.brio-prose .brio-table-scroll {
	overflow-x: auto;
	margin-bottom: 20px;
}
.brio-prose .brio-table-scroll > table { margin-bottom: 0; }
@media print {
	/* D9-513 (Decision 1068): on paper the box never clips its table. */
	.brio-prose .brio-table-scroll { overflow: visible; }
}
.brio-prose th, .brio-prose td {
	padding: 10px 14px;
	border: 1px solid var(--brio-border);
	text-align: start;
}
.brio-prose th {
	background: var(--brio-bg-secondary);
	font-weight: 600;
}
.brio-prose hr {
	border: none;
	border-top: 1px solid var(--brio-border);
	margin: 32px 0;
}

/* Footer */
.brio-docs-footer {
	border-top: 1px solid var(--brio-border);
	padding: 24px;
	background: var(--brio-surface);
}
.brio-footer-inner {
	max-width: 1280px;
	margin: 0 auto;
	text-align: center;
}
.brio-footer-text {
	font-size: 13px;
	color: var(--brio-text-muted);
	margin: 0;
}

/* Empty state */
.brio-empty-state {
	text-align: center;
	color: var(--brio-text-muted);
	padding: 60px 24px;
	font-size: 15px;
	grid-column: 1 / -1;
}

/* Search results dropdown */
.brio-docs-body .brio-search-result-item {
	display: block;
	padding: 12px 16px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid var(--brio-border);
	transition: background 0.1s;
}
.brio-search-result-item:last-child { border-bottom: none; }
.brio-search-result-item:hover,
.brio-search-result-item:focus {
	background: var(--brio-bg-secondary);
	outline: none;
}
/* The active option of a search (aria-selected, set by the script): today's
   background and a 3px accent bar on its leading edge, the padding less by the
   bar's width so the text does not move (D8c2, rider R2). */
.brio-docs-body .brio-search-result-item[aria-selected="true"] {
	background: var(--brio-bg-secondary);
	border-inline-start: 3px solid var(--brio-accent);
	padding-inline-start: 13px;
}
.brio-search-result-title {
	font-size: 14px;
	font-weight: 500;
	color: var(--brio-text);
	margin-bottom: 2px;
}
.brio-search-result-meta {
	font-size: calc(var(--brio-meta-size) - 2px);
	color: var(--brio-meta-text);
	margin-bottom: 4px;
	display: flex;
	gap: 6px;
	align-items: center;
}
.brio-search-result-product {
	color: var(--brio-accent);
	font-weight: 500;
}
.brio-search-result-excerpt {
	font-size: 12px;
	color: var(--brio-text-secondary);
	line-height: 1.4;
}
.brio-search-result-excerpt mark {
	background: var(--brio-accent-soft);
	color: var(--brio-accent);
	border-radius: 2px;
	padding: 0 2px;
	font-style: normal;
}
.brio-search-loading,
.brio-search-empty {
	padding: 16px;
	text-align: center;
	color: var(--brio-text-muted);
	font-size: 13px;
}

/* Anchor headings */
.brio-prose h2,
.brio-prose h3 {
	position: relative;
	scroll-margin-top: calc(var(--brio-header-height) + 16px);
}
/* Standalone pages keep the window's scroll target below the sticky docs
   header (D9-494, Decision 1047): a link reached with Tab or Shift+Tab, a
   jump to any id (an h4, a paragraph, the skip link's #brio-main-content)
   and maybeScrollToHash() all land under the page's scroll padding, which is
   the header's 60 px plus core's admin bar property (the padding core's admin
   bar style gives the page, 0 when its style is not loaded), at every width.
   The header's token is set on the body, which the html element cannot read,
   so its value is written here. Headings drop to 16 px of margin, so each
   lands where it did (60 + bar + 16). :has() names Standalone's html only:
   Theme mode's body has no .brio-docs-body. A browser without :has() keeps
   the rules above. */
html:has(> body.brio-docs-body) {
	scroll-padding-top: calc(60px + var(--wp-admin--admin-bar--height, 0px));
}
html:has(> body.brio-docs-body) .brio-prose :is(h2, h3) { scroll-margin-top: 16px; }
.brio-docs-body .brio-heading-anchor {
	display: inline-flex;
	align-items: center;
	margin-inline-start: 8px;
	color: var(--brio-text-muted);
	opacity: 0;
	transition: opacity 0.15s;
	text-decoration: none;
	vertical-align: middle;
	position: relative;
}
.brio-prose h2:hover .brio-heading-anchor,
.brio-prose h3:hover .brio-heading-anchor,
.brio-heading-anchor:focus {
	opacity: 1;
}
.brio-heading-anchor:hover { color: var(--brio-accent); }
.brio-heading-anchor svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}
.brio-copy-tooltip {
	position: absolute;
	background: var(--brio-text);
	color: var(--brio-bg);
	font-size: 12px;
	padding: 3px 8px;
	border-radius: 4px;
	white-space: nowrap;
	pointer-events: none;
	inset-inline-start: 0;
	top: -28px;
	opacity: 0;
	transition: opacity 0.2s;
}
.brio-copy-tooltip.is-visible { opacity: 1; }

/* Table of contents */
.brio-toc-sidebar {
	width: var(--brio-toc-width);
	min-width: var(--brio-toc-width);
	flex-shrink: 0;
	position: sticky;
	top: calc(var(--brio-header-height) + var(--brio-admin-bar-height, 0px) + 24px);
	max-height: calc(100vh - var(--brio-header-height) - var(--brio-admin-bar-height, 0px) - 48px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--brio-border) transparent;
}
/* With no table of contents the script sets hidden on the region, so it
   leaves the accessibility tree (D8d1, audit A53); its box stays, so the
   article keeps its place. The weight (0,2,0) beats a theme's own
   [hidden] { display: none } (0,1,0) whatever the load order; the smaller
   screens' block below repeats it with display none, and the narrow-article
   guard (the same weight, printed after this sheet) still hides it. */
.brio-docs-body .brio-toc-sidebar:where([hidden]) { display: block; visibility: hidden; }
.brio-toc-sidebar::-webkit-scrollbar { width: 6px; }
.brio-toc-sidebar::-webkit-scrollbar-track { background: transparent; }
.brio-toc-sidebar::-webkit-scrollbar-thumb {
	background: var(--brio-border);
	border-radius: 3px;
}
.brio-toc:empty { display: none; }
.brio-toc-title {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--brio-toc-title);
	margin: 0 0 12px;
}
/* Positioning context for the single sliding accent bar. */
.brio-toc-body {
	position: relative;
	padding-inline-start: 12px;
}
.brio-toc-indicator {
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	width: 2px;
	height: 0;
	background: var(--brio-toc-active);
	border-radius: 2px;
	opacity: 0;
	transform: translateY(0);
	transition: transform 0.2s ease, height 0.2s ease, opacity 0.2s ease;
	pointer-events: none;
}
.brio-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.brio-toc-item { margin: 0; }
.brio-toc-h2 { margin-top: 2px; }
.brio-toc-body .brio-toc-item:first-child { margin-top: 0; }
.brio-toc-h3 { padding-inline-start: 12px; }
.brio-docs-body .brio-toc-link {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: var(--brio-toc-size);
	color: var(--brio-toc-text);
	text-decoration: none;
	padding: 4px 0;
	line-height: 1.5;
	transition: color 0.1s;
}
/* h3 entries read at full toc_text (D8c3, audit A18): the indent of .brio-toc-h3
   above shows the level. */
.brio-toc-link:hover { color: var(--brio-toc-hover); }
.brio-toc-link.is-active {
	color: var(--brio-toc-active);
	font-weight: 500;
}

/* Hide TOC on smaller screens */
@media (max-width: 1024px) {
	.brio-article-with-toc {
		flex-direction: column;
		padding: 32px 24px 60px;
	}
	.brio-toc-sidebar,
	.brio-docs-body .brio-toc-sidebar:where([hidden]) { display: none; }
}

/* Mobile */
@media (max-width: 768px) {
	.brio-product-layout {
		flex-direction: column;
		height: auto;
		overflow: visible;
	}
	.brio-sidebar {
		width: 100%;
		min-width: 100%;
		height: auto;
		border-inline-end: none;
		border-bottom: 1px solid var(--brio-border);
	}
	.brio-content-area { overflow: visible; }
	.brio-article { padding: 24px 20px 60px; }
	.brio-article-title { font-size: 24px; }
	.brio-hub-title { font-size: 28px; }
	.brio-products-grid { grid-template-columns: 1fr; }
	.brio-hub-main { padding: 40px 20px 60px; }
}

/* Standalone pages scroll as one page above 768 px (D9-467, Decision 956,
   Sazzad's ruling "Like a normal page"): the window is the one scroller, as in
   Theme mode. Until 0.118.0 the layout was a one-screen frame whose content
   pane scrolled on its own, so on a wide screen its scroll bar sat mid-screen.
   The docs header stays sticky at the top; the sidebar is sticky under it, at
   most the screen less the header tall, with its own scroll only when its
   content is taller; Full height paints the whole column (the aside stretches
   with the row and its inner sticks, Theme mode's rule with the header's
   offset); Fit content ends under the last item, as the setting says. The
   layout is at least one screen tall, so a short page's column still reaches
   the bottom. The content pane is no scroll container: overflow-x clip keeps
   0.117.0's horizontal clip without making one, so the TOC's sticky rule now
   holds against the window. Below 768 px nothing changes (the rules above).
   Theme mode's own rules (.brio-docs-embedded, later in this sheet) win by
   weight; its layout keeps min-height auto. Screen only: print keeps its own
   reset of the frame (the Print block). The range query reads every width
   above 768 px (D9-497, Decision 1052), so a width between 768 and 769 px
   (a browser zoom) is not left with neither block; a browser that cannot
   read it keeps min-width 769px. */
@media screen and (min-width: 769px), screen and (width > 768px) {
	.brio-product-layout {
		align-items: flex-start;
		min-height: calc(100vh - var(--brio-header-height) - var(--brio-admin-bar-height, 0px));
	}
	.brio-sidebar {
		position: sticky;
		top: calc(var(--brio-header-height) + var(--brio-admin-bar-height, 0px));
		max-height: calc(100vh - var(--brio-header-height) - var(--brio-admin-bar-height, 0px));
	}
	.brio-sidebar.brio-sidebar--full {
		position: static;
		align-self: stretch;
		max-height: none;
		overflow: visible;
		padding-bottom: 0;
	}
	.brio-sidebar--full .brio-sidebar-inner {
		position: sticky;
		top: calc(var(--brio-header-height) + var(--brio-admin-bar-height, 0px));
		max-height: calc(100vh - var(--brio-header-height) - var(--brio-admin-bar-height, 0px));
		overflow-x: hidden;
		overflow-y: auto;
		padding-bottom: 40px;
	}
	.brio-content-area {
		overflow: visible;
		overflow-x: clip;
		min-width: 0;
	}
}

/* =================================================================
 * Phase 6: Next/Prev nav, Social share, Feedback + modal
 * ================================================================= */

/* --- Next/Prev nav ---------------------------------------------- */
.brio-article-nav {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--brio-border);
}
.brio-article-nav-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.brio-docs-body .brio-nav-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 20px;
	border: 1px solid var(--brio-border);
	border-radius: var(--brio-radius);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s, background 0.15s;
}
.brio-docs-body .brio-nav-item:hover {
	border-color: var(--brio-accent);
	background: var(--brio-accent-soft);
}
.brio-nav-next { text-align: end; }
.brio-nav-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--brio-text-muted);
}
/* On its hovered card (the soft accent fill) the label reads text_secondary,
   4.5:1 there in every preset (D8c3, audit A17). */
.brio-docs-body .brio-nav-item:hover .brio-nav-label { color: var(--brio-text-secondary); }
.brio-nav-prev .brio-nav-label::before { content: '\2190 \00a0'; }
.brio-nav-next .brio-nav-label::after { content: '\00a0 \2192'; }
/* Right to left (D8e, audit A33): Previous points back to the right and Next on
   to the left. Both glyphs are drawn as written (neither mirrors in bidi). */
.brio-nav-prev .brio-nav-label:dir(rtl)::before { content: '\2192 \00a0'; }
.brio-nav-next .brio-nav-label:dir(rtl)::after { content: '\00a0 \2190'; }
.brio-nav-title {
	font-size: 14px;
	font-weight: 500;
	color: var(--brio-accent);
	line-height: 1.4;
}

/* --- Social share ----------------------------------------------- */
.brio-social-share {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--brio-border);
	flex-wrap: wrap;
}
.brio-social-share-label {
	font-size: 13px;
	color: var(--brio-text-muted);
	white-space: nowrap;
}
.brio-social-share-links {
	display: flex;
	gap: 8px;
	align-items: center;
}
.brio-docs-body .brio-social-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	border: 1px solid var(--brio-border);
	color: var(--brio-text-secondary);
	background: var(--brio-surface);
	text-decoration: none;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
	cursor: pointer;
	padding: 0;
}
.brio-docs-body .brio-social-link:hover {
	border-color: var(--brio-accent);
	color: var(--brio-accent);
	background: var(--brio-accent-soft);
}
.brio-docs-body .brio-social-copy {
	background: var(--brio-surface);
	border: 1px solid var(--brio-border);
}
.brio-docs-body .brio-social-link .brio-copy-tooltip {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	background: var(--brio-text);
	color: var(--brio-bg);
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.brio-docs-body .brio-social-link .brio-copy-tooltip.is-visible { opacity: 1; }

/* --- Related articles -------------------------------------------- */
.brio-related {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--brio-border);
}
.brio-related-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--brio-heading);
	margin: 0 0 16px;
}
.brio-related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}
.brio-related-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	border: 1px solid var(--brio-border);
	border-radius: var(--brio-radius);
	background: var(--brio-surface);
	text-decoration: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.brio-related-card:hover {
	border-color: var(--brio-accent);
	box-shadow: var(--brio-shadow);
}
.brio-related-card:focus-visible {
	outline: 2px solid var(--brio-accent);
	outline-offset: 2px;
}
.brio-related-card-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--brio-heading);
	line-height: 1.4;
}
.brio-related-card-category {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--brio-text-muted);
}
.brio-related-card-excerpt {
	font-size: 13px;
	line-height: 1.5;
	color: var(--brio-text-secondary);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* --- Helpful + feedback section --------------------------------- */
.brio-feedback-section {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--brio-border);
}
.brio-helpful-prompt {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.brio-helpful-prompt[hidden] { display: none; }
.brio-helpful-question {
	font-size: 14px;
	color: var(--brio-text-secondary);
	margin: 0;
}
.brio-helpful-actions {
	display: flex;
	gap: 8px;
}
.brio-docs-body .brio-helpful-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid var(--brio-border);
	border-radius: 6px;
	background: var(--brio-surface);
	color: var(--brio-text-secondary);
	font-size: 13px;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.brio-docs-body .brio-helpful-btn:hover {
	border-color: var(--brio-accent);
	color: var(--brio-accent);
	background: var(--brio-accent-soft);
}
.brio-docs-body .brio-helpful-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.brio-helpful-thanks {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.brio-helpful-thanks[hidden] { display: none; }
.brio-helpful-thanks p {
	margin: 0;
	font-size: 14px;
	color: var(--brio-text-secondary);
}
/* 24 px tall or more (D8d3, audit A30, WCAG 2.5.8): its own block size and
   a little block padding; still underlined text in the accent. */
.brio-docs-body .brio-feedback-trigger {
	background: none;
	border: none;
	color: var(--brio-accent);
	font-size: 13px;
	cursor: pointer;
	min-block-size: 24px;
	padding: 2px 0;
	text-decoration: underline;
}

/* --- Feedback modal --------------------------------------------- */
.brio-feedback-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	/* Above WordPress's toolbar (z-index 99999), at core's media modal's
	   layer (D9-477, Decision 976): the dialog covers the toolbar like any
	   modal, its backdrop with it, at every width and height. */
	z-index: 160000;
	padding: 16px;
}
.brio-feedback-modal-overlay[hidden] { display: none; }
.brio-feedback-modal {
	background: var(--brio-surface);
	border-radius: 12px;
	padding: 28px;
	width: 100%;
	max-width: 480px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	max-height: 90vh;
	overflow-y: auto;
}
.brio-docs-body .brio-feedback-close {
	position: absolute;
	top: 16px;
	inset-inline-end: 16px;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--brio-text-muted);
	padding: 4px;
	border-radius: 4px;
	display: flex;
	align-items: center;
}
.brio-docs-body .brio-feedback-close:hover { color: var(--brio-text); }
.brio-feedback-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 4px;
	color: var(--brio-text);
}
.brio-feedback-subtitle {
	font-size: 13px;
	color: var(--brio-text-muted);
	margin: 0 0 20px;
}
.brio-hp-field {
	position: absolute;
	/* Off screen on the side a page never scrolls to, in either direction (D8e). */
	inset-inline-start: -9999px;
	opacity: 0;
	pointer-events: none;
	height: 0;
	overflow: hidden;
}
.brio-form-group { margin-bottom: 16px; }
.brio-form-label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--brio-text);
	margin-bottom: 6px;
}
.brio-form-optional {
	font-weight: 400;
	color: var(--brio-text-muted);
	font-size: 12px;
}
/* Prefixed for the same reason as .brio-search-input above: a bare
   `.brio-feedback-textarea` loses to the theme's `input:is(…)` / `textarea`. */
.brio-docs-body .brio-feedback-textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--brio-field-border);
	border-radius: 6px;
	background: var(--brio-bg);
	color: var(--brio-text);
	font-size: 14px;
	font-family: var(--brio-font);
	resize: vertical;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.brio-docs-body .brio-feedback-input {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--brio-field-border);
	border-radius: 6px;
	background: var(--brio-bg);
	color: var(--brio-text);
	font-size: 14px;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.brio-feedback-error {
	background: var(--brio-error-bg);
	color: var(--brio-error-text);
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 12px;
}
.brio-feedback-error:empty {
	padding: 0;
	margin: 0;
}
.brio-feedback-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
}
.brio-docs-body .brio-btn-ghost-sm {
	padding: 7px 14px;
	font-size: 13px;
	border: 1px solid var(--brio-border);
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
	color: var(--brio-text);
}
.brio-docs-body .brio-btn-primary-sm {
	padding: 7px 14px;
	font-size: 13px;
	border: none;
	border-radius: 6px;
	background: var(--brio-accent);
	color: var(--brio-on-accent);
	cursor: pointer;
	font-weight: 500;
}
/* The base rule above is 0,2,0 and so is Blocksy's `[type="submit"]:hover`,
   which loads later and would otherwise take the hover state back: background,
   text and border all. A state can only be beaten by a state, so this exists to
   hold the hover at 0,3,0. It also gives the button the hover affordance the
   theme was providing. Its fill is accent_hover (D8d2, audit A60): the
   preset's link_hover, a site's own link_hover, or a shade of a site's own
   accent that keeps the text readable (brio_docs_accent_hover()). */
.brio-docs-body .brio-btn-primary-sm:hover {
	background: var(--brio-accent-hover);
	color: var(--brio-on-accent);
	border-color: transparent;
}
/* Send while a send is pending is aria-disabled, not disabled, so it keeps
   focus (D8d1, audit A51); it looks as a disabled button did. */
.brio-docs-body .brio-btn-primary-sm:disabled,
.brio-docs-body .brio-btn-primary-sm[aria-disabled="true"] {
	opacity: 0.7;
	cursor: not-allowed;
}
.brio-feedback-success {
	text-align: center;
	padding: 20px 0;
	color: var(--brio-text);
}
.brio-feedback-success p {
	margin: 12px 0 0;
	font-size: 15px;
}

@media (max-width: 720px) {
	.brio-article-nav-inner {
		grid-template-columns: 1fr;
	}
	.brio-nav-next { text-align: start; }
}

/* =================================================================
 * Accessibility: skip link, focus-visible, reduced motion
 * ================================================================= */
.brio-docs-body .brio-skip-link {
	position: absolute;
	top: -40px;
	inset-inline-start: 0;
	background: var(--brio-accent);
	color: var(--brio-on-accent);
	padding: 8px 16px;
	z-index: 9999;
	font-size: 14px;
	text-decoration: none;
	border-radius: 0;
	border-end-end-radius: 4px;
	transition: top 0.1s;
}
.brio-skip-link:focus,
.brio-skip-link:focus-visible {
	top: 0;
	outline: 2px solid var(--brio-accent);
	outline-offset: 2px;
}
/* Under the admin bar the skip link shows below it (D9-470, Decision 967): at
   the top of the page the bar covers the page's first pixels at every width,
   fixed or, 600 px and narrower, scrolling with the page. */
.admin-bar .brio-skip-link:focus,
.admin-bar .brio-skip-link:focus-visible {
	top: var(--wp-admin--admin-bar--height, 32px);
}

/* Links, buttons and other focusables get the outline ring. Text fields do not:
   they own a border, so an outline on top of it plus the theme's own focus ring
   stacks three rings. They are handled by the single rule below instead. */
.brio-docs-body :focus-visible:not(input):not(textarea) {
	outline: 2px solid var(--brio-accent);
	outline-offset: 2px;
}
.brio-docs-body main:focus,
.brio-docs-body div:where(#brio-main-content):focus { outline: none; }

/* The docs "not found" document (render_404(), D8c2): the look its inline
   styles gave it. */
.brio-docs-404 .brio-docs-404-main {
	padding: 80px 24px;
	text-align: center;
	font-family: -apple-system, sans-serif;
}
.brio-docs-404 .brio-docs-404-title {
	font-size: 32px;
	margin: 0 0 12px;
	color: var(--brio-heading);
}

/* The one focus treatment for every text field inside the docs: kill whatever
   outline the browser or the theme wants, tint the border, draw a 2 px accent
   ring (3:1 on the page in every preset) with the soft halo outside it (D8c3,
   audit A15). Typed selectors (0,3,1) are needed to beat a theme's
   `input:is([type="text"], …):focus` (0,2,1). Blocksy ships exactly that, and
   it also sets the text color and a transparent fill, so the typed text keeps
   the docs' color here and each field keeps its own fill below (D8c3, audit
   A21). */
.brio-docs-body input[type="text"]:focus,
.brio-docs-body input[type="search"]:focus,
.brio-docs-body input[type="email"]:focus,
.brio-docs-body textarea:focus,
.brio-docs-body input[type="text"]:focus-visible,
.brio-docs-body input[type="search"]:focus-visible,
.brio-docs-body input[type="email"]:focus-visible,
.brio-docs-body textarea:focus-visible {
	outline: none;
	color: var(--brio-text);
	border-color: var(--brio-accent);
	box-shadow: 0 0 0 2px var(--brio-accent), 0 0 0 5px var(--brio-accent-soft);
}
/* Forced colors (D8e, audit A58): they drop the box-shadow ring above, so there
   the focused field draws an outline in the system's highlight color instead.
   Outside forced colors this block never applies and the look is unchanged. */
@media (forced-colors: active) {
	.brio-docs-body input[type="text"]:focus,
	.brio-docs-body input[type="search"]:focus,
	.brio-docs-body input[type="email"]:focus,
	.brio-docs-body textarea:focus,
	.brio-docs-body input[type="text"]:focus-visible,
	.brio-docs-body input[type="search"]:focus-visible,
	.brio-docs-body input[type="email"]:focus-visible,
	.brio-docs-body textarea:focus-visible {
		outline: 2px solid Highlight;
		outline-offset: 2px;
	}
}
.brio-docs-body .brio-search-input:focus,
.brio-docs-body .brio-search-input:focus-visible { background-color: var(--brio-surface); }
.brio-docs-body .brio-feedback-input:focus,
.brio-docs-body .brio-feedback-input:focus-visible,
.brio-docs-body .brio-feedback-textarea:focus,
.brio-docs-body .brio-feedback-textarea:focus-visible { background-color: var(--brio-bg); }

@media (prefers-reduced-motion: reduce) {
	.brio-docs-body *,
	.brio-docs-body *::before,
	.brio-docs-body *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	/* The root too, on docs pages only (D8c3, audit A49): a theme's
	   html { scroll-behavior: smooth } would still animate a plain in-page
	   link. */
	html:has(.brio-docs-body) { scroll-behavior: auto !important; }
}

/* =================================================================
 * Phase 8c: Theme mode (docs embedded in the active theme)
 *
 * Until 0.118.0 the standalone shell was an app: a 100vh flex frame whose
 * sidebar and content pane scrolled independently (now it scrolls as one
 * page too, D9-467). Embedded, that frame would fight the theme (a nested
 * scroll region, a footer pushed off screen), so here the docs return to
 * normal document flow and the sidebar/TOC go sticky.
 *
 * Scoping note: .brio-docs-embedded IS the .brio-docs-body element in this
 * mode, so token scope, reset and box-sizing already apply to it and its
 * descendants. Nothing below needs `all: initial` or !important.
 * ================================================================= */

.brio-docs-embedded {
	width: 100%;
	max-width: var(--brio-content-width);
	margin-inline: auto;
	box-sizing: border-box;
	/* The breathing room between the theme's header/footer and our toolbar +
	   content. Padding, not margin, so it cannot collapse into the theme's own
	   margins. Standalone never gets this class, so its shell is untouched. */
	padding-top: var(--brio-theme-spacing-top);
	padding-bottom: var(--brio-theme-spacing-bottom);
	/* No sticky docs header in this mode: the theme owns the top of the page. */
	--brio-header-height: 0px;
}

/* The effective width here is min(content width, the theme's own container).
   We deliberately do not widen the theme's wrapper: on GeneratePress the site
   header and footer are siblings of the capped #page, so breaking out would
   leave the docs wider than the theme chrome they are meant to sit inside. */

/* Embedded, the grid has less room than a full-bleed standalone page, so the
   article keeps more of it. */
.brio-docs-embedded .brio-article-with-toc { padding: 32px 32px 64px; }

/* Docs toolbar: breadcrumb left, search trigger + theme toggle right. */
.brio-docs-toolbar {
	background: var(--brio-bg);
	border-bottom: 1px solid var(--brio-border);
}
.brio-toolbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 24px;
	min-height: 48px;
}
/* Breadcrumb off: nothing on the left, so keep the toggle group on the right. */
.brio-toolbar-inner--end { justify-content: flex-end; }
.brio-toolbar-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
.brio-toolbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}
/* Document flow instead of the standalone app frame.
   align-items: flex-start keeps the sidebar from stretching to the row height,
   which is what lets it stick. It must not survive into the mobile column
   layout, where align-items governs width and would collapse the content pane.
   min-height auto keeps Standalone's one-screen minimum (0.118.0) out of this
   mode. */
.brio-docs-embedded .brio-product-layout {
	max-width: none;
	margin: 0;
	height: auto;
	min-height: auto;
	overflow: visible;
	align-items: flex-start;
}
.brio-docs-embedded .brio-sidebar {
	position: sticky;
	top: var(--brio-admin-bar-height, 0px);
	max-height: calc(100vh - var(--brio-admin-bar-height, 0px));
	overflow-y: auto;
	padding-bottom: 24px;
}
/* Sidebar background, Full height (D5b, Decisions 87 and 90; the default).
   The aside stretches down the whole layout row and paints the column, its
   background and border with it; the sticky behaviour and the sidebar's own
   scroll move to .brio-sidebar-inner with 0.18.0's values (top 0, at most the
   viewport tall, the aside's 24 px end padding added to the inner's 16), so
   the tree and the Popular list stick and scroll as before. The class is
   printed by PHP from the setting (brio_docs_sidebar_class()); Fit content
   prints none and keeps the rule above alone. Standalone has the same rules
   with the header's offset since 0.118.0 (D9-467). Below 768 px both modes keep
   the static sidebar of the rule further down. The range query closes the
   768 to 769 px gap (D9-497, Decision 1052). */
@media (min-width: 769px), (width > 768px) {
	.brio-docs-embedded .brio-sidebar.brio-sidebar--full {
		position: static;
		align-self: stretch;
		max-height: none;
		overflow: visible;
		padding-bottom: 0;
	}
	.brio-docs-embedded .brio-sidebar--full .brio-sidebar-inner {
		position: sticky;
		top: var(--brio-admin-bar-height, 0px);
		max-height: calc(100vh - var(--brio-admin-bar-height, 0px));
		overflow-x: hidden;
		overflow-y: auto;
		padding-bottom: 40px;
	}
}
.brio-docs-embedded .brio-content-area {
	overflow: visible;
	min-width: 0;
}
.brio-docs-embedded .brio-toc-sidebar {
	top: calc(var(--brio-admin-bar-height, 0px) + 24px);
	max-height: calc(100vh - var(--brio-admin-bar-height, 0px) - 48px);
}
.brio-docs-embedded .brio-hub-main { padding-top: 40px; }

/* Belt and braces against a theme's global img rules. */
.brio-docs-embedded img { max-width: 100%; height: auto; }

@media (max-width: 768px) {
	.brio-docs-embedded .brio-product-layout { align-items: stretch; }
	.brio-docs-embedded .brio-sidebar {
		position: static;
		max-height: none;
	}
	.brio-docs-embedded .brio-article-with-toc { padding: 24px 20px 60px; }
	.brio-toolbar-inner { padding: 10px 16px; }
}

/* The docs sidebar on phones (D8d3, audit A29). PHP prints the phone sidebar
   mode as the layout's class (brio-product-layout--phone-button, -below or
   -above), never script (Decision 87). Behind a Browse docs button: the button
   prints hidden before the sidebar, and frontend.js shows it as it adds
   is-sidebar-closed to the layout, so without the script the sidebar shows; it
   opens in place, pushing the content down, with no animation. Below the
   content: the sidebar prints after the content, a Browse docs link to it
   at the top of the main column. Above the content: 0.33.0's layout. Wider than 768 px the button and
   the link never show and below's sidebar is drawn first again, so every mode
   keeps the sidebar beside the content there. */
.brio-docs-body .brio-browse-docs,
.brio-docs-body .brio-browse-docs-link { display: none; }
.brio-docs-body .brio-sidebar:focus { outline: none; }
/* The range query closes the 768 to 769 px gap (D9-497, Decision 1052). */
@media (min-width: 769px), (width > 768px) {
	.brio-product-layout--phone-below > .brio-sidebar { order: -1; }
}
@media (max-width: 768px) {
	.brio-docs-body .brio-browse-docs:not([hidden]),
	.brio-docs-body .brio-browse-docs-link:not([hidden]) {
		display: flex;
		align-items: center;
		gap: 10px;
		box-sizing: border-box;
		min-height: 44px;
		margin: 12px 16px 4px;
		padding: 10px 14px;
		border: 1px solid var(--brio-field-border);
		border-radius: 8px;
		background: var(--brio-surface);
		color: var(--brio-text);
		font-size: 15px;
		font-weight: 600;
		line-height: 1.3;
		text-align: start;
		text-decoration: none;
		text-transform: none;
		letter-spacing: normal;
		box-shadow: none;
		cursor: pointer;
	}
	.brio-docs-body .brio-browse-docs:hover,
	.brio-docs-body .brio-browse-docs-link:hover {
		border-color: var(--brio-accent);
		background: var(--brio-surface);
		color: var(--brio-text);
	}
	/* The link sits at the top of the main column, in line with its text. */
	.brio-docs-body .brio-browse-docs-link:not([hidden]) { margin: 16px 20px 0; }
	.brio-docs-body .brio-browse-docs-icon { flex-shrink: 0; }
	.brio-docs-body .brio-browse-docs-chevron {
		flex-shrink: 0;
		margin-inline-start: auto;
	}
	.brio-docs-body .brio-browse-docs[aria-expanded="true"] .brio-browse-docs-chevron { transform: rotate(180deg); }
	.brio-product-layout--phone-button.is-sidebar-closed > .brio-sidebar { display: none; }
	.brio-product-layout--phone-below > .brio-sidebar {
		border-bottom: none;
		border-top: 1px solid var(--brio-border);
	}
}

/* ================================================================== */
/* Print                                                              */
/* ================================================================== */
@media print {
	@page { margin: 2cm; }

	/* Our own non-content regions. */
	.brio-skip-link,
	.brio-browse-docs,
	.brio-browse-docs-link,
	.brio-docs-header,
	.brio-docs-toolbar,
	.brio-docs-footer,
	.brio-sidebar,
	.brio-toc-sidebar,
	.brio-sidebar-popular,
	.brio-social-share,
	.brio-feedback-section,
	.brio-article-nav,
	.brio-related,
	.brio-print-btn,
	.brio-heading-anchor,
	.brio-copy-tooltip,
	#wpadminbar {
		display: none !important;
	}

	/* Print is always the last meta part and is the only one that is a
	   <button>, so once it goes the trailing dot is the last <span> in the
	   row. When print is off there is no trailing dot and this matches nothing. */
	.brio-article-meta .brio-meta-sep:last-of-type { display: none !important; }

	/* Theme mode: the active theme's header, footer and any sibling chrome.
	   Every ancestor of the docs root keeps only the child that leads back to
	   it, which walks the tree for us whatever wrapper the theme nests us in
	   (body > .wp-site-blocks > #brio-docs-root, body > #page > …, etc.).
	   In standalone the root does not exist, so the rule matches nothing.
	   Browsers without :has() fall back to the explicit hides above. */
	:has(#brio-docs-root) > *:not(#brio-docs-root):not(:has(#brio-docs-root)) {
		display: none !important;
	}

	/* Strip the app frame: viewport-height panes, scroll containers, columns.
	   .brio-docs-embedded-inner is in the list because in theme mode it, not the
	   wrapper, carries the docs background, including the dark one. */
	.brio-docs-body,
	.brio-docs-body .brio-docs-embedded-inner,
	.brio-docs-body .brio-product-layout,
	.brio-docs-body .brio-content-area,
	.brio-docs-body .brio-article-with-toc,
	.brio-docs-body .brio-article {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		min-width: 0 !important;
		height: auto !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		position: static !important;
		background: #fff !important;
		color: #000 !important;
	}

	.brio-docs-body .brio-prose,
	.brio-docs-body .brio-article-content {
		font-size: 16px !important;
		line-height: 1.6 !important;
		color: #000 !important;
	}

	.brio-docs-body .brio-article-title,
	.brio-docs-body .brio-prose h1,
	.brio-docs-body .brio-prose h2,
	.brio-docs-body .brio-prose h3,
	.brio-docs-body .brio-prose h4 {
		color: #000 !important;
		break-after: avoid;
	}

	.brio-docs-body .brio-prose a { color: #000 !important; }

	/* data-theme survives into the print job, so a reader printing from dark
	   mode would otherwise get the dark surface tokens on these decorations:
	   black-on-near-black wherever the browser's "Background graphics" option
	   is enabled. Paper is always light, so pin them to light values. */
	.brio-docs-body .brio-prose code,
	.brio-docs-body .brio-prose pre,
	.brio-docs-body .brio-prose th,
	.brio-docs-body .brio-prose td,
	.brio-docs-body .brio-prose blockquote {
		background: #f5f5f5 !important;
		color: #000 !important;
		border-color: #ccc !important;
	}
	.brio-docs-body .brio-prose td { background: #fff !important; }

	/* Site name above the title, hidden on screen. */
	.brio-print-site-name {
		display: block !important;
		font-size: 12px;
		letter-spacing: 0.6px;
		text-transform: uppercase;
		color: #555 !important;
		margin-bottom: 8px;
	}

	.brio-article-header {
		margin-bottom: 20px !important;
		border-bottom: 1px solid #ccc;
		padding-bottom: 12px !important;
	}
	.brio-article-meta {
		font-size: 12px !important;
		color: #555 !important;
	}

	/* A printed link is dead unless its target is spelled out. Same-site links
	   are suppressed by a host-specific rule appended in the inline token CSS
	   (brio_docs_render_tokens_css() in includes/functions.php). CSS alone
	   cannot tell "external" from "absolute". */
	.brio-docs-body .brio-prose a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 12px;
		color: #444;
		word-break: break-all;
	}

	.brio-docs-body .brio-prose img { max-width: 100% !important; }
	.brio-docs-body .brio-prose pre,
	.brio-docs-body .brio-prose blockquote,
	.brio-docs-body .brio-prose table { break-inside: avoid; }
}

/* =================================================================
 * Category pages (D3): /{base}/{product}/{word}/{category}/
 * Logical properties throughout, so the page mirrors in RTL. The
 * container query below sits on .brio-catpage, which an article loaded
 * in place replaces whole, so no fixed modal is ever inside it
 * (LANDMINES 10).
 * ================================================================= */
.brio-docs-body .brio-visually-hidden {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.brio-docs-body .brio-catpage {
	container: brio-catpage / inline-size;
	max-inline-size: 780px;
	margin-inline: auto;
	padding-block: 48px 80px;
	padding-inline: 48px;
}
.brio-docs-body .brio-catpage--cards { max-inline-size: 1040px; }

.brio-docs-body .brio-catpage-header {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-block-end: 28px;
}
.brio-docs-body .brio-catpage-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	inline-size: 48px;
	block-size: 48px;
	border-radius: 50%;
	background: var(--brio-accent-soft);
	color: var(--brio-accent);
}
.brio-docs-body .brio-catpage-icon svg {
	display: block;
	inline-size: 24px;
	block-size: 24px;
}
.brio-docs-body .brio-catpage-heading {
	flex: 1;
	min-inline-size: 0;
}
.brio-docs-body .brio-catpage-title {
	margin: 0 0 8px;
	font-size: var(--brio-h1-size);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.3px;
	color: var(--brio-heading);
	overflow-wrap: anywhere;
}
.brio-docs-body .brio-catpage-description {
	margin: 0 0 12px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--brio-text-secondary);
	overflow-wrap: anywhere;
}
.brio-docs-body .brio-catpage-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	font-size: var(--brio-meta-size);
	color: var(--brio-meta-text);
}
.brio-docs-body .brio-catpage-copy {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-block-size: 32px;
	padding-block: 4px;
	padding-inline: 12px;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--brio-text-secondary);
	background: transparent;
	border: 1px solid var(--brio-border);
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
}
.brio-docs-body .brio-catpage-copy:hover {
	color: var(--brio-accent);
	border-color: var(--brio-accent);
}
.brio-docs-body .brio-catpage-copy svg { flex: none; }

.brio-docs-body .brio-catpage-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.brio-docs-body .brio-catpage-item {
	position: relative;
	margin: 0;
}
.brio-docs-body .brio-catpage-item-title {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}
.brio-docs-body .brio-catpage-article-link {
	color: var(--brio-heading);
	text-decoration: none;
	overflow-wrap: anywhere;
}
.brio-docs-body .brio-catpage-article-link:hover {
	color: var(--brio-link-hover);
	text-decoration: underline;
}
/* The whole row or card opens the article; the title link stays its one tab stop. */
.brio-docs-body .brio-catpage-article-link::after {
	content: "";
	position: absolute;
	inset: 0;
}
.brio-docs-body .brio-catpage-item-excerpt {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--brio-text-secondary);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.brio-docs-body .brio-catpage-item-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: calc(var(--brio-meta-size) - 1px);
	color: var(--brio-meta-text);
}

/* List (default): rows with a divider between them. */
.brio-docs-body .brio-catpage--list .brio-catpage-item { padding-block: 18px; }
.brio-docs-body .brio-catpage--list .brio-catpage-item:first-child { padding-block-start: 4px; }
.brio-docs-body .brio-catpage--list .brio-catpage-item + .brio-catpage-item { border-block-start: 1px solid var(--brio-border); }

/* Cards: one column, two once the page column is 720 px wide. */
.brio-docs-body .brio-catpage--cards .brio-catpage-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}
@container brio-catpage (min-width: 720px) {
	.brio-docs-body .brio-catpage--cards .brio-catpage-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.brio-docs-body .brio-catpage--cards .brio-catpage-item {
	padding-block: 16px;
	padding-inline: 18px;
	border: 1px solid var(--brio-border);
	border-radius: var(--brio-radius);
	background: var(--brio-surface);
	transition: border-color 0.15s, box-shadow 0.15s;
}
.brio-docs-body .brio-catpage--cards .brio-catpage-item:hover,
.brio-docs-body .brio-catpage--cards .brio-catpage-item:focus-within {
	border-color: var(--brio-accent);
	box-shadow: var(--brio-shadow);
}

.brio-docs-body .brio-catpage-empty {
	margin: 0;
	padding-block: 32px;
	font-size: 15px;
	color: var(--brio-text-muted);
}

/* Three crumbs on a narrow header: the short root label keeps its width and
   the product and category names shrink first (category pages only). */
.brio-docs-category .brio-header-logo + .brio-header-breadcrumb,
.brio-docs-category .brio-toolbar-left > .brio-header-breadcrumb:first-child {
	flex-shrink: 0;
}

/* Sidebar: the category whose page this is, and View all under each list. */
.brio-docs-body .brio-sidebar-category.is-current > .brio-sidebar-category-toggle,
.brio-docs-body .brio-sidebar-category.is-current > .brio-sidebar-category-toggle .brio-sidebar-cat-icon {
	color: var(--brio-sidebar-active-text);
}
.brio-docs-body .brio-sidebar-view-all {
	display: inline-block;
	padding-block: 5px;
	padding-inline: 40px 16px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--brio-link);
	text-decoration: none;
}
.brio-docs-body .brio-sidebar-view-all:hover {
	color: var(--brio-link-hover);
	text-decoration: underline;
}
.brio-docs-body .brio-sidebar-view-all[aria-current="page"] {
	font-weight: 600;
	color: var(--brio-sidebar-active-text);
}

@media (max-width: 1024px) {
	.brio-docs-body .brio-catpage { padding-block: 32px 60px; padding-inline: 24px; }
}
@media (max-width: 768px) {
	.brio-docs-body .brio-catpage { padding-block: 24px 60px; padding-inline: 20px; }
	.brio-docs-body .brio-catpage-title { font-size: 24px; }
}
@media print {
	.brio-docs-body .brio-catpage-copy { display: none !important; }
	.brio-docs-body .brio-catpage-article-link::after { content: none; }
}

/* =================================================================
 * Product overview (D3b): /{base}/{product}/ when the product's landing
 * is the overview. Tokens and logical properties throughout, so the page
 * follows the colour mode and mirrors in RTL. The container query below
 * sits on .brio-overview, which an article loaded in place replaces
 * whole, so no fixed modal is ever inside it (LANDMINES 10).
 * ================================================================= */
.brio-docs-body .brio-overview {
	container: brio-overview / inline-size;
	max-inline-size: 1040px;
	margin-inline: auto;
	padding-block: 48px 80px;
	padding-inline: 48px;
}

.brio-docs-body .brio-overview-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-block-end: 32px;
}
.brio-docs-body .brio-overview-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	inline-size: 48px;
	block-size: 48px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--brio-accent-soft);
}
.brio-docs-body .brio-overview-logo img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: contain;
}
/* A product's logo for dark backgrounds (D5b, Decision 86): the second img
   shows only under the token CSS's two dark selectors, the main one hides
   there; the light rule after them re-asserts light at the same specificity,
   so a theme's own data-theme="dark" on <html> cannot swap a light docs page.
   With no dark version the box takes brio-logo-tile: the main logo on a light
   tile (--brio-logo-tile, the light surface) in dark mode only. */
/* The class is doubled to outrank .brio-docs-body .brio-overview-logo img
   (display: block); the dark rules below tie with it and win by order. */
.brio-docs-body .brio-logo-dark.brio-logo-dark { display: none; }
.brio-docs-body[data-theme="dark"] .brio-logo-light,
[data-theme="dark"] .brio-docs-body .brio-logo-light { display: none; }
.brio-docs-body[data-theme="dark"] .brio-logo-dark,
[data-theme="dark"] .brio-docs-body .brio-logo-dark { display: block; }
.brio-docs-body[data-theme="dark"] .brio-logo-tile,
[data-theme="dark"] .brio-docs-body .brio-logo-tile {
	padding: 4px;
	background: var(--brio-logo-tile);
}
.brio-docs-body[data-theme="light"] .brio-logo-light { display: block; }
.brio-docs-body[data-theme="light"] .brio-logo-dark { display: none; }
.brio-docs-body[data-theme="light"] .brio-logo-tile {
	padding: 0;
	background: var(--brio-accent-soft);
}
/* Paper is light whatever the mode (data-theme survives into the print job),
   so print always shows the main logo, and the box as 0.18.0 printed it. */
@media print {
	.brio-docs-body .brio-logo-dark.brio-logo-dark { display: none !important; }
	.brio-docs-body .brio-logo-light { display: block !important; }
	.brio-docs-body .brio-logo-tile {
		padding: 0 !important;
		background: var(--brio-accent-soft) !important;
	}
}
.brio-docs-body .brio-overview-logo-initials {
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	color: var(--brio-accent);
}
.brio-docs-body .brio-overview-heading {
	flex: 1;
	min-inline-size: 0;
}
.brio-docs-body .brio-overview-title {
	margin: 0 0 4px;
	font-size: var(--brio-h1-size);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.3px;
	color: var(--brio-heading);
	overflow-wrap: anywhere;
}
.brio-docs-body .brio-overview-meta {
	margin: 0;
	font-size: var(--brio-meta-size);
	color: var(--brio-meta-text);
}

/* Cards: one column, two once the page column is 720 px wide. */
.brio-docs-body .brio-overview-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}
@container brio-overview (min-width: 720px) {
	.brio-docs-body .brio-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.brio-docs-body .brio-overview-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding-block: 20px;
	padding-inline: 20px;
	border: 1px solid var(--brio-border);
	border-radius: var(--brio-radius);
	background: var(--brio-surface);
}
.brio-docs-body .brio-overview-card-head {
	display: flex;
	align-items: center;
	gap: 12px;
	min-inline-size: 0;
}
.brio-docs-body .brio-overview-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	inline-size: 40px;
	block-size: 40px;
	border-radius: 50%;
	background: var(--brio-accent-soft);
	color: var(--brio-accent);
}
.brio-docs-body .brio-overview-card-icon svg {
	display: block;
	inline-size: 20px;
	block-size: 20px;
}
.brio-docs-body .brio-overview-card-title {
	flex: 1;
	min-inline-size: 0;
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--brio-heading);
	overflow-wrap: anywhere;
}
.brio-docs-body .brio-overview-card-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.25em;
}
.brio-docs-body .brio-overview-card-link:hover {
	color: var(--brio-link-hover);
	text-decoration: underline;
}
.brio-docs-body .brio-overview-card-description {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--brio-text-secondary);
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.brio-docs-body .brio-overview-articles {
	display: flex;
	flex-direction: column;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.brio-docs-body .brio-overview-articles li { margin: 0; }
.brio-docs-body .brio-overview-article-link {
	font-size: 14px;
	line-height: 1.5;
	color: var(--brio-text);
	text-decoration: none;
	overflow-wrap: anywhere;
}
.brio-docs-body .brio-overview-article-link:hover {
	color: var(--brio-link-hover);
	text-decoration: underline;
}
.brio-docs-body .brio-overview-card-empty {
	margin: 0;
	font-size: 14px;
	color: var(--brio-text-muted);
}
/* The link sits at the foot of its card, so the links of a row line up. */
.brio-docs-body .brio-overview-view-link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 4px;
	margin-block-start: auto;
	font-size: 14px;
	font-weight: 500;
	color: var(--brio-link);
	text-decoration: none;
}
.brio-docs-body .brio-overview-view-link:hover {
	color: var(--brio-link-hover);
	text-decoration: underline;
}
.brio-docs-body .brio-overview-view-chevron {
	flex: none;
	inline-size: 16px;
	block-size: 16px;
}
.brio-docs-body .brio-overview-view-chevron:dir(rtl) { transform: scaleX(-1); }

.brio-docs-body .brio-overview-empty {
	margin: 0;
	padding-block: 32px;
	font-size: 15px;
	color: var(--brio-text-muted);
}

@media (max-width: 1024px) {
	.brio-docs-body .brio-overview { padding-block: 32px 60px; padding-inline: 24px; }
}
@media (max-width: 768px) {
	.brio-docs-body .brio-overview { padding-block: 24px 60px; padding-inline: 20px; }
	.brio-docs-body .brio-overview-title { font-size: 24px; }
}
