/* BrandPilot — front-end presentation for generated articles. Scoped, light-touch. */

.bp-answer {
	background: #f3f7ff;
	border-left: 4px solid #3a6df0;
	padding: 14px 18px;
	border-radius: 6px;
	font-size: 1.08em;
	line-height: 1.6;
	margin: 0 0 1.2em;
}

ul.bp-takeaways {
	background: #fafafa;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 14px 18px 14px 36px;
	margin: 0 0 1.6em;
}
ul.bp-takeaways li {
	margin: 4px 0;
	line-height: 1.5;
}

/* Figures (AI images + SVG infographics) */
.entry-content figure,
.post-content figure,
article figure {
	margin: 1.6em auto;
	text-align: center;
}
article figure img,
article figure svg {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}
article figure figcaption {
	font-size: 0.86em;
	color: #666;
	margin-top: 6px;
}

/* Tables — clean, scannable */
article .entry-content table,
article .post-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.4em 0;
	font-size: 0.96em;
}
article table th,
article table td {
	border: 1px solid #e3e3e3;
	padding: 9px 12px;
	text-align: left;
}
article table thead th {
	background: #f5f7fa;
	font-weight: 600;
}
article table tbody tr:nth-child(even) {
	background: #fbfbfc;
}

.bp-visual {
	margin: 1.6em 0;
}
.bp-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin: 1em 0;
}
.bp-stat {
	background: #f3f7ff;
	border: 1px solid #d8e4ff;
	border-radius: 8px;
	padding: 14px;
	text-align: center;
}
.bp-stat-value {
	display: block;
	font-size: 1.6em;
	font-weight: 700;
	color: #3a6df0;
}
.bp-stat-label {
	display: block;
	font-size: 0.88em;
	color: #444;
	margin-top: 4px;
}
article .bp-comparison {
	overflow-x: auto;
}
.bp-cmp-benchmark {
	margin-bottom: 1.2em;
}
.bp-cmp-bench td strong {
	color: #2271b1;
}

/* Ordered-list fallback for stat callouts (prevents merged text when grid CSS fails). */
ol.bp-stat-list {
	margin: 1em 0 1.4em;
	padding-left: 1.4em;
	line-height: 1.55;
}
ol.bp-stat-list li {
	margin: 0.35em 0;
}

/* SVG process flow inherits theme text color on dark sites. */
.bp-svg-process {
	color: inherit;
}

/* ---- Dark theme / low-contrast site support ---- */
@media (prefers-color-scheme: dark) {
	.bp-answer,
	ul.bp-takeaways,
	.bp-stat {
		background: #1a1a22;
		border-color: #3a3a48;
		color: #e8e8ee;
	}
	.bp-answer {
		border-left-color: #7b72ff;
	}
	ul.bp-takeaways li,
	.bp-stat-label,
	article figure figcaption {
		color: #c8c8d4;
	}
	.bp-stat-value {
		color: #a8b4ff;
	}
	article table th,
	article table td {
		border-color: #3a3a48;
		color: #e8e8ee;
	}
	article table thead th {
		background: #252530;
	}
	article table tbody tr:nth-child(even) {
		background: #1e1e28;
	}
}

body.dark-mode .bp-answer,
body.dark .bp-answer,
body.has-dark-theme .bp-answer,
body.dark-mode ul.bp-takeaways,
body.dark ul.bp-takeaways,
body.has-dark-theme ul.bp-takeaways,
body.dark-mode .bp-stat,
body.dark .bp-stat,
body.has-dark-theme .bp-stat {
	background: #1a1a22;
	border-color: #3a3a48;
	color: #e8e8ee;
}
body.dark-mode .bp-stat-value,
body.dark .bp-stat-value,
body.has-dark-theme .bp-stat-value {
	color: #a8b4ff;
}
body.dark-mode article table th,
body.dark-mode article table td,
body.dark article table th,
body.dark article table td,
body.has-dark-theme article table th,
body.has-dark-theme article table td {
	border-color: #3a3a48;
	color: #e8e8ee;
}
body.dark-mode article table thead th,
body.dark article table thead th,
body.has-dark-theme article table thead th {
	background: #252530;
}

/* ---- Mobile / tablet responsive (MVP) ---- */
@media ( max-width: 768px ) {
	.bp-answer,
	ul.bp-takeaways {
		padding: 12px 14px;
		font-size: 1em;
		margin-bottom: 1em;
	}
	.bp-stat-grid {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}
	.bp-stat {
		padding: 10px;
	}
	.bp-stat-value {
		font-size: 1.35em;
	}
	article .entry-content table,
	article .post-content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		font-size: 0.88em;
	}
	article figure img,
	article figure svg,
	.bp-visual img,
	.bp-visual svg {
		max-width: 100%;
		height: auto;
	}
}

@media ( max-width: 480px ) {
	.bp-stat-grid {
		grid-template-columns: 1fr;
	}
	.bp-answer {
		font-size: 0.98em;
	}
}

/* Homepage SEO layer — crawlable, visually hidden from theme layout */
.bp-home-seo-layer {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Frontend language switcher */
.bp-lang-switcher {
	position: fixed;
	bottom: 16px;
	right: 16px;
	z-index: 9999;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 10px;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 999px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	font-family: system-ui, sans-serif;
}
.bp-lang-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	color: #333;
	background: #f0f0f1;
}
.bp-lang-pill.is-active {
	background: #5B4FE8;
	color: #fff;
}
.bp-lang-switcher.bp-lang-rtl {
	left: 16px;
	right: auto;
}
@media (max-width: 480px) {
	.bp-lang-switcher {
		left: 8px;
		right: 8px;
		bottom: 8px;
		justify-content: center;
		border-radius: 12px;
	}
}
