/* Markdown Embed — neutral styles that inherit your theme's fonts and colors. */

.tme-markdown {
	overflow-wrap: break-word;
}
.tme-markdown > :first-child {
	margin-top: 0;
}
.tme-markdown h1,
.tme-markdown h2,
.tme-markdown h3,
.tme-markdown h4,
.tme-markdown h5,
.tme-markdown h6 {
	scroll-margin-top: 90px; /* keeps #anchor jumps clear of sticky headers */
}
.tme-markdown img {
	max-width: 100%;
	height: auto;
}

/* Code */
.tme-markdown code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 0.875em;
	background: rgba(127, 127, 127, 0.15);
	padding: 0.15em 0.35em;
	border-radius: 4px;
}
.tme-markdown pre {
	background: rgba(127, 127, 127, 0.1);
	color: inherit;
	padding: 1em 1.25em;
	margin: 1em 0;
	border: 0;
	border-radius: 6px;
	overflow-x: auto;
	line-height: 1.45;
	font-size: 0.875em;
	white-space: pre;
}
.tme-markdown pre code {
	background: none;
	padding: 0;
	font-size: inherit;
	white-space: pre;
}

/* Tables */
.tme-markdown table {
	display: block;
	width: max-content;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	margin: 1em 0;
}
.tme-markdown th,
.tme-markdown td {
	border: 1px solid rgba(127, 127, 127, 0.35);
	padding: 0.4em 0.75em;
}
.tme-markdown th {
	font-weight: 600;
	background: rgba(127, 127, 127, 0.08);
}
.tme-markdown tbody tr:nth-child(even) td {
	background: rgba(127, 127, 127, 0.04);
}

/* Blockquotes (undo the big decorative quotes many themes use) */
.tme-markdown blockquote {
	margin: 1em 0;
	padding: 0 1em;
	border-left: 4px solid rgba(127, 127, 127, 0.4);
	font-size: inherit;
	font-style: normal;
	opacity: 0.85;
}
.tme-markdown blockquote::before,
.tme-markdown blockquote::after {
	content: none;
}

/* Lists */
.tme-markdown li > ul,
.tme-markdown li > ol {
	margin-top: 0.25em;
	margin-bottom: 0.25em;
}
.tme-markdown .task-list-item {
	list-style: none;
}
.tme-markdown .task-list-item-checkbox {
	margin: 0 0.4em 0 -1.4em;
	vertical-align: middle;
}

.tme-markdown hr {
	border: 0;
	border-top: 1px solid rgba(127, 127, 127, 0.3);
	margin: 1.5em 0;
}
.tme-markdown summary {
	cursor: pointer;
}

/* GitHub-style alerts: > [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], [!CAUTION] */
.tme-markdown .tme-alert {
	--tme-alert: #0969da;
	margin: 1em 0;
	padding: 0.5em 1em;
	border-left: 4px solid var(--tme-alert);
	background: color-mix(in srgb, var(--tme-alert) 7%, transparent);
	border-radius: 0 6px 6px 0;
}
.tme-markdown .tme-alert > :last-child {
	margin-bottom: 0;
}
.tme-markdown .tme-alert-title {
	color: var(--tme-alert);
	font-weight: 600;
	margin: 0 0 0.25em;
}
.tme-markdown .tme-alert-tip       { --tme-alert: #1a7f37; }
.tme-markdown .tme-alert-important { --tme-alert: #8250df; }
.tme-markdown .tme-alert-warning   { --tme-alert: #9a6700; }
.tme-markdown .tme-alert-caution   { --tme-alert: #cf222e; }

/* Error box (only shown to logged-in editors) */
.tme-markdown.tme-error {
	border: 1px dashed #cf222e;
	color: #cf222e;
	background: rgba(207, 34, 46, 0.05);
	padding: 0.75em 1em;
	border-radius: 6px;
}
