/* Public site chrome — sticky nav + footer (Home, Docs, Privacy, Terms, Login) */
.topnav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(34, 37, 39, 0.9);
    color: #F0F4F5;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    border-color: rgba(32, 184, 205, 0.5);
    outline: none;
}

.nav-toggle-bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 18px;
}

.nav-toggle-bars span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.topnav-wrap.nav-open .nav-toggle-bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.topnav-wrap.nav-open .nav-toggle-bars span:nth-child(2) {
    opacity: 0;
}
.topnav-wrap.nav-open .nav-toggle-bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.pub-foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
}

.pub-foot-links a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.pub-foot-links a:hover {
    color: #20B8CD;
}

@media (max-width: 900px) {
    .topnav-wrap .topnav {
        flex-wrap: wrap;
        align-items: stretch;
        width: min(1180px, calc(100% - 24px));
        padding: 10px 0;
        gap: 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    /* Collapse primary nav until hamburger opens */
    .topnav-wrap .topnav > nav,
    .topnav-wrap .nav-links,
    .topnav-wrap .legal-nav,
    .topnav-wrap .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-top: 10px;
        padding: 8px;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(25, 27, 28, 0.98);
    }

    .topnav-wrap.nav-open .topnav > nav,
    .topnav-wrap.nav-open .nav-links,
    .topnav-wrap.nav-open .legal-nav,
    .topnav-wrap.nav-open .nav {
        display: flex;
    }

    .topnav-wrap .topnav > nav > a,
    .topnav-wrap .nav-links > a,
    .topnav-wrap .legal-nav > a,
    .topnav-wrap .nav > a {
        margin: 0 !important;
        padding: 12px 14px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
        line-height: 1.3;
        width: 100%;
        box-sizing: border-box;
    }

    .topnav-wrap .topnav > nav > a:not(.nav-cta):hover,
    .topnav-wrap .nav-links > a:not(.nav-cta):hover,
    .topnav-wrap .legal-nav > a:not(.nav-cta):hover,
    .topnav-wrap .nav > a:not(.nav-cta):hover {
        background: rgba(32, 184, 205, 0.1);
        color: #F0F4F5;
        text-decoration: none;
    }

    .topnav-wrap .nav-cta {
        margin: 6px 0 0 !important;
        width: 100%;
        justify-content: center;
        padding: 13px 16px !important;
        font-size: 15px !important;
        box-sizing: border-box;
    }

    .site-foot,
    footer.site-foot,
    footer.foot,
    .pub-foot {
        width: min(1180px, calc(100% - 24px)) !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
    }

    .site-foot .links,
    footer.site-foot .links,
    footer.foot > div:last-child,
    .pub-foot-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .site-foot .links a,
    footer.site-foot .links a,
    footer.foot a,
    .pub-foot-links a {
        display: inline-flex;
        align-items: center;
        padding: 9px 12px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(34, 37, 39, 0.7);
        color: #94A3B8;
        font-size: 13px;
        text-decoration: none;
        line-height: 1.2;
    }

    .site-foot .links a:hover,
    footer.site-foot .links a:hover,
    footer.foot a:hover,
    .pub-foot-links a:hover {
        color: #20B8CD;
        border-color: rgba(32, 184, 205, 0.35);
    }
}

@media (min-width: 901px) {
    .nav-toggle {
        display: none !important;
    }

    .topnav-bar {
        width: auto;
        flex: 0 0 auto;
    }

    .topnav-wrap .topnav {
        flex-wrap: nowrap;
    }

    .topnav-wrap .topnav > nav,
    .topnav-wrap .nav-links,
    .topnav-wrap .legal-nav,
    .topnav-wrap .nav {
        display: flex !important;
        width: auto;
        flex-direction: row;
        align-items: center;
        margin-top: 0;
        padding: 0;
        border: none;
        background: transparent;
    }
}
