/* ==========================================================================
   AtlasEQ documentation theme — matched to atlas-eq.com's design system.
   Tokens taken verbatim from the site CSS:
     accent  #3b82f6
     text    #ffffff / #a1a1aa / #71717a   (neutral zinc, NOT bluish)
     ink     #0a0b0d #101216 #16181c #1c1f24 #272a30 #383c44
     fonts   Space Grotesk (headings) · Inter (body) · IBM Plex Mono (labels)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --atlas-accent: #3b82f6;
  --atlas-accent-hover: #60a5fa;
  --atlas-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --atlas-display: "Space Grotesk", Inter, sans-serif;

  --atlas-border: #272a30; /* ink-600 */
  --atlas-border-soft: #1c1f24; /* ink-700 */
}

/* ---- Palette mapping (dark scheme) ------------------------------------- */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #000000;
  --md-default-bg-color--light: #0a0b0d; /* ink-900 */
  --md-default-bg-color--lighter: #101216; /* ink-850 */
  --md-default-bg-color--lightest: #16181c; /* ink-800 */

  --md-default-fg-color: #ffffff;
  --md-default-fg-color--light: #a1a1aa; /* zinc-400 */
  --md-default-fg-color--lighter: #71717a; /* zinc-500 */
  --md-default-fg-color--lightest: #52525b; /* zinc-600 */

  --md-primary-fg-color: #000000;
  --md-primary-bg-color: #ffffff;

  --md-accent-fg-color: var(--atlas-accent-hover);
  --md-typeset-a-color: var(--atlas-accent);

  --md-code-bg-color: #101216;
  --md-code-fg-color: #d4d4d8;

  --md-footer-bg-color: #000000;
  --md-footer-bg-color--dark: #050507;
}

/* ---- Type ------------------------------------------------------------- */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: var(--atlas-display);
  letter-spacing: -0.015em;
  color: #ffffff;
}
.md-typeset h1 {
  font-weight: 700;
}
.md-typeset h2 {
  font-weight: 600;
}
.md-typeset {
  color: #a1a1aa; /* body copy = zinc-400, like the site */
}
.md-typeset p,
.md-typeset li {
  color: #a1a1aa;
}

/* ---- Header ----------------------------------------------------------- */
.md-header {
  background-color: #000000;
  border-bottom: 1px solid var(--atlas-border);
  box-shadow: none;
}
.md-header__title {
  font-family: var(--atlas-display);
}
.md-header__button.md-logo img {
  height: 1.5rem;
  width: auto;
}

/* ---- Search ----------------------------------------------------------- */
[data-md-color-scheme="slate"] .md-search__form {
  background-color: #101216;
}
[data-md-color-scheme="slate"] .md-search__form:hover {
  background-color: #16181c;
}

/* ==========================================================================
   Left navigation — the table of contents, styled like the website's
   legal-toc: IBM Plex Mono, each top-level part a bordered container box that
   inverts to white-on-black when active/hovered; items nested inside as plain
   grey mono text. Normal case (the site is NOT uppercase here).
   ========================================================================== */
@media screen and (min-width: 76.25em) {
  /* Give the sidebar breathing room on the right so the boxes never touch the
     rail line, and remove Material's default indent so boxes align left. */
  .md-sidebar--primary {
    padding-right: 1.2rem;
  }
  .md-nav--primary .md-nav__list {
    padding-left: 0;
  }
}

.md-nav--primary {
  font-family: var(--atlas-mono);
}
.md-nav--primary .md-nav__title {
  font-family: var(--atlas-display);
  color: #71717a;
}

/* Top-level parts = bordered container boxes */
[data-md-color-scheme="slate"]
  .md-nav--primary
  > .md-nav__list
  > .md-nav__item
  > .md-nav__link {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: #ffffff;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
[data-md-color-scheme="slate"]
  .md-nav--primary
  > .md-nav__list
  > .md-nav__item
  > .md-nav__link:hover,
[data-md-color-scheme="slate"]
  .md-nav--primary
  > .md-nav__list
  > .md-nav__item
  > .md-nav__link.md-nav__link--active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}
/* Expand chevron pushed to the right edge of the box */
[data-md-color-scheme="slate"]
  .md-nav--primary
  > .md-nav__list
  > .md-nav__item
  > .md-nav__link
  .md-nav__icon {
  margin-left: auto;
}

/* Nested items inside a part = plain indented grey mono text */
[data-md-color-scheme="slate"]
  .md-nav--primary
  .md-nav__item
  .md-nav__list
  .md-nav__link {
  border: none;
  margin: 0;
  padding: 0.3rem 0.65rem 0.3rem 0.9rem;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  color: #a1a1aa;
}
[data-md-color-scheme="slate"]
  .md-nav--primary
  .md-nav__item
  .md-nav__list
  .md-nav__link:hover {
  color: #ffffff;
}
[data-md-color-scheme="slate"]
  .md-nav--primary
  .md-nav__item
  .md-nav__list
  .md-nav__link--active {
  color: var(--atlas-accent);
  background: transparent;
}

/* ---- Right "on this page" TOC ----------------------------------------- */
[data-md-color-scheme="slate"] .md-nav--secondary .md-nav__title {
  font-family: var(--atlas-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #71717a;
}
[data-md-color-scheme="slate"] .md-nav--secondary .md-nav__link {
  color: #71717a;
}
[data-md-color-scheme="slate"] .md-nav--secondary .md-nav__link--active {
  color: var(--atlas-accent);
}

/* ==========================================================================
   Vertical rail line between the navigation and the content — drawn on
   .md-content (full page height) so it spans the entire length, faded only at
   the very top and bottom, like the website's legal-page rail.
   ========================================================================== */
@media screen and (min-width: 76.25em) {
  .md-content {
    position: relative;
  }
  .md-content::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 1.5%,
      rgba(255, 255, 255, 0.1) 98.5%,
      transparent 100%
    );
  }
}

/* ---- Tables ----------------------------------------------------------- */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  background-color: #0a0b0d;
  border: 1px solid var(--atlas-border);
}
[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: #101216;
  color: #ffffff;
  font-family: var(--atlas-display);
}

/* ---- Admonitions / details -------------------------------------------- */
[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  background-color: #0a0b0d;
  border-color: var(--atlas-border);
}

/* ---- Home page cards -------------------------------------------------- */
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li {
  background-color: #0a0b0d;
  border: 1px solid var(--atlas-border);
}
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li:hover {
  border-color: var(--atlas-accent);
}
