/* ─── Typography ─────────────────────────────────────────────────── */
:root {
    --font-size-base: 16px;
    --line-height-base: 1.65;
    --content-max-width: 900px;
    --color-brand: #9558B2;
    --color-brand-light: #f8f4fc;
}

body {
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
}

/* ─── Sidebar ────────────────────────────────────────────────────── */
nav.docs-sidebar {
    font-size: 0.88rem;
}

nav.docs-sidebar .docs-brand {
    padding: 1.2rem 1rem 0.8rem;
}

nav.docs-sidebar .docs-brand a {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Active link highlight */
nav.docs-sidebar a.is-active,
nav.docs-sidebar a:is(.is-active) {
    font-weight: 600;
}

/* ─── Main content area ──────────────────────────────────────────── */
article.content {
    max-width: var(--content-max-width);
    font-size: 1rem;
}

/* Headings */
article.content h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-top: 0;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e8e8e8;
}

article.content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-top: 2.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #eee;
}

article.content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 2rem;
    color: #333;
}

article.content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
}

/* ─── Code blocks ────────────────────────────────────────────────── */
pre {
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.55;
    padding: 1rem 1.2rem;
    overflow-x: auto;
}

code {
    font-size: 0.9em;
    border-radius: 3px;
    padding: 0.1em 0.35em;
}

/* ─── Tables ─────────────────────────────────────────────────────── */
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.93rem;
    margin: 1.2rem 0;
}

th {
    font-weight: 600;
    text-align: left;
    padding: 0.55rem 0.85rem;
    border-bottom: 2px solid #d0d0d0;
}

td {
    padding: 0.45rem 0.85rem;
    border-bottom: 1px solid #eaeaea;
    vertical-align: top;
}

tr:hover td {
    background: #f9f9f9;
}

/* ─── Badges / shields in headings ──────────────────────────────── */
p img[src*="shields.io"],
p img[src*="img.shields.io"] {
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* Binder / launch badge row — give it a bit of vertical breathing room */
p img[src*="shields.io"][alt*="Pluto"],
p img[src*="shields.io"][alt*="Binder"],
p img[src*="mybinder.org"] {
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}

/* ─── Horizontal rules ───────────────────────────────────────────── */
article.content hr {
    margin: 2.5rem 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* ─── Blockquotes ────────────────────────────────────────────────── */
blockquote {
    border-left: 4px solid var(--color-brand);
    margin: 1.2rem 0;
    padding: 0.6rem 1rem;
    background: var(--color-brand-light);
    border-radius: 0 4px 4px 0;
    color: #444;
}

blockquote p {
    margin: 0;
}

/* ─── Documenter admonitions ─────────────────────────────────────── */
/* note  ── purple (brand) */
.admonition.is-note {
    border-color: var(--color-brand);
}
.admonition.is-note > .admonition-header {
    background-color: var(--color-brand);
}

/* tip  ── teal */
.admonition.is-tip {
    border-color: #1abc9c;
}
.admonition.is-tip > .admonition-header {
    background-color: #1abc9c;
}

/* info  ── blue */
.admonition.is-info {
    border-color: #3498db;
}
.admonition.is-info > .admonition-header {
    background-color: #3498db;
}

/* warning  ── amber */
.admonition.is-warning {
    border-color: #f39c12;
}
.admonition.is-warning > .admonition-header {
    background-color: #f39c12;
}

/* danger  ── red */
.admonition.is-danger {
    border-color: #e74c3c;
}
.admonition.is-danger > .admonition-header {
    background-color: #e74c3c;
}

/* Shared admonition layout */
.admonition {
    border-radius: 4px;
    border-left-width: 4px;
    margin: 1.4rem 0;
}

.admonition > .admonition-header {
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    padding: 0.35rem 0.8rem;
    border-radius: 0 4px 0 0;
}

.admonition > .admonition-body {
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
}

.admonition > .admonition-body p:last-child {
    margin-bottom: 0;
}

/* ─── API docstring entries ──────────────────────────────────────── */
.docstring {
    border-left: 3px solid var(--color-brand);
    padding-left: 0.8rem;
    margin-bottom: 2rem;
}

.docstring > .docstring-header {
    font-size: 0.92rem;
}

/* ─── Search bar refinement ──────────────────────────────────────── */
.docs-search input {
    border-radius: 4px;
    font-size: 0.88rem;
}

/* ─── Page header / breadcrumb ───────────────────────────────────── */
.docs-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

/* ─── Math display blocks ─────────────────────────────────────────── */
/* Give display-mode MathJax a little more vertical space */
mjx-container[display="true"] {
    margin: 1.1rem 0;
    overflow-x: auto;
}
