/* ===== pySigLib custom Sphinx styles ===== */

/* -- Typography improvements ------------------------------------------------ */
:root {
    --pst-font-size-base: 16px;
}

/* Smoother body text */
.bd-article-container {
    font-size: 1rem;
    line-height: 1.75;
}

/* Slightly tighter heading spacing */
.bd-article-container h1 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.bd-article-container h2 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--pst-color-border);
}

/* -- Code blocks ------------------------------------------------------------ */

/* Nicer code block styling */
div.highlight pre,
pre.literal-block {
    border-radius: 8px;
    padding: 1em;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Always show copy button on code blocks */
.copybtn {
    opacity: 1 !important;
}

/* Inline code */
code.literal {
    background-color: var(--pst-color-surface);
    border: 1px solid var(--pst-color-border);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    font-size: 0.875em;
}

/* -- Sidebar / navigation --------------------------------------------------- */

/* Make toctree captions stand out */
.bd-sidebar-primary .caption-text {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pst-color-text-muted);
    margin-top: 1rem;
}

/* Bold top-level nav items (replaces custom_tree.css) */
li.toctree-l1 > a {
    font-weight: 600;
}

/* -- Admonitions / notes ---------------------------------------------------- */
.admonition {
    border-radius: 6px;
    border-left-width: 4px;
    margin: 1.5em 0;
    padding: 0.8em 1em;
}
.admonition > .admonition-title {
    font-weight: 700;
}

/* -- Tables ----------------------------------------------------------------- */
table.docutils {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}
table.docutils td,
table.docutils th {
    padding: 0.5em 0.75em;
    border: 1px solid var(--pst-color-border);
}
table.docutils th {
    background-color: var(--pst-color-surface);
    font-weight: 600;
}

/* -- Landing page hero ------------------------------------------------------ */
.bd-article-container > section:first-child img {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Landing tagline */
.landing-tagline {
    text-align: center;
    font-size: 1.15rem;
    color: var(--pst-color-text-muted);
    margin-bottom: 1.5rem;
    margin-top: 0.25rem;
}

/* -- Sphinx-design cards ---------------------------------------------------- */
.sd-card {
    border: 1px solid var(--pst-color-border);
    border-radius: 8px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.sd-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
[data-theme="dark"] .sd-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.sd-card .sd-card-header {
    font-weight: 600;
}
.sd-card .sd-card-body {
    font-size: 0.9rem;
    color: var(--pst-color-text-muted);
}

/* -- Sphinx-design tabs ----------------------------------------------------- */
.sd-tab-set > input:checked + label {
    border-color: var(--pst-color-border);
    border-bottom-color: transparent;
    color: var(--pst-color-text-base);
    background-color: var(--pst-color-background);
}
.sd-tab-set > label {
    border-color: transparent;
    color: var(--pst-color-text-muted);
    font-weight: 500;
}
.sd-tab-set > label:hover {
    color: var(--pst-color-text-base);
    border-color: var(--pst-color-border);
}
.sd-tab-content {
    border-color: var(--pst-color-border);
    border-radius: 0 0 6px 6px;
    padding: 1.25em;
}

/* -- Divider ---------------------------------------------------------------- */
hr {
    border: none;
    border-top: 1px solid var(--pst-color-border);
    margin: 1rem 0 0 0;
}

/* -- Wider content area ----------------------------------------------------- */
.bd-page-width {
    max-width: 90rem;  /* default is ~80rem */
}
.bd-article-container {
    max-width: 65rem;  /* default is ~52rem, gives more room for signatures */
}

/* -- Responsive tweaks ------------------------------------------------------ */
@media (max-width: 768px) {
    .bd-article-container {
        font-size: 0.95rem;
        max-width: 100%;
    }
    .sd-row {
        flex-direction: column;
    }
}
