:root {
    --ink: #21313c;
    --muted: #637482;
    --line: #dbe6ec;
    --soft: #f4f8fb;
    --panel: #ffffff;
    --blue: #0a68b7;
    --teal: #21a69a;
    --orange: #d9822b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f0f0f0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    width: 100%;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 999;
    height: 68px;
    border-bottom: 0;
    background-color: rgba(255, 255, 255, .72);
    box-shadow: none;
    transition: background-color .28s ease, box-shadow .28s ease, backdrop-filter .28s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 130px;
    gap: 3px;
    font-weight: 500;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 40px;
    overflow: visible;
}

.brand-mark img {
    display: block;
    width: auto;
    height: 40px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-text {
    display: grid;
    gap: 0;
    margin: 0;
}

.brand-text strong {
    color: #212b36;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.brand-text span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 1 auto;
    gap: 0;
}

.nav-label-short {
    display: none;
}

.site-nav a {
    display: block;
    position: relative;
    height: 44px;
    line-height: 44px;
    margin-left: 16px;
    padding: 0 12px;
    color: #212b36;
    font-size: 22px;
    font-weight: 400;
    transition: color .22s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 2px;
    left: 50%;
    height: 3px;
    border-radius: 3px;
    background-color: #0a68b7;
    transition: left .24s ease, right .24s ease;
}

.site-nav a:hover {
    color: #0a68b7;
}

.site-nav .code-link {
    margin-left: 22px;
    border: 1px solid rgba(10, 104, 183, .26);
    border-radius: 999px;
    color: #0a68b7;
    line-height: 40px;
    height: 42px;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
    right: 12px;
    left: 12px;
}

.page-shell {
    width: 80%;
    max-width: none;
    margin: 80px auto 16px;
    background: var(--panel);
    box-shadow: rgba(27, 84, 111, .06) 0 18px 50px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(310px, .9fr);
    gap: 32px;
    align-items: start;
    align-content: start;
    min-height: 420px;
    padding: 56px 64px 44px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 88% 18%, rgba(33, 166, 154, .16), transparent 30%),
        linear-gradient(120deg, #ffffff 0%, #f4f9fc 100%);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: #24323d;
    font-size: 42px;
    line-height: 1.12;
}

.lead {
    margin: 18px 0 0;
    color: #52616b;
    font-size: 17px;
    line-height: 1.75;
}

.manuscript-status {
    display: inline-flex;
    align-items: center;
    margin: 18px 0 0;
    border: 1px solid rgba(10, 104, 183, .18);
    border-radius: 999px;
    background: rgba(10, 104, 183, .07);
    color: #315366;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    padding: 8px 12px;
}

.hero-panel {
    display: grid;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
}

.hero-note {
    align-content: center;
    min-height: 132px;
}

.hero-note strong {
    color: #273744;
    font-size: 21px;
}

.hero-note span {
    color: #5b6d78;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.55;
}

.fish-sample-panel {
    width: min(360px, 100%);
    margin-left: auto;
}

.overview-hero {
    min-height: 360px;
    padding-bottom: 28px;
}

.fish-hero {
    grid-template-columns: 1fr;
    min-height: 220px;
    padding-bottom: 28px;
}

.structure-hero {
    grid-template-columns: 1fr;
    min-height: 220px;
    padding-bottom: 28px;
}

.structure-hero + .content,
.fish-hero + .content {
    padding-top: 28px;
}

.fish-detail-card {
    margin-left: 28px;
}

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

.stat-card {
    min-height: 104px;
    padding: 18px;
    border: 1px solid #dbe8ee;
    border-radius: 8px;
    background: #fff;
}

.stat-card strong {
    display: block;
    color: var(--blue);
    font-size: 31px;
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 10px;
    color: #536674;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.content {
    padding: 46px 64px 56px;
}

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

.section-card,
.tool-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 28px;
}

h2 {
    margin: 0 0 16px;
    color: #273744;
    font-size: 28px;
    line-height: 1.2;
}

h3 {
    margin: 0 0 12px;
    color: #273744;
    font-size: 21px;
}

p {
    color: #4f606b;
    font-size: 16px;
    line-height: 1.72;
}

.gene-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.gene-list span {
    border: 1px solid #cfe0e8;
    border-radius: 999px;
    background: #f7fbfd;
    color: #28424f;
    font-size: 14px;
    font-weight: 800;
    padding: 8px 12px;
}

.overview-figure {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.overview-figure img {
    display: block;
    width: 100%;
    height: auto;
    min-width: 900px;
    max-width: 1120px;
    margin: 0 auto;
    border-radius: 4px;
}

.figure-stack {
    display: grid;
    gap: 24px;
}

.figure-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 24px;
}

.figure-panel h2 {
    margin-bottom: 18px;
}

.web-figure {
    overflow-x: auto;
    border-radius: 6px;
    background: #fff;
}

.web-figure img {
    display: block;
    width: 100%;
    min-width: 860px;
    max-width: 1160px;
    height: auto;
    margin: 0 auto;
}

.web-figure-structure img {
    width: min(100%, 1160px);
}

.web-figure-fish img {
    width: min(47.619%, 552.38px);
    min-width: 0;
    max-width: 552.38px;
}

.finding-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.finding-grid article {
    min-height: 116px;
    border: 1px solid #dbe8ee;
    border-radius: 8px;
    background: #fbfdff;
    padding: 16px;
}

.finding-grid strong {
    display: block;
    margin-bottom: 8px;
    color: #263742;
    font-size: 15px;
}

.finding-grid span {
    display: block;
    color: #5b6d78;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.amplicon-placeholder {
    display: grid;
    place-items: center;
    min-height: 390px;
    border: 1px dashed #adc5d3;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(10, 104, 183, .07) 0 1px, transparent 1px 100%),
        linear-gradient(0deg, rgba(10, 104, 183, .07) 0 1px, transparent 1px 100%),
        #f8fbfd;
    background-size: 28px 28px;
    color: #607482;
    text-align: center;
    padding: 28px;
}

.amplicon-placeholder strong {
    display: block;
    margin-bottom: 8px;
    color: #2e4654;
    font-size: 22px;
}

.fish-layout {
    display: grid;
    grid-template-columns: minmax(0, 520px) 290px;
    gap: 24px;
    align-items: start;
    justify-content: center;
}

.viewer {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fafc;
    width: 100%;
    max-width: 520px;
}

.viewer-stage {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    min-height: 320px;
    background: #101419;
    cursor: ew-resize;
    user-select: none;
}

.viewer-stage video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.viewer-stage::after {
    content: "Drag left or right to inspect the rotation";
    position: absolute;
    right: 16px;
    bottom: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: #263742;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 12px;
}

.viewer-controls {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.viewer-controls button {
    height: 38px;
    border: 1px solid #cbd9e2;
    border-radius: 6px;
    background: #fff;
    color: #2d4250;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    padding: 0 14px;
}

.viewer-controls button.primary {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.viewer-controls input[type="range"] {
    width: 100%;
    accent-color: var(--blue);
}

.viewer-meta {
    color: #5d6f7b;
    font-size: 13px;
    font-weight: 800;
}

.side-list {
    display: grid;
    gap: 14px;
}

.side-item {
    border-left: 4px solid var(--teal);
    background: #f7fbfd;
    padding: 14px 16px;
}

.side-item strong {
    display: block;
    margin-bottom: 6px;
}

.side-item span {
    color: #5b6d78;
    font-size: 14px;
    line-height: 1.5;
}

.footer {
    width: 80%;
    margin: 0 auto 6px;
    color: #687985;
    font-size: 13px;
    text-align: center;
}

.footer p {
    margin: 10px 0 0;
    color: #687985;
    font-size: 13px;
}

.copyright-line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 0;
    color: #687985;
    font-size: 13px;
    line-height: 1.6;
}

.icp-record {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: rgba(104, 121, 133, 0.60);
    font-size: 10px;
    font-weight: 400;
    text-decoration: none;
}

.icp-record:hover {
    color: #0a68b7;
    text-decoration: underline;
}

.icp-record img {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.footer-links a {
    color: #0a68b7;
    font-size: 14px;
    font-weight: 800;
}

.footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 860px) {
    .site-header {
        height: 68px;
    }

    .nav-wrap {
        flex-direction: row;
        gap: 10px;
        height: 100%;
        padding: 0 12px;
    }

    .site-nav {
        flex: 1 1 auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 0;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav a {
        flex: 0 0 auto;
        height: 36px;
        line-height: 36px;
        margin-left: 4px;
        padding: 0 4px;
        font-size: 14px;
        white-space: nowrap;
    }

    .nav-label-long {
        display: none;
    }

    .nav-label-short {
        display: inline;
    }

    .site-nav a::after {
        bottom: 2px;
    }

    .site-nav .code-link {
        height: 34px;
        margin-left: 6px;
        line-height: 32px;
    }

    .brand {
        flex: 0 0 82px;
        gap: 3px;
    }

    .brand-mark {
        width: 32px;
        height: 30px;
    }

    .brand-mark img {
        height: 30px;
    }

    .brand-text strong {
        font-size: 11px;
    }

    .brand-text {
        display: grid;
    }

    @media (max-width: 420px) {
        .site-nav a {
            margin-left: 2px;
            padding: 0 2px;
            font-size: 12px;
        }
    }

    .brand-text span {
        display: none;
    }

    .hero,
    .fish-layout,
    .section-grid {
        grid-template-columns: 1fr;
    }

    .fish-layout {
        grid-template-columns: minmax(0, 1fr) minmax(150px, 180px);
        gap: 16px;
    }

    .fish-detail-card {
        margin-left: 0;
    }

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

    .hero,
    .content {
        padding-right: 24px;
        padding-left: 24px;
    }

    .hero {
        min-height: 638px;
        align-content: start;
    }

    .structure-hero,
    .fish-hero {
        min-height: 220px;
    }

    .overview-hero {
        min-height: 520px;
    }

    .page-shell {
        width: calc(100% - 30px);
        margin-top: 76px;
    }

    .footer {
        width: calc(100% - 30px);
    }

    h1 {
        font-size: 34px;
    }

    .viewer-stage {
        min-height: 300px;
    }

    .overview-figure {
        padding: 10px;
    }

    .overview-figure img {
        margin: 0;
    }

    .figure-panel {
        padding: 12px;
    }

    .web-figure img,
    .web-figure-fish img {
        margin: 0 auto;
    }

    .web-figure-structure img {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .fish-layout {
        grid-template-columns: 1fr;
    }
}
