:root {
  --bmw-navy: #0b315d;
  --bmw-navy-deep: #081f3a;
  --bmw-orange: #ff6b00;
  --bmw-orange-dark: #e85f00;
  --bmw-blue: #168bd2;
  --bmw-blue-soft: #eff8ff;
  --bmw-text: #0f172a;
  --bmw-text-2: #334155;
  --bmw-muted: #64748b;
  --bmw-bg: #f8fafc;
  --bmw-white: #ffffff;
  --bmw-border: #e2e8f0;
  --bmw-border-strong: #cbd5e1;
  --bmw-success: #16a34a;
  --bmw-warning: #f59e0b;
  --bmw-danger: #dc2626;
  --bmw-radius-sm: 8px;
  --bmw-radius-md: 12px;
  --bmw-radius-lg: 16px;
  --bmw-radius-xl: 24px;
  --bmw-shadow-sm: 0 4px 18px rgba(15, 23, 42, 0.06);
  --bmw-shadow-md: 0 14px 40px rgba(15, 23, 42, 0.1);
  --bmw-container: 1200px;
  --bmw-reading: 820px;
  --bmw-header-height: 76px;
  --bmw-focus: 0 0 0 4px rgba(22, 139, 210, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--bmw-text-2);
  background: var(--bmw-white);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--bmw-text);
  font-family: Manrope, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.45rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.35rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { margin-top: 0; }

a { color: var(--bmw-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bmw-navy); }
button, input, select, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--bmw-blue);
  outline-offset: 3px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.bmw-skip-link {
  position: fixed;
  z-index: 99999;
  left: 16px;
  top: 12px;
  transform: translateY(-160%);
  background: var(--bmw-navy);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
}
.bmw-skip-link:focus { transform: translateY(0); }

.bmw-container {
  width: min(calc(100% - 40px), var(--bmw-container));
  margin-inline: auto;
}

.bmw-reading-container {
  width: min(calc(100% - 40px), var(--bmw-reading));
  margin-inline: auto;
}

.bmw-main { min-height: 50vh; }

.bmw-content-shell {
  padding: 46px 0 80px;
}

.bmw-entry-header {
  margin-bottom: 30px;
}

.bmw-entry-title {
  margin-bottom: 14px;
}

.bmw-entry-kicker,
.bmw-card-eyebrow {
  margin: 0 0 10px;
  color: var(--bmw-orange);
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bmw-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--bmw-muted);
  font-size: 0.92rem;
}

.bmw-featured-image {
  margin: 0 0 34px;
  overflow: hidden;
  border-radius: var(--bmw-radius-xl);
  background: var(--bmw-bg);
}

.bmw-prose > * + * { margin-top: 1.25em; }
.bmw-prose h2 { margin-top: 2.1em; }
.bmw-prose h3 { margin-top: 1.65em; }
.bmw-prose ul, .bmw-prose ol { padding-left: 1.3em; }
.bmw-prose blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--bmw-blue);
  background: var(--bmw-bg);
  border-radius: 0 var(--bmw-radius-md) var(--bmw-radius-md) 0;
}

.bmw-breadcrumbs {
  margin-bottom: 22px;
  color: var(--bmw-muted);
  font-size: 0.87rem;
}
.bmw-breadcrumbs a { color: var(--bmw-muted); text-decoration: none; }
.bmw-breadcrumbs a:hover { color: var(--bmw-navy); }
.bmw-breadcrumbs .rank-math-breadcrumb p { margin: 0; }
.bmw-breadcrumb-separator { display: inline-block; margin: 0 7px; }

.bmw-wordmark,
.bmw-footer-brand .bmw-wordmark {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  font-family: Manrope, Inter, sans-serif;
  font-size: 1.46rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.045em;
}
.bmw-wordmark-build { color: var(--bmw-orange); }
.bmw-wordmark-math { color: var(--bmw-blue); }
.bmw-wordmark-works { color: var(--bmw-navy); }

.custom-logo-link { display: inline-flex; align-items: center; text-decoration: none; }
.custom-logo { width: auto; max-height: 50px; }

.bmw-empty-state-section { padding: 100px 0; background: var(--bmw-bg); }
.bmw-empty-state { max-width: 720px; text-align: center; }
.bmw-empty-state h1 { margin-bottom: 14px; }
.bmw-empty-state p:not(.bmw-entry-kicker) { max-width: 620px; margin-inline: auto; color: var(--bmw-muted); }

/* v1.1: suppress Astra/demo UI that can leak through parent-theme settings. */
#ast-scroll-top,
.ast-scroll-to-top-right,
.ast-scroll-to-top-left,
.ast-scroll-top-icon,
.ast-builder-layout-element[data-section="section-header-mobile-trigger"] {
  display: none !important;
}

/* Keep the child-theme wordmark readable in both light header and dark footer. */
.bmw-wordmark {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  font-family: var(--bmw-font-heading, "Manrope", "Inter", system-ui, sans-serif);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none !important;
  line-height: 1;
}
.bmw-wordmark-build { color: var(--bmw-orange); }
.bmw-wordmark-math { color: var(--bmw-blue); }
.bmw-wordmark-works { color: var(--bmw-navy); }
.bmw-site-header .bmw-wordmark { font-size: clamp(1.35rem, 2vw, 1.72rem); }
.bmw-site-footer .bmw-wordmark { font-size: 1.62rem; }
.bmw-site-footer .bmw-wordmark-works { color: #ffffff; }

/* v1.3 branded image logo system. */
.bmw-brand-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  text-decoration: none !important;
}
.bmw-brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.bmw-brand-logo-header {
  height: 42px;
  max-width: 285px;
}
.bmw-brand-logo-footer {
  width: min(100%, 305px);
  height: auto;
}
