*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
}

.site-skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10000;
    padding: 0.7rem 1rem;
    border-radius: 0.6rem;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform 0.15s ease;
}

.site-skip-link:focus {
    transform: translateY(0);
}

:where(
    a,
    button,
    input,
    select,
    summary,
    textarea,
    [role="button"],
    [tabindex]
):focus-visible {
    outline: 3px solid #67e8f9 !important;
    outline-offset: 3px !important;
}

.privacy-consent {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 9998;
    width: min(31rem, calc(100vw - 2rem));
    padding: 1.1rem;
    border: 1px solid rgba(167, 139, 250, 0.55);
    border-radius: 1rem;
    background: rgba(15, 15, 19, 0.98);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.48);
    color: #e5e7eb;
}

.privacy-consent[hidden] {
    display: none;
}

.privacy-consent h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
}

.privacy-consent p {
    margin: 0.65rem 0;
    color: #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.6;
}

.privacy-consent a {
    color: #c4b5fd;
    text-decoration: underline;
}

.privacy-consent label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0.85rem 0;
    font-size: 0.84rem;
    line-height: 1.5;
}

.privacy-consent input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.15rem;
    accent-color: #8b5cf6;
}

.privacy-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.privacy-consent button,
.privacy-settings-trigger {
    min-height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.65rem;
    background: #27272a;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
}

.privacy-consent button {
    padding: 0.65rem 0.85rem;
}

.privacy-consent button[data-privacy-primary] {
    border-color: #7c3aed;
    background: #7c3aed;
}

.privacy-settings-trigger {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 9997;
    padding: 0.6rem 0.85rem;
    background: rgba(24, 24, 27, 0.96);
}

.privacy-consent:not([hidden]) +
.privacy-settings-trigger {
    display: none;
}

@media (max-width: 767px) {
    .privacy-consent {
        right: 0.5rem;
        bottom: 0.5rem;
        width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
        overflow-y: auto;
    }

    .privacy-consent__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .privacy-settings-trigger {
        right: 0.5rem;
        bottom: 0.5rem;
    }

    body.site-page-explore #explore-nav {
        min-height: 4rem;
        height: auto;
        padding: 0.55rem 0.75rem;
        gap: 0.5rem;
    }

    body.site-page-explore #explore-brand {
        gap: 0.45rem;
    }

    body.site-page-explore #explore-brand-name,
    body.site-page-explore #explore-sign-in {
        display: none;
    }

    body.site-page-explore #explore-layout {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    body.site-page-explore .aura-glow-1,
    body.site-page-explore .aura-glow-2 {
        width: 40vw;
        height: 40vw;
        filter: blur(2rem);
    }

    body.site-page-explore .aura-glow-1 {
        left: 3rem;
    }

    body.site-page-explore .aura-glow-2 {
        right: 5rem;
    }

    body.site-page-dashboard {
        height: auto;
        min-height: 100dvh;
        overflow: auto;
    }

    body.site-page-dashboard #dashboard-nav {
        position: sticky;
        top: 0;
        min-height: 4rem;
        height: auto;
        padding: 0.55rem 0.75rem;
    }

    body.site-page-dashboard #dashboard-brand-label,
    body.site-page-dashboard #dashboard-token-badge {
        display: none;
    }

    body.site-page-dashboard #dashboard-layout {
        display: block;
        overflow: visible;
    }

    body.site-page-dashboard #dashboard-sidebar {
        width: 100%;
        max-height: none;
        padding: 0.75rem;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    body.site-page-dashboard #dashboard-sidebar > div:first-child,
    body.site-page-dashboard #dashboard-sidebar > div:last-child {
        display: none;
    }

    body.site-page-dashboard #dashboard-sidebar > nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
        padding: 0;
    }

    body.site-page-dashboard #dashboard-sidebar button {
        min-width: 0;
        margin-top: 0;
        padding: 0.7rem;
    }

    body.site-page-dashboard #dashboard-main {
        padding: 1rem;
        overflow: visible;
    }

    body.site-page-workspace,
    body.site-page-admin {
        display: block;
        height: auto;
        min-height: 100dvh;
        min-width: 0;
        overflow: auto;
    }

    body.site-page-workspace #sidebar {
        box-sizing: border-box;
        width: 100%;
        height: min(
            48rem,
            100dvh
        );
        min-height: 36rem;
        border-right: 0;
        border-bottom: 1px solid #333;
    }

    body.site-page-workspace #main-view {
        width: 100%;
        height: 100dvh;
        min-height: 40rem;
    }

    body.site-page-admin > aside {
        width: 100%;
        height: auto;
        max-height: 18rem;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.site-page-admin > main {
        box-sizing: border-box;
        width: 100%;
        min-height: 42rem;
    }

    body.site-page-admin > main > header {
        height: auto;
        min-height: 4rem;
        padding: 0.75rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    body.site-page-admin > main > header > div {
        flex-wrap: wrap;
    }

    body.site-page-home .bg-glow,
    body.site-page-home .bg-glow-right {
        width: calc(100vw - 4rem);
        height: calc(100vw - 4rem);
        right: auto;
        left: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .bg-glow,
    .bg-glow-right,
    .aura-glow-1,
    .aura-glow-2 {
        animation-name: none !important;
    }
}
