/* ======================================================
   Embedl Brand Theme for pydata-sphinx-theme
   Brand color: #58B1C3 (Teal)
   Other colors inspired by https://www.embedl.com/
   ====================================================== */

/* ---- CSS Custom Properties (shared base) ---- */
:root {
    /* Primary */
    --embedl-cyan: #58B1C3;
    --embedl-cyan-light: #62CBDD;

    /* Secondary */
    --embedl-warning: #EAC871;
    --embedl-success: #A0DBA7;
    --embedl-danger: #C76E6E;

    /* Dark backgrounds */
    --embedl-navy: #0B1623;
    --embedl-mid-surface: #121D2A;
    --embedl-dark-surface: #1C2536;

    /* Code blocks */
    --embedl-code-bg: #07111C;
    --embedl-code-border: #1C2536;
    --embedl-code-text: #DCEAF2;
    --embedl-code-keyword: #D588C6;
    --embedl-code-string: #EAC871;
    --embedl-code-comment: #B89070;
    --embedl-code-number: #BDADEF;
    --embedl-code-function: #A89CDA;
    --embedl-code-builtin: #A0DBA7;
    --embedl-code-variable: #91B9F3;

    /* Sidebar pills */
    --embedl-sidebar-pill-bg: #19324B;
    --embedl-sidebar-pill-text: var(--embedl-cyan-light);
    --embedl-sidebar-pill-hover-bg: #1C2536;
    --embedl-sidebar-pill-hover-text: #FFFFFF;

    /* Light-mode accents */
    --embedl-cyan-dark: #0a7d91;
    --embedl-cyan-hover: #3A98A8;
    --embedl-text-secondary: #48566b;
    --embedl-text-subtle: #677384;
    --embedl-paper: #fbfdfe;
    --embedl-paper-surface: #ffffff;
    --embedl-paper-shell: #f3f8fa;
    --embedl-paper-border: #d5e0e5;
    --embedl-paper-text: #142231;
    --embedl-paper-muted: #445466;
    --embedl-link-light: #0a7d91;
    --embedl-link-light-hover: #0a7d91;

    /* Text */
    --embedl-text-light: #FFFFFF;
    --embedl-text-muted: #9CA3AF;

    /* Typography */
    --embedl-font-family: 'Montserrat', sans-serif;

    /* Layout */
    --pst-sidebar-secondary: 22rem;
    --pst-sidebar-font-size: 1rem;

    /* Light-mode bar tint (very light cyan wash) */
    --embedl-bar-light-bg: color-mix(in srgb, var(--embedl-cyan) 10%, #ffffff);
    --embedl-bar-light-border: color-mix(in srgb, var(--embedl-cyan) 20%, #e0e0e0);
}

/* Apply Montserrat font globally */
body {
    font-family: var(--embedl-font-family);
    overflow-x: clip;
}

/* Headings use Montserrat Bold */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* pydata-sphinx-theme CSS variable overrides */
html[data-theme="light"] {
    --pst-color-primary: var(--embedl-cyan);
    --pst-color-secondary: var(--embedl-cyan-light);
    --pst-color-accent: var(--embedl-warning);
    --pst-color-link: var(--embedl-link-light);
    --pst-color-link-hover: var(--embedl-link-light-hover);
    --pst-color-headerlink: var(--embedl-cyan);
    --pst-color-headerlink-hover: var(--embedl-cyan-light);
    --pst-color-info: var(--embedl-cyan);
    --pst-color-success: var(--embedl-success);
    --pst-color-warning: var(--embedl-warning);
    --pst-color-attention: var(--embedl-warning);
    --pst-color-danger: var(--embedl-danger);
    --pst-color-info-bg: color-mix(in srgb, var(--embedl-cyan) 14%, transparent);
    --pst-color-success-bg: color-mix(in srgb, var(--embedl-success) 14%, transparent);
    --pst-color-warning-bg: color-mix(in srgb, var(--embedl-warning) 14%, transparent);
    --pst-color-attention-bg: color-mix(in srgb, var(--embedl-warning) 14%, transparent);
    --pst-color-danger-bg: color-mix(in srgb, var(--embedl-danger) 14%, transparent);
    --pst-color-inline-code: var(--embedl-cyan-dark);
    --pst-color-inline-code-links: var(--embedl-cyan-dark);
    --pst-color-target: #d0ecf1;
    --pst-color-background: var(--embedl-paper);
    --pst-color-on-background: var(--embedl-paper-shell);
    --pst-color-surface: var(--embedl-paper-surface);
    --pst-color-on-surface: #edf3f6;
    --pst-color-text-base: var(--embedl-paper-text);
    --pst-color-text-muted: var(--embedl-paper-muted);
    --pst-color-border: var(--embedl-paper-border);
}

html[data-theme="dark"] {
    --pst-color-primary: var(--embedl-cyan);
    --pst-color-secondary: var(--embedl-cyan-light);
    --pst-color-accent: var(--embedl-warning);
    --pst-color-link: var(--embedl-cyan);
    --pst-color-link-hover: var(--embedl-cyan-light);
    --pst-color-headerlink: var(--embedl-cyan);
    --pst-color-headerlink-hover: var(--embedl-cyan-light);
    --pst-color-info: var(--embedl-cyan);
    --pst-color-success: var(--embedl-success);
    --pst-color-warning: var(--embedl-warning);
    --pst-color-attention: var(--embedl-warning);
    --pst-color-danger: var(--embedl-danger);
    --pst-color-info-bg: color-mix(in srgb, var(--embedl-cyan) 20%, transparent);
    --pst-color-success-bg: color-mix(in srgb, var(--embedl-success) 20%, transparent);
    --pst-color-warning-bg: color-mix(in srgb, var(--embedl-warning) 20%, transparent);
    --pst-color-attention-bg: color-mix(in srgb, var(--embedl-warning) 20%, transparent);
    --pst-color-danger-bg: color-mix(in srgb, var(--embedl-danger) 20%, transparent);
    --pst-color-inline-code: var(--embedl-code-text);
    --pst-color-inline-code-links: var(--embedl-cyan);
    --pst-color-target: #0a2530;
    --pst-color-background: var(--embedl-navy);
    --pst-color-on-background: var(--embedl-dark-surface);
    --pst-color-surface: var(--embedl-mid-surface);
    --pst-color-on-surface: var(--embedl-text-light);
    --pst-color-text-base: var(--embedl-text-light);
    --pst-color-text-muted: var(--embedl-text-muted);
}

/* Back-to-top button */
#pst-back-to-top {
    background-color: var(--embedl-cyan);
    color: #fff;
}

#pst-back-to-top:hover {
    background-color: var(--embedl-cyan-hover);
    color: #fff;
}

/* ---- Full-width layout ---- */
.bd-page-width {
    max-width: 100%;
}
.bd-main .bd-content {
    justify-content: flex-start;
}

.bd-main .bd-content .bd-article-container {
    max-width: none;
    flex-grow: 1;
    padding: 1rem 2rem;
    overflow-x: clip;
    box-sizing: border-box;
}

/* Comfortable reading width, centered */
.bd-main .bd-content .bd-article-container .bd-article {
    max-width: 52rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}
.bd-article-container .prev-next-footer {
    max-width: 52rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.bd-article-container .prev-next-footer .prev-next-area {
    display: flex;
    justify-content: space-between;
}

.prev-next-area a {
    overflow-x: visible;
    max-width: 45%;
    float: none;
    padding: 10px 0;
    align-items: flex-start;
}

.prev-next-area a .prev-next-info {
    margin: 0;
}

.prev-next-area a p {
    margin: 0;
    overflow-wrap: break-word;
    word-break: normal;
}

.prev-next-area a i {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.prev-next-area a.left-prev {
    justify-content: flex-start;
}

.prev-next-area a.right-next {
    justify-content: flex-end;
    margin-left: auto;
}

html[data-theme="light"] .prev-next-area a p.prev-next-title {
    color: var(--embedl-cyan-dark);
}

@media (max-width: 480px) {
    .bd-article-container .prev-next-footer .prev-next-area {
        flex-direction: column;
        gap: 0.5rem;
    }

    .prev-next-area a {
        max-width: 100%;
    }

    .prev-next-area a.right-next {
        margin-left: 0;
    }
}

/* ---- Navbar ---- */
.bd-header {
    background-color: var(--embedl-navy) !important;
    border-bottom: 1.5px solid rgba(88, 177, 195, 0.3);
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.bd-header__inner.bd-page-width {
    padding-left: 0;
    padding-right: 1rem;
    justify-content: flex-start;
}

/* Desktop: show navbar items inline, hide hamburger toggle */
@media (min-width: 960px) {
    .bd-header .navbar-header-items {
        display: flex !important;
        flex-grow: 1;
        flex-shrink: 1;
        padding-left: 0.5rem;
    }

    .navbar-persistent--container {
        display: flex !important;
    }

    .bd-header .primary-toggle {
        display: none;
    }
}

/* Mobile / tablet */
@media (max-width: 959.98px) {
    .bd-navbar-elements.navbar-nav {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .bd-navbar-elements.navbar-nav > .nav-item > .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .bd-navbar-elements.navbar-nav > .nav-item.current > .nav-link {
        border-bottom: 1px solid var(--embedl-cyan) !important;
    }

    .navbar-brand.logo {
        margin-left: 0.25rem;
        padding: 0.5rem 0.5rem 0.5rem 0;
    }
}

.bd-header ul.navbar-nav>li.nav-item>.nav-link {
    color: var(--embedl-text-light) !important;
    transition: color 0.2s ease;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.bd-header ul.navbar-nav>li.nav-item>.nav-link:hover,
.bd-header ul.navbar-nav>li.nav-item>.nav-link:focus {
    color: var(--embedl-cyan-light) !important;
}

/* Active/current navbar item */
.bd-header ul.navbar-nav>li.nav-item.current {
    --pst-color-primary: var(--embedl-cyan-light);
}

.bd-header ul.navbar-nav>li.nav-item.current>.nav-link {
    color: var(--embedl-cyan-light) !important;
}
.bd-header ul.navbar-nav>li.nav-item>.nav-link:hover::before {
    border-bottom-color: var(--embedl-cyan-light) !important;
}

/* Logo area */
.navbar-header-items__start {
    display: flex;
    align-items: center;
    padding-left: 1rem;
    box-sizing: border-box;
}

/* Desktop: align logo area with left sidebar */
@media (min-width: 960px) {
    .navbar-header-items__start {
        width: var(--pst-sidebar-secondary);
        flex-shrink: 0;
        padding-left: 3.5rem;
    }
}

.navbar-brand.logo {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem 0.5rem 0.6rem;
    margin-left: 0;
}

.navbar-brand.logo .logo__image {
    max-height: 26px;
    width: auto;
    vertical-align: middle;
    object-fit: contain;
}

.navbar-header-items__start .navbar-item {
    display: flex;
    align-items: center;
}

/* ---- Sidebar ---- */
.bd-sidebar-primary {
    border-right: none;
    padding-left: 3.5rem;
    width: var(--pst-sidebar-secondary);
}

@media (min-width: 1600px) {
    .bd-sidebar-secondary {
        border-left: none;
        width: var(--pst-sidebar-secondary);
        padding-right: 3.5rem;
    }
}

/* Below 1600px: keep right sidebar as overlay toggle */
@media (min-width: 1200px) and (max-width: 1599px) {
    .bd-sidebar-secondary {
        border: 0;
        flex-grow: 0.75;
        height: 100vh;
        margin-right: -75%;
        max-height: 100vh;
        max-width: 350px;
        position: fixed;
        right: 0;
        top: 0;
        transition: visibility 0.2s ease-out, margin 0.2s ease-out;
        visibility: hidden;
        width: 75%;
        z-index: 1055;
        padding-right: 1rem;
    }

    .bd-sidebar-secondary[open] {
        margin-right: 0;
        visibility: visible;
    }

    .bd-header button.secondary-toggle {
        display: flex !important;
    }
}

/* Empty right sidebar: keep column, hide content */
.bd-sidebar-secondary:not(:has(.page-toc a)) .sidebar-secondary-items {
    visibility: hidden;
}

/* No TOC on page: hide the toggle button */
body:not(:has(.bd-sidebar-secondary .page-toc a)) .secondary-toggle {
    display: none !important;
}
.sidebar-secondary-item {
    border-left: none !important;
}
.bd-sidebar-secondary,
.bd-toc,
.bd-toc nav.page-toc,
.bd-toc .section-nav,
.sidebar-secondary-items,
.sidebar-secondary__inner {
    border-left: none !important;
    border-right: none !important;
}

html[data-theme="dark"] .bd-sidebar-primary {
    background-color: var(--embedl-mid-surface);
}

/* Dark mode: gradient background */
html[data-theme="dark"] .bd-main {
    background-color: var(--embedl-mid-surface);
    overflow-x: clip;
    background-image:
        /* Right-edge vignette */
        linear-gradient(to right,
            transparent 0%,
            transparent 55%,
            rgba(18, 29, 42, 0.02) 58%,
            rgba(18, 29, 42, 0.05) 61%,
            rgba(18, 29, 42, 0.09) 64%,
            rgba(18, 29, 42, 0.14) 68%,
            rgba(18, 29, 42, 0.22) 73%,
            rgba(18, 29, 42, 0.32) 78%,
            rgba(18, 29, 42, 0.45) 83%,
            rgba(18, 29, 42, 0.62) 88%,
            rgba(18, 29, 42, 0.80) 93%,
            var(--embedl-mid-surface) 100%);
    position: relative;
}

/* Teal glow pseudo-element */
html[data-theme="dark"] .bd-main::before {
    content: "";
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 700px;
    z-index: 0;
    pointer-events: none;
    clip-path: inset(0);
    background: radial-gradient(ellipse 65% 70% at 50% 15%,
            rgba(88, 177, 195, 0.30) 0%,
            rgba(88, 177, 195, 0.18) 25%,
            rgba(88, 177, 195, 0.08) 45%,
            transparent 70%);
    filter: blur(150px);
}
html[data-theme="dark"] .bd-main>* {
    position: relative;
    z-index: 1;
}

html[data-theme="dark"] .bd-sidebar-secondary {
    background: transparent;
}

/* Solid background for mobile sidebar overlay */
html[data-theme="dark"] .bd-sidebar-secondary[open] {
    background: var(--embedl-mid-surface);
}

html[data-theme="dark"] .bd-container {
    background: linear-gradient(to bottom,
            var(--embedl-navy) 0%,
            var(--embedl-mid-surface) 120px);
}

html[data-theme="light"] .bd-sidebar-primary li.current > a {
    color: var(--embedl-cyan-dark) !important;
}
html[data-theme="dark"] .bd-sidebar-primary li.current > a {
    color: var(--embedl-cyan) !important;
}
.bd-sidebar-primary li.current > a.current {
    font-weight: 600;
}
html[data-theme="dark"] .bd-sidebar-primary .nav-link,
html[data-theme="dark"] .bd-sidebar-primary .sidebar-primary-item .nav-link {
    color: var(--embedl-text-muted);
    transition: color 0.2s ease, background-color 0.2s ease;
}

html[data-theme="dark"] .bd-sidebar-primary .nav-link:hover {
    color: var(--embedl-sidebar-pill-hover-text);
    background-color: var(--embedl-sidebar-pill-hover-bg);
    border-radius: 4px;
}
html[data-theme="dark"] nav.bd-links a:hover {
    color: var(--embedl-cyan) !important;
}

html[data-theme="dark"] .bd-sidebar-primary .badge,
html[data-theme="dark"] .bd-sidebar-primary .label {
    background-color: var(--embedl-sidebar-pill-bg);
    color: var(--embedl-sidebar-pill-text);
    border: none;
    border-radius: 12px;
    padding: 0.15em 0.6em;
    font-size: 0.8em;
    font-weight: 500;
}

html[data-theme="dark"] .bd-sidebar-primary .badge:hover,
html[data-theme="dark"] .bd-sidebar-primary .label:hover {
    background-color: var(--embedl-sidebar-pill-hover-bg);
    color: var(--embedl-sidebar-pill-hover-text);
}
nav.bd-links .toctree-l1>a {
    font-size: 1rem;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

nav.bd-links .toctree-l2>a,
nav.bd-links .toctree-l3>a,
nav.bd-links .toctree-l4>a,
nav.bd-links .toctree-l5>a,
nav.bd-links .toctree-l6>a,
nav.bd-links .toctree-l7>a,
nav.bd-links .toctree-l8>a,
nav.bd-links .toctree-l9>a,
nav.bd-links .toctree-l10>a {
    font-size: 0.9rem;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}
nav.bd-links ul ul {
    padding-left: 0.75rem;
}

/* ---- Neutralize <code> in navigation, headings, and toctree ---- */
nav.bd-links a code,
.prev-next-area a code,
.bd-sidebar-secondary .toc-entry a code,
.bd-content h1 code,
.bd-content h2 code,
.bd-content h3 code,
.bd-content h4 code,
.bd-content h5 code,
.bd-content h6 code,
.toctree-wrapper a.reference code,
.bd-content .toctree-wrapper a code {
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: inherit !important;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

nav.bd-links a .pre,
nav.bd-links a code .pre,
.prev-next-area a .pre,
.prev-next-area a code .pre,
.bd-sidebar-secondary .toc-entry a .pre,
.bd-sidebar-secondary .toc-entry a code .pre,
.bd-content h1 code .pre,
.bd-content h2 code .pre,
.bd-content h3 code .pre,
.bd-content h4 code .pre,
.bd-content h5 code .pre,
.bd-content h6 code .pre,
.toctree-wrapper a.reference .pre {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Right sidebar TOC */
.bd-sidebar-secondary .toc-entry a.active {
    color: var(--embedl-cyan);
    border-left-color: var(--embedl-cyan);
}

.bd-sidebar-secondary .toc-entry a {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

/* ---- Links ---- */
a {
    transition: color 0.2s ease;
}

.bd-content a:not(.btn):not(.headerlink) {
    text-decoration-color: rgba(88, 177, 195, 0.35);
}

.bd-content a:not(.btn):not(.headerlink):hover {
    text-decoration-color: currentColor;
}

/* ---- Headings ---- */
.bd-content h1,
.bd-content h2,
.bd-content h3 {
    color: var(--embedl-navy);
}

/* Inline code in body text: allow wrapping */
.bd-content .bd-article code,
.bd-content .bd-article code .pre {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

html[data-theme="dark"] .bd-content h1,
html[data-theme="dark"] .bd-content h2,
html[data-theme="dark"] .bd-content h3 {
    color: var(--embedl-text-light);
}
.headerlink {
    color: var(--embedl-cyan) !important;
    opacity: 0;
    transition: opacity 0.2s ease;
}

h1:hover .headerlink,
h2:hover .headerlink,
h3:hover .headerlink,
h4:hover .headerlink {
    opacity: 1;
}

/* ---- Buttons & Badges ---- */
.btn-primary,
.bd-content .btn-primary {
    background-color: var(--embedl-cyan);
    border-color: var(--embedl-cyan);
    color: var(--embedl-navy);
}

.btn-primary:hover,
.bd-content .btn-primary:hover {
    background-color: var(--embedl-cyan-light);
    border-color: var(--embedl-cyan-light);
    color: var(--embedl-navy);
}

/* ---- Code Blocks ---- */
html[data-theme="light"] code.literal {
    background-color: rgba(88, 177, 195, 0.08);
    color: var(--embedl-navy);
    border: 1px solid rgba(88, 177, 195, 0.15);
    border-radius: 4px;
    padding: 0.1em 0.3em;
}

html[data-theme="dark"] code.literal {
    background-color: var(--embedl-code-bg);
    color: var(--embedl-code-text);
    border: 1px solid var(--embedl-code-border);
    border-radius: 4px;
    padding: 0.1em 0.3em;
}

code.xref {
    background-color: transparent;
    border: none;
    padding: 0;
}

html[data-theme="dark"] a>code.xref {
    color: var(--embedl-cyan);
}

html[data-theme="dark"] a:hover>code.xref {
    color: var(--embedl-cyan-light);
}

/* ---- API Documentation unified styling ---- */

.sig-name.descname {
    color: var(--embedl-cyan) !important;
    font-size: 1em;
}

.sig-prename.descclassname {
    color: var(--embedl-text-muted);
}

.sig-paren {
    font-size: 1em;
}

em.sig-param {
    font-style: normal;
}

html[data-theme="light"] .sig-name.descname {
    color: var(--embedl-cyan-dark) !important;
}

html[data-theme="light"] .sig-prename.descclassname {
    color: var(--embedl-text-secondary);
}

/* Signature parameter colors — dark mode */
html[data-theme="dark"] em.sig-param:has(> .p)>.n:first-child {
    color: var(--embedl-cyan);
    font-weight: 500;
}
html[data-theme="dark"] em.sig-param>.p~.n,
html[data-theme="dark"] em.sig-param>.p~.n a,
html[data-theme="dark"] em.sig-param>.p~.n .pre {
    color: var(--embedl-text-muted) !important;
    font-weight: 400;
}

html[data-theme="dark"] em.sig-param>.p~.n a:hover {
    color: var(--embedl-cyan-light) !important;
}
html[data-theme="dark"] em.sig-param:not(:has(> .p))>.n {
    color: var(--embedl-text-muted);
    font-weight: 400;
}
html[data-theme="dark"] em.sig-param>.p,
html[data-theme="dark"] em.sig-param>.p~.n .p {
    color: var(--embedl-text-muted);
}
html[data-theme="dark"] em.sig-param>.default_value,
html[data-theme="dark"] .sig-param .o {
    color: var(--embedl-text-muted);
}
html[data-theme="dark"] .sig-return-typehint,
html[data-theme="dark"] .sig-return-typehint a,
html[data-theme="dark"] .sig-return-typehint .pre {
    color: var(--embedl-text-muted) !important;
}

html[data-theme="dark"] .sig-return-typehint a:hover {
    color: var(--embedl-cyan-light) !important;
}
html[data-theme="dark"] .sig-return-icon {
    color: var(--embedl-text-muted);
}
html[data-theme="dark"] dt.sig .property .pre,
html[data-theme="dark"] dt.sig .property .p {
    color: var(--embedl-text-muted);
}
html[data-theme="dark"] dt.sig .property>.k {
    color: var(--embedl-text-muted);
}

/* Signature parameter colors — light mode */
html[data-theme="light"] em.sig-param:has(> .p)>.n:first-child {
    color: var(--embedl-cyan-dark);
    font-weight: 500;
}

html[data-theme="light"] em.sig-param>.p~.n,
html[data-theme="light"] em.sig-param>.p~.n a,
html[data-theme="light"] em.sig-param>.p~.n .pre {
    color: var(--embedl-text-secondary) !important;
}

html[data-theme="light"] em.sig-param>.p~.n a:hover {
    color: var(--embedl-cyan-dark) !important;
}

html[data-theme="light"] em.sig-param:not(:has(> .p))>.n {
    color: var(--embedl-text-secondary);
}

html[data-theme="light"] em.sig-param>.p,
html[data-theme="light"] em.sig-param>.p~.n .p {
    color: var(--embedl-text-subtle);
}

html[data-theme="light"] .sig-return-typehint,
html[data-theme="light"] .sig-return-typehint a,
html[data-theme="light"] .sig-return-typehint .pre {
    color: var(--embedl-text-secondary) !important;
}

html[data-theme="light"] .sig-return-typehint a:hover {
    color: var(--embedl-cyan-dark) !important;
}

html[data-theme="light"] .sig-return-icon {
    color: var(--embedl-text-subtle);
}

html[data-theme="light"] dt.sig .property .pre,
html[data-theme="light"] dt.sig .property .p {
    color: var(--embedl-text-secondary);
}

/* Autodoc definition list */
dl.py dt.sig {
    border-left: 3px solid var(--embedl-cyan);
    border-radius: 0 4px 4px 0;
    padding: 0.5em 0.75em;
    /* Let long signatures wrap (JS inserts <wbr> hints) */
    white-space: normal;
}

/* Prevent code blocks in class body from blowing out the container */
dl.py > dd {
    min-width: 0;
    overflow-wrap: break-word;
}

dl.py dt.sig .pre {
    white-space: normal;
}

/* Code blocks inside parameter descriptions must scroll, not overflow */
dl.field-list dd .highlight {
    overflow-x: auto;
}
dl.field-list dd {
    min-width: 0;
}

html[data-theme="dark"] dl.py dt.sig {
    background-color: rgba(88, 177, 195, 0.05);
}

html[data-theme="light"] dl.py dt.sig {
    background-color: rgba(88, 177, 195, 0.06);
}
.bd-content>.bd-article-container .bd-article>dl.py {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(88, 177, 195, 0.2);
}
.bd-content>.bd-article-container .bd-article>dl.py:first-of-type {
    border-top: none;
    margin-top: 1.5rem;
    padding-top: 0;
}
.bd-content>.bd-article-container .bd-article>dl.py>dt.sig {
    border-left-width: 4px;
}

html[data-theme="dark"]
.bd-content>.bd-article-container
.bd-article>dl.py>dt.sig {
    background-color: rgba(88, 177, 195, 0.08);
}

html[data-theme="light"]
.bd-content>.bd-article-container
.bd-article>dl.py>dt.sig {
    background-color: rgba(88, 177, 195, 0.10);
}
dl.py.method>dt.sig,
dl.py.attribute>dt.sig {
    border-left-width: 2px;
    border-left-color: rgba(88, 177, 195, 0.4);
}
html[data-theme="dark"] dl.field-list dt {
    color: var(--embedl-cyan);
}
html[data-theme="dark"] dl[class]:not(
    .option-list, .field-list,
    .footnote, .glossary, .simple
) dt.field-odd,
html[data-theme="dark"] dl[class]:not(
    .option-list, .field-list,
    .footnote, .glossary, .simple
) dt.field-even {
    background-color: transparent;
}

/* ---- Admonitions ---- */
/* Colors are driven by --pst-color-* variables set above.
   Admonition type → variable → color:
     note/seealso        → --pst-color-info      (cyan)
     tip/hint            → --pst-color-success    (green)
     important/attention → --pst-color-attention   (amber)
     warning/caution     → --pst-color-warning    (amber)
     danger/error        → --pst-color-danger     (red)
   Note: seealso is overridden below from pydata's default (success → info).
*/
.admonition {
    border-radius: 6px;
    border-left-width: 4px;
}

/* See Also — override from success (green) to info (cyan) */
div.admonition.seealso {
    border-color: var(--pst-color-info);
}
div.admonition.seealso > .admonition-title {
    background-color: var(--pst-color-info-bg);
}
div.admonition.seealso > .admonition-title:after {
    color: var(--pst-color-info);
}

/* Dark-mode admonition base */
html[data-theme="dark"] .admonition,
html[data-theme="dark"] div.admonition {
    background-color: var(--embedl-mid-surface);
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.3) !important;
}

/* ---- Footer ---- */
.bd-footer {
    background-color: var(--embedl-navy) !important;
    color: var(--embedl-text-muted);
    border-top: 1.5px solid rgba(88, 177, 195, 0.3);
    width: 100%;
}

/* Hide theme/sphinx attributions */
.bd-footer .theme-version,
.bd-footer .sphinx-version {
    display: none;
}

.bd-footer a {
    color: var(--embedl-cyan) !important;
}

.bd-footer a:hover {
    color: var(--embedl-cyan-light) !important;
}

.bd-footer .bd-footer__inner.bd-page-width {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    max-width: none;
    width: 100%;
    min-height: var(--pst-header-height);
    gap: 1rem 2rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
}

.bd-footer .footer-items__start {
    flex: 1 1 42rem;
}

.bd-footer .footer-items__end {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    align-items: center;
    margin-left: auto;
}

.bd-footer .footer-items__end .footer-item {
    text-align: right;
}

.embedl-footer-social {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    justify-content: flex-start;
    margin: 0;
}

.bd-footer a.embedl-footer-social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    font-size: 1.05rem;
    line-height: 1;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.bd-footer a.embedl-footer-social__link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #e5e7eb !important;
}

.embedl-footer-social__icon-img {
    width: 1.4rem;
    height: 1.4rem;
}

.embedl-footer-copyright {
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .bd-footer .bd-footer__inner.bd-page-width {
        padding: 1rem;
    }

    .bd-footer .footer-items__start,
    .bd-footer .footer-items__end {
        flex: 1 1 100%;
    }

    .bd-footer .footer-items__end {
        align-items: flex-start;
        justify-content: flex-start;
        align-self: auto;
        margin-left: 0;
    }

    .bd-footer .footer-items__end .footer-item {
        text-align: left;
    }

    .embedl-footer-social {
        justify-content: flex-start;
    }

    .embedl-footer-copyright {
        white-space: normal;
    }
}

/* ---- Search ---- */
.bd-search input[type="search"] {
    border-color: rgba(88, 177, 195, 0.25);
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bd-search input[type="search"]:focus {
    border-color: var(--embedl-cyan);
    box-shadow: 0 0 0 3px rgba(88, 177, 195, 0.12);
}
/* Search dialog overlay */
#pst-search-dialog {
    --pst-color-accent: var(--embedl-cyan);
    border-color: var(--embedl-cyan);
}

#pst-search-dialog .bd-search {
    border: none;
}

#pst-search-dialog .bd-search:focus-within {
    box-shadow: 0 0 0 .1875rem var(--embedl-cyan);
}

#pst-search-dialog .bd-search input[type="search"] {
    border: none;
    box-shadow: none;
    outline: none;
}

html[data-theme="dark"] .bd-header .search-button-field.search-button__button:hover,
html[data-theme="dark"] .bd-header .search-button-field.search-button__button:focus,
html[data-theme="dark"] .bd-header .search-button-field.search-button__button:focus-visible {
    border-color: var(--embedl-cyan) !important;
    box-shadow: 0 0 0 0.14rem color-mix(in srgb, var(--embedl-cyan) 38%, transparent) !important;
}

/* ---- Tables ---- */
.bd-content table.docutils,
.bd-content table.table {
    width: 100%;
    table-layout: fixed;
}

.bd-content table.docutils th,
.bd-content table.docutils td,
.bd-content table.table th,
.bd-content table.table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    vertical-align: top;
}

.bd-content table.docutils code,
.bd-content table.docutils code .pre,
.bd-content table.table code,
.bd-content table.table code .pre {
    white-space: normal;
    overflow-wrap: anywhere;
}

.bd-content table thead {
    background-color: var(--embedl-navy);
    color: var(--embedl-text-light);
}

html[data-theme="dark"] .bd-content table thead {
    background-color: var(--embedl-dark-surface);
}

.bd-content table tbody tr:nth-child(even) {
    background-color: rgba(88, 177, 195, 0.03);
}

/* ---- Scrollbar (Webkit) ---- */
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: rgba(88, 177, 195, 0.2);
    border-radius: 4px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background-color: var(--embedl-mid-surface);
}

/* ---- Version Selector / Announcement Bar ---- */
.bd-header-announcement {
    background-color: var(--embedl-cyan);
    color: var(--embedl-navy);
    font-weight: 600;
}

/* ---- Responsive Adjustments ---- */

/* Mobile sidebar overlays: keep them narrow enough to tap the backdrop */
@media (max-width: 959.98px) {
    .bd-sidebar-primary {
        width: 70%;
        max-width: 300px;
    }
}
@media (max-width: 1199.98px) {
    .bd-sidebar-secondary {
        width: 70%;
        max-width: 300px;
    }
}

/* Mobile / tablet */
@media (max-width: 959px) {
    .bd-sidebar-primary {
        padding-left: 1rem;
    }

    .bd-main .bd-content .bd-article-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Scrollable code blocks */
    .bd-article .highlight {
        overflow-x: auto;
    }
}

/* ---- Misc ---- */
::selection {
    background-color: rgba(88, 177, 195, 0.2);
    color: inherit;
}

/* ---- Dark mode code & syntax highlighting ---- */
html[data-theme="dark"] .highlight,
html[data-theme="dark"] pre {
    background-color: var(--embedl-code-bg) !important;
    border: 1px solid var(--embedl-code-border);
    border-radius: 6px;
}

html[data-theme="dark"] .highlight pre {
    border: none;
}

html[data-theme="dark"] .highlight code,
html[data-theme="dark"] pre code {
    color: var(--embedl-code-text);
}

html[data-theme="dark"] .highlight .k,
html[data-theme="dark"] .highlight .kc,
html[data-theme="dark"] .highlight .kd,
html[data-theme="dark"] .highlight .kn,
html[data-theme="dark"] .highlight .kp,
html[data-theme="dark"] .highlight .kr,
html[data-theme="dark"] .highlight .ow,
html[data-theme="dark"] .highlight .ne,
html[data-theme="dark"] .highlight .o {
    color: var(--embedl-code-keyword);
}

html[data-theme="dark"] .highlight .s,
html[data-theme="dark"] .highlight .sa,
html[data-theme="dark"] .highlight .sb,
html[data-theme="dark"] .highlight .sc,
html[data-theme="dark"] .highlight .dl,
html[data-theme="dark"] .highlight .sd,
html[data-theme="dark"] .highlight .s2,
html[data-theme="dark"] .highlight .se,
html[data-theme="dark"] .highlight .sh,
html[data-theme="dark"] .highlight .si,
html[data-theme="dark"] .highlight .sx,
html[data-theme="dark"] .highlight .s1 {
    color: var(--embedl-code-string);
}

html[data-theme="dark"] .highlight .c,
html[data-theme="dark"] .highlight .ch,
html[data-theme="dark"] .highlight .cm,
html[data-theme="dark"] .highlight .cp,
html[data-theme="dark"] .highlight .cpf,
html[data-theme="dark"] .highlight .c1,
html[data-theme="dark"] .highlight .cs {
    color: var(--embedl-code-comment);
    font-style: italic;
}

html[data-theme="dark"] .highlight .l,
html[data-theme="dark"] .highlight .ld,
html[data-theme="dark"] .highlight .m,
html[data-theme="dark"] .highlight .mb,
html[data-theme="dark"] .highlight .mf,
html[data-theme="dark"] .highlight .mh,
html[data-theme="dark"] .highlight .mi,
html[data-theme="dark"] .highlight .mo,
html[data-theme="dark"] .highlight .il,
html[data-theme="dark"] .highlight .kt {
    color: var(--embedl-code-number);
}

html[data-theme="dark"] .highlight .nc,
html[data-theme="dark"] .highlight .no,
html[data-theme="dark"] .highlight .nf,
html[data-theme="dark"] .highlight .fm,
html[data-theme="dark"] .highlight .py,
html[data-theme="dark"] .highlight .nt,
html[data-theme="dark"] .highlight .ss,
html[data-theme="dark"] .highlight .gd,
html[data-theme="dark"] .highlight .gh,
html[data-theme="dark"] .highlight .gu {
    color: var(--embedl-code-function);
}

html[data-theme="dark"] .highlight .nd,
html[data-theme="dark"] .highlight .nb,
html[data-theme="dark"] .highlight .bp,
html[data-theme="dark"] .highlight .na,
html[data-theme="dark"] .highlight .nl,
html[data-theme="dark"] .highlight .vm,
html[data-theme="dark"] .highlight .ni {
    color: var(--embedl-code-builtin);
}

html[data-theme="dark"] .highlight .nv,
html[data-theme="dark"] .highlight .vc,
html[data-theme="dark"] .highlight .vg,
html[data-theme="dark"] .highlight .vi,
html[data-theme="dark"] .highlight .err,
html[data-theme="dark"] .highlight .sr {
    color: var(--embedl-code-variable);
}

/* ---- Light mode ---- */
html[data-theme="light"] body {
    background-color: var(--embedl-paper);
    color: var(--embedl-paper-text);
}

html[data-theme="light"] .bd-container {
    background: linear-gradient(
        to bottom,
        var(--embedl-paper-shell) 0%,
        var(--embedl-paper) 140px
    );
}

html[data-theme="light"] .bd-main {
    background-color: var(--embedl-paper);
}

html[data-theme="light"] .bd-header,
html[data-theme="light"] .bd-footer {
    background-image: none !important;
}

html[data-theme="light"] .bd-header {
    background-color: var(--embedl-bar-light-bg) !important;
    border-bottom-color: var(--embedl-bar-light-border);
    /* Override pydata's hover accent inside the header */
    --pst-color-secondary: var(--embedl-cyan-dark);
}

html[data-theme="light"] .bd-header .navbar-brand.logo,
html[data-theme="light"] .bd-header .navbar-brand.logo .logo__title,
html[data-theme="light"] .bd-header .navbar-icon-links .nav-link,
html[data-theme="light"] .bd-header .navbar-icon-links i,
html[data-theme="light"] .bd-header .navbar-icon-links svg,
html[data-theme="light"] .bd-header .theme-switch-button,
html[data-theme="light"] .bd-header .theme-switch-button .theme-switch {
    color: var(--embedl-paper-text) !important;
    fill: var(--embedl-paper-text) !important;
    stroke: var(--embedl-paper-text) !important;
}

html[data-theme="light"] .bd-header .navbar-brand.logo img.logo__image {
    filter: none;
}

html[data-theme="light"] .bd-header ul.navbar-nav > li.nav-item > .nav-link {
    color: var(--embedl-text-secondary) !important;
}

html[data-theme="light"] .bd-header ul.navbar-nav > li.nav-item > .nav-link:hover,
html[data-theme="light"] .bd-header ul.navbar-nav > li.nav-item > .nav-link:focus,
html[data-theme="light"] .bd-header ul.navbar-nav > li.nav-item.current > .nav-link {
    color: var(--embedl-cyan-dark) !important;
}

html[data-theme="light"] .bd-header ul.navbar-nav > li.nav-item.current {
    --pst-color-primary: var(--embedl-cyan-dark);
}

html[data-theme="light"] .bd-header ul.navbar-nav > li.nav-item > .nav-link:hover::before {
    border-bottom-color: var(--embedl-cyan-dark) !important;
}

/* Icon links (GitHub, theme toggle, etc.) — override base !important colors on hover */
html[data-theme="light"] .bd-header .navbar-icon-links .nav-link:hover,
html[data-theme="light"] .bd-header .navbar-icon-links .nav-link:hover i,
html[data-theme="light"] .bd-header .navbar-icon-links .nav-link:hover svg,
html[data-theme="light"] .bd-header .theme-switch-button:hover,
html[data-theme="light"] .bd-header .theme-switch-button:hover .theme-switch {
    color: var(--embedl-cyan-dark) !important;
    fill: var(--embedl-cyan-dark) !important;
    stroke: var(--embedl-cyan-dark) !important;
}

html[data-theme="light"] .bd-header .search-button-field.search-button__button {
    background-color: #fff !important;
    color: var(--embedl-paper-text) !important;
    border: 1px solid var(--embedl-paper-border) !important;
    box-shadow: 0 0.1rem 0.2rem rgba(11, 22, 35, 0.04) !important;
}

html[data-theme="light"] .bd-header .search-button-field.search-button__button i,
html[data-theme="light"] .bd-header .search-button-field.search-button__button .search-button__default-text,
html[data-theme="light"] .bd-header .search-button-field.search-button__button .search-button__kbd-shortcut,
html[data-theme="light"] .bd-header .search-button-field.search-button__button .search-button__kbd-shortcut kbd {
    color: var(--embedl-paper-text) !important;
}

html[data-theme="light"] .bd-header .search-button-field.search-button__button:hover,
html[data-theme="light"] .bd-header .search-button-field.search-button__button:focus,
html[data-theme="light"] .bd-header .search-button-field.search-button__button:focus-visible {
    background-color: #fff !important;
    color: var(--embedl-paper-text) !important;
    border-color: var(--embedl-cyan) !important;
    box-shadow: 0 0 0 0.14rem color-mix(in srgb, var(--embedl-cyan) 38%, transparent) !important;
}

html[data-theme="light"] .bd-sidebar-primary {
    background-color: var(--embedl-paper) !important;
}

html[data-theme="light"] .bd-sidebar-secondary[open] {
    background: var(--embedl-paper-shell);
}

html[data-theme="light"] .bd-sidebar-primary .nav-link,
html[data-theme="light"] .bd-sidebar-primary .sidebar-primary-item .nav-link {
    color: var(--embedl-text-secondary);
    transition: color 0.2s ease, background-color 0.2s ease;
}

html[data-theme="light"] .bd-sidebar-primary .nav-link:hover {
    color: var(--embedl-paper-text);
    background-color: rgba(255, 255, 255, 0.88);
    border-radius: 4px;
}
html[data-theme="light"] nav.bd-links a:hover {
    color: var(--embedl-cyan-dark) !important;
}

html[data-theme="light"] .bd-content,
html[data-theme="light"] .bd-content p,
html[data-theme="light"] .bd-content li,
html[data-theme="light"] .bd-content dd,
html[data-theme="light"] .bd-content dt {
    color: var(--embedl-paper-text);
}

html[data-theme="light"] .bd-content h1,
html[data-theme="light"] .bd-content h2,
html[data-theme="light"] .bd-content h3 {
    color: var(--embedl-navy);
    letter-spacing: -0.02em;
}

html[data-theme="light"] .bd-content a:not(.btn):not(.headerlink),
html[data-theme="light"] .bd-content a.reference,
html[data-theme="light"] .bd-content a.reference.external {
    color: var(--embedl-link-light);
}

html[data-theme="light"] .bd-content a:not(.btn):not(.headerlink):hover,
html[data-theme="light"] .bd-content a.reference:hover,
html[data-theme="light"] .bd-content a.reference.external:hover {
    color: var(--embedl-link-light-hover);
}

html[data-theme="light"] .bd-content p:not(.admonition-title):not(.embedl-landing__card-desc),
html[data-theme="light"] .bd-content li,
html[data-theme="light"] .bd-content dd,
html[data-theme="light"] .bd-breadcrumbs {
    color: var(--embedl-paper-muted);
}

html[data-theme="light"] .bd-breadcrumbs a,
html[data-theme="light"] .bd-breadcrumbs .nav-link,
html[data-theme="light"] .bd-breadcrumbs .breadcrumb-item > a.nav-link,
html[data-theme="light"] .bd-breadcrumbs .breadcrumb-item.active,
html[data-theme="light"] .bd-breadcrumbs .breadcrumb-item.active .ellipsis {
    color: var(--embedl-cyan-dark) !important;
}

html[data-theme="light"] .bd-breadcrumbs a:hover,
html[data-theme="light"] .bd-breadcrumbs a:focus {
    color: var(--embedl-cyan-hover);
}

html[data-theme="light"] .admonition,
html[data-theme="light"] div.admonition {
    background-color: var(--embedl-paper-surface);
    border-color: var(--embedl-paper-border);
    box-shadow: 0 0.15rem 0.35rem rgba(11, 22, 35, 0.04) !important;
}

html[data-theme="light"] .bd-content table.docutils,
html[data-theme="light"] .bd-content table.table {
    border-color: var(--embedl-paper-border);
}

html[data-theme="light"] .bd-content table thead {
    background-color: var(--embedl-paper-shell);
    color: var(--embedl-paper-text);
}

html[data-theme="light"] .prev-next-area a,
html[data-theme="light"] .prev-next-area a .prev-next-subtitle {
    color: var(--embedl-paper-muted) !important;
}

html[data-theme="light"] .prev-next-area a .prev-next-title,
html[data-theme="light"] .prev-next-area a p.prev-next-title {
    color: var(--embedl-cyan-dark) !important;
}

html[data-theme="light"] .prev-next-area a:hover,
html[data-theme="light"] .prev-next-area a:focus,
html[data-theme="light"] .prev-next-area a:hover .prev-next-title,
html[data-theme="light"] .prev-next-area a:focus .prev-next-title {
    color: var(--embedl-cyan-hover) !important;
}

html[data-theme="light"] .bd-footer {
    background-color: var(--embedl-bar-light-bg) !important;
    color: var(--embedl-paper-muted);
    border-top-color: var(--embedl-bar-light-border);
}

html[data-theme="light"] .bd-footer a {
    color: var(--embedl-cyan-dark) !important;
}

html[data-theme="light"] .bd-footer a:hover {
    color: var(--embedl-cyan-hover) !important;
}

html[data-theme="light"] .bd-footer a.embedl-footer-social__link {
    background-color: rgba(11, 22, 35, 0.05);
    color: var(--embedl-paper-text) !important;
}

html[data-theme="light"] .bd-footer a.embedl-footer-social__link:hover {
    background-color: rgba(11, 22, 35, 0.14);
    color: var(--embedl-paper-text) !important;
}

html[data-theme="light"] .embedl-footer-copyright {
    color: var(--embedl-paper-muted);
}


/* ===========================================================
   Landing Page
   =========================================================== */

/* Hide right sidebar and prev/next on the landing page */
.bd-main:has(.embedl-landing) .bd-sidebar-secondary,
.bd-main:has(.embedl-landing) .bd-toc {
    display: none !important;
}

.bd-main:has(.embedl-landing) .prev-next-footer {
    display: none !important;
}

/* Let content fill full width on the landing page */
.bd-main:has(.embedl-landing) .bd-content {
    flex: 1 1 100%;
    max-width: 100%;
}

.bd-main:has(.embedl-landing) .bd-article-container {
    max-width: 100% !important;
}

.bd-main:has(.embedl-landing) ~ .bd-sidebar-primary,
body:has(.embedl-landing) .bd-sidebar-primary {
    display: none !important;
}

.embedl-landing {
    max-width: 42rem;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

/* ---- Hero ---- */
.embedl-landing__hero {
    text-align: center;
    margin-bottom: 3rem;
}

.embedl-landing__title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

html[data-theme="dark"] .embedl-landing__title {
    color: var(--embedl-text-light);
}

.embedl-landing__subtitle {
    font-size: 1.15rem;
    color: var(--embedl-text-subtle);
    margin: 0;
}

html[data-theme="dark"] .embedl-landing__subtitle {
    color: var(--embedl-text-muted);
}

/* ---- Section headings ---- */
.embedl-landing__heading {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--embedl-cyan);
}

html[data-theme="dark"] .embedl-landing__heading {
    color: var(--embedl-text-light);
}

.embedl-landing__section {
    margin-bottom: 2.5rem;
}

/* ---- Card grid ---- */
.embedl-landing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.embedl-landing__card {
    display: block;
    padding: 1.25rem 1.4rem;
    border-radius: 0.5rem;
    border: 1px solid #d0d7de;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

html[data-theme="dark"] .embedl-landing__card {
    border-color: var(--embedl-dark-surface);
    background: var(--embedl-mid-surface);
}

.embedl-landing__card:hover {
    border-color: var(--embedl-cyan);
    box-shadow: 0 2px 12px rgba(88, 177, 195, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
}

html[data-theme="dark"] .embedl-landing__card:hover {
    box-shadow: 0 2px 16px rgba(88, 177, 195, 0.25);
}

.embedl-landing__card--active {
    border-color: var(--embedl-cyan);
}

html[data-theme="dark"] .embedl-landing__card--active {
    border-color: var(--embedl-cyan);
    background: color-mix(in srgb, var(--embedl-cyan) 8%, var(--embedl-mid-surface));
}

.embedl-landing__card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--embedl-cyan-dark);
}

html[data-theme="dark"] .embedl-landing__card-title {
    color: var(--embedl-cyan-light);
}

.embedl-landing__card-desc {
    font-size: 0.92rem;
    margin: 0;
    color: var(--embedl-text-subtle);
    line-height: 1.5;
}

html[data-theme="dark"] .embedl-landing__card-desc {
    color: var(--embedl-text-muted);
}

/* Single-column on narrow screens */
@media (max-width: 540px) {
    .embedl-landing__grid {
        grid-template-columns: 1fr;
    }

    .embedl-landing__title {
        font-size: 1.8rem;
    }
}
