/* ── Brand colors ── */
:root {
  --md-primary-fg-color: #00ABB3;
  --md-primary-fg-color--light: #33bcc3;
  --md-primary-fg-color--dark: #008a91;
  --md-accent-fg-color: #00ABB3;
  --md-accent-fg-color--transparent: rgba(0, 171, 179, 0.1);
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #00ABB3;
  --md-primary-fg-color--light: #33bcc3;
  --md-primary-fg-color--dark: #008a91;
  --md-accent-fg-color: #00ABB3;
  --md-accent-fg-color--transparent: rgba(0, 171, 179, 0.1);
  --md-default-bg-color: #000000;
  --md-default-bg-color--light: #111111;
  --md-default-bg-color--lighter: #1a1a1a;
}

/* ── Typography tweaks ── */
.md-typeset {
  font-size: 0.82rem;
  line-height: 1.7;
}

.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.8em;
}

.md-typeset h2 {
  font-weight: 600;
  margin-top: 2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset h3 {
  font-weight: 600;
  margin-top: 1.5em;
}

/* ── Tables ── */
.md-typeset table:not([class]) {
  font-size: 0.78rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  overflow: hidden;
  display: table;
  width: 100%;
}

.md-typeset table:not([class]) thead {
  background: var(--md-accent-fg-color--transparent);
}

.md-typeset table:not([class]) th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.7em 1em;
  white-space: nowrap;
}

.md-typeset table:not([class]) td {
  padding: 0.55em 1em;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset table:not([class]) tbody tr:hover {
  background: var(--md-accent-fg-color--transparent);
}

/* ── Code styling ── */
.md-typeset code {
  font-size: 0.82em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--md-code-bg-color);
}

/* ── Header ── */
.md-header {
  backdrop-filter: blur(10px);
}

/* ── Sidebar ── */
.md-sidebar--primary .md-nav__item--active > .md-nav__link {
  font-weight: 600;
  color: var(--md-accent-fg-color);
}

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

/* ── Content max-width for readability on wide screens ── */
.md-content__inner {
  max-width: 960px;
}

/* ── Smooth page transitions ── */
.md-content {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--md-default-fg-color--lighter);
  border-radius: 3px;
}

/* ── Footer ── */
.md-footer {
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

/* ── Images ── */
.md-typeset img {
  border-radius: 8px;
  margin: 1em auto;
  display: block;
  max-width: 80%;
}

/* ── Permalink anchors ── */
.md-typeset .headerlink {
  opacity: 0;
  transition: opacity 0.15s;
}

.md-typeset h2:hover .headerlink,
.md-typeset h3:hover .headerlink {
  opacity: 0.5;
}
