/**
 * 9XO single blog article.
 * Loaded only on single blog posts when the blog module is enabled.
 * The module owns the whole template (template_include), so this file styles
 * the article layout and neutralizes the generic .site-content spacing.
 * Design tokens mirror the About / Help Center / Blog landing pages.
 */

/* --------------------------------------------------------------------------
 * Neutralize theme chrome (module owns the markup between header/footer)
 * -------------------------------------------------------------------------- */

body.nxo-blog-article-page .site-content {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body.nxo-blog-article-page .site-content > .container {
	width: 100%;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

/* --------------------------------------------------------------------------
 * Tokens
 * -------------------------------------------------------------------------- */

.nxo-ba {
	--nxo-ba-accent: #6c35e8;
	--nxo-ba-accent-dark: #5222c4;
	--nxo-ba-dark: #20212a;
	--nxo-ba-soft: #f3edff;
	--nxo-ba-soft-2: #eee9f7;
	--nxo-ba-text: #20212a;
	--nxo-ba-muted: #555765;
	--nxo-ba-border: #e9e6ef;
	--nxo-ba-surface: #ffffff;
	--nxo-ba-radius: 16px;
	--nxo-ba-shadow: 0 10px 30px rgba(30, 31, 40, 0.05);
	--nxo-ba-grad: linear-gradient(135deg, var(--nxo-ba-accent), var(--nxo-ba-accent-dark));
	--nxo-ba-btn-shadow: 0 12px 28px rgba(108, 53, 232, 0.25);
	color: var(--nxo-ba-text);
	background: #fff;
	line-height: 1.55;
}

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

.nxo-ba a:focus-visible,
.nxo-ba button:focus-visible,
.nxo-ba input:focus-visible {
	outline: 3px solid rgba(108, 53, 232, 0.45);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
 * Hero band (breadcrumbs + collage + curve)
 * -------------------------------------------------------------------------- */

/* Gradient-only band (no imagery) — same layered glow treatment as the
   blog landing / Help Center heroes. */
.nxo-ba-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(620px 320px at 82% 24%, rgba(108, 53, 232, 0.12), transparent 70%),
		radial-gradient(480px 280px at 62% 88%, rgba(210, 92, 226, 0.1), transparent 70%),
		radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.9), transparent 32%),
		linear-gradient(135deg, #fbf8ff 0%, #eee9f7 48%, #e8dafd 100%);
}

.nxo-ba-hero__inner {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
	padding: 24px 0 56px;
	min-height: 120px;
}

.nxo-ba-hero__content {
	flex: 0 1 680px;
	min-width: 0;
	padding-top: 8px;
}

.nxo-ba-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: var(--nxo-ba-muted);
	font-size: 13px;
}

body.nxo-blog-article-page .nxo-ba-breadcrumb a {
	color: var(--nxo-ba-accent-dark);
	text-decoration: none;
	transition: color 0.2s ease;
}

body.nxo-blog-article-page .nxo-ba-breadcrumb a:hover {
	color: var(--nxo-ba-accent);
}

.nxo-ba-breadcrumb__current {
	color: var(--nxo-ba-dark);
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 320px;
}

.nxo-ba-hero__curve {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	line-height: 0;
	pointer-events: none;
}

.nxo-ba-hero__curve svg {
	display: block;
	width: 100%;
	height: 40px;
}

/* --------------------------------------------------------------------------
 * Two-column layout
 * -------------------------------------------------------------------------- */

.nxo-ba-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	align-items: start;
	gap: 24px;
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
	padding: 22px 0 48px;
}

.nxo-ba-main {
	min-width: 0;
}

.nxo-ba-side {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* The sidebar flows naturally so all related content remains reachable. */

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

.nxo-ba-article {
	padding: 26px 30px 28px;
	border: 1px solid var(--nxo-ba-border);
	border-radius: var(--nxo-ba-radius);
	background: var(--nxo-ba-surface);
	box-shadow: var(--nxo-ba-shadow);
	scroll-margin-top: 110px;
}

body.nxo-blog-article-page a.nxo-ba-pill {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	margin-bottom: 12px;
	padding: 4px 14px;
	border-radius: 999px;
	background: var(--nxo-ba-soft);
	color: var(--nxo-ba-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

body.nxo-blog-article-page a.nxo-ba-pill:hover {
	background: var(--nxo-ba-accent);
	color: #fff;
}

.nxo-ba-header__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.nxo-ba-title {
	margin: 0 0 10px;
	color: var(--nxo-ba-dark);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -1px;
}

.nxo-ba-share {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	padding-top: 6px;
}

.nxo-ba-share__label {
	color: var(--nxo-ba-muted);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.nxo-ba-share__icons {
	display: flex;
	gap: 8px;
}

body.nxo-blog-article-page a.nxo-ba-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 8px;
	border: 1px solid rgba(108, 53, 232, 0.28);
	border-radius: 50%;
	background: var(--nxo-ba-surface);
	color: var(--nxo-ba-accent);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body.nxo-blog-article-page a.nxo-ba-share__btn:hover {
	border-color: transparent;
	background: var(--nxo-ba-grad);
	color: #fff;
	transform: translateY(-2px);
}

.nxo-ba-share__btn svg {
	width: 100%;
	height: 100%;
}

.nxo-ba-intro {
	margin: 0 0 12px;
	color: var(--nxo-ba-muted);
	font-size: 15px;
	line-height: 1.7;
}

.nxo-ba-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--nxo-ba-border);
	color: var(--nxo-ba-muted);
	font-size: 13px;
}

.nxo-ba-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.nxo-ba-meta__item svg {
	width: 15px;
	height: 15px;
}

.nxo-ba-featured {
	margin: 0 0 22px;
	overflow: hidden;
	border-radius: 14px;
}

.nxo-ba-featured img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 460px;
	object-fit: cover;
}

/* --------------------------------------------------------------------------
 * Article body typography
 * -------------------------------------------------------------------------- */

.nxo-ba-body {
	color: var(--nxo-ba-muted);
	font-size: 15px;
	line-height: 1.8;
}

.nxo-ba-body p {
	margin: 0 0 14px;
}

.nxo-ba-body > :last-child {
	margin-bottom: 0;
}

body.nxo-blog-article-page .nxo-ba-body a {
	color: var(--nxo-ba-accent);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s ease;
}

body.nxo-blog-article-page .nxo-ba-body a:hover {
	color: var(--nxo-ba-accent-dark);
}

.nxo-ba-body h2,
.nxo-ba-body h3 {
	margin: 26px 0 10px;
	color: var(--nxo-ba-dark);
	font-weight: 700;
	letter-spacing: -0.3px;
	line-height: 1.3;
	scroll-margin-top: 110px;
}

.nxo-ba-body h2 {
	font-size: 20px;
}

.nxo-ba-body h3 {
	font-size: 17px;
}

.nxo-ba-body img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.nxo-ba-body ul {
	margin: 12px 0 16px;
	padding: 0;
	list-style: none;
}

.nxo-ba-body ul li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 22px;
	font-size: 14px;
}

.nxo-ba-body ul li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.65em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--nxo-ba-accent);
}

.nxo-ba-body ol {
	counter-reset: nxo-ba-steps;
	margin: 12px 0 16px;
	padding: 16px 18px;
	border-radius: 12px;
	background: var(--nxo-ba-soft);
	list-style: none;
}

.nxo-ba-body ol li {
	position: relative;
	counter-increment: nxo-ba-steps;
	margin: 0 0 9px;
	padding-left: 36px;
	font-size: 14px;
}

.nxo-ba-body ol li:last-child {
	margin-bottom: 0;
}

.nxo-ba-body ol li::before {
	content: counter(nxo-ba-steps);
	position: absolute;
	left: 0;
	top: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--nxo-ba-surface);
	border: 1px solid rgba(108, 53, 232, 0.35);
	color: var(--nxo-ba-accent);
	font-size: 12px;
	font-weight: 700;
}

/* "Tip:" callout — blockquotes render as soft lavender tip boxes. */

.nxo-ba-body blockquote {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 14px 0 18px;
	padding: 13px 16px;
	border: 0;
	border-left: 3px solid var(--nxo-ba-accent);
	border-radius: 12px;
	background: var(--nxo-ba-soft-2);
	color: var(--nxo-ba-accent-dark);
	font-size: 13.5px;
	line-height: 1.65;
	font-style: normal;
}

.nxo-ba-body blockquote::before {
	content: "\1F4A1";
	flex: 0 0 auto;
	font-size: 16px;
	line-height: 1.4;
}

.nxo-ba-body blockquote p {
	margin: 0;
}

.nxo-ba-body blockquote strong {
	color: var(--nxo-ba-accent-dark);
}

/* Continue Reading / next article capsule. */

.nxo-ba-next {
	display: flex;
	justify-content: center;
	margin: 26px 0 4px;
}

body.nxo-blog-article-page a.nxo-ba-next__btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	max-width: 100%;
	padding: 12px 28px;
	border: 1px solid rgba(108, 53, 232, 0.35);
	border-radius: 999px;
	background: var(--nxo-ba-surface);
	color: var(--nxo-ba-accent-dark);
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body.nxo-blog-article-page a.nxo-ba-next__btn:hover {
	border-color: var(--nxo-ba-accent);
	background: var(--nxo-ba-soft);
	transform: translateY(-2px);
}

.nxo-ba-next__title {
	color: var(--nxo-ba-muted);
	font-size: 12px;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 340px;
}

/* Tags footer. */

.nxo-ba-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--nxo-ba-border);
}

.nxo-ba-tags__label {
	color: var(--nxo-ba-dark);
	font-size: 13px;
	font-weight: 700;
}

.nxo-ba-tags__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

body.nxo-blog-article-page a.nxo-ba-tag {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 5px 14px;
	border: 1px solid rgba(108, 53, 232, 0.28);
	border-radius: 999px;
	background: var(--nxo-ba-surface);
	color: var(--nxo-ba-accent-dark);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.nxo-blog-article-page a.nxo-ba-tag:hover {
	border-color: var(--nxo-ba-accent);
	background: var(--nxo-ba-soft);
}

/* --------------------------------------------------------------------------
 * Sidebar cards
 * -------------------------------------------------------------------------- */

.nxo-ba-card {
	padding: 20px 18px;
	border: 1px solid var(--nxo-ba-border);
	border-radius: var(--nxo-ba-radius);
	background: var(--nxo-ba-surface);
	box-shadow: var(--nxo-ba-shadow);
}

.nxo-ba-card__title {
	margin: 0 0 12px;
	color: var(--nxo-ba-dark);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

/* Table of contents. */

.nxo-ba-toc__list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nxo-ba-toc__list li {
	margin: 0;
}

body.nxo-blog-article-page a.nxo-ba-toc__link {
	display: block;
	min-height: 40px;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--nxo-ba-muted);
	font-size: 13px;
	line-height: 1.35;
	text-decoration: none;
	transition: background-color 140ms ease, color 140ms ease;
}

body.nxo-blog-article-page a.nxo-ba-toc__link:hover {
	background: var(--nxo-ba-soft);
	color: var(--nxo-ba-accent-dark);
}

body.nxo-blog-article-page a.nxo-ba-toc__link.is-active {
	background: var(--nxo-ba-soft);
	color: var(--nxo-ba-accent-dark);
	font-weight: 600;
}

/* Related articles. */

.nxo-ba-related__list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nxo-ba-related__list li {
	margin: 0;
	border-bottom: 1px solid var(--nxo-ba-border);
}

.nxo-ba-related__list li:last-child {
	border-bottom: 0;
}

body.nxo-blog-article-page a.nxo-ba-related__link {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 10px 4px;
	color: var(--nxo-ba-dark);
	text-decoration: none;
	border-radius: 10px;
	transition: background-color 140ms ease;
}

body.nxo-blog-article-page a.nxo-ba-related__link:hover {
	background: var(--nxo-ba-soft);
}

.nxo-ba-related__thumb {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	border-radius: 10px;
	object-fit: cover;
	background: var(--nxo-ba-soft);
}

.nxo-ba-related__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.nxo-ba-related__title {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.nxo-ba-related__link:hover .nxo-ba-related__title {
	color: var(--nxo-ba-accent-dark);
}

.nxo-ba-related__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	color: var(--nxo-ba-muted);
	font-size: 12px;
}

/* --------------------------------------------------------------------------
 * Trust badges strip
 * -------------------------------------------------------------------------- */

.nxo-ba-trust {
	background: #fdf6ec;
}

.nxo-ba-trust__inner {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
	padding: 26px 0;
}

.nxo-ba-trust__item {
	display: flex;
	align-items: center;
	gap: 14px;
}

.nxo-ba-trust__icon {
	display: inline-flex;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	padding: 11px;
	border: 1.5px solid rgba(108, 53, 232, 0.4);
	border-radius: 50%;
	color: var(--nxo-ba-accent);
	background: #fff;
}

.nxo-ba-trust__icon svg {
	width: 100%;
	height: 100%;
}

.nxo-ba-trust__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.nxo-ba-trust__text strong {
	color: var(--nxo-ba-dark);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

.nxo-ba-trust__text span {
	color: var(--nxo-ba-muted);
	font-size: 12px;
	line-height: 1.5;
}

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

@media (max-width: 1200px) {
	.nxo-ba-layout {
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 18px;
	}
}

@media (max-width: 1024px) {
	.nxo-ba-layout {
		grid-template-columns: minmax(0, 1fr);
		width: min(1180px, calc(100% - 32px));
	}

	.nxo-ba-trust__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.nxo-ba-hero__inner {
		width: min(100% - 28px, 1180px);
		padding: 16px 0 46px;
		min-height: 0;
	}

	.nxo-ba-breadcrumb__current {
		max-width: 200px;
	}

	.nxo-ba-layout {
		width: min(100% - 28px, 1180px);
		padding-bottom: 36px;
	}

	.nxo-ba-article {
		padding: 20px 16px 22px;
		border-radius: 14px;
	}

	.nxo-ba-header__row {
		flex-direction: column;
		gap: 12px;
	}

	.nxo-ba-share {
		align-items: flex-start;
	}

	.nxo-ba-trust__inner {
		grid-template-columns: minmax(0, 1fr);
		width: min(100% - 28px, 1180px);
		gap: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nxo-ba-share__btn,
	.nxo-ba-next__btn {
		transition: none;
	}
}
