@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;600;700;800&family=Major+Mono+Display&display=swap');

:root {
    --nav-bg: rgba(2, 8, 6, 0.82);
    --nav-line: rgba(148, 163, 184, 0.16);
    --nav-text: #dce7e1;
    --nav-muted: #8f9b95;
    --nav-green: #31e274;
    --nav-green-2: #89f7a9;
}

body.has-global-nav {
    padding-top: 72px;
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-line);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100dvw - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
    position: relative;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    flex: 0 0 auto;
}

.brand-name {
    font-family: "Major Mono Display", "JetBrains Mono", monospace;
    font-size: 1.16rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-name span {
    color: var(--nav-green);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    color: var(--nav-text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: 0.88rem;
    font-weight: 800;
    transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links a.active {
    color: #ffffff;
    border-color: var(--nav-green);
}

.nav-statement-label {
    white-space: nowrap;
}

.nav-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    margin-left: 7px;
    margin-inline-start: 0.45rem;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(49, 226, 116, 0.18);
    color: var(--nav-green-2);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.nav-ghost,
.nav-qa,
.nav-upgrade,
.version-toggle {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 900;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.nav-ghost,
.nav-qa,
.version-toggle {
    color: var(--nav-text);
    border: 1px solid var(--nav-line);
    background: rgba(255, 255, 255, 0.025);
}

.version-toggle {
    cursor: pointer;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.version-toggle-track {
    width: 34px;
    height: 18px;
    padding: 2px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.version-toggle-knob {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #dce7e1;
    transition: transform 0.16s ease, background 0.16s ease;
}

.version-toggle.active .version-toggle-track {
    background: rgba(49, 226, 116, 0.22);
    box-shadow: inset 0 0 0 1px rgba(49, 226, 116, 0.45);
}

.version-toggle.active .version-toggle-knob {
    transform: translateX(16px);
    background: var(--nav-green);
}

.version-toggle.active {
    border-color: rgba(49, 226, 116, 0.42);
    color: #ffffff;
}

.nav-qa span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--nav-green);
    box-shadow: 0 0 16px rgba(49, 226, 116, 0.55);
}

.nav-upgrade {
    color: #031009;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #2ccc67, #31e274);
}

.nav-ghost:hover,
.nav-qa:hover,
.nav-upgrade:hover,
.version-toggle:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-ghost:hover,
.nav-qa:hover,
.version-toggle:hover {
    color: #ffffff;
    border-color: rgba(49, 226, 116, 0.38);
}

.nav-upgrade:hover {
    color: #031009;
}

.nav-toggle {
    display: none;
    position: relative;
    z-index: 2;
    width: 44px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--nav-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.nav-toggle-line {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    right: 16px;
    width: min(320px, calc(100vw - 32px));
    padding: 10px;
    border: 1px solid var(--nav-line);
    border-radius: 8px;
    background: rgba(2, 8, 6, 0.96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    z-index: 1199;
}

.mobile-nav.open {
    display: block;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    color: var(--nav-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ffffff;
    background: rgba(49, 226, 116, 0.1);
}

.mobile-actions {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--nav-line);
}

.mobile-version-toggle {
    width: 100%;
    justify-content: flex-start;
}

@media (max-width: 1040px) {
    .nav-links,
    .nav-actions {
        display: none;
    }

    .nav-shell {
        justify-content: space-between;
        min-height: 64px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .mobile-nav {
        top: 64px;
    }

    body.has-global-nav {
        padding-top: 64px;
    }
}

@media (max-width: 520px) {
    .nav-shell {
        width: min(1180px, calc(100dvw - 20px));
    }

    .brand-name {
        font-size: 0.98rem;
    }
}
