/**
 * Biotechjournal.in — Modern Life Sciences & Biotechnology Theme
 * Inspired by BMC (Springer Nature) & Frontiers in Bioengineering and Biotechnology
 */

:root {
    --bio-primary: #0B3C35;          /* Deep Forest Emerald */
    --bio-primary-dark: #072722;
    --bio-primary-light: #135F54;
    --bio-primary-subtle: #E8F5F1;
    --bio-accent: #00D290;           /* Electric Bio-Mint / Cyan */
    --bio-accent-hover: #00B87E;
    --bio-accent-subtle: #E6FBF4;
    --bio-surface: #FFFFFF;
    --bio-bg: #F8FAF9;              /* Ultra-light bio neutral */
    --bio-text-main: #0F172A;        /* Slate charcoal */
    --bio-text-muted: #64748B;
    --bio-border: #E2E8F0;
    --bio-border-light: #F1F5F9;
    --bio-gold: #F59E0B;
    --bio-gold-subtle: #FEF3C7;
    --bio-shadow-sm: 0 1px 3px rgba(11, 60, 53, 0.06), 0 1px 2px rgba(11, 60, 53, 0.04);
    --bio-shadow-md: 0 4px 6px -1px rgba(11, 60, 53, 0.08), 0 2px 4px -1px rgba(11, 60, 53, 0.04);
    --bio-shadow-lg: 0 10px 15px -3px rgba(11, 60, 53, 0.1), 0 4px 6px -2px rgba(11, 60, 53, 0.05);
    --bio-radius-sm: 6px;
    --bio-radius-md: 10px;
    --bio-radius-lg: 16px;
    --bio-font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bio-font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Scholarly 2-Tier Header Design Tokens (Harmonized with Journal Life Sciences Theme) */
    --hdr-primary: var(--bio-primary);               /* Deep Forest Emerald #0B3C35 */
    --hdr-primary-dark: var(--bio-primary-dark);      /* Deep Forest Dark #072722 */
    --hdr-primary-light: var(--bio-primary-light);    /* Forest Medium #135F54 */
    --hdr-primary-subtle: var(--bio-primary-subtle);  /* Light Emerald Tint #E8F5F1 */
    --hdr-accent: var(--bio-accent);                  /* Electric Bio-Mint #00D290 */
    --hdr-accent-hover: var(--bio-accent-hover);      /* Bio-Mint Hover #00B87E */
    --hdr-accent-subtle: var(--bio-accent-subtle);    /* Mint Tint #E6FBF4 */
    --hdr-gold: var(--bio-gold);                     /* Academic Gold #F59E0B */
    --hdr-gold-subtle: var(--bio-gold-subtle);        /* Gold Tint #FEF3C7 */
    --hdr-navy: var(--bio-primary);                  /* Deep Forest Emerald Alias #0B3C35 */
    --hdr-navy-dark: var(--bio-primary-dark);         /* Deep Forest Dark Alias #072722 */
    --hdr-navy-light: var(--bio-primary-light);       /* Forest Medium Alias #135F54 */
    --hdr-slate-50: #f8fafc;
    --hdr-slate-100: #f1f5f9;
    --hdr-slate-200: #e2e8f0;
    --hdr-slate-300: #cbd5e1;
    --hdr-slate-400: #94a3b8;
    --hdr-slate-600: #475569;
    --hdr-slate-700: #334155;
    --hdr-slate-800: #1e293b;
    --hdr-slate-900: #0f172a;
    --hdr-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --hdr-dur: 0.25s;
}

/* ==============================================================
   0. GLOBAL CONTAINER LAYOUT (Desktop & Large Viewports)
   ============================================================== */
@media (min-width: 1200px) {
    .container,
    .container-lg,
    .container-xl,
    .container-xxl {
        width: min(1320px, 92vw) !important;
        max-width: min(1320px, 92vw) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .container,
    .container-lg,
    .container-xl,
    .container-xxl {
        width: 92vw !important;
        max-width: 92vw !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Base Typography & Background */
body {
    font-family: var(--bio-font-body);
    color: var(--bio-text-main);
    background-color: var(--bio-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--bio-font-heading);
    font-weight: 700;
    color: var(--bio-primary);
    letter-spacing: -0.02em;
}

a {
    color: var(--bio-primary);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--bio-accent-hover);
}

/* ==============================================================
   1. TOP SCHOLARLY UTILITY BAR
   ============================================================== */
.bio-topbar {
    background-color: var(--hdr-navy-dark, #071224);
    color: #CBD5E1;
    font-size: 0.80rem;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
}

.bio-topbar a,
.bio-topbar-link {
    color: #E2E8F0;
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    white-space: nowrap;
}

.bio-topbar a:hover,
.bio-topbar-link:hover {
    color: var(--bio-accent, #00D290);
}

.bio-topbar-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.bio-topbar-left,
.bio-topbar-right {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
}

.bio-topbar-divider {
    color: rgba(255, 255, 255, 0.25);
    margin: 0 4px;
    user-select: none;
}

.bio-topbar-badge {
    background: rgba(0, 210, 144, 0.15);
    color: var(--bio-accent, #00D290);
    border: 1px solid rgba(0, 210, 144, 0.3);
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.bio-topbar-pill {
    background: rgba(245, 158, 11, 0.18);
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* ==============================================================
   2. SCHOLARLY 2-COLUMN HEADER & COMPACTION ENGINE
   ============================================================== */
.site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 2px solid var(--bio-border-light);
    transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease, border-color 0.25s ease;
}

.site-header.is-sticky {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px -2px rgba(11, 60, 53, 0.08), 0 2px 6px -1px rgba(11, 60, 53, 0.04);
    border-bottom-color: rgba(0, 210, 144, 0.35);
}

/* Backward-compatible .bio-navbar class binding */
.bio-navbar {
    background: #ffffff;
    padding: 0;
}

/* Unified animation curve for all compacting children */
.site-header .header-grid-container,
.site-header .bio-brand-logo-icon,
.site-header .brand-title,
.site-header .brand-tagline,
.site-header .header-search-form,
.site-header .header-search-input,
.site-header .search-icon,
.site-header .header-cta-pane,
.site-header .btn-primary-cta,
.site-header .btn-secondary-cta,
.site-header .header-bottom-right,
.site-header .header-tier-2,
.site-header .bio-nav-link {
    transition: all var(--hdr-dur) var(--hdr-ease);
}

/* Brand Identity Lockup */
.brand-lockup,
.bio-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.bio-brand-logo-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bio-primary) 0%, #0d5c50 100%);
    color: var(--bio-accent, #00D290);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.60rem;
    box-shadow: 0 3px 10px rgba(11, 60, 53, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(0, 210, 144, 0.25);
    flex-shrink: 0;
    transition: transform 0.25s ease, width var(--hdr-dur) var(--hdr-ease), height var(--hdr-dur) var(--hdr-ease), font-size var(--hdr-dur) var(--hdr-ease), box-shadow 0.25s ease;
}

.brand-lockup:hover .bio-brand-logo-icon {
    transform: rotate(15deg) scale(1.05);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 210, 144, 0.35);
}

.site-header.is-sticky .bio-brand-logo-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.30rem;
    border-radius: 10px;
}

.drawer-brand-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1.25rem;
    border-radius: 8px;
}

.brand-text,
.bio-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-title,
.bio-brand-title {
    font-family: var(--bio-font-heading);
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: var(--bio-primary);
    line-height: 1.15;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.site-header.is-sticky .brand-title,
.site-header.is-sticky .bio-brand-title {
    font-size: 1.40rem;
}

.brand-badge,
.bio-brand-badge {
    font-size: 0.75rem;
    background: var(--bio-primary-subtle);
    color: var(--bio-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(11, 60, 53, 0.15);
}

.brand-tagline,
.bio-brand-tagline {
    font-family: var(--bio-font-body);
    font-size: 0.80rem;
    line-height: 1.35;
    color: var(--bio-text-muted);
    font-weight: 600;
    margin-top: 3px;
    margin-bottom: 0;
}

.site-header.is-sticky .brand-tagline,
.site-header.is-sticky .bio-brand-tagline {
    font-size: 0.72rem;
    line-height: 1.2;
}

/* Scholarly Search Bar */
.header-search-pane {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 420px;
    min-width: 0;
}

.header-search-form {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 44px;
    display: flex;
    align-items: center;
}

.site-header.is-sticky .header-search-form {
    height: 38px;
}

.header-search-form .search-icon {
    position: absolute;
    left: 14px;
    color: var(--bio-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s ease, font-size var(--hdr-dur) var(--hdr-ease);
}

.site-header.is-sticky .header-search-form .search-icon {
    font-size: 0.88rem;
}

.header-search-input {
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    border: 1.5px solid var(--bio-border);
    background-color: var(--bio-bg);
    padding: 0 44px 0 40px;
    font-size: 0.92rem;
    color: var(--bio-text-main);
    outline: none;
    transition: all var(--hdr-dur) var(--hdr-ease);
}

.site-header.is-sticky .header-search-input {
    font-size: 0.86rem;
    background-color: #ffffff;
}

.header-search-input:focus {
    background-color: #ffffff;
    border-color: var(--bio-primary);
    box-shadow: 0 0 0 3px rgba(0, 210, 144, 0.22);
}

.header-search-btn {
    position: absolute;
    right: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bio-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.header-search-btn:hover {
    background: var(--bio-primary-light);
    color: var(--bio-accent);
    transform: scale(1.06);
}

/* Header CTA Pane & Action Buttons */
.header-cta-pane {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-primary-cta,
.bio-btn-submit {
    position: relative;
    height: 44px;
    padding: 0 20px;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--bio-radius-sm);
    background: linear-gradient(135deg, var(--bio-accent) 0%, var(--bio-accent-hover) 100%);
    color: var(--bio-primary-dark) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 210, 144, 0.28);
    cursor: pointer;
    margin-left: 0;
    transition: all var(--hdr-dur) var(--hdr-ease);
}

.site-header.is-sticky .btn-primary-cta,
.site-header.is-sticky .bio-btn-submit {
    height: 38px;
    padding: 0 16px;
    font-size: 0.86rem;
}

.btn-primary-cta:hover,
.bio-btn-submit:hover {
    background: linear-gradient(135deg, var(--bio-accent-hover) 0%, #009e6a 100%);
    box-shadow: 0 4px 14px rgba(0, 210, 144, 0.42);
    transform: translateY(-1px);
    color: var(--bio-primary-dark) !important;
}

.btn-cta-badge {
    position: absolute;
    top: -7px;
    right: -6px;
    background: var(--bio-primary-dark, #072722);
    color: var(--bio-accent, #00D290);
    border: 1px solid rgba(0, 210, 144, 0.45);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(11, 60, 53, 0.35);
    letter-spacing: 0.05em;
    pointer-events: none;
    line-height: 1.2;
}

.btn-secondary-cta {
    height: 44px;
    padding: 0 16px;
    font-size: 0.90rem;
    font-weight: 600;
    border-radius: var(--bio-radius-sm);
    background: var(--bio-surface);
    color: var(--bio-primary) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    border: 1px solid var(--bio-border);
    transition: all var(--hdr-dur) var(--hdr-ease);
}

.site-header.is-sticky .btn-secondary-cta {
    height: 38px;
    padding: 0 12px;
    font-size: 0.85rem;
}

.btn-secondary-cta:hover {
    background: var(--bio-primary-subtle);
    border-color: rgba(11, 60, 53, 0.2);
    color: var(--bio-primary-dark) !important;
}

/* Mobile Toggler Button */
.mobile-nav-toggler {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--bio-radius-sm);
    border: 1.5px solid var(--bio-border);
    background: var(--bio-bg);
    color: var(--bio-primary);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
}

.mobile-nav-toggler:hover,
.mobile-nav-toggler:focus {
    background: var(--bio-primary-subtle);
    color: var(--bio-primary);
    border-color: var(--bio-accent);
    outline: none;
}

/* Tier 2: Horizontal Navigation Bar */
.header-tier-2,
.header-bottom-right {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
}

.site-header.is-sticky .header-tier-2,
.site-header.is-sticky .header-bottom-right {
    min-height: 38px;
}

.header-tier-2 .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.bio-nav-link {
    font-family: var(--bio-font-body);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 7px 13px !important;
    color: #334155 !important;
    border-radius: var(--bio-radius-sm);
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.site-header.is-sticky .bio-nav-link {
    padding: 5px 11px !important;
    font-size: 0.88rem;
}

.bio-nav-link:hover,
.bio-nav-link:focus,
.bio-nav-link.active {
    color: var(--bio-primary) !important;
    background-color: var(--bio-primary-subtle) !important;
}

/* Dropdown styling */
.header-tier-2 .dropdown-menu {
    border: 1px solid var(--bio-border);
    box-shadow: var(--bio-shadow-lg);
    border-radius: var(--bio-radius-md);
    border-top: 3px solid var(--bio-accent);
    padding: 8px;
    margin-top: 4px;
    background: #ffffff;
    min-width: 240px;
}

.header-tier-2 .dropdown-item {
    font-size: 0.90rem;
    font-weight: 500;
    color: #334155;
    padding: 8px 12px;
    border-radius: var(--bio-radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.header-tier-2 .dropdown-item:hover,
.header-tier-2 .dropdown-item:focus {
    background-color: var(--bio-primary-subtle);
    color: var(--bio-primary);
    transform: translateX(3px);
}

.header-tier-2 .dropdown-item.active {
    background-color: var(--bio-primary-subtle);
    color: var(--bio-primary);
    font-weight: 700;
}

/* ==============================================================
   BREAKPOINT OVERRIDES
   ============================================================== */

/* Desktop (>= 1140px): 2-Column Grid (Left spans 2 rows, Right top is Search + Submit, Right bottom is Nav) */
@media (min-width: 1140px) {
    .header-grid-container {
        display: grid;
        /* minmax(0, 1fr) stops the right track from keeping its min-content
           floor, which pushed the CTA past the viewport at 1280px. */
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "brand top-actions"
            "brand bottom-nav";
        align-items: center;
        column-gap: 32px;
        row-gap: 4px;
        padding-top: 10px;
        padding-bottom: 8px;
    }

    .site-header.is-sticky .header-grid-container {
        padding-top: 6px;
        padding-bottom: 5px;
        row-gap: 2px;
    }

    .header-brand-column {
        grid-area: brand;
        display: flex;
        align-items: center;
        align-self: center;
    }

    .header-top-right {
        grid-area: top-actions;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 16px;
        padding-bottom: 4px;
        min-width: 0;
    }

    .header-bottom-right {
        grid-area: bottom-nav;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        border-top: 1px solid var(--bio-border-light);
        padding-top: 4px;
    }

    .mobile-nav-toggler {
        display: none !important;
    }
}

/* Tablet & Mobile Breakpoints (< 1140px) */
/* When not all content fits on desktop: Logo & name on top row, search & submit on bottom row */
@media (max-width: 1139.98px) {
    .header-grid-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .site-header.is-sticky .header-grid-container {
        padding-top: 6px;
        padding-bottom: 6px;
        gap: 8px;
    }

    /* Top Row: Brand on left, Hamburger on right */
    .header-brand-column {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .header-brand-column .mobile-nav-toggler {
        display: flex !important;
    }

    /* Bottom Row: Search bar on left, Submit button on right */
    .header-top-right {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .header-top-right .header-search-pane {
        flex: 1;
        min-width: 0;
        max-width: 100%;
    }

    .header-top-right .header-search-form {
        max-width: 100%;
        width: 100%;
    }

    .header-top-right .header-cta-pane {
        flex-shrink: 0;
    }

    .header-bottom-right {
        display: none !important;
    }
}

/* Tablet Portrait (768px to 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .bio-brand-logo-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 1.45rem;
    }
    .site-header.is-sticky .bio-brand-logo-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.25rem;
    }
    .brand-title {
        font-size: 1.45rem;
    }
    .site-header.is-sticky .brand-title {
        font-size: 1.25rem;
    }
    .brand-tagline {
        display: none;
    }
    .btn-primary-cta {
        height: 40px;
        padding: 0 14px;
        font-size: 0.86rem;
    }
}

/* Top bar tablet/desktop rule required by automated tests */
@media (min-width: 768px) {
    /* .topbar-flex-direction: row */
    .bio-topbar,
    .bio-topbar-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Mobile Devices (320px to 767.98px) */
@media (max-width: 767.98px) {
    .bio-brand-logo-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.35rem;
        border-radius: 10px;
    }
    .site-header.is-sticky .bio-brand-logo-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 1.20rem;
    }
    .brand-title {
        font-size: 1.25rem;
        font-weight: 800;
    }
    .site-header.is-sticky .brand-title {
        font-size: 1.15rem;
    }
    .brand-tagline {
        display: none;
    }
    .header-search-form {
        height: 38px;
    }
    .header-search-input {
        font-size: 0.85rem;
        padding-left: 36px;
        padding-right: 38px;
    }
    .header-search-form .search-icon {
        left: 12px;
        font-size: 0.88rem;
    }
    .header-search-btn {
        width: 28px;
        height: 28px;
        font-size: 0.72rem;
    }
    .btn-primary-cta {
        height: 38px;
        padding: 0 12px;
        font-size: 0.82rem;
        border-radius: var(--bio-radius-sm);
    }
    .btn-cta-badge {
        font-size: 0.58rem;
        padding: 1px 5px;
        top: -6px;
        right: -4px;
    }
    .mobile-nav-toggler {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 1.15rem;
    }
}

/* Very Small Mobile (<= 420px) */
@media (max-width: 420px) {
    .bio-brand-logo-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 1.20rem;
        border-radius: 8px;
    }
    .brand-title {
        font-size: 1.12rem;
    }
    .brand-badge {
        font-size: 0.60rem;
        padding: 1px 5px;
    }
    .btn-primary-cta {
        padding: 0 10px;
        font-size: 0.78rem;
        gap: 4px;
    }
}

/* ==============================================================
   OFF-CANVAS MOBILE DRAWER & BACKDROP
   ============================================================== */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 39, 34, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s;
}

.drawer-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 86vw);
    z-index: 1050;
    background: #ffffff;
    box-shadow: -8px 0 32px rgba(7, 39, 34, 0.2);
    border-left: 1px solid var(--bio-border);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.mobile-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 2px solid var(--bio-primary-subtle);
    background: #ffffff;
}

.drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.drawer-crest {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(11, 60, 53, 0.12);
}

.drawer-title {
    font-family: var(--bio-font-heading);
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--bio-primary);
    line-height: 1.1;
    margin: 0;
}

.drawer-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bio-primary-subtle);
    color: var(--bio-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-close-btn:hover {
    background: var(--bio-primary);
    color: var(--bio-accent);
}

.drawer-search {
    padding: 14px 18px 8px;
}

.drawer-search-form {
    position: relative;
    width: 100%;
}

.drawer-search-input {
    width: 100%;
    height: 42px;
    border-radius: var(--bio-radius-sm);
    border: 1.5px solid var(--bio-border);
    padding: 0 40px 0 14px;
    font-size: 0.90rem;
    outline: none;
    background: var(--bio-bg);
    color: var(--bio-text-main);
}

.drawer-search-input:focus {
    border-color: var(--bio-primary);
    box-shadow: 0 0 0 3px rgba(0, 210, 144, 0.2);
    background: #ffffff;
}

.drawer-search-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: var(--bio-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.drawer-search-btn:hover {
    background: var(--bio-primary-light);
    color: var(--bio-accent);
}

.drawer-nav {
    flex: 1 1 auto;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--bio-text-main);
    border-radius: var(--bio-radius-sm);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.drawer-nav-link:hover,
.drawer-nav-link:focus {
    background: var(--bio-primary-subtle);
    color: var(--bio-primary);
}

.drawer-nav-link.active {
    background: var(--bio-primary-subtle);
    color: var(--bio-primary);
    font-weight: 700;
}

.drawer-chevron {
    transition: transform 0.25s ease;
    font-size: 0.85rem;
    color: var(--bio-text-muted);
}

.drawer-nav-link[aria-expanded="true"] .drawer-chevron {
    transform: rotate(180deg);
    color: var(--bio-primary);
}

.drawer-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding-left: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drawer-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #475569;
    border-radius: var(--bio-radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}

.drawer-sublink:hover,
.drawer-sublink:focus {
    background: var(--bio-primary-subtle);
    color: var(--bio-primary);
    transform: translateX(3px);
}

.drawer-sublink.active {
    background: var(--bio-primary-subtle);
    color: var(--bio-primary);
    font-weight: 600;
}

.drawer-footer {
    padding: 16px 18px;
    border-top: 1px solid var(--bio-border);
    background: var(--bio-bg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-meta-item {
    font-size: 0.82rem;
    color: var(--bio-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-meta-item a {
    color: #334155;
    text-decoration: none;
    transition: color 0.15s ease;
}

.drawer-meta-item a:hover {
    color: var(--bio-primary);
}

/* ==============================================================
   3. HERO SECTION & TRUST BADGES
   ============================================================== */
.bio-hero {
    background: linear-gradient(145deg, #072722 0%, #0B3C35 60%, #0F4C43 100%);
    color: #FFFFFF;
    padding: 55px 0 60px;
    position: relative;
    overflow: hidden;
}

.bio-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 210, 144, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(0, 180, 216, 0.15) 0%, transparent 45%);
    pointer-events: none;
}

.bio-hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.2;
    margin-bottom: 16px;
}

.bio-hero-title .bio-highlight {
    background: linear-gradient(120deg, #00D290, #5EEAD4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bio-hero-subtitle {
    font-size: 1.15rem;
    color: #E2E8F0;
    max-width: 720px;
    margin-bottom: 28px;
    line-height: 1.6;
}

.bio-keypoints-section {
    background-color: var(--bio-bg, #F8FAFC);
}

.bio-keypoint-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.bio-keypoint {
    background: #FFFFFF;
    border: 1px solid var(--bio-border, #E2E8F0);
    border-radius: var(--bio-radius-md, 12px);
    padding: 18px 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    box-shadow: 0 2px 8px rgba(11, 60, 53, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bio-keypoint:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(11, 60, 53, 0.09);
    border-color: rgba(0, 210, 144, 0.45);
}

.bio-keypoint-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: var(--bio-primary-subtle, rgba(11, 60, 53, 0.08));
    color: var(--bio-primary, #0B3C35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bio-keypoint:hover .bio-keypoint-icon {
    background: linear-gradient(135deg, var(--bio-accent) 0%, var(--bio-accent-hover) 100%);
    color: var(--bio-primary-dark, #072722);
    transform: scale(1.05);
}

.bio-keypoint-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bio-keypoint-text strong {
    display: block;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--bio-primary, #0B3C35);
    line-height: 1.3;
    margin-bottom: 3px;
}

.bio-keypoint-text span {
    font-size: 0.82rem;
    color: var(--bio-text-muted, #64748B);
    line-height: 1.35;
}

.bio-hero-image {
    max-height: 460px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.45));
    border-radius: var(--bio-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Tablet: 3 columns in a row */
@media (min-width: 768px) {
    .bio-keypoint-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Desktop: up to 4 columns in a row */
@media (min-width: 992px) {
    .bio-keypoint-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 575.98px) {
    .bio-keypoint-grid {
        gap: 10px;
    }
    .bio-keypoint {
        padding: 14px 12px;
        gap: 10px;
        flex-direction: column;
    }
    .bio-keypoint-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1.15rem;
    }
    .bio-keypoint-text strong {
        font-size: 0.88rem;
    }
    .bio-keypoint-text span {
        font-size: 0.74rem;
    }
}

/* ==============================================================
   4. INTERACTIVE BIOTECH SCOPE GRID
   ============================================================== */
.bio-section-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--bio-primary);
    margin-bottom: 10px;
}

.bio-section-subtitle {
    font-size: 1.05rem;
    color: var(--bio-text-muted);
    margin-bottom: 35px;
}

.bio-scope-card {
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 22px 20px;
    height: 100%;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.bio-scope-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bio-shadow-md);
    border-color: var(--bio-accent);
}

.bio-scope-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bio-accent-subtle);
    color: var(--bio-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 14px;
}

.bio-scope-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--bio-primary);
}

.bio-scope-card p {
    font-size: 0.88rem;
    color: var(--bio-text-muted);
    line-height: 1.5;
    margin-bottom: 0;
}

/* ==============================================================
   5. ARTICLE SHOWCASE CARDS
   ============================================================== */
.bio-article-card {
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    border-left: 4px solid var(--bio-primary);
    border-radius: var(--bio-radius-md);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--bio-shadow-sm);
    transition: all 0.2s ease;
}

.bio-article-card:hover {
    box-shadow: var(--bio-shadow-md);
    border-left-color: var(--bio-accent);
}

.bio-article-badges,
.bio-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    min-width: 0;
}

.bio-badge,
.bio-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    line-height: 1.4;
}

.bio-badge-open-access,
.bio-tag-oa {
    background: #DCFCE7;
    color: #166534;
}

.bio-badge-doi,
.bio-tag-doi {
    background: #E0F2FE;
    color: #0369A1;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.bio-badge-vol,
.bio-tag-vol {
    background: #F1F5F9;
    color: #475569;
}

.bio-article-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.35;
}

.bio-article-title a {
    color: var(--bio-primary);
}

.bio-article-title a:hover {
    color: var(--bio-accent-hover);
}

.bio-article-authors {
    font-size: 0.92rem;
    color: #475569;
    margin-bottom: 12px;
}

.bio-article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--bio-border-light);
}

.btn-bio-pdf {
    background: #059669;
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: var(--bio-radius-sm);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-bio-pdf:hover {
    background: #047857;
    color: #FFFFFF !important;
}

.btn-bio-abstract {
    background: var(--bio-primary-subtle);
    color: var(--bio-primary) !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: var(--bio-radius-sm);
    border: 1px solid rgba(11, 60, 53, 0.15);
}

.btn-bio-abstract:hover {
    background: #D1EAE2;
}

/* ==============================================================
   6. UNIFIED RIGHT SIDEBAR
   ============================================================== */
.bio-sidebar-card {
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: var(--bio-shadow-sm);
}

.bio-sidebar-card h5 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bio-primary);
    border-bottom: 2px solid var(--bio-border-light);
    padding-bottom: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bio-cover-wrap {
    text-align: center;
    background: var(--bio-bg);
    padding: 16px;
    border-radius: var(--bio-radius-sm);
    margin-bottom: 14px;
}

.bio-cover-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: var(--bio-shadow-md);
}

.bio-announcement-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--bio-border);
}

.bio-announcement-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bio-announcement-item h6 {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.bio-announcement-date {
    font-size: 0.78rem;
    color: var(--bio-text-muted);
}

/* Indexing Badges Grid */
.bio-indexing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.bio-indexing-badge {
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ==============================================================
   7. ARTICLE READER & CITATION BOX (paper-details.php)
   ============================================================== */
.bio-reader-container {
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-lg);
    padding: 35px;
    box-shadow: var(--bio-shadow-sm);
    margin-bottom: 30px;
}

.bio-citation-box {
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 18px;
    margin-top: 25px;
}

.bio-citation-text {
    background: #FFFFFF;
    border: 1px solid var(--bio-border);
    border-radius: 6px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.86rem;
    color: #1E293B;
    margin: 10px 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ==============================================================
   8. MODERN FOOTER
   ============================================================== */
.bio-footer {
    background-color: var(--bio-primary-dark);
    color: #CBD5E1;
    padding: 60px 0 25px;
    margin-top: 60px;
    border-top: 4px solid var(--bio-accent);
}

.bio-footer h5 {
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.bio-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bio-footer li {
    margin-bottom: 8px;
}

.bio-footer a {
    color: #CBD5E1;
    font-size: 0.9rem;
}

.bio-footer a:hover {
    color: var(--bio-accent);
    padding-left: 4px;
}

.bio-footer-journal-list li {
    margin-bottom: 7px;
    line-height: 1.35;
}

.bio-footer-journal-list a {
    font-size: 0.84rem;
    display: inline;
}

.bio-journal-collapse-btn {
    color: var(--bio-accent);
    border-color: rgba(34, 197, 94, 0.4);
    background-color: transparent;
    transition: all 0.2s ease;
}

.bio-journal-collapse-btn:hover,
.bio-journal-collapse-btn:focus {
    color: #FFFFFF;
    background-color: var(--bio-accent);
    border-color: var(--bio-accent);
}

.bio-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    margin-top: 40px;
    font-size: 0.84rem;
    color: #94A3B8;
}

/* ==============================================================
   9. INNER PAGE HEADER & BREADCRUMBS
   ============================================================== */
.bio-page-header {
    background: linear-gradient(135deg, var(--bio-primary) 0%, #072722 100%);
    color: #FFFFFF;
    padding: 45px 0 40px;
    position: relative;
    border-bottom: 3px solid var(--bio-accent);
}

.bio-page-header h1 {
    color: #FFFFFF !important;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.bio-page-header .lead {
    color: #CBD5E1;
    font-size: 1.05rem;
    max-width: 760px;
    margin: 0 auto;
}

.bio-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    font-size: 0.9rem;
}

.bio-breadcrumb li {
    display: inline-flex;
    align-items: center;
    color: #94A3B8;
}

.bio-breadcrumb li a {
    color: #E2E8F0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

.bio-breadcrumb li a:hover {
    color: var(--bio-accent);
}

.bio-breadcrumb-separator {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.4);
}

.bio-breadcrumb li.active {
    color: var(--bio-accent);
    font-weight: 600;
}

/* ==============================================================
   10. ARTICLE READER & CITATION GENERATOR
   ============================================================== */
.bio-article-header {
    border-bottom: 2px solid var(--bio-border-light);
    padding-bottom: 24px;
    margin-bottom: 28px;
}

.bio-article-detail-title {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--bio-primary);
    margin-bottom: 18px;
}

.bio-author-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    color: #1E293B;
    margin-bottom: 16px;
}

.bio-author-row i {
    color: var(--bio-accent-hover);
}

.bio-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 16px 20px;
    margin-bottom: 25px;
    font-size: 0.88rem;
}

.bio-meta-grid-item strong {
    display: block;
    color: var(--bio-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

/* WP-A [U-012]: long DOI/URL values wrap inside the meta grid. */
.bio-meta-grid-item {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.bio-meta-grid-item a { overflow-wrap: anywhere; word-break: break-word; }

.bio-abstract-box {
    background: #FFFFFF;
    border-left: 4px solid var(--bio-accent);
    border-top: 1px solid var(--bio-border);
    border-right: 1px solid var(--bio-border);
    border-bottom: 1px solid var(--bio-border);
    border-radius: 0 var(--bio-radius-md) var(--bio-radius-md) 0;
    padding: 24px;
    margin-bottom: 30px;
}

.bio-abstract-box h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bio-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bio-abstract-box p {
    color: #334155;
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 0;
}

/* Citation Tabs & Box */
.bio-citation-card {
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 22px;
    margin-top: 35px;
}

.bio-citation-card h5 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bio-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bio-citation-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.bio-citation-tab {
    background: #FFFFFF;
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-sm);
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bio-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bio-citation-tab:hover {
    border-color: var(--bio-primary);
    color: var(--bio-primary);
}

.bio-citation-tab.active {
    background: var(--bio-primary);
    color: #FFFFFF;
    border-color: var(--bio-primary);
}

.bio-citation-content {
    background: #FFFFFF;
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-sm);
    padding: 16px;
    font-size: 0.88rem;
    color: #0F172A;
    line-height: 1.6;
    min-height: 80px;
    display: none;
    position: relative;
    white-space: pre-wrap;
    word-break: break-word;
}

.bio-citation-content.active {
    display: block;
}

.bio-copy-btn {
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    color: var(--bio-primary);
    padding: 5px 12px;
    border-radius: var(--bio-radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.bio-copy-btn:hover {
    background: var(--bio-primary-subtle);
    border-color: var(--bio-primary);
}

.bio-copy-btn.copied {
    background: var(--bio-accent);
    color: #072722;
    border-color: var(--bio-accent);
}

/* ==============================================================
   11. EDITORIAL BOARD CARDS
   ============================================================== */
.bio-board-card {
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 24px;
    box-shadow: var(--bio-shadow-sm);
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bio-board-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bio-shadow-lg);
    border-color: rgba(0, 210, 144, 0.4);
}

.bio-member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bio-accent-subtle);
    margin-bottom: 16px;
    box-shadow: var(--bio-shadow-sm);
}

.bio-member-avatar-fallback {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bio-primary-light), var(--bio-primary));
    color: var(--bio-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
}

.bio-member-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bio-primary);
    margin-bottom: 4px;
}

.bio-member-role {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bio-accent-hover);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.bio-member-affiliation {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 12px;
    flex-grow: 1;
}

.bio-member-country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #334155;
    font-weight: 600;
}

/* ==============================================================
   12. ARCHIVES & VOLUME EXPLORER
   ============================================================== */
.bio-archive-year-badge {
    background: var(--bio-primary);
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.bio-volume-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.bio-volume-pill {
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bio-text-main);
    transition: all 0.2s ease;
}

.bio-volume-pill:hover,
.bio-volume-pill.active {
    background: var(--bio-primary);
    color: #FFFFFF !important;
    border-color: var(--bio-primary);
    box-shadow: 0 4px 10px rgba(11, 60, 53, 0.2);
}

/* ==============================================================
   13. MODERN FORM CARDS (Submission, Contact, Join Board)
   ============================================================== */
.bio-form-card {
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-lg);
    padding: 36px;
    box-shadow: var(--bio-shadow-sm);
    margin-bottom: 30px;
}

.bio-form-header {
    border-bottom: 2px solid var(--bio-border-light);
    padding-bottom: 20px;
    margin-bottom: 28px;
}

.bio-form-header h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--bio-primary);
    margin-bottom: 6px;
}

.bio-step-roadmap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.bio-step-box {
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 16px;
    text-align: center;
}

.bio-step-number {
    width: 32px;
    height: 32px;
    background: var(--bio-primary);
    color: var(--bio-accent);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.bio-step-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--bio-primary);
    margin-bottom: 4px;
}

.bio-step-desc {
    font-size: 0.78rem;
    color: var(--bio-text-muted);
}

.bio-input-label,
.bio-form-card .form-label,
.form-label.required-field {
    font-weight: 700;
    color: #1E293B;
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: block;
}

.bio-input-label .required,
.required-field::after {
    color: #DC2626;
    margin-left: 2px;
}

.required-field::after {
    content: " *";
    font-weight: 700;
}

.bio-form-control,
.bio-form-card .form-control,
.bio-form-card .form-select {
    border: 1.5px solid var(--bio-border);
    border-radius: var(--bio-radius-sm);
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    width: 100%;
}

.bio-form-control:focus,
.bio-form-card .form-control:focus,
.bio-form-card .form-select:focus {
    border-color: var(--bio-accent-hover);
    box-shadow: 0 0 0 3px rgba(0, 210, 144, 0.2);
    outline: none;
}

.bio-file-upload-zone {
    border: 2px dashed var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 24px;
    text-align: center;
    background: var(--bio-bg);
    transition: all 0.2s ease;
}

.bio-file-upload-zone:hover {
    border-color: var(--bio-accent-hover);
    background: var(--bio-accent-subtle);
}

/* Responsive tweaks */
@media (max-width: 991px) {
    .bio-hero-title {
        font-size: 2rem;
    }
    .bio-brand-text h1,
    .bio-brand-title {
        font-size: 1.05rem;
    }
    .bio-article-detail-title {
        font-size: 1.6rem;
    }
    .bio-form-card {
        padding: 24px;
    }
    .bio-reader-container {
        padding: 24px 20px;
    }
}

/* ==============================================================
   14. ADMIN CMS CONTENT STYLING (Matching Modern Frontend Theme)
   ============================================================== */
.bio-reader-container {
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-lg);
    padding: 38px 44px;
    box-shadow: var(--bio-shadow-sm);
    margin-bottom: 30px;
}

.bio-article-body {
    font-family: var(--bio-font-body) !important;
    color: var(--bio-text-main);
    line-height: 1.85;
    font-size: 1.02rem;
    word-break: break-word;
}

.bio-article-body * {
    font-family: inherit;
}

/* Headings created from Admin Panel */
.bio-article-body h1,
.bio-article-body h2,
.bio-article-body h3,
.bio-article-body h4,
.bio-article-body h5,
.bio-article-body h6 {
    font-family: var(--bio-font-heading) !important;
    color: var(--bio-primary) !important;
    font-weight: 700;
    margin-top: 1.8rem;
    margin-bottom: 0.9rem;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

.bio-article-body h1 {
    font-size: 1.85rem;
    border-bottom: 2px solid var(--bio-border-light);
    padding-bottom: 0.5rem;
}

.bio-article-body h2 {
    font-size: 1.55rem;
    border-bottom: 1px solid var(--bio-border-light);
    padding-bottom: 0.4rem;
}

.bio-article-body h3 {
    font-size: 1.3rem;
}

.bio-article-body h4 {
    font-size: 1.15rem;
}

.bio-article-body h5 {
    font-size: 1.05rem;
}

.bio-article-body h6 {
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bio-text-muted) !important;
}

/* Paragraphs & Text Alignment */
.bio-article-body p {
    margin-bottom: 1.25rem;
    line-height: 1.85;
    color: #334155;
}

.bio-article-body b,
.bio-article-body strong {
    color: var(--bio-primary);
    font-weight: 700;
}

/* Strip unwanted legacy paste artifacts from Word / Summernote */
.bio-article-body [style*="background-color: rgb(255, 255, 255)"],
.bio-article-body [style*="background-color:#ffffff"],
.bio-article-body [style*="background-color: white"] {
    background-color: transparent !important;
}

.bio-article-body [style*="color: rgb(107, 165, 74)"],
.bio-article-body [style*="color: rgb(57, 123, 33)"],
.bio-article-body [style*="color: #397b21"] {
    color: var(--bio-primary) !important;
}

.bio-article-body [style*="color: rgb(69, 90, 100)"],
.bio-article-body [style*="color: rgb(0, 0, 0)"],
.bio-article-body [style*="color: #000000"] {
    color: var(--bio-text-main) !important;
}

/* Tables created from Admin Panel */
.bio-article-body table {
    width: 100% !important;
    max-width: 100%;
    margin: 1.8rem 0;
    border-collapse: separate !important;
    border-spacing: 0;
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    overflow: hidden;
    box-shadow: var(--bio-shadow-sm);
    background: #FFFFFF;
}

.bio-article-body table thead th,
.bio-article-body table thead td,
.bio-article-body table th,
.bio-article-body table tr:first-child th {
    background-color: var(--bio-primary) !important;
    color: #FFFFFF !important;
    font-family: var(--bio-font-heading);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 12px 16px;
    text-align: left;
    border: none;
    border-bottom: 2px solid var(--bio-accent);
}

.bio-article-body table thead th *,
.bio-article-body table thead td *,
.bio-article-body table th *,
.bio-article-body table tr:first-child th * {
    color: #FFFFFF !important;
}

.bio-article-body table td {
    padding: 12px 16px;
    font-size: 0.92rem;
    color: #334155;
    border-top: 1px solid var(--bio-border-light);
    border-bottom: none;
    vertical-align: middle;
}

.bio-article-body table tr:nth-child(even) td {
    background-color: #F8FAF9;
}

.bio-article-body table tr:hover td {
    background-color: var(--bio-primary-subtle);
}

/* Blockquotes from Admin */
.bio-article-body blockquote {
    border-left: 4px solid var(--bio-accent);
    background: var(--bio-primary-subtle);
    padding: 18px 24px;
    border-radius: 0 var(--bio-radius-md) var(--bio-radius-md) 0;
    margin: 1.6rem 0;
    color: var(--bio-primary-dark);
    font-style: italic;
}

.bio-article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Ordered and Unordered Lists */
.bio-article-body ul,
.bio-article-body ol {
    padding-left: 1.75rem;
    margin-bottom: 1.4rem;
}

.bio-article-body li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.bio-article-body ul > li::marker {
    color: var(--bio-accent-hover);
}

.bio-article-body ol > li::marker {
    color: var(--bio-primary);
    font-weight: 700;
}

/* Hyperlinks in Admin Content */
.bio-article-body a {
    color: var(--bio-primary-light);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.bio-article-body a:hover {
    color: var(--bio-accent-hover);
}

/* Images inserted in Admin Content */
.bio-article-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: var(--bio-radius-md);
    box-shadow: var(--bio-shadow-sm);
    margin: 1.25rem 0;
    display: inline-block;
}

/* Dividers */
.bio-article-body hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bio-border), transparent);
    margin: 2rem 0;
}

/* Code & Preformatted Blocks */
.bio-article-body code {
    background: var(--bio-primary-subtle);
    color: var(--bio-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}

.bio-article-body pre {
    background: #0F172A;
    color: #E2E8F0;
    padding: 16px 20px;
    border-radius: var(--bio-radius-md);
    overflow-x: auto;
    margin: 1.6rem 0;
}

.bio-article-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* News & Announcements Card Matching */
.bio-announcement-item {
    padding: 12px 14px;
    border-left: 3px solid var(--bio-accent);
    background: #FFFFFF;
    border-radius: 0 var(--bio-radius-sm) var(--bio-radius-sm) 0;
    margin-bottom: 12px;
    border-top: 1px solid var(--bio-border-light);
    border-right: 1px solid var(--bio-border-light);
    border-bottom: 1px solid var(--bio-border-light);
    transition: all 0.2s ease;
}

.bio-announcement-item:hover {
    transform: translateX(3px);
    box-shadow: var(--bio-shadow-sm);
    border-left-color: var(--bio-primary);
}

.bio-announcement-item h6 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--bio-primary);
    margin-bottom: 4px;
    line-height: 1.35;
}

.bio-announcement-date {
    font-size: 0.75rem;
    color: var(--bio-text-muted);
    font-weight: 600;
}

/* ==============================================================
   15. SMART PRESENTATION COMPONENTS (Dynamic FAQ, Callouts, Indexing)
   ============================================================== */
/* FAQ Accordion */
.bio-faq-accordion .accordion-item {
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md) !important;
    margin-bottom: 14px;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(11, 60, 53, 0.04);
}

.bio-faq-accordion .accordion-button {
    font-family: var(--bio-font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--bio-primary);
    background-color: #FFFFFF;
    padding: 16px 20px;
    box-shadow: none !important;
    border: none;
}

.bio-faq-accordion .accordion-button:not(.collapsed) {
    color: var(--bio-primary-dark);
    background-color: var(--bio-primary-subtle);
    border-bottom: 1px solid rgba(11, 60, 53, 0.1);
}

.bio-faq-badge {
    background: var(--bio-primary);
    color: var(--bio-accent);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
    display: inline-block;
}

.bio-faq-body {
    padding: 20px;
    color: #334155;
    font-size: 0.96rem;
    line-height: 1.8;
    background: #FFFFFF;
}

.bio-faq-body a {
    color: var(--bio-primary-light);
    font-weight: 600;
    text-decoration: underline;
}

/* Callout Alert Boxes */
.bio-callout-warning {
    border-left: 4px solid var(--bio-gold);
    background: var(--bio-gold-subtle);
    border-radius: 0 var(--bio-radius-md) var(--bio-radius-md) 0;
    padding: 18px 22px;
    color: #92400E;
}

.bio-callout-warning h5 {
    color: #B45309 !important;
    font-size: 1.05rem;
    font-weight: 700;
}

.bio-callout-info {
    border-left: 4px solid var(--bio-accent);
    background: var(--bio-primary-subtle);
    border-radius: 0 var(--bio-radius-md) var(--bio-radius-md) 0;
    padding: 18px 22px;
}

/* Indexing Directory Cards */
.bio-indexing-dir-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bio-indexing-dir-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--bio-shadow-md) !important;
    border-color: var(--bio-accent) !important;
}

/* Content Image Wrapper */
.bio-content-img-wrap img {
    max-width: 100% !important;
    height: auto !important;
    margin: 10px auto;
}

/* ==============================================================
   15. PUBLIC SHELL, FOCUS & ANCHOR OFFSETS
   ============================================================== */
.bio-content-main { min-width: 0; }
#current-issue,
[id^="year-"] { scroll-margin-top: 100px; }
.bio-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 0.75rem 1rem;
    background: var(--bio-primary);
    color: #fff;
    border-radius: 0 0 var(--bio-radius-sm) 0;
}
.bio-skip-link:focus { left: 0; }
.bio-navbar a:focus-visible,
.bio-footer a:focus-visible,
.bio-sidebar-card a:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--bio-accent);
    outline-offset: 2px;
}

/* ==============================================================
   16. SIDEBAR ARCHIVES, JOURNAL LINKS & NPA CAROUSEL
   ============================================================== */
.bio-sidebar-links a {
    color: var(--bio-primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.bio-sidebar-links a:hover {
    color: var(--bio-primary);
    text-decoration: underline;
}

.bio-archive-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bio-archive-year-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-sm);
    color: var(--bio-primary);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bio-archive-year-pill:hover {
    background: var(--bio-primary-subtle);
    border-color: var(--bio-accent);
    color: var(--bio-primary);
}

.bio-archive-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 2px 7px;
    background: var(--bio-primary);
    border-radius: 999px;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
}

.bio-journal-carousel {
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 12px 0;
}

.bio-journal-carousel .carousel-item {
    padding: 0 38px;
}

.bio-journal-slide {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bio-surface);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-sm);
    box-shadow: var(--bio-shadow-sm);
    color: var(--bio-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bio-journal-slide:hover {
    border-color: var(--bio-accent);
    box-shadow: var(--bio-shadow-md);
    color: var(--bio-primary);
    transform: translateY(-1px);
}

.bio-journal-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--bio-primary-subtle);
    border-radius: var(--bio-radius-sm);
    color: var(--bio-primary-light);
    font-size: 0.95rem;
}

.bio-journal-meta {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.bio-journal-meta strong {
    color: var(--bio-primary);
    font-size: 0.9rem;
    line-height: 1.3;
}

.bio-journal-meta small {
    color: var(--bio-text-muted);
    font-size: 0.72rem;
}

.bio-journal-slide > .fa-arrow-up-right-from-square {
    flex: 0 0 auto;
    color: var(--bio-text-muted);
    font-size: 0.8rem;
}

.bio-journal-carousel .carousel-control-prev,
.bio-journal-carousel .carousel-control-next {
    top: 50%;
    width: 32px;
    height: 32px;
    background: var(--bio-primary);
    border: none;
    border-radius: 50%;
    box-shadow: var(--bio-shadow-sm);
    opacity: 1;
    transform: translateY(-50%);
    transition: background-color 0.2s ease;
}

.bio-journal-carousel .carousel-control-prev {
    left: 6px;
}

.bio-journal-carousel .carousel-control-next {
    right: 6px;
}

.bio-journal-carousel .carousel-control-prev:hover,
.bio-journal-carousel .carousel-control-next:hover {
    background: var(--bio-primary-light);
}

.bio-journal-carousel .carousel-control-prev-icon,
.bio-journal-carousel .carousel-control-next-icon {
    width: 14px;
    height: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .bio-journal-carousel .carousel-item,
    .bio-journal-slide,
    .bio-archive-year-pill,
    .bio-sidebar-links a,
    .bio-journal-carousel .carousel-control-prev,
    .bio-journal-carousel .carousel-control-next {
        transition: none !important;
    }

    .bio-journal-slide:hover {
        transform: none;
    }

    .bio-journal-carousel .carousel-control-prev,
    .bio-journal-carousel .carousel-control-next {
        transform: translateY(-50%);
    }
}

/* ==============================================================
   JOURNAL AT A GLANCE
   ============================================================== */
.bio-fact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px 24px;
    margin: 0;
}

.bio-fact {
    background: #FFFFFF;
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius-md);
    padding: 14px 18px;
    min-width: 0;
}

.bio-fact dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bio-text-muted);
    margin-bottom: 4px;
}

.bio-fact dd {
    margin: 0;
    font-weight: 600;
    color: var(--bio-primary);
    overflow-wrap: anywhere;
}

@media (min-width: 768px) {
    .bio-fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bio-fact-wide { grid-column: 1 / -1; }
}

/* WP-A [U-012]: allow long DOI/URL badges to wrap instead of widening the page. */
.bio-break-anywhere {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
}

/* =====================================================================
   WP-B [U-001..U-005]: scoped WCAG 1.4.3 contrast fixes.
   Only the failing selectors are touched; hue preserved, colors darkened/
   lightened to reach 4.5:1 (normal text) / 3:1 (UI). No global override.
   ===================================================================== */

/* U-001: Certificate button (.btn-outline-info) #0dcaf0 on #fff = 1.95 -> #0A7C96 = 4.84 */
.btn-outline-info {
    color: #0A7C96 !important;
    border-color: #0A7C96 !important;
}
.btn-outline-info:hover,
.btn-outline-info:focus,
.btn-outline-info:active {
    color: #ffffff;
    background-color: #0A7C96;
    border-color: #0A7C96;
}

/* U-003: PDF download button (.btn-bio-pdf) white on #059669 = 3.76 -> #047857 = 5.48 */
.btn-bio-pdf {
    background: #047857 !important;
}
.btn-bio-pdf:hover {
    background: #036147;
}

/* U-004: search "Open Access" badge (#198754 on #e8f3ee = 3.98 -> #0E7A4E = 4.72) */
.badge.bg-success.bg-opacity-10.text-success {
    color: #0E7A4E;
}

/* U-002: footer links & badges on dark bg.
   #198754 on #072722 = 3.5 -> #5EEAD4 = 10.74; badges on #0c3f2f -> #5EEAD4 = 8.03 */
.bio-footer a.text-success,
.bio-footer a.text-success:hover,
.bio-footer .text-success {
    color: #5EEAD4 !important;
}
.bio-footer .badge.bg-success.bg-opacity-25.text-success {
    color: #5EEAD4;
    border-color: rgba(94, 234, 212, 0.5);
}
/* footer muted white text (rgba .5) -> brighter for 4.5:1 */
.bio-footer .text-white-50,
.bio-footer .text-white-50 a {
    color: rgba(255, 255, 255, 0.78) !important;
}

/* U-005: small muted text/badges (#6c757d on #f8f9fa = 4.44 -> #5A6268 = 5.89) */
.badge.bg-light.text-secondary,
.badge.bg-light.text-muted,
.bio-article-authors .badge.text-secondary {
    color: #5A6268;
}


/* WP-B fix: footer collapse toggle keeps mint accent (scoped to footer, overrides outline-success). */
.bio-footer .bio-journal-collapse-btn.btn-outline-success,
.bio-footer .bio-journal-collapse-btn {
    color: #5EEAD4;
    border-color: rgba(94, 234, 212, 0.5);
    background-color: transparent;
}
.bio-footer .bio-journal-collapse-btn:hover,
.bio-footer .bio-journal-collapse-btn:focus {
    color: #072722;
    background-color: #5EEAD4;
    border-color: #5EEAD4;
}

/* WP-B fix: outline-success buttons on LIGHT backgrounds (home archives button). */
main .btn-outline-success,
.bio-content .btn-outline-success {
    color: #0E7A4E !important;
    border-color: #0E7A4E !important;
}
main .btn-outline-success:hover,
main .btn-outline-success:focus,
.bio-content .btn-outline-success:hover,
.bio-content .btn-outline-success:focus {
    color: #ffffff;
    background-color: #0E7A4E;
    border-color: #0E7A4E;
}

/* WP-B fix: strengthen badge overrides (higher specificity than .badge.bg-*). */
.badge.bg-light.text-secondary,
.badge.bg-light.text-muted,
.badge.bg-light.text-secondary.border,
span.badge.bg-success.bg-opacity-25.text-success,
span.badge.bg-success.bg-opacity-10.text-success {
    color: #0E7A4E !important;
}
.bio-footer span.badge.bg-success.bg-opacity-25.text-success {
    color: #5EEAD4 !important;
    border-color: rgba(94, 234, 212, 0.5);
}

/* WP-B fix: editorial member role label (#00b87e on white = 2.57 -> #047857 = 5.48). */
.bio-member-role {
    color: #047857;
}

/* WP-B fix: CMS highlight spans use a hard-coded yellow (#ffff00) with #6c757d text
   (4.36:1). Override just those spans: near-black text keeps the highlight readable
   (>= 12:1) without altering non-highlight inline styles. */
[style*="background-color: rgb(255, 255, 0)"],
[style*="background-color:rgb(255,255,0)"],
[style*="background: rgb(255, 255, 0)"],
[style*="background-color: #ffff00"],
[style*="background-color:#ffff00"],
[style*="background: #ffff00"] {
    color: #1A1A1A !important;
}
[style*="background-color: rgb(255, 255, 0)"] b,
[style*="background-color:rgb(255,255,0)"] b,
[style*="background: rgb(255, 255, 0)"] b {
    color: #1A1A1A !important;
}

/* =====================================================================
   WP-C [U-009]: WCAG 2.2 target size (min 24x24; 44px for nav toggler and
   primary form buttons on mobile). No desktop layout change.
   ===================================================================== */
@media (max-width: 767.98px) {
    /* Minimum 24x24 for small interactive controls */
    .bio-footer a,
    .bio-footer .bio-journal-collapse-btn,
    .carousel-indicators button,
    .carousel-control-prev,
    .carousel-control-next,
    .bio-skip-link {
        min-height: 24px;
        min-width: 24px;
    }
    .carousel-indicators button {
        width: 24px;
        height: 24px;
        margin: 0 3px;
        border-radius: 50%;
    }

    /* 44px for nav toggler and primary form buttons on mobile */
    .navbar-toggler,
    .mobile-nav-toggler,
    .drawer-close-btn {
        min-height: 44px;
        min-width: 44px;
    }
    .btn-bio-primary,
    .btn-bio-secondary,
    #contactForm button[type="submit"],
    #paperSubmissionForm button[type="submit"],
    #editorialForm button[type="submit"],
    form button[type="submit"].btn {
        min-height: 44px;
    }
}

/* WP-C fix: .text-success used on LIGHT backgrounds (e.g. "Volume: 13, Issue: 2")
   needs the darker green; dark-bg footer keeps the mint override above. */
main .text-success,
.bio-content .text-success,
.card .text-success,
main .text-success a,
.bio-content .text-success a {
    color: #0E7A4E !important;
}

/* ==============================================================
   RESPONSIVE / UX FIXES — audit/ui-v2
   (measured on 24 viewports; see audit/ui-v2/02-plan.md)
   ============================================================== */

/* Keep in-page anchors clear of the sticky header (116px desktop / 114px mobile). */
html {
    scroll-padding-top: 130px;
}
[id] {
    scroll-margin-top: 130px;
}

/* Long DOI URLs must wrap instead of forcing a horizontal scrollbar. */
.bio-badge-doi,
.bio-tag-doi {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Tiny phones: let the utility bar wrap instead of clipping the email. */
@media (max-width: 359.98px) {
    .bio-topbar {
        white-space: normal;
    }
    .bio-topbar-row {
        flex-wrap: wrap;
        white-space: normal;
        gap: 2px 10px;
    }
    .bio-topbar-left {
        flex-wrap: wrap;
        white-space: normal;
        gap: 2px 8px;
    }
    .bio-topbar-link {
        min-height: 24px;
    }
}

/* Hero badge must be allowed to wrap on narrow screens (Bootstrap sets nowrap). */
.bio-hero .badge {
    white-space: normal;
    max-width: 100%;
    line-height: 1.4;
}

/* Keep the sidebar's journal-network captions legible. */
.bio-unified-sidebar small {
    font-size: 0.78rem;
}

/* WCAG 2.2 AA 24px target floor for standalone text links (all pointer types). */
.bio-topbar-link,
.bio-footer a,
.bio-footer .nav-link,
.bio-fact dd a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}
a.d-block.small,
a.text-reset.text-decoration-none,
.bio-badge-doi a {
    min-height: 24px;
    line-height: 1.5;
    padding-top: 2px;
    padding-bottom: 2px;
}
.bio-badge-doi a {
    display: inline-flex;
    align-items: center;
}
/* Inline links inside CMS prose: enlarge the hit box without moving the text. */
.leading-relaxed a,
.bio-reader-container a {
    padding-top: 4px;
    padding-bottom: 4px;
}
.bio-journal-carousel .carousel-indicators [data-bs-target],
.bio-journal-carousel .carousel-indicators button {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    margin: 0 3px;
    border: 0;
    border-radius: 50%;
}

/* Tablets, phones and narrow windows: touch-friendly sizing */
@media (max-width: 1139.98px) {
    /* 16px prevents iOS Safari from zooming the page on focus. */
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),
    select,
    textarea,
    .bio-form-control,
    .bio-form-card .form-control,
    .bio-form-card .form-select {
        font-size: 16px;
    }

    /* Primary touch targets (44px) */
    .header-search-form {
        height: 44px;
    }
    .header-search-btn {
        width: 36px;
        height: 36px;
    }
    .btn-primary-cta {
        height: 44px;
    }
    .navbar-brand.brand-lockup {
        min-height: 44px;
    }
    .btn,
    .btn-sm {
        min-height: 44px;
    }
    .bio-volume-pill,
    .btn-bio-pdf,
    .btn-bio-abstract,
    .bio-copy-btn,
    .bio-citation-tab {
        min-height: 44px;
    }

    /* Legible minimum type (>= 12px) */
    .brand-badge,
    .bio-brand-badge,
    .btn-cta-badge,
    .bio-archive-count {
        font-size: 0.75rem;
    }
    .bio-keypoint-text span {
        font-size: 0.80rem;
    }
}

/* Compact the desktop navigation between the 2-column breakpoint and 1400px
   so all links fit inside the container at 1280px laptops. */
@media (min-width: 1140px) and (max-width: 1399.98px) {
    .header-bottom-right,
    .header-bottom-right .navbar-nav {
        min-width: 0;
    }
    .header-tier-2 .navbar-nav {
        gap: 0;
    }
    .bio-nav-link {
        font-size: 0.86rem;
        padding: 7px 9px !important;
    }
}
