/*
Theme Name: bioMECI Block
Theme URI: https://biomeci.com/
Author: bioMECI
Description: Block/FSE version of the bioMECI theme, retaining the existing visual design while adding Site Editor, Patterns, Templates, and Global Styles support.
Version: 1.34.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: biomeci
*/

/* Compatibility refinements retained from the classic theme */
.blogimage, .biomeci-hero img, .wp-post-image { width: 100%; height: auto; display: block; }
.biomeci-hero { margin-bottom: 2em; }
.blogborder { margin-bottom: 3em; padding-bottom: 2em; border-bottom: solid 2px #efefef; }
.biomeci-context { text-align: center; }
.iframe-container { position: relative; overflow: hidden; width: 100%; padding-top: 56.25%; margin-bottom: 1.5em; }
.iframe-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.biomeci-sponsor-placeholder img { width: 90%; height: auto; opacity: .8; }
.navigation.pagination { margin: 2em 0; }
.screen-reader-text { position:absolute; left:-9999px; }
#header { background-color: #000; background-image: none; }
#header .companyname { margin: 0.6em 0 0.18em; font-size: 6em; line-height: 0.95; font-weight: 400; }
#header .companyname-sub { margin: 0; font-size: 1.5em; line-height: 1.35; font-weight: 400; }
#header .image.avatar { width: 16.25em; max-width: 100%; margin-left: auto; margin-right: auto; }
.wp-block-embed-vimeo .wp-block-embed__wrapper { width: min(100%, 900px); aspect-ratio: 16 / 9; margin: 2em auto; }
.wp-block-embed-vimeo iframe { display: block; width: 100%; height: 100%; }
.project-content p { margin-bottom: 1em; }
.project-content .wp-block-details { margin-top: -1em; }

/* Block-navigation bridge for the original bioMECI menu styling */
#header .biomeci_menu { margin: 10px 0; }
#header .biomeci_menu .wp-block-navigation__container { justify-content: center; gap: .25em; }
#header .biomeci_menu .wp-block-navigation-item { font-size: 0.8em; line-height: 1.5em; }
#header .biomeci_menu a { border-bottom: 0; color: rgba(255,255,255,.7); }
#header .biomeci_menu a:hover, #header .biomeci_menu .current-menu-item > a { color: #fff; }

/* Make the Site Editor canvas behave like the front end where practical. */
.editor-styles-wrapper { font-family: "IBM Plex Sans", sans-serif; }

/* BetterDocs: allow plugin layouts to use available main-column width. */
#main .betterdocs-wrapper, #main .betterdocs-content-wrapper { max-width: 100%; }

/* Simple Membership compatibility */
.swpm-login-widget-form { max-width: 400px; }
.swpm-registration-widget-form, .swpm-edit-profile-form { max-width: 520px; }
.swpm-registration-widget-form .swpm-form-row, .swpm-edit-profile-form .swpm-form-row { margin-bottom: 18px; }
.swpm-login-widget-form label, .swpm-registration-widget-form label, .swpm-edit-profile-form label { display: block; font-size: 18px; font-weight: 500; }
.swpm-registration-widget-form .swpm-form-label-wrap, .swpm-edit-profile-form .swpm-form-label-wrap { margin-bottom: 6px; }
.swpm-login-widget-form input[type="text"], .swpm-login-widget-form input[type="password"], .swpm-registration-widget-form input[type="text"], .swpm-registration-widget-form input[type="password"], .swpm-registration-widget-form input[type="email"], .swpm-registration-widget-form select, .swpm-edit-profile-form input[type="text"], .swpm-edit-profile-form input[type="password"], .swpm-edit-profile-form input[type="email"], .swpm-edit-profile-form select { width: 100%; padding: 10px 12px; font-size: 18px; border: 1.5px solid #999; border-radius: 4px; background: #fff; box-sizing: border-box; }
.swpm-login-widget-form input:focus, .swpm-registration-widget-form input:focus, .swpm-registration-widget-form select:focus, .swpm-edit-profile-form input:focus, .swpm-edit-profile-form select:focus { outline: none; border-color: #159a9c; }

.swpm-login-widget-form .swpm-login-form-submit, .swpm-registration-submit-button, .swpm-edit-profile-link a, .swpm-logged-logout-link a, .swpm-profile-submit-button { display: inline-block; padding: 8px 14px !important; font-size: 16px !important; font-weight: normal; line-height: 1.4; color: #29999b !important; background: transparent !important; border: 2px solid #29999b !important; border-radius: 4px !important; text-decoration: none !important; width: auto !important; min-width: 0 !important; box-shadow: none !important; cursor: pointer; }

.swpm-edit-profile-link,
.swpm-logged-logout-link {
    display: inline-block;
}


.swpm-edit-profile-link {
    margin-right: 8px;
}


.swpm-login-widget-form .swpm-login-form-submit:hover, .swpm-registration-submit-button:hover, .swpm-edit-profile-link a:hover, .swpm-logged-logout-link a:hover, .swpm-profile-submit-button:hover { color: #fff !important; background: #29999b !important; }

/* Gutenberg / block-editor compatibility layer
 * Legacy theme CSS provides visual defaults only. Explicit block settings
 * chosen in the editor take precedence on both the front end and editor. */

/* Legacy card wrappers must not impose alignment on their child blocks. */
.blogborder {
    text-align: left;
}

.blogborder h1,
.blogborder h2,
.blogborder h3,
.blogborder h4,
.blogborder h5,
.blogborder h6,
.project-content h1,
.project-content h2,
.project-content h3,
.project-content h4,
.project-content h5,
.project-content h6 {
    text-align: inherit;
}

/* Explicit Gutenberg text alignment always wins over legacy selectors. */
.has-text-align-left {
    text-align: left !important;
}

.has-text-align-center {
    text-align: center !important;
}

.has-text-align-right {
    text-align: right !important;
}

.has-text-align-justify {
    text-align: justify !important;
}

/* Explicit Gutenberg image alignment always wins. */
figure.wp-block-image.aligncenter {
    display: table;
    width: auto;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

figure.wp-block-image.aligncenter img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto !important;
    margin-right: auto !important;
}

figure.wp-block-image.alignleft {
    float: left;
    margin-right: 1.5em;
}

figure.wp-block-image.alignright {
    float: right;
    margin-left: 1.5em;
}

/* WordPress' generic alignment classes should also survive legacy CSS. */
.aligncenter {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Respect wide/full block choices without hard-coding an install width. */
.alignwide {
    max-width: var(--wp--style--global--wide-size, 1200px);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: none;
}

/* v1.8 — Block/FSE structural content-region compatibility
 * bioMECI owns the outer page shell. Theme and plugin/FSE templates should
 * place their primary content inside the same responsive main column.
 *
 * Theme templates carry .biomeci-main explicitly. Plugin-provided FSE
 * templates (including BetterDocs) often render their primary Group directly
 * beneath .wp-site-blocks, so the final selector gives those templates the
 * same content-region geometry without changing their internal block layout. */
.biomeci-main,
.wp-site-blocks > .wp-block-group {
    margin-left: 35%;
    max-width: 54em;
    padding: 4em;
    width: calc(100% - 35%);
}

/* BetterDocs may use full/wide blocks internally. Within the bioMECI shell,
 * those alignments are full/wide relative to the main column, not the viewport. */
.biomeci-main .alignfull,
.wp-site-blocks > .wp-block-group .alignfull {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.biomeci-main .alignwide,
.wp-site-blocks > .wp-block-group .alignwide {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.biomeci-main .betterdocs-wrapper,
.biomeci-main .betterdocs-content-wrapper,
.wp-site-blocks > .wp-block-group .betterdocs-wrapper,
.wp-site-blocks > .wp-block-group .betterdocs-content-wrapper {
    max-width: 100%;
}

@media screen and (max-width: 1280px) {
    .biomeci-main,
    .wp-site-blocks > .wp-block-group {
        margin-left: 30%;
        max-width: none;
        padding: 6em 3em 3em;
        width: calc(100% - 30%);
    }
}

@media screen and (max-width: 980px) {
    .biomeci-main,
    .wp-site-blocks > .wp-block-group {
        margin: 0;
        max-width: none;
        padding: 6em 4em;
        width: 100%;
    }
}

@media screen and (max-width: 736px) {
    .biomeci-main,
    .wp-site-blocks > .wp-block-group {
        padding: 2.25em 1.5em 0.25em;
    }
}


/* v1.9 — Responsive / browser-zoom robustness
 * Browser zoom changes the effective CSS viewport width. On desktop, keep the
 * bioMECI sidebar and content column tied to one fluid measurement so they do
 * not jump out of sync when the viewport crosses the legacy 1280px breakpoint.
 * The existing <=980px stacked/mobile layout remains the hand-off point. */
@media screen and (min-width: 981px) {
    :root {
        --biomeci-sidebar-width: clamp(320px, 32vw, 600px);
        --biomeci-shell-pad-x: clamp(2.5em, 3.25vw, 4em);
        --biomeci-shell-pad-y: clamp(3em, 4vw, 6em);
    }

    #header {
        width: var(--biomeci-sidebar-width);
        padding: var(--biomeci-shell-pad-y) var(--biomeci-shell-pad-x);
    }

    #header .companyname {
        font-size: clamp(3.5em, 5.25vw, 6em);
        line-height: .95;
    }

    #header .companyname-sub {
        font-size: clamp(1em, 1.25vw, 1.5em);
        line-height: 1.25;
    }

    #header .image.avatar {
        width: clamp(11em, 16vw, 16.25em);
        max-width: 100%;
    }

    #main,
    .biomeci-main,
    .wp-site-blocks > .wp-block-group {
        margin-left: var(--biomeci-sidebar-width);
        width: calc(100% - var(--biomeci-sidebar-width));
        padding: var(--biomeci-shell-pad-y) var(--biomeci-shell-pad-x);
    }

    /* Navigation may wrap naturally as the effective viewport changes. */
    #header .biomeci_menu .wp-block-navigation__container {
        flex-wrap: wrap;
        max-width: 100%;
    }
}

/* Keep wide plugin/block content inside its available column at every zoom. */
.biomeci-main *,
.wp-site-blocks > .wp-block-group * {
    min-width: 0;
}

.biomeci-main img,
.biomeci-main video,
.biomeci-main iframe,
.wp-site-blocks > .wp-block-group img,
.wp-site-blocks > .wp-block-group video,
.wp-site-blocks > .wp-block-group iframe {
    max-width: 100%;
}


/* v1.10 — bioMECI Documentation shell for BetterDocs
 * BetterDocs keeps ownership of docs content, search, breadcrumbs, TOC and
 * feedback. On BetterDocs routes, bioMECI supplies a dedicated documentation
 * navigation shell generated from the doc_category taxonomy. */
:root {
    --biomeci-link: #29999b;
    --biomeci-docs-nav-width: clamp(280px, 23vw, 360px);
    --biomeci-docs-border: #e8e8e8;
    --biomeci-docs-muted: #8b8b8b;
}

/* Documentation routes replace the regular bioMECI site sidebar/footer with
 * the docs-only navigation. This deliberately does not affect normal pages. */
body.biomeci-docs-view .wp-site-blocks > header.wp-block-template-part,
body.biomeci-docs-view .wp-site-blocks > footer.wp-block-template-part {
    display: none !important;
}

body.biomeci-docs-view {
    background: #fff;
}

body.biomeci-docs-view .wp-site-blocks {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Override the normal bioMECI content-column geometry on documentation routes. */
body.biomeci-docs-view #main,
body.biomeci-docs-view .biomeci-main,
body.biomeci-docs-view .wp-site-blocks > .wp-block-group {
    margin-left: var(--biomeci-docs-nav-width) !important;
    width: calc(100% - var(--biomeci-docs-nav-width)) !important;
    max-width: none !important;
    padding: clamp(2rem, 4vw, 4.5rem) clamp(2rem, 4vw, 5rem) !important;
    box-sizing: border-box;
}

/* Dedicated BetterDocs navigation rail. */
.biomeci-docs-sidebar {
    position: fixed;
    z-index: 1000;
    inset: 0 auto 0 0;
    width: var(--biomeci-docs-nav-width);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #050505;
    color: #fff;
    padding: 1.75rem 1.4rem 1.4rem;
    box-sizing: border-box;
    font-family: "IBM Plex Sans", sans-serif;
}

body.admin-bar .biomeci-docs-sidebar {
    top: 32px;
}

.biomeci-docs-brand {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: .9rem;
    align-items: center;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.biomeci-docs-brand img {
    display: block;
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 50%;
}

.biomeci-docs-brand-copy a {
    color: #fff !important;
    text-decoration: none !important;
    border: 0 !important;
}

.biomeci-docs-brand-name {
    display: block;
    font-size: 1.7rem;
    line-height: 1;
    font-weight: 400;
    letter-spacing: -.02em;
}

.biomeci-docs-brand-subtitle {
    display: block;
    margin-top: .42rem;
    color: rgba(255,255,255,.68);
    font-size: .73rem;
    line-height: 1.3;
}

.biomeci-docs-menu-toggle {
    display: none;
    appearance: none;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    padding: .5rem .7rem;
    font: inherit;
    cursor: pointer;
}

.biomeci-docs-search {
    position: relative;
    margin: 1.25rem 0 1rem;
}

.biomeci-docs-search input[type="search"] {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: .58rem .75rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 5px;
    background: rgba(255,255,255,.055);
    color: #fff;
    font: inherit;
    font-size: .86rem;
    box-shadow: none;
}

.biomeci-docs-search input[type="search"]::placeholder {
    color: rgba(255,255,255,.48);
}

.biomeci-docs-search input[type="search"]:focus {
    outline: 2px solid var(--biomeci-link);
    outline-offset: 1px;
    border-color: transparent;
}

.biomeci-docs-nav,
.biomeci-docs-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.biomeci-docs-nav {
    padding-bottom: 1.3rem;
}

.biomeci-docs-category {
    margin-top: .18rem;
}

.biomeci-docs-category-row {
    display: grid;
    grid-template-columns: 1.15rem minmax(0, 1fr);
    align-items: center;
    column-gap: .22rem;
    min-width: 0;
}

.biomeci-docs-disclosure,
.biomeci-docs-disclosure-spacer {
    width: 1.15rem;
    height: 1.55rem;
    margin: 0;
    padding: 0;
}

.biomeci-docs-disclosure {
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: rgba(255,255,255,.58);
    box-shadow: none;
    cursor: pointer;
}

.biomeci-docs-disclosure:hover,
.biomeci-docs-disclosure:focus-visible {
    color: var(--biomeci-link);
    background: rgba(255,255,255,.06);
}

.biomeci-docs-disclosure:focus-visible {
    outline: 1px solid var(--biomeci-link);
    outline-offset: 1px;
}

.biomeci-docs-disclosure-icon {
    display: block;
    width: .46rem;
    height: .46rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transform-origin: 55% 55%;
    transition: transform .16s ease;
}

.biomeci-docs-disclosure[aria-expanded="true"] .biomeci-docs-disclosure-icon {
    transform: rotate(45deg);
}

.biomeci-docs-branch[hidden] {
    display: none !important;
}

.biomeci-docs-category-link {
    display: block;
    min-width: 0;
    color: rgba(255,255,255,.94) !important;
    border: 0 !important;
    text-decoration: none !important;
}

/* Top-level category headings. */
.biomeci-docs-category.depth-0 > .biomeci-docs-category-row > .biomeci-docs-category-link {
    padding: .34rem 0;
    font-size: .78rem;
    line-height: 1.35;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .065em;
}

/* The standalone Documentation link above the accordion. */
.biomeci-docs-nav > ul:first-child .biomeci-docs-category-link {
    margin: .7rem 0 .25rem 1.37rem;
    padding: .2rem 0 .35rem;
    color: rgba(255,255,255,.7) !important;
    font-size: .78rem;
    line-height: 1.35;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .065em;
}

.biomeci-docs-category.depth-1 > .biomeci-docs-category-row > .biomeci-docs-category-link,
.biomeci-docs-category.depth-2 > .biomeci-docs-category-row > .biomeci-docs-category-link,
.biomeci-docs-category.depth-3 > .biomeci-docs-category-row > .biomeci-docs-category-link {
    padding: .28rem 0;
    color: rgba(255,255,255,.88) !important;
    text-transform: none;
    letter-spacing: 0;
    font-size: .86rem;
    line-height: 1.3;
    font-weight: 500;
}

/* Nested branches indent as a tree while keeping the disclosure aligned. */
.biomeci-docs-category-list.depth-1,
.biomeci-docs-category-list.depth-2,
.biomeci-docs-category-list.depth-3 {
    margin-left: .78rem;
}

.biomeci-docs-items {
    margin: .08rem 0 .18rem 1.37rem !important;
}

.biomeci-docs-items a {
    display: block;
    padding: .31rem .35rem .31rem .58rem;
    color: rgba(255,255,255,.68) !important;
    border: 0 !important;
    border-left: 2px solid transparent !important;
    text-decoration: none !important;
    font-size: .84rem;
    line-height: 1.3;
}

.biomeci-docs-nav a:hover,
.biomeci-docs-nav a:focus,
.biomeci-docs-nav .is-current > .biomeci-docs-category-row > a,
.biomeci-docs-nav a[aria-current="page"] {
    color: var(--biomeci-link) !important;
}

.biomeci-docs-nav .biomeci-docs-items .is-current > a,
.biomeci-docs-nav .biomeci-docs-items a[aria-current="page"] {
    border-left-color: var(--biomeci-link) !important;
    background: rgba(41,153,155,.09);
}

.biomeci-docs-sidebar-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.58);
    font-size: .76rem;
    line-height: 1.5;
}

.biomeci-docs-sidebar-footer a {
    color: var(--biomeci-link) !important;
    border: 0 !important;
    text-decoration: none !important;
}

/* BetterDocs visual integration: typography and bioMECI link/accent colour. */
body.biomeci-docs-view .betterdocs-wrapper,
body.biomeci-docs-view .betterdocs-content-wrapper,
body.biomeci-docs-view [class*="betterdocs-"] {
    font-family: "IBM Plex Sans", sans-serif;
}

body.biomeci-docs-view a,
body.biomeci-docs-view .betterdocs-wrapper a,
body.biomeci-docs-view [class*="betterdocs-"] a {
    --betterdocs-primary-color: var(--biomeci-link);
}

body.biomeci-docs-view .betterdocs-wrapper a,
body.biomeci-docs-view .betterdocs-content-wrapper a,
body.biomeci-docs-view .betterdocs-toc a,
body.biomeci-docs-view [class*="betterdocs-"] a:hover {
    color: var(--biomeci-link);
}

/* Prefer the custom docs rail over BetterDocs' redundant left category rail
 * on single/category layouts, while retaining BetterDocs' article TOC. */
body.biomeci-docs-view .betterdocs-sidebar,
body.biomeci-docs-view .betterdocs-sidebar-wrapper,
body.biomeci-docs-view .betterdocs-category-sidebar {
    display: none !important;
}

body.biomeci-docs-view .betterdocs-content-area,
body.biomeci-docs-view .betterdocs-single-content,
body.biomeci-docs-view .betterdocs-content-wrapper {
    max-width: 100%;
}

/* Keep the article TOC visually light and sticky when BetterDocs provides it. */
body.biomeci-docs-view .betterdocs-toc,
body.biomeci-docs-view .betterdocs-toc-wrapper,
body.biomeci-docs-view .betterdocs-toc-container {
    border-left: 1px solid var(--biomeci-docs-border);
}

@media screen and (min-width: 1201px) {
    body.biomeci-docs-view .betterdocs-toc,
    body.biomeci-docs-view .betterdocs-toc-wrapper,
    body.biomeci-docs-view .betterdocs-toc-container {
        position: sticky;
        top: 2rem;
    }
}

/* Search and category cards should feel like the bioMECI site, not a second
 * visual system. These selectors are intentionally broad enough to survive
 * BetterDocs layout/pattern changes without touching plugin files. */
body.biomeci-docs-view [class*="betterdocs-search"] input,
body.biomeci-docs-view [class*="betterdocs-search"] input[type="search"] {
    border-color: #d9d9d9 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
}

body.biomeci-docs-view [class*="betterdocs-search"] button,
body.biomeci-docs-view [class*="betterdocs-search"] input[type="submit"] {
    background: var(--biomeci-link) !important;
    border-color: var(--biomeci-link) !important;
    color: #fff !important;
    border-radius: 4px !important;
}

body.biomeci-docs-view [class*="betterdocs-category"] {
    --betterdocs-primary-color: var(--biomeci-link);
}

/* Editor preview: BetterDocs posts use the site typeface and link colour. */
.editor-styles-wrapper.post-type-docs,
.post-type-docs .editor-styles-wrapper {
    font-family: "IBM Plex Sans", sans-serif;
}

.post-type-docs .editor-styles-wrapper a {
    color: var(--biomeci-link);
}

/* Documentation tablet/mobile behaviour: the docs rail becomes a compact
 * top navigation rather than forcing a long sidebar above the article. */
@media screen and (max-width: 980px) {
    body.biomeci-docs-view .wp-site-blocks > .wp-block-group,
    body.biomeci-docs-view #main,
    body.biomeci-docs-view .biomeci-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 2rem 1.5rem !important;
    }

    .biomeci-docs-sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        max-height: none;
        padding: .85rem 1rem;
        overflow: visible;
    }

    body.admin-bar .biomeci-docs-sidebar {
        top: 32px;
    }

    .biomeci-docs-brand {
        grid-template-columns: 42px 1fr auto;
        padding: 0;
        border: 0;
    }

    .biomeci-docs-brand img {
        width: 42px;
        height: 42px;
    }

    .biomeci-docs-brand-name {
        font-size: 1.3rem;
    }

    .biomeci-docs-brand-subtitle {
        display: none;
    }

    .biomeci-docs-menu-toggle {
        display: inline-block;
    }

    .biomeci-docs-sidebar-panel {
        display: none;
        padding-top: .8rem;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }

    .biomeci-docs-sidebar.is-open .biomeci-docs-sidebar-panel {
        display: block;
    }
}

@media screen and (max-width: 782px) {
    body.admin-bar .biomeci-docs-sidebar {
        top: 46px;
    }
}


/* v1.12 — BetterDocs alignment and navigation refinement
 * Keep documentation visually aligned with the established bioMECI content
 * geometry while preserving BetterDocs' own article/template functionality. */
@media screen and (min-width: 981px) {
    body.biomeci-docs-view #main,
    body.biomeci-docs-view .biomeci-main,
    body.biomeci-docs-view .wp-site-blocks > .wp-block-group {
        padding: var(--biomeci-shell-pad-y) var(--biomeci-shell-pad-x) !important;
    }

    /* BetterDocs frequently centres its single-doc shell inside the available
       area. Anchor it to the bioMECI content edge and use the site's reading
       width so docs and ordinary pages begin at a comparable position. */
    body.biomeci-docs-view .betterdocs-wrapper,
    body.biomeci-docs-view .betterdocs-content-wrapper,
    body.biomeci-docs-view .betterdocs-single-wrapper,
    body.biomeci-docs-view .betterdocs-single-layout,
    body.biomeci-docs-view .betterdocs-content-area {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    body.single-docs.biomeci-docs-view .betterdocs-single-content,
    body.single-docs.biomeci-docs-view .betterdocs-content-area {
        width: 100% !important;
        max-width: 54em !important;
    }
}

/* Let ordinary article media follow the same sizing rules as bioMECI pages. */
body.single-docs.biomeci-docs-view .betterdocs-single-content img,
body.single-docs.biomeci-docs-view .betterdocs-content-area img,
body.single-docs.biomeci-docs-view .entry-content img {
    max-width: 100%;
    height: auto;
}

/* Make the docs identity use the rail more confidently. */
.biomeci-docs-brand {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 1rem;
}

.biomeci-docs-brand img {
    width: 68px;
    height: 68px;
}

.biomeci-docs-brand-name {
    font-size: 1.9rem;
}

.biomeci-docs-brand-subtitle {
    font-size: .8rem;
    color: rgba(255,255,255,.78);
}

/* Larger docs navigation, while intentionally leaving the search field alone. */
.biomeci-docs-category.depth-0 > .biomeci-docs-category-row > .biomeci-docs-category-link,
.biomeci-docs-nav > ul:first-child .biomeci-docs-category-link {
    font-size: .9rem;
}

.biomeci-docs-category.depth-1 > .biomeci-docs-category-row > .biomeci-docs-category-link,
.biomeci-docs-category.depth-2 > .biomeci-docs-category-row > .biomeci-docs-category-link,
.biomeci-docs-category.depth-3 > .biomeci-docs-category-row > .biomeci-docs-category-link {
    font-size: .96rem;
}

.biomeci-docs-items a {
    font-size: .94rem;
    color: rgba(255,255,255,.9) !important;
}

/* Documentation is a real archive link, not a muted section label. */
.biomeci-docs-nav > ul:first-child .biomeci-docs-category-link {
    color: #fff !important;
}

.biomeci-docs-nav > ul:first-child .is-current > .biomeci-docs-category-link,
.biomeci-docs-nav > ul:first-child .biomeci-docs-category-link[aria-current="page"] {
    color: var(--biomeci-link) !important;
    border-left: 2px solid var(--biomeci-link) !important;
    padding-left: .58rem;
    background: rgba(41,153,155,.09);
}

/* Inactive article links stay readable; active state keeps the teal treatment. */
.biomeci-docs-nav .biomeci-docs-items a:hover,
.biomeci-docs-nav .biomeci-docs-items a:focus {
    color: var(--biomeci-link) !important;
}

.biomeci-docs-sidebar-footer {
    font-size: .88rem;
}

.biomeci-docs-sidebar-footer p:first-child,
.biomeci-docs-sidebar-footer p:nth-child(2) {
    font-size: .94rem;
}

.biomeci-docs-sidebar-footer p:last-child {
    font-size: .76rem;
}

/* v1.13 — BetterDocs source-of-truth navigation
 * The documentation rail contains only categories/docs returned by BetterDocs.
 * No synthetic "Documentation" entry and no default-open category are added by
 * the theme. Active category ancestors still open automatically. */
.biomeci-docs-nav > .biomeci-docs-category-list.depth-0 {
    margin-top: .7rem !important;
}


/* v1.16 — BetterDocs compact navigation + zoom-safe docs identity.
 * Built from v1.13 to restore the known-good BetterDocs article rendering.
 * Caption overrides from v1.14/v1.15 are intentionally NOT included. */

.biomeci-docs-category { margin-top: .09rem; }

.biomeci-docs-category.depth-0 > .biomeci-docs-category-row > .biomeci-docs-category-link {
    padding-top: .17rem;
    padding-bottom: .17rem;
}

.biomeci-docs-category.depth-1 > .biomeci-docs-category-row > .biomeci-docs-category-link,
.biomeci-docs-category.depth-2 > .biomeci-docs-category-row > .biomeci-docs-category-link,
.biomeci-docs-category.depth-3 > .biomeci-docs-category-row > .biomeci-docs-category-link {
    padding-top: .14rem;
    padding-bottom: .14rem;
}

.biomeci-docs-items {
    margin-top: .04rem !important;
    margin-bottom: .09rem !important;
}

.biomeci-docs-items a {
    padding-top: .155rem;
    padding-bottom: .155rem;
}

/* Keep the documentation identity from wrapping unpredictably at browser zoom. */
.biomeci-docs-brand {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: .75rem;
}

.biomeci-docs-brand img {
    width: 56px;
    height: 56px;
}

.biomeci-docs-brand-copy,
.biomeci-docs-brand-copy a {
    min-width: 0;
}

.biomeci-docs-brand-name {
    white-space: nowrap;
    font-size: clamp(1.55rem, 1.65vw, 1.9rem);
}

.biomeci-docs-brand-subtitle {
    white-space: nowrap;
    font-size: clamp(.68rem, .66vw, .8rem);
}


/* v1.19 — BetterDocs caption moved below image by JS.
 * No BetterDocs figure/image geometry is overridden. */
body.biomeci-docs-view .biomeci-doc-caption {
    display: block;
    margin: 8px 0 1.5em;
    padding: 0;
    text-align: center;
    font-size: 0.85em;
    line-height: 1.4;
    color: #666;
    background: transparent;
}


/* v1.20 — Dox Navigation is now sourced from WordPress Navigation blocks.
 * The existing accordion classes are retained, so this only changes where the
 * hierarchy comes from, not the documentation rail's visual language. */
.biomeci-docs-menu-label {
    cursor: default;
}

.biomeci-docs-nav-empty {
    margin: .8rem 0 1rem;
    padding: .7rem .8rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 4px;
    color: rgba(255,255,255,.66);
    font-size: .78rem;
    line-height: 1.45;
}


/* v1.22 — embedded BetterDocs document content */
.biomeci-embedded-doc {
    width: 100%;
    max-width: 100%;
}

/* v1.23 — title for BetterDocs content embedded with [biomeci_doc] */
.biomeci-embedded-doc-title {
    margin-top: 0;
}


/* v1.25 — shortcode output uses BetterDocs' native single-content wrappers.
 * Keep the embedded wrapper neutral and let BetterDocs control typography. */
.biomeci-embedded-doc {
    width: auto;
    max-width: none;
    margin: 0;
}


/* v1.29 — regular bioMECI mobile Navigation overlay.
 * WordPress defaults the responsive Navigation panel to white, while the
 * bioMECI header menu uses light links. Keep the mobile panel in the site's
 * black visual system and make its menu explicit and readable.
 * Scoped away from the separate BetterDocs/Dox navigation. */
@media screen and (max-width: 980px) {
    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container.is-menu-open {
        background: #000 !important;
        color: #fff !important;
        padding: 2.25rem 1.5rem !important;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-dialog,
    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container-content {
        width: 100%;
        height: 100%;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container-content {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: .55rem !important;
        width: 100%;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation-item {
        width: auto;
        font-size: 1.15rem;
        line-height: 1.45;
        text-align: center;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation-item__content,
    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container a {
        color: rgba(255,255,255,.82) !important;
        text-decoration: none !important;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation-item__content:hover,
    body:not(.biomeci-docs-view) #header .biomeci_menu .current-menu-item > .wp-block-navigation-item__content {
        color: #29999b !important;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container-close {
        color: #fff !important;
        top: 1.25rem;
        right: 1.25rem;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container-close svg,
    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container-close svg path {
        fill: currentColor !important;
    }
}


/* v1.30 — mobile identity refinements */

/* Keep the BetterDocs tagline visible on compact layouts. */
@media screen and (max-width: 980px) {
    body.biomeci-docs-view .biomeci-docs-brand-copy {
        display: block !important;
    }

    body.biomeci-docs-view .biomeci-docs-brand-subtitle {
        display: block !important;
        white-space: normal !important;
        line-height: 1.25;
        margin-top: .1rem;
        max-width: 22em;
    }
}

/* Identity injected into the regular site's WordPress mobile navigation overlay. */
@media screen and (max-width: 980px) {
    body:not(.biomeci-docs-view) #header .biomeci-mobile-overlay-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .85rem;
        width: 100%;
        margin: 1.5rem auto 2rem;
        text-align: left;
    }

    body:not(.biomeci-docs-view) #header .biomeci-mobile-overlay-brand img {
        width: 64px;
        height: 64px;
        object-fit: cover;
        border-radius: 50%;
        flex: 0 0 auto;
    }

    body:not(.biomeci-docs-view) #header .biomeci-mobile-overlay-brand-text {
        display: block;
        min-width: 0;
    }

    body:not(.biomeci-docs-view) #header .biomeci-mobile-overlay-brand-name {
        display: block;
        color: #fff;
        font-size: 1.8rem;
        line-height: 1;
        font-weight: 400;
        white-space: nowrap;
    }

    body:not(.biomeci-docs-view) #header .biomeci-mobile-overlay-brand-tagline {
        display: block;
        margin-top: .35rem;
        color: rgba(255,255,255,.78);
        font-size: .82rem;
        line-height: 1.3;
        max-width: 19em;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container-content {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 3.5rem;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
        flex: 0 0 auto;
    }
}


/* v1.31 — mobile overlay identity must never appear in desktop header. */
body:not(.biomeci-docs-view) #header .biomeci-mobile-overlay-brand {
    display: none;
}

@media screen and (max-width: 980px) {
    body:not(.biomeci-docs-view) #header .biomeci-mobile-overlay-brand {
        display: flex;
    }
}


/* v1.34 — responsive navigation strategy
 *
 * > 980px  : normal desktop navigation
 * 600-980px: regular horizontal/tablet navigation
 * < 600px  : hamburger + full-screen overlay
 *
 * This intentionally follows WordPress Navigation's native small-screen
 * breakpoint instead of forcing the hamburger layout across tablet widths.
 */

/* Tablet range: keep the standard inline navigation visible and compact. */
@media screen and (min-width: 600px) and (max-width: 980px) {
    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-container-open {
        display: none !important;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-container {
        display: block !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        background: transparent !important;
        color: inherit !important;
        overflow: visible !important;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-close,
    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-dialog,
    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-container-content {
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-container-close {
        display: none !important;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-container-content {
        display: block !important;
        padding: 0 !important;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: .35em !important;
        width: 100%;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu .wp-block-navigation-item {
        width: auto !important;
        font-size: 0.8em !important;
        line-height: 1.5em !important;
        text-align: center;
    }

    body:not(.biomeci-docs-view) #header .biomeci-mobile-overlay-brand {
        display: none !important;
    }
}

/* Phone range: use the full-screen overlay identity/menu from v1.31. */
@media screen and (max-width: 599px) {
    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-container.is-menu-open {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        max-width: none !important;
        height: 100vh !important;
        min-height: 100vh !important;
        margin: 0 !important;
        z-index: 100000 !important;
        overflow-y: auto !important;
        box-sizing: border-box !important;
    }

    body:not(.biomeci-docs-view) #header .biomeci_menu
    .wp-block-navigation__responsive-container.is-menu-open
    .biomeci-mobile-overlay-brand {
        display: flex !important;
    }
}
