.platform-nav-wide {
    display: none !important;
}

.platform-nav-compact {
    display: block;
    flex: 0 0 auto;
    margin-left: auto;
}

.platform-menu {
    position: relative;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}

.platform-menu > summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.platform-menu > summary::-webkit-details-marker {
    display: none;
}

.platform-menu > summary:hover,
.platform-menu[open] > summary {
    color: #4f46e5;
    background: #eef2ff;
}

.platform-menu > summary:focus-visible,
.platform-menu-panel a:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

.platform-menu[open] .platform-menu-chevron {
    transform: rotate(180deg);
}

.platform-menu-chevron {
    display: inline-block;
    font-size: 11px;
    transition: transform 150ms ease;
}

.platform-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    width: min(320px, calc(100vw - 32px));
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
}

.platform-menu-panel p {
    margin: 6px 10px 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.platform-menu-panel a {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
    text-decoration: none;
}

.platform-menu-panel a:hover {
    color: #4f46e5;
    background: #eef2ff;
}

.platform-menu-divider {
    height: 1px;
    margin: 8px 2px;
    background: #e2e8f0;
}

@media (min-width: 1280px) {
    .platform-nav-wide {
        display: flex !important;
    }

    .platform-nav-compact {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    .platform-nav-compact {
        margin-right: 12px;
    }

    .platform-nav-compact .platform-menu-panel {
        left: 0;
        right: auto;
    }

    .site-actions-nav {
        gap: 12px;
        font-size: 12px;
    }

    .site-actions-nav > * + * {
        margin-left: 0 !important;
    }
}
