/* Shared base styles applied under every preview theme (and custom CSS). */
#wrapper .callout {
  margin: 1em 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-left-width: 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

#wrapper .callout-title,
#wrapper .callout > summary {
  display: block;
  margin: 0;
  padding: 0.55em 0.85em;
  font-weight: 600;
  font-size: 0.95em;
  line-height: 1.35;
  cursor: default;
  background: rgba(0, 0, 0, 0.04);
}

#wrapper .callout > summary {
  cursor: pointer;
  list-style: none;
}

#wrapper .callout > summary::-webkit-details-marker {
  display: none;
}

#wrapper .callout > summary::before {
  content: "▸";
  display: inline-block;
  width: 1em;
  margin-right: 0.35em;
  transition: transform 0.12s ease;
}

#wrapper .callout[open] > summary::before {
  transform: rotate(90deg);
}

#wrapper .callout-content {
  padding: 0.65em 0.85em 0.85em;
}

#wrapper .callout-content > :first-child {
  margin-top: 0;
}

#wrapper .callout-content > :last-child {
  margin-bottom: 0;
}

#wrapper .callout-content > blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#wrapper .callout-note,
#wrapper .callout-info,
#wrapper .callout-todo {
  border-left-color: #3b82f6;
}

#wrapper .callout-note .callout-title,
#wrapper .callout-note > summary,
#wrapper .callout-info .callout-title,
#wrapper .callout-info > summary,
#wrapper .callout-todo .callout-title,
#wrapper .callout-todo > summary {
  color: #1d4ed8;
}

#wrapper .callout-abstract,
#wrapper .callout-tip,
#wrapper .callout-success {
  border-left-color: #10b981;
}

#wrapper .callout-abstract .callout-title,
#wrapper .callout-abstract > summary,
#wrapper .callout-tip .callout-title,
#wrapper .callout-tip > summary,
#wrapper .callout-success .callout-title,
#wrapper .callout-success > summary {
  color: #047857;
}

#wrapper .callout-question,
#wrapper .callout-example {
  border-left-color: #8b5cf6;
}

#wrapper .callout-question .callout-title,
#wrapper .callout-question > summary,
#wrapper .callout-example .callout-title,
#wrapper .callout-example > summary {
  color: #6d28d9;
}

#wrapper .callout-warning,
#wrapper .callout-caution {
  border-left-color: #f59e0b;
}

#wrapper .callout-warning .callout-title,
#wrapper .callout-warning > summary,
#wrapper .callout-caution .callout-title,
#wrapper .callout-caution > summary {
  color: #b45309;
}

#wrapper .callout-danger,
#wrapper .callout-failure,
#wrapper .callout-bug,
#wrapper .callout-error {
  border-left-color: #ef4444;
}

#wrapper .callout-danger .callout-title,
#wrapper .callout-danger > summary,
#wrapper .callout-failure .callout-title,
#wrapper .callout-failure > summary,
#wrapper .callout-bug .callout-title,
#wrapper .callout-bug > summary,
#wrapper .callout-error .callout-title,
#wrapper .callout-error > summary {
  color: #b91c1c;
}

#wrapper .callout-quote {
  border-left-color: #6b7280;
}

#wrapper .callout-quote .callout-title,
#wrapper .callout-quote > summary {
  color: #374151;
  font-style: italic;
}

@media (prefers-color-scheme: dark) {
  #wrapper .callout {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
  }

  #wrapper .callout-title,
  #wrapper .callout > summary {
    background: rgba(255, 255, 255, 0.06);
  }

  #wrapper .callout-note .callout-title,
  #wrapper .callout-note > summary,
  #wrapper .callout-info .callout-title,
  #wrapper .callout-info > summary,
  #wrapper .callout-todo .callout-title,
  #wrapper .callout-todo > summary {
    color: #93c5fd;
  }

  #wrapper .callout-abstract .callout-title,
  #wrapper .callout-abstract > summary,
  #wrapper .callout-tip .callout-title,
  #wrapper .callout-tip > summary,
  #wrapper .callout-success .callout-title,
  #wrapper .callout-success > summary {
    color: #6ee7b7;
  }

  #wrapper .callout-question .callout-title,
  #wrapper .callout-question > summary,
  #wrapper .callout-example .callout-title,
  #wrapper .callout-example > summary {
    color: #c4b5fd;
  }

  #wrapper .callout-warning .callout-title,
  #wrapper .callout-warning > summary,
  #wrapper .callout-caution .callout-title,
  #wrapper .callout-caution > summary {
    color: #fcd34d;
  }

  #wrapper .callout-danger .callout-title,
  #wrapper .callout-danger > summary,
  #wrapper .callout-failure .callout-title,
  #wrapper .callout-failure > summary,
  #wrapper .callout-bug .callout-title,
  #wrapper .callout-bug > summary,
  #wrapper .callout-error .callout-title,
  #wrapper .callout-error > summary {
    color: #fca5a5;
  }

  #wrapper .callout-quote .callout-title,
  #wrapper .callout-quote > summary {
    color: #d1d5db;
  }
}

/* Pandoc / Quarto semantic spans (classes emitted by Apex; styled in Apex standalone CSS). */
#wrapper .smallcaps {
  font-variant: small-caps;
}

#wrapper .underline {
  text-decoration: underline;
}

#wrapper span.mark,
#wrapper .mark {
  background-color: #fff3cd;
  padding: 0.05em 0.15em;
  border-radius: 2px;
}

#wrapper .hidden {
  display: none;
}

@media (prefers-color-scheme: dark) {
  #wrapper span.mark,
  #wrapper .mark {
    background-color: rgba(250, 204, 21, 0.28);
  }
}

/* Front matter (YAML / MMD) display — Hide / Table / Code Block setting. */
#wrapper pre.mk-front-matter,
#wrapper table.mk-front-matter {
  margin: 0 0 1.25em;
  padding: 0.75em 1em;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  box-sizing: border-box;
  max-width: 100%;
}

#wrapper pre.mk-front-matter {
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  line-height: 1.45;
  white-space: pre;
}

#wrapper pre.mk-front-matter code {
  background: transparent;
  padding: 0;
  border: 0;
  font-size: inherit;
}

#wrapper table.mk-front-matter {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

#wrapper table.mk-front-matter th,
#wrapper table.mk-front-matter td {
  padding: 0.35em 0.6em;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#wrapper table.mk-front-matter tr:last-child th,
#wrapper table.mk-front-matter tr:last-child td {
  border-bottom: 0;
}

#wrapper table.mk-front-matter th {
  font-weight: 600;
  white-space: nowrap;
  width: 1%;
  color: inherit;
  opacity: 0.85;
}

#wrapper table.mk-front-matter pre.mk-front-matter-nested {
  margin: 0;
  padding: 0.45em 0.6em;
  background: rgba(0, 0, 0, 0.05);
  border: 0;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-x: auto;
}

#wrapper table.mk-front-matter pre.mk-front-matter-nested code {
  background: transparent;
  padding: 0;
  border: 0;
}

@media (prefers-color-scheme: dark) {
  #wrapper pre.mk-front-matter,
  #wrapper table.mk-front-matter {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
  }

  #wrapper table.mk-front-matter th,
  #wrapper table.mk-front-matter td {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  #wrapper table.mk-front-matter pre.mk-front-matter-nested {
    background: rgba(255, 255, 255, 0.06);
  }
}
