:root {
  --mxl-radius-lg: 28px;
  --mxl-shadow-soft: 0 26px 60px -30px rgba(13, 42, 78, 0.65);
  --mxl-shadow-card: 0 12px 32px -24px rgba(13, 66, 120, 0.55);
  --mxl-border-rgb: 14, 72, 129;
  --mxl-code-font: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --mxl-body-font: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mxl-surface: rgba(255, 255, 255, 0.92);
  --mxl-surface-subtle: rgba(255, 255, 255, 0.75);
  --mxl-hero-gradient: radial-gradient(circle at 12% 20%, rgba(13, 110, 253, 0.25), transparent 60%),
    radial-gradient(circle at 82% 12%, rgba(41, 196, 255, 0.35), transparent 55%),
    linear-gradient(135deg, #0d47a1 0%, #4dabf5 60%, #7ad0ff 100%);
  --mxl-card-border: rgba(var(--mxl-border-rgb), 0.12);
  --mxl-text-muted: #31415f;
  --mxl-pill-bg: rgba(13, 110, 253, 0.12);
}

body {
  font-family: var(--mxl-body-font);
}

body[data-theme="light"],
body[data-theme="auto"][data-default-mode="light"] {
  --mxl-surface: rgba(255, 255, 255, 0.92);
  --mxl-surface-subtle: rgba(255, 255, 255, 0.75);
  --mxl-hero-gradient: radial-gradient(circle at 12% 20%, rgba(13, 110, 253, 0.25), transparent 60%),
    radial-gradient(circle at 82% 12%, rgba(41, 196, 255, 0.35), transparent 55%),
    linear-gradient(135deg, #0d47a1 0%, #4dabf5 60%, #7ad0ff 100%);
  --mxl-card-border: rgba(var(--mxl-border-rgb), 0.12);
  --mxl-text-muted: #31415f;
  --mxl-pill-bg: rgba(13, 110, 253, 0.12);
}

body[data-theme="dark"],
body[data-theme="auto"][data-default-mode="dark"] {
  --mxl-surface: rgba(15, 24, 40, 0.94);
  --mxl-surface-subtle: rgba(15, 24, 40, 0.75);
  --mxl-hero-gradient: radial-gradient(circle at 18% 18%, rgba(102, 199, 255, 0.25), transparent 65%),
    radial-gradient(circle at 70% 12%, rgba(108, 201, 255, 0.3), transparent 55%),
    linear-gradient(135deg, #061024 0%, #112c4f 55%, #0c4f7f 100%);
  --mxl-card-border: rgba(132, 198, 255, 0.08);
  --mxl-text-muted: #b3c7df;
  --mxl-pill-bg: rgba(102, 199, 255, 0.18);
}

/* --- Hero block on the landing page --- */
.mxl-hero {
  position: relative;
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
  padding: clamp(2.4rem, 5vw, 4.2rem) clamp(2rem, 6vw, 6rem);
  min-height: 100vh;
  border-radius: 0;
  background: var(--mxl-hero-gradient);
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.mxl-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 40%);
  mix-blend-mode: screen;
  opacity: 0.6;
}

.mxl-hero > * {
  position: relative;
  z-index: 2;
}

.mxl-hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(1.1rem, 2vw, 2rem);
  width: min(760px, 90vw);
}

.mxl-hero__badge {
  position: absolute;
  top: clamp(2.4rem, 5vw, 4.2rem);
  left: clamp(2rem, 6vw, 6rem);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  z-index: 3;
}

.mxl-hero__title {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  line-height: 1.05;
  margin: 0;
  font-weight: 700;
}

.mxl-hero__lead {
  font-size: clamp(0.95rem, 1.05vw, 1.05rem);
  max-width: min(680px, 90vw);
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.mxl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.1rem, 2.2vw, 1.8rem);
  margin-top: clamp(1.2rem, 2.4vw, 2.2rem);
  margin-bottom: clamp(-0.6rem, -1vw, -0.3rem);
  justify-content: center;
}

.mxl-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.mxl-button--primary {
  background: rgba(255, 255, 255, 0.92);
  color: #0d2a4d;
  box-shadow: 0 12px 24px -14px rgba(5, 22, 51, 0.65);
}

.mxl-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -18px rgba(5, 22, 51, 0.7);
}

.mxl-button--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mxl-button--ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.mxl-button--secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 10px 20px -18px rgba(5, 22, 51, 0.65);
}

.mxl-button--secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 24px -18px rgba(5, 22, 51, 0.7);
}

.mxl-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  padding: 1.1rem 1.3rem;
  border-radius: 24px;
  background: rgba(6, 21, 40, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  width: min(640px, 90vw);
  margin: 0;
}

.mxl-hero__stats dt {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 0.25rem;
}

.mxl-hero__stats dd {
  font-size: 0.95rem;
  margin: 0;
  font-weight: 600;
}

@media (max-width: 720px) {
  .mxl-hero {
    padding: 2.8rem 1.8rem;
    min-height: 100vh;
  }

  .mxl-hero__content {
    width: 100%;
    gap: 1.4rem;
  }

  .mxl-hero__lead {
    max-width: 100%;
  }

  .mxl-hero__badge {
    top: 1.6rem;
    left: 1.4rem;
  }

  .mxl-hero__actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.3rem;
    margin-bottom: 3.5rem;
  }
}

@media (max-width: 540px) {
  .mxl-hero {
    padding-top: 3.2rem;
    gap: 0.85rem;
  }

  .mxl-hero__badge {
    position: static;
    align-self: center;
    margin-bottom: 0.3rem;
    text-align: center;
    max-width: calc(100% - 1.2rem);
    white-space: normal;
  }
}

/* --- Card surfaces and typography tweaks --- */
.content h1,
.content h2,
.content h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.content p {
  font-size: 1.02rem;
  color: var(--mxl-text-muted);
}

.content .admonition,
.content .note,
.content .tip,
.content .warning,
.content .important {
  border-radius: 18px;
  border-left: 6px solid var(--color-brand-primary);
  box-shadow: var(--mxl-shadow-card);
  overflow: hidden;
  background: var(--mxl-surface);
}

.content .admonition > p:first-of-type,
.content .admonition-title {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.content .highlight,
.content pre {
  border-radius: 18px;
  background: var(--mxl-surface);
  border: 1px solid var(--mxl-card-border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), var(--mxl-shadow-card);
  font-family: var(--mxl-code-font);
  font-size: 0.95rem;
}

.content code.literal {
  font-family: var(--mxl-code-font);
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
  background: var(--mxl-surface-subtle);
  border: 1px solid rgba(var(--mxl-border-rgb), 0.1);
}

.content table.docutils {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--mxl-card-border);
  box-shadow: var(--mxl-shadow-card);
}

.content table.docutils thead {
  background: rgba(18, 100, 163, 0.08);
}

.content table.docutils td,
.content table.docutils th {
  padding: 0.75rem 1rem;
}

.content blockquote {
  border-left: 4px solid var(--color-brand-primary);
  background: var(--mxl-surface);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  box-shadow: var(--mxl-shadow-card);
  color: var(--mxl-text-muted);
}

/* --- Sidebar tweaks --- */
.sidebar {
  background: var(--color-sidebar-background);
}

.sidebar .sidebar-brand-text {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar nav a.current {
  background: rgba(18, 100, 163, 0.12);
  border-radius: 12px;
}

/* --- Inline badges and lists --- */
.mxl-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--mxl-pill-bg);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.content ul {
  padding-left: 1.3rem;
}

.content ul > li::marker {
  color: var(--color-brand-primary);
}

/* --- Footer polish --- */
.footer {
  border-top: 1px solid var(--mxl-card-border);
  padding-top: 2rem;
  margin-top: 3rem;
}

/* --- Landing page layout overrides --- */
body.mxl-landing {
  overflow-x: hidden;
}

body.mxl-landing .sidebar-drawer,
body.mxl-landing .sidebar-toggle,
body.mxl-landing .sidebar-overlay,
body.mxl-landing .toc-overlay,
body.mxl-landing .mobile-header,
body.mxl-landing .content-icon-container,
body.mxl-landing .back-to-top,
body.mxl-landing .related-pages,
body.mxl-landing footer,
body.mxl-landing .theme-toggle-container,
body.mxl-landing .skip-to-content {
  display: none !important;
}

body.mxl-landing .page {
  margin: 0;
  max-width: none;
  width: 100%;
}

body.mxl-landing .main {
  margin: 0;
  max-width: none;
  width: 100%;
  margin-left: 0;
}

body.mxl-landing main {
  padding-top: 0;
}

body.mxl-landing .main > .content {
  padding: 0;
  margin: 0;
  max-width: none;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

body.mxl-landing .main > .content > .article-container,
body.mxl-landing .main > .content > .article-container > article {
  padding: 0;
  margin: 0;
  max-width: none;
  width: 100%;
}
