.page {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
}

main {
    flex: 1;
}

.sidebar {
    background: linear-gradient(180deg, #246DFF 0%, #F6F6F6 100%);
    flex-shrink: 0;
    overflow: visible;
}

.top-row {
    background: linear-gradient(90deg, #246DFF 0%, #07C3D6 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-row__logo {
    display: flex;
    align-items: center;
}

.top-row__logo img {
    width: 143px;
    height: auto;
    filter: contrast(10);
}

.top-row__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-row__nav > a {
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.top-row__nav > a:hover {
    color: #fff;
    opacity: 0.85;
}


.top-row .zf-theme-toggle {
    flex-shrink: 0;
}

@media (max-width: 640.98px) {
    .top-row {
        padding: 0 1rem;
    }

    .top-row__nav {
        gap: 1rem;
    }

    .sidebar {
        /* On mobile the sidebar is fixed-positioned inside SideNav,
           so the wrapper doesn't need space */
        width: 0;
        height: 0;
        overflow: visible;
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        height: 100vh;
        position: sticky;
        top: 0;
        z-index: 101;
    }

    .sidebar + main article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .sidebar + main .content {
        background: var(--zf-card-bg);
        border-radius: 30px;
        padding: 17px;
        margin: 15px;
        box-shadow: var(--zf-card-shadow);
    }
}

/* ================================ */
/* Dark Mode                        */
/* ================================ */

html[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #246DFF 0%, #0D1117 100%);
}
