/* --- true-black dark mode tweaks --- */

header.md-header {
	position : relative !important;
	border-radius: 5px;
}

/* section lines */

h2.doc-heading {
    border-top: 1px solid;
    padding-top: 0.5em;
}

/* style fixes */

code {
    border-radius: 10px !important;
}

.md-typeset :is(h1, h2, h3, h4, h5, h6) ,
.md-typeset :is(h1, h2, h3, h4, h5, h6) .highlight .n:first-child
{
  --md-typeset-heading-color: cornflowerblue;
  color: goldenrod;
}

/* add space before function paren */
.md-typeset :is(h1, h2, h3, h4, h5, h6) .highlight .n:first-child::after

{
	content : " ";
}

/* remove boxes */
.md-typeset details:not([open])
{
	width : fit-content ;
    border: none;
	border-radius : 10px ;
}

details.quote ,
details.quote summary
{
    border: none !important;
}

/* inline signature wraps with a gentle hanging indent */
/*
.md-typeset h2 > code, .md-typeset h3 > code
{ white-space: normal; text-indent: -1.5ch; padding-left: 1.5ch; }
*/

/* ------------- fix spacing bullshit ----------------- */

/* 1) Headings feel attached to the content that follows */

.md-typeset :is(h1, h2, h3, h4, h5, h6)
{
  margin-top: 0.8em;
  margin-bottom: 0.4em;
}

/* 2) First heading on a page/section shouldn’t push down */

.md-typeset > :is(h1,h2,h3,h4,h5,h6):first-child {
  margin-top: 0;
}

.md-main__inner {
  margin-top: 0;
}

/* 3) Tighten body copy a touch so the whole page breathes evenly */

.md-typeset p {
  margin: 0 0 0.6em;
}

/* 4) Lists usually want less above, a bit below */

.md-typeset :is(ul,ol) {
  margin-top: 0.35em;
  margin-bottom: 0.6em;
}

/* 5) Code blocks & blockquotes often need trimming too */

.md-typeset pre,
.md-typeset blockquote {
  margin-top: 0.5em;
  margin-bottom: 0.6em;
}

/* base page background */
[data-md-color-scheme="slate"] {
  --XXXmd-default-bg-color: #000;
  --XXXmd-primary-bg-color: #000;
  --md-code-bg-color: #222;
  --md-default-fg-color: #ccc;
}

/* lighter gray panels / highlights */
[data-md-color-scheme="slate"] .md-nav,
[data-md-color-scheme="slate"] .md-search,
[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-footer {
    background-color: midnightblue;
    color: #ccc;
}

/* optional: adjust link & accent color */
[data-md-color-scheme="slate"] a,
[data-md-color-scheme="slate"] .md-typeset a {
  color: #6cf;
}

/* ------------------------------------------------------ */

/* preserve whitespace but keep normal prose styling */
pre.whitespace-pre-wrap {
  white-space: pre-wrap;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 0.6em 0;  /* tweak rhythm to taste */
}

.md-typeset pre>code {
    font-family: sans-serif;
    text-wrap: wrap;
}

/* small inline images */

img.example-small {
    height: 4em;
    display: block;
    margin: 1em 0;
}
