/**
 * Space Blog — archive + single post templates.
 *
 * Inherits each site's native styles (Command Center → Settings → Styles)
 * through the CSS custom properties emitted by Space_Customize::header_output():
 *   --primary-color            site primary (fl-button-background-color)
 *   --primary-button-color     button background
 *   --primary-button-text-color button text
 *   --border-radius            global radius (fl-button-border-radius)
 *   --cta-text-transform       button case (always emitted, defaults uppercase)
 *
 * Neutrals (hairlines, muted text) are built from currentColor mixes so they
 * track the site's body text color — including dark-mode sites — instead of
 * hardcoding grays. Heading font/color/body font are intentionally NOT set
 * here: bare h1-h6 and body text inherit the Beaver Builder theme's generated
 * typography, which is where fl-heading-* / fl-body-* mods are applied.
 *
 * NOTE: --border-radius is emitted as "<value>px" and renders as a bare "px"
 * on sites with no radius configured, which computes to 0 — same degradation
 * as srp-v5, so blog corners always match the rest of the site.
 */

body.space-blog {
	--sb-primary: var(--primary-color, #1743d8);
	/* Text-level accent. Defaults to the site primary; OEM compliance modes
	   override it (BMW allows no blue text/links → drops to body color). */
	--sb-accent-text: var(--sb-primary);
	--sb-btn-bg: var(--primary-button-color, #1743d8);
	--sb-btn-text: var(--primary-button-text-color, #ffffff);
	--sb-radius: var(--border-radius, 14px);
	--sb-transform: var(--cta-text-transform, uppercase);
	--sb-line: color-mix(in srgb, currentColor 12%, transparent);
	--sb-muted: color-mix(in srgb, currentColor 62%, transparent);
	--sb-shell: 1200px;
	--sb-shell-narrow: 780px;
}

/* ---------------------------------------------------------------- layout */

.sb-page {
	overflow-x: clip;
}

.sb-shell {
	max-width: var(--sb-shell);
	margin: 0 auto;
	padding: 0 24px;
}

.sb-shell--narrow {
	max-width: var(--sb-shell-narrow);
}

/* ------------------------------------------------------------ primitives */

.sb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	background-color: var(--sb-btn-bg);
	color: var(--sb-btn-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .02em;
	text-transform: var(--sb-transform);
	text-decoration: none;
	border: 0;
	border-radius: var(--sb-radius);
	cursor: pointer;
	transition: filter .2s ease, transform .2s ease;
}

.sb-btn:hover {
	filter: brightness(.9);
	color: var(--sb-btn-text);
	text-decoration: none;
}

.sb-btn--inverse {
	background-color: #ffffff;
	color: #16181d;
}

.sb-btn--inverse:hover {
	color: #16181d;
	filter: brightness(.94);
}

.sb-eyebrow {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--sb-accent-text);
}

.sb-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13.5px;
	color: var(--sb-muted);
}

.sb-meta__dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
	opacity: .6;
}

/* Post dates stay in the DOM (machine-readable <time> for crawlers/schema)
   but are not shown anywhere — remove this rule to bring them back. */
.space-blog .sb-date,
.space-blog .sb-mini__date {
	display: none;
}

.sb-badge {
	display: inline-block;
	padding: 5px 12px;
	background: rgba(255, 255, 255, .94);
	color: #16181d;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	border-radius: 999px;
	line-height: 1.2;
}

.sb-badge--link {
	background: color-mix(in srgb, var(--sb-accent-text) 11%, transparent);
	color: var(--sb-accent-text);
	text-decoration: none;
	transition: background .2s ease;
}

.sb-badge--link:hover {
	background: color-mix(in srgb, var(--sb-accent-text) 20%, transparent);
	color: var(--sb-accent-text);
	text-decoration: none;
}

/* No-featured-image fallback panel (shared by cards, hero, minis) */

.sb-media-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 100%;
	background:
		radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--sb-primary) 16%, transparent), transparent 60%),
		linear-gradient(135deg, color-mix(in srgb, var(--sb-primary) 10%, #f2f4f8), color-mix(in srgb, var(--sb-primary) 3%, #f2f4f8));
	color: var(--sb-primary);
}

.sb-media-fallback svg {
	width: 25%;
	max-width: 72px;
	min-width: 28px;
	height: auto;
	opacity: .55;
}

/* ---------------------------------------------------------- archive hero */

.sb-hero {
	padding: 56px 0 36px;
	background: linear-gradient(180deg, color-mix(in srgb, var(--sb-primary) 6%, transparent), transparent);
}

.sb-hero__title {
	margin: 0;
	font-size: clamp(34px, 5vw, 52px);
	line-height: 1.08;
}

.sb-hero__desc {
	max-width: 640px;
	margin: 14px 0 0;
	font-size: 17px;
	line-height: 1.6;
	color: var(--sb-muted);
}

.sb-hero__desc p {
	margin: 0;
}

/* Category pill bar */

.sb-cats {
	display: flex;
	gap: 10px;
	margin-top: 28px;
	padding-bottom: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.sb-cats::-webkit-scrollbar {
	display: none;
}

.sb-cat-pill {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: inherit;
	text-decoration: none;
	border: 1px solid var(--sb-line);
	border-radius: 999px;
	transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.sb-cat-pill:hover {
	color: var(--sb-accent-text);
	border-color: color-mix(in srgb, var(--sb-accent-text) 45%, transparent);
	text-decoration: none;
}

.sb-cat-pill.is-active {
	background: var(--sb-btn-bg);
	border-color: var(--sb-btn-bg);
	color: var(--sb-btn-text);
}

.sb-cat-pill__count {
	font-size: 11.5px;
	font-weight: 700;
	opacity: .55;
}

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

.sb-archive__content {
	padding: 40px 24px 72px;
}

.sb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 40px 30px;
}

.sb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sb-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--sb-radius);
	box-shadow: 0 1px 2px rgba(20, 22, 26, .07);
	transition: box-shadow .3s ease;
}

.sb-card__media img,
.sb-card__media .sb-media-fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.sb-card:hover .sb-card__media {
	box-shadow: 0 14px 32px -12px rgba(20, 22, 26, .28);
}

.sb-card:hover .sb-card__media img {
	transform: scale(1.04);
}

.sb-card__media .sb-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 1;
}

.sb-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 18px;
}

.sb-card__title {
	margin: 0;
	font-size: 21px;
	line-height: 1.3;
}

.sb-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}

.sb-card__title a:hover {
	color: var(--sb-accent-text);
	text-decoration: none;
}

/* Stretch the title link over the whole card */
.sb-card__title a::after {
	content: '';
	position: absolute;
	inset: 0;
}

.sb-card__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--sb-muted);
}

.sb-card__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
	font-size: 14px;
	font-weight: 600;
	color: var(--sb-accent-text);
}

.sb-card__more svg {
	width: 15px;
	height: 15px;
	transition: transform .25s ease;
}

.sb-card:hover .sb-card__more svg {
	transform: translateX(4px);
}

/* Featured (latest) post — large split card above the grid */

.sb-card--featured {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 40px;
	align-items: center;
	margin-bottom: 52px;
}

.sb-card--featured .sb-card__media {
	aspect-ratio: 16 / 10;
}

.sb-card--featured .sb-card__body {
	padding-top: 0;
}

.sb-card--featured .sb-card__title {
	font-size: clamp(24px, 3vw, 34px);
	line-height: 1.15;
}

.sb-card--featured .sb-card__excerpt {
	font-size: 16.5px;
	line-height: 1.65;
}

/* ------------------------------------------------------------ pagination */

.sb-page .navigation.pagination {
	margin-top: 56px;
}

.sb-page .navigation.pagination .nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.sb-page .navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	border: 1px solid var(--sb-line);
	border-radius: 999px;
	transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.sb-page .navigation.pagination .page-numbers svg {
	width: 16px;
	height: 16px;
}

.sb-page .navigation.pagination .page-numbers:hover {
	color: var(--sb-accent-text);
	border-color: color-mix(in srgb, var(--sb-accent-text) 45%, transparent);
	text-decoration: none;
}

.sb-page .navigation.pagination .page-numbers.current {
	background: var(--sb-btn-bg);
	border-color: var(--sb-btn-bg);
	color: var(--sb-btn-text);
}

.sb-page .navigation.pagination .page-numbers.dots {
	border: 0;
	color: var(--sb-muted);
}

/* ----------------------------------------------------------- empty state */

.sb-empty {
	max-width: 480px;
	margin: 0 auto;
	padding: 72px 0;
	text-align: center;
}

.sb-empty__glyph {
	display: inline-flex;
	width: 88px;
	height: 88px;
	padding: 20px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--sb-primary) 8%, transparent);
	color: var(--sb-primary);
}

.sb-empty__glyph svg {
	width: 100%;
	height: 100%;
	opacity: .7;
}

.sb-empty__title {
	margin: 22px 0 8px;
	font-size: 26px;
}

.sb-empty__text {
	margin: 0 0 24px;
	color: var(--sb-muted);
}

/* --------------------------------------------------------------- CTA band */

.sb-cta-band {
	padding: 64px 0;
	background:
		radial-gradient(90% 160% at 100% 0%, rgba(255, 255, 255, .14), transparent 55%),
		linear-gradient(120deg, var(--sb-primary), color-mix(in srgb, var(--sb-primary) 70%, #10131a));
	color: #ffffff;
}

.sb-cta-band__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	flex-wrap: wrap;
}

.sb-cta-band__title {
	margin: 0 0 8px;
	font-size: clamp(24px, 3vw, 34px);
	color: #ffffff;
}

.sb-cta-band__text {
	margin: 0;
	font-size: 16.5px;
	color: rgba(255, 255, 255, .85);
}

/* ---------------------------------------------------------- single: hero */

.sb-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 100000;
	pointer-events: none;
}

.sb-progress__bar {
	display: block;
	height: 100%;
	background: var(--sb-primary);
	transform: scaleX(0);
	transform-origin: 0 0;
}

.sb-crumbs {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 26px;
	font-size: 13.5px;
	color: var(--sb-muted);
}

.sb-crumbs a {
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}

.sb-crumbs a:hover {
	color: var(--sb-accent-text);
	text-decoration: none;
}

.sb-crumbs__sep {
	opacity: .5;
}

.sb-crumbs__current {
	max-width: 34ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sb-article__header {
	padding-top: 48px;
	text-align: center;
}

.sb-article__cats {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.sb-article__title {
	margin: 0 0 24px;
	font-size: clamp(30px, 4.4vw, 46px);
	line-height: 1.12;
}

.sb-article__meta {
	justify-content: center;
	font-size: 14.5px;
}

.sb-article__hero {
	margin: 36px 0 0;
	border-radius: var(--sb-radius);
	overflow: hidden;
	box-shadow: 0 24px 48px -20px rgba(20, 22, 26, .3);
	aspect-ratio: 21 / 10;
	position: relative;
}

.sb-article__hero img,
.sb-article__hero .sb-media-fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* -------------------------------------------------------- single: layout */

.sb-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 328px;
	gap: 64px;
	padding-top: 48px;
	padding-bottom: 64px;
}

.sb-article__main {
	max-width: var(--sb-shell-narrow);
	min-width: 0;
}

/* --------------------------------------------------------- single: prose */

.sb-prose {
	font-size: 17px;
	line-height: 1.75;
	overflow-wrap: break-word;
}

.sb-prose > * {
	margin-top: 0;
	margin-bottom: 1.35em;
}

.sb-prose h2,
.sb-prose h3,
.sb-prose h4 {
	margin-top: 1.6em;
	margin-bottom: .6em;
	line-height: 1.25;
}

.sb-prose h2 {
	font-size: 28px;
}

.sb-prose h3 {
	font-size: 23px;
}

.sb-prose h4 {
	font-size: 19px;
}

.sb-prose img {
	max-width: 100%;
	height: auto;
	border-radius: var(--sb-radius);
}

.sb-prose figure {
	margin-left: 0;
	margin-right: 0;
}

.sb-prose figcaption {
	margin-top: 10px;
	font-size: 13.5px;
	text-align: center;
	color: var(--sb-muted);
}

.sb-prose a {
	color: var(--sb-accent-text);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, var(--sb-accent-text) 40%, transparent);
	text-underline-offset: 3px;
	transition: text-decoration-color .2s ease;
}

.sb-prose a:hover {
	text-decoration-color: var(--sb-accent-text);
}

.sb-prose blockquote {
	margin: 1.8em 0;
	padding: 6px 0 6px 24px;
	border-left: 3px solid var(--sb-accent-text);
	font-size: 19px;
	font-style: italic;
}

.sb-prose blockquote p:last-child {
	margin-bottom: 0;
}

.sb-prose ul,
.sb-prose ol {
	padding-left: 1.4em;
}

.sb-prose li {
	margin-bottom: .45em;
}

.sb-prose li::marker {
	color: var(--sb-accent-text);
}

.sb-prose hr {
	margin: 2.4em auto;
	border: 0;
	border-top: 1px solid var(--sb-line);
}

/* Tables become their own horizontal scroll container so wide content
   swipes on mobile instead of being clipped by the page's overflow-x. */
.sb-prose table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	border-collapse: collapse;
	font-size: 15px;
}

.sb-prose th,
.sb-prose td {
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--sb-line);
	min-width: 140px;
}

.sb-prose pre {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.sb-prose th {
	font-weight: 700;
}

.sb-prose iframe {
	max-width: 100%;
	border-radius: var(--sb-radius);
}

.sb-prose .wp-caption {
	max-width: 100%;
}

.sb-pages {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.sb-pages a,
.sb-pages > span:not(:first-child) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	border: 1px solid var(--sb-line);
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
}

/* ---------------------------------------------------- single: tags/share */

.sb-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 36px;
}

.sb-tag {
	padding: 6px 14px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--sb-muted);
	text-decoration: none;
	border: 1px solid var(--sb-line);
	border-radius: 999px;
	transition: color .2s ease, border-color .2s ease;
}

.sb-tag:hover {
	color: var(--sb-accent-text);
	border-color: color-mix(in srgb, var(--sb-accent-text) 45%, transparent);
	text-decoration: none;
}

.sb-share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--sb-line);
}

.sb-share__label {
	margin-right: 4px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--sb-muted);
}

.sb-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: transparent;
	color: inherit;
	border: 1px solid var(--sb-line);
	border-radius: 50%;
	cursor: pointer;
	transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.sb-share__btn svg {
	width: 18px;
	height: 18px;
}

.sb-share__btn:hover {
	color: var(--sb-accent-text);
	border-color: color-mix(in srgb, var(--sb-accent-text) 45%, transparent);
	background: color-mix(in srgb, var(--sb-accent-text) 6%, transparent);
}

.sb-share__toast {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--sb-accent-text);
	opacity: 0;
	transition: opacity .25s ease;
}

.sb-share__toast.is-on {
	opacity: 1;
}

/* ---------------------------------------------------------- single: rail */

.sb-rail {
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-self: start;
	position: sticky;
	top: 110px;
}

.sb-widget {
	padding: 24px;
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
}

.sb-widget__title {
	margin: 0 0 18px;
	font-size: 17px;
}

.sb-mini-list,
.sb-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.sb-mini-list li + li {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--sb-line);
}

.sb-mini {
	display: flex;
	gap: 12px;
	align-items: center;
	color: inherit;
	text-decoration: none;
}

.sb-mini:hover {
	text-decoration: none;
	color: inherit;
}

.sb-mini__media {
	position: relative;
	flex: 0 0 64px;
	height: 52px;
	border-radius: 10px;
	overflow: hidden;
}

.sb-mini__media img,
.sb-mini__media .sb-media-fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sb-mini__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.35;
	transition: color .2s ease;
}

.sb-mini:hover .sb-mini__title {
	color: var(--sb-accent-text);
}

.sb-mini__date {
	display: block;
	margin-top: 3px;
	font-size: 12.5px;
	color: var(--sb-muted);
}

.sb-cat-list li + li {
	border-top: 1px solid var(--sb-line);
}

.sb-cat-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0;
	font-size: 14.5px;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}

.sb-cat-list a:hover {
	color: var(--sb-accent-text);
	text-decoration: none;
}

.sb-cat-list__count {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--sb-muted);
}

.sb-widget--cta {
	border: 0;
	background:
		radial-gradient(90% 140% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%),
		linear-gradient(135deg, var(--sb-primary), color-mix(in srgb, var(--sb-primary) 70%, #10131a));
	color: #ffffff;
}

.sb-widget__cta-title {
	margin: 0 0 8px;
	font-size: 20px;
	color: #ffffff;
}

.sb-widget__cta-text {
	margin: 0 0 18px;
	font-size: 14.5px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .85);
}

/* ------------------------------------------------- single: prev/next/related */

.sb-adjacent {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.sb-adjacent__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px 24px;
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	color: inherit;
	text-decoration: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.sb-adjacent__link:hover {
	color: inherit;
	text-decoration: none;
	border-color: color-mix(in srgb, var(--sb-accent-text) 45%, transparent);
	box-shadow: 0 10px 24px -14px rgba(20, 22, 26, .25);
}

.sb-adjacent__link--next {
	text-align: right;
	grid-column: 2;
}

.sb-adjacent__label {
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sb-accent-text);
}

.sb-adjacent__title {
	font-size: 16.5px;
	font-weight: 600;
	line-height: 1.35;
}

.sb-related {
	padding-top: 48px;
	padding-bottom: 72px;
}

.sb-related__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 30px;
}

.sb-related__title {
	margin: 0;
	font-size: clamp(24px, 3vw, 32px);
}

.sb-related__all {
	flex: 0 0 auto;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--sb-accent-text);
	text-decoration: none;
}

.sb-related__all:hover {
	text-decoration: underline;
	color: var(--sb-accent-text);
}

/* --------------------------------------------------- OEM compliance modes */

/* BMW: no blue text or links anywhere. Text-level accents fall back to the
   body color, and content links are black, bold and underlined. Brand-colored
   SURFACES (buttons, active pill, progress bar, CTA bands) are unaffected —
   they match the blue buttons the platform already renders on BMW sites. */

body.space-blog.sb-oem-bmw {
	--sb-accent-text: currentColor;
}

body.space-blog.sb-oem-bmw .sb-prose a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: currentColor;
}

/* -------------------------------------------------------------- dark mode */

body.dark-mode.space-blog .sb-media-fallback {
	background:
		radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--sb-primary) 22%, transparent), transparent 60%),
		linear-gradient(135deg, color-mix(in srgb, var(--sb-primary) 14%, #191b20), color-mix(in srgb, var(--sb-primary) 5%, #191b20));
}

body.dark-mode.space-blog .sb-badge {
	background: rgba(23, 25, 30, .92);
	color: #f4f5f7;
}

body.dark-mode.space-blog .sb-card__media,
body.dark-mode.space-blog .sb-article__hero {
	box-shadow: 0 14px 32px -12px rgba(0, 0, 0, .5);
}

/* ------------------------------------------------------- reveal animation */

/* .sb-anim is added by space-blog.js only when JS runs and the visitor has
   no reduced-motion preference — markup is fully visible without it. */

.sb-anim .sb-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .55s ease, transform .55s ease;
}

.sb-anim .sb-reveal.sb-in {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {

	.sb-anim .sb-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.sb-card__media img,
	.sb-card__more svg,
	.sb-btn {
		transition: none;
	}

	.sb-card:hover .sb-card__media img {
		transform: none;
	}
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1024px) {

	.sb-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	.sb-article__main {
		max-width: none;
	}

	.sb-rail {
		position: static;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
		align-items: start;
	}
}

@media (max-width: 768px) {

	.sb-hero {
		padding: 36px 0 26px;
	}

	.sb-archive__content {
		padding-top: 28px;
		padding-bottom: 56px;
	}

	.sb-card--featured {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		margin-bottom: 44px;
	}

	.sb-card--featured .sb-card__body {
		padding-top: 18px;
	}

	.sb-grid {
		gap: 34px 22px;
	}

	.sb-article__header {
		padding-top: 32px;
	}

	.sb-article__hero {
		aspect-ratio: 16 / 10;
	}

	.sb-adjacent {
		grid-template-columns: 1fr;
	}

	.sb-adjacent__link--next {
		grid-column: auto;
		text-align: left;
	}

	.sb-cta-band {
		padding: 48px 0;
	}
}

@media (max-width: 560px) {

	.sb-shell {
		padding-left: 18px;
		padding-right: 18px;
	}

	.sb-prose {
		font-size: 16px;
	}

	.sb-crumbs__current {
		max-width: 18ch;
	}
}
