/* ---------------------------------------------------------------------------
   Material, retuned to the atlas palette.
   The `.embedded` class is added by embed.js when the page is inside the
   right-hand pane, which strips the chrome the pane does not need.
--------------------------------------------------------------------------- */

:root,
[data-md-color-scheme="slate"] {
  --md-default-bg-color:        #10151e;
  --md-default-bg-color--light: #151b26;
  --md-default-fg-color:        #e8ecf3;
  --md-default-fg-color--light: #a3b0c4;
  --md-default-fg-color--lighter: #6b7a90;
  --md-primary-fg-color:        #10151e;
  --md-accent-fg-color:         #4d9dff;
  --md-typeset-a-color:         #6fb2ff;
  --md-code-bg-color:           #0b0f16;
  --md-code-fg-color:           #cfe0f5;

  --atlas-line: #232c3a;
  --atlas-from: #4d9dff;
  --atlas-to:   #31d69b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-nav__title,
.md-header__title {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  letter-spacing: -0.02em;
}

.md-typeset h1 {
  color: var(--md-default-fg-color);
  font-weight: 600;
  font-size: 1.9rem;
}

.md-typeset h2 {
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: lowercase;
  border-top: 1px solid var(--atlas-line);
  padding-top: 1.1em;
  margin-top: 2em;
}

.md-typeset table:not([class]) {
  border: 1px solid var(--atlas-line);
  font-size: 0.72rem;
}

.md-typeset table:not([class]) th {
  background: #171e2a;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: var(--md-default-fg-color--light);
}

.md-typeset code {
  font-size: 0.85em;
}

/* Called by is blue, Calls is green — the same language as the graph. */
.md-typeset h3#called-by::before,
.md-typeset h3#calls::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.55em;
  vertical-align: middle;
}
.md-typeset h3#called-by::before { background: var(--atlas-from); }
.md-typeset h3#calls::before { background: var(--atlas-to); }

.md-typeset h3#called-by, .md-typeset h3#calls {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.md-typeset .admonition {
  border-radius: 6px;
  border-left-width: 2px;
}

.md-typeset .md-button {
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
}

/* --- inside the right-hand pane ----------------------------------------- */
.embedded .md-header,
.embedded .md-sidebar--primary,
.embedded .md-sidebar--secondary,
.embedded .md-footer,
.embedded .md-content__button {
  display: none !important;
}

.embedded .md-main__inner { margin-top: 0; }
.embedded .md-grid { max-width: none; }
.embedded .md-content { padding: 0.6rem 1.1rem 2rem; }
.embedded .md-typeset h1 { margin-top: 0.4em; }

/* thin scrollbar so the pane does not look like a browser window */
.embedded ::-webkit-scrollbar { width: 9px; height: 9px; }
.embedded ::-webkit-scrollbar-thumb {
  background: #2b3648;
  border-radius: 99px;
}
.embedded ::-webkit-scrollbar-track { background: transparent; }
