/* Shared site navigation for standalone tutorial/HUMKT tool pages. */
body.zhy-tool-shell {
    padding: 0 !important;
    background:
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 45%, #f7f8fb 100%) !important;
}

.zhy-site-nav,
.zhy-site-nav * {
    box-sizing: border-box;
}

.zhy-site-nav {
    position: sticky;
    top: 0;
    z-index: 10000;
    width: 100%;
    margin: 0 0 24px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid #e6edf5;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.zhy-tool-shell > .container {
    margin-top: 24px;
    margin-bottom: 40px;
}

.zhy-site-nav__inner {
    max-width: 1320px;
    min-height: 64px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 18px;
}

@media (min-width: 992px) {
    .zhy-site-nav__inner {
        display: grid;
        grid-template-columns: minmax(210px, auto) minmax(0, 1fr) minmax(160px, auto);
        gap: 18px;
    }

    .zhy-site-nav__brand {
        justify-self: start;
    }

    .zhy-site-nav__links {
        justify-self: center;
        justify-content: center;
    }

    .zhy-site-nav__actions {
        justify-self: end;
    }
}

.zhy-site-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #7a8cff;
    background: linear-gradient(90deg, #7a8cff, #b88cff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.24rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.zhy-site-nav__brand:hover {
    color: #7a8cff;
    text-decoration: none;
}

.zhy-site-nav__logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    box-shadow: 0 8px 18px rgba(122, 140, 255, .22);
}

.zhy-site-nav__links {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.zhy-site-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 64px;
    padding: 21px 0 19px;
    border-radius: 0;
    color: #263247;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

.zhy-site-nav__link:hover,
.zhy-site-nav__link.is-active {
    color: #7a8cff;
    background: transparent;
    text-decoration: none;
}

.zhy-site-nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: block;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7a8cff, #b88cff);
}

.zhy-site-nav__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.zhy-site-nav__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #d9e2ee;
    border-radius: 999px;
    color: #334155;
    background: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.zhy-site-nav__btn:hover {
    color: #7a8cff;
    border-color: #c7c7ff;
    text-decoration: none;
}

.zhy-site-nav__btn.is-primary {
    color: #fff;
    background: linear-gradient(90deg, #7a8cff, #b88cff);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(122, 140, 255, .22);
}

.zhy-site-nav__btn.is-primary:hover {
    color: #fff;
    background: linear-gradient(90deg, #7083f5, #ad82f5);
}

@media (max-width: 1180px) {
    .zhy-site-nav__inner {
        gap: 12px;
    }

    .zhy-site-nav__brand {
        font-size: 16px;
    }

    .zhy-site-nav__link {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 980px) {
    .zhy-site-nav {
        position: static;
        margin-bottom: 18px;
    }

    .zhy-site-nav__inner {
        min-height: auto;
        padding: 12px 14px;
        display: flex;
        flex-wrap: wrap;
    }

    .zhy-site-nav__brand {
        max-width: calc(100% - 156px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .zhy-site-nav__actions {
        margin-left: auto;
    }

    .zhy-site-nav__links {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding: 2px 0 4px;
        scrollbar-width: none;
        gap: 4px;
    }

    .zhy-site-nav__links::-webkit-scrollbar {
        display: none;
    }

    .zhy-site-nav__link {
        min-height: 40px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .zhy-site-nav__link:hover,
    .zhy-site-nav__link.is-active {
        background: #f1efff;
    }

    .zhy-site-nav__link.is-active::after {
        display: none;
    }
}

@media (max-width: 520px) {
    .zhy-site-nav__inner {
        padding-left: 10px;
        padding-right: 10px;
        gap: 6px;
    }

    .zhy-site-nav__brand {
        max-width: 132px;
        width: auto;
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .zhy-site-nav__actions {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
        gap: 6px;
    }

    .zhy-site-nav__btn {
        flex: 0 0 auto;
        min-height: 36px;
        padding: 7px 12px;
    }
}
