body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

body > main {
    width: 100%;
    flex: 1 0 auto;
}

body > .site-footer {
    flex-shrink: 0;
}

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: auto;
    min-height: 68px;
    margin: 0;
    padding: 0 max(24px, calc((100vw - 1120px) / 2));
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 12, .92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: auto;
    height: 40px;
    image-rendering: pixelated;
}

.brand-copy {
    display: grid;
    gap: 0;
    line-height: 1.25;
}

.brand-copy strong {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.brand-copy small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, .03);
    font-size: 13px;
    font-weight: 550;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.nav-link:hover, .nav-link[aria-current="page"] {
    border-color: var(--border-strong);
    color: var(--text);
    background: rgba(255, 255, 255, .06);
}

#account-button {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .site-header {
        padding: 0 16px;
    }

    .brand-copy {
        display: grid;
    }

    .brand-copy small {
        display: none;
    }

    .header-nav {
        gap: 4px;
    }

    .header-nav .nav-link:first-child {
        display: inline-flex;
    }

    .nav-link {
        min-height: 34px;
        padding: 0 10px;
        font-size: 12px;
    }

    #account-button {
        max-width: 96px;
    }
}

@media (max-width: 520px) {
    .brand-copy {
        display: none;
    }

    .brand-logo {
        height: 36px;
    }
}

@media (max-width: 390px) {
    .site-header {
        padding: 0 10px;
    }

    .brand-logo {
        height: 32px;
    }

    .header-nav {
        gap: 2px;
    }

    .nav-link {
        padding: 0 8px;
        font-size: 11px;
    }

    #account-button {
        max-width: 72px;
    }
}
