:root {
    color-scheme: dark;
    --ink: #eceef6;
    --muted: #a2a7ba;
    --line: rgb(255 255 255 / 18%);
    --accent: #a58bff;
    --glass: rgb(15 18 42 / 62%);
    color: var(--ink);
    font: 15px/1.5 "Space Grotesk", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font: inherit;
}

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

button {
    color: inherit;
    cursor: pointer;
    font: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.nav-wrap {
    position: sticky;
    top: 12px;
    z-index: 50;
    padding: 0 12px;
}

.nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(980px, 100%);
    margin: 0 auto;
    padding: 10px 12px 10px 16px;
    min-height: 60px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--glass);
    box-shadow: 0 8px 30px rgb(0 0 0 / 30%);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.brand-mark {
    display: block;
    width: 34px;
    height: 34px;
    border: 1px solid rgb(255 255 255 / 30%);
    border-radius: 10px;
    object-fit: cover;
}

.links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.links a {
    display: block;
    padding: 7px 12px;
    border-radius: 10px;
    color: var(--muted);
    transition: background .15s, color .15s;
}

.links a:hover,
.links a[aria-current="page"] {
    background: rgb(127 127 160 / 20%);
    color: var(--ink);
}

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

.burger {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
}

main.page-shell {
    width: min(1100px, calc(100% - 32px));
    margin: clamp(24px, 6vw, 48px) auto;
}

main.page-shell--content {
    width: min(900px, calc(100% - 32px));
}

main.page-shell--narrow {
    width: min(460px, calc(100% - 32px));
}

main.page-shell--card {
    padding: clamp(20px, 4vw, 28px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--glass);
    box-shadow: 0 8px 30px rgb(0 0 0 / 20%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

main.page-shell--card h1 {
    margin-top: 0;
}

.welcome-window,
.team-panel,
.content-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--glass);
    box-shadow: 0 8px 30px rgb(0 0 0 / 20%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 720px) {
    .burger {
        display: inline-flex;
    }

    .links {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: rgb(15 18 42 / 94%);
        box-shadow: 0 8px 30px rgb(0 0 0 / 25%);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .nav.open .links {
        display: flex;
    }

    .links a {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    main.page-shell,
    main.page-shell--content {
        width: calc(100% - 24px);
    }

    main.page-shell--narrow {
        width: min(460px, calc(100% - 24px));
    }
}
