/* ─── Color tokens ─────────────────────────────────────────── */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #050d1a;
  --md-primary-bg-color: #d9e2ec;
  --md-accent-fg-color: #00e5ff;

  /* Typography in dark mode */
  --md-default-fg-color: #e2ecf4;
  --md-default-fg-color--light: #b8c7d8;
  --md-default-fg-color--lighter: #829ab1;
  --md-default-bg-color: #050d1a;
  --md-typeset-color: #e2ecf4;

  --vault-cyan: #00e5ff;
  --vault-heading: #f0f4f8;
  --vault-heading-accent: #7dd5e0;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #102a43;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #0097a7;

  --vault-cyan: #0097a7;
  --vault-heading: #102a43;
  --vault-heading-accent: #006d75;
}

/* ─── Header ───────────────────────────────────────────────── */
.md-header {
  background: linear-gradient(135deg, #050d1a 0%, #15304a 100%);
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

/* Hide site_name text — logo SVG already says "SIP VAULT" */
.md-header__title .md-header__topic:first-child .md-ellipsis {
  display: none;
}

.md-header__title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Logo sizing */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.6rem;
  width: auto;
}

/* ─── Navigation / tabs ────────────────────────────────────── */
.md-tabs {
  background: #0d2137;
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.md-tabs__link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  opacity: 1;
  color: var(--vault-cyan) !important;
}

/* ─── Content headings ─────────────────────────────────────── */
.md-typeset h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--vault-heading);
  border-bottom: 2px solid var(--vault-cyan);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.2rem;
  margin-top: 2rem;
  color: var(--vault-heading);
}

.md-typeset h3 {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vault-heading-accent);
  margin-top: 1.5rem;
}

/* ─── Code blocks ──────────────────────────────────────────── */
.md-typeset code {
  font-size: 0.82em;
  border-radius: 4px;
}

.md-typeset pre > code {
  font-size: 0.82rem;
}

[data-md-color-scheme="slate"] .md-typeset code {
  background-color: #15304a;
  color: #e2ecf4;
}

[data-md-color-scheme="slate"] .highlight pre {
  background-color: #030811 !important;
  border: 1px solid rgba(58, 90, 125, 0.4);
}

/* ─── Admonitions ──────────────────────────────────────────── */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 8px;
  border-left-width: 3px;
}

/* ─── Tables ───────────────────────────────────────────────── */
.md-typeset table:not([class]) {
  font-size: 0.85rem;
  border-radius: 6px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 229, 255, 0.08);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  background-color: #0a1929;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: rgba(0, 229, 255, 0.1);
  color: #f0f4f8;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) td {
  border-top: 1px solid rgba(58, 90, 125, 0.3);
}

/* ─── Sidebar ──────────────────────────────────────────────── */
.md-nav__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vault-heading-accent);
  padding: 0.6rem 0.8rem 0.3rem;
  opacity: 0.9;
}

.md-nav__link {
  font-size: 0.82rem;
}

.md-nav__link--active {
  color: var(--vault-cyan) !important;
  font-weight: 600;
}

/* ─── Links (dark mode) ────────────────────────────────────── */
/* Body prose links: bright cyan with underline so they're unambiguously links */
[data-md-color-scheme="slate"] .md-typeset a {
  color: #4df0ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: rgba(77, 240, 255, 0.4);
  transition: color 0.15s, text-decoration-color 0.15s;
}

[data-md-color-scheme="slate"] .md-typeset a:hover,
[data-md-color-scheme="slate"] .md-typeset a:focus {
  color: #a6f5ff;
  text-decoration-color: #a6f5ff;
}

/* Visited links — don't fade, just shift hue slightly */
[data-md-color-scheme="slate"] .md-typeset a:visited {
  color: #4df0ff;
}

/* Nav sidebar links */
[data-md-color-scheme="slate"] .md-nav__link {
  color: #cdd9e5;
}

[data-md-color-scheme="slate"] .md-nav__link:hover,
[data-md-color-scheme="slate"] .md-nav__link:focus {
  color: #4df0ff !important;
}

[data-md-color-scheme="slate"] .md-nav__link--active,
[data-md-color-scheme="slate"] .md-nav__link--active:hover {
  color: #4df0ff !important;
  font-weight: 600;
}

/* Table cell links — keep same treatment */
[data-md-color-scheme="slate"] .md-typeset table a {
  color: #4df0ff;
}

/* Header links (top-bar links e.g. language switcher items) */
[data-md-color-scheme="slate"] .md-header a {
  color: #f0f4f8;
}

[data-md-color-scheme="slate"] .md-select__list a,
[data-md-color-scheme="slate"] .md-select__inner a {
  color: #e2ecf4;
}

/* Footer links */
[data-md-color-scheme="slate"] .md-footer a {
  color: #b8c7d8;
}

[data-md-color-scheme="slate"] .md-footer a:hover {
  color: #4df0ff;
}

/* Anchor links next to headings (the "#" pilcrow-style) */
[data-md-color-scheme="slate"] .md-typeset .headerlink {
  color: #486581;
  text-decoration: none;
}

[data-md-color-scheme="slate"] .md-typeset :hover > .headerlink,
[data-md-color-scheme="slate"] .md-typeset .headerlink:focus,
[data-md-color-scheme="slate"] .md-typeset .headerlink:hover {
  color: #4df0ff;
}

/* Light mode: ensure links are clear too */
[data-md-color-scheme="default"] .md-typeset a {
  color: #0097a7;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0, 151, 167, 0.4);
}

[data-md-color-scheme="default"] .md-typeset a:hover {
  color: #006d75;
  text-decoration-color: #006d75;
}

/* ─── Body text depth in dark mode ─────────────────────────── */
[data-md-color-scheme="slate"] {
  background-color: #050d1a;
}

[data-md-color-scheme="slate"] .md-main__inner {
  background-color: transparent;
}

/* ─── Footer ───────────────────────────────────────────────── */
.md-footer {
  background: #030811;
  border-top: 1px solid rgba(0, 229, 255, 0.1);
}
