/* BrioDocs frontend styles. */

:root,
[data-theme="light"] {
	--brio-bg: #FFFFFF;
	--brio-bg-secondary: #F8F9FA;
	--brio-bg-tertiary: #F1F3F5;
	--brio-surface: #FFFFFF;
	--brio-border: #E5E7EB;
	--brio-border-strong: #D1D5DB;
	--brio-text: #111827;
	--brio-text-secondary: #4B5563;
	--brio-text-muted: #9CA3AF;
	--brio-accent: #6941C6;
	--brio-accent-light: #F4EEFF;
	--brio-accent-hover: #5A35A8;
	--brio-link: #6941C6;
	--brio-sidebar-bg: #F8F9FA;
	--brio-sidebar-width: 280px;
	--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="dark"] {
	--brio-bg: #0F1117;
	--brio-bg-secondary: #161B22;
	--brio-bg-tertiary: #1C2128;
	--brio-surface: #161B22;
	--brio-border: #30363D;
	--brio-border-strong: #484F58;
	--brio-text: #E6EDF3;
	--brio-text-secondary: #8B949E;
	--brio-text-muted: #6E7681;
	--brio-accent-light: #1A1040;
	--brio-sidebar-bg: #0F1117;
	--brio-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
	--brio-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Reset (scoped) */
.brio-docs-body {
	margin: 0;
	padding: 0;
	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; }

.brio-docs-body a { color: var(--brio-link); }
.brio-docs-body button { font: inherit; }

/* Header */
.brio-docs-header {
	height: var(--brio-header-height);
	background: var(--brio-surface);
	border-bottom: 1px solid var(--brio-border);
	position: sticky;
	top: 0;
	z-index: 100;
}
.brio-header-inner {
	max-width: 1280px;
	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: 8px;
	min-width: 0;
}
.brio-header-logo {
	font-weight: 600;
	font-size: 15px;
	color: var(--brio-text);
	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 4px;
	color: var(--brio-text-muted);
}
.brio-header-breadcrumb {
	font-size: 14px;
	color: var(--brio-text-secondary);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.brio-header-breadcrumb:hover { color: var(--brio-accent); }

/* Theme toggle */
.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-theme-toggle:hover {
	background: var(--brio-bg-secondary);
	border-color: var(--brio-border-strong);
	color: var(--brio-text);
}
.brio-theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .brio-icon-moon { display: none; }
[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-text);
	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;
}
.brio-search-input {
	width: 100%;
	padding: 12px 16px 12px 44px;
	font-size: 15px;
	border: 1px solid var(--brio-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;
}
.brio-search-input:focus {
	border-color: var(--brio-accent);
	box-shadow: 0 0 0 3px rgba(105, 65, 198, 0.12);
}
.brio-search-input::placeholder { color: var(--brio-text-muted); }
.brio-search-icon {
	position: absolute;
	left: 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);
	left: 0;
	right: 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;
}

/* Product grid */
.brio-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}
.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-light);
	display: flex;
	align-items: center;
	justify-content: center;
}
.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: 13px;
	color: var(--brio-text-muted);
	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);
}

/* Product page layout */
.brio-product-layout {
	display: flex;
	height: calc(100vh - var(--brio-header-height));
	overflow: hidden;
}

/* Sidebar */
.brio-sidebar {
	width: var(--brio-sidebar-width);
	min-width: var(--brio-sidebar-width);
	background: var(--brio-sidebar-bg);
	border-right: 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; }
.brio-search-box--sm .brio-search-input {
	padding: 8px 12px 8px 36px;
	font-size: 13px;
	border-radius: 6px;
}
.brio-search-box--sm .brio-search-icon {
	width: 14px;
	height: 14px;
	left: 10px;
}

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

.brio-sidebar-category { margin-bottom: 2px; }
.brio-sidebar-category-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 16px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	color: var(--brio-text);
	font-size: 13px;
	font-weight: 600;
	border-radius: 6px;
	transition: background 0.1s;
}
.brio-sidebar-category-toggle:hover {
	background: var(--brio-bg-tertiary);
}
.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-sidebar-article-link {
	display: block;
	padding: 6px 16px 6px 40px;
	font-size: 13px;
	color: var(--brio-text-secondary);
	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-bg-tertiary);
	color: var(--brio-text);
}
.brio-sidebar-article-link.is-active {
	background: var(--brio-accent-light);
	color: var(--brio-accent);
	font-weight: 500;
}
.brio-sidebar-article-empty {
	display: block;
	padding: 6px 16px 6px 40px;
	font-size: 12px;
	color: var(--brio-text-muted);
	font-style: italic;
}

/* Content area */
.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 */
.brio-article-with-toc {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	max-width: 1100px;
	margin: 0 auto;
	padding: 48px 48px 80px;
}
.brio-article-with-toc .brio-article {
	flex: 1;
	min-width: 0;
	max-width: 780px;
	margin: 0;
	padding: 0;
}
.brio-article-header { margin-bottom: 32px; }
.brio-article-title {
	font-size: 32px;
	font-weight: 700;
	color: var(--brio-text);
	margin: 0 0 8px;
	letter-spacing: -0.3px;
	line-height: 1.25;
}
.brio-article-meta {
	font-size: 13px;
	color: var(--brio-text-muted);
	margin: 0;
}

/* Prose content */
.brio-prose { color: var(--brio-text); line-height: 1.75; }
.brio-prose h1 {
	font-size: 28px;
	font-weight: 700;
	margin: 32px 0 16px;
	color: var(--brio-text);
	line-height: 1.3;
}
.brio-prose h2 {
	font-size: 22px;
	font-weight: 600;
	margin: 40px 0 16px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--brio-border);
	color: var(--brio-text);
}
.brio-prose h3 {
	font-size: 17px;
	font-weight: 600;
	margin: 28px 0 12px;
	color: var(--brio-text);
}
.brio-prose h4 {
	font-size: 15px;
	font-weight: 600;
	margin: 24px 0 8px;
	color: var(--brio-text);
}
.brio-prose p { margin: 0 0 16px; }
.brio-prose a { color: var(--brio-accent); text-decoration: none; }
.brio-prose a:hover { text-decoration: underline; }
.brio-prose ul, .brio-prose ol { margin: 0 0 16px; padding-left: 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-left: 3px solid var(--brio-accent);
	margin: 0 0 16px;
	padding: 8px 16px;
	color: var(--brio-text-secondary);
	background: var(--brio-accent-light);
	border-radius: 0 6px 6px 0;
}
.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;
}
.brio-prose th, .brio-prose td {
	padding: 10px 14px;
	border: 1px solid var(--brio-border);
	text-align: left;
}
.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-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;
}
.brio-search-result-title {
	font-size: 14px;
	font-weight: 500;
	color: var(--brio-text);
	margin-bottom: 2px;
}
.brio-search-result-meta {
	font-size: 12px;
	color: var(--brio-text-muted);
	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: rgba(105, 65, 198, 0.15);
	color: var(--brio-accent);
	border-radius: 2px;
	padding: 0 2px;
	font-style: normal;
}
[data-theme="dark"] .brio-search-result-excerpt mark {
	background: rgba(105, 65, 198, 0.35);
	color: #DDD0FF;
}
.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);
}
.brio-heading-anchor {
	display: inline-flex;
	align-items: center;
	margin-left: 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: 11px;
	padding: 3px 8px;
	border-radius: 4px;
	white-space: nowrap;
	pointer-events: none;
	left: 0;
	top: -28px;
	opacity: 0;
	transition: opacity 0.2s;
}
.brio-copy-tooltip.is-visible { opacity: 1; }

/* Table of contents */
.brio-toc-sidebar {
	width: 220px;
	min-width: 220px;
	flex-shrink: 0;
	position: sticky;
	top: calc(var(--brio-header-height) + 24px);
	max-height: calc(100vh - var(--brio-header-height) - 48px);
	overflow-y: auto;
}
.brio-toc:empty { display: none; }
.brio-toc-title {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--brio-text-muted);
	margin-bottom: 10px;
}
.brio-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.brio-toc-item { margin-bottom: 2px; }
.brio-toc-h3 { padding-left: 12px; }
.brio-toc-link {
	display: block;
	font-size: 13px;
	color: var(--brio-text-muted);
	text-decoration: none;
	padding: 3px 0 3px 8px;
	border-left: 2px solid transparent;
	line-height: 1.4;
	transition: color 0.1s, border-color 0.1s;
}
.brio-toc-link:hover { color: var(--brio-text); }
.brio-toc-link.is-active {
	color: var(--brio-accent);
	border-left-color: var(--brio-accent);
	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 { 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-right: 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; }
}

/* =================================================================
 * 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-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-nav-item:hover {
	border-color: var(--brio-accent);
	background: var(--brio-accent-light);
}
.brio-nav-next { text-align: right; }
.brio-nav-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--brio-text-muted);
}
.brio-nav-prev .brio-nav-label::before { content: '\2190 \00a0'; }
.brio-nav-next .brio-nav-label::after { content: '\00a0 \2192'; }
.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-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-social-link:hover {
	border-color: var(--brio-accent);
	color: var(--brio-accent);
	background: var(--brio-accent-light);
}
.brio-social-copy {
	background: var(--brio-surface);
	border: 1px solid var(--brio-border);
}
.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: 11px;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.brio-social-link .brio-copy-tooltip.is-visible { opacity: 1; }

/* --- 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-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-helpful-btn:hover {
	border-color: var(--brio-accent);
	color: var(--brio-accent);
	background: var(--brio-accent-light);
}
.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);
}
.brio-feedback-trigger {
	background: none;
	border: none;
	color: var(--brio-accent);
	font-size: 13px;
	cursor: pointer;
	padding: 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;
	z-index: 99999;
	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-feedback-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--brio-text-muted);
	padding: 4px;
	border-radius: 4px;
	display: flex;
	align-items: center;
}
.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;
	left: -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;
}
.brio-feedback-textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--brio-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-feedback-textarea:focus {
	border-color: var(--brio-accent);
	box-shadow: 0 0 0 3px rgba(105, 65, 198, 0.1);
}
.brio-feedback-input {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--brio-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-input:focus {
	border-color: var(--brio-accent);
	box-shadow: 0 0 0 3px rgba(105, 65, 198, 0.1);
}
.brio-feedback-error {
	background: #FEE2E2;
	color: #991B1B;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 12px;
}
.brio-feedback-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
}
.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-btn-primary-sm {
	padding: 7px 14px;
	font-size: 13px;
	border: none;
	border-radius: 6px;
	background: var(--brio-accent);
	color: white;
	cursor: pointer;
	font-weight: 500;
}
.brio-btn-primary-sm:disabled {
	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: left; }
}

/* =================================================================
 * Accessibility — skip link, focus-visible, reduced motion
 * ================================================================= */
.brio-skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	background: var(--brio-accent);
	color: #ffffff;
	padding: 8px 16px;
	z-index: 9999;
	font-size: 14px;
	text-decoration: none;
	border-radius: 0 0 4px 0;
	transition: top 0.1s;
}
.brio-skip-link:focus,
.brio-skip-link:focus-visible {
	top: 0;
	outline: 2px solid var(--brio-accent);
	outline-offset: 2px;
}

.brio-docs-body :focus-visible {
	outline: 2px solid var(--brio-accent);
	outline-offset: 2px;
}
.brio-docs-body main:focus { outline: none; }

@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;
	}
}
