/* Docs theme aligned with the landing page (landing/index.html): same logo blue
   #6ea8ff, same grey scale, dark-first. Light-mode accent is the landing's
   deepened blue: color-mix(#6ea8ff, #0c1c38 44%). */

/* ---------- dark (default) ---------- */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #08090a;            /* --bg */
  --md-default-fg-color: #f7f8f8;            /* --text */
  --md-default-fg-color--light: #9296a0;     /* --muted */
  --md-default-fg-color--lighter: #7f838c;   /* --dim */
  --md-default-fg-color--lightest: #282a30;  /* --hair2 */

  --md-primary-fg-color: #08090a;            /* header blends into the page */
  --md-primary-bg-color: #f7f8f8;
  --md-primary-bg-color--light: #9296a0;

  --md-accent-fg-color: #6ea8ff;             /* --accent-base: hover / focus */
  --md-accent-fg-color--transparent: rgba(110, 168, 255, 0.10);
  --md-typeset-a-color: #6ea8ff;             /* links = logo blue */

  --md-code-bg-color: #131418;               /* --panel2 */
  --md-code-fg-color: #e6e6ea;
  --md-typeset-mark-color: rgba(110, 168, 255, 0.22);

  --md-footer-bg-color: #08090a;
  --md-footer-bg-color--dark: #08090a;
}

/* ---------- light ---------- */
[data-md-color-scheme="default"] {
  --md-default-bg-color: #fafbfc;            /* --bg (light) */
  --md-default-fg-color: #16171a;            /* --text */
  --md-default-fg-color--light: #575c66;     /* --muted */
  --md-default-fg-color--lighter: #696d75;   /* --dim */
  --md-default-fg-color--lightest: #dbdde2;  /* --hair2 */

  --md-primary-fg-color: #fafbfc;            /* light header, hairline below */
  --md-primary-bg-color: #16171a;

  --md-accent-fg-color: color-mix(in srgb, #6ea8ff, #0c1c38 44%);
  --md-accent-fg-color--transparent: rgba(110, 168, 255, 0.14);
  --md-typeset-a-color: color-mix(in srgb, #6ea8ff, #0c1c38 44%);

  --md-code-bg-color: #f1f2f5;               /* --panel2 (light) */
  --md-code-fg-color: #16171a;
  --md-typeset-mark-color: rgba(110, 168, 255, 0.25);

  --md-footer-bg-color: #131418;
  --md-footer-bg-color--dark: #08090a;
}

/* ---------- shared refinements ---------- */

/* Hairline under the header instead of a heavy shadow */
.md-header {
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: none;
}
/* Light header needs dark icons/text (primary is a light color there) */
[data-md-color-scheme="default"] .md-header { color: #16171a; }
[data-md-color-scheme="default"] .md-search__input { background: #f1f2f5; color: #16171a; }
[data-md-color-scheme="default"] .md-search__input::placeholder { color: #696d75; }

/* Rounded surfaces, matching the landing radius scale */
.md-typeset pre > code { border-radius: 10px; }
.md-typeset code { border-radius: 6px; }
.md-search__form { border-radius: 8px; }

/* Links: quiet until hover */
.md-typeset a { text-decoration: none; }
.md-typeset a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Left nav: the site name and section headers (Guides / API Reference) read as
   headings — bigger, bolder, brighter, with breathing room — so they separate
   clearly from the page links beneath them. */
.md-nav--primary > .md-nav__title {
  font-size: 0.82rem;
  padding-bottom: 0.7em;
}
.md-nav--primary .md-nav__item--section {
  margin: 1.7em 0 0.4em;
}
.md-nav--primary .md-nav__item--section > .md-nav__link {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--md-default-fg-color);
  margin-bottom: 0.5em;
}

/* Left nav: current page in accent blue */
.md-nav__link--active, .md-nav__link--active code { color: var(--md-typeset-a-color); }

/* External links injected by js/extra.js get a small tell */
.md-typeset a[target="_blank"]::after {
  content: "\2197";                          /* ↗ */
  font-size: 0.72em;
  margin-left: 0.18em;
  opacity: 0.7;
}

/* ---------- language toggle (landing-style pill) ---------- */
.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 10px; margin: 0 2px;
  border: 1px solid var(--md-default-fg-color--lightest); border-radius: 7px;
  font-size: 12.5px; color: inherit; text-decoration: none;
  transition: border-color .2s ease;
}
.lang-toggle:hover { border-color: var(--md-accent-fg-color); color: var(--md-accent-fg-color); }
/* The drawer nav on mobile repeats the alternate partial; one toggle in the header is enough */
.md-nav .lang-toggle { display: none; }

/* ---------- API reference readability ---------- */
.md-typeset .doc-object { margin-bottom: 1.6em; }
.md-typeset .doc-heading code { background: transparent; padding: 0; }
.md-typeset .doc-signature pre > code { border-left: 3px solid var(--md-accent-fg-color); }
.md-typeset .doc-symbol { border-radius: 5px; }
