.md-classic,
.md-executive,
.md-warm,
.md-dark,
.md-ocean,
.md-forest,
.md-midnight,
.md-lavender,
.md-graphite,
.md-rose {
  --theme-ink: #25221e;
  --theme-muted: #6c665d;
  --theme-heading: #171411;
  --theme-accent: #bd6b35;
  --theme-accent-soft: #f3e2d4;
  --theme-surface: #fffdf8;
  --theme-code: #f1ece4;
  --theme-border: #d8cfc3;
  color: var(--theme-ink);
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.68;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.md-classic {
  --theme-accent: #a9572c;
  --theme-accent-soft: #f1dfd2;
  --theme-surface: #fffdf8;
  --theme-code: #f3eee7;
  --theme-border: #d8cfc3;
}

.md-executive {
  --theme-ink: #263447;
  --theme-muted: #66758a;
  --theme-heading: #142c4c;
  --theme-accent: #267d88;
  --theme-accent-soft: #dceff0;
  --theme-surface: #f5f8fa;
  --theme-code: #e8eef2;
  --theme-border: #c9d5df;
}

.md-warm {
  --theme-ink: #343431;
  --theme-muted: #70695f;
  --theme-heading: #3d3831;
  --theme-accent: #9a684a;
  --theme-accent-soft: #ede7df;
  --theme-surface: #f8f6f1;
  --theme-code: #efebe5;
  --theme-border: #d9d2c7;
}

.md-dark {
  --theme-ink: #e6e9ed;
  --theme-muted: #a4afbc;
  --theme-heading: #ffffff;
  --theme-accent: #f2a65a;
  --theme-accent-soft: #3a2e25;
  --theme-surface: #171d25;
  --theme-code: #0e141b;
  --theme-border: #3b4653;
}

.md-ocean {
  --theme-ink: #263c49;
  --theme-muted: #5e7480;
  --theme-heading: #16394b;
  --theme-accent: #167d9a;
  --theme-accent-soft: #dceef2;
  --theme-surface: #f3f8fa;
  --theme-code: #e7f0f3;
  --theme-border: #c8dce2;
}

.md-forest {
  --theme-ink: #2d3b32;
  --theme-muted: #65756a;
  --theme-heading: #20392a;
  --theme-accent: #4d7859;
  --theme-accent-soft: #e1ece2;
  --theme-surface: #f4f8f3;
  --theme-code: #e9f0e8;
  --theme-border: #cfddce;
}

.md-midnight {
  --theme-ink: #e4e9f2;
  --theme-muted: #a6b2c6;
  --theme-heading: #f4f6fb;
  --theme-accent: #78a9ff;
  --theme-accent-soft: #253858;
  --theme-surface: #151e2e;
  --theme-code: #101827;
  --theme-border: #35445e;
}

.md-lavender {
  --theme-ink: #38364a;
  --theme-muted: #706d84;
  --theme-heading: #302c50;
  --theme-accent: #7162b5;
  --theme-accent-soft: #ece8f7;
  --theme-surface: #f8f6fc;
  --theme-code: #efecf7;
  --theme-border: #d8d2e9;
}

.md-graphite {
  --theme-ink: #353b40;
  --theme-muted: #68737b;
  --theme-heading: #222a30;
  --theme-accent: #596f7d;
  --theme-accent-soft: #e5ebee;
  --theme-surface: #f5f6f6;
  --theme-code: #eaedef;
  --theme-border: #d2d9dc;
}

.md-rose {
  --theme-ink: #493940;
  --theme-muted: #79666f;
  --theme-heading: #452b38;
  --theme-accent: #a95071;
  --theme-accent-soft: #f2e2e8;
  --theme-surface: #fbf6f7;
  --theme-code: #f2eaed;
  --theme-border: #e2d2d9;
}

.preview-body.font-dm-sans { font-family: "DM Sans", sans-serif; }
.preview-body.font-manrope { font-family: "Manrope", sans-serif; }
.preview-body.font-lato { font-family: "Lato", sans-serif; }
.preview-body.font-montserrat { font-family: "Montserrat", sans-serif; }

.theme-classic { background: #fffdf8; }
.theme-executive { background: #f5f8fa; }
.theme-warm { background: #f8f6f1; }
.theme-dark { background: #171d25; }
.theme-ocean { background: #f3f8fa; }
.theme-forest { background: #f4f8f3; }
.theme-midnight { background: #151e2e; }
.theme-lavender { background: #f8f6fc; }
.theme-graphite { background: #f5f6f6; }
.theme-rose { background: #fbf6f7; }

.preview-body h1 {
  border-bottom: 2px solid var(--theme-accent);
  padding-bottom: 0.45rem;
}

.preview-body h1 {
  color: var(--theme-heading);
  font-size: 2rem;
  letter-spacing: -0.025em;
  margin: 0 0 0.7rem;
}

.preview-body h2 {
  color: var(--theme-heading);
  font-size: 1.35rem;
  margin: 1.3rem 0 0.55rem;
}

.preview-body h3 {
  color: var(--theme-heading);
  font-size: 1.12rem;
  margin: 1.1rem 0 0.4rem;
}

.preview-body p,
.preview-body ul,
.preview-body ol,
.preview-body blockquote {
  margin: 0 0 0.85rem;
}

.preview-body a { color: var(--theme-accent); font-weight: 650; }
.preview-body hr { border: 0; border-top: 1px solid var(--theme-border); margin: 1.5rem 0; }
.preview-body li::marker { color: var(--theme-accent); }

.preview-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.6rem 0 1rem;
}

.preview-body pre {
  overflow: auto;
  padding: 0.75rem 0.85rem;
  border-radius: 4px;
  background: var(--theme-code);
  border: 1px solid var(--theme-border);
  font-size: 0.86rem;
}

.preview-body code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88em;
}

.preview-body :not(pre) > code {
  background: var(--theme-code);
  color: var(--theme-heading);
  border: 1px solid var(--theme-border);
  padding: 0.08em 0.32em;
}

.preview-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.preview-body th,
.preview-body td {
  border: 1px solid var(--theme-border);
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.preview-body th { background: var(--theme-accent-soft); color: var(--theme-heading); }

.preview-body blockquote {
  border-left: 4px solid var(--theme-accent);
  background: var(--theme-accent-soft);
  padding-left: 0.75rem;
  opacity: 0.9;
}

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  @page mdx-ppt-landscape {
    size: 304.8mm 171.45mm;
    margin: 0;
  }

  @page mdx-ppt-portrait {
    size: 171.45mm 304.8mm;
    margin: 0;
  }

  body.export-ppt.export-landscape { page: mdx-ppt-landscape; }
  body.export-ppt.export-portrait { page: mdx-ppt-portrait; }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  body * {
    visibility: hidden;
  }

  body.export-pdf #preview-frame,
  body.export-pdf #preview-frame *,
  body.export-ppt #preview-frame,
  body.export-ppt #preview-frame * {
    visibility: visible;
  }

  body.export-pdf .navbar,
  body.export-pdf .toolbar,
  body.export-pdf .pane-editor,
  body.export-pdf .pane-head,
  body.export-pdf .nav-arrow,
  body.export-pdf .present-exit,
  body.export-pdf .present-pos {
    display: none !important;
  }

  body.export-pdf .workspace,
  body.export-pdf .pane-preview,
  body.export-pdf .preview-stage {
    display: block;
    min-height: 0;
    height: auto;
    overflow: visible !important;
    padding: 0;
    margin: 0;
  }

  body.export-pdf #preview-frame {
    position: static;
    display: block;
    width: auto;
    height: auto !important;
    min-height: 0;
    max-height: none;
    border: 0;
    margin: 0;
    padding: 10mm 12mm;
    overflow: visible !important;
    box-shadow: none;
    background: #fff;
  }

  body.export-pdf #preview,
  body.export-pdf .preview-body {
    display: block;
    height: auto !important;
    min-height: 0;
    overflow: visible !important;
  }

  body.export-pdf #preview-frame,
  body.export-ppt #preview-frame,
  body.export-pdf #preview-frame *,
  body.export-ppt #preview-frame * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.export-pdf #preview-frame.theme-classic,
  body.export-ppt #preview-frame.theme-classic {
    background: #fffdf8 !important;
  }

  body.export-pdf #preview-frame.theme-executive,
  body.export-ppt #preview-frame.theme-executive {
    background: #f5f8fa !important;
  }

  body.export-pdf #preview-frame.theme-warm,
  body.export-ppt #preview-frame.theme-warm {
    background: #f8f6f1 !important;
  }

  body.export-pdf #preview-frame.theme-dark,
  body.export-ppt #preview-frame.theme-dark {
    background: #171d25 !important;
  }

  body.export-pdf #preview-frame.theme-ocean,
  body.export-ppt #preview-frame.theme-ocean {
    background: #f3f8fa !important;
  }

  body.export-pdf #preview-frame.theme-forest,
  body.export-ppt #preview-frame.theme-forest {
    background: #f4f8f3 !important;
  }

  body.export-pdf #preview-frame.theme-midnight,
  body.export-ppt #preview-frame.theme-midnight {
    background: #151e2e !important;
  }

  body.export-pdf #preview-frame.theme-lavender,
  body.export-ppt #preview-frame.theme-lavender {
    background: #f8f6fc !important;
  }

  body.export-pdf #preview-frame.theme-graphite,
  body.export-ppt #preview-frame.theme-graphite {
    background: #f5f6f6 !important;
  }

  body.export-pdf #preview-frame.theme-rose,
  body.export-ppt #preview-frame.theme-rose {
    background: #fbf6f7 !important;
  }

  body.export-pdf .preview-body {
    min-height: 0;
  }

  body.export-pdf .preview-body img {
    max-height: 230mm;
    object-fit: contain;
  }

  body.export-pdf .preview-body pre,
  body.export-pdf .preview-body table,
  body.export-pdf .preview-body blockquote {
    break-inside: avoid;
  }

  .slide {
    display: block !important;
    page-break-after: always;
    break-after: page;
    min-height: auto;
  }

  body.export-current .slide:not(.is-active) {
    display: none !important;
  }

  body.export-ppt #preview-frame {
    position: static;
    display: block;
    width: auto;
    height: auto;
    min-height: 0;
    overflow: visible !important;
    border: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  body.export-ppt .navbar,
  body.export-ppt .toolbar,
  body.export-ppt .site-footer,
  body.export-ppt .pane-editor,
  body.export-ppt .pane-head,
  body.export-ppt .nav-arrow,
  body.export-ppt .present-exit,
  body.export-ppt .present-pos {
    display: none !important;
  }

  body.export-ppt .workspace,
  body.export-ppt .pane-preview,
  body.export-ppt .preview-stage {
    display: block;
    width: auto;
    min-height: 0;
    height: auto;
    overflow: visible !important;
    padding: 0;
    margin: 0;
  }

  body.export-ppt .preview-body {
    display: block;
    min-height: 0;
    height: auto;
    overflow: visible !important;
  }

  body.export-ppt .slide {
    box-sizing: border-box;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    padding: 18mm 16mm;
    background: var(--theme-surface);
  }

  body.export-ppt.export-portrait .slide {
    width: 100%;
    aspect-ratio: 9 / 16;
  }

  body.export-ppt.export-landscape .slide {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  body.is-presenting .nav-arrow,
  body.is-presenting .present-exit,
  body.is-presenting .present-pos {
    display: none !important;
  }
}
