:root {
  --pst-font-family-heading: Georgia, serif !important;
  --mlv-ink: #17313b;
  --mlv-accent: #0d6e6e;
  --mlv-accent-soft: #dff3ef;
  --mlv-warm: #f2e6d6;
  --mlv-border: rgba(23, 49, 59, 0.14);
}

root,
body,
body p,
h1,
h2,
h3,
h4,
h5,
h6,
.header-style,
.toc-header,
div.cell_output,
.rst-content,
.notebook_app,
.rendered_html {
  font-family: Georgia, serif !important;
}

.bd-article-container,
.bd-content {
  font-family: Georgia, serif !important;
}

.header-article .header-article-main h1,
.header-article .header-article-main h2,
.header-article .header-article-main h3 {
  font-family: Georgia, serif !important;
}

.bd-sidebar {
  font-family: Georgia, serif !important;
}

button.sidebar-toggle.primary-toggle {
  display: none;
}

.mlv-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 1rem;
}

.mlv-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.75rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--mlv-border);
  text-decoration: none !important;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.mlv-card-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(23, 49, 59, 0.12);
  text-decoration: none !important;
}

.mlv-card-action.primary {
  background: linear-gradient(135deg, #0d6e6e, #12827e);
  color: #fff !important;
  border-color: transparent;
}

.mlv-card-action.secondary {
  background: #fffaf4;
  color: var(--mlv-ink) !important;
}

.mlv-stage {
  margin: 1.2rem 0 1.6rem;
  padding: 1.6rem;
  border: 1px solid var(--mlv-border);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(13, 110, 110, 0.14), transparent 34%),
    radial-gradient(circle at bottom right, rgba(201, 141, 49, 0.14), transparent 28%),
    linear-gradient(180deg, #fffef9, #f6efe1);
  box-shadow: 0 28px 70px rgba(23, 49, 59, 0.08);
}

.mlv-stage-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: rgba(13, 110, 110, 0.08);
  color: var(--mlv-accent);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mlv-stage-title {
  margin: 0 0 0.7rem;
  max-width: 12ch;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 0.98;
  color: var(--mlv-ink);
}

.mlv-stage-lead {
  margin: 0;
  max-width: 72ch;
  font-size: 1.08rem;
  line-height: 1.75;
  color: rgba(23, 49, 59, 0.9);
}

.mlv-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.mlv-stage-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.3rem;
}

.mlv-stage-metric {
  padding: 1rem 1rem 0.9rem;
  border-radius: 22px;
  border: 1px solid var(--mlv-border);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
}

.mlv-stage-metric strong {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--mlv-ink);
}

.mlv-stage-metric span {
  display: block;
  line-height: 1.55;
  color: rgba(23, 49, 59, 0.82);
}

.mlv-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
  margin: 0 0 1.8rem;
}

.mlv-path-card {
  display: block;
  padding: 1.05rem 1.1rem;
  border-radius: 22px;
  border: 1px solid var(--mlv-border);
  background: linear-gradient(180deg, #fffefb, #f8f2e7);
  color: var(--mlv-ink) !important;
  text-decoration: none !important;
  box-shadow: 0 14px 32px rgba(23, 49, 59, 0.05);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.mlv-path-card:hover {
  transform: translateY(-2px);
  border-color: rgba(13, 110, 110, 0.18);
  box-shadow: 0 18px 38px rgba(23, 49, 59, 0.09);
  text-decoration: none !important;
}

.mlv-path-card strong {
  display: block;
  margin-bottom: 0.38rem;
  font-size: 1.06rem;
  color: var(--mlv-ink);
}

.mlv-path-card span {
  display: block;
  line-height: 1.6;
  color: rgba(23, 49, 59, 0.84);
}

.mlv-demo-frame {
  width: 100%;
  min-height: 760px;
  height: clamp(760px, 88vh, 1120px);
  border: 1px solid var(--mlv-border);
  border-radius: 24px;
  background: linear-gradient(180deg, #fffdf8, #f7f3eb);
  box-shadow: 0 22px 60px rgba(23, 49, 59, 0.08);
}

.mlv-demo-hero {
  margin: 0 0 1rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--mlv-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(13, 110, 110, 0.12), transparent 36%),
    linear-gradient(180deg, #fffef9, #f7f0e3);
  box-shadow: 0 12px 30px rgba(23, 49, 59, 0.05);
}

.mlv-demo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(13, 110, 110, 0.08);
  color: var(--mlv-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mlv-demo-lead {
  margin: 0;
  max-width: 72ch;
  line-height: 1.7;
  font-size: 1.03rem;
  color: var(--mlv-ink);
}

.mlv-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.2rem;
}

.mlv-demo-panel {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--mlv-border);
  background: linear-gradient(180deg, #fffefb, #f8f1e7);
  box-shadow: 0 10px 24px rgba(23, 49, 59, 0.04);
}

.mlv-demo-panel strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--mlv-ink);
}

.mlv-demo-panel span {
  display: block;
  line-height: 1.6;
  color: rgba(23, 49, 59, 0.86);
}

.mlv-demo-note {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--mlv-border);
  background: linear-gradient(180deg, #fffdf7, #f8f1e5);
  color: var(--mlv-ink);
}

.mlv-demo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.2rem;
}

.mlv-demo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.68rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--mlv-border);
  background: #fff;
  color: var(--mlv-ink) !important;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.mlv-demo-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(23, 49, 59, 0.1);
  text-decoration: none !important;
}

.mlv-demo-link.active {
  background: var(--mlv-accent-soft);
  border-color: rgba(13, 110, 110, 0.22);
}

.mlv-demo-link.secondary {
  background: #fbf7ef;
}

@media (max-width: 900px) {
  .mlv-stage-metrics,
  .mlv-demo-grid {
    grid-template-columns: 1fr;
  }

  .mlv-path-grid {
    grid-template-columns: 1fr;
  }

  .mlv-demo-frame {
    min-height: 640px;
    height: 76vh;
  }
}

@media (max-width: 640px) {
  .mlv-demo-hero {
    padding: 1rem;
    border-radius: 18px;
  }

  .mlv-demo-frame {
    min-height: 560px;
    height: 72vh;
    border-radius: 18px;
  }

  .mlv-demo-links {
    gap: 0.6rem;
  }

  .mlv-demo-link {
    width: 100%;
  }

  .mlv-stage {
    padding: 1.15rem;
    border-radius: 22px;
  }

  .mlv-stage-title {
    max-width: none;
  }
}
