/* Top header - keep visible for dark/light toggle */
.md-header {
    background-color: transparent;
    box-shadow: none;
}

/* Hide tabs */
.md-tabs {
    display: none !important;
}

/* Sidebars (nav + toc) */
.md-sidebar--primary,
.md-sidebar--secondary {
    display: none !important;
}

/* Footer */
.md-footer {
    display: none !important;
}

/* Remove extra top padding that assumed a header exists */
.md-main__inner {
    margin-top: 0 !important;
}

/* Make page feel like a clean academic site */
.md-content {
    padding: 0 !important;
    width: 100%;
    display: flex;
    justify-content: center;
}

.md-content__inner {
    margin: 0 auto;
    max-width: 980px;
    width: 100%;
    padding: 48px 20px 80px 20px;
}

/* Hide the default page title area ("Home") if it appears */
.md-content__inner > h1:first-of-type {
    display: none;
}

/* Typography + layout */
:root {
    --olm-text: rgba(0, 0, 0, 0.82);
    --olm-muted: rgba(0, 0, 0, 0.65);
    --olm-light: rgba(0, 0, 0, 0.45);
    --olm-border: rgba(0, 0, 0, 0.12);
    --olm-pill: #2b2b2b;
    --olm-accent: #2196f3;
    --olm-code-bg: #f5f7fa;
}

[data-md-color-scheme="slate"] {
    --olm-text: rgba(255, 255, 255, 0.87);
    --olm-muted: rgba(255, 255, 255, 0.7);
    --olm-light: rgba(255, 255, 255, 0.5);
    --olm-border: rgba(255, 255, 255, 0.12);
    --olm-pill: #37474f;
    --olm-code-bg: #263238;
}

.md-typeset {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--olm-text);
}

.md-typeset h2 {
    margin-top: 2.2rem;
    padding-top: 0.2rem;
    font-weight: 600;
}

.md-typeset hr {
    border: none;
    border-top: 1px solid var(--olm-border);
    margin: 28px 0;
}

/* Hero */

.olm-hero {
    text-align: center;
    margin-top: 8px;
}

.olm-title {
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

.olm-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--olm-muted);
    margin: 10px 0 4px 0;
}

.olm-badge {
    font-size: 1rem;
    font-weight: 600;
    color: #d64545;
    margin: 6px 0 14px 0;
}

.olm-authors {
    font-size: 1.02rem;
    color: var(--olm-muted);
    margin: 0 0 6px 0;
}

.olm-affil {
    font-size: 0.98rem;
    color: var(--olm-light);
    margin: 0 0 18px 0;
}

/* Dark pill buttons row */

.olm-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 18px 0;
}

.olm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--olm-pill);
    color: white !important;
    border-radius: 999px;
    padding: 10px 16px;
    text-decoration: none !important;
    font-size: 0.92rem;
    line-height: 1;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
    transition: transform 120ms ease, opacity 120ms ease;
}

.olm-btn:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

/* Icon styling */
.olm-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.olm-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Abstract callout text */

.olm-lead {
    text-align: center;
    color: var(--olm-muted);
    max-width: 820px;
    margin: 10px auto 0 auto;
}

/* ========================= */
/* API Documentation Styling */
/* ========================= */

/* Class/Function signatures */
.md-typeset code {
    background-color: var(--olm-code-bg);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
}

.md-typeset pre {
    background-color: var(--olm-code-bg);
    border-radius: 6px;
    padding: 1em;
    overflow-x: auto;
}

.md-typeset pre code {
    background-color: transparent;
    padding: 0;
}

/* Headers in API docs */
.md-typeset h1 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--olm-border);
    padding-bottom: 0.5rem;
}

.md-typeset h2 {
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--olm-accent);
}

.md-typeset h3 {
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Tables */
.md-typeset table:not([class]) {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.md-typeset table:not([class]) th {
    background-color: var(--olm-accent);
    color: white;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
}

.md-typeset table:not([class]) td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--olm-border);
}

.md-typeset table:not([class]) tr:hover {
    background-color: rgba(33, 150, 243, 0.05);
}

/* Parameter lists */
.md-typeset ul {
    margin: 0.5em 0 1em 0;
}

.md-typeset li {
    margin: 0.3em 0;
}

/* Badges for parameters, returns, etc */
.md-typeset strong {
    color: var(--olm-accent);
    font-weight: 600;
}

/* Links */
.md-typeset a {
    color: var(--olm-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 150ms ease;
}

.md-typeset a:hover {
    border-bottom: 1px solid var(--olm-accent);
}

/* Code blocks */
.md-typeset .highlight {
    margin: 1em 0;
    border-radius: 6px;
    overflow: hidden;
}

/* Admonitions */
.md-typeset .admonition {
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better spacing for API documentation */
.md-content__inner.md-typeset > * {
    margin-bottom: 1.2em;
}

/* Class definition styling */
.md-typeset dl dt {
    font-weight: 600;
    margin-top: 1em;
}

.md-typeset dl dd {
    margin-left: 1.5em;
    margin-bottom: 1em;
}
