.overview-section {
    background: linear-gradient(180deg, rgba(245, 251, 252, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
    border: 1px solid rgba(11, 61, 87, 0.08);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(3, 24, 36, 0.08);
    padding: 2rem 1.75rem 2.25rem;
}

.overview-kicker {
    color: #0c6681;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.overview-title {
    color: #0b3d57;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.overview-lead {
    max-width: 860px;
    margin: 0 0 1.75rem;
    color: #35515d;
    line-height: 1.7;
}

.overview-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 180px;
    margin: 1.5rem 0;
    border: 1px dashed rgba(11, 61, 87, 0.2);
    border-radius: 18px;
    color: #55707b;
    font-weight: 700;
}

.overview-status__dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #0aa6a6;
    box-shadow: 0 0 0 0 rgba(10, 166, 166, 0.35);
    animation: overview-pulse 1.5s infinite;
}

.overview-status--error {
    min-height: auto;
    padding: 1rem;
    border-color: rgba(170, 55, 42, 0.25);
    background: rgba(170, 55, 42, 0.06);
    color: #8b3026;
}

@keyframes overview-pulse {
    70% { box-shadow: 0 0 0 9px rgba(10, 166, 166, 0); }
    100% { box-shadow: 0 0 0 0 rgba(10, 166, 166, 0); }
}

.atlas-dashboard {
    margin: 1.5rem 0 2.75rem;
}

.atlas-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(11, 61, 87, 0.1);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(3, 24, 36, 0.07);
}

.atlas-stat {
    position: relative;
    display: block;
    padding: 1.25rem 1.35rem;
    color: inherit;
    text-decoration: none;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.atlas-stat:hover,
.atlas-stat:focus {
    z-index: 1;
    color: inherit;
    text-decoration: none;
    background: #f1f8f9;
    box-shadow: inset 0 -3px 0 #087d82;
}

.atlas-stat:focus-visible {
    outline: 3px solid rgba(8, 125, 130, 0.45);
    outline-offset: -3px;
}

.atlas-stat:active {
    transform: translateY(1px);
}

.atlas-stat + .atlas-stat::before {
    content: "";
    position: absolute;
    top: 22%;
    bottom: 22%;
    left: 0;
    width: 1px;
    background: rgba(11, 61, 87, 0.12);
}

.atlas-stat--genomes {
    background: linear-gradient(135deg, #eef6fa 0%, #e6f1f6 100%);
}

.atlas-stat--proteins {
    background: linear-gradient(135deg, #fff8e9 0%, #fcefd8 100%);
}

.atlas-stat--orthogroups {
    background: linear-gradient(135deg, #fff2ee 0%, #f9e3dc 100%);
}

.atlas-stat--genomes:hover,
.atlas-stat--genomes:focus {
    background: linear-gradient(135deg, #e4f1f7 0%, #dcebf2 100%);
    box-shadow: inset 0 -3px 0 #4389a3;
}

.atlas-stat--proteins:hover,
.atlas-stat--proteins:focus {
    background: linear-gradient(135deg, #fdf1d8 0%, #f8e5c3 100%);
    box-shadow: inset 0 -3px 0 #d39438;
}

.atlas-stat--orthogroups:hover,
.atlas-stat--orthogroups:focus {
    background: linear-gradient(135deg, #fbe7e1 0%, #f4d7cf 100%);
    box-shadow: inset 0 -3px 0 #d36f59;
}

.atlas-stat__value,
.atlas-stat__label {
    display: block;
}

.atlas-stat__value {
    color: #0b3d57;
    font-family: "Avenir Next", "Helvetica Neue", Helvetica, sans-serif;
    font-size: clamp(1.65rem, 2.7vw, 2.35rem);
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1;
}

.atlas-stat__label {
    margin-top: 0.45rem;
    color: #657b85;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.atlas-stat__detail {
    display: block;
    margin-top: 0.28rem;
    color: #76909a;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.25;
}

.atlas-stat__detail[hidden] {
    display: none;
}

.atlas-filterbar {
    display: grid;
    grid-template-columns:
        minmax(150px, 1fr)
        repeat(4, minmax(125px, 0.6fr))
        auto;
    gap: 0.85rem;
    align-items: end;
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(11, 61, 87, 0.1);
    border-radius: 16px;
    background: rgba(234, 247, 247, 0.72);
}

.atlas-filterbar__intro {
    display: flex;
    flex-direction: column;
    color: #143f50;
}

.atlas-filterbar__eyebrow,
.atlas-panel__kicker {
    margin: 0 0 0.18rem;
    color: #0a878b;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.atlas-filter {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    color: #55707b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.atlas-filter select {
    width: 100%;
    min-height: 40px;
    padding: 0.4rem 2rem 0.4rem 0.7rem;
    border: 1px solid rgba(11, 61, 87, 0.16);
    border-radius: 9px;
    background: #ffffff;
    color: #153f50;
    font-weight: 700;
}

.atlas-filter--inline {
    min-width: 180px;
}

.atlas-filterbar__reset {
    min-height: 40px;
    padding: 0.45rem 0.9rem;
    border-radius: 9px;
    background: #0b3d57;
    font-size: 0.78rem;
    font-weight: 800;
}

.atlas-chart-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.75fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.atlas-panel {
    min-width: 0;
    padding: 1.1rem 1.15rem 0.8rem;
    border: 1px solid rgba(11, 61, 87, 0.1);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(3, 24, 36, 0.07);
}

.atlas-panel--wide:nth-of-type(n + 3) {
    grid-column: 1 / -1;
}

.atlas-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    min-height: 52px;
}

.atlas-panel__header h4 {
    margin: 0;
    color: #123f53;
    font-size: 1rem;
    font-weight: 850;
}

.atlas-panel__meta,
.atlas-panel__note {
    color: #71858e;
    font-size: 0.72rem;
}

.atlas-panel__meta {
    padding-top: 0.25rem;
    text-align: right;
}

.atlas-panel__note {
    margin: -0.25rem 0 0.3rem;
}

.atlas-chart {
    width: 100%;
    min-height: 315px;
}

.atlas-chart--donut {
    min-height: 320px;
}

#genomeScatter .nsewdrag,
#genomeScatter .scatterlayer .point {
    cursor: default !important;
}

.atlas-upset {
    width: 100%;
    min-height: 320px;
    overflow-x: auto;
}

.atlas-upset svg {
    display: block;
    width: 100%;
    min-width: 620px;
    height: 320px;
}

.atlas-upset__bar {
    fill: #0b7480;
}

.atlas-upset__bar--none {
    fill: #a8b5ba;
}

.atlas-upset__axis,
.atlas-upset__guide {
    stroke: #d7e2e5;
    stroke-width: 1;
}

.atlas-upset__connector {
    stroke: #0b3d57;
    stroke-width: 2.5;
}

.atlas-upset__dot {
    fill: #0b3d57;
}

.atlas-upset__dot--off {
    fill: #dbe4e7;
}

.atlas-upset text {
    fill: #536c77;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 11px;
}

.atlas-upset .atlas-upset__count {
    fill: #163f50;
    font-weight: 800;
}

.overview-tools-heading {
    margin: 1.8rem 0 1.2rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.overview-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(3, 24, 36, 0.12);
    background: #0b3d57;
    min-height: 220px;
    text-decoration: none;
    transform: translateY(0);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.overview-card:hover,
.overview-card:focus {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(3, 24, 36, 0.18);
    text-decoration: none;
}

.overview-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    filter: saturate(0.98) contrast(1.02);
}

.overview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 34, 49, 0.05) 0%, rgba(7, 34, 49, 0.72) 100%);
    opacity: 0.9;
    transition: opacity 180ms ease;
    pointer-events: none;
}

.overview-card:hover::after,
.overview-card:focus::after {
    opacity: 1;
}

.overview-card__content {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 1;
    padding: 1rem 1rem 1.05rem;
    color: #fff;
}

.overview-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.overview-card__desc {
    margin: 0.45rem 0 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(8px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 180ms ease, transform 180ms ease, max-height 180ms ease;
}

.overview-card:hover .overview-card__desc,
.overview-card:focus .overview-card__desc {
    opacity: 1;
    transform: translateY(0);
    max-height: 7rem;
}

.overview-note {
    color: #5f7480;
    font-size: 0.95rem;
    margin-top: 1rem;
}

body.dark-mode .overview-section {
    background: linear-gradient(180deg, rgba(18, 31, 41, 0.98) 0%, rgba(11, 24, 34, 0.98) 100%);
    border-color: rgba(123, 184, 206, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

body.dark-mode .overview-kicker {
    color: #73c9e0;
}

body.dark-mode .overview-title {
    color: #f1fbff;
}

body.dark-mode .overview-lead {
    color: rgba(231, 244, 249, 0.82);
}

body.dark-mode .overview-card {
    background: #071822;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

body.dark-mode .overview-card::after {
    background: linear-gradient(180deg, rgba(2, 10, 16, 0.08) 0%, rgba(2, 10, 16, 0.8) 100%);
}

body.dark-mode .overview-card__title {
    color: #f4fcff;
}

body.dark-mode .overview-card__desc {
    color: rgba(232, 247, 251, 0.88);
}

body.dark-mode .overview-note {
    color: rgba(198, 220, 228, 0.78);
}

body.dark-mode .overview-status,
body.dark-mode .atlas-filterbar {
    border-color: rgba(123, 184, 206, 0.18);
    background: rgba(20, 45, 57, 0.78);
    color: rgba(225, 241, 247, 0.78);
}

body.dark-mode .atlas-stats,
body.dark-mode .atlas-panel {
    border-color: rgba(123, 184, 206, 0.18);
    background: #102733;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

body.dark-mode .atlas-stat + .atlas-stat::before {
    background: rgba(150, 198, 213, 0.18);
}

body.dark-mode .atlas-stat:hover,
body.dark-mode .atlas-stat:focus {
    background: #173542;
    box-shadow: inset 0 -3px 0 #64cbc8;
}

body.dark-mode .atlas-stat--genomes {
    background: linear-gradient(135deg, #132e3b 0%, #153543 100%);
}

body.dark-mode .atlas-stat--proteins {
    background: linear-gradient(135deg, #3a3123 0%, #413522 100%);
}

body.dark-mode .atlas-stat--orthogroups {
    background: linear-gradient(135deg, #3b2928 0%, #432d2a 100%);
}

body.dark-mode .atlas-stat--genomes:hover,
body.dark-mode .atlas-stat--genomes:focus {
    background: linear-gradient(135deg, #173846 0%, #193f4d 100%);
    box-shadow: inset 0 -3px 0 #62b4cc;
}

body.dark-mode .atlas-stat--proteins:hover,
body.dark-mode .atlas-stat--proteins:focus {
    background: linear-gradient(135deg, #463a27 0%, #504129 100%);
    box-shadow: inset 0 -3px 0 #e4ad55;
}

body.dark-mode .atlas-stat--orthogroups:hover,
body.dark-mode .atlas-stat--orthogroups:focus {
    background: linear-gradient(135deg, #49302d 0%, #553631 100%);
    box-shadow: inset 0 -3px 0 #e28b77;
}

body.dark-mode .atlas-stat__value,
body.dark-mode .atlas-panel__header h4,
body.dark-mode .atlas-filterbar__intro {
    color: #effbff;
}

body.dark-mode .atlas-stat__label,
body.dark-mode .atlas-stat__detail,
body.dark-mode .atlas-panel__meta,
body.dark-mode .atlas-panel__note,
body.dark-mode .atlas-filter {
    color: rgba(213, 234, 241, 0.72);
}

body.dark-mode .atlas-filter select {
    border-color: rgba(147, 201, 217, 0.22);
    background: #0a1e29;
    color: #edfaff;
}

body.dark-mode .atlas-upset__axis,
body.dark-mode .atlas-upset__guide {
    stroke: #294653;
}

body.dark-mode .atlas-upset__connector {
    stroke: #8ed3d6;
}

body.dark-mode .atlas-upset__dot {
    fill: #8ed3d6;
}

body.dark-mode .atlas-upset__dot--off {
    fill: #294653;
}

body.dark-mode .atlas-upset text,
body.dark-mode .atlas-upset .atlas-upset__count {
    fill: #d5e9ef;
}

@media (max-width: 991.98px) {
    .atlas-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .atlas-filterbar {
        grid-template-columns: 1fr 1fr;
    }

    .atlas-filterbar__intro {
        grid-column: 1 / -1;
    }

    .atlas-chart-grid {
        grid-template-columns: 1fr;
    }

    .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .overview-section {
        padding: 1.25rem 1rem 1.5rem;
    }

    .atlas-stats {
        grid-template-columns: 1fr;
    }

    .atlas-stat + .atlas-stat::before {
        display: none;
    }

    .atlas-stat {
        padding: 1rem;
    }

    .atlas-stat__value {
        font-size: 1.65rem;
    }

    .atlas-filterbar {
        grid-template-columns: 1fr;
    }

    .atlas-filterbar__intro {
        grid-column: auto;
    }

    .atlas-panel {
        padding: 1rem 0.75rem 0.65rem;
    }

    .atlas-panel__header {
        flex-direction: column;
        min-height: auto;
    }

    .atlas-filter--inline {
        width: 100%;
    }

    .atlas-chart {
        min-height: 290px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .overview-card__desc {
        opacity: 1;
        max-height: none;
        transform: none;
    }
}
