.wp-block-biomes-eeat-author-box,
.wp-block-biomes-eeat-author-box.biomes-eeat-box,
.biomes-eeat-box {
    box-sizing: border-box;
    clear: both;
    float: none;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: static !important;
    transform: none !important;
    z-index: auto !important;
}

.wp-block-biomes-eeat-author-box.alignwide,
.wp-block-biomes-eeat-author-box.alignfull,
.wp-block-biomes-eeat-author-box.biomes-eeat-box.alignwide,
.wp-block-biomes-eeat-author-box.biomes-eeat-box.alignfull {
    width: min(100%, 780px) !important;
    max-width: 780px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.wp-block-biomes-eeat-author-box.biomes-eeat-box,
.biomes-eeat-box {
    display: block;
    width: min(100%, 780px);
    max-width: 780px;
    border: 1px solid #E4E0DB;
    border-radius: 12px;
    background: #FFFFFF;
    padding: 26px 34px;
    margin-top: 34px;
    margin-bottom: 50px;
    min-height: 0;
    font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #202020;
    overflow: visible;
}

.biomes-eeat-box *,
.biomes-eeat-box *::before,
.biomes-eeat-box *::after {
    box-sizing: border-box;
}

.biomes-eeat-box + *,
.wp-block-biomes-eeat-author-box + * {
    clear: both;
}

.biomes-eeat-author,
.biomes-eeat-review,
.biomes-eeat-meta {
    min-width: 0;
    max-width: 100%;
    margin-right: 0;
    position: static !important;
    transform: none !important;
}

/* Desktop editorial-card layout. The section itself becomes a two-column card:
   avatar on the left, all text/meta on the right. This avoids the wide table-row look
   and creates balanced internal spacing. */
.wp-block-biomes-eeat-author-box.biomes-eeat-box,
.biomes-eeat-box {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    column-gap: 22px;
    row-gap: 10px;
    align-items: start;
    align-content: start;
}

.biomes-eeat-author {
    display: contents;
    min-height: 0;
}

.biomes-eeat-avatar-link {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex: 0 0 118px;
    width: 118px;
    height: 100%;
    min-height: 104px;
    border-radius: 14px;
    text-decoration: none;
    background: #EAF3FF;
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: stretch;
    margin-top: 0;
    overflow: hidden;
}

.biomes-eeat-avatar-link--broken::after {
    content: attr(data-initial);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 104px;
    border: 2px solid #1E2C99;
    border-radius: 14px;
    background: #EAF3FF;
    color: #1E2C99;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.biomes-eeat-avatar {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 104px;
    border: 2px solid #1E2C99;
    border-radius: 14px;
    background: #EAF3FF;
    object-fit: cover;
    color: #1E2C99;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.biomes-eeat-author-text {
    min-width: 0;
    max-width: 100%;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding-top: 0;
}

.biomes-eeat-author-name {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    max-width: 100%;
    color: #1E2C99;
    font-weight: 800;
    font-size: 19px;
    line-height: 1.18;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.biomes-eeat-author-name:hover,
.biomes-eeat-author-name:focus {
    color: #1E2C99;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.biomes-eeat-author-arrow {
    color: #FF5B35;
    font-size: 0.9em;
    line-height: 1;
}

.biomes-eeat-author-role {
    margin-top: 3px;
    color: #333333;
    font-size: 14px;
    line-height: 1.3;
    overflow-wrap: normal;
}

.biomes-eeat-review {
    display: block;
    grid-column: 2;
    grid-row: 2;
    margin-top: 4px;
    margin-left: 0;
    padding: 0;
    border: 0;
    align-self: start;
}

.biomes-eeat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: auto;
    max-width: 100%;
    border-radius: 20px;
    background: #EAF3FF;
    padding: 7px 14px;
    color: #1E2C99;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

.biomes-eeat-pill strong {
    font-weight: 800;
}

.biomes-eeat-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 20px;
    min-height: 0;
    grid-column: 2;
    grid-row: 3;
    margin-top: 0;
    margin-left: 0;
    padding: 0;
    border: 0;
}

.biomes-eeat-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #333333;
    font-size: 13px;
    line-height: 1.25;
    white-space: normal;
}

.biomes-eeat-meta-label {
    color: #1E2C99;
    font-weight: 800;
}

.biomes-eeat-meta-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: #2C75E6;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.biomes-eeat-box--editor {
    margin-top: 12px;
    margin-bottom: 12px;
}

.biomes-eeat-inline-select {
    margin: 8px 0 12px;
    padding: 12px;
    border: 1px solid #E4E0DB;
    border-radius: 8px;
    background: #FFFFFF;
}

@media (max-width: 1160px) and (min-width: 901px) {
    .wp-block-biomes-eeat-author-box.biomes-eeat-box,
    .biomes-eeat-box {
        width: min(100%, 740px);
        max-width: 740px;
        padding: 24px 30px;
        min-height: 0;
    }
}

/* Placement inside the BIOMES article body. Keep the card visually separated from
   the breadcrumb line, but not floating in an oversized gap. */
@media (min-width: 901px) {
    .entry__content > .wp-block-biomes-eeat-author-box.biomes-eeat-box:first-child,
    .entry__content > .biomes-eeat-box:first-child {
        margin-top: 34px !important;
        margin-bottom: 52px !important;
    }

    .entry__content > .wp-block-biomes-eeat-author-box.biomes-eeat-box:first-child + *,
    .entry__content > .biomes-eeat-box:first-child + * {
        margin-top: 0 !important;
    }
}

/* Theme fix: on mobile the BIOMES post stage has height:0 and an absolutely positioned H1.
   Reserve real document-flow height for that stage when this plugin is present. */
@media (max-width: 900px) {
    body.biomes-eeat-has-box .stage--entry.stage.biomes-eeat-stage-fixed {
        height: auto !important;
        min-height: var(--biomes-eeat-stage-min-height, 180px) !important;
        margin-bottom: 24px !important;
        overflow: visible !important;
    }

    body.biomes-eeat-has-box .stage--entry.stage.biomes-eeat-stage-fixed .stage__header--entry {
        overflow: visible !important;
    }

    body .wp-block-biomes-eeat-author-box.biomes-eeat-box,
    body .biomes-eeat-box {
        display: block !important;
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px) !important;
        height: auto !important;
        min-height: 0 !important;
        clear: both !important;
        float: none !important;
        position: static !important;
        inset: auto !important;
        transform: none !important;
        z-index: auto !important;
        padding: 18px 24px !important;
        margin-top: 18px !important;
        margin-right: 12px !important;
        margin-bottom: 36px !important;
        margin-left: 12px !important;
        overflow: hidden !important;
        border-radius: 12px !important;
    }

    body .biomes-eeat-author {
        display: grid !important;
        grid-template-columns: 54px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 14px !important;
        width: 100% !important;
    }


    body .biomes-eeat-avatar-link {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 0 !important;
        border-radius: 999px !important;
        overflow: visible !important;
        align-self: center !important;
    }

    body .biomes-eeat-avatar,
    body .biomes-eeat-avatar-link--broken::after {
        min-height: 0 !important;
        border-radius: 999px !important;
        font-size: 19px !important;
    }

    body .biomes-eeat-review {
        display: block !important;
        width: 100% !important;
        margin-top: 16px !important;
        margin-left: 0 !important;
        padding-top: 0 !important;
        padding-left: 0 !important;
        border-left: 0 !important;
    }

    body .biomes-eeat-pill {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        padding: 9px 14px !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        text-align: left !important;
        line-height: 1.3 !important;
        border-radius: 20px !important;
        font-size: 14px !important;
    }

    body .biomes-eeat-meta {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        min-height: 0 !important;
        gap: 10px !important;
        margin-top: 16px !important;
        margin-left: 0 !important;
        padding-top: 16px !important;
        padding-left: 0 !important;
        border-left: 0 !important;
        border-top: 1px solid #E4E0DB !important;
    }

    body .biomes-eeat-meta-item {
        display: grid !important;
        grid-template-columns: 18px auto minmax(0, 1fr) !important;
        align-items: center !important;
        column-gap: 8px !important;
        row-gap: 2px !important;
        min-width: 0 !important;
        white-space: normal !important;
    }

    body .biomes-eeat-meta-item > span:last-child,
    body .biomes-eeat-meta-item > time {
        min-width: 0 !important;
        overflow-wrap: anywhere !important;
    }
}

@media (max-width: 520px) {
    body .wp-block-biomes-eeat-author-box.biomes-eeat-box,
    body .biomes-eeat-box {
        padding: 18px 24px !important;
    }

    body .biomes-eeat-author {
        grid-template-columns: 48px minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    body .biomes-eeat-avatar-link,
    body .biomes-eeat-avatar,
    body .biomes-eeat-avatar-link--broken::after {
        flex-basis: 48px !important;
        width: 48px !important;
        height: 48px !important;
        line-height: 48px !important;
    }

    body .biomes-eeat-author-name {
        font-size: 18px !important;
        line-height: 1.2 !important;
    }

    body .biomes-eeat-author-role {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    body .biomes-eeat-pill {
        font-size: 13px !important;
        padding: 9px 12px !important;
    }

    body .biomes-eeat-meta-item {
        grid-template-columns: 18px auto minmax(0, 1fr) !important;
        font-size: 14px !important;
    }
}
